@shohojdhara/atomix 0.3.14 → 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/CHANGELOG.md +20 -0
- package/build-tools/EXAMPLES.md +372 -0
- package/build-tools/README.md +242 -0
- package/build-tools/__tests__/error-handler.test.js +230 -0
- package/build-tools/__tests__/index.test.js +141 -0
- package/build-tools/__tests__/rollup-plugin.test.js +194 -0
- package/build-tools/__tests__/utils.test.js +161 -0
- package/build-tools/__tests__/vite-plugin.test.js +129 -0
- package/build-tools/__tests__/webpack-loader.test.js +190 -0
- package/build-tools/error-handler.js +308 -0
- package/build-tools/index.d.ts +44 -0
- package/build-tools/index.js +88 -0
- package/build-tools/package.json +50 -0
- package/build-tools/rollup-plugin.js +236 -0
- package/build-tools/types.d.ts +163 -0
- package/build-tools/utils.js +203 -0
- package/build-tools/vite-plugin.js +161 -0
- package/build-tools/webpack-loader.js +123 -0
- package/dist/atomix.css +21044 -2618
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +77 -3
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/EXAMPLES.md +372 -0
- package/dist/build-tools/README.md +242 -0
- package/dist/build-tools/__tests__/error-handler.test.js +230 -0
- package/dist/build-tools/__tests__/index.test.js +141 -0
- package/dist/build-tools/__tests__/rollup-plugin.test.js +194 -0
- package/dist/build-tools/__tests__/utils.test.js +161 -0
- package/dist/build-tools/__tests__/vite-plugin.test.js +129 -0
- package/dist/build-tools/__tests__/webpack-loader.test.js +190 -0
- package/dist/build-tools/error-handler.js +308 -0
- package/dist/build-tools/index.d.ts +44 -0
- package/dist/build-tools/index.js +88 -0
- package/dist/build-tools/package.json +50 -0
- package/dist/build-tools/rollup-plugin.js +236 -0
- package/dist/build-tools/types.d.ts +163 -0
- package/dist/build-tools/utils.js +203 -0
- package/dist/build-tools/vite-plugin.js +161 -0
- package/dist/build-tools/webpack-loader.js +123 -0
- package/dist/charts.d.ts +1 -1
- package/dist/charts.js +86 -57
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +136 -112
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +2 -5
- package/dist/forms.js +140 -128
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +1 -1
- package/dist/heavy.js +136 -112
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +152 -78
- package/dist/index.esm.js +346 -340
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +359 -353
- 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 +23 -8
- package/scripts/atomix-cli.js +170 -73
- package/scripts/cli/__tests__/README.md +81 -0
- package/scripts/cli/__tests__/basic.test.js +115 -0
- package/scripts/cli/__tests__/component-generator.test.js +332 -0
- package/scripts/cli/__tests__/integration.test.js +327 -0
- package/scripts/cli/__tests__/test-setup.js +133 -0
- package/scripts/cli/__tests__/token-manager.test.js +251 -0
- package/scripts/cli/__tests__/utils.test.js +161 -0
- package/scripts/cli/component-generator.js +253 -299
- package/scripts/cli/dependency-checker.js +355 -0
- package/scripts/cli/interactive-init.js +46 -5
- package/scripts/cli/template-manager.js +0 -2
- package/scripts/cli/templates/common-templates.js +636 -0
- package/scripts/cli/templates/composable-templates.js +148 -126
- package/scripts/cli/templates/index.js +23 -16
- package/scripts/cli/templates/project-templates.js +151 -23
- package/scripts/cli/templates/react-templates.js +280 -210
- package/scripts/cli/templates/scss-templates.js +90 -91
- package/scripts/cli/templates/testing-templates.js +206 -27
- package/scripts/cli/templates/testing-utils.js +278 -0
- package/scripts/cli/templates/types-templates.js +70 -56
- package/scripts/cli/theme-bridge.js +8 -2
- package/scripts/cli/token-manager.js +318 -206
- package/scripts/cli/utils.js +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +358 -850
- 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/AtomixGlass.tsx +80 -39
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +103 -81
- package/src/components/AtomixGlass/GlassFilter.tsx +9 -16
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +8 -7
- package/src/components/AtomixGlass/glass-utils.ts +6 -5
- package/src/components/AtomixGlass/shader-utils.ts +133 -52
- package/src/components/AtomixGlass/stories/Customization.stories.tsx +131 -0
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +2957 -2853
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -1
- package/src/components/AtomixGlass/stories/Overview.stories.tsx +348 -0
- package/src/components/AtomixGlass/stories/Performance.stories.tsx +103 -0
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +51 -36
- package/src/components/AtomixGlass/stories/{ShaderVariants.stories.tsx → Shaders.stories.tsx} +2 -2
- package/src/components/AtomixGlass/stories/shared-components.tsx +90 -190
- package/src/components/Avatar/Avatar.stories.tsx +195 -0
- package/src/components/Avatar/Avatar.tsx +58 -56
- package/src/components/Badge/Badge.stories.tsx +122 -352
- package/src/components/Badge/Badge.test.tsx +41 -41
- package/src/components/Badge/Badge.tsx +64 -62
- package/src/components/Block/Block.stories.tsx +30 -11
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +142 -23
- package/src/components/Breadcrumb/Breadcrumb.tsx +62 -60
- package/src/components/Button/Button.stories.tsx +454 -1126
- package/src/components/Button/Button.test.tsx +123 -0
- package/src/components/Button/Button.tsx +88 -60
- package/src/components/Button/ButtonGroup.stories.tsx +376 -215
- package/src/components/Button/ButtonGroup.tsx +4 -15
- package/src/components/Callout/Callout.stories.tsx +316 -568
- package/src/components/Card/Card.stories.tsx +292 -81
- 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 +153 -16
- 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 +152 -66
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +15 -3
- package/src/components/Countdown/Countdown.stories.tsx +114 -7
- package/src/components/DataTable/DataTable.stories.tsx +349 -144
- package/src/components/DataTable/DataTable.test.tsx +26 -148
- package/src/components/DataTable/DataTable.tsx +485 -456
- package/src/components/DatePicker/DatePicker.stories.tsx +310 -1066
- package/src/components/DatePicker/DatePicker.tsx +31 -26
- package/src/components/Dropdown/Dropdown.stories.tsx +153 -36
- package/src/components/Dropdown/Dropdown.tsx +313 -299
- package/src/components/EdgePanel/EdgePanel.stories.tsx +221 -25
- package/src/components/EdgePanel/EdgePanel.tsx +1 -3
- package/src/components/Footer/Footer.stories.tsx +396 -327
- package/src/components/Footer/Footer.tsx +130 -128
- package/src/components/Footer/FooterLink.tsx +2 -2
- package/src/components/Form/Checkbox.stories.tsx +140 -6
- package/src/components/Form/Checkbox.test.tsx +63 -0
- package/src/components/Form/Checkbox.tsx +122 -78
- package/src/components/Form/Form.stories.tsx +110 -19
- package/src/components/Form/FormGroup.stories.tsx +127 -4
- 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 +146 -17
- package/src/components/Form/Radio.tsx +68 -66
- package/src/components/Form/Select.stories.tsx +140 -8
- package/src/components/Form/Select.tsx +184 -182
- package/src/components/Form/Textarea.stories.tsx +149 -6
- package/src/components/Form/Textarea.test.tsx +27 -32
- package/src/components/Hero/Hero.stories.tsx +372 -38
- package/src/components/Hero/Hero.tsx +201 -55
- package/src/components/Icon/index.ts +7 -1
- package/src/components/List/List.stories.tsx +141 -3
- package/src/components/List/List.tsx +19 -23
- package/src/components/Modal/Modal.stories.tsx +183 -43
- 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 +354 -97
- package/src/components/Popover/Popover.tsx +41 -37
- package/src/components/Progress/Progress.stories.tsx +160 -7
- package/src/components/River/River.stories.tsx +3 -2
- package/src/components/SectionIntro/SectionIntro.stories.tsx +239 -47
- package/src/components/Slider/Slider.stories.tsx +12 -4
- package/src/components/Spinner/Spinner.stories.tsx +104 -8
- package/src/components/Spinner/Spinner.test.tsx +23 -23
- package/src/components/Spinner/Spinner.tsx +43 -46
- package/src/components/Steps/Steps.stories.tsx +173 -42
- package/src/components/Tabs/Tabs.stories.tsx +141 -12
- package/src/components/Tabs/Tabs.tsx +74 -72
- package/src/components/Testimonial/Testimonial.stories.tsx +120 -3
- package/src/components/Todo/Todo.stories.tsx +198 -9
- package/src/components/Toggle/Toggle.stories.tsx +137 -36
- package/src/components/Toggle/Toggle.test.tsx +65 -70
- package/src/components/Toggle/Toggle.tsx +4 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +194 -100
- package/src/components/Tooltip/Tooltip.tsx +104 -106
- package/src/components/Upload/Upload.stories.tsx +241 -150
- 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/README.md +2 -2
- package/src/lib/__tests__/theme-tools.test.ts +219 -0
- package/src/lib/composables/index.ts +2 -2
- package/src/lib/composables/shared-mouse-tracker.ts +13 -14
- package/src/lib/composables/useAtomixGlass.ts +126 -97
- package/src/lib/composables/useChartExport.ts +3 -8
- package/src/lib/composables/useDataTable.ts +72 -43
- 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/components.ts +9 -32
- 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 +107 -105
- 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 +45 -0
- package/src/lib/utils/componentUtils.ts +8 -12
- package/src/lib/utils/csv.ts +19 -0
- package/src/lib/utils/dataTableExport.ts +2 -15
- 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 +1 -1
- package/src/styles/01-settings/_settings.accordion.scss +28 -7
- package/src/styles/01-settings/_settings.colors.scss +11 -11
- 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 +4 -4
- package/src/styles/02-tools/_tools.button.scss +51 -21
- package/src/styles/02-tools/_tools.utility-api.scss +38 -12
- package/src/styles/03-generic/_generic.root.scss +4 -3
- package/src/styles/06-components/_components.accordion.scss +56 -14
- 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 +25 -17
- 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/_index.scss +2 -0
- 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 +2 -0
- 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 +45 -0
- package/src/styles/99-utilities/_utilities.text.scss +67 -46
- package/themes/dark-complementary/README.md +98 -0
- package/themes/dark-complementary/index.scss +158 -0
- package/themes/default-light/README.md +81 -0
- package/themes/default-light/index.scss +154 -0
- package/themes/high-contrast/README.md +105 -0
- package/themes/high-contrast/index.scss +172 -0
- package/themes/test-theme/README.md +38 -0
- package/themes/test-theme/index.scss +47 -0
- package/scripts/cli/templates-original-backup.js +0 -1655
- package/scripts/cli/templates_backup.js +0 -684
- package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +0 -1438
- package/src/lib/composables/useButton.ts +0 -93
- package/src/lib/composables/useCheckbox.ts +0 -70
package/dist/index.esm.js
CHANGED
|
@@ -1226,29 +1226,6 @@ import { createPortal } from "react-dom";
|
|
|
1226
1226
|
SIZES: [ "xs", "sm", "md", "lg", "xl", "none" ],
|
|
1227
1227
|
DEFAULT: "md"
|
|
1228
1228
|
}
|
|
1229
|
-
}, GLASS_CONTAINER = {
|
|
1230
|
-
CLASSES: {
|
|
1231
|
-
BASE: "c-glass-container",
|
|
1232
|
-
GLASS: "c-glass-container__glass",
|
|
1233
|
-
WARP: "c-glass-container__warp",
|
|
1234
|
-
CONTENT: "c-glass-container__content",
|
|
1235
|
-
OVERLAY: "c-glass-container__overlay",
|
|
1236
|
-
OVERLAY_VISIBLE: "c-glass-container__overlay--visible",
|
|
1237
|
-
OVERLAY_HIDDEN: "c-glass-container__overlay--hidden",
|
|
1238
|
-
OVERLAY_BLEND: "c-glass-container__overlay-blend",
|
|
1239
|
-
BORDER: "c-glass-container__border",
|
|
1240
|
-
BORDER_OVERLAY: "c-glass-container__border-overlay",
|
|
1241
|
-
HOVER_EFFECT: "c-glass-container__hover-effect",
|
|
1242
|
-
ACTIVE_EFFECT: "c-glass-container__active-effect",
|
|
1243
|
-
INTERACTION_EFFECT: "c-glass-container__interaction-effect",
|
|
1244
|
-
ACTIVE: "c-glass-container--active",
|
|
1245
|
-
CLICKABLE: "c-glass-container--clickable"
|
|
1246
|
-
},
|
|
1247
|
-
DISPLACEMENT_MAPS: {
|
|
1248
|
-
STANDARD: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcwIiBoZWlnaHQ9IjY5IiB2aWV3Qm94PSIwIDAgMjcwIDY5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGN4PSI1MCUiIGN5PSI1MCUiIHI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzgwODA4MCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgwODA4MCIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZGllbnQpIi8+PC9zdmc+",
|
|
1249
|
-
POLAR: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcwIiBoZWlnaHQ9IjY5IiB2aWV3Qm94PSIwIDAgMjcwIDY5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0icG9sYXIiIGN4PSI1MCUiIGN5PSI1MCUiIHI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQwNDA0MCIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjODA4MDgwIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNDA0MDQwIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwb2xhcikiLz48L3N2Zz4=",
|
|
1250
|
-
PROMINENT: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcwIiBoZWlnaHQ9IjY5IiB2aWV3Qm94PSIwIDAgMjcwIDY5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0icHJvbWluZW50IiB4MT0iMCUiIHkxPSIwJSIgeDI9IjEwMCUiIHkyPSIxMDAlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjNDA0MDQwIi8+PHN0b3Agb2Zmc2V0PSI1MCUiIHN0b3AtY29sb3I9IiNjMGMwYzAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM0MDQwNDAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI3Byb21pbmVudCkiLz48L3N2Zz4="
|
|
1251
|
-
}
|
|
1252
1229
|
}, FOOTER = {
|
|
1253
1230
|
SELECTORS: {
|
|
1254
1231
|
FOOTER: ".c-footer",
|
|
@@ -1387,10 +1364,16 @@ import { createPortal } from "react-dom";
|
|
|
1387
1364
|
MIN_BLUR: .1,
|
|
1388
1365
|
MOUSE_INFLUENCE_DIVISOR: 100,
|
|
1389
1366
|
EDGE_FADE_PIXELS: 2,
|
|
1367
|
+
// Note: This default must match the SCSS variable --atomix-radius-md
|
|
1368
|
+
// @see src/styles/01-settings/_settings.global.scss
|
|
1390
1369
|
DEFAULT_CORNER_RADIUS: 16,
|
|
1391
|
-
// Fallback value matching design system
|
|
1392
1370
|
MAX_SIZE: 4096,
|
|
1393
1371
|
// Maximum width/height for glass size
|
|
1372
|
+
// Palette for internal calculations (matches design system base colors)
|
|
1373
|
+
PALETTE: {
|
|
1374
|
+
WHITE: "255, 255, 255",
|
|
1375
|
+
BLACK: "0, 0, 0"
|
|
1376
|
+
},
|
|
1394
1377
|
// Gradient calculation constants
|
|
1395
1378
|
GRADIENT: {
|
|
1396
1379
|
BASE_ANGLE: 135,
|
|
@@ -1608,10 +1591,10 @@ const {CONSTANTS: CONSTANTS$1} = ATOMIX_GLASS, calculateDistance = (pos1, pos2)
|
|
|
1608
1591
|
y: 0
|
|
1609
1592
|
}, calculateMouseInfluence = mouseOffset => {
|
|
1610
1593
|
if (!mouseOffset || "number" != typeof mouseOffset.x || "number" != typeof mouseOffset.y) return 0;
|
|
1611
|
-
//
|
|
1594
|
+
// Bounded calculation — keeps the glass effect subtle and stable
|
|
1612
1595
|
const influence = Math.sqrt(mouseOffset.x * mouseOffset.x + mouseOffset.y * mouseOffset.y) / CONSTANTS$1.MOUSE_INFLUENCE_DIVISOR;
|
|
1613
|
-
return Math.min(
|
|
1614
|
-
//
|
|
1596
|
+
return Math.min(.8, influence);
|
|
1597
|
+
// Tighter cap to prevent blur/filter blow-out
|
|
1615
1598
|
}, clampBlur = value => "number" != typeof value || isNaN(value) ? CONSTANTS$1.MIN_BLUR : Math.max(CONSTANTS$1.MIN_BLUR, Math.min(50, value)), validateGlassSize = size => size && "number" == typeof size.width && "number" == typeof size.height && size.width > 0 && size.height > 0 && size.width <= CONSTANTS$1.MAX_SIZE && size.height <= CONSTANTS$1.MAX_SIZE, parseBorderRadiusValue = value => {
|
|
1616
1599
|
if ("number" == typeof value) return Math.max(0, value);
|
|
1617
1600
|
if ("string" != typeof value || !value.trim()) return CONSTANTS$1.DEFAULT_CORNER_RADIUS;
|
|
@@ -1842,7 +1825,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
1842
1825
|
}, globalMousePosition: globalMousePosition = {
|
|
1843
1826
|
x: 0,
|
|
1844
1827
|
y: 0
|
|
1845
|
-
}, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp,
|
|
1828
|
+
}, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp, isHovered: isHovered = !1, isActive: isActive = !1, overLight: overLight = !1, overLightConfig: overLightConfig = {}, cornerRadius: cornerRadius = 0, padding: padding = "0 0", glassSize: glassSize = {
|
|
1846
1829
|
width: 0,
|
|
1847
1830
|
height: 0
|
|
1848
1831
|
}, onClick: onClick, mode: mode = "standard", effectiveDisableEffects: effectiveDisableEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", enableLiquidBlur: enableLiquidBlur = !1, elasticity: elasticity = 0, contentRef: contentRef}, ref) => {
|
|
@@ -1955,28 +1938,29 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
1955
1938
|
flowBlur: 1.2 * blurAmount
|
|
1956
1939
|
};
|
|
1957
1940
|
// Enhanced validation for liquid blur
|
|
1958
|
-
if (!enableLiquidBlur || !rectCache || !
|
|
1941
|
+
if (!enableLiquidBlur || !rectCache || !mouseOffset || "number" != typeof mouseOffset.x || "number" != typeof mouseOffset.y || isNaN(mouseOffset.x) || isNaN(mouseOffset.y)) return defaultBlur;
|
|
1959
1942
|
try {
|
|
1960
|
-
|
|
1961
|
-
|
|
1943
|
+
const mouseInfluence = calculateMouseInfluence(mouseOffset), maxBlur = 2 * blurAmount, baseBlur = Math.min(maxBlur, blurAmount + mouseInfluence * blurAmount * .15), edgeIntensity = .15 * mouseInfluence, edgeBlur = Math.min(maxBlur, baseBlur * (.8 + .4 * edgeIntensity)), centerIntensity = .1 * mouseInfluence, centerBlur = Math.min(maxBlur, baseBlur * (.3 + .3 * centerIntensity)), flowBlur = Math.min(maxBlur, 1.2 * baseBlur);
|
|
1944
|
+
// NOTE: hover/active multipliers intentionally omitted here —
|
|
1945
|
+
// they belong on opacity layers, not the blur filter itself.
|
|
1962
1946
|
return {
|
|
1963
|
-
baseBlur: clampBlur(baseBlur
|
|
1964
|
-
edgeBlur: clampBlur(edgeBlur
|
|
1965
|
-
centerBlur: clampBlur(centerBlur
|
|
1966
|
-
flowBlur: clampBlur(flowBlur
|
|
1947
|
+
baseBlur: clampBlur(baseBlur),
|
|
1948
|
+
edgeBlur: clampBlur(edgeBlur),
|
|
1949
|
+
centerBlur: clampBlur(centerBlur),
|
|
1950
|
+
flowBlur: clampBlur(flowBlur)
|
|
1967
1951
|
};
|
|
1968
1952
|
} catch (error) {
|
|
1969
1953
|
return console.warn("AtomixGlassContainer: Error calculating liquid blur", error),
|
|
1970
1954
|
defaultBlur;
|
|
1971
1955
|
}
|
|
1972
|
-
}), [ enableLiquidBlur, blurAmount,
|
|
1956
|
+
}), [ enableLiquidBlur, blurAmount, mouseOffset, rectCache ]), backdropStyle = useMemo((() => {
|
|
1973
1957
|
try {
|
|
1974
1958
|
const dynamicSaturation = saturation + 20 * (liquidBlur.baseBlur || 0), validatedBaseBlur = "number" != typeof liquidBlur.baseBlur || isNaN(liquidBlur.baseBlur) ? 0 : liquidBlur.baseBlur, validatedEdgeBlur = "number" != typeof liquidBlur.edgeBlur || isNaN(liquidBlur.edgeBlur) ? 0 : liquidBlur.edgeBlur, validatedCenterBlur = "number" != typeof liquidBlur.centerBlur || isNaN(liquidBlur.centerBlur) ? 0 : liquidBlur.centerBlur, validatedFlowBlur = "number" != typeof liquidBlur.flowBlur || isNaN(liquidBlur.flowBlur) ? 0 : liquidBlur.flowBlur, area = rectCache ? rectCache.width * rectCache.height : 0;
|
|
1975
1959
|
// Validate blur values before using them
|
|
1976
1960
|
return !enableLiquidBlur || effectiveReducedMotion || effectiveDisableEffects || area > 18e4 ? {
|
|
1977
|
-
backdropFilter: `blur(${clampBlur(Math.max(validatedBaseBlur, .8 * validatedEdgeBlur, 1.1 * validatedCenterBlur, .9 * validatedFlowBlur))}px) saturate(${Math.min(dynamicSaturation, 200)}%) contrast(1.05) brightness(1.05)`
|
|
1961
|
+
backdropFilter: `blur(${clampBlur(Math.max(validatedBaseBlur, .8 * validatedEdgeBlur, 1.1 * validatedCenterBlur, .9 * validatedFlowBlur))}px) saturate(${Math.min(dynamicSaturation, 200)}%) contrast(${overLightConfig?.contrast || 1.05}) brightness(${overLightConfig?.brightness || 1.05})`
|
|
1978
1962
|
} : {
|
|
1979
|
-
backdropFilter:
|
|
1963
|
+
backdropFilter: `blur(${clampBlur(.4 * validatedBaseBlur + .25 * validatedEdgeBlur + .15 * validatedCenterBlur + .2 * validatedFlowBlur)}px) saturate(${Math.min(dynamicSaturation, 200)}%) contrast(${overLightConfig?.contrast || 1.05}) brightness(${overLightConfig?.brightness || 1.05})`
|
|
1980
1964
|
};
|
|
1981
1965
|
// Single-pass fallback: stronger radius to match perceived blur of multi-pass
|
|
1982
1966
|
} catch (error) {
|
|
@@ -1995,7 +1979,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
1995
1979
|
"--atomix-glass-container-padding": padding || "0 0",
|
|
1996
1980
|
"--atomix-glass-container-radius": `${"number" != typeof cornerRadius || isNaN(cornerRadius) ? 0 : cornerRadius}px`,
|
|
1997
1981
|
"--atomix-glass-container-backdrop": backdropStyle?.backdropFilter || "none",
|
|
1998
|
-
"--atomix-glass-container-shadow": overLight ? [ `inset 0 1px 0 rgba(255, 255, 255, ${.4 + .002 * mx})`, `inset 0 -1px 0 rgba(0, 0, 0, ${.2 + .001 * Math.abs(my)})`, `inset 0 0 20px rgba(0, 0, 0, ${.08 + .001 * Math.abs(mx + my)})`, `0 2px 12px rgba(0, 0, 0, ${.12 + .002 * Math.abs(my)})` ].join(", ") : "0 0 20px rgba(0, 0, 0, 0.15) inset, 0 4px 8px rgba(0, 0, 0, 0.08) inset",
|
|
1982
|
+
"--atomix-glass-container-shadow": overLight ? [ `inset 0 1px 0 rgba(255, 255, 255, ${(.4 + .002 * mx) * (overLightConfig?.shadowIntensity || 1)})`, `inset 0 -1px 0 rgba(0, 0, 0, ${(.2 + .001 * Math.abs(my)) * (overLightConfig?.shadowIntensity || 1)})`, `inset 0 0 20px rgba(0, 0, 0, ${(.08 + .001 * Math.abs(mx + my)) * (overLightConfig?.shadowIntensity || 1)})`, `0 2px 12px rgba(0, 0, 0, ${(.12 + .002 * Math.abs(my)) * (overLightConfig?.shadowIntensity || 1)})` ].join(", ") : "0 0 20px rgba(0, 0, 0, 0.15) inset, 0 4px 8px rgba(0, 0, 0, 0.08) inset",
|
|
1999
1983
|
"--atomix-glass-container-shadow-opacity": effectiveDisableEffects ? 0 : 1,
|
|
2000
1984
|
// Background and shadow values use design token-aligned RGB values
|
|
2001
1985
|
"--atomix-glass-container-bg": overLight ? `linear-gradient(${180 + .5 * mx}deg, rgba(255, 255, 255, 0.1) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.05) 100%)` : "none",
|
|
@@ -2014,10 +1998,18 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
2014
1998
|
"--atomix-glass-container-text-shadow": "none"
|
|
2015
1999
|
};
|
|
2016
2000
|
}
|
|
2017
|
-
}), [ glassSize, padding, cornerRadius, backdropStyle, mouseOffset, overLight, effectiveDisableEffects ])
|
|
2001
|
+
}), [ glassSize, padding, cornerRadius, backdropStyle, mouseOffset, overLight, effectiveDisableEffects ]), setForceNoTransition = el => {
|
|
2002
|
+
el && (el.style.setProperty("transition-duration", "0s", "important"), el.style.setProperty("animation-duration", "0s", "important"),
|
|
2003
|
+
el.style.setProperty("transition-delay", "0s", "important"));
|
|
2004
|
+
};
|
|
2018
2005
|
return jsx("div", {
|
|
2019
|
-
ref:
|
|
2020
|
-
|
|
2006
|
+
ref: el => {
|
|
2007
|
+
// Apply force no-transition
|
|
2008
|
+
setForceNoTransition(el),
|
|
2009
|
+
// Handle forwarded ref
|
|
2010
|
+
"function" == typeof ref ? ref(el) : ref && (ref.current = el);
|
|
2011
|
+
},
|
|
2012
|
+
className: `${ATOMIX_GLASS.CONTAINER_CLASS} ${className} ${isActive ? ATOMIX_GLASS.CLASSES.ACTIVE : ""} ${overLight ? ATOMIX_GLASS.CLASSES.OVER_LIGHT : ""}`,
|
|
2021
2013
|
style: {
|
|
2022
2014
|
...style,
|
|
2023
2015
|
...containerVars
|
|
@@ -2035,6 +2027,11 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
2035
2027
|
onMouseUp: onMouseUp,
|
|
2036
2028
|
children: [ jsxs("div", {
|
|
2037
2029
|
className: ATOMIX_GLASS.FILTER_CLASS,
|
|
2030
|
+
style: {
|
|
2031
|
+
zIndex: 1,
|
|
2032
|
+
position: "absolute",
|
|
2033
|
+
inset: 0
|
|
2034
|
+
},
|
|
2038
2035
|
children: [ jsx(GlassFilter, {
|
|
2039
2036
|
blurAmount: blurAmount,
|
|
2040
2037
|
mode: mode,
|
|
@@ -2043,6 +2040,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
2043
2040
|
aberrationIntensity: "number" != typeof aberrationIntensity || isNaN(aberrationIntensity) ? 0 : aberrationIntensity,
|
|
2044
2041
|
shaderMapUrl: shaderMapUrl
|
|
2045
2042
|
}), jsx("div", {
|
|
2043
|
+
ref: setForceNoTransition,
|
|
2046
2044
|
className: ATOMIX_GLASS.FILTER_OVERLAY_CLASS,
|
|
2047
2045
|
style: {
|
|
2048
2046
|
filter: `url(#${filterId})`,
|
|
@@ -2064,9 +2062,8 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
|
|
|
2064
2062
|
style: {
|
|
2065
2063
|
position: "relative",
|
|
2066
2064
|
textShadow: "var(--atomix-glass-container-text-shadow)",
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
} : {}
|
|
2065
|
+
// Ensure content is always above the filter layer (zIndex 1)
|
|
2066
|
+
zIndex: elasticity > 0 ? 100 : 2
|
|
2070
2067
|
},
|
|
2071
2068
|
children: children
|
|
2072
2069
|
}) ]
|
|
@@ -2184,12 +2181,12 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2184
2181
|
}), [internalMouseOffset, setInternalMouseOffset] = useState({
|
|
2185
2182
|
x: 0,
|
|
2186
2183
|
y: 0
|
|
2187
|
-
}), [dynamicCornerRadius, setDynamicCornerRadius] = useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = useState(!1), [detectedOverLight, setDetectedOverLight] = useState(!1), effectiveCornerRadius = useMemo((() => void 0 !== cornerRadius ? Math.max(0, cornerRadius) : Math.max(0, dynamicCornerRadius)), [ cornerRadius, dynamicCornerRadius
|
|
2184
|
+
}), [dynamicCornerRadius, setDynamicCornerRadius] = useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = useState(!1), [detectedOverLight, setDetectedOverLight] = useState(!1), effectiveCornerRadius = useMemo((() => void 0 !== cornerRadius ? Math.max(0, cornerRadius) : Math.max(0, dynamicCornerRadius)), [ cornerRadius, dynamicCornerRadius ]), effectiveReducedMotion = useMemo((() => reducedMotion || userPrefersReducedMotion), [ reducedMotion, userPrefersReducedMotion ]), effectiveHighContrast = useMemo((() => highContrast || userPrefersHighContrast), [ highContrast, userPrefersHighContrast ]), effectiveDisableEffects = useMemo((() => disableEffects || effectiveReducedMotion), [ disableEffects, effectiveReducedMotion ]), globalMousePosition = useMemo((() => externalGlobalMousePosition || internalGlobalMousePosition), [ externalGlobalMousePosition, internalGlobalMousePosition ]), mouseOffset = useMemo((() => externalMouseOffset || internalMouseOffset), [ externalMouseOffset, internalMouseOffset ]);
|
|
2188
2185
|
// Extract border-radius from children
|
|
2189
2186
|
useEffect((() => {
|
|
2190
2187
|
const extractRadius = () => {
|
|
2191
2188
|
try {
|
|
2192
|
-
let extractedRadius = null
|
|
2189
|
+
let extractedRadius = null;
|
|
2193
2190
|
if (contentRef.current) {
|
|
2194
2191
|
const firstChild = contentRef.current.firstElementChild;
|
|
2195
2192
|
if (firstChild) {
|
|
@@ -2206,15 +2203,14 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2206
2203
|
return null;
|
|
2207
2204
|
}
|
|
2208
2205
|
})(firstChild);
|
|
2209
|
-
null !== domRadius && domRadius > 0 && (extractedRadius = domRadius
|
|
2206
|
+
null !== domRadius && domRadius > 0 && (extractedRadius = domRadius);
|
|
2210
2207
|
}
|
|
2211
2208
|
}
|
|
2212
2209
|
if (null === extractedRadius) {
|
|
2213
2210
|
const childRadius = extractBorderRadiusFromChildren(children);
|
|
2214
|
-
childRadius > 0 && childRadius !== CONSTANTS.DEFAULT_CORNER_RADIUS && (extractedRadius = childRadius
|
|
2215
|
-
extractionSource = "React children");
|
|
2211
|
+
childRadius > 0 && childRadius !== CONSTANTS.DEFAULT_CORNER_RADIUS && (extractedRadius = childRadius);
|
|
2216
2212
|
}
|
|
2217
|
-
null !== extractedRadius && extractedRadius > 0
|
|
2213
|
+
null !== extractedRadius && extractedRadius > 0 && setDynamicCornerRadius(extractedRadius);
|
|
2218
2214
|
} catch (error) {
|
|
2219
2215
|
"undefined" != typeof process && "production" === process.env?.NODE_ENV || !debugCornerRadius || console.error("[AtomixGlass] Error extracting corner radius:", error);
|
|
2220
2216
|
}
|
|
@@ -2343,7 +2339,6 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2343
2339
|
}
|
|
2344
2340
|
if ("boolean" == typeof overLight &&
|
|
2345
2341
|
// For boolean values, disable auto-detection
|
|
2346
|
-
// Cache is automatically managed by WeakMap (no manual clearing needed)
|
|
2347
2342
|
setDetectedOverLight(!1), "function" == typeof window.matchMedia) try {
|
|
2348
2343
|
const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
|
|
2349
2344
|
setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
|
|
@@ -2413,6 +2408,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2413
2408
|
}), [ handleGlobalMousePosition, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects ]);
|
|
2414
2409
|
// Transform calculations
|
|
2415
2410
|
const calculateDirectionalScale = useCallback((() => {
|
|
2411
|
+
if (!0 === overLight || "auto" === overLight && detectedOverLight || "object" == typeof overLight && null !== overLight && detectedOverLight) return "scale(1)";
|
|
2416
2412
|
if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return "scale(1)";
|
|
2417
2413
|
const rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect), deltaX = globalMousePosition.x - center.x, deltaY = globalMousePosition.y - center.y, edgeDistanceX = Math.max(0, Math.abs(deltaX) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(deltaY) - glassSize.height / 2), edgeDistance = calculateDistance({
|
|
2418
2414
|
x: edgeDistanceX,
|
|
@@ -2426,7 +2422,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2426
2422
|
if (0 === centerDistance) return "scale(1)";
|
|
2427
2423
|
const normalizedX = deltaX / centerDistance, normalizedY = deltaY / centerDistance, stretchIntensity = Math.min(centerDistance / 300, 1) * elasticity * fadeInFactor, scaleX = 1 + Math.abs(normalizedX) * stretchIntensity * .3 - Math.abs(normalizedY) * stretchIntensity * .15, scaleY = 1 + Math.abs(normalizedY) * stretchIntensity * .3 - Math.abs(normalizedX) * stretchIntensity * .15;
|
|
2428
2424
|
return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
|
|
2429
|
-
}), [ globalMousePosition, elasticity, glassSize, glassRef ]), calculateFadeInFactor = useCallback((() => {
|
|
2425
|
+
}), [ globalMousePosition, elasticity, glassSize, glassRef, overLight, detectedOverLight ]), calculateFadeInFactor = useCallback((() => {
|
|
2430
2426
|
if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return 0;
|
|
2431
2427
|
const rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect), edgeDistanceX = Math.max(0, Math.abs(globalMousePosition.x - center.x) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(globalMousePosition.y - center.y) - glassSize.height / 2), edgeDistance = calculateDistance({
|
|
2432
2428
|
x: edgeDistanceX,
|
|
@@ -2511,20 +2507,21 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2511
2507
|
isOverLight: isOverLight,
|
|
2512
2508
|
threshold: .7,
|
|
2513
2509
|
opacity: isOverLight ? Math.min(.6, Math.max(.2, .5 * hoverIntensity * activeIntensity)) : 0,
|
|
2514
|
-
contrast: Math.min(1.
|
|
2515
|
-
brightness: Math.min(1.
|
|
2516
|
-
saturationBoost:
|
|
2517
|
-
|
|
2518
|
-
|
|
2510
|
+
contrast: Math.min(1.6, Math.max(1, 1.4 + .1 * mouseInfluence)),
|
|
2511
|
+
brightness: Math.min(1.1, Math.max(.8, .9 + .05 * mouseInfluence)),
|
|
2512
|
+
saturationBoost: 1.3,
|
|
2513
|
+
// Fixed value — dynamic saturation amplifies perceived displacement
|
|
2514
|
+
shadowIntensity: Math.min(1.2, Math.max(.5, .9 + .2 * mouseInfluence)),
|
|
2515
|
+
borderOpacity: Math.min(1, Math.max(.3, .7 + .1 * mouseInfluence))
|
|
2519
2516
|
};
|
|
2520
2517
|
if ("object" == typeof overLight && null !== overLight) {
|
|
2521
2518
|
const objConfig = overLight, validatedThreshold = validateConfigValue(objConfig.threshold, .1, 1, baseConfig.threshold), validatedOpacity = validateConfigValue(objConfig.opacity, .1, 1, baseConfig.opacity), validatedContrast = validateConfigValue(objConfig.contrast, .5, 2.5, baseConfig.contrast), validatedBrightness = validateConfigValue(objConfig.brightness, .5, 2, baseConfig.brightness), validatedSaturationBoost = validateConfigValue(objConfig.saturationBoost, .5, 3, baseConfig.saturationBoost), finalConfig = {
|
|
2522
2519
|
...baseConfig,
|
|
2523
2520
|
threshold: validatedThreshold,
|
|
2524
2521
|
opacity: validatedOpacity * hoverIntensity * activeIntensity,
|
|
2525
|
-
contrast: validatedContrast + .
|
|
2526
|
-
brightness: validatedBrightness + .
|
|
2527
|
-
saturationBoost: validatedSaturationBoost
|
|
2522
|
+
contrast: Math.min(1.6, validatedContrast + .1 * mouseInfluence),
|
|
2523
|
+
brightness: Math.min(1.1, validatedBrightness + .05 * mouseInfluence),
|
|
2524
|
+
saturationBoost: validatedSaturationBoost
|
|
2528
2525
|
};
|
|
2529
2526
|
// Validate and apply object config values with proper clamping
|
|
2530
2527
|
return "undefined" == typeof process || process.env, finalConfig;
|
|
@@ -2658,19 +2655,19 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2658
2655
|
debugOverLight: debugOverLight,
|
|
2659
2656
|
enablePerformanceMonitoring: enablePerformanceMonitoring,
|
|
2660
2657
|
children: children
|
|
2661
|
-
}), isOverLight = overLightConfig
|
|
2658
|
+
}), isOverLight = useMemo((() => overLightConfig?.isOverLight), [ overLight ]), shouldRenderOverLightLayers = enableOverLightLayers && isOverLight, baseStyle = {
|
|
2662
2659
|
...style,
|
|
2663
|
-
|
|
2660
|
+
...!effectiveDisableEffects && {
|
|
2664
2661
|
transform: transformStyle
|
|
2665
2662
|
}
|
|
2666
|
-
}, componentClassName = [ ATOMIX_GLASS.BASE_CLASS, effectiveReducedMotion && `${ATOMIX_GLASS.BASE_CLASS}--reduced-motion`, effectiveHighContrast && `${ATOMIX_GLASS.BASE_CLASS}--high-contrast`, effectiveDisableEffects && `${ATOMIX_GLASS.BASE_CLASS}--disabled-effects`, className ].filter(Boolean).join(" "), positionStyles = {
|
|
2663
|
+
}, componentClassName = [ ATOMIX_GLASS.BASE_CLASS, effectiveReducedMotion && `${ATOMIX_GLASS.BASE_CLASS}--reduced-motion`, effectiveHighContrast && `${ATOMIX_GLASS.BASE_CLASS}--high-contrast`, effectiveDisableEffects && `${ATOMIX_GLASS.BASE_CLASS}--disabled-effects`, className ].filter(Boolean).join(" "), positionStyles = useMemo((() => ({
|
|
2667
2664
|
position: style.position || "absolute",
|
|
2668
2665
|
top: style.top || 0,
|
|
2669
2666
|
left: style.left || 0
|
|
2670
|
-
}, adjustedSize = {
|
|
2667
|
+
})), [ style.position, style.top, style.left ]), adjustedSize = useMemo((() => ({
|
|
2671
2668
|
width: "fixed" !== style.position ? "100%" : style.width ? style.width : Math.max(glassSize.width, 0),
|
|
2672
2669
|
height: "fixed" !== style.position ? "100%" : style.height ? style.height : Math.max(glassSize.height, 0)
|
|
2673
|
-
}, gradientValues = useMemo((() => {
|
|
2670
|
+
})), [ style.position, style.width, style.height, glassSize.width, glassSize.height ]), gradientValues = useMemo((() => {
|
|
2674
2671
|
const mx = mouseOffset.x, my = mouseOffset.y, absMx = Math.abs(mx), absMy = Math.abs(my), GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT;
|
|
2675
2672
|
return {
|
|
2676
2673
|
borderGradientAngle: GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER,
|
|
@@ -2710,7 +2707,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2710
2707
|
over: isOverLight ? 1.1 * (overLightOpacity || .4) : 0
|
|
2711
2708
|
};
|
|
2712
2709
|
}), [ isHovered, isActive, isOverLight, overLightConfig.opacity ]), glassVars = useMemo((() => {
|
|
2713
|
-
const whiteColor =
|
|
2710
|
+
const whiteColor = ATOMIX_GLASS.CONSTANTS.PALETTE.WHITE, blackColor = ATOMIX_GLASS.CONSTANTS.PALETTE.BLACK, {borderGradientAngle: borderGradientAngle, borderStop1: borderStop1, borderStop2: borderStop2, borderOpacities: borderOpacities, hoverPositions: hoverPositions, basePosition: basePosition, mx: mx, my: my, absMx: absMx, absMy: absMy} = gradientValues, configBorderOpacity = overLightConfig?.borderOpacity ?? 1;
|
|
2714
2711
|
return {
|
|
2715
2712
|
"--atomix-glass-radius": `${effectiveCornerRadius}px`,
|
|
2716
2713
|
"--atomix-glass-transform": transformStyle || "none",
|
|
@@ -2721,20 +2718,20 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2721
2718
|
"--atomix-glass-height": "fixed" !== style.position ? adjustedSize.height : `${adjustedSize.height}px`,
|
|
2722
2719
|
"--atomix-glass-border-width": "var(--atomix-spacing-0-5, 0.09375rem)",
|
|
2723
2720
|
"--atomix-glass-blend-mode": isOverLight ? "multiply" : "overlay",
|
|
2724
|
-
"--atomix-glass-border-gradient-1": `linear-gradient(${borderGradientAngle}deg, rgba(${whiteColor}, 0) 0%, rgba(${whiteColor}, ${borderOpacities[0]}) ${borderStop1}%, rgba(${whiteColor}, ${borderOpacities[1]}) ${borderStop2}%, rgba(${whiteColor}, 0) 100%)`,
|
|
2725
|
-
"--atomix-glass-border-gradient-2": `linear-gradient(${borderGradientAngle}deg, rgba(${whiteColor}, 0) 0%, rgba(${whiteColor}, ${borderOpacities[2]}) ${borderStop1}%, rgba(${whiteColor}, ${borderOpacities[3]}) ${borderStop2}%, rgba(${whiteColor}, 0) 100%)`,
|
|
2721
|
+
"--atomix-glass-border-gradient-1": `linear-gradient(${borderGradientAngle}deg, rgba(${whiteColor}, 0) 0%, rgba(${whiteColor}, ${(borderOpacities[0] ?? 1) * configBorderOpacity}) ${borderStop1}%, rgba(${whiteColor}, ${(borderOpacities[1] ?? 1) * configBorderOpacity}) ${borderStop2}%, rgba(${whiteColor}, 0) 100%)`,
|
|
2722
|
+
"--atomix-glass-border-gradient-2": `linear-gradient(${borderGradientAngle}deg, rgba(${whiteColor}, 0) 0%, rgba(${whiteColor}, ${(borderOpacities[2] ?? 1) * configBorderOpacity}) ${borderStop1}%, rgba(${whiteColor}, ${(borderOpacities[3] ?? 1) * configBorderOpacity}) ${borderStop2}%, rgba(${whiteColor}, 0) 100%)`,
|
|
2726
2723
|
"--atomix-glass-hover-1-opacity": opacityValues.hover1,
|
|
2727
|
-
"--atomix-glass-hover-1-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover1.x}% ${hoverPositions.hover1.y}%, rgba(
|
|
2724
|
+
"--atomix-glass-hover-1-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover1.x}% ${hoverPositions.hover1.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_START}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_STOP}%, rgba(${blackColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_END}%)` : `radial-gradient(circle at ${hoverPositions.hover1.x}% ${hoverPositions.hover1.y}%, rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.WHITE_START}) 0%, rgba(${whiteColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.WHITE_STOP}%)`,
|
|
2728
2725
|
"--atomix-glass-hover-2-opacity": opacityValues.hover2,
|
|
2729
|
-
"--atomix-glass-hover-2-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover2.x}% ${hoverPositions.hover2.y}%, rgba(
|
|
2726
|
+
"--atomix-glass-hover-2-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover2.x}% ${hoverPositions.hover2.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_START}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_STOP}%, rgba(${blackColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_END}%)` : `radial-gradient(circle at ${hoverPositions.hover2.x}% ${hoverPositions.hover2.y}%, rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.WHITE_START}) 0%, rgba(${whiteColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.WHITE_STOP}%)`,
|
|
2730
2727
|
"--atomix-glass-hover-3-opacity": opacityValues.hover3,
|
|
2731
|
-
"--atomix-glass-hover-3-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover3.x}% ${hoverPositions.hover3.y}%, rgba(
|
|
2728
|
+
"--atomix-glass-hover-3-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover3.x}% ${hoverPositions.hover3.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_START}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_STOP}%, rgba(${blackColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_END}%)` : `radial-gradient(circle at ${hoverPositions.hover3.x}% ${hoverPositions.hover3.y}%, rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.WHITE_START}) 0%, rgba(${whiteColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.WHITE_STOP}%)`,
|
|
2732
2729
|
"--atomix-glass-base-opacity": opacityValues.base,
|
|
2733
|
-
"--atomix-glass-base-gradient": isOverLight ? `linear-gradient(${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.ANGLE}deg, rgba(
|
|
2730
|
+
"--atomix-glass-base-gradient": isOverLight ? `linear-gradient(${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.ANGLE}deg, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_BASE + mx * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_BASE + my * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_MULTIPLIER}) ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_BASE + absMx * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.WHITE_OPACITY})`,
|
|
2734
2731
|
"--atomix-glass-overlay-opacity": opacityValues.over,
|
|
2735
|
-
"--atomix-glass-overlay-gradient": isOverLight ? `radial-gradient(circle at ${basePosition.x}% ${basePosition.y}%, rgba(
|
|
2732
|
+
"--atomix-glass-overlay-gradient": isOverLight ? `radial-gradient(circle at ${basePosition.x}% ${basePosition.y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_BASE + absMx * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_BASE + absMy * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.WHITE_OPACITY})`
|
|
2736
2733
|
};
|
|
2737
|
-
}), [ gradientValues, opacityValues, effectiveCornerRadius, transformStyle, positionStyles, adjustedSize, style.position, isOverLight ]), renderBackgroundLayer = layerType => jsx("div", {
|
|
2734
|
+
}), [ gradientValues, opacityValues, effectiveCornerRadius, transformStyle, positionStyles, adjustedSize, style.position, isOverLight, overLightConfig.borderOpacity ]), renderBackgroundLayer = layerType => jsx("div", {
|
|
2738
2735
|
className: [ ATOMIX_GLASS.BACKGROUND_LAYER_CLASS, "dark" === layerType ? ATOMIX_GLASS.BACKGROUND_LAYER_DARK_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_BLACK_CLASS, isOverLight ? ATOMIX_GLASS.BACKGROUND_LAYER_OVER_LIGHT_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_HIDDEN_CLASS ].filter(Boolean).join(" "),
|
|
2739
2736
|
style: {
|
|
2740
2737
|
...positionStyles,
|
|
@@ -2760,9 +2757,9 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2760
2757
|
className: className,
|
|
2761
2758
|
style: baseStyle,
|
|
2762
2759
|
cornerRadius: effectiveCornerRadius,
|
|
2763
|
-
displacementScale: effectiveDisableEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT :
|
|
2760
|
+
displacementScale: effectiveDisableEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT : isOverLight ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.OVER_LIGHT_DISPLACEMENT : displacementScale,
|
|
2764
2761
|
blurAmount: effectiveDisableEffects ? 0 : blurAmount,
|
|
2765
|
-
saturation: effectiveHighContrast ? ATOMIX_GLASS.CONSTANTS.SATURATION.HIGH_CONTRAST :
|
|
2762
|
+
saturation: effectiveHighContrast ? ATOMIX_GLASS.CONSTANTS.SATURATION.HIGH_CONTRAST : isOverLight ? saturation * overLightConfig.saturationBoost : saturation,
|
|
2766
2763
|
aberrationIntensity: effectiveDisableEffects ? 0 : "shader" === mode ? aberrationIntensity * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_ABERRATION : aberrationIntensity,
|
|
2767
2764
|
glassSize: glassSize,
|
|
2768
2765
|
padding: padding,
|
|
@@ -2778,10 +2775,15 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2778
2775
|
onMouseLeave: handleMouseLeave,
|
|
2779
2776
|
onMouseDown: handleMouseDown,
|
|
2780
2777
|
onMouseUp: handleMouseUp,
|
|
2781
|
-
active: isActive,
|
|
2782
2778
|
isHovered: isHovered,
|
|
2783
2779
|
isActive: isActive,
|
|
2784
|
-
overLight:
|
|
2780
|
+
overLight: isOverLight,
|
|
2781
|
+
overLightConfig: {
|
|
2782
|
+
contrast: overLightConfig.contrast,
|
|
2783
|
+
brightness: overLightConfig.brightness,
|
|
2784
|
+
shadowIntensity: overLightConfig.shadowIntensity,
|
|
2785
|
+
borderOpacity: overLightConfig.borderOpacity
|
|
2786
|
+
},
|
|
2785
2787
|
onClick: onClick,
|
|
2786
2788
|
mode: mode,
|
|
2787
2789
|
transform: baseStyle.transform,
|
|
@@ -3119,7 +3121,11 @@ const AtomixLogo = ({height: height = 24, width: width = 24, color: color = "cur
|
|
|
3119
3121
|
// Add input validation
|
|
3120
3122
|
"number" != typeof x || "number" != typeof y || "number" != typeof time || isNaN(x) || isNaN(y) || isNaN(time) ? .5 : .5 * (.7 * fbm(40 * x + .3 * time, 40 * y - .3 * time, 6) + .3 * fbm(80 * x, 80 * y, 4)))(ix, iy, time), microDetailX = .008 * (microSurface - .5), microDetailY = .008 * (microSurface - .5), centerDistance = calculateLength(ix, iy), dynamicRefraction = .35 * Math.pow(Math.min(centerDistance, 1), 1.8) * (1 + mouseFalloff * mouseDistance * .8), refractionX = Math.cos(refractionAngle) * dynamicRefraction, refractionY = Math.sin(refractionAngle) * dynamicRefraction, vortexAngle = Math.atan2(iy - mouseY, ix - mouseX), vortexDistance = calculateLength(ix - mouseX, iy - mouseY), vortexStrength = mouseFalloff * Math.sin(10 * vortexDistance - 3 * time) * .025, vortexX = Math.cos(vortexAngle + 2 * time) * vortexStrength, vortexY = Math.sin(vortexAngle + 2 * time) * vortexStrength, fluidX = Math.sin(10 * ix + 5 * mouseX + 2.5 * time) * Math.cos(8 * iy - 2 * time) * .018, fluidY = Math.cos(8 * ix - 2 * time) * Math.sin(10 * iy + 5 * mouseY + 2.5 * time) * .018, rippleEffect = (.012 * Math.sin(15 * Math.min(centerDistance, 10) - 4 * time) + .008 * Math.cos(20 * Math.min(centerDistance, 10) + 3 * time)) * mouseFalloff, rippleX = Math.cos(refractionAngle) * rippleEffect, rippleY = Math.sin(refractionAngle) * rippleEffect, distanceToEdge = roundedRectSDF(ix, iy, .44, .34, .39), edgeMask = smoothStep(.92, -.12, distanceToEdge), edgeSoftness = smoothStep(.85, .1, distanceToEdge), finalY = iy + (1.2 * refractionY + .8 * spectralY + 1.5 * parallaxY + .9 * scatteringY + 1 * turbulenceY + .6 * microDetailY + 1.3 * vortexY + 1.1 * fluidY + .7 * rippleY + .8 * causticDistortion) * edgeMask * edgeSoftness * .85;
|
|
3121
3123
|
return createTexture(clampValue(ix + (1.2 * refractionX + .8 * spectralX + 1.5 * parallaxX + .9 * scatteringX + 1 * turbulenceX + .6 * microDetailX + 1.3 * vortexX + 1.1 * fluidX + .7 * rippleX + causticDistortion) * edgeMask * edgeSoftness * .85 + .5, 0, 1), clampValue(finalY + .5, 0, 1));
|
|
3122
|
-
}
|
|
3124
|
+
},
|
|
3125
|
+
// Aliases for compatibility
|
|
3126
|
+
plasma: (uv, mousePosition) => fragmentShaders.premiumGlass(uv, mousePosition),
|
|
3127
|
+
waves: (uv, mousePosition) => fragmentShaders.liquidMetal(uv, mousePosition),
|
|
3128
|
+
noise: (uv, mousePosition) => fragmentShaders.appleFluid(uv, mousePosition)
|
|
3123
3129
|
}, shaderUtils = Object.freeze( Object.defineProperty({
|
|
3124
3130
|
__proto__: null,
|
|
3125
3131
|
ShaderDisplacementGenerator: class {
|
|
@@ -3499,46 +3505,12 @@ const Breadcrumb = memo((({items: items, divider: divider, className: className
|
|
|
3499
3505
|
});
|
|
3500
3506
|
}));
|
|
3501
3507
|
|
|
3502
|
-
/**
|
|
3503
|
-
* Button state and functionality
|
|
3504
|
-
* @param initialProps - Initial button properties
|
|
3505
|
-
* @returns Button state and methods
|
|
3506
|
-
*/
|
|
3507
|
-
function useButton(initialProps) {
|
|
3508
|
-
// Default button properties
|
|
3509
|
-
const defaultProps = {
|
|
3510
|
-
variant: "primary",
|
|
3511
|
-
size: "md",
|
|
3512
|
-
disabled: !1,
|
|
3513
|
-
rounded: !1,
|
|
3514
|
-
loading: !1,
|
|
3515
|
-
fullWidth: !1,
|
|
3516
|
-
block: !1,
|
|
3517
|
-
active: !1,
|
|
3518
|
-
selected: !1,
|
|
3519
|
-
...initialProps
|
|
3520
|
-
};
|
|
3521
|
-
/**
|
|
3522
|
-
* Generate button class based on properties
|
|
3523
|
-
* @param props - Button properties
|
|
3524
|
-
* @returns Class string
|
|
3525
|
-
*/ return {
|
|
3526
|
-
defaultProps: defaultProps,
|
|
3527
|
-
generateButtonClass: props => {
|
|
3528
|
-
const {variant: variant = defaultProps.variant, size: size = defaultProps.size, disabled: disabled = defaultProps.disabled, rounded: rounded = defaultProps.rounded, iconOnly: iconOnly = !1, glass: glass = defaultProps.glass, loading: loading = defaultProps.loading, fullWidth: fullWidth = defaultProps.fullWidth, block: block = defaultProps.block, active: active = defaultProps.active, selected: selected = defaultProps.selected, className: className = ""} = props, sizeClass = "md" === size ? "" : `c-btn--${size}`, iconOnlyClass = iconOnly ? "c-btn--icon" : "", roundedClass = rounded ? "c-btn--rounded" : "", disabledClass = disabled ? "c-btn--disabled" : "", glassClass = glass ? "c-btn--glass" : "", loadingClass = loading ? BUTTON.CLASSES.LOADING : "", fullWidthClass = fullWidth ? BUTTON.CLASSES.FULL_WIDTH : "", blockClass = block ? BUTTON.CLASSES.BLOCK : "", activeClass = active ? BUTTON.CLASSES.ACTIVE : "", selectedClass = selected ? BUTTON.CLASSES.SELECTED : "";
|
|
3529
|
-
return [ BUTTON.BASE_CLASS, `c-btn--${variant}`, sizeClass, iconOnlyClass, roundedClass, disabledClass, glassClass, loadingClass, fullWidthClass, blockClass, activeClass, selectedClass, className ].filter(Boolean).join(" ");
|
|
3530
|
-
},
|
|
3531
|
-
handleClick: handler => event => {
|
|
3532
|
-
defaultProps.disabled || defaultProps.loading || !handler || handler(event);
|
|
3533
|
-
}
|
|
3534
|
-
};
|
|
3535
|
-
}
|
|
3536
|
-
|
|
3537
3508
|
/**
|
|
3538
3509
|
* Spinner state and functionality
|
|
3539
3510
|
* @param initialProps - Initial spinner properties
|
|
3540
3511
|
* @returns Spinner state and methods
|
|
3541
|
-
*/
|
|
3512
|
+
*/
|
|
3513
|
+
function useSpinner(initialProps) {
|
|
3542
3514
|
// Default spinner properties
|
|
3543
3515
|
const defaultProps = {
|
|
3544
3516
|
variant: "primary",
|
|
@@ -3695,21 +3667,7 @@ const Button = React.memo( forwardRef((({label: label, children: children, onCl
|
|
|
3695
3667
|
const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = iconName ? jsx(Icon, {
|
|
3696
3668
|
name: iconName,
|
|
3697
3669
|
size: iconSize
|
|
3698
|
-
}) : icon
|
|
3699
|
-
// Determine if we should render as a link
|
|
3700
|
-
useButton({
|
|
3701
|
-
variant: variant,
|
|
3702
|
-
size: size,
|
|
3703
|
-
disabled: isDisabled,
|
|
3704
|
-
rounded: rounded,
|
|
3705
|
-
glass: glass,
|
|
3706
|
-
loading: loading,
|
|
3707
|
-
fullWidth: fullWidth,
|
|
3708
|
-
block: block,
|
|
3709
|
-
active: active,
|
|
3710
|
-
selected: selected
|
|
3711
|
-
});
|
|
3712
|
-
const buttonClass = [ BUTTON.BASE_CLASS, ThemeNaming.variantClass(THEME_NAMING.BUTTON_PREFIX, variant), "md" !== size ? ThemeNaming.sizeClass(THEME_NAMING.BUTTON_PREFIX, size) : "", iconOnly ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, THEME_NAMING.ICON_ELEMENT) : "", rounded ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, "rounded") : "", isDisabled ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, "disabled") : "", glass ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, "glass") : "", loading ? BUTTON.CLASSES.LOADING : "", fullWidth ? BUTTON.CLASSES.FULL_WIDTH : "", block ? BUTTON.CLASSES.BLOCK : "", active ? BUTTON.CLASSES.ACTIVE : "", selected ? BUTTON.CLASSES.SELECTED : "", className ].filter(Boolean).join(" "), handleClickEvent = useCallback((event => {
|
|
3670
|
+
}) : icon, buttonClass = [ BUTTON.BASE_CLASS, ThemeNaming.variantClass(THEME_NAMING.BUTTON_PREFIX, variant), "md" !== size ? ThemeNaming.sizeClass(THEME_NAMING.BUTTON_PREFIX, size) : "", iconOnly ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, THEME_NAMING.ICON_ELEMENT) : "", rounded ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, "rounded") : "", isDisabled ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, "disabled") : "", glass ? ThemeNaming.stateClass(THEME_NAMING.BUTTON_PREFIX, "glass") : "", loading ? BUTTON.CLASSES.LOADING : "", fullWidth ? BUTTON.CLASSES.FULL_WIDTH : "", block ? BUTTON.CLASSES.BLOCK : "", active ? BUTTON.CLASSES.ACTIVE : "", selected ? BUTTON.CLASSES.SELECTED : "", className ].filter(Boolean).join(" "), handleClickEvent = useCallback((event => {
|
|
3713
3671
|
isDisabled ? event.preventDefault() : onClick?.(event);
|
|
3714
3672
|
}), [ isDisabled, onClick ]), handleMouseEnter = useCallback((event => {
|
|
3715
3673
|
isDisabled || onHover?.(event);
|
|
@@ -3717,7 +3675,7 @@ const Button = React.memo( forwardRef((({label: label, children: children, onCl
|
|
|
3717
3675
|
isDisabled || onFocus?.(event);
|
|
3718
3676
|
}), [ isDisabled, onFocus ]), handleBlurEvent = useCallback((event => {
|
|
3719
3677
|
isDisabled || onBlur?.(event);
|
|
3720
|
-
}), [ isDisabled, onBlur ]), buttonText = loading && loadingText ? loadingText : label || children, spinnerSize = "sm" === size ? "sm" : "lg" === size ? "md" : "sm", buttonContent = jsxs(Fragment, {
|
|
3678
|
+
}), [ isDisabled, onBlur ]), buttonText = loading && loadingText ? loadingText : label || children, spinnerSize = "sm" === size ? "sm" : "lg" === size ? "md" : "sm", safeAriaLabel = ariaLabel || (iconOnly ? "string" == typeof label ? label : "string" == typeof children ? children : void 0 : void 0), buttonContent = jsxs(Fragment, {
|
|
3721
3679
|
children: [ loading && jsx("span", {
|
|
3722
3680
|
className: ThemeNaming.bemClass(THEME_NAMING.BUTTON_PREFIX, THEME_NAMING.SPINNER_ELEMENT),
|
|
3723
3681
|
"aria-hidden": "true",
|
|
@@ -3734,80 +3692,77 @@ const Button = React.memo( forwardRef((({label: label, children: children, onCl
|
|
|
3734
3692
|
children: buttonText
|
|
3735
3693
|
}) ]
|
|
3736
3694
|
}), buttonProps = {
|
|
3737
|
-
ref: ref,
|
|
3738
3695
|
className: buttonClass,
|
|
3739
|
-
type: "button" !== Component || shouldRenderAsLink ? void 0 : type,
|
|
3740
3696
|
onClick: handleClickEvent,
|
|
3741
3697
|
onMouseEnter: onHover ? handleMouseEnter : void 0,
|
|
3742
3698
|
onFocus: onFocus ? handleFocusEvent : void 0,
|
|
3743
3699
|
onBlur: onBlur ? handleBlurEvent : void 0,
|
|
3744
|
-
disabled: isDisabled && "button" === Component && !shouldRenderAsLink,
|
|
3745
3700
|
"aria-disabled": isDisabled,
|
|
3746
3701
|
"aria-busy": loading,
|
|
3747
|
-
"aria-label":
|
|
3702
|
+
"aria-label": safeAriaLabel,
|
|
3748
3703
|
"aria-describedby": ariaDescribedBy,
|
|
3749
3704
|
"aria-expanded": ariaExpanded,
|
|
3750
3705
|
"aria-controls": ariaControls,
|
|
3751
3706
|
tabIndex: void 0 !== tabIndex ? tabIndex : isDisabled ? -1 : 0,
|
|
3752
3707
|
style: style,
|
|
3753
3708
|
...props
|
|
3754
|
-
}, defaultGlassProps = {
|
|
3755
|
-
displacementScale: 20,
|
|
3756
|
-
blurAmount: 0,
|
|
3757
|
-
saturation: 200,
|
|
3758
|
-
elasticity: 0
|
|
3759
|
-
}, glassProps = !0 === glass ? defaultGlassProps : {
|
|
3760
|
-
...defaultGlassProps,
|
|
3761
|
-
...glass
|
|
3762
3709
|
};
|
|
3763
|
-
//
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
...anchorButtonProps,
|
|
3775
|
-
ref: ref,
|
|
3776
|
-
href: href,
|
|
3777
|
-
target: target,
|
|
3778
|
-
rel: "_blank" === target ? "noopener noreferrer" : void 0
|
|
3779
|
-
}, linkElement = jsx(LinkComp, {
|
|
3780
|
-
...linkProps,
|
|
3781
|
-
children: buttonContent
|
|
3782
|
-
});
|
|
3783
|
-
return glass ? jsx(AtomixGlass, {
|
|
3784
|
-
...glassProps,
|
|
3785
|
-
children: linkElement
|
|
3786
|
-
}) : linkElement;
|
|
3787
|
-
}
|
|
3788
|
-
// Fallback to regular anchor tag
|
|
3789
|
-
const anchorElement = jsx("a", {
|
|
3790
|
-
...anchorButtonProps,
|
|
3710
|
+
// Determine if we should render as a link
|
|
3711
|
+
// If disabled, we still check href, but we might want to render as button or anchor with aria-disabled
|
|
3712
|
+
// The previous logic was Boolean(href && !isDisabled). This meant if disabled, it renders as <button>.
|
|
3713
|
+
// This is a safe fallback for disabled links.
|
|
3714
|
+
let content;
|
|
3715
|
+
// Render as anchor if href is provided
|
|
3716
|
+
if (shouldRenderAsLink)
|
|
3717
|
+
// Use custom LinkComponent if provided (e.g., Next.js Link)
|
|
3718
|
+
if (LinkComponent) {
|
|
3719
|
+
const LinkComp = LinkComponent, linkProps = {
|
|
3720
|
+
...buttonProps,
|
|
3791
3721
|
ref: ref,
|
|
3722
|
+
// LinkComponent usually forwards ref to anchor
|
|
3792
3723
|
href: href,
|
|
3793
3724
|
target: target,
|
|
3794
|
-
rel: "_blank" === target ? "noopener noreferrer" : void 0
|
|
3725
|
+
rel: "_blank" === target ? "noopener noreferrer" : void 0
|
|
3726
|
+
};
|
|
3727
|
+
content = jsx(LinkComp, {
|
|
3728
|
+
...linkProps,
|
|
3795
3729
|
children: buttonContent
|
|
3796
3730
|
});
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3731
|
+
} else
|
|
3732
|
+
// Fallback to regular anchor tag
|
|
3733
|
+
content = jsx("a", {
|
|
3734
|
+
...buttonProps,
|
|
3735
|
+
ref: ref,
|
|
3736
|
+
href: href,
|
|
3737
|
+
target: target,
|
|
3738
|
+
rel: "_blank" === target ? "noopener noreferrer" : void 0,
|
|
3739
|
+
children: buttonContent
|
|
3740
|
+
}); else
|
|
3802
3741
|
// Default button rendering
|
|
3803
|
-
|
|
3742
|
+
content = jsx(Component, {
|
|
3804
3743
|
...buttonProps,
|
|
3744
|
+
ref: ref,
|
|
3745
|
+
type: "button" === Component ? type : void 0,
|
|
3746
|
+
disabled: isDisabled,
|
|
3805
3747
|
children: buttonContent
|
|
3806
3748
|
});
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3749
|
+
if (glass) {
|
|
3750
|
+
// Default glass props
|
|
3751
|
+
const defaultGlassProps = {
|
|
3752
|
+
displacementScale: 20,
|
|
3753
|
+
blurAmount: 0,
|
|
3754
|
+
saturation: 200,
|
|
3755
|
+
elasticity: 0
|
|
3756
|
+
}, glassProps = !0 === glass ? defaultGlassProps : {
|
|
3757
|
+
...defaultGlassProps,
|
|
3758
|
+
...glass
|
|
3759
|
+
};
|
|
3760
|
+
return jsx(AtomixGlass, {
|
|
3761
|
+
...glassProps,
|
|
3762
|
+
children: content
|
|
3763
|
+
});
|
|
3764
|
+
}
|
|
3765
|
+
return content;
|
|
3811
3766
|
})));
|
|
3812
3767
|
|
|
3813
3768
|
Button.displayName = "Button";
|
|
@@ -8845,6 +8800,22 @@ const WaterfallChart = memo( forwardRef((({waterfallData: waterfallData = [], c
|
|
|
8845
8800
|
});
|
|
8846
8801
|
})));
|
|
8847
8802
|
|
|
8803
|
+
/**
|
|
8804
|
+
* CSV Utility Functions
|
|
8805
|
+
*/
|
|
8806
|
+
/**
|
|
8807
|
+
* Sanitize cell content to prevent CSV injection
|
|
8808
|
+
*
|
|
8809
|
+
* Replaces newlines and tabs with spaces, escapes double quotes,
|
|
8810
|
+
* and prefixes dangerous characters (=, +, -, @) with a single quote
|
|
8811
|
+
* to prevent formula injection.
|
|
8812
|
+
*/
|
|
8813
|
+
function sanitizeCSVCell(cell) {
|
|
8814
|
+
const sanitized = String(cell ?? "").replace(/[\r\n\t]/g, " ").replace(/"/g, '""');
|
|
8815
|
+
// Prevent formula injection by prefixing dangerous characters
|
|
8816
|
+
return /^[=+\-@]/.test(sanitized) ? `'${sanitized}` : sanitized;
|
|
8817
|
+
}
|
|
8818
|
+
|
|
8848
8819
|
WaterfallChart.displayName = "WaterfallChart";
|
|
8849
8820
|
|
|
8850
8821
|
const SIZE_MAP = {
|
|
@@ -9046,29 +9017,40 @@ function getRowId$1(row, rowKey) {
|
|
|
9046
9017
|
} // Reset to first page when filtering
|
|
9047
9018
|
), []), clearColumnFilters = useCallback((() => {
|
|
9048
9019
|
setColumnFilterValues({}), setCurrentPage(1);
|
|
9049
|
-
}), []),
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9020
|
+
}), []), activeColumnFilters = useMemo((() => columnFilters ? Object.entries(columnFilterValues).filter((([, value]) => null != value && "" !== value)).map((([columnKey, value]) => {
|
|
9021
|
+
const column = columns.find((col => col.key === columnKey));
|
|
9022
|
+
return column && column.filterable ? {
|
|
9023
|
+
key: columnKey,
|
|
9024
|
+
value: value,
|
|
9025
|
+
lowercaseValue: "string" == typeof value ? value.toLowerCase() : String(value).toLowerCase(),
|
|
9026
|
+
column: column
|
|
9027
|
+
} : null;
|
|
9028
|
+
})).filter((f => null !== f)) : []), [ columnFilters, columnFilterValues, columns ]), filteredData = useMemo((() => {
|
|
9029
|
+
if (!searchQuery && 0 === activeColumnFilters.length) return data;
|
|
9030
|
+
const lowercaseQuery = searchQuery ? searchQuery.toLowerCase() : "";
|
|
9031
|
+
return data.filter((row => {
|
|
9032
|
+
// Apply global search
|
|
9033
|
+
if (searchQuery && !visibleColumns.some((column => {
|
|
9055
9034
|
var _context;
|
|
9056
9035
|
const value = row[column.key];
|
|
9057
9036
|
return null != value && _includesInstanceProperty(_context = String(value).toLowerCase()).call(_context, lowercaseQuery);
|
|
9058
|
-
})))
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9037
|
+
}))) return !1;
|
|
9038
|
+
// Apply column-specific filters
|
|
9039
|
+
for (let i = 0; i < activeColumnFilters.length; i++) {
|
|
9040
|
+
const filter = activeColumnFilters[i];
|
|
9041
|
+
if (!filter) continue;
|
|
9042
|
+
const {key: key, value: value, lowercaseValue: lowercaseValue, column: column} = filter, cellValue = row[key];
|
|
9043
|
+
if (null == cellValue) return !1;
|
|
9044
|
+
// Use custom filter function if provided
|
|
9045
|
+
var _context2;
|
|
9046
|
+
// Default text filter
|
|
9047
|
+
if (column.filterFunction) {
|
|
9048
|
+
if (!column.filterFunction(cellValue, value)) return !1;
|
|
9049
|
+
} else if (!_includesInstanceProperty(_context2 = String(cellValue).toLowerCase()).call(_context2, lowercaseValue)) return !1;
|
|
9050
|
+
}
|
|
9051
|
+
return !0;
|
|
9052
|
+
}));
|
|
9053
|
+
}), [ data, visibleColumns, searchQuery, activeColumnFilters ]), sortedData = useMemo((() => sortConfig && sortable ? [ ...filteredData ].sort(((a, b) => {
|
|
9072
9054
|
const aValue = a[sortConfig.key], bValue = b[sortConfig.key];
|
|
9073
9055
|
return null == aValue ? "asc" === sortConfig.direction ? -1 : 1 : null == bValue ? "asc" === sortConfig.direction ? 1 : -1 : "string" == typeof aValue && "string" == typeof bValue ? "asc" === sortConfig.direction ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue) : "asc" === sortConfig.direction ? aValue > bValue ? 1 : -1 : aValue > bValue ? -1 : 1;
|
|
9074
9056
|
})) : filteredData), [ filteredData, sortConfig, sortable ]), paginatedData = useMemo((() => {
|
|
@@ -9346,76 +9328,56 @@ const DOTS = "...", range = (start, end) => {
|
|
|
9346
9328
|
|
|
9347
9329
|
Pagination.displayName = "Pagination", PaginationNavButton.displayName = "PaginationNavButton";
|
|
9348
9330
|
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
defaultProps: defaultProps,
|
|
9369
|
-
generateCheckboxClass: props => {
|
|
9370
|
-
const {disabled: disabled = defaultProps.disabled, invalid: invalid = defaultProps.invalid, valid: valid = defaultProps.valid, indeterminate: indeterminate = defaultProps.indeterminate, className: className = ""} = props;
|
|
9371
|
-
let validationClass = "";
|
|
9372
|
-
return invalid ? validationClass = "is-error" : valid && (validationClass = "is-valid"),
|
|
9373
|
-
`c-checkbox ${validationClass} ${disabled ? "is-disabled" : ""} ${indeterminate ? "c-checkbox--mixed" : ""} ${className}`.trim();
|
|
9374
|
-
},
|
|
9375
|
-
checkboxRef: checkboxRef
|
|
9376
|
-
};
|
|
9377
|
-
}
|
|
9378
|
-
|
|
9379
|
-
/**
|
|
9380
|
-
* Checkbox - A component for checkbox inputs
|
|
9381
|
-
*/ const Checkbox = memo((({label: label, checked: checked = !1, onChange: onChange, className: className = "", style: style, disabled: disabled = !1, required: required = !1, id: id, name: name, value: value, invalid: invalid = !1, valid: valid = !1, indeterminate: indeterminate = !1, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, onClick: onClick, glass: glass}) => {
|
|
9382
|
-
const {generateCheckboxClass: generateCheckboxClass, checkboxRef: checkboxRef} = useCheckbox({
|
|
9383
|
-
indeterminate: indeterminate,
|
|
9384
|
-
disabled: disabled,
|
|
9385
|
-
invalid: invalid,
|
|
9386
|
-
valid: valid
|
|
9387
|
-
}), checkboxClass = generateCheckboxClass({
|
|
9388
|
-
className: `${className} ${glass ? "c-checkbox--glass" : ""}`.trim(),
|
|
9331
|
+
const Checkbox = React.memo( forwardRef((({label: label, checked: checked, onChange: onChange, className: className = "", style: style, disabled: disabled = !1, required: required = !1, id: id, name: name, value: value, invalid: invalid = !1, valid: valid = !1, indeterminate: indeterminate = !1, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, onClick: onClick, glass: glass, ...props}, ref) => {
|
|
9332
|
+
// Local ref to handle indeterminate state
|
|
9333
|
+
const localRef = useRef(null);
|
|
9334
|
+
// Merge refs
|
|
9335
|
+
useImperativeHandle(ref, (() => localRef.current)),
|
|
9336
|
+
// Handle indeterminate
|
|
9337
|
+
useEffect((() => {
|
|
9338
|
+
localRef.current && (localRef.current.indeterminate = Boolean(indeterminate));
|
|
9339
|
+
}), [ indeterminate ]);
|
|
9340
|
+
// Generate classes
|
|
9341
|
+
let validationClass = "";
|
|
9342
|
+
invalid ? validationClass = "is-error" : valid && (validationClass = "is-valid");
|
|
9343
|
+
const checkboxClass = `c-checkbox ${validationClass} ${disabled ? "is-disabled" : ""} ${indeterminate ? "c-checkbox--mixed" : ""} ${glass ? "c-checkbox--glass" : ""} ${className}`.trim(), inputElement = jsx("input", {
|
|
9344
|
+
ref: localRef,
|
|
9345
|
+
type: "checkbox",
|
|
9346
|
+
className: "c-checkbox__input",
|
|
9347
|
+
checked: checked,
|
|
9348
|
+
onChange: onChange,
|
|
9349
|
+
onClick: onClick,
|
|
9389
9350
|
disabled: disabled,
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9351
|
+
required: required,
|
|
9352
|
+
id: id,
|
|
9353
|
+
name: name,
|
|
9354
|
+
value: value,
|
|
9355
|
+
"aria-label": label ? void 0 : ariaLabel,
|
|
9356
|
+
"aria-describedby": ariaDescribedBy,
|
|
9357
|
+
"aria-invalid": invalid,
|
|
9358
|
+
...props
|
|
9359
|
+
});
|
|
9360
|
+
let content;
|
|
9361
|
+
if (content = id && label ? jsxs("div", {
|
|
9394
9362
|
className: checkboxClass,
|
|
9395
9363
|
style: style,
|
|
9396
|
-
children: [ jsx("
|
|
9397
|
-
ref: checkboxRef,
|
|
9398
|
-
type: "checkbox",
|
|
9399
|
-
className: "c-checkbox__input",
|
|
9400
|
-
checked: checked,
|
|
9401
|
-
onChange: onChange,
|
|
9402
|
-
onClick: onClick,
|
|
9403
|
-
disabled: disabled,
|
|
9404
|
-
required: required,
|
|
9405
|
-
id: id,
|
|
9406
|
-
name: name,
|
|
9407
|
-
value: value,
|
|
9408
|
-
"aria-label": label ? void 0 : ariaLabel,
|
|
9409
|
-
"aria-describedby": ariaDescribedBy,
|
|
9410
|
-
"aria-invalid": invalid
|
|
9411
|
-
}), label && jsx("label", {
|
|
9364
|
+
children: [ inputElement, jsx("label", {
|
|
9412
9365
|
className: "c-checkbox__label",
|
|
9413
9366
|
htmlFor: id,
|
|
9414
9367
|
children: label
|
|
9415
9368
|
}) ]
|
|
9416
|
-
})
|
|
9417
|
-
|
|
9418
|
-
|
|
9369
|
+
}) : label ? jsxs("label", {
|
|
9370
|
+
className: checkboxClass,
|
|
9371
|
+
style: style,
|
|
9372
|
+
children: [ inputElement, jsx("span", {
|
|
9373
|
+
className: "c-checkbox__label",
|
|
9374
|
+
children: label
|
|
9375
|
+
}) ]
|
|
9376
|
+
}) : jsx("div", {
|
|
9377
|
+
className: checkboxClass,
|
|
9378
|
+
style: style,
|
|
9379
|
+
children: inputElement
|
|
9380
|
+
}), glass) {
|
|
9419
9381
|
const defaultGlassProps = {
|
|
9420
9382
|
displacementScale: 40,
|
|
9421
9383
|
blurAmount: 1,
|
|
@@ -9429,11 +9391,11 @@ function useCheckbox(initialProps) {
|
|
|
9429
9391
|
};
|
|
9430
9392
|
return jsx(AtomixGlass, {
|
|
9431
9393
|
...glassProps,
|
|
9432
|
-
children:
|
|
9394
|
+
children: content
|
|
9433
9395
|
});
|
|
9434
9396
|
}
|
|
9435
|
-
return
|
|
9436
|
-
}));
|
|
9397
|
+
return content;
|
|
9398
|
+
})));
|
|
9437
9399
|
|
|
9438
9400
|
Checkbox.displayName = "Checkbox";
|
|
9439
9401
|
|
|
@@ -9610,18 +9572,6 @@ const DropdownContext = createContext({
|
|
|
9610
9572
|
|
|
9611
9573
|
/**
|
|
9612
9574
|
* DropdownItem component for menu items
|
|
9613
|
-
*/
|
|
9614
|
-
/**
|
|
9615
|
-
* Sanitize cell content to prevent CSV injection
|
|
9616
|
-
*/
|
|
9617
|
-
function sanitizeCSVCell(cell) {
|
|
9618
|
-
const sanitized = String(cell ?? "").replace(/[\r\n\t]/g, " ").replace(/"/g, '""');
|
|
9619
|
-
// Prevent formula injection by prefixing dangerous characters
|
|
9620
|
-
return /^[=+\-@]/.test(sanitized) ? `'${sanitized}` : sanitized;
|
|
9621
|
-
}
|
|
9622
|
-
|
|
9623
|
-
/**
|
|
9624
|
-
* Export data as CSV
|
|
9625
9575
|
*/ Dropdown.displayName = "Dropdown", DropdownItem.displayName = "DropdownItem",
|
|
9626
9576
|
DropdownDivider.displayName = "DropdownDivider", DropdownHeader.displayName = "DropdownHeader";
|
|
9627
9577
|
|
|
@@ -9700,7 +9650,11 @@ const DataTable = memo((({data: data, columns: columns, className: className, s
|
|
|
9700
9650
|
const defaultFilename = filename || "data-table";
|
|
9701
9651
|
switch (format) {
|
|
9702
9652
|
case "csv":
|
|
9703
|
-
!
|
|
9653
|
+
!
|
|
9654
|
+
/**
|
|
9655
|
+
* Export data as CSV
|
|
9656
|
+
*/
|
|
9657
|
+
function(data, columns, filename = "data-table.csv") {
|
|
9704
9658
|
if (!data.length || !columns.length) return;
|
|
9705
9659
|
// Create headers
|
|
9706
9660
|
const headers = columns.map((col => col.title || col.key)), rows = data.map((row => columns.map((col => {
|
|
@@ -11064,6 +11018,8 @@ function useHero(initialProps) {
|
|
|
11064
11018
|
contentWidth: void 0,
|
|
11065
11019
|
parallax: !1,
|
|
11066
11020
|
parallaxIntensity: .5,
|
|
11021
|
+
headingLevel: "h1",
|
|
11022
|
+
reverseOnMobile: !1,
|
|
11067
11023
|
...initialProps
|
|
11068
11024
|
}, hasBackgroundSlider = !!defaultProps.backgroundSlider, backgroundSliderResult =
|
|
11069
11025
|
/**
|
|
@@ -11144,7 +11100,9 @@ function useHero(initialProps) {
|
|
|
11144
11100
|
autoplay: {
|
|
11145
11101
|
delay: 5e3,
|
|
11146
11102
|
pauseOnHover: !0
|
|
11147
|
-
}
|
|
11103
|
+
},
|
|
11104
|
+
transition: "fade",
|
|
11105
|
+
transitionDuration: 1e3
|
|
11148
11106
|
}), backgroundSlider = hasBackgroundSlider && defaultProps.backgroundSlider ? backgroundSliderResult : void 0, hasBackgroundImage = !!hasBackgroundSlider || !!defaultProps.backgroundImageSrc || !!defaultProps.videoBackground, hasForegroundImage = !!defaultProps.imageSrc, useGridLayout = hasForegroundImage && "center" !== defaultProps.alignment, applyParallaxEffect = (element, intensity = .5) => {
|
|
11149
11107
|
if (!element) return;
|
|
11150
11108
|
// Ensure intensity is between 0 and 1
|
|
@@ -11195,13 +11153,20 @@ function useHero(initialProps) {
|
|
|
11195
11153
|
defaultProps.videoBackground && classes.push("c-hero--video"), baseClassName && classes.push(baseClassName),
|
|
11196
11154
|
classes.join(" ");
|
|
11197
11155
|
},
|
|
11198
|
-
generateImageColClass: (size = defaultProps.imageColSize || 7) => {
|
|
11156
|
+
generateImageColClass: (size = defaultProps.imageColSize || 7, customClass) => {
|
|
11199
11157
|
const classes = [ `o-grid__col o-grid__col--md-${size}` ];
|
|
11200
11158
|
// Add responsive margin if needed for mobile view
|
|
11201
11159
|
return "left" === defaultProps.alignment && classes.push("u-mt-5 u-mt-md-0"),
|
|
11202
|
-
|
|
11160
|
+
// Handle mobile stacking order
|
|
11161
|
+
defaultProps.reverseOnMobile && ("right" === defaultProps.alignment || "center" === defaultProps.alignment ? classes.push("u-order-first u-order-md-last") : classes.push("u-order-last u-order-md-first")),
|
|
11162
|
+
customClass && classes.push(customClass), classes.join(" ");
|
|
11163
|
+
},
|
|
11164
|
+
generateContentColClass: (size = defaultProps.contentColSize || 5, customClass) => {
|
|
11165
|
+
const classes = [ `o-grid__col o-grid__col--md-${size}` ];
|
|
11166
|
+
// Handle mobile stacking order
|
|
11167
|
+
return defaultProps.reverseOnMobile && ("right" === defaultProps.alignment || "center" === defaultProps.alignment ? classes.push("u-order-last u-order-md-first") : classes.push("u-order-first u-order-md-last")),
|
|
11168
|
+
customClass && classes.push(customClass), classes.join(" ");
|
|
11203
11169
|
},
|
|
11204
|
-
generateContentColClass: (size = defaultProps.contentColSize || 5) => `o-grid__col o-grid__col--md-${size}`,
|
|
11205
11170
|
hasBackgroundImage: hasBackgroundImage,
|
|
11206
11171
|
hasForegroundImage: hasForegroundImage,
|
|
11207
11172
|
useGridLayout: useGridLayout,
|
|
@@ -12417,6 +12382,8 @@ function useSlider(options) {
|
|
|
12417
12382
|
}
|
|
12418
12383
|
|
|
12419
12384
|
// Button composables
|
|
12385
|
+
// export * from './useButton';
|
|
12386
|
+
// Accordion composables
|
|
12420
12387
|
const composablesImport = Object.freeze( Object.defineProperty({
|
|
12421
12388
|
__proto__: null,
|
|
12422
12389
|
DOTS: "...",
|
|
@@ -12426,12 +12393,10 @@ const composablesImport = Object.freeze( Object.defineProperty({
|
|
|
12426
12393
|
useBarChart: useBarChart,
|
|
12427
12394
|
useBlock: useBlock,
|
|
12428
12395
|
useBreadcrumb: useBreadcrumb,
|
|
12429
|
-
useButton: useButton,
|
|
12430
12396
|
useCard: useCard,
|
|
12431
12397
|
useChartData: useChartData,
|
|
12432
12398
|
useChartInteraction: useChartInteraction,
|
|
12433
12399
|
useChartScale: useChartScale,
|
|
12434
|
-
useCheckbox: useCheckbox,
|
|
12435
12400
|
useDataTable: useDataTable,
|
|
12436
12401
|
useEdgePanel: useEdgePanel,
|
|
12437
12402
|
useForm: useForm,
|
|
@@ -13475,12 +13440,14 @@ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !
|
|
|
13475
13440
|
|
|
13476
13441
|
FooterLink.displayName = "FooterLink";
|
|
13477
13442
|
|
|
13478
|
-
const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc, imageAlt: imageAlt = "Hero image", alignment: alignment = "left", backgroundImageSrc: backgroundImageSrc, showOverlay: showOverlay = !0, fullViewportHeight: fullViewportHeight = !1, actions: actions, imageColSize: imageColSize = 7, contentColSize: contentColSize = 5, contentWidth: contentWidth, className: className = "", style: style, parallax: parallax = !1, parallaxIntensity: parallaxIntensity = .5, videoBackground: videoBackground, children: children, glass: glass, videoOptions: videoOptions = {
|
|
13443
|
+
const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc, imageAlt: imageAlt = "Hero image", alignment: alignment = "left", backgroundImageSrc: backgroundImageSrc, showOverlay: showOverlay = !0, fullViewportHeight: fullViewportHeight = !1, actions: actions, imageColSize: imageColSize = 7, imageColClassName: imageColClassName, imageColStyle: imageColStyle, contentColSize: contentColSize = 5, contentColClassName: contentColClassName, contentColStyle: contentColStyle, contentWidth: contentWidth, className: className = "", style: style, parallax: parallax = !1, parallaxIntensity: parallaxIntensity = .5, videoBackground: videoBackground, children: children, glass: glass, videoOptions: videoOptions = {
|
|
13479
13444
|
autoplay: !0,
|
|
13480
13445
|
loop: !0,
|
|
13481
13446
|
muted: !0
|
|
13482
|
-
}, backgroundSlider: backgroundSlider}) => {
|
|
13483
|
-
|
|
13447
|
+
}, backgroundSlider: backgroundSlider, headingLevel: headingLevel = "h1", reverseOnMobile: reverseOnMobile = !1, parts: parts, ...rest}) => {
|
|
13448
|
+
// Define dynamic heading tag
|
|
13449
|
+
const HeadingTag = headingLevel, {generateHeroClassNames: generateHeroClassNames, generateImageColClass: generateImageColClass, generateContentColClass: generateContentColClass, hasBackgroundImage: hasBackgroundImage, hasForegroundImage: hasForegroundImage, useGridLayout: useGridLayout, heroRef: heroRef, videoRef: videoRef, backgroundSlider: sliderHook, hasBackgroundSlider: hasBackgroundSlider} = useHero({
|
|
13450
|
+
title: title,
|
|
13484
13451
|
alignment: alignment,
|
|
13485
13452
|
imageColSize: imageColSize,
|
|
13486
13453
|
contentColSize: contentColSize,
|
|
@@ -13492,7 +13459,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13492
13459
|
parallax: parallax,
|
|
13493
13460
|
parallaxIntensity: parallaxIntensity,
|
|
13494
13461
|
videoBackground: videoBackground,
|
|
13495
|
-
backgroundSlider: backgroundSlider
|
|
13462
|
+
backgroundSlider: backgroundSlider,
|
|
13463
|
+
reverseOnMobile: reverseOnMobile
|
|
13496
13464
|
}), heroStyle = {
|
|
13497
13465
|
...contentWidth ? {
|
|
13498
13466
|
"--atomix-hero-content-width": contentWidth
|
|
@@ -13516,18 +13484,23 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13516
13484
|
});
|
|
13517
13485
|
}, renderContent = () => {
|
|
13518
13486
|
const content = jsxs("div", {
|
|
13519
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13487
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13488
|
+
style: parts?.content?.style,
|
|
13520
13489
|
children: [ subtitle && jsx("p", {
|
|
13521
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13490
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13491
|
+
style: parts?.subtitle?.style,
|
|
13522
13492
|
children: subtitle
|
|
13523
|
-
}), jsx(
|
|
13524
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13493
|
+
}), jsx(HeadingTag, {
|
|
13494
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13495
|
+
style: parts?.title?.style,
|
|
13525
13496
|
children: title
|
|
13526
13497
|
}), text && jsx("p", {
|
|
13527
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13498
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13499
|
+
style: parts?.text?.style,
|
|
13528
13500
|
children: text
|
|
13529
13501
|
}), actions && jsx("div", {
|
|
13530
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13502
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13503
|
+
style: parts?.actions?.style,
|
|
13531
13504
|
children: actions
|
|
13532
13505
|
}) ]
|
|
13533
13506
|
});
|
|
@@ -13537,7 +13510,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13537
13510
|
glass ? jsx("div",
|
|
13538
13511
|
// If glass is true, use default glass props
|
|
13539
13512
|
!0 === glass ? {
|
|
13540
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13513
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13514
|
+
style: parts?.content?.style,
|
|
13541
13515
|
children: jsx(AtomixGlass, {
|
|
13542
13516
|
displacementScale: 60,
|
|
13543
13517
|
blurAmount: 3,
|
|
@@ -13549,71 +13523,93 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13549
13523
|
children: jsxs("div", {
|
|
13550
13524
|
className: "u-p-4",
|
|
13551
13525
|
children: [ subtitle && jsx("p", {
|
|
13552
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13526
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13527
|
+
style: parts?.subtitle?.style,
|
|
13553
13528
|
children: subtitle
|
|
13554
|
-
}), jsx(
|
|
13555
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13529
|
+
}), jsx(HeadingTag, {
|
|
13530
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13531
|
+
style: parts?.title?.style,
|
|
13556
13532
|
children: title
|
|
13557
13533
|
}), text && jsx("p", {
|
|
13558
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13534
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13535
|
+
style: parts?.text?.style,
|
|
13559
13536
|
children: text
|
|
13560
13537
|
}), actions && jsx("div", {
|
|
13561
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13538
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13539
|
+
style: parts?.actions?.style,
|
|
13562
13540
|
children: actions
|
|
13563
13541
|
}) ]
|
|
13564
13542
|
})
|
|
13565
13543
|
})
|
|
13566
13544
|
} : {
|
|
13567
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13545
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13546
|
+
style: parts?.content?.style,
|
|
13568
13547
|
children: jsx(AtomixGlass, {
|
|
13569
13548
|
...glass,
|
|
13570
13549
|
children: jsxs("div", {
|
|
13571
13550
|
className: "u-p-4",
|
|
13572
13551
|
children: [ subtitle && jsx("p", {
|
|
13573
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13552
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13553
|
+
style: parts?.subtitle?.style,
|
|
13574
13554
|
children: subtitle
|
|
13575
|
-
}), jsx(
|
|
13576
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13555
|
+
}), jsx(HeadingTag, {
|
|
13556
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13557
|
+
style: parts?.title?.style,
|
|
13577
13558
|
children: title
|
|
13578
13559
|
}), text && jsx("p", {
|
|
13579
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13560
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13561
|
+
style: parts?.text?.style,
|
|
13580
13562
|
children: text
|
|
13581
13563
|
}), actions && jsx("div", {
|
|
13582
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13564
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13565
|
+
style: parts?.actions?.style,
|
|
13583
13566
|
children: actions
|
|
13584
13567
|
}) ]
|
|
13585
13568
|
})
|
|
13586
13569
|
})
|
|
13587
13570
|
}) : content;
|
|
13588
13571
|
}, renderForegroundImage = () => hasForegroundImage ? jsx("div", "center" === alignment ? {
|
|
13589
|
-
className: HERO.SELECTORS.IMAGE_WRAPPER.replace(".", ""),
|
|
13572
|
+
className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${imageColClassName || ""} ${parts?.imageWrapper?.className || ""}`.trim(),
|
|
13573
|
+
style: {
|
|
13574
|
+
...imageColStyle,
|
|
13575
|
+
...parts?.imageWrapper?.style
|
|
13576
|
+
},
|
|
13590
13577
|
children: jsx("img", {
|
|
13591
13578
|
src: imageSrc,
|
|
13592
13579
|
alt: imageAlt,
|
|
13593
|
-
className: HERO.SELECTORS.IMAGE.replace(".", "")
|
|
13580
|
+
className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${parts?.image?.className || ""}`.trim(),
|
|
13581
|
+
style: parts?.image?.style
|
|
13594
13582
|
})
|
|
13595
13583
|
} : {
|
|
13596
|
-
className: generateImageColClass(),
|
|
13584
|
+
className: `${generateImageColClass(imageColSize, imageColClassName)} ${parts?.imageWrapper?.className || ""}`.trim(),
|
|
13585
|
+
style: {
|
|
13586
|
+
...imageColStyle,
|
|
13587
|
+
...parts?.imageWrapper?.style
|
|
13588
|
+
},
|
|
13597
13589
|
children: jsx("img", {
|
|
13598
13590
|
src: imageSrc,
|
|
13599
13591
|
alt: imageAlt,
|
|
13600
|
-
className: HERO.SELECTORS.IMAGE.replace(".", "")
|
|
13592
|
+
className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${parts?.image?.className || ""}`.trim(),
|
|
13593
|
+
style: parts?.image?.style
|
|
13601
13594
|
})
|
|
13602
13595
|
}) : null;
|
|
13603
|
-
|
|
13604
|
-
return jsxs("div", {
|
|
13596
|
+
return jsxs("div", {
|
|
13605
13597
|
ref: heroRef,
|
|
13606
|
-
className: generateHeroClassNames(className),
|
|
13607
|
-
style:
|
|
13598
|
+
className: `${generateHeroClassNames(className)} ${parts?.root?.className || ""}`.trim(),
|
|
13599
|
+
style: {
|
|
13600
|
+
...heroStyle,
|
|
13601
|
+
...parts?.root?.style
|
|
13602
|
+
},
|
|
13608
13603
|
"data-parallax": parallax ? "true" : void 0,
|
|
13609
13604
|
"data-parallax-intensity": parallax ? parallaxIntensity : void 0,
|
|
13605
|
+
...rest,
|
|
13610
13606
|
children: [ (() => {
|
|
13611
13607
|
// Render background slider if configured
|
|
13612
13608
|
if (hasBackgroundSlider && backgroundSlider && sliderHook) {
|
|
13613
13609
|
const {slides: slides, transition: transition = "fade", transitionDuration: transitionDuration = 1e3} = backgroundSlider, {currentIndex: currentIndex, slideRefs: slideRefs, videoRefs: videoRefs} = sliderHook;
|
|
13614
13610
|
// Determine transition class
|
|
13615
13611
|
let transitionClass = HERO.CLASSES.SLIDER_FADE;
|
|
13616
|
-
return "slide" === transition
|
|
13612
|
+
return "slide" === transition && (transitionClass = HERO.CLASSES.SLIDER_SLIDE),
|
|
13617
13613
|
jsxs("div", {
|
|
13618
13614
|
className: `${HERO.SELECTORS.SLIDER.replace(".", "")} ${transitionClass}`,
|
|
13619
13615
|
style: {
|
|
@@ -13630,57 +13626,68 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13630
13626
|
return jsx("div", {
|
|
13631
13627
|
ref: slideRef,
|
|
13632
13628
|
className: `${HERO.SELECTORS.SLIDER_ITEM.replace(".", "")} ${isActive ? HERO.CLASSES.SLIDER_ITEM_ACTIVE : ""}`,
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
alt: slide.alt || "Background slide",
|
|
13636
|
-
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13637
|
-
}) : jsxs("video", {
|
|
13629
|
+
"aria-hidden": !isActive,
|
|
13630
|
+
children: "video" === slide.type ? jsxs("video", {
|
|
13638
13631
|
ref: videoRef,
|
|
13639
|
-
className: "c-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
muted:
|
|
13632
|
+
className: "c-hero__bg-video",
|
|
13633
|
+
src: slide.src,
|
|
13634
|
+
poster: slide.videoOptions?.posterUrl || slide.alt,
|
|
13635
|
+
muted: slide.videoOptions?.muted ?? !0,
|
|
13636
|
+
loop: slide.videoOptions?.loop ?? !0,
|
|
13643
13637
|
playsInline: !0,
|
|
13644
|
-
|
|
13638
|
+
"aria-hidden": "true",
|
|
13639
|
+
autoPlay: !1 !== slide.videoOptions?.autoplay,
|
|
13645
13640
|
children: [ jsx("source", {
|
|
13646
13641
|
src: slide.src,
|
|
13647
13642
|
type: `video/${slide.src.split(".").pop() || "mp4"}`
|
|
13648
13643
|
}), "Your browser does not support the video tag." ]
|
|
13644
|
+
}) : jsx("img", {
|
|
13645
|
+
src: slide.src,
|
|
13646
|
+
alt: slide.alt || "Background slide",
|
|
13647
|
+
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13649
13648
|
})
|
|
13650
13649
|
}, index);
|
|
13651
13650
|
})), showOverlay && jsx("div", {
|
|
13652
|
-
className: HERO.SELECTORS.OVERLAY.replace(".", "")
|
|
13651
|
+
className: `${HERO.SELECTORS.OVERLAY.replace(".", "")} ${parts?.overlay?.className || ""}`.trim(),
|
|
13652
|
+
style: parts?.overlay?.style
|
|
13653
13653
|
}) ]
|
|
13654
13654
|
});
|
|
13655
13655
|
}
|
|
13656
13656
|
// Fall back to single background image/video
|
|
13657
13657
|
return hasBackgroundImage || videoBackground ? jsxs("div", {
|
|
13658
|
-
className: HERO.SELECTORS.BG.replace(".", ""),
|
|
13658
|
+
className: `${HERO.SELECTORS.BG.replace(".", "")} ${parts?.background?.className || ""}`.trim(),
|
|
13659
|
+
style: parts?.background?.style,
|
|
13659
13660
|
children: [ backgroundImageSrc && jsx("img", {
|
|
13660
13661
|
src: backgroundImageSrc,
|
|
13661
13662
|
alt: "Background",
|
|
13662
13663
|
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13663
13664
|
}), renderVideoBackground(), showOverlay && jsx("div", {
|
|
13664
|
-
className: HERO.SELECTORS.OVERLAY.replace(".", "")
|
|
13665
|
+
className: `${HERO.SELECTORS.OVERLAY.replace(".", "")} ${parts?.overlay?.className || ""}`.trim(),
|
|
13666
|
+
style: parts?.overlay?.style
|
|
13665
13667
|
}) ]
|
|
13666
13668
|
}) : null;
|
|
13667
13669
|
})(), jsx("div", {
|
|
13668
|
-
className: `${HERO.SELECTORS.CONTAINER.replace(".", "")} o-container
|
|
13670
|
+
className: `${HERO.SELECTORS.CONTAINER.replace(".", "")} o-container ${parts?.container?.className || ""}`.trim(),
|
|
13671
|
+
style: parts?.container?.style,
|
|
13669
13672
|
children: children ? jsx("div", {
|
|
13670
|
-
className: HERO.SELECTORS.GRID.replace(".", ""),
|
|
13673
|
+
className: `${HERO.SELECTORS.GRID.replace(".", "")} ${parts?.grid?.className || ""}`.trim(),
|
|
13674
|
+
style: parts?.grid?.style,
|
|
13671
13675
|
children: children
|
|
13672
13676
|
}) : useGridLayout ? jsx("div", {
|
|
13673
|
-
className: `${HERO.SELECTORS.GRID.replace(".", "")} o-grid
|
|
13677
|
+
className: `${HERO.SELECTORS.GRID.replace(".", "")} o-grid ${parts?.grid?.className || ""}`.trim(),
|
|
13678
|
+
style: parts?.grid?.style,
|
|
13674
13679
|
children: jsxs(Fragment,
|
|
13675
13680
|
// For left-aligned content, render content first then image
|
|
13676
13681
|
"left" === alignment ? {
|
|
13677
13682
|
children: [ jsx("div", {
|
|
13678
|
-
className: generateContentColClass(),
|
|
13683
|
+
className: generateContentColClass(contentColSize, contentColClassName),
|
|
13684
|
+
style: contentColStyle,
|
|
13679
13685
|
children: renderContent()
|
|
13680
13686
|
}), renderForegroundImage() ]
|
|
13681
13687
|
} : {
|
|
13682
13688
|
children: [ renderForegroundImage(), jsx("div", {
|
|
13683
|
-
className: generateContentColClass(),
|
|
13689
|
+
className: generateContentColClass(contentColSize, contentColClassName),
|
|
13690
|
+
style: contentColStyle,
|
|
13684
13691
|
children: renderContent()
|
|
13685
13692
|
}) ]
|
|
13686
13693
|
})
|
|
@@ -17323,7 +17330,7 @@ const Toggle = ({checked: controlledChecked, defaultChecked: defaultChecked = !1
|
|
|
17323
17330
|
if (disabled) return;
|
|
17324
17331
|
const nextChecked = !isChecked;
|
|
17325
17332
|
isControlled || setInternalChecked(nextChecked), onChange?.(nextChecked);
|
|
17326
|
-
}), [ disabled, isChecked, isControlled, onChange ]), toggleClass = [ "c-toggle", isChecked && TOGGLE.CLASSES.IS_ON, disabled && "is-disabled", className ].filter(Boolean).join(" "), toggleContent = jsx("div", {
|
|
17333
|
+
}), [ disabled, isChecked, isControlled, onChange ]), toggleClass = [ "c-toggle", isChecked && TOGGLE.CLASSES.IS_ON, disabled && "is-disabled", glass && "c-toggle--glass", className ].filter(Boolean).join(" "), toggleContent = jsx("div", {
|
|
17327
17334
|
className: toggleClass,
|
|
17328
17335
|
style: style,
|
|
17329
17336
|
onClick: handleClick,
|
|
@@ -18697,7 +18704,6 @@ const components = Object.freeze( Object.defineProperty({
|
|
|
18697
18704
|
FOOTER: FOOTER,
|
|
18698
18705
|
FORM: FORM,
|
|
18699
18706
|
FORM_GROUP: FORM_GROUP,
|
|
18700
|
-
GLASS_CONTAINER: GLASS_CONTAINER,
|
|
18701
18707
|
HERO: HERO,
|
|
18702
18708
|
INPUT: INPUT,
|
|
18703
18709
|
LIST: LIST,
|
|
@@ -24670,5 +24676,5 @@ const atomix = {
|
|
|
24670
24676
|
types: types
|
|
24671
24677
|
};
|
|
24672
24678
|
|
|
24673
|
-
export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, BUTTON_GROUP, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, ButtonGroup, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DesignTokensCustomizer, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart,
|
|
24679
|
+
export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, BUTTON_GROUP, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, ButtonGroup, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DesignTokensCustomizer, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GaugeChart, Grid, GridCol, HERO, HeatmapChart, Hero, INPUT, INPUT_CSS_VARS, Icon, Input, LIST, LIST_GROUP, LineChart, List, ListGroup, MESSAGES, MODAL, MODAL_CSS_VARS, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, NAV, NAVBAR, Nav, NavDropdown, NavItem, Navbar, PAGINATION_DEFAULTS, PHOTOVIEWER, POPOVER, PROGRESS, PROGRESS_CSS_VARS, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RADIO, RADIO_CSS_VARS, RATING, RIVER, RTLManager, RadarChart, Radio, Rating, River, Row, SECTION_INTRO, SELECT, SIDE_MENU, SIZES, SLIDER, SPINNER, STEPS, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, TAB, TABS_CSS_VARS, TESTIMONIAL, TEXTAREA, THEME_COLORS, THEME_NAMING, TODO, TOGGLE, TOOLTIP, TOOLTIP_CSS_VARS, Tabs, Testimonial, Textarea, ThemeApplicator, ThemeComparator, ThemeContext, ThemeErrorBoundary, ThemeInspector, ThemeLiveEditor, ThemePreview, ThemeProvider, ThemeValidator, Todo, Toggle, Tooltip, TreemapChart, UPLOAD, Upload, VIDEO_PLAYER, VideoPlayer, WaterfallChart, applyCSSVariables, applyCSSVarsToStyle, applyComponentTheme, applyPartStyles, applyTheme, camelToKebab, clearThemes, composables, constants, createCSSVarStyle, createDarkVariant, createDebugAttrs, createFontPreloadLink, createPartProps, createSlotComponent, createSlotProps, createTheme, createThemeRegistry, createTokens, cssVarsToStyle, deepMerge, atomix as default, defaultTokens, defineConfig, designTokensToCSSVars, exportTheme, extendTheme, extractComponentName, extractYouTubeId, generateCSSVariableName, generateCSSVariables$1 as generateCSSVariables, generateCSSVariablesForSelector, generateClassName, generateComponentCSSVars, generateFontPreloadTags, generateUUID, getAllThemes, getCSSVariable, getComponentCSSVars, getComponentThemeValue, getPartStyles, getTheme, getThemeApplicator, getThemeCount, getThemeIds, getThemeMetadata, hasCustomization, hasTheme, importTheme, injectCSS$1 as injectCSS, injectTheme, isCSSInjected, isDesignTokens, isSlot, isValidCSSVariableName, isYouTubeUrl, mapSCSSTokensToCSSVars, mergeCSSVars, mergeClassNames, mergeComponentProps, mergePartStyles, mergeSlots, mergeTheme, normalizeThemeTokens, preloadFonts, quickTheme, registerTheme, removeCSS, removeCSSVariables, removeTheme, renderSlot, sliderConstants, supportsDarkMode, theme, themePropertyToCSSVar, themeToCSS, types, unregisterTheme, useAccordion, useAtomixGlass, useBadge, useBarChart, useBlock, useBreadcrumb, useCard, useChartData, useChartInteraction, useChartScale, useComponentCustomization, useComponentDefaultProps, useComponentTheme, useDataTable, useEdgePanel, useForm, useFormGroup, useGlassContainer, useHero, useHistory, useInput, useLineChart, useMergedProps, useModal$1 as useModal, useNav, useNavDropdown, useNavItem, useNavbar, usePagination, usePieChart, useRadio, useRiver, useSelect, useSideMenu, useSideMenuItem, useSlider, useSlot, useSpinner, useTextarea, useTheme, useThemeTokens, useTodo, utils, validateTheme };
|
|
24674
24680
|
//# sourceMappingURL=index.esm.js.map
|