@shohojdhara/atomix 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0] - 2025-12-03
11
+
10
12
  ### Added
11
13
 
12
14
  #### Theme Manager System
@@ -63,6 +65,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
63
65
  - 🎯 Works with React and vanilla JavaScript
64
66
  - 📦 Zero breaking changes to existing API
65
67
 
68
+ ## [0.2.9] - 2025-01-29
69
+
66
70
  ## [0.2.8] - 2025-01-28
67
71
 
68
72
  ## [0.2.7] - 2025-01-27
package/dist/index.d.ts CHANGED
@@ -1040,6 +1040,11 @@ interface SideMenuProps extends BaseComponentProps {
1040
1040
  * Can be a boolean to enable with default settings, or an object with AtomixGlassProps to customize the effect
1041
1041
  */
1042
1042
  glass?: boolean | Omit<AtomixGlassProps, 'children'>;
1043
+ /**
1044
+ * Optional custom link component (e.g., Next.js Link)
1045
+ * Will be passed to all SideMenuItem components
1046
+ */
1047
+ LinkComponent?: React.ElementType;
1043
1048
  }
1044
1049
  /**
1045
1050
  * SideMenuList component properties
package/dist/index.esm.js CHANGED
@@ -4289,7 +4289,10 @@ const Breadcrumb = ({ items, divider, className = '', ariaLabel = 'Breadcrumb',
4289
4289
  onClick: item.onClick,
4290
4290
  style: item.style,
4291
4291
  };
4292
- return (jsx("li", { className: itemClasses, style: item.style, children: item.href && !item.active ? (LinkComponent ? (jsx(LinkComponent, { ...linkProps, children: linkContent })) : (jsx("a", { ...linkProps, children: linkContent }))) : (jsx("span", { className: BREADCRUMB.CLASSES.LINK, children: linkContent })) }, index));
4292
+ return (jsx("li", { className: itemClasses, style: item.style, children: item.href && !item.active ? (LinkComponent ? ((() => {
4293
+ const Component = LinkComponent;
4294
+ return (jsx(Component, { ...linkProps, children: linkContent }));
4295
+ })()) : (jsx("a", { ...linkProps, children: linkContent }))) : (jsx("span", { className: BREADCRUMB.CLASSES.LINK, children: linkContent })) }, index));
4293
4296
  }) }) }));
4294
4297
  };
4295
4298
  Breadcrumb.displayName = 'Breadcrumb';
@@ -13823,7 +13826,6 @@ const Footer = forwardRef(({ brand, brandLogo, brandDescription, copyright, layo
13823
13826
  const footerContent = (jsxs("div", { className: containerClass, children: [jsxs(Grid, { className: sectionsClass, alignItems: "start", justifyContent: layout === 'centered' ? 'center' : undefined, children: [(brand || brandLogo || brandDescription) && (jsxs(GridCol, { ...getResponsiveColumnProps('brand'), className: brandClass, children: [brandLogo && (jsx("div", { className: "c-footer__brand-logo", children: typeof brandLogo === 'string' ? (jsx("img", { src: brandLogo, alt: 'Brand Logo' })) : (brandLogo) })), brand && (jsx("div", { className: "c-footer__brand-name", children: typeof brand === 'string' ? jsx("h3", { children: brand }) : brand })), brandDescription && (jsx("div", { className: "c-footer__brand-description", children: brandDescription })), socialLinks.length > 0 && (jsx("div", { className: "c-footer__social", "data-testid": "footer-social-links", children: socialLinks.map((link, index) => (jsx(FooterSocialLink, { platform: link.platform, url: link.url, icon: link.icon, label: link.label, size: size }, `${link.platform}-${index}`))) }))] })), children && (jsx(GridCol, { ...getResponsiveColumnProps('content'), className: "c-footer__content", children: jsx(Grid, { className: "c-footer__sections", alignItems: layout === 'centered' || layout === 'stacked' ? 'center' : undefined, children: React.Children.map(children, child => {
13824
13827
  // Check if the child is a valid React element
13825
13828
  if (React.isValidElement(child)) {
13826
- console.log('Footer - passing showNewsletter:', showNewsletter, typeof showNewsletter);
13827
13829
  // Clone the element and pass the showNewsletter prop
13828
13830
  return React.cloneElement(child, { showNewsletter });
13829
13831
  }
@@ -14148,7 +14150,6 @@ const layouts = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
14148
14150
  */
