aura-ui-library 1.0.17 → 1.0.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.
Files changed (3) hide show
  1. package/dist/index.js +247 -37
  2. package/dist/index.mjs +247 -38
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ __export(index_exports, {
34
34
  Carousel: () => Carousel,
35
35
  Footer: () => Footer,
36
36
  Grid: () => Grid,
37
+ Hero: () => Hero,
37
38
  HorizontalScrollSection: () => HorizontalScrollSection,
38
39
  Image: () => Image,
39
40
  Navbar: () => Navbar,
@@ -3759,24 +3760,31 @@ var ParallaxImage = ({
3759
3760
  const scrollIndicatorRef = (0, import_react17.useRef)(null);
3760
3761
  (0, import_react17.useEffect)(() => {
3761
3762
  const ctx = import_gsap17.gsap.context(() => {
3762
- import_gsap17.gsap.to(imageRef.current, {
3763
- yPercent: 20,
3764
- ease: "none",
3765
- scrollTrigger: {
3766
- trigger: sectionRef.current,
3767
- start: "top top",
3768
- end: "bottom top",
3769
- scrub: true
3763
+ import_gsap17.gsap.fromTo(
3764
+ imageRef.current,
3765
+ { yPercent: -15 },
3766
+ {
3767
+ yPercent: 15,
3768
+ ease: "none",
3769
+ scrollTrigger: {
3770
+ trigger: sectionRef.current,
3771
+ start: "top bottom",
3772
+ // Start when section enters viewport
3773
+ end: "bottom top",
3774
+ // End when section leaves viewport
3775
+ scrub: true,
3776
+ invalidateOnRefresh: true
3777
+ }
3770
3778
  }
3771
- });
3779
+ );
3772
3780
  import_gsap17.gsap.to(contentRef.current, {
3773
- y: 100,
3781
+ y: 150,
3774
3782
  opacity: 0,
3775
3783
  ease: "none",
3776
3784
  scrollTrigger: {
3777
3785
  trigger: sectionRef.current,
3778
3786
  start: "top top",
3779
- end: "bottom 30%",
3787
+ end: "bottom center",
3780
3788
  scrub: true
3781
3789
  }
3782
3790
  });
@@ -3837,10 +3845,11 @@ var ParallaxImage = ({
3837
3845
  },
3838
3846
  imageContainer: {
3839
3847
  position: "absolute",
3840
- inset: 0,
3848
+ top: "-15%",
3849
+ left: 0,
3841
3850
  width: "100%",
3842
- height: "110%",
3843
- // Taller than section for parallax room
3851
+ height: "130%",
3852
+ // Larger height for ample parallax range
3844
3853
  zIndex: 1
3845
3854
  },
3846
3855
  image: {
@@ -4056,13 +4065,213 @@ var SVGPathAnimation = ({
4056
4065
  return /* @__PURE__ */ import_react18.default.createElement("section", { ref: containerRef, style: styles.section }, /* @__PURE__ */ import_react18.default.createElement("div", { style: styles.svgContainer }, /* @__PURE__ */ import_react18.default.createElement("svg", { viewBox, style: styles.svg }, /* @__PURE__ */ import_react18.default.createElement("path", { ref: pathRef, d: path }))), /* @__PURE__ */ import_react18.default.createElement("div", { ref: textRef, style: styles.content }, /* @__PURE__ */ import_react18.default.createElement("h2", { style: styles.title }, title), /* @__PURE__ */ import_react18.default.createElement("p", { style: styles.subtitle }, subtitle)));
4057
4066
  };
4058
4067
 
4059
- // src/components/ScrollAnimation/HorizontalScrollSection.jsx
4068
+ // src/components/Sections/Hero/Hero.jsx
4060
4069
  var import_react19 = __toESM(require("react"));
4061
4070
  var import_gsap19 = require("gsap");
4062
- var import_ScrollTrigger3 = require("gsap/ScrollTrigger");
4063
4071
  var import_fi16 = require("react-icons/fi");
4072
+ var import_react_router_dom13 = require("react-router-dom");
4073
+ var Hero = ({
4074
+ title = "Redefining Digital Aesthetics",
4075
+ subtitle = "Aura UI delivers a suite of professional components engineered for high-performance and premium design systems.",
4076
+ image = "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?auto=format&fit=crop&q=80&w=1600",
4077
+ align = "left",
4078
+ layout = "split",
4079
+ accentColor = "#6366f1",
4080
+ textColor = "#ffffff",
4081
+ height = "100vh",
4082
+ btnText = "Explore Collection",
4083
+ onBtnClick = null,
4084
+ animationDuration = 1.6,
4085
+ easing = "power4.out"
4086
+ }) => {
4087
+ const sectionRef = (0, import_react19.useRef)(null);
4088
+ const titleRef = (0, import_react19.useRef)(null);
4089
+ const subRef = (0, import_react19.useRef)(null);
4090
+ const btnRef = (0, import_react19.useRef)(null);
4091
+ const imageRef = (0, import_react19.useRef)(null);
4092
+ const orbitRef = (0, import_react19.useRef)(null);
4093
+ const inRouter = (0, import_react_router_dom13.useInRouterContext)();
4094
+ const navigate = inRouter ? (0, import_react_router_dom13.useNavigate)() : null;
4095
+ (0, import_react19.useEffect)(() => {
4096
+ const ctx = import_gsap19.gsap.context(() => {
4097
+ const tl = import_gsap19.gsap.timeline({ defaults: { ease: easing, duration: animationDuration } });
4098
+ import_gsap19.gsap.set([titleRef.current, subRef.current, btnRef.current], {
4099
+ y: 60,
4100
+ opacity: 0,
4101
+ filter: "blur(15px)"
4102
+ });
4103
+ if (layout === "split") {
4104
+ import_gsap19.gsap.set(imageRef.current, {
4105
+ x: align === "left" ? 150 : -150,
4106
+ opacity: 0,
4107
+ scale: 1.1,
4108
+ clipPath: "inset(0 100% 0 0)"
4109
+ });
4110
+ } else {
4111
+ import_gsap19.gsap.set(imageRef.current, { scale: 1.25, opacity: 0 });
4112
+ }
4113
+ tl.to(sectionRef.current, { opacity: 1, duration: 0.8 }).to(imageRef.current, {
4114
+ x: 0,
4115
+ scale: 1,
4116
+ opacity: 1,
4117
+ clipPath: "inset(0 0% 0 0)",
4118
+ duration: animationDuration + 0.4
4119
+ }, 0).to([titleRef.current, subRef.current, btnRef.current], {
4120
+ y: 0,
4121
+ opacity: 1,
4122
+ filter: "blur(0px)",
4123
+ stagger: 0.15
4124
+ }, "-=1.3");
4125
+ import_gsap19.gsap.to(orbitRef.current, {
4126
+ rotate: 360,
4127
+ duration: 20,
4128
+ repeat: -1,
4129
+ ease: "none"
4130
+ });
4131
+ }, sectionRef);
4132
+ return () => ctx.revert();
4133
+ }, [layout, align, animationDuration, easing]);
4134
+ const handleMagneticMove = (e) => {
4135
+ const rect = e.currentTarget.getBoundingClientRect();
4136
+ const x = e.clientX - rect.left - rect.width / 2;
4137
+ const y = e.clientY - rect.top - rect.height / 2;
4138
+ import_gsap19.gsap.to(e.currentTarget, {
4139
+ x: x * 0.45,
4140
+ y: y * 0.45,
4141
+ duration: 0.6,
4142
+ ease: "power2.out"
4143
+ });
4144
+ };
4145
+ const handleMagneticLeave = (e) => {
4146
+ import_gsap19.gsap.to(e.currentTarget, { x: 0, y: 0, duration: 0.8, ease: "elastic.out(1, 0.3)" });
4147
+ };
4148
+ const isCenter = align === "center";
4149
+ const styles = {
4150
+ section: {
4151
+ position: "relative",
4152
+ width: "100%",
4153
+ height,
4154
+ backgroundColor: "#030303",
4155
+ color: textColor,
4156
+ display: "flex",
4157
+ flexDirection: layout === "split" ? align === "right" ? "row-reverse" : "row" : "column",
4158
+ alignItems: "center",
4159
+ justifyContent: isCenter ? "center" : "space-between",
4160
+ overflow: "hidden",
4161
+ fontFamily: '"Inter", -apple-system, sans-serif',
4162
+ opacity: 0
4163
+ },
4164
+ backgroundOrbit: {
4165
+ position: "absolute",
4166
+ top: "50%",
4167
+ left: align === "left" ? "70%" : "30%",
4168
+ width: "800px",
4169
+ height: "800px",
4170
+ borderRadius: "50%",
4171
+ background: `radial-gradient(circle, ${accentColor}11 0%, transparent 70%)`,
4172
+ transform: "translate(-50%, -50%)",
4173
+ pointerEvents: "none",
4174
+ zIndex: 1
4175
+ },
4176
+ contentArea: {
4177
+ flex: layout === "split" ? "0 0 50%" : "1",
4178
+ height: "100%",
4179
+ display: "flex",
4180
+ flexDirection: "column",
4181
+ justifyContent: "center",
4182
+ padding: isCenter ? "0 5%" : align === "right" ? "0 10% 0 5%" : "0 5% 0 10%",
4183
+ textAlign: align,
4184
+ zIndex: 10,
4185
+ position: layout === "overlay" ? "absolute" : "relative",
4186
+ inset: layout === "overlay" ? 0 : "auto",
4187
+ maxWidth: isCenter ? "900px" : "100%",
4188
+ margin: isCenter ? "0 auto" : "0"
4189
+ },
4190
+ mediaArea: {
4191
+ flex: layout === "split" ? "0 0 50%" : "1",
4192
+ height: "100%",
4193
+ width: layout === "overlay" ? "100%" : "50%",
4194
+ position: layout === "overlay" ? "absolute" : "relative",
4195
+ inset: layout === "overlay" ? 0 : "auto",
4196
+ overflow: "hidden",
4197
+ zIndex: layout === "overlay" ? 1 : 10
4198
+ },
4199
+ image: {
4200
+ width: "100%",
4201
+ height: "100%",
4202
+ objectFit: "cover",
4203
+ opacity: layout === "overlay" ? 0.35 : 1,
4204
+ filter: layout === "overlay" ? "grayscale(40%)" : "none"
4205
+ },
4206
+ title: {
4207
+ fontSize: "clamp(48px, 9vw, 120px)",
4208
+ fontWeight: "900",
4209
+ letterSpacing: "-5px",
4210
+ lineHeight: "0.95",
4211
+ margin: "0 0 32px 0",
4212
+ textTransform: "uppercase",
4213
+ color: textColor
4214
+ },
4215
+ subtitle: {
4216
+ fontSize: "clamp(16px, 1.8vw, 22px)",
4217
+ opacity: 0.5,
4218
+ lineHeight: "1.6",
4219
+ maxWidth: "600px",
4220
+ margin: isCenter ? "0 auto 56px auto" : align === "right" ? "0 0 56px auto" : "0 0 56px 0",
4221
+ fontWeight: "500"
4222
+ },
4223
+ button: {
4224
+ display: "inline-flex",
4225
+ alignItems: "center",
4226
+ gap: "14px",
4227
+ padding: "22px 52px",
4228
+ backgroundColor: accentColor,
4229
+ color: "#fff",
4230
+ borderRadius: "100px",
4231
+ fontSize: "13px",
4232
+ fontWeight: "800",
4233
+ textTransform: "uppercase",
4234
+ letterSpacing: "3px",
4235
+ border: "none",
4236
+ cursor: "pointer",
4237
+ width: "fit-content",
4238
+ textDecoration: "none",
4239
+ alignSelf: align === "center" ? "center" : align === "right" ? "flex-end" : "flex-start",
4240
+ boxShadow: `0 25px 50px ${accentColor}35`,
4241
+ transition: "background-color 0.4s ease, transform 0.4s ease"
4242
+ },
4243
+ overlay: {
4244
+ position: "absolute",
4245
+ inset: 0,
4246
+ background: "linear-gradient(to bottom, rgba(3,3,3,0.2) 0%, rgba(3,3,3,0.9) 100%)",
4247
+ zIndex: 5,
4248
+ pointerEvents: "none",
4249
+ display: layout === "overlay" ? "block" : "none"
4250
+ }
4251
+ };
4252
+ return /* @__PURE__ */ import_react19.default.createElement("section", { ref: sectionRef, style: styles.section }, /* @__PURE__ */ import_react19.default.createElement("div", { ref: orbitRef, style: styles.backgroundOrbit }), /* @__PURE__ */ import_react19.default.createElement("div", { style: styles.mediaArea }, /* @__PURE__ */ import_react19.default.createElement("img", { ref: imageRef, src: image, alt: "Hero Media", style: styles.image }), layout === "overlay" && /* @__PURE__ */ import_react19.default.createElement("div", { style: styles.overlay })), /* @__PURE__ */ import_react19.default.createElement("div", { style: styles.contentArea }, /* @__PURE__ */ import_react19.default.createElement("h1", { ref: titleRef, style: styles.title }, title), /* @__PURE__ */ import_react19.default.createElement("p", { ref: subRef, style: styles.subtitle }, subtitle), /* @__PURE__ */ import_react19.default.createElement(
4253
+ "button",
4254
+ {
4255
+ ref: btnRef,
4256
+ style: styles.button,
4257
+ onClick: onBtnClick,
4258
+ onMouseMove: handleMagneticMove,
4259
+ onMouseLeave: handleMagneticLeave,
4260
+ onMouseEnter: (e) => import_gsap19.gsap.to(e.currentTarget, { y: -5, duration: 0.3 })
4261
+ },
4262
+ btnText,
4263
+ " ",
4264
+ /* @__PURE__ */ import_react19.default.createElement(import_fi16.FiArrowRight, null)
4265
+ )));
4266
+ };
4267
+
4268
+ // src/components/ScrollAnimation/HorizontalScrollSection.jsx
4269
+ var import_react20 = __toESM(require("react"));
4270
+ var import_gsap20 = require("gsap");
4271
+ var import_ScrollTrigger3 = require("gsap/ScrollTrigger");
4272
+ var import_fi17 = require("react-icons/fi");
4064
4273
  if (typeof window !== "undefined") {
4065
- import_gsap19.gsap.registerPlugin(import_ScrollTrigger3.ScrollTrigger);
4274
+ import_gsap20.gsap.registerPlugin(import_ScrollTrigger3.ScrollTrigger);
4066
4275
  }
4067
4276
  var HorizontalScrollSection = ({
4068
4277
  items = [
@@ -4076,16 +4285,16 @@ var HorizontalScrollSection = ({
4076
4285
  animationDuration = 1.2,
4077
4286
  easing = "power4.out"
4078
4287
  }) => {
4079
- const sectionRef = (0, import_react19.useRef)(null);
4080
- const containerRef = (0, import_react19.useRef)(null);
4081
- const triggerRef = (0, import_react19.useRef)(null);
4082
- const progressRef = (0, import_react19.useRef)(null);
4083
- const itemRefs = (0, import_react19.useRef)([]);
4084
- (0, import_react19.useEffect)(() => {
4085
- const ctx = import_gsap19.gsap.context(() => {
4288
+ const sectionRef = (0, import_react20.useRef)(null);
4289
+ const containerRef = (0, import_react20.useRef)(null);
4290
+ const triggerRef = (0, import_react20.useRef)(null);
4291
+ const progressRef = (0, import_react20.useRef)(null);
4292
+ const itemRefs = (0, import_react20.useRef)([]);
4293
+ (0, import_react20.useEffect)(() => {
4294
+ const ctx = import_gsap20.gsap.context(() => {
4086
4295
  const scrollWidth = containerRef.current.scrollWidth;
4087
4296
  const windowWidth = window.innerWidth;
4088
- const tl = import_gsap19.gsap.to(containerRef.current, {
4297
+ const tl = import_gsap20.gsap.to(containerRef.current, {
4089
4298
  x: () => -(scrollWidth - windowWidth),
4090
4299
  ease: "none",
4091
4300
  scrollTrigger: {
@@ -4097,7 +4306,7 @@ var HorizontalScrollSection = ({
4097
4306
  invalidateOnRefresh: true,
4098
4307
  onUpdate: (self) => {
4099
4308
  if (progressRef.current) {
4100
- import_gsap19.gsap.to(progressRef.current, {
4309
+ import_gsap20.gsap.to(progressRef.current, {
4101
4310
  scaleX: self.progress,
4102
4311
  duration: 0.1,
4103
4312
  ease: "none",
@@ -4108,7 +4317,7 @@ var HorizontalScrollSection = ({
4108
4317
  }
4109
4318
  });
4110
4319
  itemRefs.current.forEach((item, index) => {
4111
- import_gsap19.gsap.fromTo(
4320
+ import_gsap20.gsap.fromTo(
4112
4321
  item.querySelector(".item-content"),
4113
4322
  { opacity: 0, y: 50, scale: 0.95 },
4114
4323
  {
@@ -4124,7 +4333,7 @@ var HorizontalScrollSection = ({
4124
4333
  }
4125
4334
  );
4126
4335
  });
4127
- import_gsap19.gsap.fromTo(
4336
+ import_gsap20.gsap.fromTo(
4128
4337
  sectionRef.current,
4129
4338
  { opacity: 0 },
4130
4339
  { opacity: 1, duration: animationDuration, ease: easing }
@@ -4133,22 +4342,22 @@ var HorizontalScrollSection = ({
4133
4342
  return () => ctx.revert();
4134
4343
  }, [items, animationDuration, easing]);
4135
4344
  const handleItemHover = (e, index) => {
4136
- import_gsap19.gsap.to(itemRefs.current[index], {
4345
+ import_gsap20.gsap.to(itemRefs.current[index], {
4137
4346
  y: -10,
4138
4347
  duration: 0.4,
4139
4348
  ease: "power2.out"
4140
4349
  });
4141
4350
  const overlay = itemRefs.current[index].querySelector(".img-overlay");
4142
- if (overlay) import_gsap19.gsap.to(overlay, { opacity: 0.4, duration: 0.4 });
4351
+ if (overlay) import_gsap20.gsap.to(overlay, { opacity: 0.4, duration: 0.4 });
4143
4352
  };
4144
4353
  const handleItemLeave = (index) => {
4145
- import_gsap19.gsap.to(itemRefs.current[index], {
4354
+ import_gsap20.gsap.to(itemRefs.current[index], {
4146
4355
  y: 0,
4147
4356
  duration: 0.4,
4148
4357
  ease: "power2.out"
4149
4358
  });
4150
4359
  const overlay = itemRefs.current[index].querySelector(".img-overlay");
4151
- if (overlay) import_gsap19.gsap.to(overlay, { opacity: 0, duration: 0.4 });
4360
+ if (overlay) import_gsap20.gsap.to(overlay, { opacity: 0, duration: 0.4 });
4152
4361
  };
4153
4362
  const styles = {
4154
4363
  triggerSection: {
@@ -4251,7 +4460,7 @@ var HorizontalScrollSection = ({
4251
4460
  transform: "scaleX(0)"
4252
4461
  }
4253
4462
  };
4254
- return /* @__PURE__ */ import_react19.default.createElement("div", { ref: triggerRef, style: styles.triggerSection }, /* @__PURE__ */ import_react19.default.createElement("div", { ref: containerRef, style: styles.outerContainer }, /* @__PURE__ */ import_react19.default.createElement("div", { style: styles.scroller }, items.map((item, i) => /* @__PURE__ */ import_react19.default.createElement(
4463
+ return /* @__PURE__ */ import_react20.default.createElement("div", { ref: triggerRef, style: styles.triggerSection }, /* @__PURE__ */ import_react20.default.createElement("div", { ref: containerRef, style: styles.outerContainer }, /* @__PURE__ */ import_react20.default.createElement("div", { style: styles.scroller }, items.map((item, i) => /* @__PURE__ */ import_react20.default.createElement(
4255
4464
  "div",
4256
4465
  {
4257
4466
  key: item.id,
@@ -4260,10 +4469,10 @@ var HorizontalScrollSection = ({
4260
4469
  onMouseEnter: (e) => handleItemHover(e, i),
4261
4470
  onMouseLeave: () => handleItemLeave(i)
4262
4471
  },
4263
- /* @__PURE__ */ import_react19.default.createElement("img", { src: item.image, alt: item.title, style: styles.image, className: "item-bg" }),
4264
- /* @__PURE__ */ import_react19.default.createElement("div", { className: "img-overlay", style: styles.imgOverlay }),
4265
- /* @__PURE__ */ import_react19.default.createElement("div", { className: "item-content", style: styles.content }, /* @__PURE__ */ import_react19.default.createElement("div", { style: styles.badge(item.color) }, /* @__PURE__ */ import_react19.default.createElement(import_fi16.FiLayers, null), " ", item.id < 10 ? `0${item.id}` : item.id), /* @__PURE__ */ import_react19.default.createElement("h3", { style: styles.itemTitle }, item.title), /* @__PURE__ */ import_react19.default.createElement("p", { style: styles.itemDesc }, item.description), /* @__PURE__ */ import_react19.default.createElement("div", { style: { marginTop: "24px", display: "flex", alignItems: "center", gap: "10px", color: item.color, fontWeight: "700" } }, "Explore Case ", /* @__PURE__ */ import_react19.default.createElement(import_fi16.FiArrowRight, null)))
4266
- )))), /* @__PURE__ */ import_react19.default.createElement("div", { style: styles.progressBarWrap }, /* @__PURE__ */ import_react19.default.createElement("div", { ref: progressRef, style: styles.progressFill })));
4472
+ /* @__PURE__ */ import_react20.default.createElement("img", { src: item.image, alt: item.title, style: styles.image, className: "item-bg" }),
4473
+ /* @__PURE__ */ import_react20.default.createElement("div", { className: "img-overlay", style: styles.imgOverlay }),
4474
+ /* @__PURE__ */ import_react20.default.createElement("div", { className: "item-content", style: styles.content }, /* @__PURE__ */ import_react20.default.createElement("div", { style: styles.badge(item.color) }, /* @__PURE__ */ import_react20.default.createElement(import_fi17.FiLayers, null), " ", item.id < 10 ? `0${item.id}` : item.id), /* @__PURE__ */ import_react20.default.createElement("h3", { style: styles.itemTitle }, item.title), /* @__PURE__ */ import_react20.default.createElement("p", { style: styles.itemDesc }, item.description), /* @__PURE__ */ import_react20.default.createElement("div", { style: { marginTop: "24px", display: "flex", alignItems: "center", gap: "10px", color: item.color, fontWeight: "700" } }, "Explore Case ", /* @__PURE__ */ import_react20.default.createElement(import_fi17.FiArrowRight, null)))
4475
+ )))), /* @__PURE__ */ import_react20.default.createElement("div", { style: styles.progressBarWrap }, /* @__PURE__ */ import_react20.default.createElement("div", { ref: progressRef, style: styles.progressFill })));
4267
4476
  };
4268
4477
  // Annotate the CommonJS export names for ESM import in node:
4269
4478
  0 && (module.exports = {
@@ -4272,6 +4481,7 @@ var HorizontalScrollSection = ({
4272
4481
  Carousel,
4273
4482
  Footer,
4274
4483
  Grid,
4484
+ Hero,
4275
4485
  HorizontalScrollSection,
4276
4486
  Image,
4277
4487
  Navbar,
package/dist/index.mjs CHANGED
@@ -3746,24 +3746,31 @@ var ParallaxImage = ({
3746
3746
  const scrollIndicatorRef = useRef17(null);
3747
3747
  useEffect17(() => {
3748
3748
  const ctx = gsap17.context(() => {
3749
- gsap17.to(imageRef.current, {
3750
- yPercent: 20,
3751
- ease: "none",
3752
- scrollTrigger: {
3753
- trigger: sectionRef.current,
3754
- start: "top top",
3755
- end: "bottom top",
3756
- scrub: true
3749
+ gsap17.fromTo(
3750
+ imageRef.current,
3751
+ { yPercent: -15 },
3752
+ {
3753
+ yPercent: 15,
3754
+ ease: "none",
3755
+ scrollTrigger: {
3756
+ trigger: sectionRef.current,
3757
+ start: "top bottom",
3758
+ // Start when section enters viewport
3759
+ end: "bottom top",
3760
+ // End when section leaves viewport
3761
+ scrub: true,
3762
+ invalidateOnRefresh: true
3763
+ }
3757
3764
  }
3758
- });
3765
+ );
3759
3766
  gsap17.to(contentRef.current, {
3760
- y: 100,
3767
+ y: 150,
3761
3768
  opacity: 0,
3762
3769
  ease: "none",
3763
3770
  scrollTrigger: {
3764
3771
  trigger: sectionRef.current,
3765
3772
  start: "top top",
3766
- end: "bottom 30%",
3773
+ end: "bottom center",
3767
3774
  scrub: true
3768
3775
  }
3769
3776
  });
@@ -3824,10 +3831,11 @@ var ParallaxImage = ({
3824
3831
  },
3825
3832
  imageContainer: {
3826
3833
  position: "absolute",
3827
- inset: 0,
3834
+ top: "-15%",
3835
+ left: 0,
3828
3836
  width: "100%",
3829
- height: "110%",
3830
- // Taller than section for parallax room
3837
+ height: "130%",
3838
+ // Larger height for ample parallax range
3831
3839
  zIndex: 1
3832
3840
  },
3833
3841
  image: {
@@ -4043,13 +4051,213 @@ var SVGPathAnimation = ({
4043
4051
  return /* @__PURE__ */ React18.createElement("section", { ref: containerRef, style: styles.section }, /* @__PURE__ */ React18.createElement("div", { style: styles.svgContainer }, /* @__PURE__ */ React18.createElement("svg", { viewBox, style: styles.svg }, /* @__PURE__ */ React18.createElement("path", { ref: pathRef, d: path }))), /* @__PURE__ */ React18.createElement("div", { ref: textRef, style: styles.content }, /* @__PURE__ */ React18.createElement("h2", { style: styles.title }, title), /* @__PURE__ */ React18.createElement("p", { style: styles.subtitle }, subtitle)));
4044
4052
  };
4045
4053
 
4046
- // src/components/ScrollAnimation/HorizontalScrollSection.jsx
4047
- import React19, { useRef as useRef19, useEffect as useEffect19 } from "react";
4054
+ // src/components/Sections/Hero/Hero.jsx
4055
+ import React19, { useRef as useRef19, useEffect as useEffect19, useState as useState9 } from "react";
4048
4056
  import { gsap as gsap19 } from "gsap";
4057
+ import { FiArrowRight as FiArrowRight7 } from "react-icons/fi";
4058
+ import { useNavigate as useNavigate13, useInRouterContext as useInRouterContext13 } from "react-router-dom";
4059
+ var Hero = ({
4060
+ title = "Redefining Digital Aesthetics",
4061
+ subtitle = "Aura UI delivers a suite of professional components engineered for high-performance and premium design systems.",
4062
+ image = "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?auto=format&fit=crop&q=80&w=1600",
4063
+ align = "left",
4064
+ layout = "split",
4065
+ accentColor = "#6366f1",
4066
+ textColor = "#ffffff",
4067
+ height = "100vh",
4068
+ btnText = "Explore Collection",
4069
+ onBtnClick = null,
4070
+ animationDuration = 1.6,
4071
+ easing = "power4.out"
4072
+ }) => {
4073
+ const sectionRef = useRef19(null);
4074
+ const titleRef = useRef19(null);
4075
+ const subRef = useRef19(null);
4076
+ const btnRef = useRef19(null);
4077
+ const imageRef = useRef19(null);
4078
+ const orbitRef = useRef19(null);
4079
+ const inRouter = useInRouterContext13();
4080
+ const navigate = inRouter ? useNavigate13() : null;
4081
+ useEffect19(() => {
4082
+ const ctx = gsap19.context(() => {
4083
+ const tl = gsap19.timeline({ defaults: { ease: easing, duration: animationDuration } });
4084
+ gsap19.set([titleRef.current, subRef.current, btnRef.current], {
4085
+ y: 60,
4086
+ opacity: 0,
4087
+ filter: "blur(15px)"
4088
+ });
4089
+ if (layout === "split") {
4090
+ gsap19.set(imageRef.current, {
4091
+ x: align === "left" ? 150 : -150,
4092
+ opacity: 0,
4093
+ scale: 1.1,
4094
+ clipPath: "inset(0 100% 0 0)"
4095
+ });
4096
+ } else {
4097
+ gsap19.set(imageRef.current, { scale: 1.25, opacity: 0 });
4098
+ }
4099
+ tl.to(sectionRef.current, { opacity: 1, duration: 0.8 }).to(imageRef.current, {
4100
+ x: 0,
4101
+ scale: 1,
4102
+ opacity: 1,
4103
+ clipPath: "inset(0 0% 0 0)",
4104
+ duration: animationDuration + 0.4
4105
+ }, 0).to([titleRef.current, subRef.current, btnRef.current], {
4106
+ y: 0,
4107
+ opacity: 1,
4108
+ filter: "blur(0px)",
4109
+ stagger: 0.15
4110
+ }, "-=1.3");
4111
+ gsap19.to(orbitRef.current, {
4112
+ rotate: 360,
4113
+ duration: 20,
4114
+ repeat: -1,
4115
+ ease: "none"
4116
+ });
4117
+ }, sectionRef);
4118
+ return () => ctx.revert();
4119
+ }, [layout, align, animationDuration, easing]);
4120
+ const handleMagneticMove = (e) => {
4121
+ const rect = e.currentTarget.getBoundingClientRect();
4122
+ const x = e.clientX - rect.left - rect.width / 2;
4123
+ const y = e.clientY - rect.top - rect.height / 2;
4124
+ gsap19.to(e.currentTarget, {
4125
+ x: x * 0.45,
4126
+ y: y * 0.45,
4127
+ duration: 0.6,
4128
+ ease: "power2.out"
4129
+ });
4130
+ };
4131
+ const handleMagneticLeave = (e) => {
4132
+ gsap19.to(e.currentTarget, { x: 0, y: 0, duration: 0.8, ease: "elastic.out(1, 0.3)" });
4133
+ };
4134
+ const isCenter = align === "center";
4135
+ const styles = {
4136
+ section: {
4137
+ position: "relative",
4138
+ width: "100%",
4139
+ height,
4140
+ backgroundColor: "#030303",
4141
+ color: textColor,
4142
+ display: "flex",
4143
+ flexDirection: layout === "split" ? align === "right" ? "row-reverse" : "row" : "column",
4144
+ alignItems: "center",
4145
+ justifyContent: isCenter ? "center" : "space-between",
4146
+ overflow: "hidden",
4147
+ fontFamily: '"Inter", -apple-system, sans-serif',
4148
+ opacity: 0
4149
+ },
4150
+ backgroundOrbit: {
4151
+ position: "absolute",
4152
+ top: "50%",
4153
+ left: align === "left" ? "70%" : "30%",
4154
+ width: "800px",
4155
+ height: "800px",
4156
+ borderRadius: "50%",
4157
+ background: `radial-gradient(circle, ${accentColor}11 0%, transparent 70%)`,
4158
+ transform: "translate(-50%, -50%)",
4159
+ pointerEvents: "none",
4160
+ zIndex: 1
4161
+ },
4162
+ contentArea: {
4163
+ flex: layout === "split" ? "0 0 50%" : "1",
4164
+ height: "100%",
4165
+ display: "flex",
4166
+ flexDirection: "column",
4167
+ justifyContent: "center",
4168
+ padding: isCenter ? "0 5%" : align === "right" ? "0 10% 0 5%" : "0 5% 0 10%",
4169
+ textAlign: align,
4170
+ zIndex: 10,
4171
+ position: layout === "overlay" ? "absolute" : "relative",
4172
+ inset: layout === "overlay" ? 0 : "auto",
4173
+ maxWidth: isCenter ? "900px" : "100%",
4174
+ margin: isCenter ? "0 auto" : "0"
4175
+ },
4176
+ mediaArea: {
4177
+ flex: layout === "split" ? "0 0 50%" : "1",
4178
+ height: "100%",
4179
+ width: layout === "overlay" ? "100%" : "50%",
4180
+ position: layout === "overlay" ? "absolute" : "relative",
4181
+ inset: layout === "overlay" ? 0 : "auto",
4182
+ overflow: "hidden",
4183
+ zIndex: layout === "overlay" ? 1 : 10
4184
+ },
4185
+ image: {
4186
+ width: "100%",
4187
+ height: "100%",
4188
+ objectFit: "cover",
4189
+ opacity: layout === "overlay" ? 0.35 : 1,
4190
+ filter: layout === "overlay" ? "grayscale(40%)" : "none"
4191
+ },
4192
+ title: {
4193
+ fontSize: "clamp(48px, 9vw, 120px)",
4194
+ fontWeight: "900",
4195
+ letterSpacing: "-5px",
4196
+ lineHeight: "0.95",
4197
+ margin: "0 0 32px 0",
4198
+ textTransform: "uppercase",
4199
+ color: textColor
4200
+ },
4201
+ subtitle: {
4202
+ fontSize: "clamp(16px, 1.8vw, 22px)",
4203
+ opacity: 0.5,
4204
+ lineHeight: "1.6",
4205
+ maxWidth: "600px",
4206
+ margin: isCenter ? "0 auto 56px auto" : align === "right" ? "0 0 56px auto" : "0 0 56px 0",
4207
+ fontWeight: "500"
4208
+ },
4209
+ button: {
4210
+ display: "inline-flex",
4211
+ alignItems: "center",
4212
+ gap: "14px",
4213
+ padding: "22px 52px",
4214
+ backgroundColor: accentColor,
4215
+ color: "#fff",
4216
+ borderRadius: "100px",
4217
+ fontSize: "13px",
4218
+ fontWeight: "800",
4219
+ textTransform: "uppercase",
4220
+ letterSpacing: "3px",
4221
+ border: "none",
4222
+ cursor: "pointer",
4223
+ width: "fit-content",
4224
+ textDecoration: "none",
4225
+ alignSelf: align === "center" ? "center" : align === "right" ? "flex-end" : "flex-start",
4226
+ boxShadow: `0 25px 50px ${accentColor}35`,
4227
+ transition: "background-color 0.4s ease, transform 0.4s ease"
4228
+ },
4229
+ overlay: {
4230
+ position: "absolute",
4231
+ inset: 0,
4232
+ background: "linear-gradient(to bottom, rgba(3,3,3,0.2) 0%, rgba(3,3,3,0.9) 100%)",
4233
+ zIndex: 5,
4234
+ pointerEvents: "none",
4235
+ display: layout === "overlay" ? "block" : "none"
4236
+ }
4237
+ };
4238
+ return /* @__PURE__ */ React19.createElement("section", { ref: sectionRef, style: styles.section }, /* @__PURE__ */ React19.createElement("div", { ref: orbitRef, style: styles.backgroundOrbit }), /* @__PURE__ */ React19.createElement("div", { style: styles.mediaArea }, /* @__PURE__ */ React19.createElement("img", { ref: imageRef, src: image, alt: "Hero Media", style: styles.image }), layout === "overlay" && /* @__PURE__ */ React19.createElement("div", { style: styles.overlay })), /* @__PURE__ */ React19.createElement("div", { style: styles.contentArea }, /* @__PURE__ */ React19.createElement("h1", { ref: titleRef, style: styles.title }, title), /* @__PURE__ */ React19.createElement("p", { ref: subRef, style: styles.subtitle }, subtitle), /* @__PURE__ */ React19.createElement(
4239
+ "button",
4240
+ {
4241
+ ref: btnRef,
4242
+ style: styles.button,
4243
+ onClick: onBtnClick,
4244
+ onMouseMove: handleMagneticMove,
4245
+ onMouseLeave: handleMagneticLeave,
4246
+ onMouseEnter: (e) => gsap19.to(e.currentTarget, { y: -5, duration: 0.3 })
4247
+ },
4248
+ btnText,
4249
+ " ",
4250
+ /* @__PURE__ */ React19.createElement(FiArrowRight7, null)
4251
+ )));
4252
+ };
4253
+
4254
+ // src/components/ScrollAnimation/HorizontalScrollSection.jsx
4255
+ import React20, { useRef as useRef20, useEffect as useEffect20 } from "react";
4256
+ import { gsap as gsap20 } from "gsap";
4049
4257
  import { ScrollTrigger as ScrollTrigger3 } from "gsap/ScrollTrigger";
4050
- import { FiArrowRight as FiArrowRight7, FiChevronRight as FiChevronRight3, FiLayers as FiLayers4 } from "react-icons/fi";
4258
+ import { FiArrowRight as FiArrowRight8, FiChevronRight as FiChevronRight3, FiLayers as FiLayers4 } from "react-icons/fi";
4051
4259
  if (typeof window !== "undefined") {
4052
- gsap19.registerPlugin(ScrollTrigger3);
4260
+ gsap20.registerPlugin(ScrollTrigger3);
4053
4261
  }
4054
4262
  var HorizontalScrollSection = ({
4055
4263
  items = [
@@ -4063,16 +4271,16 @@ var HorizontalScrollSection = ({
4063
4271
  animationDuration = 1.2,
4064
4272
  easing = "power4.out"
4065
4273
  }) => {
4066
- const sectionRef = useRef19(null);
4067
- const containerRef = useRef19(null);
4068
- const triggerRef = useRef19(null);
4069
- const progressRef = useRef19(null);
4070
- const itemRefs = useRef19([]);
4071
- useEffect19(() => {
4072
- const ctx = gsap19.context(() => {
4274
+ const sectionRef = useRef20(null);
4275
+ const containerRef = useRef20(null);
4276
+ const triggerRef = useRef20(null);
4277
+ const progressRef = useRef20(null);
4278
+ const itemRefs = useRef20([]);
4279
+ useEffect20(() => {
4280
+ const ctx = gsap20.context(() => {
4073
4281
  const scrollWidth = containerRef.current.scrollWidth;
4074
4282
  const windowWidth = window.innerWidth;
4075
- const tl = gsap19.to(containerRef.current, {
4283
+ const tl = gsap20.to(containerRef.current, {
4076
4284
  x: () => -(scrollWidth - windowWidth),
4077
4285
  ease: "none",
4078
4286
  scrollTrigger: {
@@ -4084,7 +4292,7 @@ var HorizontalScrollSection = ({
4084
4292
  invalidateOnRefresh: true,
4085
4293
  onUpdate: (self) => {
4086
4294
  if (progressRef.current) {
4087
- gsap19.to(progressRef.current, {
4295
+ gsap20.to(progressRef.current, {
4088
4296
  scaleX: self.progress,
4089
4297
  duration: 0.1,
4090
4298
  ease: "none",
@@ -4095,7 +4303,7 @@ var HorizontalScrollSection = ({
4095
4303
  }
4096
4304
  });
4097
4305
  itemRefs.current.forEach((item, index) => {
4098
- gsap19.fromTo(
4306
+ gsap20.fromTo(
4099
4307
  item.querySelector(".item-content"),
4100
4308
  { opacity: 0, y: 50, scale: 0.95 },
4101
4309
  {
@@ -4111,7 +4319,7 @@ var HorizontalScrollSection = ({
4111
4319
  }
4112
4320
  );
4113
4321
  });
4114
- gsap19.fromTo(
4322
+ gsap20.fromTo(
4115
4323
  sectionRef.current,
4116
4324
  { opacity: 0 },
4117
4325
  { opacity: 1, duration: animationDuration, ease: easing }
@@ -4120,22 +4328,22 @@ var HorizontalScrollSection = ({
4120
4328
  return () => ctx.revert();
4121
4329
  }, [items, animationDuration, easing]);
4122
4330
  const handleItemHover = (e, index) => {
4123
- gsap19.to(itemRefs.current[index], {
4331
+ gsap20.to(itemRefs.current[index], {
4124
4332
  y: -10,
4125
4333
  duration: 0.4,
4126
4334
  ease: "power2.out"
4127
4335
  });
4128
4336
  const overlay = itemRefs.current[index].querySelector(".img-overlay");
4129
- if (overlay) gsap19.to(overlay, { opacity: 0.4, duration: 0.4 });
4337
+ if (overlay) gsap20.to(overlay, { opacity: 0.4, duration: 0.4 });
4130
4338
  };
4131
4339
  const handleItemLeave = (index) => {
4132
- gsap19.to(itemRefs.current[index], {
4340
+ gsap20.to(itemRefs.current[index], {
4133
4341
  y: 0,
4134
4342
  duration: 0.4,
4135
4343
  ease: "power2.out"
4136
4344
  });
4137
4345
  const overlay = itemRefs.current[index].querySelector(".img-overlay");
4138
- if (overlay) gsap19.to(overlay, { opacity: 0, duration: 0.4 });
4346
+ if (overlay) gsap20.to(overlay, { opacity: 0, duration: 0.4 });
4139
4347
  };
4140
4348
  const styles = {
4141
4349
  triggerSection: {
@@ -4238,7 +4446,7 @@ var HorizontalScrollSection = ({
4238
4446
  transform: "scaleX(0)"
4239
4447
  }
4240
4448
  };
4241
- return /* @__PURE__ */ React19.createElement("div", { ref: triggerRef, style: styles.triggerSection }, /* @__PURE__ */ React19.createElement("div", { ref: containerRef, style: styles.outerContainer }, /* @__PURE__ */ React19.createElement("div", { style: styles.scroller }, items.map((item, i) => /* @__PURE__ */ React19.createElement(
4449
+ return /* @__PURE__ */ React20.createElement("div", { ref: triggerRef, style: styles.triggerSection }, /* @__PURE__ */ React20.createElement("div", { ref: containerRef, style: styles.outerContainer }, /* @__PURE__ */ React20.createElement("div", { style: styles.scroller }, items.map((item, i) => /* @__PURE__ */ React20.createElement(
4242
4450
  "div",
4243
4451
  {
4244
4452
  key: item.id,
@@ -4247,10 +4455,10 @@ var HorizontalScrollSection = ({
4247
4455
  onMouseEnter: (e) => handleItemHover(e, i),
4248
4456
  onMouseLeave: () => handleItemLeave(i)
4249
4457
  },
4250
- /* @__PURE__ */ React19.createElement("img", { src: item.image, alt: item.title, style: styles.image, className: "item-bg" }),
4251
- /* @__PURE__ */ React19.createElement("div", { className: "img-overlay", style: styles.imgOverlay }),
4252
- /* @__PURE__ */ React19.createElement("div", { className: "item-content", style: styles.content }, /* @__PURE__ */ React19.createElement("div", { style: styles.badge(item.color) }, /* @__PURE__ */ React19.createElement(FiLayers4, null), " ", item.id < 10 ? `0${item.id}` : item.id), /* @__PURE__ */ React19.createElement("h3", { style: styles.itemTitle }, item.title), /* @__PURE__ */ React19.createElement("p", { style: styles.itemDesc }, item.description), /* @__PURE__ */ React19.createElement("div", { style: { marginTop: "24px", display: "flex", alignItems: "center", gap: "10px", color: item.color, fontWeight: "700" } }, "Explore Case ", /* @__PURE__ */ React19.createElement(FiArrowRight7, null)))
4253
- )))), /* @__PURE__ */ React19.createElement("div", { style: styles.progressBarWrap }, /* @__PURE__ */ React19.createElement("div", { ref: progressRef, style: styles.progressFill })));
4458
+ /* @__PURE__ */ React20.createElement("img", { src: item.image, alt: item.title, style: styles.image, className: "item-bg" }),
4459
+ /* @__PURE__ */ React20.createElement("div", { className: "img-overlay", style: styles.imgOverlay }),
4460
+ /* @__PURE__ */ React20.createElement("div", { className: "item-content", style: styles.content }, /* @__PURE__ */ React20.createElement("div", { style: styles.badge(item.color) }, /* @__PURE__ */ React20.createElement(FiLayers4, null), " ", item.id < 10 ? `0${item.id}` : item.id), /* @__PURE__ */ React20.createElement("h3", { style: styles.itemTitle }, item.title), /* @__PURE__ */ React20.createElement("p", { style: styles.itemDesc }, item.description), /* @__PURE__ */ React20.createElement("div", { style: { marginTop: "24px", display: "flex", alignItems: "center", gap: "10px", color: item.color, fontWeight: "700" } }, "Explore Case ", /* @__PURE__ */ React20.createElement(FiArrowRight8, null)))
4461
+ )))), /* @__PURE__ */ React20.createElement("div", { style: styles.progressBarWrap }, /* @__PURE__ */ React20.createElement("div", { ref: progressRef, style: styles.progressFill })));
4254
4462
  };
4255
4463
  export {
4256
4464
  Button,
@@ -4258,6 +4466,7 @@ export {
4258
4466
  Carousel,
4259
4467
  Footer,
4260
4468
  Grid,
4469
+ Hero,
4261
4470
  HorizontalScrollSection,
4262
4471
  Image,
4263
4472
  Navbar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aura-ui-library",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "A modern and customizable UI library for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",