@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.js CHANGED
@@ -1753,7 +1753,9 @@ const THEME_COLORS = [ "primary", "secondary", "success", "info", "warning", "er
1753
1753
  ENABLE_OVER_LIGHT_LAYERS: !0
1754
1754
  },
1755
1755
  CONSTANTS: {
1756
- ACTIVATION_ZONE: 200,
1756
+ ACTIVATION_ZONE: 350,
1757
+ LERP_FACTOR: .08,
1758
+ SMOOTHSTEP_POWER: 2.5,
1757
1759
  MIN_BLUR: .1,
1758
1760
  MOUSE_INFLUENCE_DIVISOR: 100,
1759
1761
  EDGE_FADE_PIXELS: 2,
@@ -2048,7 +2050,7 @@ const {CONSTANTS: CONSTANTS$2} = ATOMIX_GLASS, calculateDistance = (pos1, pos2)
2048
2050
  // Silently handle errors
2049
2051
  }
2050
2052
  return CONSTANTS$2.DEFAULT_CORNER_RADIUS;
2051
- }, getDisplacementMap = (mode, displacementMap, polarDisplacementMap, prominentDisplacementMap, shaderMapUrl) => {
2053
+ }, 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) => {
2052
2054
  switch (mode) {
2053
2055
  case "standard":
2054
2056
  return displacementMap;
@@ -2221,7 +2223,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
2221
2223
  }, 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 = {
2222
2224
  width: 0,
2223
2225
  height: 0
2224
- }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, elasticity: elasticity = 0, contentRef: contentRef}, ref) => {
2226
+ }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, contentRef: contentRef}, ref) => {
2225
2227
  // Generate a stable, deterministic ID for SSR compatibility
2226
2228
  // Use a module-level counter that's consistent across server and client
2227
2229
  const filterId = React.useMemo((() => "atomix-glass-filter-" + ++idCounter), []), [shaderMapUrl, setShaderMapUrl] = React.useState(""), shaderGeneratorRef = React.useRef(null), shaderUtilsRef = React.useRef(null), shaderDebounceTimeoutRef = React.useRef(null);
@@ -2408,21 +2410,12 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
2408
2410
  onClick: onClick,
2409
2411
  children: jsxRuntime.jsxs("div", {
2410
2412
  className: ATOMIX_GLASS.INNER_CLASS,
2411
- style: {
2412
- padding: "var(--atomix-glass-container-padding)",
2413
- boxShadow: "var(--atomix-glass-container-box-shadow)"
2414
- },
2415
2413
  onMouseEnter: onMouseEnter,
2416
2414
  onMouseLeave: onMouseLeave,
2417
2415
  onMouseDown: onMouseDown,
2418
2416
  onMouseUp: onMouseUp,
2419
2417
  children: [ jsxRuntime.jsxs("div", {
2420
2418
  className: ATOMIX_GLASS.FILTER_CLASS,
2421
- style: {
2422
- zIndex: 1,
2423
- position: "absolute",
2424
- inset: 0
2425
- },
2426
2419
  children: [ jsxRuntime.jsx(GlassFilter, {
2427
2420
  blurAmount: blurAmount,
2428
2421
  mode: mode,
@@ -2437,28 +2430,14 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
2437
2430
  },
2438
2431
  className: ATOMIX_GLASS.FILTER_OVERLAY_CLASS,
2439
2432
  style: {
2440
- filter: `url(#${filterId})`,
2441
- backdropFilter: "var(--atomix-glass-container-backdrop)",
2442
- borderRadius: "var(--atomix-glass-container-radius)"
2433
+ filter: `url(#${filterId})`
2443
2434
  }
2444
2435
  }), jsxRuntime.jsx("div", {
2445
- className: ATOMIX_GLASS.FILTER_SHADOW_CLASS,
2446
- style: {
2447
- boxShadow: "var(--atomix-glass-container-shadow)",
2448
- opacity: "var(--atomix-glass-container-shadow-opacity)",
2449
- background: "var(--atomix-glass-container-bg)",
2450
- borderRadius: "var(--atomix-glass-container-radius)"
2451
- }
2436
+ className: ATOMIX_GLASS.FILTER_SHADOW_CLASS
2452
2437
  }) ]
2453
2438
  }), jsxRuntime.jsx("div", {
2454
2439
  ref: contentRef,
2455
2440
  className: ATOMIX_GLASS.CONTENT_CLASS,
2456
- style: {
2457
- position: "relative",
2458
- textShadow: "var(--atomix-glass-container-text-shadow)",
2459
- // Ensure content is always above the filter layer (zIndex 1)
2460
- zIndex: elasticity > 0 ? 100 : 2
2461
- },
2462
2441
  children: children
2463
2442
  }) ]
2464
2443
  })
@@ -2562,31 +2541,39 @@ class {
2562
2541
  saturationBoost: baseOverLightConfig.saturationBoost
2563
2542
  };
2564
2543
  // Calculate mouse influence
2565
- // Calculate elastic translation
2566
- let elasticTranslation = {
2544
+ let computedDirectionalScale = directionalScale, elasticTranslation = {
2567
2545
  x: 0,
2568
2546
  y: 0
2569
2547
  };
2570
- if (!effectiveWithoutEffects && wrapperElement) {
2548
+ // Calculate elastic translation and directional scale
2549
+ if (!effectiveWithoutEffects && wrapperElement) {
2571
2550
  const rect = wrapperElement.getBoundingClientRect(), center = calculateElementCenter(rect);
2572
- // Calculate fade in factor
2573
- let fadeInFactor = 0;
2551
+ // Mouse presence and edge distance logic
2574
2552
  if (globalMousePosition.x && globalMousePosition.y && validateGlassSize(glassSize)) {
2575
- 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({
2553
+ 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({
2576
2554
  x: edgeDistanceX,
2577
2555
  y: edgeDistanceY
2578
2556
  }, {
2579
2557
  x: 0,
2580
2558
  y: 0
2581
- });
2582
- fadeInFactor = edgeDistance > ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE;
2559
+ }), rawT = edgeDistance > ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE, fadeInFactor = (t => {
2560
+ const clamped = Math.max(0, Math.min(1, t));
2561
+ return clamped * clamped * (3 - 2 * clamped);
2562
+ })(rawT);
2563
+ // Directional scale
2564
+ if (elasticTranslation = {
2565
+ x: deltaX * elasticity * .1 * fadeInFactor,
2566
+ y: deltaY * elasticity * .1 * fadeInFactor
2567
+ }, !isOverLight && edgeDistance <= ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE) {
2568
+ const centerDistance = calculateDistance(globalMousePosition, center);
2569
+ if (centerDistance > 0) {
2570
+ 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);
2571
+ computedDirectionalScale = `scaleX(${Math.max(.85, softScaleX)}) scaleY(${Math.max(.85, softScaleY)})`;
2572
+ }
2573
+ }
2583
2574
  }
2584
- elasticTranslation = {
2585
- x: (globalMousePosition.x - center.x) * elasticity * .1 * fadeInFactor,
2586
- y: (globalMousePosition.y - center.y) * elasticity * .1 * fadeInFactor
2587
- };
2588
2575
  }
2589
- 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}`;
2576
+ 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}`;
2590
2577
  // Update Wrapper Styles (glassVars)
2591
2578
  if (wrapperElement) {
2592
2579
  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 = {
@@ -2693,7 +2680,13 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2693
2680
  }), internalMouseOffsetRef = React.useRef({
2694
2681
  x: 0,
2695
2682
  y: 0
2696
- }), [dynamicBorderRadius, setDynamicCornerRadius] = React.useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = React.useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = React.useState(!1), [detectedOverLight, setDetectedOverLight] = React.useState(!1), effectiveBorderRadius = React.useMemo((() => void 0 !== borderRadius ? Math.max(0, borderRadius) : Math.max(0, dynamicBorderRadius)), [ borderRadius, dynamicBorderRadius ]), {glassSize: glassSize} = function({glassRef: glassRef, effectiveBorderRadius: effectiveBorderRadius, cachedRectRef: cachedRectRef}) {
2683
+ }), targetMouseOffsetRef = React.useRef({
2684
+ x: 0,
2685
+ y: 0
2686
+ }), targetGlobalMousePositionRef = React.useRef({
2687
+ x: 0,
2688
+ y: 0
2689
+ }), lerpRafRef = React.useRef(null), lerpActiveRef = React.useRef(!1), [dynamicBorderRadius, setDynamicCornerRadius] = React.useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = React.useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = React.useState(!1), [detectedOverLight, setDetectedOverLight] = React.useState(!1), effectiveBorderRadius = React.useMemo((() => void 0 !== borderRadius ? Math.max(0, borderRadius) : Math.max(0, dynamicBorderRadius)), [ borderRadius, dynamicBorderRadius ]), {glassSize: glassSize} = function({glassRef: glassRef, effectiveBorderRadius: effectiveBorderRadius, cachedRectRef: cachedRectRef}) {
2697
2690
  const [glassSize, setGlassSize] = React.useState({
2698
2691
  width: 270,
2699
2692
  height: 69
@@ -2790,7 +2783,23 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2790
2783
  const timeoutId = setTimeout(extractRadius, 100);
2791
2784
  return () => clearTimeout(timeoutId);
2792
2785
  }), [ children, debugBorderRadius, contentRef ]),
2793
- // Media query handlers and background detection
2786
+ // Media query detection for reduced motion and high contrast
2787
+ React.useEffect((() => {
2788
+ if ("undefined" == typeof window || "function" != typeof window.matchMedia) return;
2789
+ const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
2790
+ setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
2791
+ const handleReducedMotionChange = e => {
2792
+ setUserPrefersReducedMotion(e.matches);
2793
+ }, handleHighContrastChange = e => {
2794
+ setUserPrefersHighContrast(e.matches);
2795
+ };
2796
+ return mediaQueryReducedMotion.addEventListener("change", handleReducedMotionChange),
2797
+ mediaQueryHighContrast.addEventListener("change", handleHighContrastChange), () => {
2798
+ mediaQueryReducedMotion.removeEventListener("change", handleReducedMotionChange),
2799
+ mediaQueryHighContrast.removeEventListener("change", handleHighContrastChange);
2800
+ };
2801
+ }), []),
2802
+ // Background detection for overLight auto-detect
2794
2803
  React.useEffect((() => {
2795
2804
  if (("auto" === overLight || "object" == typeof overLight && null !== overLight) && glassRef.current) {
2796
2805
  const element = glassRef.current, cachedResult = ((parentElement, overLightConfig) => {
@@ -2890,102 +2899,36 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2890
2899
  }), 150);
2891
2900
  return () => clearTimeout(timeoutId);
2892
2901
  }
2893
- if ("boolean" == typeof overLight && setDetectedOverLight(!1), "function" == typeof window.matchMedia) try {
2894
- const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
2895
- setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
2896
- const handleReducedMotionChange = e => {
2897
- setUserPrefersReducedMotion(e.matches);
2898
- }, handleHighContrastChange = e => {
2899
- setUserPrefersHighContrast(e.matches);
2900
- };
2901
- return mediaQueryReducedMotion.addEventListener ? (mediaQueryReducedMotion.addEventListener("change", handleReducedMotionChange),
2902
- mediaQueryHighContrast.addEventListener("change", handleHighContrastChange)) : mediaQueryReducedMotion.addListener && (mediaQueryReducedMotion.addListener(handleReducedMotionChange),
2903
- mediaQueryHighContrast.addListener(handleHighContrastChange)), () => {
2904
- // ignore
2905
- };
2906
- } catch (error) {
2907
- return;
2908
- }
2909
- }), [ overLight, glassRef, debugOverLight ]);
2902
+ "boolean" == typeof overLight && setDetectedOverLight(!1);
2903
+ }), [ overLight, glassRef ]);
2910
2904
  /**
2911
2905
  * Get effective overLight value based on configuration
2912
2906
  */
