An open source design system that's fully customizable and agent ready
TypeScript
fix(TopNav): remove deprecated XDSTopNavTitleIcon alias (#342)
Cindy Zhang65d0ef8cea98
diff --git a/apps/storybook/stories/AppShell.stories.tsx b/apps/storybook/stories/AppShell.stories.tsxindex a0dc52d84c..2183ef8f40 100644--- a/apps/storybook/stories/AppShell.stories.tsx+++ b/apps/storybook/stories/AppShell.stories.tsx@@ -6,12 +6,8 @@ import {XDSBadge} from '@xds/core/Badge';import {XDSButton} from '@xds/core/Button';import {XDSIcon} from '@xds/core/Icon';import {XDSText} from '@xds/core/Text';-import {- XDSTopNav,- XDSTopNavTitle,- XDSTopNavTitleIcon,- XDSTopNavItem,-} from '@xds/core/TopNav';+import {XDSTopNav, XDSTopNavTitle, XDSTopNavItem} from '@xds/core/TopNav';+import {XDSNavIcon} from '@xds/core/NavIcon';import {XDSSideNav,XDSSideNavHeader,@@ -96,9 +92,7 @@ function AppTopNav({endContent}: {endContent?: React.ReactNode}) {<XDSTopNavTitletitle="Acme App"logo={- <XDSTopNavTitleIcon- icon={<CubeIcon style={{width: 16, height: 16}} />}- />+ <XDSNavIcon icon={<CubeIcon style={{width: 16, height: 16}} />} />}/>}diff --git a/apps/storybook/stories/TopNav.stories.tsx b/apps/storybook/stories/TopNav.stories.tsxindex 6883d5aade..cde0e930c4 100644--- a/apps/storybook/stories/TopNav.stories.tsx+++ b/apps/storybook/stories/TopNav.stories.tsx@@ -214,9 +214,7 @@ export const CenterContentWithoutEnd: Story = {<XDSTopNavTitletitle="My App"logo={- <XDSTopNavTitleIcon- icon={<CubeIcon style={{width: 16, height: 16}} />}- />+ <XDSNavIcon icon={<CubeIcon style={{width: 16, height: 16}} />} />}href="#"/>diff --git a/internal/vibe-tests/src/universal-eval.ts b/internal/vibe-tests/src/universal-eval.tsindex 734000c022..7a803a8dd5 100644--- a/internal/vibe-tests/src/universal-eval.ts+++ b/internal/vibe-tests/src/universal-eval.ts@@ -140,7 +140,6 @@ function discoverXDSComponents(): Set<string> {'XDSTopNavItem','XDSTopNavMenu','XDSTopNavTitle',- 'XDSTopNavTitleIcon','XDSNavIcon','XDSVStack','Theme',diff --git a/packages/core/src/NavIcon/README.md b/packages/core/src/NavIcon/README.mdindex 1dd7559134..c88980c5f8 100644--- a/packages/core/src/NavIcon/README.md+++ b/packages/core/src/NavIcon/README.md@@ -48,18 +48,3 @@ import {CubeIcon} from '@heroicons/react/24/solid';| `index.ts` | Entry | Exports component and types || `XDSNavIcon.tsx` | Core | Circular icon container || `XDSNavIcon.test.tsx` | Test | Unit tests |--## Migration from XDSTopNavTitleIcon--`XDSNavIcon` replaces `XDSTopNavTitleIcon`. The old component is still-exported from `@xds/core/TopNav` as a deprecated alias.--```diff-- import {XDSTopNavTitleIcon} from '@xds/core/TopNav';-+ import {XDSNavIcon} from '@xds/core/NavIcon';--- <XDSTopNavTitleIcon icon={<MyIcon />} size="md" />-+ <XDSNavIcon icon={<MyIcon />} />-```--The `size` prop has been removed — `XDSNavIcon` always renders at medium size.diff --git a/packages/core/src/TopNav/README.md b/packages/core/src/TopNav/README.mdindex cef45fe54a..8ac9fef149 100644--- a/packages/core/src/TopNav/README.md+++ b/packages/core/src/TopNav/README.md@@ -217,13 +217,3 @@ left/right content widths. The right column is always rendered (even when- Uses `--color-navbar` token for background (defaults to white)- Positioning (sticky/fixed) is handled by the layout system (e.g. XDSAppShell), not TopNav itself- Dividers are controlled by the layout system (e.g. XDSLayoutHeader's `hasDivider`), not TopNav--## Migration--`XDSTopNavTitleIcon` has been renamed to `XDSNavIcon` and moved to its own module.-The old name is still exported from `@xds/core/TopNav` as a deprecated alias.--```diff-- import {XDSTopNavTitleIcon} from '@xds/core/TopNav';-+ import {XDSNavIcon} from '@xds/core/NavIcon';-```diff --git a/packages/core/src/TopNav/index.ts b/packages/core/src/TopNav/index.tsindex 3f280e4070..fc0f01574a 100644--- a/packages/core/src/TopNav/index.ts+++ b/packages/core/src/TopNav/index.ts@@ -13,15 +13,6 @@ export type {XDSTopNavProps} from './XDSTopNav';export {XDSTopNavTitle} from './XDSTopNavTitle';export type {XDSTopNavTitleProps} from './XDSTopNavTitle';-/**- * @deprecated Use `XDSNavIcon` from `@xds/core/NavIcon` instead.- */-export {XDSNavIcon as XDSTopNavTitleIcon} from '../NavIcon';-/**- * @deprecated Use `XDSNavIconProps` from `@xds/core/NavIcon` instead.- */-export type {XDSNavIconProps as XDSTopNavTitleIconProps} from '../NavIcon';-export {XDSTopNavItem} from './XDSTopNavItem';export type {XDSTopNavItemProps} from './XDSTopNavItem';