@shohojdhara/atomix 0.2.4 → 0.2.6
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 +1300 -1418
- package/dist/atomix.min.css +3 -3
- package/dist/index.d.ts +1259 -874
- package/dist/index.esm.js +16256 -26366
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15691 -22295
- 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 +15036 -0
- package/dist/themes/applemix.min.css +72 -0
- package/dist/themes/boomdevs.css +1300 -1419
- package/dist/themes/boomdevs.min.css +3 -3
- package/dist/themes/esrar.css +1301 -1419
- package/dist/themes/esrar.min.css +3 -3
- package/dist/themes/flashtrade.css +15187 -0
- package/dist/themes/flashtrade.min.css +86 -0
- package/dist/themes/mashroom.css +1299 -1417
- package/dist/themes/mashroom.min.css +5 -5
- package/dist/themes/shaj-default.css +1300 -1418
- package/dist/themes/shaj-default.min.css +3 -3
- package/package.json +6 -17
- package/src/components/Accordion/Accordion.stories.tsx +4 -26
- package/src/components/Accordion/Accordion.tsx +21 -12
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +106 -72
- package/src/components/AtomixGlass/AtomixGlass.tsx +485 -1215
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +399 -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 +404 -236
- package/src/components/AtomixGlass/{AtomixGlass.stories.tsx → stories/AtomixGlass.stories.tsx} +55 -35
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +57 -89
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +149 -149
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +95 -32
- package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +0 -2
- package/src/components/AtomixGlass/stories/shared-components.tsx +9 -18
- 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 +74 -54
- package/src/components/Badge/Badge.tsx +8 -12
- package/src/components/Breadcrumb/Breadcrumb.tsx +23 -4
- package/src/components/Button/Button.tsx +3 -5
- package/src/components/Callout/Callout.stories.tsx +86 -35
- package/src/components/Callout/Callout.tsx +4 -0
- package/src/components/Card/Card.stories.tsx +89 -85
- 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.stories.tsx +121 -11
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +149 -45
- package/src/components/ColorModeToggle/index.ts +1 -1
- package/src/components/Countdown/Countdown.tsx +4 -0
- package/src/components/DataTable/DataTable.tsx +2 -1
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -11
- 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 +13 -15
- package/src/components/EdgePanel/EdgePanel.tsx +20 -5
- 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.tsx +3 -2
- package/src/components/Modal/Modal.stories.tsx +48 -34
- package/src/components/Modal/Modal.tsx +19 -23
- package/src/components/Navigation/Menu/MegaMenu.tsx +2 -2
- package/src/components/Navigation/Menu/Menu.tsx +2 -2
- package/src/components/Navigation/Nav/Nav.tsx +6 -1
- package/src/components/Navigation/Nav/NavDropdown.tsx +10 -1
- package/src/components/Navigation/Navbar/Navbar.tsx +4 -1
- package/src/components/Navigation/SideMenu/SideMenu.tsx +3 -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 +2 -1
- 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 +2 -1
- 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 +13 -6
- package/src/lib/composables/useChart.ts +17 -13
- package/src/lib/composables/useChartExport.ts +19 -78
- package/src/lib/composables/useChartToolbar.ts +0 -1
- package/src/lib/composables/useEdgePanel.ts +111 -103
- package/src/lib/composables/useFooter.ts +3 -3
- package/src/lib/composables/useGlassContainer.ts +16 -7
- package/src/lib/composables/useLineChart.ts +8 -1
- 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 +146 -32
- package/src/lib/types/components.ts +258 -10
- 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 +1 -4
- 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.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 +42 -34
- 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 +217 -39
- package/src/styles/06-components/_components.badge.scss +6 -8
- package/src/styles/06-components/_components.button.scss +8 -3
- 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.color-mode-toggle.scss +43 -6
- package/src/styles/06-components/_components.dropdown.scss +19 -7
- package/src/styles/06-components/_components.edge-panel.scss +4 -2
- 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.modal.scss +5 -3
- 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/_utilities.opacity.scss +1 -1
- package/src/styles/99-utilities/_utilities.scss +1 -1
- 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
|
@@ -201,13 +201,13 @@ export const Glass = {
|
|
|
201
201
|
size: 'md',
|
|
202
202
|
glass: true,
|
|
203
203
|
},
|
|
204
|
-
render: (args) => {
|
|
204
|
+
render: (args: any) => {
|
|
205
205
|
const [currentPage, setCurrentPage] = React.useState(args.currentPage);
|
|
206
206
|
const handlePageChange = (page: number) => {
|
|
207
207
|
setCurrentPage(page);
|
|
208
208
|
args.onPageChange?.(page);
|
|
209
209
|
};
|
|
210
|
-
|
|
210
|
+
|
|
211
211
|
return (
|
|
212
212
|
<div
|
|
213
213
|
style={{
|
|
@@ -249,17 +249,18 @@ export const GlassCustom = {
|
|
|
249
249
|
cornerRadius: 12,
|
|
250
250
|
},
|
|
251
251
|
},
|
|
252
|
-
render: (args) => {
|
|
252
|
+
render: (args: any) => {
|
|
253
253
|
const [currentPage, setCurrentPage] = React.useState(args.currentPage);
|
|
254
254
|
const handlePageChange = (page: number) => {
|
|
255
255
|
setCurrentPage(page);
|
|
256
256
|
args.onPageChange?.(page);
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
|
|
259
259
|
return (
|
|
260
260
|
<div
|
|
261
261
|
style={{
|
|
262
|
-
background:
|
|
262
|
+
background:
|
|
263
|
+
'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80)',
|
|
263
264
|
backgroundSize: 'cover',
|
|
264
265
|
backgroundPosition: 'center',
|
|
265
266
|
padding: '2rem',
|
|
@@ -271,7 +272,13 @@ export const GlassCustom = {
|
|
|
271
272
|
}}
|
|
272
273
|
>
|
|
273
274
|
<div style={{ textAlign: 'center' }}>
|
|
274
|
-
<h3
|
|
275
|
+
<h3
|
|
276
|
+
style={{
|
|
277
|
+
color: 'white',
|
|
278
|
+
marginBottom: '2rem',
|
|
279
|
+
textShadow: '0 2px 4px rgba(0,0,0,0.5)',
|
|
280
|
+
}}
|
|
281
|
+
>
|
|
275
282
|
Custom Glass Pagination
|
|
276
283
|
</h3>
|
|
277
284
|
<Pagination {...args} currentPage={currentPage} onPageChange={handlePageChange} />
|
|
@@ -61,6 +61,7 @@ export const Pagination: React.FC<PaginationProps> = ({
|
|
|
61
61
|
showPrevNextButtons = PAGINATION_DEFAULTS.showPrevNextButtons,
|
|
62
62
|
size = PAGINATION_DEFAULTS.size,
|
|
63
63
|
className = '',
|
|
64
|
+
style,
|
|
64
65
|
ariaLabel = 'Pagination',
|
|
65
66
|
glass,
|
|
66
67
|
}) => {
|
|
@@ -77,7 +78,11 @@ export const Pagination: React.FC<PaginationProps> = ({
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
const paginationContent = (
|
|
80
|
-
<nav
|
|
81
|
+
<nav
|
|
82
|
+
className={`c-pagination c-pagination--${size} ${className}`}
|
|
83
|
+
style={style}
|
|
84
|
+
aria-label={ariaLabel}
|
|
85
|
+
>
|
|
81
86
|
<ul className="c-pagination__items">
|
|
82
87
|
{showFirstLastButtons && (
|
|
83
88
|
<PaginationNavButton
|
|
@@ -169,11 +174,7 @@ export const Pagination: React.FC<PaginationProps> = ({
|
|
|
169
174
|
|
|
170
175
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
171
176
|
|
|
172
|
-
return
|
|
173
|
-
<AtomixGlass {...glassProps}>
|
|
174
|
-
{paginationContent}
|
|
175
|
-
</AtomixGlass>
|
|
176
|
-
);
|
|
177
|
+
return <AtomixGlass {...glassProps}>{paginationContent}</AtomixGlass>;
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
return paginationContent;
|
|
@@ -111,7 +111,8 @@ export const PhotoViewer: React.FC<PhotoViewerProps> = ({
|
|
|
111
111
|
|
|
112
112
|
const link = document.createElement('a');
|
|
113
113
|
link.href = currentImage.src;
|
|
114
|
-
|
|
114
|
+
const sanitizedTitle = (currentImage.title || `image-${currentIndex + 1}`).replace(/[^a-zA-Z0-9.-]/g, '_');
|
|
115
|
+
link.download = sanitizedTitle;
|
|
115
116
|
document.body.appendChild(link);
|
|
116
117
|
link.click();
|
|
117
118
|
document.body.removeChild(link);
|
|
@@ -155,12 +155,14 @@ GlassPopover.args = {
|
|
|
155
155
|
glass: true,
|
|
156
156
|
};
|
|
157
157
|
GlassPopover.decorators = [
|
|
158
|
-
|
|
159
|
-
<div
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
Story => (
|
|
159
|
+
<div
|
|
160
|
+
style={{
|
|
161
|
+
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
162
|
+
minHeight: '100vh',
|
|
163
|
+
padding: '2rem',
|
|
164
|
+
}}
|
|
165
|
+
>
|
|
164
166
|
<Story />
|
|
165
167
|
</div>
|
|
166
168
|
),
|
|
@@ -182,12 +184,14 @@ GlassPopoverCustom.args = {
|
|
|
182
184
|
},
|
|
183
185
|
};
|
|
184
186
|
GlassPopoverCustom.decorators = [
|
|
185
|
-
|
|
186
|
-
<div
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
Story => (
|
|
188
|
+
<div
|
|
189
|
+
style={{
|
|
190
|
+
background: 'linear-gradient(45deg, #f093fb 0%, #f5576c 100%)',
|
|
191
|
+
minHeight: '100vh',
|
|
192
|
+
padding: '2rem',
|
|
193
|
+
}}
|
|
194
|
+
>
|
|
191
195
|
<Story />
|
|
192
196
|
</div>
|
|
193
197
|
),
|
|
@@ -204,12 +208,14 @@ GlassPopoverHover.args = {
|
|
|
204
208
|
glass: true,
|
|
205
209
|
};
|
|
206
210
|
GlassPopoverHover.decorators = [
|
|
207
|
-
|
|
208
|
-
<div
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
Story => (
|
|
212
|
+
<div
|
|
213
|
+
style={{
|
|
214
|
+
background: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
|
|
215
|
+
minHeight: '100vh',
|
|
216
|
+
padding: '2rem',
|
|
217
|
+
}}
|
|
218
|
+
>
|
|
213
219
|
<Story />
|
|
214
220
|
</div>
|
|
215
221
|
),
|
|
@@ -225,12 +231,14 @@ GlassPopoverPositions.args = {
|
|
|
225
231
|
defaultOpen: true,
|
|
226
232
|
};
|
|
227
233
|
GlassPopoverPositions.decorators = [
|
|
228
|
-
|
|
229
|
-
<div
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
+
Story => (
|
|
235
|
+
<div
|
|
236
|
+
style={{
|
|
237
|
+
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
238
|
+
minHeight: '100vh',
|
|
239
|
+
padding: '2rem',
|
|
240
|
+
}}
|
|
241
|
+
>
|
|
234
242
|
<Story />
|
|
235
243
|
</div>
|
|
236
244
|
),
|
|
@@ -28,6 +28,7 @@ export const Popover: React.FC<PopoverProps> = ({
|
|
|
28
28
|
position = 'top',
|
|
29
29
|
trigger = 'click',
|
|
30
30
|
className = '',
|
|
31
|
+
style,
|
|
31
32
|
delay = 0,
|
|
32
33
|
offset = 12,
|
|
33
34
|
defaultOpen = false,
|
|
@@ -72,6 +73,7 @@ export const Popover: React.FC<PopoverProps> = ({
|
|
|
72
73
|
<div
|
|
73
74
|
ref={popoverRef}
|
|
74
75
|
className={`c-popover c-popover--${currentPosition} ${isOpen ? POPOVER.CLASSES.IS_OPEN : ''} ${glass ? 'c-popover--glass' : ''} ${className}`}
|
|
76
|
+
style={style}
|
|
75
77
|
id={popoverId}
|
|
76
78
|
role="tooltip"
|
|
77
79
|
aria-hidden={!isOpen}
|
|
@@ -88,7 +90,8 @@ export const Popover: React.FC<PopoverProps> = ({
|
|
|
88
90
|
mode: 'shader' as const,
|
|
89
91
|
};
|
|
90
92
|
|
|
91
|
-
const glassProps =
|
|
93
|
+
const glassProps =
|
|
94
|
+
glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
92
95
|
|
|
93
96
|
return (
|
|
94
97
|
<AtomixGlass {...glassProps}>
|
|
@@ -43,6 +43,11 @@ export interface ProductReviewProps {
|
|
|
43
43
|
* Additional CSS class
|
|
44
44
|
*/
|
|
45
45
|
className?: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Inline style for the component
|
|
49
|
+
*/
|
|
50
|
+
style?: React.CSSProperties;
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
/**
|
|
@@ -57,6 +62,7 @@ export const ProductReview: React.FC<ProductReviewProps> = ({
|
|
|
57
62
|
ratingColor = 'warning' as ThemeColor,
|
|
58
63
|
onSubmit,
|
|
59
64
|
className = '',
|
|
65
|
+
style,
|
|
60
66
|
}) => {
|
|
61
67
|
const [rating, setRating] = useState<number>(initialRating);
|
|
62
68
|
const [comment, setComment] = useState<string>('');
|
|
@@ -90,7 +96,7 @@ export const ProductReview: React.FC<ProductReviewProps> = ({
|
|
|
90
96
|
|
|
91
97
|
if (submitted) {
|
|
92
98
|
return (
|
|
93
|
-
<div className={containerClasses} ref={reviewRef}>
|
|
99
|
+
<div className={containerClasses} ref={reviewRef} style={style}>
|
|
94
100
|
<div className="c-product-review__success">
|
|
95
101
|
<h3>Thank you for your review!</h3>
|
|
96
102
|
<p>Your feedback helps us improve our products.</p>
|
|
@@ -109,7 +115,7 @@ export const ProductReview: React.FC<ProductReviewProps> = ({
|
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
return (
|
|
112
|
-
<div className={containerClasses} ref={reviewRef}>
|
|
118
|
+
<div className={containerClasses} ref={reviewRef} style={style}>
|
|
113
119
|
<div className="c-product-review__header">
|
|
114
120
|
<h3 className="c-product-review__title">Review {productName}</h3>
|
|
115
121
|
{productImage && (
|
|
@@ -11,6 +11,7 @@ export const Progress = forwardRef<HTMLDivElement, ProgressProps>(
|
|
|
11
11
|
variant = 'primary',
|
|
12
12
|
size = 'md',
|
|
13
13
|
className = '',
|
|
14
|
+
style,
|
|
14
15
|
disabled = false,
|
|
15
16
|
ariaLabel = PROGRESS.DEFAULTS.ARIA_LABEL,
|
|
16
17
|
glass,
|
|
@@ -28,7 +29,7 @@ export const Progress = forwardRef<HTMLDivElement, ProgressProps>(
|
|
|
28
29
|
<div
|
|
29
30
|
ref={ref}
|
|
30
31
|
className={progressClasses + (glass ? ' c-progress--glass' : '')}
|
|
31
|
-
style={progressStyle}
|
|
32
|
+
style={{ ...progressStyle, ...style }}
|
|
32
33
|
role="progressbar"
|
|
33
34
|
aria-valuemin={0}
|
|
34
35
|
aria-valuemax={100}
|
|
@@ -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';
|
|
@@ -9,6 +9,7 @@ export const Spinner: React.FC<SpinnerProps> = ({
|
|
|
9
9
|
variant = 'primary',
|
|
10
10
|
fullscreen = false,
|
|
11
11
|
className = '',
|
|
12
|
+
style,
|
|
12
13
|
glass,
|
|
13
14
|
}) => {
|
|
14
15
|
const { generateSpinnerClass } = useSpinner({
|
|
@@ -25,7 +26,7 @@ export const Spinner: React.FC<SpinnerProps> = ({
|
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
const spinnerContent = (
|
|
28
|
-
<div className={spinnerClass} role="status">
|
|
29
|
+
<div className={spinnerClass} style={style} role="status">
|
|
29
30
|
<span className={SPINNER.VISUALLY_HIDDEN}>Loading...</span>
|
|
30
31
|
</div>
|
|
31
32
|
);
|
|
@@ -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}>
|