@shohojdhara/atomix 0.4.5 → 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.
- package/dist/atomix.css +33 -14
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +1 -1
- package/dist/atomix.min.css.map +1 -1
- package/dist/charts.js +183 -184
- package/dist/charts.js.map +1 -1
- package/dist/core.js +183 -184
- package/dist/core.js.map +1 -1
- package/dist/forms.js +183 -184
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js +183 -184
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +4 -31
- package/dist/index.esm.js +192 -283
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +194 -285
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AtomixGlass/AtomixGlass.tsx +60 -38
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +6 -35
- package/src/components/AtomixGlass/glass-utils.ts +27 -14
- package/src/components/AtomixGlass/stories/Overview.stories.tsx +19 -21
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +1162 -515
- package/src/components/AtomixGlass/stories/shared-components.tsx +11 -3
- package/src/components/Navigation/Navbar/Navbar.tsx +13 -5
- package/src/lib/composables/index.ts +1 -2
- package/src/lib/composables/useAtomixGlass.ts +246 -222
- package/src/lib/composables/useAtomixGlassStyles.ts +46 -23
- package/src/lib/constants/components.ts +3 -1
- package/src/styles/06-components/_components.atomix-glass.scss +45 -20
- package/src/lib/composables/atomix-glass/useGlassBackgroundDetection.ts +0 -329
- package/src/lib/composables/atomix-glass/useGlassCornerRadius.ts +0 -82
- package/src/lib/composables/atomix-glass/useGlassMouseTracking.ts +0 -153
- package/src/lib/composables/atomix-glass/useGlassOverLight.ts +0 -198
- package/src/lib/composables/atomix-glass/useGlassState.ts +0 -112
- package/src/lib/composables/atomix-glass/useGlassTransforms.ts +0 -160
- package/src/lib/composables/glass-styles.ts +0 -302
- package/src/lib/composables/useGlassContainer.ts +0 -177
package/dist/index.esm.js
CHANGED
|
@@ -1730,7 +1730,9 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
|
|
|
1730
1730
|
ENABLE_OVER_LIGHT_LAYERS: !0
|
|
1731
1731
|
},
|
|
1732
1732
|
CONSTANTS: {
|
|
1733
|
-
ACTIVATION_ZONE:
|
|
1733
|
+
ACTIVATION_ZONE: 350,
|
|
1734
|
+
LERP_FACTOR: .08,
|
|
1735
|
+
SMOOTHSTEP_POWER: 2.5,
|
|
1734
1736
|
MIN_BLUR: .1,
|
|
1735
1737
|
MOUSE_INFLUENCE_DIVISOR: 100,
|
|
1736
1738
|
EDGE_FADE_PIXELS: 2,
|
|
@@ -2025,7 +2027,7 @@ const {CONSTANTS: CONSTANTS$2} = ATOMIX_GLASS, calculateDistance = (pos1, pos2)
|
|
|
2025
2027
|
// Silently handle errors
|
|
2026
2028
|
}
|
|
2027
2029
|
return CONSTANTS$2.DEFAULT_CORNER_RADIUS;
|
|
2028
|
-
}, getDisplacementMap = (mode, displacementMap, polarDisplacementMap, prominentDisplacementMap, shaderMapUrl) => {
|
|
2030
|
+
}, lerp = (a, b, t) => a + (b - a) * t, softClamp = (value, max) => max <= 0 ? 0 : max * (1 - Math.exp(-value / max)), getDisplacementMap = (mode, displacementMap, polarDisplacementMap, prominentDisplacementMap, shaderMapUrl) => {
|
|
2029
2031
|
switch (mode) {
|
|
2030
2032
|
case "standard":
|
|
2031
2033
|
return displacementMap;
|
|
@@ -2383,20 +2385,12 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
2383
2385
|
onClick: onClick,
|
|
2384
2386
|
children: jsxs("div", {
|
|
2385
2387
|
className: ATOMIX_GLASS.INNER_CLASS,
|
|
2386
|
-
style: {
|
|
2387
|
-
padding: "var(--atomix-glass-container-padding)",
|
|
2388
|
-
boxShadow: "var(--atomix-glass-container-box-shadow)"
|
|
2389
|
-
},
|
|
2390
2388
|
onMouseEnter: onMouseEnter,
|
|
2391
2389
|
onMouseLeave: onMouseLeave,
|
|
2392
2390
|
onMouseDown: onMouseDown,
|
|
2393
2391
|
onMouseUp: onMouseUp,
|
|
2394
2392
|
children: [ jsxs("div", {
|
|
2395
2393
|
className: ATOMIX_GLASS.FILTER_CLASS,
|
|
2396
|
-
style: {
|
|
2397
|
-
position: "absolute",
|
|
2398
|
-
inset: 0
|
|
2399
|
-
},
|
|
2400
2394
|
children: [ jsx(GlassFilter, {
|
|
2401
2395
|
blurAmount: blurAmount,
|
|
2402
2396
|
mode: mode,
|
|
@@ -2411,26 +2405,14 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
2411
2405
|
},
|
|
2412
2406
|
className: ATOMIX_GLASS.FILTER_OVERLAY_CLASS,
|
|
2413
2407
|
style: {
|
|
2414
|
-
filter: `url(#${filterId})
|
|
2415
|
-
backdropFilter: "var(--atomix-glass-container-backdrop)",
|
|
2416
|
-
borderRadius: "var(--atomix-glass-container-radius)"
|
|
2408
|
+
filter: `url(#${filterId})`
|
|
2417
2409
|
}
|
|
2418
2410
|
}), jsx("div", {
|
|
2419
|
-
className: ATOMIX_GLASS.FILTER_SHADOW_CLASS
|
|
2420
|
-
style: {
|
|
2421
|
-
boxShadow: "var(--atomix-glass-container-shadow)",
|
|
2422
|
-
opacity: "var(--atomix-glass-container-shadow-opacity)",
|
|
2423
|
-
background: "var(--atomix-glass-container-bg)",
|
|
2424
|
-
borderRadius: "var(--atomix-glass-container-radius)"
|
|
2425
|
-
}
|
|
2411
|
+
className: ATOMIX_GLASS.FILTER_SHADOW_CLASS
|
|
2426
2412
|
}) ]
|
|
2427
2413
|
}), jsx("div", {
|
|
2428
2414
|
ref: contentRef,
|
|
2429
2415
|
className: ATOMIX_GLASS.CONTENT_CLASS,
|
|
2430
|
-
style: {
|
|
2431
|
-
position: "relative",
|
|
2432
|
-
textShadow: "var(--atomix-glass-container-text-shadow)"
|
|
2433
|
-
},
|
|
2434
2416
|
children: children
|
|
2435
2417
|
}) ]
|
|
2436
2418
|
})
|
|
@@ -2534,31 +2516,39 @@ class {
|
|
|
2534
2516
|
saturationBoost: baseOverLightConfig.saturationBoost
|
|
2535
2517
|
};
|
|
2536
2518
|
// Calculate mouse influence
|
|
2537
|
-
|
|
2538
|
-
let elasticTranslation = {
|
|
2519
|
+
let computedDirectionalScale = directionalScale, elasticTranslation = {
|
|
2539
2520
|
x: 0,
|
|
2540
2521
|
y: 0
|
|
2541
2522
|
};
|
|
2542
|
-
|
|
2523
|
+
// Calculate elastic translation and directional scale
|
|
2524
|
+
if (!effectiveWithoutEffects && wrapperElement) {
|
|
2543
2525
|
const rect = wrapperElement.getBoundingClientRect(), center = calculateElementCenter(rect);
|
|
2544
|
-
//
|
|
2545
|
-
let fadeInFactor = 0;
|
|
2526
|
+
// Mouse presence and edge distance logic
|
|
2546
2527
|
if (globalMousePosition.x && globalMousePosition.y && validateGlassSize(glassSize)) {
|
|
2547
|
-
const edgeDistanceX = Math.max(0, Math.abs(
|
|
2528
|
+
const deltaX = globalMousePosition.x - center.x, deltaY = globalMousePosition.y - center.y, edgeDistanceX = Math.max(0, Math.abs(deltaX) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(deltaY) - glassSize.height / 2), edgeDistance = calculateDistance({
|
|
2548
2529
|
x: edgeDistanceX,
|
|
2549
2530
|
y: edgeDistanceY
|
|
2550
2531
|
}, {
|
|
2551
2532
|
x: 0,
|
|
2552
2533
|
y: 0
|
|
2553
|
-
})
|
|
2554
|
-
|
|
2534
|
+
}), rawT = edgeDistance > ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE, fadeInFactor = (t => {
|
|
2535
|
+
const clamped = Math.max(0, Math.min(1, t));
|
|
2536
|
+
return clamped * clamped * (3 - 2 * clamped);
|
|
2537
|
+
})(rawT);
|
|
2538
|
+
// Directional scale
|
|
2539
|
+
if (elasticTranslation = {
|
|
2540
|
+
x: deltaX * elasticity * .1 * fadeInFactor,
|
|
2541
|
+
y: deltaY * elasticity * .1 * fadeInFactor
|
|
2542
|
+
}, !isOverLight && edgeDistance <= ATOMIX_GLASS.CONSTANTS.ACTIVATION_ZONE) {
|
|
2543
|
+
const centerDistance = calculateDistance(globalMousePosition, center);
|
|
2544
|
+
if (centerDistance > 0) {
|
|
2545
|
+
const normalizedX = deltaX / centerDistance, normalizedY = deltaY / centerDistance, stretchIntensity = Math.min(centerDistance / 300, 1) * elasticity * rawT, scaleX = 1 + Math.abs(normalizedX) * stretchIntensity * .3 - Math.abs(normalizedY) * stretchIntensity * .15, scaleY = 1 + Math.abs(normalizedY) * stretchIntensity * .3 - Math.abs(normalizedX) * stretchIntensity * .15, softScaleX = 1 - softClamp(Math.max(0, 1 - scaleX), .2), softScaleY = 1 - softClamp(Math.max(0, 1 - scaleY), .2);
|
|
2546
|
+
computedDirectionalScale = `scaleX(${Math.max(.85, softScaleX)}) scaleY(${Math.max(.85, softScaleY)})`;
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2555
2549
|
}
|
|
2556
|
-
elasticTranslation = {
|
|
2557
|
-
x: (globalMousePosition.x - center.x) * elasticity * .1 * fadeInFactor,
|
|
2558
|
-
y: (globalMousePosition.y - center.y) * elasticity * .1 * fadeInFactor
|
|
2559
|
-
};
|
|
2560
2550
|
}
|
|
2561
|
-
const transformStyle = effectiveWithoutEffects ? isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)" : `translate(${elasticTranslation.x}px, ${elasticTranslation.y}px) ${isActive && Boolean(onClick) ? "scale(0.96)" :
|
|
2551
|
+
const transformStyle = effectiveWithoutEffects ? isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)" : `translate(${elasticTranslation.x}px, ${elasticTranslation.y}px) ${isActive && Boolean(onClick) ? "scale(0.96)" : computedDirectionalScale}`;
|
|
2562
2552
|
// Update Wrapper Styles (glassVars)
|
|
2563
2553
|
if (wrapperElement) {
|
|
2564
2554
|
const mx = mouseOffset.x, my = mouseOffset.y, absMx = Math.abs(mx), absMy = Math.abs(my), GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT, borderGradientAngle = GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER, borderStop1 = Math.max(GRADIENT.BORDER_STOP_1.MIN, GRADIENT.BORDER_STOP_1.BASE + my * GRADIENT.BORDER_STOP_1.MULTIPLIER), borderStop2 = Math.min(GRADIENT.BORDER_STOP_2.MAX, GRADIENT.BORDER_STOP_2.BASE + my * GRADIENT.BORDER_STOP_2.MULTIPLIER), borderOpacities = [ GRADIENT.BORDER_OPACITY.BASE_1 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_LOW, GRADIENT.BORDER_OPACITY.BASE_2 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_HIGH, GRADIENT.BORDER_OPACITY.BASE_3 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_LOW, GRADIENT.BORDER_OPACITY.BASE_4 + absMx * GRADIENT.BORDER_OPACITY.MULTIPLIER_HIGH ], configBorderOpacity = overLightConfig.borderOpacity, whiteColor = ATOMIX_GLASS.CONSTANTS.PALETTE.WHITE, blackColor = ATOMIX_GLASS.CONSTANTS.PALETTE.BLACK, hoverPositions = {
|
|
@@ -2665,7 +2655,13 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
2665
2655
|
}), internalMouseOffsetRef = useRef({
|
|
2666
2656
|
x: 0,
|
|
2667
2657
|
y: 0
|
|
2668
|
-
}),
|
|
2658
|
+
}), targetMouseOffsetRef = useRef({
|
|
2659
|
+
x: 0,
|
|
2660
|
+
y: 0
|
|
2661
|
+
}), targetGlobalMousePositionRef = useRef({
|
|
2662
|
+
x: 0,
|
|
2663
|
+
y: 0
|
|
2664
|
+
}), lerpRafRef = useRef(null), lerpActiveRef = useRef(!1), [dynamicBorderRadius, setDynamicCornerRadius] = useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = useState(!1), [detectedOverLight, setDetectedOverLight] = useState(!1), effectiveBorderRadius = useMemo((() => void 0 !== borderRadius ? Math.max(0, borderRadius) : Math.max(0, dynamicBorderRadius)), [ borderRadius, dynamicBorderRadius ]), {glassSize: glassSize} = function({glassRef: glassRef, effectiveBorderRadius: effectiveBorderRadius, cachedRectRef: cachedRectRef}) {
|
|
2669
2665
|
const [glassSize, setGlassSize] = useState({
|
|
2670
2666
|
width: 270,
|
|
2671
2667
|
height: 69
|
|
@@ -2762,7 +2758,23 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
2762
2758
|
const timeoutId = setTimeout(extractRadius, 100);
|
|
2763
2759
|
return () => clearTimeout(timeoutId);
|
|
2764
2760
|
}), [ children, debugBorderRadius, contentRef ]),
|
|
2765
|
-
// Media query
|
|
2761
|
+
// Media query detection for reduced motion and high contrast
|
|
2762
|
+
useEffect((() => {
|
|
2763
|
+
if ("undefined" == typeof window || "function" != typeof window.matchMedia) return;
|
|
2764
|
+
const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
|
|
2765
|
+
setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
|
|
2766
|
+
const handleReducedMotionChange = e => {
|
|
2767
|
+
setUserPrefersReducedMotion(e.matches);
|
|
2768
|
+
}, handleHighContrastChange = e => {
|
|
2769
|
+
setUserPrefersHighContrast(e.matches);
|
|
2770
|
+
};
|
|
2771
|
+
return mediaQueryReducedMotion.addEventListener("change", handleReducedMotionChange),
|
|
2772
|
+
mediaQueryHighContrast.addEventListener("change", handleHighContrastChange), () => {
|
|
2773
|
+
mediaQueryReducedMotion.removeEventListener("change", handleReducedMotionChange),
|
|
2774
|
+
mediaQueryHighContrast.removeEventListener("change", handleHighContrastChange);
|
|
2775
|
+
};
|
|
2776
|
+
}), []),
|
|
2777
|
+
// Background detection for overLight auto-detect
|
|
2766
2778
|
useEffect((() => {
|
|
2767
2779
|
if (("auto" === overLight || "object" == typeof overLight && null !== overLight) && glassRef.current) {
|
|
2768
2780
|
const element = glassRef.current, cachedResult = ((parentElement, overLightConfig) => {
|
|
@@ -2862,102 +2874,36 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
2862
2874
|
}), 150);
|
|
2863
2875
|
return () => clearTimeout(timeoutId);
|
|
2864
2876
|
}
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
|
|
2868
|
-
const handleReducedMotionChange = e => {
|
|
2869
|
-
setUserPrefersReducedMotion(e.matches);
|
|
2870
|
-
}, handleHighContrastChange = e => {
|
|
2871
|
-
setUserPrefersHighContrast(e.matches);
|
|
2872
|
-
};
|
|
2873
|
-
return mediaQueryReducedMotion.addEventListener ? (mediaQueryReducedMotion.addEventListener("change", handleReducedMotionChange),
|
|
2874
|
-
mediaQueryHighContrast.addEventListener("change", handleHighContrastChange)) : mediaQueryReducedMotion.addListener && (mediaQueryReducedMotion.addListener(handleReducedMotionChange),
|
|
2875
|
-
mediaQueryHighContrast.addListener(handleHighContrastChange)), () => {
|
|
2876
|
-
// ignore
|
|
2877
|
-
};
|
|
2878
|
-
} catch (error) {
|
|
2879
|
-
return;
|
|
2880
|
-
}
|
|
2881
|
-
}), [ overLight, glassRef, debugOverLight ]);
|
|
2877
|
+
"boolean" == typeof overLight && setDetectedOverLight(!1);
|
|
2878
|
+
}), [ overLight, glassRef ]);
|
|
2882
2879
|
/**
|
|
2883
2880
|
* Get effective overLight value based on configuration
|
|
2884
2881
|
*/
|
|
2885
|
-
const getEffectiveOverLight = useCallback((() => "boolean" == typeof overLight ? overLight : ("auto" === overLight || "object" == typeof overLight && null !== overLight) && detectedOverLight), [ overLight, detectedOverLight ]), validateConfigValue = useCallback(((value, min, max, defaultValue) => "number" != typeof value || isNaN(value) || !isFinite(value) ? defaultValue : Math.min(max, Math.max(min, value))), []),
|
|
2886
|
-
const isOverLight = getEffectiveOverLight(), baseConfig = {
|
|
2882
|
+
const getEffectiveOverLight = useCallback((() => "boolean" == typeof overLight ? overLight : ("auto" === overLight || "object" == typeof overLight && null !== overLight) && detectedOverLight), [ overLight, detectedOverLight ]), validateConfigValue = useCallback(((value, min, max, defaultValue) => "number" != typeof value || isNaN(value) || !isFinite(value) ? defaultValue : Math.min(max, Math.max(min, value))), []), overLightConfig = useMemo((() => {
|
|
2883
|
+
const isOverLight = getEffectiveOverLight(), hoverIntensity = isHovered ? 1.4 : 1, activeIntensity = isActive ? 1.6 : 1, baseConfig = {
|
|
2887
2884
|
isOverLight: isOverLight,
|
|
2888
2885
|
threshold: .7,
|
|
2889
|
-
opacity: isOverLight ? Math.min(.6, Math.max(.2, .5)) : 0,
|
|
2890
|
-
contrast: 1,
|
|
2891
|
-
|
|
2892
|
-
brightness: 1,
|
|
2893
|
-
// Base brightness
|
|
2886
|
+
opacity: isOverLight ? Math.min(.6, Math.max(.2, .5 * hoverIntensity * activeIntensity)) : 0,
|
|
2887
|
+
contrast: 1.4,
|
|
2888
|
+
brightness: .9,
|
|
2894
2889
|
saturationBoost: 1.3,
|
|
2890
|
+
// Fixed value — dynamic saturation amplifies perceived displacement
|
|
2895
2891
|
shadowIntensity: .9,
|
|
2896
2892
|
borderOpacity: .7
|
|
2897
2893
|
};
|
|
2898
2894
|
if ("object" == typeof overLight && null !== overLight) {
|
|
2899
|
-
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)
|
|
2900
|
-
return {
|
|
2895
|
+
const objConfig = overLight, validatedThreshold = validateConfigValue(objConfig.threshold, .1, 1, baseConfig.threshold), validatedOpacity = validateConfigValue(objConfig.opacity, .1, 1, baseConfig.opacity), validatedContrast = validateConfigValue(objConfig.contrast, .5, 2.5, baseConfig.contrast), validatedBrightness = validateConfigValue(objConfig.brightness, .5, 2, baseConfig.brightness), validatedSaturationBoost = validateConfigValue(objConfig.saturationBoost, .5, 3, baseConfig.saturationBoost), finalConfig = {
|
|
2901
2896
|
...baseConfig,
|
|
2902
2897
|
threshold: validatedThreshold,
|
|
2903
|
-
opacity: validatedOpacity,
|
|
2898
|
+
opacity: validatedOpacity * hoverIntensity * activeIntensity,
|
|
2904
2899
|
contrast: validatedContrast,
|
|
2905
2900
|
brightness: validatedBrightness,
|
|
2906
2901
|
saturationBoost: validatedSaturationBoost
|
|
2907
2902
|
};
|
|
2903
|
+
return "undefined" == typeof process || process.env, finalConfig;
|
|
2908
2904
|
}
|
|
2909
|
-
return baseConfig;
|
|
2910
|
-
}), [ overLight, getEffectiveOverLight, validateConfigValue ]),
|
|
2911
|
-
const mouseInfluence = calculateMouseInfluence(mouseOffset), hoverIntensity = isHovered ? 1.4 : 1, activeIntensity = isActive ? 1.6 : 1;
|
|
2912
|
-
return {
|
|
2913
|
-
isOverLight: baseOverLightConfig.isOverLight,
|
|
2914
|
-
threshold: baseOverLightConfig.threshold,
|
|
2915
|
-
opacity: baseOverLightConfig.opacity * hoverIntensity * activeIntensity,
|
|
2916
|
-
contrast: Math.min(1.6, baseOverLightConfig.contrast + .1 * mouseInfluence),
|
|
2917
|
-
brightness: Math.min(1.1, baseOverLightConfig.brightness + .05 * mouseInfluence),
|
|
2918
|
-
saturationBoost: baseOverLightConfig.saturationBoost,
|
|
2919
|
-
shadowIntensity: Math.min(1.2, Math.max(.5, baseOverLightConfig.shadowIntensity + .2 * mouseInfluence)),
|
|
2920
|
-
borderOpacity: Math.min(1, Math.max(.3, baseOverLightConfig.borderOpacity + .1 * mouseInfluence))
|
|
2921
|
-
};
|
|
2922
|
-
}), [ baseOverLightConfig, mouseOffset, isHovered, isActive ]), updateRectRef = useRef(null), calculateDirectionalScale = useCallback((() => {
|
|
2923
|
-
if (baseOverLightConfig.isOverLight) return "scale(1)";
|
|
2924
|
-
if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return "scale(1)";
|
|
2925
|
-
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({
|
|
2926
|
-
x: edgeDistanceX,
|
|
2927
|
-
y: edgeDistanceY
|
|
2928
|
-
}, {
|
|
2929
|
-
x: 0,
|
|
2930
|
-
y: 0
|
|
2931
|
-
});
|
|
2932
|
-
if (edgeDistance > CONSTANTS.ACTIVATION_ZONE) return "scale(1)";
|
|
2933
|
-
const fadeInFactor = 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE, centerDistance = calculateDistance(globalMousePosition, center);
|
|
2934
|
-
if (0 === centerDistance) return "scale(1)";
|
|
2935
|
-
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;
|
|
2936
|
-
return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
|
|
2937
|
-
}), [ globalMousePosition, elasticity, glassSize, glassRef, baseOverLightConfig ]), calculateFadeInFactor = useCallback((() => {
|
|
2938
|
-
if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return 0;
|
|
2939
|
-
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({
|
|
2940
|
-
x: edgeDistanceX,
|
|
2941
|
-
y: edgeDistanceY
|
|
2942
|
-
}, {
|
|
2943
|
-
x: 0,
|
|
2944
|
-
y: 0
|
|
2945
|
-
});
|
|
2946
|
-
return edgeDistance > CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE;
|
|
2947
|
-
}), [ globalMousePosition, glassSize, glassRef ]), calculateElasticTranslation = useCallback((() => {
|
|
2948
|
-
if (!glassRef.current) return {
|
|
2949
|
-
x: 0,
|
|
2950
|
-
y: 0
|
|
2951
|
-
};
|
|
2952
|
-
const fadeInFactor = calculateFadeInFactor(), rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect);
|
|
2953
|
-
return {
|
|
2954
|
-
x: (globalMousePosition.x - center.x) * elasticity * .1 * fadeInFactor,
|
|
2955
|
-
y: (globalMousePosition.y - center.y) * elasticity * .1 * fadeInFactor
|
|
2956
|
-
};
|
|
2957
|
-
}), [ globalMousePosition, elasticity, calculateFadeInFactor, glassRef ]), elasticTranslation = useMemo((() => effectiveWithoutEffects ? {
|
|
2958
|
-
x: 0,
|
|
2959
|
-
y: 0
|
|
2960
|
-
} : calculateElasticTranslation()), [ calculateElasticTranslation, effectiveWithoutEffects ]), directionalScale = useMemo((() => effectiveWithoutEffects ? "scale(1)" : calculateDirectionalScale()), [ calculateDirectionalScale, effectiveWithoutEffects ]), transformStyle = useMemo((() => effectiveWithoutEffects ? isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)" : `translate(${elasticTranslation.x}px, ${elasticTranslation.y}px) ${isActive && Boolean(onClick) ? "scale(0.96)" : directionalScale}`), [ elasticTranslation, isActive, onClick, directionalScale, effectiveWithoutEffects ]), handleGlobalMousePosition = useCallback((globalPos => {
|
|
2905
|
+
return "undefined" == typeof process || process.env, baseConfig;
|
|
2906
|
+
}), [ overLight, getEffectiveOverLight, isHovered, isActive, validateConfigValue, debugOverLight ]), transformStyle = useMemo((() => effectiveWithoutEffects || isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)"), [ effectiveWithoutEffects, isActive, onClick ]), updateRectRef = useRef(null), handleGlobalMousePosition = useCallback((globalPos => {
|
|
2961
2907
|
if (externalGlobalMousePosition && externalMouseOffset) return;
|
|
2962
2908
|
if (effectiveWithoutEffects) return;
|
|
2963
2909
|
const container = mouseContainer?.current || glassRef.current;
|
|
@@ -2966,35 +2912,61 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
2966
2912
|
let rect = cachedRectRef.current;
|
|
2967
2913
|
if (rect && 0 !== rect.width && 0 !== rect.height || (rect = container.getBoundingClientRect(),
|
|
2968
2914
|
cachedRectRef.current = rect), 0 === rect.width || 0 === rect.height) return;
|
|
2969
|
-
const center = calculateElementCenter(rect)
|
|
2915
|
+
const center = calculateElementCenter(rect);
|
|
2916
|
+
// Write raw target — the lerp loop will smoothly pursue it
|
|
2917
|
+
targetMouseOffsetRef.current = {
|
|
2970
2918
|
x: (globalPos.x - center.x) / rect.width * 100,
|
|
2971
2919
|
y: (globalPos.y - center.y) / rect.height * 100
|
|
2920
|
+
}, targetGlobalMousePositionRef.current = globalPos;
|
|
2921
|
+
}), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]), startLerpLoop = useCallback((() => {
|
|
2922
|
+
if (lerpActiveRef.current) return;
|
|
2923
|
+
lerpActiveRef.current = !0;
|
|
2924
|
+
const LERP_T = CONSTANTS.LERP_FACTOR, tick = () => {
|
|
2925
|
+
if (!lerpActiveRef.current) return;
|
|
2926
|
+
const cur = internalMouseOffsetRef.current, tgt = targetMouseOffsetRef.current, dx = tgt.x - cur.x, dy = tgt.y - cur.y;
|
|
2927
|
+
// If we're close enough, snap and park
|
|
2928
|
+
if (Math.abs(dx) < .05 && Math.abs(dy) < .05) internalMouseOffsetRef.current = {
|
|
2929
|
+
...tgt
|
|
2930
|
+
}, internalGlobalMousePositionRef.current = {
|
|
2931
|
+
...targetGlobalMousePositionRef.current
|
|
2932
|
+
}; else {
|
|
2933
|
+
internalMouseOffsetRef.current = {
|
|
2934
|
+
x: lerp(cur.x, tgt.x, LERP_T),
|
|
2935
|
+
y: lerp(cur.y, tgt.y, LERP_T)
|
|
2936
|
+
};
|
|
2937
|
+
const curG = internalGlobalMousePositionRef.current, tgtG = targetGlobalMousePositionRef.current;
|
|
2938
|
+
internalGlobalMousePositionRef.current = {
|
|
2939
|
+
x: lerp(curG.x, tgtG.x, LERP_T),
|
|
2940
|
+
y: lerp(curG.y, tgtG.y, LERP_T)
|
|
2941
|
+
};
|
|
2942
|
+
}
|
|
2943
|
+
// Imperative style update with the smoothed values
|
|
2944
|
+
updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
|
|
2945
|
+
mouseOffset: internalMouseOffsetRef.current,
|
|
2946
|
+
globalMousePosition: internalGlobalMousePositionRef.current,
|
|
2947
|
+
glassSize: glassSize,
|
|
2948
|
+
isHovered: isHovered,
|
|
2949
|
+
isActive: isActive,
|
|
2950
|
+
isOverLight: overLightConfig.isOverLight,
|
|
2951
|
+
baseOverLightConfig: overLightConfig,
|
|
2952
|
+
effectiveBorderRadius: effectiveBorderRadius,
|
|
2953
|
+
effectiveWithoutEffects: effectiveWithoutEffects,
|
|
2954
|
+
effectiveReducedMotion: effectiveReducedMotion,
|
|
2955
|
+
elasticity: elasticity,
|
|
2956
|
+
directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
|
|
2957
|
+
onClick: onClick,
|
|
2958
|
+
withLiquidBlur: withLiquidBlur,
|
|
2959
|
+
blurAmount: blurAmount,
|
|
2960
|
+
saturation: saturation,
|
|
2961
|
+
padding: padding
|
|
2962
|
+
}), lerpRafRef.current = requestAnimationFrame(tick);
|
|
2972
2963
|
};
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
globalMousePosition: globalPos,
|
|
2980
|
-
glassSize: glassSize,
|
|
2981
|
-
isHovered: isHovered,
|
|
2982
|
-
isActive: isActive,
|
|
2983
|
-
isOverLight: baseOverLightConfig.isOverLight,
|
|
2984
|
-
baseOverLightConfig: baseOverLightConfig,
|
|
2985
|
-
effectiveBorderRadius: effectiveBorderRadius,
|
|
2986
|
-
effectiveWithoutEffects: effectiveWithoutEffects,
|
|
2987
|
-
effectiveReducedMotion: effectiveReducedMotion,
|
|
2988
|
-
elasticity: elasticity,
|
|
2989
|
-
directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
|
|
2990
|
-
// Simplified directional scale for fast path
|
|
2991
|
-
onClick: onClick,
|
|
2992
|
-
withLiquidBlur: withLiquidBlur,
|
|
2993
|
-
blurAmount: blurAmount,
|
|
2994
|
-
saturation: saturation,
|
|
2995
|
-
padding: padding
|
|
2996
|
-
});
|
|
2997
|
-
}), [ mouseContainer, glassRef, wrapperRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects, glassSize, isHovered, isActive, baseOverLightConfig, effectiveBorderRadius, effectiveReducedMotion, elasticity, onClick, withLiquidBlur, blurAmount, saturation, padding ]);
|
|
2964
|
+
// 0.08 – lower = more viscous
|
|
2965
|
+
lerpRafRef.current = requestAnimationFrame(tick);
|
|
2966
|
+
}), [ glassRef, wrapperRef, glassSize, isHovered, isActive, overLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, onClick, withLiquidBlur, blurAmount, saturation, padding ]), stopLerpLoop = useCallback((() => {
|
|
2967
|
+
lerpActiveRef.current = !1, null !== lerpRafRef.current && (cancelAnimationFrame(lerpRafRef.current),
|
|
2968
|
+
lerpRafRef.current = null);
|
|
2969
|
+
}), []);
|
|
2998
2970
|
/**
|
|
2999
2971
|
* Validate and clamp a numeric config value
|
|
3000
2972
|
*/
|
|
@@ -3002,7 +2974,10 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3002
2974
|
useEffect((() => {
|
|
3003
2975
|
if (externalGlobalMousePosition && externalMouseOffset) return;
|
|
3004
2976
|
if (effectiveWithoutEffects) return;
|
|
3005
|
-
const unsubscribe = globalMouseTracker.subscribe(handleGlobalMousePosition)
|
|
2977
|
+
const unsubscribe = globalMouseTracker.subscribe(handleGlobalMousePosition);
|
|
2978
|
+
// Start the lerp loop — it will smoothly chase the target
|
|
2979
|
+
startLerpLoop();
|
|
2980
|
+
const container = mouseContainer?.current || glassRef.current;
|
|
3006
2981
|
let resizeObserver = null;
|
|
3007
2982
|
return container && "undefined" != typeof ResizeObserver && (resizeObserver = new ResizeObserver((() => {
|
|
3008
2983
|
null !== updateRectRef.current && cancelAnimationFrame(updateRectRef.current), updateRectRef.current = requestAnimationFrame((() => {
|
|
@@ -3010,10 +2985,10 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3010
2985
|
container && (cachedRectRef.current = container.getBoundingClientRect()), updateRectRef.current = null;
|
|
3011
2986
|
}));
|
|
3012
2987
|
})), resizeObserver.observe(container)), () => {
|
|
3013
|
-
unsubscribe(), null !== updateRectRef.current && (cancelAnimationFrame(updateRectRef.current),
|
|
2988
|
+
unsubscribe(), stopLerpLoop(), null !== updateRectRef.current && (cancelAnimationFrame(updateRectRef.current),
|
|
3014
2989
|
updateRectRef.current = null), resizeObserver && resizeObserver.disconnect();
|
|
3015
2990
|
};
|
|
3016
|
-
}), [ handleGlobalMousePosition, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]),
|
|
2991
|
+
}), [ handleGlobalMousePosition, startLerpLoop, stopLerpLoop, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveWithoutEffects ]),
|
|
3017
2992
|
// Also call updateStyles on other state changes (hover, active, etc)
|
|
3018
2993
|
useEffect((() => {
|
|
3019
2994
|
updateAtomixGlassStyles(wrapperRef?.current || null, glassRef.current, {
|
|
@@ -3022,22 +2997,22 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3022
2997
|
glassSize: glassSize,
|
|
3023
2998
|
isHovered: isHovered,
|
|
3024
2999
|
isActive: isActive,
|
|
3025
|
-
isOverLight:
|
|
3026
|
-
baseOverLightConfig:
|
|
3000
|
+
isOverLight: overLightConfig.isOverLight,
|
|
3001
|
+
baseOverLightConfig: overLightConfig,
|
|
3027
3002
|
effectiveBorderRadius: effectiveBorderRadius,
|
|
3028
3003
|
effectiveWithoutEffects: effectiveWithoutEffects,
|
|
3029
3004
|
effectiveReducedMotion: effectiveReducedMotion,
|
|
3030
3005
|
elasticity: elasticity,
|
|
3031
|
-
directionalScale:
|
|
3006
|
+
directionalScale: isActive && Boolean(onClick) ? "scale(0.96)" : "scale(1)",
|
|
3032
3007
|
onClick: onClick,
|
|
3033
3008
|
withLiquidBlur: withLiquidBlur,
|
|
3034
3009
|
blurAmount: blurAmount,
|
|
3035
3010
|
saturation: saturation,
|
|
3036
3011
|
padding: padding
|
|
3037
3012
|
});
|
|
3038
|
-
}), [ isHovered, isActive, glassSize,
|
|
3013
|
+
}), [ isHovered, isActive, glassSize, overLightConfig, effectiveBorderRadius, effectiveWithoutEffects, effectiveReducedMotion, elasticity, wrapperRef, glassRef, externalMouseOffset, externalGlobalMousePosition, withLiquidBlur, blurAmount, saturation, padding, onClick ]);
|
|
3039
3014
|
// Event handlers
|
|
3040
|
-
const handleMouseEnter = useCallback((() => setIsHovered(!0)), []), handleMouseLeave = useCallback((() => setIsHovered(!1)), []), handleMouseDown = useCallback((() => setIsActive(!0)), []), handleMouseUp = useCallback((() => setIsActive(!1)), []),
|
|
3015
|
+
const handleMouseEnter = useCallback((() => setIsHovered(!0)), []), handleMouseLeave = useCallback((() => setIsHovered(!1)), []), handleMouseDown = useCallback((() => setIsActive(!0)), []), handleMouseUp = useCallback((() => setIsActive(!1)), []), handleKeyDown = useCallback((e => {
|
|
3041
3016
|
!onClick || "Enter" !== e.key && " " !== e.key || (e.preventDefault(), onClick());
|
|
3042
3017
|
}), [ onClick ]);
|
|
3043
3018
|
return {
|
|
@@ -3055,14 +3030,11 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3055
3030
|
mouseOffset: mouseOffset,
|
|
3056
3031
|
// This is now static (refs or props) unless prop changes
|
|
3057
3032
|
overLightConfig: overLightConfig,
|
|
3058
|
-
elasticTranslation: elasticTranslation,
|
|
3059
|
-
directionalScale: directionalScale,
|
|
3060
3033
|
transformStyle: transformStyle,
|
|
3061
3034
|
handleMouseEnter: handleMouseEnter,
|
|
3062
3035
|
handleMouseLeave: handleMouseLeave,
|
|
3063
3036
|
handleMouseDown: handleMouseDown,
|
|
3064
3037
|
handleMouseUp: handleMouseUp,
|
|
3065
|
-
handleMouseMove: handleMouseMove,
|
|
3066
3038
|
handleKeyDown: handleKeyDown
|
|
3067
3039
|
};
|
|
3068
3040
|
}
|
|
@@ -3160,25 +3132,56 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3160
3132
|
withLiquidBlur: withLiquidBlur,
|
|
3161
3133
|
padding: padding,
|
|
3162
3134
|
style: style
|
|
3163
|
-
}), isOverLight = useMemo((() => overLightConfig
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3135
|
+
}), isOverLight = useMemo((() => overLightConfig.isOverLight), [ overLightConfig.isOverLight ]), shouldRenderOverLightLayers = withOverLightLayers && isOverLight, {zIndex: customZIndex, ...restStyle} = style, isFixedOrSticky = "fixed" === restStyle.position || "sticky" === restStyle.position, rootLayoutStyle = useMemo((() => {
|
|
3136
|
+
if (!isFixedOrSticky) return {};
|
|
3137
|
+
const {position: p, top: t, left: l, right: r, bottom: b} = restStyle;
|
|
3138
|
+
return {
|
|
3139
|
+
...p && {
|
|
3140
|
+
position: p
|
|
3141
|
+
},
|
|
3142
|
+
...void 0 !== t && {
|
|
3143
|
+
top: t
|
|
3144
|
+
},
|
|
3145
|
+
...void 0 !== l && {
|
|
3146
|
+
left: l
|
|
3147
|
+
},
|
|
3148
|
+
...void 0 !== r && {
|
|
3149
|
+
right: r
|
|
3150
|
+
},
|
|
3151
|
+
...void 0 !== b && {
|
|
3152
|
+
bottom: b
|
|
3153
|
+
}
|
|
3154
|
+
};
|
|
3155
|
+
}), [ isFixedOrSticky, restStyle ]), baseStyle = useMemo((() => {
|
|
3156
|
+
if (isFixedOrSticky) {
|
|
3157
|
+
const {position: _p, top: _t, left: _l, right: _r, bottom: _b, ...visualStyle} = restStyle;
|
|
3158
|
+
return {
|
|
3159
|
+
...visualStyle,
|
|
3160
|
+
...!effectiveWithoutEffects && {
|
|
3161
|
+
transform: transformStyle
|
|
3162
|
+
}
|
|
3163
|
+
};
|
|
3167
3164
|
}
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3165
|
+
return {
|
|
3166
|
+
...restStyle,
|
|
3167
|
+
...!effectiveWithoutEffects && {
|
|
3168
|
+
transform: transformStyle
|
|
3169
|
+
}
|
|
3170
|
+
};
|
|
3171
|
+
}), [ isFixedOrSticky, restStyle, effectiveWithoutEffects, transformStyle ]), componentClassName = [ ATOMIX_GLASS.BASE_CLASS, effectiveReducedMotion && `${ATOMIX_GLASS.BASE_CLASS}--reduced-motion`, effectiveHighContrast && `${ATOMIX_GLASS.BASE_CLASS}--high-contrast`, effectiveWithoutEffects && `${ATOMIX_GLASS.BASE_CLASS}--disabled-effects`, className ].filter(Boolean).join(" "), positionStyles = useMemo((() => ({
|
|
3172
|
+
position: isFixedOrSticky ? "absolute" : restStyle.position || "absolute",
|
|
3173
|
+
top: isFixedOrSticky ? 0 : restStyle.top || 0,
|
|
3174
|
+
left: isFixedOrSticky ? 0 : restStyle.left || 0
|
|
3175
|
+
})), [ isFixedOrSticky, restStyle.position, restStyle.top, restStyle.left ]), adjustedSize = useMemo((() => {
|
|
3173
3176
|
const resolveSize = (propValue, styleValue, measuredSize) => {
|
|
3174
3177
|
const explicitSize = propValue ?? styleValue;
|
|
3175
3178
|
return void 0 !== explicitSize ? "number" == typeof explicitSize ? `${explicitSize}px` : explicitSize : "fixed" === positionStyles.position ? `${Math.max(measuredSize, 0)}px` : "100%";
|
|
3176
3179
|
};
|
|
3177
3180
|
return {
|
|
3178
|
-
width: resolveSize(width,
|
|
3179
|
-
height: resolveSize(height,
|
|
3181
|
+
width: resolveSize(width, restStyle.width, glassSize.width),
|
|
3182
|
+
height: resolveSize(height, restStyle.height, glassSize.height)
|
|
3180
3183
|
};
|
|
3181
|
-
}), [ width, height,
|
|
3184
|
+
}), [ width, height, restStyle.width, restStyle.height, positionStyles.position, glassSize.width, glassSize.height ]), gradientValues = useMemo((() => {
|
|
3182
3185
|
const mx = mouseOffset.x, my = mouseOffset.y, absMx = Math.abs(mx), absMy = Math.abs(my), GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT;
|
|
3183
3186
|
return {
|
|
3184
3187
|
borderGradientAngle: GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER,
|
|
@@ -3220,6 +3223,9 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3220
3223
|
}), [ isHovered, isActive, isOverLight, overLightConfig.opacity ]), glassVars = useMemo((() => {
|
|
3221
3224
|
const whiteColor = ATOMIX_GLASS.CONSTANTS.PALETTE.WHITE, blackColor = ATOMIX_GLASS.CONSTANTS.PALETTE.BLACK, {borderGradientAngle: borderGradientAngle, borderStop1: borderStop1, borderStop2: borderStop2, borderOpacities: borderOpacities, hoverPositions: hoverPositions, basePosition: basePosition, mx: mx, my: my, absMx: absMx, absMy: absMy} = gradientValues, configBorderOpacity = overLightConfig?.borderOpacity ?? 1;
|
|
3222
3225
|
return {
|
|
3226
|
+
...void 0 !== customZIndex && {
|
|
3227
|
+
"--atomix-glass-base-z-index": customZIndex
|
|
3228
|
+
},
|
|
3223
3229
|
"--atomix-glass-radius": `${effectiveBorderRadius}px`,
|
|
3224
3230
|
"--atomix-glass-transform": transformStyle || "none",
|
|
3225
3231
|
"--atomix-glass-position": positionStyles.position,
|
|
@@ -3240,22 +3246,19 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3240
3246
|
"--atomix-glass-base-opacity": opacityValues.base,
|
|
3241
3247
|
"--atomix-glass-base-gradient": isOverLight ? `linear-gradient(${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.ANGLE}deg, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_BASE + mx * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_BASE + my * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_MULTIPLIER}) ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_BASE + absMx * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.WHITE_OPACITY})`,
|
|
3242
3248
|
"--atomix-glass-overlay-opacity": opacityValues.over,
|
|
3243
|
-
"--atomix-glass-overlay-gradient": isOverLight ? `radial-gradient(circle at ${basePosition.x}% ${basePosition.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_BASE + absMx * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_BASE + absMy * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.WHITE_OPACITY})
|
|
3249
|
+
"--atomix-glass-overlay-gradient": isOverLight ? `radial-gradient(circle at ${basePosition.x}% ${basePosition.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_BASE + absMx * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_BASE + absMy * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.WHITE_OPACITY})`,
|
|
3250
|
+
"--atomix-glass-overlay-highlight-opacity": opacityValues.over * ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.OPACITY_MULTIPLIER,
|
|
3251
|
+
"--atomix-glass-overlay-highlight-bg": `radial-gradient(circle at ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_X}% ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_Y}%, rgba(255, 255, 255, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.WHITE_OPACITY}) 0%, transparent ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.STOP}%)`
|
|
3244
3252
|
};
|
|
3245
|
-
}), [ gradientValues, opacityValues, effectiveBorderRadius, transformStyle, positionStyles, adjustedSize, isOverLight, overLightConfig.borderOpacity ]), renderBackgroundLayer = layerType => jsx("div", {
|
|
3246
|
-
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(" ")
|
|
3247
|
-
style: {
|
|
3248
|
-
...positionStyles,
|
|
3249
|
-
height: adjustedSize.height,
|
|
3250
|
-
width: adjustedSize.width,
|
|
3251
|
-
borderRadius: `${effectiveBorderRadius}px`,
|
|
3252
|
-
transform: baseStyle.transform
|
|
3253
|
-
}
|
|
3253
|
+
}), [ gradientValues, opacityValues, effectiveBorderRadius, transformStyle, positionStyles, adjustedSize, isOverLight, overLightConfig.borderOpacity, customZIndex ]), renderBackgroundLayer = layerType => jsx("div", {
|
|
3254
|
+
className: [ ATOMIX_GLASS.BACKGROUND_LAYER_CLASS, "dark" === layerType ? ATOMIX_GLASS.BACKGROUND_LAYER_DARK_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_BLACK_CLASS, isOverLight ? ATOMIX_GLASS.BACKGROUND_LAYER_OVER_LIGHT_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_HIDDEN_CLASS ].filter(Boolean).join(" ")
|
|
3254
3255
|
});
|
|
3255
3256
|
return jsxs("div", {
|
|
3256
3257
|
...rest,
|
|
3257
3258
|
className: componentClassName,
|
|
3258
|
-
style:
|
|
3259
|
+
style: {
|
|
3260
|
+
...glassVars
|
|
3261
|
+
},
|
|
3259
3262
|
role: role || (onClick ? "button" : void 0),
|
|
3260
3263
|
tabIndex: onClick ? tabIndex ?? 0 : tabIndex,
|
|
3261
3264
|
"aria-label": ariaLabel,
|
|
@@ -3267,7 +3270,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3267
3270
|
ref: glassRef,
|
|
3268
3271
|
contentRef: contentRef,
|
|
3269
3272
|
className: className,
|
|
3270
|
-
style:
|
|
3273
|
+
style: rootLayoutStyle,
|
|
3271
3274
|
borderRadius: effectiveBorderRadius,
|
|
3272
3275
|
displacementScale: effectiveWithoutEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT : isOverLight ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.OVER_LIGHT_DISPLACEMENT : displacementScale,
|
|
3273
3276
|
blurAmount: effectiveWithoutEffects ? 0 : blurAmount,
|
|
@@ -3318,11 +3321,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
|
|
|
3318
3321
|
}), jsx("div", {
|
|
3319
3322
|
className: ATOMIX_GLASS.OVERLAY_LAYER_CLASS
|
|
3320
3323
|
}), jsx("div", {
|
|
3321
|
-
className: ATOMIX_GLASS.OVERLAY_HIGHLIGHT_CLASS
|
|
3322
|
-
style: {
|
|
3323
|
-
opacity: opacityValues.over * ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.OPACITY_MULTIPLIER,
|
|
3324
|
-
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}%)`
|
|
3325
|
-
}
|
|
3324
|
+
className: ATOMIX_GLASS.OVERLAY_HIGHLIGHT_CLASS
|
|
3326
3325
|
}) ]
|
|
3327
3326
|
}), withBorder && jsxs(Fragment, {
|
|
3328
3327
|
children: [ jsx("span", {
|
|
@@ -12318,96 +12317,6 @@ function useTodo(initialProps) {
|
|
|
12318
12317
|
};
|
|
12319
12318
|
}
|
|
12320
12319
|
|
|
12321
|
-
/**
|
|
12322
|
-
* Custom hook for managing GlassContainer state and interactions
|
|
12323
|
-
*/ function useGlassContainer(props) {
|
|
12324
|
-
const {glassSize: glassSize = {
|
|
12325
|
-
width: 270,
|
|
12326
|
-
height: 69
|
|
12327
|
-
}, elasticity: elasticity = .15, mouseContainer: mouseContainer, globalMousePos: externalGlobalMousePos, mouseOffset: externalMouseOffset} = props, filterId = useId(), glassRef = useRef(null), [isHovered, setIsHovered] = useState(!1), [isActive, setIsActive] = useState(!1), [currentGlassSize, setCurrentGlassSize] = useState(glassSize), [internalGlobalMousePos, setInternalGlobalMousePos] = useState({
|
|
12328
|
-
x: 0,
|
|
12329
|
-
y: 0
|
|
12330
|
-
}), [internalMouseOffset, setInternalMouseOffset] = useState({
|
|
12331
|
-
x: 0,
|
|
12332
|
-
y: 0
|
|
12333
|
-
}), globalMousePos = externalGlobalMousePos || internalGlobalMousePos, mouseOffset = externalMouseOffset || internalMouseOffset, handleMouseMove = useCallback((e => {
|
|
12334
|
-
const container = mouseContainer?.current || glassRef.current;
|
|
12335
|
-
if (!container) return;
|
|
12336
|
-
const rect = container.getBoundingClientRect(), centerX = rect.left + rect.width / 2, centerY = rect.top + rect.height / 2;
|
|
12337
|
-
setInternalMouseOffset({
|
|
12338
|
-
x: (e.clientX - centerX) / rect.width * 100,
|
|
12339
|
-
y: (e.clientY - centerY) / rect.height * 100
|
|
12340
|
-
}), setInternalGlobalMousePos({
|
|
12341
|
-
x: e.clientX,
|
|
12342
|
-
y: e.clientY
|
|
12343
|
-
});
|
|
12344
|
-
}), [ mouseContainer ]);
|
|
12345
|
-
// Set up mouse tracking if no external mouse position is provided
|
|
12346
|
-
useEffect((() => {
|
|
12347
|
-
if (externalGlobalMousePos && externalMouseOffset) return;
|
|
12348
|
-
const container = mouseContainer?.current || glassRef.current;
|
|
12349
|
-
return container ? (container.addEventListener("mousemove", handleMouseMove), () => container.removeEventListener("mousemove", handleMouseMove)) : void 0;
|
|
12350
|
-
}), [ handleMouseMove, mouseContainer, externalGlobalMousePos, externalMouseOffset ]);
|
|
12351
|
-
// Calculate directional scaling based on mouse position
|
|
12352
|
-
const calculateDirectionalScale = useCallback((() => {
|
|
12353
|
-
if (!globalMousePos.x || !globalMousePos.y || !glassRef.current) return "scale(1)";
|
|
12354
|
-
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);
|
|
12355
|
-
if (edgeDistance > 200) return "scale(1)";
|
|
12356
|
-
const fadeInFactor = 1 - edgeDistance / 200, centerDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
12357
|
-
if (0 === centerDistance) return "scale(1)";
|
|
12358
|
-
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;
|
|
12359
|
-
return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
|
|
12360
|
-
}), [ globalMousePos, elasticity, currentGlassSize ]), calculateElasticTranslation = useCallback((() => {
|
|
12361
|
-
if (!glassRef.current) return {
|
|
12362
|
-
x: 0,
|
|
12363
|
-
y: 0
|
|
12364
|
-
};
|
|
12365
|
-
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;
|
|
12366
|
-
return {
|
|
12367
|
-
x: (globalMousePos.x - pillCenterX) * elasticity * .1 * fadeInFactor,
|
|
12368
|
-
y: (globalMousePos.y - pillCenterY) * elasticity * .1 * fadeInFactor
|
|
12369
|
-
};
|
|
12370
|
-
}), [ globalMousePos, elasticity, currentGlassSize ]);
|
|
12371
|
-
// Calculate elastic translation
|
|
12372
|
-
// Update glass size
|
|
12373
|
-
useEffect((() => {
|
|
12374
|
-
const updateGlassSize = () => {
|
|
12375
|
-
if (glassRef.current) {
|
|
12376
|
-
const rect = glassRef.current.getBoundingClientRect();
|
|
12377
|
-
setCurrentGlassSize({
|
|
12378
|
-
width: rect.width,
|
|
12379
|
-
height: rect.height
|
|
12380
|
-
});
|
|
12381
|
-
}
|
|
12382
|
-
};
|
|
12383
|
-
return updateGlassSize(), window.addEventListener("resize", updateGlassSize), () => window.removeEventListener("resize", updateGlassSize);
|
|
12384
|
-
}), []);
|
|
12385
|
-
const handleMouseEnter = useCallback((() => {
|
|
12386
|
-
setIsHovered(!0);
|
|
12387
|
-
}), []), handleMouseLeave = useCallback((() => {
|
|
12388
|
-
setIsHovered(!1);
|
|
12389
|
-
}), []), handleMouseDown = useCallback((() => {
|
|
12390
|
-
setIsActive(!0);
|
|
12391
|
-
}), []), handleMouseUp = useCallback((() => {
|
|
12392
|
-
setIsActive(!1);
|
|
12393
|
-
}), []);
|
|
12394
|
-
return {
|
|
12395
|
-
filterId: filterId,
|
|
12396
|
-
glassRef: glassRef,
|
|
12397
|
-
isHovered: isHovered,
|
|
12398
|
-
isActive: isActive,
|
|
12399
|
-
currentGlassSize: currentGlassSize,
|
|
12400
|
-
globalMousePos: globalMousePos,
|
|
12401
|
-
mouseOffset: mouseOffset,
|
|
12402
|
-
calculateDirectionalScale: calculateDirectionalScale,
|
|
12403
|
-
calculateElasticTranslation: calculateElasticTranslation,
|
|
12404
|
-
handleMouseEnter: handleMouseEnter,
|
|
12405
|
-
handleMouseLeave: handleMouseLeave,
|
|
12406
|
-
handleMouseDown: handleMouseDown,
|
|
12407
|
-
handleMouseUp: handleMouseUp
|
|
12408
|
-
};
|
|
12409
|
-
}
|
|
12410
|
-
|
|
12411
12320
|
/**
|
|
12412
12321
|
* Radio state and functionality
|
|
12413
12322
|
* @param initialProps - Initial radio properties
|
|
@@ -12900,7 +12809,6 @@ const composablesImport = Object.freeze( Object.defineProperty({
|
|
|
12900
12809
|
useEdgePanel: useEdgePanel,
|
|
12901
12810
|
useForm: useForm,
|
|
12902
12811
|
useFormGroup: useFormGroup,
|
|
12903
|
-
useGlassContainer: useGlassContainer,
|
|
12904
12812
|
useHero: useHero,
|
|
12905
12813
|
useInput: useInput,
|
|
12906
12814
|
useLineChart: useLineChart,
|
|
@@ -14971,13 +14879,14 @@ const Navbar = forwardRef((({brand: brand, children: children, variant: variant
|
|
|
14971
14879
|
return jsx(AtomixGlass, {
|
|
14972
14880
|
...glassProps,
|
|
14973
14881
|
style: {
|
|
14974
|
-
..."fixed" === position && {
|
|
14975
|
-
position: "fixed"
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14882
|
+
...("fixed" === position || "fixed-bottom" === position) && {
|
|
14883
|
+
position: "fixed",
|
|
14884
|
+
top: "fixed" === position ? 0 : void 0,
|
|
14885
|
+
bottom: "fixed-bottom" === position ? 0 : void 0,
|
|
14886
|
+
left: 0,
|
|
14887
|
+
right: 0,
|
|
14888
|
+
zIndex: 1030
|
|
14889
|
+
}
|
|
14981
14890
|
},
|
|
14982
14891
|
children: jsx("nav", {
|
|
14983
14892
|
ref: ref,
|
|
@@ -25432,5 +25341,5 @@ const atomix = {
|
|
|
25432
25341
|
types: types
|
|
25433
25342
|
};
|
|
25434
25343
|
|
|
25435
|
-
export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, BUTTON_GROUP, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, ButtonGroup, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DesignTokensCustomizer, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GaugeChart, Grid, GridCol, HERO, HeatmapChart, Hero, INPUT, INPUT_CSS_VARS, Icon, Input, LIST, LIST_GROUP, LineChart, List, ListGroup, MESSAGES, MODAL, MODAL_CSS_VARS, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, NAV, NAVBAR, Nav, NavDropdown, NavItem, Navbar, PAGINATION_DEFAULTS, PHOTOVIEWER, POPOVER, PROGRESS, PROGRESS_CSS_VARS, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RADIO, RADIO_CSS_VARS, RATING, RIVER, RTLManager, RadarChart, Radio, Rating, River, Row, SECTION_INTRO, SELECT, SIDE_MENU, SIZES, SLIDER, SPINNER, STEPS, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, TAB, TABS_CSS_VARS, TESTIMONIAL, TEXTAREA, THEME_COLORS, THEME_NAMING, TODO, TOGGLE, TOOLTIP, TOOLTIP_CSS_VARS, Tabs, Testimonial, Textarea, ThemeApplicator, ThemeComparator, ThemeContext, ThemeErrorBoundary, ThemeInspector, ThemeLiveEditor, ThemePreview, ThemeProvider, ThemeValidator, Todo, Toggle, Tooltip, TreemapChart, UPLOAD, Upload, VIDEO_PLAYER, VideoPlayer, WaterfallChart, applyCSSVariables, applyCSSVarsToStyle, applyComponentTheme, applyPartStyles, applyTheme, camelToKebab, clearThemes, composables, constants, createCSSVarStyle, createDarkVariant, createDebugAttrs, createFontPreloadLink, createPartProps, createSlotComponent, createSlotProps, createTheme, createThemeRegistry, createTokens, cssVarsToStyle, deepMerge, atomix as default, defaultTokens, defineConfig, designTokensToCSSVars, exportTheme, extendTheme, extractComponentName, extractYouTubeId, generateCSSVariableName, generateCSSVariables$1 as generateCSSVariables, generateCSSVariablesForSelector, generateClassName, generateComponentCSSVars, generateFontPreloadTags, generateUUID, getAllThemes, getCSSVariable, getComponentCSSVars, getComponentThemeValue, getPartStyles, getTheme, getThemeApplicator, getThemeCount, getThemeIds, getThemeMetadata, hasCustomization, hasTheme, importTheme, injectCSS$1 as injectCSS, injectTheme, isCSSInjected, isDesignTokens, isSlot, isValidCSSVariableName, isYouTubeUrl, mapSCSSTokensToCSSVars, mergeCSSVars, mergeClassNames, mergeComponentProps, mergePartStyles, mergeSlots, mergeTheme, normalizeThemeTokens, preloadFonts, quickTheme, registerTheme, removeCSS, removeCSSVariables, removeTheme, renderSlot, sliderConstants, supportsDarkMode, theme, themePropertyToCSSVar, themeToCSS, types, unregisterTheme, useAccordion, useAtomixGlass, useBadge, useBarChart, useBlock, useBreadcrumb, useCard, useChartData, useChartInteraction, useChartScale, useComponentCustomization, useComponentDefaultProps, useComponentTheme, useDataTable, useEdgePanel, useForm, useFormGroup,
|
|
25344
|
+
export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, BUTTON_GROUP, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, ButtonGroup, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DesignTokensCustomizer, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GaugeChart, Grid, GridCol, HERO, HeatmapChart, Hero, INPUT, INPUT_CSS_VARS, Icon, Input, LIST, LIST_GROUP, LineChart, List, ListGroup, MESSAGES, MODAL, MODAL_CSS_VARS, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, NAV, NAVBAR, Nav, NavDropdown, NavItem, Navbar, PAGINATION_DEFAULTS, PHOTOVIEWER, POPOVER, PROGRESS, PROGRESS_CSS_VARS, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RADIO, RADIO_CSS_VARS, RATING, RIVER, RTLManager, RadarChart, Radio, Rating, River, Row, SECTION_INTRO, SELECT, SIDE_MENU, SIZES, SLIDER, SPINNER, STEPS, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, TAB, TABS_CSS_VARS, TESTIMONIAL, TEXTAREA, THEME_COLORS, THEME_NAMING, TODO, TOGGLE, TOOLTIP, TOOLTIP_CSS_VARS, Tabs, Testimonial, Textarea, ThemeApplicator, ThemeComparator, ThemeContext, ThemeErrorBoundary, ThemeInspector, ThemeLiveEditor, ThemePreview, ThemeProvider, ThemeValidator, Todo, Toggle, Tooltip, TreemapChart, UPLOAD, Upload, VIDEO_PLAYER, VideoPlayer, WaterfallChart, applyCSSVariables, applyCSSVarsToStyle, applyComponentTheme, applyPartStyles, applyTheme, camelToKebab, clearThemes, composables, constants, createCSSVarStyle, createDarkVariant, createDebugAttrs, createFontPreloadLink, createPartProps, createSlotComponent, createSlotProps, createTheme, createThemeRegistry, createTokens, cssVarsToStyle, deepMerge, atomix as default, defaultTokens, defineConfig, designTokensToCSSVars, exportTheme, extendTheme, extractComponentName, extractYouTubeId, generateCSSVariableName, generateCSSVariables$1 as generateCSSVariables, generateCSSVariablesForSelector, generateClassName, generateComponentCSSVars, generateFontPreloadTags, generateUUID, getAllThemes, getCSSVariable, getComponentCSSVars, getComponentThemeValue, getPartStyles, getTheme, getThemeApplicator, getThemeCount, getThemeIds, getThemeMetadata, hasCustomization, hasTheme, importTheme, injectCSS$1 as injectCSS, injectTheme, isCSSInjected, isDesignTokens, isSlot, isValidCSSVariableName, isYouTubeUrl, mapSCSSTokensToCSSVars, mergeCSSVars, mergeClassNames, mergeComponentProps, mergePartStyles, mergeSlots, mergeTheme, normalizeThemeTokens, preloadFonts, quickTheme, registerTheme, removeCSS, removeCSSVariables, removeTheme, renderSlot, sliderConstants, supportsDarkMode, theme, themePropertyToCSSVar, themeToCSS, types, unregisterTheme, useAccordion, useAtomixGlass, useBadge, useBarChart, useBlock, useBreadcrumb, useCard, useChartData, useChartInteraction, useChartScale, useComponentCustomization, useComponentDefaultProps, useComponentTheme, useDataTable, useEdgePanel, useForm, useFormGroup, useHero, useHistory, useInput, useLineChart, useMergedProps, useModal$1 as useModal, useNav, useNavDropdown, useNavItem, useNavbar, usePagination, usePieChart, useRadio, useRiver, useSelect, useSideMenu, useSideMenuItem, useSlider, useSlot, useSpinner, useTextarea, useTheme, useThemeTokens, useTodo, utils, validateTheme };
|
|
25436
25345
|
//# sourceMappingURL=index.esm.js.map
|