@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.
- package/atomix.config.ts +12 -0
- package/build-tools/webpack-loader.js +5 -4
- package/dist/atomix.css +230 -83
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +1 -1
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/webpack-loader.js +5 -4
- package/dist/charts.d.ts +24 -23
- package/dist/charts.js +271 -369
- package/dist/charts.js.map +1 -1
- package/dist/config.d.ts +624 -0
- package/dist/config.js +59 -0
- package/dist/config.js.map +1 -0
- package/dist/core.d.ts +3 -2
- package/dist/core.js +342 -382
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +4 -6
- package/dist/forms.js +233 -334
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +11 -2
- package/dist/heavy.js +406 -445
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +109 -65
- package/dist/index.esm.js +654 -748
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +621 -717
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/layout.js +59 -60
- package/dist/layout.js.map +1 -1
- package/dist/theme.js +4 -4
- package/dist/theme.js.map +1 -1
- package/package.json +24 -9
- package/scripts/atomix-cli.js +15 -1
- package/scripts/cli/__tests__/complexity-utils.test.js +24 -0
- package/scripts/cli/__tests__/detector.test.js +50 -0
- package/scripts/cli/__tests__/template-engine.test.js +23 -0
- package/scripts/cli/__tests__/test-setup.js +1 -133
- package/scripts/cli/commands/doctor.js +15 -3
- package/scripts/cli/commands/generate.js +113 -51
- package/scripts/cli/internal/ai-engine.js +30 -10
- package/scripts/cli/internal/complexity-utils.js +60 -0
- package/scripts/cli/internal/component-validator.js +49 -16
- package/scripts/cli/internal/generator.js +89 -36
- package/scripts/cli/internal/hook-generator.js +5 -2
- package/scripts/cli/internal/itcss-generator.js +16 -12
- package/scripts/cli/templates/next-templates.js +81 -30
- package/scripts/cli/templates/storybook-templates.js +12 -2
- package/scripts/cli/utils/detector.js +45 -7
- package/scripts/cli/utils/diagnostics.js +78 -0
- package/scripts/cli/utils/telemetry.js +13 -0
- package/src/components/Accordion/Accordion.stories.tsx +4 -0
- package/src/components/AtomixGlass/AtomixGlass.tsx +188 -128
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +63 -91
- package/src/components/AtomixGlass/PerformanceDashboard.tsx +153 -201
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +9 -6
- package/src/components/AtomixGlass/glass-utils.ts +51 -1
- package/src/components/AtomixGlass/stories/AnimationFeatures.stories.tsx +52 -46
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +573 -236
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +88 -41
- package/src/components/AtomixGlass/stories/argTypes.ts +19 -19
- package/src/components/AtomixGlass/stories/shared-components.tsx +7 -12
- package/src/components/AtomixGlass/stories/types.ts +3 -3
- package/src/components/Button/Button.tsx +114 -57
- package/src/components/Callout/Callout.tsx +4 -4
- package/src/components/Chart/ChartRenderer.tsx +1 -1
- package/src/components/Chart/DonutChart.tsx +11 -8
- package/src/components/EdgePanel/EdgePanel.tsx +119 -115
- package/src/components/Form/Select.tsx +4 -4
- package/src/components/List/List.tsx +4 -4
- package/src/components/Navigation/SideMenu/SideMenu.tsx +6 -6
- package/src/components/PhotoViewer/PhotoViewerImage.tsx +1 -1
- package/src/components/ProductReview/ProductReview.tsx +4 -2
- package/src/components/Rating/Rating.tsx +4 -2
- package/src/components/SectionIntro/SectionIntro.tsx +4 -2
- package/src/components/Steps/Steps.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +5 -5
- package/src/components/Testimonial/Testimonial.tsx +4 -2
- package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
- package/src/layouts/CssGrid/CssGrid.stories.tsx +464 -0
- package/src/layouts/CssGrid/CssGrid.tsx +215 -0
- package/src/layouts/CssGrid/index.ts +8 -0
- package/src/layouts/CssGrid/scripts/CssGrid.js +284 -0
- package/src/layouts/CssGrid/scripts/index.js +43 -0
- package/src/layouts/Grid/scripts/Container.js +139 -0
- package/src/layouts/Grid/scripts/Grid.js +184 -0
- package/src/layouts/Grid/scripts/GridCol.js +273 -0
- package/src/layouts/Grid/scripts/Row.js +154 -0
- package/src/layouts/Grid/scripts/index.js +48 -0
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +71 -59
- package/src/lib/composables/atomix-glass/useGlassSize.ts +1 -1
- package/src/lib/composables/useAccordion.ts +5 -5
- package/src/lib/composables/useAtomixGlass.ts +111 -74
- package/src/lib/composables/useAtomixGlassStyles.ts +0 -2
- package/src/lib/composables/useBarChart.ts +2 -2
- package/src/lib/composables/useChart.ts +3 -2
- package/src/lib/composables/useChartToolbar.ts +48 -66
- package/src/lib/composables/useDataTable.ts +1 -1
- package/src/lib/composables/useDatePicker.ts +2 -2
- package/src/lib/composables/useEdgePanel.ts +45 -54
- package/src/lib/composables/useHeroBackgroundSlider.ts +5 -5
- package/src/lib/composables/usePhotoViewer.ts +2 -3
- package/src/lib/composables/usePieChart.ts +1 -1
- package/src/lib/composables/usePopover.ts +151 -139
- package/src/lib/composables/useSideMenu.ts +28 -41
- package/src/lib/composables/useSlider.ts +2 -6
- package/src/lib/composables/useTooltip.ts +2 -2
- package/src/lib/config/index.ts +39 -0
- package/src/lib/constants/components.ts +1 -0
- package/src/lib/theme/devtools/Comparator.tsx +1 -1
- package/src/lib/theme/devtools/Inspector.tsx +1 -1
- package/src/lib/theme/devtools/LiveEditor.tsx +1 -1
- package/src/lib/theme/runtime/ThemeProvider.tsx +1 -1
- package/src/lib/types/components.ts +1 -0
- package/src/styles/01-settings/_index.scss +1 -0
- package/src/styles/01-settings/_settings.atomix-glass.scss +174 -0
- package/src/styles/01-settings/_settings.masonry-grid.scss +42 -6
- package/src/styles/02-tools/_tools.glass.scss +6 -0
- package/src/styles/05-objects/_objects.masonry-grid.scss +162 -24
- package/src/styles/06-components/_components.atomix-glass.scss +160 -99
- package/scripts/cli/__tests__/README.md +0 -81
- package/scripts/cli/__tests__/basic.test.js +0 -116
- package/scripts/cli/__tests__/clean.test.js +0 -278
- package/scripts/cli/__tests__/component-generator.test.js +0 -332
- package/scripts/cli/__tests__/component-validator.test.js +0 -433
- package/scripts/cli/__tests__/generator.test.js +0 -613
- package/scripts/cli/__tests__/glass-motion.test.js +0 -256
- package/scripts/cli/__tests__/integration.test.js +0 -938
- package/scripts/cli/__tests__/migrate.test.js +0 -74
- package/scripts/cli/__tests__/security.test.js +0 -206
- package/scripts/cli/__tests__/theme-bridge.test.js +0 -507
- package/scripts/cli/__tests__/token-manager.test.js +0 -251
- package/scripts/cli/__tests__/token-provider.test.js +0 -361
- package/scripts/cli/__tests__/utils.test.js +0 -165
- package/src/components/AtomixGlass/stories/AnimationTests.stories.tsx +0 -95
- package/src/components/AtomixGlass/stories/CardExamples.stories.tsx +0 -212
- package/src/components/AtomixGlass/stories/Customization.stories.tsx +0 -131
- package/src/components/AtomixGlass/stories/DashboardExamples.stories.tsx +0 -348
- package/src/components/AtomixGlass/stories/EcommerceExamples.stories.tsx +0 -410
- package/src/components/AtomixGlass/stories/FormExamples.stories.tsx +0 -436
- package/src/components/AtomixGlass/stories/HeroExamples.stories.tsx +0 -264
- package/src/components/AtomixGlass/stories/InteractivePlayground.stories.tsx +0 -247
- package/src/components/AtomixGlass/stories/MobileUIExamples.stories.tsx +0 -418
- package/src/components/AtomixGlass/stories/ModalExamples.stories.tsx +0 -402
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +0 -1082
- package/src/components/AtomixGlass/stories/Overview.stories.tsx +0 -497
- package/src/components/AtomixGlass/stories/Performance.stories.tsx +0 -103
- package/src/components/AtomixGlass/stories/PresetGallery.stories.tsx +0 -335
- package/src/components/AtomixGlass/stories/Shaders.stories.tsx +0 -395
- package/src/components/AtomixGlass/stories/WidgetExamples.stories.tsx +0 -441
- package/src/components/TypedButton/TypedButton.stories.tsx +0 -59
- package/src/components/TypedButton/TypedButton.tsx +0 -39
- package/src/components/TypedButton/index.ts +0 -2
- package/src/lib/composables/useBreadcrumb.ts +0 -81
- package/src/lib/composables/useChartInteractions.ts +0 -123
- package/src/lib/composables/useChartPerformance.ts +0 -347
- package/src/lib/composables/useDropdown.ts +0 -338
- package/src/lib/composables/useModal.ts +0 -110
- package/src/lib/composables/useTypedButton.ts +0 -66
- package/src/lib/hooks/usePerformanceMonitor.ts +0 -148
- package/src/lib/utils/displacement-generator.ts +0 -92
- package/src/lib/utils/memoryMonitor.ts +0 -191
- package/src/styles/01-settings/_settings.testtypecheck.scss +0 -53
- package/src/styles/01-settings/_settings.typedbutton.scss +0 -53
- package/src/styles/06-components/_components.testbutton.scss +0 -212
- package/src/styles/06-components/_components.testtypecheck.scss +0 -212
- package/src/styles/06-components/_components.typedbutton.scss +0 -212
|
@@ -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
|
-
};
|