@shohojdhara/atomix 0.4.9 → 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 (67) 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/shader-utils.ts +1 -1
  30. package/src/components/AtomixGlass/stories/{Phase1-Animation.stories.tsx → AnimationFeatures.stories.tsx} +53 -47
  31. package/src/components/AtomixGlass/stories/Examples.stories.tsx +573 -236
  32. package/src/components/AtomixGlass/stories/Playground.stories.tsx +656 -44
  33. package/src/components/AtomixGlass/stories/argTypes.ts +384 -0
  34. package/src/components/AtomixGlass/stories/shared-components.tsx +82 -3
  35. package/src/components/AtomixGlass/stories/types.ts +127 -0
  36. package/src/lib/composables/useAtomixGlass.ts +108 -71
  37. package/src/lib/composables/useAtomixGlassStyles.ts +0 -2
  38. package/src/lib/constants/components.ts +1 -0
  39. package/src/lib/types/components.ts +1 -0
  40. package/src/lib/utils/displacement-generator.ts +1 -1
  41. package/src/styles/06-components/_components.atomix-glass.scss +158 -97
  42. package/scripts/cli/__tests__/README.md +0 -81
  43. package/scripts/cli/__tests__/basic.test.js +0 -116
  44. package/scripts/cli/__tests__/clean.test.js +0 -278
  45. package/scripts/cli/__tests__/component-generator.test.js +0 -332
  46. package/scripts/cli/__tests__/component-validator.test.js +0 -433
  47. package/scripts/cli/__tests__/generator.test.js +0 -613
  48. package/scripts/cli/__tests__/glass-motion.test.js +0 -256
  49. package/scripts/cli/__tests__/integration.test.js +0 -938
  50. package/scripts/cli/__tests__/migrate.test.js +0 -74
  51. package/scripts/cli/__tests__/security.test.js +0 -206
  52. package/scripts/cli/__tests__/test-setup.js +0 -135
  53. package/scripts/cli/__tests__/theme-bridge.test.js +0 -507
  54. package/scripts/cli/__tests__/token-manager.test.js +0 -251
  55. package/scripts/cli/__tests__/token-provider.test.js +0 -361
  56. package/scripts/cli/__tests__/utils.test.js +0 -165
  57. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +0 -216
  58. package/src/components/AtomixGlass/stories/Customization.stories.tsx +0 -131
  59. package/src/components/AtomixGlass/stories/Modes.stories.tsx +0 -1082
  60. package/src/components/AtomixGlass/stories/Overview.stories.tsx +0 -497
  61. package/src/components/AtomixGlass/stories/Performance.stories.tsx +0 -103
  62. package/src/components/AtomixGlass/stories/Phase1-Test.stories.tsx +0 -95
  63. package/src/components/AtomixGlass/stories/Shaders.stories.tsx +0 -395
  64. package/src/components/TypedButton/TypedButton.stories.tsx +0 -59
  65. package/src/components/TypedButton/TypedButton.tsx +0 -39
  66. package/src/components/TypedButton/index.ts +0 -2
  67. package/src/lib/composables/useTypedButton.ts +0 -66
