@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
|
@@ -2,6 +2,7 @@ import React, { forwardRef } from 'react';
|
|
|
2
2
|
import { ProgressProps } from '../../lib/types/components';
|
|
3
3
|
import { useProgress } from '../../lib/composables/useProgress';
|
|
4
4
|
import { PROGRESS } from '../../lib/constants/components';
|
|
5
|
+
import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
|
|
5
6
|
|
|
6
7
|
export const Progress = forwardRef<HTMLDivElement, ProgressProps>(
|
|
7
8
|
(
|
|
@@ -10,8 +11,10 @@ export const Progress = forwardRef<HTMLDivElement, ProgressProps>(
|
|
|
10
11
|
variant = 'primary',
|
|
11
12
|
size = 'md',
|
|
12
13
|
className = '',
|
|
14
|
+
style,
|
|
13
15
|
disabled = false,
|
|
14
16
|
ariaLabel = PROGRESS.DEFAULTS.ARIA_LABEL,
|
|
17
|
+
glass,
|
|
15
18
|
},
|
|
16
19
|
ref
|
|
17
20
|
) => {
|
|
@@ -22,11 +25,11 @@ export const Progress = forwardRef<HTMLDivElement, ProgressProps>(
|
|
|
22
25
|
className,
|
|
23
26
|
});
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
const progressContent = (
|
|
26
29
|
<div
|
|
27
30
|
ref={ref}
|
|
28
|
-
className={progressClasses}
|
|
29
|
-
style={progressStyle}
|
|
31
|
+
className={progressClasses + (glass ? ' c-progress--glass' : '')}
|
|
32
|
+
style={{ ...progressStyle, ...style }}
|
|
30
33
|
role="progressbar"
|
|
31
34
|
aria-valuemin={0}
|
|
32
35
|
aria-valuemax={100}
|
|
@@ -37,6 +40,19 @@ export const Progress = forwardRef<HTMLDivElement, ProgressProps>(
|
|
|
37
40
|
<div className={PROGRESS.CLASSES.BAR}></div>
|
|
38
41
|
</div>
|
|
39
42
|
);
|
|
43
|
+
|
|
44
|
+
if (glass) {
|
|
45
|
+
const defaultGlassProps = {
|
|
46
|
+
displacementScale: 30,
|
|
47
|
+
blurAmount: 0.5,
|
|
48
|
+
cornerRadius: 8,
|
|
49
|
+
mode: 'shader' as const,
|
|
50
|
+
};
|
|
51
|
+
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
52
|
+
return <AtomixGlass {...glassProps}>{progressContent}</AtomixGlass>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return progressContent;
|
|
40
56
|
}
|
|
41
57
|
);
|
|
42
58
|
|
|
@@ -121,7 +121,7 @@ export const Glass = {
|
|
|
121
121
|
size: 'md',
|
|
122
122
|
glass: true,
|
|
123
123
|
},
|
|
124
|
-
render: (args) => (
|
|
124
|
+
render: (args: any) => (
|
|
125
125
|
<div
|
|
126
126
|
style={{
|
|
127
127
|
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
@@ -147,10 +147,11 @@ export const GlassInteractive = {
|
|
|
147
147
|
size: 'md',
|
|
148
148
|
glass: true,
|
|
149
149
|
},
|
|
150
|
-
render: (args) => (
|
|
150
|
+
render: (args: any) => (
|
|
151
151
|
<div
|
|
152
152
|
style={{
|
|
153
|
-
background:
|
|
153
|
+
background:
|
|
154
|
+
'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80)',
|
|
154
155
|
backgroundSize: 'cover',
|
|
155
156
|
backgroundPosition: 'center',
|
|
156
157
|
padding: '3rem',
|
|
@@ -162,7 +163,9 @@ export const GlassInteractive = {
|
|
|
162
163
|
}}
|
|
163
164
|
>
|
|
164
165
|
<div style={{ textAlign: 'center' }}>
|
|
165
|
-
<h3
|
|
166
|
+
<h3
|
|
167
|
+
style={{ color: 'white', marginBottom: '1rem', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}
|
|
168
|
+
>
|
|
166
169
|
Interactive Glass Rating
|
|
167
170
|
</h3>
|
|
168
171
|
<Rating {...args} />
|
|
@@ -187,7 +190,7 @@ export const GlassCustom = {
|
|
|
187
190
|
cornerRadius: 12,
|
|
188
191
|
},
|
|
189
192
|
},
|
|
190
|
-
render: (args) => (
|
|
193
|
+
render: (args: any) => (
|
|
191
194
|
<div
|
|
192
195
|
style={{
|
|
193
196
|
background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)',
|
|
@@ -211,7 +214,9 @@ export const GlassCustom = {
|
|
|
211
214
|
`}
|
|
212
215
|
</style>
|
|
213
216
|
<div style={{ textAlign: 'center' }}>
|
|
214
|
-
<h3
|
|
217
|
+
<h3
|
|
218
|
+
style={{ color: 'white', marginBottom: '1rem', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}
|
|
219
|
+
>
|
|
215
220
|
Custom Glass Rating
|
|
216
221
|
</h3>
|
|
217
222
|
<Rating {...args} />
|
|
@@ -32,6 +32,7 @@ export const Rating = forwardRef<HTMLDivElement, RatingProps>(
|
|
|
32
32
|
color,
|
|
33
33
|
onChange,
|
|
34
34
|
className = '',
|
|
35
|
+
style,
|
|
35
36
|
label,
|
|
36
37
|
id,
|
|
37
38
|
useVanillaJS = false,
|
|
@@ -269,6 +270,7 @@ export const Rating = forwardRef<HTMLDivElement, RatingProps>(
|
|
|
269
270
|
className={ratingClasses}
|
|
270
271
|
ref={useForkRef(internalRef, ref)}
|
|
271
272
|
id={id}
|
|
273
|
+
style={style}
|
|
272
274
|
data-readonly={readOnly ? 'true' : 'false'}
|
|
273
275
|
onMouseLeave={handleMouseLeave}
|
|
274
276
|
role={readOnly ? 'img' : 'radiogroup'}
|
|
@@ -292,11 +294,7 @@ export const Rating = forwardRef<HTMLDivElement, RatingProps>(
|
|
|
292
294
|
|
|
293
295
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
294
296
|
|
|
295
|
-
return
|
|
296
|
-
<AtomixGlass {...glassProps}>
|
|
297
|
-
{ratingContent}
|
|
298
|
-
</AtomixGlass>
|
|
299
|
-
);
|
|
297
|
+
return <AtomixGlass {...glassProps}>{ratingContent}</AtomixGlass>;
|
|
300
298
|
}
|
|
301
299
|
|
|
302
300
|
return ratingContent;
|
|
@@ -19,6 +19,7 @@ export const River: React.FC<RiverProps> = ({
|
|
|
19
19
|
showOverlay = true,
|
|
20
20
|
contentWidth,
|
|
21
21
|
className = '',
|
|
22
|
+
style,
|
|
22
23
|
}) => {
|
|
23
24
|
const {
|
|
24
25
|
generateRiverClassNames,
|
|
@@ -41,11 +42,10 @@ export const River: React.FC<RiverProps> = ({
|
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
// Create custom style for river element with content width if provided
|
|
44
|
-
const riverStyle: React.CSSProperties | undefined =
|
|
45
|
-
?
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
: undefined;
|
|
45
|
+
const riverStyle: React.CSSProperties | undefined = {
|
|
46
|
+
...(contentWidth ? { [RIVER.ATTRIBUTES.CONTENT_WIDTH]: contentWidth } : {}),
|
|
47
|
+
...style,
|
|
48
|
+
};
|
|
49
49
|
|
|
50
50
|
const renderBackground = () => {
|
|
51
51
|
if (!hasBackgroundImage) return null;
|
|
@@ -67,6 +67,11 @@ export interface SectionIntroProps {
|
|
|
67
67
|
* Additional CSS class
|
|
68
68
|
*/
|
|
69
69
|
className?: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Custom style for the section intro
|
|
73
|
+
*/
|
|
74
|
+
style?: React.CSSProperties;
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
/**
|
|
@@ -85,6 +90,7 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
85
90
|
size = 'md',
|
|
86
91
|
skeleton = false,
|
|
87
92
|
className = '',
|
|
93
|
+
style,
|
|
88
94
|
}) => {
|
|
89
95
|
const sectionIntroRef = useRef<HTMLDivElement>(null);
|
|
90
96
|
const sectionIntroInstance = useRef<any>(null);
|
|
@@ -116,7 +122,7 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
116
122
|
// Render skeleton version
|
|
117
123
|
if (skeleton) {
|
|
118
124
|
return (
|
|
119
|
-
<div className={sectionIntroClasses} ref={sectionIntroRef}>
|
|
125
|
+
<div className={sectionIntroClasses} ref={sectionIntroRef} style={style}>
|
|
120
126
|
<div className="c-sectionintro__container">
|
|
121
127
|
{label && (
|
|
122
128
|
<div className="c-sectionintro__label">
|
|
@@ -162,7 +168,7 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
162
168
|
|
|
163
169
|
// Render normal version
|
|
164
170
|
return (
|
|
165
|
-
<div className={sectionIntroClasses} ref={sectionIntroRef}>
|
|
171
|
+
<div className={sectionIntroClasses} ref={sectionIntroRef} style={style}>
|
|
166
172
|
{renderBackground()}
|
|
167
173
|
{label && <div className="c-sectionintro__label">{label}</div>}
|
|
168
174
|
<h2 className="c-sectionintro__title">{title}</h2>
|
|
@@ -799,10 +799,10 @@ export const Autoplay: Story = {
|
|
|
799
799
|
parameters: {
|
|
800
800
|
docs: {
|
|
801
801
|
description: {
|
|
802
|
-
story: 'Slider with automatic playback that cycles through slides every 3 seconds.'
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
}
|
|
802
|
+
story: 'Slider with automatic playback that cycles through slides every 3 seconds.',
|
|
803
|
+
},
|
|
804
|
+
},
|
|
805
|
+
},
|
|
806
806
|
};
|
|
807
807
|
|
|
808
808
|
export const Vertical: Story = {
|
|
@@ -20,13 +20,14 @@ export const Slider = forwardRef<HTMLDivElement, SliderProps>((props, ref) => {
|
|
|
20
20
|
navigation,
|
|
21
21
|
pagination,
|
|
22
22
|
className,
|
|
23
|
+
style,
|
|
23
24
|
onSlideChange,
|
|
24
25
|
...rest
|
|
25
26
|
} = props;
|
|
26
27
|
|
|
27
28
|
if (!slides || slides.length === 0) {
|
|
28
29
|
return (
|
|
29
|
-
<div className="c-slider c-slider--empty" style={{ height, width }}>
|
|
30
|
+
<div className="c-slider c-slider--empty" style={{ height, width, ...style }}>
|
|
30
31
|
<div className="c-slider__empty-message">No slides available</div>
|
|
31
32
|
</div>
|
|
32
33
|
);
|
|
@@ -92,7 +93,7 @@ export const Slider = forwardRef<HTMLDivElement, SliderProps>((props, ref) => {
|
|
|
92
93
|
overflow: 'hidden',
|
|
93
94
|
position: 'relative',
|
|
94
95
|
cursor: grabCursor && !touching ? 'grab' : touching ? 'grabbing' : 'default',
|
|
95
|
-
...
|
|
96
|
+
...style,
|
|
96
97
|
}}
|
|
97
98
|
onTouchStart={handleTouchStart}
|
|
98
99
|
onTouchMove={handleTouchMove}
|
|
@@ -224,4 +225,4 @@ export const Slider = forwardRef<HTMLDivElement, SliderProps>((props, ref) => {
|
|
|
224
225
|
);
|
|
225
226
|
});
|
|
226
227
|
|
|
227
|
-
Slider.displayName = 'Slider';
|
|
228
|
+
Slider.displayName = 'Slider';
|
|
@@ -2,12 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import { SpinnerProps } from '../../lib/types/components';
|
|
3
3
|
import { useSpinner } from '../../lib/composables/useSpinner';
|
|
4
4
|
import { SPINNER } from '../../lib/constants/components';
|
|
5
|
+
import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
|
|
5
6
|
|
|
6
7
|
export const Spinner: React.FC<SpinnerProps> = ({
|
|
7
8
|
size = 'md',
|
|
8
9
|
variant = 'primary',
|
|
9
10
|
fullscreen = false,
|
|
10
11
|
className = '',
|
|
12
|
+
style,
|
|
13
|
+
glass,
|
|
11
14
|
}) => {
|
|
12
15
|
const { generateSpinnerClass } = useSpinner({
|
|
13
16
|
size,
|
|
@@ -19,14 +22,27 @@ export const Spinner: React.FC<SpinnerProps> = ({
|
|
|
19
22
|
size,
|
|
20
23
|
variant,
|
|
21
24
|
fullscreen,
|
|
22
|
-
className,
|
|
25
|
+
className: `${className} ${glass ? 'c-spinner--glass' : ''}`.trim(),
|
|
23
26
|
});
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
<div className={spinnerClass} role="status">
|
|
28
|
+
const spinnerContent = (
|
|
29
|
+
<div className={spinnerClass} style={style} role="status">
|
|
27
30
|
<span className={SPINNER.VISUALLY_HIDDEN}>Loading...</span>
|
|
28
31
|
</div>
|
|
29
32
|
);
|
|
33
|
+
|
|
34
|
+
if (glass) {
|
|
35
|
+
const defaultGlassProps = {
|
|
36
|
+
displacementScale: 20,
|
|
37
|
+
blurAmount: 1,
|
|
38
|
+
cornerRadius: 999,
|
|
39
|
+
mode: 'shader' as const,
|
|
40
|
+
};
|
|
41
|
+
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
42
|
+
return <AtomixGlass {...glassProps}>{spinnerContent}</AtomixGlass>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return spinnerContent;
|
|
30
46
|
};
|
|
31
47
|
|
|
32
48
|
export type { SpinnerProps };
|
|
@@ -174,7 +174,7 @@ export const Glass = {
|
|
|
174
174
|
vertical: false,
|
|
175
175
|
glass: true,
|
|
176
176
|
},
|
|
177
|
-
render: (args) => (
|
|
177
|
+
render: (args: any) => (
|
|
178
178
|
<div
|
|
179
179
|
style={{
|
|
180
180
|
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
@@ -206,10 +206,11 @@ export const GlassVertical = {
|
|
|
206
206
|
vertical: true,
|
|
207
207
|
glass: true,
|
|
208
208
|
},
|
|
209
|
-
render: (args) => (
|
|
209
|
+
render: (args: any) => (
|
|
210
210
|
<div
|
|
211
211
|
style={{
|
|
212
|
-
background:
|
|
212
|
+
background:
|
|
213
|
+
'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80)',
|
|
213
214
|
backgroundSize: 'cover',
|
|
214
215
|
backgroundPosition: 'center',
|
|
215
216
|
padding: '2rem',
|
|
@@ -246,7 +247,7 @@ export const GlassCustom = {
|
|
|
246
247
|
cornerRadius: 12,
|
|
247
248
|
},
|
|
248
249
|
},
|
|
249
|
-
render: (args) => (
|
|
250
|
+
render: (args: any) => (
|
|
250
251
|
<div
|
|
251
252
|
style={{
|
|
252
253
|
background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)',
|
|
@@ -46,6 +46,11 @@ export interface StepsProps {
|
|
|
46
46
|
*/
|
|
47
47
|
className?: string;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Inline style for the component
|
|
51
|
+
*/
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
|
|
49
54
|
/**
|
|
50
55
|
* Glass morphism effect for the steps component
|
|
51
56
|
* Can be a boolean to enable with default settings, or an object with AtomixGlassProps to customize the effect
|
|
@@ -62,6 +67,7 @@ export const Steps: React.FC<StepsProps> = ({
|
|
|
62
67
|
vertical = false,
|
|
63
68
|
onStepChange,
|
|
64
69
|
className = '',
|
|
70
|
+
style,
|
|
65
71
|
glass,
|
|
66
72
|
}) => {
|
|
67
73
|
const [currentStep, setCurrentStep] = useState(activeIndex);
|
|
@@ -98,6 +104,7 @@ export const Steps: React.FC<StepsProps> = ({
|
|
|
98
104
|
const stepsContent = (
|
|
99
105
|
<div
|
|
100
106
|
className={`c-steps ${vertical ? STEPS.CLASSES.VERTICAL : ''} ${className}`}
|
|
107
|
+
style={style}
|
|
101
108
|
role="navigation"
|
|
102
109
|
aria-label="Steps"
|
|
103
110
|
>
|
|
@@ -131,11 +138,7 @@ export const Steps: React.FC<StepsProps> = ({
|
|
|
131
138
|
|
|
132
139
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
133
140
|
|
|
134
|
-
return
|
|
135
|
-
<AtomixGlass {...glassProps}>
|
|
136
|
-
{stepsContent}
|
|
137
|
-
</AtomixGlass>
|
|
138
|
-
);
|
|
141
|
+
return <AtomixGlass {...glassProps}>{stepsContent}</AtomixGlass>;
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
return stepsContent;
|
|
@@ -151,7 +151,7 @@ export const Glass = {
|
|
|
151
151
|
activeIndex: 0,
|
|
152
152
|
glass: true,
|
|
153
153
|
},
|
|
154
|
-
render: (args) => (
|
|
154
|
+
render: (args: any) => (
|
|
155
155
|
<div
|
|
156
156
|
style={{
|
|
157
157
|
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
@@ -195,10 +195,11 @@ export const GlassCustom = {
|
|
|
195
195
|
cornerRadius: 12,
|
|
196
196
|
},
|
|
197
197
|
},
|
|
198
|
-
render: (args) => (
|
|
198
|
+
render: (args: any) => (
|
|
199
199
|
<div
|
|
200
200
|
style={{
|
|
201
|
-
background:
|
|
201
|
+
background:
|
|
202
|
+
'url(https://images.unsplash.com/photo-1519904981063-b0cf448d479e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80)',
|
|
202
203
|
backgroundSize: 'cover',
|
|
203
204
|
backgroundPosition: 'center',
|
|
204
205
|
padding: '2rem',
|
|
@@ -46,6 +46,11 @@ export interface TabProps {
|
|
|
46
46
|
*/
|
|
47
47
|
className?: string;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Custom style for the tab component
|
|
51
|
+
*/
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
|
|
49
54
|
/**
|
|
50
55
|
* Glass morphism effect for the tab component
|
|
51
56
|
* Can be a boolean to enable with default settings, or an object with AtomixGlassProps to customize the effect
|
|
@@ -61,6 +66,7 @@ export const Tab: React.FC<TabProps> = ({
|
|
|
61
66
|
activeIndex = TAB.DEFAULTS.ACTIVE_INDEX,
|
|
62
67
|
onTabChange,
|
|
63
68
|
className = '',
|
|
69
|
+
style,
|
|
64
70
|
glass,
|
|
65
71
|
}) => {
|
|
66
72
|
const [currentTab, setCurrentTab] = useState(activeIndex);
|
|
@@ -74,7 +80,7 @@ export const Tab: React.FC<TabProps> = ({
|
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
const tabContent = (
|
|
77
|
-
<div className={`c-tabs js-atomix-tab ${className}`}>
|
|
83
|
+
<div className={`c-tabs js-atomix-tab ${className}`} style={style}>
|
|
78
84
|
<ul className="c-tabs__nav">
|
|
79
85
|
{items.map((item, index) => (
|
|
80
86
|
<li className="c-tabs__nav-item" key={`tab-nav-${index}`}>
|
|
@@ -127,11 +133,7 @@ export const Tab: React.FC<TabProps> = ({
|
|
|
127
133
|
|
|
128
134
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
129
135
|
|
|
130
|
-
return
|
|
131
|
-
<AtomixGlass {...glassProps}>
|
|
132
|
-
{tabContent}
|
|
133
|
-
</AtomixGlass>
|
|
134
|
-
);
|
|
136
|
+
return <AtomixGlass {...glassProps}>{tabContent}</AtomixGlass>;
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
return tabContent;
|
|
@@ -48,6 +48,11 @@ export interface TestimonialProps {
|
|
|
48
48
|
* Additional CSS class
|
|
49
49
|
*/
|
|
50
50
|
className?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Custom style for the testimonial
|
|
54
|
+
*/
|
|
55
|
+
style?: React.CSSProperties;
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
/**
|
|
@@ -59,6 +64,7 @@ export const Testimonial: React.FC<TestimonialProps> = ({
|
|
|
59
64
|
size = '',
|
|
60
65
|
skeleton = false,
|
|
61
66
|
className = '',
|
|
67
|
+
style,
|
|
62
68
|
}) => {
|
|
63
69
|
const testimonialRef = useRef<HTMLDivElement>(null);
|
|
64
70
|
const testimonialInstance = useRef<any>(null);
|
|
@@ -88,7 +94,7 @@ export const Testimonial: React.FC<TestimonialProps> = ({
|
|
|
88
94
|
// Render skeleton version
|
|
89
95
|
if (skeleton) {
|
|
90
96
|
return (
|
|
91
|
-
<div className={testimonialClasses} ref={testimonialRef}>
|
|
97
|
+
<div className={testimonialClasses} ref={testimonialRef} style={style}>
|
|
92
98
|
<blockquote className="c-testimonial__quote">
|
|
93
99
|
<span className="c-skeleton"></span>
|
|
94
100
|
<span className="c-skeleton"></span>
|
|
@@ -112,7 +118,7 @@ export const Testimonial: React.FC<TestimonialProps> = ({
|
|
|
112
118
|
|
|
113
119
|
// Render normal version
|
|
114
120
|
return (
|
|
115
|
-
<div className={testimonialClasses} ref={testimonialRef}>
|
|
121
|
+
<div className={testimonialClasses} ref={testimonialRef} style={style}>
|
|
116
122
|
<blockquote className="c-testimonial__quote">{quote}</blockquote>
|
|
117
123
|
{author && (
|
|
118
124
|
<div className="c-testimonial__author">
|
|
@@ -15,6 +15,7 @@ export const Todo: React.FC<TodoProps> = ({
|
|
|
15
15
|
placeholder = 'Add a new todo',
|
|
16
16
|
showCompleted = true,
|
|
17
17
|
className = '',
|
|
18
|
+
style,
|
|
18
19
|
disabled = false,
|
|
19
20
|
}) => {
|
|
20
21
|
const { inputText, setInputText, addTodo, generateTodoClasses, generateItemClasses } = useTodo({
|
|
@@ -89,7 +90,7 @@ export const Todo: React.FC<TodoProps> = ({
|
|
|
89
90
|
const todoClass = generateTodoClasses({ size, className, disabled });
|
|
90
91
|
|
|
91
92
|
return (
|
|
92
|
-
<div className={todoClass}>
|
|
93
|
+
<div className={todoClass} style={style}>
|
|
93
94
|
{title && <h2 className="c-todo__title">{title}</h2>}
|
|
94
95
|
|
|
95
96
|
<form className="c-todo__form" onSubmit={handleFormSubmit}>
|
|
@@ -58,7 +58,7 @@ export const Glass = {
|
|
|
58
58
|
disabled: false,
|
|
59
59
|
glass: true,
|
|
60
60
|
},
|
|
61
|
-
render: (args) => (
|
|
61
|
+
render: (args: any) => (
|
|
62
62
|
<div
|
|
63
63
|
style={{
|
|
64
64
|
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
@@ -81,10 +81,11 @@ export const GlassOn = {
|
|
|
81
81
|
disabled: false,
|
|
82
82
|
glass: true,
|
|
83
83
|
},
|
|
84
|
-
render: (args) => (
|
|
84
|
+
render: (args: any) => (
|
|
85
85
|
<div
|
|
86
86
|
style={{
|
|
87
|
-
background:
|
|
87
|
+
background:
|
|
88
|
+
'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80)',
|
|
88
89
|
backgroundSize: 'cover',
|
|
89
90
|
backgroundPosition: 'center',
|
|
90
91
|
padding: '3rem',
|
|
@@ -112,7 +113,7 @@ export const GlassCustom = {
|
|
|
112
113
|
cornerRadius: 12,
|
|
113
114
|
},
|
|
114
115
|
},
|
|
115
|
-
render: (args) => (
|
|
116
|
+
render: (args: any) => (
|
|
116
117
|
<div
|
|
117
118
|
style={{
|
|
118
119
|
background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)',
|
|
@@ -29,6 +29,11 @@ export interface ToggleProps {
|
|
|
29
29
|
*/
|
|
30
30
|
className?: string;
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Inline style for the component
|
|
34
|
+
*/
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
|
|
32
37
|
/**
|
|
33
38
|
* Glass morphism effect for the toggle
|
|
34
39
|
* Can be a boolean to enable with default settings, or an object with AtomixGlassProps to customize the effect
|
|
@@ -45,6 +50,7 @@ export const Toggle: React.FC<ToggleProps> = ({
|
|
|
45
50
|
onToggleOff,
|
|
46
51
|
disabled = false,
|
|
47
52
|
className = '',
|
|
53
|
+
style,
|
|
48
54
|
glass,
|
|
49
55
|
}) => {
|
|
50
56
|
const [isOn, setIsOn] = useState(initialOn);
|
|
@@ -76,6 +82,7 @@ export const Toggle: React.FC<ToggleProps> = ({
|
|
|
76
82
|
const toggleContent = (
|
|
77
83
|
<div
|
|
78
84
|
className={`c-toggle ${isOn ? TOGGLE.CLASSES.IS_ON : ''} ${disabled ? 'is-disabled' : ''} ${className}`}
|
|
85
|
+
style={style}
|
|
79
86
|
onClick={handleClick}
|
|
80
87
|
onKeyDown={handleKeyDown}
|
|
81
88
|
role="switch"
|
|
@@ -100,11 +107,7 @@ export const Toggle: React.FC<ToggleProps> = ({
|
|
|
100
107
|
|
|
101
108
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
102
109
|
|
|
103
|
-
return
|
|
104
|
-
<AtomixGlass {...glassProps}>
|
|
105
|
-
{toggleContent}
|
|
106
|
-
</AtomixGlass>
|
|
107
|
-
);
|
|
110
|
+
return <AtomixGlass {...glassProps}>{toggleContent}</AtomixGlass>;
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
return toggleContent;
|
|
@@ -129,12 +129,14 @@ GlassTooltip.args = {
|
|
|
129
129
|
glass: true,
|
|
130
130
|
};
|
|
131
131
|
GlassTooltip.decorators = [
|
|
132
|
-
|
|
133
|
-
<div
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
Story => (
|
|
133
|
+
<div
|
|
134
|
+
style={{
|
|
135
|
+
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
136
|
+
minHeight: '100vh',
|
|
137
|
+
padding: '2rem',
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
138
140
|
<Story />
|
|
139
141
|
</div>
|
|
140
142
|
),
|
|
@@ -158,12 +160,14 @@ GlassTooltipCustom.args = {
|
|
|
158
160
|
},
|
|
159
161
|
};
|
|
160
162
|
GlassTooltipCustom.decorators = [
|
|
161
|
-
|
|
162
|
-
<div
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
Story => (
|
|
164
|
+
<div
|
|
165
|
+
style={{
|
|
166
|
+
background: 'linear-gradient(45deg, #f093fb 0%, #f5576c 100%)',
|
|
167
|
+
minHeight: '100vh',
|
|
168
|
+
padding: '2rem',
|
|
169
|
+
}}
|
|
170
|
+
>
|
|
167
171
|
<Story />
|
|
168
172
|
</div>
|
|
169
173
|
),
|
|
@@ -180,12 +184,14 @@ GlassTooltipClick.args = {
|
|
|
180
184
|
glass: true,
|
|
181
185
|
};
|
|
182
186
|
GlassTooltipClick.decorators = [
|
|
183
|
-
|
|
184
|
-
<div
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
Story => (
|
|
188
|
+
<div
|
|
189
|
+
style={{
|
|
190
|
+
background: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
|
|
191
|
+
minHeight: '100vh',
|
|
192
|
+
padding: '2rem',
|
|
193
|
+
}}
|
|
194
|
+
>
|
|
189
195
|
<Story />
|
|
190
196
|
</div>
|
|
191
197
|
),
|
|
@@ -202,12 +208,14 @@ GlassTooltipPositions.args = {
|
|
|
202
208
|
glass: true,
|
|
203
209
|
};
|
|
204
210
|
GlassTooltipPositions.decorators = [
|
|
205
|
-
|
|
206
|
-
<div
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
Story => (
|
|
212
|
+
<div
|
|
213
|
+
style={{
|
|
214
|
+
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
215
|
+
minHeight: '100vh',
|
|
216
|
+
padding: '2rem',
|
|
217
|
+
}}
|
|
218
|
+
>
|
|
211
219
|
<Story />
|
|
212
220
|
</div>
|
|
213
221
|
),
|
|
@@ -234,12 +242,14 @@ GlassTooltipRich.args = {
|
|
|
234
242
|
glass: true,
|
|
235
243
|
};
|
|
236
244
|
GlassTooltipRich.decorators = [
|
|
237
|
-
|
|
238
|
-
<div
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
245
|
+
Story => (
|
|
246
|
+
<div
|
|
247
|
+
style={{
|
|
248
|
+
background: 'linear-gradient(45deg, #f093fb 0%, #f5576c 100%)',
|
|
249
|
+
minHeight: '100vh',
|
|
250
|
+
padding: '2rem',
|
|
251
|
+
}}
|
|
252
|
+
>
|
|
243
253
|
<Story />
|
|
244
254
|
</div>
|
|
245
255
|
),
|