@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.esm.js CHANGED
@@ -2198,7 +2198,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
2198
2198
  }, 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 = {
2199
2199
  width: 0,
2200
2200
  height: 0
2201
- }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, elasticity: elasticity = 0, contentRef: contentRef}, ref) => {
2201
+ }, onClick: onClick, mode: mode = "standard", effectiveWithoutEffects: effectiveWithoutEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", withLiquidBlur: withLiquidBlur = !1, contentRef: contentRef}, ref) => {
2202
2202
  // Generate a stable, deterministic ID for SSR compatibility
2203
2203
  // Use a module-level counter that's consistent across server and client
2204
2204
  const filterId = useMemo((() => "atomix-glass-filter-" + ++idCounter), []), [shaderMapUrl, setShaderMapUrl] = useState(""), shaderGeneratorRef = useRef(null), shaderUtilsRef = useRef(null), shaderDebounceTimeoutRef = useRef(null);
@@ -2394,7 +2394,6 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
2394
2394
  children: [ jsxs("div", {
2395
2395
  className: ATOMIX_GLASS.FILTER_CLASS,
2396
2396
  style: {
2397
- zIndex: 1,
2398
2397
  position: "absolute",
2399
2398
  inset: 0
2400
2399
  },
@@ -2430,9 +2429,7 @@ const sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({childre
2430
2429
  className: ATOMIX_GLASS.CONTENT_CLASS,
2431
2430
  style: {
2432
2431
  position: "relative",
2433
- textShadow: "var(--atomix-glass-container-text-shadow)",
2434
- // Ensure content is always above the filter layer (zIndex 1)
2435
- zIndex: elasticity > 0 ? 100 : 2
2432
+ textShadow: "var(--atomix-glass-container-text-shadow)"
2436
2433
  },
2437
2434
  children: children
2438
2435
  }) ]
@@ -3305,7 +3302,6 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3305
3302
  effectiveWithoutEffects: effectiveWithoutEffects,
3306
3303
  effectiveReducedMotion: effectiveReducedMotion,
3307
3304
  shaderVariant: shaderVariant,
3308
- elasticity: elasticity,
3309
3305
  withLiquidBlur: withLiquidBlur,
3310
3306
  children: children
3311
3307
  }), Boolean(onClick) && jsxs(Fragment, {
@@ -3330,17 +3326,9 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, wrapperRef:
3330
3326
  }) ]
3331
3327
  }), withBorder && jsxs(Fragment, {
3332
3328
  children: [ jsx("span", {
3333
- className: ATOMIX_GLASS.BORDER_1_CLASS,
3334
- style: {
3335
- width: glassSize.width,
3336
- height: glassSize.height
3337
- }
3329
+ className: ATOMIX_GLASS.BORDER_1_CLASS
3338
3330
  }), jsx("span", {
3339
- className: ATOMIX_GLASS.BORDER_2_CLASS,
3340
- style: {
3341
- width: glassSize.width,
3342
- height: glassSize.height
3343
- }
3331
+ className: ATOMIX_GLASS.BORDER_2_CLASS
3344
3332
  }) ]
3345
3333
  }) ]
3346
3334
  });
