@ugurdemirel/landcraft 0.1.18 → 0.1.19

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("react"),s=require("./variants/Split.cjs"),u=require("./variants/Centered.cjs"),c=require("./variants/Statement.cjs"),o=i.forwardRef(({variant:n="split",...e},t)=>n==="centered"?r.jsx(u.HeroCentered,{ref:t,...e}):n==="statement"?r.jsx(c.HeroStatement,{ref:t,...e}):r.jsx(s.HeroSplit,{ref:t,...e}));o.displayName="Hero";exports.Hero=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),a=require("./variants/Split.cjs"),s=require("./variants/Centered.cjs"),u=require("./variants/Statement.cjs"),l=require("./variants/Parallax.cjs"),o=i.forwardRef(({variant:n="split",...e},r)=>n==="centered"?t.jsx(s.HeroCentered,{ref:r,...e}):n==="statement"?t.jsx(u.HeroStatement,{ref:r,...e}):n==="parallax"?t.jsx(l.HeroParallax,{ref:r,...e}):t.jsx(a.HeroSplit,{ref:r,...e}));o.displayName="Hero";exports.Hero=o;
2
2
  //# sourceMappingURL=Hero.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Hero.cjs","sources":["../../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { HeroProps } from \"./types\";\nimport { HeroSplit } from \"./variants/Split\";\nimport { HeroCentered } from \"./variants/Centered\";\nimport { HeroStatement } from \"./variants/Statement\";\n\nexport const Hero = forwardRef<HTMLElement, HeroProps>(({ variant = \"split\", ...props }, ref) => {\n if (variant === \"centered\") return <HeroCentered ref={ref} {...props} />;\n if (variant === \"statement\") return <HeroStatement ref={ref} {...props} />;\n return <HeroSplit ref={ref} {...props} />;\n});\nHero.displayName = \"Hero\";"],"names":["Hero","forwardRef","variant","props","ref","HeroCentered","HeroStatement","jsx","HeroSplit"],"mappings":"qPAMaA,EAAOC,EAAAA,WAAmC,CAAC,CAAE,QAAAC,EAAU,QAAS,GAAGC,CAAA,EAASC,IACnFF,IAAY,iBAAoBG,EAAAA,aAAA,CAAa,IAAAD,EAAW,GAAGD,EAAO,EAClED,IAAY,kBAAqBI,EAAAA,cAAA,CAAc,IAAAF,EAAW,GAAGD,EAAO,EACjEI,EAAAA,IAACC,EAAAA,UAAA,CAAU,IAAAJ,EAAW,GAAGD,CAAA,CAAO,CACxC,EACDH,EAAK,YAAc"}
