@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.
Files changed (77) hide show
  1. package/dist/atomix.css +119 -40
  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/atomix.umd.js +1 -1
  6. package/dist/atomix.umd.js.map +1 -1
  7. package/dist/atomix.umd.min.js +1 -1
  8. package/dist/charts.d.ts +30 -1
  9. package/dist/charts.js +566 -597
  10. package/dist/charts.js.map +1 -1
  11. package/dist/core.d.ts +30 -1
  12. package/dist/core.js +600 -624
  13. package/dist/core.js.map +1 -1
  14. package/dist/forms.d.ts +30 -1
  15. package/dist/forms.js +1122 -1163
  16. package/dist/forms.js.map +1 -1
  17. package/dist/heavy.d.ts +31 -89
  18. package/dist/heavy.js +1015 -1045
  19. package/dist/heavy.js.map +1 -1
  20. package/dist/index.d.ts +378 -104
  21. package/dist/index.esm.js +10959 -10837
  22. package/dist/index.esm.js.map +1 -1
  23. package/dist/index.js +10935 -10812
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.min.js +1 -1
  26. package/dist/index.min.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/components/Accordion/Accordion.tsx +2 -5
  29. package/src/components/AtomixGlass/AtomixGlass.test.tsx +14 -16
  30. package/src/components/AtomixGlass/AtomixGlass.tsx +137 -355
  31. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +32 -249
  32. package/src/components/AtomixGlass/GlassFilter.tsx +62 -68
  33. package/src/components/AtomixGlass/README.md +2 -1
  34. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +19 -18
  35. package/src/components/AtomixGlass/glass-border-styles.test.ts +58 -0
  36. package/src/components/AtomixGlass/glass-border-styles.ts +136 -0
  37. package/src/components/AtomixGlass/glass-utils.ts +411 -6
  38. package/src/components/AtomixGlass/stories/AnimationFeatures.stories.tsx +158 -537
  39. package/src/components/AtomixGlass/stories/Border.stories.tsx +149 -0
  40. package/src/components/AtomixGlass/stories/Examples.stories.tsx +229 -89
  41. package/src/components/AtomixGlass/stories/Playground.stories.tsx +29 -340
  42. package/src/components/AtomixGlass/stories/argTypes.ts +30 -13
  43. package/src/components/AtomixGlass/stories/premium-presets.ts +206 -0
  44. package/src/components/AtomixGlass/stories/shared-components.tsx +52 -8
  45. package/src/components/Badge/Badge.tsx +4 -4
  46. package/src/components/Button/Button.tsx +2 -6
  47. package/src/components/Callout/Callout.test.tsx +4 -3
  48. package/src/components/Callout/Callout.tsx +2 -5
  49. package/src/components/Dropdown/Dropdown.tsx +3 -7
  50. package/src/components/Form/Checkbox.tsx +2 -8
  51. package/src/components/Form/Input.tsx +2 -9
  52. package/src/components/Form/Radio.tsx +2 -9
  53. package/src/components/Form/Select.tsx +2 -7
  54. package/src/components/Form/Textarea.tsx +2 -9
  55. package/src/components/Messages/Messages.tsx +2 -8
  56. package/src/components/Modal/Modal.tsx +4 -5
  57. package/src/components/Navigation/Nav/Nav.tsx +2 -6
  58. package/src/components/Navigation/Navbar/Navbar.tsx +2 -9
  59. package/src/components/Navigation/SideMenu/SideMenu.tsx +2 -6
  60. package/src/components/Pagination/Pagination.tsx +2 -10
  61. package/src/components/Popover/Popover.tsx +2 -9
  62. package/src/components/Progress/Progress.tsx +2 -7
  63. package/src/components/Rating/Rating.tsx +2 -10
  64. package/src/components/Spinner/Spinner.tsx +2 -7
  65. package/src/components/Steps/Steps.tsx +2 -10
  66. package/src/components/Tabs/Tabs.tsx +2 -9
  67. package/src/components/Toggle/Toggle.tsx +2 -10
  68. package/src/components/Tooltip/Tooltip.tsx +2 -5
  69. package/src/lib/composables/useAtomixGlass.ts +41 -10
  70. package/src/lib/composables/useAtomixGlassStyles.ts +59 -75
  71. package/src/lib/composables/usePerformanceMonitor.ts +5 -0
  72. package/src/lib/constants/components.ts +358 -46
  73. package/src/lib/types/components.ts +33 -1
  74. package/src/styles/01-settings/_settings.atomix-glass.scss +69 -31
  75. package/src/styles/02-tools/_tools.glass.scss +45 -3
  76. package/src/styles/06-components/_components.atomix-glass.scss +114 -77
  77. package/src/components/AtomixGlass/deprecated/AtomixGlass.deprecated.tsx +0 -390
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shohojdhara/atomix",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Atomix Design System - A modern component library for web applications",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -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
- expect(root).toHaveStyle('position: fixed');
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('sets 100% width/height for fixed/sticky positioning', async () => {
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
- // Use waitFor because updateAtomixGlassStyles is called imperatively inside a requestAnimationFrame loop
185
- await waitFor(() => {
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 glassContainer = container.querySelector('.c-atomix-glass__container');
200
-
198
+ const root = container.querySelector('.c-atomix-glass');
199
+
201
200
  await waitFor(() => {
202
- expect(glassContainer).toHaveStyle('--atomix-glass-container-width: 100%');
203
- expect(glassContainer).toHaveStyle('--atomix-glass-container-height: 100%');
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
- // Visual regression tests
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(