@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
@@ -1,191 +0,0 @@
1
- /**
2
- * Memory Monitoring Utilities
3
- *
4
- * Detects memory leaks and tracks component lifecycle memory usage
5
- * Only available in development mode
6
- */
7
-
8
- /**
9
- * Memory snapshot for comparison
10
- */
11
- export interface MemorySnapshot {
12
- /**
13
- * Used JavaScript heap size in bytes
14
- */
15
- usedJSHeapSize: number;
16
- /**
17
- * Total JavaScript heap size in bytes
18
- */
19
- totalJSHeapSize: number;
20
- /**
21
- * JavaScript heap size limit in bytes
22
- */
23
- jsHeapSizeLimit: number;
24
- /**
25
- * Timestamp of the snapshot
26
- */
27
- timestamp: number;
28
- }
29
-
30
- /**
31
- * Check if memory monitoring is available
32
- */
33
- export function isMemoryMonitoringAvailable(): boolean {
34
- return (
35
- typeof performance !== 'undefined' &&
36
- 'memory' in performance &&
37
- (typeof process === 'undefined' || process.env?.NODE_ENV === 'development')
38
- );
39
- }
40
-
41
- /**
42
- * Get current memory usage snapshot
43
- *
44
- * @returns Memory snapshot or null if not available
45
- */
46
- export function getMemorySnapshot(): MemorySnapshot | null {
47
- if (!isMemoryMonitoringAvailable()) {
48
- return null;
49
- }
50
-
51
- const memory = (performance as any).memory;
52
-
53
- return {
54
- usedJSHeapSize: memory.usedJSHeapSize,
55
- totalJSHeapSize: memory.totalJSHeapSize,
56
- jsHeapSizeLimit: memory.jsHeapSizeLimit,
57
- timestamp: performance.now(),
58
- };
59
- }
60
-
61
- /**
62
- * Format bytes to human-readable string
63
- *
64
- * @param bytes - Number of bytes
65
- * @returns Formatted string (e.g., "1.5 MB")
66
- */
67
- export function formatBytes(bytes: number): string {
68
- if (bytes === 0) return '0 Bytes';
69
-
70
- const k = 1024;
71
- const sizes = ['Bytes', 'KB', 'MB', 'GB'];
72
- const i = Math.floor(Math.log(bytes) / Math.log(k));
73
-
74
- return Math.round((bytes / Math.pow(k, i)) * 100) / 100 + ' ' + sizes[i];
75
- }
76
-
77
- /**
78
- * Compare two memory snapshots and detect potential leaks
79
- *
80
- * @param before - Snapshot before operation
81
- * @param after - Snapshot after operation
82
- * @param threshold - Threshold in bytes to consider a leak (default: 5MB)
83
- * @returns Object with leak detection results
84
- */
85
- export function detectMemoryLeak(
86
- before: MemorySnapshot | null,
87
- after: MemorySnapshot | null,
88
- threshold: number = 5 * 1024 * 1024 // 5MB
89
- ): {
90
- hasLeak: boolean;
91
- memoryIncrease: number;
92
- formattedIncrease: string;
93
- percentageIncrease: number;
94
- } {
95
- if (!before || !after) {
96
- return {
97
- hasLeak: false,
98
- memoryIncrease: 0,
99
- formattedIncrease: '0 Bytes',
100
- percentageIncrease: 0,
101
- };
102
- }
103
-
104
- const memoryIncrease = after.usedJSHeapSize - before.usedJSHeapSize;
105
- const percentageIncrease = (memoryIncrease / before.usedJSHeapSize) * 100;
106
-
107
- return {
108
- hasLeak: memoryIncrease > threshold,
109
- memoryIncrease,
110
- formattedIncrease: formatBytes(memoryIncrease),
111
- percentageIncrease,
112
- };
113
- }
114
-
115
- /**
116
- * Monitor memory usage over time
117
- *
118
- * @param interval - Interval in milliseconds to check memory
119
- * @param callback - Callback function called with each snapshot
120
- * @returns Function to stop monitoring
121
- */
122
- export function monitorMemoryUsage(
123
- interval: number = 5000,
124
- callback?: (snapshot: MemorySnapshot) => void
125
- ): () => void {
126
- if (!isMemoryMonitoringAvailable()) {
127
- console.warn('[Memory Monitor] Memory monitoring is not available');
128
- return () => {};
129
- }
130
-
131
- const checkMemory = () => {
132
- const snapshot = getMemorySnapshot();
133
- if (snapshot) {
134
- if (callback) {
135
- callback(snapshot);
136
- } else if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'development') {
137
- console.log('[Memory Monitor]', {
138
- used: formatBytes(snapshot.usedJSHeapSize),
139
- total: formatBytes(snapshot.totalJSHeapSize),
140
- limit: formatBytes(snapshot.jsHeapSizeLimit),
141
- });
142
- }
143
- }
144
- };
145
-
146
- const intervalId = setInterval(checkMemory, interval);
147
-
148
- // Initial check
149
- checkMemory();
150
-
151
- // Return cleanup function
152
- return () => {
153
- clearInterval(intervalId);
154
- };
155
- }
156
-
157
- /**
158
- * Track component lifecycle memory usage
159
- *
160
- * @param componentName - Name of the component
161
- * @returns Object with start and end tracking functions
162
- */
163
- export function trackComponentMemory(componentName: string) {
164
- const before = getMemorySnapshot();
165
-
166
- return {
167
- /**
168
- * Get memory snapshot at component mount
169
- */
170
- getBeforeSnapshot: () => before,
171
- /**
172
- * Get memory snapshot at component unmount and detect leaks
173
- */
174
- getAfterSnapshot: () => {
175
- const after = getMemorySnapshot();
176
- if (before && after) {
177
- const leakInfo = detectMemoryLeak(before, after);
178
- if (
179
- leakInfo.hasLeak &&
180
- (typeof process === 'undefined' || process.env?.NODE_ENV === 'development')
181
- ) {
182
- console.warn(
183
- `[Memory Monitor] Potential memory leak detected in ${componentName}:`,
184
- leakInfo
185
- );
186
- }
187
- }
188
- return after;
189
- },
190
- };
191
- }
@@ -1,53 +0,0 @@
1
- // TestTypeCheck Component Settings
2
- // Generated by Atomix CLI
3
- // =============================================================================
4
-
5
- @use 'sass:color';
6
- @use '../../lib/functions' as *;
7
- @use '../../lib/mixins' as *;
8
-
9
- // Component-specific CSS Custom Properties
10
- // These override or extend global design tokens
11
-
12
- :root {
13
- // Brand Colors
14
- --testtypecheck-primary: var(--atomix-color-primary);
15
- --testtypecheck-primary-hover: color.adjust(var(--atomix-color-primary), $lightness: -10%);
16
- --testtypecheck-primary-active: color.adjust(var(--atomix-color-primary), $lightness: -20%);
17
-
18
- // Spacing
19
- --testtypecheck-padding-x: var(--atomix-spacing-4);
20
- --testtypecheck-padding-y: calc(var(--atomix-spacing-4) * 0.5);
21
- --testtypecheck-gap: var(--atomix-spacing-4);
22
-
23
- // Border Radius
24
- --testtypecheck-radius: var(--atomix-radius-md);
25
-
26
- // Typography
27
- --testtypecheck-font-size: var(--atomix-font-size-base);
28
- --testtypecheck-font-weight: var(--atomix-font-weight-medium);
29
- --testtypecheck-line-height: var(--atomix-line-height-tight);
30
-
31
- // States
32
- --testtypecheck-disabled-opacity: 0.5;
33
- --testtypecheck-focus-ring: 0 0 0 2px var(--atomix-color-primary-200);
34
- }
35
-
36
- // Dark mode overrides
37
- .dark {
38
- :root {
39
- --testtypecheck-focus-ring: 0 0 0 2px var(--atomix-color-primary-800);
40
- }
41
- }
42
-
43
- // Component configuration map
44
- $testtypecheck-config: (
45
- 'primary': var(--testtypecheck-primary),
46
- 'padding-x': var(--testtypecheck-padding-x),
47
- 'padding-y': var(--testtypecheck-padding-y),
48
- 'gap': var(--testtypecheck-gap),
49
- 'radius': var(--testtypecheck-radius),
50
- 'font-size': var(--testtypecheck-font-size),
51
- 'font-weight': var(--testtypecheck-font-weight),
52
- 'line-height': var(--testtypecheck-line-height),
53
- ) !default;
@@ -1,53 +0,0 @@
1
- // TypedButton Component Settings
2
- // Generated by Atomix CLI
3
- // =============================================================================
4
-
5
- @use 'sass:color';
6
- @use '../../lib/functions' as *;
7
- @use '../../lib/mixins' as *;
8
-
9
- // Component-specific CSS Custom Properties
10
- // These override or extend global design tokens
11
-
12
- :root {
13
- // Brand Colors
14
- --typedbutton-primary: var(--atomix-color-primary);
15
- --typedbutton-primary-hover: color.adjust(var(--atomix-color-primary), $lightness: -10%);
16
- --typedbutton-primary-active: color.adjust(var(--atomix-color-primary), $lightness: -20%);
17
-
18
- // Spacing
19
- --typedbutton-padding-x: var(--atomix-spacing-4);
20
- --typedbutton-padding-y: calc(var(--atomix-spacing-4) * 0.5);
21
- --typedbutton-gap: var(--atomix-spacing-4);
22
-
23
- // Border Radius
24
- --typedbutton-radius: var(--atomix-radius-md);
25
-
26
- // Typography
27
- --typedbutton-font-size: var(--atomix-font-size-base);
28
- --typedbutton-font-weight: var(--atomix-font-weight-medium);
29
- --typedbutton-line-height: var(--atomix-line-height-tight);
30
-
31
- // States
32
- --typedbutton-disabled-opacity: 0.5;
33
- --typedbutton-focus-ring: 0 0 0 2px var(--atomix-color-primary-200);
34
- }
35
-
36
- // Dark mode overrides
37
- .dark {
38
- :root {
39
- --typedbutton-focus-ring: 0 0 0 2px var(--atomix-color-primary-800);
40
- }
41
- }
42
-
43
- // Component configuration map
44
- $typedbutton-config: (
45
- 'primary': var(--typedbutton-primary),
46
- 'padding-x': var(--typedbutton-padding-x),
47
- 'padding-y': var(--typedbutton-padding-y),
48
- 'gap': var(--typedbutton-gap),
49
- 'radius': var(--typedbutton-radius),
50
- 'font-size': var(--typedbutton-font-size),
51
- 'font-weight': var(--typedbutton-font-weight),
52
- 'line-height': var(--typedbutton-line-height),
53
- ) !default;
@@ -1,212 +0,0 @@
1
- // TestButton Component Styles
2
- // Generated by Atomix CLI
3
- // ITCSS Layer: Components
4
- // =============================================================================
5
-
6
- @use 'sass:map';
7
- @use '../../01-settings/settings.testbutton' as *;
8
- @use '../../02-tools/mixins' as *;
9
- @use '../../02-tools/functions' as *;
10
-
11
- // Base Component Class
12
- // =============================================================================
13
-
14
- .c-testbutton {
15
- // Layout
16
- display: inline-flex;
17
- align-items: center;
18
- justify-content: center;
19
- gap: var(--testbutton-gap);
20
-
21
- // Spacing
22
- padding: var(--testbutton-padding-y) var(--testbutton-padding-x);
23
-
24
- // Typography
25
- font-size: var(--testbutton-font-size);
26
- font-weight: var(--testbutton-font-weight);
27
- line-height: var(--testbutton-line-height);
28
-
29
- // Appearance
30
- border-radius: var(--testbutton-radius);
31
- border: none;
32
- cursor: pointer;
33
-
34
- // Transition
35
- transition: all var(--atomix-duration-fast) var(--atomix-easing-smooth);
36
-
37
- // Focus
38
- &:focus-visible {
39
- outline: none;
40
- box-shadow: var(--testbutton-focus-ring);
41
- }
42
-
43
- // Disabled state
44
- &:disabled {
45
- opacity: var(--testbutton-disabled-opacity);
46
- cursor: not-allowed;
47
- pointer-events: none;
48
- }
49
- }
50
-
51
- // Variants
52
- // =============================================================================
53
-
54
- @if true {
55
- .c-testbutton--variant-primary {
56
- background-color: var(--testbutton-primary);
57
- color: var(--atomix-color-white);
58
-
59
- &:hover:not(:disabled) {
60
- background-color: var(--testbutton-primary-hover);
61
- }
62
-
63
- &:active:not(:disabled) {
64
- background-color: var(--testbutton-primary-active);
65
- }
66
- }
67
-
68
- .c-testbutton--variant-secondary {
69
- background-color: var(--atomix-color-neutral-100);
70
- color: var(--atomix-color-neutral-900);
71
-
72
- &:hover:not(:disabled) {
73
- background-color: var(--atomix-color-neutral-200);
74
- }
75
- }
76
-
77
- .c-testbutton--variant-outline {
78
- background-color: transparent;
79
- border: 1px solid var(--atomix-color-neutral-300);
80
- color: var(--atomix-color-neutral-700);
81
-
82
- &:hover:not(:disabled) {
83
- border-color: var(--atomix-color-neutral-400);
84
- background-color: var(--atomix-color-neutral-50);
85
- }
86
- }
87
- }
88
-
89
- // Glassmorphism Variant
90
- // =============================================================================
91
-
92
- .c-testbutton--glass {
93
- background: rgba(255, 255, 255, 0.1);
94
- backdrop-filter: blur(10px) saturate(200%);
95
- border: 1px solid rgba(255, 255, 255, 0.2);
96
-
97
- @media (prefers-reduced-transparency: reduce) {
98
- background: rgba(255, 255, 255, 0.8);
99
- backdrop-filter: none;
100
- }
101
-
102
- &:hover:not(:disabled) {
103
- background: rgba(255, 255, 255, 0.15);
104
- }
105
- }
106
-
107
- // Animation Variants
108
- // =============================================================================
109
-
110
- @if true {
111
- // Fade In Animation
112
- .c-testbutton--animate-fade-in {
113
- animation: atomix-fade-in var(--atomix-duration-base) var(--atomix-easing-smooth);
114
- }
115
-
116
- // Slide In Up Animation
117
- .c-testbutton--animate-slide-in-up {
118
- animation: atomix-slide-in-up var(--atomix-duration-slow) var(--atomix-easing-smooth);
119
- }
120
-
121
- // Scale In Animation
122
- .c-testbutton--animate-scale-in {
123
- animation: atomix-scale-in var(--atomix-duration-base) var(--atomix-easing-smooth);
124
- }
125
-
126
- // Pulse Animation (for loading states)
127
- .c-testbutton--animate-pulse {
128
- animation: atomix-pulse 2s var(--atomix-easing-smooth) infinite;
129
- }
130
-
131
- // Shimmer Animation (for skeleton loaders)
132
- .c-testbutton--animate-shimmer {
133
- animation: atomix-shimmer 2s linear infinite;
134
- background: linear-gradient(
135
- 90deg,
136
- var(--atomix-color-neutral-100) 0%,
137
- var(--atomix-color-neutral-200) 50%,
138
- var(--atomix-color-neutral-100) 100%
139
- );
140
- background-size: 200% 100%;
141
- }
142
- }
143
-
144
- // Motion Preferences
145
- // =============================================================================
146
-
147
- @media (prefers-reduced-motion: reduce) {
148
- .c-testbutton,
149
- .c-testbutton * {
150
- animation-duration: 0.01ms !important;
151
- animation-iteration-count: 1 !important;
152
- transition-duration: 0.01ms !important;
153
- }
154
- }
155
-
156
- // Sizes
157
- // =============================================================================
158
-
159
- @if true {
160
- .c-testbutton--size-sm {
161
- padding: calc(var(--testbutton-padding-y) * 0.75) calc(var(--testbutton-padding-x) * 0.75);
162
- font-size: var(--atomix-font-size-sm);
163
- }
164
-
165
- .c-testbutton--size-md {
166
- // Default size - no overrides needed
167
- }
168
-
169
- .c-testbutton--size-lg {
170
- padding: calc(var(--testbutton-padding-y) * 1.25) calc(var(--testbutton-padding-x) * 1.25);
171
- font-size: var(--atomix-font-size-lg);
172
- }
173
- }
174
-
175
- // States
176
- // =============================================================================
177
-
178
- @if true {
179
- .c-testbutton--state-loading {
180
- position: relative;
181
- pointer-events: none;
182
-
183
- &::after {
184
- content: '';
185
- position: absolute;
186
- inset: 0;
187
- background: rgba(255, 255, 255, 0.3);
188
- backdrop-filter: blur(2px);
189
- }
190
- }
191
-
192
- .c-testbutton--state-glass {
193
- background-color: rgba(255, 255, 255, 0.1);
194
- backdrop-filter: blur(10px);
195
- border: 1px solid rgba(255, 255, 255, 0.2);
196
- }
197
- }
198
-
199
- // Responsive Overrides
200
- // =============================================================================
201
-
202
- @include atomix-media-breakpoint-up(md) {
203
- .c-testbutton {
204
- // Tablet-specific adjustments if needed
205
- }
206
- }
207
-
208
- @include atomix-media-breakpoint-up(lg) {
209
- .c-testbutton {
210
- // Desktop-specific adjustments if needed
211
- }
212
- }