An open source design system that's fully customizable and agent ready
TypeScript
fix: component audit — AppShell BaseProps, AspectRatio RTL, Badge header (#1748)
Cindy Zhangd13c61f34f32
diff --git a/packages/core/src/AppShell/XDSAppShell.tsx b/packages/core/src/AppShell/XDSAppShell.tsxindex 048cdd5df5..9fb3cec80c 100644--- a/packages/core/src/AppShell/XDSAppShell.tsx+++ b/packages/core/src/AppShell/XDSAppShell.tsx@@ -27,7 +27,6 @@ import {type ReactNode,} from 'react';import * as stylex from '@stylexjs/stylex';-import type {StyleXStyles} from '@stylexjs/stylex';import {colorVars,fontWeightVars,@@ -48,6 +47,7 @@ import {XDSAppShellMobileContext} from './XDSAppShellMobileContext';import {useXDSSlotPresence} from './useXDSSlotPresence';import type {XDSAppShellMobileContextValue} from './XDSAppShellMobileContext';import type {SpacingStep} from '../utils/types';+import type {XDSBaseProps} from '../XDSBaseProps';import {xdsClassName, mergeProps} from '../utils';const HasActivity = typeof React.Activity !== 'undefined';@@ -169,7 +169,7 @@ export interface XDSMobileNavConfig {defaultIsMobile?: boolean;}-export interface XDSAppShellProps {+export interface XDSAppShellProps extends XDSBaseProps<HTMLDivElement> {/** Ref forwarded to the root element */ref?: React.Ref<HTMLDivElement>;/**@@ -203,11 +203,6 @@ export interface XDSAppShellProps {*/contentPadding?: SpacingStep;- /**- * Test ID for the root element.- */- 'data-testid'?: string;-/*** Height behavior:* - `fill`: Shell fills viewport, content scrolls internally (default)@@ -249,28 +244,6 @@ export interface XDSAppShellProps {* Top navigation — typically an XDSTopNav.*/topNav?: ReactNode;-- /**- * StyleX styles created via `stylex.create()`. Merged with the component's- * base styles inside a single `stylex.props()` call for optimal deduplication.- *- * @example- * ```- * const overrides = stylex.create({ root: { marginBottom: 8 } });- * <Component xstyle={overrides.root} />- * ```- */- xstyle?: StyleXStyles;- /**- * CSS class name(s) appended to the root element.- * If you're using StyleX, prefer `xstyle` for optimal style deduplication.- */- className?: string;- /**- * Inline styles to apply to the root element. Spread after StyleX- * inline styles, so these values take priority.- */- style?: React.CSSProperties;}// =============================================================================diff --git a/packages/core/src/AspectRatio/XDSAspectRatio.tsx b/packages/core/src/AspectRatio/XDSAspectRatio.tsxindex 1ce3efaae8..4b0936701a 100644--- a/packages/core/src/AspectRatio/XDSAspectRatio.tsx+++ b/packages/core/src/AspectRatio/XDSAspectRatio.tsx@@ -12,7 +12,6 @@* - /apps/storybook/stories/AspectRatio.stories.tsx*/-import {type ReactNode} from 'react';import * as stylex from '@stylexjs/stylex';import type {StyleXStyles} from '@stylexjs/stylex';@@ -64,7 +63,7 @@ const styles = stylex.create({child: {position: 'absolute',top: 0,- left: 0,+ insetInlineStart: 0,width: '100%',height: '100%',},diff --git a/packages/core/src/Badge/index.ts b/packages/core/src/Badge/index.tsindex c523ac5aba..c01b8d8f67 100644--- a/packages/core/src/Badge/index.ts+++ b/packages/core/src/Badge/index.ts@@ -1,7 +1,12 @@'use client';/**- * @file Badge component barrel export+ * @file index.ts+ * @input Imports XDSBadge component and types from XDSBadge.tsx+ * @output Exports XDSBadge, XDSBadgeProps, XDSBadgeVariant, XDSBadgeVariantMap+ * @position Component entry point; re-exported by /packages/core/src/index.ts+ *+ * SYNC: When modified, update this header and /packages/core/src/Badge/Badge.doc.mjs*/export {XDSBadge} from './XDSBadge';