@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,402 +0,0 @@
1
- /**
2
- * ModalExamples.stories.tsx
3
- *
4
- * Modal, dialog, and overlay examples for AtomixGlass.
5
- * Perfect for notifications, confirmations, and interactive dialogs.
6
- *
7
- * @package Atomix
8
- * @component AtomixGlass
9
- */
10
- import React from 'react';
11
- import { useState } from 'react';
12
- import { Meta, StoryObj } from '@storybook/react';
13
- import AtomixGlass from '../AtomixGlass';
14
- import { BackgroundWrapper, backgroundImages, StoryErrorBoundary } from './shared-components';
15
- import { baseArgTypes } from './argTypes';
16
-
17
- import { Button } from '../../Button';
18
- import { Badge } from '../../Badge';
19
- import { Icon } from '../../Icon/Icon';
20
-
21
- const meta: Meta<typeof AtomixGlass> = {
22
- title: 'Components/AtomixGlass/Examples/Modal Examples',
23
- component: AtomixGlass,
24
- parameters: {
25
- layout: 'fullscreen',
26
- docs: {
27
- description: {
28
- component:
29
- 'Modal and dialog examples demonstrating AtomixGlass for overlays, notifications, and interactive dialogs.',
30
- },
31
- },
32
- },
33
- tags: ['!autodocs'],
34
- argTypes: {
35
- ...baseArgTypes,
36
- children: { control: false },
37
- },
38
- };
39
-
40
- export default meta;
41
- type Story = StoryObj<typeof AtomixGlass>;
42
-
43
- /**
44
- * Confirmation Dialog
45
- *
46
- * Modal dialog for confirming important actions like deletions.
47
- */
48
- export const ConfirmationDialog: Story = {
49
- render: () => {
50
- const [isOpen, setIsOpen] = useState(true);
51
-
52
- if (!isOpen) {
53
- return (
54
- <StoryErrorBoundary>
55
- <BackgroundWrapper backgroundImage={backgroundImages[0]} overlay overlayOpacity={0.5}>
56
- <div className="u-text-center u-text-white">
57
- <Button variant="primary" size="lg" onClick={() => setIsOpen(true)}>
58
- Open Confirmation Dialog
59
- </Button>
60
- </div>
61
- </BackgroundWrapper>
62
- </StoryErrorBoundary>
63
- );
64
- }
65
-
66
- return (
67
- <StoryErrorBoundary>
68
- <BackgroundWrapper backgroundImage={backgroundImages[0]} overlay overlayOpacity={0.5}>
69
- <div
70
- style={{
71
- display: 'flex',
72
- alignItems: 'center',
73
- justifyContent: 'center',
74
- minHeight: '100vh',
75
- padding: '20px',
76
- }}
77
- >
78
- <AtomixGlass
79
- displacementScale={70}
80
- blurAmount={1}
81
- saturation={140}
82
- borderRadius={24}
83
- mode="standard"
84
- style={{ maxWidth: '440px', width: '100%' }}
85
- padding="40px"
86
- >
87
- <div className="u-text-center u-text-white">
88
- <div
89
- style={{
90
- width: '80px',
91
- height: '80px',
92
- borderRadius: '50%',
93
- background: 'rgba(239, 68, 68, 0.2)',
94
- display: 'flex',
95
- alignItems: 'center',
96
- justifyContent: 'center',
97
- fontSize: '40px',
98
- margin: '0 auto 24px',
99
- }}
100
- aria-hidden="true"
101
- >
102
- ⚠️
103
- </div>
104
-
105
- <h2 className="u-mt-0 u-text-2xl u-font-bold u-mb-2">
106
- Delete Account?
107
- </h2>
108
- <p className="u-text-sm u-opacity-90 u-mb-5" style={{ lineHeight: 1.6 }}>
109
- Are you sure you want to delete your account? This action cannot be undone
110
- and all your data will be permanently removed.
111
- </p>
112
-
113
- <div className="u-flex u-gap-3 u-justify-center" style={{ gap: '12px' }}>
114
- <Button
115
- variant="outline-light"
116
- glass={{ elasticity: 0 }}
117
- onClick={() => setIsOpen(false)}
118
- >
119
- Cancel
120
- </Button>
121
- <Button
122
- variant="danger"
123
- glass={{ elasticity: 0 }}
124
- onClick={() => {
125
- setIsOpen(false);
126
- alert('Account deleted');
127
- }}
128
- >
129
- Delete Account
130
- </Button>
131
- </div>
132
- </div>
133
- </AtomixGlass>
134
- </div>
135
- </BackgroundWrapper>
136
- </StoryErrorBoundary>
137
- );
138
- },
139
- parameters: {
140
- docs: {
141
- description: {
142
- story:
143
- 'Confirmation dialog modal for critical actions with cancel and confirm buttons.',
144
- },
145
- },
146
- },
147
- };
148
-
149
- /**
150
- * Success Notification
151
- *
152
- * Toast-style notification for success messages.
153
- */
154
- export const SuccessNotification: Story = {
155
- render: () => {
156
- const [isVisible, setIsVisible] = useState(true);
157
-
158
- if (!isVisible) {
159
- return (
160
- <StoryErrorBoundary>
161
- <BackgroundWrapper backgroundImage={backgroundImages[2]}>
162
- <div className="u-text-center">
163
- <Button variant="primary" size="lg" onClick={() => setIsVisible(true)}>
164
- Show Success Notification
165
- </Button>
166
- </div>
167
- </BackgroundWrapper>
168
- </StoryErrorBoundary>
169
- );
170
- }
171
-
172
- return (
173
- <StoryErrorBoundary>
174
- <BackgroundWrapper backgroundImage={backgroundImages[2]}>
175
- <div
176
- style={{
177
- position: 'fixed',
178
- top: '24px',
179
- right: '24px',
180
- zIndex: 1000,
181
- }}
182
- >
183
- <AtomixGlass
184
- displacementScale={50}
185
- blurAmount={0.5}
186
- saturation={130}
187
- borderRadius={16}
188
- mode="standard"
189
- style={{ minWidth: '320px' }}
190
- padding="20px"
191
- >
192
- <div className="u-flex u-items-center u-gap-3 u-text-white">
193
- <div
194
- style={{
195
- width: '40px',
196
- height: '40px',
197
- borderRadius: '50%',
198
- background: 'rgba(34, 197, 94, 0.2)',
199
- display: 'flex',
200
- alignItems: 'center',
201
- justifyContent: 'center',
202
- fontSize: '20px',
203
- flexShrink: 0,
204
- }}
205
- aria-hidden="true"
206
- >
207
-
208
- </div>
209
-
210
- <div className="u-flex-1">
211
- <p className="u-m-0 u-font-semibold u-text-sm">Payment Successful!</p>
212
- <p className="u-m-0 u-text-xs u-opacity-80">
213
- Your transaction has been completed.
214
- </p>
215
- </div>
216
-
217
- <button
218
- onClick={() => setIsVisible(false)}
219
- style={{
220
- background: 'transparent',
221
- border: 'none',
222
- color: 'rgba(255,255,255,0.6)',
223
- cursor: 'pointer',
224
- padding: '4px',
225
- fontSize: '20px',
226
- lineHeight: 1,
227
- }}
228
- aria-label="Close notification"
229
- >
230
- ×
231
- </button>
232
- </div>
233
- </AtomixGlass>
234
- </div>
235
- </BackgroundWrapper>
236
- </StoryErrorBoundary>
237
- );
238
- },
239
- parameters: {
240
- docs: {
241
- description: {
242
- story:
243
- 'Success notification toast with auto-dismiss capability and close button.',
244
- },
245
- },
246
- },
247
- };
248
-
249
- /**
250
- * Settings Modal
251
- *
252
- * Modal dialog for displaying settings and preferences.
253
- */
254
- export const SettingsModal: Story = {
255
- render: () => {
256
- const [isOpen, setIsOpen] = useState(true);
257
- const [notifications, setNotifications] = useState(true);
258
- const [darkMode, setDarkMode] = useState(false);
259
- const [autoSave, setAutoSave] = useState(true);
260
-
261
- if (!isOpen) {
262
- return (
263
- <StoryErrorBoundary>
264
- <BackgroundWrapper backgroundImage={backgroundImages[4]}>
265
- <div className="u-text-center u-text-white">
266
- <Button variant="primary" size="lg" onClick={() => setIsOpen(true)}>
267
- Open Settings
268
- </Button>
269
- </div>
270
- </BackgroundWrapper>
271
- </StoryErrorBoundary>
272
- );
273
- }
274
-
275
- return (
276
- <StoryErrorBoundary>
277
- <BackgroundWrapper backgroundImage={backgroundImages[4]} overlay overlayOpacity={0.5}>
278
- <div
279
- style={{
280
- display: 'flex',
281
- alignItems: 'center',
282
- justifyContent: 'center',
283
- minHeight: '100vh',
284
- padding: '20px',
285
- }}
286
- >
287
- <AtomixGlass
288
- displacementScale={65}
289
- blurAmount={0.75}
290
- saturation={135}
291
- borderRadius={24}
292
- mode="standard"
293
- style={{ maxWidth: '500px', width: '100%' }}
294
- >
295
- <div className="u-text-white" style={{ padding: '32px' }}>
296
- <div className="u-flex u-items-center u-justify-between u-mb-4">
297
- <h2 className="u-m-0 u-text-2xl u-font-bold">Settings</h2>
298
- <button
299
- onClick={() => setIsOpen(false)}
300
- style={{
301
- background: 'transparent',
302
- border: 'none',
303
- color: 'rgba(255,255,255,0.6)',
304
- cursor: 'pointer',
305
- padding: '8px',
306
- fontSize: '24px',
307
- lineHeight: 1,
308
- }}
309
- aria-label="Close settings"
310
- >
311
- ×
312
- </button>
313
- </div>
314
-
315
- <div className="u-divide-y" style={{ borderColor: 'rgba(255,255,255,0.1)' }}>
316
- {/* Notifications Setting */}
317
- <div className="u-py-3 u-flex u-items-center u-justify-between">
318
- <div>
319
- <p className="u-m-0 u-font-medium u-text-base">Push Notifications</p>
320
- <p className="u-m-0 u-text-xs u-opacity-70 u-mt-1">
321
- Receive updates and alerts
322
- </p>
323
- </div>
324
- <label style={{ display: 'flex', alignItems: 'center', cursor: 'pointer' }}>
325
- <input
326
- type="checkbox"
327
- checked={notifications}
328
- onChange={(e) => setNotifications(e.target.checked)}
329
- style={{ accentColor: '#667eea', width: '20px', height: '20px' }}
330
- />
331
- </label>
332
- </div>
333
-
334
- {/* Dark Mode Setting */}
335
- <div className="u-py-3 u-flex u-items-center u-justify-between">
336
- <div>
337
- <p className="u-m-0 u-font-medium u-text-base">Dark Mode</p>
338
- <p className="u-m-0 u-text-xs u-opacity-70 u-mt-1">
339
- Use dark theme across the app
340
- </p>
341
- </div>
342
- <label style={{ display: 'flex', alignItems: 'center', cursor: 'pointer' }}>
343
- <input
344
- type="checkbox"
345
- checked={darkMode}
346
- onChange={(e) => setDarkMode(e.target.checked)}
347
- style={{ accentColor: '#667eea', width: '20px', height: '20px' }}
348
- />
349
- </label>
350
- </div>
351
-
352
- {/* Auto Save Setting */}
353
- <div className="u-py-3 u-flex u-items-center u-justify-between">
354
- <div>
355
- <p className="u-m-0 u-font-medium u-text-base">Auto-Save</p>
356
- <p className="u-m-0 u-text-xs u-opacity-70 u-mt-1">
357
- Automatically save your work
358
- </p>
359
- </div>
360
- <label style={{ display: 'flex', alignItems: 'center', cursor: 'pointer' }}>
361
- <input
362
- type="checkbox"
363
- checked={autoSave}
364
- onChange={(e) => setAutoSave(e.target.checked)}
365
- style={{ accentColor: '#667eea', width: '20px', height: '20px' }}
366
- />
367
- </label>
368
- </div>
369
- </div>
370
-
371
- <div className="u-flex u-gap-3 u-justify-end u-mt-5" style={{ gap: '12px' }}>
372
- <Button
373
- variant="outline-light"
374
- glass={{ elasticity: 0 }}
375
- onClick={() => setIsOpen(false)}
376
- >
377
- Cancel
378
- </Button>
379
- <Button
380
- variant="primary"
381
- glass={{ elasticity: 0 }}
382
- onClick={() => setIsOpen(false)}
383
- >
384
- Save Changes
385
- </Button>
386
- </div>
387
- </div>
388
- </AtomixGlass>
389
- </div>
390
- </BackgroundWrapper>
391
- </StoryErrorBoundary>
392
- );
393
- },
394
- parameters: {
395
- docs: {
396
- description: {
397
- story:
398
- 'Settings modal with toggle switches for user preferences and configuration options.',
399
- },
400
- },
401
- },
402
- };