@shohojdhara/atomix 0.3.15 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-tools/index.d.ts +31 -30
- package/build-tools/package.json +4 -21
- package/dist/atomix.css +20924 -2611
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +76 -2
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/index.d.ts +31 -30
- package/dist/build-tools/package.json +4 -21
- package/dist/charts.js.map +1 -1
- package/dist/core.js.map +1 -1
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +144 -18
- package/dist/index.esm.js +110 -55
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +110 -55
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/layout.js.map +1 -1
- package/dist/theme.d.ts +9 -9
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.stories.tsx +32 -23
- package/src/components/Accordion/Accordion.test.tsx +70 -50
- package/src/components/Accordion/Accordion.tsx +99 -94
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +1 -1
- package/src/components/AtomixGlass/GlassFilter.tsx +9 -16
- package/src/components/AtomixGlass/glass-utils.ts +4 -3
- package/src/components/AtomixGlass/shader-utils.ts +128 -52
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +1 -1
- package/src/components/AtomixGlass/stories/Shaders.stories.tsx +1 -1
- package/src/components/Avatar/Avatar.stories.tsx +45 -62
- package/src/components/Avatar/Avatar.tsx +58 -56
- package/src/components/Badge/Badge.stories.tsx +20 -9
- package/src/components/Badge/Badge.test.tsx +41 -41
- package/src/components/Badge/Badge.tsx +64 -62
- package/src/components/Block/Block.stories.tsx +14 -4
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +9 -8
- package/src/components/Breadcrumb/Breadcrumb.tsx +62 -60
- package/src/components/Button/Button.stories.tsx +13 -22
- package/src/components/Button/Button.test.tsx +97 -81
- package/src/components/Button/Button.tsx +46 -14
- package/src/components/Button/ButtonGroup.stories.tsx +37 -32
- package/src/components/Button/ButtonGroup.tsx +4 -15
- package/src/components/Callout/Callout.stories.tsx +109 -16
- package/src/components/Card/Card.stories.tsx +67 -36
- package/src/components/Card/Card.tsx +30 -14
- package/src/components/Chart/AreaChart.tsx +1 -1
- package/src/components/Chart/CandlestickChart.tsx +23 -16
- package/src/components/Chart/Chart.stories.tsx +4 -9
- package/src/components/Chart/Chart.tsx +40 -44
- package/src/components/Chart/ChartRenderer.tsx +39 -12
- package/src/components/Chart/ChartToolbar.tsx +21 -5
- package/src/components/Chart/DonutChart.tsx +1 -1
- package/src/components/Chart/FunnelChart.tsx +4 -1
- package/src/components/Chart/GaugeChart.tsx +3 -1
- package/src/components/Chart/HeatmapChart.tsx +50 -37
- package/src/components/Chart/LineChart.tsx +3 -2
- package/src/components/Chart/MultiAxisChart.tsx +24 -16
- package/src/components/Chart/RadarChart.tsx +19 -17
- package/src/components/Chart/ScatterChart.tsx +29 -21
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +6 -2
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +15 -3
- package/src/components/Countdown/Countdown.stories.tsx +7 -7
- package/src/components/DataTable/DataTable.stories.tsx +43 -38
- package/src/components/DataTable/DataTable.test.tsx +26 -148
- package/src/components/DataTable/DataTable.tsx +485 -456
- package/src/components/DatePicker/DatePicker.stories.tsx +32 -47
- package/src/components/DatePicker/DatePicker.tsx +31 -26
- package/src/components/Dropdown/Dropdown.stories.tsx +2 -5
- package/src/components/Dropdown/Dropdown.tsx +313 -299
- package/src/components/EdgePanel/EdgePanel.stories.tsx +6 -19
- package/src/components/EdgePanel/EdgePanel.tsx +1 -3
- package/src/components/Footer/Footer.stories.tsx +21 -16
- package/src/components/Footer/Footer.tsx +130 -128
- package/src/components/Footer/FooterLink.tsx +2 -2
- package/src/components/Form/Checkbox.test.tsx +49 -49
- package/src/components/Form/Checkbox.tsx +108 -100
- package/src/components/Form/Form.stories.tsx +2 -10
- package/src/components/Form/Input.stories.tsx +22 -39
- package/src/components/Form/Input.test.tsx +38 -44
- package/src/components/Form/Radio.stories.tsx +6 -12
- package/src/components/Form/Radio.tsx +68 -66
- package/src/components/Form/Select.tsx +184 -182
- package/src/components/Form/Textarea.test.tsx +27 -32
- package/src/components/Hero/Hero.stories.tsx +56 -23
- package/src/components/Hero/Hero.tsx +201 -55
- package/src/components/Icon/index.ts +7 -1
- package/src/components/List/List.tsx +19 -23
- package/src/components/Modal/Modal.stories.tsx +2 -1
- package/src/components/Modal/Modal.tsx +130 -127
- package/src/components/Navigation/Menu/MegaMenu.tsx +70 -70
- package/src/components/Navigation/Nav/NavDropdown.tsx +1 -5
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +128 -28
- package/src/components/Navigation/SideMenu/SideMenu.tsx +5 -7
- package/src/components/Navigation/SideMenu/SideMenuItem.tsx +4 -5
- package/src/components/Pagination/Pagination.stories.tsx +7 -4
- package/src/components/Pagination/Pagination.tsx +199 -202
- package/src/components/PhotoViewer/PhotoViewer.tsx +4 -1
- package/src/components/Popover/Popover.stories.tsx +99 -192
- package/src/components/Popover/Popover.tsx +41 -37
- package/src/components/Progress/Progress.stories.tsx +35 -44
- package/src/components/River/River.stories.tsx +2 -1
- package/src/components/SectionIntro/SectionIntro.stories.tsx +71 -71
- package/src/components/Slider/Slider.stories.tsx +12 -4
- package/src/components/Spinner/Spinner.stories.tsx +3 -1
- package/src/components/Spinner/Spinner.test.tsx +23 -23
- package/src/components/Spinner/Spinner.tsx +43 -46
- package/src/components/Steps/Steps.stories.tsx +8 -6
- package/src/components/Tabs/Tabs.stories.tsx +12 -9
- package/src/components/Tabs/Tabs.tsx +74 -72
- package/src/components/Toggle/Toggle.stories.tsx +27 -13
- package/src/components/Toggle/Toggle.test.tsx +65 -70
- package/src/components/Toggle/Toggle.tsx +4 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +24 -20
- package/src/components/Tooltip/Tooltip.tsx +104 -106
- package/src/components/Upload/Upload.stories.tsx +129 -127
- package/src/components/Upload/Upload.tsx +287 -283
- package/src/components/VideoPlayer/VideoPlayer.tsx +6 -1
- package/src/components/index.ts +13 -2
- package/src/layouts/Grid/Grid.stories.tsx +9 -3
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +5 -1
- package/src/lib/__tests__/theme-tools.test.ts +32 -6
- package/src/lib/composables/shared-mouse-tracker.ts +13 -14
- package/src/lib/composables/useAtomixGlass.ts +106 -49
- package/src/lib/composables/useChartExport.ts +1 -1
- package/src/lib/composables/useDataTable.ts +29 -17
- package/src/lib/composables/useHero.ts +58 -14
- package/src/lib/composables/useHeroBackgroundSlider.ts +2 -9
- package/src/lib/composables/useInput.ts +10 -8
- package/src/lib/composables/useSideMenu.ts +6 -5
- package/src/lib/composables/useTooltip.ts +1 -2
- package/src/lib/composables/useVideoPlayer.ts +44 -35
- package/src/lib/config/index.ts +154 -154
- package/src/lib/constants/cssVariables.ts +29 -29
- package/src/lib/hooks/__tests__/useComponentCustomization.test.ts +2 -6
- package/src/lib/hooks/index.ts +1 -1
- package/src/lib/hooks/useComponentCustomization.ts +11 -17
- package/src/lib/hooks/usePerformanceMonitor.ts +6 -7
- package/src/lib/patterns/__tests__/slots.test.ts +1 -1
- package/src/lib/patterns/index.ts +1 -1
- package/src/lib/patterns/slots.tsx +8 -13
- package/src/lib/storybook/InteractiveDemo.tsx +13 -18
- package/src/lib/storybook/PreviewContainer.tsx +1 -1
- package/src/lib/storybook/VariantsGrid.tsx +3 -7
- package/src/lib/storybook/index.ts +1 -1
- package/src/lib/theme/adapters/cssVariableMapper.ts +47 -74
- package/src/lib/theme/adapters/index.ts +3 -9
- package/src/lib/theme/adapters/themeAdapter.ts +41 -26
- package/src/lib/theme/config/index.ts +1 -1
- package/src/lib/theme/config/types.ts +2 -2
- package/src/lib/theme/config/validator.ts +10 -5
- package/src/lib/theme/constants/constants.ts +2 -2
- package/src/lib/theme/constants/index.ts +1 -2
- package/src/lib/theme/core/__tests__/createTheme.test.ts +20 -22
- package/src/lib/theme/core/composeTheme.ts +32 -26
- package/src/lib/theme/core/createTheme.ts +1 -1
- package/src/lib/theme/core/createThemeObject.ts +308 -301
- package/src/lib/theme/core/index.ts +3 -3
- package/src/lib/theme/devtools/CLI.ts +106 -104
- package/src/lib/theme/devtools/Comparator.tsx +50 -32
- package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +50 -48
- package/src/lib/theme/devtools/DesignTokensCustomizer.tsx +257 -63
- package/src/lib/theme/devtools/Inspector.tsx +75 -60
- package/src/lib/theme/devtools/LiveEditor.tsx +97 -76
- package/src/lib/theme/devtools/Preview.tsx +150 -106
- package/src/lib/theme/devtools/ThemeValidator.ts +29 -21
- package/src/lib/theme/devtools/index.ts +3 -9
- package/src/lib/theme/devtools/useHistory.ts +23 -21
- package/src/lib/theme/errors/errors.ts +12 -11
- package/src/lib/theme/errors/index.ts +2 -7
- package/src/lib/theme/generators/generateCSS.ts +9 -13
- package/src/lib/theme/generators/generateCSSNested.ts +1 -6
- package/src/lib/theme/generators/generateCSSVariables.ts +673 -630
- package/src/lib/theme/generators/index.ts +1 -4
- package/src/lib/theme/i18n/index.ts +1 -1
- package/src/lib/theme/i18n/rtl.ts +13 -13
- package/src/lib/theme/index.ts +7 -16
- package/src/lib/theme/runtime/ThemeApplicator.ts +4 -4
- package/src/lib/theme/runtime/ThemeContext.tsx +1 -1
- package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +19 -23
- package/src/lib/theme/runtime/ThemeProvider.tsx +230 -239
- package/src/lib/theme/runtime/__tests__/ThemeProvider.integration.test.tsx +1 -1
- package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +24 -29
- package/src/lib/theme/runtime/index.ts +2 -5
- package/src/lib/theme/runtime/useTheme.ts +18 -18
- package/src/lib/theme/runtime/useThemeTokens.ts +22 -22
- package/src/lib/theme/test/testTheme.ts +15 -16
- package/src/lib/theme/tokens/index.ts +2 -7
- package/src/lib/theme/tokens/tokens.ts +25 -24
- package/src/lib/theme/types.ts +428 -411
- package/src/lib/theme/utils/__tests__/themeValidation.test.ts +3 -3
- package/src/lib/theme/utils/componentTheming.ts +18 -18
- package/src/lib/theme/utils/domUtils.ts +277 -289
- package/src/lib/theme/utils/index.ts +1 -2
- package/src/lib/theme/utils/injectCSS.ts +10 -14
- package/src/lib/theme/utils/naming.ts +20 -16
- package/src/lib/theme/utils/themeHelpers.ts +10 -12
- package/src/lib/theme/utils/themeUtils.ts +85 -86
- package/src/lib/theme/utils/themeValidation.ts +82 -33
- package/src/lib/theme-tools.ts +8 -6
- package/src/lib/types/components.ts +172 -71
- package/src/lib/types/partProps.ts +1 -1
- package/src/lib/utils/__tests__/csv.test.ts +1 -1
- package/src/lib/utils/componentUtils.ts +8 -12
- package/src/lib/utils/csv.ts +3 -1
- package/src/lib/utils/dataTableExport.ts +1 -5
- package/src/lib/utils/fontPreloader.ts +10 -19
- package/src/lib/utils/icons.ts +4 -1
- package/src/lib/utils/index.ts +2 -6
- package/src/lib/utils/memoryMonitor.ts +10 -8
- package/src/lib/utils/themeNaming.ts +2 -2
- package/src/styles/01-settings/_index.scss +0 -1
- package/src/styles/01-settings/_settings.colors.scss +8 -8
- package/src/styles/01-settings/_settings.design-tokens.scss +61 -50
- package/src/styles/01-settings/_settings.navbar.scss +1 -1
- package/src/styles/01-settings/_settings.spacing.scss +3 -4
- package/src/styles/01-settings/_settings.tooltip.scss +1 -1
- package/src/styles/01-settings/_settings.typography.scss +1 -1
- package/src/styles/02-tools/_tools.button.scss +51 -21
- package/src/styles/02-tools/_tools.utility-api.scss +30 -18
- package/src/styles/03-generic/_generic.root.scss +4 -3
- package/src/styles/06-components/_components.atomix-glass.scss +13 -9
- package/src/styles/06-components/_components.button.scss +16 -4
- package/src/styles/06-components/_components.callout.scss +27 -21
- package/src/styles/06-components/_components.card.scss +5 -14
- package/src/styles/06-components/_components.chart.scss +22 -19
- package/src/styles/06-components/_components.checkbox.scss +3 -1
- package/src/styles/06-components/_components.color-mode-toggle.scss +3 -1
- package/src/styles/06-components/_components.edge-panel.scss +9 -2
- package/src/styles/06-components/_components.footer.scss +1 -1
- package/src/styles/06-components/_components.side-menu.scss +5 -5
- package/src/styles/06-components/_components.toggle.scss +18 -0
- package/src/styles/06-components/_index.scss +1 -1
- package/src/styles/06-components/old.chart.styles.scss +0 -2
- package/src/styles/99-utilities/_utilities.border.scss +69 -27
- package/src/styles/99-utilities/_utilities.display.scss +1 -1
- package/src/styles/99-utilities/_utilities.opacity.scss +10 -0
- package/src/styles/99-utilities/_utilities.position.scss +16 -9
- package/src/styles/99-utilities/_utilities.scss +1 -1
- package/src/styles/99-utilities/_utilities.sizes.scss +47 -18
- package/src/styles/99-utilities/_utilities.spacing.scss +118 -66
- package/src/styles/99-utilities/_utilities.text-gradient.scss +30 -30
- package/src/styles/99-utilities/_utilities.text.scss +67 -46
package/dist/index.js
CHANGED
|
@@ -9087,7 +9087,9 @@ function getRowId$1(row, rowKey) {
|
|
|
9087
9087
|
}))) return !1;
|
|
9088
9088
|
// Apply column-specific filters
|
|
9089
9089
|
for (let i = 0; i < activeColumnFilters.length; i++) {
|
|
9090
|
-
const
|
|
9090
|
+
const filter = activeColumnFilters[i];
|
|
9091
|
+
if (!filter) continue;
|
|
9092
|
+
const {key: key, value: value, lowercaseValue: lowercaseValue, column: column} = filter, cellValue = row[key];
|
|
9091
9093
|
if (null == cellValue) return !1;
|
|
9092
9094
|
// Use custom filter function if provided
|
|
9093
9095
|
var _context2;
|
|
@@ -11075,6 +11077,8 @@ function useHero(initialProps) {
|
|
|
11075
11077
|
contentWidth: void 0,
|
|
11076
11078
|
parallax: !1,
|
|
11077
11079
|
parallaxIntensity: .5,
|
|
11080
|
+
headingLevel: "h1",
|
|
11081
|
+
reverseOnMobile: !1,
|
|
11078
11082
|
...initialProps
|
|
11079
11083
|
}, hasBackgroundSlider = !!defaultProps.backgroundSlider, backgroundSliderResult =
|
|
11080
11084
|
/**
|
|
@@ -11155,7 +11159,9 @@ function useHero(initialProps) {
|
|
|
11155
11159
|
autoplay: {
|
|
11156
11160
|
delay: 5e3,
|
|
11157
11161
|
pauseOnHover: !0
|
|
11158
|
-
}
|
|
11162
|
+
},
|
|
11163
|
+
transition: "fade",
|
|
11164
|
+
transitionDuration: 1e3
|
|
11159
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) => {
|
|
11160
11166
|
if (!element) return;
|
|
11161
11167
|
// Ensure intensity is between 0 and 1
|
|
@@ -11206,13 +11212,20 @@ function useHero(initialProps) {
|
|
|
11206
11212
|
defaultProps.videoBackground && classes.push("c-hero--video"), baseClassName && classes.push(baseClassName),
|
|
11207
11213
|
classes.join(" ");
|
|
11208
11214
|
},
|
|
11209
|
-
generateImageColClass: (size = defaultProps.imageColSize || 7) => {
|
|
11215
|
+
generateImageColClass: (size = defaultProps.imageColSize || 7, customClass) => {
|
|
11210
11216
|
const classes = [ `o-grid__col o-grid__col--md-${size}` ];
|
|
11211
11217
|
// Add responsive margin if needed for mobile view
|
|
11212
11218
|
return "left" === defaultProps.alignment && classes.push("u-mt-5 u-mt-md-0"),
|
|
11213
|
-
|
|
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(" ");
|
|
11214
11228
|
},
|
|
11215
|
-
generateContentColClass: (size = defaultProps.contentColSize || 5) => `o-grid__col o-grid__col--md-${size}`,
|
|
11216
11229
|
hasBackgroundImage: hasBackgroundImage,
|
|
11217
11230
|
hasForegroundImage: hasForegroundImage,
|
|
11218
11231
|
useGridLayout: useGridLayout,
|
|
@@ -13484,12 +13497,14 @@ const FooterLink = React.forwardRef((({href: href, icon: icon, external: extern
|
|
|
13484
13497
|
|
|
13485
13498
|
FooterLink.displayName = "FooterLink";
|
|
13486
13499
|
|
|
13487
|
-
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 = {
|
|
13488
13501
|
autoplay: !0,
|
|
13489
13502
|
loop: !0,
|
|
13490
13503
|
muted: !0
|
|
13491
|
-
}, backgroundSlider: backgroundSlider}) => {
|
|
13492
|
-
|
|
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,
|
|
13493
13508
|
alignment: alignment,
|
|
13494
13509
|
imageColSize: imageColSize,
|
|
13495
13510
|
contentColSize: contentColSize,
|
|
@@ -13501,7 +13516,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13501
13516
|
parallax: parallax,
|
|
13502
13517
|
parallaxIntensity: parallaxIntensity,
|
|
13503
13518
|
videoBackground: videoBackground,
|
|
13504
|
-
backgroundSlider: backgroundSlider
|
|
13519
|
+
backgroundSlider: backgroundSlider,
|
|
13520
|
+
reverseOnMobile: reverseOnMobile
|
|
13505
13521
|
}), heroStyle = {
|
|
13506
13522
|
...contentWidth ? {
|
|
13507
13523
|
"--atomix-hero-content-width": contentWidth
|
|
@@ -13525,18 +13541,23 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13525
13541
|
});
|
|
13526
13542
|
}, renderContent = () => {
|
|
13527
13543
|
const content = jsxRuntime.jsxs("div", {
|
|
13528
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13544
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13545
|
+
style: parts?.content?.style,
|
|
13529
13546
|
children: [ subtitle && jsxRuntime.jsx("p", {
|
|
13530
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13547
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13548
|
+
style: parts?.subtitle?.style,
|
|
13531
13549
|
children: subtitle
|
|
13532
|
-
}), jsxRuntime.jsx(
|
|
13533
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13550
|
+
}), jsxRuntime.jsx(HeadingTag, {
|
|
13551
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13552
|
+
style: parts?.title?.style,
|
|
13534
13553
|
children: title
|
|
13535
13554
|
}), text && jsxRuntime.jsx("p", {
|
|
13536
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13555
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13556
|
+
style: parts?.text?.style,
|
|
13537
13557
|
children: text
|
|
13538
13558
|
}), actions && jsxRuntime.jsx("div", {
|
|
13539
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13559
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13560
|
+
style: parts?.actions?.style,
|
|
13540
13561
|
children: actions
|
|
13541
13562
|
}) ]
|
|
13542
13563
|
});
|
|
@@ -13546,7 +13567,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13546
13567
|
glass ?
|
|
13547
13568
|
// If glass is true, use default glass props
|
|
13548
13569
|
!0 === glass ? jsxRuntime.jsx("div", {
|
|
13549
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13570
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13571
|
+
style: parts?.content?.style,
|
|
13550
13572
|
children: jsxRuntime.jsx(AtomixGlass, {
|
|
13551
13573
|
displacementScale: 60,
|
|
13552
13574
|
blurAmount: 3,
|
|
@@ -13558,71 +13580,93 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13558
13580
|
children: jsxRuntime.jsxs("div", {
|
|
13559
13581
|
className: "u-p-4",
|
|
13560
13582
|
children: [ subtitle && jsxRuntime.jsx("p", {
|
|
13561
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13583
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13584
|
+
style: parts?.subtitle?.style,
|
|
13562
13585
|
children: subtitle
|
|
13563
|
-
}), jsxRuntime.jsx(
|
|
13564
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13586
|
+
}), jsxRuntime.jsx(HeadingTag, {
|
|
13587
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13588
|
+
style: parts?.title?.style,
|
|
13565
13589
|
children: title
|
|
13566
13590
|
}), text && jsxRuntime.jsx("p", {
|
|
13567
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13591
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13592
|
+
style: parts?.text?.style,
|
|
13568
13593
|
children: text
|
|
13569
13594
|
}), actions && jsxRuntime.jsx("div", {
|
|
13570
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13595
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13596
|
+
style: parts?.actions?.style,
|
|
13571
13597
|
children: actions
|
|
13572
13598
|
}) ]
|
|
13573
13599
|
})
|
|
13574
13600
|
})
|
|
13575
13601
|
}) : jsxRuntime.jsx("div", {
|
|
13576
|
-
className: HERO.SELECTORS.CONTENT.replace(".", ""),
|
|
13602
|
+
className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
|
|
13603
|
+
style: parts?.content?.style,
|
|
13577
13604
|
children: jsxRuntime.jsx(AtomixGlass, {
|
|
13578
13605
|
...glass,
|
|
13579
13606
|
children: jsxRuntime.jsxs("div", {
|
|
13580
13607
|
className: "u-p-4",
|
|
13581
13608
|
children: [ subtitle && jsxRuntime.jsx("p", {
|
|
13582
|
-
className: HERO.SELECTORS.SUBTITLE.replace(".", ""),
|
|
13609
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
|
|
13610
|
+
style: parts?.subtitle?.style,
|
|
13583
13611
|
children: subtitle
|
|
13584
|
-
}), jsxRuntime.jsx(
|
|
13585
|
-
className: HERO.SELECTORS.TITLE.replace(".", ""),
|
|
13612
|
+
}), jsxRuntime.jsx(HeadingTag, {
|
|
13613
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
|
|
13614
|
+
style: parts?.title?.style,
|
|
13586
13615
|
children: title
|
|
13587
13616
|
}), text && jsxRuntime.jsx("p", {
|
|
13588
|
-
className: HERO.SELECTORS.TEXT.replace(".", ""),
|
|
13617
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
|
|
13618
|
+
style: parts?.text?.style,
|
|
13589
13619
|
children: text
|
|
13590
13620
|
}), actions && jsxRuntime.jsx("div", {
|
|
13591
|
-
className: HERO.SELECTORS.ACTIONS.replace(".", ""),
|
|
13621
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
|
|
13622
|
+
style: parts?.actions?.style,
|
|
13592
13623
|
children: actions
|
|
13593
13624
|
}) ]
|
|
13594
13625
|
})
|
|
13595
13626
|
})
|
|
13596
13627
|
}) : content;
|
|
13597
13628
|
}, renderForegroundImage = () => hasForegroundImage ? "center" === alignment ? jsxRuntime.jsx("div", {
|
|
13598
|
-
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
|
+
},
|
|
13599
13634
|
children: jsxRuntime.jsx("img", {
|
|
13600
13635
|
src: imageSrc,
|
|
13601
13636
|
alt: imageAlt,
|
|
13602
|
-
className: HERO.SELECTORS.IMAGE.replace(".", "")
|
|
13637
|
+
className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${parts?.image?.className || ""}`.trim(),
|
|
13638
|
+
style: parts?.image?.style
|
|
13603
13639
|
})
|
|
13604
13640
|
}) : jsxRuntime.jsx("div", {
|
|
13605
|
-
className: generateImageColClass(),
|
|
13641
|
+
className: `${generateImageColClass(imageColSize, imageColClassName)} ${parts?.imageWrapper?.className || ""}`.trim(),
|
|
13642
|
+
style: {
|
|
13643
|
+
...imageColStyle,
|
|
13644
|
+
...parts?.imageWrapper?.style
|
|
13645
|
+
},
|
|
13606
13646
|
children: jsxRuntime.jsx("img", {
|
|
13607
13647
|
src: imageSrc,
|
|
13608
13648
|
alt: imageAlt,
|
|
13609
|
-
className: HERO.SELECTORS.IMAGE.replace(".", "")
|
|
13649
|
+
className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${parts?.image?.className || ""}`.trim(),
|
|
13650
|
+
style: parts?.image?.style
|
|
13610
13651
|
})
|
|
13611
13652
|
}) : null;
|
|
13612
|
-
|
|
13613
|
-
return jsxRuntime.jsxs("div", {
|
|
13653
|
+
return jsxRuntime.jsxs("div", {
|
|
13614
13654
|
ref: heroRef,
|
|
13615
|
-
className: generateHeroClassNames(className),
|
|
13616
|
-
style:
|
|
13655
|
+
className: `${generateHeroClassNames(className)} ${parts?.root?.className || ""}`.trim(),
|
|
13656
|
+
style: {
|
|
13657
|
+
...heroStyle,
|
|
13658
|
+
...parts?.root?.style
|
|
13659
|
+
},
|
|
13617
13660
|
"data-parallax": parallax ? "true" : void 0,
|
|
13618
13661
|
"data-parallax-intensity": parallax ? parallaxIntensity : void 0,
|
|
13662
|
+
...rest,
|
|
13619
13663
|
children: [ (() => {
|
|
13620
13664
|
// Render background slider if configured
|
|
13621
13665
|
if (hasBackgroundSlider && backgroundSlider && sliderHook) {
|
|
13622
13666
|
const {slides: slides, transition: transition = "fade", transitionDuration: transitionDuration = 1e3} = backgroundSlider, {currentIndex: currentIndex, slideRefs: slideRefs, videoRefs: videoRefs} = sliderHook;
|
|
13623
13667
|
// Determine transition class
|
|
13624
13668
|
let transitionClass = HERO.CLASSES.SLIDER_FADE;
|
|
13625
|
-
return "slide" === transition
|
|
13669
|
+
return "slide" === transition && (transitionClass = HERO.CLASSES.SLIDER_SLIDE),
|
|
13626
13670
|
jsxRuntime.jsxs("div", {
|
|
13627
13671
|
className: `${HERO.SELECTORS.SLIDER.replace(".", "")} ${transitionClass}`,
|
|
13628
13672
|
style: {
|
|
@@ -13639,57 +13683,68 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13639
13683
|
return jsxRuntime.jsx("div", {
|
|
13640
13684
|
ref: slideRef,
|
|
13641
13685
|
className: `${HERO.SELECTORS.SLIDER_ITEM.replace(".", "")} ${isActive ? HERO.CLASSES.SLIDER_ITEM_ACTIVE : ""}`,
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
alt: slide.alt || "Background slide",
|
|
13645
|
-
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13646
|
-
}) : jsxRuntime.jsxs("video", {
|
|
13686
|
+
"aria-hidden": !isActive,
|
|
13687
|
+
children: "video" === slide.type ? jsxRuntime.jsxs("video", {
|
|
13647
13688
|
ref: videoRef,
|
|
13648
|
-
className: "c-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
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,
|
|
13652
13694
|
playsInline: !0,
|
|
13653
|
-
|
|
13695
|
+
"aria-hidden": "true",
|
|
13696
|
+
autoPlay: !1 !== slide.videoOptions?.autoplay,
|
|
13654
13697
|
children: [ jsxRuntime.jsx("source", {
|
|
13655
13698
|
src: slide.src,
|
|
13656
13699
|
type: `video/${slide.src.split(".").pop() || "mp4"}`
|
|
13657
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(".", "")
|
|
13658
13705
|
})
|
|
13659
13706
|
}, index);
|
|
13660
13707
|
})), showOverlay && jsxRuntime.jsx("div", {
|
|
13661
|
-
className: HERO.SELECTORS.OVERLAY.replace(".", "")
|
|
13708
|
+
className: `${HERO.SELECTORS.OVERLAY.replace(".", "")} ${parts?.overlay?.className || ""}`.trim(),
|
|
13709
|
+
style: parts?.overlay?.style
|
|
13662
13710
|
}) ]
|
|
13663
13711
|
});
|
|
13664
13712
|
}
|
|
13665
13713
|
// Fall back to single background image/video
|
|
13666
13714
|
return hasBackgroundImage || videoBackground ? jsxRuntime.jsxs("div", {
|
|
13667
|
-
className: HERO.SELECTORS.BG.replace(".", ""),
|
|
13715
|
+
className: `${HERO.SELECTORS.BG.replace(".", "")} ${parts?.background?.className || ""}`.trim(),
|
|
13716
|
+
style: parts?.background?.style,
|
|
13668
13717
|
children: [ backgroundImageSrc && jsxRuntime.jsx("img", {
|
|
13669
13718
|
src: backgroundImageSrc,
|
|
13670
13719
|
alt: "Background",
|
|
13671
13720
|
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
13672
13721
|
}), renderVideoBackground(), showOverlay && jsxRuntime.jsx("div", {
|
|
13673
|
-
className: HERO.SELECTORS.OVERLAY.replace(".", "")
|
|
13722
|
+
className: `${HERO.SELECTORS.OVERLAY.replace(".", "")} ${parts?.overlay?.className || ""}`.trim(),
|
|
13723
|
+
style: parts?.overlay?.style
|
|
13674
13724
|
}) ]
|
|
13675
13725
|
}) : null;
|
|
13676
13726
|
})(), jsxRuntime.jsx("div", {
|
|
13677
|
-
className: `${HERO.SELECTORS.CONTAINER.replace(".", "")} o-container
|
|
13727
|
+
className: `${HERO.SELECTORS.CONTAINER.replace(".", "")} o-container ${parts?.container?.className || ""}`.trim(),
|
|
13728
|
+
style: parts?.container?.style,
|
|
13678
13729
|
children: children ? jsxRuntime.jsx("div", {
|
|
13679
|
-
className: HERO.SELECTORS.GRID.replace(".", ""),
|
|
13730
|
+
className: `${HERO.SELECTORS.GRID.replace(".", "")} ${parts?.grid?.className || ""}`.trim(),
|
|
13731
|
+
style: parts?.grid?.style,
|
|
13680
13732
|
children: children
|
|
13681
13733
|
}) : useGridLayout ? jsxRuntime.jsx("div", {
|
|
13682
|
-
className: `${HERO.SELECTORS.GRID.replace(".", "")} o-grid
|
|
13734
|
+
className: `${HERO.SELECTORS.GRID.replace(".", "")} o-grid ${parts?.grid?.className || ""}`.trim(),
|
|
13735
|
+
style: parts?.grid?.style,
|
|
13683
13736
|
children:
|
|
13684
13737
|
// For left-aligned content, render content first then image
|
|
13685
13738
|
"left" === alignment ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13686
13739
|
children: [ jsxRuntime.jsx("div", {
|
|
13687
|
-
className: generateContentColClass(),
|
|
13740
|
+
className: generateContentColClass(contentColSize, contentColClassName),
|
|
13741
|
+
style: contentColStyle,
|
|
13688
13742
|
children: renderContent()
|
|
13689
13743
|
}), renderForegroundImage() ]
|
|
13690
13744
|
}) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13691
13745
|
children: [ renderForegroundImage(), jsxRuntime.jsx("div", {
|
|
13692
|
-
className: generateContentColClass(),
|
|
13746
|
+
className: generateContentColClass(contentColSize, contentColClassName),
|
|
13747
|
+
style: contentColStyle,
|
|
13693
13748
|
children: renderContent()
|
|
13694
13749
|
}) ]
|
|
13695
13750
|
})
|
|
@@ -17344,7 +17399,7 @@ const Toggle = ({checked: controlledChecked, defaultChecked: defaultChecked = !1
|
|
|
17344
17399
|
if (disabled) return;
|
|
17345
17400
|
const nextChecked = !isChecked;
|
|
17346
17401
|
isControlled || setInternalChecked(nextChecked), onChange?.(nextChecked);
|
|
17347
|
-
}), [ 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", {
|
|
17348
17403
|
className: toggleClass,
|
|
17349
17404
|
style: style,
|
|
17350
17405
|
onClick: handleClick,
|