@shohojdhara/atomix 0.2.3 → 0.2.5
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/README.md +19 -0
- package/dist/atomix.css +1703 -1544
- package/dist/atomix.min.css +4 -4
- package/dist/index.d.ts +1465 -963
- package/dist/index.esm.js +16289 -25908
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15650 -21780
- 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/applemix.css +15008 -0
- package/dist/themes/applemix.min.css +72 -0
- package/dist/themes/boomdevs.css +1608 -1450
- package/dist/themes/boomdevs.min.css +5 -5
- package/dist/themes/esrar.css +1702 -1543
- package/dist/themes/esrar.min.css +4 -4
- package/dist/themes/flashtrade.css +15159 -0
- package/dist/themes/flashtrade.min.css +86 -0
- package/dist/themes/mashroom.css +1699 -1540
- package/dist/themes/mashroom.min.css +7 -7
- package/dist/themes/shaj-default.css +1693 -1534
- package/dist/themes/shaj-default.min.css +4 -4
- package/package.json +6 -17
- package/src/components/Accordion/Accordion.stories.tsx +662 -21
- package/src/components/Accordion/Accordion.tsx +21 -14
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +106 -72
- package/src/components/AtomixGlass/AtomixGlass.tsx +529 -1195
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +400 -0
- package/src/components/AtomixGlass/GlassFilter.tsx +156 -0
- package/src/components/AtomixGlass/README.md +124 -2
- package/src/components/AtomixGlass/atomixGLass.old.tsx +1266 -0
- package/src/components/AtomixGlass/glass-utils.ts +263 -0
- package/src/components/AtomixGlass/shader-utils.ts +792 -68
- package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1250 -0
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +5768 -0
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +1065 -0
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +1129 -0
- package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +395 -0
- package/src/components/AtomixGlass/stories/shared-components.tsx +301 -0
- package/src/components/AtomixGlass/utils.ts +3 -3
- package/src/components/Avatar/Avatar.tsx +3 -0
- package/src/components/Avatar/AvatarGroup.tsx +2 -1
- package/src/components/Badge/Badge.stories.tsx +76 -55
- package/src/components/Badge/Badge.tsx +12 -14
- package/src/components/Breadcrumb/Breadcrumb.tsx +23 -4
- package/src/components/Button/Button.stories.tsx +501 -20
- package/src/components/Button/Button.tsx +5 -8
- package/src/components/Callout/Callout.stories.tsx +86 -35
- package/src/components/Callout/Callout.tsx +31 -9
- package/src/components/Card/Card.stories.tsx +565 -2
- package/src/components/Card/Card.tsx +15 -4
- package/src/components/Card/ElevationCard.tsx +2 -0
- package/src/components/Chart/AnimatedChart.tsx +179 -156
- package/src/components/Chart/AreaChart.tsx +123 -12
- package/src/components/Chart/BarChart.tsx +91 -100
- package/src/components/Chart/BaseChart.tsx +80 -0
- package/src/components/Chart/BubbleChart.tsx +114 -290
- package/src/components/Chart/CandlestickChart.tsx +282 -622
- package/src/components/Chart/Chart.stories.tsx +576 -179
- package/src/components/Chart/Chart.tsx +374 -75
- package/src/components/Chart/ChartRenderer.tsx +371 -220
- package/src/components/Chart/ChartToolbar.tsx +372 -61
- package/src/components/Chart/ChartTooltip.tsx +33 -18
- package/src/components/Chart/DonutChart.tsx +172 -254
- package/src/components/Chart/FunnelChart.tsx +169 -240
- package/src/components/Chart/GaugeChart.tsx +224 -392
- package/src/components/Chart/HeatmapChart.tsx +302 -440
- package/src/components/Chart/LineChart.tsx +148 -103
- package/src/components/Chart/MultiAxisChart.tsx +267 -395
- package/src/components/Chart/PieChart.tsx +114 -64
- package/src/components/Chart/RadarChart.tsx +202 -218
- package/src/components/Chart/ScatterChart.tsx +111 -97
- package/src/components/Chart/TreemapChart.tsx +147 -222
- package/src/components/Chart/WaterfallChart.tsx +253 -291
- package/src/components/Chart/index.ts +11 -9
- package/src/components/Chart/types.ts +85 -9
- package/src/components/Chart/utils.ts +66 -0
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +6 -3
- package/src/components/Countdown/Countdown.tsx +4 -0
- package/src/components/DataTable/DataTable.tsx +2 -1
- package/src/components/DatePicker/DatePicker.stories.tsx +689 -12
- package/src/components/DatePicker/DatePicker.tsx +3 -9
- package/src/components/DatePicker/types.ts +5 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +32 -25
- package/src/components/Dropdown/Dropdown.tsx +26 -28
- package/src/components/EdgePanel/EdgePanel.stories.tsx +473 -2
- package/src/components/EdgePanel/EdgePanel.tsx +101 -13
- package/src/components/Footer/Footer.stories.tsx +187 -60
- package/src/components/Footer/Footer.test.tsx +134 -0
- package/src/components/Footer/Footer.tsx +133 -34
- package/src/components/Footer/FooterLink.tsx +1 -1
- package/src/components/Footer/FooterSection.tsx +53 -36
- package/src/components/Footer/FooterSocialLink.tsx +32 -29
- package/src/components/Footer/README.md +82 -3
- package/src/components/Footer/index.ts +1 -1
- package/src/components/Form/Checkbox.stories.tsx +13 -5
- package/src/components/Form/Checkbox.tsx +3 -6
- package/src/components/Form/Form.stories.tsx +10 -3
- package/src/components/Form/Form.tsx +2 -0
- package/src/components/Form/FormGroup.tsx +2 -1
- package/src/components/Form/Input.stories.tsx +12 -11
- package/src/components/Form/Input.tsx +97 -95
- package/src/components/Form/Radio.stories.tsx +22 -7
- package/src/components/Form/Radio.tsx +3 -6
- package/src/components/Form/Select.stories.tsx +21 -6
- package/src/components/Form/Select.tsx +3 -5
- package/src/components/Form/Textarea.stories.tsx +13 -11
- package/src/components/Form/Textarea.tsx +88 -86
- package/src/components/Hero/Hero.stories.tsx +2 -3
- package/src/components/Hero/Hero.tsx +5 -6
- package/src/components/Icon/Icon.tsx +12 -1
- package/src/components/List/List.tsx +2 -1
- package/src/components/List/ListGroup.tsx +2 -1
- package/src/components/Messages/Messages.stories.tsx +113 -0
- package/src/components/Messages/Messages.tsx +52 -9
- package/src/components/Modal/Modal.stories.tsx +48 -32
- package/src/components/Modal/Modal.tsx +19 -24
- package/src/components/Navigation/Menu/MegaMenu.tsx +2 -2
- package/src/components/Navigation/Menu/Menu.tsx +2 -2
- package/src/components/Navigation/Nav/Nav.stories.tsx +469 -0
- package/src/components/Navigation/Nav/Nav.tsx +22 -4
- package/src/components/Navigation/Nav/NavDropdown.tsx +10 -1
- package/src/components/Navigation/Navbar/Navbar.stories.tsx +413 -0
- package/src/components/Navigation/Navbar/Navbar.tsx +70 -29
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +340 -0
- package/src/components/Navigation/SideMenu/SideMenu.tsx +29 -2
- package/src/components/Pagination/Pagination.stories.tsx +13 -6
- package/src/components/Pagination/Pagination.tsx +7 -6
- package/src/components/PhotoViewer/PhotoViewer.tsx +2 -1
- package/src/components/Popover/Popover.stories.tsx +32 -24
- package/src/components/Popover/Popover.tsx +4 -1
- package/src/components/ProductReview/ProductReview.tsx +8 -2
- package/src/components/Progress/Progress.tsx +19 -3
- package/src/components/Rating/Rating.stories.tsx +11 -6
- package/src/components/Rating/Rating.tsx +3 -5
- package/src/components/River/River.tsx +5 -5
- package/src/components/SectionIntro/SectionIntro.tsx +8 -2
- package/src/components/Slider/Slider.stories.tsx +4 -4
- package/src/components/Slider/Slider.tsx +4 -3
- package/src/components/Spinner/Spinner.tsx +19 -3
- package/src/components/Steps/Steps.stories.tsx +5 -4
- package/src/components/Steps/Steps.tsx +8 -5
- package/src/components/Tab/Tab.stories.tsx +4 -3
- package/src/components/Tab/Tab.tsx +8 -6
- package/src/components/Testimonial/Testimonial.tsx +8 -2
- package/src/components/Todo/Todo.tsx +2 -1
- package/src/components/Toggle/Toggle.stories.tsx +5 -4
- package/src/components/Toggle/Toggle.tsx +8 -5
- package/src/components/Tooltip/Tooltip.stories.tsx +40 -30
- package/src/components/Tooltip/Tooltip.tsx +9 -2
- package/src/components/Upload/Upload.stories.tsx +252 -0
- package/src/components/Upload/Upload.tsx +92 -53
- package/src/components/VideoPlayer/VideoPlayer.tsx +3 -1
- package/src/components/index.ts +0 -4
- package/src/layouts/Grid/Grid.stories.tsx +10 -23
- package/src/layouts/Grid/Grid.tsx +20 -1
- package/src/layouts/Grid/GridCol.tsx +76 -48
- package/src/lib/composables/useAtomixGlass.ts +861 -44
- package/src/lib/composables/useBarChart.ts +21 -4
- package/src/lib/composables/useChart.ts +227 -370
- package/src/lib/composables/useChartExport.ts +19 -78
- package/src/lib/composables/useChartToolbar.ts +11 -21
- package/src/lib/composables/useEdgePanel.ts +125 -71
- package/src/lib/composables/useFooter.ts +3 -3
- package/src/lib/composables/useGlassContainer.ts +16 -7
- package/src/lib/composables/useLineChart.ts +11 -2
- package/src/lib/composables/usePieChart.ts +4 -14
- package/src/lib/composables/useRiver.ts +5 -0
- package/src/lib/composables/useSlider.ts +62 -24
- package/src/lib/composables/useVideoPlayer.ts +60 -63
- package/src/lib/constants/components.ts +147 -32
- package/src/lib/types/components.ts +355 -25
- package/src/lib/utils/displacement-generator.ts +55 -49
- package/src/lib/utils/icons.ts +1 -1
- package/src/lib/utils/index.ts +16 -10
- package/src/styles/01-settings/_settings.accordion.scss +19 -19
- package/src/styles/01-settings/_settings.animations.scss +5 -5
- package/src/styles/01-settings/_settings.avatar-group.scss +1 -1
- package/src/styles/01-settings/_settings.avatar.scss +17 -17
- package/src/styles/01-settings/_settings.background.scss +0 -3
- package/src/styles/01-settings/_settings.badge.scss +1 -1
- package/src/styles/01-settings/_settings.breadcrumb.scss +1 -1
- package/src/styles/01-settings/_settings.card.scss +1 -1
- package/src/styles/01-settings/_settings.chart.scss +65 -2
- package/src/styles/01-settings/_settings.dropdown.scss +1 -1
- package/src/styles/01-settings/_settings.edge-panel.scss +1 -1
- package/src/styles/01-settings/_settings.footer.scss +35 -42
- package/src/styles/01-settings/_settings.input.scss +1 -1
- package/src/styles/01-settings/_settings.list.scss +1 -1
- package/src/styles/01-settings/_settings.rating.scss +1 -1
- package/src/styles/01-settings/_settings.tabs.scss +1 -1
- package/src/styles/01-settings/_settings.upload.scss +6 -5
- package/src/styles/02-tools/_tools.animations.scss +4 -5
- package/src/styles/02-tools/_tools.background.scss +1 -13
- package/src/styles/02-tools/_tools.glass.scss +0 -1
- package/src/styles/02-tools/_tools.utility-api.scss +91 -48
- package/src/styles/03-generic/_generic.root.scss +1 -4
- package/src/styles/04-elements/_elements.body.scss +0 -1
- package/src/styles/06-components/_components.atomix-glass.scss +249 -0
- package/src/styles/06-components/_components.badge.scss +8 -23
- package/src/styles/06-components/_components.button.scss +8 -3
- package/src/styles/06-components/_components.callout.scss +10 -5
- package/src/styles/06-components/_components.card.scss +2 -14
- package/src/styles/06-components/_components.chart.scss +969 -1449
- package/src/styles/06-components/_components.dropdown.scss +19 -7
- package/src/styles/06-components/_components.edge-panel.scss +103 -0
- package/src/styles/06-components/_components.footer.scss +166 -85
- package/src/styles/06-components/_components.input.scss +8 -9
- package/src/styles/06-components/_components.list.scss +1 -0
- package/src/styles/06-components/_components.messages.scss +176 -0
- package/src/styles/06-components/_components.modal.scss +16 -4
- 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.skeleton.scss +8 -6
- package/src/styles/06-components/_components.upload.scss +219 -4
- package/src/styles/06-components/old.chart.styles.scss +1 -30
- package/src/styles/99-utilities/_index.scss +1 -0
- package/src/styles/99-utilities/_utilities.glass-fixes.scss +1 -0
- package/src/styles/99-utilities/_utilities.scss +1 -1
- package/src/components/AtomixGlass/AtomixGlass.stories.tsx +0 -3011
- package/src/components/AtomixGlass/AtomixGlassComprehensivePreview.stories.tsx +0 -1369
- package/src/components/Chart/AdvancedChart.tsx +0 -624
- package/src/components/Chart/LineChartNew.tsx +0 -167
- package/src/components/Chart/RealTimeChart.tsx +0 -436
- package/src/components/DatePicker/DatePicker copy.tsx +0 -551
|
@@ -326,7 +326,8 @@ export const GlassEffect: Story = {
|
|
|
326
326
|
Story => (
|
|
327
327
|
<div
|
|
328
328
|
style={{
|
|
329
|
-
background:
|
|
329
|
+
background:
|
|
330
|
+
'url(https://cdn.pixabay.com/photo/2022/10/02/17/23/mushroom-7494046_1280.jpg)',
|
|
330
331
|
backgroundSize: 'cover',
|
|
331
332
|
backgroundPosition: 'center',
|
|
332
333
|
padding: '10rem 25rem',
|
|
@@ -442,8 +443,7 @@ export const GlassSizes: Story = {
|
|
|
442
443
|
render: () => (
|
|
443
444
|
<div
|
|
444
445
|
style={{
|
|
445
|
-
background:
|
|
446
|
-
'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
446
|
+
background: 'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
447
447
|
backgroundSize: 'cover',
|
|
448
448
|
backgroundPosition: 'center',
|
|
449
449
|
padding: '10rem 20rem',
|
|
@@ -451,7 +451,7 @@ export const GlassSizes: Story = {
|
|
|
451
451
|
}}
|
|
452
452
|
>
|
|
453
453
|
<div className="u-d-flex u-align-items-center u-gap-2">
|
|
454
|
-
<Button label="Small Glass" variant="primary" size="sm" glass={{cornerRadius: 8}} />
|
|
454
|
+
<Button label="Small Glass" variant="primary" size="sm" glass={{ cornerRadius: 8 }} />
|
|
455
455
|
<Button label="Medium Glass" variant="primary" size="md" glass />
|
|
456
456
|
<Button label="Large Glass" variant="primary" size="lg" glass />
|
|
457
457
|
</div>
|
|
@@ -469,8 +469,7 @@ export const GlassWithIcons: Story = {
|
|
|
469
469
|
render: () => (
|
|
470
470
|
<div
|
|
471
471
|
style={{
|
|
472
|
-
background:
|
|
473
|
-
'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
472
|
+
background: 'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
474
473
|
backgroundSize: 'cover',
|
|
475
474
|
backgroundPosition: 'center',
|
|
476
475
|
padding: '25rem',
|
|
@@ -478,10 +477,29 @@ export const GlassWithIcons: Story = {
|
|
|
478
477
|
}}
|
|
479
478
|
>
|
|
480
479
|
<div className="u-d-flex u-flex-wrap u-gap-2">
|
|
481
|
-
<Button label="With Icon" variant="primary" icon={<Icon />} glass={{cornerRadius: 12}} />
|
|
482
|
-
<Button
|
|
483
|
-
|
|
484
|
-
|
|
480
|
+
<Button label="With Icon" variant="primary" icon={<Icon />} glass={{ cornerRadius: 12 }} />
|
|
481
|
+
<Button
|
|
482
|
+
label="Icon Only"
|
|
483
|
+
variant="error"
|
|
484
|
+
icon={<Icon />}
|
|
485
|
+
iconOnly
|
|
486
|
+
glass={{ cornerRadius: 12 }}
|
|
487
|
+
/>
|
|
488
|
+
<Button
|
|
489
|
+
label="Rounded Glass"
|
|
490
|
+
variant="success"
|
|
491
|
+
icon={<Icon />}
|
|
492
|
+
rounded
|
|
493
|
+
glass={{ cornerRadius: 24 }}
|
|
494
|
+
/>
|
|
495
|
+
<Button
|
|
496
|
+
label="Rounded Icon"
|
|
497
|
+
variant="info"
|
|
498
|
+
icon={<Icon />}
|
|
499
|
+
iconOnly
|
|
500
|
+
rounded
|
|
501
|
+
glass={{ cornerRadius: 50 }}
|
|
502
|
+
/>
|
|
485
503
|
</div>
|
|
486
504
|
</div>
|
|
487
505
|
),
|
|
@@ -500,8 +518,7 @@ export const GlassRounded: Story = {
|
|
|
500
518
|
Story => (
|
|
501
519
|
<div
|
|
502
520
|
style={{
|
|
503
|
-
background:
|
|
504
|
-
'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
521
|
+
background: 'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
505
522
|
backgroundSize: 'cover',
|
|
506
523
|
backgroundPosition: 'center',
|
|
507
524
|
padding: '25rem',
|
|
@@ -526,8 +543,7 @@ export const GlassShowcase: Story = {
|
|
|
526
543
|
{/* Primary Glass Variants */}
|
|
527
544
|
<div
|
|
528
545
|
style={{
|
|
529
|
-
background:
|
|
530
|
-
'url(https://cdn.pixabay.com/photo/2021/11/13/08/50/athens-6790780_1280.jpg)',
|
|
546
|
+
background: 'url(https://cdn.pixabay.com/photo/2021/11/13/08/50/athens-6790780_1280.jpg)',
|
|
531
547
|
backgroundSize: 'cover',
|
|
532
548
|
backgroundPosition: 'center',
|
|
533
549
|
padding: '2rem',
|
|
@@ -538,12 +554,12 @@ export const GlassShowcase: Story = {
|
|
|
538
554
|
Primary Glass Variants
|
|
539
555
|
</h3>
|
|
540
556
|
<div className="u-d-flex u-flex-wrap u-gap-2 u-align-items-center">
|
|
541
|
-
<Button label="Small Glass" variant="primary" size="sm" glass={{cornerRadius: 8}} />
|
|
557
|
+
<Button label="Small Glass" variant="primary" size="sm" glass={{ cornerRadius: 8 }} />
|
|
542
558
|
<Button label="Medium Glass" variant="primary" size="md" glass />
|
|
543
559
|
<Button label="Large Glass" variant="primary" size="lg" glass />
|
|
544
560
|
<Button label="With Icon" variant="primary" icon={<Icon />} glass />
|
|
545
561
|
<Button label="Icon Only" variant="primary" icon={<Icon />} iconOnly glass />
|
|
546
|
-
<Button label="Rounded" variant="primary" rounded glass={{cornerRadius: 24}} />
|
|
562
|
+
<Button label="Rounded" variant="primary" rounded glass={{ cornerRadius: 24 }} />
|
|
547
563
|
</div>
|
|
548
564
|
</div>
|
|
549
565
|
|
|
@@ -572,8 +588,7 @@ export const GlassShowcase: Story = {
|
|
|
572
588
|
{/* Custom Glass Configuration */}
|
|
573
589
|
<div
|
|
574
590
|
style={{
|
|
575
|
-
background:
|
|
576
|
-
'url(https://cdn.pixabay.com/photo/2019/09/29/17/21/greece-4513857_1280.jpg)',
|
|
591
|
+
background: 'url(https://cdn.pixabay.com/photo/2019/09/29/17/21/greece-4513857_1280.jpg)',
|
|
577
592
|
backgroundSize: 'cover',
|
|
578
593
|
backgroundPosition: 'center',
|
|
579
594
|
padding: '2rem',
|
|
@@ -626,8 +641,7 @@ export const GlassShowcase: Story = {
|
|
|
626
641
|
{/* Light Background */}
|
|
627
642
|
<div
|
|
628
643
|
style={{
|
|
629
|
-
background:
|
|
630
|
-
'url(https://cdn.pixabay.com/photo/2019/09/29/17/21/greece-4513852_1280.jpg)',
|
|
644
|
+
background: 'url(https://cdn.pixabay.com/photo/2019/09/29/17/21/greece-4513852_1280.jpg)',
|
|
631
645
|
backgroundSize: 'cover',
|
|
632
646
|
backgroundPosition: 'center',
|
|
633
647
|
padding: '2rem',
|
|
@@ -655,3 +669,470 @@ export const GlassShowcase: Story = {
|
|
|
655
669
|
</div>
|
|
656
670
|
),
|
|
657
671
|
};
|
|
672
|
+
|
|
673
|
+
// Glass Mode Variants - Standard
|
|
674
|
+
export const GlassModeStandard: Story = {
|
|
675
|
+
args: {
|
|
676
|
+
label: 'Standard Glass Mode',
|
|
677
|
+
variant: 'primary',
|
|
678
|
+
glass: {
|
|
679
|
+
mode: 'standard',
|
|
680
|
+
displacementScale: 60,
|
|
681
|
+
blurAmount: 2,
|
|
682
|
+
saturation: 160,
|
|
683
|
+
aberrationIntensity: 2,
|
|
684
|
+
cornerRadius: 12,
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
render: args => (
|
|
688
|
+
<div
|
|
689
|
+
style={{
|
|
690
|
+
background: 'url(https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=1920)',
|
|
691
|
+
backgroundSize: 'cover',
|
|
692
|
+
backgroundPosition: 'center',
|
|
693
|
+
display: 'flex',
|
|
694
|
+
gap: '2rem',
|
|
695
|
+
flexDirection: 'column',
|
|
696
|
+
alignItems: 'center',
|
|
697
|
+
justifyContent: 'center',
|
|
698
|
+
minWidth: '95vw',
|
|
699
|
+
minHeight: '95vh',
|
|
700
|
+
}}
|
|
701
|
+
>
|
|
702
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
703
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Standard Glass Mode</h3>
|
|
704
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>
|
|
705
|
+
Classic glass morphism with blur and displacement
|
|
706
|
+
</p>
|
|
707
|
+
</div>
|
|
708
|
+
<Button {...args} />
|
|
709
|
+
</div>
|
|
710
|
+
),
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
// Glass Mode Variants - Polar
|
|
714
|
+
export const GlassModePolar: Story = {
|
|
715
|
+
args: {
|
|
716
|
+
label: 'Polar Glass Mode',
|
|
717
|
+
variant: 'secondary',
|
|
718
|
+
glass: {
|
|
719
|
+
mode: 'polar',
|
|
720
|
+
displacementScale: 80,
|
|
721
|
+
blurAmount: 1.5,
|
|
722
|
+
saturation: 180,
|
|
723
|
+
aberrationIntensity: 3,
|
|
724
|
+
cornerRadius: 12,
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
render: args => (
|
|
728
|
+
<div
|
|
729
|
+
style={{
|
|
730
|
+
background: 'url(https://images.unsplash.com/photo-1557683316-973673baf926?w=1920)',
|
|
731
|
+
backgroundSize: 'cover',
|
|
732
|
+
backgroundPosition: 'center',
|
|
733
|
+
borderRadius: '12px',
|
|
734
|
+
display: 'flex',
|
|
735
|
+
gap: '2rem',
|
|
736
|
+
flexDirection: 'column',
|
|
737
|
+
alignItems: 'center',
|
|
738
|
+
justifyContent: 'center',
|
|
739
|
+
minWidth: '95vw',
|
|
740
|
+
minHeight: '95vh',
|
|
741
|
+
}}
|
|
742
|
+
>
|
|
743
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
744
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Polar Glass Mode</h3>
|
|
745
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>Radial distortion effect from center</p>
|
|
746
|
+
</div>
|
|
747
|
+
<Button {...args} />
|
|
748
|
+
</div>
|
|
749
|
+
),
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
// Glass Mode Variants - Prominent
|
|
753
|
+
export const GlassModeProminent: Story = {
|
|
754
|
+
args: {
|
|
755
|
+
label: 'Prominent Glass Mode',
|
|
756
|
+
variant: 'success',
|
|
757
|
+
glass: {
|
|
758
|
+
mode: 'prominent',
|
|
759
|
+
displacementScale: 100,
|
|
760
|
+
blurAmount: 2.5,
|
|
761
|
+
saturation: 200,
|
|
762
|
+
aberrationIntensity: 4,
|
|
763
|
+
cornerRadius: 12,
|
|
764
|
+
},
|
|
765
|
+
},
|
|
766
|
+
render: args => (
|
|
767
|
+
<div
|
|
768
|
+
style={{
|
|
769
|
+
background: 'url(https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=1920)',
|
|
770
|
+
backgroundSize: 'cover',
|
|
771
|
+
backgroundPosition: 'center',
|
|
772
|
+
borderRadius: '12px',
|
|
773
|
+
display: 'flex',
|
|
774
|
+
gap: '2rem',
|
|
775
|
+
flexDirection: 'column',
|
|
776
|
+
alignItems: 'center',
|
|
777
|
+
justifyContent: 'center',
|
|
778
|
+
minWidth: '95vw',
|
|
779
|
+
minHeight: '95vh',
|
|
780
|
+
}}
|
|
781
|
+
>
|
|
782
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
783
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Prominent Glass Mode</h3>
|
|
784
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>Enhanced distortion with maximum depth</p>
|
|
785
|
+
</div>
|
|
786
|
+
<Button {...args} />
|
|
787
|
+
</div>
|
|
788
|
+
),
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
// Glass Mode Variants - Shader
|
|
792
|
+
export const GlassModeShader: Story = {
|
|
793
|
+
args: {
|
|
794
|
+
label: 'Shader Glass Mode',
|
|
795
|
+
variant: 'info',
|
|
796
|
+
glass: {
|
|
797
|
+
mode: 'shader',
|
|
798
|
+
shaderVariant: 'liquidGlass',
|
|
799
|
+
displacementScale: 70,
|
|
800
|
+
blurAmount: 1.8,
|
|
801
|
+
saturation: 170,
|
|
802
|
+
cornerRadius: 12,
|
|
803
|
+
},
|
|
804
|
+
},
|
|
805
|
+
render: args => (
|
|
806
|
+
<div
|
|
807
|
+
style={{
|
|
808
|
+
background: 'url(https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=1920)',
|
|
809
|
+
backgroundSize: 'cover',
|
|
810
|
+
backgroundPosition: 'center',
|
|
811
|
+
borderRadius: '12px',
|
|
812
|
+
display: 'flex',
|
|
813
|
+
gap: '2rem',
|
|
814
|
+
flexDirection: 'column',
|
|
815
|
+
alignItems: 'center',
|
|
816
|
+
justifyContent: 'center',
|
|
817
|
+
minWidth: '95vw',
|
|
818
|
+
minHeight: '95vh',
|
|
819
|
+
}}
|
|
820
|
+
>
|
|
821
|
+
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
822
|
+
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Shader Glass Mode</h3>
|
|
823
|
+
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>GPU-accelerated liquid glass effect</p>
|
|
824
|
+
</div>
|
|
825
|
+
<Button {...args} />
|
|
826
|
+
</div>
|
|
827
|
+
),
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
// All Glass Modes Comparison
|
|
831
|
+
export const AllGlassModes: Story = {
|
|
832
|
+
render: () => (
|
|
833
|
+
<div
|
|
834
|
+
style={{
|
|
835
|
+
background: 'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920)',
|
|
836
|
+
backgroundSize: 'cover',
|
|
837
|
+
backgroundPosition: 'center',
|
|
838
|
+
padding: '3rem',
|
|
839
|
+
borderRadius: '12px',
|
|
840
|
+
minHeight: '90vh',
|
|
841
|
+
minWidth: '90vw',
|
|
842
|
+
}}
|
|
843
|
+
>
|
|
844
|
+
<div style={{ width: '90vw', margin: '0 auto' }}>
|
|
845
|
+
<h2
|
|
846
|
+
style={{
|
|
847
|
+
textAlign: 'center',
|
|
848
|
+
color: 'white',
|
|
849
|
+
marginBottom: '3rem',
|
|
850
|
+
fontSize: '2rem',
|
|
851
|
+
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
852
|
+
}}
|
|
853
|
+
>
|
|
854
|
+
Glass Mode Variants Comparison
|
|
855
|
+
</h2>
|
|
856
|
+
|
|
857
|
+
<div
|
|
858
|
+
style={{
|
|
859
|
+
display: 'grid',
|
|
860
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))',
|
|
861
|
+
gap: '2rem',
|
|
862
|
+
}}
|
|
863
|
+
>
|
|
864
|
+
{/* Standard Mode */}
|
|
865
|
+
<div
|
|
866
|
+
style={{
|
|
867
|
+
background: 'rgba(255,255,255,0.1)',
|
|
868
|
+
padding: '2rem',
|
|
869
|
+
borderRadius: '12px',
|
|
870
|
+
textAlign: 'center',
|
|
871
|
+
display: 'flex',
|
|
872
|
+
flexDirection: 'column',
|
|
873
|
+
alignItems: 'center',
|
|
874
|
+
}}
|
|
875
|
+
>
|
|
876
|
+
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Standard</h3>
|
|
877
|
+
<p
|
|
878
|
+
style={{
|
|
879
|
+
color: 'rgba(255,255,255,0.8)',
|
|
880
|
+
fontSize: '0.875rem',
|
|
881
|
+
marginBottom: '1.5rem',
|
|
882
|
+
}}
|
|
883
|
+
>
|
|
884
|
+
Classic blur and displacement
|
|
885
|
+
</p>
|
|
886
|
+
<Button
|
|
887
|
+
label="Standard Glass"
|
|
888
|
+
variant="primary"
|
|
889
|
+
glass={{
|
|
890
|
+
mode: 'standard',
|
|
891
|
+
displacementScale: 60,
|
|
892
|
+
blurAmount: 2,
|
|
893
|
+
saturation: 160,
|
|
894
|
+
aberrationIntensity: 2,
|
|
895
|
+
}}
|
|
896
|
+
/>
|
|
897
|
+
</div>
|
|
898
|
+
|
|
899
|
+
{/* Polar Mode */}
|
|
900
|
+
<div
|
|
901
|
+
style={{
|
|
902
|
+
background: 'rgba(255,255,255,0.1)',
|
|
903
|
+
padding: '2rem',
|
|
904
|
+
borderRadius: '12px',
|
|
905
|
+
textAlign: 'center',
|
|
906
|
+
display: 'flex',
|
|
907
|
+
flexDirection: 'column',
|
|
908
|
+
alignItems: 'center',
|
|
909
|
+
}}
|
|
910
|
+
>
|
|
911
|
+
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Polar</h3>
|
|
912
|
+
<p
|
|
913
|
+
style={{
|
|
914
|
+
color: 'rgba(255,255,255,0.8)',
|
|
915
|
+
fontSize: '0.875rem',
|
|
916
|
+
marginBottom: '1.5rem',
|
|
917
|
+
}}
|
|
918
|
+
>
|
|
919
|
+
Radial distortion effect
|
|
920
|
+
</p>
|
|
921
|
+
<Button
|
|
922
|
+
label="Polar Glass"
|
|
923
|
+
variant="secondary"
|
|
924
|
+
glass={{
|
|
925
|
+
mode: 'polar',
|
|
926
|
+
displacementScale: 80,
|
|
927
|
+
blurAmount: 1.5,
|
|
928
|
+
saturation: 180,
|
|
929
|
+
aberrationIntensity: 3,
|
|
930
|
+
}}
|
|
931
|
+
/>
|
|
932
|
+
</div>
|
|
933
|
+
|
|
934
|
+
{/* Prominent Mode */}
|
|
935
|
+
<div
|
|
936
|
+
style={{
|
|
937
|
+
background: 'rgba(255,255,255,0.1)',
|
|
938
|
+
padding: '2rem',
|
|
939
|
+
borderRadius: '12px',
|
|
940
|
+
textAlign: 'center',
|
|
941
|
+
display: 'flex',
|
|
942
|
+
flexDirection: 'column',
|
|
943
|
+
alignItems: 'center',
|
|
944
|
+
}}
|
|
945
|
+
>
|
|
946
|
+
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Prominent</h3>
|
|
947
|
+
<p
|
|
948
|
+
style={{
|
|
949
|
+
color: 'rgba(255,255,255,0.8)',
|
|
950
|
+
fontSize: '0.875rem',
|
|
951
|
+
marginBottom: '1.5rem',
|
|
952
|
+
}}
|
|
953
|
+
>
|
|
954
|
+
Maximum depth and distortion
|
|
955
|
+
</p>
|
|
956
|
+
<Button
|
|
957
|
+
label="Prominent Glass"
|
|
958
|
+
variant="success"
|
|
959
|
+
glass={{
|
|
960
|
+
mode: 'prominent',
|
|
961
|
+
displacementScale: 100,
|
|
962
|
+
blurAmount: 2.5,
|
|
963
|
+
saturation: 200,
|
|
964
|
+
aberrationIntensity: 4,
|
|
965
|
+
}}
|
|
966
|
+
/>
|
|
967
|
+
</div>
|
|
968
|
+
|
|
969
|
+
{/* Shader Mode */}
|
|
970
|
+
<div
|
|
971
|
+
style={{
|
|
972
|
+
background: 'rgba(255,255,255,0.1)',
|
|
973
|
+
padding: '2rem',
|
|
974
|
+
borderRadius: '12px',
|
|
975
|
+
textAlign: 'center',
|
|
976
|
+
display: 'flex',
|
|
977
|
+
flexDirection: 'column',
|
|
978
|
+
alignItems: 'center',
|
|
979
|
+
}}
|
|
980
|
+
>
|
|
981
|
+
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Shader</h3>
|
|
982
|
+
<p
|
|
983
|
+
style={{
|
|
984
|
+
color: 'rgba(255,255,255,0.8)',
|
|
985
|
+
fontSize: '0.875rem',
|
|
986
|
+
marginBottom: '1.5rem',
|
|
987
|
+
}}
|
|
988
|
+
>
|
|
989
|
+
GPU-accelerated liquid glass
|
|
990
|
+
</p>
|
|
991
|
+
<Button
|
|
992
|
+
label="Shader Glass"
|
|
993
|
+
variant="info"
|
|
994
|
+
glass={{
|
|
995
|
+
mode: 'shader',
|
|
996
|
+
shaderVariant: 'liquidGlass',
|
|
997
|
+
displacementScale: 70,
|
|
998
|
+
blurAmount: 1.8,
|
|
999
|
+
saturation: 170,
|
|
1000
|
+
}}
|
|
1001
|
+
/>
|
|
1002
|
+
</div>
|
|
1003
|
+
</div>
|
|
1004
|
+
|
|
1005
|
+
{/* All Variants with Different Colors */}
|
|
1006
|
+
<div style={{ marginTop: '3rem' }}>
|
|
1007
|
+
<h3
|
|
1008
|
+
style={{
|
|
1009
|
+
textAlign: 'center',
|
|
1010
|
+
color: 'white',
|
|
1011
|
+
marginBottom: '2rem',
|
|
1012
|
+
fontSize: '1.5rem',
|
|
1013
|
+
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
1014
|
+
}}
|
|
1015
|
+
>
|
|
1016
|
+
All Color Variants with Glass
|
|
1017
|
+
</h3>
|
|
1018
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '1rem', justifyContent: 'center' }}>
|
|
1019
|
+
<Button label="Primary" variant="primary" glass />
|
|
1020
|
+
<Button label="Secondary" variant="secondary" glass />
|
|
1021
|
+
<Button label="Success" variant="success" glass />
|
|
1022
|
+
<Button label="Info" variant="info" glass />
|
|
1023
|
+
<Button label="Warning" variant="warning" glass />
|
|
1024
|
+
<Button label="Error" variant="error" glass />
|
|
1025
|
+
<Button label="Light" variant="light" glass />
|
|
1026
|
+
<Button label="Dark" variant="dark" glass />
|
|
1027
|
+
</div>
|
|
1028
|
+
</div>
|
|
1029
|
+
</div>
|
|
1030
|
+
</div>
|
|
1031
|
+
),
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
// Glass Button States Showcase
|
|
1035
|
+
export const GlassStatesShowcase: Story = {
|
|
1036
|
+
render: () => (
|
|
1037
|
+
<div
|
|
1038
|
+
style={{
|
|
1039
|
+
background: 'url(https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920)',
|
|
1040
|
+
backgroundSize: 'cover',
|
|
1041
|
+
backgroundPosition: 'center',
|
|
1042
|
+
padding: '3rem',
|
|
1043
|
+
borderRadius: '12px',
|
|
1044
|
+
minHeight: '90vh',
|
|
1045
|
+
}}
|
|
1046
|
+
>
|
|
1047
|
+
<div style={{ maxWidth: '1200px', margin: '0 auto' }}>
|
|
1048
|
+
<h2
|
|
1049
|
+
style={{
|
|
1050
|
+
textAlign: 'center',
|
|
1051
|
+
color: 'white',
|
|
1052
|
+
marginBottom: '3rem',
|
|
1053
|
+
fontSize: '2rem',
|
|
1054
|
+
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
1055
|
+
}}
|
|
1056
|
+
>
|
|
1057
|
+
Glass Button States & Interactions
|
|
1058
|
+
</h2>
|
|
1059
|
+
|
|
1060
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '3rem' }}>
|
|
1061
|
+
{/* Sizes */}
|
|
1062
|
+
<div
|
|
1063
|
+
style={{
|
|
1064
|
+
background: 'rgba(255,255,255,0.08)',
|
|
1065
|
+
padding: '2rem',
|
|
1066
|
+
borderRadius: '12px',
|
|
1067
|
+
backdropFilter: 'blur(10px)',
|
|
1068
|
+
}}
|
|
1069
|
+
>
|
|
1070
|
+
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>Sizes</h3>
|
|
1071
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1072
|
+
<Button label="Small" variant="primary" size="sm" glass={{ cornerRadius: 8 }} />
|
|
1073
|
+
<Button label="Medium" variant="primary" size="md" glass={{ cornerRadius: 12 }} />
|
|
1074
|
+
<Button label="Large" variant="primary" size="lg" glass={{ cornerRadius: 16 }} />
|
|
1075
|
+
</div>
|
|
1076
|
+
</div>
|
|
1077
|
+
|
|
1078
|
+
{/* With Icons */}
|
|
1079
|
+
<div
|
|
1080
|
+
style={{
|
|
1081
|
+
background: 'rgba(255,255,255,0.08)',
|
|
1082
|
+
padding: '2rem',
|
|
1083
|
+
borderRadius: '12px',
|
|
1084
|
+
backdropFilter: 'blur(10px)',
|
|
1085
|
+
}}
|
|
1086
|
+
>
|
|
1087
|
+
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>With Icons</h3>
|
|
1088
|
+
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1089
|
+
<Button label="With Icon" variant="primary" icon={<Icon />} glass />
|
|
1090
|
+
<Button label="Icon Only" variant="secondary" icon={<Icon />} iconOnly glass />
|
|
1091
|
+
<Button
|
|
1092
|
+
label="Rounded"
|
|
1093
|
+
variant="success"
|
|
1094
|
+
icon={<Icon />}
|
|
1095
|
+
rounded
|
|
1096
|
+
glass={{ cornerRadius: 24 }}
|
|
1097
|
+
/>
|
|
1098
|
+
</div>
|
|
1099
|
+
</div>
|
|
1100
|
+
|
|
1101
|
+
{/* Outline Variants */}
|
|
1102
|
+
<div
|
|
1103
|
+
style={{
|
|
1104
|
+
background: 'rgba(255,255,255,0.08)',
|
|
1105
|
+
padding: '2rem',
|
|
1106
|
+
borderRadius: '12px',
|
|
1107
|
+
backdropFilter: 'blur(10px)',
|
|
1108
|
+
}}
|
|
1109
|
+
>
|
|
1110
|
+
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>Outline Variants</h3>
|
|
1111
|
+
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1112
|
+
<Button label="Outline Primary" variant="outline-primary" glass />
|
|
1113
|
+
<Button label="Outline Secondary" variant="outline-secondary" glass />
|
|
1114
|
+
<Button label="Outline Success" variant="outline-success" glass />
|
|
1115
|
+
<Button label="Outline Error" variant="outline-error" glass />
|
|
1116
|
+
</div>
|
|
1117
|
+
</div>
|
|
1118
|
+
|
|
1119
|
+
{/* Disabled State */}
|
|
1120
|
+
<div
|
|
1121
|
+
style={{
|
|
1122
|
+
background: 'rgba(255,255,255,0.08)',
|
|
1123
|
+
padding: '2rem',
|
|
1124
|
+
borderRadius: '12px',
|
|
1125
|
+
backdropFilter: 'blur(10px)',
|
|
1126
|
+
}}
|
|
1127
|
+
>
|
|
1128
|
+
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>Disabled State</h3>
|
|
1129
|
+
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1130
|
+
<Button label="Disabled Glass" variant="primary" disabled glass />
|
|
1131
|
+
<Button label="Disabled Outline" variant="outline-primary" disabled glass />
|
|
1132
|
+
</div>
|
|
1133
|
+
</div>
|
|
1134
|
+
</div>
|
|
1135
|
+
</div>
|
|
1136
|
+
</div>
|
|
1137
|
+
),
|
|
1138
|
+
};
|
|
@@ -25,6 +25,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps & ButtonAsProp>(
|
|
|
25
25
|
className = '',
|
|
26
26
|
as: Component = 'button',
|
|
27
27
|
glass,
|
|
28
|
+
style,
|
|
28
29
|
...props
|
|
29
30
|
},
|
|
30
31
|
ref
|
|
@@ -57,7 +58,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps & ButtonAsProp>(
|
|
|
57
58
|
onClick: handleClick(onClick),
|
|
58
59
|
disabled,
|
|
59
60
|
'aria-disabled': disabled,
|
|
60
|
-
style: glass ? glassStyles :
|
|
61
|
+
style: glass ? { ...glassStyles, ...style } : style,
|
|
61
62
|
...props,
|
|
62
63
|
};
|
|
63
64
|
|
|
@@ -71,14 +72,10 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps & ButtonAsProp>(
|
|
|
71
72
|
if (glass) {
|
|
72
73
|
// Default glass settings for buttons
|
|
73
74
|
const defaultGlassProps = {
|
|
74
|
-
displacementScale:
|
|
75
|
-
blurAmount:
|
|
75
|
+
displacementScale: 20,
|
|
76
|
+
blurAmount: 0,
|
|
76
77
|
saturation: 200,
|
|
77
|
-
|
|
78
|
-
cornerRadius: 12,
|
|
79
|
-
mode: 'shader' as const,
|
|
80
|
-
mouseContainer: ref,
|
|
81
|
-
onclick: ()=>{}
|
|
78
|
+
elasticity: 0,
|
|
82
79
|
};
|
|
83
80
|
|
|
84
81
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|