@shohojdhara/atomix 0.4.4 → 0.4.6

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 (62) hide show
  1. package/dist/atomix.css +50 -11
  2. package/dist/atomix.css.map +1 -1
  3. package/dist/atomix.min.css +1 -1
  4. package/dist/atomix.min.css.map +1 -1
  5. package/dist/charts.js +184 -189
  6. package/dist/charts.js.map +1 -1
  7. package/dist/core.d.ts +4 -4
  8. package/dist/core.js +194 -199
  9. package/dist/core.js.map +1 -1
  10. package/dist/forms.js +184 -189
  11. package/dist/forms.js.map +1 -1
  12. package/dist/heavy.js +189 -194
  13. package/dist/heavy.js.map +1 -1
  14. package/dist/index.d.ts +44 -47
  15. package/dist/index.esm.js +496 -613
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +528 -631
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.min.js +1 -1
  20. package/dist/index.min.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/AtomixGlass/AtomixGlass.tsx +60 -39
  23. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +8 -42
  24. package/src/components/AtomixGlass/glass-utils.ts +27 -14
  25. package/src/components/AtomixGlass/stories/Overview.stories.tsx +19 -21
  26. package/src/components/AtomixGlass/stories/Playground.stories.tsx +1162 -515
  27. package/src/components/AtomixGlass/stories/shared-components.tsx +11 -3
  28. package/src/components/Breadcrumb/Breadcrumb.tsx +5 -5
  29. package/src/components/Breadcrumb/BreadcrumbCompound.test.tsx +2 -2
  30. package/src/components/Button/Button.tsx +6 -6
  31. package/src/components/Card/Card.tsx +3 -3
  32. package/src/components/Dropdown/Dropdown.tsx +5 -3
  33. package/src/components/Footer/Footer.tsx +124 -166
  34. package/src/components/Footer/FooterLink.tsx +16 -19
  35. package/src/components/Footer/FooterSection.tsx +40 -39
  36. package/src/components/Footer/FooterSocialLink.tsx +59 -58
  37. package/src/components/Footer/README.md +1 -1
  38. package/src/components/Hero/Hero.tsx +72 -142
  39. package/src/components/Navigation/Menu/MegaMenu.tsx +17 -12
  40. package/src/components/Navigation/Menu/Menu.tsx +49 -24
  41. package/src/components/Navigation/Nav/NavItem.tsx +5 -3
  42. package/src/components/Navigation/Navbar/Navbar.tsx +13 -5
  43. package/src/components/Navigation/SideMenu/SideMenu.tsx +2 -2
  44. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +4 -4
  45. package/src/components/Slider/Slider.tsx +7 -4
  46. package/src/lib/composables/index.ts +1 -2
  47. package/src/lib/composables/useAtomixGlass.ts +246 -222
  48. package/src/lib/composables/useAtomixGlassStyles.ts +46 -23
  49. package/src/lib/composables/useFooter.ts +117 -20
  50. package/src/lib/composables/useSlider.ts +3 -1
  51. package/src/lib/constants/components.ts +3 -1
  52. package/src/lib/types/components.ts +44 -12
  53. package/src/styles/06-components/_components.atomix-glass.scss +72 -14
  54. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +0 -222
  55. package/src/lib/composables/atomix-glass/useGlassBackgroundDetection.ts +0 -329
  56. package/src/lib/composables/atomix-glass/useGlassCornerRadius.ts +0 -82
  57. package/src/lib/composables/atomix-glass/useGlassMouseTracking.ts +0 -153
  58. package/src/lib/composables/atomix-glass/useGlassOverLight.ts +0 -198
  59. package/src/lib/composables/atomix-glass/useGlassState.ts +0 -112
  60. package/src/lib/composables/atomix-glass/useGlassTransforms.ts +0 -160
  61. package/src/lib/composables/glass-styles.ts +0 -302
  62. package/src/lib/composables/useGlassContainer.ts +0 -177
package/dist/index.esm.js CHANGED
@@ -1730,7 +1730,9 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
1730
1730
  ENABLE_OVER_LIGHT_LAYERS: !0
1731
1731
  },
1732
1732
  CONSTANTS: {
1733
- ACTIVATION_ZONE: 200,
1733
+ ACTIVATION_ZONE: 350,
1734
+ LERP_FACTOR: .08,
1735
+ SMOOTHSTEP_POWER: 2.5,
1734
1736
  MIN_BLUR: .1,
1735
1737
  MOUSE_INFLUENCE_DIVISOR: 100,
1736
1738
  EDGE_FADE_PIXELS: 2,
@@ -2025,7 +2027,7 @@ const {CONSTANTS: CONSTANTS$2} = ATOMIX_GLASS, calculateDistance = (pos1, pos2)
2025
2027
  // Silently handle errors
2026
2028
  }
2027
2029
  return CONSTANTS$2.DEFAULT_CORNER_RADIUS;
2028
- }, getDisplacementMap = (mode, displacementMap, polarDisplacementMap, prominentDisplacementMap, shaderMapUrl) => {
2030
+ }, lerp = (a, b, t) => a + (b - a) * t, softClamp = (value, max) => max <= 0 ? 0 : max * (1 - Math.exp(-value / max)), getDisplacementMap = (mode, displacementMap, polarDisplacementMap, prominentDisplacementMap, shaderMapUrl) => {
2029
2031
  switch (mode) {
2030
2032
  case "standard":
2031
2033
  return displacementMap;
@@ -2198,7 +2200,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
2198
2200
  }, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp, isHovered: isHovered = !1, isActive: isActive = !1, overLight: overLight = !1, overLightConfig: overLightConfig = {}, borderRadius: borderRadius = 0, padding: padding = "0 0", glassSize: glassSize = {
2199
2201
  width: 0,
2200
2202
  height: 0
2201
- }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, elasticity: elasticity = 0, contentRef: contentRef}, ref) => {
2203
+ }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, contentRef: contentRef}, ref) => {
2202
2204
  // Generate a stable, deterministic ID for SSR compatibility
2203
2205
  // Use a module-level counter that's consistent across server and client
2204
2206
  const filterId = useMemo((() => "atomix-glass-filter-" + ++idCounter), []), [shaderMapUrl, setShaderMapUrl] = useState(""), shaderGeneratorRef = useRef(null), shaderUtilsRef = useRef(null), shaderDebounceTimeoutRef = useRef(null);
@@ -2383,21 +2385,12 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
2383
2385
  onClick: onClick,
2384
2386
  children: jsxs("div", {
2385
2387
  className: ATOMIX_GLASS.INNER_CLASS,
2386
- style: {
2387
- padding: "var(--atomix-glass-container-padding)",
2388
- boxShadow: "var(--atomix-glass-container-box-shadow)"
2389
- },
2390
2388
  onMouseEnter: onMouseEnter,
2391
2389
  onMouseLeave: onMouseLeave,
2392
2390
  onMouseDown: onMouseDown,
2393
2391
  onMouseUp: onMouseUp,
2394
2392
  children: [ jsxs("div", {
2395
2393
  className: ATOMIX_GLASS.FILTER_CLASS,
2396
- style: {
2397
- zIndex: 1,
2398
- position: "absolute",
2399
- inset: 0
2400
- },
2401
2394
  children: [ jsx(GlassFilter, {
2402
2395
  blurAmount: blurAmount,
2403
2396
  mode: mode,
@@ -2412,28 +2405,14 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
2412
2405
  },
2413
2406
  className: ATOMIX_GLASS.FILTER_OVERLAY_CLASS,
2414
2407
  style: {
2415
- filter: `url(#${filterId})`,
2416
- backdropFilter: "var(--atomix-glass-container-backdrop)",
2417
- borderRadius: "var(--atomix-glass-container-radius)"
2408
+ filter: `url(#${filterId})`
2418
2409
  }
2419
2410
  }), jsx("div", {
2420
- className: ATOMIX_GLASS.FILTER_SHADOW_CLASS,
2421
- style: {
2422
- boxShadow: "var(--atomix-glass-container-shadow)",
2423
- opacity: "var(--atomix-glass-container-shadow-opacity)",
2424
- background: "var(--atomix-glass-container-bg)",
2425
- borderRadius: "var(--atomix-glass-container-radius)"
2426
- }
2411
+ className: ATOMIX_GLASS.FILTER_SHADOW_CLASS
2427
2412
  }) ]
2428
2413
  }), jsx("div", {
2429
2414
  ref: contentRef,
2430
2415
  className: ATOMIX_GLASS.CONTENT_CLASS,
2431
- style: {
2432
- position: "relative",
2433
- textShadow: "var(--atomix-glass-container-text-shadow)",
2434
- // Ensure content is always above the filter layer (zIndex 1)
2435
- zIndex: elasticity > 0 ? 100 : 2
2436
- },
2437
2416
  children: children
2438
2417
  }) ]
2439
2418
  })
@@ -2537,31 +2516,39 @@ class {
2537
2516
  saturationBoost: baseOverLightConfig.saturationBoost
2538
2517
  };
2539
2518
  // Calculate mouse influence
2540
- // Calculate elastic translation
2541
- let elasticTranslation = {
2519
+ let computedDirectionalScale = directionalScale, elasticTranslation = {
2542
2520
  x: 0,
2543
2521
  y: 0
2544
2522
  };
2545
- if (!effectiveWithoutEffects && wrapperElement) {
2523
+ // Calculate elastic translation and directional scale
2524
+ if (!effectiveWithoutEffects && wrapperElement) {
2546
2525
  const rect = wrapperElement.getBoundingClientRect(), center = calculateElementCenter(rect);
2547
- // Calculate fade in factor
2548
- let fadeInFactor = 0;
2526
+ // Mouse presence and edge distance logic
2549
2527
  if (globalMousePosition.x && globalMousePosition.y && validateGlassSize(glassSize)) {
2550
- const edgeDistanceX = Math.max(0, Math.abs(globalMousePosition.x - center.x) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(globalMousePosition.y - center.y) - glassSize.height / 2), edgeDistance = calculateDistance({
2528
+ const deltaX = globalMousePosition.x - center.x, deltaY = globalMousePosition.y - center.y, edgeDistanceX = Math.max(0, Math.abs(deltaX) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(deltaY) - glassSize.height / 2), edgeDistance = calculateDistance({
2551
2529
  x: edgeDistanceX,
2552
2530
  y: edgeDistanceY
2553
2531
  }, {
2554
2532
  x: 0,
2555
2533
  y: 0
2556
- });
2557
- fadeInFactor = edgeDistance > ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE;
2534
+ }), rawT = edgeDistance > ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE, fadeInFactor = (t => {
2535
+ const clamped = Math.max(0, Math.min(1, t));
2536
+ return clamped * clamped * (3 - 2 * clamped);
2537
+ })(rawT);
2538
+ // Directional scale
2539
+ if (elasticTranslation = {
2540
+ x: deltaX * elasticity * .1 * fadeInFactor,
2541
+ y: deltaY * elasticity * .1 * fadeInFactor
2542
+ }, !isOverLight && edgeDistance <= ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE) {
2543
+ const centerDistance = calculateDistance(globalMousePosition, center);
2544
+ if (centerDistance > 0) {
2545
+ const normalizedX = deltaX / centerDistance, normalizedY = deltaY / centerDistance, stretchIntensity = Math.min(centerDistance / 300, 1) * elasticity * rawT, scaleX = 1 + Math.abs(normalizedX) * stretchIntensity * .3 - Math.abs(normalizedY) * stretchIntensity * .15, scaleY = 1 + Math.abs(normalizedY) * stretchIntensity * .3 - Math.abs(normalizedX) * stretchIntensity * .15, softScaleX = 1 - softClamp(Math.max(0, 1 - scaleX), .2), softScaleY = 1 - softClamp(Math.max(0, 1 - scaleY), .2);
2546
+ computedDirectionalScale = `scaleX(${Math.max(.85, softScaleX)}) scaleY(${Math.max(.85, softScaleY)})`;
2547
+ }
2548
+ }
2558
2549
  }
2559
- elasticTranslation = {
2560
- x: (globalMousePosition.x - center.x) * elasticity * .1 * fadeInFactor,
2561
- y: (globalMousePosition.y - center.y) * elasticity * .1 * fadeInFactor
2562
- };
2563
2550
  }
2564
- const transformStyle = effectiveWithoutEffects ? isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)" : `translate(${elasticTranslation.x}px, ${elasticTranslation.y}px) ${isActive && Boolean(onClick) ? "scale(0.96)" : directionalScale}`;
2551
+ const transformStyle = effectiveWithoutEffects ? isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)" : `translate(${elasticTranslation.x}px, ${elasticTranslation.y}px) ${isActive && Boolean(onClick) ? "scale(0.96)" : computedDirectionalScale}`;
2565
2552
  // Update Wrapper Styles (glassVars)
2566
2553
  if (wrapperElement) {
2567
2554
  const mx = mouseOffset.x, my = mouseOffset.y, absMx = Math.abs(mx), absMy = Math.abs(my), GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT, borderGradientAngle = GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER, borderStop1 = Math.max(GRADIENT.BORDER_STOP_1.MIN, GRADIENT.BORDER_STOP_1.BASE + my * GRADIENT.BORDER_STOP_1.MULTIPLIER), borderStop2 = Math.min(GRADIENT.BORDER_STOP_2.MAX, GRADIENT.BORDER_STOP_2.BASE + my * GRADIENT.BORDER_STOP_2.MULTIPLIER), borderOpacities = [ GRADIENT.BORDER_OPACITY.BASE_1 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_LOW, GRADIENT.BORDER_OPACITY.BASE_2 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_HIGH, GRADIENT.BORDER_OPACITY.BASE_3 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_LOW, GRADIENT.BORDER_OPACITY.BASE_4 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_HIGH ], configBorderOpacity = overLightConfig.borderOpacity, whiteColor = ATOMIX_GLASS.CONSTANTS.PALETTE.WHITE, blackColor = ATOMIX_GLASS.CONSTANTS.PALETTE.BLACK, hoverPositions = {
@@ -2668,7 +2655,13 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2668
2655
  }), internalMouseOffsetRef = useRef({
2669
2656
  x: 0,
2670
2657
  y: 0
2671
- }), [dynamicBorderRadius, setDynamicCornerRadius] = useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = useState(!1), [detectedOverLight, setDetectedOverLight] = useState(!1), effectiveBorderRadius = useMemo((() => void 0 !== borderRadius ? Math.max(0, borderRadius) : Math.max(0, dynamicBorderRadius)), [ borderRadius, dynamicBorderRadius ]), {glassSize: glassSize} = function({glassRef: glassRef, effectiveBorderRadius: effectiveBorderRadius, cachedRectRef: cachedRectRef}) {
2658
+ }), targetMouseOffsetRef = useRef({
2659
+ x: 0,
2660
+ y: 0
2661
+ }), targetGlobalMousePositionRef = useRef({
2662
+ x: 0,
2663
+ y: 0
2664
+ }), lerpRafRef = useRef(null), lerpActiveRef = useRef(!1), [dynamicBorderRadius, setDynamicCornerRadius] = useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = useState(!1), [detectedOverLight, setDetectedOverLight] = useState(!1), effectiveBorderRadius = useMemo((() => void 0 !== borderRadius ? Math.max(0, borderRadius) : Math.max(0, dynamicBorderRadius)), [ borderRadius, dynamicBorderRadius ]), {glassSize: glassSize} = function({glassRef: glassRef, effectiveBorderRadius: effectiveBorderRadius, cachedRectRef: cachedRectRef}) {
2672
2665
  const [glassSize, setGlassSize] = useState({
2673
2666
  width: 270,
2674
2667
  height: 69
@@ -2765,7 +2758,23 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2765
2758
  const timeoutId = setTimeout(extractRadius, 100);
2766
2759
  return () => clearTimeout(timeoutId);
2767
2760
  }), [ children, debugBorderRadius, contentRef ]),