1
+ {"version":3,"file":"Hero.cjs","sources":["../../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { HeroProps } from \"./types\";\nimport { HeroSplit } from \"./variants/Split\";\nimport { HeroCentered } from \"./variants/Centered\";\nimport { HeroStatement } from \"./variants/Statement\";\nimport { HeroParallax } from \"./variants/Parallax\";\n\nexport const Hero = forwardRef<HTMLElement, HeroProps>(({ variant = \"split\", ...props }, ref) => {\n if (variant === \"centered\") return <HeroCentered ref={ref} {...props} />;\n if (variant === \"statement\") return <HeroStatement ref={ref} {...props} />;\n if (variant === \"parallax\") return <HeroParallax ref={ref} {...props} />;\n return <HeroSplit ref={ref} {...props} />;\n});\nHero.displayName = \"Hero\";"],"names":["Hero","forwardRef","variant","props","ref","HeroCentered","HeroStatement","HeroParallax","jsx","HeroSplit"],"mappings":"0RAOaA,EAAOC,EAAAA,WAAmC,CAAC,CAAE,QAAAC,EAAU,QAAS,GAAGC,CAAA,EAASC,IACnFF,IAAY,iBAAoBG,EAAAA,aAAA,CAAa,IAAAD,EAAW,GAAGD,EAAO,EAClED,IAAY,kBAAqBI,EAAAA,cAAA,CAAc,IAAAF,EAAW,GAAGD,EAAO,EACpED,IAAY,iBAAoBK,EAAAA,aAAA,CAAa,IAAAH,EAAW,GAAGD,EAAO,EAC/DK,EAAAA,IAACC,EAAAA,UAAA,CAAU,IAAAL,EAAW,GAAGD,CAAA,CAAO,CACxC,EACDH,EAAK,YAAc"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),i=require("../../../utils/cn.cjs"),u=require("../parts.cjs"),D=18,F=5,P=.7;function C(r,d,l){d.current=r,typeof l=="function"?l(r):l&&(l.current=r)}function _(r){return{x:(r.x-50)*4,y:(r.y-50)*4}}const N=a.forwardRef(({className:r,eyebrow:d,title:l,description:x,primaryAction:f,secondaryAction:m,meta:h,media:p,logos:w=[],id:M,...T},E)=>{const y=a.useRef(null),[b,j]=a.useState({x:0,y:0}),[R,$]=a.useState(!1),[o,v]=a.useState(!1);a.useEffect(()=>{var s;if(typeof window.matchMedia!="function")return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>v(e.matches);return v(e.matches),(s=e.addEventListener)==null||s.call(e,"change",n),()=>{var c;return(c=e.removeEventListener)==null?void 0:c.call(e,"change",n)}},[]),a.useEffect(()=>{if(o)return;const e=requestAnimationFrame(()=>$(!0));return()=>cancelAnimationFrame(e)},[o]);const L=e=>{if(o)return;const n=y.current;if(!n)return;const s=n.getBoundingClientRect();j({x:((e.clientX-s.left)/s.width-.5)*2,y:((e.clientY-s.top)/s.height-.5)*2})},S=()=>j({x:0,y:0}),g=R||o;return t.jsxs("section",{ref:e=>C(e,y,E),id:M,onMouseMove:L,onMouseLeave:S,className:i.cn("relative w-full overflow-hidden border-b border-border bg-background",r),...T,children:[w.map((e,n)=>{const s=e.depth??D,c=_(e),A=`translate(calc(-50% + ${c.x}px), calc(-50% + ${c.y}px)) scale(0.6)`,H="translate(-50%, -50%)",O=o?"translate(0px, 0px)":`translate(${b.x*s}px, ${b.y*s}px)`;return t.jsx("div",{"aria-hidden":!0,"data-logo":e.label,className:"pointer-events-none absolute z-10 hidden transition-[transform,opacity] duration-700 ease-out md:block",style:{left:`${e.x}%`,top:`${e.y}%`,transform:g?H:A,opacity:g?1:0,transitionDelay:`${n*90}ms`},children:t.jsx("div",{className:"transition-transform duration-200 ease-out",style:{transform:O},children:t.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-border bg-surface shadow-raised",style:o?void 0:{animation:`hero-float ${F}s ease-in-out infinite`,animationDelay:`-${n*P}s`},children:e.icon})})},e.label)}),t.jsxs("div",{className:i.cn(u.heroContainer,"relative z-20 pt-24 pb-20 text-center sm:pt-32 sm:pb-24"),children:[t.jsx(u.HeroEyebrow,{eyebrow:d}),t.jsx("h1",{className:i.cn(u.heroTitleBase,"mt-7 max-w-4xl text-5xl leading-[1.04] sm:text-6xl lg:text-7xl"),children:l}),x?t.jsx("p",{className:"mx-auto mt-7 max-w-xl text-pretty leading-relaxed text-muted-foreground sm:text-lg",children:x}):null,f||m?t.jsx("div",{className:"mt-10 justify-center",children:t.jsx(u.HeroActions,{primaryAction:f,secondaryAction:m})}):null,h?t.jsx("ul",{className:"mt-14 flex flex-wrap items-center justify-center gap-x-9 gap-y-3",children:h.map((e,n)=>t.jsxs("li",{className:i.cn("flex items-center gap-2 text-sm text-muted-foreground",n>0&&"sm:border-l sm:border-border sm:pl-9"),children:[e.icon?t.jsx("span",{className:"text-foreground/35",children:e.icon}):null,e.label]},e.label))}):null,p?t.jsx("div",{className:"mt-16 w-full",children:p}):null]})]})});N.displayName="HeroParallax";exports.HeroParallax=N;
3
+ //# sourceMappingURL=Parallax.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Parallax.cjs","sources":["../../../../../src/components/Hero/variants/Parallax.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type ForwardedRef,\n type MouseEvent,\n type MutableRefObject,\n} from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { HeroActions, HeroEyebrow, heroContainer, heroTitleBase } from \"../parts\";\nimport type { HeroLogo, HeroProps } from \"../types\";\n\nconst DEFAULT_DEPTH = 18;\nconst FLOAT_DURATION = 5; // seconds per breathing cycle\nconst FLOAT_STAGGER = 0.7; // seconds of desync between consecutive tiles\n\nfunction setSectionRef(\n node: HTMLElement | null,\n localRef: MutableRefObject<HTMLElement | null>,\n forwarded: ForwardedRef<HTMLElement>,\n) {\n localRef.current = node;\n if (typeof forwarded === \"function\") forwarded(node);\n else if (forwarded) (forwarded as MutableRefObject<HTMLElement | null>).current = node;\n}\n\nfunction tileEntryOffset(logo: HeroLogo) {\n // Push the tile further out from the centre along the line it already sits on,\n // so it appears to fly in from off-screen.\n return { x: (logo.x - 50) * 4, y: (logo.y - 50) * 4 };\n}\n\n/** Parallax — centred copy with floating logo tiles that react to the mouse. */\nexport const HeroParallax = forwardRef<HTMLElement, HeroProps>(\n (\n { className, eyebrow, title, description, primaryAction, secondaryAction, meta, media, logos = [], id, ...props },\n ref,\n ) => {\n const sectionRef = useRef<HTMLElement | null>(null);\n const [offset, setOffset] = useState({ x: 0, y: 0 });\n const [entered, setEntered] = useState(false);\n const [reduceMotion, setReduceMotion] = useState(false);\n\n useEffect(() => {\n if (typeof window.matchMedia !== \"function\") return;\n const mq = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n const onChange = () => setReduceMotion(mq.matches);\n setReduceMotion(mq.matches);\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n\n useEffect(() => {\n if (reduceMotion) return;\n const raf = requestAnimationFrame(() => setEntered(true));\n return () => cancelAnimationFrame(raf);\n }, [reduceMotion]);\n\n const handleMouseMove = (e: MouseEvent<HTMLElement>) => {\n if (reduceMotion) return;\n const el = sectionRef.current;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n setOffset({\n x: ((e.clientX - rect.left) / rect.width - 0.5) * 2,\n y: ((e.clientY - rect.top) / rect.height - 0.5) * 2,\n });\n };\n\n const handleMouseLeave = () => setOffset({ x: 0, y: 0 });\n\n const showResting = entered || reduceMotion;\n\n return (\n <section\n ref={(node) => setSectionRef(node, sectionRef, ref)}\n id={id}\n onMouseMove={handleMouseMove}\n onMouseLeave={handleMouseLeave}\n className={cn(\"relative w-full overflow-hidden border-b border-border bg-background\", className)}\n {...props}\n >\n {logos.map((logo, i) => {\n const depth = logo.depth ?? DEFAULT_DEPTH;\n const entry = tileEntryOffset(logo);\n const entryTransform = `translate(calc(-50% + ${entry.x}px), calc(-50% + ${entry.y}px)) scale(0.6)`;\n const restingTransform = \"translate(-50%, -50%)\";\n const parallaxTransform = reduceMotion\n ? \"translate(0px, 0px)\"\n : `translate(${offset.x * depth}px, ${offset.y * depth}px)`;\n\n return (\n <div\n key={logo.label}\n aria-hidden\n data-logo={logo.label}\n className=\"pointer-events-none absolute z-10 hidden transition-[transform,opacity] duration-700 ease-out md:block\"\n style={{\n left: `${logo.x}%`,\n top: `${logo.y}%`,\n transform: showResting ? restingTransform : entryTransform,\n opacity: showResting ? 1 : 0,\n transitionDelay: `${i * 90}ms`,\n }}\n >\n <div\n className=\"transition-transform duration-200 ease-out\"\n style={{ transform: parallaxTransform }}\n >\n <div\n className=\"flex h-16 w-16 items-center justify-center rounded-2xl border border-border bg-surface shadow-raised\"\n style={\n reduceMotion\n ? undefined\n : {\n animation: `hero-float ${FLOAT_DURATION}s ease-in-out infinite`,\n animationDelay: `-${i * FLOAT_STAGGER}s`,\n }\n }\n >\n {logo.icon}\n </div>\n </div>\n </div>\n );\n })}\n\n <div className={cn(heroContainer, \"relative z-20 pt-24 pb-20 text-center sm:pt-32 sm:pb-24\")}>\n <HeroEyebrow eyebrow={eyebrow} />\n <h1 className={cn(heroTitleBase, \"mt-7 max-w-4xl text-5xl leading-[1.04] sm:text-6xl lg:text-7xl\")}>\n {title}\n </h1>\n {description ? (\n <p className=\"mx-auto mt-7 max-w-xl text-pretty leading-relaxed text-muted-foreground sm:text-lg\">\n {description}\n </p>\n ) : null}\n {primaryAction || secondaryAction ? (\n <div className=\"mt-10 justify-center\">\n <HeroActions primaryAction={primaryAction} secondaryAction={secondaryAction} />\n </div>\n ) : null}\n {meta ? (\n <ul className=\"mt-14 flex flex-wrap items-center justify-center gap-x-9 gap-y-3\">\n {meta.map((m, i) => (\n <li\n key={m.label}\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground\",\n i > 0 && \"sm:border-l sm:border-border sm:pl-9\",\n )}\n >\n {m.icon ? <span className=\"text-foreground/35\">{m.icon}</span> : null}\n {m.label}\n </li>\n ))}\n </ul>\n ) : null}\n {media ? <div className=\"mt-16 w-full\">{media}</div> : null}\n </div>\n </section>\n );\n },\n);\nHeroParallax.displayName = \"HeroParallax\";\n"],"names":["DEFAULT_DEPTH","FLOAT_DURATION","FLOAT_STAGGER","setSectionRef","node","localRef","forwarded","tileEntryOffset","logo","HeroParallax","forwardRef","className","eyebrow","title","description","primaryAction","secondaryAction","meta","media","logos","id","props","ref","sectionRef","useRef","offset","setOffset","useState","entered","setEntered","reduceMotion","setReduceMotion","useEffect","mq","onChange","_a","raf","handleMouseMove","el","rect","handleMouseLeave","showResting","jsxs","cn","i","depth","entry","entryTransform","restingTransform","parallaxTransform","jsx","heroContainer","HeroEyebrow","heroTitleBase","HeroActions","m"],"mappings":"qMAcMA,EAAgB,GAChBC,EAAiB,EACjBC,EAAgB,GAEtB,SAASC,EACPC,EACAC,EACAC,EACA,CACAD,EAAS,QAAUD,EACf,OAAOE,GAAc,WAAYA,EAAUF,CAAI,EAC1CE,IAAYA,EAAmD,QAAUF,EACpF,CAEA,SAASG,EAAgBC,EAAgB,CAGvC,MAAO,CAAE,GAAIA,EAAK,EAAI,IAAM,EAAG,GAAIA,EAAK,EAAI,IAAM,CAAA,CACpD,CAGO,MAAMC,EAAeC,EAAAA,WAC1B,CACE,CAAE,UAAAC,EAAW,QAAAC,EAAS,MAAAC,EAAO,YAAAC,EAAa,cAAAC,EAAe,gBAAAC,EAAiB,KAAAC,EAAM,MAAAC,EAAO,MAAAC,EAAQ,CAAA,EAAI,GAAAC,EAAI,GAAGC,CAAA,EAC1GC,IACG,CACH,MAAMC,EAAaC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,KACHC,QACE,KAAA,CAAG,UAAU,mEACX,SAAAA,EAAK,IAAI,CAACsC,EAAGX,IACZF,EAAAA,KAAC,KAAA,CAEC,UAAWC,EAAAA,GACT,wDACAC,EAAI,GAAK,sCAAA,EAGV,SAAA,CAAAW,EAAE,KAAOL,MAAC,OAAA,CAAK,UAAU,qBAAsB,SAAAK,EAAE,KAAK,EAAU,KAChEA,EAAE,KAAA,CAAA,EAPEA,EAAE,KAAA,CASV,EACH,EACE,KACHrC,EAAQgC,EAAAA,IAAC,MAAA,CAAI,UAAU,eAAgB,WAAM,EAAS,IAAA,CAAA,CACzD,CAAA,CAAA,CAAA,CAGN,CACF,EACAzC,EAAa,YAAc"}
@@ -2,10 +2,11 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as m } from "react";
3
3
  import { HeroSplit as i } from "./variants/Split.js";
4
4
  import { HeroCentered as f } from "./variants/Centered.js";
5
- import { HeroStatement as n } from "./variants/Statement.js";
6
- const p = m(({ variant: o = "split", ...r }, e) => o === "centered" ? /* @__PURE__ */ t(f, { ref: e, ...r }) : o === "statement" ? /* @__PURE__ */ t(n, { ref: e, ...r }) : /* @__PURE__ */ t(i, { ref: e, ...r }));
7
- p.displayName = "Hero";
5
+ import { HeroStatement as a } from "./variants/Statement.js";
6
+ import { HeroParallax as l } from "./variants/Parallax.js";
7
+ const n = m(({ variant: o = "split", ...r }, e) => o === "centered" ? /* @__PURE__ */ t(f, { ref: e, ...r }) : o === "statement" ? /* @__PURE__ */ t(a, { ref: e, ...r }) : o === "parallax" ? /* @__PURE__ */ t(l, { ref: e, ...r }) : /* @__PURE__ */ t(i, { ref: e, ...r }));
8
+ n.displayName = "Hero";
8
9
  export {
9
- p as Hero
10
+ n as Hero
10
11
  };
11
12
  //# sourceMappingURL=Hero.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Hero.js","sources":["../../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { HeroProps } from \"./types\";\nimport { HeroSplit } from \"./variants/Split\";\nimport { HeroCentered } from \"./variants/Centered\";\nimport { HeroStatement } from \"./variants/Statement\";\n\nexport const Hero = forwardRef<HTMLElement, HeroProps>(({ variant = \"split\", ...props }, ref) => {\n if (variant === \"centered\") return <HeroCentered ref={ref} {...props} />;\n if (variant === \"statement\") return <HeroStatement ref={ref} {...props} />;\n return <HeroSplit ref={ref} {...props} />;\n});\nHero.displayName = \"Hero\";"],"names":["Hero","forwardRef","variant","props","ref","HeroCentered","HeroStatement","jsx","HeroSplit"],"mappings":";;;;;AAMO,MAAMA,IAAOC,EAAmC,CAAC,EAAE,SAAAC,IAAU,SAAS,GAAGC,EAAA,GAASC,MACnFF,MAAY,+BAAoBG,GAAA,EAAa,KAAAD,GAAW,GAAGD,GAAO,IAClED,MAAY,gCAAqBI,GAAA,EAAc,KAAAF,GAAW,GAAGD,GAAO,IACjE,gBAAAI,EAACC,GAAA,EAAU,KAAAJ,GAAW,GAAGD,EAAA,CAAO,CACxC;AACDH,EAAK,cAAc;"}
1
+ {"version":3,"file":"Hero.js","sources":["../../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { HeroProps } from \"./types\";\nimport { HeroSplit } from \"./variants/Split\";\nimport { HeroCentered } from \"./variants/Centered\";\nimport { HeroStatement } from \"./variants/Statement\";\nimport { HeroParallax } from \"./variants/Parallax\";\n\nexport const Hero = forwardRef<HTMLElement, HeroProps>(({ variant = \"split\", ...props }, ref) => {\n if (variant === \"centered\") return <HeroCentered ref={ref} {...props} />;\n if (variant === \"statement\") return <HeroStatement ref={ref} {...props} />;\n if (variant === \"parallax\") return <HeroParallax ref={ref} {...props} />;\n return <HeroSplit ref={ref} {...props} />;\n});\nHero.displayName = \"Hero\";"],"names":["Hero","forwardRef","variant","props","ref","HeroCentered","HeroStatement","HeroParallax","jsx","HeroSplit"],"mappings":";;;;;;AAOO,MAAMA,IAAOC,EAAmC,CAAC,EAAE,SAAAC,IAAU,SAAS,GAAGC,EAAA,GAASC,MACnFF,MAAY,+BAAoBG,GAAA,EAAa,KAAAD,GAAW,GAAGD,GAAO,IAClED,MAAY,gCAAqBI,GAAA,EAAc,KAAAF,GAAW,GAAGD,GAAO,IACpED,MAAY,+BAAoBK,GAAA,EAAa,KAAAH,GAAW,GAAGD,GAAO,IAC/D,gBAAAK,EAACC,GAAA,EAAU,KAAAL,GAAW,GAAGD,EAAA,CAAO,CACxC;AACDH,EAAK,cAAc;"}
@@ -0,0 +1,116 @@
1
+ "use client";
2
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
3
+ import { forwardRef as O, useRef as C, useState as u, useEffect as w } from "react";
4
+ import { cn as i } from "../../../utils/cn.js";
5
+ import { HeroEyebrow as P, heroTitleBase as S, HeroActions as _, heroContainer as k } from "../parts.js";
6
+ const z = 18, B = 5, G = 0.7;
7
+ function U(s, c, a) {
8
+ c.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
9
+ }
10
+ function I(s) {
11
+ return { x: (s.x - 50) * 4, y: (s.y - 50) * 4 };
12
+ }
13
+ const X = O(
14
+ ({ className: s, eyebrow: c, title: a, description: f, primaryAction: m, secondaryAction: x, meta: h, media: p, logos: M = [], id: T, ...E }, R) => {
15
+ const y = C(null), [b, v] = u({ x: 0, y: 0 }), [$, L] = u(!1), [o, g] = u(!1);
16
+ w(() => {
17
+ var r;
18
+ if (typeof window.matchMedia != "function") return;
19
+ const e = window.matchMedia("(prefers-reduced-motion: reduce)"), n = () => g(e.matches);
20
+ return g(e.matches), (r = e.addEventListener) == null || r.call(e, "change", n), () => {
21
+ var l;
22
+ return (l = e.removeEventListener) == null ? void 0 : l.call(e, "change", n);
23
+ };
24
+ }, []), w(() => {
25
+ if (o) return;
26
+ const e = requestAnimationFrame(() => L(!0));
27
+ return () => cancelAnimationFrame(e);
28
+ }, [o]);
29
+ const A = (e) => {
30
+ if (o) return;
31
+ const n = y.current;
32
+ if (!n) return;
33
+ const r = n.getBoundingClientRect();
34
+ v({
35
+ x: ((e.clientX - r.left) / r.width - 0.5) * 2,
36
+ y: ((e.clientY - r.top) / r.height - 0.5) * 2
37
+ });
38
+ }, j = () => v({ x: 0, y: 0 }), N = $ || o;
39
+ return /* @__PURE__ */ d(
40
+ "section",
41
+ {
42
+ ref: (e) => U(e, y, R),
43
+ id: T,
44
+ onMouseMove: A,
45
+ onMouseLeave: j,
46
+ className: i("relative w-full overflow-hidden border-b border-border bg-background", s),
47
+ ...E,
48
+ children: [
49
+ M.map((e, n) => {
50
+ const r = e.depth ?? z, l = I(e), D = `translate(calc(-50% + ${l.x}px), calc(-50% + ${l.y}px)) scale(0.6)`, F = "translate(-50%, -50%)", H = o ? "translate(0px, 0px)" : `translate(${b.x * r}px, ${b.y * r}px)`;
51
+ return /* @__PURE__ */ t(
52
+ "div",
53
+ {
54
+ "aria-hidden": !0,
55
+ "data-logo": e.label,
56
+ className: "pointer-events-none absolute z-10 hidden transition-[transform,opacity] duration-700 ease-out md:block",
57
+ style: {
58
+ left: `${e.x}%`,
59
+ top: `${e.y}%`,
60
+ transform: N ? F : D,
61
+ opacity: N ? 1 : 0,
62
+ transitionDelay: `${n * 90}ms`
63
+ },
64
+ children: /* @__PURE__ */ t(
65
+ "div",
66
+ {
67
+ className: "transition-transform duration-200 ease-out",
68
+ style: { transform: H },
69
+ children: /* @__PURE__ */ t(
70
+ "div",
71
+ {
72
+ className: "flex h-16 w-16 items-center justify-center rounded-2xl border border-border bg-surface shadow-raised",
73
+ style: o ? void 0 : {
74
+ animation: `hero-float ${B}s ease-in-out infinite`,
75
+ animationDelay: `-${n * G}s`
76
+ },
77
+ children: e.icon
78
+ }
79
+ )
80
+ }
81
+ )
82
+ },
83
+ e.label
84
+ );
85
+ }),
86
+ /* @__PURE__ */ d("div", { className: i(k, "relative z-20 pt-24 pb-20 text-center sm:pt-32 sm:pb-24"), children: [
87
+ /* @__PURE__ */ t(P, { eyebrow: c }),
88
+ /* @__PURE__ */ t("h1", { className: i(S, "mt-7 max-w-4xl text-5xl leading-[1.04] sm:text-6xl lg:text-7xl"), children: a }),
89
+ f ? /* @__PURE__ */ t("p", { className: "mx-auto mt-7 max-w-xl text-pretty leading-relaxed text-muted-foreground sm:text-lg", children: f }) : null,
90
+ m || x ? /* @__PURE__ */ t("div", { className: "mt-10 justify-center", children: /* @__PURE__ */ t(_, { primaryAction: m, secondaryAction: x }) }) : null,
91
+ h ? /* @__PURE__ */ t("ul", { className: "mt-14 flex flex-wrap items-center justify-center gap-x-9 gap-y-3", children: h.map((e, n) => /* @__PURE__ */ d(
92
+ "li",
93
+ {
94
+ className: i(
95
+ "flex items-center gap-2 text-sm text-muted-foreground",
96
+ n > 0 && "sm:border-l sm:border-border sm:pl-9"
97
+ ),
98
+ children: [
99
+ e.icon ? /* @__PURE__ */ t("span", { className: "text-foreground/35", children: e.icon }) : null,
100
+ e.label
101
+ ]
102
+ },
103
+ e.label
104
+ )) }) : null,
105
+ p ? /* @__PURE__ */ t("div", { className: "mt-16 w-full", children: p }) : null
106
+ ] })
107
+ ]
108
+ }
109
+ );
110
+ }
111
+ );
112
+ X.displayName = "HeroParallax";
113
+ export {
114
+ X as HeroParallax
115
+ };
116
+ //# sourceMappingURL=Parallax.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Parallax.js","sources":["../../../../../src/components/Hero/variants/Parallax.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type ForwardedRef,\n type MouseEvent,\n type MutableRefObject,\n} from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { HeroActions, HeroEyebrow, heroContainer, heroTitleBase } from \"../parts\";\nimport type { HeroLogo, HeroProps } from \"../types\";\n\nconst DEFAULT_DEPTH = 18;\nconst FLOAT_DURATION = 5; // seconds per breathing cycle\nconst FLOAT_STAGGER = 0.7; // seconds of desync between consecutive tiles\n\nfunction setSectionRef(\n node: HTMLElement | null,\n localRef: MutableRefObject<HTMLElement | null>,\n forwarded: ForwardedRef<HTMLElement>,\n) {\n localRef.current = node;\n if (typeof forwarded === \"function\") forwarded(node);\n else if (forwarded) (forwarded as MutableRefObject<HTMLElement | null>).current = node;\n}\n\nfunction tileEntryOffset(logo: HeroLogo) {\n // Push the tile further out from the centre along the line it already sits on,\n // so it appears to fly in from off-screen.\n return { x: (logo.x - 50) * 4, y: (logo.y - 50) * 4 };\n}\n\n/** Parallax — centred copy with floating logo tiles that react to the mouse. */\nexport const HeroParallax = forwardRef<HTMLElement, HeroProps>(\n (\n { className, eyebrow, title, description, primaryAction, secondaryAction, meta, media, logos = [], id, ...props },\n ref,\n ) => {\n const sectionRef = useRef<HTMLElement | null>(null);\n const [offset, setOffset] = useState({ x: 0, y: 0 });\n const [entered, setEntered] = useState(false);\n const [reduceMotion, setReduceMotion] = useState(false);\n\n useEffect(() => {\n if (typeof window.matchMedia !== \"function\") return;\n const mq = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n const onChange = () => setReduceMotion(mq.matches);\n setReduceMotion(mq.matches);\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n\n useEffect(() => {\n if (reduceMotion) return;\n const raf = requestAnimationFrame(() => setEntered(true));\n return () => cancelAnimationFrame(raf);\n }, [reduceMotion]);\n\n const handleMouseMove = (e: MouseEvent<HTMLElement>) => {\n if (reduceMotion) return;\n const el = sectionRef.current;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n setOffset({\n x: ((e.clientX - rect.left) / rect.width - 0.5) * 2,\n y: ((e.clientY - rect.top) / rect.height - 0.5) * 2,\n });\n };\n\n const handleMouseLeave = () => setOffset({ x: 0, y: 0 });\n\n const showResting = entered || reduceMotion;\n\n return (\n <section\n ref={(node) => setSectionRef(node, sectionRef, ref)}\n id={id}\n onMouseMove={handleMouseMove}\n onMouseLeave={handleMouseLeave}\n className={cn(\"relative w-full overflow-hidden border-b border-border bg-background\", className)}\n {...props}\n >\n {logos.map((logo, i) => {\n const depth = logo.depth ?? DEFAULT_DEPTH;\n const entry = tileEntryOffset(logo);\n const entryTransform = `translate(calc(-50% + ${entry.x}px), calc(-50% + ${entry.y}px)) scale(0.6)`;\n const restingTransform = \"translate(-50%, -50%)\";\n const parallaxTransform = reduceMotion\n ? \"translate(0px, 0px)\"\n : `translate(${offset.x * depth}px, ${offset.y * depth}px)`;\n\n return (\n <div\n key={logo.label}\n aria-hidden\n data-logo={logo.label}\n className=\"pointer-events-none absolute z-10 hidden transition-[transform,opacity] duration-700 ease-out md:block\"\n style={{\n left: `${logo.x}%`,\n top: `${logo.y}%`,\n transform: showResting ? restingTransform : entryTransform,\n opacity: showResting ? 1 : 0,\n transitionDelay: `${i * 90}ms`,\n }}\n >\n <div\n className=\"transition-transform duration-200 ease-out\"\n style={{ transform: parallaxTransform }}\n >\n <div\n className=\"flex h-16 w-16 items-center justify-center rounded-2xl border border-border bg-surface shadow-raised\"\n style={\n reduceMotion\n ? undefined\n : {\n animation: `hero-float ${FLOAT_DURATION}s ease-in-out infinite`,\n animationDelay: `-${i * FLOAT_STAGGER}s`,\n }\n }\n >\n {logo.icon}\n </div>\n </div>\n </div>\n );\n })}\n\n <div className={cn(heroContainer, \"relative z-20 pt-24 pb-20 text-center sm:pt-32 sm:pb-24\")}>\n <HeroEyebrow eyebrow={eyebrow} />\n <h1 className={cn(heroTitleBase, \"mt-7 max-w-4xl text-5xl leading-[1.04] sm:text-6xl lg:text-7xl\")}>\n {title}\n </h1>\n {description ? (\n <p className=\"mx-auto mt-7 max-w-xl text-pretty leading-relaxed text-muted-foreground sm:text-lg\">\n {description}\n </p>\n ) : null}\n {primaryAction || secondaryAction ? (\n <div className=\"mt-10 justify-center\">\n <HeroActions primaryAction={primaryAction} secondaryAction={secondaryAction} />\n </div>\n ) : null}\n {meta ? (\n <ul className=\"mt-14 flex flex-wrap items-center justify-center gap-x-9 gap-y-3\">\n {meta.map((m, i) => (\n <li\n key={m.label}\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground\",\n i > 0 && \"sm:border-l sm:border-border sm:pl-9\",\n )}\n >\n {m.icon ? <span className=\"text-foreground/35\">{m.icon}</span> : null}\n {m.label}\n </li>\n ))}\n </ul>\n ) : null}\n {media ? <div className=\"mt-16 w-full\">{media}</div> : null}\n </div>\n </section>\n );\n },\n);\nHeroParallax.displayName = \"HeroParallax\";\n"],"names":["DEFAULT_DEPTH","FLOAT_DURATION","FLOAT_STAGGER","setSectionRef","node","localRef","forwarded","tileEntryOffset","logo","HeroParallax","forwardRef","className","eyebrow","title","description","primaryAction","secondaryAction","meta","media","logos","id","props","ref","sectionRef","useRef","offset","setOffset","useState","entered","setEntered","reduceMotion","setReduceMotion","useEffect","mq","onChange","_a","raf","handleMouseMove","el","rect","handleMouseLeave","showResting","jsxs","cn","i","depth","entry","entryTransform","restingTransform","parallaxTransform","jsx","heroContainer","HeroEyebrow","heroTitleBase","HeroActions","m"],"mappings":";;;;AAcA,MAAMA,IAAgB,IAChBC,IAAiB,GACjBC,IAAgB;AAEtB,SAASC,EACPC,GACAC,GACAC,GACA;AACA,EAAAD,EAAS,UAAUD,GACf,OAAOE,KAAc,aAAYA,EAAUF,CAAI,IAC1CE,MAAYA,EAAmD,UAAUF;AACpF;AAEA,SAASG,EAAgBC,GAAgB;AAGvC,SAAO,EAAE,IAAIA,EAAK,IAAI,MAAM,GAAG,IAAIA,EAAK,IAAI,MAAM,EAAA;AACpD;AAGO,MAAMC,IAAeC;AAAA,EAC1B,CACE,EAAE,WAAAC,GAAW,SAAAC,GAAS,OAAAC,GAAO,aAAAC,GAAa,eAAAC,GAAe,iBAAAC,GAAiB,MAAAC,GAAM,OAAAC,GAAO,OAAAC,IAAQ,CAAA,GAAI,IAAAC,GAAI,GAAGC,EAAA,GAC1GC,MACG;AACH,UAAMC,IAAaC,EAA2B,IAAI,GAC5C,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAE,GAAG,GAAG,GAAG,GAAG,GAC7C,CAACC,GAASC,CAAU,IAAIF,EAAS,EAAK,GACtC,CA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EAAE,WAAU,sFACV,aACH,IACE;AAAA,YACHnC,KAAiBC,IAChB,gBAAAkC,EAAC,OAAA,EAAI,WAAU,wBACb,UAAA,gBAAAA,EAACI,GAAA,EAAY,eAAAvC,GAA8B,iBAAAC,EAAA,CAAkC,EAAA,CAC/E,IACE;AAAA,YACHC,sBACE,MAAA,EAAG,WAAU,oEACX,UAAAA,EAAK,IAAI,CAACsC,GAAGX,MACZ,gBAAAF;AAAA,cAAC;AAAA,cAAA;AAAA,gBAEC,WAAWC;AAAA,kBACT;AAAA,kBACAC,IAAI,KAAK;AAAA,gBAAA;AAAA,gBAGV,UAAA;AAAA,kBAAAW,EAAE,OAAO,gBAAAL,EAAC,QAAA,EAAK,WAAU,sBAAsB,UAAAK,EAAE,MAAK,IAAU;AAAA,kBAChEA,EAAE;AAAA,gBAAA;AAAA,cAAA;AAAA,cAPEA,EAAE;AAAA,YAAA,CASV,GACH,IACE;AAAA,YACHrC,IAAQ,gBAAAgC,EAAC,OAAA,EAAI,WAAU,gBAAgB,aAAM,IAAS;AAAA,UAAA,EAAA,CACzD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAzC,EAAa,cAAc;"}
package/dist/index.d.ts CHANGED
@@ -328,6 +328,22 @@ export declare const Globe: (props: IconProps) => JSX_2.Element;
328
328
 
329
329
  export declare const Hero: ForwardRefExoticComponent<HeroProps & RefAttributes<HTMLElement>>;
330
330
 
331
+ /** A floating logo tile for the `parallax` hero variant. */
332
+ export declare interface HeroLogo {
333
+ /** Accessible name for the tile (used for the label/aria). */
334
+ label: string;
335
+ /** Logo/icon node rendered inside the tile. */
336
+ icon: ReactNode;
337
+ /** Horizontal position as a percentage (0–100) of the hero width. */
338
+ x: number;
339
+ /** Vertical position as a percentage (0–100) of the hero height. */
340
+ y: number;
341
+ /** Parallax travel in px per unit of mouse offset. Higher moves more. */
342
+ depth?: number;
343
+ /** Optional icon accent color. */
344
+ accent?: string;
345
+ }
346
+
331
347
  export declare interface HeroMeta {
332
348
  label: string;
333
349
  icon?: ReactNode;
@@ -343,9 +359,11 @@ export declare interface HeroProps extends Omit<HTMLAttributes<HTMLElement>, "ti
343
359
  media?: ReactNode;
344
360
  /** Small trust/status row shown under the copy or CTAs. */
345
361
  meta?: HeroMeta[];
362
+ /** Floating logo tiles with a mouse parallax effect (`parallax` variant). */
363
+ logos?: HeroLogo[];
346
364
  }
347
365
 
348
- declare type HeroVariant = "split" | "centered" | "statement";
366
+ declare type HeroVariant = "split" | "centered" | "statement" | "parallax";
349
367
 
350
368
  /**
351
369
  * Minimal 1.5px stroke icon set (Lucide/Heroicons inspired).
package/dist/styles.css CHANGED
@@ -64,6 +64,8 @@
64
64
  --radius-xl: 1.125rem;
65
65
  --radius-2xl: 1.5rem;
66
66
  --radius-3xl: 2rem;
67
+ --ease-out: cubic-bezier(0, 0, 0.2, 1);
68
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
67
69
  --blur-md: 12px;
68
70
  --blur-2xl: 40px;
69
71
  --default-transition-duration: 150ms;
@@ -319,6 +321,12 @@
319
321
  .left-7 {
320
322
  left: calc(var(--spacing) * 7);
321
323
  }
324
+ .z-10 {
325
+ z-index: 10;
326
+ }
327
+ .z-20 {
328
+ z-index: 20;
329
+ }
322
330
  .z-50 {
323
331
  z-index: 50;
324
332
  }
@@ -1797,6 +1805,9 @@
1797
1805
  .w-12 {
1798
1806
  width: calc(var(--spacing) * 12);
1799
1807
  }
1808
+ .w-16 {
1809
+ width: calc(var(--spacing) * 16);
1810
+ }
1800
1811
  .w-28 {
1801
1812
  width: calc(var(--spacing) * 28);
1802
1813
  }
@@ -2878,6 +2889,11 @@
2878
2889
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2879
2890
  transition-duration: var(--tw-duration, var(--default-transition-duration));
2880
2891
  }
2892
+ .transition-\[transform\,opacity\] {
2893
+ transition-property: transform,opacity;
2894
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2895
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
2896
+ }
2881
2897
  .transition-all {
2882
2898
  transition-property: all;
2883
2899
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -2905,6 +2921,18 @@
2905
2921
  --tw-duration: 300ms;
2906
2922
  transition-duration: 300ms;
2907
2923
  }
2924
+ .duration-700 {
2925
+ --tw-duration: 700ms;
2926
+ transition-duration: 700ms;
2927
+ }
2928
+ .ease-in-out {
2929
+ --tw-ease: var(--ease-in-out);
2930
+ transition-timing-function: var(--ease-in-out);
2931
+ }
2932
+ .ease-out {
2933
+ --tw-ease: var(--ease-out);
2934
+ transition-timing-function: var(--ease-out);
2935
+ }
2908
2936
  .prose-neutral {
2909
2937
  --tw-prose-body: oklch(37.1% 0 none);
2910
2938
  --tw-prose-headings: oklch(20.5% 0 none);
@@ -3317,6 +3345,9 @@
3317
3345
  }
3318
3346
  }
3319
3347
  @media (width >= 48rem) {
3348
+ .md\:block {
3349
+ display: block;
3350
+ }
3320
3351
  .md\:flex {
3321
3352
  display: flex;
3322
3353
  }
@@ -3529,6 +3560,14 @@
3529
3560
  transform: translateX(-50%);
3530
3561
  }
3531
3562
  }
3563
+ @keyframes hero-float {
3564
+ 0%, 100% {
3565
+ transform: translateY(0);
3566
+ }
3567
+ 50% {
3568
+ transform: translateY(-7px);
3569
+ }
3570
+ }
3532
3571
  .modal-anim {
3533
3572
  transition: opacity 150ms ease, transform 150ms ease, overlay 150ms ease allow-discrete, display 150ms ease allow-discrete;
3534
3573
  }
@@ -3817,6 +3856,10 @@
3817
3856
  syntax: "*";
3818
3857
  inherits: false;
3819
3858
  }
3859
+ @property --tw-ease {
3860
+ syntax: "*";
3861
+ inherits: false;
3862
+ }
3820
3863
  @layer properties {
3821
3864
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
3822
3865
  *, ::before, ::after, ::backdrop {
@@ -3877,6 +3920,7 @@
3877
3920
  --tw-backdrop-saturate: initial;
3878
3921
  --tw-backdrop-sepia: initial;
3879
3922
  --tw-duration: initial;
3923
+ --tw-ease: initial;
3880
3924
  }
3881
3925
  }
3882
3926
  }
package/dist/theme.css CHANGED
@@ -199,6 +199,17 @@
199
199
  }
200
200
  }
201
201
 
202
+ /* Gentle vertical "breathing" drift for floating hero logo tiles. */
203
+ @keyframes hero-float {
204
+ 0%,
205
+ 100% {
206
+ transform: translateY(0);
207
+ }
208
+ 50% {
209
+ transform: translateY(-7px);
210
+ }
211
+ }
212
+
202
213
  /* ── Popover-based Modal (dialog) ────────────────────────── */
203
214
 
204
215
  .modal-anim {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ugurdemirel/landcraft",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },