feat: migrate NavigationMenu to JSON (Tier 2 - Organism 2)

- Create NavigationMenuProps interface for type safety
- Implement useNavigationMenu hook with:
  - expandedGroups state management
  - toggleGroup, expandAll, collapseAll actions
  - isItemVisible, getVisibleItemsCount, getItemBadge utilities
  - handleItemHover, handleItemLeave with route preloading
- Create comprehensive JSON definition with:
  - Nested Collapsible groups for navigation sections
  - Dynamic item rendering with visibility filtering
  - Badge support for error count and item badges
  - Active state styling and hover effects
- Register hook in hooks-registry
- Export from json-components.ts with hook integration
- Update json-components-registry.json (source: organisms, jsonCompatible: true)

All state management delegated to useNavigationMenu hook.
Navigation logic fully expressible in JSON with custom hooks.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 01:28:33 +00:00
parent 85fce883dd
commit a78943a854
10 changed files with 774 additions and 6 deletions

View File

@@ -2484,12 +2484,8 @@
},
{
"type": "NavigationMenu",
"name": "NavigationMenu",
"category": "navigation",
"canHaveChildren": true,
"description": "NavigationMenu component",
"status": "supported",
"source": "ui"
"source": "organisms",
"jsonCompatible": true
},
{
"type": "Notification",