@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.js
CHANGED
|
@@ -1249,29 +1249,6 @@ const THEME_COLORS = [ "primary", "secondary", "success", "info", "warning", "er
|
|
|
1249
1249
|
SIZES: [ "xs", "sm", "md", "lg", "xl", "none" ],
|
|
1250
1250
|
DEFAULT: "md"
|
|
1251
1251
|
}
|
|
1252
|
-
}, GLASS_CONTAINER = {
|
|
1253
|
-
CLASSES: {
|
|
1254
|
-
BASE: "c-glass-container",
|
|
1255
|
-
GLASS: "c-glass-container__glass",
|
|
1256
|
-
WARP: "c-glass-container__warp",
|
|
1257
|
-
CONTENT: "c-glass-container__content",
|
|
1258
|
-
OVERLAY: "c-glass-container__overlay",
|
|
1259
|
-
OVERLAY_VISIBLE: "c-glass-container__overlay--visible",
|
|
1260
|
-
OVERLAY_HIDDEN: "c-glass-container__overlay--hidden",
|
|
1261
|
-
OVERLAY_BLEND: "c-glass-container__overlay-blend",
|
|
1262
|
-
BORDER: "c-glass-container__border",
|
|
1263
|
-
BORDER_OVERLAY: "c-glass-container__border-overlay",
|
|
1264
|
-
HOVER_EFFECT: "c-glass-container__hover-effect",
|
|
1265
|
-
ACTIVE_EFFECT: "c-glass-container__active-effect",
|
|
1266
|
-
INTERACTION_EFFECT: "c-glass-container__interaction-effect",
|
|
1267
|
-
ACTIVE: "c-glass-container--active",
|
|
1268
|
-
CLICKABLE: "c-glass-container--clickable"
|
|
1269
|
-
},
|
|
1270
|
-
DISPLACEMENT_MAPS: {
|
|
1271
|
-
STANDARD: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcwIiBoZWlnaHQ9IjY5IiB2aWV3Qm94PSIwIDAgMjcwIDY5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGN4PSI1MCUiIGN5PSI1MCUiIHI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzgwODA4MCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgwODA4MCIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZGllbnQpIi8+PC9zdmc+",
|
|
1272
|
-
POLAR: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcwIiBoZWlnaHQ9IjY5IiB2aWV3Qm94PSIwIDAgMjcwIDY5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0icG9sYXIiIGN4PSI1MCUiIGN5PSI1MCUiIHI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQwNDA0MCIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjODA4MDgwIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNDA0MDQwIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwb2xhcikiLz48L3N2Zz4=",
|
|
1273
|
-
PROMINENT: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcwIiBoZWlnaHQ9IjY5IiB2aWV3Qm94PSIwIDAgMjcwIDY5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0icHJvbWluZW50IiB4MT0iMCUiIHkxPSIwJSIgeDI9IjEwMCUiIHkyPSIxMDAlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjNDA0MDQwIi8+PHN0b3Agb2Zmc2V0PSI1MCUiIHN0b3AtY29sb3I9IiNjMGMwYzAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM0MDQwNDAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI3Byb21pbmVudCkiLz48L3N2Zz4="
|
|
1274
|
-
}
|
|
1275
1252
|
}, FOOTER = {
|
|
1276
1253
|
SELECTORS: {
|
|
1277
1254
|
FOOTER: ".c-footer",
|
|
@@ -1410,10 +1387,16 @@ const THEME_COLORS = [ "primary", "secondary", "success", "info", "warning", "er
|
|
|
1410
1387
|
MIN_BLUR: .1,
|
|
1411
1388
|
MOUSE_INFLUENCE_DIVISOR: 100,
|
|
1412
1389
|
EDGE_FADE_PIXELS: 2,
|
|
1390
|
+
// Note: This default must match the SCSS variable --atomix-radius-md
|
|
1391
|
+
// @see src/styles/01-settings/_settings.global.scss
|
|
1413
1392
|
DEFAULT_CORNER_RADIUS: 16,
|
|
1414
|
-
// Fallback value matching design system
|
|
1415
1393
|
MAX_SIZE: 4096,
|
|
1416
1394
|
// Maximum width/height for glass size
|
|
1395
|
+
// Palette for internal calculations (matches design system base colors)
|
|
1396
|
+
PALETTE: {
|
|
1397
|
+
WHITE: "255, 255, 255",
|
|
1398
|
+
BLACK: "0, 0, 0"
|
|
1399
|
+
},
|
|
1417
1400
|
// Gradient calculation constants
|
|
1418
1401
|
GRADIENT: {
|
|
1419
1402
|
BASE_ANGLE: 135,
|
|
@@ -1631,10 +1614,10 @@ const {CONSTANTS: CONSTANTS$1} = ATOMIX_GLASS, calculateDistance = (pos1, pos2)
|
|
|
1631
1614
|
y: 0
|
|
1632
1615
|
}, calculateMouseInfluence = mouseOffset => {
|
|
1633
1616
|
if (!mouseOffset || "number" != typeof mouseOffset.x || "number" != typeof mouseOffset.y) return 0;
|
|
1634
|
-
//
|
|
1617
|
+
// Bounded calculation — keeps the glass effect subtle and stable
|
|
1635
1618
|
const influence = Math.sqrt(mouseOffset.x * mouseOffset.x + mouseOffset.y * mouseOffset.y) / CONSTANTS$1.MOUSE_INFLUENCE_DIVISOR;
|
|
1636
|
-
return Math.min(
|
|
1637
|
-
//
|
|
1619
|
+
return Math.min(.8, influence);
|
|
1620
|
+
// Tighter cap to prevent blur/filter blow-out
|
|
1638
1621
|
}, 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 => {
|
|
1639
1622
|
if ("number" == typeof value) return Math.max(0, value);
|
|
1640
1623
|
if ("string" != typeof value || !value.trim()) return CONSTANTS$1.DEFAULT_CORNER_RADIUS;
|
|
@@ -1865,7 +1848,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
|
|
|
1865
1848
|
}, globalMousePosition: globalMousePosition = {
|
|
1866
1849
|
x: 0,
|
|
1867
1850
|
y: 0
|
|
1868
|
-
}, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp,
|
|
1851
|
+
}, 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 = {
|
|
1869
1852
|
width: 0,
|
|
1870
1853
|
height: 0
|
|
1871
1854
|
}, onClick: onClick, mode: mode = "standard", effectiveDisableEffects: effectiveDisableEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", enableLiquidBlur: enableLiquidBlur = !1, elasticity: elasticity = 0, contentRef: contentRef}, ref) => {
|
|
@@ -1980,28 +1963,29 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
|
|
|
1980
1963
|
flowBlur: 1.2 * blurAmount
|
|
1981
1964
|
};
|
|
1982
1965
|
// Enhanced validation for liquid blur
|
|
1983
|
-
if (!enableLiquidBlur || !rectCache || !
|
|
1966
|
+
if (!enableLiquidBlur || !rectCache || !mouseOffset || "number" != typeof mouseOffset.x || "number" != typeof mouseOffset.y || isNaN(mouseOffset.x) || isNaN(mouseOffset.y)) return defaultBlur;
|
|
1984
1967
|
try {
|
|
1985
|
-
|
|
1986
|
-
|
|
1968
|
+
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);
|
|
1969
|
+
// NOTE: hover/active multipliers intentionally omitted here —
|
|
1970
|
+
// they belong on opacity layers, not the blur filter itself.
|
|
1987
1971
|
return {
|
|
1988
|
-
baseBlur: clampBlur(baseBlur
|
|
1989
|
-
edgeBlur: clampBlur(edgeBlur
|
|
1990
|
-
centerBlur: clampBlur(centerBlur
|
|
1991
|
-
flowBlur: clampBlur(flowBlur
|
|
1972
|
+
baseBlur: clampBlur(baseBlur),
|
|
1973
|
+
edgeBlur: clampBlur(edgeBlur),
|
|
1974
|
+
centerBlur: clampBlur(centerBlur),
|
|
1975
|
+
flowBlur: clampBlur(flowBlur)
|
|
1992
1976
|
};
|
|
1993
1977
|
} catch (error) {
|
|
1994
1978
|
return console.warn("AtomixGlassContainer: Error calculating liquid blur", error),
|
|
1995
1979
|
defaultBlur;
|
|
1996
1980
|
}
|
|
1997
|
-
}), [ enableLiquidBlur, blurAmount,
|
|
1981
|
+
}), [ enableLiquidBlur, blurAmount, mouseOffset, rectCache ]), backdropStyle = React.useMemo((() => {
|
|
1998
1982
|
try {
|
|
1999
1983
|
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;
|
|
2000
1984
|
// Validate blur values before using them
|
|
2001
1985
|
return !enableLiquidBlur || effectiveReducedMotion || effectiveDisableEffects || area > 18e4 ? {
|
|
2002
|
-
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)`
|
|
1986
|
+
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})`
|
|
2003
1987
|
} : {
|
|
2004
|
-
backdropFilter:
|
|
1988
|
+
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})`
|
|
2005
1989
|
};
|
|
2006
1990
|
// Single-pass fallback: stronger radius to match perceived blur of multi-pass
|
|
2007
1991
|
} catch (error) {
|
|
@@ -2020,7 +2004,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
|
|
|
2020
2004
|
"--atomix-glass-container-padding": padding || "0 0",
|
|
2021
2005
|
"--atomix-glass-container-radius": `${"number" != typeof cornerRadius || isNaN(cornerRadius) ? 0 : cornerRadius}px`,
|
|
2022
2006
|
"--atomix-glass-container-backdrop": backdropStyle?.backdropFilter || "none",
|
|
2023
|
-
"--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",
|
|
2007
|
+
"--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",
|
|
2024
2008
|
"--atomix-glass-container-shadow-opacity": effectiveDisableEffects ? 0 : 1,
|
|
2025
2009
|
// Background and shadow values use design token-aligned RGB values
|
|
2026
2010
|
"--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",
|
|
@@ -2039,10 +2023,18 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
|
|
|
2039
2023
|
"--atomix-glass-container-text-shadow": "none"
|
|
2040
2024
|
};
|
|
2041
2025
|
}
|
|
2042
|
-
}), [ glassSize, padding, cornerRadius, backdropStyle, mouseOffset, overLight, effectiveDisableEffects ])
|
|
2026
|
+
}), [ glassSize, padding, cornerRadius, backdropStyle, mouseOffset, overLight, effectiveDisableEffects ]), setForceNoTransition = el => {
|
|
2027
|
+
el && (el.style.setProperty("transition-duration", "0s", "important"), el.style.setProperty("animation-duration", "0s", "important"),
|
|
2028
|
+
el.style.setProperty("transition-delay", "0s", "important"));
|
|
2029
|
+
};
|
|
2043
2030
|
return jsxRuntime.jsx("div", {
|
|
2044
|
-
ref:
|
|
2045
|
-
|
|
2031
|
+
ref: el => {
|
|
2032
|
+
// Apply force no-transition
|
|
2033
|
+
setForceNoTransition(el),
|
|
2034
|
+
// Handle forwarded ref
|
|
2035
|
+
"function" == typeof ref ? ref(el) : ref && (ref.current = el);
|
|
2036
|
+
},
|
|
2037
|
+
className: `${ATOMIX_GLASS.CONTAINER_CLASS} ${className} ${isActive ? ATOMIX_GLASS.CLASSES.ACTIVE : ""} ${overLight ? ATOMIX_GLASS.CLASSES.OVER_LIGHT : ""}`,
|
|
2046
2038
|
style: {
|
|
2047
2039
|
...style,
|
|
2048
2040
|
...containerVars
|
|
@@ -2060,6 +2052,11 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
|
|
|
2060
2052
|
onMouseUp: onMouseUp,
|
|
2061
2053
|
children: [ jsxRuntime.jsxs("div", {
|
|
2062
2054
|
className: ATOMIX_GLASS.FILTER_CLASS,
|
|
2055
|
+
style: {
|
|
2056
|
+
zIndex: 1,
|
|
2057
|
+
position: "absolute",
|
|
2058
|
+
inset: 0
|
|
2059
|
+
},
|
|
2063
2060
|
children: [ jsxRuntime.jsx(GlassFilter, {
|
|
2064
2061
|
blurAmount: blurAmount,
|
|
2065
2062
|
mode: mode,
|
|
@@ -2068,6 +2065,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
|
|
|
2068
2065
|
aberrationIntensity: "number" != typeof aberrationIntensity || isNaN(aberrationIntensity) ? 0 : aberrationIntensity,
|
|
2069
2066
|
shaderMapUrl: shaderMapUrl
|
|
2070
2067
|
}), jsxRuntime.jsx("div", {
|
|
2068
|
+
ref: setForceNoTransition,
|
|
2071
2069
|
className: ATOMIX_GLASS.FILTER_OVERLAY_CLASS,
|
|
2072
2070
|
style: {
|
|
2073
2071
|
filter: `url(#${filterId})`,
|
|
@@ -2089,9 +2087,8 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
|
|
|
2089
2087
|
style: {
|
|
2090
2088
|
position: "relative",
|
|
2091
2089
|
textShadow: "var(--atomix-glass-container-text-shadow)",
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
} : {}
|
|
2090
|
+
// Ensure content is always above the filter layer (zIndex 1)
|
|
2091
|
+
zIndex: elasticity > 0 ? 100 : 2
|
|
2095
2092
|
},
|
|
2096
2093
|
children: children
|
|
2097
2094
|
}) ]
|
|
@@ -2209,12 +2206,12 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2209
2206
|
}), [internalMouseOffset, setInternalMouseOffset] = React.useState({
|
|
2210
2207
|
x: 0,
|
|
2211
2208
|
y: 0
|
|
2212
|
-
}), [dynamicCornerRadius, setDynamicCornerRadius] = React.useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = React.useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = React.useState(!1), [detectedOverLight, setDetectedOverLight] = React.useState(!1), effectiveCornerRadius = React.useMemo((() => void 0 !== cornerRadius ? Math.max(0, cornerRadius) : Math.max(0, dynamicCornerRadius)), [ cornerRadius, dynamicCornerRadius
|
|
2209
|
+
}), [dynamicCornerRadius, setDynamicCornerRadius] = React.useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = React.useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = React.useState(!1), [detectedOverLight, setDetectedOverLight] = React.useState(!1), effectiveCornerRadius = React.useMemo((() => void 0 !== cornerRadius ? Math.max(0, cornerRadius) : Math.max(0, dynamicCornerRadius)), [ cornerRadius, dynamicCornerRadius ]), effectiveReducedMotion = React.useMemo((() => reducedMotion || userPrefersReducedMotion), [ reducedMotion, userPrefersReducedMotion ]), effectiveHighContrast = React.useMemo((() => highContrast || userPrefersHighContrast), [ highContrast, userPrefersHighContrast ]), effectiveDisableEffects = React.useMemo((() => disableEffects || effectiveReducedMotion), [ disableEffects, effectiveReducedMotion ]), globalMousePosition = React.useMemo((() => externalGlobalMousePosition || internalGlobalMousePosition), [ externalGlobalMousePosition, internalGlobalMousePosition ]), mouseOffset = React.useMemo((() => externalMouseOffset || internalMouseOffset), [ externalMouseOffset, internalMouseOffset ]);
|
|
2213
2210
|
// Extract border-radius from children
|
|
2214
2211
|
React.useEffect((() => {
|
|
2215
2212
|
const extractRadius = () => {
|
|
2216
2213
|
try {
|
|
2217
|
-
let extractedRadius = null
|
|
2214
|
+
let extractedRadius = null;
|
|
2218
2215
|
if (contentRef.current) {
|
|
2219
2216
|
const firstChild = contentRef.current.firstElementChild;
|
|
2220
2217
|
if (firstChild) {
|
|
@@ -2231,15 +2228,14 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2231
2228
|
return null;
|
|
2232
2229
|
}
|
|
2233
2230
|
})(firstChild);
|
|
2234
|
-
null !== domRadius && domRadius > 0 && (extractedRadius = domRadius
|
|
2231
|
+
null !== domRadius && domRadius > 0 && (extractedRadius = domRadius);
|
|
2235
2232
|
}
|
|
2236
2233
|
}
|
|
2237
2234
|
if (null === extractedRadius) {
|
|
2238
2235
|
const childRadius = extractBorderRadiusFromChildren(children);
|
|
2239
|
-
childRadius > 0 && childRadius !== CONSTANTS.DEFAULT_CORNER_RADIUS && (extractedRadius = childRadius
|
|
2240
|
-
extractionSource = "React children");
|
|
2236
|
+
childRadius > 0 && childRadius !== CONSTANTS.DEFAULT_CORNER_RADIUS && (extractedRadius = childRadius);
|
|
2241
2237
|
}
|
|
2242
|
-
null !== extractedRadius && extractedRadius > 0
|
|
2238
|
+
null !== extractedRadius && extractedRadius > 0 && setDynamicCornerRadius(extractedRadius);
|
|
2243
2239
|
} catch (error) {
|
|
2244
2240
|
"undefined" != typeof process && "production" === process.env?.NODE_ENV || !debugCornerRadius || console.error("[AtomixGlass] Error extracting corner radius:", error);
|
|
2245
2241
|
}
|
|
@@ -2368,7 +2364,6 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2368
2364
|
}
|
|
2369
2365
|
if ("boolean" == typeof overLight &&
|
|
2370
2366
|
// For boolean values, disable auto-detection
|
|
2371
|
-
// Cache is automatically managed by WeakMap (no manual clearing needed)
|
|
2372
2367
|
setDetectedOverLight(!1), "function" == typeof window.matchMedia) try {
|
|
2373
2368
|
const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
|
|
2374
2369
|
setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
|
|
@@ -2438,6 +2433,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2438
2433
|
}), [ handleGlobalMousePosition, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects ]);
|
|
2439
2434
|
// Transform calculations
|
|
2440
2435
|
const calculateDirectionalScale = React.useCallback((() => {
|
|
2436
|
+
if (!0 === overLight || "auto" === overLight && detectedOverLight || "object" == typeof overLight && null !== overLight && detectedOverLight) return "scale(1)";
|
|
2441
2437
|
if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return "scale(1)";
|
|
2442
2438
|
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({
|
|
2443
2439
|
x: edgeDistanceX,
|
|
@@ -2451,7 +2447,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2451
2447
|
if (0 === centerDistance) return "scale(1)";
|
|
2452
2448
|
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;
|
|
2453
2449
|
return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
|
|
2454
|
-
}), [ globalMousePosition, elasticity, glassSize, glassRef ]), calculateFadeInFactor = React.useCallback((() => {
|
|
2450
|
+
}), [ globalMousePosition, elasticity, glassSize, glassRef, overLight, detectedOverLight ]), calculateFadeInFactor = React.useCallback((() => {
|
|
2455
2451
|
if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return 0;
|
|
2456
2452
|
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({
|
|
2457
2453
|
x: edgeDistanceX,
|
|
@@ -2536,20 +2532,21 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2536
2532
|
isOverLight: isOverLight,
|
|
2537
2533
|
threshold: .7,
|
|
2538
2534
|
opacity: isOverLight ? Math.min(.6, Math.max(.2, .5 * hoverIntensity * activeIntensity)) : 0,
|
|
2539
|
-
contrast: Math.min(1.
|
|
2540
|
-
brightness: Math.min(1.
|
|
2541
|
-
saturationBoost:
|
|
2542
|
-
|
|
2543
|
-
|
|
2535
|
+
contrast: Math.min(1.6, Math.max(1, 1.4 + .1 * mouseInfluence)),
|
|
2536
|
+
brightness: Math.min(1.1, Math.max(.8, .9 + .05 * mouseInfluence)),
|
|
2537
|
+
saturationBoost: 1.3,
|
|
2538
|
+
// Fixed value — dynamic saturation amplifies perceived displacement
|
|
2539
|
+
shadowIntensity: Math.min(1.2, Math.max(.5, .9 + .2 * mouseInfluence)),
|
|
2540
|
+
borderOpacity: Math.min(1, Math.max(.3, .7 + .1 * mouseInfluence))
|
|
2544
2541
|
};
|
|
2545
2542
|
if ("object" == typeof overLight && null !== overLight) {
|
|
2546
2543
|
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 = {
|
|
2547
2544
|
...baseConfig,
|
|
2548
2545
|
threshold: validatedThreshold,
|
|
2549
2546
|
opacity: validatedOpacity * hoverIntensity * activeIntensity,
|
|
2550
|
-
contrast: validatedContrast + .
|
|
2551
|
-
brightness: validatedBrightness + .
|
|
2552
|
-
saturationBoost: validatedSaturationBoost
|
|
2547
|
+
contrast: Math.min(1.6, validatedContrast + .1 * mouseInfluence),
|
|
2548
|
+
brightness: Math.min(1.1, validatedBrightness + .05 * mouseInfluence),
|
|
2549
|
+
saturationBoost: validatedSaturationBoost
|
|
2553
2550
|
};
|
|
2554
2551
|
// Validate and apply object config values with proper clamping
|
|
2555
2552
|
return "undefined" == typeof process || process.env, finalConfig;
|
|
@@ -2683,19 +2680,19 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2683
2680
|
debugOverLight: debugOverLight,
|
|
2684
2681
|
enablePerformanceMonitoring: enablePerformanceMonitoring,
|
|
2685
2682
|
children: children
|
|
2686
|
-
}), isOverLight = overLightConfig
|
|
2683
|
+
}), isOverLight = React.useMemo((() => overLightConfig?.isOverLight), [ overLight ]), shouldRenderOverLightLayers = enableOverLightLayers && isOverLight, baseStyle = {
|
|
2687
2684
|
...style,
|
|
2688
|
-
|
|
2685
|
+
...!effectiveDisableEffects && {
|
|
2689
2686
|
transform: transformStyle
|
|
2690
2687
|
}
|
|
2691
|
-
}, 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 = {
|
|
2688
|
+
}, 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 = React.useMemo((() => ({
|
|
2692
2689
|
position: style.position || "absolute",
|
|
2693
2690
|
top: style.top || 0,
|
|
2694
2691
|
left: style.left || 0
|
|
2695
|
-
}, adjustedSize = {
|
|
2692
|
+
})), [ style.position, style.top, style.left ]), adjustedSize = React.useMemo((() => ({
|
|
2696
2693
|
width: "fixed" !== style.position ? "100%" : style.width ? style.width : Math.max(glassSize.width, 0),
|
|
2697
2694
|
height: "fixed" !== style.position ? "100%" : style.height ? style.height : Math.max(glassSize.height, 0)
|
|
2698
|
-
}, gradientValues = React.useMemo((() => {
|
|
2695
|
+
})), [ style.position, style.width, style.height, glassSize.width, glassSize.height ]), gradientValues = React.useMemo((() => {
|
|
2699
2696
|
const mx = mouseOffset.x, my = mouseOffset.y, absMx = Math.abs(mx), absMy = Math.abs(my), GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT;
|
|
2700
2697
|
return {
|
|
2701
2698
|
borderGradientAngle: GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER,
|
|
@@ -2735,7 +2732,7 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2735
2732
|
over: isOverLight ? 1.1 * (overLightOpacity || .4) : 0
|
|
2736
2733
|
};
|
|
2737
2734
|
}), [ isHovered, isActive, isOverLight, overLightConfig.opacity ]), glassVars = React.useMemo((() => {
|
|
2738
|
-
const whiteColor =
|
|
2735
|
+
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;
|
|
2739
2736
|
return {
|
|
2740
2737
|
"--atomix-glass-radius": `${effectiveCornerRadius}px`,
|
|
2741
2738
|
"--atomix-glass-transform": transformStyle || "none",
|
|
@@ -2746,20 +2743,20 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2746
2743
|
"--atomix-glass-height": "fixed" !== style.position ? adjustedSize.height : `${adjustedSize.height}px`,
|
|
2747
2744
|
"--atomix-glass-border-width": "var(--atomix-spacing-0-5, 0.09375rem)",
|
|
2748
2745
|
"--atomix-glass-blend-mode": isOverLight ? "multiply" : "overlay",
|
|
2749
|
-
"--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%)`,
|
|
2750
|
-
"--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%)`,
|
|
2746
|
+
"--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%)`,
|
|
2747
|
+
"--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%)`,
|
|
2751
2748
|
"--atomix-glass-hover-1-opacity": opacityValues.hover1,
|
|
2752
|
-
"--atomix-glass-hover-1-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover1.x}% ${hoverPositions.hover1.y}%, rgba(
|
|
2749
|
+
"--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}%)`,
|
|
2753
2750
|
"--atomix-glass-hover-2-opacity": opacityValues.hover2,
|
|
2754
|
-
"--atomix-glass-hover-2-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover2.x}% ${hoverPositions.hover2.y}%, rgba(
|
|
2751
|
+
"--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}%)`,
|
|
2755
2752
|
"--atomix-glass-hover-3-opacity": opacityValues.hover3,
|
|
2756
|
-
"--atomix-glass-hover-3-gradient": isOverLight ? `radial-gradient(circle at ${hoverPositions.hover3.x}% ${hoverPositions.hover3.y}%, rgba(
|
|
2753
|
+
"--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}%)`,
|
|
2757
2754
|
"--atomix-glass-base-opacity": opacityValues.base,
|
|
2758
|
-
"--atomix-glass-base-gradient": isOverLight ? `linear-gradient(${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.ANGLE}deg, rgba(
|
|
2755
|
+
"--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})`,
|
|
2759
2756
|
"--atomix-glass-overlay-opacity": opacityValues.over,
|
|
2760
|
-
"--atomix-glass-overlay-gradient": isOverLight ? `radial-gradient(circle at ${basePosition.x}% ${basePosition.y}%, rgba(
|
|
2757
|
+
"--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})`
|
|
2761
2758
|
};
|
|
2762
|
-
}), [ gradientValues, opacityValues, effectiveCornerRadius, transformStyle, positionStyles, adjustedSize, style.position, isOverLight ]), renderBackgroundLayer = layerType => jsxRuntime.jsx("div", {
|
|
2759
|
+
}), [ gradientValues, opacityValues, effectiveCornerRadius, transformStyle, positionStyles, adjustedSize, style.position, isOverLight, overLightConfig.borderOpacity ]), renderBackgroundLayer = layerType => jsxRuntime.jsx("div", {
|
|
2763
2760
|
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(" "),
|
|
2764
2761
|
style: {
|
|
2765
2762
|
...positionStyles,
|
|
@@ -2785,9 +2782,9 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2785
2782
|
className: className,
|
|
2786
2783
|
style: baseStyle,
|
|
2787
2784
|
cornerRadius: effectiveCornerRadius,
|
|
2788
|
-
displacementScale: effectiveDisableEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT :
|
|
2785
|
+
displacementScale: effectiveDisableEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT : isOverLight ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.OVER_LIGHT_DISPLACEMENT : displacementScale,
|
|
2789
2786
|
blurAmount: effectiveDisableEffects ? 0 : blurAmount,
|
|
2790
|
-
saturation: effectiveHighContrast ? ATOMIX_GLASS.CONSTANTS.SATURATION.HIGH_CONTRAST :
|
|
2787
|
+
saturation: effectiveHighContrast ? ATOMIX_GLASS.CONSTANTS.SATURATION.HIGH_CONTRAST : isOverLight ? saturation * overLightConfig.saturationBoost : saturation,
|
|
2791
2788
|
aberrationIntensity: effectiveDisableEffects ? 0 : "shader" === mode ? aberrationIntensity * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_ABERRATION : aberrationIntensity,
|
|
2792
2789
|
glassSize: glassSize,
|
|
2793
2790
|
padding: padding,
|
|
@@ -2803,10 +2800,15 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2803
2800
|
onMouseLeave: handleMouseLeave,
|
|
2804
2801
|
onMouseDown: handleMouseDown,
|
|
2805
2802
|
onMouseUp: handleMouseUp,
|
|
2806
|
-
active: isActive,
|
|
2807
2803
|
isHovered: isHovered,
|
|
2808
2804
|
isActive: isActive,
|
|
2809
|
-
overLight:
|
|
2805
|
+
overLight: isOverLight,
|
|
2806
|
+
overLightConfig: {
|
|
2807
|
+
contrast: overLightConfig.contrast,
|
|
2808
|
+
brightness: overLightConfig.brightness,
|
|
2809
|
+
shadowIntensity: overLightConfig.shadowIntensity,
|
|
2810
|
+
borderOpacity: overLightConfig.borderOpacity
|
|
2811
|
+
},
|
|
2810
2812
|
onClick: onClick,
|
|
2811
2813
|
mode: mode,
|
|
2812
2814
|
transform: baseStyle.transform,
|
|
@@ -3144,7 +3146,11 @@ const AtomixLogo = ({height: height = 24, width: width = 24, color: color = "cur
|
|
|
3144
3146
|
// Add input validation
|
|
3145
3147
|
"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;
|
|
3146
3148
|
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));
|
|
3147
|
-
}
|
|
3149
|
+
},
|
|
3150
|
+
// Aliases for compatibility
|
|
3151
|
+
plasma: (uv, mousePosition) => fragmentShaders.premiumGlass(uv, mousePosition),
|
|
3152
|
+
waves: (uv, mousePosition) => fragmentShaders.liquidMetal(uv, mousePosition),
|
|
3153
|
+
noise: (uv, mousePosition) => fragmentShaders.appleFluid(uv, mousePosition)
|
|
3148
3154
|
};
|
|
3149
3155
|
|
|
3150
3156
|
// Adapted from https://github.com/shuding/liquid-glass
|
|
@@ -3538,46 +3544,12 @@ const Breadcrumb = React.memo((({items: items, divider: divider, className: cla
|
|
|
3538
3544
|
});
|
|
3539
3545
|
}));
|
|
3540
3546
|
|
|
3541
|
-
/**
|
|
3542
|
-
* Button state and functionality
|
|
3543
|
-
* @param initialProps - Initial button properties
|
|
3544
|
-
* @returns Button state and methods
|
|
3545
|
-
*/
|
|
3546
|
-
function useButton(initialProps) {
|
|
3547
|
-
// Default button properties
|
|
3548
|
-
const defaultProps = {
|
|
3549
|
-
variant: "primary",
|
|
3550
|
-
size: "md",
|
|
3551
|
-
disabled: !1,
|
|
3552
|
-
rounded: !1,
|
|
3553
|
-
loading: !1,
|
|
3554
|
-
fullWidth: !1,
|
|
3555
|
-
block: !1,
|
|
3556
|
-
active: !1,
|
|
3557
|
-
selected: !1,
|
|
3558
|
-
...initialProps
|
|
3559
|
-
};
|
|
3560
|
-
/**
|
|
3561
|
-
* Generate button class based on properties
|
|
3562
|
-
* @param props - Button properties
|
|
3563
|
-
* @returns Class string
|
|
3564
|
-
*/ return {
|
|
3565
|
-
defaultProps: defaultProps,
|
|
3566
|
-
generateButtonClass: props => {
|
|
3567
|
-
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 : "";
|
|
3568
|
-
return [ BUTTON.BASE_CLASS, `c-btn--${variant}`, sizeClass, iconOnlyClass, roundedClass, disabledClass, glassClass, loadingClass, fullWidthClass, blockClass, activeClass, selectedClass, className ].filter(Boolean).join(" ");
|
|
3569
|
-
},
|
|
3570
|
-
handleClick: handler => event => {
|
|
3571
|
-
defaultProps.disabled || defaultProps.loading || !handler || handler(event);
|
|
3572
|
-
}
|
|
3573
|
-
};
|
|
3574
|
-
}
|
|
3575
|
-
|
|
3576
3547
|
/**
|
|
3577
3548
|
* Spinner state and functionality
|
|
3578
3549
|
* @param initialProps - Initial spinner properties
|
|
3579
3550
|
* @returns Spinner state and methods
|
|
3580
|
-
*/
|
|
3551
|
+
*/
|
|
3552
|
+
function useSpinner(initialProps) {
|
|
3581
3553
|
// Default spinner properties
|
|
3582
3554
|
const defaultProps = {
|
|
3583
3555
|
variant: "primary",
|
|
@@ -3734,21 +3706,7 @@ const Button = React__default.default.memo( React.forwardRef((({label: label, c
|
|
|
3734
3706
|
const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = iconName ? jsxRuntime.jsx(Icon, {
|
|
3735
3707
|
name: iconName,
|
|
3736
3708
|
size: iconSize
|
|
3737
|
-
}) : icon
|
|
3738
|
-
// Determine if we should render as a link
|
|
3739
|
-
useButton({
|
|
3740
|
-
variant: variant,
|
|
3741
|
-
size: size,
|
|
3742
|
-
disabled: isDisabled,
|
|
3743
|
-
rounded: rounded,
|
|
3744
|
-
glass: glass,
|
|
3745
|
-
loading: loading,
|
|
3746
|
-
fullWidth: fullWidth,
|
|
3747
|
-
block: block,
|
|
3748
|
-
active: active,
|
|
3749
|
-
selected: selected
|
|
3750
|
-
});
|
|
3751
|
-
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 = React.useCallback((event => {
|
|
3709
|
+
}) : 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 = React.useCallback((event => {
|
|
3752
3710
|
isDisabled ? event.preventDefault() : onClick?.(event);
|
|
3753
3711
|
}), [ isDisabled, onClick ]), handleMouseEnter = React.useCallback((event => {
|
|
3754
3712
|
isDisabled || onHover?.(event);
|
|
@@ -3756,7 +3714,7 @@ const Button = React__default.default.memo( React.forwardRef((({label: label, c
|
|
|
3756
3714
|
isDisabled || onFocus?.(event);
|
|
3757
3715
|
}), [ isDisabled, onFocus ]), handleBlurEvent = React.useCallback((event => {
|
|
3758
3716
|
isDisabled || onBlur?.(event);
|
|
3759
|
-
}), [ isDisabled, onBlur ]), buttonText = loading && loadingText ? loadingText : label || children, spinnerSize = "sm" === size ? "sm" : "lg" === size ? "md" : "sm", buttonContent = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3717
|
+
}), [ 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 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3760
3718
|
children: [ loading && jsxRuntime.jsx("span", {
|
|
3761
3719
|
className: ThemeNaming.bemClass(THEME_NAMING.BUTTON_PREFIX, THEME_NAMING.SPINNER_ELEMENT),
|
|
3762
3720
|
"aria-hidden": "true",
|
|
@@ -3773,80 +3731,77 @@ const Button = React__default.default.memo( React.forwardRef((({label: label, c
|
|
|
3773
3731
|
children: buttonText
|
|
3774
3732
|
}) ]
|
|
3775
3733
|
}), buttonProps = {
|
|
3776
|
-
ref: ref,
|
|
3777
3734
|
className: buttonClass,
|
|
3778
|
-
type: "button" !== Component || shouldRenderAsLink ? void 0 : type,
|
|
3779
3735
|
onClick: handleClickEvent,
|
|
3780
3736
|
onMouseEnter: onHover ? handleMouseEnter : void 0,
|
|
3781
3737
|
onFocus: onFocus ? handleFocusEvent : void 0,
|
|
3782
3738
|
onBlur: onBlur ? handleBlurEvent : void 0,
|
|
3783
|
-
disabled: isDisabled && "button" === Component && !shouldRenderAsLink,
|
|
3784
3739
|
"aria-disabled": isDisabled,
|
|
3785
3740
|
"aria-busy": loading,
|
|
3786
|
-
"aria-label":
|
|
3741
|
+
"aria-label": safeAriaLabel,
|
|
3787
3742
|
"aria-describedby": ariaDescribedBy,
|
|
3788
3743
|
"aria-expanded": ariaExpanded,
|
|
3789
3744
|
"aria-controls": ariaControls,
|
|
3790
3745
|
tabIndex: void 0 !== tabIndex ? tabIndex : isDisabled ? -1 : 0,
|
|
3791
3746
|
style: style,
|
|
3792
3747
|
...props
|
|
3793
|
-
}, defaultGlassProps = {
|
|
3794
|
-
displacementScale: 20,
|
|
3795
|
-
blurAmount: 0,
|
|
3796
|
-
saturation: 200,
|
|
3797
|
-
elasticity: 0
|
|
3798
|
-
}, glassProps = !0 === glass ? defaultGlassProps : {
|
|
3799
|
-
...defaultGlassProps,
|
|
3800
|
-
...glass
|
|
3801
3748
|
};
|
|
3802
|
-
//
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
...anchorButtonProps,
|
|
3814
|
-
ref: ref,
|
|
3815
|
-
href: href,
|
|
3816
|
-
target: target,
|
|
3817
|
-
rel: "_blank" === target ? "noopener noreferrer" : void 0
|
|
3818
|
-
}, linkElement = jsxRuntime.jsx(LinkComp, {
|
|
3819
|
-
...linkProps,
|
|
3820
|
-
children: buttonContent
|
|
3821
|
-
});
|
|
3822
|
-
return glass ? jsxRuntime.jsx(AtomixGlass, {
|
|
3823
|
-
...glassProps,
|
|
3824
|
-
children: linkElement
|
|
3825
|
-
}) : linkElement;
|
|
3826
|
-
}
|
|
3827
|
-
// Fallback to regular anchor tag
|
|
3828
|
-
const anchorElement = jsxRuntime.jsx("a", {
|
|
3829
|
-
...anchorButtonProps,
|
|
3749
|
+
// Determine if we should render as a link
|
|
3750
|
+
// If disabled, we still check href, but we might want to render as button or anchor with aria-disabled
|
|
3751
|
+
// The previous logic was Boolean(href && !isDisabled). This meant if disabled, it renders as <button>.
|
|
3752
|
+
// This is a safe fallback for disabled links.
|
|
3753
|
+
let content;
|
|
3754
|
+
// Render as anchor if href is provided
|
|
3755
|
+
if (shouldRenderAsLink)
|
|
3756
|
+
// Use custom LinkComponent if provided (e.g., Next.js Link)
|
|
3757
|
+
if (LinkComponent) {
|
|
3758
|
+
const LinkComp = LinkComponent, linkProps = {
|
|
3759
|
+
...buttonProps,
|
|
3830
3760
|
ref: ref,
|
|
3761
|
+
// LinkComponent usually forwards ref to anchor
|
|
3831
3762
|
href: href,
|
|
3832
3763
|
target: target,
|
|
3833
|
-
rel: "_blank" === target ? "noopener noreferrer" : void 0
|
|
3764
|
+
rel: "_blank" === target ? "noopener noreferrer" : void 0
|
|
3765
|
+
};
|
|
3766
|
+
content = jsxRuntime.jsx(LinkComp, {
|
|
3767
|
+
...linkProps,
|
|
3834
3768
|
children: buttonContent
|
|
3835
3769
|
});
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3770
|
+
} else
|
|
3771
|
+
// Fallback to regular anchor tag
|
|
3772
|
+
content = jsxRuntime.jsx("a", {
|
|
3773
|
+
...buttonProps,
|
|
3774
|
+
ref: ref,
|
|
3775
|
+
href: href,
|
|
3776
|
+
target: target,
|
|
3777
|
+
rel: "_blank" === target ? "noopener noreferrer" : void 0,
|
|
3778
|
+
children: buttonContent
|
|
3779
|
+
}); else
|
|
3841
3780
|
// Default button rendering
|
|
3842
|
-
|
|
3781
|
+
content = jsxRuntime.jsx(Component, {
|
|
3843
3782
|
...buttonProps,
|
|
3783
|
+
ref: ref,
|
|
3784
|
+
type: "button" === Component ? type : void 0,
|
|
3785
|
+
disabled: isDisabled,
|
|
3844
3786
|
children: buttonContent
|
|
3845
3787
|
});
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3788
|
+
if (glass) {
|
|
3789
|
+
// Default glass props
|
|
3790
|
+
const defaultGlassProps = {
|
|
3791
|
+
displacementScale: 20,
|
|
3792
|
+
blurAmount: 0,
|
|
3793
|
+
saturation: 200,
|
|
3794
|
+
elasticity: 0
|
|
3795
|
+
}, glassProps = !0 === glass ? defaultGlassProps : {
|
|
3796
|
+
...defaultGlassProps,
|
|
3797
|
+
...glass
|
|
3798
|
+
};
|
|
3799
|
+
return jsxRuntime.jsx(AtomixGlass, {
|
|
3800
|
+
...glassProps,
|
|
3801
|
+
children: content
|
|
3802
|
+
});
|
|
3803
|
+
}
|
|
3804
|
+
return content;
|
|
3850
3805
|
})));
|
|
3851
3806
|
|
|
3852
3807
|
Button.displayName = "Button";
|
|
@@ -8895,6 +8850,22 @@ const WaterfallChart = React.memo( React.forwardRef((({waterfallData: waterfall
|
|
|
8895
8850
|
});
|
|
8896
8851
|
})));
|
|
8897
8852
|
|
|
8853
|
+
/**
|
|
8854
|
+
* CSV Utility Functions
|
|
8855
|
+
*/
|
|
8856
|
+
/**
|
|
8857
|
+
* Sanitize cell content to prevent CSV injection
|
|
8858
|
+
*
|
|
8859
|
+
* Replaces newlines and tabs with spaces, escapes double quotes,
|
|
8860
|
+
* and prefixes dangerous characters (=, +, -, @) with a single quote
|
|
8861
|
+
* to prevent formula injection.
|
|
8862
|
+
*/
|
|
8863
|
+
function sanitizeCSVCell(cell) {
|
|
8864
|
+
const sanitized = String(cell ?? "").replace(/[\r\n\t]/g, " ").replace(/"/g, '""');
|
|
8865
|
+
// Prevent formula injection by prefixing dangerous characters
|
|
8866
|
+
return /^[=+\-@]/.test(sanitized) ? `'${sanitized}` : sanitized;
|
|
8867
|
+
}
|
|
8868
|
+
|
|
8898
8869
|
WaterfallChart.displayName = "WaterfallChart";
|
|
8899
8870
|
|
|
8900
8871
|
const SIZE_MAP = {
|
|
@@ -9096,29 +9067,40 @@ function getRowId$1(row, rowKey) {
|
|
|
9096
9067
|
} // Reset to first page when filtering
|
|
9097
9068
|
), []), clearColumnFilters = React.useCallback((() => {
|
|
9098
9069
|
setColumnFilterValues({}), setCurrentPage(1);
|
|
9099
|
-
}), []),
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9070
|
+
}), []), activeColumnFilters = React.useMemo((() => columnFilters ? Object.entries(columnFilterValues).filter((([, value]) => null != value && "" !== value)).map((([columnKey, value]) => {
|
|
9071
|
+
const column = columns.find((col => col.key === columnKey));
|
|
9072
|
+
return column && column.filterable ? {
|
|
9073
|
+
key: columnKey,
|
|
9074
|
+
value: value,
|
|
9075
|
+
lowercaseValue: "string" == typeof value ? value.toLowerCase() : String(value).toLowerCase(),
|
|
9076
|
+
column: column
|
|
9077
|
+
} : null;
|
|
9078
|
+
})).filter((f => null !== f)) : []), [ columnFilters, columnFilterValues, columns ]), filteredData = React.useMemo((() => {
|
|
9079
|
+
if (!searchQuery && 0 === activeColumnFilters.length) return data;
|
|
9080
|
+
const lowercaseQuery = searchQuery ? searchQuery.toLowerCase() : "";
|
|
9081
|
+
return data.filter((row => {
|
|
9082
|
+
// Apply global search
|
|
9083
|
+
if (searchQuery && !visibleColumns.some((column => {
|
|
9105
9084
|
var _context;
|
|
9106
9085
|
const value = row[column.key];
|
|
9107
9086
|
return null != value && _includesInstanceProperty(_context = String(value).toLowerCase()).call(_context, lowercaseQuery);
|
|
9108
|
-
})))
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9087
|
+
}))) return !1;
|
|
9088
|
+
// Apply column-specific filters
|
|
9089
|
+
for (let i = 0; i < activeColumnFilters.length; i++) {
|
|
9090
|
+
const filter = activeColumnFilters[i];
|
|
9091
|
+
if (!filter) continue;
|
|
9092
|
+
const {key: key, value: value, lowercaseValue: lowercaseValue, column: column} = filter, cellValue = row[key];
|
|
9093
|
+
if (null == cellValue) return !1;
|
|
9094
|
+
// Use custom filter function if provided
|
|
9095
|
+
var _context2;
|
|
9096
|
+
// Default text filter
|
|
9097
|
+
if (column.filterFunction) {
|
|
9098
|
+
if (!column.filterFunction(cellValue, value)) return !1;
|
|
9099
|
+
} else if (!_includesInstanceProperty(_context2 = String(cellValue).toLowerCase()).call(_context2, lowercaseValue)) return !1;
|
|
9100
|
+
}
|
|
9101
|
+
return !0;
|
|
9102
|
+
}));
|
|
9103
|
+
}), [ data, visibleColumns, searchQuery, activeColumnFilters ]), sortedData = React.useMemo((() => sortConfig && sortable ? [ ...filteredData ].sort(((a, b) => {
|
|
9122
9104
|
const aValue = a[sortConfig.key], bValue = b[sortConfig.key];
|
|
9123
9105
|
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;
|
|
9124
9106
|
})) : filteredData), [ filteredData, sortConfig, sortable ]), paginatedData = React.useMemo((() => {
|
|
@@ -9396,76 +9378,56 @@ const range = (start, end) => {
|
|
|
9396
9378
|
|
|
9397
9379
|
Pagination.displayName = "Pagination", PaginationNavButton.displayName = "PaginationNavButton";
|
|
9398
9380
|
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
defaultProps: defaultProps,
|
|
9419
|
-
generateCheckboxClass: props => {
|
|
9420
|
-
const {disabled: disabled = defaultProps.disabled, invalid: invalid = defaultProps.invalid, valid: valid = defaultProps.valid, indeterminate: indeterminate = defaultProps.indeterminate, className: className = ""} = props;
|
|
9421
|
-
let validationClass = "";
|
|
9422
|
-
return invalid ? validationClass = "is-error" : valid && (validationClass = "is-valid"),
|
|
9423
|
-
`c-checkbox ${validationClass} ${disabled ? "is-disabled" : ""} ${indeterminate ? "c-checkbox--mixed" : ""} ${className}`.trim();
|
|
9424
|
-
},
|
|
9425
|
-
checkboxRef: checkboxRef
|
|
9426
|
-
};
|
|
9427
|
-
}
|
|
9428
|
-
|
|
9429
|
-
/**
|
|
9430
|
-
* Checkbox - A component for checkbox inputs
|
|
9431
|
-
*/ const Checkbox = React.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}) => {
|
|
9432
|
-
const {generateCheckboxClass: generateCheckboxClass, checkboxRef: checkboxRef} = useCheckbox({
|
|
9433
|
-
indeterminate: indeterminate,
|
|
9434
|
-
disabled: disabled,
|
|
9435
|
-
invalid: invalid,
|
|
9436
|
-
valid: valid
|
|
9437
|
-
}), checkboxClass = generateCheckboxClass({
|
|
9438
|
-
className: `${className} ${glass ? "c-checkbox--glass" : ""}`.trim(),
|
|
9381
|
+
const Checkbox = React__default.default.memo( React.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) => {
|
|
9382
|
+
// Local ref to handle indeterminate state
|
|
9383
|
+
const localRef = React.useRef(null);
|
|
9384
|
+
// Merge refs
|
|
9385
|
+
React.useImperativeHandle(ref, (() => localRef.current)),
|
|
9386
|
+
// Handle indeterminate
|
|
9387
|
+
React.useEffect((() => {
|
|
9388
|
+
localRef.current && (localRef.current.indeterminate = Boolean(indeterminate));
|
|
9389
|
+
}), [ indeterminate ]);
|
|
9390
|
+
// Generate classes
|
|
9391
|
+
let validationClass = "";
|
|
9392
|
+
invalid ? validationClass = "is-error" : valid && (validationClass = "is-valid");
|
|
9393
|
+
const checkboxClass = `c-checkbox ${validationClass} ${disabled ? "is-disabled" : ""} ${indeterminate ? "c-checkbox--mixed" : ""} ${glass ? "c-checkbox--glass" : ""} ${className}`.trim(), inputElement = jsxRuntime.jsx("input", {
|
|
9394
|
+
ref: localRef,
|
|
9395
|
+
type: "checkbox",
|
|
9396
|
+
className: "c-checkbox__input",
|
|
9397
|
+
checked: checked,
|
|
9398
|
+
onChange: onChange,
|
|
9399
|
+
onClick: onClick,
|
|
9439
9400
|
disabled: disabled,
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9401
|
+
required: required,
|
|
9402
|
+
id: id,
|
|
9403
|
+
name: name,
|
|
9404
|
+
value: value,
|
|
9405
|
+
"aria-label": label ? void 0 : ariaLabel,
|
|
9406
|
+
"aria-describedby": ariaDescribedBy,
|
|
9407
|
+
"aria-invalid": invalid,
|
|
9408
|
+
...props
|
|
9409
|
+
});
|
|
9410
|
+
let content;
|
|
9411
|
+
if (content = id && label ? jsxRuntime.jsxs("div", {
|
|
9444
9412
|
className: checkboxClass,
|
|
9445
9413
|
style: style,
|
|
9446
|
-
children: [ jsxRuntime.jsx("
|
|
9447
|
-
ref: checkboxRef,
|
|
9448
|
-
type: "checkbox",
|
|
9449
|
-
className: "c-checkbox__input",
|
|
9450
|
-
checked: checked,
|
|
9451
|
-
onChange: onChange,
|
|
9452
|
-
onClick: onClick,
|
|
9453
|
-
disabled: disabled,
|
|
9454
|
-
required: required,
|
|
9455
|
-
id: id,
|
|
9456
|
-
name: name,
|
|
9457
|
-
value: value,
|
|
9458
|
-
"aria-label": label ? void 0 : ariaLabel,
|
|
9459
|
-
"aria-describedby": ariaDescribedBy,
|
|
9460
|
-
"aria-invalid": invalid
|
|
9461
|
-
}), label && jsxRuntime.jsx("label", {
|
|
9414
|
+
children: [ inputElement, jsxRuntime.jsx("label", {
|
|
9462
9415
|
className: "c-checkbox__label",
|
|
9463
9416
|
htmlFor: id,
|
|
9464
9417
|
children: label
|
|
9465
9418
|
}) ]
|
|
9466
|
-
})
|
|
9467
|
-
|
|
9468
|
-
|
|
9419
|
+
}) : label ? jsxRuntime.jsxs("label", {
|
|
9420
|
+
className: checkboxClass,
|
|
9421
|
+
style: style,
|
|
9422
|
+
children: [ inputElement, jsxRuntime.jsx("span", {
|
|
9423
|
+
className: "c-checkbox__label",
|
|
9424
|
+
children: label
|
|
9425
|
+
}) ]
|
|
9426
|
+
}) : jsxRuntime.jsx("div", {
|
|
9427
|
+
className: checkboxClass,
|
|
9428
|
+
style: style,
|
|
9429
|
+
children: inputElement
|
|
9430
|
+
}), glass) {
|
|
9469
9431
|
const defaultGlassProps = {
|
|
9470
9432
|
displacementScale: 40,
|
|
9471
9433
|
blurAmount: 1,
|
|
@@ -9479,11 +9441,11 @@ function useCheckbox(initialProps) {
|
|
|
9479
9441
|
};
|
|
9480
9442
|
return jsxRuntime.jsx(AtomixGlass, {
|
|
9481
9443
|
...glassProps,
|
|
9482
|
-
children:
|
|
9444
|
+
children: content
|
|
9483
9445
|
});
|
|
9484
9446
|
}
|
|
9485
|
-
return
|
|
9486
|
-
}));
|
|
9447
|
+
return content;
|
|
9448
|
+
})));
|
|
9487
9449
|
|
|
9488
9450
|
Checkbox.displayName = "Checkbox";
|
|
9489
9451
|
|
|
@@ -9669,18 +9631,6 @@ const DropdownContext = React.createContext({
|
|
|
9669
9631
|
|
|
9670
9632
|
/**
|
|
9671
9633
|
* DropdownItem component for menu items
|
|
9672
|
-
*/
|
|
9673
|
-
/**
|
|
9674
|
-
* Sanitize cell content to prevent CSV injection
|
|
9675
|
-
*/
|
|
9676
|
-
function sanitizeCSVCell(cell) {
|
|
9677
|
-
const sanitized = String(cell ?? "").replace(/[\r\n\t]/g, " ").replace(/"/g, '""');
|
|
9678
|
-
// Prevent formula injection by prefixing dangerous characters
|
|
9679
|
-
return /^[=+\-@]/.test(sanitized) ? `'${sanitized}` : sanitized;
|
|
9680
|
-
}
|
|
9681
|
-
|
|
9682
|
-
/**
|
|
9683
|
-
* Export data as CSV
|
|
9684
9634
|
*/ Dropdown.displayName = "Dropdown", DropdownItem.displayName = "DropdownItem",
|
|
9685
9635
|
DropdownDivider.displayName = "DropdownDivider", DropdownHeader.displayName = "DropdownHeader";
|
|
9686
9636
|
|
|
@@ -9759,7 +9709,11 @@ const DataTable = React.memo((({data: data, columns: columns, className: classN
|
|
|
9759
9709
|
const defaultFilename = filename || "data-table";
|
|
9760
9710
|
switch (format) {
|
|
9761
9711
|
case "csv":
|
|
9762
|
-
!
|
|
9712
|
+
!
|
|
9713
|
+
/**
|
|
9714
|
+
* Export data as CSV
|
|
9715
|
+
*/
|
|
9716
|
+
function(data, columns, filename = "data-table.csv") {
|
|
9763
9717
|
if (!data.length || !columns.length) return;
|
|
9764
9718
|
// Create headers
|
|
9765
9719
|
const headers = columns.map((col => col.title || col.key)), rows = data.map((row => columns.map((col => {
|
|
@@ -11123,6 +11077,8 @@ function useHero(initialProps) {
|
|
|
11123
11077
|
contentWidth: void 0,
|
|
11124
11078
|
parallax: !1,
|
|
11125
11079
|
parallaxIntensity: .5,
|
|
11080
|
+
headingLevel: "h1",
|
|
11081
|
+
reverseOnMobile: !1,
|
|
11126
11082
|
...initialProps
|
|
11127
11083
|
}, hasBackgroundSlider = !!defaultProps.backgroundSlider, backgroundSliderResult =
|
|
11128
11084
|
/**
|
|
@@ -11203,7 +11159,9 @@ function useHero(initialProps) {
|
|
|
11203
11159
|
autoplay: {
|
|
11204
11160
|
delay: 5e3,
|
|
11205
11161
|
pauseOnHover: !0
|
|
11206
|
-
}
|
|
11162
|
+
},
|
|
11163
|
+
transition: "fade",
|
|
11164
|
+
transitionDuration: 1e3
|
|
11207
11165
|
}), 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) => {
|
|
11208
11166
|
if (!element) return;
|
|
11209
11167
|
// Ensure intensity is between 0 and 1
|
|
@@ -11254,13 +11212,20 @@ function useHero(initialProps) {
|
|
|
11254
11212
|
defaultProps.videoBackground && classes.push("c-hero--video"), baseClassName && classes.push(baseClassName),
|
|
11255
11213
|
classes.join(" ");
|
|
11256
11214
|
},
|
|
11257
|
-
generateImageColClass: (size = defaultProps.imageColSize || 7) => {
|
|
11215
|
+
generateImageColClass: (size = defaultProps.imageColSize || 7, customClass) => {
|
|
11258
11216
|
const classes = [ `o-grid__col o-grid__col--md-${size}` ];
|
|
11259
11217
|
// Add responsive margin if needed for mobile view
|
|
11260
11218
|
return "left" === defaultProps.alignment && classes.push("u-mt-5 u-mt-md-0"),
|
|
11261
|
-
|
|
11219
|
+
// Handle mobile stacking order
|
|
11220
|
+
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")),
|
|
11221
|
+
customClass && classes.push(customClass), classes.join(" ");
|
|
11222
|
+
},
|
|
11223
|
+
generateContentColClass: (size = defaultProps.contentColSize || 5, customClass) => {
|
|
11224
|
+
const classes = [ `o-grid__col o-grid__col--md-${size}` ];
|
|
11225
|
+
// Handle mobile stacking order
|
|
11226
|
+
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")),
|
|
11227
|
+
customClass && classes.push(customClass), classes.join(" ");
|
|
11262
11228
|
},
|
|
11263
|
-
generateContentColClass: (size = defaultProps.contentColSize || 5) => `o-grid__col o-grid__col--md-${size}`,
|
|
11264
11229
|
hasBackgroundImage: hasBackgroundImage,
|
|
11265
11230
|
hasForegroundImage: hasForegroundImage,
|
|
11266
11231
|
useGridLayout: useGridLayout,
|
|
@@ -12474,6 +12439,8 @@ function useSlider(options) {
|
|
|
12474
12439
|
}
|
|
12475
12440
|
|
|
12476
12441
|
// Button composables
|
|
12442
|
+
// export * from './useButton';
|
|
12443
|
+
// Accordion composables
|
|
12477
12444
|
var composablesImport = Object.freeze({
|
|
12478
12445
|
__proto__: null,
|
|
12479
12446
|
DOTS: "...",
|
|
@@ -12483,12 +12450,10 @@ var composablesImport = Object.freeze({
|
|
|
12483
12450
|
useBarChart: useBarChart,
|
|
12484
12451
|
useBlock: useBlock,
|
|
12485
12452
|
useBreadcrumb: useBreadcrumb,
|
|
12486
|
-
useButton: useButton,
|
|
12487
12453
|
useCard: useCard,
|
|
12488
12454
|
useChartData: useChartData,
|
|
12489
12455
|
useChartInteraction: useChartInteraction,
|
|
12490
12456
|
useChartScale: useChartScale,
|
|
12491
|
-
useCheckbox: useCheckbox,
|
|
12492
12457
|
useDataTable: useDataTable,
|
|
12493
12458
|
useEdgePanel: useEdgePanel,
|
|
12494
12459
|
useForm: useForm,
|
|
@@ -13532,12 +13497,14 @@ const FooterLink = React.forwardRef((({href: href, icon: icon, external: extern
|
|
|
13532
13497
|
|
|
13533
13498
|
FooterLink.displayName = "FooterLink";
|
|
13534
13499
|
|
|
13535
|
-
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 = {
|
|
13500
|
+
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 = {
|
|
13536
13501
|
autoplay: !0,
|
|
13537
13502
|
loop: !0,
|
|
13538
13503
|
muted: !0
|
|
13539
|
-
}, backgroundSlider: backgroundSlider}) => {
|
|
13540
|
-
|
|
13504
|
+
}, backgroundSlider: backgroundSlider, headingLevel: headingLevel = "h1", reverseOnMobile: reverseOnMobile = !1, parts: parts, ...rest}) => {
|
|
13505
|
+
// Define dynamic heading tag
|
|
13506
|
+
const HeadingTag = headingLevel, {generateHeroClassNames: generateHeroClassNames, generateImageColClass: generateImageColClass, generateContentColClass: generateContentColClass, hasBackgroundImage: hasBackgroundImage, hasForegroundImage: hasForegroundImage, useGridLayout: useGridLayout, heroRef: heroRef, videoRef: videoRef, backgroundSlider: sliderHook, hasBackgroundSlider: hasBackgroundSlider} = useHero({
|
|
13507
|
+
title: title,
|
|
13541
13508
|
alignment: alignment,
|
|
13542
13509
|
imageColSize: imageColSize,
|
|
13543
13510
|
contentColSize: contentColSize,
|
|
@@ -13549,7 +13516,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13549
13516
|
parallax: parallax,
|
|
13550
13517
|
parallaxIntensity: parallaxIntensity,
|
|
13551
13518
|
videoBackground: videoBackground,
|
|
13552
|
-
backgroundSlider: backgroundSlider
|
|
13519
|
+
backgroundSlider: backgroundSlider,
|
|
13520
|
+
reverseOnMobile: reverseOnMobile
|
|
13553
13521
|
}), heroStyle = {
|
|
13554
13522
|
...contentWidth ? {
|
|
13555
13523
|
"--atomix-hero-content-width": contentWidth
|
|
@@ -13573,18 +13541,23 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13573
13541
|
});
|
|
13574
13542
|
}, renderContent = () => {
|
|
13575
13543
|
const content = jsxRuntime.jsxs("div", {
|
|
13576
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13544
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13545
|
+
style: parts?.content?.style,
|
|
13577
13546
|
children: [ subtitle && jsxRuntime.jsx("p", {
|
|
13578
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13547
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13548
|
+
style: parts?.subtitle?.style,
|
|
13579
13549
|
children: subtitle
|
|
13580
|
-
}), jsxRuntime.jsx(
|
|
13581
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13550
|
+
}), jsxRuntime.jsx(HeadingTag, {
|
|
13551
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13552
|
+
style: parts?.title?.style,
|
|
13582
13553
|
children: title
|
|
13583
13554
|
}), text && jsxRuntime.jsx("p", {
|
|
13584
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13555
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13556
|
+
style: parts?.text?.style,
|
|
13585
13557
|
children: text
|
|
13586
13558
|
}), actions && jsxRuntime.jsx("div", {
|
|
13587
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13559
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13560
|
+
style: parts?.actions?.style,
|
|
13588
13561
|
children: actions
|
|
13589
13562
|
}) ]
|
|
13590
13563
|
});
|
|
@@ -13594,7 +13567,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13594
13567
|
glass ?
|
|
13595
13568
|
// If glass is true, use default glass props
|
|
13596
13569
|
!0 === glass ? jsxRuntime.jsx("div", {
|
|
13597
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13570
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13571
|
+
style: parts?.content?.style,
|
|
13598
13572
|
children: jsxRuntime.jsx(AtomixGlass, {
|
|
13599
13573
|
displacementScale: 60,
|
|
13600
13574
|
blurAmount: 3,
|
|
@@ -13606,71 +13580,93 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13606
13580
|
children: jsxRuntime.jsxs("div", {
|
|
13607
13581
|
className: "u-p-4",
|
|
13608
13582
|
children: [ subtitle && jsxRuntime.jsx("p", {
|
|
13609
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13583
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13584
|
+
style: parts?.subtitle?.style,
|
|
13610
13585
|
children: subtitle
|
|
13611
|
-
}), jsxRuntime.jsx(
|
|
13612
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13586
|
+
}), jsxRuntime.jsx(HeadingTag, {
|
|
13587
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13588
|
+
style: parts?.title?.style,
|
|
13613
13589
|
children: title
|
|
13614
13590
|
}), text && jsxRuntime.jsx("p", {
|
|
13615
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13591
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13592
|
+
style: parts?.text?.style,
|
|
13616
13593
|
children: text
|
|
13617
13594
|
}), actions && jsxRuntime.jsx("div", {
|
|
13618
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13595
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13596
|
+
style: parts?.actions?.style,
|
|
13619
13597
|
children: actions
|
|
13620
13598
|
}) ]
|
|
13621
13599
|
})
|
|
13622
13600
|
})
|
|
13623
13601
|
}) : jsxRuntime.jsx("div", {
|
|
13624
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13602
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13603
|
+
style: parts?.content?.style,
|
|
13625
13604
|
children: jsxRuntime.jsx(AtomixGlass, {
|
|
13626
13605
|
...glass,
|
|
13627
13606
|
children: jsxRuntime.jsxs("div", {
|
|
13628
13607
|
className: "u-p-4",
|
|
13629
13608
|
children: [ subtitle && jsxRuntime.jsx("p", {
|
|
13630
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13609
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13610
|
+
style: parts?.subtitle?.style,
|
|
13631
13611
|
children: subtitle
|
|
13632
|
-
}), jsxRuntime.jsx(
|
|
13633
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13612
|
+
}), jsxRuntime.jsx(HeadingTag, {
|
|
13613
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13614
|
+
style: parts?.title?.style,
|
|
13634
13615
|
children: title
|
|
13635
13616
|
}), text && jsxRuntime.jsx("p", {
|
|
13636
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13617
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13618
|
+
style: parts?.text?.style,
|
|
13637
13619
|
children: text
|
|
13638
13620
|
}), actions && jsxRuntime.jsx("div", {
|
|
13639
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13621
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13622
|
+
style: parts?.actions?.style,
|
|
13640
13623
|
children: actions
|
|
13641
13624
|
}) ]
|
|
13642
13625
|
})
|
|
13643
13626
|
})
|
|
13644
13627
|
}) : content;
|
|
13645
13628
|
}, renderForegroundImage = () => hasForegroundImage ? "center" === alignment ? jsxRuntime.jsx("div", {
|
|
13646
|
-
className: HERO.SELECTORS.IMAGE_WRAPPER.replace(".", ""),
|
|
13629
|
+
className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${imageColClassName || ""} ${parts?.imageWrapper?.className || ""}`.trim(),
|
|
13630
|
+
style: {
|
|
13631
|
+
...imageColStyle,
|
|
13632
|
+
...parts?.imageWrapper?.style
|
|
13633
|
+
},
|
|
13647
13634
|
children: jsxRuntime.jsx("img", {
|
|
13648
13635
|
src: imageSrc,
|
|
13649
13636
|
alt: imageAlt,
|
|
13650
|
-
className: HERO.SELECTORS.IMAGE.replace(".", "")
|
|
13637
|
+
className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${parts?.image?.className || ""}`.trim(),
|
|
13638
|
+
style: parts?.image?.style
|
|
13651
13639
|
})
|
|
13652
13640
|
}) : jsxRuntime.jsx("div", {
|
|
13653
|
-
className: generateImageColClass(),
|
|
13641
|
+
className: `${generateImageColClass(imageColSize, imageColClassName)} ${parts?.imageWrapper?.className || ""}`.trim(),
|
|
13642
|
+
style: {
|
|
13643
|
+
...imageColStyle,
|
|
13644
|
+
...parts?.imageWrapper?.style
|
|
13645
|
+
},
|
|
13654
13646
|
children: jsxRuntime.jsx("img", {
|
|
13655
13647
|
src: imageSrc,
|
|
13656
13648
|
alt: imageAlt,
|
|
13657
|
-
className: HERO.SELECTORS.IMAGE.replace(".", "")
|
|
13649
|
+
className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${parts?.image?.className || ""}`.trim(),
|
|
13650
|
+
style: parts?.image?.style
|
|
13658
13651
|
})
|
|
13659
13652
|
}) : null;
|
|
13660
|
-
|
|
13661
|
-
return jsxRuntime.jsxs("div", {
|
|
13653
|
+
return jsxRuntime.jsxs("div", {
|
|
13662
13654
|
ref: heroRef,
|
|
13663
|
-
className: generateHeroClassNames(className),
|
|
13664
|
-
style:
|
|
13655
|
+
className: `${generateHeroClassNames(className)} ${parts?.root?.className || ""}`.trim(),
|
|
13656
|
+
style: {
|
|
13657
|
+
...heroStyle,
|
|
13658
|
+
...parts?.root?.style
|
|
13659
|
+
},
|
|
13665
13660
|
"data-parallax": parallax ? "true" : void 0,
|
|
13666
13661
|
"data-parallax-intensity": parallax ? parallaxIntensity : void 0,
|
|
13662
|
+
...rest,
|
|
13667
13663
|
children: [ (() => {
|
|
13668
13664
|
// Render background slider if configured
|
|
13669
13665
|
if (hasBackgroundSlider && backgroundSlider && sliderHook) {
|
|
13670
13666
|
const {slides: slides, transition: transition = "fade", transitionDuration: transitionDuration = 1e3} = backgroundSlider, {currentIndex: currentIndex, slideRefs: slideRefs, videoRefs: videoRefs} = sliderHook;
|
|
13671
13667
|
// Determine transition class
|
|
13672
13668
|
let transitionClass = HERO.CLASSES.SLIDER_FADE;
|
|
13673
|
-
return "slide" === transition
|
|
13669
|
+
return "slide" === transition && (transitionClass = HERO.CLASSES.SLIDER_SLIDE),
|
|
13674
13670
|
jsxRuntime.jsxs("div", {
|
|
13675
13671
|
className: `${HERO.SELECTORS.SLIDER.replace(".", "")} ${transitionClass}`,
|
|
13676
13672
|
style: {
|
|
@@ -13687,57 +13683,68 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13687
13683
|
return jsxRuntime.jsx("div", {
|
|
13688
13684
|
ref: slideRef,
|
|
13689
13685
|
className: `${HERO.SELECTORS.SLIDER_ITEM.replace(".", "")} ${isActive ? HERO.CLASSES.SLIDER_ITEM_ACTIVE : ""}`,
|
|
13690
|
-
|
|
13691
|
-
|
|
13692
|
-
alt: slide.alt || "Background slide",
|
|
13693
|
-
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13694
|
-
}) : jsxRuntime.jsxs("video", {
|
|
13686
|
+
"aria-hidden": !isActive,
|
|
13687
|
+
children: "video" === slide.type ? jsxRuntime.jsxs("video", {
|
|
13695
13688
|
ref: videoRef,
|
|
13696
|
-
className: "c-
|
|
13697
|
-
|
|
13698
|
-
|
|
13699
|
-
muted:
|
|
13689
|
+
className: "c-hero__bg-video",
|
|
13690
|
+
src: slide.src,
|
|
13691
|
+
poster: slide.videoOptions?.posterUrl || slide.alt,
|
|
13692
|
+
muted: slide.videoOptions?.muted ?? !0,
|
|
13693
|
+
loop: slide.videoOptions?.loop ?? !0,
|
|
13700
13694
|
playsInline: !0,
|
|
13701
|
-
|
|
13695
|
+
"aria-hidden": "true",
|
|
13696
|
+
autoPlay: !1 !== slide.videoOptions?.autoplay,
|
|
13702
13697
|
children: [ jsxRuntime.jsx("source", {
|
|
13703
13698
|
src: slide.src,
|
|
13704
13699
|
type: `video/${slide.src.split(".").pop() || "mp4"}`
|
|
13705
13700
|
}), "Your browser does not support the video tag." ]
|
|
13701
|
+
}) : jsxRuntime.jsx("img", {
|
|
13702
|
+
src: slide.src,
|
|
13703
|
+
alt: slide.alt || "Background slide",
|
|
13704
|
+
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13706
13705
|
})
|
|
13707
13706
|
}, index);
|
|
13708
13707
|
})), showOverlay && jsxRuntime.jsx("div", {
|
|
13709
|
-
className: HERO.SELECTORS.OVERLAY.replace(".", "")
|
|
13708
|
+
className: `${HERO.SELECTORS.OVERLAY.replace(".", "")} ${parts?.overlay?.className || ""}`.trim(),
|
|
13709
|
+
style: parts?.overlay?.style
|
|
13710
13710
|
}) ]
|
|
13711
13711
|
});
|
|
13712
13712
|
}
|
|
13713
13713
|
// Fall back to single background image/video
|
|
13714
13714
|
return hasBackgroundImage || videoBackground ? jsxRuntime.jsxs("div", {
|
|
13715
|
-
className: HERO.SELECTORS.BG.replace(".", ""),
|
|
13715
|
+
className: `${HERO.SELECTORS.BG.replace(".", "")} ${parts?.background?.className || ""}`.trim(),
|
|
13716
|
+
style: parts?.background?.style,
|
|
13716
13717
|
children: [ backgroundImageSrc && jsxRuntime.jsx("img", {
|
|
13717
13718
|
src: backgroundImageSrc,
|
|
13718
13719
|
alt: "Background",
|
|
13719
13720
|
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13720
13721
|
}), renderVideoBackground(), showOverlay && jsxRuntime.jsx("div", {
|
|
13721
|
-
className: HERO.SELECTORS.OVERLAY.replace(".", "")
|
|
13722
|
+
className: `${HERO.SELECTORS.OVERLAY.replace(".", "")} ${parts?.overlay?.className || ""}`.trim(),
|
|
13723
|
+
style: parts?.overlay?.style
|
|
13722
13724
|
}) ]
|
|
13723
13725
|
}) : null;
|
|
13724
13726
|
})(), jsxRuntime.jsx("div", {
|
|
13725
|
-
className: `${HERO.SELECTORS.CONTAINER.replace(".", "")} o-container
|
|
13727
|
+
className: `${HERO.SELECTORS.CONTAINER.replace(".", "")} o-container ${parts?.container?.className || ""}`.trim(),
|
|
13728
|
+
style: parts?.container?.style,
|
|
13726
13729
|
children: children ? jsxRuntime.jsx("div", {
|
|
13727
|
-
className: HERO.SELECTORS.GRID.replace(".", ""),
|
|
13730
|
+
className: `${HERO.SELECTORS.GRID.replace(".", "")} ${parts?.grid?.className || ""}`.trim(),
|
|
13731
|
+
style: parts?.grid?.style,
|
|
13728
13732
|
children: children
|
|
13729
13733
|
}) : useGridLayout ? jsxRuntime.jsx("div", {
|
|
13730
|
-
className: `${HERO.SELECTORS.GRID.replace(".", "")} o-grid
|
|
13734
|
+
className: `${HERO.SELECTORS.GRID.replace(".", "")} o-grid ${parts?.grid?.className || ""}`.trim(),
|
|
13735
|
+
style: parts?.grid?.style,
|
|
13731
13736
|
children:
|
|
13732
13737
|
// For left-aligned content, render content first then image
|
|
13733
13738
|
"left" === alignment ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13734
13739
|
children: [ jsxRuntime.jsx("div", {
|
|
13735
|
-
className: generateContentColClass(),
|
|
13740
|
+
className: generateContentColClass(contentColSize, contentColClassName),
|
|
13741
|
+
style: contentColStyle,
|
|
13736
13742
|
children: renderContent()
|
|
13737
13743
|
}), renderForegroundImage() ]
|
|
13738
13744
|
}) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13739
13745
|
children: [ renderForegroundImage(), jsxRuntime.jsx("div", {
|
|
13740
|
-
className: generateContentColClass(),
|
|
13746
|
+
className: generateContentColClass(contentColSize, contentColClassName),
|
|
13747
|
+
style: contentColStyle,
|
|
13741
13748
|
children: renderContent()
|
|
13742
13749
|
}) ]
|
|
13743
13750
|
})
|
|
@@ -17392,7 +17399,7 @@ const Toggle = ({checked: controlledChecked, defaultChecked: defaultChecked = !1
|
|
|
17392
17399
|
if (disabled) return;
|
|
17393
17400
|
const nextChecked = !isChecked;
|
|
17394
17401
|
isControlled || setInternalChecked(nextChecked), onChange?.(nextChecked);
|
|
17395
|
-
}), [ disabled, isChecked, isControlled, onChange ]), toggleClass = [ "c-toggle", isChecked && TOGGLE.CLASSES.IS_ON, disabled && "is-disabled", className ].filter(Boolean).join(" "), toggleContent = jsxRuntime.jsx("div", {
|
|
17402
|
+
}), [ disabled, isChecked, isControlled, onChange ]), toggleClass = [ "c-toggle", isChecked && TOGGLE.CLASSES.IS_ON, disabled && "is-disabled", glass && "c-toggle--glass", className ].filter(Boolean).join(" "), toggleContent = jsxRuntime.jsx("div", {
|
|
17396
17403
|
className: toggleClass,
|
|
17397
17404
|
style: style,
|
|
17398
17405
|
onClick: handleClick,
|
|
@@ -18768,7 +18775,6 @@ var components = Object.freeze({
|
|
|
18768
18775
|
FOOTER: FOOTER,
|
|
18769
18776
|
FORM: FORM,
|
|
18770
18777
|
FORM_GROUP: FORM_GROUP,
|
|
18771
|
-
GLASS_CONTAINER: GLASS_CONTAINER,
|
|
18772
18778
|
HERO: HERO,
|
|
18773
18779
|
INPUT: INPUT,
|
|
18774
18780
|
LIST: LIST,
|
|
@@ -24465,17 +24471,17 @@ exports.ElevationCard = ElevationCard, exports.FOOTER = FOOTER, exports.FORM = F
|
|
|
24465
24471
|
exports.FORM_GROUP = FORM_GROUP, exports.Footer = Footer, exports.FooterLink = FooterLink,
|
|
24466
24472
|
exports.FooterSection = FooterSection, exports.FooterSocialLink = FooterSocialLink,
|
|
24467
24473
|
exports.Form = Form, exports.FormGroup = FormGroup, exports.FunnelChart = FunnelChart,
|
|
24468
|
-
exports.
|
|
24469
|
-
exports.
|
|
24470
|
-
exports.
|
|
24471
|
-
exports.
|
|
24472
|
-
exports.
|
|
24473
|
-
exports.
|
|
24474
|
-
exports.
|
|
24475
|
-
exports.
|
|
24476
|
-
exports.
|
|
24477
|
-
exports.
|
|
24478
|
-
exports.
|
|
24474
|
+
exports.GaugeChart = GaugeChart, exports.Grid = Grid, exports.GridCol = GridCol,
|
|
24475
|
+
exports.HERO = HERO, exports.HeatmapChart = HeatmapChart, exports.Hero = Hero, exports.INPUT = INPUT,
|
|
24476
|
+
exports.INPUT_CSS_VARS = INPUT_CSS_VARS, exports.Icon = Icon, exports.Input = Input,
|
|
24477
|
+
exports.LIST = LIST, exports.LIST_GROUP = LIST_GROUP, exports.LineChart = LineChart,
|
|
24478
|
+
exports.List = List, exports.ListGroup = ListGroup, exports.MESSAGES = MESSAGES,
|
|
24479
|
+
exports.MODAL = MODAL, exports.MODAL_CSS_VARS = MODAL_CSS_VARS, exports.MasonryGrid = MasonryGrid,
|
|
24480
|
+
exports.MasonryGridItem = MasonryGridItem, exports.MegaMenu = MegaMenu, exports.MegaMenuColumn = MegaMenuColumn,
|
|
24481
|
+
exports.MegaMenuLink = MegaMenuLink, exports.Menu = Menu, exports.MenuDivider = MenuDivider,
|
|
24482
|
+
exports.MenuItem = MenuItem, exports.Messages = Messages, exports.Modal = Modal,
|
|
24483
|
+
exports.MultiAxisChart = MultiAxisChart, exports.NAV = NAV, exports.NAVBAR = NAVBAR,
|
|
24484
|
+
exports.Nav = Nav, exports.NavDropdown = NavDropdown, exports.NavItem = NavItem,
|
|
24479
24485
|
exports.Navbar = Navbar, exports.PAGINATION_DEFAULTS = PAGINATION_DEFAULTS, exports.PHOTOVIEWER = PHOTOVIEWER,
|
|
24480
24486
|
exports.POPOVER = POPOVER, exports.PROGRESS = PROGRESS, exports.PROGRESS_CSS_VARS = PROGRESS_CSS_VARS,
|
|
24481
24487
|
exports.Pagination = Pagination, exports.PhotoViewer = PhotoViewer, exports.PieChart = PieChart,
|
|
@@ -24766,9 +24772,9 @@ function(theme, selector = ":root") {
|
|
|
24766
24772
|
});
|
|
24767
24773
|
}, exports.types = types, exports.unregisterTheme = unregisterTheme, exports.useAccordion = useAccordion,
|
|
24768
24774
|
exports.useAtomixGlass = useAtomixGlass, exports.useBadge = useBadge, exports.useBarChart = useBarChart,
|
|
24769
|
-
exports.useBlock = useBlock, exports.useBreadcrumb = useBreadcrumb, exports.
|
|
24770
|
-
exports.
|
|
24771
|
-
exports.useChartScale = useChartScale, exports.
|
|
24775
|
+
exports.useBlock = useBlock, exports.useBreadcrumb = useBreadcrumb, exports.useCard = useCard,
|
|
24776
|
+
exports.useChartData = useChartData, exports.useChartInteraction = useChartInteraction,
|
|
24777
|
+
exports.useChartScale = useChartScale, exports.useComponentCustomization =
|
|
24772
24778
|
/**
|
|
24773
24779
|
* Hook to merge theme overrides with component props
|
|
24774
24780
|
*
|