An open source design system that's fully customizable and agent ready
TypeScript
fix(dropdown-menu): move indicator-icon theme target onto the Icon element (#4743)
athz581f8444edab
diff --git a/.changeset/dropdown-menu-theme-fixes.md b/.changeset/dropdown-menu-theme-fixes.mdnew file mode 100644index 0000000000..522f44523b--- /dev/null+++ b/.changeset/dropdown-menu-theme-fixes.md@@ -0,0 +1,9 @@+---+'@astryxdesign/core': patch+---++[fix] DropdownMenu: move the `dropdown-menu-indicator-icon` theme target onto the Icon element itself so a theme can restyle the submenu chevron's size and color directly.++The loading branch no longer carries the target — its `Spinner` has its own `astryx-spinner` target, matching Selector, MultiSelector and ComplexSelector.++@athzdiff --git a/packages/core/src/DropdownMenu/DropdownMenuSubMenu.test.tsx b/packages/core/src/DropdownMenu/DropdownMenuSubMenu.test.tsxindex ffa6ef2b5a..87ecec6e5d 100644--- a/packages/core/src/DropdownMenu/DropdownMenuSubMenu.test.tsx+++ b/packages/core/src/DropdownMenu/DropdownMenuSubMenu.test.tsx@@ -701,11 +701,14 @@ describe('DropdownMenuSubMenu theming slots', () => {name: /Move to/,hidden: true,});- // The indicator-icon slot wraps the chevron affordance inside the trigger- // row.- expect(- trigger.querySelector('.astryx-dropdown-menu-indicator-icon'),- ).toBeInTheDocument();+ // The indicator-icon slot sits on the chevron glyph itself (the element+ // that carries the icon size), so a theme can restyle its size/color+ // directly.+ const indicator = trigger.querySelector(+ '.astryx-dropdown-menu-indicator-icon',+ );+ expect(indicator).toBeInTheDocument();+ expect(indicator).toHaveClass('astryx-icon');});});diff --git a/packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx b/packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsxindex afdddafeae..9cce4450a6 100644--- a/packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx+++ b/packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx@@ -476,20 +476,17 @@ export function DropdownMenuSubMenu();const endAffordance = hasSpinner ? (- <span- {...mergeProps(- themeProps('dropdown-menu-indicator-icon'),- stylex.props(triggerStyles.caret),- )}>+ <span {...stylex.props(triggerStyles.caret)}><Spinner size="sm" /></span>) : (- <span- {...mergeProps(- themeProps('dropdown-menu-indicator-icon'),- stylex.props(triggerStyles.caret),- )}>- <Icon icon="chevronRight" size="sm" color="secondary" />+ <span {...stylex.props(triggerStyles.caret)}>+ <Icon+ icon="chevronRight"+ size="sm"+ color="secondary"+ {...themeProps('dropdown-menu-indicator-icon')}+ /></span>);