@shohojdhara/atomix 0.4.3 → 0.4.5

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.
Files changed (45) hide show
  1. package/dist/atomix.css +26 -5
  2. package/dist/atomix.css.map +1 -1
  3. package/dist/atomix.min.css +1 -1
  4. package/dist/atomix.min.css.map +1 -1
  5. package/dist/charts.js +4 -16
  6. package/dist/charts.js.map +1 -1
  7. package/dist/core.d.ts +4 -4
  8. package/dist/core.js +14 -26
  9. package/dist/core.js.map +1 -1
  10. package/dist/forms.js +4 -16
  11. package/dist/forms.js.map +1 -1
  12. package/dist/heavy.js +9 -21
  13. package/dist/heavy.js.map +1 -1
  14. package/dist/index.d.ts +40 -16
  15. package/dist/index.esm.js +307 -341
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +337 -357
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.min.js +1 -1
  20. package/dist/index.min.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/AtomixGlass/AtomixGlass.tsx +2 -15
  23. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +3 -8
  24. package/src/components/Breadcrumb/Breadcrumb.tsx +5 -5
  25. package/src/components/Breadcrumb/BreadcrumbCompound.test.tsx +2 -2
  26. package/src/components/Button/Button.tsx +6 -6
  27. package/src/components/Card/Card.tsx +3 -3
  28. package/src/components/Dropdown/Dropdown.tsx +5 -3
  29. package/src/components/Footer/Footer.tsx +124 -166
  30. package/src/components/Footer/FooterLink.tsx +16 -19
  31. package/src/components/Footer/FooterSection.tsx +40 -39
  32. package/src/components/Footer/FooterSocialLink.tsx +59 -58
  33. package/src/components/Footer/README.md +1 -1
  34. package/src/components/Hero/Hero.tsx +72 -142
  35. package/src/components/Navigation/Menu/MegaMenu.tsx +17 -12
  36. package/src/components/Navigation/Menu/Menu.tsx +49 -24
  37. package/src/components/Navigation/Nav/NavItem.tsx +5 -3
  38. package/src/components/Navigation/SideMenu/SideMenu.tsx +2 -2
  39. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +4 -4
  40. package/src/components/Slider/Slider.tsx +7 -4
  41. package/src/lib/composables/useFooter.ts +117 -20
  42. package/src/lib/composables/useSlider.ts +3 -1
  43. package/src/lib/types/components.ts +44 -12
  44. package/src/styles/06-components/_components.atomix-glass.scss +39 -5
  45. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +0 -222
package/dist/index.js CHANGED
@@ -2221,7 +2221,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
2221
2221
  }, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp, isHovered: isHovered = !1, isActive: isActive = !1, overLight: overLight = !1, overLightConfig: overLightConfig = {}, borderRadius: borderRadius = 0, padding: padding = "0 0", glassSize: glassSize = {
2222
2222
  width: 0,
2223
2223
  height: 0
2224
- }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, elasticity: elasticity = 0, contentRef: contentRef}, ref) => {
2224
+ }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, contentRef: contentRef}, ref) => {
2225
2225
  // Generate a stable, deterministic ID for SSR compatibility
2226
2226
  // Use a module-level counter that's consistent across server and client
2227
2227
  const filterId = React.useMemo((() => "atomix-glass-filter-" + ++idCounter), []), [shaderMapUrl, setShaderMapUrl] = React.useState(""), shaderGeneratorRef = React.useRef(null), shaderUtilsRef = React.useRef(null), shaderDebounceTimeoutRef = React.useRef(null);
@@ -2419,7 +2419,6 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
2419
2419
  children: [ jsxRuntime.jsxs("div", {
2420
2420
  className: ATOMIX_GLASS.FILTER_CLASS,
2421
2421
  style: {
2422
- zIndex: 1,
2423
2422
  position: "absolute",
2424
2423
  inset: 0
2425
2424
  },
@@ -2455,9 +2454,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = React.forwardRef((({c
2455
2454
  className: ATOMIX_GLASS.CONTENT_CLASS,
2456
2455
  style: {
2457
2456
  position: "relative",
2458
- textShadow: "var(--atomix-glass-container-text-shadow)",
2459
- // Ensure content is always above the filter layer (zIndex 1)
2460
- zIndex: elasticity > 0 ? 100 : 2
2457
+ textShadow: "var(--atomix-glass-container-text-shadow)"
2461
2458
  },
2462
2459
  children: children
2463
2460
  }) ]
@@ -3330,7 +3327,6 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3330
3327
  effectiveWithoutEffects: effectiveWithoutEffects,
3331
3328
  effectiveReducedMotion: effectiveReducedMotion,
3332
3329
  shaderVariant: shaderVariant,
3333
- elasticity: elasticity,
3334
3330
  withLiquidBlur: withLiquidBlur,
3335
3331
  children: children
3336
3332
  }), Boolean(onClick) && jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -3355,17 +3351,9 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3355
3351
  }) ]
3356
3352
  }), withBorder && jsxRuntime.jsxs(jsxRuntime.Fragment, {
3357
3353
  children: [ jsxRuntime.jsx("span", {
3358
- className: ATOMIX_GLASS.BORDER_1_CLASS,
3359
- style: {
3360
- width: glassSize.width,
3361
- height: glassSize.height
3362
- }
3354
+ className: ATOMIX_GLASS.BORDER_1_CLASS
3363
3355
  }), jsxRuntime.jsx("span", {
3364
- className: ATOMIX_GLASS.BORDER_2_CLASS,
3365
- style: {
3366
- width: glassSize.width,
3367
- height: glassSize.height
3368
- }
3356
+ className: ATOMIX_GLASS.BORDER_2_CLASS
3369
3357
  }) ]
3370
3358
  }) ]
3371
3359
  });
