@shohojdhara/atomix 0.5.1 → 0.5.4

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 (145) hide show
  1. package/atomix.config.ts +45 -33
  2. package/build-tools/webpack-loader.js +5 -4
  3. package/dist/atomix.css +138 -17
  4. package/dist/atomix.css.map +1 -1
  5. package/dist/atomix.min.css +1 -1
  6. package/dist/atomix.min.css.map +1 -1
  7. package/dist/build-tools/webpack-loader.js +5 -4
  8. package/dist/charts.d.ts +23 -23
  9. package/dist/charts.js +40 -37
  10. package/dist/charts.js.map +1 -1
  11. package/dist/config.d.ts +699 -0
  12. package/dist/config.js +17 -0
  13. package/dist/config.js.map +1 -0
  14. package/dist/core.d.ts +2 -2
  15. package/dist/core.js +111 -50
  16. package/dist/core.js.map +1 -1
  17. package/dist/forms.d.ts +3 -6
  18. package/dist/forms.js +2 -2
  19. package/dist/forms.js.map +1 -1
  20. package/dist/heavy.d.ts +1 -1
  21. package/dist/heavy.js +173 -111
  22. package/dist/heavy.js.map +1 -1
  23. package/dist/index.d.ts +1881 -790
  24. package/dist/index.esm.js +2713 -816
  25. package/dist/index.esm.js.map +1 -1
  26. package/dist/index.js +2693 -780
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.min.js +1 -1
  29. package/dist/index.min.js.map +1 -1
  30. package/dist/layout.js +59 -60
  31. package/dist/layout.js.map +1 -1
  32. package/dist/theme.d.ts +1390 -276
  33. package/dist/theme.js +2133 -625
  34. package/dist/theme.js.map +1 -1
  35. package/package.json +14 -9
  36. package/scripts/atomix-cli.js +15 -1
  37. package/scripts/cli/__tests__/complexity-utils.test.js +24 -0
  38. package/scripts/cli/__tests__/detector.test.js +50 -0
  39. package/scripts/cli/__tests__/template-engine.test.js +23 -0
  40. package/scripts/cli/__tests__/test-setup.js +3 -0
  41. package/scripts/cli/commands/doctor.js +15 -3
  42. package/scripts/cli/commands/generate.js +113 -51
  43. package/scripts/cli/internal/ai-engine.js +30 -10
  44. package/scripts/cli/internal/complexity-utils.js +60 -0
  45. package/scripts/cli/internal/component-validator.js +49 -16
  46. package/scripts/cli/internal/config-loader.js +30 -20
  47. package/scripts/cli/internal/generator.js +89 -36
  48. package/scripts/cli/internal/hook-generator.js +5 -2
  49. package/scripts/cli/internal/itcss-generator.js +16 -12
  50. package/scripts/cli/templates/next-templates.js +81 -30
  51. package/scripts/cli/templates/storybook-templates.js +12 -2
  52. package/scripts/cli/utils/detector.js +45 -7
  53. package/scripts/cli/utils/diagnostics.js +78 -0
  54. package/scripts/cli/utils/telemetry.js +13 -0
  55. package/src/components/Accordion/Accordion.stories.tsx +4 -0
  56. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +1 -1
  57. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +219 -0
  58. package/src/components/AtomixGlass/glass-utils.ts +1 -1
  59. package/src/components/Button/Button.tsx +114 -57
  60. package/src/components/Callout/Callout.tsx +4 -4
  61. package/src/components/Chart/ChartRenderer.tsx +1 -1
  62. package/src/components/Chart/DonutChart.tsx +11 -8
  63. package/src/components/EdgePanel/EdgePanel.tsx +119 -115
  64. package/src/components/Form/Select.tsx +4 -4
  65. package/src/components/List/List.tsx +4 -4
  66. package/src/components/Navigation/SideMenu/SideMenu.tsx +6 -6
  67. package/src/components/PhotoViewer/PhotoViewerImage.tsx +1 -1
  68. package/src/components/ProductReview/ProductReview.tsx +4 -2
  69. package/src/components/Rating/Rating.tsx +4 -2
  70. package/src/components/SectionIntro/SectionIntro.tsx +4 -2
  71. package/src/components/Steps/Steps.tsx +1 -1
  72. package/src/components/Tabs/Tabs.tsx +5 -5
  73. package/src/components/Testimonial/Testimonial.tsx +4 -2
  74. package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
  75. package/src/layouts/CssGrid/CssGrid.stories.tsx +464 -0
  76. package/src/layouts/CssGrid/CssGrid.tsx +215 -0
  77. package/src/layouts/CssGrid/index.ts +8 -0
  78. package/src/layouts/CssGrid/scripts/CssGrid.js +284 -0
  79. package/src/layouts/CssGrid/scripts/index.js +43 -0
  80. package/src/layouts/Grid/scripts/Container.js +139 -0
  81. package/src/layouts/Grid/scripts/Grid.js +184 -0
  82. package/src/layouts/Grid/scripts/GridCol.js +273 -0
  83. package/src/layouts/Grid/scripts/Row.js +154 -0
  84. package/src/layouts/Grid/scripts/index.js +48 -0
  85. package/src/layouts/MasonryGrid/MasonryGrid.tsx +71 -59
  86. package/src/lib/composables/atomix-glass/useGlassSize.ts +1 -1
  87. package/src/lib/composables/useAccordion.ts +5 -5
  88. package/src/lib/composables/useAtomixGlass.ts +3 -3
  89. package/src/lib/composables/useBarChart.ts +2 -2
  90. package/src/lib/composables/useChart.ts +3 -2
  91. package/src/lib/composables/useChartToolbar.ts +48 -66
  92. package/src/lib/composables/useDataTable.ts +1 -1
  93. package/src/lib/composables/useDatePicker.ts +2 -2
  94. package/src/lib/composables/useEdgePanel.ts +45 -54
  95. package/src/lib/composables/useHeroBackgroundSlider.ts +5 -5
  96. package/src/lib/composables/usePhotoViewer.ts +2 -3
  97. package/src/lib/composables/usePieChart.ts +1 -1
  98. package/src/lib/composables/usePopover.ts +151 -139
  99. package/src/lib/composables/useSideMenu.ts +28 -41
  100. package/src/lib/composables/useSlider.ts +2 -6
  101. package/src/lib/composables/useTooltip.ts +2 -2
  102. package/src/lib/config/index.ts +38 -323
  103. package/src/lib/config/loader.ts +419 -0
  104. package/src/lib/config/public-api.ts +43 -0
  105. package/src/lib/config/types.ts +389 -0
  106. package/src/lib/config/validator.ts +305 -0
  107. package/src/lib/theme/adapters/index.ts +1 -1
  108. package/src/lib/theme/adapters/themeAdapter.ts +358 -229
  109. package/src/lib/theme/components/ThemeToggle.tsx +276 -0
  110. package/src/lib/theme/config/configLoader.ts +351 -0
  111. package/src/lib/theme/config/loader.ts +221 -0
  112. package/src/lib/theme/core/createTheme.ts +126 -50
  113. package/src/lib/theme/core/createThemeObject.ts +7 -4
  114. package/src/lib/theme/devtools/Comparator.tsx +1 -1
  115. package/src/lib/theme/devtools/Inspector.tsx +1 -1
  116. package/src/lib/theme/devtools/LiveEditor.tsx +1 -1
  117. package/src/lib/theme/hooks/useThemeSwitcher.ts +164 -0
  118. package/src/lib/theme/index.ts +322 -38
  119. package/src/lib/theme/runtime/ThemeProvider.tsx +45 -11
  120. package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +44 -393
  121. package/src/lib/theme/runtime/useTheme.ts +1 -0
  122. package/src/lib/theme/tokens/tokens.ts +101 -1
  123. package/src/lib/theme/types.ts +91 -0
  124. package/src/lib/theme/utils/performanceMonitor.ts +315 -0
  125. package/src/lib/theme/utils/responsive.ts +280 -0
  126. package/src/lib/theme/utils/themeUtils.ts +531 -117
  127. package/src/styles/01-settings/_index.scss +1 -0
  128. package/src/styles/01-settings/_settings.atomix-glass.scss +174 -0
  129. package/src/styles/01-settings/_settings.masonry-grid.scss +42 -6
  130. package/src/styles/02-tools/_tools.glass.scss +6 -0
  131. package/src/styles/05-objects/_objects.masonry-grid.scss +162 -24
  132. package/src/styles/06-components/_components.atomix-glass.scss +4 -4
  133. package/src/lib/composables/useBreadcrumb.ts +0 -81
  134. package/src/lib/composables/useChartInteractions.ts +0 -123
  135. package/src/lib/composables/useChartPerformance.ts +0 -347
  136. package/src/lib/composables/useDropdown.ts +0 -338
  137. package/src/lib/composables/useModal.ts +0 -110
  138. package/src/lib/hooks/usePerformanceMonitor.ts +0 -148
  139. package/src/lib/utils/displacement-generator.ts +0 -92
  140. package/src/lib/utils/memoryMonitor.ts +0 -191
  141. package/src/styles/01-settings/_settings.testtypecheck.scss +0 -53
  142. package/src/styles/01-settings/_settings.typedbutton.scss +0 -53
  143. package/src/styles/06-components/_components.testbutton.scss +0 -212
  144. package/src/styles/06-components/_components.testtypecheck.scss +0 -212
  145. package/src/styles/06-components/_components.typedbutton.scss +0 -212
