@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.
- package/dist/atomix.css +95 -69
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +1 -1
- package/dist/atomix.min.css.map +1 -1
- package/dist/charts.d.ts +1 -0
- package/dist/charts.js +231 -332
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +1 -0
- package/dist/core.js +232 -333
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +1 -0
- package/dist/forms.js +231 -332
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +11 -2
- package/dist/heavy.js +233 -334
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.esm.js +228 -327
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +227 -326
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +11 -1
- package/src/components/AtomixGlass/AtomixGlass.tsx +188 -128
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +62 -90
- package/src/components/AtomixGlass/PerformanceDashboard.tsx +153 -201
- package/src/components/AtomixGlass/glass-utils.ts +50 -0
- 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/lib/composables/useAtomixGlass.ts +108 -71
- package/src/lib/composables/useAtomixGlassStyles.ts +0 -2
- package/src/lib/constants/components.ts +1 -0
- package/src/lib/types/components.ts +1 -0
- package/src/lib/utils/displacement-generator.ts +1 -1
- package/src/styles/06-components/_components.atomix-glass.scss +158 -97
- 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__/test-setup.js +0 -135
- 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/__snapshots__/AtomixGlass.test.tsx.snap +0 -216
- 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/useTypedButton.ts +0 -66
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CardExamples.stories.tsx
|
|
3
|
-
*
|
|
4
|
-
* Card-based layouts and content containers using AtomixGlass.
|
|
5
|
-
* Perfect for dashboards, profiles, and content grids.
|
|
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';
|
|
17
|
-
import { Badge } from '../../Badge';
|
|
18
|
-
import { Avatar } from '../../Avatar';
|
|
19
|
-
import { Icon } from '../../Icon/Icon';
|
|
20
|
-
|
|
21
|
-
const meta: Meta<typeof AtomixGlass> = {
|
|
22
|
-
title: 'Components/AtomixGlass/Examples/Card Examples',
|
|
23
|
-
component: AtomixGlass,
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'centered',
|
|
26
|
-
docs: {
|
|
27
|
-
description: {
|
|
28
|
-
component:
|
|
29
|
-
'Card-based examples demonstrating AtomixGlass for content containers, profiles, and dashboard elements.',
|
|
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
|
-
* Profile Card
|
|
45
|
-
*
|
|
46
|
-
* User profile card with avatar and social links.
|
|
47
|
-
*/
|
|
48
|
-
export const ProfileCard: Story = {
|
|
49
|
-
render: () => (
|
|
50
|
-
<StoryErrorBoundary>
|
|
51
|
-
<BackgroundWrapper backgroundImage={backgroundImages[1]} overlay overlayOpacity={0.3}>
|
|
52
|
-
<div style={{ maxWidth: '400px' }}>
|
|
53
|
-
<AtomixGlass
|
|
54
|
-
displacementScale={70}
|
|
55
|
-
blurAmount={0.5}
|
|
56
|
-
saturation={140}
|
|
57
|
-
borderRadius={24}
|
|
58
|
-
mode="standard"
|
|
59
|
-
padding="32px"
|
|
60
|
-
>
|
|
61
|
-
<div className="u-text-center u-text-white">
|
|
62
|
-
<Avatar
|
|
63
|
-
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=150&h=150&fit=crop"
|
|
64
|
-
alt="User avatar"
|
|
65
|
-
size="xl"
|
|
66
|
-
className="u-mb-4"
|
|
67
|
-
/>
|
|
68
|
-
<h3 className="u-mt-0 u-text-xl u-font-bold u-mb-2">Sarah Johnson</h3>
|
|
69
|
-
<p className="u-text-sm u-opacity-90 u-mb-4">Senior Product Designer</p>
|
|
70
|
-
<Badge variant="secondary" className="u-mb-4">
|
|
71
|
-
Available for hire
|
|
72
|
-
</Badge>
|
|
73
|
-
<div className="u-flex u-gap-2 u-justify-center u-flex-wrap" style={{ gap: '12px' }}>
|
|
74
|
-
<Button glass size="sm" variant="primary">
|
|
75
|
-
Follow
|
|
76
|
-
</Button>
|
|
77
|
-
<Button glass size="sm" variant="outline-light">
|
|
78
|
-
Message
|
|
79
|
-
</Button>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</AtomixGlass>
|
|
83
|
-
</div>
|
|
84
|
-
</BackgroundWrapper>
|
|
85
|
-
</StoryErrorBoundary>
|
|
86
|
-
),
|
|
87
|
-
parameters: {
|
|
88
|
-
docs: {
|
|
89
|
-
description: {
|
|
90
|
-
story: 'User profile card with avatar, badges, and action buttons.',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Stats Card
|
|
98
|
-
*
|
|
99
|
-
* Dashboard statistics card with icon and metrics.
|
|
100
|
-
*/
|
|
101
|
-
export const StatsCard: Story = {
|
|
102
|
-
render: () => (
|
|
103
|
-
<StoryErrorBoundary>
|
|
104
|
-
<BackgroundWrapper backgroundImage={backgroundImages[3]}>
|
|
105
|
-
<div style={{ maxWidth: '320px' }}>
|
|
106
|
-
<AtomixGlass
|
|
107
|
-
displacementScale={60}
|
|
108
|
-
blurAmount={0.4}
|
|
109
|
-
saturation={130}
|
|
110
|
-
borderRadius={20}
|
|
111
|
-
mode="standard"
|
|
112
|
-
padding="28px"
|
|
113
|
-
>
|
|
114
|
-
<div className="u-text-white">
|
|
115
|
-
<div className="u-flex u-items-center u-justify-between u-mb-3">
|
|
116
|
-
<div
|
|
117
|
-
style={{
|
|
118
|
-
width: '48px',
|
|
119
|
-
height: '48px',
|
|
120
|
-
borderRadius: '12px',
|
|
121
|
-
background: 'rgba(99, 102, 241, 0.2)',
|
|
122
|
-
display: 'flex',
|
|
123
|
-
alignItems: 'center',
|
|
124
|
-
justifyContent: 'center',
|
|
125
|
-
fontSize: '24px',
|
|
126
|
-
}}
|
|
127
|
-
>
|
|
128
|
-
📊
|
|
129
|
-
</div>
|
|
130
|
-
<Badge variant="success">+12.5%</Badge>
|
|
131
|
-
</div>
|
|
132
|
-
<p className="u-text-sm u-opacity-80 u-mb-1">Total Revenue</p>
|
|
133
|
-
<h3 className="u-mt-0 u-text-3xl u-font-bold u-mb-2">$48,295</h3>
|
|
134
|
-
<p className="u-text-xs u-opacity-70">Compared to $42,890 last month</p>
|
|
135
|
-
</div>
|
|
136
|
-
</AtomixGlass>
|
|
137
|
-
</div>
|
|
138
|
-
</BackgroundWrapper>
|
|
139
|
-
</StoryErrorBoundary>
|
|
140
|
-
),
|
|
141
|
-
parameters: {
|
|
142
|
-
docs: {
|
|
143
|
-
description: {
|
|
144
|
-
story: 'Dashboard statistics card displaying metrics with trend indicators.',
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Content Card
|
|
152
|
-
*
|
|
153
|
-
* Blog post or article preview card.
|
|
154
|
-
*/
|
|
155
|
-
export const ContentCard: Story = {
|
|
156
|
-
render: () => (
|
|
157
|
-
<StoryErrorBoundary>
|
|
158
|
-
<BackgroundWrapper backgroundImage={backgroundImages[6]}>
|
|
159
|
-
<div style={{ maxWidth: '420px' }}>
|
|
160
|
-
<AtomixGlass
|
|
161
|
-
displacementScale={65}
|
|
162
|
-
blurAmount={0.5}
|
|
163
|
-
saturation={135}
|
|
164
|
-
borderRadius={20}
|
|
165
|
-
mode="standard"
|
|
166
|
-
padding="0"
|
|
167
|
-
>
|
|
168
|
-
<div className="u-text-white">
|
|
169
|
-
<div
|
|
170
|
-
style={{
|
|
171
|
-
height: '200px',
|
|
172
|
-
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
173
|
-
borderRadius: '20px 20px 0 0',
|
|
174
|
-
display: 'flex',
|
|
175
|
-
alignItems: 'center',
|
|
176
|
-
justifyContent: 'center',
|
|
177
|
-
fontSize: '64px',
|
|
178
|
-
}}
|
|
179
|
-
aria-hidden="true"
|
|
180
|
-
>
|
|
181
|
-
🎨
|
|
182
|
-
</div>
|
|
183
|
-
<div style={{ padding: '24px' }}>
|
|
184
|
-
<div className="u-flex u-items-center u-gap-2 u-mb-3">
|
|
185
|
-
<Badge variant="primary">Design</Badge>
|
|
186
|
-
<span className="u-text-xs u-opacity-70">5 min read</span>
|
|
187
|
-
</div>
|
|
188
|
-
<h3 className="u-mt-0 u-text-xl u-font-bold u-mb-2">
|
|
189
|
-
The Future of Glass Morphism in UI Design
|
|
190
|
-
</h3>
|
|
191
|
-
<p className="u-text-sm u-opacity-80 u-line-height-relaxed u-mb-4">
|
|
192
|
-
Exploring how glass morphism continues to shape modern interface design trends
|
|
193
|
-
and user expectations.
|
|
194
|
-
</p>
|
|
195
|
-
<Button glass size="sm" variant="outline-light" className="u-w-full">
|
|
196
|
-
Read Article
|
|
197
|
-
</Button>
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
200
|
-
</AtomixGlass>
|
|
201
|
-
</div>
|
|
202
|
-
</BackgroundWrapper>
|
|
203
|
-
</StoryErrorBoundary>
|
|
204
|
-
),
|
|
205
|
-
parameters: {
|
|
206
|
-
docs: {
|
|
207
|
-
description: {
|
|
208
|
-
story: 'Content card for blog posts or articles with category badge and call-to-action.',
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
};
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Customization.stories.tsx
|
|
3
|
-
*
|
|
4
|
-
* Stories showcasing customization options and integration with other components.
|
|
5
|
-
*
|
|
6
|
-
* @package Atomix
|
|
7
|
-
* @component AtomixGlass
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
12
|
-
import AtomixGlass from '../AtomixGlass';
|
|
13
|
-
import Button from '../../Button/Button';
|
|
14
|
-
import Badge from '../../Badge/Badge';
|
|
15
|
-
import { BackgroundWrapper, backgroundImages } from './shared-components';
|
|
16
|
-
import { Icon } from '../../Icon/Icon'; // Assuming Icon is used or might be useful, added from Examples
|
|
17
|
-
|
|
18
|
-
const meta: Meta<typeof AtomixGlass> = {
|
|
19
|
-
title: 'Components/AtomixGlass/Features/Customization',
|
|
20
|
-
component: AtomixGlass,
|
|
21
|
-
parameters: {
|
|
22
|
-
layout: 'fullscreen',
|
|
23
|
-
docs: {
|
|
24
|
-
description: {
|
|
25
|
-
component:
|
|
26
|
-
'Examples of how to customize AtomixGlass with styles and integrate it with other Atomix components.',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default meta;
|
|
33
|
-
type Story = StoryObj<typeof AtomixGlass>;
|
|
34
|
-
|
|
35
|
-
export const WithCustomStyling: Story = {
|
|
36
|
-
args: {
|
|
37
|
-
children: (
|
|
38
|
-
<div className="u-text-center">
|
|
39
|
-
<h2 className="u-text-4 u-font-semibold u-mb-4 u-text-white">Custom Styled Glass</h2>
|
|
40
|
-
<p className="u-text-base u-mb-6 u-text-white">
|
|
41
|
-
This glass uses custom styling properties.
|
|
42
|
-
</p>
|
|
43
|
-
<Button
|
|
44
|
-
variant="primary"
|
|
45
|
-
className="u-rounded-lg u-py-3 u-px-6"
|
|
46
|
-
style={{ boxShadow: '0 5px 15px rgba(0,0,0,0.2)' }}
|
|
47
|
-
>
|
|
48
|
-
Premium Effect
|
|
49
|
-
</Button>
|
|
50
|
-
</div>
|
|
51
|
-
),
|
|
52
|
-
displacementScale: 70,
|
|
53
|
-
blurAmount: 0.4,
|
|
54
|
-
saturation: 160,
|
|
55
|
-
aberrationIntensity: 1.8,
|
|
56
|
-
borderRadius: 30,
|
|
57
|
-
padding: '40px',
|
|
58
|
-
style: {
|
|
59
|
-
width: '100%',
|
|
60
|
-
maxWidth: '400px',
|
|
61
|
-
margin: '0 auto',
|
|
62
|
-
boxShadow: '0 10px 30px rgba(0,0,0,0.3)',
|
|
63
|
-
transition: 'transform 0.3s ease-in-out',
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
render: args => (
|
|
67
|
-
<BackgroundWrapper backgroundImage={backgroundImages[2]}>
|
|
68
|
-
<div className="u-flex u-justify-center u-items-center u-w-full u-h-full">
|
|
69
|
-
<AtomixGlass {...args} />
|
|
70
|
-
</div>
|
|
71
|
-
</BackgroundWrapper>
|
|
72
|
-
),
|
|
73
|
-
parameters: {
|
|
74
|
-
docs: {
|
|
75
|
-
description: {
|
|
76
|
-
story:
|
|
77
|
-
'Shows how to customize the AtomixGlass component with additional CSS styles and enhanced interactivity.',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const WithOtherComponents: Story = {
|
|
84
|
-
parameters: {
|
|
85
|
-
docs: {
|
|
86
|
-
description: {
|
|
87
|
-
story:
|
|
88
|
-
'Demonstrates how AtomixGlass integrates with other components in the design system.',
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
render: () => {
|
|
93
|
-
return (
|
|
94
|
-
<BackgroundWrapper backgroundImage={backgroundImages[0]}>
|
|
95
|
-
<div className="u-flex u-items-center u-justify-center u-w-full u-h-full">
|
|
96
|
-
<AtomixGlass
|
|
97
|
-
displacementScale={85}
|
|
98
|
-
blurAmount={0.6}
|
|
99
|
-
saturation={170}
|
|
100
|
-
aberrationIntensity={2.2}
|
|
101
|
-
elasticity={0.18}
|
|
102
|
-
borderRadius={28}
|
|
103
|
-
padding="36px"
|
|
104
|
-
className="u-w-11/12 u-max-w-2xl"
|
|
105
|
-
>
|
|
106
|
-
<div className="u-mb-6">
|
|
107
|
-
<h2 className="u-m-0 u-text-white u-text-28 u-mb-2">Integrated UI</h2>
|
|
108
|
-
<p className="u-m-0 u-text-white u-opacity-90">
|
|
109
|
-
Glass effect with multiple components
|
|
110
|
-
</p>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div className="u-flex u-flex-col u-gap-4 u-items-center">
|
|
114
|
-
<Button variant="primary" glass className="u-w-full">
|
|
115
|
-
Primary Action
|
|
116
|
-
</Button>
|
|
117
|
-
<Button variant="secondary" glass className="u-w-full">
|
|
118
|
-
Secondary Action
|
|
119
|
-
</Button>
|
|
120
|
-
|
|
121
|
-
<div className="u-flex u-gap-3 u-mt-4">
|
|
122
|
-
<Badge variant="success" label="Success" glass />
|
|
123
|
-
<Badge variant="warning" label="Warning" glass />
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</AtomixGlass>
|
|
127
|
-
</div>
|
|
128
|
-
</BackgroundWrapper>
|
|
129
|
-
);
|
|
130
|
-
},
|
|
131
|
-
};
|
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DashboardExamples.stories.tsx
|
|
3
|
-
*
|
|
4
|
-
* Dashboard UI components and widgets using AtomixGlass.
|
|
5
|
-
* Perfect for analytics, stats cards, and data visualization interfaces.
|
|
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 { Badge } from '../../Badge';
|
|
17
|
-
import { Icon } from '../../Icon/Icon';
|
|
18
|
-
|
|
19
|
-
const meta: Meta<typeof AtomixGlass> = {
|
|
20
|
-
title: 'Components/AtomixGlass/Examples/Dashboard Examples',
|
|
21
|
-
component: AtomixGlass,
|
|
22
|
-
parameters: {
|
|
23
|
-
layout: 'fullscreen',
|
|
24
|
-
docs: {
|
|
25
|
-
description: {
|
|
26
|
-
component:
|
|
27
|
-
'Dashboard UI examples demonstrating AtomixGlass for analytics, statistics, and data visualization interfaces.',
|
|
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
|
-
* Analytics Dashboard
|
|
43
|
-
*
|
|
44
|
-
* Complete dashboard layout with multiple stats cards and metrics.
|
|
45
|
-
*/
|
|
46
|
-
export const AnalyticsDashboard: Story = {
|
|
47
|
-
render: () => (
|
|
48
|
-
<StoryErrorBoundary>
|
|
49
|
-
<BackgroundWrapper backgroundImage={backgroundImages[5]} overlay overlayOpacity={0.4}>
|
|
50
|
-
<div style={{ padding: '40px 24px', minHeight: '100vh' }}>
|
|
51
|
-
<div className="u-mb-5 u-text-white">
|
|
52
|
-
<h1 className="u-m-0 u-text-3xl u-font-bold">Analytics Overview</h1>
|
|
53
|
-
<p className="u-mt-1 u-opacity-80">Track your performance metrics</p>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
{/* Stats Grid */}
|
|
57
|
-
<div
|
|
58
|
-
style={{
|
|
59
|
-
display: 'grid',
|
|
60
|
-
gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))',
|
|
61
|
-
gap: '24px',
|
|
62
|
-
marginBottom: '32px',
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
{/* Revenue Card */}
|
|
66
|
-
<AtomixGlass
|
|
67
|
-
displacementScale={60}
|
|
68
|
-
blurAmount={0.5}
|
|
69
|
-
saturation={130}
|
|
70
|
-
borderRadius={20}
|
|
71
|
-
mode="standard"
|
|
72
|
-
padding="28px"
|
|
73
|
-
>
|
|
74
|
-
<div className="u-text-white">
|
|
75
|
-
<div className="u-flex u-items-center u-justify-between u-mb-3">
|
|
76
|
-
<div
|
|
77
|
-
style={{
|
|
78
|
-
width: '48px',
|
|
79
|
-
height: '48px',
|
|
80
|
-
borderRadius: '12px',
|
|
81
|
-
background: 'rgba(99, 102, 241, 0.2)',
|
|
82
|
-
display: 'flex',
|
|
83
|
-
alignItems: 'center',
|
|
84
|
-
justifyContent: 'center',
|
|
85
|
-
fontSize: '24px',
|
|
86
|
-
}}
|
|
87
|
-
aria-hidden="true"
|
|
88
|
-
>
|
|
89
|
-
💰
|
|
90
|
-
</div>
|
|
91
|
-
<Badge variant="success">+12.5%</Badge>
|
|
92
|
-
</div>
|
|
93
|
-
<p className="u-text-sm u-opacity-80 u-mb-1">Total Revenue</p>
|
|
94
|
-
<h3 className="u-mt-0 u-text-3xl u-font-bold u-mb-2">$48,295</h3>
|
|
95
|
-
<p className="u-text-xs u-opacity-70">Compared to $42,890 last month</p>
|
|
96
|
-
</div>
|
|
97
|
-
</AtomixGlass>
|
|
98
|
-
|
|
99
|
-
{/* Users Card */}
|
|
100
|
-
<AtomixGlass
|
|
101
|
-
displacementScale={60}
|
|
102
|
-
blurAmount={0.5}
|
|
103
|
-
saturation={130}
|
|
104
|
-
borderRadius={20}
|
|
105
|
-
mode="standard"
|
|
106
|
-
padding="28px"
|
|
107
|
-
>
|
|
108
|
-
<div className="u-text-white">
|
|
109
|
-
<div className="u-flex u-items-center u-justify-between u-mb-3">
|
|
110
|
-
<div
|
|
111
|
-
style={{
|
|
112
|
-
width: '48px',
|
|
113
|
-
height: '48px',
|
|
114
|
-
borderRadius: '12px',
|
|
115
|
-
background: 'rgba(168, 85, 247, 0.2)',
|
|
116
|
-
display: 'flex',
|
|
117
|
-
alignItems: 'center',
|
|
118
|
-
justifyContent: 'center',
|
|
119
|
-
fontSize: '24px',
|
|
120
|
-
}}
|
|
121
|
-
aria-hidden="true"
|
|
122
|
-
>
|
|
123
|
-
👥
|
|
124
|
-
</div>
|
|
125
|
-
<Badge variant="success">+8.2%</Badge>
|
|
126
|
-
</div>
|
|
127
|
-
<p className="u-text-sm u-opacity-80 u-mb-1">Active Users</p>
|
|
128
|
-
<h3 className="u-mt-0 u-text-3xl u-font-bold u-mb-2">12,847</h3>
|
|
129
|
-
<p className="u-text-xs u-opacity-70">1,234 users online now</p>
|
|
130
|
-
</div>
|
|
131
|
-
</AtomixGlass>
|
|
132
|
-
|
|
133
|
-
{/* Orders Card */}
|
|
134
|
-
<AtomixGlass
|
|
135
|
-
displacementScale={60}
|
|
136
|
-
blurAmount={0.5}
|
|
137
|
-
saturation={130}
|
|
138
|
-
borderRadius={20}
|
|
139
|
-
mode="standard"
|
|
140
|
-
padding="28px"
|
|
141
|
-
>
|
|
142
|
-
<div className="u-text-white">
|
|
143
|
-
<div className="u-flex u-items-center u-justify-between u-mb-3">
|
|
144
|
-
<div
|
|
145
|
-
style={{
|
|
146
|
-
width: '48px',
|
|
147
|
-
height: '48px',
|
|
148
|
-
borderRadius: '12px',
|
|
149
|
-
background: 'rgba(236, 72, 153, 0.2)',
|
|
150
|
-
display: 'flex',
|
|
151
|
-
alignItems: 'center',
|
|
152
|
-
justifyContent: 'center',
|
|
153
|
-
fontSize: '24px',
|
|
154
|
-
}}
|
|
155
|
-
aria-hidden="true"
|
|
156
|
-
>
|
|
157
|
-
📦
|
|
158
|
-
</div>
|
|
159
|
-
<Badge variant="danger">-3.1%</Badge>
|
|
160
|
-
</div>
|
|
161
|
-
<p className="u-text-sm u-opacity-80 u-mb-1">Total Orders</p>
|
|
162
|
-
<h3 className="u-mt-0 u-text-3xl u-font-bold u-mb-2">1,429</h3>
|
|
163
|
-
<p className="u-text-xs u-opacity-70">Compared to 1,475 last month</p>
|
|
164
|
-
</div>
|
|
165
|
-
</AtomixGlass>
|
|
166
|
-
|
|
167
|
-
{/* Conversion Card */}
|
|
168
|
-
<AtomixGlass
|
|
169
|
-
displacementScale={60}
|
|
170
|
-
blurAmount={0.5}
|
|
171
|
-
saturation={130}
|
|
172
|
-
borderRadius={20}
|
|
173
|
-
mode="standard"
|
|
174
|
-
padding="28px"
|
|
175
|
-
>
|
|
176
|
-
<div className="u-text-white">
|
|
177
|
-
<div className="u-flex u-items-center u-justify-between u-mb-3">
|
|
178
|
-
<div
|
|
179
|
-
style={{
|
|
180
|
-
width: '48px',
|
|
181
|
-
height: '48px',
|
|
182
|
-
borderRadius: '12px',
|
|
183
|
-
background: 'rgba(251, 191, 36, 0.2)',
|
|
184
|
-
display: 'flex',
|
|
185
|
-
alignItems: 'center',
|
|
186
|
-
justifyContent: 'center',
|
|
187
|
-
fontSize: '24px',
|
|
188
|
-
}}
|
|
189
|
-
aria-hidden="true"
|
|
190
|
-
>
|
|
191
|
-
📈
|
|
192
|
-
</div>
|
|
193
|
-
<Badge variant="success">+4.3%</Badge>
|
|
194
|
-
</div>
|
|
195
|
-
<p className="u-text-sm u-opacity-80 u-mb-1">Conversion Rate</p>
|
|
196
|
-
<h3 className="u-mt-0 u-text-3xl u-font-bold u-mb-2">3.24%</h3>
|
|
197
|
-
<p className="u-text-xs u-opacity-70">Industry average: 2.86%</p>
|
|
198
|
-
</div>
|
|
199
|
-
</AtomixGlass>
|
|
200
|
-
</div>
|
|
201
|
-
|
|
202
|
-
{/* Recent Activity Section */}
|
|
203
|
-
<AtomixGlass
|
|
204
|
-
displacementScale={65}
|
|
205
|
-
blurAmount={0.6}
|
|
206
|
-
saturation={135}
|
|
207
|
-
borderRadius={20}
|
|
208
|
-
mode="standard"
|
|
209
|
-
>
|
|
210
|
-
<div className="u-text-white" style={{ padding: '28px' }}>
|
|
211
|
-
<h2 className="u-mt-0 u-text-xl u-font-bold u-mb-4">Recent Activity</h2>
|
|
212
|
-
|
|
213
|
-
<div className="u-divide-y" style={{ borderColor: 'rgba(255,255,255,0.1)' }}>
|
|
214
|
-
{[
|
|
215
|
-
{ action: 'New order received', time: '2 minutes ago', icon: '🛒', color: 'rgba(99, 102, 241, 0.2)' },
|
|
216
|
-
{ action: 'Payment processed', time: '15 minutes ago', icon: '💳', color: 'rgba(34, 197, 94, 0.2)' },
|
|
217
|
-
{ action: 'User registered', time: '1 hour ago', icon: '👤', color: 'rgba(168, 85, 247, 0.2)' },
|
|
218
|
-
{ action: 'Product updated', time: '3 hours ago', icon: '✏️', color: 'rgba(251, 191, 36, 0.2)' },
|
|
219
|
-
].map((item, index) => (
|
|
220
|
-
<div key={index} className="u-py-3 u-flex u-items-center u-gap-3">
|
|
221
|
-
<div
|
|
222
|
-
style={{
|
|
223
|
-
width: '40px',
|
|
224
|
-
height: '40px',
|
|
225
|
-
borderRadius: '10px',
|
|
226
|
-
background: item.color,
|
|
227
|
-
display: 'flex',
|
|
228
|
-
alignItems: 'center',
|
|
229
|
-
justifyContent: 'center',
|
|
230
|
-
fontSize: '20px',
|
|
231
|
-
flexShrink: 0,
|
|
232
|
-
}}
|
|
233
|
-
aria-hidden="true"
|
|
234
|
-
>
|
|
235
|
-
{item.icon}
|
|
236
|
-
</div>
|
|
237
|
-
<div className="u-flex-1">
|
|
238
|
-
<p className="u-m-0 u-font-medium">{item.action}</p>
|
|
239
|
-
<p className="u-m-0 u-text-xs u-opacity-70">{item.time}</p>
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
))}
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
</AtomixGlass>
|
|
246
|
-
</div>
|
|
247
|
-
</BackgroundWrapper>
|
|
248
|
-
</StoryErrorBoundary>
|
|
249
|
-
),
|
|
250
|
-
parameters: {
|
|
251
|
-
docs: {
|
|
252
|
-
description: {
|
|
253
|
-
story:
|
|
254
|
-
'Complete analytics dashboard with stats cards, trend indicators, and recent activity feed.',
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Weather Widget
|
|
262
|
-
*
|
|
263
|
-
* Compact weather information card with forecast.
|
|
264
|
-
*/
|
|
265
|
-
export const WeatherWidget: Story = {
|
|
266
|
-
render: () => (
|
|
267
|
-
<StoryErrorBoundary>
|
|
268
|
-
<BackgroundWrapper backgroundImage={backgroundImages[4]} overlay overlayOpacity={0.3}>
|
|
269
|
-
<div style={{ maxWidth: '340px' }}>
|
|
270
|
-
<AtomixGlass
|
|
271
|
-
displacementScale={70}
|
|
272
|
-
blurAmount={0.75}
|
|
273
|
-
saturation={140}
|
|
274
|
-
borderRadius={24}
|
|
275
|
-
mode="standard"
|
|
276
|
-
padding="32px"
|
|
277
|
-
>
|
|
278
|
-
<div className="u-text-center u-text-white">
|
|
279
|
-
<div
|
|
280
|
-
style={{
|
|
281
|
-
fontSize: '64px',
|
|
282
|
-
margin: '0 auto 16px',
|
|
283
|
-
filter: 'drop-shadow(0 4px 8px rgba(0,0,0,0.2))',
|
|
284
|
-
}}
|
|
285
|
-
aria-hidden="true"
|
|
286
|
-
>
|
|
287
|
-
⛅
|
|
288
|
-
</div>
|
|
289
|
-
|
|
290
|
-
<h2 className="u-m-0 u-text-5xl u-font-bold" style={{ fontSize: '56px' }}>
|
|
291
|
-
72°F
|
|
292
|
-
</h2>
|
|
293
|
-
<p className="u-m-0 u-text-lg u-opacity-90 u-mb-4">Partly Cloudy</p>
|
|
294
|
-
|
|
295
|
-
<div
|
|
296
|
-
style={{
|
|
297
|
-
display: 'grid',
|
|
298
|
-
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
299
|
-
gap: '16px',
|
|
300
|
-
padding: '20px 0',
|
|
301
|
-
borderTop: '1px solid rgba(255,255,255,0.1)',
|
|
302
|
-
borderBottom: '1px solid rgba(255,255,255,0.1)',
|
|
303
|
-
marginBottom: '20px',
|
|
304
|
-
}}
|
|
305
|
-
>
|
|
306
|
-
<div>
|
|
307
|
-
<p className="u-m-0 u-text-xs u-opacity-70">Wind</p>
|
|
308
|
-
<p className="u-m-0 u-font-semibold">12 mph</p>
|
|
309
|
-
</div>
|
|
310
|
-
<div>
|
|
311
|
-
<p className="u-m-0 u-text-xs u-opacity-70">Humidity</p>
|
|
312
|
-
<p className="u-m-0 u-font-semibold">45%</p>
|
|
313
|
-
</div>
|
|
314
|
-
<div>
|
|
315
|
-
<p className="u-m-0 u-text-xs u-opacity-70">UV Index</p>
|
|
316
|
-
<p className="u-m-0 u-font-semibold">Moderate</p>
|
|
317
|
-
</div>
|
|
318
|
-
</div>
|
|
319
|
-
|
|
320
|
-
{/* 3-Day Forecast */}
|
|
321
|
-
<div className="u-flex u-justify-between u-gap-2">
|
|
322
|
-
{[
|
|
323
|
-
{ day: 'Thu', temp: '74°', icon: '☀️' },
|
|
324
|
-
{ day: 'Fri', temp: '71°', icon: '🌧️' },
|
|
325
|
-
{ day: 'Sat', temp: '69°', icon: '⛈️' },
|
|
326
|
-
].map((forecast, index) => (
|
|
327
|
-
<div key={index} className="u-text-center">
|
|
328
|
-
<p className="u-m-0 u-text-sm u-opacity-80">{forecast.day}</p>
|
|
329
|
-
<div style={{ fontSize: '24px', margin: '8px 0' }}>{forecast.icon}</div>
|
|
330
|
-
<p className="u-m-0 u-font-semibold">{forecast.temp}</p>
|
|
331
|
-
</div>
|
|
332
|
-
))}
|
|
333
|
-
</div>
|
|
334
|
-
</div>
|
|
335
|
-
</AtomixGlass>
|
|
336
|
-
</div>
|
|
337
|
-
</BackgroundWrapper>
|
|
338
|
-
</StoryErrorBoundary>
|
|
339
|
-
),
|
|
340
|
-
parameters: {
|
|
341
|
-
docs: {
|
|
342
|
-
description: {
|
|
343
|
-
story:
|
|
344
|
-
'Weather widget displaying current conditions, detailed metrics, and 3-day forecast.',
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
},
|
|
348
|
-
};
|