@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,436 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FormExamples.stories.tsx
|
|
3
|
-
*
|
|
4
|
-
* Form-based examples for AtomixGlass including login, registration,
|
|
5
|
-
* payment, and subscription forms.
|
|
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 { Input } from '../../Form/Input';
|
|
19
|
-
import { Badge } from '../../Badge';
|
|
20
|
-
|
|
21
|
-
const meta: Meta<typeof AtomixGlass> = {
|
|
22
|
-
title: 'Components/AtomixGlass/Examples/Form Examples',
|
|
23
|
-
component: AtomixGlass,
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'centered',
|
|
26
|
-
docs: {
|
|
27
|
-
description: {
|
|
28
|
-
component:
|
|
29
|
-
'Form-based examples demonstrating AtomixGlass for authentication, payment, and data input interfaces.',
|
|
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
|
-
* Login Form
|
|
45
|
-
*
|
|
46
|
-
* Modern authentication form with email/password inputs, social login options, and loading states.
|
|
47
|
-
*/
|
|
48
|
-
export const LoginForm: Story = {
|
|
49
|
-
render: () => {
|
|
50
|
-
const [email, setEmail] = useState('');
|
|
51
|
-
const [password, setPassword] = useState('');
|
|
52
|
-
const [rememberMe, setRememberMe] = useState(false);
|
|
53
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
54
|
-
|
|
55
|
-
const handleSubmit = (e: React.FormEvent) => {
|
|
56
|
-
e.preventDefault();
|
|
57
|
-
setIsLoading(true);
|
|
58
|
-
setTimeout(() => setIsLoading(false), 2000);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<StoryErrorBoundary>
|
|
63
|
-
<BackgroundWrapper
|
|
64
|
-
backgroundImage={backgroundImages[3]}
|
|
65
|
-
overlay
|
|
66
|
-
overlayOpacity={0.3}
|
|
67
|
-
>
|
|
68
|
-
<div style={{ maxWidth: '380px' }} className="u-mx-auto">
|
|
69
|
-
<AtomixGlass
|
|
70
|
-
displacementScale={50}
|
|
71
|
-
blurAmount={1}
|
|
72
|
-
saturation={130}
|
|
73
|
-
aberrationIntensity={2}
|
|
74
|
-
borderRadius={24}
|
|
75
|
-
mode="standard"
|
|
76
|
-
padding="32px"
|
|
77
|
-
>
|
|
78
|
-
<div className="u-text-white">
|
|
79
|
-
{/* Logo/Header */}
|
|
80
|
-
<div className="u-text-center u-mb-5">
|
|
81
|
-
<div
|
|
82
|
-
style={{
|
|
83
|
-
width: '72px',
|
|
84
|
-
height: '72px',
|
|
85
|
-
borderRadius: '20px',
|
|
86
|
-
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
87
|
-
display: 'flex',
|
|
88
|
-
alignItems: 'center',
|
|
89
|
-
justifyContent: 'center',
|
|
90
|
-
fontSize: '32px',
|
|
91
|
-
margin: '0 auto 24px',
|
|
92
|
-
boxShadow: '0 12px 32px rgba(102, 126, 234, 0.4)',
|
|
93
|
-
position: 'relative',
|
|
94
|
-
}}
|
|
95
|
-
aria-hidden="true"
|
|
96
|
-
>
|
|
97
|
-
<div
|
|
98
|
-
style={{
|
|
99
|
-
position: 'absolute',
|
|
100
|
-
inset: '-4px',
|
|
101
|
-
borderRadius: '24px',
|
|
102
|
-
background: 'linear-gradient(135deg, #667eea, #764ba2)',
|
|
103
|
-
opacity: 0.4,
|
|
104
|
-
filter: 'blur(16px)',
|
|
105
|
-
}}
|
|
106
|
-
/>
|
|
107
|
-
<span role="img" aria-label="Lock icon" style={{ position: 'relative', zIndex: 1 }}>
|
|
108
|
-
🔒
|
|
109
|
-
</span>
|
|
110
|
-
</div>
|
|
111
|
-
<h2
|
|
112
|
-
className="u-m-0 u-mb-2 u-text-3 u-font-bold"
|
|
113
|
-
style={{
|
|
114
|
-
fontSize: '32px',
|
|
115
|
-
marginBottom: '12px',
|
|
116
|
-
background: 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%)',
|
|
117
|
-
WebkitBackgroundClip: 'text',
|
|
118
|
-
WebkitTextFillColor: 'transparent',
|
|
119
|
-
backgroundClip: 'text',
|
|
120
|
-
}}
|
|
121
|
-
>
|
|
122
|
-
Welcome Back
|
|
123
|
-
</h2>
|
|
124
|
-
<p className="u-m-0 u-opacity-70 u-text-7" style={{ fontSize: '15px' }}>
|
|
125
|
-
Sign in to continue to your account
|
|
126
|
-
</p>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
{/* Form */}
|
|
130
|
-
<form onSubmit={handleSubmit}>
|
|
131
|
-
<div className="u-mb-3">
|
|
132
|
-
<label className="u-block u-text-7 u-font-semibold u-mb-2">
|
|
133
|
-
Email Address
|
|
134
|
-
</label>
|
|
135
|
-
<Input
|
|
136
|
-
type="email"
|
|
137
|
-
value={email}
|
|
138
|
-
onChange={(e) => setEmail(e.target.value)}
|
|
139
|
-
placeholder="you@example.com"
|
|
140
|
-
required
|
|
141
|
-
glass={{ elasticity: 0 }}
|
|
142
|
-
/>
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
<div className="u-mb-3">
|
|
146
|
-
<label className="u-block u-text-7 u-font-semibold u-mb-2">
|
|
147
|
-
Password
|
|
148
|
-
</label>
|
|
149
|
-
<Input
|
|
150
|
-
type="password"
|
|
151
|
-
value={password}
|
|
152
|
-
onChange={(e) => setPassword(e.target.value)}
|
|
153
|
-
placeholder="••••••••"
|
|
154
|
-
required
|
|
155
|
-
glass={{ elasticity: 0 }}
|
|
156
|
-
/>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
<div
|
|
160
|
-
style={{
|
|
161
|
-
display: 'flex',
|
|
162
|
-
justifyContent: 'space-between',
|
|
163
|
-
alignItems: 'center',
|
|
164
|
-
marginBottom: '20px',
|
|
165
|
-
}}
|
|
166
|
-
>
|
|
167
|
-
<label
|
|
168
|
-
style={{
|
|
169
|
-
display: 'flex',
|
|
170
|
-
alignItems: 'center',
|
|
171
|
-
gap: '8px',
|
|
172
|
-
fontSize: '12px',
|
|
173
|
-
cursor: 'pointer',
|
|
174
|
-
}}
|
|
175
|
-
>
|
|
176
|
-
<input
|
|
177
|
-
type="checkbox"
|
|
178
|
-
checked={rememberMe}
|
|
179
|
-
onChange={(e) => setRememberMe(e.target.checked)}
|
|
180
|
-
style={{ accentColor: '#667eea' }}
|
|
181
|
-
/>
|
|
182
|
-
Remember me
|
|
183
|
-
</label>
|
|
184
|
-
<a
|
|
185
|
-
href="#"
|
|
186
|
-
style={{
|
|
187
|
-
fontSize: '12px',
|
|
188
|
-
color: '#667eea',
|
|
189
|
-
textDecoration: 'none',
|
|
190
|
-
fontWeight: 600,
|
|
191
|
-
}}
|
|
192
|
-
>
|
|
193
|
-
Forgot password?
|
|
194
|
-
</a>
|
|
195
|
-
</div>
|
|
196
|
-
|
|
197
|
-
<Button
|
|
198
|
-
type="submit"
|
|
199
|
-
disabled={isLoading}
|
|
200
|
-
variant="primary"
|
|
201
|
-
glass={{ elasticity: 0 }}
|
|
202
|
-
className="u-block u-w-100"
|
|
203
|
-
>
|
|
204
|
-
{isLoading ? 'Signing in...' : 'Sign In'}
|
|
205
|
-
</Button>
|
|
206
|
-
</form>
|
|
207
|
-
|
|
208
|
-
{/* Social Login */}
|
|
209
|
-
<div style={{ marginTop: '20px' }}>
|
|
210
|
-
<div
|
|
211
|
-
style={{
|
|
212
|
-
position: 'relative',
|
|
213
|
-
textAlign: 'center',
|
|
214
|
-
marginBottom: '20px',
|
|
215
|
-
}}
|
|
216
|
-
>
|
|
217
|
-
<div
|
|
218
|
-
style={{
|
|
219
|
-
position: 'absolute',
|
|
220
|
-
top: '50%',
|
|
221
|
-
left: 0,
|
|
222
|
-
right: 0,
|
|
223
|
-
height: '1px',
|
|
224
|
-
background: 'rgba(255,255,255,0.1)',
|
|
225
|
-
}}
|
|
226
|
-
/>
|
|
227
|
-
<span
|
|
228
|
-
style={{
|
|
229
|
-
position: 'relative',
|
|
230
|
-
padding: '0 16px',
|
|
231
|
-
background: 'inherit',
|
|
232
|
-
fontSize: '12px',
|
|
233
|
-
opacity: 0.6,
|
|
234
|
-
}}
|
|
235
|
-
>
|
|
236
|
-
Or continue with
|
|
237
|
-
</span>
|
|
238
|
-
</div>
|
|
239
|
-
|
|
240
|
-
<div style={{ display: 'flex', gap: '12px' }}>
|
|
241
|
-
<button
|
|
242
|
-
style={{
|
|
243
|
-
flex: 1,
|
|
244
|
-
padding: '10px',
|
|
245
|
-
borderRadius: '10px',
|
|
246
|
-
border: '1px solid rgba(255,255,255,0.2)',
|
|
247
|
-
background: 'rgba(255,255,255,0.05)',
|
|
248
|
-
color: 'inherit',
|
|
249
|
-
cursor: 'pointer',
|
|
250
|
-
fontSize: '12px',
|
|
251
|
-
fontWeight: 600,
|
|
252
|
-
display: 'flex',
|
|
253
|
-
alignItems: 'center',
|
|
254
|
-
justifyContent: 'center',
|
|
255
|
-
gap: '8px',
|
|
256
|
-
}}
|
|
257
|
-
>
|
|
258
|
-
<span aria-hidden="true">🔵</span> Google
|
|
259
|
-
</button>
|
|
260
|
-
<button
|
|
261
|
-
style={{
|
|
262
|
-
flex: 1,
|
|
263
|
-
padding: '10px',
|
|
264
|
-
borderRadius: '10px',
|
|
265
|
-
border: '1px solid rgba(255,255,255,0.2)',
|
|
266
|
-
background: 'rgba(255,255,255,0.05)',
|
|
267
|
-
color: 'inherit',
|
|
268
|
-
cursor: 'pointer',
|
|
269
|
-
fontSize: '12px',
|
|
270
|
-
fontWeight: 600,
|
|
271
|
-
display: 'flex',
|
|
272
|
-
alignItems: 'center',
|
|
273
|
-
justifyContent: 'center',
|
|
274
|
-
gap: '8px',
|
|
275
|
-
}}
|
|
276
|
-
>
|
|
277
|
-
<span aria-hidden="true">⚫</span> GitHub
|
|
278
|
-
</button>
|
|
279
|
-
</div>
|
|
280
|
-
</div>
|
|
281
|
-
|
|
282
|
-
{/* Sign Up Link */}
|
|
283
|
-
<div style={{ marginTop: '20px', textAlign: 'center', fontSize: '12px' }}>
|
|
284
|
-
Don't have an account?{' '}
|
|
285
|
-
<a
|
|
286
|
-
href="#"
|
|
287
|
-
style={{
|
|
288
|
-
color: '#667eea',
|
|
289
|
-
textDecoration: 'none',
|
|
290
|
-
fontWeight: 600,
|
|
291
|
-
}}
|
|
292
|
-
>
|
|
293
|
-
Sign up
|
|
294
|
-
</a>
|
|
295
|
-
</div>
|
|
296
|
-
</div>
|
|
297
|
-
</AtomixGlass>
|
|
298
|
-
</div>
|
|
299
|
-
</BackgroundWrapper>
|
|
300
|
-
</StoryErrorBoundary>
|
|
301
|
-
);
|
|
302
|
-
},
|
|
303
|
-
parameters: {
|
|
304
|
-
docs: {
|
|
305
|
-
description: {
|
|
306
|
-
story:
|
|
307
|
-
'Modern login form with email/password inputs, remember me functionality, social login options, and loading states.',
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Newsletter Subscription Form
|
|
315
|
-
*
|
|
316
|
-
* Clean subscription form with email validation and success states.
|
|
317
|
-
*/
|
|
318
|
-
export const NewsletterSubscription: Story = {
|
|
319
|
-
render: () => {
|
|
320
|
-
const [email, setEmail] = useState('');
|
|
321
|
-
const [subscribed, setSubscribed] = useState(false);
|
|
322
|
-
|
|
323
|
-
const handleSubmit = (e: React.FormEvent) => {
|
|
324
|
-
e.preventDefault();
|
|
325
|
-
setSubscribed(true);
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
return (
|
|
329
|
-
<StoryErrorBoundary>
|
|
330
|
-
<BackgroundWrapper backgroundImage={backgroundImages[6]} overlay overlayOpacity={0.4}>
|
|
331
|
-
<div style={{ maxWidth: '420px' }} className="u-mx-auto">
|
|
332
|
-
<AtomixGlass
|
|
333
|
-
displacementScale={60}
|
|
334
|
-
blurAmount={0.75}
|
|
335
|
-
saturation={140}
|
|
336
|
-
borderRadius={24}
|
|
337
|
-
mode="standard"
|
|
338
|
-
padding="40px"
|
|
339
|
-
>
|
|
340
|
-
<div className="u-text-center u-text-white">
|
|
341
|
-
<div
|
|
342
|
-
style={{
|
|
343
|
-
width: '64px',
|
|
344
|
-
height: '64px',
|
|
345
|
-
borderRadius: '16px',
|
|
346
|
-
background: 'rgba(167, 139, 250, 0.2)',
|
|
347
|
-
display: 'flex',
|
|
348
|
-
alignItems: 'center',
|
|
349
|
-
justifyContent: 'center',
|
|
350
|
-
fontSize: '32px',
|
|
351
|
-
margin: '0 auto 24px',
|
|
352
|
-
}}
|
|
353
|
-
aria-hidden="true"
|
|
354
|
-
>
|
|
355
|
-
📧
|
|
356
|
-
</div>
|
|
357
|
-
|
|
358
|
-
{!subscribed ? (
|
|
359
|
-
<>
|
|
360
|
-
<h3 className="u-mt-0 u-text-2xl u-font-bold u-mb-2">
|
|
361
|
-
Subscribe to Our Newsletter
|
|
362
|
-
</h3>
|
|
363
|
-
<p
|
|
364
|
-
className="u-text-sm u-opacity-90 u-mb-5"
|
|
365
|
-
style={{ lineHeight: 1.6 }}
|
|
366
|
-
>
|
|
367
|
-
Get the latest updates, articles, and resources sent to your inbox weekly.
|
|
368
|
-
</p>
|
|
369
|
-
|
|
370
|
-
<form onSubmit={handleSubmit}>
|
|
371
|
-
<div className="u-mb-3">
|
|
372
|
-
<Input
|
|
373
|
-
type="email"
|
|
374
|
-
value={email}
|
|
375
|
-
onChange={(e) => setEmail(e.target.value)}
|
|
376
|
-
placeholder="Enter your email"
|
|
377
|
-
required
|
|
378
|
-
glass={{ elasticity: 0 }}
|
|
379
|
-
/>
|
|
380
|
-
</div>
|
|
381
|
-
|
|
382
|
-
<Button
|
|
383
|
-
type="submit"
|
|
384
|
-
variant="primary"
|
|
385
|
-
glass={{ elasticity: 0 }}
|
|
386
|
-
className="u-block u-w-100"
|
|
387
|
-
size="lg"
|
|
388
|
-
>
|
|
389
|
-
Subscribe Now
|
|
390
|
-
</Button>
|
|
391
|
-
</form>
|
|
392
|
-
|
|
393
|
-
<p className="u-text-xs u-opacity-70 u-mt-4">
|
|
394
|
-
No spam. Unsubscribe at any time.
|
|
395
|
-
</p>
|
|
396
|
-
</>
|
|
397
|
-
) : (
|
|
398
|
-
<div className="u-py-4">
|
|
399
|
-
<Badge variant="success" size="lg" className="u-mb-3">
|
|
400
|
-
✓ Successfully Subscribed!
|
|
401
|
-
</Badge>
|
|
402
|
-
<p className="u-text-lg u-font-medium u-mb-2">
|
|
403
|
-
Thank you for subscribing!
|
|
404
|
-
</p>
|
|
405
|
-
<p className="u-text-sm u-opacity-80">
|
|
406
|
-
Please check your inbox to confirm your subscription.
|
|
407
|
-
</p>
|
|
408
|
-
<Button
|
|
409
|
-
variant="outline-light"
|
|
410
|
-
glass={{ elasticity: 0 }}
|
|
411
|
-
onClick={() => {
|
|
412
|
-
setSubscribed(false);
|
|
413
|
-
setEmail('');
|
|
414
|
-
}}
|
|
415
|
-
className="u-mt-4"
|
|
416
|
-
>
|
|
417
|
-
Subscribe Another Email
|
|
418
|
-
</Button>
|
|
419
|
-
</div>
|
|
420
|
-
)}
|
|
421
|
-
</div>
|
|
422
|
-
</AtomixGlass>
|
|
423
|
-
</div>
|
|
424
|
-
</BackgroundWrapper>
|
|
425
|
-
</StoryErrorBoundary>
|
|
426
|
-
);
|
|
427
|
-
},
|
|
428
|
-
parameters: {
|
|
429
|
-
docs: {
|
|
430
|
-
description: {
|
|
431
|
-
story:
|
|
432
|
-
'Newsletter subscription form with email validation, success state, and confirmation message.',
|
|
433
|
-
},
|
|
434
|
-
},
|
|
435
|
-
},
|
|
436
|
-
};
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HeroExamples.stories.tsx
|
|
3
|
-
*
|
|
4
|
-
* Hero section and landing page examples for AtomixGlass.
|
|
5
|
-
* Demonstrates usage in prominent, attention-grabbing layouts.
|
|
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
|
-
import type { AtomixGlassStoryProps } from './types';
|
|
16
|
-
|
|
17
|
-
import { Button } from '../../Button';
|
|
18
|
-
|
|
19
|
-
const meta: Meta<typeof AtomixGlass> = {
|
|
20
|
-
title: 'Components/AtomixGlass/Examples/Hero Examples',
|
|
21
|
-
component: AtomixGlass,
|
|
22
|
-
parameters: {
|
|
23
|
-
layout: 'fullscreen',
|
|
24
|
-
docs: {
|
|
25
|
-
description: {
|
|
26
|
-
component:
|
|
27
|
-
'Hero section examples showing how to use AtomixGlass for landing pages and prominent UI elements.',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
tags: ['!autodocs'],
|
|
32
|
-
argTypes: {
|
|
33
|
-
...baseArgTypes,
|
|
34
|
-
children: { control: false },
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default meta;
|
|
39
|
-
type Story = StoryObj<typeof AtomixGlass>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Basic Hero Section
|
|
43
|
-
*
|
|
44
|
-
* A clean hero section with gradient background and call-to-action buttons.
|
|
45
|
-
*/
|
|
46
|
-
export const BasicHero: Story = {
|
|
47
|
-
render: () => (
|
|
48
|
-
<StoryErrorBoundary>
|
|
49
|
-
<BackgroundWrapper backgroundImage={backgroundImages[2]}>
|
|
50
|
-
<div style={{ maxWidth: '900px' }} className="u-mx-auto">
|
|
51
|
-
<AtomixGlass
|
|
52
|
-
displacementScale={100}
|
|
53
|
-
blurAmount={1}
|
|
54
|
-
borderRadius={30}
|
|
55
|
-
mode="shader"
|
|
56
|
-
shaderVariant="premiumGlass"
|
|
57
|
-
padding="48px 40px"
|
|
58
|
-
>
|
|
59
|
-
<div className="u-text-center u-text-white">
|
|
60
|
-
<div
|
|
61
|
-
style={{
|
|
62
|
-
width: '96px',
|
|
63
|
-
height: '96px',
|
|
64
|
-
margin: '0 auto 32px',
|
|
65
|
-
borderRadius: '24px',
|
|
66
|
-
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
67
|
-
display: 'flex',
|
|
68
|
-
alignItems: 'center',
|
|
69
|
-
justifyContent: 'center',
|
|
70
|
-
fontSize: '48px',
|
|
71
|
-
boxShadow: '0 16px 40px rgba(102, 126, 234, 0.5)',
|
|
72
|
-
}}
|
|
73
|
-
aria-hidden="true"
|
|
74
|
-
>
|
|
75
|
-
✨
|
|
76
|
-
</div>
|
|
77
|
-
<h1
|
|
78
|
-
className="u-mt-0 u-text-1 u-font-bold"
|
|
79
|
-
style={{
|
|
80
|
-
fontSize: '48px',
|
|
81
|
-
marginBottom: '20px',
|
|
82
|
-
background: 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%)',
|
|
83
|
-
WebkitBackgroundClip: 'text',
|
|
84
|
-
WebkitTextFillColor: 'transparent',
|
|
85
|
-
backgroundClip: 'text',
|
|
86
|
-
letterSpacing: '-1px',
|
|
87
|
-
}}
|
|
88
|
-
>
|
|
89
|
-
Modern Glass UI
|
|
90
|
-
</h1>
|
|
91
|
-
<p
|
|
92
|
-
className="u-text-4 u-mb-4"
|
|
93
|
-
style={{
|
|
94
|
-
fontSize: '18px',
|
|
95
|
-
lineHeight: 1.7,
|
|
96
|
-
color: 'rgba(255, 255, 255, 0.9)',
|
|
97
|
-
maxWidth: '600px',
|
|
98
|
-
margin: '0 auto 32px',
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
Create stunning interfaces with the AtomixGlass component. Perfect for modern, sleek
|
|
102
|
-
designs that stand out.
|
|
103
|
-
</p>
|
|
104
|
-
<div className="u-flex u-gap-3 u-justify-center u-flex-wrap" style={{ gap: '16px' }}>
|
|
105
|
-
<Button glass size="lg">
|
|
106
|
-
Get Started
|
|
107
|
-
</Button>
|
|
108
|
-
<Button glass variant="light" size="lg">
|
|
109
|
-
Learn More
|
|
110
|
-
</Button>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
</AtomixGlass>
|
|
114
|
-
</div>
|
|
115
|
-
</BackgroundWrapper>
|
|
116
|
-
</StoryErrorBoundary>
|
|
117
|
-
),
|
|
118
|
-
parameters: {
|
|
119
|
-
docs: {
|
|
120
|
-
description: {
|
|
121
|
-
story:
|
|
122
|
-
'A basic hero section demonstrating AtomixGlass for landing page headers with call-to-action buttons.',
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Feature Announcement Hero
|
|
130
|
-
*
|
|
131
|
-
* Hero section highlighting a new feature or product announcement.
|
|
132
|
-
*/
|
|
133
|
-
export const FeatureAnnouncement: Story = {
|
|
134
|
-
render: () => (
|
|
135
|
-
<StoryErrorBoundary>
|
|
136
|
-
<BackgroundWrapper backgroundImage={backgroundImages[4]} overlay overlayOpacity={0.3}>
|
|
137
|
-
<div style={{ maxWidth: '1000px' }} className="u-mx-auto">
|
|
138
|
-
<AtomixGlass
|
|
139
|
-
displacementScale={80}
|
|
140
|
-
blurAmount={0.5}
|
|
141
|
-
saturation={140}
|
|
142
|
-
borderRadius={24}
|
|
143
|
-
mode="standard"
|
|
144
|
-
padding="40px"
|
|
145
|
-
>
|
|
146
|
-
<div className="u-flex u-flex-column u-items-center u-text-center">
|
|
147
|
-
<Badge variant="primary" size="lg" className="u-mb-4">
|
|
148
|
-
New Release
|
|
149
|
-
</Badge>
|
|
150
|
-
<h2
|
|
151
|
-
className="u-mt-0 u-text-1 u-font-bold u-text-white"
|
|
152
|
-
style={{ fontSize: '42px', marginBottom: '16px' }}
|
|
153
|
-
>
|
|
154
|
-
Introducing Dark Mode
|
|
155
|
-
</h2>
|
|
156
|
-
<p
|
|
157
|
-
className="u-text-4 u-mb-5"
|
|
158
|
-
style={{
|
|
159
|
-
fontSize: '18px',
|
|
160
|
-
lineHeight: 1.8,
|
|
161
|
-
color: 'rgba(255, 255, 255, 0.9)',
|
|
162
|
-
maxWidth: '700px',
|
|
163
|
-
margin: '0 auto 32px',
|
|
164
|
-
}}
|
|
165
|
-
>
|
|
166
|
-
Experience your favorite interface in a whole new light. Dark mode reduces eye strain
|
|
167
|
-
and provides a modern aesthetic for nighttime usage.
|
|
168
|
-
</p>
|
|
169
|
-
<div className="u-flex u-gap-3" style={{ gap: '16px' }}>
|
|
170
|
-
<Button glass size="lg" variant="primary">
|
|
171
|
-
Try Dark Mode
|
|
172
|
-
</Button>
|
|
173
|
-
<Button glass size="lg" variant="outline-light">
|
|
174
|
-
Read Documentation
|
|
175
|
-
</Button>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
</AtomixGlass>
|
|
179
|
-
</div>
|
|
180
|
-
</BackgroundWrapper>
|
|
181
|
-
</StoryErrorBoundary>
|
|
182
|
-
),
|
|
183
|
-
parameters: {
|
|
184
|
-
docs: {
|
|
185
|
-
description: {
|
|
186
|
-
story:
|
|
187
|
-
'Feature announcement hero with badge and dual call-to-action buttons for product updates.',
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Pricing Hero Section
|
|
195
|
-
*
|
|
196
|
-
* Hero section designed for pricing or product showcase pages.
|
|
197
|
-
*/
|
|
198
|
-
export const PricingHero: Story = {
|
|
199
|
-
render: () => (
|
|
200
|
-
<StoryErrorBoundary>
|
|
201
|
-
<BackgroundWrapper backgroundImage={backgroundImages[0]} overlay overlayOpacity={0.4}>
|
|
202
|
-
<Container>
|
|
203
|
-
<div className="u-py-5">
|
|
204
|
-
<AtomixGlass
|
|
205
|
-
displacementScale={90}
|
|
206
|
-
blurAmount={0.75}
|
|
207
|
-
saturation={150}
|
|
208
|
-
borderRadius={28}
|
|
209
|
-
mode="prominent"
|
|
210
|
-
padding="48px"
|
|
211
|
-
>
|
|
212
|
-
<div className="u-text-center u-text-white">
|
|
213
|
-
<h1
|
|
214
|
-
className="u-mt-0 u-text-1 u-font-bold"
|
|
215
|
-
style={{
|
|
216
|
-
fontSize: '56px',
|
|
217
|
-
marginBottom: '24px',
|
|
218
|
-
background: 'linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%)',
|
|
219
|
-
WebkitBackgroundClip: 'text',
|
|
220
|
-
WebkitTextFillColor: 'transparent',
|
|
221
|
-
backgroundClip: 'text',
|
|
222
|
-
}}
|
|
223
|
-
>
|
|
224
|
-
Simple, Transparent Pricing
|
|
225
|
-
</h1>
|
|
226
|
-
<p
|
|
227
|
-
className="u-text-4 u-mb-5"
|
|
228
|
-
style={{
|
|
229
|
-
fontSize: '20px',
|
|
230
|
-
lineHeight: 1.8,
|
|
231
|
-
color: 'rgba(255, 255, 255, 0.95)',
|
|
232
|
-
maxWidth: '650px',
|
|
233
|
-
margin: '0 auto 40px',
|
|
234
|
-
}}
|
|
235
|
-
>
|
|
236
|
-
Choose the perfect plan for your needs. No hidden fees, no surprises.
|
|
237
|
-
</p>
|
|
238
|
-
<div
|
|
239
|
-
className="u-flex u-gap-4 u-justify-center u-flex-wrap"
|
|
240
|
-
style={{ gap: '20px' }}
|
|
241
|
-
>
|
|
242
|
-
<Button glass size="xl" variant="primary">
|
|
243
|
-
Start Free Trial
|
|
244
|
-
</Button>
|
|
245
|
-
<Button glass size="xl" variant="outline-light">
|
|
246
|
-
Contact Sales
|
|
247
|
-
</Button>
|
|
248
|
-
</div>
|
|
249
|
-
</div>
|
|
250
|
-
</AtomixGlass>
|
|
251
|
-
</div>
|
|
252
|
-
</Container>
|
|
253
|
-
</BackgroundWrapper>
|
|
254
|
-
</StoryErrorBoundary>
|
|
255
|
-
),
|
|
256
|
-
parameters: {
|
|
257
|
-
docs: {
|
|
258
|
-
description: {
|
|
259
|
-
story:
|
|
260
|
-
'Pricing page hero with gradient text effect and prominent call-to-action buttons.',
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
};
|