@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
|
@@ -75,16 +75,18 @@ export const BackgroundWrapper: React.FC<BackgroundWrapperProps> = ({
|
|
|
75
75
|
|
|
76
76
|
const bgStyle = {
|
|
77
77
|
backgroundImage: bgImage ? `url(${bgImage})` : undefined,
|
|
78
|
+
backgroundSize: 'cover',
|
|
79
|
+
backgroundPosition: 'center',
|
|
80
|
+
backgroundRepeat: 'no-repeat',
|
|
78
81
|
height,
|
|
79
82
|
width,
|
|
80
83
|
borderRadius,
|
|
81
|
-
padding,
|
|
82
84
|
...style,
|
|
83
85
|
};
|
|
84
86
|
|
|
85
87
|
return (
|
|
86
88
|
<div
|
|
87
|
-
className={`u-relative u-overflow-hidden ${className}`}
|
|
89
|
+
className={`u-relative u-overflow-hidden u-flex u-items-center u-justify-center ${className}`}
|
|
88
90
|
style={bgStyle}
|
|
89
91
|
aria-hidden={ariaHidden}
|
|
90
92
|
>
|
|
@@ -94,10 +96,16 @@ export const BackgroundWrapper: React.FC<BackgroundWrapperProps> = ({
|
|
|
94
96
|
style={{
|
|
95
97
|
backgroundColor: overlayColor,
|
|
96
98
|
opacity: overlayOpacity,
|
|
99
|
+
padding,
|
|
97
100
|
}}
|
|
98
101
|
/>
|
|
99
102
|
)}
|
|
100
|
-
<div
|
|
103
|
+
<div
|
|
104
|
+
className="u-relative u-z-10 u-w-100 u-h-100 u-flex u-items-center u-justify-center"
|
|
105
|
+
style={{ padding }}
|
|
106
|
+
>
|
|
107
|
+
{children}
|
|
108
|
+
</div>
|
|
101
109
|
</div>
|
|
102
110
|
);
|
|
103
111
|
};
|
|
@@ -152,15 +152,23 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
|
|
|
152
152
|
shaderVariant: 'premiumGlass' as const,
|
|
153
153
|
};
|
|
154
154
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
155
|
+
|
|
156
|
+
// AtomixGlass hoists layout props (position/top/left/right/zIndex) to its
|
|
157
|
+
// root element, keeping all internal layers in the same stacking context.
|
|
158
|
+
const isFixed = position === 'fixed' || position === 'fixed-bottom';
|
|
159
|
+
|
|
155
160
|
return (
|
|
156
161
|
<AtomixGlass
|
|
157
162
|
{...glassProps}
|
|
158
163
|
style={{
|
|
159
|
-
...(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
...(isFixed && {
|
|
165
|
+
position: 'fixed' as const,
|
|
166
|
+
top: position === 'fixed' ? 0 : undefined,
|
|
167
|
+
bottom: position === 'fixed-bottom' ? 0 : undefined,
|
|
168
|
+
left: 0,
|
|
169
|
+
right: 0,
|
|
170
|
+
zIndex: 1030, // matches --atomix-navbar-z-index from _components.navbar.scss
|
|
171
|
+
}),
|
|
164
172
|
}}
|
|
165
173
|
>
|
|
166
174
|
<nav
|
|
@@ -29,8 +29,7 @@ export * from './useTodo';
|
|
|
29
29
|
export * from './useForm';
|
|
30
30
|
export * from './useFormGroup';
|
|
31
31
|
|
|
32
|
-
//
|
|
33
|
-
export * from './useGlassContainer';
|
|
32
|
+
// AtomixGlass composables
|
|
34
33
|
export * from './useAtomixGlass';
|
|
35
34
|
export * from './useInput';
|
|
36
35
|
export * from './useRadio';
|