@shohojdhara/atomix 0.5.0 → 0.5.1

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 (76) hide show
  1. package/dist/atomix.css +95 -69
  2. package/dist/atomix.css.map +1 -1
  3. package/dist/atomix.min.css +1 -1
  4. package/dist/atomix.min.css.map +1 -1
  5. package/dist/charts.d.ts +1 -0
  6. package/dist/charts.js +231 -332
  7. package/dist/charts.js.map +1 -1
  8. package/dist/core.d.ts +1 -0
  9. package/dist/core.js +232 -333
  10. package/dist/core.js.map +1 -1
  11. package/dist/forms.d.ts +1 -0
  12. package/dist/forms.js +231 -332
  13. package/dist/forms.js.map +1 -1
  14. package/dist/heavy.d.ts +11 -2
  15. package/dist/heavy.js +233 -334
  16. package/dist/heavy.js.map +1 -1
  17. package/dist/index.d.ts +13 -2
  18. package/dist/index.esm.js +228 -327
  19. package/dist/index.esm.js.map +1 -1
  20. package/dist/index.js +227 -326
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.min.js +1 -1
  23. package/dist/index.min.js.map +1 -1
  24. package/package.json +11 -1
  25. package/src/components/AtomixGlass/AtomixGlass.tsx +188 -128
  26. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +62 -90
  27. package/src/components/AtomixGlass/PerformanceDashboard.tsx +153 -201
  28. package/src/components/AtomixGlass/glass-utils.ts +50 -0
  29. package/src/components/AtomixGlass/stories/AnimationFeatures.stories.tsx +52 -46
  30. package/src/components/AtomixGlass/stories/Examples.stories.tsx +573 -236
  31. package/src/components/AtomixGlass/stories/Playground.stories.tsx +88 -41
  32. package/src/components/AtomixGlass/stories/argTypes.ts +19 -19
  33. package/src/components/AtomixGlass/stories/shared-components.tsx +7 -12
  34. package/src/components/AtomixGlass/stories/types.ts +3 -3
  35. package/src/lib/composables/useAtomixGlass.ts +108 -71
  36. package/src/lib/composables/useAtomixGlassStyles.ts +0 -2
  37. package/src/lib/constants/components.ts +1 -0
  38. package/src/lib/types/components.ts +1 -0
  39. package/src/lib/utils/displacement-generator.ts +1 -1
  40. package/src/styles/06-components/_components.atomix-glass.scss +158 -97
  41. package/scripts/cli/__tests__/README.md +0 -81
  42. package/scripts/cli/__tests__/basic.test.js +0 -116
  43. package/scripts/cli/__tests__/clean.test.js +0 -278
  44. package/scripts/cli/__tests__/component-generator.test.js +0 -332
  45. package/scripts/cli/__tests__/component-validator.test.js +0 -433
  46. package/scripts/cli/__tests__/generator.test.js +0 -613
  47. package/scripts/cli/__tests__/glass-motion.test.js +0 -256
  48. package/scripts/cli/__tests__/integration.test.js +0 -938
  49. package/scripts/cli/__tests__/migrate.test.js +0 -74
  50. package/scripts/cli/__tests__/security.test.js +0 -206
  51. package/scripts/cli/__tests__/test-setup.js +0 -135
  52. package/scripts/cli/__tests__/theme-bridge.test.js +0 -507
  53. package/scripts/cli/__tests__/token-manager.test.js +0 -251
  54. package/scripts/cli/__tests__/token-provider.test.js +0 -361
  55. package/scripts/cli/__tests__/utils.test.js +0 -165
  56. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +0 -216
  57. package/src/components/AtomixGlass/stories/AnimationTests.stories.tsx +0 -95
  58. package/src/components/AtomixGlass/stories/CardExamples.stories.tsx +0 -212
  59. package/src/components/AtomixGlass/stories/Customization.stories.tsx +0 -131
  60. package/src/components/AtomixGlass/stories/DashboardExamples.stories.tsx +0 -348
  61. package/src/components/AtomixGlass/stories/EcommerceExamples.stories.tsx +0 -410
  62. package/src/components/AtomixGlass/stories/FormExamples.stories.tsx +0 -436
  63. package/src/components/AtomixGlass/stories/HeroExamples.stories.tsx +0 -264
  64. package/src/components/AtomixGlass/stories/InteractivePlayground.stories.tsx +0 -247
  65. package/src/components/AtomixGlass/stories/MobileUIExamples.stories.tsx +0 -418
  66. package/src/components/AtomixGlass/stories/ModalExamples.stories.tsx +0 -402
  67. package/src/components/AtomixGlass/stories/Modes.stories.tsx +0 -1082
  68. package/src/components/AtomixGlass/stories/Overview.stories.tsx +0 -497
  69. package/src/components/AtomixGlass/stories/Performance.stories.tsx +0 -103
  70. package/src/components/AtomixGlass/stories/PresetGallery.stories.tsx +0 -335
  71. package/src/components/AtomixGlass/stories/Shaders.stories.tsx +0 -395
  72. package/src/components/AtomixGlass/stories/WidgetExamples.stories.tsx +0 -441
  73. package/src/components/TypedButton/TypedButton.stories.tsx +0 -59
  74. package/src/components/TypedButton/TypedButton.tsx +0 -39
  75. package/src/components/TypedButton/index.ts +0 -2
  76. package/src/lib/composables/useTypedButton.ts +0 -66