2913
- const getEffectiveOverLight = React.useCallback((() => "boolean" == typeof overLight ? overLight : ("auto" === overLight || "object" == typeof overLight && null !== overLight) && detectedOverLight), [ overLight, detectedOverLight ]), validateConfigValue = React.useCallback(((value, min, max, defaultValue) => "number" != typeof value || isNaN(value) || !isFinite(value) ? defaultValue : Math.min(max, Math.max(min, value))), []), baseOverLightConfig = React.useMemo((() => {
2914
- const isOverLight = getEffectiveOverLight(), baseConfig = {
2907
+ const getEffectiveOverLight = React.useCallback((() => "boolean" == typeof overLight ? overLight : ("auto" === overLight || "object" == typeof overLight && null !== overLight) && detectedOverLight), [ overLight, detectedOverLight ]), validateConfigValue = React.useCallback(((value, min, max, defaultValue) => "number" != typeof value || isNaN(value) || !isFinite(value) ? defaultValue : Math.min(max, Math.max(min, value))), []), overLightConfig = React.useMemo((() => {
2908
+ const isOverLight = getEffectiveOverLight(), hoverIntensity = isHovered ? 1.4 : 1, activeIntensity = isActive ? 1.6 : 1, baseConfig = {
2915
2909
  isOverLight: isOverLight,
2916
2910
  threshold: .7,
2917
- opacity: isOverLight ? Math.min(.6, Math.max(.2, .5)) : 0,
2918
- contrast: 1,
2919
- // Base contrast
2920
- brightness: 1,
2921
- // Base brightness
2911
+ opacity: isOverLight ? Math.min(.6, Math.max(.2, .5 * hoverIntensity * activeIntensity)) : 0,
2912
+ contrast: 1.4,
2913
+ brightness: .9,
2922
2914
  saturationBoost: 1.3,
2915
+ // Fixed value — dynamic saturation amplifies perceived displacement
2923
2916
  shadowIntensity: .9,
2924
2917
  borderOpacity: .7
2925
2918
  };
2926
2919
  if ("object" == typeof overLight && null !== overLight) {
2927
- 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);
2928
- return {
2920
+ 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 = {
2929
2921
  ...baseConfig,
2930
2922
  threshold: validatedThreshold,
2931
- opacity: validatedOpacity,
2923
+ opacity: validatedOpacity * hoverIntensity * activeIntensity,
2932
2924
  contrast: validatedContrast,
2933
2925
  brightness: validatedBrightness,
2934
2926
  saturationBoost: validatedSaturationBoost
2935
2927
  };
2928
+ return "undefined" == typeof process || process.env, finalConfig;
2936
2929
  }
2937
- return baseConfig;
2938
- }), [ overLight, getEffectiveOverLight, validateConfigValue ]), overLightConfig = React.useMemo((() => {
2939
- const mouseInfluence = calculateMouseInfluence(mouseOffset), hoverIntensity = isHovered ? 1.4 : 1, activeIntensity = isActive ? 1.6 : 1;
2940
- return {
2941
- isOverLight: baseOverLightConfig.isOverLight,
2942
- threshold: baseOverLightConfig.threshold,
2943
- opacity: baseOverLightConfig.opacity * hoverIntensity * activeIntensity,
2944
- contrast: Math.min(1.6, baseOverLightConfig.contrast + .1 * mouseInfluence),
2945
- brightness: Math.min(1.1, baseOverLightConfig.brightness + .05 * mouseInfluence),
2946
- saturationBoost: baseOverLightConfig.saturationBoost,
2947
- shadowIntensity: Math.min(1.2, Math.max(.5, baseOverLightConfig.shadowIntensity + .2 * mouseInfluence)),
2948
- borderOpacity: Math.min(1, Math.max(.3, baseOverLightConfig.borderOpacity + .1 * mouseInfluence))
2949
- };
2950
- }), [ baseOverLightConfig, mouseOffset, isHovered, isActive ]), updateRectRef = React.useRef(null), calculateDirectionalScale = React.useCallback((() => {
2951
- if (baseOverLightConfig.isOverLight) return "scale(1)";
2952
- if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return "scale(1)";
2953
- 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({
2954
- x: edgeDistanceX,
2955
- y: edgeDistanceY
2956
- }, {
2957
- x: 0,
2958
- y: 0
2959
- });
2960
- if (edgeDistance > CONSTANTS.ACTIVATION_ZONE) return "scale(1)";
2961
- const fadeInFactor = 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE, centerDistance = calculateDistance(globalMousePosition, center);
2962
- if (0 === centerDistance) return "scale(1)";
2963
- 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;
2964
- return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
2965
- }), [ globalMousePosition, elasticity, glassSize, glassRef, baseOverLightConfig ]), calculateFadeInFactor = React.useCallback((() => {
2966
- if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return 0;
2967
- 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({
2968
- x: edgeDistanceX,
2969
- y: edgeDistanceY
2970
- }, {
2971
- x: 0,
2972
- y: 0
2973
- });
2974
- return edgeDistance > CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE;
2975
- }), [ globalMousePosition, glassSize, glassRef ]), calculateElasticTranslation = React.useCallback((() => {
2976
- if (!glassRef.current) return {
2977
- x: 0,
2978
- y: 0
2979
- };
2980
- const fadeInFactor = calculateFadeInFactor(), rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect);
2981
- return {
2982
- x: (globalMousePosition.x - center.x) * elasticity * .1 * fadeInFactor,
2983
- y: (globalMousePosition.y - center.y) * elasticity * .1 * fadeInFactor
2984
- };
2985
- }), [ globalMousePosition, elasticity, calculateFadeInFactor, glassRef ]), elasticTranslation = React.useMemo((() => effectiveWithoutEffects ? {
2986
- x: 0,
2987
- y: 0
2988
- } : calculateElasticTranslation()), [ calculateElasticTranslation, effectiveWithoutEffects ]), directionalScale = React.useMemo((() => effectiveWithoutEffects ? "scale(1)" : calculateDirectionalScale()), [ calculateDirectionalScale, effectiveWithoutEffects ]), transformStyle = React.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 = React.useCallback((globalPos => {
2930
+ return "undefined" == typeof process || process.env, baseConfig;
2931
+ }), [ overLight, getEffectiveOverLight, isHovered, isActive, validateConfigValue, debugOverLight ]), transformStyle = React.useMemo((() => effectiveWithoutEffects || isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)"), [ effectiveWithoutEffects, isActive, onClick ]), updateRectRef = React.useRef(null), handleGlobalMousePosition = React.useCallback((globalPos => {
2989
2932
  if (externalGlobalMousePosition && externalMouseOffset) return;
2990
2933
  if (effectiveWithoutEffects) return;
2991
2934
  const container = mouseContainer?.current || glassRef.current;
@@ -2994,35 +2937,61 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
2994
2937
  let rect = cachedRectRef.current;
2995
2938
  if (rect && 0 !== rect.width && 0 !== rect.height || (rect = container.getBoundingClientRect(),
2996
2939
  cachedRectRef.current = rect), 0 === rect.width || 0 === rect.height) return;
2997
- const center = calculateElementCenter(rect), newOffset = {
2940
+ const center = calculateElementCenter(rect);
2941
+ // Write raw target — the lerp loop will smoothly pursue it
2942
+ targetMouseOffsetRef.current = {
2998
2943
  x: (globalPos.x - center.x) / rect.width * 100,
2999
2944
  y: (globalPos.y - center.y) / rect.height * 100
2945
+ }, targetGlobalMousePositionRef.current = globalPos;
2946
+ }), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]), startLerpLoop = React.useCallback((() => {
2947
+ if (lerpActiveRef.current) return;
2948
+ lerpActiveRef.current = !0;
2949
+ const LERP_T = CONSTANTS.LERP_FACTOR, tick = () => {
2950
+ if (!lerpActiveRef.current) return;
2951
+ const cur = internalMouseOffsetRef.current, tgt = targetMouseOffsetRef.current, dx = tgt.x - cur.x, dy = tgt.y - cur.y;
2952
+ // If we're close enough, snap and park
2953
+ if (Math.abs(dx) < .05 && Math.abs(dy) < .05) internalMouseOffsetRef.current = {
2954
+ ...tgt
2955
+ }, internalGlobalMousePositionRef.current = {
2956
+ ...targetGlobalMousePositionRef.current
2957
+ }; else {
2958
+ internalMouseOffsetRef.current = {
2959
+ x: lerp(cur.x, tgt.x, LERP_T),
2960
+ y: lerp(cur.y, tgt.y, LERP_T)
2961
+ };
2962
+ const curG = internalGlobalMousePositionRef.current, tgtG = targetGlobalMousePositionRef.current;
2963
+ internalGlobalMousePositionRef.current = {
2964
+ x: lerp(curG.x, tgtG.x, LERP_T),
2965
+ y: lerp(curG.y, tgtG.y, LERP_T)
2966
+ };
2967
+ }
2968
+ // Imperative style update with the smoothed values
2969
+ updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
2970
+ mouseOffset: internalMouseOffsetRef.current,
2971
+ globalMousePosition: internalGlobalMousePositionRef.current,
2972
+ glassSize: glassSize,
2973
+ isHovered: isHovered,
2974
+ isActive: isActive,
2975
+ isOverLight: overLightConfig.isOverLight,
2976
+ baseOverLightConfig: overLightConfig,
2977
+ effectiveBorderRadius: effectiveBorderRadius,
2978
+ effectiveWithoutEffects: effectiveWithoutEffects,
2979
+ effectiveReducedMotion: effectiveReducedMotion,
2980
+ elasticity: elasticity,
2981
+ directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
2982
+ onClick: onClick,
2983
+ withLiquidBlur: withLiquidBlur,
2984
+ blurAmount: blurAmount,
2985
+ saturation: saturation,
2986
+ padding: padding
2987
+ }), lerpRafRef.current = requestAnimationFrame(tick);
3000
2988
  };
3001
- // Calculate offset relative to this container
3002
- // Store in refs instead of state
3003
- internalMouseOffsetRef.current = newOffset, internalGlobalMousePositionRef.current = globalPos,
3004
- // Imperative style update
3005
- updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
3006
- mouseOffset: newOffset,
3007
- globalMousePosition: globalPos,
3008
- glassSize: glassSize,
3009
- isHovered: isHovered,
3010
- isActive: isActive,
3011
- isOverLight: baseOverLightConfig.isOverLight,
3012
- baseOverLightConfig: baseOverLightConfig,
3013
- effectiveBorderRadius: effectiveBorderRadius,
3014
- effectiveWithoutEffects: effectiveWithoutEffects,
3015
- effectiveReducedMotion: effectiveReducedMotion,
3016
- elasticity: elasticity,
3017
- directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
3018
- // Simplified directional scale for fast path
3019
- onClick: onClick,
3020
- withLiquidBlur: withLiquidBlur,
3021
- blurAmount: blurAmount,
3022
- saturation: saturation,
3023
- padding: padding
3024
- });
3025
- }), [ mouseContainer, glassRef, wrapperRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects, glassSize, isHovered, isActive, baseOverLightConfig, effectiveBorderRadius, effectiveReducedMotion, elasticity, onClick, withLiquidBlur, blurAmount, saturation, padding ]);
2989
+ // 0.08 lower = more viscous
2990
+ lerpRafRef.current = requestAnimationFrame(tick);
2991
+ }), [ glassRef, wrapperRef, glassSize, isHovered, isActive, overLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, onClick, withLiquidBlur, blurAmount, saturation, padding ]), stopLerpLoop = React.useCallback((() => {
2992
+ lerpActiveRef.current = !1, null !== lerpRafRef.current && (cancelAnimationFrame(lerpRafRef.current),
2993
+ lerpRafRef.current = null);
2994
+ }), []);
3026
2995
  /**
3027
2996
  * Validate and clamp a numeric config value
3028
2997
  */
