@molecule/app-top-nav-layout-react 4.0.0 → 4.0.1

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.
@@ -8,7 +8,7 @@ import { getClassMap } from '@molecule/app-ui';
8
8
  */
9
9
  export function TopNavLayout({ appName, logoTo = '/', navItems, userMenu, navAriaLabel = 'Primary navigation', className, dataMolId, }) {
10
10
  const cm = getClassMap();
11
- return (_jsxs("div", { className: cm.cn(cm.minH('screen'), 'bg-background text-on-surface antialiased', className), "data-mol-id": dataMolId, children: [_jsx("header", { className: cm.cn('sticky top-0 z-40 bg-surface shadow-sm'), children: _jsxs("div", { className: cm.cn(cm.maxW('7xl'), cm.mxAuto, cm.sp('px', 6), cm.sp('py', 3), cm.flex({ align: 'center', justify: 'between', gap: 'lg' })), children: [_jsx(Link, { to: logoTo, className: cm.cn(cm.textSize('2xl'), cm.fontWeight('bold')), children: appName }), _jsx("nav", { className: cm.flex({ align: 'center', gap: 'md' }), "aria-label": navAriaLabel, children: navItems.map((item) => (_jsxs(NavLink, { to: item.to, "aria-label": item.label, className: ({ isActive }) => cm.cn(cm.flex({ align: 'center', gap: 'xs' }), cm.sp('px', 3), cm.sp('py', 2), cm.textSize('sm'), cm.fontWeight('medium'), 'rounded-md transition-colors', isActive
12
- ? cm.cn('bg-primary-container', cm.textPrimary)
13
- : cm.cn(cm.textMuted, 'hover:bg-surface-container hover:text-on-surface')), children: [item.icon ? (_jsx("span", { className: "material-symbols-outlined", "aria-hidden": "true", children: item.icon })) : null, _jsx("span", { className: "hidden md:inline", children: item.label })] }, item.key))) }), userMenu] }) }), _jsx("main", { children: _jsx(Outlet, {}) })] }));
11
+ return (_jsxs("div", { className: cm.cn(cm.minH('screen'), cm.topNavLayoutRoot, className), "data-mol-id": dataMolId, children: [_jsx("header", { className: cm.cn(cm.topNavLayoutHeader), children: _jsxs("div", { className: cm.cn(cm.maxW('7xl'), cm.mxAuto, cm.sp('px', 6), cm.sp('py', 3), cm.flex({ align: 'center', justify: 'between', gap: 'lg' })), children: [_jsx(Link, { to: logoTo, className: cm.cn(cm.textSize('2xl'), cm.fontWeight('bold')), children: appName }), _jsx("nav", { className: cm.flex({ align: 'center', gap: 'md' }), "aria-label": navAriaLabel, children: navItems.map((item) => (_jsxs(NavLink, { to: item.to, "aria-label": item.label, className: ({ isActive }) => cm.cn(cm.flex({ align: 'center', gap: 'xs' }), cm.sp('px', 3), cm.sp('py', 2), cm.textSize('sm'), cm.fontWeight('medium'), cm.topNavLayoutNavItem, isActive
12
+ ? cm.cn(cm.bgPrimaryContainer, cm.textPrimary)
13
+ : cm.cn(cm.textMuted, cm.topNavLayoutNavItemIdle)), children: [item.icon ? (_jsx("span", { className: cm.iconGlyphFont, "aria-hidden": "true", children: item.icon })) : null, _jsx("span", { className: cm.topNavLayoutNavItemLabel, children: item.label })] }, item.key))) }), userMenu] }) }), _jsx("main", { children: _jsx(Outlet, {}) })] }));
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-top-nav-layout-react",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Top navigation app shell: brand link + horizontal NavLinks + UserMenu slot, with React Router Outlet for nested routes",
5
5
  "homepage": "https://www.molecule.dev/packages/app-top-nav-layout-react",
6
6
  "type": "module",
@@ -40,8 +40,8 @@
40
40
  "react-router": "^7.0.0 || ^8.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@molecule/app-react": "4.0.0",
44
- "@molecule/app-ui": "1.3.9",
43
+ "@molecule/app-react": "4.1.2",
44
+ "@molecule/app-ui": "1.3.11",
45
45
  "@types/node": "26.6.5",
46
46
  "@types/react": "19.3.0",
47
47
  "@types/react-dom": "19.3.0",