@shohojdhara/atomix 0.4.4 → 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 +25 -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 +2 -6
  6. package/dist/charts.js.map +1 -1
  7. package/dist/core.d.ts +4 -4
  8. package/dist/core.js +12 -16
  9. package/dist/core.js.map +1 -1
  10. package/dist/forms.js +2 -6
  11. package/dist/forms.js.map +1 -1
  12. package/dist/heavy.js +7 -11
  13. package/dist/heavy.js.map +1 -1
  14. package/dist/index.d.ts +40 -16
  15. package/dist/index.esm.js +305 -331
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +335 -347
  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 +0 -1
  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 +38 -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, {
@@ -4091,7 +4087,7 @@ const BreadcrumbItem = forwardRef((({children: children, href: href, active: ac
4091
4087
 
4092
4088
  BreadcrumbItem.displayName = "BreadcrumbItem";
4093
4089
 
4094
- 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}) {
4095
4091
  const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
4096
4092
  let content;
4097
4093
  if (items && items.length > 0)
@@ -4105,7 +4101,7 @@ const Breadcrumb = memo((function({items: items, divider: divider, className: c
4105
4101
  onClick: item.onClick,
4106
4102
  className: item.className,
4107
4103
  style: item.style,
4108
- linkAs: LinkComponent,
4104
+ linkAs: linkComponent,
4109
4105
  children: item.label
4110
4106
  }, index);
4111
4107
  })); else {
@@ -4117,7 +4113,7 @@ const Breadcrumb = memo((function({items: items, divider: divider, className: c
4117
4113
 
4118
4114
  return cloneElement(child, {
4119
4115
  active: active ?? (!!isLast || void 0),
4120
- linkAs: linkAs ?? LinkComponent
4116
+ linkAs: linkAs ?? linkComponent
4121
4117
  });
4122
4118
  }
4123
4119
  return child;
@@ -4291,7 +4287,7 @@ class ThemeNaming {
4291
4287
 
4292
4288
  ThemeNaming.prefix = "atomix";
4293
4289
 
4294
- 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) => {
4295
4291
  const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = iconName ? jsx(Icon, {
4296
4292
  name: iconName,
4297
4293
  size: iconSize
@@ -4342,12 +4338,12 @@ const Button = React.memo( forwardRef((({label: label, children: children, onCl
4342
4338
  let content;
4343
4339
  // Render as anchor if href is provided
4344
4340
  if (shouldRenderAsLink)
4345
- // Use custom LinkComponent if provided (e.g., Next.js Link)
4346
- if (LinkComponent) {
4347
- const LinkComp = LinkComponent, linkProps = {
4341
+ // Use custom linkComponent if provided (e.g., Next.js Link)
4342
+ if (linkComponent) {
4343
+ const LinkComp = linkComponent, linkProps = {
4348
4344
  ...buttonProps,
4349
4345
  ref: ref,
4350
- // LinkComponent usually forwards ref to anchor
4346
+ // linkComponent usually forwards ref to anchor
4351
4347
  href: href,
4352
4348
  to: href,
4353
4349
  target: target,
@@ -4645,7 +4641,7 @@ header: header, image: image, imageAlt: imageAlt = "", title: title, text: text,
4645
4641
  // Interaction
4646
4642
  onClick: onClick, onHover: onHover, onFocus: onFocus, href: href, target: target,
4647
4643
  // Custom Link
4648
- LinkComponent: LinkComponent,
4644
+ linkComponent: linkComponent,
4649
4645
  // Glass
4650
4646
  glass: glass,
4651
4647
  // Accessibility
@@ -4730,7 +4726,7 @@ className: className = "", style: style, ...rest}, ref) => {
4730
4726
  // Render as anchor if href is provided
4731
4727
  if (href && !isDisabled) {
4732
4728
  let anchorElement;
4733
- return anchorElement = LinkComponent ? jsx(LinkComponent, {
4729
+ return anchorElement = linkComponent ? jsx(linkComponent, {
4734
4730
  ...commonProps,
4735
4731
  ref: ref,
4736
4732
  href: href,
@@ -9821,7 +9817,7 @@ DropdownTrigger.displayName = "DropdownTrigger";
9821
9817
  /**
9822
9818
  * DropdownItem component for menu items
9823
9819
  */
9824
- 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}) => {
9825
9821
  const {close: close} = useContext(DropdownContext), handleClick = e => {
9826
9822
  disabled ? e.preventDefault() : (onClick && onClick(e),
9827
9823
  // Always close the dropdown when an item is clicked
@@ -9829,6 +9825,7 @@ const DropdownItem = memo((({children: children, href: href, active: active = !
9829
9825
  }, itemClasses = [ "c-dropdown__menu-item", active ? "is-active" : "", disabled ? "is-disabled" : "", className ].filter(Boolean).join(" "), linkProps = {
9830
9826
  href: href,
9831
9827
  to: href,
9828
+ target: target,
9832
9829
  className: itemClasses,
9833
9830
  onClick: handleClick,
9834
9831
  role: "menuitem",
@@ -9836,7 +9833,7 @@ const DropdownItem = memo((({children: children, href: href, active: active = !
9836
9833
  ...props
9837
9834
  };
9838
9835
  return jsx("li", href && !disabled ? {
9839
- children: jsxs(LinkComponent || "a", {
9836
+ children: jsxs(linkComponent || "a", {
9840
9837
  ...linkProps,
9841
9838
  children: [ icon && jsx("span", {
9842
9839
  className: "c-dropdown__menu-item-icon",
@@ -12559,7 +12556,7 @@ function useTodo(initialProps) {
12559
12556
  }
12560
12557
 
12561
12558
  function useSlider(options) {
12562
- 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({
12563
12560
  isTransitioning: !1,
12564
12561
  loop: loop,
12565
12562
  slides: slides,
@@ -13259,7 +13256,60 @@ const Textarea = memo( forwardRef((({value: value, defaultValue: defaultValue,
13259
13256
 
13260
13257
  Textarea.displayName = "Textarea";
13261
13258
 
13262
- /**
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
+ /**
13263
13313
  * FooterSocialLink component provides styled social media links with platform-specific icons.
13264
13314
  *
13265
13315
  * @example
@@ -13267,30 +13317,7 @@ Textarea.displayName = "Textarea";
13267
13317
  * <FooterSocialLink platform="twitter" url="https://twitter.com/company" />
13268
13318
  * <FooterSocialLink platform="custom" url="https://example.com" icon={<CustomIcon />} label="Custom Platform" />
13269
13319
  * ```
13270
- */
13271
- const FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon, label: label, size: size = "md", variant: variant = "default", disabled: disabled = !1, className: className = "", ...props}, ref) => {
13272
- 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 => ({
13273
- facebook: "Facebook",
13274
- twitter: "Twitter",
13275
- instagram: "Instagram",
13276
- linkedin: "LinkedIn",
13277
- youtube: "YouTube",
13278
- github: "GitHub",
13279
- discord: "Discord",
13280
- tiktok: "TikTok",
13281
- pinterest: "Pinterest",
13282
- snapchat: "Snapchat",
13283
- whatsapp: "WhatsApp",
13284
- telegram: "Telegram",
13285
- reddit: "Reddit",
13286
- twitch: "Twitch",
13287
- spotify: "Spotify",
13288
- dribbble: "Dribbble",
13289
- behance: "Behance",
13290
- medium: "Medium",
13291
- dev: "Dev.to",
13292
- codepen: "CodePen"
13293
- }[platform] || platform))(platform)}`;
13320
+ */ (platform)}`;
13294
13321
  return jsxs("a", {
13295
13322
  ref: ref,
13296
13323
  href: disabled ? void 0 : url,
@@ -13302,35 +13329,7 @@ const FooterSocialLink = forwardRef((({platform: platform, url: url, icon: icon
13302
13329
  ...props,
13303
13330
  children: [ jsx("span", {
13304
13331
  className: "c-footer__social-link-icon",
13305
- children: icon || (platform => {
13306
- const iconName = {
13307
- facebook: "FacebookLogo",
13308
- twitter: "TwitterLogo",
13309
- instagram: "InstagramLogo",
13310
- linkedin: "LinkedinLogo",
13311
- youtube: "YoutubeLogo",
13312
- github: "GithubLogo",
13313
- discord: "DiscordLogo",
13314
- tiktok: "TiktokLogo",
13315
- pinterest: "PinterestLogo",
13316
- snapchat: "SnapchatLogo",
13317
- whatsapp: "WhatsappLogo",
13318
- telegram: "TelegramLogo",
13319
- reddit: "RedditLogo",
13320
- twitch: "TwitchLogo",
13321
- spotify: "SpotifyLogo",
13322
- dribbble: "DribbbleLogo",
13323
- behance: "BehanceLogo",
13324
- medium: "MediumLogo",
13325
- dev: "DevToLogo",
13326
- codepen: "CodepenLogo"
13327
- }[platform];
13328
- return jsx(Icon, iconName ? {
13329
- name: iconName
13330
- } : {
13331
- name: "Link"
13332
- });
13333
- })(platform)
13332
+ children: icon || getPlatformIcon(platform)
13334
13333
  }), jsx("span", {
13335
13334
  className: "c-footer__social-link-label u-visually-hidden",
13336
13335
  children: ariaLabel
@@ -13453,17 +13452,83 @@ Row.displayName = "Row";
13453
13452
  * ```
13454
13453
  */
13455
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) => {
13456
- const {footerClass: footerClass, containerClass: containerClass, brandClass: brandClass, sectionsClass: sectionsClass, bottomClass: bottomClass, handleNewsletterSubmit: handleNewsletterSubmit, handleBackToTop: handleBackToTop, socialLinks: footerSocialLinks} = function(options = {}) {
13457
- 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;
13458
- // 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":
13459
13476
  return {
13460
- 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(" "),
13461
- containerClass: FOOTER.CLASSES.CONTAINER,
13462
- brandClass: FOOTER.CLASSES.BRAND,
13463
- 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(" "),
13464
- bottomClass: FOOTER.CLASSES.BOTTOM,
13477
+ brand: 12,
13478
+ content: 12,
13479
+ newsletter: showNewsletter ? 12 : 0
13480
+ };
13481
+
13482
+ case "flexible":
13483
+ return {
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
13465
13530
  handleNewsletterSubmit: email => {
13466
- onNewsletterSubmit && onNewsletterSubmit(email);
13531
+ onNewsletterSubmit?.(email);
13467
13532
  },
13468
13533
  handleBackToTop: () => {
13469
13534
  onBackToTop ? onBackToTop() : window.scrollTo({
@@ -13471,8 +13536,11 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13471
13536
  behavior: "smooth"
13472
13537
  });
13473
13538
  },
13539
+ // Pass-through state
13474
13540
  socialLinks: socialLinks,
13475
- showNewsletter: showNewsletter
13541
+ showNewsletter: showNewsletter,
13542
+ showBackToTop: showBackToTop,
13543
+ showDivider: showDivider
13476
13544
  };
13477
13545
  }({
13478
13546
  layout: layout,
@@ -13481,73 +13549,19 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13481
13549
  sticky: sticky,
13482
13550
  showNewsletter: showNewsletter,
13483
13551
  showBackToTop: showBackToTop,
13552
+ showDivider: showDivider,
13484
13553
  socialLinks: socialLinks,
13485
13554
  onNewsletterSubmit: onNewsletterSubmit,
13486
13555
  onBackToTop: onBackToTop,
13556
+ glass: Boolean(glass),
13487
13557
  className: className
13488
- }), columnSizes = (() => {
13489
- switch (layout) {
13490
- case "columns":
13491
- default:
13492
- return {
13493
- brand: 4,
13494
- content: showNewsletter ? 4 : 8,
13495
- newsletter: showNewsletter ? 4 : 0
13496
- };
13497
-
13498
- case "centered":
13499
- case "minimal":
13500
- case "stacked":
13501
- // For stacked layout, everything takes full width but stacked vertically
13502
- return {
13503
- brand: 12,
13504
- content: 12,
13505
- newsletter: showNewsletter ? 12 : 0
13506
- };
13507
-
13508
- case "flexible":
13509
- // For flexible layout, adjust based on content
13510
- return {
13511
- brand: "auto",
13512
- content: "auto",
13513
- newsletter: "auto"
13514
- };
13515
-
13516
- case "sidebar":
13517
- // For sidebar layout, brand on left, content and newsletter on right
13518
- return {
13519
- brand: 3,
13520
- content: 9,
13521
- newsletter: showNewsletter ? 9 : 0
13522
- };
13523
-
13524
- case "wide":
13525
- // For wide layout, content takes more space
13526
- return {
13527
- brand: 3,
13528
- content: 6,
13529
- newsletter: showNewsletter ? 3 : 0
13530
- };
13531
- }
13532
- })(), getResponsiveColumnProps = columnType => {
13533
- const baseMd = "columns" === layout || "sidebar" === layout || "wide" === layout ? columnSizes[columnType] : 12;
13534
- // For flexible layout, we want auto-sizing
13535
- return "flexible" === layout && "auto" === columnSizes[columnType] ? {
13536
- xs: 12,
13537
- sm: !0,
13538
- md: !0
13539
- } : {
13540
- xs: 12,
13541
- md: baseMd
13542
- };
13543
- // For other layouts, we use specific sizes
13544
- }, footerContent = jsxs("div", {
13558
+ }), footerContent = jsxs("div", {
13545
13559
  className: containerClass,
13546
13560
  children: [ jsxs(Grid, {
13547
13561
  className: sectionsClass,
13548
13562
  alignItems: "start",
13549
13563
  justifyContent: "centered" === layout ? "center" : void 0,
13550
- children: [ (brand || brandLogo || brandDescription) && jsxs(GridCol, {
13564
+ children: [ brand || brandLogo || brandDescription ? jsxs(GridCol, {
13551
13565
  ...getResponsiveColumnProps("brand"),
13552
13566
  className: brandClass,
13553
13567
  children: [ brandLogo && jsx("div", {
@@ -13575,19 +13589,17 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13575
13589
  size: size
13576
13590
  }, `${link.platform}-${index}`)))
13577
13591
  }) ]
13578
- }), children && jsx(GridCol, {
13592
+ }) : null, children ? jsx(GridCol, {
13579
13593
  ...getResponsiveColumnProps("content"),
13580
13594
  className: "c-footer__content",
13581
13595
  children: jsx(Grid, {
13582
13596
  className: "c-footer__sections",
13583
13597
  alignItems: "centered" === layout || "stacked" === layout ? "center" : void 0,
13584
- children: React.Children.map(children, (child =>
13585
- // Check if the child is a valid React element
13586
- React.isValidElement(child) ? React.cloneElement(child, {
13598
+ children: React.Children.map(children, (child => React.isValidElement(child) ? React.cloneElement(child, {
13587
13599
  showNewsletter: showNewsletter
13588
13600
  }) : child))
13589
13601
  })
13590
- }), showNewsletter && jsxs(GridCol, {
13602
+ }) : null, showNewsletter ? jsxs(GridCol, {
13591
13603
  ...getResponsiveColumnProps("newsletter"),
13592
13604
  className: "c-footer__newsletter",
13593
13605
  children: [ jsx("h4", {
@@ -13618,32 +13630,41 @@ const Footer = forwardRef((({brand: brand, brandLogo: brandLogo, brandDescripti
13618
13630
  }) ]
13619
13631
  })
13620
13632
  }) ]
13621
- }) ]
13622
- }), (copyright || showBackToTop) && jsxs("div", {
13623
- className: bottomClass,
13624
- children: [ copyright && jsx("div", {
13625
- className: "c-footer__copyright",
13626
- children: copyright
13627
- }), showBackToTop && jsxs(Button, {
13628
- variant: "ghost",
13629
- className: "c-footer__back-to-top",
13630
- onClick: handleBackToTop,
13631
- disabled: disabled,
13632
- "aria-label": backToTopText,
13633
- children: [ jsx("span", {
13634
- className: "c-footer__back-to-top-icon",
13635
- children: "↑"
13636
- }), jsx("span", {
13637
- className: "c-footer__back-to-top-text",
13638
- 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
+ }) ]
13639
13655
  }) ]
13640
13656
  }) ]
13641
- }) ]
13657
+ }) : null ]
13642
13658
  });
13643
- // Calculate grid column sizes based on layout
13644
- return jsx("footer", {
13659
+ // ──────────────────────────────────────────
13660
+ // Render helpers
13661
+ // ──────────────────────────────────────────
13662
+ // ──────────────────────────────────────────
13663
+ // Root element
13664
+ // ──────────────────────────────────────────
13665
+ return jsx("footer", {
13645
13666
  ref: ref,
13646
- className: footerClass + " c-footer " + (glass ? "c-footer--glass" : ""),
13667
+ className: footerClass,
13647
13668
  ...props,
13648
13669
  children: glass ? jsx(AtomixGlass, {
13649
13670
  ...glass,
@@ -13881,7 +13902,7 @@ const layouts = Object.freeze( Object.defineProperty({
13881
13902
  }, Symbol.toStringTag, {
13882
13903
  value: "Module"
13883
13904
  })), FooterSection = forwardRef((({title: title, icon: icon, collapsible: collapsible = !1, defaultCollapsed: defaultCollapsed = !1, showNewsletter: showNewsletter = !1, children: children, className: className = "", ...props}, ref) => {
13884
- 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(" ");
13885
13906
  return jsx(GridCol, {
13886
13907
  xs: 12,
13887
13908
  md: showNewsletter ? 6 : 3,
@@ -13890,16 +13911,16 @@ const layouts = Object.freeze( Object.defineProperty({
13890
13911
  ref: ref,
13891
13912
  className: sectionClass,
13892
13913
  ...props,
13893
- children: [ title && jsx("div", {
13914
+ children: [ title ? jsx("div", collapsible ? {
13894
13915
  className: "c-footer__section-header",
13895
- children: collapsible ? jsxs("button", {
13916
+ children: jsxs("button", {
13896
13917
  type: "button",
13897
13918
  className: "c-footer__section-toggle",
13898
13919
  onClick: () => {
13899
- collapsible && setIsCollapsed(!isCollapsed);
13920
+ collapsible && setIsCollapsed((prev => !prev));
13900
13921
  },
13901
13922
  "aria-expanded": !isCollapsed,
13902
- "aria-controls": `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}`,
13923
+ "aria-controls": sectionId,
13903
13924
  children: [ icon && jsx("span", {
13904
13925
  className: "c-footer__section-icon",
13905
13926
  children: icon
@@ -13910,7 +13931,10 @@ const layouts = Object.freeze( Object.defineProperty({
13910
13931
  className: "c-footer__section-chevron",
13911
13932
  children: isCollapsed ? "▼" : "▲"
13912
13933
  }) ]
13913
- }) : jsxs("div", {
13934
+ })
13935
+ } : {
13936
+ className: "c-footer__section-header",
13937
+ children: jsxs("div", {
13914
13938
  className: "c-footer__section-header-content",
13915
13939
  children: [ icon && jsx("span", {
13916
13940
  className: "c-footer__section-icon",
@@ -13920,12 +13944,9 @@ const layouts = Object.freeze( Object.defineProperty({
13920
13944
  children: title
13921
13945
  }) ]
13922
13946
  })
13923
- }), jsx("div", {
13947
+ }) : null, jsx("div", {
13924
13948
  className: "c-footer__section-content",
13925
- id: title ? `footer-section-${title.toString().toLowerCase().replace(/\s+/g, "-")}` : void 0,
13926
- style: {
13927
- display: collapsible && isCollapsed ? "none" : "flex"
13928
- },
13949
+ id: sectionId,
13929
13950
  children: children
13930
13951
  }) ]
13931
13952
  })
@@ -13954,8 +13975,8 @@ const layouts = Object.freeze( Object.defineProperty({
13954
13975
  * </FooterLink>
13955
13976
  * ```
13956
13977
  */
13957
- 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) => {
13958
- 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 = {
13959
13980
  className: [ "c-footer__link", active && "c-footer__link--active", disabled && "c-footer__link--disabled", className ].filter(Boolean).join(" "),
13960
13981
  onClick: disabled ? void 0 : onClick,
13961
13982
  "aria-disabled": disabled,
@@ -13964,35 +13985,7 @@ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !
13964
13985
  rel: "noopener noreferrer"
13965
13986
  },
13966
13987
  ...props
13967
- };
13968
- if (LinkComponent) {
13969
- const Component = LinkComponent, componentProps = {
13970
- ref: ref,
13971
- ...href && !disabled ? {
13972
- href: href,
13973
- to: href
13974
- } : {},
13975
- ...linkProps
13976
- };
13977
- // Only pass href/to if the link is not disabled and href exists
13978
- return jsxs(Component, {
13979
- ...componentProps,
13980
- children: [ icon && jsx("span", {
13981
- className: "c-footer__link-icon",
13982
- children: icon
13983
- }), jsx("span", {
13984
- className: "c-footer__link-text",
13985
- children: children
13986
- }), external && jsx("span", {
13987
- className: "c-footer__link-external",
13988
- children: "↗"
13989
- }) ]
13990
- });
13991
- }
13992
- return jsxs("a", {
13993
- ref: ref,
13994
- href: disabled ? void 0 : href,
13995
- ...linkProps,
13988
+ }, linkContent = jsxs(Fragment, {
13996
13989
  children: [ icon && jsx("span", {
13997
13990
  className: "c-footer__link-icon",
13998
13991
  children: icon
@@ -14004,11 +13997,33 @@ const FooterLink = forwardRef((({href: href, icon: icon, external: external = !
14004
13997
  children: "↗"
14005
13998
  }) ]
14006
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
+ });
14007
14014
  }));
14008
14015
 
14009
14016
  FooterLink.displayName = "FooterLink";
14010
14017
 
14011
- 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 = {
14012
14027
  autoplay: !0,
14013
14028
  loop: !0,
14014
14029
  muted: !0
@@ -14051,9 +14066,8 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14051
14066
  }), "Your browser does not support the video tag." ]
14052
14067
  });
14053
14068
  }, renderContent = () => {
14054
- const content = jsxs("div", {
14055
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14056
- style: parts?.content?.style,
14069
+ // Build inner content elements ONCE — no duplication
14070
+ const innerElements = jsxs(Fragment, {
14057
14071
  children: [ subtitle && jsx("p", {
14058
14072
  className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14059
14073
  style: parts?.subtitle?.style,
@@ -14071,71 +14085,25 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
14071
14085
  style: parts?.actions?.style,
14072
14086
  children: actions
14073
14087
  }) ]
14074
- });
14075
- // If glass is explicitly set to false, don't apply glass effect
14076
- return !1 === glass ? content :
14077
- // If glass is true or an object, apply glass effect
14078
- glass ? jsx("div",
14079
- // If glass is true, use default glass props
14080
- !0 === glass ? {
14081
- className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14082
- style: parts?.content?.style,
14083
- children: jsx(AtomixGlass, {
14084
- displacementScale: 60,
14085
- blurAmount: 3,
14086
- saturation: 180,
14087
- aberrationIntensity: 0,
14088
- borderRadius: 8,
14089
- overLight: !1,
14090
- mode: "standard",
14091
- 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", {
14092
14096
  className: "u-p-4",
14093
- children: [ subtitle && jsx("p", {
14094
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14095
- style: parts?.subtitle?.style,
14096
- children: subtitle
14097
- }), jsx(HeadingTag, {
14098
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14099
- style: parts?.title?.style,
14100
- children: title
14101
- }), text && jsx("p", {
14102
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14103
- style: parts?.text?.style,
14104
- children: text
14105
- }), actions && jsx("div", {
14106
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14107
- style: parts?.actions?.style,
14108
- children: actions
14109
- }) ]
14097
+ children: innerElements
14110
14098
  })
14111
- })
14112
- } : {
14099
+ });
14100
+ })() : innerElements;
14101
+ // Conditionally wrap with AtomixGlass using the standard glass prop pattern
14102
+ return jsx("div", {
14113
14103
  className: `${HERO.SELECTORS.CONTENT.replace(".", "")} ${parts?.content?.className || ""}`.trim(),
14114
14104
  style: parts?.content?.style,
14115
- children: jsx(AtomixGlass, {
14116
- ...glass,
14117
- children: jsxs("div", {
14118
- className: "u-p-4",
14119
- children: [ subtitle && jsx("p", {
14120
- className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${parts?.subtitle?.className || ""}`.trim(),
14121
- style: parts?.subtitle?.style,
14122
- children: subtitle
14123
- }), jsx(HeadingTag, {
14124
- className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${parts?.title?.className || ""}`.trim(),
14125
- style: parts?.title?.style,
14126
- children: title
14127
- }), text && jsx("p", {
14128
- className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${parts?.text?.className || ""}`.trim(),
14129
- style: parts?.text?.style,
14130
- children: text
14131
- }), actions && jsx("div", {
14132
- className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${parts?.actions?.className || ""}`.trim(),
14133
- style: parts?.actions?.style,
14134
- children: actions
14135
- }) ]
14136
- })
14137
- })
14138
- }) : content;
14105
+ children: contentBody
14106
+ });
14139
14107
  }, renderForegroundImage = () => hasForegroundImage ? jsx("div", "center" === alignment ? {
14140
14108
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${imageColClassName || ""} ${parts?.imageWrapper?.className || ""}`.trim(),
14141
14109
  style: {
@@ -14283,35 +14251,24 @@ Hero.Title = ({children: children, className: className, level: level = "h1", ..
14283
14251
  ...props,
14284
14252
  children: children
14285
14253
  }), Hero.Content = ({children: children, className: className, style: style, glass: glass, ...props}) => {
14286
- const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim();
14287
- if (glass) {
14288
- const glassProps = "boolean" == typeof glass ? {
14289
- displacementScale: 60,
14290
- blurAmount: 3,
14291
- saturation: 180,
14292
- aberrationIntensity: 0,
14293
- borderRadius: 8,
14294
- overLight: !1,
14295
- mode: "standard"
14296
- } : glass;
14297
- return jsx("div", {
14298
- className: contentClass,
14299
- style: style,
14300
- ...props,
14301
- children: jsx(AtomixGlass, {
14302
- ...glassProps,
14303
- children: jsx("div", {
14304
- className: "u-p-4",
14305
- children: children
14306
- })
14307
- })
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
14308
14265
  });
14309
- }
14266
+ })() : innerContent;
14310
14267
  return jsx("div", {
14311
14268
  className: contentClass,
14312
14269
  style: style,
14313
14270
  ...props,
14314
- children: children
14271
+ children: wrappedContent
14315
14272
  });
14316
14273
  }, Hero.Image = ({src: src, alt: alt = "", className: className, wrapperClassName: wrapperClassName, wrapperStyle: wrapperStyle, ...props}) => jsx("div", {
14317
14274
  className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${wrapperClassName || ""}`.trim(),
@@ -14854,7 +14811,7 @@ function setRef(ref, value) {
14854
14811
  * ```
14855
14812
  */ Nav.displayName = "Nav";
14856
14813
 
14857
- 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) => {
14858
14815
  const {generateNavItemClass: generateNavItemClass, generateNavLinkClass: generateNavLinkClass, handleClick: handleClick} = useNavItem({
14859
14816
  dropdown: dropdown,
14860
14817
  megaMenu: megaMenu,
@@ -14894,6 +14851,7 @@ const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, mega
14894
14851
  ref: combinedRef,
14895
14852
  href: href || "#",
14896
14853
  to: href || "#",
14854
+ target: target,
14897
14855
  className: navLinkClass,
14898
14856
  onClick: dropdown || megaMenu ? e => {
14899
14857
  (dropdown || megaMenu) && (e.preventDefault(), setIsActive(!isActive));
@@ -14906,7 +14864,7 @@ const NavItem = forwardRef((({children: children, dropdown: dropdown = !1, mega
14906
14864
  className: navItemClass,
14907
14865
  role: "menuitem",
14908
14866
  "aria-haspopup": dropdown || megaMenu,
14909
- children: [ jsx(LinkComponent || "a", {
14867
+ children: [ jsx(linkComponent || "a", {
14910
14868
  ...linkProps,
14911
14869
  children: dropdown || megaMenu ? childContent[0] : children
14912
14870
  }), (dropdown || megaMenu) && childContent.length > 1 && childContent[1] ]
@@ -15087,7 +15045,7 @@ SideMenuList.displayName = "SideMenuList";
15087
15045
  *
15088
15046
  * // With icon and custom link component
15089
15047
  * import Link from 'next/link';
15090
- * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} LinkComponent={Link}>
15048
+ * <SideMenuItem href="/settings" icon={<Icon name="Settings" />} linkComponent={Link}>
15091
15049
  * Settings
15092
15050
  * </SideMenuItem>
15093
15051
  *
@@ -15102,7 +15060,7 @@ SideMenuList.displayName = "SideMenuList";
15102
15060
  * </SideMenuItem>
15103
15061
  * ```
15104
15062
  */
15105
- 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) => {
15106
15064
  const {generateSideMenuItemClass: generateSideMenuItemClass, handleClick: handleClick} = useSideMenuItem({
15107
15065
  active: active,
15108
15066
  disabled: disabled,
@@ -15110,7 +15068,7 @@ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onC
15110
15068
  }), itemClass = generateSideMenuItemClass();
15111
15069
  // Render as link if href is provided
15112
15070
  if (href) {
15113
- if (LinkComponentProp) {
15071
+ if (linkComponentProp) {
15114
15072
  const linkProps = {
15115
15073
  ref: ref,
15116
15074
  className: itemClass,
@@ -15127,7 +15085,7 @@ const SideMenuItem = forwardRef((({children: children, href: href, onClick: onC
15127
15085
  to: href
15128
15086
  }
15129
15087
  };
15130
- return jsxs(LinkComponentProp, {
15088
+ return jsxs(linkComponentProp, {
15131
15089
  ...linkProps,
15132
15090
  children: [ icon && jsx("span", {
15133
15091
  className: "c-side-menu__link-icon",
@@ -15197,7 +15155,7 @@ SideMenuItem.displayName = "SideMenuItem";
15197
15155
  * </SideMenu>
15198
15156
  * ```
15199
15157
  */
15200
- 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) => {
15201
15159
  const {isOpenState: isOpenState, wrapperRef: wrapperRef, innerRef: innerRef, sideMenuRef: sideMenuRef, generateSideMenuClass: generateSideMenuClass, generateWrapperClass: generateWrapperClass, handleToggle: handleToggle} = useSideMenu({
15202
15160
  isOpen: isOpen,
15203
15161
  onToggle: onToggle,
@@ -15351,7 +15309,7 @@ const SideMenu = forwardRef((({title: title, children: children, menuItems: men
15351
15309
  active: subItem.active,
15352
15310
  disabled: subItem.disabled,
15353
15311
  icon: subItem.icon,
15354
- LinkComponent: LinkComponent,
15312
+ linkComponent: linkComponent,
15355
15313
  children: subItem.title
15356
15314
  }, subIndex)))
15357
15315
  })
@@ -15418,18 +15376,18 @@ const Menu = forwardRef((({children: children, className: className = "", style
15418
15376
 
15419
15377
  Menu.displayName = "Menu";
15420
15378
 
15421
- const MenuItem = forwardRef((({children: children, href: href = "#", icon: icon, active: active = !1, disabled: disabled = !1, onClick: onClick, className: className = ""}, ref) => jsx("li", {
15422
- ref: ref,
15423
- className: `c-menu__item ${active ? "is-active" : ""} ${disabled ? "is-disabled" : ""} ${className}`,
15424
- role: "menuitem",
15425
- 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 = {
15426
15381
  href: href,
15382
+ to: href,
15383
+ target: target,
15427
15384
  className: "c-menu__link",
15428
15385
  onClick: e => {
15429
15386
  disabled ? e.preventDefault() : onClick && onClick();
15430
15387
  },
15431
15388
  "aria-disabled": disabled,
15432
- "aria-current": active ? "page" : void 0,
15389
+ "aria-current": active ? "page" : void 0
15390
+ }, content = jsxs(Fragment, {
15433
15391
  children: [ icon && ("string" == typeof icon ? icon.startsWith("c-icon-") ? jsx(Icon, {
15434
15392
  name: mapIconName(icon.replace("c-icon-", "")),
15435
15393
  size: "sm",
@@ -15441,8 +15399,17 @@ const MenuItem = forwardRef((({children: children, href: href = "#", icon: icon
15441
15399
  className: "c-menu__icon",
15442
15400
  children: icon
15443
15401
  })), children ]
15444
- })
15445
- })));
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
+ }));
15446
15413
 
15447
15414
  MenuItem.displayName = "MenuItem";
15448
15415
 
@@ -15537,16 +15504,23 @@ const MegaMenuColumn = forwardRef((({title: title, icon: icon, children: childr
15537
15504
 
15538
15505
  MegaMenuColumn.displayName = "MegaMenuColumn";
15539
15506
 
15540
- const MegaMenuLink = forwardRef((({href: href, children: children, className: className = "", disabled: disabled = !1, onClick: onClick}, ref) => jsx("a", {
15541
- ref: ref,
15542
- href: href,
15543
- className: `c-menu__subitem-link ${disabled ? "is-disabled" : ""} ${className}`,
15544
- onClick: e => {
15545
- disabled ? e.preventDefault() : onClick && onClick();
15546
- },
15547
- "aria-disabled": disabled,
15548
- children: children
15549
- })));
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
+ }));
15550
15524
 
15551
15525
  MegaMenuLink.displayName = "MegaMenuLink";
15552
15526
 
@@ -17529,8 +17503,8 @@ const SectionIntro = ({title: title, label: label, text: text, actions: actions,
17529
17503
  SectionIntro.displayName = "SectionIntro";
17530
17504
 
17531
17505
  const Slider = forwardRef(((props, ref) => {
17532
- 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({
17533
- 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,
17534
17508
  slidesToShow: slidesToShow,
17535
17509
  spaceBetween: spaceBetween,
17536
17510
  loop: loop,
@@ -17542,8 +17516,8 @@ const Slider = forwardRef(((props, ref) => {
17542
17516
  autoplay: autoplay,
17543
17517
  onSlideChange: onSlideChange
17544
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 ]);
17545
- // Hooks must be called unconditionally - before early return
17546
- 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", {
17547
17521
  className: "c-slider c-slider--empty",
17548
17522
  style: {
17549
17523
  height: height,
@@ -17587,7 +17561,7 @@ const Slider = forwardRef(((props, ref) => {
17587
17561
  willChange: "transform"
17588
17562
  },
17589
17563
  children: allSlides.map(((slide, index) => jsxs("div", {
17590
- 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(" "),
17591
17565
  style: {
17592
17566
  width: "vertical" === direction ? "100%" : `${slideWidth}px`,
17593
17567
  height: "vertical" === direction ? `${slideWidth}px` : "100%",
@@ -17649,7 +17623,7 @@ const Slider = forwardRef(((props, ref) => {
17649
17623
  }) ]
17650
17624
  }), pagination && jsx("div", {
17651
17625
  className: "c-slider__pagination",
17652
- children: slides.map(((_, index) => jsx("button", {
17626
+ children: validSlides.map(((_, index) => jsx("button", {
17653
17627
  type: "button",
17654
17628
  className: "c-slider__pagination-bullet " + (index === realIndex ? "c-slider__pagination-bullet--active" : ""),
17655
17629
  onClick: () => goToSlide(index),