@@ -4132,7 +4120,7 @@ const BreadcrumbItem = React.forwardRef((({children: children, href: href, acti
4132
4120
 
4133
4121
  BreadcrumbItem.displayName = "BreadcrumbItem";
4134
4122
 
4135
- const Breadcrumb = React.memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style, children: children}) {
4123
+ const Breadcrumb = React.memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", linkComponent: linkComponent, style: style, children: children}) {
4136
4124
  const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
4137
4125
  let content;
4138
4126
  if (items && items.length > 0)
@@ -4146,7 +4134,7 @@ const Breadcrumb = React.memo((function({items: items, divider: divider, classN
4146
4134
  onClick: item.onClick,
4147
4135
  className: item.className,
4148
4136
  style: item.style,
4149
- linkAs: LinkComponent,
4137
+ linkAs: linkComponent,
4150
4138
  children: item.label
4151
4139
  }, index);
4152
4140
  })); else {
@@ -4156,7 +4144,7 @@ const Breadcrumb = React.memo((function({items: items, divider: divider, classN
4156
4144
  if ( React.isValidElement(child)) {
4157
4145
  const isLast = index === childrenCount - 1, childProps = child.props, {active: active, linkAs: linkAs, ...otherProps} = childProps, newProps = {
4158
4146
  active: active ?? (!!isLast || void 0),
4159
- linkAs: linkAs ?? LinkComponent
4147
+ linkAs: linkAs ?? linkComponent
4160
4148
  };
4161
4149
 
4162
4150
  return React.cloneElement(child, newProps);
@@ -4332,7 +4320,7 @@ class ThemeNaming {
4332
4320
 
4333
4321
  ThemeNaming.prefix = "atomix";
4334
4322
 
4335
- const Button = React__default.default.memo( React.forwardRef((({label: label, children: children, onClick: onClick, variant: variant = "primary", size: size = "md", disabled: disabled = !1, loading: loading = !1, loadingText: loadingText, icon: icon, iconName: iconName, iconSize: iconSize = "sm", iconPosition: iconPosition = "start", iconOnly: iconOnly = !1, rounded: rounded = !1, fullWidth: fullWidth = !1, block: block = !1, active: active = !1, selected: selected = !1, type: type = "button", className: className = "", as: Component = "button", href: href, target: target, glass: glass, onHover: onHover, onFocus: onFocus, onBlur: onBlur, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, tabIndex: tabIndex, style: style, LinkComponent: LinkComponent, ...props}, ref) => {
4323
+ const Button = React__default.default.memo( React.forwardRef((({label: label, children: children, onClick: onClick, variant: variant = "primary", size: size = "md", disabled: disabled = !1, loading: loading = !1, loadingText: loadingText, icon: icon, iconName: iconName, iconSize: iconSize = "sm", iconPosition: iconPosition = "start", iconOnly: iconOnly = !1, rounded: rounded = !1, fullWidth: fullWidth = !1, block: block = !1, active: active = !1, selected: selected = !1, type: type = "button", className: className = "", as: Component = "button", href: href, target: target, glass: glass, onHover: onHover, onFocus: onFocus, onBlur: onBlur, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, tabIndex: tabIndex, style: style, linkComponent: linkComponent, ...props}, ref) => {
4336
4324
  const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = iconName ? jsxRuntime.jsx(Icon, {
4337
4325
  name: iconName,
4338
4326
  size: iconSize
@@ -4383,12 +4371,12 @@ const Button = React__default.default.memo( React.forwardRef((({label: label, c
4383
4371
  let content;
4384
4372
  // Render as anchor if href is provided
4385
4373
  if (shouldRenderAsLink)
4386
- // Use custom LinkComponent if provided (e.g., Next.js Link)
4387
- if (LinkComponent) {
4388
- const LinkComp = LinkComponent, linkProps = {
4374
+ // Use custom linkComponent if provided (e.g., Next.js Link)
4375
+ if (linkComponent) {
4376
+ const LinkComp = linkComponent, linkProps = {
4389
4377
  ...buttonProps,
4390
4378
  ref: ref,
4391
- // LinkComponent usually forwards ref to anchor
4379
+ // linkComponent usually forwards ref to anchor
4392
4380
  href: href,
4393
4381
  to: href,
4394
4382
  target: target,
@@ -4686,7 +4674,7 @@ header: header, image: image, imageAlt: imageAlt = "", title: title, text: text,
4686
4674
  // Interaction
4687
4675
  onClick: onClick, onHover: onHover, onFocus: onFocus, href: href, target: target,
4688
4676
  // Custom Link
4689
- LinkComponent: LinkComponent,
4677
+ linkComponent: linkComponent,
4690
4678
  // Glass
4691
4679
  glass: glass,
4692
4680
  // Accessibility
@@ -4771,8 +4759,8 @@ className: className = "", style: style, ...rest}, ref) => {
4771
4759
  // Render as anchor if href is provided
4772
4760
  if (href && !isDisabled) {
4773
4761
  let anchorElement;
4774
- if (LinkComponent) {
4775
- const LinkComp = LinkComponent;
4762
+ if (linkComponent) {
4763
+ const LinkComp = linkComponent;
4776
4764
  anchorElement = jsxRuntime.jsx(LinkComp, {
4777
4765
  ...commonProps,
4778
4766
  ref: ref,
@@ -9877,7 +9865,7 @@ DropdownTrigger.displayName = "DropdownTrigger";
9877
9865
  /**
9878
9866
  * DropdownItem component for menu items
9879
9867
  */
9880
- const DropdownItem = React.memo((({children: children, href: href, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", LinkComponent: LinkComponent, ...props}) => {
9868
+ const DropdownItem = React.memo((({children: children, href: href, target: target, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", linkComponent: linkComponent, ...props}) => {
9881
9869
  const {close: close} = React.useContext(DropdownContext), handleClick = e => {
9882
9870
  disabled ? e.preventDefault() : (onClick && onClick(e),
9883
9871
  // Always close the dropdown when an item is clicked
@@ -9885,6 +9873,7 @@ const DropdownItem = React.memo((({children: children, href: href, active: acti
9885
9873
  }, itemClasses = [ "c-dropdown__menu-item", active ? "is-active" : "", disabled ? "is-disabled" : "", className ].filter(Boolean).join(" "), linkProps = {
9886
9874
  href: href,
9887
9875
  to: href,
9876
+ target: target,
9888
9877
  className: itemClasses,
9889
9878
  onClick: handleClick,
9890
9879
  role: "menuitem",
@@ -9892,8 +9881,8 @@ const DropdownItem = React.memo((({children: children, href: href, active: acti
9892
9881
  ...props
9893
9882
  };
9894
9883
  return href && !disabled ? jsxRuntime.jsx("li", {
9895
- children: LinkComponent ? (() => {
9896
- const Component = LinkComponent;
9884
+ children: linkComponent ? (() => {
9885
+ const Component = linkComponent;
9897
9886
  return jsxRuntime.jsxs(Component, {
9898
9887
  ...linkProps,
9899
9888
  children: [ icon && jsxRuntime.jsx("span", {
@@ -12622,7 +12611,7 @@ const DEFAULT_ATOMIX_FONTS = [ {
12622
12611
  }
12623
12612
 
12624
12613
  function useSlider(options) {
12625
- const {slides: slides, slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, autoplay: autoplay, onSlideChange: onSlideChange} = options, containerRef = React.useRef(null), wrapperRef = React.useRef(null), repositioningRef = React.useRef(!1), autoplayRef = React.useRef(null), [autoplayRunning, setAutoplayRunning] = React.useState(!1), sliderStateRef = React.useRef({
12614
+ const {slides: rawSlides, slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, autoplay: autoplay, onSlideChange: onSlideChange} = options, slides = Array.isArray(rawSlides) ? rawSlides : [], containerRef = React.useRef(null), wrapperRef = React.useRef(null), repositioningRef = React.useRef(!1), autoplayRef = React.useRef(null), [autoplayRunning, setAutoplayRunning] = React.useState(!1), sliderStateRef = React.useRef({
12626
12615
  isTransitioning: !1,
12627
12616
  loop: loop,
12628
12617
  slides: slides,
@@ -13322,7 +13311,60 @@ const Textarea = React.memo( React.forwardRef((({value: value, defaultValue: de
13322
13311
 
13323
13312
  Textarea.displayName = "Textarea";
13324
13313
 
13325
- /**
13314
+ // ─── Platform Maps ───────────────────────────────────────────────
13315
+ const PLATFORM_ICON_MAP = {
13316
+ facebook: "FacebookLogo",
13317
+ twitter: "TwitterLogo",
13318
+ instagram: "InstagramLogo",
13319
+ linkedin: "LinkedinLogo",
13320
+ youtube: "YoutubeLogo",
13321
+ github: "GithubLogo",
13322
+ discord: "DiscordLogo",
13323
+ tiktok: "TiktokLogo",
13324
+ pinterest: "PinterestLogo",
13325
+ snapchat: "SnapchatLogo",
13326
+ whatsapp: "WhatsappLogo",
13327
+ telegram: "TelegramLogo",
13328
+ reddit: "RedditLogo",
13329
+ twitch: "TwitchLogo",
13330
+ spotify: "SpotifyLogo",
13331
+ dribbble: "DribbbleLogo",
13332
+ behance: "BehanceLogo",
13333
+ medium: "MediumLogo",
13334
+ dev: "DevToLogo",
13335
+ codepen: "CodepenLogo"
13336
+ }, PLATFORM_LABEL_MAP = {
13337
+ facebook: "Facebook",
13338
+ twitter: "Twitter",
13339
+ instagram: "Instagram",
13340
+ linkedin: "LinkedIn",
13341
+ youtube: "YouTube",
13342
+ github: "GitHub",
13343
+ discord: "Discord",
13344
+ tiktok: "TikTok",
13345
+ pinterest: "Pinterest",
13346
+ snapchat: "Snapchat",
13347
+ whatsapp: "WhatsApp",
13348
+ telegram: "Telegram",
13349
+ reddit: "Reddit",
13350
+ twitch: "Twitch",
13351
+ spotify: "Spotify",
13352
+ dribbble: "Dribbble",
13353
+ behance: "Behance",
13354
+ medium: "Medium",
13355
+ dev: "Dev.to",
13356
+ codepen: "CodePen"
13357
+ }, getPlatformIcon = platform => {
13358
+ const iconName = PLATFORM_ICON_MAP[platform];
13359
+ return iconName ? jsxRuntime.jsx(Icon, {
13360
+ name: iconName
13361
+ }) : jsxRuntime.jsx(Icon, {
13362
+ name: "Link"
13363
+ });
13364
+ }, FooterSocialLink = React.forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13365
+ const linkClass = [ "c-footer__social-link", `c-footer__social-link--${platform}`, `c-footer__social-link--${size}`, `c-footer__social-link--${variant}`, disabled && "c-footer__social-link--disabled", className ].filter(Boolean).join(" "), ariaLabel = label || `Follow us on ${(platform => PLATFORM_LABEL_MAP[platform] || platform)
13366
+ // ─── Component ───────────────────────────────────────────────────
13367
+ /**
13326
13368
  * FooterSocialLink component provides styled social media links with platform-specific icons.
13327
13369
  *
13328
13370
  * @example
@@ -13330,30 +13372,7 @@ Textarea.displayName = "Textarea";
13330
13372
  * <FooterSocialLink platform="twitter" url="https://twitter.com/company" />
13331
13373
  * <FooterSocialLink platform="custom" url="https://example.com" icon={<CustomIcon />} label="Custom Platform" />
13332
13374
  * ```
13333
- */
13334
- const FooterSocialLink = React.forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13335
- const linkClass = [ "c-footer__social-link", `c-footer__social-link--${platform}`, `c-footer__social-link--${size}`, `c-footer__social-link--${variant}`, disabled && "c-footer__social-link--disabled", className ].filter(Boolean).join(" "), ariaLabel = label || `Follow us on ${(platform => ({
13336
- facebook: "Facebook",
13337
- twitter: "Twitter",
13338
- instagram: "Instagram",
13339
- linkedin: "LinkedIn",
13340
- youtube: "YouTube",
13341
- github: "GitHub",
13342
- discord: "Discord",
13343
- tiktok: "TikTok",
13344
- pinterest: "Pinterest",
13345
- snapchat: "Snapchat",
13346
- whatsapp: "WhatsApp",
13347
- telegram: "Telegram",
13348
- reddit: "Reddit",
13349
- twitch: "Twitch",
13350
- spotify: "Spotify",
13351
- dribbble: "Dribbble",
13352
- behance: "Behance",
13353
- medium: "Medium",
13354
- dev: "Dev.to",
13355
- codepen: "CodePen"
13356
- }[platform] || platform))(platform)}`;
13375
+ */ (platform)}`;
13357
13376
  return jsxRuntime.jsxs("a", {
13358
13377
  ref: ref,
13359
13378
  href: disabled ? void 0 : url,
@@ -13365,35 +13384,7 @@ const FooterSocialLink = React.forwardRef((({platform: platform, url: url, icon
13365
13384
  ...props,
13366
13385
  children: [ jsxRuntime.jsx("span", {
13367
13386
  className: "c-footer__social-link-icon",
13368
- children: icon || (platform => {
13369
- const iconName = {
13370
- facebook: "FacebookLogo",
13371
- twitter: "TwitterLogo",
13372
- instagram: "InstagramLogo",
13373
- linkedin: "LinkedinLogo",
13374
- youtube: "YoutubeLogo",
13375
- github: "GithubLogo",
13376
- discord: "DiscordLogo",
13377
- tiktok: "TiktokLogo",
13378
- pinterest: "PinterestLogo",
13379
- snapchat: "SnapchatLogo",
13380
- whatsapp: "WhatsappLogo",
13381
- telegram: "TelegramLogo",
13382
- reddit: "RedditLogo",
13383
- twitch: "TwitchLogo",
13384
- spotify: "SpotifyLogo",
13385
- dribbble: "DribbbleLogo",
13386
- behance: "BehanceLogo",
13387
- medium: "MediumLogo",
13388
- dev: "DevToLogo",
13389
- codepen: "CodepenLogo"
13390
- }[platform];
13391
- return iconName ? jsxRuntime.jsx(Icon, {
13392
- name: iconName
13393
- }) : jsxRuntime.jsx(Icon, {
13394
- name: "Link"
13395
- });
13396
- })(platform)
13387
+ children: icon || getPlatformIcon(platform)
13397
13388
  }), jsxRuntime.jsx("span", {
13398
13389
  className: "c-footer__social-link-label u-visually-hidden",
13399
13390
  children: ariaLabel
@@ -13516,17 +13507,83 @@ Row.displayName = "Row";
13516
13507
  * ```
13517
13508
  */
13518
13509
  const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDescription: brandDescription, copyright: copyright, layout: layout = "columns", variant: variant = "primary", size: size = "md", showNewsletter: showNewsletter = !1, newsletterTitle: newsletterTitle = "Stay Updated", newsletterDescription: newsletterDescription = "Subscribe to our newsletter for the latest updates.", newsletterPlaceholder: newsletterPlaceholder = "Enter your email", newsletterButtonText: newsletterButtonText = "Subscribe", onNewsletterSubmit: onNewsletterSubmit, socialLinks: socialLinks = [], showBackToTop: showBackToTop = !1, backToTopText: backToTopText = "Back to Top", onBackToTop: onBackToTop, showDivider: showDivider = !0, sticky: sticky = !1, children: children, className: className = "", disabled: disabled = !1, glass: glass, ...props}, ref) => {
13519
- const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop, socialLinks: footerSocialLinks} = function(options = {}) {
13520
- const {layout: layout = FOOTER.DEFAULTS.LAYOUT, variant: variant = FOOTER.DEFAULTS.VARIANT, size: size = FOOTER.DEFAULTS.SIZE, sticky: sticky = FOOTER.DEFAULTS.STICKY, showNewsletter: showNewsletter = FOOTER.DEFAULTS.SHOW_NEWSLETTER, showBackToTop: showBackToTop = FOOTER.DEFAULTS.SHOW_BACK_TO_TOP, socialLinks: socialLinks = [], onNewsletterSubmit: onNewsletterSubmit, onBackToTop: onBackToTop, className: className = ""} = options;
13521
- // Generate footer classes
13510
+ const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, getResponsiveColumnProps: getResponsiveColumnProps, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop} = function(options = {}) {
13511
+ const {layout: layout = FOOTER.DEFAULTS.LAYOUT, variant: variant = FOOTER.DEFAULTS.VARIANT, size: size = FOOTER.DEFAULTS.SIZE, sticky: sticky = FOOTER.DEFAULTS.STICKY, showNewsletter: showNewsletter = FOOTER.DEFAULTS.SHOW_NEWSLETTER, showBackToTop: showBackToTop = FOOTER.DEFAULTS.SHOW_BACK_TO_TOP, showDivider: showDivider = FOOTER.DEFAULTS.SHOW_DIVIDER, socialLinks: socialLinks = [], onNewsletterSubmit: onNewsletterSubmit, onBackToTop: onBackToTop, glass: glass = !1, className: className = ""} = options, footerClass = React.useMemo((() => {
13512
+ const layoutKey = layout.toUpperCase(), sizeKey = size.toUpperCase();
13513
+ return [ FOOTER.CLASSES.BASE, FOOTER.CLASSES[layoutKey] || FOOTER.CLASSES.COLUMNS, `c-footer--${variant}`, FOOTER.CLASSES[sizeKey] || FOOTER.CLASSES.MD, sticky && FOOTER.CLASSES.STICKY, showNewsletter && "c-footer--with-newsletter", glass && "c-footer--glass", className ].filter(Boolean).join(" ");
13514
+ }), [ layout, variant, size, sticky, showNewsletter, glass, className ]), containerClass = FOOTER.CLASSES.CONTAINER, brandClass = FOOTER.CLASSES.BRAND, sectionsClass = React.useMemo((() => [ FOOTER.CLASSES.SECTIONS, "columns" === layout && "c-footer__sections--columns", "centered" === layout && "c-footer__sections--centered", "stacked" === layout && "c-footer__sections--stacked" ].filter(Boolean).join(" ")), [ layout ]), bottomClass = FOOTER.CLASSES.BOTTOM, columnSizes = React.useMemo((() =>
13515
+ /**
13516
+ * Resolves grid column size map for a given layout.
13517
+ */
13518
+ function(layout, showNewsletter) {
13519
+ switch (layout) {
13520
+ case "columns":
13521
+ default:
13522
+ return {
13523
+ brand: 4,
13524
+ content: showNewsletter ? 4 : 8,
13525
+ newsletter: showNewsletter ? 4 : 0
13526
+ };
13527
+
13528
+ case "centered":
13529
+ case "minimal":
13530
+ case "stacked":
13531
+ return {
13532
+ brand: 12,
13533
+ content: 12,
13534
+ newsletter: showNewsletter ? 12 : 0
13535
+ };
13536
+
13537
+ case "flexible":
13538
+ return {
13539
+ brand: "auto",
13540
+ content: "auto",
13541
+ newsletter: "auto"
13542
+ };
13543
+
13544
+ case "sidebar":
13545
+ return {
13546
+ brand: 3,
13547
+ content: 9,
13548
+ newsletter: showNewsletter ? 9 : 0
13549
+ };
13550
+
13551
+ case "wide":
13522
13552
  return {
13523
- footerClass: [ FOOTER.CLASSES.BASE, FOOTER.CLASSES[layout.toUpperCase()] || FOOTER.CLASSES.COLUMNS, `c-footer--${variant}`, FOOTER.CLASSES[size.toUpperCase()] || FOOTER.CLASSES.MD, sticky && FOOTER.CLASSES.STICKY, showNewsletter && "c-footer--with-newsletter", className ].filter(Boolean).join(" "),
13524
- containerClass: FOOTER.CLASSES.CONTAINER,
13525
- brandClass: FOOTER.CLASSES.BRAND,
13526
- sectionsClass: [ FOOTER.CLASSES.SECTIONS, "columns" === layout && "c-footer__sections--columns", "centered" === layout && "c-footer__sections--centered", "stacked" === layout && "c-footer__sections--stacked" ].filter(Boolean).join(" "),
13527
- bottomClass: FOOTER.CLASSES.BOTTOM,
13553
+ brand: 3,
13554
+ content: 6,
13555
+ newsletter: showNewsletter ? 3 : 0
13556
+ };
13557
+ }
13558
+ }
13559
+ /**
13560
+ * Computes responsive GridCol props for a given column type.
13561
+ */ (layout, showNewsletter)), [ layout, showNewsletter ]);
13562
+ // ---------- CSS class strings ----------
13563
+ return {
13564
+ // Classes
13565
+ footerClass: footerClass,
13566
+ containerClass: containerClass,
13567
+ brandClass: brandClass,
13568
+ sectionsClass: sectionsClass,
13569
+ bottomClass: bottomClass,
13570
+ // Grid helpers
13571
+ columnSizes: columnSizes,
13572
+ getResponsiveColumnProps: columnType => function(columnType, layout, columnSizes) {
13573
+ return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13574
+ xs: 12,
13575
+ sm: !0,
13576
+ md: !0
13577
+ } : {
13578
+ xs: 12,
13579
+ md: "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12
13580
+ };
13581
+ }(columnType, layout, columnSizes)
13582
+ // ---------- Handlers ----------
13583
+ ,
13584
+ // Handlers
13528
13585
  handleNewsletterSubmit: email => {
13529
- onNewsletterSubmit && onNewsletterSubmit(email);
13586
+ onNewsletterSubmit?.(email);
13530
13587
  },
13531
13588
  handleBackToTop: () => {
13532
13589
  onBackToTop ? onBackToTop() : window.scrollTo({
@@ -13534,8 +13591,11 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13534
13591
  behavior: "smooth"
13535
13592
  });
13536
13593
  },
13594
+ // Pass-through state
13537
13595
  socialLinks: socialLinks,
13538
- showNewsletter: showNewsletter
13596
+ showNewsletter: showNewsletter,
13597
+ showBackToTop: showBackToTop,
13598
+ showDivider: showDivider
13539
13599
  };
13540
13600
  }({
13541
13601
  layout: layout,
@@ -13544,73 +13604,19 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13544
13604
  sticky: sticky,
13545
13605
  showNewsletter: showNewsletter,
13546
13606
  showBackToTop: showBackToTop,
13607
+ showDivider: showDivider,
13547
13608
  socialLinks: socialLinks,
13548
13609
  onNewsletterSubmit: onNewsletterSubmit,
13549
13610
  onBackToTop: onBackToTop,
13611
+ glass: Boolean(glass),
13550
13612
  className: className
13551
- }), columnSizes = (() => {
13552
- switch (layout) {
13553
- case "columns":
13554
- default:
13555
- return {
13556
- brand: 4,
13557
- content: showNewsletter ? 4 : 8,
13558
- newsletter: showNewsletter ? 4 : 0
13559
- };
13560
-
13561
- case "centered":
13562
- case "minimal":
13563
- case "stacked":
13564
- // For stacked layout, everything takes full width but stacked vertically
13565
- return {
13566
- brand: 12,
13567
- content: 12,
13568
- newsletter: showNewsletter ? 12 : 0
13569
- };
13570
-
13571
- case "flexible":
13572
- // For flexible layout, adjust based on content
13573
- return {
13574
- brand: "auto",
13575
- content: "auto",
13576
- newsletter: "auto"
13577
- };
13578
-
13579
- case "sidebar":
13580
- // For sidebar layout, brand on left, content and newsletter on right
13581
- return {
13582
- brand: 3,
13583
- content: 9,
13584
- newsletter: showNewsletter ? 9 : 0
13585
- };
13586
-
13587
- case "wide":
13588
- // For wide layout, content takes more space
13589
- return {
13590
- brand: 3,
13591
- content: 6,
13592
- newsletter: showNewsletter ? 3 : 0
13593
- };
13594
- }
13595
- })(), getResponsiveColumnProps = columnType => {
13596
- const baseMd = "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12;
13597
- // For flexible layout, we want auto-sizing
13598
- return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13599
- xs: 12,
13600
- sm: !0,
13601
- md: !0
13602
- } : {
13603
- xs: 12,
13604
- md: baseMd
13605
- };
13606
- // For other layouts, we use specific sizes
13607
- }, footerContent = jsxRuntime.jsxs("div", {
13613
+ }), footerContent = jsxRuntime.jsxs("div", {
13608
13614
  className: containerClass,
13609
13615
  children: [ jsxRuntime.jsxs(Grid, {
13610
13616
  className: sectionsClass,
13611
13617
  alignItems: "start",
13612
13618
  justifyContent: "centered" === layout ? "center" : void 0,
13613
- children: [ (brand || brandLogo || brandDescription) && jsxRuntime.jsxs(GridCol, {
13619
+ children: [ brand || brandLogo || brandDescription ? jsxRuntime.jsxs(GridCol, {
13614
13620
  ...getResponsiveColumnProps("brand"),
13615
13621
  className: brandClass,
13616
13622
  children: [ brandLogo && jsxRuntime.jsx("div", {
@@ -13638,19 +13644,17 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13638
13644
  size: size
13639
13645
  }, `${link.platform}-${index}`)))
13640
13646
  }) ]
13641
- }), children && jsxRuntime.jsx(GridCol, {
13647
+ }) : null, children ? jsxRuntime.jsx(GridCol, {
13642
13648
  ...getResponsiveColumnProps("content"),
13643
13649
  className: "c-footer__content",
13644
13650
  children: jsxRuntime.jsx(Grid, {
13645
13651
  className: "c-footer__sections",
13646
13652
  alignItems: "centered" === layout || "stacked" === layout ? "center" : void 0,
13647
- children: React__default.default.Children.map(children, (child =>
13648
- // Check if the child is a valid React element
13649
- React__default.default.isValidElement(child) ? React__default.default.cloneElement(child, {
13653
+ children: React__default.default.Children.map(children, (child => React__default.default.isValidElement(child) ? React__default.default.cloneElement(child, {
13650
13654
  showNewsletter: showNewsletter
13651
13655
  }) : child))
13652
13656
  })
13653
- }), showNewsletter && jsxRuntime.jsxs(GridCol, {
13657
+ }) : null, showNewsletter ? jsxRuntime.jsxs(GridCol, {
13654
13658
  ...getResponsiveColumnProps("newsletter"),
13655
13659
  className: "c-footer__newsletter",
13656
13660
  children: [ jsxRuntime.jsx("h4", {
@@ -13681,32 +13685,41 @@ const Footer = React.forwardRef((({brand: brand, brandLogo: brandLogo, brandDes
13681
13685
  }) ]
13682
13686
  })
13683
13687
  }) ]
13684
- }) ]
13685
- }), (copyright || showBackToTop) && jsxRuntime.jsxs("div", {
13686
- className: bottomClass,
13687
- children: [ copyright && jsxRuntime.jsx("div", {
13688
- className: "c-footer__copyright",
13689
- children: copyright
13690
- }), showBackToTop && jsxRuntime.jsxs(Button, {
13691
- variant: "ghost",
13692
- className: "c-footer__back-to-top",
13693
- onClick: handleBackToTop,
13694
- disabled: disabled,
13695
- "aria-label": backToTopText,
13696
- children: [ jsxRuntime.jsx("span", {
13697
- className: "c-footer__back-to-top-icon",
13698
- children: "↑"
13699
- }), jsxRuntime.jsx("span", {
13700
- className: "c-footer__back-to-top-text",
13701
- children: backToTopText
13688
+ }) : null ]
13689
+ }), copyright || showBackToTop ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
13690
+ children: [ showDivider && jsxRuntime.jsx("hr", {
13691
+ className: "c-footer__divider"
13692
+ }), jsxRuntime.jsxs("div", {
13693
+ className: bottomClass,
13694
+ children: [ copyright && jsxRuntime.jsx("div", {
13695
+ className: "c-footer__copyright",
13696
+ children: copyright
13697
+ }), showBackToTop && jsxRuntime.jsxs(Button, {
13698
+ variant: "ghost",
13699
+ className: "c-footer__back-to-top",
13700
+ onClick: handleBackToTop,
13701
+ disabled: disabled,
13702
+ "aria-label": backToTopText,
13703
+ children: [ jsxRuntime.jsx("span", {
13704
+ className: "c-footer__back-to-top-icon",
13705
+ children: "↑"
13706
+ }), jsxRuntime.jsx("span", {
13707
+ className: "c-footer__back-to-top-text",
13708
+ children: backToTopText
13709
+ }) ]
13702
13710
  }) ]
13703
13711
  }) ]
13704
- }) ]
13712
+ }) : null ]
13705
13713
  });
13706
- // Calculate grid column sizes based on layout
13707
- return jsxRuntime.jsx("footer", {
13714
+ // ──────────────────────────────────────────
13715
+ // Render helpers
13716
+ // ──────────────────────────────────────────
13717
+ // ──────────────────────────────────────────
13718
+ // Root element
13719
+ // ──────────────────────────────────────────
13720
+ return jsxRuntime.jsx("footer", {
13708
13721
  ref: ref,
13709
- className: footerClass + " c-footer " + (glass ? "c-footer--glass" : ""),
13722
+ className: footerClass,
13710
13723
  ...props,
13711
13724
  children: glass ? jsxRuntime.jsx(AtomixGlass, {
13712
13725
  ...glass,
@@ -13954,7 +13967,7 @@ var layouts = Object.freeze({
13954
13967
  * </FooterSection>
13955
13968
  * ```
13956
13969
  */ const FooterSection = React.forwardRef((({title: title, icon: icon, collapsible: collapsible = !1, defaultCollapsed: defaultCollapsed = !1, showNewsletter: showNewsletter = !1, children: children, className: className = "", ...props}, ref) => {
13957
- const [isCollapsed, setIsCollapsed] = React__default.default.useState(defaultCollapsed), sectionClass = [ "c-footer__section", collapsible && "c-footer__section--collapsible", isCollapsed && "c-footer__section--collapsed", className ].filter(Boolean).join(" ");
13970
+ const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed), sectionId = title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}` : void 0, sectionClass = [ "c-footer__section", collapsible && "c-footer__section--collapsible", isCollapsed && "c-footer__section--collapsed", className ].filter(Boolean).join(" ");
13958
13971
  return jsxRuntime.jsx(GridCol, {
13959
13972
  xs: 12,
13960
13973
  md: showNewsletter ? 6 : 3,
@@ -13963,16 +13976,16 @@ var layouts = Object.freeze({
13963
13976
  ref: ref,
13964
13977
  className: sectionClass,
13965
13978
  ...props,
13966
- children: [ title && jsxRuntime.jsx("div", {
13979
+ children: [ title ? collapsible ? jsxRuntime.jsx("div", {
13967
13980
  className: "c-footer__section-header",
13968
- children: collapsible ? jsxRuntime.jsxs("button", {
13981
+ children: jsxRuntime.jsxs("button", {
13969
13982
  type: "button",
13970
13983
  className: "c-footer__section-toggle",
13971
13984
  onClick: () => {
13972
- collapsible && setIsCollapsed(!isCollapsed);
13985
+ collapsible && setIsCollapsed((prev => !prev));
13973
13986
  },
13974
13987
  "aria-expanded": !isCollapsed,
13975
- "aria-controls": `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}`,
13988
+ "aria-controls": sectionId,
13976
13989
  children: [ icon && jsxRuntime.jsx("span", {
13977
13990
  className: "c-footer__section-icon",
13978
13991
  children: icon
@@ -13983,7 +13996,10 @@ var layouts = Object.freeze({
13983
13996
  className: "c-footer__section-chevron",
13984
13997
  children: isCollapsed ? "▼" : "▲"
13985
13998
  }) ]
13986
- }) : jsxRuntime.jsxs("div", {
13999
+ })
14000
+ }) : jsxRuntime.jsx("div", {
14001
+ className: "c-footer__section-header",
14002
+ children: jsxRuntime.jsxs("div", {
13987
14003
  className: "c-footer__section-header-content",
13988
14004
  children: [ icon && jsxRuntime.jsx("span", {
13989
14005
  className: "c-footer__section-icon",
@@ -13993,12 +14009,9 @@ var layouts = Object.freeze({
13993
14009
  children: title
13994
14010
  }) ]
13995
14011
  })
13996
- }), jsxRuntime.jsx("div", {
14012
+ }) : null, jsxRuntime.jsx("div", {
13997
14013
  className: "c-footer__section-content",
13998
- id: title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}` : void 0,
13999
- style: {
14000
- display: collapsible && isCollapsed ? "none" : "flex"
14001
- },
14014
+ id: sectionId,
14002
14015
  children: children
14003
14016
  }) ]
14004
14017
  })
@@ -14017,8 +14030,8 @@ FooterSection.displayName = "FooterSection";
14017
14030
  * </FooterLink>
14018
14031
  * ```
14019
14032
  */
14020
- const FooterLink = React.forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", LinkComponent: LinkComponent, ...props}, ref) => {
14021
- const linkProps = {
14033
+ const FooterLink = React.forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", linkComponent: linkComponent, ...props}, ref) => {
14034
+ const sharedProps = {
14022
14035
  className: [ "c-footer__link", active && "c-footer__link--active", disabled && "c-footer__link--disabled", className ].filter(Boolean).join(" "),
14023
14036
  onClick: disabled ? void 0 : onClick,
14024
14037
  "aria-disabled": disabled,
@@ -14027,35 +14040,7 @@ const FooterLink = React.forwardRef((({href: href, icon: icon, external: extern
14027
14040
  rel: "noopener noreferrer"
14028
14041
  },
14029
14042
  ...props
14030
- };
14031
- if (LinkComponent) {
14032
- const Component = LinkComponent, componentProps = {
14033
- ref: ref,
14034
- ...href && !disabled ? {
14035
- href: href,
14036
- to: href
14037
- } : {},
14038
- ...linkProps
14039
- };
14040
- // Only pass href/to if the link is not disabled and href exists
14041
- return jsxRuntime.jsxs(Component, {
14042
- ...componentProps,
14043
- children: [ icon && jsxRuntime.jsx("span", {
14044
- className: "c-footer__link-icon",
14045
- children: icon
14046
- }), jsxRuntime.jsx("span", {
14047
- className: "c-footer__link-text",
14048
- children: children
14049
- }), external && jsxRuntime.jsx("span", {
14050
- className: "c-footer__link-external",
14051
- children: "↗"
14052
- }) ]
14053
- });
14054
- }
14055
- return jsxRuntime.jsxs("a", {
14056
- ref: ref,
14057
- href: disabled ? void 0 : href,
14058
- ...linkProps,
14043
+ }, linkContent = jsxRuntime.jsxs(jsxRuntime.Fragment, {
14059
14044
  children: [ icon && jsxRuntime.jsx("span", {
14060
14045
  className: "c-footer__link-icon",
14061
14046
  children: icon
@@ -14067,11 +14052,37 @@ const FooterLink = React.forwardRef((({href: href, icon: icon, external: extern
14067
14052
  children: "↗"
14068
14053
  }) ]
14069
14054
  });
14055
+ if (linkComponent) {
14056
+ const Component = linkComponent;
14057
+ return jsxRuntime.jsx(Component, {
14058
+ ref: ref,
14059
+ ...href && !disabled ? {
14060
+ href: href,
14061
+ to: href
14062
+ } : {},
14063
+ ...sharedProps,
14064
+ children: linkContent
14065
+ });
14066
+ }
14067
+ return jsxRuntime.jsx("a", {
14068
+ ref: ref,
14069
+ href: disabled ? void 0 : href,
14070
+ ...sharedProps,
14071
+ children: linkContent
14072
+ });
14070
14073
  }));
14071
14074
 
14072
14075
  FooterLink.displayName = "FooterLink";
14073
14076
 
14074
- 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 = {
14077
+ const HERO_DEFAULT_GLASS_PROPS = {
14078
+ displacementScale: 60,
14079
+ blurAmount: 3,
14080
+ saturation: 180,
14081
+ aberrationIntensity: 0,
14082
+ borderRadius: 8,
14083
+ overLight: !1,
14084
+ mode: "standard"
14085
+ }, 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 = {
14075
14086
  autoplay: !0,
14076
14087
  loop: !0,
14077
14088
  muted: !0
@@ -14114,9 +14125,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14114
14125
  }), "Your browser does not support the video tag." ]
14115
14126
  });
14116
14127
  }, renderContent = () => {
14117
- const content = jsxRuntime.jsxs("div", {
14118
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14119
- style: parts?.content?.style,
14128
+ // Build inner content elements ONCE — no duplication
14129
+ const innerElements = jsxRuntime.jsxs(jsxRuntime.Fragment, {
14120
14130
  children: [ subtitle && jsxRuntime.jsx("p", {
14121
14131
  className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14122
14132
  style: parts?.subtitle?.style,
@@ -14134,71 +14144,25 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14134
14144
  style: parts?.actions?.style,
14135
14145
  children: actions
14136
14146
  }) ]
14137
- });
14138
- // If glass is explicitly set to false, don't apply glass effect
14139
- return !1 === glass ? content :
14140
- // If glass is true or an object, apply glass effect
14141
- glass ?
14142
- // If glass is true, use default glass props
14143
- !0 === glass ? jsxRuntime.jsx("div", {
14144
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14145
- style: parts?.content?.style,
14146
- children: jsxRuntime.jsx(AtomixGlass, {
14147
- displacementScale: 60,
14148
- blurAmount: 3,
14149
- saturation: 180,
14150
- aberrationIntensity: 0,
14151
- borderRadius: 8,
14152
- overLight: !1,
14153
- mode: "standard",
14154
- children: jsxRuntime.jsxs("div", {
14147
+ }), contentBody = glass ? (() => {
14148
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
14149
+ ...HERO_DEFAULT_GLASS_PROPS,
14150
+ ...glass
14151
+ };
14152
+ return jsxRuntime.jsx(AtomixGlass, {
14153
+ ...glassProps,
14154
+ children: jsxRuntime.jsx("div", {
14155
14155
  className: "u-p-4",
14156
- children: [ subtitle && jsxRuntime.jsx("p", {
14157
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14158
- style: parts?.subtitle?.style,
14159
- children: subtitle
14160
- }), jsxRuntime.jsx(HeadingTag, {
14161
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14162
- style: parts?.title?.style,
14163
- children: title
14164
- }), text && jsxRuntime.jsx("p", {
14165
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14166
- style: parts?.text?.style,
14167
- children: text
14168
- }), actions && jsxRuntime.jsx("div", {
14169
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14170
- style: parts?.actions?.style,
14171
- children: actions
14172
- }) ]
14156
+ children: innerElements
14173
14157
  })
14174
- })
14175
- }) : jsxRuntime.jsx("div", {
14158
+ });
14159
+ })() : innerElements;
14160
+ // Conditionally wrap with AtomixGlass using the standard glass prop pattern
14161
+ return jsxRuntime.jsx("div", {
14176
14162
  className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14177
14163
  style: parts?.content?.style,
14178
- children: jsxRuntime.jsx(AtomixGlass, {
14179
- ...glass,
14180
- children: jsxRuntime.jsxs("div", {
14181
- className: "u-p-4",
14182
- children: [ subtitle && jsxRuntime.jsx("p", {
14183
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14184
- style: parts?.subtitle?.style,
14185
- children: subtitle
14186
- }), jsxRuntime.jsx(HeadingTag, {
14187
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14188
- style: parts?.title?.style,
14189
- children: title
14190
- }), text && jsxRuntime.jsx("p", {
14191
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14192
- style: parts?.text?.style,
14193
- children: text
14194
- }), actions && jsxRuntime.jsx("div", {
14195
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14196
- style: parts?.actions?.style,
14197
- children: actions
14198
- }) ]
14199
- })
14200
- })
14201
- }) : content;
14164
+ children: contentBody
14165
+ });
14202
14166
  }, renderForegroundImage = () => hasForegroundImage ? "center" === alignment ? jsxRuntime.jsx("div", {
14203
14167
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${imageColClassName || ""} ${parts?.imageWrapper?.className || ""}`.trim(),
14204
14168
  style: {
@@ -14349,35 +14313,24 @@ Hero.Title = ({children: children, className: className, level: level = "h1", ..
14349
14313
  ...props,
14350
14314
  children: children
14351
14315
  }), Hero.Content = ({children: children, className: className, style: style, glass: glass, ...props}) => {
14352
- const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim();
14353
- if (glass) {
14354
- const glassProps = "boolean" == typeof glass ? {
14355
- displacementScale: 60,
14356
- blurAmount: 3,
14357
- saturation: 180,
14358
- aberrationIntensity: 0,
14359
- borderRadius: 8,
14360
- overLight: !1,
14361
- mode: "standard"
14362
- } : glass;
14363
- return jsxRuntime.jsx("div", {
14364
- className: contentClass,
14365
- style: style,
14366
- ...props,
14367
- children: jsxRuntime.jsx(AtomixGlass, {
14368
- ...glassProps,
14369
- children: jsxRuntime.jsx("div", {
14370
- className: "u-p-4",
14371
- children: children
14372
- })
14373
- })
14316
+ const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim(), innerContent = glass ? jsxRuntime.jsx("div", {
14317
+ className: "u-p-4",
14318
+ children: children
14319
+ }) : children, wrappedContent = glass ? (() => {
14320
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
14321
+ ...HERO_DEFAULT_GLASS_PROPS,
14322
+ ...glass
14323
+ };
14324
+ return jsxRuntime.jsx(AtomixGlass, {
14325
+ ...glassProps,
14326
+ children: innerContent
14374
14327
  });
14375
- }
14328
+ })() : innerContent;
14376
14329
  return jsxRuntime.jsx("div", {
14377
14330
  className: contentClass,
14378
14331
  style: style,
14379
14332
  ...props,
14380
- children: children
14333
+ children: wrappedContent
14381
14334
  });
14382
14335
  }, Hero.Image = ({src: src, alt: alt = "", className: className, wrapperClassName: wrapperClassName, wrapperStyle: wrapperStyle, ...props}) => jsxRuntime.jsx("div", {
14383
14336
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${wrapperClassName || ""}`.trim(),
@@ -14920,7 +14873,7 @@ function setRef(ref, value) {
14920
14873
  * ```
14921
14874
  */ Nav.displayName = "Nav";
14922
14875
 
14923
- const NavItem = React.forwardRef((({children: children, dropdown: dropdown = !1, megaMenu: megaMenu = !1, active: active = !1, href: href, onClick: onClick, className: className = "", disabled: disabled = !1, "aria-expanded": ariaExpanded, LinkComponent: LinkComponent}, ref) => {
14876
+ const NavItem = React.forwardRef((({children: children, dropdown: dropdown = !1, megaMenu: megaMenu = !1, active: active = !1, href: href, target: target, onClick: onClick, className: className = "", disabled: disabled = !1, "aria-expanded": ariaExpanded, linkComponent: linkComponent}, ref) => {
14924
14877
  const {generateNavItemClass: generateNavItemClass, generateNavLinkClass: generateNavLinkClass, handleClick: handleClick} = useNavItem({
14925
14878
  dropdown: dropdown,
14926
14879
  megaMenu: megaMenu,
@@ -14960,6 +14913,7 @@ const NavItem = React.forwardRef((({children: children, dropdown: dropdown = !1
14960
14913
  ref: combinedRef,
14961
14914
  href: href || "#",
14962
14915
  to: href || "#",
14916
+ target: target,
14963
14917
  className: navLinkClass,
14964
14918
  onClick: dropdown || megaMenu ? e => {
14965
14919
  (dropdown || megaMenu) && (e.preventDefault(), setIsActive(!isActive));
@@ -14972,8 +14926,8 @@ const NavItem = React.forwardRef((({children: children, dropdown: dropdown = !1
14972
14926
  className: navItemClass,
14973
14927
  role: "menuitem",
14974
14928
  "aria-haspopup": dropdown || megaMenu,
14975
- children: [ LinkComponent ? (() => {
14976
- const Component = LinkComponent;
14929
+ children: [ linkComponent ? (() => {
14930
+ const Component = linkComponent;
14977
14931
  return jsxRuntime.jsx(Component, {
14978
14932
  ...linkProps,
14979
14933
  children: dropdown || megaMenu ? childContent[0] : children
@@ -15159,7 +15113,7 @@ SideMenuList.displayName = "SideMenuList";
15159
15113
  *
15160
15114
  * // With icon and custom link component
15161
15115
  * import Link from 'next/link';
15162
- * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} LinkComponent={Link}>
15116
+ * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} linkComponent={Link}>
15163
15117
  * Settings
15164
15118
  * </SideMenuItem>
15165
15119
  *
@@ -15174,7 +15128,7 @@ SideMenuList.displayName = "SideMenuList";
15174
15128
  * </SideMenuItem>
15175
15129
  * ```
15176
15130
  */
15177
- const SideMenuItem = React.forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, LinkComponent: LinkComponentProp}, ref) => {
15131
+ const SideMenuItem = React.forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, linkComponent: linkComponentProp}, ref) => {
15178
15132
  const {generateSideMenuItemClass: generateSideMenuItemClass, handleClick: handleClick} = useSideMenuItem({
15179
15133
  active: active,
15180
15134
  disabled: disabled,
@@ -15182,8 +15136,8 @@ const SideMenuItem = React.forwardRef((({children: children, href: href, onClic
15182
15136
  }), itemClass = generateSideMenuItemClass();
15183
15137
  // Render as link if href is provided
15184
15138
  if (href) {
15185
- if (LinkComponentProp) {
15186
- const LinkComp = LinkComponentProp, linkProps = {
15139
+ if (linkComponentProp) {
15140
+ const LinkComp = linkComponentProp, linkProps = {
15187
15141
  ref: ref,
15188
15142
  className: itemClass,
15189
15143
  onClick: disabled ? e => {
@@ -15269,7 +15223,7 @@ SideMenuItem.displayName = "SideMenuItem";
15269
15223
  * </SideMenu>
15270
15224
  * ```
15271
15225
  */
15272
- const SideMenu = React.forwardRef((({title: title, children: children, menuItems: menuItems = [], isOpen: isOpen, onToggle: onToggle, collapsible: collapsible = !0, collapsibleDesktop: collapsibleDesktop = !1, defaultCollapsedDesktop: defaultCollapsedDesktop = !1, className: className = "", style: style, disabled: disabled = !1, toggleIcon: toggleIcon, id: id, glass: glass, LinkComponent: LinkComponent}, ref) => {
15226
+ const SideMenu = React.forwardRef((({title: title, children: children, menuItems: menuItems = [], isOpen: isOpen, onToggle: onToggle, collapsible: collapsible = !0, collapsibleDesktop: collapsibleDesktop = !1, defaultCollapsedDesktop: defaultCollapsedDesktop = !1, className: className = "", style: style, disabled: disabled = !1, toggleIcon: toggleIcon, id: id, glass: glass, linkComponent: linkComponent}, ref) => {
15273
15227
  const {isOpenState: isOpenState, wrapperRef: wrapperRef, innerRef: innerRef, sideMenuRef: sideMenuRef, generateSideMenuClass: generateSideMenuClass, generateWrapperClass: generateWrapperClass, handleToggle: handleToggle} = useSideMenu({
15274
15228
  isOpen: isOpen,
15275
15229
  onToggle: onToggle,
@@ -15423,7 +15377,7 @@ const SideMenu = React.forwardRef((({title: title, children: children, menuItem
15423
15377
  active: subItem.active,
15424
15378
  disabled: subItem.disabled,
15425
15379
  icon: subItem.icon,
15426
- LinkComponent: LinkComponent,
15380
+ linkComponent: linkComponent,
15427
15381
  children: subItem.title
15428
15382
  }, subIndex)))
15429
15383
  })
@@ -15490,31 +15444,43 @@ const Menu = React.forwardRef((({children: children, className: className = "",
15490
15444
 
15491
15445
  Menu.displayName = "Menu";
15492
15446
 
15493
- const MenuItem = React.forwardRef((({children: children, href: href = "#", icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => {
15494
- const itemClass = `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`;
15447
+ const MenuItem = React.forwardRef((({children: children, href: href = "#", target: target, linkComponent: linkComponent, icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => {
15448
+ const itemClass = `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`, linkProps = {
15449
+ href: href,
15450
+ to: href,
15451
+ target: target,
15452
+ className: "c-menu__link",
15453
+ onClick: e => {
15454
+ disabled ? e.preventDefault() : onClick && onClick();
15455
+ },
15456
+ "aria-disabled": disabled,
15457
+ "aria-current": active ? "page" : void 0
15458
+ }, content = jsxRuntime.jsxs(jsxRuntime.Fragment, {
15459
+ children: [ icon && ("string" == typeof icon ? icon.startsWith("c-icon-") ? jsxRuntime.jsx(Icon, {
15460
+ name: mapIconName(icon.replace("c-icon-", "")),
15461
+ size: "sm",
15462
+ className: "c-menu__icon"
15463
+ }) : jsxRuntime.jsx("i", {
15464
+ className: `c-menu__icon ${icon}`,
15465
+ children: "string" != typeof icon && icon
15466
+ }) : jsxRuntime.jsx("span", {
15467
+ className: "c-menu__icon",
15468
+ children: icon
15469
+ })), children ]
15470
+ });
15495
15471
  return jsxRuntime.jsx("li", {
15496
15472
  ref: ref,
15497
15473
  className: itemClass,
15498
15474
  role: "menuitem",
15499
- children: jsxRuntime.jsxs("a", {
15500
- href: href,
15501
- className: "c-menu__link",
15502
- onClick: e => {
15503
- disabled ? e.preventDefault() : onClick && onClick();
15504
- },
15505
- "aria-disabled": disabled,
15506
- "aria-current": active ? "page" : void 0,
15507
- children: [ icon && ("string" == typeof icon ? icon.startsWith("c-icon-") ? jsxRuntime.jsx(Icon, {
15508
- name: mapIconName(icon.replace("c-icon-", "")),
15509
- size: "sm",
15510
- className: "c-menu__icon"
15511
- }) : jsxRuntime.jsx("i", {
15512
- className: `c-menu__icon ${icon}`,
15513
- children: "string" != typeof icon && icon
15514
- }) : jsxRuntime.jsx("span", {
15515
- className: "c-menu__icon",
15516
- children: icon
15517
- })), children ]
15475
+ children: linkComponent ? (() => {
15476
+ const Component = linkComponent;
15477
+ return jsxRuntime.jsx(Component, {
15478
+ ...linkProps,
15479
+ children: content
15480
+ });
15481
+ })() : jsxRuntime.jsx("a", {
15482
+ ...linkProps,
15483
+ children: content
15518
15484
  })
15519
15485
  });
15520
15486
  }));
@@ -15615,16 +15581,30 @@ const MegaMenuColumn = React.forwardRef((({title: title, icon: icon, children:
15615
15581
 
15616
15582
  MegaMenuColumn.displayName = "MegaMenuColumn";
15617
15583
 
15618
- const MegaMenuLink = React.forwardRef((({href: href, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => jsxRuntime.jsx("a", {
15619
- ref: ref,
15620
- href: href,
15621
- className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15622
- onClick: e => {
15623
- disabled ? e.preventDefault() : onClick && onClick();
15624
- },
15625
- "aria-disabled": disabled,
15626
- children: children
15627
- })));
15584
+ const MegaMenuLink = React.forwardRef((({href: href, target: target, linkComponent: linkComponent, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => {
15585
+ const linkProps = {
15586
+ ref: ref,
15587
+ href: href,
15588
+ to: href,
15589
+ target: target,
15590
+ className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15591
+ onClick: e => {
15592
+ disabled ? e.preventDefault() : onClick && onClick();
15593
+ },
15594
+ "aria-disabled": disabled
15595
+ };
15596
+ if (linkComponent) {
15597
+ const Component = linkComponent;
15598
+ return jsxRuntime.jsx(Component, {
15599
+ ...linkProps,
15600
+ children: children
15601
+ });
15602
+ }
15603
+ return jsxRuntime.jsx("a", {
15604
+ ...linkProps,
15605
+ children: children
15606
+ });
15607
+ }));
15628
15608
 
15629
15609
  MegaMenuLink.displayName = "MegaMenuLink";
15630
15610
 
@@ -17607,8 +17587,8 @@ const SectionIntro = ({title: title, label: label, text: text, actions: actions,
17607
17587
  SectionIntro.displayName = "SectionIntro";
17608
17588
 
17609
17589
  const Slider = React.forwardRef(((props, ref) => {
17610
- const {slides: slides = [], height: height = 300, width: width = "100%", slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, grabCursor: grabCursor = !0, autoplay: autoplay, navigation: navigation, pagination: pagination, className: className, style: style, onSlideChange: onSlideChange, ...rest} = props, slider = useSlider({
17611
- slides: slides || [],
17590
+ const {slides: slides = [], height: height = 300, width: width = "100%", slidesToShow: slidesToShow = 1, spaceBetween: spaceBetween = 0, loop: loop = !1, initialSlide: initialSlide = 0, direction: direction = "horizontal", speed: speed = 300, allowTouchMove: allowTouchMove = !0, threshold: threshold = 50, grabCursor: grabCursor = !0, autoplay: autoplay, navigation: navigation, pagination: pagination, className: className, style: style, onSlideChange: onSlideChange, ...rest} = props, validSlides = Array.isArray(slides) ? slides : [], slider = useSlider({
17591
+ slides: validSlides,
17612
17592
  slidesToShow: slidesToShow,
17613
17593
  spaceBetween: spaceBetween,
17614
17594
  loop: loop,
@@ -17620,8 +17600,8 @@ const Slider = React.forwardRef(((props, ref) => {
17620
17600
  autoplay: autoplay,
17621
17601
  onSlideChange: onSlideChange
17622
17602
  }), {containerRef: containerRef, wrapperRef: wrapperRef, allSlides: allSlides, realIndex: realIndex, translateValue: translateValue, slideWidth: slideWidth, transitioning: transitioning, touching: touching, slideNext: slideNext, slidePrev: slidePrev, goToSlide: goToSlide, canSlideNext: canSlideNext, canSlidePrev: canSlidePrev, handleTouchStart: handleTouchStart, handleTouchMove: handleTouchMove, handleTouchEnd: handleTouchEnd, loopedSlides: loopedSlides} = slider, totalWrapperWidth = React.useMemo((() => 0 === slideWidth ? 0 : allSlides.length * (slideWidth + spaceBetween) - spaceBetween), [ allSlides.length, slideWidth, spaceBetween ]);
17623
- // Hooks must be called unconditionally - before early return
17624
- if (!slides || 0 === slides.length) return jsxRuntime.jsx("div", {
17603
+ // Ensure slides is an array to prevent .map errors
17604
+ if (0 === validSlides.length) return jsxRuntime.jsx("div", {
17625
17605
  className: "c-slider c-slider--empty",
17626
17606
  style: {
17627
17607
  height: height,
@@ -17665,7 +17645,7 @@ const Slider = React.forwardRef(((props, ref) => {
17665
17645
  willChange: "transform"
17666
17646
  },
17667
17647
  children: allSlides.map(((slide, index) => jsxRuntime.jsxs("div", {
17668
- className: [ "c-slider__slide", (loop ? index % slides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17648
+ className: [ "c-slider__slide", (loop ? index % validSlides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17669
17649
  style: {
17670
17650
  width: "vertical" === direction ? "100%" : `${slideWidth}px`,
17671
17651
  height: "vertical" === direction ? `${slideWidth}px` : "100%",
@@ -17727,7 +17707,7 @@ const Slider = React.forwardRef(((props, ref) => {
17727
17707
  }) ]
17728
17708
  }), pagination && jsxRuntime.jsx("div", {
17729
17709
  className: "c-slider__pagination",
17730
- children: slides.map(((_, index) => jsxRuntime.jsx("button", {
17710
+ children: validSlides.map(((_, index) => jsxRuntime.jsx("button", {
17731
17711
  type: "button",
17732
17712
  className: "c-slider__pagination-bullet " + (index === realIndex ? "c-slider__pagination-bullet--active" : ""),
17733
17713
  onClick: () => goToSlide(index),