@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
|
@@ -402,15 +402,24 @@ const ToastDemoTemplate = () => {
|
|
|
402
402
|
left: 0,
|
|
403
403
|
right: 0,
|
|
404
404
|
bottom: 0,
|
|
405
|
-
backgroundImage:
|
|
405
|
+
backgroundImage:
|
|
406
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
406
407
|
backgroundSize: 'cover',
|
|
407
408
|
backgroundPosition: 'center',
|
|
408
409
|
opacity: 0.2,
|
|
409
410
|
zIndex: -1,
|
|
410
411
|
}}
|
|
411
412
|
/>
|
|
412
|
-
|
|
413
|
-
<div
|
|
413
|
+
|
|
414
|
+
<div
|
|
415
|
+
style={{
|
|
416
|
+
display: 'flex',
|
|
417
|
+
flexDirection: 'column',
|
|
418
|
+
gap: '16px',
|
|
419
|
+
position: 'relative',
|
|
420
|
+
zIndex: 1,
|
|
421
|
+
}}
|
|
422
|
+
>
|
|
414
423
|
<div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
|
|
415
424
|
<Button
|
|
416
425
|
label="Add Info Toast"
|
|
@@ -498,7 +507,9 @@ const ToastDemoTemplate = () => {
|
|
|
498
507
|
}}
|
|
499
508
|
>
|
|
500
509
|
<div>
|
|
501
|
-
<div style={{ marginBottom: '8px' }}
|
|
510
|
+
<div style={{ marginBottom: '8px' }}>
|
|
511
|
+
🎨 Click a button above to show toast notifications here 🎨
|
|
512
|
+
</div>
|
|
502
513
|
<small style={{ opacity: 0.8 }}>
|
|
503
514
|
Beautiful colorful backgrounds enhance the visual experience
|
|
504
515
|
</small>
|
|
@@ -575,15 +586,24 @@ const AutoDismissTemplate = () => {
|
|
|
575
586
|
left: 0,
|
|
576
587
|
right: 0,
|
|
577
588
|
bottom: 0,
|
|
578
|
-
backgroundImage:
|
|
589
|
+
backgroundImage:
|
|
590
|
+
'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80")',
|
|
579
591
|
backgroundSize: 'cover',
|
|
580
592
|
backgroundPosition: 'center',
|
|
581
593
|
opacity: 0.3,
|
|
582
594
|
zIndex: -1,
|
|
583
595
|
}}
|
|
584
596
|
/>
|
|
585
|
-
|
|
586
|
-
<div
|
|
597
|
+
|
|
598
|
+
<div
|
|
599
|
+
style={{
|
|
600
|
+
display: 'flex',
|
|
601
|
+
flexDirection: 'column',
|
|
602
|
+
gap: '16px',
|
|
603
|
+
position: 'relative',
|
|
604
|
+
zIndex: 1,
|
|
605
|
+
}}
|
|
606
|
+
>
|
|
587
607
|
{visible ? (
|
|
588
608
|
<Callout
|
|
589
609
|
title={`Auto-dismissing in ${countdown} seconds`}
|
|
@@ -631,7 +651,7 @@ const AllVariantsTemplate = () => {
|
|
|
631
651
|
};
|
|
632
652
|
|
|
633
653
|
return (
|
|
634
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px'}}>
|
|
654
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
|
|
635
655
|
{variants.map(variant => (
|
|
636
656
|
<Callout
|
|
637
657
|
key={variant}
|
|
@@ -702,10 +722,11 @@ export const Glass: Story = {
|
|
|
702
722
|
},
|
|
703
723
|
},
|
|
704
724
|
decorators: [
|
|
705
|
-
|
|
725
|
+
Story => (
|
|
706
726
|
<div
|
|
707
727
|
style={{
|
|
708
|
-
backgroundImage:
|
|
728
|
+
backgroundImage:
|
|
729
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
709
730
|
backgroundSize: 'cover',
|
|
710
731
|
backgroundPosition: 'center',
|
|
711
732
|
padding: '4rem',
|
|
@@ -734,10 +755,11 @@ export const GlassSuccess: Story = {
|
|
|
734
755
|
},
|
|
735
756
|
},
|
|
736
757
|
decorators: [
|
|
737
|
-
|
|
758
|
+
Story => (
|
|
738
759
|
<div
|
|
739
760
|
style={{
|
|
740
|
-
backgroundImage:
|
|
761
|
+
backgroundImage:
|
|
762
|
+
'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80")',
|
|
741
763
|
backgroundSize: 'cover',
|
|
742
764
|
backgroundPosition: 'center',
|
|
743
765
|
padding: '4rem',
|
|
@@ -767,10 +789,11 @@ export const GlassWarning: Story = {
|
|
|
767
789
|
},
|
|
768
790
|
},
|
|
769
791
|
decorators: [
|
|
770
|
-
|
|
792
|
+
Story => (
|
|
771
793
|
<div
|
|
772
794
|
style={{
|
|
773
|
-
backgroundImage:
|
|
795
|
+
backgroundImage:
|
|
796
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
774
797
|
backgroundSize: 'cover',
|
|
775
798
|
backgroundPosition: 'center',
|
|
776
799
|
padding: '4rem',
|
|
@@ -800,10 +823,11 @@ export const GlassError: Story = {
|
|
|
800
823
|
},
|
|
801
824
|
},
|
|
802
825
|
decorators: [
|
|
803
|
-
|
|
826
|
+
Story => (
|
|
804
827
|
<div
|
|
805
828
|
style={{
|
|
806
|
-
backgroundImage:
|
|
829
|
+
backgroundImage:
|
|
830
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
807
831
|
backgroundSize: 'cover',
|
|
808
832
|
backgroundPosition: 'center',
|
|
809
833
|
padding: '4rem',
|
|
@@ -832,10 +856,11 @@ export const GlassDark: Story = {
|
|
|
832
856
|
},
|
|
833
857
|
},
|
|
834
858
|
decorators: [
|
|
835
|
-
|
|
859
|
+
Story => (
|
|
836
860
|
<div
|
|
837
861
|
style={{
|
|
838
|
-
backgroundImage:
|
|
862
|
+
backgroundImage:
|
|
863
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
839
864
|
backgroundSize: 'cover',
|
|
840
865
|
backgroundPosition: 'center',
|
|
841
866
|
padding: '4rem',
|
|
@@ -871,10 +896,11 @@ export const GlassWithActions: Story = {
|
|
|
871
896
|
},
|
|
872
897
|
},
|
|
873
898
|
decorators: [
|
|
874
|
-
|
|
899
|
+
Story => (
|
|
875
900
|
<div
|
|
876
901
|
style={{
|
|
877
|
-
backgroundImage:
|
|
902
|
+
backgroundImage:
|
|
903
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
878
904
|
backgroundSize: 'cover',
|
|
879
905
|
backgroundPosition: 'center',
|
|
880
906
|
padding: '4rem',
|
|
@@ -906,10 +932,11 @@ export const GlassDismissible: Story = {
|
|
|
906
932
|
},
|
|
907
933
|
},
|
|
908
934
|
decorators: [
|
|
909
|
-
|
|
935
|
+
Story => (
|
|
910
936
|
<div
|
|
911
937
|
style={{
|
|
912
|
-
backgroundImage:
|
|
938
|
+
backgroundImage:
|
|
939
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
913
940
|
backgroundSize: 'cover',
|
|
914
941
|
backgroundPosition: 'center',
|
|
915
942
|
padding: '4rem',
|
|
@@ -942,10 +969,11 @@ export const GlassToast: Story = {
|
|
|
942
969
|
},
|
|
943
970
|
},
|
|
944
971
|
decorators: [
|
|
945
|
-
|
|
972
|
+
Story => (
|
|
946
973
|
<div
|
|
947
974
|
style={{
|
|
948
|
-
backgroundImage:
|
|
975
|
+
backgroundImage:
|
|
976
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
949
977
|
backgroundSize: 'cover',
|
|
950
978
|
backgroundPosition: 'center',
|
|
951
979
|
padding: '4rem',
|
|
@@ -974,10 +1002,11 @@ export const GlassOneLine: Story = {
|
|
|
974
1002
|
},
|
|
975
1003
|
},
|
|
976
1004
|
decorators: [
|
|
977
|
-
|
|
1005
|
+
Story => (
|
|
978
1006
|
<div
|
|
979
1007
|
style={{
|
|
980
|
-
backgroundImage:
|
|
1008
|
+
backgroundImage:
|
|
1009
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
981
1010
|
backgroundSize: 'cover',
|
|
982
1011
|
backgroundPosition: 'center',
|
|
983
1012
|
padding: '4rem',
|
|
@@ -1041,7 +1070,8 @@ const GlassVariantsTemplate = () => {
|
|
|
1041
1070
|
left: 0,
|
|
1042
1071
|
right: 0,
|
|
1043
1072
|
bottom: 0,
|
|
1044
|
-
backgroundImage:
|
|
1073
|
+
backgroundImage:
|
|
1074
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
1045
1075
|
backgroundSize: 'cover',
|
|
1046
1076
|
backgroundPosition: 'center',
|
|
1047
1077
|
opacity: 0.3,
|
|
@@ -1055,7 +1085,8 @@ const GlassVariantsTemplate = () => {
|
|
|
1055
1085
|
left: 0,
|
|
1056
1086
|
right: 0,
|
|
1057
1087
|
bottom: 0,
|
|
1058
|
-
backgroundImage:
|
|
1088
|
+
backgroundImage:
|
|
1089
|
+
'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80")',
|
|
1059
1090
|
backgroundSize: 'cover',
|
|
1060
1091
|
backgroundPosition: 'center',
|
|
1061
1092
|
backgroundAttachment: 'fixed',
|
|
@@ -1063,8 +1094,16 @@ const GlassVariantsTemplate = () => {
|
|
|
1063
1094
|
zIndex: -2,
|
|
1064
1095
|
}}
|
|
1065
1096
|
/>
|
|
1066
|
-
|
|
1067
|
-
<div
|
|
1097
|
+
|
|
1098
|
+
<div
|
|
1099
|
+
style={{
|
|
1100
|
+
display: 'flex',
|
|
1101
|
+
flexDirection: 'column',
|
|
1102
|
+
gap: '32px',
|
|
1103
|
+
position: 'relative',
|
|
1104
|
+
zIndex: 1,
|
|
1105
|
+
}}
|
|
1106
|
+
>
|
|
1068
1107
|
{variants.map((variant, index) => (
|
|
1069
1108
|
<div
|
|
1070
1109
|
key={variant}
|
|
@@ -1096,7 +1135,8 @@ const GlassVariantsTemplate = () => {
|
|
|
1096
1135
|
icon={getIcon(variant)}
|
|
1097
1136
|
glass
|
|
1098
1137
|
>
|
|
1099
|
-
This is an example of the {variant} callout variant with glass morphism effect against
|
|
1138
|
+
This is an example of the {variant} callout variant with glass morphism effect against
|
|
1139
|
+
a beautiful {index % 2 === 0 ? 'mountain' : 'forest'} background.
|
|
1100
1140
|
</Callout>
|
|
1101
1141
|
</div>
|
|
1102
1142
|
))}
|
|
@@ -1198,7 +1238,8 @@ const GlassToastDemoTemplate = () => {
|
|
|
1198
1238
|
left: 0,
|
|
1199
1239
|
right: 0,
|
|
1200
1240
|
bottom: 0,
|
|
1201
|
-
backgroundImage:
|
|
1241
|
+
backgroundImage:
|
|
1242
|
+
'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80")',
|
|
1202
1243
|
backgroundSize: 'cover',
|
|
1203
1244
|
backgroundPosition: 'center',
|
|
1204
1245
|
opacity: 0.3,
|
|
@@ -1206,8 +1247,16 @@ const GlassToastDemoTemplate = () => {
|
|
|
1206
1247
|
backgroundAttachment: 'fixed',
|
|
1207
1248
|
}}
|
|
1208
1249
|
/>
|
|
1209
|
-
|
|
1210
|
-
<div
|
|
1250
|
+
|
|
1251
|
+
<div
|
|
1252
|
+
style={{
|
|
1253
|
+
display: 'flex',
|
|
1254
|
+
flexDirection: 'column',
|
|
1255
|
+
gap: '16px',
|
|
1256
|
+
position: 'relative',
|
|
1257
|
+
zIndex: 1,
|
|
1258
|
+
}}
|
|
1259
|
+
>
|
|
1211
1260
|
<div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
|
|
1212
1261
|
<Button
|
|
1213
1262
|
label="Add Glass Info Toast"
|
|
@@ -1297,7 +1346,9 @@ const GlassToastDemoTemplate = () => {
|
|
|
1297
1346
|
}}
|
|
1298
1347
|
>
|
|
1299
1348
|
<div>
|
|
1300
|
-
<div style={{ marginBottom: '8px' }}
|
|
1349
|
+
<div style={{ marginBottom: '8px' }}>
|
|
1350
|
+
✨ Click a button above to show glass toast notifications here ✨
|
|
1351
|
+
</div>
|
|
1301
1352
|
<small style={{ opacity: 0.8 }}>
|
|
1302
1353
|
Beautiful colorful backgrounds help visualize the glass morphism effect
|
|
1303
1354
|
</small>
|
|
@@ -18,6 +18,7 @@ export const Callout: React.FC<CalloutProps> = ({
|
|
|
18
18
|
toast = false,
|
|
19
19
|
glass,
|
|
20
20
|
className,
|
|
21
|
+
style,
|
|
21
22
|
...props
|
|
22
23
|
}) => {
|
|
23
24
|
const { generateCalloutClass, handleClose } = useCallout({
|
|
@@ -26,6 +27,7 @@ export const Callout: React.FC<CalloutProps> = ({
|
|
|
26
27
|
toast,
|
|
27
28
|
glass,
|
|
28
29
|
className,
|
|
30
|
+
style,
|
|
29
31
|
});
|
|
30
32
|
|
|
31
33
|
// Determine appropriate ARIA attributes based on variant
|
|
@@ -66,28 +68,48 @@ export const Callout: React.FC<CalloutProps> = ({
|
|
|
66
68
|
<Icon name="X" size="md" />
|
|
67
69
|
</button>
|
|
68
70
|
)}
|
|
69
|
-
|
|
71
|
+
</>
|
|
70
72
|
);
|
|
71
73
|
|
|
72
74
|
if (glass) {
|
|
73
75
|
// Default glass settings for callouts
|
|
74
76
|
const defaultGlassProps = {
|
|
75
|
-
displacementScale:
|
|
76
|
-
blurAmount: 2,
|
|
77
|
-
saturation: 70,
|
|
78
|
-
aberrationIntensity: 1,
|
|
77
|
+
displacementScale: 30,
|
|
79
78
|
cornerRadius: 8,
|
|
80
|
-
overLight: false,
|
|
81
79
|
elasticity: 0,
|
|
82
|
-
mode: 'shader' as const,
|
|
83
80
|
};
|
|
84
81
|
|
|
85
82
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
86
83
|
|
|
87
|
-
return
|
|
84
|
+
return (
|
|
85
|
+
<div
|
|
86
|
+
className={generateCalloutClass({ variant, oneLine, toast, glass, className })}
|
|
87
|
+
{...getAriaAttributes()}
|
|
88
|
+
{...props}
|
|
89
|
+
style={style}
|
|
90
|
+
>
|
|
91
|
+
<AtomixGlass {...glassProps}>
|
|
92
|
+
<div
|
|
93
|
+
className="c-callout__glass-content"
|
|
94
|
+
style={{ borderRadius: glassProps.cornerRadius }}
|
|
95
|
+
>
|
|
96
|
+
{calloutContent}
|
|
97
|
+
</div>
|
|
98
|
+
</AtomixGlass>
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
88
101
|
}
|
|
89
102
|
|
|
90
|
-
return
|
|
103
|
+
return (
|
|
104
|
+
<div
|
|
105
|
+
className={generateCalloutClass({ variant, oneLine, toast, glass, className })}
|
|
106
|
+
{...getAriaAttributes()}
|
|
107
|
+
{...props}
|
|
108
|
+
style={style}
|
|
109
|
+
>
|
|
110
|
+
{calloutContent}
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
91
113
|
};
|
|
92
114
|
|
|
93
115
|
Callout.displayName = 'Callout';
|