@shohojdhara/atomix 0.2.2 → 0.2.4
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 +714 -646
- package/dist/atomix.min.css +5 -5
- package/dist/index.d.ts +794 -146
- package/dist/index.esm.js +12052 -6091
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5133 -2674
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/themes/boomdevs.css +662 -594
- package/dist/themes/boomdevs.min.css +7 -7
- package/dist/themes/esrar.css +714 -646
- package/dist/themes/esrar.min.css +6 -6
- package/dist/themes/mashroom.css +707 -642
- package/dist/themes/mashroom.min.css +7 -7
- package/dist/themes/shaj-default.css +707 -642
- package/dist/themes/shaj-default.min.css +6 -6
- package/package.json +66 -15
- package/src/components/Accordion/Accordion.stories.tsx +800 -0
- package/src/components/Accordion/Accordion.tsx +33 -5
- package/src/components/AtomixGlass/AtomixGlass.stories.tsx +1230 -0
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +199 -0
- package/src/components/AtomixGlass/AtomixGlass.tsx +1343 -0
- package/src/components/AtomixGlass/README.md +134 -0
- package/src/components/AtomixGlass/index.ts +10 -0
- package/src/components/AtomixGlass/shader-utils.ts +696 -0
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +5800 -0
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +1065 -0
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +1066 -0
- package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +397 -0
- package/src/components/AtomixGlass/stories/shared-components.tsx +310 -0
- package/src/components/AtomixGlass/utils.ts +8 -0
- package/src/components/Badge/Badge.stories.tsx +170 -0
- package/src/components/Badge/Badge.tsx +31 -4
- package/src/components/Button/Button.stories.tsx +826 -0
- package/src/components/Button/Button.tsx +34 -3
- package/src/components/Button/README.md +216 -0
- package/src/components/Callout/Callout.stories.tsx +813 -78
- package/src/components/Callout/Callout.test.tsx +368 -0
- package/src/components/Callout/Callout.tsx +43 -6
- package/src/components/Callout/README.md +409 -0
- package/src/components/Card/Card.stories.tsx +699 -0
- package/src/components/Card/Card.tsx +19 -3
- package/src/components/DatePicker/DatePicker copy.tsx +551 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +877 -1
- package/src/components/DatePicker/DatePicker.tsx +379 -332
- package/src/components/DatePicker/readme.md +110 -1
- package/src/components/DatePicker/types.ts +8 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +145 -0
- package/src/components/Dropdown/Dropdown.tsx +34 -5
- package/src/components/EdgePanel/EdgePanel.stories.tsx +476 -3
- package/src/components/EdgePanel/EdgePanel.tsx +86 -13
- package/src/components/Form/Checkbox.stories.tsx +101 -0
- package/src/components/Form/Checkbox.tsx +26 -2
- package/src/components/Form/Input.stories.tsx +124 -0
- package/src/components/Form/Input.tsx +36 -7
- package/src/components/Form/Radio.stories.tsx +139 -0
- package/src/components/Form/Radio.tsx +26 -2
- package/src/components/Form/Select.stories.tsx +110 -0
- package/src/components/Form/Select.tsx +26 -2
- package/src/components/Form/Textarea.stories.tsx +104 -0
- package/src/components/Form/Textarea.tsx +36 -7
- package/src/components/Hero/Hero.stories.tsx +54 -1
- package/src/components/Hero/Hero.tsx +70 -11
- package/src/components/Messages/Messages.stories.tsx +113 -0
- package/src/components/Messages/Messages.tsx +51 -9
- package/src/components/Modal/Modal.stories.tsx +237 -0
- package/src/components/Modal/Modal.tsx +63 -35
- package/src/components/Navigation/Nav/Nav.stories.tsx +469 -0
- package/src/components/Navigation/Nav/Nav.tsx +17 -4
- package/src/components/Navigation/Navbar/Navbar.stories.tsx +413 -0
- package/src/components/Navigation/Navbar/Navbar.tsx +66 -28
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +340 -0
- package/src/components/Navigation/SideMenu/SideMenu.tsx +28 -2
- package/src/components/Pagination/Pagination.stories.tsx +101 -0
- package/src/components/Pagination/Pagination.tsx +25 -1
- package/src/components/Popover/Popover.stories.tsx +94 -0
- package/src/components/Popover/Popover.tsx +30 -4
- package/src/components/Progress/Progress.tsx +17 -2
- package/src/components/Rating/Rating.stories.tsx +112 -0
- package/src/components/Rating/Rating.tsx +25 -1
- package/src/components/Spinner/Spinner.tsx +17 -2
- package/src/components/Steps/Steps.stories.tsx +119 -0
- package/src/components/Steps/Steps.tsx +32 -1
- package/src/components/Tab/Tab.stories.tsx +88 -0
- package/src/components/Tab/Tab.tsx +32 -1
- package/src/components/Toggle/Toggle.stories.tsx +92 -0
- package/src/components/Toggle/Toggle.tsx +32 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +131 -0
- package/src/components/Tooltip/Tooltip.tsx +43 -7
- package/src/components/VideoPlayer/VideoPlayer.stories.tsx +1002 -196
- package/src/components/VideoPlayer/VideoPlayer.tsx +161 -4
- package/src/components/index.ts +1 -0
- package/src/lib/composables/index.ts +4 -0
- package/src/lib/composables/useAtomixGlass.ts +71 -0
- package/src/lib/composables/useBarChart.ts +14 -4
- package/src/lib/composables/useButton.ts +3 -1
- package/src/lib/composables/useCallout.ts +4 -1
- package/src/lib/composables/useChart.ts +223 -370
- package/src/lib/composables/useChartToolbar.ts +11 -20
- package/src/lib/composables/useEdgePanel.ts +81 -35
- package/src/lib/composables/useGlassContainer.ts +168 -0
- package/src/lib/composables/useLineChart.ts +4 -2
- package/src/lib/composables/usePieChart.ts +4 -14
- package/src/lib/constants/components.ts +89 -0
- package/src/lib/types/components.ts +448 -14
- package/src/lib/utils/displacement-generator.ts +86 -0
- package/src/styles/01-settings/_settings.background.scss +8 -7
- package/src/styles/01-settings/_settings.callout.scss +7 -7
- package/src/styles/01-settings/_settings.edge-panel.scss +1 -1
- package/src/styles/02-tools/_tools.animations.scss +19 -0
- package/src/styles/02-tools/_tools.background.scss +19 -17
- package/src/styles/02-tools/_tools.glass.scss +1 -0
- package/src/styles/02-tools/_tools.utility-api.scss +62 -27
- package/src/styles/03-generic/_generic.root.scss +3 -2
- package/src/styles/04-elements/_elements.body.scss +0 -18
- package/src/styles/06-components/_components.accordion.scss +16 -0
- package/src/styles/06-components/_components.atomix-glass.scss +72 -0
- package/src/styles/06-components/_components.badge.scss +21 -0
- package/src/styles/06-components/_components.button.scss +10 -0
- package/src/styles/06-components/_components.callout.scss +46 -2
- package/src/styles/06-components/_components.card.scss +17 -0
- package/src/styles/06-components/_components.chart.scss +1 -1
- package/src/styles/06-components/_components.datepicker.scss +18 -0
- package/src/styles/06-components/_components.dropdown.scss +7 -1
- package/src/styles/06-components/_components.edge-panel.scss +101 -0
- package/src/styles/06-components/_components.hero.scss +1 -2
- package/src/styles/06-components/_components.input.scss +31 -1
- package/src/styles/06-components/_components.messages.scss +176 -0
- package/src/styles/06-components/_components.modal.scss +13 -3
- package/src/styles/06-components/_components.navbar.scss +12 -1
- package/src/styles/06-components/_components.side-menu.scss +5 -0
- package/src/styles/06-components/_components.video-player.scss +48 -26
- package/src/styles/06-components/_index.scss +1 -0
- package/src/styles/99-utilities/_index.scss +1 -0
- package/src/styles/99-utilities/_utilities.glass-fixes.scss +49 -0
- package/src/styles/99-utilities/_utilities.opacity.scss +1 -1
- package/dist/themes/yabai.css +0 -15207
- package/dist/themes/yabai.min.css +0 -189
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Card, ElevationCard } from './index';
|
|
4
|
+
import { Grid, GridCol } from '../../layouts';
|
|
5
|
+
import { Container } from '../../layouts/';
|
|
6
|
+
|
|
7
|
+
import Icon from '../Icon';
|
|
4
8
|
|
|
5
9
|
const meta: Meta<typeof Card> = {
|
|
6
10
|
title: 'Components/Card',
|
|
@@ -103,3 +107,698 @@ export const WithElevation: Story = {
|
|
|
103
107
|
imageAlt: 'Placeholder',
|
|
104
108
|
},
|
|
105
109
|
};
|
|
110
|
+
|
|
111
|
+
// Card with Glass Effect
|
|
112
|
+
export const WithGlassEffect: Story = {
|
|
113
|
+
render: args => (
|
|
114
|
+
<div
|
|
115
|
+
style={{
|
|
116
|
+
backgroundImage: `url(https://picsum.photos/id/128/1920/1024)`,
|
|
117
|
+
backgroundSize: 'cover',
|
|
118
|
+
height: '80vh',
|
|
119
|
+
width: '90vw',
|
|
120
|
+
display: 'grid',
|
|
121
|
+
borderRadius: '12px',
|
|
122
|
+
placeItems: 'center',
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
125
|
+
<Card {...args} styles={{ ['--atomix-card-width' as string]: '300px' }} />
|
|
126
|
+
</div>
|
|
127
|
+
),
|
|
128
|
+
args: {
|
|
129
|
+
title: 'Card with Glass Effect',
|
|
130
|
+
text: 'This card has a glass morphism effect applied.',
|
|
131
|
+
image: 'https://picsum.photos/id/128/300/150',
|
|
132
|
+
imageAlt: 'Placeholder',
|
|
133
|
+
glass: true,
|
|
134
|
+
actions: (
|
|
135
|
+
<React.Fragment>
|
|
136
|
+
<button className="c-btn c-btn--primary c-btn--sm">Learn More</button>
|
|
137
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Cancel</button>
|
|
138
|
+
</React.Fragment>
|
|
139
|
+
),
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// Card with Custom Glass Effect
|
|
144
|
+
export const WithCustomGlassEffect: Story = {
|
|
145
|
+
render: args => (
|
|
146
|
+
<div
|
|
147
|
+
style={{
|
|
148
|
+
backgroundImage: `url(https://images.unsplash.com/photo-1754851582381-04fe7bedd618?q=80&w=3860&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)`,
|
|
149
|
+
backgroundSize: 'cover',
|
|
150
|
+
backgroundPosition: 'center',
|
|
151
|
+
height: '95vh',
|
|
152
|
+
width: '95vw',
|
|
153
|
+
padding: '20px',
|
|
154
|
+
borderRadius: '12px',
|
|
155
|
+
overflow: 'auto',
|
|
156
|
+
display: 'grid',
|
|
157
|
+
placeItems: 'center',
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<Container>
|
|
161
|
+
<Grid alignItems="center">
|
|
162
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
163
|
+
<Card
|
|
164
|
+
{...args}
|
|
165
|
+
title="Card with Standard Glass"
|
|
166
|
+
text="This card has mode: 'standard' glass effect. blurAmount: 2,
|
|
167
|
+
saturation: 160,
|
|
168
|
+
displacementScale: 60,
|
|
169
|
+
aberrationIntensity: 2"
|
|
170
|
+
glass={{
|
|
171
|
+
blurAmount: 2,
|
|
172
|
+
saturation: 160,
|
|
173
|
+
displacementScale: 60,
|
|
174
|
+
aberrationIntensity: 2,
|
|
175
|
+
mode: 'standard',
|
|
176
|
+
overLight: false,
|
|
177
|
+
}}
|
|
178
|
+
/>
|
|
179
|
+
</GridCol>
|
|
180
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
181
|
+
<Card
|
|
182
|
+
{...args}
|
|
183
|
+
title="Card with Polar Glass"
|
|
184
|
+
text="This card has mode: 'polar' glass effect. blurAmount: 2,
|
|
185
|
+
saturation: 160,
|
|
186
|
+
displacementScale: 60,
|
|
187
|
+
aberrationIntensity: 2,"
|
|
188
|
+
glass={{
|
|
189
|
+
blurAmount: 0,
|
|
190
|
+
saturation: 160,
|
|
191
|
+
displacementScale: 60,
|
|
192
|
+
aberrationIntensity: 2,
|
|
193
|
+
mode: 'polar',
|
|
194
|
+
overLight: false,
|
|
195
|
+
}}
|
|
196
|
+
/>
|
|
197
|
+
</GridCol>
|
|
198
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
199
|
+
<Card
|
|
200
|
+
{...args}
|
|
201
|
+
title="Card with Prominent Glass"
|
|
202
|
+
text="This card has mode: 'prominent' glass effect. blurAmount: 2,
|
|
203
|
+
saturation: 160,
|
|
204
|
+
displacementScale: 60,
|
|
205
|
+
aberrationIntensity: 2,"
|
|
206
|
+
glass={{
|
|
207
|
+
blurAmount: 0,
|
|
208
|
+
saturation: 160,
|
|
209
|
+
displacementScale: 60,
|
|
210
|
+
aberrationIntensity: 2,
|
|
211
|
+
mode: 'prominent',
|
|
212
|
+
}}
|
|
213
|
+
/>
|
|
214
|
+
</GridCol>
|
|
215
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
216
|
+
<Card
|
|
217
|
+
{...args}
|
|
218
|
+
title="Card with Shader Glass"
|
|
219
|
+
text="This card has mode: 'shader' glass effect. blurAmount: 2,
|
|
220
|
+
saturation: 160,
|
|
221
|
+
displacementScale: 60,
|
|
222
|
+
aberrationIntensity: 2,"
|
|
223
|
+
glass={{
|
|
224
|
+
blurAmount: 0,
|
|
225
|
+
saturation: 160,
|
|
226
|
+
displacementScale: 60,
|
|
227
|
+
aberrationIntensity: 0,
|
|
228
|
+
mode: 'shader',
|
|
229
|
+
}}
|
|
230
|
+
/>
|
|
231
|
+
</GridCol>
|
|
232
|
+
</Grid>
|
|
233
|
+
</Container>
|
|
234
|
+
</div>
|
|
235
|
+
),
|
|
236
|
+
args: {
|
|
237
|
+
// icon: <Icon name="Laptop" />,
|
|
238
|
+
image:
|
|
239
|
+
'https://images.unsplash.com/photo-1754851582381-04fe7bedd618?q=80&w=3860&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
240
|
+
actions: (
|
|
241
|
+
<React.Fragment>
|
|
242
|
+
<button className="c-btn c-btn--primary c-btn--sm">Learn More</button>
|
|
243
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Cancel</button>
|
|
244
|
+
</React.Fragment>
|
|
245
|
+
),
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
// Glass Mode Variants - Standard
|
|
250
|
+
export const GlassModeStandard: Story = {
|
|
251
|
+
render: args => (
|
|
252
|
+
<div
|
|
253
|
+
style={{
|
|
254
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=1920)',
|
|
255
|
+
backgroundSize: 'cover',
|
|
256
|
+
backgroundPosition: 'center',
|
|
257
|
+
height: '95vh',
|
|
258
|
+
width: '95vw',
|
|
259
|
+
padding: '3rem',
|
|
260
|
+
borderRadius: '12px',
|
|
261
|
+
display: 'flex',
|
|
262
|
+
flexDirection: 'column',
|
|
263
|
+
alignItems: 'center',
|
|
264
|
+
justifyContent: 'center',
|
|
265
|
+
gap: '2rem',
|
|
266
|
+
}}
|
|
267
|
+
>
|
|
268
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
269
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Standard Glass Mode</h3>
|
|
270
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>
|
|
271
|
+
Classic glass morphism with blur and displacement
|
|
272
|
+
</p>
|
|
273
|
+
</div>
|
|
274
|
+
<Card
|
|
275
|
+
title="Standard Glass Card"
|
|
276
|
+
text="This card uses the standard glass mode with classic blur and displacement effects."
|
|
277
|
+
image="https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=800"
|
|
278
|
+
imageAlt="Standard glass"
|
|
279
|
+
className="u-w-50"
|
|
280
|
+
glass={{
|
|
281
|
+
mode: 'standard',
|
|
282
|
+
displacementScale: 60,
|
|
283
|
+
blurAmount: 2,
|
|
284
|
+
saturation: 160,
|
|
285
|
+
aberrationIntensity: 2,
|
|
286
|
+
elasticity: 0,
|
|
287
|
+
}}
|
|
288
|
+
actions={
|
|
289
|
+
<React.Fragment>
|
|
290
|
+
<button className="c-btn c-btn--primary c-btn--sm">Learn More</button>
|
|
291
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Details</button>
|
|
292
|
+
</React.Fragment>
|
|
293
|
+
}
|
|
294
|
+
/>
|
|
295
|
+
</div>
|
|
296
|
+
),
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
// Glass Mode Variants - Polar
|
|
300
|
+
export const GlassModePolar: Story = {
|
|
301
|
+
render: args => (
|
|
302
|
+
<div
|
|
303
|
+
style={{
|
|
304
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1557683316-973673baf926?w=1920)',
|
|
305
|
+
backgroundSize: 'cover',
|
|
306
|
+
backgroundPosition: 'center',
|
|
307
|
+
height: '95vh',
|
|
308
|
+
width: '95vw',
|
|
309
|
+
padding: '3rem',
|
|
310
|
+
borderRadius: '12px',
|
|
311
|
+
display: 'flex',
|
|
312
|
+
flexDirection: 'column',
|
|
313
|
+
alignItems: 'center',
|
|
314
|
+
justifyContent: 'center',
|
|
315
|
+
gap: '2rem',
|
|
316
|
+
}}
|
|
317
|
+
>
|
|
318
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
319
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Polar Glass Mode</h3>
|
|
320
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>Radial distortion effect from center</p>
|
|
321
|
+
</div>
|
|
322
|
+
<Card
|
|
323
|
+
className="u-w-50"
|
|
324
|
+
title="Polar Glass Card"
|
|
325
|
+
text="This card uses the polar glass mode with radial distortion effects emanating from the center."
|
|
326
|
+
image="https://images.unsplash.com/photo-1557683316-973673baf926?w=800"
|
|
327
|
+
imageAlt="Polar glass"
|
|
328
|
+
glass={{
|
|
329
|
+
mode: 'polar',
|
|
330
|
+
displacementScale: 80,
|
|
331
|
+
blurAmount: 1.5,
|
|
332
|
+
saturation: 180,
|
|
333
|
+
aberrationIntensity: 3,
|
|
334
|
+
elasticity: 0,
|
|
335
|
+
}}
|
|
336
|
+
actions={
|
|
337
|
+
<React.Fragment>
|
|
338
|
+
<button className="c-btn c-btn--primary c-btn--sm">Learn More</button>
|
|
339
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Details</button>
|
|
340
|
+
</React.Fragment>
|
|
341
|
+
}
|
|
342
|
+
/>
|
|
343
|
+
</div>
|
|
344
|
+
),
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
// Glass Mode Variants - Prominent
|
|
348
|
+
export const GlassModeProminent: Story = {
|
|
349
|
+
render: args => (
|
|
350
|
+
<div
|
|
351
|
+
style={{
|
|
352
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=1920)',
|
|
353
|
+
backgroundSize: 'cover',
|
|
354
|
+
backgroundPosition: 'center',
|
|
355
|
+
height: '95vh',
|
|
356
|
+
width: '95vw',
|
|
357
|
+
padding: '3rem',
|
|
358
|
+
borderRadius: '12px',
|
|
359
|
+
display: 'flex',
|
|
360
|
+
flexDirection: 'column',
|
|
361
|
+
alignItems: 'center',
|
|
362
|
+
justifyContent: 'center',
|
|
363
|
+
gap: '2rem',
|
|
364
|
+
}}
|
|
365
|
+
>
|
|
366
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
367
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Prominent Glass Mode</h3>
|
|
368
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>Enhanced distortion with maximum depth</p>
|
|
369
|
+
</div>
|
|
370
|
+
<Card
|
|
371
|
+
className="u-w-50"
|
|
372
|
+
title="Prominent Glass Card"
|
|
373
|
+
text="This card uses the prominent glass mode with enhanced distortion and maximum visual depth."
|
|
374
|
+
image="https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=800"
|
|
375
|
+
imageAlt="Prominent glass"
|
|
376
|
+
glass={{
|
|
377
|
+
mode: 'prominent',
|
|
378
|
+
displacementScale: 100,
|
|
379
|
+
blurAmount: 2.5,
|
|
380
|
+
saturation: 200,
|
|
381
|
+
aberrationIntensity: 4,
|
|
382
|
+
elasticity: 0,
|
|
383
|
+
}}
|
|
384
|
+
actions={
|
|
385
|
+
<React.Fragment>
|
|
386
|
+
<button className="c-btn c-btn--primary c-btn--sm">Learn More</button>
|
|
387
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Details</button>
|
|
388
|
+
</React.Fragment>
|
|
389
|
+
}
|
|
390
|
+
/>
|
|
391
|
+
</div>
|
|
392
|
+
),
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// Glass Mode Variants - Shader
|
|
396
|
+
export const GlassModeShader: Story = {
|
|
397
|
+
render: args => (
|
|
398
|
+
<div
|
|
399
|
+
style={{
|
|
400
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=1920)',
|
|
401
|
+
backgroundSize: 'cover',
|
|
402
|
+
backgroundPosition: 'center',
|
|
403
|
+
height: '95vh',
|
|
404
|
+
width: '95vw',
|
|
405
|
+
padding: '3rem',
|
|
406
|
+
borderRadius: '12px',
|
|
407
|
+
display: 'flex',
|
|
408
|
+
flexDirection: 'column',
|
|
409
|
+
alignItems: 'center',
|
|
410
|
+
justifyContent: 'center',
|
|
411
|
+
gap: '2rem',
|
|
412
|
+
}}
|
|
413
|
+
>
|
|
414
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
415
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Shader Glass Mode</h3>
|
|
416
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>GPU-accelerated liquid glass effect</p>
|
|
417
|
+
</div>
|
|
418
|
+
<Card
|
|
419
|
+
className="u-w-50"
|
|
420
|
+
title="Shader Glass Card"
|
|
421
|
+
text="This card uses the shader glass mode with GPU-accelerated liquid glass effects."
|
|
422
|
+
image="https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=800"
|
|
423
|
+
imageAlt="Shader glass"
|
|
424
|
+
glass={{
|
|
425
|
+
mode: 'shader',
|
|
426
|
+
shaderVariant: 'liquidGlass',
|
|
427
|
+
displacementScale: 70,
|
|
428
|
+
blurAmount: 1.8,
|
|
429
|
+
saturation: 170,
|
|
430
|
+
elasticity: 0,
|
|
431
|
+
}}
|
|
432
|
+
actions={
|
|
433
|
+
<React.Fragment>
|
|
434
|
+
<button className="c-btn c-btn--primary c-btn--sm">Learn More</button>
|
|
435
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Details</button>
|
|
436
|
+
</React.Fragment>
|
|
437
|
+
}
|
|
438
|
+
/>
|
|
439
|
+
</div>
|
|
440
|
+
),
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
// All Glass Modes Comparison
|
|
444
|
+
export const AllGlassModesComparison: Story = {
|
|
445
|
+
render: () => (
|
|
446
|
+
<div
|
|
447
|
+
style={{
|
|
448
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920)',
|
|
449
|
+
backgroundSize: 'cover',
|
|
450
|
+
backgroundPosition: 'center',
|
|
451
|
+
padding: '3rem',
|
|
452
|
+
borderRadius: '12px',
|
|
453
|
+
minHeight: '95vh',
|
|
454
|
+
overflow: 'auto',
|
|
455
|
+
}}
|
|
456
|
+
>
|
|
457
|
+
<Container>
|
|
458
|
+
<h2
|
|
459
|
+
style={{
|
|
460
|
+
textAlign: 'center',
|
|
461
|
+
color: 'white',
|
|
462
|
+
marginBottom: '3rem',
|
|
463
|
+
fontSize: '2rem',
|
|
464
|
+
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
465
|
+
}}
|
|
466
|
+
>
|
|
467
|
+
Glass Mode Cards Comparison
|
|
468
|
+
</h2>
|
|
469
|
+
|
|
470
|
+
<Grid alignItems="stretch">
|
|
471
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
472
|
+
<Card
|
|
473
|
+
title="Standard Glass"
|
|
474
|
+
text="Classic blur and displacement effects for a refined glass appearance."
|
|
475
|
+
image="https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=400"
|
|
476
|
+
imageAlt="Standard"
|
|
477
|
+
glass={{
|
|
478
|
+
mode: 'standard',
|
|
479
|
+
displacementScale: 60,
|
|
480
|
+
blurAmount: 2,
|
|
481
|
+
saturation: 160,
|
|
482
|
+
aberrationIntensity: 2,
|
|
483
|
+
}}
|
|
484
|
+
actions={<button className="c-btn c-btn--primary c-btn--sm">View</button>}
|
|
485
|
+
/>
|
|
486
|
+
</GridCol>
|
|
487
|
+
|
|
488
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
489
|
+
<Card
|
|
490
|
+
title="Polar Glass"
|
|
491
|
+
text="Radial distortion effects emanating from the center point."
|
|
492
|
+
image="https://images.unsplash.com/photo-1557683316-973673baf926?w=400"
|
|
493
|
+
imageAlt="Polar"
|
|
494
|
+
glass={{
|
|
495
|
+
mode: 'polar',
|
|
496
|
+
displacementScale: 80,
|
|
497
|
+
blurAmount: 1.5,
|
|
498
|
+
saturation: 180,
|
|
499
|
+
aberrationIntensity: 3,
|
|
500
|
+
}}
|
|
501
|
+
actions={<button className="c-btn c-btn--secondary c-btn--sm">View</button>}
|
|
502
|
+
/>
|
|
503
|
+
</GridCol>
|
|
504
|
+
|
|
505
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
506
|
+
<Card
|
|
507
|
+
title="Prominent Glass"
|
|
508
|
+
text="Enhanced distortion with maximum depth and visual impact."
|
|
509
|
+
image="https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=400"
|
|
510
|
+
imageAlt="Prominent"
|
|
511
|
+
glass={{
|
|
512
|
+
mode: 'prominent',
|
|
513
|
+
displacementScale: 100,
|
|
514
|
+
blurAmount: 2.5,
|
|
515
|
+
saturation: 200,
|
|
516
|
+
aberrationIntensity: 4,
|
|
517
|
+
}}
|
|
518
|
+
actions={<button className="c-btn c-btn--success c-btn--sm">View</button>}
|
|
519
|
+
/>
|
|
520
|
+
</GridCol>
|
|
521
|
+
|
|
522
|
+
<GridCol sm={6} lg={3} className="u-mb-4">
|
|
523
|
+
<Card
|
|
524
|
+
title="Shader Glass"
|
|
525
|
+
text="GPU-accelerated liquid glass with smooth animations."
|
|
526
|
+
image="https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=400"
|
|
527
|
+
imageAlt="Shader"
|
|
528
|
+
glass={{
|
|
529
|
+
mode: 'shader',
|
|
530
|
+
shaderVariant: 'liquidGlass',
|
|
531
|
+
displacementScale: 70,
|
|
532
|
+
blurAmount: 1.8,
|
|
533
|
+
saturation: 170,
|
|
534
|
+
}}
|
|
535
|
+
actions={<button className="c-btn c-btn--info c-btn--sm">View</button>}
|
|
536
|
+
/>
|
|
537
|
+
</GridCol>
|
|
538
|
+
</Grid>
|
|
539
|
+
</Container>
|
|
540
|
+
</div>
|
|
541
|
+
),
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
// Glass Card Gallery
|
|
545
|
+
export const GlassCardGallery: Story = {
|
|
546
|
+
render: () => (
|
|
547
|
+
<div
|
|
548
|
+
style={{
|
|
549
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920)',
|
|
550
|
+
backgroundSize: 'cover',
|
|
551
|
+
backgroundPosition: 'center',
|
|
552
|
+
padding: '3rem',
|
|
553
|
+
borderRadius: '12px',
|
|
554
|
+
minHeight: '95vh',
|
|
555
|
+
minWidth: '95vw',
|
|
556
|
+
overflow: 'auto',
|
|
557
|
+
}}
|
|
558
|
+
>
|
|
559
|
+
<Container>
|
|
560
|
+
<h2
|
|
561
|
+
style={{
|
|
562
|
+
textAlign: 'center',
|
|
563
|
+
color: 'white',
|
|
564
|
+
marginBottom: '3rem',
|
|
565
|
+
fontSize: '2rem',
|
|
566
|
+
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
567
|
+
}}
|
|
568
|
+
>
|
|
569
|
+
Glass Card Gallery
|
|
570
|
+
</h2>
|
|
571
|
+
|
|
572
|
+
<Grid alignItems="stretch">
|
|
573
|
+
<GridCol sm={6} lg={4} className="u-mb-4">
|
|
574
|
+
<Card
|
|
575
|
+
title="Nature Photography"
|
|
576
|
+
text="Explore breathtaking landscapes and natural wonders from around the world."
|
|
577
|
+
image="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600"
|
|
578
|
+
imageAlt="Nature"
|
|
579
|
+
glass={true}
|
|
580
|
+
actions={
|
|
581
|
+
<React.Fragment>
|
|
582
|
+
<button className="c-btn c-btn--primary c-btn--sm">Explore</button>
|
|
583
|
+
<button className="c-btn c-btn--outline-primary c-btn--sm">Save</button>
|
|
584
|
+
</React.Fragment>
|
|
585
|
+
}
|
|
586
|
+
/>
|
|
587
|
+
</GridCol>
|
|
588
|
+
|
|
589
|
+
<GridCol sm={6} lg={4} className="u-mb-4">
|
|
590
|
+
<Card
|
|
591
|
+
title="Urban Architecture"
|
|
592
|
+
text="Discover modern architectural designs and city landscapes."
|
|
593
|
+
image="https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?w=600"
|
|
594
|
+
imageAlt="Architecture"
|
|
595
|
+
glass={true}
|
|
596
|
+
actions={
|
|
597
|
+
<React.Fragment>
|
|
598
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Explore</button>
|
|
599
|
+
<button className="c-btn c-btn--outline-secondary c-btn--sm">Save</button>
|
|
600
|
+
</React.Fragment>
|
|
601
|
+
}
|
|
602
|
+
/>
|
|
603
|
+
</GridCol>
|
|
604
|
+
|
|
605
|
+
<GridCol sm={6} lg={4} className="u-mb-4">
|
|
606
|
+
<Card
|
|
607
|
+
title="Abstract Art"
|
|
608
|
+
text="Experience vibrant colors and unique artistic expressions."
|
|
609
|
+
image="https://images.unsplash.com/photo-1557672172-298e090bd0f1?w=600"
|
|
610
|
+
imageAlt="Abstract"
|
|
611
|
+
glass={true}
|
|
612
|
+
actions={
|
|
613
|
+
<React.Fragment>
|
|
614
|
+
<button className="c-btn c-btn--success c-btn--sm">Explore</button>
|
|
615
|
+
<button className="c-btn c-btn--outline-success c-btn--sm">Save</button>
|
|
616
|
+
</React.Fragment>
|
|
617
|
+
}
|
|
618
|
+
/>
|
|
619
|
+
</GridCol>
|
|
620
|
+
|
|
621
|
+
<GridCol sm={6} lg={4} className="u-mb-4">
|
|
622
|
+
<Card
|
|
623
|
+
title="Ocean Views"
|
|
624
|
+
text="Dive into serene ocean scenes and coastal beauty."
|
|
625
|
+
image="https://images.unsplash.com/photo-1505142468610-359e7d316be0?w=600"
|
|
626
|
+
imageAlt="Ocean"
|
|
627
|
+
glass={{
|
|
628
|
+
mode: 'polar',
|
|
629
|
+
displacementScale: 70,
|
|
630
|
+
blurAmount: 2,
|
|
631
|
+
}}
|
|
632
|
+
actions={
|
|
633
|
+
<React.Fragment>
|
|
634
|
+
<button className="c-btn c-btn--info c-btn--sm">Explore</button>
|
|
635
|
+
<button className="c-btn c-btn--outline-info c-btn--sm">Save</button>
|
|
636
|
+
</React.Fragment>
|
|
637
|
+
}
|
|
638
|
+
/>
|
|
639
|
+
</GridCol>
|
|
640
|
+
|
|
641
|
+
<GridCol sm={6} lg={4} className="u-mb-4">
|
|
642
|
+
<Card
|
|
643
|
+
title="Mountain Peaks"
|
|
644
|
+
text="Scale the heights with stunning mountain photography."
|
|
645
|
+
image="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600"
|
|
646
|
+
imageAlt="Mountains"
|
|
647
|
+
glass={{
|
|
648
|
+
mode: 'prominent',
|
|
649
|
+
displacementScale: 90,
|
|
650
|
+
}}
|
|
651
|
+
actions={
|
|
652
|
+
<React.Fragment>
|
|
653
|
+
<button className="c-btn c-btn--warning c-btn--sm">Explore</button>
|
|
654
|
+
<button className="c-btn c-btn--outline-warning c-btn--sm">Save</button>
|
|
655
|
+
</React.Fragment>
|
|
656
|
+
}
|
|
657
|
+
/>
|
|
658
|
+
</GridCol>
|
|
659
|
+
|
|
660
|
+
<GridCol sm={6} lg={4} className="u-mb-4">
|
|
661
|
+
<Card
|
|
662
|
+
title="Night Sky"
|
|
663
|
+
text="Gaze at the stars and celestial wonders above."
|
|
664
|
+
image="https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?w=600"
|
|
665
|
+
imageAlt="Night Sky"
|
|
666
|
+
glass={{
|
|
667
|
+
mode: 'shader',
|
|
668
|
+
shaderVariant: 'liquidGlass',
|
|
669
|
+
}}
|
|
670
|
+
actions={
|
|
671
|
+
<React.Fragment>
|
|
672
|
+
<button className="c-btn c-btn--dark c-btn--sm">Explore</button>
|
|
673
|
+
<button className="c-btn c-btn--outline-dark c-btn--sm">Save</button>
|
|
674
|
+
</React.Fragment>
|
|
675
|
+
}
|
|
676
|
+
/>
|
|
677
|
+
</GridCol>
|
|
678
|
+
</Grid>
|
|
679
|
+
</Container>
|
|
680
|
+
</div>
|
|
681
|
+
),
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
// Glass Card Layouts
|
|
685
|
+
export const GlassCardLayouts: Story = {
|
|
686
|
+
render: () => (
|
|
687
|
+
<div
|
|
688
|
+
style={{
|
|
689
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1920)',
|
|
690
|
+
backgroundSize: 'cover',
|
|
691
|
+
backgroundPosition: 'center',
|
|
692
|
+
padding: '3rem',
|
|
693
|
+
borderRadius: '12px',
|
|
694
|
+
minHeight: '95vh',
|
|
695
|
+
minWidth: '95vw',
|
|
696
|
+
overflow: 'auto',
|
|
697
|
+
}}
|
|
698
|
+
>
|
|
699
|
+
<Container>
|
|
700
|
+
<h2
|
|
701
|
+
style={{
|
|
702
|
+
textAlign: 'center',
|
|
703
|
+
color: 'white',
|
|
704
|
+
marginBottom: '3rem',
|
|
705
|
+
fontSize: '2rem',
|
|
706
|
+
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
707
|
+
}}
|
|
708
|
+
>
|
|
709
|
+
Glass Card Layouts
|
|
710
|
+
</h2>
|
|
711
|
+
|
|
712
|
+
<div style={{ display: 'flex', gap: '2rem' }}>
|
|
713
|
+
{/* Standard Layout */}
|
|
714
|
+
<div className="u-w-50">
|
|
715
|
+
<h3
|
|
716
|
+
style={{
|
|
717
|
+
color: 'white',
|
|
718
|
+
marginBottom: '1rem',
|
|
719
|
+
textShadow: '0 2px 4px rgba(0,0,0,0.5)',
|
|
720
|
+
}}
|
|
721
|
+
>
|
|
722
|
+
Standard Layout
|
|
723
|
+
</h3>
|
|
724
|
+
<Card
|
|
725
|
+
title="Standard Glass Card"
|
|
726
|
+
text="This is a standard glass card with vertical layout."
|
|
727
|
+
image="https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=800"
|
|
728
|
+
imageAlt="Standard"
|
|
729
|
+
glass={true}
|
|
730
|
+
actions={
|
|
731
|
+
<React.Fragment>
|
|
732
|
+
<button className="c-btn c-btn--primary c-btn--sm">Action</button>
|
|
733
|
+
<button className="c-btn c-btn--outline-primary c-btn--sm">Cancel</button>
|
|
734
|
+
</React.Fragment>
|
|
735
|
+
}
|
|
736
|
+
/>
|
|
737
|
+
</div>
|
|
738
|
+
|
|
739
|
+
{/* Row Layout */}
|
|
740
|
+
<div className="u-w-50">
|
|
741
|
+
<h3
|
|
742
|
+
style={{
|
|
743
|
+
color: 'white',
|
|
744
|
+
marginBottom: '1rem',
|
|
745
|
+
textShadow: '0 2px 4px rgba(0,0,0,0.5)',
|
|
746
|
+
}}
|
|
747
|
+
>
|
|
748
|
+
Row Layout
|
|
749
|
+
</h3>
|
|
750
|
+
<Card
|
|
751
|
+
title="Row Glass Card"
|
|
752
|
+
text="This is a row glass card with horizontal layout."
|
|
753
|
+
image="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800"
|
|
754
|
+
imageAlt="Row"
|
|
755
|
+
row={true}
|
|
756
|
+
glass={{
|
|
757
|
+
mode: 'polar',
|
|
758
|
+
displacementScale: 60,
|
|
759
|
+
elasticity: 0,
|
|
760
|
+
}}
|
|
761
|
+
actions={
|
|
762
|
+
<React.Fragment>
|
|
763
|
+
<button className="c-btn c-btn--secondary c-btn--sm">Action</button>
|
|
764
|
+
<button className="c-btn c-btn--outline-secondary c-btn--sm">Cancel</button>
|
|
765
|
+
</React.Fragment>
|
|
766
|
+
}
|
|
767
|
+
/>
|
|
768
|
+
</div>
|
|
769
|
+
|
|
770
|
+
{/* Flat Layout */}
|
|
771
|
+
<div className="u-w-50">
|
|
772
|
+
<h3
|
|
773
|
+
style={{
|
|
774
|
+
color: 'white',
|
|
775
|
+
marginBottom: '1rem',
|
|
776
|
+
textShadow: '0 2px 4px rgba(0,0,0,0.5)',
|
|
777
|
+
}}
|
|
778
|
+
>
|
|
779
|
+
Flat Layout
|
|
780
|
+
</h3>
|
|
781
|
+
<Card
|
|
782
|
+
title="Flat Glass Card"
|
|
783
|
+
text="This is a flat glass card with edge-to-edge image."
|
|
784
|
+
image="https://images.unsplash.com/photo-1519681393784-d120267933ba?w=800"
|
|
785
|
+
imageAlt="Flat"
|
|
786
|
+
flat={true}
|
|
787
|
+
glass={{
|
|
788
|
+
mode: 'shader',
|
|
789
|
+
shaderVariant: 'liquidGlass',
|
|
790
|
+
elasticity: 0,
|
|
791
|
+
}}
|
|
792
|
+
actions={
|
|
793
|
+
<React.Fragment>
|
|
794
|
+
<button className="c-btn c-btn--success c-btn--sm">Action</button>
|
|
795
|
+
<button className="c-btn c-btn--outline-success c-btn--sm">Cancel</button>
|
|
796
|
+
</React.Fragment>
|
|
797
|
+
}
|
|
798
|
+
/>
|
|
799
|
+
</div>
|
|
800
|
+
</div>
|
|
801
|
+
</Container>
|
|
802
|
+
</div>
|
|
803
|
+
),
|
|
804
|
+
};
|