@@ -13,6 +13,7 @@
13
13
  // Component settings
14
14
  @forward './settings.accordion';
15
15
  @forward './settings.animations';
16
+ @forward './settings.atomix-glass';
16
17
  @forward './settings.avatar-group';
17
18
  @forward './settings.avatar';
18
19
  @forward './settings.badge';
@@ -0,0 +1,174 @@
1
+ // AtomixGlass Settings
2
+ // =============================================================================
3
+ // Default values for glass component styling
4
+ // These can be overridden at any level via CSS custom properties
5
+
6
+ @use 'sass:map';
7
+ @use 'settings.spacing' as *;
8
+ @use 'settings.config' as config;
9
+ @use 'settings.border-radius' as *;
10
+
11
+ // ============================================================================
12
+ // Border Radius
13
+ // ============================================================================
14
+ $glass-radius: var(#{config.$prefix}radius-md, 0.75rem) !default;
15
+
16
+ // ============================================================================
17
+ // Position
18
+ // ============================================================================
19
+ $glass-position: absolute !default;
20
+
21
+ // ============================================================================
22
+ // Border Width
23
+ // ============================================================================
24
+ $glass-border-width: var(#{config.$prefix}spacing-0-5, 0.125rem) !default;
25
+
26
+ // ============================================================================
27
+ // Z-Index Layers
28
+ // ============================================================================
29
+ $glass-base-z-index: 0 !default;
30
+ $glass-z-index-background: 0 !default;
31
+ $glass-z-index-overlay: 1 !default;
32
+ $glass-z-index-content: 2 !default;
33
+
34
+ // ============================================================================
35
+ // Opacity Values
36
+ // ============================================================================
37
+ $glass-hover-1-opacity: 0 !default;
38
+ $glass-hover-2-opacity: 0 !default;
39
+ $glass-hover-3-opacity: 0 !default;
40
+ $glass-base-opacity: 0.6 !default;
41
+ $glass-overlay-opacity: 0.35 !default;
42
+ $glass-overlay-highlight-opacity: 0.25 !default;
43
+
44
+ // ============================================================================
45
+ // Border Opacity
46
+ // ============================================================================
47
+ $glass-border-1-opacity: 0.18 !default;
48
+
49
+ // ============================================================================
50
+ // Over-Light Mode Opacity
51
+ // ============================================================================
52
+ $glass-over-light-dark-opacity: 0.5 !default;
53
+ $glass-over-light-black-opacity: 0.25 !default;
54
+
55
+ // ============================================================================
56
+ // Gradient Colors - Hover 1 (White mode)
57
+ // ============================================================================
58
+ $glass-hover-1-start-color: rgba(255, 255, 255, 0.18) !default;
59
+ $glass-hover-1-end-color: rgba(255, 255, 255, 0) !default;
60
+
61
+ // ============================================================================
62
+ // Gradient Colors - Hover 1 (Dark/Over-light mode)
63
+ // ============================================================================
64
+ $glass-hover-1-black-start: 0.12 !default;
65
+ $glass-hover-1-black-mid: 0.06 !default;
66
+ $glass-hover-1-black-stop: 60% !default;
67
+ $glass-hover-1-black-end: 100% !default;
68
+
69
+ // ============================================================================
70
+ // Gradient Colors - Hover 2 (White mode)
71
+ // ============================================================================
72
+ $glass-hover-2-start-color: rgba(0, 0, 0, 0.12) !default;
73
+ $glass-hover-2-end-color: rgba(0, 0, 0, 0) !default;
74
+
75
+ // ============================================================================
76
+ // Gradient Colors - Hover 2 (Dark/Over-light mode)
77
+ // ============================================================================
78
+ $glass-hover-2-black-start: 0.08 !default;
79
+ $glass-hover-2-black-mid: 0.04 !default;
80
+ $glass-hover-2-black-stop: 60% !default;
81
+ $glass-hover-2-black-end: 100% !default;
82
+
83
+ // ============================================================================
84
+ // Gradient Colors - Hover 3 (White mode)
85
+ // ============================================================================
86
+ $glass-hover-3-start-color: rgba(255, 255, 255, 0.06) !default;
87
+ $glass-hover-3-end-color: rgba(255, 255, 255, 0) !default;
88
+
89
+ // ============================================================================
90
+ // Gradient Colors - Hover 3 (Dark/Over-light mode)
91
+ // ============================================================================
92
+ $glass-hover-3-black-start: 0.06 !default;
93
+ $glass-hover-3-black-mid: 0.03 !default;
94
+ $glass-hover-3-black-stop: 60% !default;
95
+ $glass-hover-3-black-end: 100% !default;
96
+
97
+ // ============================================================================
98
+ // Base Layer (White mode)
99
+ // ============================================================================
100
+ $glass-base-start-color: rgba(255, 255, 255, 0.08) !default;
101
+ $glass-base-end-color: rgba(255, 255, 255, 0.02) !default;
102
+ $glass-base-white-opacity: 0.08 !default;
103
+
104
+ // ============================================================================
105
+ // Base Layer (Dark/Over-light mode)
106
+ // ============================================================================
107
+ $glass-base-black-start: 0.08 !default;
108
+ $glass-base-black-mid: 0.06 !default;
109
+ $glass-base-black-end: 0.02 !default;
110
+
111
+ // ============================================================================
112
+ // Overlay Layer (White mode)
113
+ // ============================================================================
114
+ $glass-overlay-start-color: rgba(255, 255, 255, 0.12) !default;
115
+ $glass-overlay-end-color: rgba(255, 255, 255, 0) !default;
116
+ $glass-overlay-white-opacity: 0.12 !default;
117
+
118
+ // ============================================================================
119
+ // Overlay Layer (Dark/Over-light mode)
120
+ // ============================================================================
121
+ $glass-overlay-black-start: 0.1 !default;
122
+ $glass-overlay-black-mid: 0.05 !default;
123
+ $glass-overlay-black-stop: 40% !default;
124
+ $glass-overlay-black-end: 0 !default;
125
+
126
+ // ============================================================================
127
+ // Overlay Highlight
128
+ // ============================================================================
129
+ $glass-highlight-start-color: rgba(255, 255, 255, 0.24) !default;
130
+ $glass-highlight-end-color: rgba(255, 255, 255, 0) !default;
131
+ $glass-highlight-opacity-multiplier: 1.1 !default;
132
+
133
+ // ============================================================================
134
+ // Border Shadow
135
+ // ============================================================================
136
+ $glass-border-color: rgba(255, 255, 255, 0.45) !default;
137
+ $glass-inner-shadow-color: rgba(255, 255, 255, 0.18) !default;
138
+ $glass-outer-shadow-color: rgba(0, 0, 0, 0.28) !default;
139
+
140
+ // ============================================================================
141
+ // Backdrop Filter
142
+ // ============================================================================
143
+ $glass-backdrop-filter: blur(30px) saturate(140%) brightness(110%) !default;
144
+
145
+ // ============================================================================
146
+ // Transition
147
+ // ============================================================================
148
+ $glass-transition: var(#{config.$prefix}transition-base) !default;
149
+ $glass-transition-duration: 0.3s !default;
150
+ $glass-easing: cubic-bezier(0.23, 1, 0.32, 1) !default;
151
+
152
+ // ============================================================================
153
+ // Blend Modes
154
+ // ============================================================================
155
+ $glass-hover-blend-mode: overlay !default;
156
+ $glass-base-blend-mode: soft-light !default;
157
+ $glass-overlay-blend-mode: overlay !default;
158
+ $glass-overlay-highlight-blend-mode: screen !default;
159
+ $glass-border-backdrop-blend-mode: overlay !default;
160
+ $glass-border-1-blend-mode: screen !default;
161
+ $glass-border-2-blend-mode: overlay !default;
162
+
163
+ // ============================================================================
164
+ // Background Layer Colors
165
+ // ============================================================================
166
+ $glass-background-dark-color: var(#{config.$prefix}gray-9, #1f2937) !default;
167
+ $glass-background-black-color: var(#{config.$prefix}black, #000000) !default;
168
+
169
+ // ============================================================================
170
+ // Border Backdrop
171
+ // ============================================================================
172
+ $glass-border-backdrop-blur: 30px !default;
173
+ $glass-border-backdrop-saturate: 140% !default;
174
+ $glass-border-backdrop-brightness: 110% !default;
@@ -1,17 +1,53 @@
1
1
  @use 'settings.config' as config;
2
2
  @use 'settings.breakpoints' as breakpoints;
3
+ @use 'settings.design-tokens' as tokens;
4
+ @use 'settings.colors' as colors;
3
5
 
4
- // Define all masonry grid variables with !default flag for overriding
5
- $masonry-grid-gap: 16px !default;
6
- $masonry-grid-gap-sm: 8px !default;
7
- $masonry-grid-gap-lg: 24px !default;
6
+ // === MASONRY GRID DESIGN TOKENS ===
7
+ // Integrated with Atomix design system using CSS custom properties
8
+
9
+ // Core spacing and layout tokens
10
+ $masonry-grid-gap: var(--#{config.$prefix}spacing-16) !default;
11
+ $masonry-grid-gap-sm: var(--#{config.$prefix}spacing-8) !default;
12
+ $masonry-grid-gap-lg: var(--#{config.$prefix}spacing-24) !default;
13
+ $masonry-grid-gap-xl: var(--#{config.$prefix}spacing-32) !default;
14
+
15
+ // Responsive column configuration using design system breakpoints
8
16
  $masonry-grid-columns-xs: 1 !default;
9
17
  $masonry-grid-columns-sm: 2 !default;
10
18
  $masonry-grid-columns-md: 3 !default;
11
19
  $masonry-grid-columns-lg: 4 !default;
12
20
  $masonry-grid-columns-xl: 4 !default;
13
21
  $masonry-grid-columns-xxl: 5 !default;
14
- $masonry-grid-item-transition: all 0.3s ease-in-out !default;
15
22
 
16
- // Define dark mode variables if needed
23
+ // Animation and transition tokens
24
+ $masonry-grid-item-transition:
25
+ opacity var(--#{config.$prefix}transition-duration-base) var(--#{config.$prefix}transition-timing-base),
26
+ top var(--#{config.$prefix}transition-duration-base) var(--#{config.$prefix}transition-timing-base),
27
+ left var(--#{config.$prefix}transition-duration-base) var(--#{config.$prefix}transition-timing-base) !default;
28
+
29
+ $masonry-grid-item-animation-duration: var(--#{config.$prefix}transition-duration-base) !default;
30
+ $masonry-grid-item-animation-timing: var(--#{config.$prefix}transition-timing-base) !default;
31
+
32
+ // Loading state tokens
33
+ $masonry-grid-loading-indicator-size: var(--#{config.$prefix}spacing-24) !default;
34
+ $masonry-grid-loading-indicator-border-width: var(--#{config.$prefix}border-width-2) !default;
35
+ $masonry-grid-loading-indicator-color: var(--#{config.$prefix}brand-border-subtle) !default;
36
+
37
+ // Dark mode specific tokens (will automatically switch with design system)
17
38
  $masonry-grid-item-bg-dark: var(--#{config.$prefix}gray-9) !default;
39
+ $masonry-grid-loading-overlay-dark: var(--#{config.$prefix}gray-20) !default;
40
+
41
+ // Accessibility and focus management
42
+ $masonry-grid-focus-ring-width: var(--#{config.$prefix}focus-ring-width) !default;
43
+ $masonry-grid-focus-ring-color: var(--#{config.$prefix}focus-ring-color) !default;
44
+ $masonry-grid-focus-ring-offset: var(--#{config.$prefix}focus-ring-offset) !default;
45
+
46
+ // Mobile-first responsive design tokens
47
+ $masonry-grid-min-height-mobile: var(--#{config.$prefix}spacing-200) !default;
48
+ $masonry-grid-min-height-desktop: var(--#{config.$prefix}spacing-100) !default;
49
+
50
+ // Z-index layering
51
+ $masonry-grid-z-index-base: var(--#{config.$prefix}z-index-1) !default;
52
+ $masonry-grid-z-index-loading: var(--#{config.$prefix}z-index-10) !default;
53
+ $masonry-grid-z-index-focus: var(--#{config.$prefix}z-index-5) !default;
@@ -0,0 +1,6 @@
1
+ // AtomixGlass Tools
2
+ // =============================================================================
3
+ // Glass-specific mixins and utilities
4
+ // Note: Focus ring and other general mixins are available in tools.component
5
+
6
+ @use 'tools.component' as *;
@@ -1,41 +1,116 @@
1
1
  @use '../01-settings/settings.config' as config;
2
2
  @use '../01-settings/settings.masonry-grid' as masonry;
3
3
  @use '../01-settings/settings.breakpoints' as breakpoints;
4
+ @use '../01-settings/settings.design-tokens' as tokens;
4
5
  @use '../02-tools/tools.rem' as *;
6
+ @use '../02-tools/tools.media-queries' as mq;
5
7
  @use 'sass:math';
6
8
 
9
+ // === MODERN CSS GRID FALLBACK IMPLEMENTATION ===
10
+ // Provides graceful degradation when JavaScript is disabled
11
+ .o-masonry-grid--css-fallback {
12
+ display: grid;
13
+ gap: masonry.$masonry-grid-gap;
14
+ // Use auto-fit with minmax for responsive columns
15
+ grid-template-columns: repeat(auto-fit, minmax(var(--atomix-masonry-min-column-width, 250px), 1fr));
16
+
17
+ // Mobile-first responsive adjustments
18
+ @include mq.media-up('sm') {
19
+ gap: masonry.$masonry-grid-gap-sm;
20
+ }
21
+
22
+ @include mq.media-up('md') {
23
+ gap: masonry.$masonry-grid-gap;
24
+ }
25
+
26
+ @include mq.media-up('lg') {
27
+ gap: masonry.$masonry-grid-gap-lg;
28
+ }
29
+
30
+ .o-masonry-grid__item {
31
+ // CSS Grid items don't need position: absolute
32
+ position: static;
33
+ opacity: 1;
34
+ visibility: visible;
35
+ width: 100%;
36
+
37
+ // Enhanced accessibility for CSS Grid
38
+ &:focus {
39
+ outline: masonry.$masonry-grid-focus-ring-width solid masonry.$masonry-grid-focus-ring-color;
40
+ outline-offset: masonry.$masonry-grid-focus-ring-offset;
41
+ z-index: masonry.$masonry-grid-z-index-focus;
42
+ }
43
+ }
44
+ }
45
+
7
46
  .o-masonry-grid {
8
47
  $root: &;
9
48
 
10
- // Base styles
49
+ // Mobile-first base styles with design system tokens
11
50
  position: relative;
12
51
  width: 100%;
13
- min-height: 100px; // Minimum height to prevent layout shift
52
+ min-height: masonry.$masonry-grid-min-height-mobile;
14
53
 
15
- // Animation variant
54
+ // Enhanced focus management for accessibility
55
+ &:focus-within {
56
+ .o-masonry-grid__item:focus {
57
+ outline: masonry.$masonry-grid-focus-ring-width solid masonry.$masonry-grid-focus-ring-color;
58
+ outline-offset: masonry.$masonry-grid-focus-ring-offset;
59
+ z-index: masonry.$masonry-grid-z-index-focus;
60
+ }
61
+ }
62
+
63
+ // Animation variant using design system transitions
16
64
  &--animate {
17
65
  .o-masonry-grid__item {
18
- transition:
19
- opacity 0.3s ease,
20
- top 0.3s ease,
21
- left 0.3s ease;
66
+ transition: masonry.$masonry-grid-item-transition;
67
+ // Modern CSS custom property for fine-grained animation control
68
+ @supports (transition-behavior: allow-discrete) {
69
+ transition-behavior: allow-discrete;
70
+ }
22
71
  }
23
72
  }
24
73
 
25
- // Item styles
74
+ // Item styles with enhanced accessibility and design system integration
26
75
  &__item {
27
76
  box-sizing: border-box;
28
77
  width: 100%;
78
+ // Design system color tokens for background
79
+ background-color: var(--#{config.$prefix}body-bg);
80
+
81
+ // Enhanced focus states with design system tokens
82
+ &:focus {
83
+ outline: masonry.$masonry-grid-focus-ring-width solid masonry.$masonry-grid-focus-ring-color;
84
+ outline-offset: masonry.$masonry-grid-focus-ring-offset;
85
+ z-index: masonry.$masonry-grid-z-index-focus;
86
+
87
+ // Subtle scale effect for better visual feedback
88
+ transform: scale(1.02);
89
+ transition: transform var(--#{config.$prefix}transition-duration-fast) var(--#{config.$prefix}transition-timing-base);
90
+ }
91
+
92
+ // High contrast mode support
93
+ @media (prefers-contrast: high) {
94
+ &:focus {
95
+ outline-width: calc(#{masonry.$masonry-grid-focus-ring-width} * 2);
96
+ }
97
+ }
29
98
 
30
99
  // Prevent FOUC (Flash of Unstyled Content)
31
100
  &:not([style*='position: absolute']) {
32
101
  opacity: 0;
33
102
  visibility: hidden;
103
+ // Use CSS Custom Property for progressive enhancement
104
+ @supports (view-transition-name: masonry-item) {
105
+ view-transition-name: masonry-item;
106
+ }
34
107
  }
35
108
  }
36
109
 
37
- // Loading states for items
110
+ // Loading states with modern design system colors
38
111
  &__item-loading {
112
+ position: relative;
113
+
39
114
  &::before {
40
115
  content: '';
41
116
  position: absolute;
@@ -43,54 +118,117 @@
43
118
  left: 0;
44
119
  width: 100%;
45
120
  height: 100%;
46
- background-color: var(--#{config.$prefix}gray-10);
47
- z-index: 1;
48
- border-radius: 4px;
121
+ // Design system loading state background
122
+ background: var(--#{config.$prefix}gray-10);
123
+ z-index: masonry.$masonry-grid-z-index-loading;
124
+ border-radius: var(--#{config.$prefix}border-radius-sm);
125
+
126
+ // Smooth fade-in animation
127
+ animation: masonry-loading-fade-in 0.5s ease-out forwards;
49
128
  }
50
129
 
51
130
  img {
52
131
  opacity: 0;
132
+ // CSS @property for smoother opacity transitions
133
+ @supports (property: opacity) and (animation-timeline: view()) {
134
+ opacity: var(--masonry-img-opacity);
135
+ @property --masonry-img-opacity {
136
+ syntax: '<number>';
137
+ inherits: false;
138
+ initial-value: 0;
139
+ }
140
+ }
53
141
  }
54
142
  }
55
143
 
56
- // Loaded state with fade-in animation
57
- &__item-loaded img {
58
- animation: masonry-item-fade-in 0.3s ease forwards;
144
+ // Enhanced loaded state with modern CSS features
145
+ &__item-loaded {
146
+ img {
147
+ // Modern CSS animation with design system tokens
148
+ animation: masonry-item-fade-in masonry.$masonry-grid-item-animation-duration masonry.$masonry-grid-item-animation-timing forwards;
149
+
150
+ // CSS @property for precise opacity control
151
+ @supports (property: opacity) and (animation-timeline: view()) {
152
+ opacity: var(--masonry-img-opacity);
153
+ animation: masonry-item-fade-in-advanced masonry.$masonry-grid-item-animation-duration masonry.$masonry-grid-item-animation-timing forwards;
154
+ @property --masonry-img-opacity {
155
+ syntax: '<number>';
156
+ inherits: false;
157
+ initial-value: 0;
158
+ }
159
+ }
160
+ }
59
161
  }
60
162
 
61
- // Progressive loading indicator
163
+ // Modern progressive loading indicator
62
164
  &--loading-images {
63
165
  position: relative;
64
166
 
65
167
  &::after {
66
168
  content: '';
67
169
  position: absolute;
68
- bottom: 16px;
69
- right: 16px;
70
- width: 24px;
71
- height: 24px;
72
- border: 2px solid rgba(0, 0, 0, 0.1);
170
+ bottom: var(--#{config.$prefix}spacing-16);
171
+ right: var(--#{config.$prefix}spacing-16);
172
+ width: masonry.$masonry-grid-loading-indicator-size;
173
+ height: masonry.$masonry-grid-loading-indicator-size;
174
+ border: masonry.$masonry-grid-loading-indicator-border-width solid rgba(0, 0, 0, 0.1);
73
175
  border-radius: 50%;
74
- border-top-color: var(--#{config.$prefix}brand-border-subtle);
176
+ border-top-color: masonry.$masonry-grid-loading-indicator-color;
75
177
  animation: masonry-spinner 0.8s linear infinite;
76
- z-index: 1000;
178
+ z-index: masonry.$masonry-grid-z-index-loading;
77
179
  pointer-events: none;
180
+
181
+ // Dark mode support
182
+ @media (prefers-color-scheme: dark) {
183
+ border-color: rgba(255, 255, 255, 0.1);
184
+ border-top-color: var(--#{config.$prefix}brand-border-subtle-dark);
185
+ }
78
186
  }
79
187
  }
80
188
 
81
- // Animations
189
+ // Responsive adjustments for desktop
190
+ @include mq.media-up('md') {
191
+ min-height: masonry.$masonry-grid-min-height-desktop;
192
+ }
193
+
194
+ // Modern animations with CSS custom properties
82
195
  @keyframes masonry-spinner {
83
196
  to {
84
197
  transform: rotate(360deg);
85
198
  }
86
199
  }
87
200
 
201
+ @keyframes masonry-loading-fade-in {
202
+ from {
203
+ opacity: 0;
204
+ transform: scale(0.95);
205
+ }
206
+ to {
207
+ opacity: 1;
208
+ transform: scale(1);
209
+ }
210
+ }
211
+
88
212
  @keyframes masonry-item-fade-in {
89
213
  from {
90
214
  opacity: 0;
215
+ transform: translateY(20px);
91
216
  }
92
217
  to {
93
218
  opacity: 1;
219
+ transform: translateY(0);
220
+ }
221
+ }
222
+
223
+ // Advanced animation with CSS @property for smooth transitions
224
+ @keyframes masonry-item-fade-in-advanced {
225
+ from {
226
+ --masonry-img-opacity: 0;
227
+ transform: translateY(20px) scale(0.95);
228
+ }
229
+ to {
230
+ --masonry-img-opacity: 1;
231
+ transform: translateY(0) scale(1);
94
232
  }
95
233
  }
96
234
  }
@@ -1,6 +1,7 @@
1
1
  // Component: AtomixGlass
2
2
  // =============================================================================
3
3
 
4
+ @use '../01-settings/settings.atomix-glass' as *;
4
5
  @use '../02-tools/tools.component' as *;
5
6
 
6
7
  .c-atomix-glass {
@@ -9,7 +10,6 @@
9
10
  // Local, sane defaults (kept minimal)
10
11
  --_glass-radius: var(--atomix-glass-radius, var(--atomix-radius-md, 0.75rem));
11
12
  --_glass-transform: var(--atomix-glass-transform, translateZ(0));
12
- --_glass-backdrop: var(--atomix-glass-border-backdrop, blur(14px) saturate(140%));
13
13
 
14
14
  --atomix-glass-position: absolute;
15
15
  --atomix-glass-border-width: var(--atomix-spacing-0-5, 0.125rem);
@@ -221,7 +221,7 @@
221
221
  &__border-backdrop {
222
222
  mix-blend-mode: overlay;
223
223
  z-index: var(--_glass-z-border-1);
224
- backdrop-filter: var(--_glass-backdrop);
224
+ backdrop-filter: blur(30px) saturate(140%) brightness(110%);
225
225
  box-shadow: var(--atomix-glass-border-shadow);
226
226
  }
227
227
 
@@ -291,8 +291,8 @@
291
291
 
292
292
  &__content {
293
293
  position: relative;
294
- width: var(--atomix-glass-container-width);
295
- height: var(--atomix-glass-container-height);
294
+ width: var(--atomix-glass-width);
295
+ height: var(--atomix-glass-height);
296
296
  border-radius: var(--_glass-radius);
297
297
  z-index: var(--_glass-z-content);
298
298
  text-shadow: var(--atomix-glass-container-text-shadow);
@@ -1,81 +0,0 @@
1
- import { BreadcrumbItemType } from '../../components/Breadcrumb/Breadcrumb';
2
- import { BREADCRUMB } from '../constants/components';
3
-
4
- interface BreadcrumbOptions {
5
- items: BreadcrumbItemType[];
6
- divider?: React.ReactNode;
7
- className?: string;
8
- 'aria-label'?: string;
9
- }
10
-
11
- /**
12
- * Breadcrumb state and functionality
13
- * @param initialOptions - Initial breadcrumb options
14
- * @returns Breadcrumb state and methods
15
- */
16
- export function useBreadcrumb(initialOptions?: Partial<BreadcrumbOptions>) {
17
- // Default breadcrumb options
18
- const defaultOptions: BreadcrumbOptions = {
19
- items: [],
20
- divider: BREADCRUMB.DEFAULTS.DIVIDER,
21
- className: '',
22
- 'aria-label': 'Breadcrumb',
23
- ...initialOptions,
24
- };
25
-
26
- /**
27
- * Generate breadcrumb class based on options
28
- * @param options - Breadcrumb options
29
- * @returns Class string
30
- */
31
- const generateBreadcrumbClass = (options: Partial<BreadcrumbOptions>): string => {
32
- const { className = '' } = options;
33
-
34
- return [BREADCRUMB.CLASSES.BASE, className].filter(Boolean).join(' ').trim();
35
- };
36
-
37
- /**
38
- * Generate breadcrumb item class
39
- * @param item - Breadcrumb item
40
- * @param isLast - Whether this is the last item
41
- * @returns Class string
42
- */
43
- const generateItemClass = (item: BreadcrumbItemType, isLast: boolean): string => {
44
- return [BREADCRUMB.CLASSES.ITEM, item.active || isLast ? BREADCRUMB.CLASSES.ACTIVE : '']
45
- .filter(Boolean)
46
- .join(' ')
47
- .trim();
48
- };
49
-
50
- /**
51
- * Check if an item should be rendered as a link
52
- * @param item - Breadcrumb item
53
- * @param isLast - Whether this is the last item
54
- * @returns Whether item should be a link
55
- */
56
- const isItemLink = (item: BreadcrumbItemType, isLast: boolean): boolean => {
57
- return Boolean(item.href && !item.active && !isLast);
58
- };
59
-
60
- /**
61
- * Parse items from a JSON string
62
- * @param jsonString - JSON string of items
63
- * @returns Array of breadcrumb items
64
- */
65
- const parseItemsFromJson = (jsonString: string): BreadcrumbItemType[] => {
66
- try {
67
- return JSON.parse(jsonString) as BreadcrumbItemType[];
68
- } catch (error) {
69
- console.error('Error parsing breadcrumb items:', error);
70
- return [];
71
- }
72
- };
73
-
74
- return {
75
- defaultOptions,
76
- generateBreadcrumbClass,
77
- generateItemClass,
78
- isItemLink,
79
- parseItemsFromJson,
80
- };
81
- }