@@ -1,395 +0,0 @@
1
- /**
2
- * ShaderVariants.stories.tsx
3
- *
4
- * Professional showcase of Apple-style shader variants with modern design.
5
- * Features premium liquid glass effects with advanced visual rendering.
6
- *
7
- * @package Atomix
8
- * @component AtomixGlass
9
- */
10
-
11
- import React, { useState } from 'react';
12
- import { Meta, StoryObj } from '@storybook/react';
13
- import AtomixGlass from '../AtomixGlass';
14
- import { BackgroundWrapper } from './shared-components';
15
-
16
- const meta: Meta<typeof AtomixGlass> = {
17
- title: 'Components/AtomixGlass/Features/Shaders',
18
- component: AtomixGlass,
19
- parameters: {
20
- layout: 'fullscreen',
21
- docs: {
22
- description: {
23
- component:
24
- 'Experience premium Apple-style shader variants with advanced GPU-accelerated effects. Each variant features unique characteristics including time-based animations, organic flow patterns, and sophisticated visual rendering.',
25
- },
26
- },
27
- },
28
- tags: ['autodocs'],
29
- };
30
-
31
- export default meta;
32
- type Story = StoryObj<typeof AtomixGlass>;
33
-
34
- /**
35
- * Liquid Glass Variant
36
- *
37
- * Enhanced liquid glass with time-based animations and multi-layered organic distortion.
38
- * Perfect for hero sections and premium content areas.
39
- */
40
- export const LiquidGlass: Story = {
41
- args: {
42
- children: (
43
- <div style={{ padding: '44px 40px', textAlign: 'center', maxWidth: '480px' }}>
44
- <div
45
- style={{
46
- width: '80px',
47
- height: '80px',
48
- margin: '0 auto 28px',
49
- borderRadius: '22px',
50
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
51
- display: 'flex',
52
- alignItems: 'center',
53
- justifyContent: 'center',
54
- fontSize: '44px',
55
- boxShadow: '0 20px 48px rgba(102, 126, 234, 0.6)',
56
- position: 'relative',
57
- }}
58
- >
59
- <div
60
- style={{
61
- position: 'absolute',
62
- inset: '-6px',
63
- borderRadius: '28px',
64
- background: 'linear-gradient(135deg, #667eea, #764ba2)',
65
- opacity: 0.4,
66
- filter: 'blur(20px)',
67
- }}
68
- />
69
- <span style={{ position: 'relative', zIndex: 1 }}>💧</span>
70
- </div>
71
- <h2
72
- style={{
73
- margin: '0 0 16px 0',
74
- fontSize: '38px',
75
- fontWeight: 700,
76
- background: 'url(https://images.unsplash.com/photo-1579546929518-9e396f3cc809)',
77
- WebkitBackgroundClip: 'text',
78
- WebkitTextFillColor: 'transparent',
79
- backgroundClip: 'text',
80
- letterSpacing: '-0.5px',
81
- }}
82
- >
83
- Liquid Glass
84
- </h2>
85
- <p
86
- style={{
87
- margin: '0 0 32px 0',
88
- fontSize: '18px',
89
- lineHeight: 1.8,
90
- color: 'rgba(255, 255, 255, 0.9)',
91
- }}
92
- >
93
- Experience fluid, time-based animations with multi-layered organic distortion and
94
- chromatic aberration effects that create living, breathing glass.
95
- </p>
96
- <div
97
- style={{
98
- display: 'flex',
99
- flexWrap: 'wrap',
100
- gap: '12px',
101
- justifyContent: 'center',
102
- }}
103
- >
104
- {['Time Animation', 'Multi-Layer', 'Chromatic FX', 'Organic Flow'].map(tag => (
105
- <div
106
- key={tag}
107
- style={{
108
- padding: '8px 16px',
109
- borderRadius: '10px',
110
- background: 'rgba(102, 126, 234, 0.2)',
111
- border: '1px solid rgba(102, 126, 234, 0.3)',
112
- fontSize: '13px',
113
- fontWeight: 600,
114
- color: '#fff',
115
- }}
116
- >
117
- {tag}
118
- </div>
119
- ))}
120
- </div>
121
- </div>
122
- ),
123
- displacementScale: 25,
124
- blurAmount: 1.5,
125
- saturation: 150,
126
- aberrationIntensity: 2,
127
- elasticity: 0.2,
128
- borderRadius: 32,
129
- mode: 'shader',
130
- shaderVariant: 'liquidGlass',
131
- },
132
- decorators: [
133
- Story => (
134
- <BackgroundWrapper
135
- backgroundImage="https://images.unsplash.com/photo-1557683316-973673baf926?q=80&w=3029&auto=format&fit=crop"
136
- height="100vh"
137
- width="100vw"
138
- overlayOpacity={0.3}
139
- borderRadius="0"
140
- >
141
- <Story />
142
- </BackgroundWrapper>
143
- ),
144
- ],
145
- parameters: {
146
- docs: {
147
- description: {
148
- story:
149
- 'Liquid Glass features time-based animations with multi-layered distortion. Ideal for premium hero sections and feature highlights.',
150
- },
151
- },
152
- },
153
- };
154
-
155
- /**
156
- * Apple Fluid Variant
157
- *
158
- * Premium fluid glass inspired by Apple's design language.
159
- * Features vortex effects and 5-octave noise for organic, flowing visuals.
160
- */
161
- export const AppleFluid: Story = {
162
- args: {
163
- children: (
164
- <div style={{ padding: '44px 40px', textAlign: 'center', maxWidth: '480px' }}>
165
- <div
166
- style={{
167
- width: '80px',
168
- height: '80px',
169
- margin: '0 auto 28px',
170
- borderRadius: '22px',
171
- background: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
172
- display: 'flex',
173
- alignItems: 'center',
174
- justifyContent: 'center',
175
- fontSize: '44px',
176
- boxShadow: '0 20px 48px rgba(245, 87, 108, 0.6)',
177
- position: 'relative',
178
- }}
179
- >
180
- <div
181
- style={{
182
- position: 'absolute',
183
- inset: '-6px',
184
- borderRadius: '28px',
185
- background: 'linear-gradient(135deg, #f093fb, #f5576c)',
186
- opacity: 0.4,
187
- filter: 'blur(20px)',
188
- }}
189
- />
190
- <span style={{ position: 'relative', zIndex: 1 }}>🌊</span>
191
- </div>
192
- <h2
193
- style={{
194
- margin: '0 0 16px 0',
195
- fontSize: '38px',
196
- fontWeight: 700,
197
- background: 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%)',
198
- WebkitBackgroundClip: 'text',
199
- WebkitTextFillColor: 'transparent',
200
- backgroundClip: 'text',
201
- letterSpacing: '-0.5px',
202
- }}
203
- >
204
- Apple Fluid
205
- </h2>
206
- <p
207
- style={{
208
- margin: '0 0 32px 0',
209
- fontSize: '18px',
210
- lineHeight: 1.8,
211
- color: 'rgba(255, 255, 255, 0.9)',
212
- }}
213
- >
214
- Apple-inspired fluid dynamics with vortex effects and high-quality 5-octave noise. Mouse
215
- interactions create mesmerizing, organic flow patterns.
216
- </p>
217
- <div
218
- style={{
219
- display: 'flex',
220
- flexWrap: 'wrap',
221
- gap: '12px',
222
- justifyContent: 'center',
223
- }}
224
- >
225
- {['Vortex FX', '5-Octave', 'Apple Style', 'Interactive'].map(tag => (
226
- <div
227
- key={tag}
228
- style={{
229
- padding: '8px 16px',
230
- borderRadius: '10px',
231
- background: 'rgba(245, 87, 108, 0.2)',
232
- border: '1px solid rgba(245, 87, 108, 0.3)',
233
- fontSize: '13px',
234
- fontWeight: 600,
235
- color: '#fff',
236
- }}
237
- >
238
- {tag}
239
- </div>
240
- ))}
241
- </div>
242
- </div>
243
- ),
244
- displacementScale: 25,
245
- blurAmount: 1.5,
246
- saturation: 150,
247
- aberrationIntensity: 2,
248
- elasticity: 0.2,
249
- borderRadius: 32,
250
- mode: 'shader',
251
- shaderVariant: 'appleFluid',
252
- },
253
- decorators: [
254
- Story => (
255
- <BackgroundWrapper
256
- backgroundImage="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2940&auto=format&fit=crop"
257
- height="100vh"
258
- width="100vw"
259
- overlayOpacity={0.3}
260
- borderRadius="0"
261
- >
262
- <Story />
263
- </BackgroundWrapper>
264
- ),
265
- ],
266
- parameters: {
267
- docs: {
268
- description: {
269
- story:
270
- 'Apple Fluid delivers premium vortex effects with 5-octave noise. Mouse interactions create dynamic, flowing patterns inspired by Apple design.',
271
- },
272
- },
273
- },
274
- };
275
-
276
- /**
277
- * Premium Glass Variant
278
- *
279
- * High-end glass rendering with advanced refraction and multi-layer depth.
280
- * Offers the best performance-to-quality ratio among shader variants.
281
- */
282
- export const PremiumGlass: Story = {
283
- args: {
284
- children: (
285
- <div style={{ padding: '44px 40px', textAlign: 'center', maxWidth: '480px' }}>
286
- <div
287
- style={{
288
- width: '80px',
289
- height: '80px',
290
- margin: '0 auto 28px',
291
- borderRadius: '22px',
292
- background: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
293
- display: 'flex',
294
- alignItems: 'center',
295
- justifyContent: 'center',
296
- fontSize: '44px',
297
- boxShadow: '0 20px 48px rgba(79, 172, 254, 0.6)',
298
- position: 'relative',
299
- }}
300
- >
301
- <div
302
- style={{
303
- position: 'absolute',
304
- inset: '-6px',
305
- borderRadius: '28px',
306
- background: 'linear-gradient(135deg, #4facfe, #00f2fe)',
307
- opacity: 0.4,
308
- filter: 'blur(20px)',
309
- }}
310
- />
311
- <span style={{ position: 'relative', zIndex: 1 }}>💎</span>
312
- </div>
313
- <h2
314
- style={{
315
- margin: '0 0 16px 0',
316
- fontSize: '38px',
317
- fontWeight: 700,
318
- background: 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%)',
319
- WebkitBackgroundClip: 'text',
320
- WebkitTextFillColor: 'transparent',
321
- backgroundClip: 'text',
322
- letterSpacing: '-0.5px',
323
- }}
324
- >
325
- Premium Glass
326
- </h2>
327
- <p
328
- style={{
329
- margin: '0 0 32px 0',
330
- fontSize: '18px',
331
- lineHeight: 1.8,
332
- color: 'rgba(255, 255, 255, 0.9)',
333
- }}
334
- >
335
- Advanced refraction with multi-layer depth effects and edge-aware rendering. The optimal
336
- balance of quality and performance for production applications.
337
- </p>
338
- <div
339
- style={{
340
- display: 'flex',
341
- flexWrap: 'wrap',
342
- gap: '12px',
343
- justifyContent: 'center',
344
- }}
345
- >
346
- {['Advanced Refraction', 'Multi-Depth', 'Edge-Aware', 'Optimized'].map(tag => (
347
- <div
348
- key={tag}
349
- style={{
350
- padding: '8px 16px',
351
- borderRadius: '10px',
352
- background: 'rgba(79, 172, 254, 0.2)',
353
- border: '1px solid rgba(79, 172, 254, 0.3)',
354
- fontSize: '13px',
355
- fontWeight: 600,
356
- color: '#fff',
357
- }}
358
- >
359
- {tag}
360
- </div>
361
- ))}
362
- </div>
363
- </div>
364
- ),
365
- displacementScale: 25,
366
- blurAmount: 1.5,
367
- saturation: 150,
368
- aberrationIntensity: 2,
369
- elasticity: 0.2,
370
- borderRadius: 32,
371
- mode: 'shader',
372
- shaderVariant: 'premiumGlass',
373
- },
374
- decorators: [
375
- Story => (
376
- <BackgroundWrapper
377
- backgroundImage="https://images.unsplash.com/photo-1579546929518-9e396f3cc809?q=80&w=2940&auto=format&fit=crop"
378
- height="100vh"
379
- width="100vw"
380
- overlayOpacity={0.3}
381
- borderRadius="0"
382
- >
383
- <Story />
384
- </BackgroundWrapper>
385
- ),
386
- ],
387
- parameters: {
388
- docs: {
389
- description: {
390
- story:
391
- 'Premium Glass offers advanced refraction with optimal performance. Best choice for production applications requiring high-quality shader effects.',
392
- },
393
- },
394
- },
395
- };
@@ -1,59 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { TypedButton } from './TypedButton';
3
-
4
- const meta: Meta<typeof TypedButton> = {
5
- title: 'Components/TypedButton',
6
- component: TypedButton,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- argTypes: {
12
- size: {
13
- control: 'select',
14
- options: ['sm', 'md', 'lg'],
15
- },
16
- variant: {
17
- control: 'select',
18
- options: ['primary', 'secondary', 'success', 'error'],
19
- },
20
- disabled: {
21
- control: 'boolean',
22
- },
23
- glass: {
24
- control: 'boolean',
25
- },
26
- },
27
- };
28
-
29
- export default meta;
30
- type Story = StoryObj<typeof meta>;
31
-
32
- export const Default: Story = {
33
- args: {
34
- children: 'TypedButton Component',
35
- size: 'md',
36
- variant: 'primary',
37
- },
38
- };
39
-
40
- export const Small: Story = {
41
- args: {
42
- ...Default.args,
43
- size: 'sm',
44
- },
45
- };
46
-
47
- export const Large: Story = {
48
- args: {
49
- ...Default.args,
50
- size: 'lg',
51
- },
52
- };
53
-
54
- export const Glass: Story = {
55
- args: {
56
- ...Default.args,
57
- glass: true,
58
- },
59
- };
@@ -1,39 +0,0 @@
1
- import React, { forwardRef, useId, memo } from 'react';
2
- import { TYPEDBUTTON } from '../../lib/constants/components';
3
- import { useTypedButton } from '../../lib/composables/useTypedButton';
4
- import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
5
- import type { TypedButtonProps } from '../../lib/types/components';
6
-
7
- /**
8
- * TypedButton - Medium Presentational Component
9
- *
10
- * @param {TypedButtonProps} props - Component properties
11
- * @returns {JSX.Element} The rendered component
12
- */
13
- export const TypedButton = memo(
14
- forwardRef<HTMLDivElement, TypedButtonProps>(
15
- ({ children, className = '', disabled = false, glass, style, 'aria-label': ariaLabel, ...props }, ref) => {
16
- const instanceId = useId();
17
- const { generateClassNames } = useTypedButton({ disabled });
18
-
19
- const content = (
20
- <div
21
- ref={ref}
22
- className={generateClassNames(className)}
23
- style={style}
24
- aria-label={ariaLabel}
25
- aria-disabled={disabled}
26
- {...props}
27
- >
28
- {children}
29
- </div>
30
- );
31
-
32
- return glass ? <AtomixGlass {...(glass === true ? {} : glass)}>{content}</AtomixGlass> : content;
33
- }
34
- )
35
- );
36
-
37
- TypedButton.displayName = 'TypedButton';
38
-
39
- export default TypedButton;
@@ -1,2 +0,0 @@
1
- export { default as TypedButton } from './TypedButton';
2
- export type { TypedButtonProps } from './TypedButton';
@@ -1,66 +0,0 @@
1
- import { TypedButtonProps } from '../types/components';
2
- import { TYPEDBUTTON } from '../constants/components';
3
-
4
- /**
5
- * TypedButton state and functionality
6
- * @param initialProps - Initial typedbutton properties
7
- * @returns TypedButton state and methods
8
- */
9
- export function useTypedButton(initialProps?: Partial<TypedButtonProps>) {
10
- // Default typedbutton properties
11
- const defaultProps: Partial<TypedButtonProps> = {
12
- variant: 'primary',
13
- size: 'md',
14
- disabled: false,
15
- ...initialProps,
16
- };
17
-
18
- /**
19
- * Generate typedbutton class based on properties
20
- * @param props - TypedButton properties
21
- * @returns Class string
22
- */
23
- const generateClassNames = (props: Partial<TypedButtonProps> = {}): string => {
24
- const {
25
- variant = defaultProps.variant,
26
- size = defaultProps.size,
27
- disabled = defaultProps.disabled,
28
- glass = defaultProps.glass,
29
- className = '',
30
- } = props;
31
-
32
- const sizeClass = size === 'md' ? '' : `c-typedbutton--${size}`;
33
- const disabledClass = disabled ? 'c-typedbutton--disabled' : '';
34
- const glassClass = glass ? 'c-typedbutton--glass' : '';
35
-
36
- return [
37
- TYPEDBUTTON.BASE_CLASS,
38
- `c-typedbutton--${variant}`,
39
- sizeClass,
40
- disabledClass,
41
- glassClass,
42
- className,
43
- ]
44
- .filter(Boolean)
45
- .join(' ');
46
- };
47
-
48
- /**
49
- * Handle typedbutton click with disabled check
50
- * @param handler - Click handler function
51
- * @returns Function that respects disabled state
52
- */
53
- const handleClick = (handler?: (event: React.MouseEvent<HTMLDivElement>) => void) => {
54
- return (event: React.MouseEvent<HTMLDivElement>) => {
55
- if (!defaultProps.disabled && handler) {
56
- handler(event);
57
- }
58
- };
59
- };
60
-
61
- return {
62
- defaultProps,
63
- generateClassNames,
64
- handleClick,
65
- };
66
- }