@shohojdhara/atomix 0.5.0 → 0.5.2

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 (168) hide show
  1. package/atomix.config.ts +12 -0
  2. package/build-tools/webpack-loader.js +5 -4
  3. package/dist/atomix.css +230 -83
  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 +24 -23
  9. package/dist/charts.js +271 -369
  10. package/dist/charts.js.map +1 -1
  11. package/dist/config.d.ts +624 -0
  12. package/dist/config.js +59 -0
  13. package/dist/config.js.map +1 -0
  14. package/dist/core.d.ts +3 -2
  15. package/dist/core.js +342 -382
  16. package/dist/core.js.map +1 -1
  17. package/dist/forms.d.ts +4 -6
  18. package/dist/forms.js +233 -334
  19. package/dist/forms.js.map +1 -1
  20. package/dist/heavy.d.ts +11 -2
  21. package/dist/heavy.js +406 -445
  22. package/dist/heavy.js.map +1 -1
  23. package/dist/index.d.ts +109 -65
  24. package/dist/index.esm.js +654 -748
  25. package/dist/index.esm.js.map +1 -1
  26. package/dist/index.js +621 -717
  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.js +4 -4
  33. package/dist/theme.js.map +1 -1
  34. package/package.json +24 -9
  35. package/scripts/atomix-cli.js +15 -1
  36. package/scripts/cli/__tests__/complexity-utils.test.js +24 -0
  37. package/scripts/cli/__tests__/detector.test.js +50 -0
  38. package/scripts/cli/__tests__/template-engine.test.js +23 -0
  39. package/scripts/cli/__tests__/test-setup.js +1 -133
  40. package/scripts/cli/commands/doctor.js +15 -3
  41. package/scripts/cli/commands/generate.js +113 -51
  42. package/scripts/cli/internal/ai-engine.js +30 -10
  43. package/scripts/cli/internal/complexity-utils.js +60 -0
  44. package/scripts/cli/internal/component-validator.js +49 -16
  45. package/scripts/cli/internal/generator.js +89 -36
  46. package/scripts/cli/internal/hook-generator.js +5 -2
  47. package/scripts/cli/internal/itcss-generator.js +16 -12
  48. package/scripts/cli/templates/next-templates.js +81 -30
  49. package/scripts/cli/templates/storybook-templates.js +12 -2
  50. package/scripts/cli/utils/detector.js +45 -7
  51. package/scripts/cli/utils/diagnostics.js +78 -0
  52. package/scripts/cli/utils/telemetry.js +13 -0
  53. package/src/components/Accordion/Accordion.stories.tsx +4 -0
  54. package/src/components/AtomixGlass/AtomixGlass.tsx +188 -128
  55. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +63 -91
  56. package/src/components/AtomixGlass/PerformanceDashboard.tsx +153 -201
  57. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +9 -6
  58. package/src/components/AtomixGlass/glass-utils.ts +51 -1
  59. package/src/components/AtomixGlass/stories/AnimationFeatures.stories.tsx +52 -46
  60. package/src/components/AtomixGlass/stories/Examples.stories.tsx +573 -236
  61. package/src/components/AtomixGlass/stories/Playground.stories.tsx +88 -41
  62. package/src/components/AtomixGlass/stories/argTypes.ts +19 -19
  63. package/src/components/AtomixGlass/stories/shared-components.tsx +7 -12
  64. package/src/components/AtomixGlass/stories/types.ts +3 -3
  65. package/src/components/Button/Button.tsx +114 -57
  66. package/src/components/Callout/Callout.tsx +4 -4
  67. package/src/components/Chart/ChartRenderer.tsx +1 -1
  68. package/src/components/Chart/DonutChart.tsx +11 -8
  69. package/src/components/EdgePanel/EdgePanel.tsx +119 -115
  70. package/src/components/Form/Select.tsx +4 -4
  71. package/src/components/List/List.tsx +4 -4
  72. package/src/components/Navigation/SideMenu/SideMenu.tsx +6 -6
  73. package/src/components/PhotoViewer/PhotoViewerImage.tsx +1 -1
  74. package/src/components/ProductReview/ProductReview.tsx +4 -2
  75. package/src/components/Rating/Rating.tsx +4 -2
  76. package/src/components/SectionIntro/SectionIntro.tsx +4 -2
  77. package/src/components/Steps/Steps.tsx +1 -1
  78. package/src/components/Tabs/Tabs.tsx +5 -5
  79. package/src/components/Testimonial/Testimonial.tsx +4 -2
  80. package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
  81. package/src/layouts/CssGrid/CssGrid.stories.tsx +464 -0
  82. package/src/layouts/CssGrid/CssGrid.tsx +215 -0
  83. package/src/layouts/CssGrid/index.ts +8 -0
  84. package/src/layouts/CssGrid/scripts/CssGrid.js +284 -0
  85. package/src/layouts/CssGrid/scripts/index.js +43 -0
  86. package/src/layouts/Grid/scripts/Container.js +139 -0
  87. package/src/layouts/Grid/scripts/Grid.js +184 -0
  88. package/src/layouts/Grid/scripts/GridCol.js +273 -0
  89. package/src/layouts/Grid/scripts/Row.js +154 -0
  90. package/src/layouts/Grid/scripts/index.js +48 -0
  91. package/src/layouts/MasonryGrid/MasonryGrid.tsx +71 -59
  92. package/src/lib/composables/atomix-glass/useGlassSize.ts +1 -1
  93. package/src/lib/composables/useAccordion.ts +5 -5
  94. package/src/lib/composables/useAtomixGlass.ts +111 -74
  95. package/src/lib/composables/useAtomixGlassStyles.ts +0 -2
  96. package/src/lib/composables/useBarChart.ts +2 -2
  97. package/src/lib/composables/useChart.ts +3 -2
  98. package/src/lib/composables/useChartToolbar.ts +48 -66
  99. package/src/lib/composables/useDataTable.ts +1 -1
  100. package/src/lib/composables/useDatePicker.ts +2 -2
  101. package/src/lib/composables/useEdgePanel.ts +45 -54
  102. package/src/lib/composables/useHeroBackgroundSlider.ts +5 -5
  103. package/src/lib/composables/usePhotoViewer.ts +2 -3
  104. package/src/lib/composables/usePieChart.ts +1 -1
  105. package/src/lib/composables/usePopover.ts +151 -139
  106. package/src/lib/composables/useSideMenu.ts +28 -41
  107. package/src/lib/composables/useSlider.ts +2 -6
  108. package/src/lib/composables/useTooltip.ts +2 -2
  109. package/src/lib/config/index.ts +39 -0
  110. package/src/lib/constants/components.ts +1 -0
  111. package/src/lib/theme/devtools/Comparator.tsx +1 -1
  112. package/src/lib/theme/devtools/Inspector.tsx +1 -1
  113. package/src/lib/theme/devtools/LiveEditor.tsx +1 -1
  114. package/src/lib/theme/runtime/ThemeProvider.tsx +1 -1
  115. package/src/lib/types/components.ts +1 -0
  116. package/src/styles/01-settings/_index.scss +1 -0
  117. package/src/styles/01-settings/_settings.atomix-glass.scss +174 -0
  118. package/src/styles/01-settings/_settings.masonry-grid.scss +42 -6
  119. package/src/styles/02-tools/_tools.glass.scss +6 -0
  120. package/src/styles/05-objects/_objects.masonry-grid.scss +162 -24
  121. package/src/styles/06-components/_components.atomix-glass.scss +160 -99
  122. package/scripts/cli/__tests__/README.md +0 -81
  123. package/scripts/cli/__tests__/basic.test.js +0 -116
  124. package/scripts/cli/__tests__/clean.test.js +0 -278
  125. package/scripts/cli/__tests__/component-generator.test.js +0 -332
  126. package/scripts/cli/__tests__/component-validator.test.js +0 -433
  127. package/scripts/cli/__tests__/generator.test.js +0 -613
  128. package/scripts/cli/__tests__/glass-motion.test.js +0 -256
  129. package/scripts/cli/__tests__/integration.test.js +0 -938
  130. package/scripts/cli/__tests__/migrate.test.js +0 -74
  131. package/scripts/cli/__tests__/security.test.js +0 -206
  132. package/scripts/cli/__tests__/theme-bridge.test.js +0 -507
  133. package/scripts/cli/__tests__/token-manager.test.js +0 -251
  134. package/scripts/cli/__tests__/token-provider.test.js +0 -361
  135. package/scripts/cli/__tests__/utils.test.js +0 -165
  136. package/src/components/AtomixGlass/stories/AnimationTests.stories.tsx +0 -95
  137. package/src/components/AtomixGlass/stories/CardExamples.stories.tsx +0 -212
  138. package/src/components/AtomixGlass/stories/Customization.stories.tsx +0 -131
  139. package/src/components/AtomixGlass/stories/DashboardExamples.stories.tsx +0 -348
  140. package/src/components/AtomixGlass/stories/EcommerceExamples.stories.tsx +0 -410
  141. package/src/components/AtomixGlass/stories/FormExamples.stories.tsx +0 -436
  142. package/src/components/AtomixGlass/stories/HeroExamples.stories.tsx +0 -264
  143. package/src/components/AtomixGlass/stories/InteractivePlayground.stories.tsx +0 -247
  144. package/src/components/AtomixGlass/stories/MobileUIExamples.stories.tsx +0 -418
  145. package/src/components/AtomixGlass/stories/ModalExamples.stories.tsx +0 -402
  146. package/src/components/AtomixGlass/stories/Modes.stories.tsx +0 -1082
  147. package/src/components/AtomixGlass/stories/Overview.stories.tsx +0 -497
  148. package/src/components/AtomixGlass/stories/Performance.stories.tsx +0 -103
  149. package/src/components/AtomixGlass/stories/PresetGallery.stories.tsx +0 -335
  150. package/src/components/AtomixGlass/stories/Shaders.stories.tsx +0 -395
  151. package/src/components/AtomixGlass/stories/WidgetExamples.stories.tsx +0 -441
  152. package/src/components/TypedButton/TypedButton.stories.tsx +0 -59
  153. package/src/components/TypedButton/TypedButton.tsx +0 -39
  154. package/src/components/TypedButton/index.ts +0 -2
  155. package/src/lib/composables/useBreadcrumb.ts +0 -81
  156. package/src/lib/composables/useChartInteractions.ts +0 -123
  157. package/src/lib/composables/useChartPerformance.ts +0 -347
  158. package/src/lib/composables/useDropdown.ts +0 -338
  159. package/src/lib/composables/useModal.ts +0 -110
  160. package/src/lib/composables/useTypedButton.ts +0 -66
  161. package/src/lib/hooks/usePerformanceMonitor.ts +0 -148
  162. package/src/lib/utils/displacement-generator.ts +0 -92
  163. package/src/lib/utils/memoryMonitor.ts +0 -191
  164. package/src/styles/01-settings/_settings.testtypecheck.scss +0 -53
  165. package/src/styles/01-settings/_settings.typedbutton.scss +0 -53
  166. package/src/styles/06-components/_components.testbutton.scss +0 -212
  167. package/src/styles/06-components/_components.testtypecheck.scss +0 -212
  168. package/src/styles/06-components/_components.typedbutton.scss +0 -212