@@ -1,335 +0,0 @@
1
- /**
2
- * PresetGallery.stories.tsx
3
- *
4
- * Gallery of pre-configured AtomixGlass presets for common use cases.
5
- * Provides quick starting points for different glass effects and styles.
6
- *
7
- * @package Atomix
8
- * @component AtomixGlass
9
- */
10
- import React from 'react';
11
- import { Meta, StoryObj } from '@storybook/react';
12
- import AtomixGlass from '../AtomixGlass';
13
- import { BackgroundWrapper, backgroundImages, StoryErrorBoundary } from './shared-components';
14
- import { baseArgTypes } from './argTypes';
15
-
16
- import { Button } from '../../Button/Button';
17
- import { Badge } from '../../Badge';
18
-
19
- const meta: Meta<typeof AtomixGlass> = {
20
- title: 'Components/AtomixGlass/Preset Gallery',
21
- component: AtomixGlass,
22
- parameters: {
23
- layout: 'centered',
24
- docs: {
25
- description: {
26
- component:
27
- 'Curated collection of pre-configured AtomixGlass presets for common design scenarios. Each preset is optimized for specific use cases and can be customized further.',
28
- },
29
- },
30
- },
31
- tags: ['autodocs'],
32
- argTypes: baseArgTypes,
33
- };
34
-
35
- export default meta;
36
- type Story = StoryObj<typeof AtomixGlass>;
37
-
38
- /**
39
- * Crystal Clear Preset
40
- *
41
- * Minimal glass effect with subtle distortion - perfect for clean, modern interfaces.
42
- */
43
- export const CrystalClear: Story = {
44
- render: () => (
45
- <StoryErrorBoundary>
46
- <BackgroundWrapper backgroundImage={backgroundImages[2]}>
47
- <div style={{ maxWidth: '500px' }}>
48
- <AtomixGlass
49
- displacementScale={40}
50
- blurAmount={0.75}
51
- saturation={120}
52
- aberrationIntensity={1.5}
53
- borderRadius={20}
54
- mode="standard"
55
- padding="40px"
56
- >
57
- <div className="u-text-center u-text-white">
58
- <Badge variant="secondary" className="u-mb-3">Crystal Clear</Badge>
59
- <h2 className="u-mt-0 u-text-2xl u-font-bold u-mb-2">
60
- Minimal Glass Effect
61
- </h2>
62
- <p className="u-text-sm u-opacity-90 u-mb-4" style={{ lineHeight: 1.6 }}>
63
- Clean and subtle glass morphism with minimal distortion. Perfect for
64
- modern, minimalist interfaces that need just a touch of depth.
65
- </p>
66
- <div className="u-flex u-gap-2 u-justify-center" style={{ gap: '8px' }}>
67
- <Button glass size="sm" variant="primary">Primary</Button>
68
- <Button glass size="sm" variant="outline-light">Secondary</Button>
69
- </div>
70
- </div>
71
- </AtomixGlass>
72
- </div>
73
- </BackgroundWrapper>
74
- </StoryErrorBoundary>
75
- ),
76
- parameters: {
77
- docs: {
78
- description: {
79
- story:
80
- 'Minimal preset with low displacement (40), moderate blur (0.75), and subtle aberration (1.5) for clean interfaces.',
81
- },
82
- },
83
- },
84
- };
85
-
86
- /**
87
- * Frosted Glass Preset
88
- *
89
- * Classic frosted glass effect with strong blur - ideal for cards and modals.
90
- */
91
- export const FrostedGlass: Story = {
92
- render: () => (
93
- <StoryErrorBoundary>
94
- <BackgroundWrapper backgroundImage={backgroundImages[6]} overlay overlayOpacity={0.3}>
95
- <div style={{ maxWidth: '500px' }}>
96
- <AtomixGlass
97
- displacementScale={60}
98
- blurAmount={2}
99
- saturation={130}
100
- aberrationIntensity={2}
101
- borderRadius={24}
102
- mode="standard"
103
- padding="40px"
104
- >
105
- <div className="u-text-center u-text-white">
106
- <Badge variant="primary" className="u-mb-3">Frosted Glass</Badge>
107
- <h2 className="u-mt-0 u-text-2xl u-font-bold u-mb-2">
108
- Classic Frosted Effect
109
- </h2>
110
- <p className="u-text-sm u-opacity-90 u-mb-4" style={{ lineHeight: 1.6 }}>
111
- Strong blur creates a pronounced frosted glass appearance. Excellent
112
- for cards, modals, and overlays that need to stand out.
113
- </p>
114
- <div
115
- style={{
116
- display: 'grid',
117
- gridTemplateColumns: 'repeat(2, 1fr)',
118
- gap: '16px',
119
- marginTop: '24px',
120
- }}
121
- >
122
- {[
123
- { label: 'Blur', value: '2.0' },
124
- { label: 'Displacement', value: '60' },
125
- { label: 'Saturation', value: '130%' },
126
- { label: 'Aberration', value: '2.0' },
127
- ].map((stat, index) => (
128
- <div
129
- key={index}
130
- style={{
131
- background: 'rgba(255,255,255,0.1)',
132
- padding: '12px',
133
- borderRadius: '12px',
134
- }}
135
- >
136
- <p className="u-m-0 u-text-xs u-opacity-70">{stat.label}</p>
137
- <p className="u-m-0 u-text-lg u-font-bold">{stat.value}</p>
138
- </div>
139
- ))}
140
- </div>
141
- </div>
142
- </AtomixGlass>
143
- </div>
144
- </BackgroundWrapper>
145
- </StoryErrorBoundary>
146
- ),
147
- parameters: {
148
- docs: {
149
- description: {
150
- story:
151
- 'Classic frosted glass preset with high blur (2.0), moderate displacement (60), and balanced saturation (130%).',
152
- },
153
- },
154
- },
155
- };
156
-
157
- /**
158
- * Liquid Chrome Preset
159
- *
160
- * High-distortion metallic liquid effect using shader mode.
161
- */
162
- export const LiquidChrome: Story = {
163
- render: () => (
164
- <StoryErrorBoundary>
165
- <BackgroundWrapper backgroundImage={backgroundImages[0]} overlay overlayOpacity={0.4}>
166
- <div style={{ maxWidth: '500px' }}>
167
- <AtomixGlass
168
- displacementScale={90}
169
- blurAmount={1.5}
170
- saturation={180}
171
- aberrationIntensity={3}
172
- borderRadius={28}
173
- mode="shader"
174
- shaderVariant="liquidGlass"
175
- padding="40px"
176
- >
177
- <div className="u-text-center u-text-white">
178
- <Badge variant="success" className="u-mb-3">Liquid Chrome</Badge>
179
- <h2 className="u-mt-0 u-text-2xl u-font-bold u-mb-2">
180
- Metallic Liquid Effect
181
- </h2>
182
- <p className="u-text-sm u-opacity-90 u-mb-4" style={{ lineHeight: 1.6 }}>
183
- High-displacement shader-based effect creating a flowing, metallic
184
- liquid appearance. Perfect for premium, eye-catching designs.
185
- </p>
186
-
187
- <div
188
- style={{
189
- background: 'linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05))',
190
- padding: '20px',
191
- borderRadius: '16px',
192
- marginTop: '24px',
193
- }}
194
- >
195
- <p className="u-m-0 u-text-xs u-font-semibold u-mb-2">Best For:</p>
196
- <ul
197
- className="u-m-0 u-text-sm u-opacity-90"
198
- style={{ textAlign: 'left', paddingLeft: '20px' }}
199
- >
200
- <li>Premium product showcases</li>
201
- <li>Hero sections</li>
202
- <li>Feature highlights</li>
203
- <li>Landing page focal points</li>
204
- </ul>
205
- </div>
206
- </div>
207
- </AtomixGlass>
208
- </div>
209
- </BackgroundWrapper>
210
- </StoryErrorBoundary>
211
- ),
212
- parameters: {
213
- docs: {
214
- description: {
215
- story:
216
- 'Premium liquid chrome preset using shader mode with high displacement (90), elevated saturation (180%), and strong aberration (3).',
217
- },
218
- },
219
- },
220
- };
221
-
222
- /**
223
- * Apple Fluid Preset
224
- *
225
- * Apple-inspired fluid glass effect with organic movement.
226
- */
227
- export const AppleFluid: Story = {
228
- render: () => (
229
- <StoryErrorBoundary>
230
- <BackgroundWrapper backgroundImage={backgroundImages[4]} overlay overlayOpacity={0.3}>
231
- <div style={{ maxWidth: '500px' }}>
232
- <AtomixGlass
233
- displacementScale={75}
234
- blurAmount={1}
235
- saturation={150}
236
- aberrationIntensity={2.5}
237
- borderRadius={26}
238
- mode="shader"
239
- shaderVariant="appleFluid"
240
- padding="40px"
241
- >
242
- <div className="u-text-center u-text-white">
243
- <Badge variant="outline-light" className="u-mb-3">Apple Fluid</Badge>
244
- <h2 className="u-mt-0 u-text-2xl u-font-bold u-mb-2">
245
- Organic Fluid Motion
246
- </h2>
247
- <p className="u-text-sm u-opacity-90 u-mb-4" style={{ lineHeight: 1.6 }}>
248
- Inspired by Apple's fluid design language. Creates smooth, organic
249
- glass distortions that feel alive and dynamic.
250
- </p>
251
-
252
- <div className="u-flex u-gap-2 u-justify-center u-flex-wrap" style={{ gap: '8px' }}>
253
- <Badge variant="secondary">Balanced</Badge>
254
- <Badge variant="secondary">Organic</Badge>
255
- <Badge variant="secondary">Dynamic</Badge>
256
- </div>
257
-
258
- <Button glass size="lg" variant="primary" className="u-mt-4">
259
- Explore Preset
260
- </Button>
261
- </div>
262
- </AtomixGlass>
263
- </div>
264
- </BackgroundWrapper>
265
- </StoryErrorBoundary>
266
- ),
267
- parameters: {
268
- docs: {
269
- description: {
270
- story:
271
- 'Apple-inspired fluid preset with shader mode, balanced displacement (75), and enhanced saturation (150%) for organic effects.',
272
- },
273
- },
274
- },
275
- };
276
-
277
- /**
278
- * Performance Mode Preset
279
- *
280
- * Optimized for mobile devices with reduced effects for better performance.
281
- */
282
- export const PerformanceMode: Story = {
283
- render: () => (
284
- <StoryErrorBoundary>
285
- <BackgroundWrapper backgroundImage={backgroundImages[1]}>
286
- <div style={{ maxWidth: '500px' }}>
287
- <AtomixGlass
288
- displacementScale={50}
289
- blurAmount={0}
290
- saturation={120}
291
- aberrationIntensity={1.5}
292
- borderRadius={20}
293
- mode="standard"
294
- devicePreset="performance"
295
- disableResponsiveBreakpoints={false}
296
- padding="40px"
297
- >
298
- <div className="u-text-center u-text-white">
299
- <Badge variant="success" className="u-mb-3">Performance Mode</Badge>
300
- <h2 className="u-mt-0 u-text-2xl u-font-bold u-mb-2">
301
- Mobile Optimized
302
- </h2>
303
- <p className="u-text-sm u-opacity-90 u-mb-4" style={{ lineHeight: 1.6 }}>
304
- Reduced effects for optimal performance on mobile devices. Maintains
305
- the glass aesthetic while minimizing GPU load.
306
- </p>
307
-
308
- <div
309
- style={{
310
- background: 'rgba(34, 197, 94, 0.15)',
311
- border: '1px solid rgba(34, 197, 94, 0.3)',
312
- padding: '16px',
313
- borderRadius: '12px',
314
- marginTop: '20px',
315
- }}
316
- >
317
- <p className="u-m-0 u-text-xs u-font-semibold" style={{ color: '#86efac' }}>
318
- ✓ Optimized for 60 FPS on mobile
319
- </p>
320
- </div>
321
- </div>
322
- </AtomixGlass>
323
- </div>
324
- </BackgroundWrapper>
325
- </StoryErrorBoundary>
326
- ),
327
- parameters: {
328
- docs: {
329
- description: {
330
- story:
331
- 'Performance-optimized preset with zero blur, low displacement (50), and reduced saturation (120%) for mobile devices.',
332
- },
333
- },
334
- },
335
- };