From f5810c0d4487125fc7a091a020e1fe5b86e3fe77 Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Tue, 23 Jun 2026 16:02:16 +0700 Subject: [PATCH 1/4] navigation-menu: use node-slot pattern for NavigationMenuIcon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the baked `size-4` container on NavigationMenuIcon with the shared node-slot pattern (`[&>svg]:size-(--node-size)`, defaulting `--node-size` to 1rem). Callers no longer need to pass `className="size-3.5"` on the child SVG — the container inherits the token and applies it to its direct SVG child automatically. Update both the UI-tier and components-tier stories to drop the now- redundant size class on the ChevronDown icon. --- .../navigation-menu/navigation-menu.stories.tsx | 2 +- .../ui/navigation-menu/navigation-menu.stories.tsx | 2 +- packages/propel/src/ui/navigation-menu/variants.ts | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/propel/src/components/navigation-menu/navigation-menu.stories.tsx b/packages/propel/src/components/navigation-menu/navigation-menu.stories.tsx index 8e2ceb22..a0bdd08c 100644 --- a/packages/propel/src/components/navigation-menu/navigation-menu.stories.tsx +++ b/packages/propel/src/components/navigation-menu/navigation-menu.stories.tsx @@ -197,7 +197,7 @@ function TriggerRow({ children }: { children: React.ReactNode }) { {children} - + ); diff --git a/packages/propel/src/ui/navigation-menu/navigation-menu.stories.tsx b/packages/propel/src/ui/navigation-menu/navigation-menu.stories.tsx index 74063533..8d9b5a37 100644 --- a/packages/propel/src/ui/navigation-menu/navigation-menu.stories.tsx +++ b/packages/propel/src/ui/navigation-menu/navigation-menu.stories.tsx @@ -201,7 +201,7 @@ function NavigationMenuTriggerRow({ children }: { children: React.ReactNode }) { {children} - + ); diff --git a/packages/propel/src/ui/navigation-menu/variants.ts b/packages/propel/src/ui/navigation-menu/variants.ts index bb3530ae..78afb6b5 100644 --- a/packages/propel/src/ui/navigation-menu/variants.ts +++ b/packages/propel/src/ui/navigation-menu/variants.ts @@ -25,10 +25,15 @@ export const navigationMenuLinkVariants = cva( ), ); -// Rotates the caret while the popup is open; reads the parent Trigger's -// `group-data-popup-open` state. +// The disclosure caret slot inside a Trigger. Sizes its child SVG to `--node-size` +// (default 1rem, matching the trigger's line-height) and rotates while the popup is +// open; reads the parent Trigger's `group-data-popup-open` state. export const navigationMenuIconVariants = cva( - "flex size-4 items-center justify-center text-icon-secondary transition-transform group-data-popup-open:rotate-180", + cx( + "inline-flex shrink-0 items-center justify-center [--node-size:1rem]", + "[&>svg]:size-(--node-size)", + "text-icon-secondary transition-transform group-data-popup-open:rotate-180", + ), ); export const navigationMenuPositionerVariants = cva("z-50 outline-none"); From a31fe68a839407440788091a23115b0d391f830b Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Tue, 23 Jun 2026 16:37:22 +0700 Subject: [PATCH 2/4] navigation-menu: extract item anatomy parts; remove components-tier styling Adds the missing anatomy extensions so every ui part renders a single element and the components tier only composes parts: - NavigationMenuTriggerLabel: the trigger's text label beside the Icon - NavigationMenuContentList: the vertical