14149
14151
  const FooterSection = forwardRef(({ title, icon, collapsible = false, defaultCollapsed = false, showNewsletter = false, children, className = '', ...props }, ref) => {
14150
14152
  const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed);
14151
- console.log('FooterSection render - showNewsletter:', showNewsletter, 'Type:', typeof showNewsletter);
14152
14153
  const handleToggle = () => {
14153
14154
  if (collapsible) {
14154
14155
  setIsCollapsed(!isCollapsed);
@@ -14200,7 +14201,8 @@ const FooterLink = forwardRef(({ href, icon, external = false, active = false, d
14200
14201
  ...props,
14201
14202
  };
14202
14203
  if (LinkComponent) {
14203
- return (jsxs(LinkComponent, { ref: ref, to: href, ...linkProps, children: [icon && jsx("span", { className: "c-footer__link-icon", children: icon }), jsx("span", { className: "c-footer__link-text", children: children }), external && jsx("span", { className: "c-footer__link-external", children: "\u2197" })] }));
14204
+ const Component = LinkComponent;
14205
+ return (jsxs(Component, { ref: ref, to: href, ...linkProps, children: [icon && jsx("span", { className: "c-footer__link-icon", children: icon }), jsx("span", { className: "c-footer__link-text", children: children }), external && jsx("span", { className: "c-footer__link-external", children: "\u2197" })] }));
14204
14206
  }
14205
14207
  return (jsxs("a", { ref: ref, href: disabled ? undefined : href, ...linkProps, children: [icon && jsx("span", { className: "c-footer__link-icon", children: icon }), jsx("span", { className: "c-footer__link-text", children: children }), external && jsx("span", { className: "c-footer__link-external", children: "\u2197" })] }));
14206
14208
  });
@@ -14658,7 +14660,10 @@ const NavItem = forwardRef(({ children, dropdown = false, megaMenu = false, acti
14658
14660
  ? 'page'
14659
14661
  : undefined),
14660
14662
  };
14661
- return (jsxs("li", { ref: ref, className: navItemClass, role: "menuitem", "aria-haspopup": dropdown || megaMenu, children: [LinkComponent ? (jsx(LinkComponent, { ...linkProps, children: dropdown || megaMenu ? childContent[0] : children })) : (jsx("a", { ...linkProps, children: dropdown || megaMenu ? childContent[0] : children })), (dropdown || megaMenu) && childContent.length > 1 && childContent[1]] }));
14663
+ return (jsxs("li", { ref: ref, className: navItemClass, role: "menuitem", "aria-haspopup": dropdown || megaMenu, children: [LinkComponent ? ((() => {
14664
+ const Component = LinkComponent;
14665
+ return (jsx(Component, { ...linkProps, children: dropdown || megaMenu ? childContent[0] : children }));
14666
+ })()) : (jsx("a", { ...linkProps, children: dropdown || megaMenu ? childContent[0] : children })), (dropdown || megaMenu) && childContent.length > 1 && childContent[1]] }));
14662
14667
  });
14663
14668
  NavItem.displayName = 'NavItem';
14664
14669
 
@@ -14831,7 +14836,10 @@ const SideMenuItem = forwardRef(({ children, href, onClick, active = false, disa
14831
14836
  };
14832
14837
  // Render as link if href is provided
14833
14838
  if (href) {
14834
- return LinkComponent ? (jsxs(LinkComponent, { ...linkProps, children: [icon && jsx("span", { className: "c-side-menu__link-icon", children: icon }), jsx("span", { className: "c-side-menu__link-text", children: children })] })) : (jsxs("a", { ...linkProps, children: [icon && jsx("span", { className: "c-side-menu__link-icon", children: icon }), jsx("span", { className: "c-side-menu__link-text", children: children })] }));
14839
+ return LinkComponent ? ((() => {
14840
+ const Component = LinkComponent;
14841
+ return (jsxs(Component, { ...linkProps, children: [icon && jsx("span", { className: "c-side-menu__link-icon", children: icon }), jsx("span", { className: "c-side-menu__link-text", children: children })] }));
14842
+ })()) : (jsxs("a", { ...linkProps, children: [icon && jsx("span", { className: "c-side-menu__link-icon", children: icon }), jsx("span", { className: "c-side-menu__link-text", children: children })] }));
14835
14843
  }
14836
14844
  // Render as button if no href
14837
14845
  return (jsxs("button", { ref: ref, type: "button", className: itemClass, onClick: handleClick(onClick), disabled: disabled, "aria-current": active ? 'page' : undefined, tabIndex: disabled ? -1 : 0, children: [icon && jsx("span", { className: "c-side-menu__link-icon", children: icon }), jsx("span", { className: "c-side-menu__link-text", children: children })] }));