@shohojdhara/atomix 0.6.3 → 0.6.5
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 +119 -40
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +1 -1
- package/dist/atomix.min.css.map +1 -1
- package/dist/atomix.umd.js +1 -1
- package/dist/atomix.umd.js.map +1 -1
- package/dist/atomix.umd.min.js +1 -1
- package/dist/charts.d.ts +30 -1
- package/dist/charts.js +566 -597
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +30 -1
- package/dist/core.js +600 -624
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +30 -1
- package/dist/forms.js +1122 -1163
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +31 -89
- package/dist/heavy.js +1015 -1045
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +378 -104
- package/dist/index.esm.js +10959 -10837
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10935 -10812
- 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/Accordion/Accordion.tsx +2 -5
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +14 -16
- package/src/components/AtomixGlass/AtomixGlass.tsx +137 -355
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +32 -249
- package/src/components/AtomixGlass/GlassFilter.tsx +62 -68
- package/src/components/AtomixGlass/README.md +2 -1
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +19 -18
- package/src/components/AtomixGlass/glass-border-styles.test.ts +58 -0
- package/src/components/AtomixGlass/glass-border-styles.ts +136 -0
- package/src/components/AtomixGlass/glass-utils.ts +411 -6
- package/src/components/AtomixGlass/stories/AnimationFeatures.stories.tsx +158 -537
- package/src/components/AtomixGlass/stories/Border.stories.tsx +149 -0
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +229 -89
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +29 -340
- package/src/components/AtomixGlass/stories/argTypes.ts +30 -13
- package/src/components/AtomixGlass/stories/premium-presets.ts +206 -0
- package/src/components/AtomixGlass/stories/shared-components.tsx +52 -8
- package/src/components/Badge/Badge.tsx +4 -4
- package/src/components/Button/Button.tsx +2 -6
- package/src/components/Callout/Callout.test.tsx +4 -3
- package/src/components/Callout/Callout.tsx +2 -5
- package/src/components/Dropdown/Dropdown.tsx +3 -7
- package/src/components/Form/Checkbox.tsx +2 -8
- package/src/components/Form/Input.tsx +2 -9
- package/src/components/Form/Radio.tsx +2 -9
- package/src/components/Form/Select.tsx +2 -7
- package/src/components/Form/Textarea.tsx +2 -9
- package/src/components/Messages/Messages.tsx +2 -8
- package/src/components/Modal/Modal.tsx +4 -5
- package/src/components/Navigation/Nav/Nav.tsx +2 -6
- package/src/components/Navigation/Navbar/Navbar.tsx +2 -9
- package/src/components/Navigation/SideMenu/SideMenu.tsx +2 -6
- package/src/components/Pagination/Pagination.tsx +2 -10
- package/src/components/Popover/Popover.tsx +2 -9
- package/src/components/Progress/Progress.tsx +2 -7
- package/src/components/Rating/Rating.tsx +2 -10
- package/src/components/Spinner/Spinner.tsx +2 -7
- package/src/components/Steps/Steps.tsx +2 -10
- package/src/components/Tabs/Tabs.tsx +2 -9
- package/src/components/Toggle/Toggle.tsx +2 -10
- package/src/components/Tooltip/Tooltip.tsx +2 -5
- package/src/lib/composables/useAtomixGlass.ts +41 -10
- package/src/lib/composables/useAtomixGlassStyles.ts +59 -75
- package/src/lib/composables/usePerformanceMonitor.ts +5 -0
- package/src/lib/constants/components.ts +358 -46
- package/src/lib/types/components.ts +33 -1
- package/src/styles/01-settings/_settings.atomix-glass.scss +69 -31
- package/src/styles/02-tools/_tools.glass.scss +45 -3
- package/src/styles/06-components/_components.atomix-glass.scss +114 -77
- package/src/components/AtomixGlass/deprecated/AtomixGlass.deprecated.tsx +0 -390
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, useId, memo, forwardRef, ComponentType } from 'react';
|
|
2
|
-
import { ACCORDION } from '../../lib/constants/components';
|
|
2
|
+
import { ACCORDION, GLASS_DEFAULTS } from '../../lib/constants/components';
|
|
3
3
|
import { useAccordion } from '../../lib/composables/useAccordion';
|
|
4
4
|
import type {
|
|
5
5
|
AccordionProps as AccordionPropsType,
|
|
@@ -232,10 +232,7 @@ const AccordionImpl = memo(
|
|
|
232
232
|
|
|
233
233
|
if (glass) {
|
|
234
234
|
// Default glass settings for accordions
|
|
235
|
-
const defaultGlassProps =
|
|
236
|
-
displacementScale: 20,
|
|
237
|
-
elasticity: 0,
|
|
238
|
-
};
|
|
235
|
+
const defaultGlassProps = GLASS_DEFAULTS.ACCORDION;
|
|
239
236
|
|
|
240
237
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
241
238
|
|
|
@@ -168,25 +168,24 @@ describe('AtomixGlass Component', () => {
|
|
|
168
168
|
|
|
169
169
|
const root = container.querySelector('.c-atomix-glass');
|
|
170
170
|
const glassContainer = container.querySelector('.c-atomix-glass__container');
|
|
171
|
-
|
|
171
|
+
// Layout belongs on the container so backdrop-filter samples the page correctly.
|
|
172
|
+
expect(root).not.toHaveStyle('position: fixed');
|
|
173
|
+
expect(glassContainer).toHaveStyle('position: fixed');
|
|
172
174
|
expect(glassContainer).toHaveStyle('background-color: rgb(255, 0, 0)');
|
|
173
175
|
});
|
|
174
176
|
|
|
175
|
-
test('
|
|
177
|
+
test('applies z-index on container for fixed positioning', () => {
|
|
176
178
|
const { container } = render(
|
|
177
|
-
<AtomixGlass style={{ position: 'fixed' }}>
|
|
179
|
+
<AtomixGlass style={{ position: 'fixed', top: 0, left: 0, zIndex: 1200 }}>
|
|
178
180
|
<div>Content</div>
|
|
179
181
|
</AtomixGlass>
|
|
180
182
|
);
|
|
181
183
|
|
|
184
|
+
const root = container.querySelector('.c-atomix-glass');
|
|
182
185
|
const glassContainer = container.querySelector('.c-atomix-glass__container');
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
// With the new logic, fixed/sticky elements use measured sizes,
|
|
187
|
-
// not 100% (which is for standard flow)
|
|
188
|
-
expect(glassContainer).not.toHaveStyle('--atomix-glass-container-width: 100%');
|
|
189
|
-
});
|
|
186
|
+
expect(root).not.toHaveStyle('z-index: 1200');
|
|
187
|
+
expect(glassContainer).toHaveStyle('position: fixed');
|
|
188
|
+
expect(glassContainer).toHaveStyle('z-index: 1200');
|
|
190
189
|
});
|
|
191
190
|
|
|
192
191
|
test('sets 100% width/height for standard flow (not fixed/sticky)', async () => {
|
|
@@ -196,11 +195,11 @@ describe('AtomixGlass Component', () => {
|
|
|
196
195
|
</AtomixGlass>
|
|
197
196
|
);
|
|
198
197
|
|
|
199
|
-
const
|
|
200
|
-
|
|
198
|
+
const root = container.querySelector('.c-atomix-glass');
|
|
199
|
+
|
|
201
200
|
await waitFor(() => {
|
|
202
|
-
expect(
|
|
203
|
-
expect(
|
|
201
|
+
expect(root).toHaveStyle('--atomix-glass-width: 100%');
|
|
202
|
+
expect(root).toHaveStyle('--atomix-glass-height: 100%');
|
|
204
203
|
});
|
|
205
204
|
});
|
|
206
205
|
|
|
@@ -241,8 +240,7 @@ describe('AtomixGlass Component', () => {
|
|
|
241
240
|
});
|
|
242
241
|
});
|
|
243
242
|
|
|
244
|
-
|
|
245
|
-
// Keep only a single smoke snapshot to detect catastrophic DOM changes.
|
|
243
|
+
/** Smoke snapshot to guard against unintended DOM structure changes. */
|
|
246
244
|
describe('AtomixGlass Visual Regression', () => {
|
|
247
245
|
test('matches snapshot with default props', () => {
|
|
248
246
|
const { container } = render(
|