@@ -4099,7 +4087,7 @@ const BreadcrumbItem = forwardRef((({children: children, href: href, active: ac
4099
4087
 
4100
4088
  BreadcrumbItem.displayName = "BreadcrumbItem";
4101
4089
 
4102
- const Breadcrumb = memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style, children: children}) {
4090
+ const Breadcrumb = memo((function({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", linkComponent: linkComponent, style: style, children: children}) {
4103
4091
  const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
4104
4092
  let content;
4105
4093
  if (items && items.length > 0)
@@ -4113,7 +4101,7 @@ const Breadcrumb = memo((function({items: items, divider: divider, className: c
4113
4101
  onClick: item.onClick,
4114
4102
  className: item.className,
4115
4103
  style: item.style,
4116
- linkAs: LinkComponent,
4104
+ linkAs: linkComponent,
4117
4105
  children: item.label
4118
4106
  }, index);
4119
4107
  })); else {
@@ -4125,7 +4113,7 @@ const Breadcrumb = memo((function({items: items, divider: divider, className: c
4125
4113
 
4126
4114
  return cloneElement(child, {
4127
4115
  active: active ?? (!!isLast || void 0),
4128
- linkAs: linkAs ?? LinkComponent
4116
+ linkAs: linkAs ?? linkComponent
4129
4117
  });
4130
4118
  }
4131
4119
  return child;
@@ -4299,7 +4287,7 @@ class ThemeNaming {
4299
4287
 
4300
4288
  ThemeNaming.prefix = "atomix";
4301
4289
 
4302
- const Button = React.memo( 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) => {
4290
+ const Button = React.memo( 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) => {
4303
4291
  const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = iconName ? jsx(Icon, {
4304
4292
  name: iconName,
4305
4293
  size: iconSize
@@ -4350,12 +4338,12 @@ const Button = React.memo( forwardRef((({label: label, children: children, onCl
4350
4338
  let content;
4351
4339
  // Render as anchor if href is provided
4352
4340
  if (shouldRenderAsLink)
4353
- // Use custom LinkComponent if provided (e.g., Next.js Link)
4354
- if (LinkComponent) {
4355
- const LinkComp = LinkComponent, linkProps = {
4341
+ // Use custom linkComponent if provided (e.g., Next.js Link)
4342
+ if (linkComponent) {
4343
+ const LinkComp = linkComponent, linkProps = {
4356
4344
  ...buttonProps,
4357
4345
  ref: ref,
4358
- // LinkComponent usually forwards ref to anchor
4346
+ // linkComponent usually forwards ref to anchor
4359
4347
  href: href,
4360
4348
  to: href,
4361
4349
  target: target,
@@ -4653,7 +4641,7 @@ header: header, image: image, imageAlt: imageAlt = "", title: title, text: text,
4653
4641
  // Interaction
4654
4642
  onClick: onClick, onHover: onHover, onFocus: onFocus, href: href, target: target,
4655
4643
  // Custom Link
4656
- LinkComponent: LinkComponent,
4644
+ linkComponent: linkComponent,
4657
4645
  // Glass
4658
4646
  glass: glass,
4659
4647
  // Accessibility
@@ -4738,7 +4726,7 @@ className: className = "", style: style, ...rest}, ref) => {
4738
4726
  // Render as anchor if href is provided
4739
4727
  if (href && !isDisabled) {
4740
4728
  let anchorElement;
4741
- return anchorElement = LinkComponent ? jsx(LinkComponent, {
4729
+ return anchorElement = linkComponent ? jsx(linkComponent, {
4742
4730
  ...commonProps,
4743
4731
  ref: ref,
4744
4732
  href: href,
@@ -9829,7 +9817,7 @@ DropdownTrigger.displayName = "DropdownTrigger";
9829
9817
  /**
9830
9818
  * DropdownItem component for menu items
9831
9819
  */
9832
- const DropdownItem = memo((({children: children, href: href, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", LinkComponent: LinkComponent, ...props}) => {
9820
+ const DropdownItem = memo((({children: children, href: href, target: target, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", linkComponent: linkComponent, ...props}) => {
9833
9821
  const {close: close} = useContext(DropdownContext), handleClick = e => {
9834
9822
  disabled ? e.preventDefault() : (onClick && onClick(e),
9835
9823
  // Always close the dropdown when an item is clicked
@@ -9837,6 +9825,7 @@ const DropdownItem = memo((({children: children, href: href, active: active = !
9837
9825
  }, itemClasses = [ "c-dropdown__menu-item", active ? "is-active" : "", disabled ? "is-disabled" : "", className ].filter(Boolean).join(" "), linkProps = {
9838
9826
  href: href,
9839
9827
  to: href,
9828
+ target: target,
9840
9829
  className: itemClasses,
9841
9830
  onClick: handleClick,
9842
9831
  role: "menuitem",
@@ -9844,7 +9833,7 @@ const DropdownItem = memo((({children: children, href: href, active: active = !
9844
9833
  ...props
9845
9834
  };
9846
9835
  return jsx("li", href && !disabled ? {
9847
- children: jsxs(LinkComponent || "a", {
9836
+ children: jsxs(linkComponent || "a", {
9848
9837
  ...linkProps,
9849
9838
  children: [ icon && jsx("span", {
9850
9839
  className: "c-dropdown__menu-item-icon",
@@ -12567,7 +12556,7 @@ function useTodo(initialProps) {
12567
12556
  }
12568
12557
 
12569
12558
  function useSlider(options) {
12570
- 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 = useRef(null), wrapperRef = useRef(null), repositioningRef = useRef(!1), autoplayRef = useRef(null), [autoplayRunning, setAutoplayRunning] = useState(!1), sliderStateRef = useRef({
12559
+ 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 = useRef(null), wrapperRef = useRef(null), repositioningRef = useRef(!1), autoplayRef = useRef(null), [autoplayRunning, setAutoplayRunning] = useState(!1), sliderStateRef = useRef({
12571
12560
  isTransitioning: !1,
12572
12561
  loop: loop,
12573
12562
  slides: slides,
@@ -13267,7 +13256,60 @@ const Textarea = memo( forwardRef((({value: value, defaultValue: defaultValue,
13267
13256
 
13268
13257
  Textarea.displayName = "Textarea";
13269
13258
 
13270
- /**
13259
+ // ─── Platform Maps ───────────────────────────────────────────────
13260
+ const PLATFORM_ICON_MAP = {
13261
+ facebook: "FacebookLogo",
13262
+ twitter: "TwitterLogo",
13263
+ instagram: "InstagramLogo",
13264
+ linkedin: "LinkedinLogo",
13265
+ youtube: "YoutubeLogo",
13266
+ github: "GithubLogo",
13267
+ discord: "DiscordLogo",
13268
+ tiktok: "TiktokLogo",
13269
+ pinterest: "PinterestLogo",
13270
+ snapchat: "SnapchatLogo",
13271
+ whatsapp: "WhatsappLogo",
13272
+ telegram: "TelegramLogo",
13273
+ reddit: "RedditLogo",
13274
+ twitch: "TwitchLogo",
13275
+ spotify: "SpotifyLogo",
13276
+ dribbble: "DribbbleLogo",
13277
+ behance: "BehanceLogo",
13278
+ medium: "MediumLogo",
13279
+ dev: "DevToLogo",
13280
+ codepen: "CodepenLogo"
13281
+ }, PLATFORM_LABEL_MAP = {
13282
+ facebook: "Facebook",
13283
+ twitter: "Twitter",
13284
+ instagram: "Instagram",
13285
+ linkedin: "LinkedIn",
13286
+ youtube: "YouTube",
13287
+ github: "GitHub",
13288
+ discord: "Discord",
13289
+ tiktok: "TikTok",
13290
+ pinterest: "Pinterest",
13291
+ snapchat: "Snapchat",
13292
+ whatsapp: "WhatsApp",
13293
+ telegram: "Telegram",
13294
+ reddit: "Reddit",
13295
+ twitch: "Twitch",
13296
+ spotify: "Spotify",
13297
+ dribbble: "Dribbble",
13298
+ behance: "Behance",
13299
+ medium: "Medium",
13300
+ dev: "Dev.to",
13301
+ codepen: "CodePen"
13302
+ }, getPlatformIcon = platform => {
13303
+ const iconName = PLATFORM_ICON_MAP[platform];
13304
+ return jsx(Icon, iconName ? {
13305
+ name: iconName
13306
+ } : {
13307
+ name: "Link"
13308
+ });
13309
+ }, FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13310
+ 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)
13311
+ // ─── Component ───────────────────────────────────────────────────
13312
+ /**
13271
13313
  * FooterSocialLink component provides styled social media links with platform-specific icons.
13272
13314
  *
13273
13315
  * @example
@@ -13275,30 +13317,7 @@ Textarea.displayName = "Textarea";
13275
13317
  * <FooterSocialLink platform="twitter" url="https://twitter.com/company" />
13276
13318
  * <FooterSocialLink platform="custom" url="https://example.com" icon={<CustomIcon />} label="Custom Platform" />
13277
13319
  * ```
13278
- */
13279
- const FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13280
- 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 => ({
13281
- facebook: "Facebook",
13282
- twitter: "Twitter",
13283
- instagram: "Instagram",
13284
- linkedin: "LinkedIn",
13285
- youtube: "YouTube",
13286
- github: "GitHub",
13287
- discord: "Discord",
13288
- tiktok: "TikTok",
13289
- pinterest: "Pinterest",
13290
- snapchat: "Snapchat",
13291
- whatsapp: "WhatsApp",
13292
- telegram: "Telegram",
13293
- reddit: "Reddit",
13294
- twitch: "Twitch",
13295
- spotify: "Spotify",
13296
- dribbble: "Dribbble",
13297
- behance: "Behance",
13298
- medium: "Medium",
13299
- dev: "Dev.to",
13300
- codepen: "CodePen"
13301
- }[platform] || platform))(platform)}`;
13320
+ */ (platform)}`;
13302
13321
  return jsxs("a", {
13303
13322
  ref: ref,
13304
13323
  href: disabled ? void 0 : url,
@@ -13310,35 +13329,7 @@ const FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon
13310
13329
  ...props,
13311
13330
  children: [ jsx("span", {
13312
13331
  className: "c-footer__social-link-icon",
13313
- children: icon || (platform => {
13314
- const iconName = {
13315
- facebook: "FacebookLogo",
13316
- twitter: "TwitterLogo",
13317
- instagram: "InstagramLogo",
13318
- linkedin: "LinkedinLogo",
13319
- youtube: "YoutubeLogo",
13320
- github: "GithubLogo",
13321
- discord: "DiscordLogo",
13322
- tiktok: "TiktokLogo",
13323
- pinterest: "PinterestLogo",
13324
- snapchat: "SnapchatLogo",
13325
- whatsapp: "WhatsappLogo",
13326
- telegram: "TelegramLogo",
13327
- reddit: "RedditLogo",
13328
- twitch: "TwitchLogo",
13329
- spotify: "SpotifyLogo",
13330
- dribbble: "DribbbleLogo",
13331
- behance: "BehanceLogo",
13332
- medium: "MediumLogo",
13333
- dev: "DevToLogo",
13334
- codepen: "CodepenLogo"
13335
- }[platform];
13336
- return jsx(Icon, iconName ? {
13337
- name: iconName
13338
- } : {
13339
- name: "Link"
13340
- });
13341
- })(platform)
13332
+ children: icon || getPlatformIcon(platform)
13342
13333
  }), jsx("span", {
13343
13334
  className: "c-footer__social-link-label u-visually-hidden",
13344
13335
  children: ariaLabel
@@ -13461,17 +13452,83 @@ Row.displayName = "Row";
13461
13452
  * ```
13462
13453
  */
13463
13454
  const Footer = 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) => {
13464
- const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop, socialLinks: footerSocialLinks} = function(options = {}) {
13465
- 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;
13466
- // Generate footer classes
13455
+ const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, getResponsiveColumnProps: getResponsiveColumnProps, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop} = function(options = {}) {
13456
+ 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 = useMemo((() => {
13457
+ const layoutKey = layout.toUpperCase(), sizeKey = size.toUpperCase();
13458
+ 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(" ");
13459
+ }), [ layout, variant, size, sticky, showNewsletter, glass, className ]), containerClass = FOOTER.CLASSES.CONTAINER, brandClass = FOOTER.CLASSES.BRAND, sectionsClass = 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 = useMemo((() =>
13460
+ /**
13461
+ * Resolves grid column size map for a given layout.
13462
+ */
13463
+ function(layout, showNewsletter) {
13464
+ switch (layout) {
13465
+ case "columns":
13466
+ default:
13467
+ return {
13468
+ brand: 4,
13469
+ content: showNewsletter ? 4 : 8,
13470
+ newsletter: showNewsletter ? 4 : 0
13471
+ };
13472
+
13473
+ case "centered":
13474
+ case "minimal":
13475
+ case "stacked":
13476
+ return {
13477
+ brand: 12,
13478
+ content: 12,
13479
+ newsletter: showNewsletter ? 12 : 0
13480
+ };
13481
+
13482
+ case "flexible":
13467
13483
  return {
13468
- 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(" "),
13469
- containerClass: FOOTER.CLASSES.CONTAINER,
13470
- brandClass: FOOTER.CLASSES.BRAND,
13471
- 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(" "),
13472
- bottomClass: FOOTER.CLASSES.BOTTOM,
13484
+ brand: "auto",
13485
+ content: "auto",
13486
+ newsletter: "auto"
13487
+ };
13488
+
13489
+ case "sidebar":
13490
+ return {
13491
+ brand: 3,
13492
+ content: 9,
13493
+ newsletter: showNewsletter ? 9 : 0
13494
+ };
13495
+
13496
+ case "wide":
13497
+ return {
13498
+ brand: 3,
13499
+ content: 6,
13500
+ newsletter: showNewsletter ? 3 : 0
13501
+ };
13502
+ }
13503
+ }
13504
+ /**
13505
+ * Computes responsive GridCol props for a given column type.
13506
+ */ (layout, showNewsletter)), [ layout, showNewsletter ]);
13507
+ // ---------- CSS class strings ----------
13508
+ return {
13509
+ // Classes
13510
+ footerClass: footerClass,
13511
+ containerClass: containerClass,
13512
+ brandClass: brandClass,
13513
+ sectionsClass: sectionsClass,
13514
+ bottomClass: bottomClass,
13515
+ // Grid helpers
13516
+ columnSizes: columnSizes,
13517
+ getResponsiveColumnProps: columnType => function(columnType, layout, columnSizes) {
13518
+ return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13519
+ xs: 12,
13520
+ sm: !0,
13521
+ md: !0
13522
+ } : {
13523
+ xs: 12,
13524
+ md: "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12
13525
+ };
13526
+ }(columnType, layout, columnSizes)
13527
+ // ---------- Handlers ----------
13528
+ ,
13529
+ // Handlers
13473
13530
  handleNewsletterSubmit: email => {
13474
- onNewsletterSubmit && onNewsletterSubmit(email);
13531
+ onNewsletterSubmit?.(email);
13475
13532
  },
13476
13533
  handleBackToTop: () => {
13477
13534
  onBackToTop ? onBackToTop() : window.scrollTo({
@@ -13479,8 +13536,11 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13479
13536
  behavior: "smooth"
13480
13537
  });
13481
13538
  },
13539
+ // Pass-through state
13482
13540
  socialLinks: socialLinks,
13483
- showNewsletter: showNewsletter
13541
+ showNewsletter: showNewsletter,
13542
+ showBackToTop: showBackToTop,
13543
+ showDivider: showDivider
13484
13544
  };
13485
13545
  }({
13486
13546
  layout: layout,
@@ -13489,73 +13549,19 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13489
13549
  sticky: sticky,
13490
13550
  showNewsletter: showNewsletter,
13491
13551
  showBackToTop: showBackToTop,
13552
+ showDivider: showDivider,
13492
13553
  socialLinks: socialLinks,
13493
13554
  onNewsletterSubmit: onNewsletterSubmit,
13494
13555
  onBackToTop: onBackToTop,
13556
+ glass: Boolean(glass),
13495
13557
  className: className
13496
- }), columnSizes = (() => {
13497
- switch (layout) {
13498
- case "columns":
13499
- default:
13500
- return {
13501
- brand: 4,
13502
- content: showNewsletter ? 4 : 8,
13503
- newsletter: showNewsletter ? 4 : 0
13504
- };
13505
-
13506
- case "centered":
13507
- case "minimal":
13508
- case "stacked":
13509
- // For stacked layout, everything takes full width but stacked vertically
13510
- return {
13511
- brand: 12,
13512
- content: 12,
13513
- newsletter: showNewsletter ? 12 : 0
13514
- };
13515
-
13516
- case "flexible":
13517
- // For flexible layout, adjust based on content
13518
- return {
13519
- brand: "auto",
13520
- content: "auto",
13521
- newsletter: "auto"
13522
- };
13523
-
13524
- case "sidebar":
13525
- // For sidebar layout, brand on left, content and newsletter on right
13526
- return {
13527
- brand: 3,
13528
- content: 9,
13529
- newsletter: showNewsletter ? 9 : 0
13530
- };
13531
-
13532
- case "wide":
13533
- // For wide layout, content takes more space
13534
- return {
13535
- brand: 3,
13536
- content: 6,
13537
- newsletter: showNewsletter ? 3 : 0
13538
- };
13539
- }
13540
- })(), getResponsiveColumnProps = columnType => {
13541
- const baseMd = "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12;
13542
- // For flexible layout, we want auto-sizing
13543
- return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13544
- xs: 12,
13545
- sm: !0,
13546
- md: !0
13547
- } : {
13548
- xs: 12,
13549
- md: baseMd
13550
- };
13551
- // For other layouts, we use specific sizes
13552
- }, footerContent = jsxs("div", {
13558
+ }), footerContent = jsxs("div", {
13553
13559
  className: containerClass,
13554
13560
  children: [ jsxs(Grid, {
13555
13561
  className: sectionsClass,
13556
13562
  alignItems: "start",
13557
13563
  justifyContent: "centered" === layout ? "center" : void 0,
13558
- children: [ (brand || brandLogo || brandDescription) && jsxs(GridCol, {
13564
+ children: [ brand || brandLogo || brandDescription ? jsxs(GridCol, {
13559
13565
  ...getResponsiveColumnProps("brand"),
13560
13566
  className: brandClass,
13561
13567
  children: [ brandLogo && jsx("div", {
@@ -13583,19 +13589,17 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13583
13589
  size: size
13584
13590
  }, `${link.platform}-${index}`)))
13585
13591
  }) ]
13586
- }), children && jsx(GridCol, {
13592
+ }) : null, children ? jsx(GridCol, {
13587
13593
  ...getResponsiveColumnProps("content"),
13588
13594
  className: "c-footer__content",
13589
13595
  children: jsx(Grid, {
13590
13596
  className: "c-footer__sections",
13591
13597
  alignItems: "centered" === layout || "stacked" === layout ? "center" : void 0,
13592
- children: React.Children.map(children, (child =>
13593
- // Check if the child is a valid React element
13594
- React.isValidElement(child) ? React.cloneElement(child, {
13598
+ children: React.Children.map(children, (child => React.isValidElement(child) ? React.cloneElement(child, {
13595
13599
  showNewsletter: showNewsletter
13596
13600
  }) : child))
13597
13601
  })
13598
- }), showNewsletter && jsxs(GridCol, {
13602
+ }) : null, showNewsletter ? jsxs(GridCol, {
13599
13603
  ...getResponsiveColumnProps("newsletter"),
13600
13604
  className: "c-footer__newsletter",
13601
13605
  children: [ jsx("h4", {
@@ -13626,32 +13630,41 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13626
13630
  }) ]
13627
13631
  })
13628
13632
  }) ]
13629
- }) ]
13630
- }), (copyright || showBackToTop) && jsxs("div", {
13631
- className: bottomClass,
13632
- children: [ copyright && jsx("div", {
13633
- className: "c-footer__copyright",
13634
- children: copyright
13635
- }), showBackToTop && jsxs(Button, {
13636
- variant: "ghost",
13637
- className: "c-footer__back-to-top",
13638
- onClick: handleBackToTop,
13639
- disabled: disabled,
13640
- "aria-label": backToTopText,
13641
- children: [ jsx("span", {
13642
- className: "c-footer__back-to-top-icon",
13643
- children: "↑"
13644
- }), jsx("span", {
13645
- className: "c-footer__back-to-top-text",
13646
- children: backToTopText
13633
+ }) : null ]
13634
+ }), copyright || showBackToTop ? jsxs(Fragment, {
13635
+ children: [ showDivider && jsx("hr", {
13636
+ className: "c-footer__divider"
13637
+ }), jsxs("div", {
13638
+ className: bottomClass,
13639
+ children: [ copyright && jsx("div", {
13640
+ className: "c-footer__copyright",
13641
+ children: copyright
13642
+ }), showBackToTop && jsxs(Button, {
13643
+ variant: "ghost",
13644
+ className: "c-footer__back-to-top",
13645
+ onClick: handleBackToTop,
13646
+ disabled: disabled,
13647
+ "aria-label": backToTopText,
13648
+ children: [ jsx("span", {
13649
+ className: "c-footer__back-to-top-icon",
13650
+ children: "↑"
13651
+ }), jsx("span", {
13652
+ className: "c-footer__back-to-top-text",
13653
+ children: backToTopText
13654
+ }) ]
13647
13655
  }) ]
13648
13656
  }) ]
13649
- }) ]
13657
+ }) : null ]
13650
13658
  });
13651
- // Calculate grid column sizes based on layout
13652
- return jsx("footer", {
13659
+ // ──────────────────────────────────────────
13660
+ // Render helpers
13661
+ // ──────────────────────────────────────────
13662
+ // ──────────────────────────────────────────
13663
+ // Root element
13664
+ // ──────────────────────────────────────────
13665
+ return jsx("footer", {
13653
13666
  ref: ref,
13654
- className: footerClass + " c-footer " + (glass ? "c-footer--glass" : ""),
13667
+ className: footerClass,
13655
13668
  ...props,
13656
13669
  children: glass ? jsx(AtomixGlass, {
13657
13670
  ...glass,
@@ -13889,7 +13902,7 @@ const layouts = Object.freeze( Object.defineProperty({
13889
13902
  }, Symbol.toStringTag, {
13890
13903
  value: "Module"
13891
13904
  })), FooterSection = forwardRef((({title: title, icon: icon, collapsible: collapsible = !1, defaultCollapsed: defaultCollapsed = !1, showNewsletter: showNewsletter = !1, children: children, className: className = "", ...props}, ref) => {
13892
- const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed), sectionClass = [ "c-footer__section", collapsible && "c-footer__section--collapsible", isCollapsed && "c-footer__section--collapsed", className ].filter(Boolean).join(" ");
13905
+ const [isCollapsed, setIsCollapsed] = 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(" ");
13893
13906
  return jsx(GridCol, {
13894
13907
  xs: 12,
13895
13908
  md: showNewsletter ? 6 : 3,
@@ -13898,16 +13911,16 @@ const layouts = Object.freeze( Object.defineProperty({
13898
13911
  ref: ref,
13899
13912
  className: sectionClass,
13900
13913
  ...props,
13901
- children: [ title && jsx("div", {
13914
+ children: [ title ? jsx("div", collapsible ? {
13902
13915
  className: "c-footer__section-header",
13903
- children: collapsible ? jsxs("button", {
13916
+ children: jsxs("button", {
13904
13917
  type: "button",
13905
13918
  className: "c-footer__section-toggle",
13906
13919
  onClick: () => {
13907
- collapsible && setIsCollapsed(!isCollapsed);
13920
+ collapsible && setIsCollapsed((prev => !prev));
13908
13921
  },
13909
13922
  "aria-expanded": !isCollapsed,
13910
- "aria-controls": `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}`,
13923
+ "aria-controls": sectionId,
13911
13924
  children: [ icon && jsx("span", {
13912
13925
  className: "c-footer__section-icon",
13913
13926
  children: icon
@@ -13918,7 +13931,10 @@ const layouts = Object.freeze( Object.defineProperty({
13918
13931
  className: "c-footer__section-chevron",
13919
13932
  children: isCollapsed ? "▼" : "▲"
13920
13933
  }) ]
13921
- }) : jsxs("div", {
13934
+ })
13935
+ } : {
13936
+ className: "c-footer__section-header",
13937
+ children: jsxs("div", {
13922
13938
  className: "c-footer__section-header-content",
13923
13939
  children: [ icon && jsx("span", {
13924
13940
  className: "c-footer__section-icon",
@@ -13928,12 +13944,9 @@ const layouts = Object.freeze( Object.defineProperty({
13928
13944
  children: title
13929
13945
  }) ]
13930
13946
  })
13931
- }), jsx("div", {
13947
+ }) : null, jsx("div", {
13932
13948
  className: "c-footer__section-content",
13933
- id: title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}` : void 0,
13934
- style: {
13935
- display: collapsible && isCollapsed ? "none" : "flex"
13936
- },
13949
+ id: sectionId,
13937
13950
  children: children
13938
13951
  }) ]
13939
13952
  })
@@ -13962,8 +13975,8 @@ const layouts = Object.freeze( Object.defineProperty({
13962
13975
  * </FooterLink>
13963
13976
  * ```
13964
13977
  */
13965
- const FooterLink = forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", LinkComponent: LinkComponent, ...props}, ref) => {
13966
- const linkProps = {
13978
+ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !1, active: active = !1, disabled: disabled = !1, onClick: onClick, children: children, className: className = "", linkComponent: linkComponent, ...props}, ref) => {
13979
+ const sharedProps = {
13967
13980
  className: [ "c-footer__link", active && "c-footer__link--active", disabled && "c-footer__link--disabled", className ].filter(Boolean).join(" "),
13968
13981
  onClick: disabled ? void 0 : onClick,
13969
13982
  "aria-disabled": disabled,
@@ -13972,35 +13985,7 @@ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !
13972
13985
  rel: "noopener noreferrer"
13973
13986
  },
13974
13987
  ...props
13975
- };
13976
- if (LinkComponent) {
13977
- const Component = LinkComponent, componentProps = {
13978
- ref: ref,
13979
- ...href && !disabled ? {
13980
- href: href,
13981
- to: href
13982
- } : {},
13983
- ...linkProps
13984
- };
13985
- // Only pass href/to if the link is not disabled and href exists
13986
- return jsxs(Component, {
13987
- ...componentProps,
13988
- children: [ icon && jsx("span", {
13989
- className: "c-footer__link-icon",
13990
- children: icon
13991
- }), jsx("span", {
13992
- className: "c-footer__link-text",
13993
- children: children
13994
- }), external && jsx("span", {
13995
- className: "c-footer__link-external",
13996
- children: "↗"
13997
- }) ]
13998
- });
13999
- }
14000
- return jsxs("a", {
14001
- ref: ref,
14002
- href: disabled ? void 0 : href,
14003
- ...linkProps,
13988
+ }, linkContent = jsxs(Fragment, {
14004
13989
  children: [ icon && jsx("span", {
14005
13990
  className: "c-footer__link-icon",
14006
13991
  children: icon
@@ -14012,11 +13997,33 @@ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !
14012
13997
  children: "↗"
14013
13998
  }) ]
14014
13999
  });
14000
+ return linkComponent ? jsx(linkComponent, {
14001
+ ref: ref,
14002
+ ...href && !disabled ? {
14003
+ href: href,
14004
+ to: href
14005
+ } : {},
14006
+ ...sharedProps,
14007
+ children: linkContent
14008
+ }) : jsx("a", {
14009
+ ref: ref,
14010
+ href: disabled ? void 0 : href,
14011
+ ...sharedProps,
14012
+ children: linkContent
14013
+ });
14015
14014
  }));
14016
14015
 
14017
14016
  FooterLink.displayName = "FooterLink";
14018
14017
 
14019
- 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 = {
14018
+ const HERO_DEFAULT_GLASS_PROPS = {
14019
+ displacementScale: 60,
14020
+ blurAmount: 3,
14021
+ saturation: 180,
14022
+ aberrationIntensity: 0,
14023
+ borderRadius: 8,
14024
+ overLight: !1,
14025
+ mode: "standard"
14026
+ }, 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 = {
14020
14027
  autoplay: !0,
14021
14028
  loop: !0,
14022
14029
  muted: !0
@@ -14059,9 +14066,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14059
14066
  }), "Your browser does not support the video tag." ]
14060
14067
  });
14061
14068
  }, renderContent = () => {
14062
- const content = jsxs("div", {
14063
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14064
- style: parts?.content?.style,
14069
+ // Build inner content elements ONCE — no duplication
14070
+ const innerElements = jsxs(Fragment, {
14065
14071
  children: [ subtitle && jsx("p", {
14066
14072
  className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14067
14073
  style: parts?.subtitle?.style,
@@ -14079,71 +14085,25 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14079
14085
  style: parts?.actions?.style,
14080
14086
  children: actions
14081
14087
  }) ]
14082
- });
14083
- // If glass is explicitly set to false, don't apply glass effect
14084
- return !1 === glass ? content :
14085
- // If glass is true or an object, apply glass effect
14086
- glass ? jsx("div",
14087
- // If glass is true, use default glass props
14088
- !0 === glass ? {
14089
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14090
- style: parts?.content?.style,
14091
- children: jsx(AtomixGlass, {
14092
- displacementScale: 60,
14093
- blurAmount: 3,
14094
- saturation: 180,
14095
- aberrationIntensity: 0,
14096
- borderRadius: 8,
14097
- overLight: !1,
14098
- mode: "standard",
14099
- children: jsxs("div", {
14088
+ }), contentBody = glass ? (() => {
14089
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
14090
+ ...HERO_DEFAULT_GLASS_PROPS,
14091
+ ...glass
14092
+ };
14093
+ return jsx(AtomixGlass, {
14094
+ ...glassProps,
14095
+ children: jsx("div", {
14100
14096
  className: "u-p-4",
14101
- children: [ subtitle && jsx("p", {
14102
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14103
- style: parts?.subtitle?.style,
14104
- children: subtitle
14105
- }), jsx(HeadingTag, {
14106
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14107
- style: parts?.title?.style,
14108
- children: title
14109
- }), text && jsx("p", {
14110
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14111
- style: parts?.text?.style,
14112
- children: text
14113
- }), actions && jsx("div", {
14114
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14115
- style: parts?.actions?.style,
14116
- children: actions
14117
- }) ]
14097
+ children: innerElements
14118
14098
  })
14119
- })
14120
- } : {
14099
+ });
14100
+ })() : innerElements;
14101
+ // Conditionally wrap with AtomixGlass using the standard glass prop pattern
14102
+ return jsx("div", {
14121
14103
  className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14122
14104
  style: parts?.content?.style,
14123
- children: jsx(AtomixGlass, {
14124
- ...glass,
14125
- children: jsxs("div", {
14126
- className: "u-p-4",
14127
- children: [ subtitle && jsx("p", {
14128
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14129
- style: parts?.subtitle?.style,
14130
- children: subtitle
14131
- }), jsx(HeadingTag, {
14132
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14133
- style: parts?.title?.style,
14134
- children: title
14135
- }), text && jsx("p", {
14136
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14137
- style: parts?.text?.style,
14138
- children: text
14139
- }), actions && jsx("div", {
14140
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14141
- style: parts?.actions?.style,
14142
- children: actions
14143
- }) ]
14144
- })
14145
- })
14146
- }) : content;
14105
+ children: contentBody
14106
+ });
14147
14107
  }, renderForegroundImage = () => hasForegroundImage ? jsx("div", "center" === alignment ? {
14148
14108
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${imageColClassName || ""} ${parts?.imageWrapper?.className || ""}`.trim(),
14149
14109
  style: {
@@ -14291,35 +14251,24 @@ Hero.Title = ({children: children, className: className, level: level = "h1", ..
14291
14251
  ...props,
14292
14252
  children: children
14293
14253
  }), Hero.Content = ({children: children, className: className, style: style, glass: glass, ...props}) => {
14294
- const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim();
14295
- if (glass) {
14296
- const glassProps = "boolean" == typeof glass ? {
14297
- displacementScale: 60,
14298
- blurAmount: 3,
14299
- saturation: 180,
14300
- aberrationIntensity: 0,
14301
- borderRadius: 8,
14302
- overLight: !1,
14303
- mode: "standard"
14304
- } : glass;
14305
- return jsx("div", {
14306
- className: contentClass,
14307
- style: style,
14308
- ...props,
14309
- children: jsx(AtomixGlass, {
14310
- ...glassProps,
14311
- children: jsx("div", {
14312
- className: "u-p-4",
14313
- children: children
14314
- })
14315
- })
14254
+ const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim(), innerContent = glass ? jsx("div", {
14255
+ className: "u-p-4",
14256
+ children: children
14257
+ }) : children, wrappedContent = glass ? (() => {
14258
+ const glassProps = !0 === glass ? HERO_DEFAULT_GLASS_PROPS : {
14259
+ ...HERO_DEFAULT_GLASS_PROPS,
14260
+ ...glass
14261
+ };
14262
+ return jsx(AtomixGlass, {
14263
+ ...glassProps,
14264
+ children: innerContent
14316
14265
  });
14317
- }
14266
+ })() : innerContent;
14318
14267
  return jsx("div", {
14319
14268
  className: contentClass,
14320
14269
  style: style,
14321
14270
  ...props,
14322
- children: children
14271
+ children: wrappedContent
14323
14272
  });
14324
14273
  }, Hero.Image = ({src: src, alt: alt = "", className: className, wrapperClassName: wrapperClassName, wrapperStyle: wrapperStyle, ...props}) => jsx("div", {
14325
14274
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${wrapperClassName || ""}`.trim(),
@@ -14862,7 +14811,7 @@ function setRef(ref, value) {
14862
14811
  * ```
14863
14812
  */ Nav.displayName = "Nav";
14864
14813
 
14865
- const NavItem = 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) => {
14814
+ const NavItem = 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) => {
14866
14815
  const {generateNavItemClass: generateNavItemClass, generateNavLinkClass: generateNavLinkClass, handleClick: handleClick} = useNavItem({
14867
14816
  dropdown: dropdown,
14868
14817
  megaMenu: megaMenu,
@@ -14902,6 +14851,7 @@ const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, mega
14902
14851
  ref: combinedRef,
14903
14852
  href: href || "#",
14904
14853
  to: href || "#",
14854
+ target: target,
14905
14855
  className: navLinkClass,
14906
14856
  onClick: dropdown || megaMenu ? e => {
14907
14857
  (dropdown || megaMenu) && (e.preventDefault(), setIsActive(!isActive));
@@ -14914,7 +14864,7 @@ const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, mega
14914
14864
  className: navItemClass,
14915
14865
  role: "menuitem",
14916
14866
  "aria-haspopup": dropdown || megaMenu,
14917
- children: [ jsx(LinkComponent || "a", {
14867
+ children: [ jsx(linkComponent || "a", {
14918
14868
  ...linkProps,
14919
14869
  children: dropdown || megaMenu ? childContent[0] : children
14920
14870
  }), (dropdown || megaMenu) && childContent.length > 1 && childContent[1] ]
@@ -15095,7 +15045,7 @@ SideMenuList.displayName = "SideMenuList";
15095
15045
  *
15096
15046
  * // With icon and custom link component
15097
15047
  * import Link from 'next/link';
15098
- * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} LinkComponent={Link}>
15048
+ * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} linkComponent={Link}>
15099
15049
  * Settings
15100
15050
  * </SideMenuItem>
15101
15051
  *
@@ -15110,7 +15060,7 @@ SideMenuList.displayName = "SideMenuList";
15110
15060
  * </SideMenuItem>
15111
15061
  * ```
15112
15062
  */
15113
- const SideMenuItem = forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, LinkComponent: LinkComponentProp}, ref) => {
15063
+ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onClick, active: active = !1, disabled: disabled = !1, icon: icon, className: className = "", target: target, rel: rel, linkComponent: linkComponentProp}, ref) => {
15114
15064
  const {generateSideMenuItemClass: generateSideMenuItemClass, handleClick: handleClick} = useSideMenuItem({
15115
15065
  active: active,
15116
15066
  disabled: disabled,
@@ -15118,7 +15068,7 @@ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onC
15118
15068
  }), itemClass = generateSideMenuItemClass();
15119
15069
  // Render as link if href is provided
15120
15070
  if (href) {
15121
- if (LinkComponentProp) {
15071
+ if (linkComponentProp) {
15122
15072
  const linkProps = {
15123
15073
  ref: ref,
15124
15074
  className: itemClass,
@@ -15135,7 +15085,7 @@ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onC
15135
15085
  to: href
15136
15086
  }
15137
15087
  };
15138
- return jsxs(LinkComponentProp, {
15088
+ return jsxs(linkComponentProp, {
15139
15089
  ...linkProps,
15140
15090
  children: [ icon && jsx("span", {
15141
15091
  className: "c-side-menu__link-icon",
@@ -15205,7 +15155,7 @@ SideMenuItem.displayName = "SideMenuItem";
15205
15155
  * </SideMenu>
15206
15156
  * ```
15207
15157
  */
15208
- const SideMenu = 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) => {
15158
+ const SideMenu = 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) => {
15209
15159
  const {isOpenState: isOpenState, wrapperRef: wrapperRef, innerRef: innerRef, sideMenuRef: sideMenuRef, generateSideMenuClass: generateSideMenuClass, generateWrapperClass: generateWrapperClass, handleToggle: handleToggle} = useSideMenu({
15210
15160
  isOpen: isOpen,
15211
15161
  onToggle: onToggle,
@@ -15359,7 +15309,7 @@ const SideMenu = forwardRef((({title: title, children: children, menuItems: men
15359
15309
  active: subItem.active,
15360
15310
  disabled: subItem.disabled,
15361
15311
  icon: subItem.icon,
15362
- LinkComponent: LinkComponent,
15312
+ linkComponent: linkComponent,
15363
15313
  children: subItem.title
15364
15314
  }, subIndex)))
15365
15315
  })
@@ -15426,18 +15376,18 @@ const Menu = forwardRef((({children: children, className: className = "", style
15426
15376
 
15427
15377
  Menu.displayName = "Menu";
15428
15378
 
15429
- const MenuItem = forwardRef((({children: children, href: href = "#", icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => jsx("li", {
15430
- ref: ref,
15431
- className: `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`,
15432
- role: "menuitem",
15433
- children: jsxs("a", {
15379
+ const MenuItem = forwardRef((({children: children, href: href = "#", target: target, linkComponent: linkComponent, icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => {
15380
+ const itemClass = `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`, linkProps = {
15434
15381
  href: href,
15382
+ to: href,
15383
+ target: target,
15435
15384
  className: "c-menu__link",
15436
15385
  onClick: e => {
15437
15386
  disabled ? e.preventDefault() : onClick && onClick();
15438
15387
  },
15439
15388
  "aria-disabled": disabled,
15440
- "aria-current": active ? "page" : void 0,
15389
+ "aria-current": active ? "page" : void 0
15390
+ }, content = jsxs(Fragment, {
15441
15391
  children: [ icon && ("string" == typeof icon ? icon.startsWith("c-icon-") ? jsx(Icon, {
15442
15392
  name: mapIconName(icon.replace("c-icon-", "")),
15443
15393
  size: "sm",
@@ -15449,8 +15399,17 @@ const MenuItem = forwardRef((({children: children, href: href = "#", icon: icon
15449
15399
  className: "c-menu__icon",
15450
15400
  children: icon
15451
15401
  })), children ]
15452
- })
15453
- })));
15402
+ });
15403
+ return jsx("li", {
15404
+ ref: ref,
15405
+ className: itemClass,
15406
+ role: "menuitem",
15407
+ children: jsx(linkComponent || "a", {
15408
+ ...linkProps,
15409
+ children: content
15410
+ })
15411
+ });
15412
+ }));
15454
15413
 
15455
15414
  MenuItem.displayName = "MenuItem";
15456
15415
 
@@ -15545,16 +15504,23 @@ const MegaMenuColumn = forwardRef((({title: title, icon: icon, children: childr
15545
15504
 
15546
15505
  MegaMenuColumn.displayName = "MegaMenuColumn";
15547
15506
 
15548
- const MegaMenuLink = forwardRef((({href: href, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => jsx("a", {
15549
- ref: ref,
15550
- href: href,
15551
- className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15552
- onClick: e => {
15553
- disabled ? e.preventDefault() : onClick && onClick();
15554
- },
15555
- "aria-disabled": disabled,
15556
- children: children
15557
- })));
15507
+ const MegaMenuLink = forwardRef((({href: href, target: target, linkComponent: linkComponent, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => {
15508
+ const linkProps = {
15509
+ ref: ref,
15510
+ href: href,
15511
+ to: href,
15512
+ target: target,
15513
+ className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15514
+ onClick: e => {
15515
+ disabled ? e.preventDefault() : onClick && onClick();
15516
+ },
15517
+ "aria-disabled": disabled
15518
+ };
15519
+ return jsx(linkComponent || "a", {
15520
+ ...linkProps,
15521
+ children: children
15522
+ });
15523
+ }));
15558
15524
 
15559
15525
  MegaMenuLink.displayName = "MegaMenuLink";
15560
15526
 
@@ -17537,8 +17503,8 @@ const SectionIntro = ({title: title, label: label, text: text, actions: actions,
17537
17503
  SectionIntro.displayName = "SectionIntro";
17538
17504
 
17539
17505
  const Slider = forwardRef(((props, ref) => {
17540
- 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({
17541
- slides: slides || [],
17506
+ 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({
17507
+ slides: validSlides,
17542
17508
  slidesToShow: slidesToShow,
17543
17509
  spaceBetween: spaceBetween,
17544
17510
  loop: loop,
@@ -17550,8 +17516,8 @@ const Slider = forwardRef(((props, ref) => {
17550
17516
  autoplay: autoplay,
17551
17517
  onSlideChange: onSlideChange
17552
17518
  }), {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 = useMemo((() => 0 === slideWidth ? 0 : allSlides.length * (slideWidth + spaceBetween) - spaceBetween), [ allSlides.length, slideWidth, spaceBetween ]);
17553
- // Hooks must be called unconditionally - before early return
17554
- if (!slides || 0 === slides.length) return jsx("div", {
17519
+ // Ensure slides is an array to prevent .map errors
17520
+ if (0 === validSlides.length) return jsx("div", {
17555
17521
  className: "c-slider c-slider--empty",
17556
17522
  style: {
17557
17523
  height: height,
@@ -17595,7 +17561,7 @@ const Slider = forwardRef(((props, ref) => {
17595
17561
  willChange: "transform"
17596
17562
  },
17597
17563
  children: allSlides.map(((slide, index) => jsxs("div", {
17598
- className: [ "c-slider__slide", (loop ? index % slides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17564
+ className: [ "c-slider__slide", (loop ? index % validSlides.length === realIndex : index === realIndex) && "c-slider__slide--active", slide.isClone && "c-slider__slide--duplicate" ].filter(Boolean).join(" "),
17599
17565
  style: {
17600
17566
  width: "vertical" === direction ? "100%" : `${slideWidth}px`,
17601
17567
  height: "vertical" === direction ? `${slideWidth}px` : "100%",
@@ -17657,7 +17623,7 @@ const Slider = forwardRef(((props, ref) => {
17657
17623
  }) ]
17658
17624
  }), pagination && jsx("div", {
17659
17625
  className: "c-slider__pagination",
17660
- children: slides.map(((_, index) => jsx("button", {
17626
+ children: validSlides.map(((_, index) => jsx("button", {
17661
17627
  type: "button",
17662
17628
  className: "c-slider__pagination-bullet " + (index === realIndex ? "c-slider__pagination-bullet--active" : ""),
17663
17629
  onClick: () => goToSlide(index),