2768
- // Media query handlers and background detection
2761
+ // Media query detection for reduced motion and high contrast
2762
+ useEffect((() => {
2763
+ if ("undefined" == typeof window || "function" != typeof window.matchMedia) return;
2764
+ const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
2765
+ setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
2766
+ const handleReducedMotionChange = e => {
2767
+ setUserPrefersReducedMotion(e.matches);
2768
+ }, handleHighContrastChange = e => {
2769
+ setUserPrefersHighContrast(e.matches);
2770
+ };
2771
+ return mediaQueryReducedMotion.addEventListener("change", handleReducedMotionChange),
2772
+ mediaQueryHighContrast.addEventListener("change", handleHighContrastChange), () => {
2773
+ mediaQueryReducedMotion.removeEventListener("change", handleReducedMotionChange),
2774
+ mediaQueryHighContrast.removeEventListener("change", handleHighContrastChange);
2775
+ };
2776
+ }), []),
2777
+ // Background detection for overLight auto-detect
2769
2778
  useEffect((() => {
2770
2779
  if (("auto" === overLight || "object" == typeof overLight && null !== overLight) && glassRef.current) {
2771
2780
  const element = glassRef.current, cachedResult = ((parentElement, overLightConfig) => {
@@ -2865,102 +2874,36 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2865
2874
  }), 150);
2866
2875
  return () => clearTimeout(timeoutId);
2867
2876
  }
2868
- if ("boolean" == typeof overLight && setDetectedOverLight(!1), "function" == typeof window.matchMedia) try {
2869
- const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
2870
- setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
2871
- const handleReducedMotionChange = e => {
2872
- setUserPrefersReducedMotion(e.matches);
2873
- }, handleHighContrastChange = e => {
2874
- setUserPrefersHighContrast(e.matches);
2875
- };
2876
- return mediaQueryReducedMotion.addEventListener ? (mediaQueryReducedMotion.addEventListener("change", handleReducedMotionChange),
2877
- mediaQueryHighContrast.addEventListener("change", handleHighContrastChange)) : mediaQueryReducedMotion.addListener && (mediaQueryReducedMotion.addListener(handleReducedMotionChange),
2878
- mediaQueryHighContrast.addListener(handleHighContrastChange)), () => {
2879
- // ignore
2880
- };
2881
- } catch (error) {
2882
- return;
2883
- }
2884
- }), [ overLight, glassRef, debugOverLight ]);
2877
+ "boolean" == typeof overLight && setDetectedOverLight(!1);
2878
+ }), [ overLight, glassRef ]);
2885
2879
  /**
2886
2880
  * Get effective overLight value based on configuration
2887
2881
  */
2888
- const getEffectiveOverLight = useCallback((() => "boolean" == typeof overLight ? overLight : ("auto" === overLight || "object" == typeof overLight && null !== overLight) && detectedOverLight), [ overLight, detectedOverLight ]), validateConfigValue = useCallback(((value, min, max, defaultValue) => "number" != typeof value || isNaN(value) || !isFinite(value) ? defaultValue : Math.min(max, Math.max(min, value))), []), baseOverLightConfig = useMemo((() => {
2889
- const isOverLight = getEffectiveOverLight(), baseConfig = {
2882
+ const getEffectiveOverLight = useCallback((() => "boolean" == typeof overLight ? overLight : ("auto" === overLight || "object" == typeof overLight && null !== overLight) && detectedOverLight), [ overLight, detectedOverLight ]), validateConfigValue = useCallback(((value, min, max, defaultValue) => "number" != typeof value || isNaN(value) || !isFinite(value) ? defaultValue : Math.min(max, Math.max(min, value))), []), overLightConfig = useMemo((() => {
2883
+ const isOverLight = getEffectiveOverLight(), hoverIntensity = isHovered ? 1.4 : 1, activeIntensity = isActive ? 1.6 : 1, baseConfig = {
2890
2884
  isOverLight: isOverLight,
2891
2885
  threshold: .7,
2892
- opacity: isOverLight ? Math.min(.6, Math.max(.2, .5)) : 0,
2893
- contrast: 1,
2894
- // Base contrast
2895
- brightness: 1,
2896
- // Base brightness
2886
+ opacity: isOverLight ? Math.min(.6, Math.max(.2, .5 * hoverIntensity * activeIntensity)) : 0,
2887
+ contrast: 1.4,
2888
+ brightness: .9,
2897
2889
  saturationBoost: 1.3,
2890
+ // Fixed value — dynamic saturation amplifies perceived displacement
2898
2891
  shadowIntensity: .9,
2899
2892
  borderOpacity: .7
2900
2893
  };
2901
2894
  if ("object" == typeof overLight && null !== overLight) {
2902
- const objConfig = overLight, validatedThreshold = validateConfigValue(objConfig.threshold, .1, 1, baseConfig.threshold), validatedOpacity = validateConfigValue(objConfig.opacity, .1, 1, baseConfig.opacity), validatedContrast = validateConfigValue(objConfig.contrast, .5, 2.5, baseConfig.contrast), validatedBrightness = validateConfigValue(objConfig.brightness, .5, 2, baseConfig.brightness), validatedSaturationBoost = validateConfigValue(objConfig.saturationBoost, .5, 3, baseConfig.saturationBoost);
2903
- return {
2895
+ const objConfig = overLight, validatedThreshold = validateConfigValue(objConfig.threshold, .1, 1, baseConfig.threshold), validatedOpacity = validateConfigValue(objConfig.opacity, .1, 1, baseConfig.opacity), validatedContrast = validateConfigValue(objConfig.contrast, .5, 2.5, baseConfig.contrast), validatedBrightness = validateConfigValue(objConfig.brightness, .5, 2, baseConfig.brightness), validatedSaturationBoost = validateConfigValue(objConfig.saturationBoost, .5, 3, baseConfig.saturationBoost), finalConfig = {
2904
2896
  ...baseConfig,
2905
2897
  threshold: validatedThreshold,
2906
- opacity: validatedOpacity,
2898
+ opacity: validatedOpacity * hoverIntensity * activeIntensity,
2907
2899
  contrast: validatedContrast,
2908
2900
  brightness: validatedBrightness,
2909
2901
  saturationBoost: validatedSaturationBoost
2910
2902
  };
2903
+ return "undefined" == typeof process || process.env, finalConfig;
2911
2904
  }
2912
- return baseConfig;
2913
- }), [ overLight, getEffectiveOverLight, validateConfigValue ]), overLightConfig = useMemo((() => {
2914
- const mouseInfluence = calculateMouseInfluence(mouseOffset), hoverIntensity = isHovered ? 1.4 : 1, activeIntensity = isActive ? 1.6 : 1;
2915
- return {
2916
- isOverLight: baseOverLightConfig.isOverLight,
2917
- threshold: baseOverLightConfig.threshold,
2918
- opacity: baseOverLightConfig.opacity * hoverIntensity * activeIntensity,
2919
- contrast: Math.min(1.6, baseOverLightConfig.contrast + .1 * mouseInfluence),
2920
- brightness: Math.min(1.1, baseOverLightConfig.brightness + .05 * mouseInfluence),
2921
- saturationBoost: baseOverLightConfig.saturationBoost,
2922
- shadowIntensity: Math.min(1.2, Math.max(.5, baseOverLightConfig.shadowIntensity + .2 * mouseInfluence)),
2923
- borderOpacity: Math.min(1, Math.max(.3, baseOverLightConfig.borderOpacity + .1 * mouseInfluence))
2924
- };
2925
- }), [ baseOverLightConfig, mouseOffset, isHovered, isActive ]), updateRectRef = useRef(null), calculateDirectionalScale = useCallback((() => {
2926
- if (baseOverLightConfig.isOverLight) return "scale(1)";
2927
- if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return "scale(1)";
2928
- const rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect), deltaX = globalMousePosition.x - center.x, deltaY = globalMousePosition.y - center.y, edgeDistanceX = Math.max(0, Math.abs(deltaX) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(deltaY) - glassSize.height / 2), edgeDistance = calculateDistance({
2929
- x: edgeDistanceX,
2930
- y: edgeDistanceY
2931
- }, {
2932
- x: 0,
2933
- y: 0
2934
- });
2935
- if (edgeDistance > CONSTANTS.ACTIVATION_ZONE) return "scale(1)";
2936
- const fadeInFactor = 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE, centerDistance = calculateDistance(globalMousePosition, center);
2937
- if (0 === centerDistance) return "scale(1)";
2938
- const normalizedX = deltaX / centerDistance, normalizedY = deltaY / centerDistance, stretchIntensity = Math.min(centerDistance / 300, 1) * elasticity * fadeInFactor, scaleX = 1 + Math.abs(normalizedX) * stretchIntensity * .3 - Math.abs(normalizedY) * stretchIntensity * .15, scaleY = 1 + Math.abs(normalizedY) * stretchIntensity * .3 - Math.abs(normalizedX) * stretchIntensity * .15;
2939
- return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
2940
- }), [ globalMousePosition, elasticity, glassSize, glassRef, baseOverLightConfig ]), calculateFadeInFactor = useCallback((() => {
2941
- if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return 0;
2942
- const rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect), edgeDistanceX = Math.max(0, Math.abs(globalMousePosition.x - center.x) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(globalMousePosition.y - center.y) - glassSize.height / 2), edgeDistance = calculateDistance({
2943
- x: edgeDistanceX,
2944
- y: edgeDistanceY
2945
- }, {
2946
- x: 0,
2947
- y: 0
2948
- });
2949
- return edgeDistance > CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE;
2950
- }), [ globalMousePosition, glassSize, glassRef ]), calculateElasticTranslation = useCallback((() => {
2951
- if (!glassRef.current) return {
2952
- x: 0,
2953
- y: 0
2954
- };
2955
- const fadeInFactor = calculateFadeInFactor(), rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect);
2956
- return {
2957
- x: (globalMousePosition.x - center.x) * elasticity * .1 * fadeInFactor,
2958
- y: (globalMousePosition.y - center.y) * elasticity * .1 * fadeInFactor
2959
- };
2960
- }), [ globalMousePosition, elasticity, calculateFadeInFactor, glassRef ]), elasticTranslation = useMemo((() => effectiveWithoutEffects ? {
2961
- x: 0,
2962
- y: 0
2963
- } : calculateElasticTranslation()), [ calculateElasticTranslation, effectiveWithoutEffects ]), directionalScale = useMemo((() => effectiveWithoutEffects ? "scale(1)" : calculateDirectionalScale()), [ calculateDirectionalScale, effectiveWithoutEffects ]), transformStyle = useMemo((() => effectiveWithoutEffects ? isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)" : `translate(${elasticTranslation.x}px, ${elasticTranslation.y}px) ${isActive && Boolean(onClick) ? "scale(0.96)" : directionalScale}`), [ elasticTranslation, isActive, onClick, directionalScale, effectiveWithoutEffects ]), handleGlobalMousePosition = useCallback((globalPos => {
2905
+ return "undefined" == typeof process || process.env, baseConfig;
2906
+ }), [ overLight, getEffectiveOverLight, isHovered, isActive, validateConfigValue, debugOverLight ]), transformStyle = useMemo((() => effectiveWithoutEffects || isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)"), [ effectiveWithoutEffects, isActive, onClick ]), updateRectRef = useRef(null), handleGlobalMousePosition = useCallback((globalPos => {
2964
2907
  if (externalGlobalMousePosition && externalMouseOffset) return;
2965
2908
  if (effectiveWithoutEffects) return;
2966
2909
  const container = mouseContainer?.current || glassRef.current;
@@ -2969,35 +2912,61 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2969
2912
  let rect = cachedRectRef.current;
2970
2913
  if (rect && 0 !== rect.width && 0 !== rect.height || (rect = container.getBoundingClientRect(),
2971
2914
  cachedRectRef.current = rect), 0 === rect.width || 0 === rect.height) return;
2972
- const center = calculateElementCenter(rect), newOffset = {
2915
+ const center = calculateElementCenter(rect);
2916
+ // Write raw target — the lerp loop will smoothly pursue it
2917
+ targetMouseOffsetRef.current = {
2973
2918
  x: (globalPos.x - center.x) / rect.width * 100,
2974
2919
  y: (globalPos.y - center.y) / rect.height * 100
2920
+ }, targetGlobalMousePositionRef.current = globalPos;
2921
+ }), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]), startLerpLoop = useCallback((() => {
2922
+ if (lerpActiveRef.current) return;
2923
+ lerpActiveRef.current = !0;
2924
+ const LERP_T = CONSTANTS.LERP_FACTOR, tick = () => {
2925
+ if (!lerpActiveRef.current) return;
2926
+ const cur = internalMouseOffsetRef.current, tgt = targetMouseOffsetRef.current, dx = tgt.x - cur.x, dy = tgt.y - cur.y;
2927
+ // If we're close enough, snap and park
2928
+ if (Math.abs(dx) < .05 && Math.abs(dy) < .05) internalMouseOffsetRef.current = {
2929
+ ...tgt
2930
+ }, internalGlobalMousePositionRef.current = {
2931
+ ...targetGlobalMousePositionRef.current
2932
+ }; else {
2933
+ internalMouseOffsetRef.current = {
2934
+ x: lerp(cur.x, tgt.x, LERP_T),
2935
+ y: lerp(cur.y, tgt.y, LERP_T)
2936
+ };
2937
+ const curG = internalGlobalMousePositionRef.current, tgtG = targetGlobalMousePositionRef.current;
2938
+ internalGlobalMousePositionRef.current = {
2939
+ x: lerp(curG.x, tgtG.x, LERP_T),
2940
+ y: lerp(curG.y, tgtG.y, LERP_T)
2941
+ };
2942
+ }
2943
+ // Imperative style update with the smoothed values
2944
+ updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
2945
+ mouseOffset: internalMouseOffsetRef.current,
2946
+ globalMousePosition: internalGlobalMousePositionRef.current,
2947
+ glassSize: glassSize,
2948
+ isHovered: isHovered,
2949
+ isActive: isActive,
2950
+ isOverLight: overLightConfig.isOverLight,
2951
+ baseOverLightConfig: overLightConfig,
2952
+ effectiveBorderRadius: effectiveBorderRadius,
2953
+ effectiveWithoutEffects: effectiveWithoutEffects,
2954
+ effectiveReducedMotion: effectiveReducedMotion,
2955
+ elasticity: elasticity,
2956
+ directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
2957
+ onClick: onClick,
2958
+ withLiquidBlur: withLiquidBlur,
2959
+ blurAmount: blurAmount,
2960
+ saturation: saturation,
2961
+ padding: padding
2962
+ }), lerpRafRef.current = requestAnimationFrame(tick);
2975
2963
  };
2976
- // Calculate offset relative to this container
2977
- // Store in refs instead of state
2978
- internalMouseOffsetRef.current = newOffset, internalGlobalMousePositionRef.current = globalPos,
2979
- // Imperative style update
2980
- updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
2981
- mouseOffset: newOffset,
2982
- globalMousePosition: globalPos,
2983
- glassSize: glassSize,
2984
- isHovered: isHovered,
2985
- isActive: isActive,
2986
- isOverLight: baseOverLightConfig.isOverLight,
2987
- baseOverLightConfig: baseOverLightConfig,
2988
- effectiveBorderRadius: effectiveBorderRadius,
2989
- effectiveWithoutEffects: effectiveWithoutEffects,
2990
- effectiveReducedMotion: effectiveReducedMotion,
2991
- elasticity: elasticity,
2992
- directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
2993
- // Simplified directional scale for fast path
2994
- onClick: onClick,
2995
- withLiquidBlur: withLiquidBlur,
2996
- blurAmount: blurAmount,
2997
- saturation: saturation,
2998
- padding: padding
2999
- });
3000
- }), [ mouseContainer, glassRef, wrapperRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects, glassSize, isHovered, isActive, baseOverLightConfig, effectiveBorderRadius, effectiveReducedMotion, elasticity, onClick, withLiquidBlur, blurAmount, saturation, padding ]);
2964
+ // 0.08 lower = more viscous
2965
+ lerpRafRef.current = requestAnimationFrame(tick);
2966
+ }), [ glassRef, wrapperRef, glassSize, isHovered, isActive, overLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, onClick, withLiquidBlur, blurAmount, saturation, padding ]), stopLerpLoop = useCallback((() => {
2967
+ lerpActiveRef.current = !1, null !== lerpRafRef.current && (cancelAnimationFrame(lerpRafRef.current),
2968
+ lerpRafRef.current = null);
2969
+ }), []);
3001
2970
  /**
3002
2971
  * Validate and clamp a numeric config value
3003
2972
  */