@@ -3030,7 +2999,10 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3030
2999
  React.useEffect((() => {
3031
3000
  if (externalGlobalMousePosition && externalMouseOffset) return;
3032
3001
  if (effectiveWithoutEffects) return;
3033
- const unsubscribe = globalMouseTracker.subscribe(handleGlobalMousePosition), container = mouseContainer?.current || glassRef.current;
3002
+ const unsubscribe = globalMouseTracker.subscribe(handleGlobalMousePosition);
3003
+ // Start the lerp loop — it will smoothly chase the target
3004
+ startLerpLoop();
3005
+ const container = mouseContainer?.current || glassRef.current;
3034
3006
  let resizeObserver = null;
3035
3007
  return container && "undefined" != typeof ResizeObserver && (resizeObserver = new ResizeObserver((() => {
3036
3008
  null !== updateRectRef.current && cancelAnimationFrame(updateRectRef.current), updateRectRef.current = requestAnimationFrame((() => {
@@ -3038,10 +3010,10 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3038
3010
  container && (cachedRectRef.current = container.getBoundingClientRect()), updateRectRef.current = null;
3039
3011
  }));
3040
3012
  })), resizeObserver.observe(container)), () => {
3041
- unsubscribe(), null !== updateRectRef.current && (cancelAnimationFrame(updateRectRef.current),
3013
+ unsubscribe(), stopLerpLoop(), null !== updateRectRef.current && (cancelAnimationFrame(updateRectRef.current),
3042
3014
  updateRectRef.current = null), resizeObserver && resizeObserver.disconnect();
3043
3015
  };
3044
- }), [ handleGlobalMousePosition, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]),
3016
+ }), [ handleGlobalMousePosition, startLerpLoop, stopLerpLoop, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]),
3045
3017
  // Also call updateStyles on other state changes (hover, active, etc)
3046
3018
  React.useEffect((() => {
3047
3019
  updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
@@ -3050,22 +3022,22 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3050
3022
  glassSize: glassSize,
3051
3023
  isHovered: isHovered,
3052
3024
  isActive: isActive,
3053
- isOverLight: baseOverLightConfig.isOverLight,
3054
- baseOverLightConfig: baseOverLightConfig,
3025
+ isOverLight: overLightConfig.isOverLight,
3026
+ baseOverLightConfig: overLightConfig,
3055
3027
  effectiveBorderRadius: effectiveBorderRadius,
3056
3028
  effectiveWithoutEffects: effectiveWithoutEffects,
3057
3029
  effectiveReducedMotion: effectiveReducedMotion,
3058
3030
  elasticity: elasticity,
3059
- directionalScale: directionalScale,
3031
+ directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
3060
3032
  onClick: onClick,
3061
3033
  withLiquidBlur: withLiquidBlur,
3062
3034
  blurAmount: blurAmount,
3063
3035
  saturation: saturation,
3064
3036
  padding: padding
3065
3037
  });
3066
- }), [ isHovered, isActive, glassSize, baseOverLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, directionalScale, wrapperRef, glassRef, externalMouseOffset, externalGlobalMousePosition, withLiquidBlur, blurAmount, saturation, padding, onClick ]);
3038
+ }), [ isHovered, isActive, glassSize, overLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, wrapperRef, glassRef, externalMouseOffset, externalGlobalMousePosition, withLiquidBlur, blurAmount, saturation, padding, onClick ]);
3067
3039
  // Event handlers