@@ -1,1082 +0,0 @@
1
- /**
2
- * Modes.stories.tsx
3
- *
4
- * Professional showcase of AtomixGlass rendering modes with modern layouts.
5
- * Each mode demonstrates unique visual characteristics and displacement patterns.
6
- *
7
- * @package Atomix
8
- * @component AtomixGlass
9
- */
10
-
11
- import { Meta, StoryObj } from '@storybook/react';
12
- import AtomixGlass from '../AtomixGlass';
13
- import { BackgroundWrapper } from './shared-components';
14
- import React, { useState } from 'react';
15
- import { Grid, GridCol, Container } from '../../../layouts/Grid';
16
-
17
- const meta: Meta<typeof AtomixGlass> = {
18
- title: 'Components/AtomixGlass/Features/Modes',
19
- component: AtomixGlass,
20
- parameters: {
21
- layout: 'fullscreen',
22
- docs: {
23
- description: {
24
- component:
25
- 'Explore four distinct rendering modes in AtomixGlass. Each mode offers unique displacement patterns, visual characteristics, and performance profiles optimized for different use cases.',
26
- },
27
- },
28
- },
29
- tags: ['autodocs'],
30
- };
31
-
32
- export default meta;
33
- type Story = StoryObj<typeof AtomixGlass>;
34
-
35
- /**
36
- * Mode Comparison Gallery
37
- *
38
- * A comprehensive showcase comparing all four rendering modes side-by-side.
39
- * Perfect for understanding the visual differences and selecting the right mode for your needs.
40
- */
41
- export const ModeGallery: Story = {
42
- parameters: {
43
- docs: {
44
- description: {
45
- story:
46
- 'Interactive gallery showcasing all four rendering modes. Click any card to see the mode in action with optimized settings.',
47
- },
48
- },
49
- },
50
- render: () => {
51
- // eslint-disable-next-line react-hooks/rules-of-hooks
52
- const [selectedMode, setSelectedMode] = useState<string | null>(null);
53
-
54
- const modes = [
55
- {
56
- id: 'standard',
57
- name: 'Standard',
58
- icon: '✨',
59
- gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
60
- description: 'Balanced displacement with uniform distortion patterns',
61
- features: [
62
- 'Optimal performance',
63
- 'Uniform displacement',
64
- 'Smooth transitions',
65
- 'Best for production',
66
- ],
67
- settings: {
68
- displacementScale: 120,
69
- blurAmount: 1.5,
70
- saturation: 140,
71
- aberrationIntensity: 2,
72
- },
73
- useCase: 'Perfect for cards, modals, and general UI elements',
74
- },
75
- {
76
- id: 'polar',
77
- name: 'Polar',
78
- icon: '🌀',
79
- gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
80
- description: 'Circular refraction with radial displacement patterns',
81
- features: [
82
- 'Circular distortion',
83
- 'Radial patterns',
84
- 'Dynamic center point',
85
- 'Eye-catching effect',
86
- ],
87
- settings: {
88
- displacementScale: 100,
89
- blurAmount: 1.2,
90
- saturation: 150,
91
- aberrationIntensity: 2.5,
92
- },
93
- useCase: 'Ideal for hero sections and feature highlights',
94
- },
95
- {
96
- id: 'prominent',
97
- name: 'Prominent',
98
- icon: '💫',
99
- gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
100
- description: 'Enhanced displacement with stronger edge effects',
101
- features: [
102
- 'Amplified distortion',
103
- 'Edge enhancement',
104
- 'High visual impact',
105
- 'Premium feel',
106
- ],
107
- settings: {
108
- displacementScale: 140,
109
- blurAmount: 1.8,
110
- saturation: 155,
111
- aberrationIntensity: 3,
112
- },
113
- useCase: 'Great for call-to-action elements and premium content',
114
- },
115
- {
116
- id: 'shader',
117
- name: 'Shader',
118
- icon: '🔮',
119
- gradient: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)',
120
- description: 'Advanced shader-based rendering with maximum visual fidelity',
121
- features: [
122
- 'Shader-based effects',
123
- 'Maximum quality',
124
- 'Time-based animation',
125
- 'Apple-style fluid',
126
- ],
127
- settings: {
128
- displacementScale: 25,
129
- blurAmount: 2,
130
- saturation: 160,
131
- aberrationIntensity: 2.8,
132
- },
133
- useCase: 'Best for hero sections and premium experiences',
134
- },
135
- ];
136
-
137
- return (
138
- <BackgroundWrapper
139
- backgroundImage="https://images.unsplash.com/photo-1760196339465-e403a30d662e?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=1493"
140
- height="100vh"
141
- width="100vw"
142
- overlayOpacity={0.3}
143
- borderRadius="0"
144
- >
145
- <div style={{ width: '100%', maxWidth: '1400px', padding: '60px 40px' }}>
146
- {/* Header Section */}
147
- <div style={{ textAlign: 'center', marginBottom: '60px' }}>
148
- <AtomixGlass
149
- mode="standard"
150
- displacementScale={80}
151
- blurAmount={1}
152
- saturation={130}
153
- borderRadius={24}
154
- elasticity={0.12}
155
- style={{ marginBottom: '24px', display: 'inline-block' }}
156
- >
157
- <div
158
- style={{
159
- padding: '12px 24px',
160
- display: 'inline-flex',
161
- alignItems: 'center',
162
- gap: '8px',
163
- fontSize: '13px',
164
- fontWeight: 700,
165
- letterSpacing: '1px',
166
- textTransform: 'uppercase',
167
- color: 'rgba(255, 255, 255, 0.9)',
168
- }}
169
- >
170
- <span>🎨</span>
171
- <span>Four Rendering Modes</span>
172
- </div>
173
- </AtomixGlass>
174
- <h1
175
- style={{
176
- margin: '0 0 20px 0',
177
- fontSize: '56px',
178
- fontWeight: 700,
179
- background: 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%)',
180
- WebkitBackgroundClip: 'text',
181
- WebkitTextFillColor: 'transparent',
182
- backgroundClip: 'text',
183
- letterSpacing: '-1.5px',
184
- textShadow: '0 4px 12px rgba(0,0,0,0.1)',
185
- }}
186
- >
187
- AtomixGlass Modes
188
- </h1>
189
- <p
190
- style={{
191
- fontSize: '18px',
192
- color: 'rgba(255, 255, 255, 0.9)',
193
- maxWidth: '720px',
194
- margin: '0 auto',
195
- lineHeight: 1.7,
196
- textShadow: '0 2px 4px rgba(0,0,0,0.2)',
197
- }}
198
- >
199
- Choose from four distinct rendering modes, each optimized for different visual styles
200
- and performance requirements. Click any card to explore the mode in detail.
201
- </p>
202
- </div>
203
-
204
- {/* Modes Grid */}
205
- <Container>
206
- <Grid>
207
- {modes.map(mode => {
208
- const isSelected = selectedMode === mode.id;
209
-
210
- return (
211
- <GridCol key={mode.id} xs={12} md={6} className="u-mb-4">
212
- <AtomixGlass
213
- mode={mode.id as any}
214
- displacementScale={mode.settings.displacementScale}
215
- blurAmount={mode.settings.blurAmount}
216
- saturation={mode.settings.saturation}
217
- aberrationIntensity={mode.settings.aberrationIntensity}
218
- shaderVariant={mode.id === 'shader' ? 'premiumGlass' : undefined}
219
- elasticity={0}
220
- borderRadius={24}
221
- onClick={() => setSelectedMode(isSelected ? null : mode.id)}
222
- style={{
223
- cursor: 'pointer',
224
- transition: 'all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)',
225
- transform: isSelected ? 'scale(1.03)' : 'scale(1)',
226
- }}
227
- >
228
- <div
229
- style={{
230
- padding: '32px 28px',
231
- minHeight: '420px',
232
- display: 'flex',
233
- flexDirection: 'column',
234
- transition: 'all 0.3s ease',
235
- }}
236
- >
237
- {/* Icon and Badge */}
238
- <div style={{ marginBottom: '24px' }}>
239
- <div
240
- style={{
241
- width: '64px',
242
- height: '64px',
243
- borderRadius: '18px',
244
- background: mode.gradient,
245
- display: 'flex',
246
- alignItems: 'center',
247
- justifyContent: 'center',
248
- fontSize: '32px',
249
- marginBottom: '16px',
250
- boxShadow: '0 8px 24px rgba(0,0,0,0.25)',
251
- position: 'relative',
252
- }}
253
- >
254
- <div
255
- style={{
256
- position: 'absolute',
257
- inset: '-3px',
258
- borderRadius: '20px',
259
- background: mode.gradient,
260
- opacity: 0.4,
261
- filter: 'blur(10px)',
262
- }}
263
- />
264
- <span style={{ position: 'relative', zIndex: 1 }}>{mode.icon}</span>
265
- </div>
266
- </div>
267
-
268
- {/* Content */}
269
- <div style={{ flex: 1 }}>
270
- <h3
271
- style={{
272
- margin: '0 0 12px 0',
273
- fontSize: '26px',
274
- fontWeight: 600,
275
- color: '#fff',
276
- letterSpacing: '-0.5px',
277
- }}
278
- >
279
- {mode.name}
280
- </h3>
281
- <p
282
- style={{
283
- margin: '0 0 20px 0',
284
- fontSize: '14px',
285
- lineHeight: 1.6,
286
- color: 'rgba(255, 255, 255, 0.8)',
287
- }}
288
- >
289
- {mode.description}
290
- </p>
291
-
292
- {/* Features List */}
293
- <div
294
- style={{
295
- display: 'flex',
296
- flexDirection: 'column',
297
- gap: '8px',
298
- marginBottom: '20px',
299
- }}
300
- >
301
- {mode.features.map((feature, idx) => (
302
- <div
303
- key={idx}
304
- style={{
305
- display: 'flex',
306
- alignItems: 'center',
307
- gap: '8px',
308
- fontSize: '13px',
309
- color: 'rgba(255, 255, 255, 0.75)',
310
- }}
311
- >
312
- <div
313
- style={{
314
- width: '4px',
315
- height: '4px',
316
- borderRadius: '50%',
317
- background: mode.gradient,
318
- }}
319
- />
320
- {feature}
321
- </div>
322
- ))}
323
- </div>
324
-
325
- {/* Use Case */}
326
- <div
327
- style={{
328
- padding: '12px 16px',
329
- borderRadius: '12px',
330
- background: 'rgba(255, 255, 255, 0.08)',
331
- border: '1px solid rgba(255, 255, 255, 0.1)',
332
- fontSize: '12px',
333
- lineHeight: 1.5,
334
- color: 'rgba(255, 255, 255, 0.7)',
335
- marginTop: 'auto',
336
- }}
337
- >
338
- <strong style={{ color: '#fff' }}>Use Case:</strong> {mode.useCase}
339
- </div>
340
- </div>
341
-
342
- {/* Settings Info */}
343
- <div
344
- style={{
345
- marginTop: '20px',
346
- paddingTop: '16px',
347
- borderTop: '1px solid rgba(255, 255, 255, 0.1)',
348
- display: 'flex',
349
- flexWrap: 'wrap',
350
- gap: '8px',
351
- }}
352
- >
353
- {Object.entries(mode.settings).map(([key, value]) => (
354
- <span
355
- key={key}
356
- style={{
357
- padding: '4px 10px',
358
- fontSize: '11px',
359
- borderRadius: '8px',
360
- background: 'rgba(0, 0, 0, 0.2)',
361
- color: 'rgba(255, 255, 255, 0.6)',
362
- fontFamily: 'monospace',
363
- }}
364
- >
365
- {key.replace(/([A-Z])/g, ' $1').trim()}: {value}
366
- </span>
367
- ))}
368
- </div>
369
- </div>
370
- </AtomixGlass>
371
- </GridCol>
372
- );
373
- })}
374
- </Grid>
375
- </Container>
376
-
377
- {/* Info Card */}
378
- <AtomixGlass
379
- mode="standard"
380
- displacementScale={80}
381
- blurAmount={1}
382
- saturation={130}
383
- borderRadius={20}
384
- elasticity={0.12}
385
- className="u-mt-8"
386
- >
387
- <div
388
- style={{
389
- padding: '28px 32px',
390
- display: 'flex',
391
- alignItems: 'center',
392
- gap: '24px',
393
- flexWrap: 'wrap',
394
- }}
395
- >
396
- <div
397
- style={{
398
- fontSize: '36px',
399
- width: '56px',
400
- height: '56px',
401
- display: 'flex',
402
- alignItems: 'center',
403
- justifyContent: 'center',
404
- borderRadius: '16px',
405
- background: 'rgba(255, 255, 255, 0.15)',
406
- }}
407
- >
408
- 💡
409
- </div>
410
- <div style={{ flex: 1, minWidth: '280px' }}>
411
- <h4
412
- style={{
413
- margin: '0 0 8px 0',
414
- fontSize: '18px',
415
- fontWeight: 600,
416
- color: '#fff',
417
- }}
418
- >
419
- Choosing the Right Mode
420
- </h4>
421
- <p
422
- style={{
423
- margin: 0,
424
- fontSize: '14px',
425
- lineHeight: 1.6,
426
- color: 'rgba(255, 255, 255, 0.8)',
427
- }}
428
- >
429
- <strong>Standard</strong> offers the best balance for most uses.{' '}
430
- <strong>Polar</strong> creates eye-catching radial effects.{' '}
431
- <strong>Prominent</strong> amplifies visual impact for premium content.{' '}
432
- <strong>Shader</strong> delivers maximum quality with advanced GPU-accelerated
433
- rendering.
434
- </p>
435
- </div>
436
- </div>
437
- </AtomixGlass>
438
- </div>
439
- </BackgroundWrapper>
440
- );
441
- },
442
- };
443
-
444
- /**
445
- * Shader Mode
446
- *
447
- * Advanced GPU-accelerated shader rendering with time-based animations.
448
- * The pinnacle of AtomixGlass visual quality with Apple-style fluid effects.
449
- */
450
- export const Shader: Story = {
451
- args: {
452
- children: (
453
- <div style={{ padding: '40px 36px', textAlign: 'center', maxWidth: '440px' }}>
454
- <div
455
- style={{
456
- width: '68px',
457
- height: '68px',
458
- margin: '0 auto 24px',
459
- borderRadius: '20px',
460
- background:
461
- 'url(https://images.unsplash.com/photo-1760196339465-e403a30d662e?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=1493)',
462
- display: 'flex',
463
- alignItems: 'center',
464
- justifyContent: 'center',
465
- fontSize: '36px',
466
- boxShadow: '0 12px 32px rgba(250, 112, 154, 0.5)',
467
- }}
468
- >
469
- 🔮
470
- </div>
471
- <h2
472
- style={{
473
- margin: '0 0 16px 0',
474
- fontSize: '32px',
475
- fontWeight: 700,
476
- color: '#fff',
477
- letterSpacing: '-0.5px',
478
- }}
479
- >
480
- Shader Mode
481
- </h2>
482
- <p
483
- style={{
484
- margin: '0 0 24px 0',
485
- fontSize: '16px',
486
- lineHeight: 1.7,
487
- color: 'rgba(255, 255, 255, 0.85)',
488
- }}
489
- >
490
- GPU-accelerated shader rendering with maximum visual fidelity. Features time-based
491
- animations and Apple-style liquid glass effects.
492
- </p>
493
- <div
494
- style={{
495
- display: 'grid',
496
- gridTemplateColumns: '1fr 1fr',
497
- gap: '12px',
498
- }}
499
- >
500
- {[
501
- { label: 'Technology', value: '🖥️ GPU Shader' },
502
- { label: 'Fidelity', value: '🌟 Maximum' },
503
- { label: 'Animation', value: '⏰ Time-based' },
504
- { label: 'Style', value: '🍎 Apple-like' },
505
- ].map(item => (
506
- <div
507
- key={item.label}
508
- style={{
509
- padding: '12px',
510
- borderRadius: '12px',
511
- background: 'rgba(255, 255, 255, 0.1)',
512
- backdropFilter: 'blur(8px)',
513
- border: '1px solid rgba(255, 255, 255, 0.15)',
514
- }}
515
- >
516
- <div
517
- style={{
518
- fontSize: '11px',
519
- textTransform: 'uppercase',
520
- fontWeight: 600,
521
- letterSpacing: '0.5px',
522
- color: 'rgba(255, 255, 255, 0.6)',
523
- marginBottom: '4px',
524
- }}
525
- >
526
- {item.label}
527
- </div>
528
- <div style={{ fontSize: '13px', color: '#fff', fontWeight: 600 }}>{item.value}</div>
529
- </div>
530
- ))}
531
- </div>
532
- </div>
533
- ),
534
- displacementScale: 25,
535
- blurAmount: 2,
536
- saturation: 160,
537
- aberrationIntensity: 2.8,
538
- elasticity: 0.2,
539
- borderRadius: 28,
540
- mode: 'shader',
541
- shaderVariant: 'premiumGlass',
542
- },
543
- decorators: [
544
- Story => (
545
- <BackgroundWrapper
546
- backgroundImage="https://images.unsplash.com/photo-1557683316-973673baf926?q=80&w=3029&auto=format&fit=crop"
547
- height="100vh"
548
- width="100vw"
549
- overlayOpacity={0.3}
550
- borderRadius="0"
551
- >
552
- <Story />
553
- </BackgroundWrapper>
554
- ),
555
- ],
556
- parameters: {
557
- docs: {
558
- description: {
559
- story:
560
- 'Shader mode uses advanced GPU-accelerated rendering for maximum visual quality. Features time-based animations and multiple shader variants including liquidGlass, appleFluid, and premiumGlass.',
561
- },
562
- },
563
- },
564
- };
565
-
566
- /**
567
- * Shader Variants Gallery
568
- *
569
- * A comprehensive showcase of all available shader variants with their unique characteristics.
570
- * Each variant is optimized for different visual styles and use cases.
571
- */
572
- export const ShaderVariants: Story = {
573
- parameters: {
574
- docs: {
575
- description: {
576
- story:
577
- 'Explore five premium shader variants, each offering distinct visual characteristics from liquid glass to metallic effects. Click any card to see it in action.',
578
- },
579
- },
580
- },
581
- render: () => {
582
- // eslint-disable-next-line react-hooks/rules-of-hooks
583
- const [activeVariant, setActiveVariant] = useState<string | null>(null);
584
-
585
- const variants = [
586
- {
587
- id: 'liquidGlass',
588
- name: 'Liquid Glass',
589
- icon: '💧',
590
- gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
591
- shadowColor: 'rgba(102, 126, 234, 0.6)',
592
- description:
593
- 'Enhanced liquid glass with time-based animations and multi-layered organic distortion',
594
- features: [
595
- 'Time-based animation',
596
- 'Multi-layer distortion',
597
- 'Chromatic aberration',
598
- 'Depth effects',
599
- 'Organic flow patterns',
600
- ],
601
- specs: {
602
- complexity: 'High',
603
- performance: 'Good',
604
- animation: 'Continuous',
605
- gpuLoad: 'Medium',
606
- },
607
- displacementScale: 20,
608
- },
609
- {
610
- id: 'appleFluid',
611
- name: 'Apple Fluid',
612
- icon: '🌊',
613
- gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
614
- shadowColor: 'rgba(245, 87, 108, 0.6)',
615
- description: 'Premium fluid glass with vortex effects and high-quality organic distortion',
616
- features: [
617
- 'Vortex effects',
618
- '5-octave noise',
619
- 'Fluid dynamics',
620
- 'Mouse-driven flow',
621
- 'Apple-style rendering',
622
- ],
623
- specs: {
624
- complexity: 'Very High',
625
- performance: 'Good',
626
- animation: 'Interactive',
627
- gpuLoad: 'High',
628
- },
629
- displacementScale: 20,
630
- },
631
- {
632
- id: 'premiumGlass',
633
- name: 'Premium Glass',
634
- icon: '💎',
635
- gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
636
- shadowColor: 'rgba(79, 172, 254, 0.6)',
637
- description: 'High-end glass with advanced refraction and multi-layer depth effects',
638
- features: [
639
- 'Advanced refraction',
640
- 'Multi-layer depth',
641
- 'Radial distortion',
642
- 'Edge-aware rendering',
643
- 'Premium quality',
644
- ],
645
- specs: {
646
- complexity: 'High',
647
- performance: 'Excellent',
648
- animation: 'Smooth',
649
- gpuLoad: 'Medium',
650
- },
651
- displacementScale: 20,
652
- },
653
- {
654
- id: 'liquidMetal',
655
- name: 'Liquid Metal',
656
- icon: '✨',
657
- gradient: 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)',
658
- shadowColor: 'rgba(252, 182, 159, 0.6)',
659
- description: 'Metallic liquid effect with shimmer and wave patterns',
660
- features: [
661
- 'Metallic waves',
662
- 'Shimmer effect',
663
- '4-octave noise',
664
- 'High-frequency animation',
665
- 'Reflective surface',
666
- ],
667
- specs: {
668
- complexity: 'High',
669
- performance: 'Good',
670
- animation: 'Fast',
671
- gpuLoad: 'Medium-High',
672
- },
673
- displacementScale: 20,
674
- },
675
- ];
676
-
677
- return (
678
- <BackgroundWrapper
679
- backgroundImage="https://images.unsplash.com/photo-1530569427831-a0a4b8a0d206?q=80&w=2071&auto=format&fit=crop"
680
- height="100vh"
681
- width="100vw"
682
- overlayOpacity={0.35}
683
- borderRadius="0"
684
- >
685
- <div style={{ width: '100%', maxWidth: '1600px', padding: '60px 40px' }}>
686
- {/* Header */}
687
- <div style={{ textAlign: 'center', marginBottom: '56px' }}>
688
- <div
689
- style={{
690
- display: 'inline-block',
691
- padding: '8px 20px',
692
- borderRadius: '24px',
693
- background: 'rgba(255, 255, 255, 0.12)',
694
- backdropFilter: 'blur(12px)',
695
- marginBottom: '20px',
696
- fontSize: '13px',
697
- fontWeight: 600,
698
- letterSpacing: '1px',
699
- textTransform: 'uppercase',
700
- color: 'rgba(255, 255, 255, 0.9)',
701
- border: '1px solid rgba(255, 255, 255, 0.15)',
702
- }}
703
- >
704
- Premium Shader Technology
705
- </div>
706
- <h1
707
- style={{
708
- margin: '0 0 20px 0',
709
- fontSize: '56px',
710
- fontWeight: 700,
711
- background: 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%)',
712
- WebkitBackgroundClip: 'text',
713
- WebkitTextFillColor: 'transparent',
714
- backgroundClip: 'text',
715
- letterSpacing: '-1.5px',
716
- textShadow: '0 4px 12px rgba(0,0,0,0.1)',
717
- }}
718
- >
719
- Apple-Style Shader Variants
720
- </h1>
721
- <p
722
- style={{
723
- fontSize: '20px',
724
- color: 'rgba(255, 255, 255, 0.85)',
725
- maxWidth: '720px',
726
- margin: '0 auto',
727
- lineHeight: 1.6,
728
- textShadow: '0 2px 4px rgba(0,0,0,0.2)',
729
- }}
730
- >
731
- Experience the pinnacle of liquid glass design with GPU-accelerated shader variants
732
- featuring time-based animations and organic flow patterns.
733
- </p>
734
- </div>
735
-
736
- {/* Variants Grid */}
737
- <div
738
- style={{
739
- display: 'grid',
740
- gridTemplateColumns: 'repeat(auto-fit, minmax(340px, 1fr))',
741
- gap: '32px',
742
- marginBottom: '56px',
743
- }}
744
- >
745
- {variants.map(variant => {
746
- const isActive = activeVariant === variant.id;
747
-
748
- return (
749
- <AtomixGlass
750
- key={variant.id}
751
- mode="shader"
752
- shaderVariant={variant.id as any}
753
- displacementScale={variant.displacementScale}
754
- blurAmount={1.5}
755
- elasticity={0}
756
- borderRadius={28}
757
- onClick={() => setActiveVariant(isActive ? null : variant.id)}
758
- style={{
759
- cursor: 'pointer',
760
- transition: 'all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)',
761
- transform: isActive ? 'scale(1.02) translateY(-8px)' : 'scale(1)',
762
- }}
763
- >
764
- <div
765
- style={{
766
- padding: '36px 28px',
767
- minHeight: '500px',
768
- display: 'flex',
769
- flexDirection: 'column',
770
- }}
771
- >
772
- {/* Header with icon */}
773
- <div style={{ marginBottom: '28px' }}>
774
- <div
775
- style={{
776
- width: '72px',
777
- height: '72px',
778
- borderRadius: '20px',
779
- background: variant.gradient,
780
- display: 'flex',
781
- alignItems: 'center',
782
- justifyContent: 'center',
783
- fontSize: '40px',
784
- marginBottom: '20px',
785
- boxShadow: `0 12px 32px ${variant.shadowColor}`,
786
- position: 'relative',
787
- }}
788
- >
789
- <div
790
- style={{
791
- position: 'absolute',
792
- inset: '-4px',
793
- borderRadius: '24px',
794
- background: variant.gradient,
795
- opacity: 0.4,
796
- filter: 'blur(16px)',
797
- }}
798
- />
799
- <span style={{ position: 'relative', zIndex: 1 }}>{variant.icon}</span>
800
- </div>
801
- <div
802
- style={{
803
- display: 'inline-block',
804
- padding: '5px 14px',
805
- borderRadius: '14px',
806
- background: 'rgba(102, 126, 234, 0.3)',
807
- border: '1px solid rgba(102, 126, 234, 0.5)',
808
- fontSize: '11px',
809
- fontWeight: 700,
810
- letterSpacing: '0.5px',
811
- textTransform: 'uppercase',
812
- color: '#fff',
813
- }}
814
- >
815
- Active
816
- </div>
817
- </div>
818
-
819
- {/* Title and description */}
820
- <h3
821
- style={{
822
- margin: '0 0 12px 0',
823
- fontSize: '28px',
824
- fontWeight: 700,
825
- color: '#fff',
826
- letterSpacing: '-0.5px',
827
- }}
828
- >
829
- {variant.name}
830
- </h3>
831
- <p
832
- style={{
833
- margin: '0 0 24px 0',
834
- fontSize: '15px',
835
- lineHeight: 1.7,
836
- color: 'rgba(255, 255, 255, 0.8)',
837
- }}
838
- >
839
- {variant.description}
840
- </p>
841
-
842
- {/* Features */}
843
- <div
844
- style={{
845
- marginBottom: '24px',
846
- flex: 1,
847
- }}
848
- >
849
- <div
850
- style={{
851
- fontSize: '12px',
852
- fontWeight: 700,
853
- letterSpacing: '1px',
854
- textTransform: 'uppercase',
855
- color: 'rgba(255, 255, 255, 0.6)',
856
- marginBottom: '12px',
857
- }}
858
- >
859
- Features
860
- </div>
861
- <div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
862
- {variant.features.map((feature, idx) => (
863
- <div
864
- key={idx}
865
- style={{
866
- display: 'flex',
867
- alignItems: 'center',
868
- gap: '10px',
869
- padding: '10px 14px',
870
- borderRadius: '10px',
871
- background: 'rgba(255, 255, 255, 0.08)',
872
- backdropFilter: 'blur(8px)',
873
- fontSize: '13px',
874
- color: 'rgba(255, 255, 255, 0.85)',
875
- fontWeight: 500,
876
- }}
877
- >
878
- <div
879
- style={{
880
- width: '6px',
881
- height: '6px',
882
- borderRadius: '50%',
883
- background: variant.gradient,
884
- flexShrink: 0,
885
- }}
886
- />
887
- {feature}
888
- </div>
889
- ))}
890
- </div>
891
- </div>
892
-
893
- {/* Specs Grid */}
894
- <div
895
- style={{
896
- display: 'grid',
897
- gridTemplateColumns: '1fr 1fr',
898
- gap: '10px',
899
- paddingTop: '20px',
900
- borderTop: '1px solid rgba(255, 255, 255, 0.12)',
901
- }}
902
- >
903
- {Object.entries(variant.specs).map(([key, value]) => (
904
- <div
905
- key={key}
906
- style={{
907
- padding: '10px 12px',
908
- borderRadius: '10px',
909
- background: 'rgba(0, 0, 0, 0.2)',
910
- backdropFilter: 'blur(4px)',
911
- }}
912
- >
913
- <div
914
- style={{
915
- fontSize: '10px',
916
- textTransform: 'uppercase',
917
- fontWeight: 700,
918
- letterSpacing: '0.5px',
919
- color: 'rgba(255, 255, 255, 0.5)',
920
- marginBottom: '4px',
921
- }}
922
- >
923
- {key}
924
- </div>
925
- <div
926
- style={{
927
- fontSize: '13px',
928
- color: '#fff',
929
- fontWeight: 600,
930
- }}
931
- >
932
- {value}
933
- </div>
934
- </div>
935
- ))}
936
- </div>
937
- </div>
938
- </AtomixGlass>
939
- );
940
- })}
941
- </div>
942
-
943
- {/* Usage Guide */}
944
- <AtomixGlass
945
- mode="shader"
946
- shaderVariant="liquidGlass"
947
- displacementScale={20}
948
- blurAmount={1.2}
949
- elasticity={0}
950
- >
951
- <div
952
- style={{
953
- display: 'grid',
954
- gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))',
955
- gap: '24px',
956
- }}
957
- >
958
- <div style={{ padding: '28px 24px' }}>
959
- <div
960
- style={{
961
- fontSize: '32px',
962
- marginBottom: '16px',
963
- }}
964
- >
965
- 💡
966
- </div>
967
- <h4
968
- style={{
969
- margin: '0 0 12px 0',
970
- fontSize: '20px',
971
- fontWeight: 600,
972
- color: '#fff',
973
- }}
974
- >
975
- Usage Guide
976
- </h4>
977
- <p
978
- style={{
979
- margin: 0,
980
- fontSize: '14px',
981
- lineHeight: 1.7,
982
- color: 'rgba(255, 255, 255, 0.8)',
983
- }}
984
- >
985
- Set{' '}
986
- <code
987
- style={{
988
- background: 'rgba(255,255,255,0.15)',
989
- padding: '2px 8px',
990
- borderRadius: '6px',
991
- fontSize: '13px',
992
- fontFamily: 'monospace',
993
- }}
994
- >
995
- mode="shader"
996
- </code>{' '}
997
- and choose your preferred{' '}
998
- <code
999
- style={{
1000
- background: 'rgba(255,255,255,0.15)',
1001
- padding: '2px 8px',
1002
- borderRadius: '6px',
1003
- fontSize: '13px',
1004
- fontFamily: 'monospace',
1005
- }}
1006
- >
1007
- shaderVariant
1008
- </code>{' '}
1009
- for GPU-accelerated rendering.
1010
- </p>
1011
- </div>
1012
-
1013
- <div style={{ padding: '28px 24px' }}>
1014
- <div
1015
- style={{
1016
- fontSize: '32px',
1017
- marginBottom: '16px',
1018
- }}
1019
- >
1020
-
1021
- </div>
1022
- <h4
1023
- style={{
1024
- margin: '0 0 12px 0',
1025
- fontSize: '20px',
1026
- fontWeight: 600,
1027
- color: '#fff',
1028
- }}
1029
- >
1030
- Performance
1031
- </h4>
1032
- <p
1033
- style={{
1034
- margin: 0,
1035
- fontSize: '14px',
1036
- lineHeight: 1.7,
1037
- color: 'rgba(255, 255, 255, 0.8)',
1038
- }}
1039
- >
1040
- All shader variants are GPU-accelerated for smooth 60fps animations. Premium Glass
1041
- offers the best performance-to-quality ratio.
1042
- </p>
1043
- </div>
1044
-
1045
- <div style={{ padding: '28px 24px' }}>
1046
- <div
1047
- style={{
1048
- fontSize: '32px',
1049
- marginBottom: '16px',
1050
- }}
1051
- >
1052
- 🎨
1053
- </div>
1054
- <h4
1055
- style={{
1056
- margin: '0 0 12px 0',
1057
- fontSize: '20px',
1058
- fontWeight: 600,
1059
- color: '#fff',
1060
- }}
1061
- >
1062
- Best Practices
1063
- </h4>
1064
- <p
1065
- style={{
1066
- margin: 0,
1067
- fontSize: '14px',
1068
- lineHeight: 1.7,
1069
- color: 'rgba(255, 255, 255, 0.8)',
1070
- }}
1071
- >
1072
- Use lower displacement scales (20-30) for shader mode. Combine with colorful
1073
- backgrounds for maximum visual impact.
1074
- </p>
1075
- </div>
1076
- </div>
1077
- </AtomixGlass>
1078
- </div>
1079
- </BackgroundWrapper>
1080
- );
1081
- },
1082
- };