@@ -3005,7 +2974,10 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3005
2974
  useEffect((() => {
3006
2975
  if (externalGlobalMousePosition && externalMouseOffset) return;
3007
2976
  if (effectiveWithoutEffects) return;
3008
- const unsubscribe = globalMouseTracker.subscribe(handleGlobalMousePosition), container = mouseContainer?.current || glassRef.current;
2977
+ const unsubscribe = globalMouseTracker.subscribe(handleGlobalMousePosition);
2978
+ // Start the lerp loop — it will smoothly chase the target
2979
+ startLerpLoop();
2980
+ const container = mouseContainer?.current || glassRef.current;
3009
2981
  let resizeObserver = null;
3010
2982
  return container && "undefined" != typeof ResizeObserver && (resizeObserver = new ResizeObserver((() => {
3011
2983
  null !== updateRectRef.current && cancelAnimationFrame(updateRectRef.current), updateRectRef.current = requestAnimationFrame((() => {
@@ -3013,10 +2985,10 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3013
2985
  container && (cachedRectRef.current = container.getBoundingClientRect()), updateRectRef.current = null;
3014
2986
  }));
3015
2987
  })), resizeObserver.observe(container)), () => {
3016
- unsubscribe(), null !== updateRectRef.current && (cancelAnimationFrame(updateRectRef.current),
2988
+ unsubscribe(), stopLerpLoop(), null !== updateRectRef.current && (cancelAnimationFrame(updateRectRef.current),
3017
2989
  updateRectRef.current = null), resizeObserver && resizeObserver.disconnect();
3018
2990
  };
3019
- }), [ handleGlobalMousePosition, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]),
2991
+ }), [ handleGlobalMousePosition, startLerpLoop, stopLerpLoop, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]),
3020
2992
  // Also call updateStyles on other state changes (hover, active, etc)
3021
2993
  useEffect((() => {
3022
2994
  updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
@@ -3025,22 +2997,22 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3025
2997
  glassSize: glassSize,
3026
2998
  isHovered: isHovered,
3027
2999
  isActive: isActive,
3028
- isOverLight: baseOverLightConfig.isOverLight,
3029
- baseOverLightConfig: baseOverLightConfig,
3000
+ isOverLight: overLightConfig.isOverLight,
3001
+ baseOverLightConfig: overLightConfig,
3030
3002
  effectiveBorderRadius: effectiveBorderRadius,
3031
3003
  effectiveWithoutEffects: effectiveWithoutEffects,
3032
3004
  effectiveReducedMotion: effectiveReducedMotion,
3033
3005
  elasticity: elasticity,
3034
- directionalScale: directionalScale,
3006
+ directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
3035
3007
  onClick: onClick,
3036
3008
  withLiquidBlur: withLiquidBlur,
3037
3009
  blurAmount: blurAmount,
3038
3010
  saturation: saturation,
3039
3011
  padding: padding
3040
3012
  });
3041
- }), [ isHovered, isActive, glassSize, baseOverLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, directionalScale, wrapperRef, glassRef, externalMouseOffset, externalGlobalMousePosition, withLiquidBlur, blurAmount, saturation, padding, onClick ]);
3013
+ }), [ isHovered, isActive, glassSize, overLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, wrapperRef, glassRef, externalMouseOffset, externalGlobalMousePosition, withLiquidBlur, blurAmount, saturation, padding, onClick ]);
3042
3014
  // Event handlers