3068
- const handleMouseEnter = React.useCallback((() => setIsHovered(!0)), []), handleMouseLeave = React.useCallback((() => setIsHovered(!1)), []), handleMouseDown = React.useCallback((() => setIsActive(!0)), []), handleMouseUp = React.useCallback((() => setIsActive(!1)), []), handleMouseMove = React.useCallback((_e => {}), []), handleKeyDown = React.useCallback((e => {
3040
+ const handleMouseEnter = React.useCallback((() => setIsHovered(!0)), []), handleMouseLeave = React.useCallback((() => setIsHovered(!1)), []), handleMouseDown = React.useCallback((() => setIsActive(!0)), []), handleMouseUp = React.useCallback((() => setIsActive(!1)), []), handleKeyDown = React.useCallback((e => {
3069
3041
  !onClick || "Enter" !== e.key && " " !== e.key || (e.preventDefault(), onClick());
3070
3042
  }), [ onClick ]);
3071
3043
  return {
@@ -3083,14 +3055,11 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3083
3055
  mouseOffset: mouseOffset,
3084
3056
  // This is now static (refs or props) unless prop changes
3085
3057
  overLightConfig: overLightConfig,
3086
- elasticTranslation: elasticTranslation,
3087
- directionalScale: directionalScale,
3088
3058
  transformStyle: transformStyle,
3089
3059
  handleMouseEnter: handleMouseEnter,
3090
3060
  handleMouseLeave: handleMouseLeave,
3091
3061
  handleMouseDown: handleMouseDown,
3092
3062
  handleMouseUp: handleMouseUp,
3093
- handleMouseMove: handleMouseMove,
3094
3063
  handleKeyDown: handleKeyDown
3095
3064
  };
3096
3065
  }
@@ -3188,25 +3157,56 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3188
3157
  withLiquidBlur: withLiquidBlur,
3189
3158
  padding: padding,
3190
3159
  style: style
3191
- }), isOverLight = React.useMemo((() => overLightConfig?.isOverLight), [ overLight ]), shouldRenderOverLightLayers = withOverLightLayers && isOverLight, baseStyle = {
3192
- ...style,
3193
- ...!effectiveWithoutEffects && {
3194
- transform: transformStyle
3160
+ }), isOverLight = React.useMemo((() => overLightConfig.isOverLight), [ overLightConfig.isOverLight ]), shouldRenderOverLightLayers = withOverLightLayers && isOverLight, {zIndex: customZIndex, ...restStyle} = style, isFixedOrSticky = "fixed" === restStyle.position || "sticky" === restStyle.position, rootLayoutStyle = React.useMemo((() => {
3161
+ if (!isFixedOrSticky) return {};
3162
+ const {position: p, top: t, left: l, right: r, bottom: b} = restStyle;
3163
+ return {
3164
+ ...p && {
3165
+ position: p
3166
+ },
3167
+ ...void 0 !== t && {
3168
+ top: t
3169
+ },
3170
+ ...void 0 !== l && {
3171
+ left: l
3172
+ },
3173
+ ...void 0 !== r && {
3174
+ right: r
3175
+ },
3176
+ ...void 0 !== b && {
3177
+ bottom: b
3178
+ }
3179
+ };
3180
+ }), [ isFixedOrSticky, restStyle ]), baseStyle = React.useMemo((() => {
3181
+ if (isFixedOrSticky) {
3182
+ const {position: _p, top: _t, left: _l, right: _r, bottom: _b, ...visualStyle} = restStyle;
3183
+ return {
3184
+ ...visualStyle,
3185
+ ...!effectiveWithoutEffects && {
3186
+ transform: transformStyle
3187
+ }
3188
+ };
3195
3189
  }
3196
- }, 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 = React.useMemo((() => ({
3197
- position: style.position || "absolute",
3198
- top: style.top || 0,
3199
- left: style.left || 0
3200
- })), [ style.position, style.top, style.left ]), adjustedSize = React.useMemo((() => {
3190
+ return {
3191
+ ...restStyle,
3192
+ ...!effectiveWithoutEffects && {
3193
+ transform: transformStyle
3194
+ }
3195
+ };
3196
+ }), [ 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 = React.useMemo((() => ({
3197
+ position: isFixedOrSticky ? "absolute" : restStyle.position || "absolute",
3198
+ top: isFixedOrSticky ? 0 : restStyle.top || 0,
3199
+ left: isFixedOrSticky ? 0 : restStyle.left || 0
3200
+ })), [ isFixedOrSticky, restStyle.position, restStyle.top, restStyle.left ]), adjustedSize = React.useMemo((() => {
3201
3201
  const resolveSize = (propValue, styleValue, measuredSize) => {
3202
3202
  const explicitSize = propValue ?? styleValue;
3203
3203
  return void 0 !== explicitSize ? "number" == typeof explicitSize ? `${explicitSize}px` : explicitSize : "fixed" === positionStyles.position ? `${Math.max(measuredSize, 0)}px` : "100%";
3204
3204
  };
3205
3205
  return {
3206
- width: resolveSize(width, style.width, glassSize.width),
3207
- height: resolveSize(height, style.height, glassSize.height)
3206
+ width: resolveSize(width, restStyle.width, glassSize.width),
3207
+ height: resolveSize(height, restStyle.height, glassSize.height)
3208
3208
  };
3209
- }), [ width, height, style.width, style.height, positionStyles.position, glassSize.width, glassSize.height ]), gradientValues = React.useMemo((() => {
3209
+ }), [ width, height, restStyle.width, restStyle.height, positionStyles.position, glassSize.width, glassSize.height ]), gradientValues = React.useMemo((() => {
3210
3210
  const mx = mouseOffset.x, my = mouseOffset.y, absMx = Math.abs(mx), absMy = Math.abs(my), GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT;
3211
3211
  return {
3212
3212
  borderGradientAngle: GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER,
@@ -3248,6 +3248,9 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3248
3248
  }), [ isHovered, isActive, isOverLight, overLightConfig.opacity ]), glassVars = React.useMemo((() => {
3249
3249
  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;
3250
3250
  return {
3251
+ ...void 0 !== customZIndex && {
3252
+ "--atomix-glass-base-z-index": customZIndex
3253
+ },
3251
3254
  "--atomix-glass-radius": `${effectiveBorderRadius}px`,
3252
3255
  "--atomix-glass-transform": transformStyle || "none",
3253
3256
  "--atomix-glass-position": positionStyles.position,
@@ -3268,22 +3271,19 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3268
3271
  "--atomix-glass-base-opacity": opacityValues.base,
3269
3272
  "--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})`,
3270
3273
  "--atomix-glass-overlay-opacity": opacityValues.over,
3271
- "--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})`
3274
+ "--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})`,
3275
+ "--atomix-glass-overlay-highlight-opacity": opacityValues.over * ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.OPACITY_MULTIPLIER,
3276
+ "--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}%)`
3272
3277
  };
3273
- }), [ gradientValues, opacityValues, effectiveBorderRadius, transformStyle, positionStyles, adjustedSize, isOverLight, overLightConfig.borderOpacity ]), renderBackgroundLayer = layerType => jsxRuntime.jsx("div", {
3274
- 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(" "),
3275
- style: {
3276
- ...positionStyles,
3277
- height: adjustedSize.height,
3278
- width: adjustedSize.width,
3279
- borderRadius: `${effectiveBorderRadius}px`,
3280
- transform: baseStyle.transform
3281
- }
3278
+ }), [ gradientValues, opacityValues, effectiveBorderRadius, transformStyle, positionStyles, adjustedSize, isOverLight, overLightConfig.borderOpacity, customZIndex ]), renderBackgroundLayer = layerType => jsxRuntime.jsx("div", {
3279
+ 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(" ")
3282
3280
  });
3283
3281
  return jsxRuntime.jsxs("div", {
3284
3282
  ...rest,
3285
3283
  className: componentClassName,
3286
- style: glassVars,
3284
+ style: {
3285
+ ...glassVars
3286
+ },
3287
3287
  role: role || (onClick ? "button" : void 0),
3288
3288
  tabIndex: onClick ? tabIndex ?? 0 : tabIndex,
3289
3289
  "aria-label": ariaLabel,
@@ -3295,7 +3295,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3295
3295
  ref: glassRef,
3296
3296
  contentRef: contentRef,
3297
3297
  className: className,
3298
- style: baseStyle,
3298
+ style: rootLayoutStyle,
3299
3299
  borderRadius: effectiveBorderRadius,
3300
3300
  displacementScale: effectiveWithoutEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT : isOverLight ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.OVER_LIGHT_DISPLACEMENT : displacementScale,
3301
3301
  blurAmount: effectiveWithoutEffects ? 0 : blurAmount,
@@ -3330,7 +3330,6 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3330
3330
  effectiveWithoutEffects: effectiveWithoutEffects,
3331
3331
  effectiveReducedMotion: effectiveReducedMotion,
3332
3332
  shaderVariant: shaderVariant,
3333
- elasticity: elasticity,
3334
3333
  withLiquidBlur: withLiquidBlur,
3335
3334
  children: children
3336
3335
  }), Boolean(onClick) && jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -3347,11 +3346,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3347
3346
  }), jsxRuntime.jsx("div", {
3348
3347
  className: ATOMIX_GLASS.OVERLAY_LAYER_CLASS
3349
3348
  }), jsxRuntime.jsx("div", {
3350
- className: ATOMIX_GLASS.OVERLAY_HIGHLIGHT_CLASS,
3351
- style: {
3352
- opacity: opacityValues.over * ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.OPACITY_MULTIPLIER,
3353
- 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}%)`
3354
- }
3349
+ className: ATOMIX_GLASS.OVERLAY_HIGHLIGHT_CLASS
3355
3350
  }) ]
3356
3351
  }), withBorder && jsxRuntime.jsxs(jsxRuntime.Fragment, {
3357
3352
  children: [ jsxRuntime.jsx("span", {
@@ -4124,7 +4119,7 @@ const BreadcrumbItem = React.forwardRef((({children: children, href: href, acti
4124
4119
 
4125
4120
  BreadcrumbItem.displayName = "BreadcrumbItem";
4126
4121
 
4127
- const Breadcrumb = React.memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style, children: children}) {
4122
+ const Breadcrumb = React.memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", linkComponent: linkComponent, style: style, children: children}) {
4128
4123
  const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
4129
4124
  let content;
4130
4125
  if (items && items.length > 0)
@@ -4138,7 +4133,7 @@ const Breadcrumb = React.memo((function({items: items, divider: divider, classN
4138
4133
  onClick: item.onClick,
4139
4134
  className: item.className,
4140
4135
  style: item.style,
4141
- linkAs: LinkComponent,
4136
+ linkAs: linkComponent,
4142
4137
  children: item.label
4143
4138
  }, index);
4144
4139
  })); else {
@@ -4148,7 +4143,7 @@ const Breadcrumb = React.memo((function({items: items, divider: divider, classN
4148
4143
  if ( React.isValidElement(child)) {
4149
4144
  const isLast = index === childrenCount - 1, childProps = child.props, {active: active, linkAs: linkAs, ...otherProps} = childProps, newProps = {
4150
4145
  active: active ?? (!!isLast || void 0),
4151
- linkAs: linkAs ?? LinkComponent
4146
+ linkAs: linkAs ?? linkComponent
4152
4147
  };
4153
4148
 
4154
4149
  return React.cloneElement(child, newProps);
@@ -4324,7 +4319,7 @@ class ThemeNaming {
4324
4319
 
4325
4320
  ThemeNaming.prefix = "atomix";
4326
4321
 
4327
- const Button = React__default.default.memo( React.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) => {
4322
+ const Button = React__default.default.memo( React.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) => {
4328
4323
  const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = iconName ? jsxRuntime.jsx(Icon, {
4329
4324
  name: iconName,
4330
4325
  size: iconSize
@@ -4375,12 +4370,12 @@ const Button = React__default.default.memo( React.forwardRef((({label: label, c
4375
4370
  let content;
4376
4371
  // Render as anchor if href is provided
4377
4372
  if (shouldRenderAsLink)
4378
- // Use custom LinkComponent if provided (e.g., Next.js Link)
4379
- if (LinkComponent) {
4380
- const LinkComp = LinkComponent, linkProps = {
4373
+ // Use custom linkComponent if provided (e.g., Next.js Link)
4374
+ if (linkComponent) {
4375
+ const LinkComp = linkComponent, linkProps = {
4381
4376
  ...buttonProps,
4382
4377
  ref: ref,
4383
- // LinkComponent usually forwards ref to anchor
4378
+ // linkComponent usually forwards ref to anchor
4384
4379
  href: href,
4385
4380
  to: href,
4386
4381
  target: target,
@@ -4678,7 +4673,7 @@ header: header, image: image, imageAlt: imageAlt = "", title: title, text: text,
4678
4673
  // Interaction
4679
4674
  onClick: onClick, onHover: onHover, onFocus: onFocus, href: href, target: target,
4680
4675
  // Custom Link
4681
- LinkComponent: LinkComponent,
4676
+ linkComponent: linkComponent,
4682
4677
  // Glass
4683
4678
  glass: glass,
4684
4679
  // Accessibility
@@ -4763,8 +4758,8 @@ className: className = "", style: style, ...rest}, ref) => {
4763
4758
  // Render as anchor if href is provided
4764
4759
  if (href && !isDisabled) {
4765
4760
  let anchorElement;
4766
- if (LinkComponent) {
4767
- const LinkComp = LinkComponent;
4761
+ if (linkComponent) {
4762
+ const LinkComp = linkComponent;
4768
4763
  anchorElement = jsxRuntime.jsx(LinkComp, {
4769
4764
  ...commonProps,
4770
4765
  ref: ref,
@@ -9869,7 +9864,7 @@ DropdownTrigger.displayName = "DropdownTrigger";
9869
9864
  /**
9870
9865
  * DropdownItem component for menu items
9871
9866
  */
9872
- const DropdownItem = React.memo((({children: children, href: href, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", LinkComponent: LinkComponent, ...props}) => {
9867
+ const DropdownItem = React.memo((({children: children, href: href, target: target, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", linkComponent: linkComponent, ...props}) => {
9873
9868
  const {close: close} = React.useContext(DropdownContext), handleClick = e => {
9874
9869
  disabled ? e.preventDefault() : (onClick && onClick(e),
9875
9870
  // Always close the dropdown when an item is clicked
@@ -9877,6 +9872,7 @@ const DropdownItem = React.memo((({children: children, href: href, active: acti
9877
9872
  }, itemClasses = [ "c-dropdown__menu-item", active ? "is-active" : "", disabled ? "is-disabled" : "", className ].filter(Boolean).join(" "), linkProps = {
9878
9873
  href: href,
9879
9874
  to: href,
9875
+ target: target,
9880
9876
  className: itemClasses,
9881
9877
  onClick: handleClick,
9882
9878
  role: "menuitem",
@@ -9884,8 +9880,8 @@ const DropdownItem = React.memo((({children: children, href: href, active: acti
9884
9880
  ...props
9885
9881
  };
9886
9882
  return href && !disabled ? jsxRuntime.jsx("li", {
9887
- children: LinkComponent ? (() => {
9888
- const Component = LinkComponent;
9883
+ children: linkComponent ? (() => {
9884
+ const Component = linkComponent;
9889
9885
  return jsxRuntime.jsxs(Component, {
9890
9886
  ...linkProps,
9891
9887
  children: [ icon && jsxRuntime.jsx("span", {
@@ -12376,96 +12372,6 @@ const DEFAULT_ATOMIX_FONTS = [ {
12376
12372
  };
12377
12373
  }
12378
12374
 
12379
- /**
12380
- * Custom hook for managing GlassContainer state and interactions
12381
- */ function useGlassContainer(props) {
12382
- const {glassSize: glassSize = {
12383
- width: 270,
12384
- height: 69
12385
- }, elasticity: elasticity = .15, mouseContainer: mouseContainer, globalMousePos: externalGlobalMousePos, mouseOffset: externalMouseOffset} = props, filterId = React.useId(), glassRef = React.useRef(null), [isHovered, setIsHovered] = React.useState(!1), [isActive, setIsActive] = React.useState(!1), [currentGlassSize, setCurrentGlassSize] = React.useState(glassSize), [internalGlobalMousePos, setInternalGlobalMousePos] = React.useState({
12386
- x: 0,
12387
- y: 0
12388
- }), [internalMouseOffset, setInternalMouseOffset] = React.useState({
12389
- x: 0,
12390
- y: 0
12391
- }), globalMousePos = externalGlobalMousePos || internalGlobalMousePos, mouseOffset = externalMouseOffset || internalMouseOffset, handleMouseMove = React.useCallback((e => {
12392
- const container = mouseContainer?.current || glassRef.current;
12393
- if (!container) return;
12394
- const rect = container.getBoundingClientRect(), centerX = rect.left + rect.width / 2, centerY = rect.top + rect.height / 2;
12395
- setInternalMouseOffset({
12396
- x: (e.clientX - centerX) / rect.width * 100,
12397
- y: (e.clientY - centerY) / rect.height * 100
12398
- }), setInternalGlobalMousePos({
12399
- x: e.clientX,
12400
- y: e.clientY
12401
- });
12402
- }), [ mouseContainer ]);
12403
- // Set up mouse tracking if no external mouse position is provided
12404
- React.useEffect((() => {
12405
- if (externalGlobalMousePos && externalMouseOffset) return;
12406
- const container = mouseContainer?.current || glassRef.current;
12407
- return container ? (container.addEventListener("mousemove", handleMouseMove), () => container.removeEventListener("mousemove", handleMouseMove)) : void 0;
12408
- }), [ handleMouseMove, mouseContainer, externalGlobalMousePos, externalMouseOffset ]);
12409
- // Calculate directional scaling based on mouse position
12410
- const calculateDirectionalScale = React.useCallback((() => {
12411
- if (!globalMousePos.x || !globalMousePos.y || !glassRef.current) return "scale(1)";
12412
- 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);
12413
- if (edgeDistance > 200) return "scale(1)";
12414
- const fadeInFactor = 1 - edgeDistance / 200, centerDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
12415
- if (0 === centerDistance) return "scale(1)";
12416
- 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;
12417
- return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
12418
- }), [ globalMousePos, elasticity, currentGlassSize ]), calculateElasticTranslation = React.useCallback((() => {
12419
- if (!glassRef.current) return {
12420
- x: 0,
12421
- y: 0
12422
- };
12423
- 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;
12424
- return {
12425
- x: (globalMousePos.x - pillCenterX) * elasticity * .1 * fadeInFactor,
12426
- y: (globalMousePos.y - pillCenterY) * elasticity * .1 * fadeInFactor
12427
- };
12428
- }), [ globalMousePos, elasticity, currentGlassSize ]);
12429
- // Calculate elastic translation
12430
- // Update glass size
12431
- React.useEffect((() => {
12432
- const updateGlassSize = () => {
12433
- if (glassRef.current) {
12434
- const rect = glassRef.current.getBoundingClientRect();
12435
- setCurrentGlassSize({
12436
- width: rect.width,
12437
- height: rect.height
12438
- });
12439
- }
12440
- };
12441
- return updateGlassSize(), window.addEventListener("resize", updateGlassSize), () => window.removeEventListener("resize", updateGlassSize);
12442
- }), []);
12443
- const handleMouseEnter = React.useCallback((() => {
12444
- setIsHovered(!0);
12445
- }), []), handleMouseLeave = React.useCallback((() => {
12446
- setIsHovered(!1);
12447
- }), []), handleMouseDown = React.useCallback((() => {
12448
- setIsActive(!0);
12449
- }), []), handleMouseUp = React.useCallback((() => {
12450
- setIsActive(!1);
12451
- }), []);
12452
- return {
12453
- filterId: filterId,
12454
- glassRef: glassRef,
12455
- isHovered: isHovered,
12456
- isActive: isActive,
12457
- currentGlassSize: currentGlassSize,
12458
- globalMousePos: globalMousePos,
12459
- mouseOffset: mouseOffset,
12460
- calculateDirectionalScale: calculateDirectionalScale,
12461
- calculateElasticTranslation: calculateElasticTranslation,
12462
- handleMouseEnter: handleMouseEnter,
12463
- handleMouseLeave: handleMouseLeave,
12464
- handleMouseDown: handleMouseDown,
12465
- handleMouseUp: handleMouseUp
12466
- };
12467
- }
12468
-
12469
12375
  /**
12470
12376
  * Radio state and functionality
12471
12377
  * @param initialProps - Initial radio properties
@@ -12614,7 +12520,7 @@ const DEFAULT_ATOMIX_FONTS = [ {
12614
12520
  }
12615
12521
 
12616
12522
  function useSlider(options) {
12617
- 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 = React.useRef(null), wrapperRef = React.useRef(null), repositioningRef = React.useRef(!1), autoplayRef = React.useRef(null), [autoplayRunning, setAutoplayRunning] = React.useState(!1), sliderStateRef = React.useRef({
12523
+ 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 = React.useRef(null), wrapperRef = React.useRef(null), repositioningRef = React.useRef(!1), autoplayRef = React.useRef(null), [autoplayRunning, setAutoplayRunning] = React.useState(!1), sliderStateRef = React.useRef({
12618
12524
  isTransitioning: !1,
12619
12525
  loop: loop,
12620
12526
  slides: slides,
@@ -12958,7 +12864,6 @@ var composablesImport = Object.freeze({
12958
12864
  useEdgePanel: useEdgePanel,
12959
12865
  useForm: useForm,
12960
12866
  useFormGroup: useFormGroup,
12961
- useGlassContainer: useGlassContainer,
12962
12867
  useHero: useHero,
12963
12868
  useInput: useInput,
12964
12869
  useLineChart: useLineChart,
@@ -13314,7 +13219,60 @@ const Textarea = React.memo( React.forwardRef((({value: value, defaultValue: de
13314
13219
 
13315
13220
  Textarea.displayName = "Textarea";
13316
13221
 
13317
- /**
13222
+ // ─── Platform Maps ───────────────────────────────────────────────
13223
+ const PLATFORM_ICON_MAP = {
13224
+ facebook: "FacebookLogo",
13225
+ twitter: "TwitterLogo",
13226
+ instagram: "InstagramLogo",
13227
+ linkedin: "LinkedinLogo",
13228
+ youtube: "YoutubeLogo",
13229
+ github: "GithubLogo",
13230
+ discord: "DiscordLogo",
13231
+ tiktok: "TiktokLogo",
13232
+ pinterest: "PinterestLogo",
13233
+ snapchat: "SnapchatLogo",
13234
+ whatsapp: "WhatsappLogo",
13235
+ telegram: "TelegramLogo",
13236
+ reddit: "RedditLogo",
13237
+ twitch: "TwitchLogo",
13238
+ spotify: "SpotifyLogo",
13239
+ dribbble: "DribbbleLogo",
13240
+ behance: "BehanceLogo",
13241
+ medium: "MediumLogo",
13242
+ dev: "DevToLogo",
13243
+ codepen: "CodepenLogo"
13244
+ }, PLATFORM_LABEL_MAP = {
13245
+ facebook: "Facebook",
13246
+ twitter: "Twitter",
13247
+ instagram: "Instagram",
13248
+ linkedin: "LinkedIn",
13249
+ youtube: "YouTube",
13250
+ github: "GitHub",
13251
+ discord: "Discord",
13252
+ tiktok: "TikTok",
13253
+ pinterest: "Pinterest",
13254
+ snapchat: "Snapchat",
13255
+ whatsapp: "WhatsApp",
13256
+ telegram: "Telegram",
13257
+ reddit: "Reddit",
13258
+ twitch: "Twitch",
13259
+ spotify: "Spotify",
13260
+ dribbble: "Dribbble",
13261
+ behance: "Behance",
13262
+ medium: "Medium",
13263
+ dev: "Dev.to",
13264
+ codepen: "CodePen"
13265
+ }, getPlatformIcon = platform => {
13266
+ const iconName = PLATFORM_ICON_MAP[platform];
13267
+ return iconName ? jsxRuntime.jsx(Icon, {
13268
+ name: iconName
13269
+ }) : jsxRuntime.jsx(Icon, {
13270
+ name: "Link"
13271
+ });
13272
+ }, FooterSocialLink = React.forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13273
+ 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)
13274
+ // ─── Component ───────────────────────────────────────────────────
13275
+ /**
13318
13276
  * FooterSocialLink component provides styled social media links with platform-specific icons.
13319
13277
  *
13320
13278
  * @example
@@ -13322,30 +13280,7 @@ Textarea.displayName = "Textarea";
13322
13280
  * <FooterSocialLink platform="twitter" url="https://twitter.com/company" />
13323
13281
  * <FooterSocialLink platform="custom" url="https://example.com" icon={<CustomIcon />} label="Custom Platform" />
13324
13282
  * ```
13325
- */
13326
- const FooterSocialLink = React.forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13327
- 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 => ({
13328
- facebook: "Facebook",
13329
- twitter: "Twitter",
13330
- instagram: "Instagram",
13331
- linkedin: "LinkedIn",
13332
- youtube: "YouTube",
13333
- github: "GitHub",
13334
- discord: "Discord",
13335
- tiktok: "TikTok",
13336
- pinterest: "Pinterest",
13337
- snapchat: "Snapchat",
13338
- whatsapp: "WhatsApp",
13339
- telegram: "Telegram",
13340
- reddit: "Reddit",
13341
- twitch: "Twitch",
13342
- spotify: "Spotify",
13343
- dribbble: "Dribbble",
13344
- behance: "Behance",
13345
- medium: "Medium",
13346
- dev: "Dev.to",
13347
- codepen: "CodePen"
13348
- }[platform] || platform))(platform)}`;
13283
+ */ (platform)}`;
13349
13284
  return jsxRuntime.jsxs("a", {
13350
13285
  ref: ref,
13351
13286
  href: disabled ? void 0 : url,
@@ -13357,35 +13292,7 @@ const FooterSocialLink = React.forwardRef((({platform: platform, url: url, icon
13357
13292
  ...props,
13358
13293
  children: [ jsxRuntime.jsx("span", {
13359
13294
  className: "c-footer__social-link-icon",
13360
- children: icon || (platform => {
13361
- const iconName = {
13362
- facebook: "FacebookLogo",
13363
- twitter: "TwitterLogo",
13364
- instagram: "InstagramLogo",
13365
- linkedin: "LinkedinLogo",
13366
- youtube: "YoutubeLogo",
13367
- github: "GithubLogo",
13368
- discord: "DiscordLogo",
13369
- tiktok: "TiktokLogo",
13370
- pinterest: "PinterestLogo",
13371
- snapchat: "SnapchatLogo",
13372
- whatsapp: "WhatsappLogo",
13373
- telegram: "TelegramLogo",
13374
- reddit: "RedditLogo",
13375
- twitch: "TwitchLogo",
13376
- spotify: "SpotifyLogo",
13377
- dribbble: "DribbbleLogo",
13378
- behance: "BehanceLogo",
13379
- medium: "MediumLogo",
13380
- dev: "DevToLogo",
13381
- codepen: "CodepenLogo"
13382
- }[platform];
13383
- return iconName ? jsxRuntime.jsx(Icon, {
13384
- name: iconName
13385
- }) : jsxRuntime.jsx(Icon, {
13386
- name: "Link"
13387
- });
13388
- })(platform)
13295
+ children: icon || getPlatformIcon(platform)
13389
13296
  }), jsxRuntime.jsx("span", {
13390
13297
  className: "c-footer__social-link-label u-visually-hidden",
13391
13298
  children: ariaLabel
@@ -13508,17 +13415,83 @@ Row.displayName = "Row";
13508
13415
  * ```
13509
13416
  */
13510
13417
  const Footer = React.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) => {
13511
- const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop, socialLinks: footerSocialLinks} = function(options = {}) {
13512
- 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;
13513
- // Generate footer classes
13418
+ const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, getResponsiveColumnProps: getResponsiveColumnProps, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop} = function(options = {}) {
13419
+ 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 = React.useMemo((() => {
13420
+ const layoutKey = layout.toUpperCase(), sizeKey = size.toUpperCase();
13421
+ 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(" ");
13422
+ }), [ layout, variant, size, sticky, showNewsletter, glass, className ]), containerClass = FOOTER.CLASSES.CONTAINER, brandClass = FOOTER.CLASSES.BRAND, sectionsClass = React.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 = React.useMemo((() =>
13423
+ /**
13424
+ * Resolves grid column size map for a given layout.
13425
+ */
13426
+ function(layout, showNewsletter) {
13427
+ switch (layout) {
13428
+ case "columns":
13429
+ default:
13430
+ return {
13431
+ brand: 4,
13432
+ content: showNewsletter ? 4 : 8,
13433
+ newsletter: showNewsletter ? 4 : 0
13434
+ };
13435
+
13436
+ case "centered":
13437
+ case "minimal":
13438
+ case "stacked":
13439
+ return {
13440
+ brand: 12,
13441
+ content: 12,
13442
+ newsletter: showNewsletter ? 12 : 0
13443
+ };
13444
+
13445
+ case "flexible":
13514
13446
  return {
13515
- 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(" "),
13516
- containerClass: FOOTER.CLASSES.CONTAINER,
13517
- brandClass: FOOTER.CLASSES.BRAND,
13518
- 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(" "),
13519
- bottomClass: FOOTER.CLASSES.BOTTOM,
13447
+ brand: "auto",
13448
+ content: "auto",
13449
+ newsletter: "auto"
13450
+ };
13451
+
13452
+ case "sidebar":
13453
+ return {
13454
+ brand: 3,
13455
+ content: 9,
13456
+ newsletter: showNewsletter ? 9 : 0
13457
+ };
13458
+
13459
+ case "wide":
13460
+ return {
13461
+ brand: 3,
13462
+ content: 6,
13463
+ newsletter: showNewsletter ? 3 : 0
13464
+ };
13465
+ }
13466
+ }
13467
+ /**
13468
+ * Computes responsive GridCol props for a given column type.
13469
+ */ (layout, showNewsletter)), [ layout, showNewsletter ]);
13470
+ // ---------- CSS class strings ----------
13471
+ return {
13472
+ // Classes
13473
+ footerClass: footerClass,
13474
+ containerClass: containerClass,
13475
+ brandClass: brandClass,
13476
+ sectionsClass: sectionsClass,
13477
+ bottomClass: bottomClass,
13478
+ // Grid helpers
13479
+ columnSizes: columnSizes,
13480
+ getResponsiveColumnProps: columnType => function(columnType, layout, columnSizes) {
13481
+ return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13482
+ xs: 12,
13483
+ sm: !0,
13484
+ md: !0
13485
+ } : {
13486
+ xs: 12,
13487
+ md: "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12
13488
+ };
13489
+ }(columnType, layout, columnSizes)
13490
+ // ---------- Handlers ----------
13491
+ ,
13492
+ // Handlers
13520
13493
  handleNewsletterSubmit: email => {
13521
- onNewsletterSubmit && onNewsletterSubmit(email);
13494
+ onNewsletterSubmit?.(email);
13522
13495
  },
13523
13496
  handleBackToTop: () => {
13524
13497
  onBackToTop ? onBackToTop() : window.scrollTo({
@@ -13526,8 +13499,11 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13526
13499
  behavior: "smooth"
13527
13500
  });
13528
13501
  },
13502
+ // Pass-through state
13529
13503
  socialLinks: socialLinks,
13530
- showNewsletter: showNewsletter
13504
+ showNewsletter: showNewsletter,
13505
+ showBackToTop: showBackToTop,
13506
+ showDivider: showDivider
13531
13507
  };
13532
13508
  }({
13533
13509
  layout: layout,
@@ -13536,73 +13512,19 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13536
13512
  sticky: sticky,
13537
13513
  showNewsletter: showNewsletter,
13538
13514
  showBackToTop: showBackToTop,
13515
+ showDivider: showDivider,
13539
13516
  socialLinks: socialLinks,
13540
13517
  onNewsletterSubmit: onNewsletterSubmit,
13541
13518
  onBackToTop: onBackToTop,
13519
+ glass: Boolean(glass),
13542
13520
  className: className
13543
- }), columnSizes = (() => {
13544
- switch (layout) {
13545
- case "columns":
13546
- default:
13547
- return {
13548
- brand: 4,
13549
- content: showNewsletter ? 4 : 8,
13550
- newsletter: showNewsletter ? 4 : 0
13551
- };
13552
-
13553
- case "centered":
13554
- case "minimal":
13555
- case "stacked":
13556
- // For stacked layout, everything takes full width but stacked vertically
13557
- return {
13558
- brand: 12,
13559
- content: 12,
13560
- newsletter: showNewsletter ? 12 : 0
13561
- };
13562
-
13563
- case "flexible":
13564
- // For flexible layout, adjust based on content
13565
- return {
13566
- brand: "auto",
13567
- content: "auto",
13568
- newsletter: "auto"
13569
- };
13570
-
13571
- case "sidebar":
13572
- // For sidebar layout, brand on left, content and newsletter on right
13573
- return {
13574
- brand: 3,
13575
- content: 9,
13576
- newsletter: showNewsletter ? 9 : 0
13577
- };
13578
-
13579
- case "wide":
13580
- // For wide layout, content takes more space
13581
- return {
13582
- brand: 3,
13583
- content: 6,
13584
- newsletter: showNewsletter ? 3 : 0
13585
- };
13586
- }
13587
- })(), getResponsiveColumnProps = columnType => {
13588
- const baseMd = "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12;
13589
- // For flexible layout, we want auto-sizing
13590
- return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13591
- xs: 12,
13592
- sm: !0,
13593
- md: !0
13594
- } : {
13595
- xs: 12,
13596
- md: baseMd
13597
- };
13598
- // For other layouts, we use specific sizes
13599
- }, footerContent = jsxRuntime.jsxs("div", {
13521
+ }), footerContent = jsxRuntime.jsxs("div", {
13600
13522
  className: containerClass,
13601
13523
  children: [ jsxRuntime.jsxs(Grid, {
13602
13524
  className: sectionsClass,
13603
13525
  alignItems: "start",
13604
13526
  justifyContent: "centered" === layout ? "center" : void 0,
13605
- children: [ (brand || brandLogo || brandDescription) && jsxRuntime.jsxs(GridCol, {
13527
+ children: [ brand || brandLogo || brandDescription ? jsxRuntime.jsxs(GridCol, {
13606
13528
  ...getResponsiveColumnProps("brand"),
13607
13529
  className: brandClass,
13608
13530
  children: [ brandLogo && jsxRuntime.jsx("div", {
@@ -13630,19 +13552,17 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13630
13552
  size: size
13631
13553
  }, `${link.platform}-${index}`)))
13632
13554
  }) ]
13633
- }), children && jsxRuntime.jsx(GridCol, {
13555
+ }) : null, children ? jsxRuntime.jsx(GridCol, {
13634
13556
  ...getResponsiveColumnProps("content"),
13635
13557
  className: "c-footer__content",
13636
13558
  children: jsxRuntime.jsx(Grid, {
13637
13559
  className: "c-footer__sections",
13638
13560
  alignItems: "centered" === layout || "stacked" === layout ? "center" : void 0,
13639
- children: React__default.default.Children.map(children, (child =>
13640
- // Check if the child is a valid React element
13641
- React__default.default.isValidElement(child) ? React__default.default.cloneElement(child, {
13561
+ children: React__default.default.Children.map(children, (child => React__default.default.isValidElement(child) ? React__default.default.cloneElement(child, {
13642
13562
  showNewsletter: showNewsletter
13643
13563
  }) : child))
13644
13564
  })
13645
- }), showNewsletter && jsxRuntime.jsxs(GridCol, {
13565
+ }) : null, showNewsletter ? jsxRuntime.jsxs(GridCol, {
13646
13566
  ...getResponsiveColumnProps("newsletter"),
13647
13567
  className: "c-footer__newsletter",
13648
13568
  children: [ jsxRuntime.jsx("h4", {
@@ -13673,32 +13593,41 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13673
13593
  }) ]
13674
13594
  })
13675
13595
  }) ]
13676
- }) ]
13677
- }), (copyright || showBackToTop) && jsxRuntime.jsxs("div", {
13678
- className: bottomClass,
13679
- children: [ copyright && jsxRuntime.jsx("div", {
13680
- className: "c-footer__copyright",
13681
- children: copyright
13682
- }), showBackToTop && jsxRuntime.jsxs(Button, {
13683
- variant: "ghost",
13684
- className: "c-footer__back-to-top",
13685
- onClick: handleBackToTop,
13686
- disabled: disabled,
13687
- "aria-label": backToTopText,
13688
- children: [ jsxRuntime.jsx("span", {
13689
- className: "c-footer__back-to-top-icon",
13690
- children: "↑"
13691
- }), jsxRuntime.jsx("span", {
13692
- className: "c-footer__back-to-top-text",
13693
- children: backToTopText
13596
+ }) : null ]
13597
+ }), copyright || showBackToTop ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
13598
+ children: [ showDivider && jsxRuntime.jsx("hr", {
13599
+ className: "c-footer__divider"
13600
+ }), jsxRuntime.jsxs("div", {
13601
+ className: bottomClass,
13602
+ children: [ copyright && jsxRuntime.jsx("div", {
13603
+ className: "c-footer__copyright",
13604
+ children: copyright
13605
+ }), showBackToTop && jsxRuntime.jsxs(Button, {
13606
+ variant: "ghost",
13607
+ className: "c-footer__back-to-top",
13608
+ onClick: handleBackToTop,
13609
+ disabled: disabled,
13610
+ "aria-label": backToTopText,
13611
+ children: [ jsxRuntime.jsx("span", {
13612
+ className: "c-footer__back-to-top-icon",
13613
+ children: "↑"
13614
+ }), jsxRuntime.jsx("span", {
13615
+ className: "c-footer__back-to-top-text",
13616
+ children: backToTopText
13617
+ }) ]
13694
13618
  }) ]
13695
13619
  }) ]
13696
- }) ]
13620
+ }) : null ]
13697
13621
  });
13698
- // Calculate grid column sizes based on layout
13699
- return jsxRuntime.jsx("footer", {
13622
+ // ──────────────────────────────────────────
13623
+ // Render helpers
13624
+ // ──────────────────────────────────────────
13625
+ // ──────────────────────────────────────────
13626
+ // Root element
13627
+ // ──────────────────────────────────────────
13628
+ return jsxRuntime.jsx("footer", {
13700
13629
  ref: ref,
13701
- className: footerClass + " c-footer " + (glass ? "c-footer--glass" : ""),
13630
+ className: footerClass,
13702
13631
  ...props,
13703
13632
  children: glass ? jsxRuntime.jsx(AtomixGlass, {
13704
13633
  ...glass,
@@ -13946,7 +13875,7 @@ var layouts = Object.freeze({
13946
13875
  * </FooterSection>
13947
13876
  * ```
13948
13877
  */ const FooterSection = React.forwardRef((({title: title, icon: icon, collapsible: collapsible = !1, defaultCollapsed: defaultCollapsed = !1, showNewsletter: showNewsletter = !1, children: children, className: className = "", ...props}, ref) => {
13949
- const [isCollapsed, setIsCollapsed] = React__default.default.useState(defaultCollapsed), sectionClass = [ "c-footer__section", collapsible && "c-footer__section--collapsible", isCollapsed && "c-footer__section--collapsed", className ].filter(Boolean).join(" ");
13878
+ const [isCollapsed, setIsCollapsed] = React.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(" ");
13950
13879
  return jsxRuntime.jsx(GridCol, {
13951
13880
  xs: 12,
13952
13881
  md: showNewsletter ? 6 : 3,
@@ -13955,16 +13884,16 @@ var layouts = Object.freeze({
13955
13884
  ref: ref,
13956
13885
  className: sectionClass,
13957
13886
  ...props,
13958
- children: [ title && jsxRuntime.jsx("div", {
13887
+ children: [ title ? collapsible ? jsxRuntime.jsx("div", {
13959
13888
  className: "c-footer__section-header",
13960
- children: collapsible ? jsxRuntime.jsxs("button", {
13889
+ children: jsxRuntime.jsxs("button", {
13961
13890
  type: "button",
13962
13891
  className: "c-footer__section-toggle",
13963
13892
  onClick: () => {
13964
- collapsible && setIsCollapsed(!isCollapsed);
13893
+ collapsible && setIsCollapsed((prev => !prev));
13965
13894
  },
13966
13895
  "aria-expanded": !isCollapsed,
13967
- "aria-controls": `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}`,
13896
+ "aria-controls": sectionId,
13968
13897
  children: [ icon && jsxRuntime.jsx("span", {
13969
13898
  className: "c-footer__section-icon",
13970
13899
  children: icon
@@ -13975,7 +13904,10 @@ var layouts = Object.freeze({
13975
13904
  className: "c-footer__section-chevron",
13976
13905
  children: isCollapsed ? "▼" : "▲"
13977
13906
  }) ]
13978
- }) : jsxRuntime.jsxs("div", {
13907
+ })
13908
+ }) : jsxRuntime.jsx("div", {
13909
+ className: "c-footer__section-header",
13910
+ children: jsxRuntime.jsxs("div", {
13979
13911
  className: "c-footer__section-header-content",
13980
13912
  children: [ icon && jsxRuntime.jsx("span", {
13981
13913
  className: "c-footer__section-icon",
@@ -13985,12 +13917,9 @@ var layouts = Object.freeze({
13985
13917
  children: title
13986
13918
  }) ]
13987
13919
  })
13988
- }), jsxRuntime.jsx("div", {
13920
+ }) : null, jsxRuntime.jsx("div", {
13989
13921
  className: "c-footer__section-content",
13990
- id: title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}` : void 0,
13991
- style: {
13992
- display: collapsible && isCollapsed ? "none" : "flex"
13993
- },
13922
+ id: sectionId,
13994
13923
  children: children
13995
13924
  }) ]
13996
13925
  })
@@ -14009,8 +13938,8 @@ FooterSection.displayName = "FooterSection";
14009
13938
  * </FooterLink>
14010
13939
  * ```
14011
13940
  */
14012
- const FooterLink = React.forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", LinkComponent: LinkComponent, ...props}, ref) => {
14013
- const linkProps = {
13941
+ const FooterLink = React.forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", linkComponent: linkComponent, ...props}, ref) => {
13942
+ const sharedProps = {
14014
13943
  className: [ "c-footer__link", active && "c-footer__link--active", disabled && "c-footer__link--disabled", className ].filter(Boolean).join(" "),
14015
13944
  onClick: disabled ? void 0 : onClick,
14016
13945
  "aria-disabled": disabled,
@@ -14019,35 +13948,7 @@ const FooterLink = React.forwardRef((({href: href, icon: icon, external: extern
14019
13948
  rel: "noopener noreferrer"
14020
13949
  },
14021
13950
  ...props
14022
- };
14023
- if (LinkComponent) {
14024
- const Component = LinkComponent, componentProps = {
14025
- ref: ref,
14026
- ...href && !disabled ? {
14027
- href: href,
14028
- to: href
14029
- } : {},
14030
- ...linkProps
14031
- };
14032
- // Only pass href/to if the link is not disabled and href exists
14033
- return jsxRuntime.jsxs(Component, {
14034
- ...componentProps,
14035
- children: [ icon && jsxRuntime.jsx("span", {
14036
- className: "c-footer__link-icon",
14037
- children: icon
14038
- }), jsxRuntime.jsx("span", {
14039
- className: "c-footer__link-text",
14040
- children: children
14041
- }), external && jsxRuntime.jsx("span", {
14042
- className: "c-footer__link-external",
14043
- children: "↗"
14044
- }) ]
14045
- });
14046
- }
14047
- return jsxRuntime.jsxs("a", {
14048
- ref: ref,
14049
- href: disabled ? void 0 : href,
14050
- ...linkProps,
13951
+ }, linkContent = jsxRuntime.jsxs(jsxRuntime.Fragment, {
14051
13952
  children: [ icon && jsxRuntime.jsx("span", {
14052
13953
  className: "c-footer__link-icon",
14053
13954
  children: icon
@@ -14059,11 +13960,37 @@ const FooterLink = React.forwardRef((({href: href, icon: icon, external: extern
14059
13960
  children: "↗"
14060
13961
  }) ]
14061
13962
  });
13963
+ if (linkComponent) {
13964
+ const Component = linkComponent;
13965
+ return jsxRuntime.jsx(Component, {
13966
+ ref: ref,
13967
+ ...href && !disabled ? {
13968
+ href: href,
13969
+ to: href
13970
+ } : {},
13971
+ ...sharedProps,
13972
+ children: linkContent
13973
+ });
13974
+ }
13975
+ return jsxRuntime.jsx("a", {
13976
+ ref: ref,
13977
+ href: disabled ? void 0 : href,
13978
+ ...sharedProps,
13979
+ children: linkContent
13980
+ });
14062
13981
  }));
14063
13982
 
14064
13983
  FooterLink.displayName = "FooterLink";
14065
13984
 
14066
- 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 = {
13985
+ const HERO_DEFAULT_GLASS_PROPS = {
13986
+ displacementScale: 60,
13987
+ blurAmount: 3,
13988
+ saturation: 180,
13989
+ aberrationIntensity: 0,
13990
+ borderRadius: 8,
13991
+ overLight: !1,
13992
+ mode: "standard"
13993
+ }, 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 = {
14067
13994
  autoplay: !0,
14068
13995
  loop: !0,
14069
13996
  muted: !0
@@ -14106,9 +14033,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14106
14033
  }), "Your browser does not support the video tag." ]
14107
14034
  });
14108
14035
  }, renderContent = () => {
14109
- const content = jsxRuntime.jsxs("div", {
14110
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14111
- style: parts?.content?.style,
14036
+ // Build inner content elements ONCE — no duplication
14037
+ const innerElements = jsxRuntime.jsxs(jsxRuntime.Fragment, {
14112
14038
  children: [ subtitle && jsxRuntime.jsx("p", {
14113
14039
  className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14114
14040
  style: parts?.subtitle?.style,
@@ -14126,71 +14052,25 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14126
14052
  style: parts?.actions?.style,
14127
14053
  children: actions
14128
14054
  }) ]
14129
- });
14130
- // If glass is explicitly set to false, don't apply glass effect
14131
- return !1 === glass ? content :
14132
- // If glass is true or an object, apply glass effect
14133
- glass ?
14134
- // If glass is true, use default glass props
14135
- !0 === glass ? jsxRuntime.jsx("div", {
14136
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14137
- style: parts?.content?.style,
14138
- children: jsxRuntime.jsx(AtomixGlass, {
14139
- displacementScale: 60,
14140
- blurAmount: 3,
14141
- saturation: 180,
14142
- aberrationIntensity: 0,
14143
- borderRadius: 8,
14144
- overLight: !1,
14145
- mode: "standard",
14146
- children: jsxRuntime.jsxs("div", {
14055
+ }), contentBody = glass ? (() => {
14056
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
14057
+ ...HERO_DEFAULT_GLASS_PROPS,
14058
+ ...glass
14059
+ };
14060
+ return jsxRuntime.jsx(AtomixGlass, {
14061
+ ...glassProps,
14062
+ children: jsxRuntime.jsx("div", {
14147
14063
  className: "u-p-4",
14148
- children: [ subtitle && jsxRuntime.jsx("p", {
14149
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14150
- style: parts?.subtitle?.style,
14151
- children: subtitle
14152
- }), jsxRuntime.jsx(HeadingTag, {
14153
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14154
- style: parts?.title?.style,
14155
- children: title
14156
- }), text && jsxRuntime.jsx("p", {
14157
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14158
- style: parts?.text?.style,
14159
- children: text
14160
- }), actions && jsxRuntime.jsx("div", {
14161
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14162
- style: parts?.actions?.style,
14163
- children: actions
14164
- }) ]
14064
+ children: innerElements
14165
14065
  })
14166
- })
14167
- }) : jsxRuntime.jsx("div", {
14066
+ });
14067
+ })() : innerElements;
14068
+ // Conditionally wrap with AtomixGlass using the standard glass prop pattern
14069
+ return jsxRuntime.jsx("div", {
14168
14070
  className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14169
14071
  style: parts?.content?.style,
14170
- children: jsxRuntime.jsx(AtomixGlass, {
14171
- ...glass,
14172
- children: jsxRuntime.jsxs("div", {
14173
- className: "u-p-4",
14174
- children: [ subtitle && jsxRuntime.jsx("p", {
14175
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14176
- style: parts?.subtitle?.style,
14177
- children: subtitle
14178
- }), jsxRuntime.jsx(HeadingTag, {
14179
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14180
- style: parts?.title?.style,
14181
- children: title
14182
- }), text && jsxRuntime.jsx("p", {
14183
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14184
- style: parts?.text?.style,
14185
- children: text
14186
- }), actions && jsxRuntime.jsx("div", {
14187
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14188
- style: parts?.actions?.style,
14189
- children: actions
14190
- }) ]
14191
- })
14192
- })
14193
- }) : content;
14072
+ children: contentBody
14073
+ });
14194
14074
  }, renderForegroundImage = () => hasForegroundImage ? "center" === alignment ? jsxRuntime.jsx("div", {
14195
14075
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${imageColClassName || ""} ${parts?.imageWrapper?.className || ""}`.trim(),
14196
14076
  style: {
@@ -14341,35 +14221,24 @@ Hero.Title = ({children: children, className: className, level: level = "h1", ..
14341
14221
  ...props,
14342
14222
  children: children
14343
14223
  }), Hero.Content = ({children: children, className: className, style: style, glass: glass, ...props}) => {
14344
- const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim();
14345
- if (glass) {
14346
- const glassProps = "boolean" == typeof glass ? {
14347
- displacementScale: 60,
14348
- blurAmount: 3,
14349
- saturation: 180,
14350
- aberrationIntensity: 0,
14351
- borderRadius: 8,
14352
- overLight: !1,
14353
- mode: "standard"
14354
- } : glass;
14355
- return jsxRuntime.jsx("div", {
14356
- className: contentClass,
14357
- style: style,
14358
- ...props,
14359
- children: jsxRuntime.jsx(AtomixGlass, {
14360
- ...glassProps,
14361
- children: jsxRuntime.jsx("div", {
14362
- className: "u-p-4",
14363
- children: children
14364
- })
14365
- })
14224
+ const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim(), innerContent = glass ? jsxRuntime.jsx("div", {
14225
+ className: "u-p-4",
14226
+ children: children
14227
+ }) : children, wrappedContent = glass ? (() => {
14228
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
14229
+ ...HERO_DEFAULT_GLASS_PROPS,
14230
+ ...glass
14231
+ };
14232
+ return jsxRuntime.jsx(AtomixGlass, {
14233
+ ...glassProps,
14234
+ children: innerContent
14366
14235
  });
14367
- }
14236
+ })() : innerContent;
14368
14237
  return jsxRuntime.jsx("div", {
14369
14238
  className: contentClass,
14370
14239
  style: style,
14371
14240
  ...props,
14372
- children: children
14241
+ children: wrappedContent
14373
14242
  });
14374
14243
  }, Hero.Image = ({src: src, alt: alt = "", className: className, wrapperClassName: wrapperClassName, wrapperStyle: wrapperStyle, ...props}) => jsxRuntime.jsx("div", {
14375
14244
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${wrapperClassName || ""}`.trim(),
@@ -14912,7 +14781,7 @@ function setRef(ref, value) {
14912
14781
  * ```
14913
14782
  */ Nav.displayName = "Nav";
14914
14783
 
14915
- const NavItem = React.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) => {
14784
+ const NavItem = React.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) => {
14916
14785
  const {generateNavItemClass: generateNavItemClass, generateNavLinkClass: generateNavLinkClass, handleClick: handleClick} = useNavItem({
14917
14786
  dropdown: dropdown,
14918
14787
  megaMenu: megaMenu,
@@ -14952,6 +14821,7 @@ const NavItem = React.forwardRef((({children: children, dropdown: dropdown = !1
14952
14821
  ref: combinedRef,
14953
14822
  href: href || "#",
14954
14823
  to: href || "#",
14824
+ target: target,
14955
14825
  className: navLinkClass,
14956
14826
  onClick: dropdown || megaMenu ? e => {
14957
14827
  (dropdown || megaMenu) && (e.preventDefault(), setIsActive(!isActive));
@@ -14964,8 +14834,8 @@ const NavItem = React.forwardRef((({children: children, dropdown: dropdown = !1
14964
14834
  className: navItemClass,
14965
14835
  role: "menuitem",
14966
14836
  "aria-haspopup": dropdown || megaMenu,
14967
- children: [ LinkComponent ? (() => {
14968
- const Component = LinkComponent;
14837
+ children: [ linkComponent ? (() => {
14838
+ const Component = linkComponent;
14969
14839
  return jsxRuntime.jsx(Component, {
14970
14840
  ...linkProps,
14971
14841
  children: dropdown || megaMenu ? childContent[0] : children
@@ -15073,17 +14943,18 @@ const Navbar = React.forwardRef((({brand: brand, children: children, variant: v
15073
14943
  }, glassProps = !0 === glass ? defaultGlassProps : {
15074
14944
  ...defaultGlassProps,
15075
14945
  ...glass
15076
- };
14946
+ }, isFixed = "fixed" === position || "fixed-bottom" === position;
15077
14947
  return jsxRuntime.jsx(AtomixGlass, {
15078
14948
  ...glassProps,
15079
14949
  style: {
15080
- ..."fixed" === position && {
15081
- position: "fixed"
15082
- },
15083
- left: 0,
15084
- right: 0,
15085
- top: 0,
15086
- zIndex: 1e3
14950
+ ...isFixed && {
14951
+ position: "fixed",
14952
+ top: "fixed" === position ? 0 : void 0,
14953
+ bottom: "fixed-bottom" === position ? 0 : void 0,
14954
+ left: 0,
14955
+ right: 0,
14956
+ zIndex: 1030
14957
+ }
15087
14958
  },
15088
14959
  children: jsxRuntime.jsx("nav", {
15089
14960
  ref: ref,
@@ -15151,7 +15022,7 @@ SideMenuList.displayName = "SideMenuList";
15151
15022
  *
15152
15023
  * // With icon and custom link component
15153
15024
  * import Link from 'next/link';
15154
- * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} LinkComponent={Link}>
15025
+ * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} linkComponent={Link}>
15155
15026
  * Settings
15156
15027
  * </SideMenuItem>
15157
15028
  *
@@ -15166,7 +15037,7 @@ SideMenuList.displayName = "SideMenuList";
15166
15037
  * </SideMenuItem>
15167
15038
  * ```
15168
15039
  */
15169
- const SideMenuItem = React.forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, LinkComponent: LinkComponentProp}, ref) => {
15040
+ const SideMenuItem = React.forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, linkComponent: linkComponentProp}, ref) => {
15170
15041
  const {generateSideMenuItemClass: generateSideMenuItemClass, handleClick: handleClick} = useSideMenuItem({
15171
15042
  active: active,
15172
15043
  disabled: disabled,
@@ -15174,8 +15045,8 @@ const SideMenuItem = React.forwardRef((({children: children, href: href, onClic
15174
15045
  }), itemClass = generateSideMenuItemClass();
15175
15046
  // Render as link if href is provided
15176
15047
  if (href) {
15177
- if (LinkComponentProp) {
15178
- const LinkComp = LinkComponentProp, linkProps = {
15048
+ if (linkComponentProp) {
15049
+ const LinkComp = linkComponentProp, linkProps = {
15179
15050
  ref: ref,
15180
15051
  className: itemClass,
15181
15052
  onClick: disabled ? e => {
@@ -15261,7 +15132,7 @@ SideMenuItem.displayName = "SideMenuItem";
15261
15132
  * </SideMenu>
15262
15133
  * ```
15263
15134
  */
15264
- const SideMenu = React.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) => {
15135
+ const SideMenu = React.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) => {
15265
15136
  const {isOpenState: isOpenState, wrapperRef: wrapperRef, innerRef: innerRef, sideMenuRef: sideMenuRef, generateSideMenuClass: generateSideMenuClass, generateWrapperClass: generateWrapperClass, handleToggle: handleToggle} = useSideMenu({
15266
15137
  isOpen: isOpen,
15267
15138
  onToggle: onToggle,
@@ -15415,7 +15286,7 @@ const SideMenu = React.forwardRef((({title: title, children: children, menuItem
15415
15286
  active: subItem.active,
15416
15287
  disabled: subItem.disabled,
15417
15288
  icon: subItem.icon,
15418
- LinkComponent: LinkComponent,
15289
+ linkComponent: linkComponent,
15419
15290
  children: subItem.title
15420
15291
  }, subIndex)))
15421
15292
  })
@@ -15482,31 +15353,43 @@ const Menu = React.forwardRef((({children: children, className: className = "",
15482
15353
 
15483
15354
  Menu.displayName = "Menu";
15484
15355
 
15485
- const MenuItem = React.forwardRef((({children: children, href: href = "#", icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => {
15486
- const itemClass = `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`;
15356
+ const MenuItem = React.forwardRef((({children: children, href: href = "#", target: target, linkComponent: linkComponent, icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => {
15357
+ const itemClass = `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`, linkProps = {
15358
+ href: href,
15359
+ to: href,
15360
+ target: target,
15361
+ className: "c-menu__link",
15362
+ onClick: e => {
15363
+ disabled ? e.preventDefault() : onClick && onClick();
15364
+ },
15365
+ "aria-disabled": disabled,
15366
+ "aria-current": active ? "page" : void 0
15367
+ }, content = jsxRuntime.jsxs(jsxRuntime.Fragment, {
15368
+ children: [ icon && ("string" == typeof icon ? icon.startsWith("c-icon-") ? jsxRuntime.jsx(Icon, {
15369
+ name: mapIconName(icon.replace("c-icon-", "")),
15370
+ size: "sm",
15371
+ className: "c-menu__icon"
15372
+ }) : jsxRuntime.jsx("i", {
15373
+ className: `c-menu__icon ${icon}`,
15374
+ children: "string" != typeof icon && icon
15375
+ }) : jsxRuntime.jsx("span", {
15376
+ className: "c-menu__icon",
15377
+ children: icon
15378
+ })), children ]
15379
+ });
15487
15380
  return jsxRuntime.jsx("li", {
15488
15381
  ref: ref,
15489
15382
  className: itemClass,
15490
15383
  role: "menuitem",
15491
- children: jsxRuntime.jsxs("a", {
15492
- href: href,
15493
- className: "c-menu__link",
15494
- onClick: e => {
15495
- disabled ? e.preventDefault() : onClick && onClick();
15496
- },
15497
- "aria-disabled": disabled,
15498
- "aria-current": active ? "page" : void 0,
15499
- children: [ icon && ("string" == typeof icon ? icon.startsWith("c-icon-") ? jsxRuntime.jsx(Icon, {
15500
- name: mapIconName(icon.replace("c-icon-", "")),
15501
- size: "sm",
15502
- className: "c-menu__icon"
15503
- }) : jsxRuntime.jsx("i", {
15504
- className: `c-menu__icon ${icon}`,
15505
- children: "string" != typeof icon && icon
15506
- }) : jsxRuntime.jsx("span", {
15507
- className: "c-menu__icon",
15508
- children: icon
15509
- })), children ]
15384
+ children: linkComponent ? (() => {
15385
+ const Component = linkComponent;
15386
+ return jsxRuntime.jsx(Component, {
15387
+ ...linkProps,
15388
+ children: content
15389
+ });
15390
+ })() : jsxRuntime.jsx("a", {
15391
+ ...linkProps,
15392
+ children: content
15510
15393
  })
15511
15394
  });
15512
15395
  }));
@@ -15607,16 +15490,30 @@ const MegaMenuColumn = React.forwardRef((({title: title, icon: icon, children:
15607
15490
 
15608
15491
  MegaMenuColumn.displayName = "MegaMenuColumn";
15609
15492
 
15610
- const MegaMenuLink = React.forwardRef((({href: href, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => jsxRuntime.jsx("a", {
15611
- ref: ref,
15612
- href: href,
15613
- className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15614
- onClick: e => {
15615
- disabled ? e.preventDefault() : onClick && onClick();
15616
- },
15617
- "aria-disabled": disabled,
15618
- children: children
15619
- })));
15493
+ const MegaMenuLink = React.forwardRef((({href: href, target: target, linkComponent: linkComponent, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => {
15494
+ const linkProps = {
15495
+ ref: ref,
15496
+ href: href,
15497
+ to: href,
15498
+ target: target,
15499
+ className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15500
+ onClick: e => {
15501
+ disabled ? e.preventDefault() : onClick && onClick();
15502
+ },
15503
+ "aria-disabled": disabled
15504
+ };
15505
+ if (linkComponent) {
15506
+ const Component = linkComponent;
15507
+ return jsxRuntime.jsx(Component, {
15508
+ ...linkProps,
15509
+ children: children
15510
+ });
15511
+ }
15512
+ return jsxRuntime.jsx("a", {
15513
+ ...linkProps,
15514
+ children: children
15515
+ });
15516
+ }));
15620
15517
 
15621
15518
  MegaMenuLink.displayName = "MegaMenuLink";
15622
15519
 
@@ -17599,8 +17496,8 @@ const SectionIntro = ({title: title, label: label, text: text, actions: actions,
17599
17496
  SectionIntro.displayName = "SectionIntro";
17600
17497
 
17601
17498
  const Slider = React.forwardRef(((props, ref) => {
17602
- 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({
17603
- slides: slides || [],
17499
+ 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({
17500
+ slides: validSlides,
17604
17501
  slidesToShow: slidesToShow,
17605
17502
  spaceBetween: spaceBetween,
17606
17503
  loop: loop,
@@ -17612,8 +17509,8 @@ const Slider = React.forwardRef(((props, ref) => {
17612
17509
  autoplay: autoplay,
17613
17510
  onSlideChange: onSlideChange
17614
17511
  }), {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 = React.useMemo((() => 0 === slideWidth ? 0 : allSlides.length * (slideWidth + spaceBetween) - spaceBetween), [ allSlides.length, slideWidth, spaceBetween ]);
17615
- // Hooks must be called unconditionally - before early return
17616
- if (!slides || 0 === slides.length) return jsxRuntime.jsx("div", {
17512
+ // Ensure slides is an array to prevent .map errors
17513
+ if (0 === validSlides.length) return jsxRuntime.jsx("div", {
17617
17514
  className: "c-slider c-slider--empty",
17618
17515
  style: {
17619
17516
  height: height,
@@ -17657,7 +17554,7 @@ const Slider = React.forwardRef(((props, ref) => {
17657
17554
  willChange: "transform"
17658
17555
  },
17659
17556
  children: allSlides.map(((slide, index) => jsxRuntime.jsxs("div", {
17660
- className: [ "c-slider__slide", (loop ? index % slides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17557
+ className: [ "c-slider__slide", (loop ? index % validSlides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17661
17558
  style: {
17662
17559
  width: "vertical" === direction ? "100%" : `${slideWidth}px`,
17663
17560
  height: "vertical" === direction ? `${slideWidth}px` : "100%",
@@ -17719,7 +17616,7 @@ const Slider = React.forwardRef(((props, ref) => {
17719
17616
  }) ]
17720
17617
  }), pagination && jsxRuntime.jsx("div", {
17721
17618
  className: "c-slider__pagination",
17722
- children: slides.map(((_, index) => jsxRuntime.jsx("button", {
17619
+ children: validSlides.map(((_, index) => jsxRuntime.jsx("button", {
17723
17620
  type: "button",
17724
17621
  className: "c-slider__pagination-bullet " + (index === realIndex ? "c-slider__pagination-bullet--active" : ""),
17725
17622
  onClick: () => goToSlide(index),
@@ -25607,8 +25504,8 @@ function(component, props) {
25607
25504
  * Hook to merge default props with provided props
25608
25505
  */ , exports.useComponentTheme = useComponentTheme, exports.useDataTable = useDataTable,
25609
25506
  exports.useEdgePanel = useEdgePanel, exports.useForm = useForm, exports.useFormGroup = useFormGroup,
25610
- exports.useGlassContainer = useGlassContainer, exports.useHero = useHero, exports.useHistory = useHistory,
25611
- exports.useInput = useInput, exports.useLineChart = useLineChart, exports.useMergedProps = function(defaultProps, props) {
25507
+ exports.useHero = useHero, exports.useHistory = useHistory, exports.useInput = useInput,
25508
+ exports.useLineChart = useLineChart, exports.useMergedProps = function(defaultProps, props) {
25612
25509
  return React.useMemo((() => ({
25613
25510
  ...defaultProps,
25614
25511
  ...props