@shohojdhara/atomix 0.3.15 → 0.4.0
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/build-tools/index.d.ts +31 -30
- package/build-tools/package.json +4 -21
- package/dist/atomix.css +20924 -2611
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +76 -2
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/index.d.ts +31 -30
- package/dist/build-tools/package.json +4 -21
- package/dist/charts.js.map +1 -1
- package/dist/core.js.map +1 -1
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +144 -18
- package/dist/index.esm.js +110 -55
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +110 -55
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/layout.js.map +1 -1
- package/dist/theme.d.ts +9 -9
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.stories.tsx +32 -23
- package/src/components/Accordion/Accordion.test.tsx +70 -50
- package/src/components/Accordion/Accordion.tsx +99 -94
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +1 -1
- package/src/components/AtomixGlass/GlassFilter.tsx +9 -16
- package/src/components/AtomixGlass/glass-utils.ts +4 -3
- package/src/components/AtomixGlass/shader-utils.ts +128 -52
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +1 -1
- package/src/components/AtomixGlass/stories/Shaders.stories.tsx +1 -1
- package/src/components/Avatar/Avatar.stories.tsx +45 -62
- package/src/components/Avatar/Avatar.tsx +58 -56
- package/src/components/Badge/Badge.stories.tsx +20 -9
- package/src/components/Badge/Badge.test.tsx +41 -41
- package/src/components/Badge/Badge.tsx +64 -62
- package/src/components/Block/Block.stories.tsx +14 -4
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +9 -8
- package/src/components/Breadcrumb/Breadcrumb.tsx +62 -60
- package/src/components/Button/Button.stories.tsx +13 -22
- package/src/components/Button/Button.test.tsx +97 -81
- package/src/components/Button/Button.tsx +46 -14
- package/src/components/Button/ButtonGroup.stories.tsx +37 -32
- package/src/components/Button/ButtonGroup.tsx +4 -15
- package/src/components/Callout/Callout.stories.tsx +109 -16
- package/src/components/Card/Card.stories.tsx +67 -36
- package/src/components/Card/Card.tsx +30 -14
- package/src/components/Chart/AreaChart.tsx +1 -1
- package/src/components/Chart/CandlestickChart.tsx +23 -16
- package/src/components/Chart/Chart.stories.tsx +4 -9
- package/src/components/Chart/Chart.tsx +40 -44
- package/src/components/Chart/ChartRenderer.tsx +39 -12
- package/src/components/Chart/ChartToolbar.tsx +21 -5
- package/src/components/Chart/DonutChart.tsx +1 -1
- package/src/components/Chart/FunnelChart.tsx +4 -1
- package/src/components/Chart/GaugeChart.tsx +3 -1
- package/src/components/Chart/HeatmapChart.tsx +50 -37
- package/src/components/Chart/LineChart.tsx +3 -2
- package/src/components/Chart/MultiAxisChart.tsx +24 -16
- package/src/components/Chart/RadarChart.tsx +19 -17
- package/src/components/Chart/ScatterChart.tsx +29 -21
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +6 -2
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +15 -3
- package/src/components/Countdown/Countdown.stories.tsx +7 -7
- package/src/components/DataTable/DataTable.stories.tsx +43 -38
- package/src/components/DataTable/DataTable.test.tsx +26 -148
- package/src/components/DataTable/DataTable.tsx +485 -456
- package/src/components/DatePicker/DatePicker.stories.tsx +32 -47
- package/src/components/DatePicker/DatePicker.tsx +31 -26
- package/src/components/Dropdown/Dropdown.stories.tsx +2 -5
- package/src/components/Dropdown/Dropdown.tsx +313 -299
- package/src/components/EdgePanel/EdgePanel.stories.tsx +6 -19
- package/src/components/EdgePanel/EdgePanel.tsx +1 -3
- package/src/components/Footer/Footer.stories.tsx +21 -16
- package/src/components/Footer/Footer.tsx +130 -128
- package/src/components/Footer/FooterLink.tsx +2 -2
- package/src/components/Form/Checkbox.test.tsx +49 -49
- package/src/components/Form/Checkbox.tsx +108 -100
- package/src/components/Form/Form.stories.tsx +2 -10
- package/src/components/Form/Input.stories.tsx +22 -39
- package/src/components/Form/Input.test.tsx +38 -44
- package/src/components/Form/Radio.stories.tsx +6 -12
- package/src/components/Form/Radio.tsx +68 -66
- package/src/components/Form/Select.tsx +184 -182
- package/src/components/Form/Textarea.test.tsx +27 -32
- package/src/components/Hero/Hero.stories.tsx +56 -23
- package/src/components/Hero/Hero.tsx +201 -55
- package/src/components/Icon/index.ts +7 -1
- package/src/components/List/List.tsx +19 -23
- package/src/components/Modal/Modal.stories.tsx +2 -1
- package/src/components/Modal/Modal.tsx +130 -127
- package/src/components/Navigation/Menu/MegaMenu.tsx +70 -70
- package/src/components/Navigation/Nav/NavDropdown.tsx +1 -5
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +128 -28
- package/src/components/Navigation/SideMenu/SideMenu.tsx +5 -7
- package/src/components/Navigation/SideMenu/SideMenuItem.tsx +4 -5
- package/src/components/Pagination/Pagination.stories.tsx +7 -4
- package/src/components/Pagination/Pagination.tsx +199 -202
- package/src/components/PhotoViewer/PhotoViewer.tsx +4 -1
- package/src/components/Popover/Popover.stories.tsx +99 -192
- package/src/components/Popover/Popover.tsx +41 -37
- package/src/components/Progress/Progress.stories.tsx +35 -44
- package/src/components/River/River.stories.tsx +2 -1
- package/src/components/SectionIntro/SectionIntro.stories.tsx +71 -71
- package/src/components/Slider/Slider.stories.tsx +12 -4
- package/src/components/Spinner/Spinner.stories.tsx +3 -1
- package/src/components/Spinner/Spinner.test.tsx +23 -23
- package/src/components/Spinner/Spinner.tsx +43 -46
- package/src/components/Steps/Steps.stories.tsx +8 -6
- package/src/components/Tabs/Tabs.stories.tsx +12 -9
- package/src/components/Tabs/Tabs.tsx +74 -72
- package/src/components/Toggle/Toggle.stories.tsx +27 -13
- package/src/components/Toggle/Toggle.test.tsx +65 -70
- package/src/components/Toggle/Toggle.tsx +4 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +24 -20
- package/src/components/Tooltip/Tooltip.tsx +104 -106
- package/src/components/Upload/Upload.stories.tsx +129 -127
- package/src/components/Upload/Upload.tsx +287 -283
- package/src/components/VideoPlayer/VideoPlayer.tsx +6 -1
- package/src/components/index.ts +13 -2
- package/src/layouts/Grid/Grid.stories.tsx +9 -3
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +5 -1
- package/src/lib/__tests__/theme-tools.test.ts +32 -6
- package/src/lib/composables/shared-mouse-tracker.ts +13 -14
- package/src/lib/composables/useAtomixGlass.ts +106 -49
- package/src/lib/composables/useChartExport.ts +1 -1
- package/src/lib/composables/useDataTable.ts +29 -17
- package/src/lib/composables/useHero.ts +58 -14
- package/src/lib/composables/useHeroBackgroundSlider.ts +2 -9
- package/src/lib/composables/useInput.ts +10 -8
- package/src/lib/composables/useSideMenu.ts +6 -5
- package/src/lib/composables/useTooltip.ts +1 -2
- package/src/lib/composables/useVideoPlayer.ts +44 -35
- package/src/lib/config/index.ts +154 -154
- package/src/lib/constants/cssVariables.ts +29 -29
- package/src/lib/hooks/__tests__/useComponentCustomization.test.ts +2 -6
- package/src/lib/hooks/index.ts +1 -1
- package/src/lib/hooks/useComponentCustomization.ts +11 -17
- package/src/lib/hooks/usePerformanceMonitor.ts +6 -7
- package/src/lib/patterns/__tests__/slots.test.ts +1 -1
- package/src/lib/patterns/index.ts +1 -1
- package/src/lib/patterns/slots.tsx +8 -13
- package/src/lib/storybook/InteractiveDemo.tsx +13 -18
- package/src/lib/storybook/PreviewContainer.tsx +1 -1
- package/src/lib/storybook/VariantsGrid.tsx +3 -7
- package/src/lib/storybook/index.ts +1 -1
- package/src/lib/theme/adapters/cssVariableMapper.ts +47 -74
- package/src/lib/theme/adapters/index.ts +3 -9
- package/src/lib/theme/adapters/themeAdapter.ts +41 -26
- package/src/lib/theme/config/index.ts +1 -1
- package/src/lib/theme/config/types.ts +2 -2
- package/src/lib/theme/config/validator.ts +10 -5
- package/src/lib/theme/constants/constants.ts +2 -2
- package/src/lib/theme/constants/index.ts +1 -2
- package/src/lib/theme/core/__tests__/createTheme.test.ts +20 -22
- package/src/lib/theme/core/composeTheme.ts +32 -26
- package/src/lib/theme/core/createTheme.ts +1 -1
- package/src/lib/theme/core/createThemeObject.ts +308 -301
- package/src/lib/theme/core/index.ts +3 -3
- package/src/lib/theme/devtools/CLI.ts +106 -104
- package/src/lib/theme/devtools/Comparator.tsx +50 -32
- package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +50 -48
- package/src/lib/theme/devtools/DesignTokensCustomizer.tsx +257 -63
- package/src/lib/theme/devtools/Inspector.tsx +75 -60
- package/src/lib/theme/devtools/LiveEditor.tsx +97 -76
- package/src/lib/theme/devtools/Preview.tsx +150 -106
- package/src/lib/theme/devtools/ThemeValidator.ts +29 -21
- package/src/lib/theme/devtools/index.ts +3 -9
- package/src/lib/theme/devtools/useHistory.ts +23 -21
- package/src/lib/theme/errors/errors.ts +12 -11
- package/src/lib/theme/errors/index.ts +2 -7
- package/src/lib/theme/generators/generateCSS.ts +9 -13
- package/src/lib/theme/generators/generateCSSNested.ts +1 -6
- package/src/lib/theme/generators/generateCSSVariables.ts +673 -630
- package/src/lib/theme/generators/index.ts +1 -4
- package/src/lib/theme/i18n/index.ts +1 -1
- package/src/lib/theme/i18n/rtl.ts +13 -13
- package/src/lib/theme/index.ts +7 -16
- package/src/lib/theme/runtime/ThemeApplicator.ts +4 -4
- package/src/lib/theme/runtime/ThemeContext.tsx +1 -1
- package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +19 -23
- package/src/lib/theme/runtime/ThemeProvider.tsx +230 -239
- package/src/lib/theme/runtime/__tests__/ThemeProvider.integration.test.tsx +1 -1
- package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +24 -29
- package/src/lib/theme/runtime/index.ts +2 -5
- package/src/lib/theme/runtime/useTheme.ts +18 -18
- package/src/lib/theme/runtime/useThemeTokens.ts +22 -22
- package/src/lib/theme/test/testTheme.ts +15 -16
- package/src/lib/theme/tokens/index.ts +2 -7
- package/src/lib/theme/tokens/tokens.ts +25 -24
- package/src/lib/theme/types.ts +428 -411
- package/src/lib/theme/utils/__tests__/themeValidation.test.ts +3 -3
- package/src/lib/theme/utils/componentTheming.ts +18 -18
- package/src/lib/theme/utils/domUtils.ts +277 -289
- package/src/lib/theme/utils/index.ts +1 -2
- package/src/lib/theme/utils/injectCSS.ts +10 -14
- package/src/lib/theme/utils/naming.ts +20 -16
- package/src/lib/theme/utils/themeHelpers.ts +10 -12
- package/src/lib/theme/utils/themeUtils.ts +85 -86
- package/src/lib/theme/utils/themeValidation.ts +82 -33
- package/src/lib/theme-tools.ts +8 -6
- package/src/lib/types/components.ts +172 -71
- package/src/lib/types/partProps.ts +1 -1
- package/src/lib/utils/__tests__/csv.test.ts +1 -1
- package/src/lib/utils/componentUtils.ts +8 -12
- package/src/lib/utils/csv.ts +3 -1
- package/src/lib/utils/dataTableExport.ts +1 -5
- package/src/lib/utils/fontPreloader.ts +10 -19
- package/src/lib/utils/icons.ts +4 -1
- package/src/lib/utils/index.ts +2 -6
- package/src/lib/utils/memoryMonitor.ts +10 -8
- package/src/lib/utils/themeNaming.ts +2 -2
- package/src/styles/01-settings/_index.scss +0 -1
- package/src/styles/01-settings/_settings.colors.scss +8 -8
- package/src/styles/01-settings/_settings.design-tokens.scss +61 -50
- package/src/styles/01-settings/_settings.navbar.scss +1 -1
- package/src/styles/01-settings/_settings.spacing.scss +3 -4
- package/src/styles/01-settings/_settings.tooltip.scss +1 -1
- package/src/styles/01-settings/_settings.typography.scss +1 -1
- package/src/styles/02-tools/_tools.button.scss +51 -21
- package/src/styles/02-tools/_tools.utility-api.scss +30 -18
- package/src/styles/03-generic/_generic.root.scss +4 -3
- package/src/styles/06-components/_components.atomix-glass.scss +13 -9
- package/src/styles/06-components/_components.button.scss +16 -4
- package/src/styles/06-components/_components.callout.scss +27 -21
- package/src/styles/06-components/_components.card.scss +5 -14
- package/src/styles/06-components/_components.chart.scss +22 -19
- package/src/styles/06-components/_components.checkbox.scss +3 -1
- package/src/styles/06-components/_components.color-mode-toggle.scss +3 -1
- package/src/styles/06-components/_components.edge-panel.scss +9 -2
- package/src/styles/06-components/_components.footer.scss +1 -1
- package/src/styles/06-components/_components.side-menu.scss +5 -5
- package/src/styles/06-components/_components.toggle.scss +18 -0
- package/src/styles/06-components/_index.scss +1 -1
- package/src/styles/06-components/old.chart.styles.scss +0 -2
- package/src/styles/99-utilities/_utilities.border.scss +69 -27
- package/src/styles/99-utilities/_utilities.display.scss +1 -1
- package/src/styles/99-utilities/_utilities.opacity.scss +10 -0
- package/src/styles/99-utilities/_utilities.position.scss +16 -9
- package/src/styles/99-utilities/_utilities.scss +1 -1
- package/src/styles/99-utilities/_utilities.sizes.scss +47 -18
- package/src/styles/99-utilities/_utilities.spacing.scss +118 -66
- package/src/styles/99-utilities/_utilities.text-gradient.scss +30 -30
- package/src/styles/99-utilities/_utilities.text.scss +67 -46
|
@@ -330,7 +330,16 @@ export const Light: Story = {
|
|
|
330
330
|
// All Variants
|
|
331
331
|
export const AllVariants: Story = {
|
|
332
332
|
render: () => {
|
|
333
|
-
const variants = [
|
|
333
|
+
const variants = [
|
|
334
|
+
'primary',
|
|
335
|
+
'secondary',
|
|
336
|
+
'success',
|
|
337
|
+
'info',
|
|
338
|
+
'warning',
|
|
339
|
+
'error',
|
|
340
|
+
'light',
|
|
341
|
+
'dark',
|
|
342
|
+
];
|
|
334
343
|
|
|
335
344
|
const getIcon = (variant: string) => {
|
|
336
345
|
switch (variant) {
|
|
@@ -388,7 +397,13 @@ export const Glass: Story = {
|
|
|
388
397
|
},
|
|
389
398
|
decorators: [
|
|
390
399
|
Story => (
|
|
391
|
-
<div
|
|
400
|
+
<div
|
|
401
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
402
|
+
style={{
|
|
403
|
+
backgroundImage:
|
|
404
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
405
|
+
}}
|
|
406
|
+
>
|
|
392
407
|
<Story />
|
|
393
408
|
</div>
|
|
394
409
|
),
|
|
@@ -412,7 +427,13 @@ export const GlassSuccess: Story = {
|
|
|
412
427
|
},
|
|
413
428
|
decorators: [
|
|
414
429
|
Story => (
|
|
415
|
-
<div
|
|
430
|
+
<div
|
|
431
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
432
|
+
style={{
|
|
433
|
+
backgroundImage:
|
|
434
|
+
'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80")',
|
|
435
|
+
}}
|
|
436
|
+
>
|
|
416
437
|
<Story />
|
|
417
438
|
</div>
|
|
418
439
|
),
|
|
@@ -437,7 +458,13 @@ export const GlassWarning: Story = {
|
|
|
437
458
|
},
|
|
438
459
|
decorators: [
|
|
439
460
|
Story => (
|
|
440
|
-
<div
|
|
461
|
+
<div
|
|
462
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
463
|
+
style={{
|
|
464
|
+
backgroundImage:
|
|
465
|
+
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80',
|
|
466
|
+
}}
|
|
467
|
+
>
|
|
441
468
|
<Story />
|
|
442
469
|
</div>
|
|
443
470
|
),
|
|
@@ -462,7 +489,13 @@ export const GlassError: Story = {
|
|
|
462
489
|
},
|
|
463
490
|
decorators: [
|
|
464
491
|
Story => (
|
|
465
|
-
<div
|
|
492
|
+
<div
|
|
493
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
494
|
+
style={{
|
|
495
|
+
backgroundImage:
|
|
496
|
+
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80',
|
|
497
|
+
}}
|
|
498
|
+
>
|
|
466
499
|
<Story />
|
|
467
500
|
</div>
|
|
468
501
|
),
|
|
@@ -486,7 +519,13 @@ export const GlassDark: Story = {
|
|
|
486
519
|
},
|
|
487
520
|
decorators: [
|
|
488
521
|
Story => (
|
|
489
|
-
<div
|
|
522
|
+
<div
|
|
523
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
524
|
+
style={{
|
|
525
|
+
backgroundImage:
|
|
526
|
+
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80',
|
|
527
|
+
}}
|
|
528
|
+
>
|
|
490
529
|
<Story />
|
|
491
530
|
</div>
|
|
492
531
|
),
|
|
@@ -517,7 +556,13 @@ export const GlassWithActions: Story = {
|
|
|
517
556
|
},
|
|
518
557
|
decorators: [
|
|
519
558
|
Story => (
|
|
520
|
-
<div
|
|
559
|
+
<div
|
|
560
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
561
|
+
style={{
|
|
562
|
+
backgroundImage:
|
|
563
|
+
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80',
|
|
564
|
+
}}
|
|
565
|
+
>
|
|
521
566
|
<Story />
|
|
522
567
|
</div>
|
|
523
568
|
),
|
|
@@ -544,7 +589,13 @@ export const GlassDismissible: Story = {
|
|
|
544
589
|
},
|
|
545
590
|
decorators: [
|
|
546
591
|
Story => (
|
|
547
|
-
<div
|
|
592
|
+
<div
|
|
593
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
594
|
+
style={{
|
|
595
|
+
backgroundImage:
|
|
596
|
+
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80',
|
|
597
|
+
}}
|
|
598
|
+
>
|
|
548
599
|
<Story />
|
|
549
600
|
</div>
|
|
550
601
|
),
|
|
@@ -572,7 +623,13 @@ export const GlassToast: Story = {
|
|
|
572
623
|
},
|
|
573
624
|
decorators: [
|
|
574
625
|
Story => (
|
|
575
|
-
<div
|
|
626
|
+
<div
|
|
627
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
628
|
+
style={{
|
|
629
|
+
backgroundImage:
|
|
630
|
+
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80',
|
|
631
|
+
}}
|
|
632
|
+
>
|
|
576
633
|
<Story />
|
|
577
634
|
</div>
|
|
578
635
|
),
|
|
@@ -596,7 +653,13 @@ export const GlassOneLine: Story = {
|
|
|
596
653
|
},
|
|
597
654
|
decorators: [
|
|
598
655
|
Story => (
|
|
599
|
-
<div
|
|
656
|
+
<div
|
|
657
|
+
className="u-bg-cover u-bg-center u-p-16"
|
|
658
|
+
style={{
|
|
659
|
+
backgroundImage:
|
|
660
|
+
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80',
|
|
661
|
+
}}
|
|
662
|
+
>
|
|
600
663
|
<Story />
|
|
601
664
|
</div>
|
|
602
665
|
),
|
|
@@ -663,7 +726,13 @@ const ToastDemoTemplate = () => {
|
|
|
663
726
|
return (
|
|
664
727
|
<div className="u-relative u-min-h-90vh u-p-8 u-bg-gradient-to-br u-from-red-500/[0.15] u-via-orange-500/[0.15] u-to-blue-500/[0.15] u-overflow-hidden">
|
|
665
728
|
{/* Additional background layer for depth */}
|
|
666
|
-
<div
|
|
729
|
+
<div
|
|
730
|
+
className="u-absolute u-inset-0 u-bg-cover u-bg-center u-opacity-20"
|
|
731
|
+
style={{
|
|
732
|
+
backgroundImage:
|
|
733
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
734
|
+
}}
|
|
735
|
+
/>
|
|
667
736
|
|
|
668
737
|
<div className="u-relative u-z-10 u-flex u-flex-col u-gap-4">
|
|
669
738
|
<div className="u-flex u-gap-2 u-flex-wrap">
|
|
@@ -767,7 +836,13 @@ const AutoDismissTemplate = () => {
|
|
|
767
836
|
return (
|
|
768
837
|
<div className="u-relative u-min-h-90 u-p-16 u-bg-gradient-to-br u-from-red-500/[0.2] u-via-orange-500/[0.2] u-to-blue-500/[0.2]">
|
|
769
838
|
{/* Additional background layer for depth */}
|
|
770
|
-
<div
|
|
839
|
+
<div
|
|
840
|
+
className="u-absolute u-inset-0 u-bg-cover u-bg-center u-opacity-30"
|
|
841
|
+
style={{
|
|
842
|
+
backgroundImage:
|
|
843
|
+
'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80")',
|
|
844
|
+
}}
|
|
845
|
+
/>
|
|
771
846
|
|
|
772
847
|
<div className="u-relative u-z-10 u-flex u-flex-col u-gap-4">
|
|
773
848
|
{visible ? (
|
|
@@ -857,15 +932,27 @@ const GlassVariantsTemplate = () => {
|
|
|
857
932
|
return (
|
|
858
933
|
<div className="u-relative u-min-h-screen u-p-16 u-bg-gradient-to-br u-from-red-500/[0.1] u-via-orange-500/[0.1] u-to-blue-500/[0.1]">
|
|
859
934
|
{/* Multiple background layers for depth */}
|
|
860
|
-
<div
|
|
861
|
-
|
|
935
|
+
<div
|
|
936
|
+
className="u-absolute u-inset-0 u-bg-cover u-bg-center u-opacity-30"
|
|
937
|
+
style={{
|
|
938
|
+
backgroundImage:
|
|
939
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
940
|
+
}}
|
|
941
|
+
/>
|
|
942
|
+
<div
|
|
943
|
+
className="u-absolute u-inset-0 u-bg-cover u-bg-center u-opacity-20"
|
|
944
|
+
style={{
|
|
945
|
+
backgroundImage:
|
|
946
|
+
'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80")',
|
|
947
|
+
}}
|
|
948
|
+
/>
|
|
862
949
|
|
|
863
950
|
<div className="u-relative u-z-10 u-flex u-flex-col u-gap-8">
|
|
864
951
|
{variants.map((variant, index) => (
|
|
865
952
|
<div
|
|
866
953
|
key={variant}
|
|
867
954
|
className="u-bg-cover u-bg-center u-p-8 u-rounded-xl u-relative u-overflow-hidden"
|
|
868
|
-
style={{backgroundImage: `url("${backgrounds[index % backgrounds.length]}")`}}
|
|
955
|
+
style={{ backgroundImage: `url("${backgrounds[index % backgrounds.length]}")` }}
|
|
869
956
|
>
|
|
870
957
|
<div className="u-absolute u-inset-0 u-bg-black/[0.1] u-z-n1" />
|
|
871
958
|
<Callout
|
|
@@ -954,7 +1041,13 @@ const GlassToastDemoTemplate = () => {
|
|
|
954
1041
|
return (
|
|
955
1042
|
<div className="u-relative u-min-h-screen u-p-8 u-bg-gradient-to-br u-from-red-500/[0.2] u-via-orange-500/[0.2] u-to-blue-500/[0.2]">
|
|
956
1043
|
{/* Additional background layers for depth */}
|
|
957
|
-
<div
|
|
1044
|
+
<div
|
|
1045
|
+
className="u-absolute u-inset-0 u-bg-cover u-bg-center u-opacity-30"
|
|
1046
|
+
style={{
|
|
1047
|
+
backgroundImage:
|
|
1048
|
+
'url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80")',
|
|
1049
|
+
}}
|
|
1050
|
+
/>
|
|
958
1051
|
|
|
959
1052
|
<div className="u-relative u-z-10 u-flex u-flex-col u-gap-4">
|
|
960
1053
|
<div className="u-flex u-gap-2 u-flex-wrap">
|
|
@@ -130,64 +130,64 @@ Cards are flexible containers for displaying content with optional headers, imag
|
|
|
130
130
|
defaultValue: { summary: 'none' },
|
|
131
131
|
},
|
|
132
132
|
},
|
|
133
|
-
row: {
|
|
134
|
-
control: 'boolean',
|
|
133
|
+
row: {
|
|
134
|
+
control: 'boolean',
|
|
135
135
|
description: 'Whether to arrange content horizontally',
|
|
136
136
|
table: {
|
|
137
137
|
type: { summary: 'boolean' },
|
|
138
138
|
defaultValue: { summary: false },
|
|
139
139
|
},
|
|
140
140
|
},
|
|
141
|
-
flat: {
|
|
142
|
-
control: 'boolean',
|
|
141
|
+
flat: {
|
|
142
|
+
control: 'boolean',
|
|
143
143
|
description: 'Whether to remove border radius',
|
|
144
144
|
table: {
|
|
145
145
|
type: { summary: 'boolean' },
|
|
146
146
|
defaultValue: { summary: false },
|
|
147
147
|
},
|
|
148
148
|
},
|
|
149
|
-
active: {
|
|
150
|
-
control: 'boolean',
|
|
149
|
+
active: {
|
|
150
|
+
control: 'boolean',
|
|
151
151
|
description: 'Whether the card is in active state',
|
|
152
152
|
table: {
|
|
153
153
|
type: { summary: 'boolean' },
|
|
154
154
|
defaultValue: { summary: false },
|
|
155
155
|
},
|
|
156
156
|
},
|
|
157
|
-
disabled: {
|
|
158
|
-
control: 'boolean',
|
|
157
|
+
disabled: {
|
|
158
|
+
control: 'boolean',
|
|
159
159
|
description: 'Whether the card is disabled',
|
|
160
160
|
table: {
|
|
161
161
|
type: { summary: 'boolean' },
|
|
162
162
|
defaultValue: { summary: false },
|
|
163
163
|
},
|
|
164
164
|
},
|
|
165
|
-
loading: {
|
|
166
|
-
control: 'boolean',
|
|
165
|
+
loading: {
|
|
166
|
+
control: 'boolean',
|
|
167
167
|
description: 'Whether the card is in loading state',
|
|
168
168
|
table: {
|
|
169
169
|
type: { summary: 'boolean' },
|
|
170
170
|
defaultValue: { summary: false },
|
|
171
171
|
},
|
|
172
172
|
},
|
|
173
|
-
selected: {
|
|
174
|
-
control: 'boolean',
|
|
173
|
+
selected: {
|
|
174
|
+
control: 'boolean',
|
|
175
175
|
description: 'Whether the card is selected',
|
|
176
176
|
table: {
|
|
177
177
|
type: { summary: 'boolean' },
|
|
178
178
|
defaultValue: { summary: false },
|
|
179
179
|
},
|
|
180
180
|
},
|
|
181
|
-
interactive: {
|
|
182
|
-
control: 'boolean',
|
|
181
|
+
interactive: {
|
|
182
|
+
control: 'boolean',
|
|
183
183
|
description: 'Whether the card responds to interactions',
|
|
184
184
|
table: {
|
|
185
185
|
type: { summary: 'boolean' },
|
|
186
186
|
defaultValue: { summary: false },
|
|
187
187
|
},
|
|
188
188
|
},
|
|
189
|
-
className: {
|
|
190
|
-
control: 'text',
|
|
189
|
+
className: {
|
|
190
|
+
control: 'text',
|
|
191
191
|
description: 'Additional CSS class names',
|
|
192
192
|
table: {
|
|
193
193
|
type: { summary: 'string' },
|
|
@@ -381,12 +381,14 @@ export const WithGlassEffect: Story = {
|
|
|
381
381
|
parameters: {
|
|
382
382
|
docs: {
|
|
383
383
|
description: {
|
|
384
|
-
story:
|
|
384
|
+
story:
|
|
385
|
+
'Demonstrates a card with glass morphism effect applied, creating a translucent, frosted appearance that works well over colorful backgrounds.',
|
|
385
386
|
},
|
|
386
387
|
},
|
|
387
388
|
},
|
|
388
389
|
render: args => (
|
|
389
|
-
<div
|
|
390
|
+
<div
|
|
391
|
+
className="u-bg-cover u-h-80vh u-w-90vw u-grid u-rounded-xl u-overflow-hidden"
|
|
390
392
|
style={{
|
|
391
393
|
backgroundImage: `url(https://picsum.photos/id/128/1920/1024)`,
|
|
392
394
|
}}
|
|
@@ -720,7 +722,8 @@ export const AllGlassModesComparison: Story = {
|
|
|
720
722
|
parameters: {
|
|
721
723
|
docs: {
|
|
722
724
|
description: {
|
|
723
|
-
story:
|
|
725
|
+
story:
|
|
726
|
+
'Side-by-side comparison of all available glass morphism modes (standard, polar, prominent, shader) to help you choose the right effect for your design.',
|
|
724
727
|
},
|
|
725
728
|
},
|
|
726
729
|
},
|
|
@@ -966,7 +969,8 @@ export const GlassCardGallery: Story = {
|
|
|
966
969
|
// Glass Card Layouts
|
|
967
970
|
export const GlassCardLayouts: Story = {
|
|
968
971
|
render: () => (
|
|
969
|
-
<div
|
|
972
|
+
<div
|
|
973
|
+
className="u-bg-cover u-bg-center u-p-12 u-rounded-xl u-min-h-95vh u-min-w-95vw u-overflow-auto"
|
|
970
974
|
style={{
|
|
971
975
|
backgroundImage: 'url(https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1920)',
|
|
972
976
|
}}
|
|
@@ -979,9 +983,7 @@ export const GlassCardLayouts: Story = {
|
|
|
979
983
|
<div className="u-flex u-gap-8">
|
|
980
984
|
{/* Standard Layout */}
|
|
981
985
|
<div className="u-w-50">
|
|
982
|
-
<h3 className="u-text-white u-mb-4 u-text-shadow">
|
|
983
|
-
Standard Layout
|
|
984
|
-
</h3>
|
|
986
|
+
<h3 className="u-text-white u-mb-4 u-text-shadow">Standard Layout</h3>
|
|
985
987
|
<Card
|
|
986
988
|
title="Standard Glass Card"
|
|
987
989
|
text="This is a standard glass card with vertical layout."
|
|
@@ -999,9 +1001,7 @@ export const GlassCardLayouts: Story = {
|
|
|
999
1001
|
|
|
1000
1002
|
{/* Row Layout */}
|
|
1001
1003
|
<div className="u-w-50">
|
|
1002
|
-
<h3 className="u-text-white u-mb-4 u-text-shadow">
|
|
1003
|
-
Row Layout
|
|
1004
|
-
</h3>
|
|
1004
|
+
<h3 className="u-text-white u-mb-4 u-text-shadow">Row Layout</h3>
|
|
1005
1005
|
<Card
|
|
1006
1006
|
title="Row Glass Card"
|
|
1007
1007
|
text="This is a row glass card with horizontal layout."
|
|
@@ -1024,9 +1024,7 @@ export const GlassCardLayouts: Story = {
|
|
|
1024
1024
|
|
|
1025
1025
|
{/* Flat Layout */}
|
|
1026
1026
|
<div className="u-w-50">
|
|
1027
|
-
<h3 className="u-text-white u-mb-4 u-text-shadow">
|
|
1028
|
-
Flat Layout
|
|
1029
|
-
</h3>
|
|
1027
|
+
<h3 className="u-text-white u-mb-4 u-text-shadow">Flat Layout</h3>
|
|
1030
1028
|
<Card
|
|
1031
1029
|
title="Flat Glass Card"
|
|
1032
1030
|
text="This is a flat glass card with edge-to-edge image."
|
|
@@ -1081,7 +1079,13 @@ export const SizeVariants: Story = {
|
|
|
1081
1079
|
// Color Variants
|
|
1082
1080
|
export const ColorVariants: Story = {
|
|
1083
1081
|
render: () => (
|
|
1084
|
-
<div
|
|
1082
|
+
<div
|
|
1083
|
+
style={{
|
|
1084
|
+
display: 'grid',
|
|
1085
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))',
|
|
1086
|
+
gap: '1rem',
|
|
1087
|
+
}}
|
|
1088
|
+
>
|
|
1085
1089
|
<Card variant="primary" title="Primary Card" text="Primary variant card." />
|
|
1086
1090
|
<Card variant="secondary" title="Secondary Card" text="Secondary variant card." />
|
|
1087
1091
|
<Card variant="success" title="Success Card" text="Success variant card." />
|
|
@@ -1097,11 +1101,37 @@ export const ColorVariants: Story = {
|
|
|
1097
1101
|
// Appearance Variants
|
|
1098
1102
|
export const AppearanceVariants: Story = {
|
|
1099
1103
|
render: () => (
|
|
1100
|
-
<div
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1104
|
+
<div
|
|
1105
|
+
style={{
|
|
1106
|
+
display: 'grid',
|
|
1107
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))',
|
|
1108
|
+
gap: '1rem',
|
|
1109
|
+
}}
|
|
1110
|
+
>
|
|
1111
|
+
<Card
|
|
1112
|
+
appearance="filled"
|
|
1113
|
+
variant="primary"
|
|
1114
|
+
title="Filled Card"
|
|
1115
|
+
text="Filled appearance with solid background."
|
|
1116
|
+
/>
|
|
1117
|
+
<Card
|
|
1118
|
+
appearance="outlined"
|
|
1119
|
+
variant="primary"
|
|
1120
|
+
title="Outlined Card"
|
|
1121
|
+
text="Outlined appearance with border only."
|
|
1122
|
+
/>
|
|
1123
|
+
<Card
|
|
1124
|
+
appearance="ghost"
|
|
1125
|
+
variant="primary"
|
|
1126
|
+
title="Ghost Card"
|
|
1127
|
+
text="Ghost appearance with minimal styling."
|
|
1128
|
+
/>
|
|
1129
|
+
<Card
|
|
1130
|
+
appearance="elevated"
|
|
1131
|
+
variant="primary"
|
|
1132
|
+
title="Elevated Card"
|
|
1133
|
+
text="Elevated appearance with shadow."
|
|
1134
|
+
/>
|
|
1105
1135
|
</div>
|
|
1106
1136
|
),
|
|
1107
1137
|
};
|
|
@@ -1188,7 +1218,8 @@ export const Comprehensive: Story = {
|
|
|
1188
1218
|
parameters: {
|
|
1189
1219
|
docs: {
|
|
1190
1220
|
description: {
|
|
1191
|
-
story:
|
|
1221
|
+
story:
|
|
1222
|
+
'A comprehensive example demonstrating various card features including sizes, variants, appearances, elevations, and states in a grid layout.',
|
|
1192
1223
|
},
|
|
1193
1224
|
},
|
|
1194
1225
|
},
|
|
@@ -96,7 +96,24 @@ export const Card = React.memo(
|
|
|
96
96
|
]
|
|
97
97
|
.filter(Boolean)
|
|
98
98
|
.join(' '),
|
|
99
|
-
[
|
|
99
|
+
[
|
|
100
|
+
size,
|
|
101
|
+
variant,
|
|
102
|
+
appearance,
|
|
103
|
+
elevation,
|
|
104
|
+
hoverable,
|
|
105
|
+
hoverElevation,
|
|
106
|
+
row,
|
|
107
|
+
flat,
|
|
108
|
+
active,
|
|
109
|
+
disabled,
|
|
110
|
+
loading,
|
|
111
|
+
selected,
|
|
112
|
+
interactive,
|
|
113
|
+
isClickable,
|
|
114
|
+
glass,
|
|
115
|
+
className,
|
|
116
|
+
]
|
|
100
117
|
);
|
|
101
118
|
|
|
102
119
|
// Determine ARIA role
|
|
@@ -239,11 +256,7 @@ export const Card = React.memo(
|
|
|
239
256
|
|
|
240
257
|
if (glass) {
|
|
241
258
|
const glassProps = glass === true ? {} : glass;
|
|
242
|
-
return
|
|
243
|
-
<AtomixGlass {...{ ...glassProps, elasticity: 0 }}>
|
|
244
|
-
{anchorElement}
|
|
245
|
-
</AtomixGlass>
|
|
246
|
-
);
|
|
259
|
+
return <AtomixGlass {...{ ...glassProps, elasticity: 0 }}>{anchorElement}</AtomixGlass>;
|
|
247
260
|
}
|
|
248
261
|
|
|
249
262
|
return anchorElement;
|
|
@@ -258,11 +271,7 @@ export const Card = React.memo(
|
|
|
258
271
|
|
|
259
272
|
if (glass) {
|
|
260
273
|
const glassProps = glass === true ? {} : glass;
|
|
261
|
-
return
|
|
262
|
-
<AtomixGlass {...{ ...glassProps, elasticity: 0 }}>
|
|
263
|
-
{divElement}
|
|
264
|
-
</AtomixGlass>
|
|
265
|
-
);
|
|
274
|
+
return <AtomixGlass {...{ ...glassProps, elasticity: 0 }}>{divElement}</AtomixGlass>;
|
|
266
275
|
}
|
|
267
276
|
|
|
268
277
|
return divElement;
|
|
@@ -327,10 +336,16 @@ export interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
327
336
|
|
|
328
337
|
export const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(
|
|
329
338
|
({ scrollable = false, maxHeight, children, className = '', style, ...props }, ref) => {
|
|
330
|
-
const bodyClasses =
|
|
339
|
+
const bodyClasses =
|
|
340
|
+
`${CARD.SELECTORS.BODY.substring(1)} ${scrollable ? 'c-card__body--scrollable' : ''} ${className}`.trim();
|
|
331
341
|
const bodyStyle: React.CSSProperties = {
|
|
332
342
|
...style,
|
|
333
|
-
...(scrollable && maxHeight
|
|
343
|
+
...(scrollable && maxHeight
|
|
344
|
+
? {
|
|
345
|
+
maxHeight: typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight,
|
|
346
|
+
overflowY: 'auto',
|
|
347
|
+
}
|
|
348
|
+
: {}),
|
|
334
349
|
};
|
|
335
350
|
|
|
336
351
|
return (
|
|
@@ -352,7 +367,8 @@ export interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
352
367
|
|
|
353
368
|
export const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(
|
|
354
369
|
({ align, children, className = '', style, ...props }, ref) => {
|
|
355
|
-
const footerClasses =
|
|
370
|
+
const footerClasses =
|
|
371
|
+
`${CARD.SELECTORS.FOOTER.substring(1)} ${align ? `c-card__footer--align-${align}` : ''} ${className}`.trim();
|
|
356
372
|
|
|
357
373
|
return (
|
|
358
374
|
<div ref={ref} className={footerClasses} style={style} {...props}>
|
|
@@ -49,7 +49,7 @@ const AreaChart = memo(
|
|
|
49
49
|
y: scales.yScale(point.value),
|
|
50
50
|
}));
|
|
51
51
|
|
|
52
|
-
const areaPath = `M ${areaPoints.map(
|
|
52
|
+
const areaPath = `M ${areaPoints.map(p => `${p.x},${p.y}`).join(' L ')} L ${areaPoints[areaPoints.length - 1]?.x},${scales.height} L ${areaPoints[0]?.x},${scales.height} Z`;
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
55
|
<g key={`dataset-${datasetIndex}`}>
|
|
@@ -125,7 +125,10 @@ const CandlestickChart = memo(
|
|
|
125
125
|
borderColor = 'var(--atomix-primary-border-subtle)',
|
|
126
126
|
showMovingAverages = false,
|
|
127
127
|
movingAveragePeriods = [7, 21],
|
|
128
|
-
movingAverageColors = [
|
|
128
|
+
movingAverageColors = [
|
|
129
|
+
'var(--atomix-warning-bg-subtle)',
|
|
130
|
+
'var(--atomix-warning-border-subtle)',
|
|
131
|
+
],
|
|
129
132
|
dateFormat = 'short',
|
|
130
133
|
dateFormatter,
|
|
131
134
|
showGrid = true,
|
|
@@ -189,7 +192,11 @@ const CandlestickChart = memo(
|
|
|
189
192
|
}: ChartRenderContentParams) => {
|
|
190
193
|
if (!candlestickData.length) return null;
|
|
191
194
|
|
|
192
|
-
const showTooltips =
|
|
195
|
+
const showTooltips =
|
|
196
|
+
toolbarState?.showTooltips ??
|
|
197
|
+
renderConfig?.showTooltips ??
|
|
198
|
+
candlestickOptions.showTooltips ??
|
|
199
|
+
true;
|
|
193
200
|
|
|
194
201
|
const padding = 40;
|
|
195
202
|
const chartWidth = scales.width - padding * 2;
|
|
@@ -298,7 +305,9 @@ const CandlestickChart = memo(
|
|
|
298
305
|
);
|
|
299
306
|
}}
|
|
300
307
|
onMouseLeave={handlers.onPointLeave}
|
|
301
|
-
onClick={() =>
|
|
308
|
+
onClick={() =>
|
|
309
|
+
handlers.onDataPointClick?.(candle as unknown as ChartDataPoint, 0, index)
|
|
310
|
+
}
|
|
302
311
|
/>
|
|
303
312
|
</g>
|
|
304
313
|
);
|
|
@@ -372,19 +381,17 @@ const CandlestickChart = memo(
|
|
|
372
381
|
{candles}
|
|
373
382
|
{volumeBars}
|
|
374
383
|
{movingAverages}
|
|
375
|
-
{showTooltips &&
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/>
|
|
387
|
-
)}
|
|
384
|
+
{showTooltips && hoveredPoint && candlestickData[hoveredPoint.pointIndex] && (
|
|
385
|
+
<ChartTooltip
|
|
386
|
+
dataPoint={candlestickData[hoveredPoint.pointIndex] as unknown as ChartDataPoint}
|
|
387
|
+
datasetLabel="Candlestick"
|
|
388
|
+
position={{
|
|
389
|
+
x: hoveredPoint.clientX,
|
|
390
|
+
y: hoveredPoint.clientY,
|
|
391
|
+
}}
|
|
392
|
+
visible={true}
|
|
393
|
+
/>
|
|
394
|
+
)}
|
|
388
395
|
</>
|
|
389
396
|
);
|
|
390
397
|
};
|
|
@@ -179,7 +179,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
179
179
|
|
|
180
180
|
// Glass Variant Story
|
|
181
181
|
export const GlassVariant: Story = {
|
|
182
|
-
render:
|
|
182
|
+
render: args => {
|
|
183
183
|
const sampleData = [
|
|
184
184
|
{ label: 'Jan', value: 65 },
|
|
185
185
|
{ label: 'Feb', value: 78 },
|
|
@@ -240,12 +240,7 @@ export const GlassVariant: Story = {
|
|
|
240
240
|
/>
|
|
241
241
|
</GridCol>
|
|
242
242
|
<GridCol col={12} md={6}>
|
|
243
|
-
<PieChart
|
|
244
|
-
title="Market Share"
|
|
245
|
-
data={sampleData}
|
|
246
|
-
glass={true}
|
|
247
|
-
showToolbar={true}
|
|
248
|
-
/>
|
|
243
|
+
<PieChart title="Market Share" data={sampleData} glass={true} showToolbar={true} />
|
|
249
244
|
</GridCol>
|
|
250
245
|
<GridCol col={12} md={6}>
|
|
251
246
|
<AreaChart
|
|
@@ -356,7 +351,7 @@ const generateTreemapData = (count = 12) => {
|
|
|
356
351
|
'Agriculture',
|
|
357
352
|
'Construction',
|
|
358
353
|
];
|
|
359
|
-
|
|
354
|
+
|
|
360
355
|
return Array.from({ length: count }, (_, i) => ({
|
|
361
356
|
id: `category-${i}`,
|
|
362
357
|
label: categories[i % categories.length] || `Category ${i + 1}`,
|
|
@@ -377,7 +372,7 @@ const generateFunnelData = () => {
|
|
|
377
372
|
{ label: 'Evaluation', value: 600 },
|
|
378
373
|
{ label: 'Purchase', value: 300 },
|
|
379
374
|
];
|
|
380
|
-
|
|
375
|
+
|
|
381
376
|
return stages.map(stage => ({
|
|
382
377
|
...stage,
|
|
383
378
|
percentage: ((stage.value / stages[0].value) * 100).toFixed(1),
|