@molecule/app-top-nav-layout-react 4.1.1 → 4.2.2

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/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-24T09:00:04.321Z
6
+ Generated: 2026-11-28T22:55:49.326Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-top-nav-layout-react
@@ -40,7 +40,7 @@ const userMenu = <button type="button">Account</button>
40
40
  ## Installation
41
41
 
42
42
  ```bash
43
- npm install @molecule/app-top-nav-layout-react @molecule/app-react @molecule/app-ui react
43
+ npm install @molecule/app-top-nav-layout-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
44
44
  npm install -D @types/react
45
45
  ```
46
46
 
@@ -125,14 +125,16 @@ function TopNavLayout({
125
125
 
126
126
  Peer dependencies:
127
127
 
128
- - `@molecule/app-react` ^4.13.0
128
+ - `@molecule/app-react` ^4.13.0 || ^5.0.0
129
129
  - `@molecule/app-ui` ^1.3.11
130
+ - `@molecule/app-ui-react` ^4.4.0
130
131
  - `react` ^18.0.0 || ^19.0.0
131
132
 
132
133
  ### Runtime Dependencies
133
134
 
134
135
  - `@molecule/app-react`
135
136
  - `@molecule/app-ui`
137
+ - `@molecule/app-ui-react`
136
138
  - `react`
137
139
 
138
140
  Requires React Router: render it as a LAYOUT ROUTE element
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { RoutedView, useLocation, useTranslation } from '@molecule/app-react';
3
- import { Link } from '@molecule/app-react/link';
4
3
  import { slot } from '@molecule/app-react/render';
5
4
  import { getClassMap } from '@molecule/app-ui';
5
+ import { Box, GlyphIcon, Link, Text } from '@molecule/app-ui-react/elements';
6
6
  import { navItemActive } from './nav-item-active.js';
7
7
  /**
8
8
  * Sticky top-nav shell with brand + horizontal nav + user-menu slot.
@@ -16,10 +16,10 @@ export function TopNavLayout({ appName, logoTo = '/', navItems, userMenu, navAri
16
16
  const cm = getClassMap();
17
17
  const navLabel = navAriaLabel ??
18
18
  t('topNavLayout.aria.primaryNavigation', undefined, { defaultValue: 'Primary navigation' });
19
- 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": navLabel, children: navItems.map((item) => {
19
+ return (_jsxs(Box, { as: "div", className: cm.cn(cm.minH('screen'), cm.topNavLayoutRoot, className), "data-mol-id": dataMolId, children: [_jsx(Box, { as: "header", className: cm.cn(cm.topNavLayoutHeader), children: _jsxs(Box, { as: "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, { className: cm.cn(cm.textSize('2xl'), cm.fontWeight('bold')), to: logoTo, children: appName }), _jsx(Box, { as: "nav", className: cm.flex({ align: 'center', gap: 'md' }), "aria-label": navLabel, children: navItems.map((item) => {
20
20
  const isActive = navItemActive(pathname, item.to);
21
- return (_jsxs(Link, { to: item.to, "aria-label": item.label, "aria-current": isActive ? 'page' : undefined, className: 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
21
+ return (_jsxs(Link, { "aria-label": item.label, "aria-current": isActive ? 'page' : undefined, className: 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
22
22
  ? cm.cn(cm.bgPrimaryContainer, cm.textPrimary)
23
- : 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));
24
- }) }), userMenu] }) }), _jsx("main", { children: children ?? _jsx(RoutedView, {}) })] }));
23
+ : cm.cn(cm.textMuted, cm.topNavLayoutNavItemIdle)), to: item.to, children: [item.icon ? _jsx(GlyphIcon, { name: item.icon, "aria-hidden": true }) : null, _jsx(Text, { as: "span", className: cm.topNavLayoutNavItemLabel, children: item.label })] }, item.key));
24
+ }) }), userMenu] }) }), _jsx(Box, { as: "main", children: children ?? _jsx(RoutedView, {}) })] }));
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-top-nav-layout-react",
3
- "version": "4.1.1",
3
+ "version": "4.2.2",
4
4
  "description": "Sticky top-nav app shell: brand link + horizontal NavLinks + user-menu slot, with a router outlet for nested routes",
5
5
  "homepage": "https://www.molecule.dev/packages/app-top-nav-layout-react",
6
6
  "type": "module",
@@ -34,13 +34,15 @@
34
34
  "directory": "packages/app/features/top-nav-layout-react"
35
35
  },
36
36
  "peerDependencies": {
37
- "@molecule/app-react": "^4.13.0",
37
+ "@molecule/app-react": "^4.13.0 || ^5.0.0",
38
38
  "@molecule/app-ui": "^1.3.11",
39
+ "@molecule/app-ui-react": "^4.4.0",
39
40
  "react": "^18.0.0 || ^19.0.0"
40
41
  },
41
42
  "devDependencies": {
42
- "@molecule/app-react": "4.13.0",
43
- "@molecule/app-ui": "1.5.0",
43
+ "@molecule/app-react": "5.0.0",
44
+ "@molecule/app-ui": "1.17.0",
45
+ "@molecule/app-ui-react": "4.15.0",
44
46
  "@types/node": "26.6.5",
45
47
  "@types/react": "19.3.0",
46
48
  "@types/react-dom": "19.3.0",