3043
- const handleMouseEnter = useCallback((() => setIsHovered(!0)), []), handleMouseLeave = useCallback((() => setIsHovered(!1)), []), handleMouseDown = useCallback((() => setIsActive(!0)), []), handleMouseUp = useCallback((() => setIsActive(!1)), []), handleMouseMove = useCallback((_e => {}), []), handleKeyDown = useCallback((e => {
3015
+ const handleMouseEnter = useCallback((() => setIsHovered(!0)), []), handleMouseLeave = useCallback((() => setIsHovered(!1)), []), handleMouseDown = useCallback((() => setIsActive(!0)), []), handleMouseUp = useCallback((() => setIsActive(!1)), []), handleKeyDown = useCallback((e => {
3044
3016
  !onClick || "Enter" !== e.key && " " !== e.key || (e.preventDefault(), onClick());
3045
3017
  }), [ onClick ]);
3046
3018
  return {
@@ -3058,14 +3030,11 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3058
3030
  mouseOffset: mouseOffset,
3059
3031
  // This is now static (refs or props) unless prop changes
3060
3032
  overLightConfig: overLightConfig,
3061
- elasticTranslation: elasticTranslation,
3062
- directionalScale: directionalScale,
3063
3033
  transformStyle: transformStyle,
3064
3034
  handleMouseEnter: handleMouseEnter,
3065
3035
  handleMouseLeave: handleMouseLeave,
3066
3036
  handleMouseDown: handleMouseDown,
3067
3037
  handleMouseUp: handleMouseUp,
3068
- handleMouseMove: handleMouseMove,
3069
3038
  handleKeyDown: handleKeyDown
3070
3039
  };
3071
3040
  }
@@ -3163,25 +3132,56 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3163
3132
  withLiquidBlur: withLiquidBlur,
3164
3133
  padding: padding,
3165
3134
  style: style
3166
- }), isOverLight = useMemo((() => overLightConfig?.isOverLight), [ overLight ]), shouldRenderOverLightLayers = withOverLightLayers && isOverLight, baseStyle = {
3167
- ...style,
3168
- ...!effectiveWithoutEffects && {
3169
- transform: transformStyle
3135
+ }), isOverLight = useMemo((() => overLightConfig.isOverLight), [ overLightConfig.isOverLight ]), shouldRenderOverLightLayers = withOverLightLayers && isOverLight, {zIndex: customZIndex, ...restStyle} = style, isFixedOrSticky = "fixed" === restStyle.position || "sticky" === restStyle.position, rootLayoutStyle = useMemo((() => {
3136
+ if (!isFixedOrSticky) return {};
3137
+ const {position: p, top: t, left: l, right: r, bottom: b} = restStyle;
3138
+ return {
3139
+ ...p && {
3140
+ position: p
3141
+ },
3142
+ ...void 0 !== t && {
3143
+ top: t
3144
+ },
3145
+ ...void 0 !== l && {
3146
+ left: l
3147
+ },
3148
+ ...void 0 !== r && {
3149
+ right: r
3150
+ },
3151
+ ...void 0 !== b && {
3152
+ bottom: b
3153
+ }
3154
+ };
3155
+ }), [ isFixedOrSticky, restStyle ]), baseStyle = useMemo((() => {
3156
+ if (isFixedOrSticky) {
3157
+ const {position: _p, top: _t, left: _l, right: _r, bottom: _b, ...visualStyle} = restStyle;
3158
+ return {
3159
+ ...visualStyle,
3160
+ ...!effectiveWithoutEffects && {
3161
+ transform: transformStyle
3162
+ }
3163
+ };
3170
3164
  }
3171
- }, componentClassName = [ ATOMIX_GLASS.BASE_CLASS, effectiveReducedMotion && `${ATOMIX_GLASS.BASE_CLASS}--reduced-motion`, effectiveHighContrast && `${ATOMIX_GLASS.BASE_CLASS}--high-contrast`, effectiveWithoutEffects && `${ATOMIX_GLASS.BASE_CLASS}--disabled-effects`, className ].filter(Boolean).join(" "), positionStyles = useMemo((() => ({
3172
- position: style.position || "absolute",
3173
- top: style.top || 0,
3174
- left: style.left || 0
3175
- })), [ style.position, style.top, style.left ]), adjustedSize = useMemo((() => {
3165
+ return {
3166
+ ...restStyle,
3167
+ ...!effectiveWithoutEffects && {
3168
+ transform: transformStyle
3169
+ }
3170
+ };
3171
+ }), [ isFixedOrSticky, restStyle, effectiveWithoutEffects, transformStyle ]), componentClassName = [ ATOMIX_GLASS.BASE_CLASS, effectiveReducedMotion && `${ATOMIX_GLASS.BASE_CLASS}--reduced-motion`, effectiveHighContrast && `${ATOMIX_GLASS.BASE_CLASS}--high-contrast`, effectiveWithoutEffects && `${ATOMIX_GLASS.BASE_CLASS}--disabled-effects`, className ].filter(Boolean).join(" "), positionStyles = useMemo((() => ({
3172
+ position: isFixedOrSticky ? "absolute" : restStyle.position || "absolute",
3173
+ top: isFixedOrSticky ? 0 : restStyle.top || 0,
3174
+ left: isFixedOrSticky ? 0 : restStyle.left || 0
3175
+ })), [ isFixedOrSticky, restStyle.position, restStyle.top, restStyle.left ]), adjustedSize = useMemo((() => {
3176
3176
  const resolveSize = (propValue, styleValue, measuredSize) => {
3177
3177
  const explicitSize = propValue ?? styleValue;
3178
3178
  return void 0 !== explicitSize ? "number" == typeof explicitSize ? `${explicitSize}px` : explicitSize : "fixed" === positionStyles.position ? `${Math.max(measuredSize, 0)}px` : "100%";
3179
3179
  };
3180
3180
  return {
3181
- width: resolveSize(width, style.width, glassSize.width),
3182
- height: resolveSize(height, style.height, glassSize.height)
3181
+ width: resolveSize(width, restStyle.width, glassSize.width),
3182
+ height: resolveSize(height, restStyle.height, glassSize.height)
3183
3183
  };
3184
- }), [ width, height, style.width, style.height, positionStyles.position, glassSize.width, glassSize.height ]), gradientValues = useMemo((() => {
3184
+ }), [ width, height, restStyle.width, restStyle.height, positionStyles.position, glassSize.width, glassSize.height ]), gradientValues = useMemo((() => {
3185
3185
  const mx = mouseOffset.x, my = mouseOffset.y, absMx = Math.abs(mx), absMy = Math.abs(my), GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT;
3186
3186
  return {
3187
3187
  borderGradientAngle: GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER,
@@ -3223,6 +3223,9 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3223
3223
  }), [ isHovered, isActive, isOverLight, overLightConfig.opacity ]), glassVars = useMemo((() => {
3224
3224
  const whiteColor = ATOMIX_GLASS.CONSTANTS.PALETTE.WHITE, blackColor = ATOMIX_GLASS.CONSTANTS.PALETTE.BLACK, {borderGradientAngle: borderGradientAngle, borderStop1: borderStop1, borderStop2: borderStop2, borderOpacities: borderOpacities, hoverPositions: hoverPositions, basePosition: basePosition, mx: mx, my: my, absMx: absMx, absMy: absMy} = gradientValues, configBorderOpacity = overLightConfig?.borderOpacity ?? 1;
3225
3225
  return {
3226
+ ...void 0 !== customZIndex && {
3227
+ "--atomix-glass-base-z-index": customZIndex
3228
+ },
3226
3229
  "--atomix-glass-radius": `${effectiveBorderRadius}px`,
3227
3230
  "--atomix-glass-transform": transformStyle || "none",
3228
3231
  "--atomix-glass-position": positionStyles.position,
@@ -3243,22 +3246,19 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3243
3246
  "--atomix-glass-base-opacity": opacityValues.base,
3244
3247
  "--atomix-glass-base-gradient": isOverLight ? `linear-gradient(${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.ANGLE}deg, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_BASE + mx * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_BASE + my * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_MULTIPLIER}) ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_BASE + absMx * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.WHITE_OPACITY})`,
3245
3248
  "--atomix-glass-overlay-opacity": opacityValues.over,
3246
- "--atomix-glass-overlay-gradient": isOverLight ? `radial-gradient(circle at ${basePosition.x}% ${basePosition.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_BASE + absMx * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_BASE + absMy * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.WHITE_OPACITY})`
3249
+ "--atomix-glass-overlay-gradient": isOverLight ? `radial-gradient(circle at ${basePosition.x}% ${basePosition.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_BASE + absMx * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_BASE + absMy * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.WHITE_OPACITY})`,
3250
+ "--atomix-glass-overlay-highlight-opacity": opacityValues.over * ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.OPACITY_MULTIPLIER,
3251
+ "--atomix-glass-overlay-highlight-bg": `radial-gradient(circle at ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_X}% ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_Y}%, rgba(255, 255, 255, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.WHITE_OPACITY}) 0%, transparent ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.STOP}%)`
3247
3252
  };
3248
- }), [ gradientValues, opacityValues, effectiveBorderRadius, transformStyle, positionStyles, adjustedSize, isOverLight, overLightConfig.borderOpacity ]), renderBackgroundLayer = layerType => jsx("div", {
3249
- className: [ ATOMIX_GLASS.BACKGROUND_LAYER_CLASS, "dark" === layerType ? ATOMIX_GLASS.BACKGROUND_LAYER_DARK_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_BLACK_CLASS, isOverLight ? ATOMIX_GLASS.BACKGROUND_LAYER_OVER_LIGHT_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_HIDDEN_CLASS ].filter(Boolean).join(" "),
3250
- style: {
3251
- ...positionStyles,
3252
- height: adjustedSize.height,
3253
- width: adjustedSize.width,
3254
- borderRadius: `${effectiveBorderRadius}px`,
3255
- transform: baseStyle.transform
3256
- }
3253
+ }), [ gradientValues, opacityValues, effectiveBorderRadius, transformStyle, positionStyles, adjustedSize, isOverLight, overLightConfig.borderOpacity, customZIndex ]), renderBackgroundLayer = layerType => jsx("div", {
3254
+ className: [ ATOMIX_GLASS.BACKGROUND_LAYER_CLASS, "dark" === layerType ? ATOMIX_GLASS.BACKGROUND_LAYER_DARK_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_BLACK_CLASS, isOverLight ? ATOMIX_GLASS.BACKGROUND_LAYER_OVER_LIGHT_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_HIDDEN_CLASS ].filter(Boolean).join(" ")
3257
3255
  });
3258
3256
  return jsxs("div", {
3259
3257
  ...rest,
3260
3258
  className: componentClassName,
3261
- style: glassVars,
3259
+ style: {
3260
+ ...glassVars
3261
+ },
3262
3262
  role: role || (onClick ? "button" : void 0),
3263
3263
  tabIndex: onClick ? tabIndex ?? 0 : tabIndex,
3264
3264
  "aria-label": ariaLabel,
@@ -3270,7 +3270,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3270
3270
  ref: glassRef,
3271
3271
  contentRef: contentRef,
3272
3272
  className: className,
3273
- style: baseStyle,
3273
+ style: rootLayoutStyle,
3274
3274
  borderRadius: effectiveBorderRadius,
3275
3275
  displacementScale: effectiveWithoutEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT : isOverLight ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.OVER_LIGHT_DISPLACEMENT : displacementScale,
3276
3276
  blurAmount: effectiveWithoutEffects ? 0 : blurAmount,
@@ -3305,7 +3305,6 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3305
3305
  effectiveWithoutEffects: effectiveWithoutEffects,
3306
3306
  effectiveReducedMotion: effectiveReducedMotion,
3307
3307
  shaderVariant: shaderVariant,
3308
- elasticity: elasticity,
3309
3308
  withLiquidBlur: withLiquidBlur,
3310
3309
  children: children
3311
3310
  }), Boolean(onClick) && jsxs(Fragment, {
@@ -3322,11 +3321,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3322
3321
  }), jsx("div", {
3323
3322
  className: ATOMIX_GLASS.OVERLAY_LAYER_CLASS
3324
3323
  }), jsx("div", {
3325
- className: ATOMIX_GLASS.OVERLAY_HIGHLIGHT_CLASS,
3326
- style: {
3327
- opacity: opacityValues.over * ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.OPACITY_MULTIPLIER,
3328
- background: `radial-gradient(circle at ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_X}% ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_Y}%, rgba(255, 255, 255, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.WHITE_OPACITY}) 0%, transparent ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.STOP}%)`
3329
- }
3324
+ className: ATOMIX_GLASS.OVERLAY_HIGHLIGHT_CLASS
3330
3325
  }) ]
3331
3326
  }), withBorder && jsxs(Fragment, {
3332
3327
  children: [ jsx("span", {
@@ -4091,7 +4086,7 @@ const BreadcrumbItem = forwardRef((({children: children, href: href, active: ac
4091
4086
 
4092
4087
  BreadcrumbItem.displayName = "BreadcrumbItem";
4093
4088
 
4094
- const Breadcrumb = memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style, children: children}) {
4089
+ const Breadcrumb = memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", linkComponent: linkComponent, style: style, children: children}) {
4095
4090
  const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
4096
4091
  let content;
4097
4092
  if (items && items.length > 0)
@@ -4105,7 +4100,7 @@ const Breadcrumb = memo((function({items: items, divider: divider, className: c
4105
4100
  onClick: item.onClick,
4106
4101
  className: item.className,
4107
4102
  style: item.style,
4108
- linkAs: LinkComponent,
4103
+ linkAs: linkComponent,
4109
4104
  children: item.label
4110
4105
  }, index);
4111
4106
  })); else {
@@ -4117,7 +4112,7 @@ const Breadcrumb = memo((function({items: items, divider: divider, className: c
4117
4112
 
4118
4113
  return cloneElement(child, {
4119
4114
  active: active ?? (!!isLast || void 0),
4120
- linkAs: linkAs ?? LinkComponent
4115
+ linkAs: linkAs ?? linkComponent
4121
4116
  });
4122
4117
  }
4123
4118
  return child;
@@ -4291,7 +4286,7 @@ class ThemeNaming {
4291
4286
 
4292
4287
  ThemeNaming.prefix = "atomix";
4293
4288
 
4294
- const Button = React.memo( forwardRef((({label: label, children: children, onClick: onClick, variant: variant = "primary", size: size = "md", disabled: disabled = !1, loading: loading = !1, loadingText: loadingText, icon: icon, iconName: iconName, iconSize: iconSize = "sm", iconPosition: iconPosition = "start", iconOnly: iconOnly = !1, rounded: rounded = !1, fullWidth: fullWidth = !1, block: block = !1, active: active = !1, selected: selected = !1, type: type = "button", className: className = "", as: Component = "button", href: href, target: target, glass: glass, onHover: onHover, onFocus: onFocus, onBlur: onBlur, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, tabIndex: tabIndex, style: style, LinkComponent: LinkComponent, ...props}, ref) => {
4289
+ const Button = React.memo( forwardRef((({label: label, children: children, onClick: onClick, variant: variant = "primary", size: size = "md", disabled: disabled = !1, loading: loading = !1, loadingText: loadingText, icon: icon, iconName: iconName, iconSize: iconSize = "sm", iconPosition: iconPosition = "start", iconOnly: iconOnly = !1, rounded: rounded = !1, fullWidth: fullWidth = !1, block: block = !1, active: active = !1, selected: selected = !1, type: type = "button", className: className = "", as: Component = "button", href: href, target: target, glass: glass, onHover: onHover, onFocus: onFocus, onBlur: onBlur, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, tabIndex: tabIndex, style: style, linkComponent: linkComponent, ...props}, ref) => {
4295
4290
  const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = iconName ? jsx(Icon, {
4296
4291
  name: iconName,
4297
4292
  size: iconSize
@@ -4342,12 +4337,12 @@ const Button = React.memo( forwardRef((({label: label, children: children, onCl
4342
4337
  let content;
4343
4338
  // Render as anchor if href is provided
4344
4339
  if (shouldRenderAsLink)
4345
- // Use custom LinkComponent if provided (e.g., Next.js Link)
4346
- if (LinkComponent) {
4347
- const LinkComp = LinkComponent, linkProps = {
4340
+ // Use custom linkComponent if provided (e.g., Next.js Link)
4341
+ if (linkComponent) {
4342
+ const LinkComp = linkComponent, linkProps = {
4348
4343
  ...buttonProps,
4349
4344
  ref: ref,
4350
- // LinkComponent usually forwards ref to anchor
4345
+ // linkComponent usually forwards ref to anchor
4351
4346
  href: href,
4352
4347
  to: href,
4353
4348
  target: target,
@@ -4645,7 +4640,7 @@ header: header, image: image, imageAlt: imageAlt = "", title: title, text: text,
4645
4640
  // Interaction
4646
4641
  onClick: onClick, onHover: onHover, onFocus: onFocus, href: href, target: target,
4647
4642
  // Custom Link
4648
- LinkComponent: LinkComponent,
4643
+ linkComponent: linkComponent,
4649
4644
  // Glass
4650
4645
  glass: glass,
4651
4646
  // Accessibility
@@ -4730,7 +4725,7 @@ className: className = "", style: style, ...rest}, ref) => {
4730
4725
  // Render as anchor if href is provided
4731
4726
  if (href && !isDisabled) {
4732
4727
  let anchorElement;
4733
- return anchorElement = LinkComponent ? jsx(LinkComponent, {
4728
+ return anchorElement = linkComponent ? jsx(linkComponent, {
4734
4729
  ...commonProps,
4735
4730
  ref: ref,
4736
4731
  href: href,
@@ -9821,7 +9816,7 @@ DropdownTrigger.displayName = "DropdownTrigger";
9821
9816
  /**
9822
9817
  * DropdownItem component for menu items
9823
9818
  */
9824
- const DropdownItem = memo((({children: children, href: href, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", LinkComponent: LinkComponent, ...props}) => {
9819
+ const DropdownItem = memo((({children: children, href: href, target: target, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", linkComponent: linkComponent, ...props}) => {
9825
9820
  const {close: close} = useContext(DropdownContext), handleClick = e => {
9826
9821
  disabled ? e.preventDefault() : (onClick && onClick(e),
9827
9822
  // Always close the dropdown when an item is clicked
@@ -9829,6 +9824,7 @@ const DropdownItem = memo((({children: children, href: href, active: active = !
9829
9824
  }, itemClasses = [ "c-dropdown__menu-item", active ? "is-active" : "", disabled ? "is-disabled" : "", className ].filter(Boolean).join(" "), linkProps = {
9830
9825
  href: href,
9831
9826
  to: href,
9827
+ target: target,
9832
9828
  className: itemClasses,
9833
9829
  onClick: handleClick,
9834
9830
  role: "menuitem",
@@ -9836,7 +9832,7 @@ const DropdownItem = memo((({children: children, href: href, active: active = !
9836
9832
  ...props
9837
9833
  };
9838
9834
  return jsx("li", href && !disabled ? {
9839
- children: jsxs(LinkComponent || "a", {
9835
+ children: jsxs(linkComponent || "a", {
9840
9836
  ...linkProps,
9841
9837
  children: [ icon && jsx("span", {
9842
9838
  className: "c-dropdown__menu-item-icon",
@@ -12321,96 +12317,6 @@ function useTodo(initialProps) {
12321
12317
  };
12322
12318
  }
12323
12319
 
12324
- /**
12325
- * Custom hook for managing GlassContainer state and interactions
12326
- */ function useGlassContainer(props) {
12327
- const {glassSize: glassSize = {
12328
- width: 270,
12329
- height: 69
12330
- }, elasticity: elasticity = .15, mouseContainer: mouseContainer, globalMousePos: externalGlobalMousePos, mouseOffset: externalMouseOffset} = props, filterId = useId(), glassRef = useRef(null), [isHovered, setIsHovered] = useState(!1), [isActive, setIsActive] = useState(!1), [currentGlassSize, setCurrentGlassSize] = useState(glassSize), [internalGlobalMousePos, setInternalGlobalMousePos] = useState({
12331
- x: 0,
12332
- y: 0
12333
- }), [internalMouseOffset, setInternalMouseOffset] = useState({
12334
- x: 0,
12335
- y: 0
12336
- }), globalMousePos = externalGlobalMousePos || internalGlobalMousePos, mouseOffset = externalMouseOffset || internalMouseOffset, handleMouseMove = useCallback((e => {
12337
- const container = mouseContainer?.current || glassRef.current;
12338
- if (!container) return;
12339
- const rect = container.getBoundingClientRect(), centerX = rect.left + rect.width / 2, centerY = rect.top + rect.height / 2;
12340
- setInternalMouseOffset({
12341
- x: (e.clientX - centerX) / rect.width * 100,
12342
- y: (e.clientY - centerY) / rect.height * 100
12343
- }), setInternalGlobalMousePos({
12344
- x: e.clientX,
12345
- y: e.clientY
12346
- });
12347
- }), [ mouseContainer ]);
12348
- // Set up mouse tracking if no external mouse position is provided
12349
- useEffect((() => {
12350
- if (externalGlobalMousePos && externalMouseOffset) return;
12351
- const container = mouseContainer?.current || glassRef.current;
12352
- return container ? (container.addEventListener("mousemove", handleMouseMove), () => container.removeEventListener("mousemove", handleMouseMove)) : void 0;
12353
- }), [ handleMouseMove, mouseContainer, externalGlobalMousePos, externalMouseOffset ]);
12354
- // Calculate directional scaling based on mouse position
12355
- const calculateDirectionalScale = useCallback((() => {
12356
- if (!globalMousePos.x || !globalMousePos.y || !glassRef.current) return "scale(1)";
12357
- const rect = glassRef.current.getBoundingClientRect(), pillCenterX = rect.left + rect.width / 2, pillCenterY = rect.top + rect.height / 2, pillWidth = currentGlassSize.width, pillHeight = currentGlassSize.height, deltaX = globalMousePos.x - pillCenterX, deltaY = globalMousePos.y - pillCenterY, edgeDistanceX = Math.max(0, Math.abs(deltaX) - pillWidth / 2), edgeDistanceY = Math.max(0, Math.abs(deltaY) - pillHeight / 2), edgeDistance = Math.sqrt(edgeDistanceX * edgeDistanceX + edgeDistanceY * edgeDistanceY);
12358
- if (edgeDistance > 200) return "scale(1)";
12359
- const fadeInFactor = 1 - edgeDistance / 200, centerDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
12360
- if (0 === centerDistance) return "scale(1)";
12361
- const normalizedX = deltaX / centerDistance, normalizedY = deltaY / centerDistance, stretchIntensity = Math.min(centerDistance / 300, 1) * elasticity * fadeInFactor, scaleX = 1 + Math.abs(normalizedX) * stretchIntensity * .3 - Math.abs(normalizedY) * stretchIntensity * .15, scaleY = 1 + Math.abs(normalizedY) * stretchIntensity * .3 - Math.abs(normalizedX) * stretchIntensity * .15;
12362
- return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
12363
- }), [ globalMousePos, elasticity, currentGlassSize ]), calculateElasticTranslation = useCallback((() => {
12364
- if (!glassRef.current) return {
12365
- x: 0,
12366
- y: 0
12367
- };
12368
- const rect = glassRef.current.getBoundingClientRect(), pillCenterX = rect.left + rect.width / 2, pillCenterY = rect.top + rect.height / 2, pillWidth = currentGlassSize.width, pillHeight = currentGlassSize.height, edgeDistanceX = Math.max(0, Math.abs(globalMousePos.x - pillCenterX) - pillWidth / 2), edgeDistanceY = Math.max(0, Math.abs(globalMousePos.y - pillCenterY) - pillHeight / 2), edgeDistance = Math.sqrt(edgeDistanceX * edgeDistanceX + edgeDistanceY * edgeDistanceY), fadeInFactor = edgeDistance > 200 ? 0 : 1 - edgeDistance / 200;
12369
- return {
12370
- x: (globalMousePos.x - pillCenterX) * elasticity * .1 * fadeInFactor,
12371
- y: (globalMousePos.y - pillCenterY) * elasticity * .1 * fadeInFactor
12372
- };
12373
- }), [ globalMousePos, elasticity, currentGlassSize ]);
12374
- // Calculate elastic translation
12375
- // Update glass size
12376
- useEffect((() => {
12377
- const updateGlassSize = () => {
12378
- if (glassRef.current) {
12379
- const rect = glassRef.current.getBoundingClientRect();
12380
- setCurrentGlassSize({
12381
- width: rect.width,
12382
- height: rect.height
12383
- });
12384
- }
12385
- };
12386
- return updateGlassSize(), window.addEventListener("resize", updateGlassSize), () => window.removeEventListener("resize", updateGlassSize);
12387
- }), []);
12388
- const handleMouseEnter = useCallback((() => {
12389
- setIsHovered(!0);
12390
- }), []), handleMouseLeave = useCallback((() => {
12391
- setIsHovered(!1);
12392
- }), []), handleMouseDown = useCallback((() => {
12393
- setIsActive(!0);
12394
- }), []), handleMouseUp = useCallback((() => {
12395
- setIsActive(!1);
12396
- }), []);
12397
- return {
12398
- filterId: filterId,
12399
- glassRef: glassRef,
12400
- isHovered: isHovered,
12401
- isActive: isActive,
12402
- currentGlassSize: currentGlassSize,
12403
- globalMousePos: globalMousePos,
12404
- mouseOffset: mouseOffset,
12405
- calculateDirectionalScale: calculateDirectionalScale,
12406
- calculateElasticTranslation: calculateElasticTranslation,
12407
- handleMouseEnter: handleMouseEnter,
12408
- handleMouseLeave: handleMouseLeave,
12409
- handleMouseDown: handleMouseDown,
12410
- handleMouseUp: handleMouseUp
12411
- };
12412
- }
12413
-
12414
12320
  /**
12415
12321
  * Radio state and functionality
12416
12322
  * @param initialProps - Initial radio properties
@@ -12559,7 +12465,7 @@ function useTodo(initialProps) {
12559
12465
  }
12560
12466
 
12561
12467
  function useSlider(options) {
12562
- const {slides: slides, slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, autoplay: autoplay, onSlideChange: onSlideChange} = options, containerRef = useRef(null), wrapperRef = useRef(null), repositioningRef = useRef(!1), autoplayRef = useRef(null), [autoplayRunning, setAutoplayRunning] = useState(!1), sliderStateRef = useRef({
12468
+ const {slides: rawSlides, slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, autoplay: autoplay, onSlideChange: onSlideChange} = options, slides = Array.isArray(rawSlides) ? rawSlides : [], containerRef = useRef(null), wrapperRef = useRef(null), repositioningRef = useRef(!1), autoplayRef = useRef(null), [autoplayRunning, setAutoplayRunning] = useState(!1), sliderStateRef = useRef({
12563
12469
  isTransitioning: !1,
12564
12470
  loop: loop,
12565
12471
  slides: slides,
@@ -12903,7 +12809,6 @@ const composablesImport = Object.freeze( Object.defineProperty({
12903
12809
  useEdgePanel: useEdgePanel,
12904
12810
  useForm: useForm,
12905
12811
  useFormGroup: useFormGroup,
12906
- useGlassContainer: useGlassContainer,
12907
12812
  useHero: useHero,
12908
12813
  useInput: useInput,
12909
12814
  useLineChart: useLineChart,
@@ -13259,7 +13164,60 @@ const Textarea = memo( forwardRef((({value: value, defaultValue: defaultValue,
13259
13164
 
13260
13165
  Textarea.displayName = "Textarea";
13261
13166
 
13262
- /**
13167
+ // ─── Platform Maps ───────────────────────────────────────────────
13168
+ const PLATFORM_ICON_MAP = {
13169
+ facebook: "FacebookLogo",
13170
+ twitter: "TwitterLogo",
13171
+ instagram: "InstagramLogo",
13172
+ linkedin: "LinkedinLogo",
13173
+ youtube: "YoutubeLogo",
13174
+ github: "GithubLogo",
13175
+ discord: "DiscordLogo",
13176
+ tiktok: "TiktokLogo",
13177
+ pinterest: "PinterestLogo",
13178
+ snapchat: "SnapchatLogo",
13179
+ whatsapp: "WhatsappLogo",
13180
+ telegram: "TelegramLogo",
13181
+ reddit: "RedditLogo",
13182
+ twitch: "TwitchLogo",
13183
+ spotify: "SpotifyLogo",
13184
+ dribbble: "DribbbleLogo",
13185
+ behance: "BehanceLogo",
13186
+ medium: "MediumLogo",
13187
+ dev: "DevToLogo",
13188
+ codepen: "CodepenLogo"
13189
+ }, PLATFORM_LABEL_MAP = {
13190
+ facebook: "Facebook",
13191
+ twitter: "Twitter",
13192
+ instagram: "Instagram",
13193
+ linkedin: "LinkedIn",
13194
+ youtube: "YouTube",
13195
+ github: "GitHub",
13196
+ discord: "Discord",
13197
+ tiktok: "TikTok",
13198
+ pinterest: "Pinterest",
13199
+ snapchat: "Snapchat",
13200
+ whatsapp: "WhatsApp",
13201
+ telegram: "Telegram",
13202
+ reddit: "Reddit",
13203
+ twitch: "Twitch",
13204
+ spotify: "Spotify",
13205
+ dribbble: "Dribbble",
13206
+ behance: "Behance",
13207
+ medium: "Medium",
13208
+ dev: "Dev.to",
13209
+ codepen: "CodePen"
13210
+ }, getPlatformIcon = platform => {
13211
+ const iconName = PLATFORM_ICON_MAP[platform];
13212
+ return jsx(Icon, iconName ? {
13213
+ name: iconName
13214
+ } : {
13215
+ name: "Link"
13216
+ });
13217
+ }, FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13218
+ const linkClass = [ "c-footer__social-link", `c-footer__social-link--${platform}`, `c-footer__social-link--${size}`, `c-footer__social-link--${variant}`, disabled && "c-footer__social-link--disabled", className ].filter(Boolean).join(" "), ariaLabel = label || `Follow us on ${(platform => PLATFORM_LABEL_MAP[platform] || platform)
13219
+ // ─── Component ───────────────────────────────────────────────────
13220
+ /**
13263
13221
  * FooterSocialLink component provides styled social media links with platform-specific icons.
13264
13222
  *
13265
13223
  * @example
@@ -13267,30 +13225,7 @@ Textarea.displayName = "Textarea";
13267
13225
  * <FooterSocialLink platform="twitter" url="https://twitter.com/company" />
13268
13226
  * <FooterSocialLink platform="custom" url="https://example.com" icon={<CustomIcon />} label="Custom Platform" />
13269
13227
  * ```
13270
- */
13271
- const FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13272
- const linkClass = [ "c-footer__social-link", `c-footer__social-link--${platform}`, `c-footer__social-link--${size}`, `c-footer__social-link--${variant}`, disabled && "c-footer__social-link--disabled", className ].filter(Boolean).join(" "), ariaLabel = label || `Follow us on ${(platform => ({
13273
- facebook: "Facebook",
13274
- twitter: "Twitter",
13275
- instagram: "Instagram",
13276
- linkedin: "LinkedIn",
13277
- youtube: "YouTube",
13278
- github: "GitHub",
13279
- discord: "Discord",
13280
- tiktok: "TikTok",
13281
- pinterest: "Pinterest",
13282
- snapchat: "Snapchat",
13283
- whatsapp: "WhatsApp",
13284
- telegram: "Telegram",
13285
- reddit: "Reddit",
13286
- twitch: "Twitch",
13287
- spotify: "Spotify",
13288
- dribbble: "Dribbble",
13289
- behance: "Behance",
13290
- medium: "Medium",
13291
- dev: "Dev.to",
13292
- codepen: "CodePen"
13293
- }[platform] || platform))(platform)}`;
13228
+ */ (platform)}`;
13294
13229
  return jsxs("a", {
13295
13230
  ref: ref,
13296
13231
  href: disabled ? void 0 : url,
@@ -13302,35 +13237,7 @@ const FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon
13302
13237
  ...props,
13303
13238
  children: [ jsx("span", {
13304
13239
  className: "c-footer__social-link-icon",
13305
- children: icon || (platform => {
13306
- const iconName = {
13307
- facebook: "FacebookLogo",
13308
- twitter: "TwitterLogo",
13309
- instagram: "InstagramLogo",
13310
- linkedin: "LinkedinLogo",
13311
- youtube: "YoutubeLogo",
13312
- github: "GithubLogo",
13313
- discord: "DiscordLogo",
13314
- tiktok: "TiktokLogo",
13315
- pinterest: "PinterestLogo",
13316
- snapchat: "SnapchatLogo",
13317
- whatsapp: "WhatsappLogo",
13318
- telegram: "TelegramLogo",
13319
- reddit: "RedditLogo",
13320
- twitch: "TwitchLogo",
13321
- spotify: "SpotifyLogo",
13322
- dribbble: "DribbbleLogo",
13323
- behance: "BehanceLogo",
13324
- medium: "MediumLogo",
13325
- dev: "DevToLogo",
13326
- codepen: "CodepenLogo"
13327
- }[platform];
13328
- return jsx(Icon, iconName ? {
13329
- name: iconName
13330
- } : {
13331
- name: "Link"
13332
- });
13333
- })(platform)
13240
+ children: icon || getPlatformIcon(platform)
13334
13241
  }), jsx("span", {
13335
13242
  className: "c-footer__social-link-label u-visually-hidden",
13336
13243
  children: ariaLabel
@@ -13453,17 +13360,83 @@ Row.displayName = "Row";
13453
13360
  * ```
13454
13361
  */
13455
13362
  const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescription: brandDescription, copyright: copyright, layout: layout = "columns", variant: variant = "primary", size: size = "md", showNewsletter: showNewsletter = !1, newsletterTitle: newsletterTitle = "Stay Updated", newsletterDescription: newsletterDescription = "Subscribe to our newsletter for the latest updates.", newsletterPlaceholder: newsletterPlaceholder = "Enter your email", newsletterButtonText: newsletterButtonText = "Subscribe", onNewsletterSubmit: onNewsletterSubmit, socialLinks: socialLinks = [], showBackToTop: showBackToTop = !1, backToTopText: backToTopText = "Back to Top", onBackToTop: onBackToTop, showDivider: showDivider = !0, sticky: sticky = !1, children: children, className: className = "", disabled: disabled = !1, glass: glass, ...props}, ref) => {
13456
- const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop, socialLinks: footerSocialLinks} = function(options = {}) {
13457
- const {layout: layout = FOOTER.DEFAULTS.LAYOUT, variant: variant = FOOTER.DEFAULTS.VARIANT, size: size = FOOTER.DEFAULTS.SIZE, sticky: sticky = FOOTER.DEFAULTS.STICKY, showNewsletter: showNewsletter = FOOTER.DEFAULTS.SHOW_NEWSLETTER, showBackToTop: showBackToTop = FOOTER.DEFAULTS.SHOW_BACK_TO_TOP, socialLinks: socialLinks = [], onNewsletterSubmit: onNewsletterSubmit, onBackToTop: onBackToTop, className: className = ""} = options;
13458
- // Generate footer classes
13363
+ const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, getResponsiveColumnProps: getResponsiveColumnProps, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop} = function(options = {}) {
13364
+ const {layout: layout = FOOTER.DEFAULTS.LAYOUT, variant: variant = FOOTER.DEFAULTS.VARIANT, size: size = FOOTER.DEFAULTS.SIZE, sticky: sticky = FOOTER.DEFAULTS.STICKY, showNewsletter: showNewsletter = FOOTER.DEFAULTS.SHOW_NEWSLETTER, showBackToTop: showBackToTop = FOOTER.DEFAULTS.SHOW_BACK_TO_TOP, showDivider: showDivider = FOOTER.DEFAULTS.SHOW_DIVIDER, socialLinks: socialLinks = [], onNewsletterSubmit: onNewsletterSubmit, onBackToTop: onBackToTop, glass: glass = !1, className: className = ""} = options, footerClass = useMemo((() => {
13365
+ const layoutKey = layout.toUpperCase(), sizeKey = size.toUpperCase();
13366
+ return [ FOOTER.CLASSES.BASE, FOOTER.CLASSES[layoutKey] || FOOTER.CLASSES.COLUMNS, `c-footer--${variant}`, FOOTER.CLASSES[sizeKey] || FOOTER.CLASSES.MD, sticky && FOOTER.CLASSES.STICKY, showNewsletter && "c-footer--with-newsletter", glass && "c-footer--glass", className ].filter(Boolean).join(" ");
13367
+ }), [ layout, variant, size, sticky, showNewsletter, glass, className ]), containerClass = FOOTER.CLASSES.CONTAINER, brandClass = FOOTER.CLASSES.BRAND, sectionsClass = useMemo((() => [ FOOTER.CLASSES.SECTIONS, "columns" === layout && "c-footer__sections--columns", "centered" === layout && "c-footer__sections--centered", "stacked" === layout && "c-footer__sections--stacked" ].filter(Boolean).join(" ")), [ layout ]), bottomClass = FOOTER.CLASSES.BOTTOM, columnSizes = useMemo((() =>
13368
+ /**
13369
+ * Resolves grid column size map for a given layout.
13370
+ */
13371
+ function(layout, showNewsletter) {
13372
+ switch (layout) {
13373
+ case "columns":
13374
+ default:
13375
+ return {
13376
+ brand: 4,
13377
+ content: showNewsletter ? 4 : 8,
13378
+ newsletter: showNewsletter ? 4 : 0
13379
+ };
13380
+
13381
+ case "centered":
13382
+ case "minimal":
13383
+ case "stacked":
13384
+ return {
13385
+ brand: 12,
13386
+ content: 12,
13387
+ newsletter: showNewsletter ? 12 : 0
13388
+ };
13389
+
13390
+ case "flexible":
13391
+ return {
13392
+ brand: "auto",
13393
+ content: "auto",
13394
+ newsletter: "auto"
13395
+ };
13396
+
13397
+ case "sidebar":
13398
+ return {
13399
+ brand: 3,
13400
+ content: 9,
13401
+ newsletter: showNewsletter ? 9 : 0
13402
+ };
13403
+
13404
+ case "wide":
13405
+ return {
13406
+ brand: 3,
13407
+ content: 6,
13408
+ newsletter: showNewsletter ? 3 : 0
13409
+ };
13410
+ }
13411
+ }
13412
+ /**
13413
+ * Computes responsive GridCol props for a given column type.
13414
+ */ (layout, showNewsletter)), [ layout, showNewsletter ]);
13415
+ // ---------- CSS class strings ----------
13459
13416
  return {
13460
- footerClass: [ FOOTER.CLASSES.BASE, FOOTER.CLASSES[layout.toUpperCase()] || FOOTER.CLASSES.COLUMNS, `c-footer--${variant}`, FOOTER.CLASSES[size.toUpperCase()] || FOOTER.CLASSES.MD, sticky && FOOTER.CLASSES.STICKY, showNewsletter && "c-footer--with-newsletter", className ].filter(Boolean).join(" "),
13461
- containerClass: FOOTER.CLASSES.CONTAINER,
13462
- brandClass: FOOTER.CLASSES.BRAND,
13463
- sectionsClass: [ FOOTER.CLASSES.SECTIONS, "columns" === layout && "c-footer__sections--columns", "centered" === layout && "c-footer__sections--centered", "stacked" === layout && "c-footer__sections--stacked" ].filter(Boolean).join(" "),
13464
- bottomClass: FOOTER.CLASSES.BOTTOM,
13417
+ // Classes
13418
+ footerClass: footerClass,
13419
+ containerClass: containerClass,
13420
+ brandClass: brandClass,
13421
+ sectionsClass: sectionsClass,
13422
+ bottomClass: bottomClass,
13423
+ // Grid helpers
13424
+ columnSizes: columnSizes,
13425
+ getResponsiveColumnProps: columnType => function(columnType, layout, columnSizes) {
13426
+ return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13427
+ xs: 12,
13428
+ sm: !0,
13429
+ md: !0
13430
+ } : {
13431
+ xs: 12,
13432
+ md: "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12
13433
+ };
13434
+ }(columnType, layout, columnSizes)
13435
+ // ---------- Handlers ----------
13436
+ ,
13437
+ // Handlers
13465
13438
  handleNewsletterSubmit: email => {
13466
- onNewsletterSubmit && onNewsletterSubmit(email);
13439
+ onNewsletterSubmit?.(email);
13467
13440
  },
13468
13441
  handleBackToTop: () => {
13469
13442
  onBackToTop ? onBackToTop() : window.scrollTo({
@@ -13471,8 +13444,11 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13471
13444
  behavior: "smooth"
13472
13445
  });
13473
13446
  },
13447
+ // Pass-through state
13474
13448
  socialLinks: socialLinks,
13475
- showNewsletter: showNewsletter
13449
+ showNewsletter: showNewsletter,
13450
+ showBackToTop: showBackToTop,
13451
+ showDivider: showDivider
13476
13452
  };
13477
13453
  }({
13478
13454
  layout: layout,
@@ -13481,73 +13457,19 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13481
13457
  sticky: sticky,
13482
13458
  showNewsletter: showNewsletter,
13483
13459
  showBackToTop: showBackToTop,
13460
+ showDivider: showDivider,
13484
13461
  socialLinks: socialLinks,
13485
13462
  onNewsletterSubmit: onNewsletterSubmit,
13486
13463
  onBackToTop: onBackToTop,
13464
+ glass: Boolean(glass),
13487
13465
  className: className
13488
- }), columnSizes = (() => {
13489
- switch (layout) {
13490
- case "columns":
13491
- default:
13492
- return {
13493
- brand: 4,
13494
- content: showNewsletter ? 4 : 8,
13495
- newsletter: showNewsletter ? 4 : 0
13496
- };
13497
-
13498
- case "centered":
13499
- case "minimal":
13500
- case "stacked":
13501
- // For stacked layout, everything takes full width but stacked vertically
13502
- return {
13503
- brand: 12,
13504
- content: 12,
13505
- newsletter: showNewsletter ? 12 : 0
13506
- };
13507
-
13508
- case "flexible":
13509
- // For flexible layout, adjust based on content
13510
- return {
13511
- brand: "auto",
13512
- content: "auto",
13513
- newsletter: "auto"
13514
- };
13515
-
13516
- case "sidebar":
13517
- // For sidebar layout, brand on left, content and newsletter on right
13518
- return {
13519
- brand: 3,
13520
- content: 9,
13521
- newsletter: showNewsletter ? 9 : 0
13522
- };
13523
-
13524
- case "wide":
13525
- // For wide layout, content takes more space
13526
- return {
13527
- brand: 3,
13528
- content: 6,
13529
- newsletter: showNewsletter ? 3 : 0
13530
- };
13531
- }
13532
- })(), getResponsiveColumnProps = columnType => {
13533
- const baseMd = "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12;
13534
- // For flexible layout, we want auto-sizing
13535
- return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13536
- xs: 12,
13537
- sm: !0,
13538
- md: !0
13539
- } : {
13540
- xs: 12,
13541
- md: baseMd
13542
- };
13543
- // For other layouts, we use specific sizes
13544
- }, footerContent = jsxs("div", {
13466
+ }), footerContent = jsxs("div", {
13545
13467
  className: containerClass,
13546
13468
  children: [ jsxs(Grid, {
13547
13469
  className: sectionsClass,
13548
13470
  alignItems: "start",
13549
13471
  justifyContent: "centered" === layout ? "center" : void 0,
13550
- children: [ (brand || brandLogo || brandDescription) && jsxs(GridCol, {
13472
+ children: [ brand || brandLogo || brandDescription ? jsxs(GridCol, {
13551
13473
  ...getResponsiveColumnProps("brand"),
13552
13474
  className: brandClass,
13553
13475
  children: [ brandLogo && jsx("div", {
@@ -13575,19 +13497,17 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13575
13497
  size: size
13576
13498
  }, `${link.platform}-${index}`)))
13577
13499
  }) ]
13578
- }), children && jsx(GridCol, {
13500
+ }) : null, children ? jsx(GridCol, {
13579
13501
  ...getResponsiveColumnProps("content"),
13580
13502
  className: "c-footer__content",
13581
13503
  children: jsx(Grid, {
13582
13504
  className: "c-footer__sections",
13583
13505
  alignItems: "centered" === layout || "stacked" === layout ? "center" : void 0,
13584
- children: React.Children.map(children, (child =>
13585
- // Check if the child is a valid React element
13586
- React.isValidElement(child) ? React.cloneElement(child, {
13506
+ children: React.Children.map(children, (child => React.isValidElement(child) ? React.cloneElement(child, {
13587
13507
  showNewsletter: showNewsletter
13588
13508
  }) : child))
13589
13509
  })
13590
- }), showNewsletter && jsxs(GridCol, {
13510
+ }) : null, showNewsletter ? jsxs(GridCol, {
13591
13511
  ...getResponsiveColumnProps("newsletter"),
13592
13512
  className: "c-footer__newsletter",
13593
13513
  children: [ jsx("h4", {
@@ -13618,32 +13538,41 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13618
13538
  }) ]
13619
13539
  })
13620
13540
  }) ]
13621
- }) ]
13622
- }), (copyright || showBackToTop) && jsxs("div", {
13623
- className: bottomClass,
13624
- children: [ copyright && jsx("div", {
13625
- className: "c-footer__copyright",
13626
- children: copyright
13627
- }), showBackToTop && jsxs(Button, {
13628
- variant: "ghost",
13629
- className: "c-footer__back-to-top",
13630
- onClick: handleBackToTop,
13631
- disabled: disabled,
13632
- "aria-label": backToTopText,
13633
- children: [ jsx("span", {
13634
- className: "c-footer__back-to-top-icon",
13635
- children: "↑"
13636
- }), jsx("span", {
13637
- className: "c-footer__back-to-top-text",
13638
- children: backToTopText
13541
+ }) : null ]
13542
+ }), copyright || showBackToTop ? jsxs(Fragment, {
13543
+ children: [ showDivider && jsx("hr", {
13544
+ className: "c-footer__divider"
13545
+ }), jsxs("div", {
13546
+ className: bottomClass,
13547
+ children: [ copyright && jsx("div", {
13548
+ className: "c-footer__copyright",
13549
+ children: copyright
13550
+ }), showBackToTop && jsxs(Button, {
13551
+ variant: "ghost",
13552
+ className: "c-footer__back-to-top",
13553
+ onClick: handleBackToTop,
13554
+ disabled: disabled,
13555
+ "aria-label": backToTopText,
13556
+ children: [ jsx("span", {
13557
+ className: "c-footer__back-to-top-icon",
13558
+ children: "↑"
13559
+ }), jsx("span", {
13560
+ className: "c-footer__back-to-top-text",
13561
+ children: backToTopText
13562
+ }) ]
13639
13563
  }) ]
13640
13564
  }) ]
13641
- }) ]
13565
+ }) : null ]
13642
13566
  });
13643
- // Calculate grid column sizes based on layout
13644
- return jsx("footer", {
13567
+ // ──────────────────────────────────────────
13568
+ // Render helpers
13569
+ // ──────────────────────────────────────────
13570
+ // ──────────────────────────────────────────
13571
+ // Root element
13572
+ // ──────────────────────────────────────────
13573
+ return jsx("footer", {
13645
13574
  ref: ref,
13646
- className: footerClass + " c-footer " + (glass ? "c-footer--glass" : ""),
13575
+ className: footerClass,
13647
13576
  ...props,
13648
13577
  children: glass ? jsx(AtomixGlass, {
13649
13578
  ...glass,
@@ -13881,7 +13810,7 @@ const layouts = Object.freeze( Object.defineProperty({
13881
13810
  }, Symbol.toStringTag, {
13882
13811
  value: "Module"
13883
13812
  })), FooterSection = forwardRef((({title: title, icon: icon, collapsible: collapsible = !1, defaultCollapsed: defaultCollapsed = !1, showNewsletter: showNewsletter = !1, children: children, className: className = "", ...props}, ref) => {
13884
- const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed), sectionClass = [ "c-footer__section", collapsible && "c-footer__section--collapsible", isCollapsed && "c-footer__section--collapsed", className ].filter(Boolean).join(" ");
13813
+ const [isCollapsed, setIsCollapsed] = useState(defaultCollapsed), sectionId = title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}` : void 0, sectionClass = [ "c-footer__section", collapsible && "c-footer__section--collapsible", isCollapsed && "c-footer__section--collapsed", className ].filter(Boolean).join(" ");
13885
13814
  return jsx(GridCol, {
13886
13815
  xs: 12,
13887
13816
  md: showNewsletter ? 6 : 3,
@@ -13890,16 +13819,16 @@ const layouts = Object.freeze( Object.defineProperty({
13890
13819
  ref: ref,
13891
13820
  className: sectionClass,
13892
13821
  ...props,
13893
- children: [ title && jsx("div", {
13822
+ children: [ title ? jsx("div", collapsible ? {
13894
13823
  className: "c-footer__section-header",
13895
- children: collapsible ? jsxs("button", {
13824
+ children: jsxs("button", {
13896
13825
  type: "button",
13897
13826
  className: "c-footer__section-toggle",
13898
13827
  onClick: () => {
13899
- collapsible && setIsCollapsed(!isCollapsed);
13828
+ collapsible && setIsCollapsed((prev => !prev));
13900
13829
  },
13901
13830
  "aria-expanded": !isCollapsed,
13902
- "aria-controls": `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}`,
13831
+ "aria-controls": sectionId,
13903
13832
  children: [ icon && jsx("span", {
13904
13833
  className: "c-footer__section-icon",
13905
13834
  children: icon
@@ -13910,7 +13839,10 @@ const layouts = Object.freeze( Object.defineProperty({
13910
13839
  className: "c-footer__section-chevron",
13911
13840
  children: isCollapsed ? "▼" : "▲"
13912
13841
  }) ]
13913
- }) : jsxs("div", {
13842
+ })
13843
+ } : {
13844
+ className: "c-footer__section-header",
13845
+ children: jsxs("div", {
13914
13846
  className: "c-footer__section-header-content",
13915
13847
  children: [ icon && jsx("span", {
13916
13848
  className: "c-footer__section-icon",
@@ -13920,12 +13852,9 @@ const layouts = Object.freeze( Object.defineProperty({
13920
13852
  children: title
13921
13853
  }) ]
13922
13854
  })
13923
- }), jsx("div", {
13855
+ }) : null, jsx("div", {
13924
13856
  className: "c-footer__section-content",
13925
- id: title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}` : void 0,
13926
- style: {
13927
- display: collapsible && isCollapsed ? "none" : "flex"
13928
- },
13857
+ id: sectionId,
13929
13858
  children: children
13930
13859
  }) ]
13931
13860
  })
@@ -13954,8 +13883,8 @@ const layouts = Object.freeze( Object.defineProperty({
13954
13883
  * </FooterLink>
13955
13884
  * ```
13956
13885
  */
13957
- const FooterLink = forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", LinkComponent: LinkComponent, ...props}, ref) => {
13958
- const linkProps = {
13886
+ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", linkComponent: linkComponent, ...props}, ref) => {
13887
+ const sharedProps = {
13959
13888
  className: [ "c-footer__link", active && "c-footer__link--active", disabled && "c-footer__link--disabled", className ].filter(Boolean).join(" "),
13960
13889
  onClick: disabled ? void 0 : onClick,
13961
13890
  "aria-disabled": disabled,
@@ -13964,35 +13893,7 @@ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !
13964
13893
  rel: "noopener noreferrer"
13965
13894
  },
13966
13895
  ...props
13967
- };
13968
- if (LinkComponent) {
13969
- const Component = LinkComponent, componentProps = {
13970
- ref: ref,
13971
- ...href && !disabled ? {
13972
- href: href,
13973
- to: href
13974
- } : {},
13975
- ...linkProps
13976
- };
13977
- // Only pass href/to if the link is not disabled and href exists
13978
- return jsxs(Component, {
13979
- ...componentProps,
13980
- children: [ icon && jsx("span", {
13981
- className: "c-footer__link-icon",
13982
- children: icon
13983
- }), jsx("span", {
13984
- className: "c-footer__link-text",
13985
- children: children
13986
- }), external && jsx("span", {
13987
- className: "c-footer__link-external",
13988
- children: "↗"
13989
- }) ]
13990
- });
13991
- }
13992
- return jsxs("a", {
13993
- ref: ref,
13994
- href: disabled ? void 0 : href,
13995
- ...linkProps,
13896
+ }, linkContent = jsxs(Fragment, {
13996
13897
  children: [ icon && jsx("span", {
13997
13898
  className: "c-footer__link-icon",
13998
13899
  children: icon
@@ -14004,11 +13905,33 @@ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !
14004
13905
  children: "↗"
14005
13906
  }) ]
14006
13907
  });
13908
+ return linkComponent ? jsx(linkComponent, {
13909
+ ref: ref,
13910
+ ...href && !disabled ? {
13911
+ href: href,
13912
+ to: href
13913
+ } : {},
13914
+ ...sharedProps,
13915
+ children: linkContent
13916
+ }) : jsx("a", {
13917
+ ref: ref,
13918
+ href: disabled ? void 0 : href,
13919
+ ...sharedProps,
13920
+ children: linkContent
13921
+ });
14007
13922
  }));
14008
13923
 
14009
13924
  FooterLink.displayName = "FooterLink";
14010
13925
 
14011
- const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc, imageAlt: imageAlt = "Hero image", alignment: alignment = "left", backgroundImageSrc: backgroundImageSrc, showOverlay: showOverlay = !0, fullViewportHeight: fullViewportHeight = !1, actions: actions, imageColSize: imageColSize = 7, imageColClassName: imageColClassName, imageColStyle: imageColStyle, contentColSize: contentColSize = 5, contentColClassName: contentColClassName, contentColStyle: contentColStyle, contentWidth: contentWidth, className: className = "", style: style, parallax: parallax = !1, parallaxIntensity: parallaxIntensity = .5, videoBackground: videoBackground, children: children, glass: glass, videoOptions: videoOptions = {
13926
+ const HERO_DEFAULT_GLASS_PROPS = {
13927
+ displacementScale: 60,
13928
+ blurAmount: 3,
13929
+ saturation: 180,
13930
+ aberrationIntensity: 0,
13931
+ borderRadius: 8,
13932
+ overLight: !1,
13933
+ mode: "standard"
13934
+ }, Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc, imageAlt: imageAlt = "Hero image", alignment: alignment = "left", backgroundImageSrc: backgroundImageSrc, showOverlay: showOverlay = !0, fullViewportHeight: fullViewportHeight = !1, actions: actions, imageColSize: imageColSize = 7, imageColClassName: imageColClassName, imageColStyle: imageColStyle, contentColSize: contentColSize = 5, contentColClassName: contentColClassName, contentColStyle: contentColStyle, contentWidth: contentWidth, className: className = "", style: style, parallax: parallax = !1, parallaxIntensity: parallaxIntensity = .5, videoBackground: videoBackground, children: children, glass: glass, videoOptions: videoOptions = {
14012
13935
  autoplay: !0,
14013
13936
  loop: !0,
14014
13937
  muted: !0
@@ -14051,9 +13974,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14051
13974
  }), "Your browser does not support the video tag." ]
14052
13975
  });
14053
13976
  }, renderContent = () => {
14054
- const content = jsxs("div", {
14055
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14056
- style: parts?.content?.style,
13977
+ // Build inner content elements ONCE — no duplication
13978
+ const innerElements = jsxs(Fragment, {
14057
13979
  children: [ subtitle && jsx("p", {
14058
13980
  className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14059
13981
  style: parts?.subtitle?.style,
@@ -14071,71 +13993,25 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14071
13993
  style: parts?.actions?.style,
14072
13994
  children: actions
14073
13995
  }) ]
14074
- });
14075
- // If glass is explicitly set to false, don't apply glass effect
14076
- return !1 === glass ? content :
14077
- // If glass is true or an object, apply glass effect
14078
- glass ? jsx("div",
14079
- // If glass is true, use default glass props
14080
- !0 === glass ? {
14081
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14082
- style: parts?.content?.style,
14083
- children: jsx(AtomixGlass, {
14084
- displacementScale: 60,
14085
- blurAmount: 3,
14086
- saturation: 180,
14087
- aberrationIntensity: 0,
14088
- borderRadius: 8,
14089
- overLight: !1,
14090
- mode: "standard",
14091
- children: jsxs("div", {
13996
+ }), contentBody = glass ? (() => {
13997
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
13998
+ ...HERO_DEFAULT_GLASS_PROPS,
13999
+ ...glass
14000
+ };
14001
+ return jsx(AtomixGlass, {
14002
+ ...glassProps,
14003
+ children: jsx("div", {
14092
14004
  className: "u-p-4",
14093
- children: [ subtitle && jsx("p", {
14094
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14095
- style: parts?.subtitle?.style,
14096
- children: subtitle
14097
- }), jsx(HeadingTag, {
14098
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14099
- style: parts?.title?.style,
14100
- children: title
14101
- }), text && jsx("p", {
14102
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14103
- style: parts?.text?.style,
14104
- children: text
14105
- }), actions && jsx("div", {
14106
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14107
- style: parts?.actions?.style,
14108
- children: actions
14109
- }) ]
14005
+ children: innerElements
14110
14006
  })
14111
- })
14112
- } : {
14007
+ });
14008
+ })() : innerElements;
14009
+ // Conditionally wrap with AtomixGlass using the standard glass prop pattern
14010
+ return jsx("div", {
14113
14011
  className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14114
14012
  style: parts?.content?.style,
14115
- children: jsx(AtomixGlass, {
14116
- ...glass,
14117
- children: jsxs("div", {
14118
- className: "u-p-4",
14119
- children: [ subtitle && jsx("p", {
14120
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14121
- style: parts?.subtitle?.style,
14122
- children: subtitle
14123
- }), jsx(HeadingTag, {
14124
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14125
- style: parts?.title?.style,
14126
- children: title
14127
- }), text && jsx("p", {
14128
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14129
- style: parts?.text?.style,
14130
- children: text
14131
- }), actions && jsx("div", {
14132
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14133
- style: parts?.actions?.style,
14134
- children: actions
14135
- }) ]
14136
- })
14137
- })
14138
- }) : content;
14013
+ children: contentBody
14014
+ });
14139
14015
  }, renderForegroundImage = () => hasForegroundImage ? jsx("div", "center" === alignment ? {
14140
14016
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${imageColClassName || ""} ${parts?.imageWrapper?.className || ""}`.trim(),
14141
14017
  style: {
@@ -14283,35 +14159,24 @@ Hero.Title = ({children: children, className: className, level: level = "h1", ..
14283
14159
  ...props,
14284
14160
  children: children
14285
14161
  }), Hero.Content = ({children: children, className: className, style: style, glass: glass, ...props}) => {
14286
- const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim();
14287
- if (glass) {
14288
- const glassProps = "boolean" == typeof glass ? {
14289
- displacementScale: 60,
14290
- blurAmount: 3,
14291
- saturation: 180,
14292
- aberrationIntensity: 0,
14293
- borderRadius: 8,
14294
- overLight: !1,
14295
- mode: "standard"
14296
- } : glass;
14297
- return jsx("div", {
14298
- className: contentClass,
14299
- style: style,
14300
- ...props,
14301
- children: jsx(AtomixGlass, {
14302
- ...glassProps,
14303
- children: jsx("div", {
14304
- className: "u-p-4",
14305
- children: children
14306
- })
14307
- })
14162
+ const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim(), innerContent = glass ? jsx("div", {
14163
+ className: "u-p-4",
14164
+ children: children
14165
+ }) : children, wrappedContent = glass ? (() => {
14166
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
14167
+ ...HERO_DEFAULT_GLASS_PROPS,
14168
+ ...glass
14169
+ };
14170
+ return jsx(AtomixGlass, {
14171
+ ...glassProps,
14172
+ children: innerContent
14308
14173
  });
14309
- }
14174
+ })() : innerContent;
14310
14175
  return jsx("div", {
14311
14176
  className: contentClass,
14312
14177
  style: style,
14313
14178
  ...props,
14314
- children: children
14179
+ children: wrappedContent
14315
14180
  });
14316
14181
  }, Hero.Image = ({src: src, alt: alt = "", className: className, wrapperClassName: wrapperClassName, wrapperStyle: wrapperStyle, ...props}) => jsx("div", {
14317
14182
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${wrapperClassName || ""}`.trim(),
@@ -14854,7 +14719,7 @@ function setRef(ref, value) {
14854
14719
  * ```
14855
14720
  */ Nav.displayName = "Nav";
14856
14721
 
14857
- const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, megaMenu: megaMenu = !1, active: active = !1, href: href, onClick: onClick, className: className = "", disabled: disabled = !1, "aria-expanded": ariaExpanded, LinkComponent: LinkComponent}, ref) => {
14722
+ const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, megaMenu: megaMenu = !1, active: active = !1, href: href, target: target, onClick: onClick, className: className = "", disabled: disabled = !1, "aria-expanded": ariaExpanded, linkComponent: linkComponent}, ref) => {
14858
14723
  const {generateNavItemClass: generateNavItemClass, generateNavLinkClass: generateNavLinkClass, handleClick: handleClick} = useNavItem({
14859
14724
  dropdown: dropdown,
14860
14725
  megaMenu: megaMenu,
@@ -14894,6 +14759,7 @@ const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, mega
14894
14759
  ref: combinedRef,
14895
14760
  href: href || "#",
14896
14761
  to: href || "#",
14762
+ target: target,
14897
14763
  className: navLinkClass,
14898
14764
  onClick: dropdown || megaMenu ? e => {
14899
14765
  (dropdown || megaMenu) && (e.preventDefault(), setIsActive(!isActive));
@@ -14906,7 +14772,7 @@ const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, mega
14906
14772
  className: navItemClass,
14907
14773
  role: "menuitem",
14908
14774
  "aria-haspopup": dropdown || megaMenu,
14909
- children: [ jsx(LinkComponent || "a", {
14775
+ children: [ jsx(linkComponent || "a", {
14910
14776
  ...linkProps,
14911
14777
  children: dropdown || megaMenu ? childContent[0] : children
14912
14778
  }), (dropdown || megaMenu) && childContent.length > 1 && childContent[1] ]
@@ -15013,13 +14879,14 @@ const Navbar = forwardRef((({brand: brand, children: children, variant: variant
15013
14879
  return jsx(AtomixGlass, {
15014
14880
  ...glassProps,
15015
14881
  style: {
15016
- ..."fixed" === position && {
15017
- position: "fixed"
15018
- },
15019
- left: 0,
15020
- right: 0,
15021
- top: 0,
15022
- zIndex: 1e3
14882
+ ...("fixed" === position || "fixed-bottom" === position) && {
14883
+ position: "fixed",
14884
+ top: "fixed" === position ? 0 : void 0,
14885
+ bottom: "fixed-bottom" === position ? 0 : void 0,
14886
+ left: 0,
14887
+ right: 0,
14888
+ zIndex: 1030
14889
+ }
15023
14890
  },
15024
14891
  children: jsx("nav", {
15025
14892
  ref: ref,
@@ -15087,7 +14954,7 @@ SideMenuList.displayName = "SideMenuList";
15087
14954
  *
15088
14955
  * // With icon and custom link component
15089
14956
  * import Link from 'next/link';
15090
- * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} LinkComponent={Link}>
14957
+ * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} linkComponent={Link}>
15091
14958
  * Settings
15092
14959
  * </SideMenuItem>
15093
14960
  *
@@ -15102,7 +14969,7 @@ SideMenuList.displayName = "SideMenuList";
15102
14969
  * </SideMenuItem>
15103
14970
  * ```
15104
14971
  */
15105
- const SideMenuItem = forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, LinkComponent: LinkComponentProp}, ref) => {
14972
+ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, linkComponent: linkComponentProp}, ref) => {
15106
14973
  const {generateSideMenuItemClass: generateSideMenuItemClass, handleClick: handleClick} = useSideMenuItem({
15107
14974
  active: active,
15108
14975
  disabled: disabled,
@@ -15110,7 +14977,7 @@ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onC
15110
14977
  }), itemClass = generateSideMenuItemClass();
15111
14978
  // Render as link if href is provided
15112
14979
  if (href) {
15113
- if (LinkComponentProp) {
14980
+ if (linkComponentProp) {
15114
14981
  const linkProps = {
15115
14982
  ref: ref,
15116
14983
  className: itemClass,
@@ -15127,7 +14994,7 @@ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onC
15127
14994
  to: href
15128
14995
  }
15129
14996
  };
15130
- return jsxs(LinkComponentProp, {
14997
+ return jsxs(linkComponentProp, {
15131
14998
  ...linkProps,
15132
14999
  children: [ icon && jsx("span", {
15133
15000
  className: "c-side-menu__link-icon",
@@ -15197,7 +15064,7 @@ SideMenuItem.displayName = "SideMenuItem";
15197
15064
  * </SideMenu>
15198
15065
  * ```
15199
15066
  */
15200
- const SideMenu = forwardRef((({title: title, children: children, menuItems: menuItems = [], isOpen: isOpen, onToggle: onToggle, collapsible: collapsible = !0, collapsibleDesktop: collapsibleDesktop = !1, defaultCollapsedDesktop: defaultCollapsedDesktop = !1, className: className = "", style: style, disabled: disabled = !1, toggleIcon: toggleIcon, id: id, glass: glass, LinkComponent: LinkComponent}, ref) => {
15067
+ const SideMenu = forwardRef((({title: title, children: children, menuItems: menuItems = [], isOpen: isOpen, onToggle: onToggle, collapsible: collapsible = !0, collapsibleDesktop: collapsibleDesktop = !1, defaultCollapsedDesktop: defaultCollapsedDesktop = !1, className: className = "", style: style, disabled: disabled = !1, toggleIcon: toggleIcon, id: id, glass: glass, linkComponent: linkComponent}, ref) => {
15201
15068
  const {isOpenState: isOpenState, wrapperRef: wrapperRef, innerRef: innerRef, sideMenuRef: sideMenuRef, generateSideMenuClass: generateSideMenuClass, generateWrapperClass: generateWrapperClass, handleToggle: handleToggle} = useSideMenu({
15202
15069
  isOpen: isOpen,
15203
15070
  onToggle: onToggle,
@@ -15351,7 +15218,7 @@ const SideMenu = forwardRef((({title: title, children: children, menuItems: men
15351
15218
  active: subItem.active,
15352
15219
  disabled: subItem.disabled,
15353
15220
  icon: subItem.icon,
15354
- LinkComponent: LinkComponent,
15221
+ linkComponent: linkComponent,
15355
15222
  children: subItem.title
15356
15223
  }, subIndex)))
15357
15224
  })
@@ -15418,18 +15285,18 @@ const Menu = forwardRef((({children: children, className: className = "", style
15418
15285
 
15419
15286
  Menu.displayName = "Menu";
15420
15287
 
15421
- const MenuItem = forwardRef((({children: children, href: href = "#", icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => jsx("li", {
15422
- ref: ref,
15423
- className: `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`,
15424
- role: "menuitem",
15425
- children: jsxs("a", {
15288
+ const MenuItem = forwardRef((({children: children, href: href = "#", target: target, linkComponent: linkComponent, icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => {
15289
+ const itemClass = `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`, linkProps = {
15426
15290
  href: href,
15291
+ to: href,
15292
+ target: target,
15427
15293
  className: "c-menu__link",
15428
15294
  onClick: e => {
15429
15295
  disabled ? e.preventDefault() : onClick && onClick();
15430
15296
  },
15431
15297
  "aria-disabled": disabled,
15432
- "aria-current": active ? "page" : void 0,
15298
+ "aria-current": active ? "page" : void 0
15299
+ }, content = jsxs(Fragment, {
15433
15300
  children: [ icon && ("string" == typeof icon ? icon.startsWith("c-icon-") ? jsx(Icon, {
15434
15301
  name: mapIconName(icon.replace("c-icon-", "")),
15435
15302
  size: "sm",
@@ -15441,8 +15308,17 @@ const MenuItem = forwardRef((({children: children, href: href = "#", icon: icon
15441
15308
  className: "c-menu__icon",
15442
15309
  children: icon
15443
15310
  })), children ]
15444
- })
15445
- })));
15311
+ });
15312
+ return jsx("li", {
15313
+ ref: ref,
15314
+ className: itemClass,
15315
+ role: "menuitem",
15316
+ children: jsx(linkComponent || "a", {
15317
+ ...linkProps,
15318
+ children: content
15319
+ })
15320
+ });
15321
+ }));
15446
15322
 
15447
15323
  MenuItem.displayName = "MenuItem";
15448
15324
 
@@ -15537,16 +15413,23 @@ const MegaMenuColumn = forwardRef((({title: title, icon: icon, children: childr
15537
15413
 
15538
15414
  MegaMenuColumn.displayName = "MegaMenuColumn";
15539
15415
 
15540
- const MegaMenuLink = forwardRef((({href: href, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => jsx("a", {
15541
- ref: ref,
15542
- href: href,
15543
- className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15544
- onClick: e => {
15545
- disabled ? e.preventDefault() : onClick && onClick();
15546
- },
15547
- "aria-disabled": disabled,
15548
- children: children
15549
- })));
15416
+ const MegaMenuLink = forwardRef((({href: href, target: target, linkComponent: linkComponent, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => {
15417
+ const linkProps = {
15418
+ ref: ref,
15419
+ href: href,
15420
+ to: href,
15421
+ target: target,
15422
+ className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15423
+ onClick: e => {
15424
+ disabled ? e.preventDefault() : onClick && onClick();
15425
+ },
15426
+ "aria-disabled": disabled
15427
+ };
15428
+ return jsx(linkComponent || "a", {
15429
+ ...linkProps,
15430
+ children: children
15431
+ });
15432
+ }));
15550
15433
 
15551
15434
  MegaMenuLink.displayName = "MegaMenuLink";
15552
15435
 
@@ -17529,8 +17412,8 @@ const SectionIntro = ({title: title, label: label, text: text, actions: actions,
17529
17412
  SectionIntro.displayName = "SectionIntro";
17530
17413
 
17531
17414
  const Slider = forwardRef(((props, ref) => {
17532
- const {slides: slides = [], height: height = 300, width: width = "100%", slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, grabCursor: grabCursor = !0, autoplay: autoplay, navigation: navigation, pagination: pagination, className: className, style: style, onSlideChange: onSlideChange, ...rest} = props, slider = useSlider({
17533
- slides: slides || [],
17415
+ const {slides: slides = [], height: height = 300, width: width = "100%", slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, grabCursor: grabCursor = !0, autoplay: autoplay, navigation: navigation, pagination: pagination, className: className, style: style, onSlideChange: onSlideChange, ...rest} = props, validSlides = Array.isArray(slides) ? slides : [], slider = useSlider({
17416
+ slides: validSlides,
17534
17417
  slidesToShow: slidesToShow,
17535
17418
  spaceBetween: spaceBetween,
17536
17419
  loop: loop,
@@ -17542,8 +17425,8 @@ const Slider = forwardRef(((props, ref) => {
17542
17425
  autoplay: autoplay,
17543
17426
  onSlideChange: onSlideChange
17544
17427
  }), {containerRef: containerRef, wrapperRef: wrapperRef, allSlides: allSlides, realIndex: realIndex, translateValue: translateValue, slideWidth: slideWidth, transitioning: transitioning, touching: touching, slideNext: slideNext, slidePrev: slidePrev, goToSlide: goToSlide, canSlideNext: canSlideNext, canSlidePrev: canSlidePrev, handleTouchStart: handleTouchStart, handleTouchMove: handleTouchMove, handleTouchEnd: handleTouchEnd, loopedSlides: loopedSlides} = slider, totalWrapperWidth = useMemo((() => 0 === slideWidth ? 0 : allSlides.length * (slideWidth + spaceBetween) - spaceBetween), [ allSlides.length, slideWidth, spaceBetween ]);
17545
- // Hooks must be called unconditionally - before early return
17546
- if (!slides || 0 === slides.length) return jsx("div", {
17428
+ // Ensure slides is an array to prevent .map errors
17429
+ if (0 === validSlides.length) return jsx("div", {
17547
17430
  className: "c-slider c-slider--empty",
17548
17431
  style: {
17549
17432
  height: height,
@@ -17587,7 +17470,7 @@ const Slider = forwardRef(((props, ref) => {
17587
17470
  willChange: "transform"
17588
17471
  },
17589
17472
  children: allSlides.map(((slide, index) => jsxs("div", {
17590
- className: [ "c-slider__slide", (loop ? index % slides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17473
+ className: [ "c-slider__slide", (loop ? index % validSlides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17591
17474
  style: {
17592
17475
  width: "vertical" === direction ? "100%" : `${slideWidth}px`,
17593
17476
  height: "vertical" === direction ? `${slideWidth}px` : "100%",
@@ -17649,7 +17532,7 @@ const Slider = forwardRef(((props, ref) => {
17649
17532
  }) ]
17650
17533
  }), pagination && jsx("div", {
17651
17534
  className: "c-slider__pagination",
17652
- children: slides.map(((_, index) => jsx("button", {
17535
+ children: validSlides.map(((_, index) => jsx("button", {
17653
17536
  type: "button",
17654
17537
  className: "c-slider__pagination-bullet " + (index === realIndex ? "c-slider__pagination-bullet--active" : ""),
17655
17538
  onClick: () => goToSlide(index),
@@ -25458,5 +25341,5 @@ const atomix = {
25458
25341
  types: types
25459
25342
  };
25460
25343
 
25461
- export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, BUTTON_GROUP, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, ButtonGroup, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DesignTokensCustomizer, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GaugeChart, Grid, GridCol, HERO, HeatmapChart, Hero, INPUT, INPUT_CSS_VARS, Icon, Input, LIST, LIST_GROUP, LineChart, List, ListGroup, MESSAGES, MODAL, MODAL_CSS_VARS, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, NAV, NAVBAR, Nav, NavDropdown, NavItem, Navbar, PAGINATION_DEFAULTS, PHOTOVIEWER, POPOVER, PROGRESS, PROGRESS_CSS_VARS, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RADIO, RADIO_CSS_VARS, RATING, RIVER, RTLManager, RadarChart, Radio, Rating, River, Row, SECTION_INTRO, SELECT, SIDE_MENU, SIZES, SLIDER, SPINNER, STEPS, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, TAB, TABS_CSS_VARS, TESTIMONIAL, TEXTAREA, THEME_COLORS, THEME_NAMING, TODO, TOGGLE, TOOLTIP, TOOLTIP_CSS_VARS, Tabs, Testimonial, Textarea, ThemeApplicator, ThemeComparator, ThemeContext, ThemeErrorBoundary, ThemeInspector, ThemeLiveEditor, ThemePreview, ThemeProvider, ThemeValidator, Todo, Toggle, Tooltip, TreemapChart, UPLOAD, Upload, VIDEO_PLAYER, VideoPlayer, WaterfallChart, applyCSSVariables, applyCSSVarsToStyle, applyComponentTheme, applyPartStyles, applyTheme, camelToKebab, clearThemes, composables, constants, createCSSVarStyle, createDarkVariant, createDebugAttrs, createFontPreloadLink, createPartProps, createSlotComponent, createSlotProps, createTheme, createThemeRegistry, createTokens, cssVarsToStyle, deepMerge, atomix as default, defaultTokens, defineConfig, designTokensToCSSVars, exportTheme, extendTheme, extractComponentName, extractYouTubeId, generateCSSVariableName, generateCSSVariables$1 as generateCSSVariables, generateCSSVariablesForSelector, generateClassName, generateComponentCSSVars, generateFontPreloadTags, generateUUID, getAllThemes, getCSSVariable, getComponentCSSVars, getComponentThemeValue, getPartStyles, getTheme, getThemeApplicator, getThemeCount, getThemeIds, getThemeMetadata, hasCustomization, hasTheme, importTheme, injectCSS$1 as injectCSS, injectTheme, isCSSInjected, isDesignTokens, isSlot, isValidCSSVariableName, isYouTubeUrl, mapSCSSTokensToCSSVars, mergeCSSVars, mergeClassNames, mergeComponentProps, mergePartStyles, mergeSlots, mergeTheme, normalizeThemeTokens, preloadFonts, quickTheme, registerTheme, removeCSS, removeCSSVariables, removeTheme, renderSlot, sliderConstants, supportsDarkMode, theme, themePropertyToCSSVar, themeToCSS, types, unregisterTheme, useAccordion, useAtomixGlass, useBadge, useBarChart, useBlock, useBreadcrumb, useCard, useChartData, useChartInteraction, useChartScale, useComponentCustomization, useComponentDefaultProps, useComponentTheme, useDataTable, useEdgePanel, useForm, useFormGroup, useGlassContainer, useHero, useHistory, useInput, useLineChart, useMergedProps, useModal$1 as useModal, useNav, useNavDropdown, useNavItem, useNavbar, usePagination, usePieChart, useRadio, useRiver, useSelect, useSideMenu, useSideMenuItem, useSlider, useSlot, useSpinner, useTextarea, useTheme, useThemeTokens, useTodo, utils, validateTheme };
25344
+ export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, BUTTON_GROUP, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, ButtonGroup, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DesignTokensCustomizer, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GaugeChart, Grid, GridCol, HERO, HeatmapChart, Hero, INPUT, INPUT_CSS_VARS, Icon, Input, LIST, LIST_GROUP, LineChart, List, ListGroup, MESSAGES, MODAL, MODAL_CSS_VARS, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, NAV, NAVBAR, Nav, NavDropdown, NavItem, Navbar, PAGINATION_DEFAULTS, PHOTOVIEWER, POPOVER, PROGRESS, PROGRESS_CSS_VARS, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RADIO, RADIO_CSS_VARS, RATING, RIVER, RTLManager, RadarChart, Radio, Rating, River, Row, SECTION_INTRO, SELECT, SIDE_MENU, SIZES, SLIDER, SPINNER, STEPS, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, TAB, TABS_CSS_VARS, TESTIMONIAL, TEXTAREA, THEME_COLORS, THEME_NAMING, TODO, TOGGLE, TOOLTIP, TOOLTIP_CSS_VARS, Tabs, Testimonial, Textarea, ThemeApplicator, ThemeComparator, ThemeContext, ThemeErrorBoundary, ThemeInspector, ThemeLiveEditor, ThemePreview, ThemeProvider, ThemeValidator, Todo, Toggle, Tooltip, TreemapChart, UPLOAD, Upload, VIDEO_PLAYER, VideoPlayer, WaterfallChart, applyCSSVariables, applyCSSVarsToStyle, applyComponentTheme, applyPartStyles, applyTheme, camelToKebab, clearThemes, composables, constants, createCSSVarStyle, createDarkVariant, createDebugAttrs, createFontPreloadLink, createPartProps, createSlotComponent, createSlotProps, createTheme, createThemeRegistry, createTokens, cssVarsToStyle, deepMerge, atomix as default, defaultTokens, defineConfig, designTokensToCSSVars, exportTheme, extendTheme, extractComponentName, extractYouTubeId, generateCSSVariableName, generateCSSVariables$1 as generateCSSVariables, generateCSSVariablesForSelector, generateClassName, generateComponentCSSVars, generateFontPreloadTags, generateUUID, getAllThemes, getCSSVariable, getComponentCSSVars, getComponentThemeValue, getPartStyles, getTheme, getThemeApplicator, getThemeCount, getThemeIds, getThemeMetadata, hasCustomization, hasTheme, importTheme, injectCSS$1 as injectCSS, injectTheme, isCSSInjected, isDesignTokens, isSlot, isValidCSSVariableName, isYouTubeUrl, mapSCSSTokensToCSSVars, mergeCSSVars, mergeClassNames, mergeComponentProps, mergePartStyles, mergeSlots, mergeTheme, normalizeThemeTokens, preloadFonts, quickTheme, registerTheme, removeCSS, removeCSSVariables, removeTheme, renderSlot, sliderConstants, supportsDarkMode, theme, themePropertyToCSSVar, themeToCSS, types, unregisterTheme, useAccordion, useAtomixGlass, useBadge, useBarChart, useBlock, useBreadcrumb, useCard, useChartData, useChartInteraction, useChartScale, useComponentCustomization, useComponentDefaultProps, useComponentTheme, useDataTable, useEdgePanel, useForm, useFormGroup, useHero, useHistory, useInput, useLineChart, useMergedProps, useModal$1 as useModal, useNav, useNavDropdown, useNavItem, useNavbar, usePagination, usePieChart, useRadio, useRiver, useSelect, useSideMenu, useSideMenuItem, useSlider, useSlot, useSpinner, useTextarea, useTheme, useThemeTokens, useTodo, utils, validateTheme };
25462
25345
  //# sourceMappingURL=index.esm.js.map