An open source design system that's fully customizable and agent ready
TypeScript
Set up prettier+eslint to run on commits via pre-commit hook (#45)
Andrey Goderb625176feab1
diff --git a/.gitignore b/.gitignoreindex ea57c28f39..136be0f7e7 100644--- a/.gitignore+++ b/.gitignore@@ -39,3 +39,6 @@ yarn-error.log*e2e/test-results/e2e/playwright-report/e2e/playwright/.cache/++# Lint+.eslintcachediff --git a/.husky/.gitignore b/.husky/.gitignorenew file mode 100644index 0000000000..31354ec138--- /dev/null+++ b/.husky/.gitignore@@ -0,0 +1 @@+_diff --git a/.husky/pre-commit b/.husky/pre-commitnew file mode 100755index 0000000000..2312dc587f--- /dev/null+++ b/.husky/pre-commit@@ -0,0 +1 @@+npx lint-stageddiff --git a/.prettierrc.json b/.prettierrc.jsonnew file mode 100644index 0000000000..d8ee628a4a--- /dev/null+++ b/.prettierrc.json@@ -0,0 +1,6 @@+{+ "arrowParens": "avoid",+ "bracketSameLine": true,+ "bracketSpacing": false,+ "singleQuote": true+}diff --git a/eslint.config.js b/eslint.config.jsnew file mode 100644index 0000000000..e5e65047d7--- /dev/null+++ b/eslint.config.js@@ -0,0 +1,23 @@+import js from "@eslint/js";+import tseslint from "typescript-eslint";++export default tseslint.config(+ js.configs.recommended,+ ...tseslint.configs.recommended,+ {+ ignores: ["**/dist/**", "**/node_modules/**"],+ },+ {+ files: ["**/*.{ts,tsx}"],+ languageOptions: {+ parserOptions: {+ ecmaFeatures: {+ jsx: true,+ },+ },+ },+ rules: {+ "@typescript-eslint/no-unused-vars": "warn",+ },+ },+);diff --git a/package.json b/package.jsonindex 3b7cc12a6f..7dbae67e26 100644--- a/package.json+++ b/package.json@@ -21,10 +21,12 @@"docs": "yarn workspace @xds/docs dev","changeset": "changeset","version-packages": "changeset version",- "release": "yarn build && changeset publish"+ "release": "yarn build && changeset publish",+ "prepare": "husky install"},"devDependencies": {"@changesets/cli": "^2.27.0",+ "@eslint/js": "^9.39.2","@playwright/test": "^1.48.0","@testing-library/user-event": "^14.5.0","@types/node": "^22.0.0",@@ -33,13 +35,19 @@"@vitejs/plugin-react": "^4.3.0","@vitest/coverage-v8": "^2.1.0","eslint": "^9.15.0",+ "husky": "^9.1.7","jsdom": "^27.4.0","prettier": "^3.4.0","react": "^18.3.0","react-dom": "^18.3.0","tsup": "^8.3.0","typescript": "^5.7.0",+ "typescript-eslint": "^8.53.1","vitest": "^2.1.0"},- "packageManager": "[email protected]"+ "packageManager": "[email protected]",+ "lint-staged": {+ "*.{ts,tsx}": "eslint --cache --fix",+ "*.{ts,tsx,md}": "prettier --write"+ }}diff --git a/packages/README.md b/packages/README.mdindex 78005ef3c3..2f516e4fa5 100644--- a/packages/README.md+++ b/packages/README.md@@ -4,7 +4,6 @@ Published npm packages for the XDS design system.<!-- SYNC: When files in this directory change, update this document. -->-| Directory | Role | Purpose |-|-----------|------|---------|-| `core/` | Primary | Core UI components library (`@xds/core`) |-+| Directory | Role | Purpose |+| --------- | ------- | ---------------------------------------- |+| `core/` | Primary | Core UI components library (`@xds/core`) |diff --git a/packages/core/README.md b/packages/core/README.mdindex 3b3b37ca6e..745208e91d 100644--- a/packages/core/README.md+++ b/packages/core/README.md@@ -4,10 +4,9 @@ Core UI components library for the XDS design system (`@xds/core`).<!-- SYNC: When files in this directory change, update this document. -->-| Directory/File | Role | Purpose |-|----------------|------|---------|-| `src/` | Source | Component source code |-| `package.json` | Config | Package configuration and dependencies |-| `tsconfig.json` | Config | TypeScript compiler configuration |-| `tsup.config.ts` | Build | Bundle configuration using tsup |-+| Directory/File | Role | Purpose |+| ---------------- | ------ | -------------------------------------- |+| `src/` | Source | Component source code |+| `package.json` | Config | Package configuration and dependencies |+| `tsconfig.json` | Config | TypeScript compiler configuration |+| `tsup.config.ts` | Build | Bundle configuration using tsup |diff --git a/packages/core/src/Avatar/README.md b/packages/core/src/Avatar/README.mdindex f639315976..fd332814a9 100644--- a/packages/core/src/Avatar/README.md+++ b/packages/core/src/Avatar/README.md@@ -35,15 +35,15 @@ import { XDSAvatar } from '@xds/core/Avatar';## Props-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `src` | `string` | — | Primary image source URL |-| `fallbackSrc` | `string` | — | Fallback image when primary fails |-| `name` | `string` | — | User name for initials and alt text |-| `alt` | `string` | — | Alt text (falls back to `name`) |-| `size` | `'xsmall' \| 'small' \| 'medium' \| 'large' \| 'xlarge'` | `'small'` | Avatar size |-| `status` | `ReactNode` | — | Corner content for status indicators |-| `data-testid` | `string` | — | Test ID for testing |+| Prop | Type | Default | Description |+| ------------- | -------------------------------------------------------- | --------- | ------------------------------------ |+| `src` | `string` | — | Primary image source URL |+| `fallbackSrc` | `string` | — | Fallback image when primary fails |+| `name` | `string` | — | User name for initials and alt text |+| `alt` | `string` | — | Alt text (falls back to `name`) |+| `size` | `'xsmall' \| 'small' \| 'medium' \| 'large' \| 'xlarge'` | `'small'` | Avatar size |+| `status` | `ReactNode` | — | Corner content for status indicators |+| `data-testid` | `string` | — | Test ID for testing |## Fallback Cascade@@ -54,11 +54,11 @@ import { XDSAvatar } from '@xds/core/Avatar';## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports component and types |-| `XDSAvatar.tsx` | Core | Component implementation |-| `XDSAvatar.test.tsx` | Test | Unit tests |+| File | Role | Purpose |+| -------------------- | ----- | --------------------------- |+| `index.ts` | Entry | Exports component and types |+| `XDSAvatar.tsx` | Core | Component implementation |+| `XDSAvatar.test.tsx` | Test | Unit tests |## Implementation Notesdiff --git a/packages/core/src/Avatar/XDSAvatar.tsx b/packages/core/src/Avatar/XDSAvatar.tsxindex 5a3b2c6cf8..1244d89470 100644--- a/packages/core/src/Avatar/XDSAvatar.tsx+++ b/packages/core/src/Avatar/XDSAvatar.tsx@@ -11,14 +11,9 @@* - /apps/storybook/stories/Avatar.stories.tsx (storybook stories)*/-import { forwardRef, useState, type HTMLAttributes, type ReactNode } from 'react';+import {forwardRef, useState, type HTMLAttributes, type ReactNode} from 'react';import * as stylex from '@stylexjs/stylex';-import {- color,- spacing,- radius,- typography,-} from '../theme/tokens.stylex';+import {color, spacing, radius, typography} from '../theme/tokens.stylex';/*** The offset ratio for positioning elements on a circle's edge at 45°.@@ -154,7 +149,10 @@ const dynamicStyles = stylex.create({}),});-export interface XDSAvatarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {+export interface XDSAvatarProps extends Omit<+ HTMLAttributes<HTMLDivElement>,+ 'children'+> {/*** The alt text shown on hover and made accessible to screen readers.* Falls back to `name` if not provided.@@ -207,15 +205,14 @@ function getInitials(name: string): string {/*** Default person icon SVG for when no image or name is provided*/-function DefaultIcon({ size }: { size: number }) {+function DefaultIcon({size}: {size: number}) {return (<svgwidth={size * 0.6}height={size * 0.6}viewBox="0 0 24 24"fill="currentColor"- aria-hidden="true"- >+ aria-hidden="true"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" /></svg>);@@ -246,7 +243,7 @@ export const XDSAvatar = forwardRef<HTMLDivElement, XDSAvatarProps>(status,...props},- ref+ ref,) => {const [imageError, setImageError] = useState(false);const [fallbackError, setFallbackError] = useState(false);@@ -266,11 +263,8 @@ export const XDSAvatar = forwardRef<HTMLDivElement, XDSAvatarProps>(aria-label={accessibleName}data-testid={testId}{...stylex.props(styles.wrapper)}- {...props}- >- <div- {...stylex.props(styles.content, dynamicStyles.size(numericSize))}- >+ {...props}>+ <div {...stylex.props(styles.content, dynamicStyles.size(numericSize))}>{showImage && (<imgsrc={src}@@ -289,8 +283,10 @@ export const XDSAvatar = forwardRef<HTMLDivElement, XDSAvatarProps>()}{showInitials && (<div- {...stylex.props(styles.fallback, dynamicStyles.fontSize(numericSize))}- >+ {...stylex.props(+ styles.fallback,+ dynamicStyles.fontSize(numericSize),+ )}>{getInitials(name)}</div>)}@@ -302,14 +298,16 @@ export const XDSAvatar = forwardRef<HTMLDivElement, XDSAvatarProps>(</div>{status && (<div- {...stylex.props(styles.status, dynamicStyles.statusPosition(numericSize))}- >+ {...stylex.props(+ styles.status,+ dynamicStyles.statusPosition(numericSize),+ )}>{status}</div>)}</div>);- }+ },);XDSAvatar.displayName = 'XDSAvatar';diff --git a/packages/core/src/Avatar/index.ts b/packages/core/src/Avatar/index.tsindex 437d90862c..bef4323f25 100644--- a/packages/core/src/Avatar/index.ts+++ b/packages/core/src/Avatar/index.ts@@ -7,5 +7,5 @@* SYNC: When modified, update this header and /packages/core/src/Avatar/README.md*/-export { XDSAvatar } from './XDSAvatar';-export type { XDSAvatarProps, XDSAvatarSize } from './XDSAvatar';+export {XDSAvatar} from './XDSAvatar';+export type {XDSAvatarProps, XDSAvatarSize} from './XDSAvatar';diff --git a/packages/core/src/Button/README.md b/packages/core/src/Button/README.mdindex f6e0982a0f..a67d689598 100644--- a/packages/core/src/Button/README.md+++ b/packages/core/src/Button/README.md@@ -28,20 +28,20 @@ import { XDSButton } from '@xds/core/Button';## Props-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'destructive'` | `'primary'` | Visual style variant |-| `loading` | `boolean` | `false` | Shows loading spinner |-| `disabled` | `boolean` | `false` | Disables the button |-| `children` | `ReactNode` | — | Button content |+| Prop | Type | Default | Description |+| ---------- | ------------------------------------------------------ | ----------- | --------------------- |+| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'destructive'` | `'primary'` | Visual style variant |+| `loading` | `boolean` | `false` | Shows loading spinner |+| `disabled` | `boolean` | `false` | Disables the button |+| `children` | `ReactNode` | — | Button content |## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports XDSButton component and types |-| `XDSButton.tsx` | Core | XDSButton component implementation |-| `XDSButton.test.tsx` | Test | Unit tests for XDSButton component |+| File | Role | Purpose |+| -------------------- | ----- | ------------------------------------- |+| `index.ts` | Entry | Exports XDSButton component and types |+| `XDSButton.tsx` | Core | XDSButton component implementation |+| `XDSButton.test.tsx` | Test | Unit tests for XDSButton component |## Implementation Notesdiff --git a/packages/core/src/Button/XDSButton.test.tsx b/packages/core/src/Button/XDSButton.test.tsxindex 89672cd231..4b3d7119c7 100644--- a/packages/core/src/Button/XDSButton.test.tsx+++ b/packages/core/src/Button/XDSButton.test.tsx@@ -7,19 +7,19 @@* SYNC: When XDSButton.tsx changes, update tests to match new behavior*/-import { describe, it, expect, vi } from 'vitest';-import { render, screen } from '@testing-library/react';+import {describe, it, expect, vi} from 'vitest';+import {render, screen} from '@testing-library/react';import userEvent from '@testing-library/user-event';-import { XDSButton } from './XDSButton';+import {XDSButton} from './XDSButton';describe('XDSButton', () => {it('renders children correctly', () => {render(<XDSButton>Click me</XDSButton>);- expect(screen.getByRole('button', { name: 'Click me' })).toBeInTheDocument();+ expect(screen.getByRole('button', {name: 'Click me'})).toBeInTheDocument();});it('renders with different variants', () => {- const { rerender } = render(<XDSButton variant="primary">Primary</XDSButton>);+ const {rerender} = render(<XDSButton variant="primary">Primary</XDSButton>);expect(screen.getByRole('button')).toBeInTheDocument();rerender(<XDSButton variant="secondary">Secondary</XDSButton>);@@ -53,7 +53,11 @@ describe('XDSButton', () => {it('does not fire click when disabled', async () => {const user = userEvent.setup();const handleClick = vi.fn();- render(<XDSButton disabled onClick={handleClick}>Click me</XDSButton>);+ render(+ <XDSButton disabled onClick={handleClick}>+ Click me+ </XDSButton>,+ );await user.click(screen.getByRole('button'));expect(handleClick).not.toHaveBeenCalled();@@ -62,7 +66,11 @@ describe('XDSButton', () => {it('does not fire click when loading', async () => {const user = userEvent.setup();const handleClick = vi.fn();- render(<XDSButton loading onClick={handleClick}>Click me</XDSButton>);+ render(+ <XDSButton loading onClick={handleClick}>+ Click me+ </XDSButton>,+ );await user.click(screen.getByRole('button'));expect(handleClick).not.toHaveBeenCalled();diff --git a/packages/core/src/Button/XDSButton.tsx b/packages/core/src/Button/XDSButton.tsxindex e9f770327c..10889084ac 100644--- a/packages/core/src/Button/XDSButton.tsx+++ b/packages/core/src/Button/XDSButton.tsx@@ -11,7 +11,12 @@* - /apps/storybook/stories/Button.stories.tsx (storybook stories)*/-import { forwardRef, useContext, type ButtonHTMLAttributes, type ReactNode } from 'react';+import {+ forwardRef,+ useContext,+ type ButtonHTMLAttributes,+ type ReactNode,+} from 'react';import * as stylex from '@stylexjs/stylex';import {color,@@ -20,7 +25,7 @@ import {transition,typography,} from '../theme/tokens.stylex';-import { ThemeContext } from '../theme/ThemeContext';+import {ThemeContext} from '../theme/ThemeContext';/*** Base button styles@@ -192,7 +197,7 @@ const loadingStyles = stylex.create({borderRightColor: 'transparent',borderRadius: '50%',animationName: stylex.keyframes({- to: { transform: 'rotate(360deg)' },+ to: {transform: 'rotate(360deg)'},}),animationDuration: '0.6s',animationTimingFunction: 'linear',@@ -227,13 +232,17 @@ const loadingStyles = stylex.create({* ```*/export const XDSButton = forwardRef<HTMLButtonElement, XDSButtonProps>(- ({ variant = 'secondary', loading = false, disabled, children, ...props }, ref) => {+ (+ {variant = 'secondary', loading = false, disabled, children, ...props},+ ref,+ ) => {const isDisabled = disabled || loading;const useLightSpinner = variant === 'primary' || variant === 'destructive';// Get theme context for component-level overrides (optional)const themeContext = useContext(ThemeContext);- const themeVariantOverride = themeContext?.theme.components?.button?.variants?.[variant];+ const themeVariantOverride =+ themeContext?.theme.components?.button?.variants?.[variant];return (<button@@ -244,22 +253,23 @@ export const XDSButton = forwardRef<HTMLButtonElement, XDSButtonProps>(variants[variant],themeVariantOverride,isDisabled && styles.disabled,- loading && loadingStyles.loading+ loading && loadingStyles.loading,)}- {...props}- >+ {...props}>{loading && (<span{...stylex.props(loadingStyles.spinner,- useLightSpinner ? loadingStyles.spinnerLight : loadingStyles.spinnerDark+ useLightSpinner+ ? loadingStyles.spinnerLight+ : loadingStyles.spinnerDark,)}/>)}{children}</button>);- }+ },);XDSButton.displayName = 'XDSButton';diff --git a/packages/core/src/Button/index.ts b/packages/core/src/Button/index.tsindex 396f571b48..e2f0819279 100644--- a/packages/core/src/Button/index.ts+++ b/packages/core/src/Button/index.ts@@ -7,5 +7,5 @@* SYNC: When modified, update this header and /packages/core/src/Button/README.md*/-export { XDSButton } from './XDSButton';-export type { XDSButtonProps, XDSButtonVariant } from './XDSButton';+export {XDSButton} from './XDSButton';+export type {XDSButtonProps, XDSButtonVariant} from './XDSButton';diff --git a/packages/core/src/Field/README.md b/packages/core/src/Field/README.mdindex 32d5d550ed..65e2013905 100644--- a/packages/core/src/Field/README.md+++ b/packages/core/src/Field/README.md@@ -15,14 +15,14 @@ A form field wrapper component that provides label and description.## Usage```tsx-import { XDSField } from '@xds/core/Field';-import { useId } from 'react';+import {XDSField} from '@xds/core/Field';+import {useId} from 'react';// Basic usage with explicit IDsconst id = useId();<XDSField label="Email" inputID={id}><input id={id} />-</XDSField>+</XDSField>;// With descriptionconst inputId = useId();@@ -31,28 +31,27 @@ const descId = useId();label="Email"description="We'll never share your email"inputID={inputId}- descriptionID={descId}->+ descriptionID={descId}><input id={inputId} aria-describedby={descId} />-</XDSField>+</XDSField>;// Hidden label (for screen readers only)const searchId = useId();<XDSField label="Search" isLabelHidden inputID={searchId}><input id={searchId} placeholder="Search..." />-</XDSField>+</XDSField>;// Optional fieldconst nicknameId = useId();<XDSField label="Nickname" isOptional inputID={nicknameId}><input id={nicknameId} placeholder="Enter your nickname" />-</XDSField>+</XDSField>;// Required fieldconst usernameId = useId();<XDSField label="Username" isRequired inputID={usernameId}><input id={usernameId} placeholder="Enter your username" />-</XDSField>+</XDSField>;// Description with optional indicator (shows bullet separator)const bioId = useId();@@ -62,32 +61,31 @@ const bioDescId = useId();description="Tell us about yourself"isOptionalinputID={bioId}- descriptionID={bioDescId}->+ descriptionID={bioDescId}><input id={bioId} aria-describedby={bioDescId} />-</XDSField>+</XDSField>;```## Props-| Prop | Type | Required | Description |-|------|------|----------|-------------|-| `label` | `string` | Yes | Label text for the field (always rendered for accessibility) |-| `isLabelHidden` | `boolean` | No | Visually hide the label (still accessible to screen readers) |-| `description` | `string` | No | Description text displayed between the label and input |-| `inputID` | `string` | Yes | ID for the input element (used for label's htmlFor attribute) |-| `descriptionID` | `string` | No | ID for the description element (use for aria-describedby on the input) |-| `isOptional` | `boolean` | No | Whether the field is optional (mutually exclusive with isRequired) |-| `isRequired` | `boolean` | No | Whether the field is required (mutually exclusive with isOptional) |-| `children` | `ReactNode` | Yes | The input or control to render |+| Prop | Type | Required | Description |+| --------------- | ----------- | -------- | ---------------------------------------------------------------------- |+| `label` | `string` | Yes | Label text for the field (always rendered for accessibility) |+| `isLabelHidden` | `boolean` | No | Visually hide the label (still accessible to screen readers) |+| `description` | `string` | No | Description text displayed between the label and input |+| `inputID` | `string` | Yes | ID for the input element (used for label's htmlFor attribute) |+| `descriptionID` | `string` | No | ID for the description element (use for aria-describedby on the input) |+| `isOptional` | `boolean` | No | Whether the field is optional (mutually exclusive with isRequired) |+| `isRequired` | `boolean` | No | Whether the field is required (mutually exclusive with isOptional) |+| `children` | `ReactNode` | Yes | The input or control to render |## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports component and types |-| `XDSField.tsx` | Core | Component implementation |-| `XDSField.test.tsx` | Test | Unit tests |+| File | Role | Purpose |+| ------------------- | ----- | --------------------------- |+| `index.ts` | Entry | Exports component and types |+| `XDSField.tsx` | Core | Component implementation |+| `XDSField.test.tsx` | Test | Unit tests |## Implementation Notesdiff --git a/packages/core/src/Field/XDSField.test.tsx b/packages/core/src/Field/XDSField.test.tsxindex 76da43b178..bc7a0051de 100644--- a/packages/core/src/Field/XDSField.test.tsx+++ b/packages/core/src/Field/XDSField.test.tsx@@ -7,34 +7,44 @@* SYNC: When XDSField.tsx changes, update tests to match new behavior*/-import { describe, it, expect, vi } from 'vitest';-import { render, screen } from '@testing-library/react';-import { XDSField } from './XDSField';+import {describe, it, expect, vi} from 'vitest';+import {render, screen} from '@testing-library/react';+import {XDSField} from './XDSField';describe('XDSField', () => {it('renders with label', () => {render(<XDSField label="Email" inputID="email-input"><input id="email-input" />- </XDSField>+ </XDSField>,);expect(screen.getByLabelText('Email')).toBeInTheDocument();});it('renders description text', () => {render(- <XDSField label="Email" inputID="email-input" description="We'll never share your email" descriptionID="email-desc">+ <XDSField+ label="Email"+ inputID="email-input"+ description="We'll never share your email"+ descriptionID="email-desc"><input id="email-input" aria-describedby="email-desc" />- </XDSField>+ </XDSField>,);- expect(screen.getByText("We'll never share your email")).toBeInTheDocument();+ expect(+ screen.getByText("We'll never share your email"),+ ).toBeInTheDocument();});it('associates description with correct ID', () => {render(- <XDSField label="Email" inputID="email-input" description="Description text" descriptionID="email-desc">+ <XDSField+ label="Email"+ inputID="email-input"+ description="Description text"+ descriptionID="email-desc"><input id="email-input" aria-describedby="email-desc" />- </XDSField>+ </XDSField>,);const description = screen.getByText('Description text');expect(description).toHaveAttribute('id', 'email-desc');@@ -44,7 +54,7 @@ describe('XDSField', () => {render(<XDSField label="Search" isLabelHidden inputID="search-input"><input id="search-input" />- </XDSField>+ </XDSField>,);const label = screen.getByText('Search');expect(label).toBeInTheDocument();@@ -56,7 +66,7 @@ describe('XDSField', () => {render(<XDSField label="Email" inputID="email-input"><input id="email-input" />- </XDSField>+ </XDSField>,);const label = screen.getByText('Email');expect(label).toBeVisible();@@ -67,16 +77,19 @@ describe('XDSField', () => {render(<XDSField ref={ref} label="Name" inputID="name-input"><input id="name-input" />- </XDSField>+ </XDSField>,);expect(ref).toHaveBeenCalledWith(expect.any(HTMLDivElement));});it('renders description without ID attribute when descriptionID is not provided', () => {render(- <XDSField label="Email" inputID="email-input" description="Description text">+ <XDSField+ label="Email"+ inputID="email-input"+ description="Description text"><input id="email-input" />- </XDSField>+ </XDSField>,);const description = screen.getByText('Description text');expect(description).toBeInTheDocument();@@ -87,7 +100,7 @@ describe('XDSField', () => {render(<XDSField label="Name" inputID="name-input" isOptional><input id="name-input" />- </XDSField>+ </XDSField>,);expect(screen.getByText('Optional')).toBeInTheDocument();});@@ -96,16 +109,21 @@ describe('XDSField', () => {render(<XDSField label="Name" inputID="name-input" isRequired><input id="name-input" />- </XDSField>+ </XDSField>,);expect(screen.getByText('Required')).toBeInTheDocument();});it('renders description and Optional text separately', () => {render(- <XDSField label="Name" inputID="name-input" description="Enter your name" descriptionID="name-desc" isOptional>+ <XDSField+ label="Name"+ inputID="name-input"+ description="Enter your name"+ descriptionID="name-desc"+ isOptional><input id="name-input" aria-describedby="name-desc" />- </XDSField>+ </XDSField>,);expect(screen.getByText('Enter your name')).toBeInTheDocument();expect(screen.getByText('Optional')).toBeInTheDocument();@@ -113,9 +131,14 @@ describe('XDSField', () => {it('renders description and Required text separately', () => {render(- <XDSField label="Name" inputID="name-input" description="This field is mandatory" descriptionID="name-desc" isRequired>+ <XDSField+ label="Name"+ inputID="name-input"+ description="This field is mandatory"+ descriptionID="name-desc"+ isRequired><input id="name-input" aria-describedby="name-desc" />- </XDSField>+ </XDSField>,);expect(screen.getByText('This field is mandatory')).toBeInTheDocument();expect(screen.getByText('Required')).toBeInTheDocument();@@ -125,10 +148,10 @@ describe('XDSField', () => {render(<XDSField label="Name" inputID="name-input" isOptional><input id="name-input" />- </XDSField>+ </XDSField>,);expect(screen.getByText('Optional')).toBeInTheDocument();expect(screen.getByText('Name')).toBeInTheDocument();- expect(screen.getByText('∙', { exact: false })).toBeInTheDocument();+ expect(screen.getByText('∙', {exact: false})).toBeInTheDocument();});});diff --git a/packages/core/src/Field/XDSField.tsx b/packages/core/src/Field/XDSField.tsxindex 9dad25cb27..abb6bf44a6 100644--- a/packages/core/src/Field/XDSField.tsx+++ b/packages/core/src/Field/XDSField.tsx@@ -11,9 +11,9 @@* - /apps/storybook/stories/Field.stories.tsx (storybook stories)*/-import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';+import {forwardRef, type HTMLAttributes, type ReactNode} from 'react';import * as stylex from '@stylexjs/stylex';-import { color, spacing, typography } from '../theme/tokens.stylex';+import {color, spacing, typography} from '../theme/tokens.stylex';const styles = stylex.create({container: {@@ -60,7 +60,10 @@ const styles = stylex.create({},});-export interface XDSFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {+export interface XDSFieldProps extends Omit<+ HTMLAttributes<HTMLDivElement>,+ 'children'+> {/*** Label text for the field (always rendered for accessibility).*/@@ -111,14 +114,29 @@ export interface XDSFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'chi* ```*/export const XDSField = forwardRef<HTMLDivElement, XDSFieldProps>(- ({ label, isLabelHidden = false, description, inputID, descriptionID, isOptional = false, isRequired = false, children, ...props }, ref) => {+ (+ {+ label,+ isLabelHidden = false,+ description,+ inputID,+ descriptionID,+ isOptional = false,+ isRequired = false,+ children,+ ...props+ },+ ref,+ ) => {return (<div ref={ref} {...stylex.props(styles.container)} {...props}><div {...stylex.props(styles.labelRow)}><labelhtmlFor={inputID}- {...stylex.props(styles.label, isLabelHidden && styles.labelHidden)}- >+ {...stylex.props(+ styles.label,+ isLabelHidden && styles.labelHidden,+ )}>{label}</label>{isOptional || isRequired ? (@@ -136,7 +154,7 @@ export const XDSField = forwardRef<HTMLDivElement, XDSFieldProps>({children}</div>);- }+ },);XDSField.displayName = 'XDSField';diff --git a/packages/core/src/Field/index.ts b/packages/core/src/Field/index.tsindex c0c2c2a16a..dfe52470b2 100644--- a/packages/core/src/Field/index.ts+++ b/packages/core/src/Field/index.ts@@ -7,5 +7,5 @@* SYNC: When modified, update this header and /packages/core/src/Field/README.md*/-export { XDSField } from './XDSField';-export type { XDSFieldProps } from './XDSField';+export {XDSField} from './XDSField';+export type {XDSFieldProps} from './XDSField';diff --git a/packages/core/src/Layer/README.md b/packages/core/src/Layer/README.mdindex 8c36e8e50e..cb6656bfa9 100644--- a/packages/core/src/Layer/README.md+++ b/packages/core/src/Layer/README.md@@ -7,6 +7,7 @@ Layer components for overlay content using modern browser APIs.## OverviewThe Layer system provides hooks and components for overlay content using:+- **CSS Anchor Positioning** for automatic positioning relative to trigger elements- **Popover API** for top-layer rendering (no React portals needed)@@ -19,11 +20,7 @@ The Layer system provides hooks and components for overlay content using:## Import```tsx-import {- useXDSLayer,- useXDSHoverCard,- XDSHoverCard,-} from '@xds/core/Layer';+import {useXDSLayer, useXDSHoverCard, XDSHoverCard} from '@xds/core/Layer';```## Hooks@@ -34,55 +31,59 @@ Core layer hook with type-safe modes for different positioning strategies.```tsx// Context mode (anchor positioning)-const layer = useXDSLayer({ mode: 'context' });+const layer = useXDSLayer({mode: 'context'});-<button ref={layer.ref}>Trigger</button>-{layer.render(<Content />, { placement: 'above', alignment: 'center' })}+<button ref={layer.ref}>Trigger</button>;+{+ layer.render(<Content />, {placement: 'above', alignment: 'center'});+}// Fixed mode (manual coordinates)-const layer = useXDSLayer({ mode: 'fixed' });+const layer = useXDSLayer({mode: 'fixed'});layer.show();-{layer.render(<Content />, { x: mouseX, y: mouseY })}+{+ layer.render(<Content />, {x: mouseX, y: mouseY});+}```TypeScript enforces correct render props per mode:+- **Context mode**: `render(children, { placement?, alignment? })`- **Fixed mode**: `render(children, { x, y })` (required)-| Option | Type | Description |-|--------|------|-------------|-| `mode` | `'context' \| 'fixed'` | Positioning strategy |-| `onShow` | `() => void` | Callback when shown |-| `onHide` | `() => void` | Callback when hidden |+| Option | Type | Description |+| -------- | ---------------------- | -------------------- |+| `mode` | `'context' \| 'fixed'` | Positioning strategy |+| `onShow` | `() => void` | Callback when shown |+| `onHide` | `() => void` | Callback when hidden |### useXDSHoverCardHook for hover/focus triggered layers with timing control.```tsx-const hoverCard = useXDSHoverCard({ placement: 'above' });+const hoverCard = useXDSHoverCard({placement: 'above'});-<XDSButton- ref={hoverCard.ref}- aria-describedby={hoverCard.describedBy}->+<XDSButton ref={hoverCard.ref} aria-describedby={hoverCard.describedBy}>Hover me-</XDSButton>+</XDSButton>;-{hoverCard.renderHoverCard(<ProfileCard user={user} />)}+{+ hoverCard.renderHoverCard(<ProfileCard user={user} />);+}```-| Option | Type | Default | Description |-|--------|------|---------|-------------|-| `placement` | `LayerPlacement` | `'above'` | Position relative to anchor |-| `alignment` | `LayerAlignment` | `'start'` | Alignment on placement axis |-| `delay` | `number` | `300` | Show delay in ms |-| `hideDelay` | `number` | `200` | Hide delay in ms |-| `focusTrigger` | `'auto' \| 'always' \| 'never'` | `'auto'` | Focus listener behavior |-| `isEnabled` | `boolean` | `true` | Enable/disable triggers |-| `onShow` | `() => void` | — | Callback when shown |-| `onHide` | `() => void` | — | Callback when hidden |+| Option | Type | Default | Description |+| -------------- | ------------------------------- | --------- | --------------------------- |+| `placement` | `LayerPlacement` | `'above'` | Position relative to anchor |+| `alignment` | `LayerAlignment` | `'start'` | Alignment on placement axis |+| `delay` | `number` | `300` | Show delay in ms |+| `hideDelay` | `number` | `200` | Hide delay in ms |+| `focusTrigger` | `'auto' \| 'always' \| 'never'` | `'auto'` | Focus listener behavior |+| `isEnabled` | `boolean` | `true` | Enable/disable triggers |+| `onShow` | `() => void` | — | Callback when shown |+| `onHide` | `() => void` | — | Callback when hidden |## Components@@ -91,43 +92,40 @@ const hoverCard = useXDSHoverCard({ placement: 'above' });Component wrapper for simpler hover card usage.```tsx-<XDSHoverCard- content={<ProfileCard user={user} />}- placement="above"->+<XDSHoverCard content={<ProfileCard user={user} />} placement="above"><XDSButton>Hover me</XDSButton></XDSHoverCard>```-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `children` | `ReactElement` | Required | Trigger element (must accept ref) |-| `content` | `ReactNode` | Required | Hover card content |-| `placement` | `LayerPlacement` | `'above'` | Position relative to anchor |-| `alignment` | `LayerAlignment` | `'start'` | Alignment on placement axis |-| `delay` | `number` | `300` | Show delay in ms |-| `hideDelay` | `number` | `200` | Hide delay in ms |-| `focusTrigger` | `'auto' \| 'always' \| 'never'` | `'auto'` | Focus listener behavior |-| `isEnabled` | `boolean` | `true` | Enable/disable triggers |+| Prop | Type | Default | Description |+| -------------- | ------------------------------- | --------- | --------------------------------- |+| `children` | `ReactElement` | Required | Trigger element (must accept ref) |+| `content` | `ReactNode` | Required | Hover card content |+| `placement` | `LayerPlacement` | `'above'` | Position relative to anchor |+| `alignment` | `LayerAlignment` | `'start'` | Alignment on placement axis |+| `delay` | `number` | `300` | Show delay in ms |+| `hideDelay` | `number` | `200` | Hide delay in ms |+| `focusTrigger` | `'auto' \| 'always' \| 'never'` | `'auto'` | Focus listener behavior |+| `isEnabled` | `boolean` | `true` | Enable/disable triggers |## Position Values### LayerPlacement-| Value | Description |-|-------|-------------|-| `above` | Above the anchor |-| `below` | Below the anchor |+| Value | Description |+| ------- | ------------------------ |+| `above` | Above the anchor |+| `below` | Below the anchor || `start` | Start side (left in LTR) |-| `end` | End side (right in LTR) |+| `end` | End side (right in LTR) |### LayerAlignment-| Value | Description |-|-------|-------------|-| `start` | Align to start edge |-| `center` | Center aligned |-| `end` | Align to end edge |+| Value | Description |+| -------- | ------------------- |+| `start` | Align to start edge |+| `center` | Center aligned |+| `end` | Align to end edge |## ARIA Guidelines@@ -139,7 +137,7 @@ const hoverCard = useXDSHoverCard();<XDSInputref={hoverCard.ref}aria-describedby={mergeIds(fieldErrorId, hoverCard.describedBy)}-/>+/>;// Utility functionfunction mergeIds(...ids: (string | undefined)[]) {@@ -149,10 +147,10 @@ function mergeIds(...ids: (string | undefined)[]) {## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports all layer utilities and components |-| `useXDSLayer.ts` | Hook | Core popover and positioning logic |-| `useXDSHoverCard.ts` | Hook | Hover/focus triggers for layers |-| `XDSHoverCard.tsx` | Component | Wrapper component for hover cards |-| `XDSHoverCard.test.tsx` | Test | HoverCard unit tests |+| File | Role | Purpose |+| ----------------------- | --------- | ------------------------------------------ |+| `index.ts` | Entry | Exports all layer utilities and components |+| `useXDSLayer.ts` | Hook | Core popover and positioning logic |+| `useXDSHoverCard.ts` | Hook | Hover/focus triggers for layers |+| `XDSHoverCard.tsx` | Component | Wrapper component for hover cards |+| `XDSHoverCard.test.tsx` | Test | HoverCard unit tests |diff --git a/packages/core/src/Layer/XDSHoverCard.test.tsx b/packages/core/src/Layer/XDSHoverCard.test.tsxindex c0f490eaa2..a291e72013 100644--- a/packages/core/src/Layer/XDSHoverCard.test.tsx+++ b/packages/core/src/Layer/XDSHoverCard.test.tsx@@ -7,9 +7,9 @@* SYNC: When XDSHoverCard.tsx changes, update tests to match new behavior*/-import { describe, it, expect, vi, beforeAll, afterAll } from 'vitest';-import { render, screen, fireEvent, waitFor } from '@testing-library/react';-import { XDSHoverCard } from './XDSHoverCard';+import {describe, it, expect, vi, beforeAll, afterAll} from 'vitest';+import {render, screen, fireEvent, waitFor} from '@testing-library/react';+import {XDSHoverCard} from './XDSHoverCard';// Store original matches to restore laterconst originalMatches = HTMLElement.prototype.matches;@@ -44,16 +44,16 @@ describe('XDSHoverCard', () => {render(<XDSHoverCard content={<span>Card content</span>}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- expect(screen.getByRole('button', { name: 'Trigger' })).toBeInTheDocument();+ expect(screen.getByRole('button', {name: 'Trigger'})).toBeInTheDocument();});it('does not show content initially', () => {render(<XDSHoverCard content={<span>Card content</span>}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);// Content is in DOM (popover not open but element exists)const content = screen.queryByText('Card content');@@ -64,9 +64,9 @@ describe('XDSHoverCard', () => {render(<XDSHoverCard content={<span>Card content</span>}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});expect(trigger).toHaveAttribute('aria-describedby');});@@ -74,9 +74,9 @@ describe('XDSHoverCard', () => {render(<XDSHoverCard content={<span>Card content</span>}><button aria-describedby="existing-id">Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});const describedBy = trigger.getAttribute('aria-describedby');expect(describedBy).toContain('existing-id');});@@ -87,13 +87,12 @@ describe('XDSHoverCard', () => {<XDSHoverCardcontent={<span>Card content</span>}onShow={onShow}- delay={0}- >+ delay={0}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});fireEvent.mouseEnter(trigger);await waitFor(() => {@@ -108,17 +107,16 @@ describe('XDSHoverCard', () => {content={<span>Card content</span>}onShow={onShow}isEnabled={false}- delay={0}- >+ delay={0}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});fireEvent.mouseEnter(trigger);// Wait a bit and verify onShow was not called- await new Promise((resolve) => setTimeout(resolve, 50));+ await new Promise(resolve => setTimeout(resolve, 50));expect(onShow).not.toHaveBeenCalled();});@@ -126,7 +124,7 @@ describe('XDSHoverCard', () => {render(<XDSHoverCard content={<span>Card content</span>}>Just text, no element- </XDSHoverCard>+ </XDSHoverCard>,);// Text should be renderedexpect(screen.getByText('Just text, no element')).toBeInTheDocument();@@ -147,13 +145,12 @@ describe('XDSHoverCard', () => {content={<span>Card content</span>}onHide={onHide}delay={0}- hideDelay={0}- >+ hideDelay={0}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});// Show the hover cardfireEvent.mouseEnter(trigger);@@ -162,7 +159,7 @@ describe('XDSHoverCard', () => {});// Press Escape on trigger- fireEvent.keyDown(trigger, { key: 'Escape' });+ fireEvent.keyDown(trigger, {key: 'Escape'});// hidePopover should be calledawait waitFor(() => {@@ -177,13 +174,12 @@ describe('XDSHoverCard', () => {<XDSHoverCardcontent={<button>Interactive button</button>}delay={0}- hideDelay={0}- >+ hideDelay={0}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});// Show the hover cardfireEvent.mouseEnter(trigger);@@ -193,7 +189,7 @@ describe('XDSHoverCard', () => {// Find the interactive content using getByText (works inside popovers)const contentButton = screen.getByText('Interactive button');- fireEvent.keyDown(contentButton, { key: 'Escape' });+ fireEvent.keyDown(contentButton, {key: 'Escape'});// hidePopover should be calledawait waitFor(() => {@@ -206,13 +202,12 @@ describe('XDSHoverCard', () => {<XDSHoverCardcontent={<button>Interactive button</button>}delay={0}- hideDelay={0}- >+ hideDelay={0}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});// Show the hover card via focusfireEvent.focus(trigger);@@ -225,7 +220,7 @@ describe('XDSHoverCard', () => {(contentButton as HTMLElement).focus();// Press Escape - should refocus trigger- fireEvent.keyDown(contentButton, { key: 'Escape' });+ fireEvent.keyDown(contentButton, {key: 'Escape'});await waitFor(() => {expect(document.activeElement).toBe(trigger);@@ -239,13 +234,12 @@ describe('XDSHoverCard', () => {content={<button>Interactive button</button>}onShow={onShow}delay={0}- hideDelay={0}- >+ hideDelay={0}><button>Trigger</button>- </XDSHoverCard>+ </XDSHoverCard>,);- const trigger = screen.getByRole('button', { name: 'Trigger' });+ const trigger = screen.getByRole('button', {name: 'Trigger'});// Show the hover card via focusfireEvent.focus(trigger);@@ -261,10 +255,10 @@ describe('XDSHoverCard', () => {onShow.mockClear();// Press Escape - this refocuses trigger but shouldn't re-show- fireEvent.keyDown(contentButton, { key: 'Escape' });+ fireEvent.keyDown(contentButton, {key: 'Escape'});// Wait a bit and verify onShow was not called again- await new Promise((resolve) => setTimeout(resolve, 50));+ await new Promise(resolve => setTimeout(resolve, 50));expect(onShow).not.toHaveBeenCalled();});});diff --git a/packages/core/src/Layer/XDSHoverCard.tsx b/packages/core/src/Layer/XDSHoverCard.tsxindex bb0b027198..1e79420a9e 100644--- a/packages/core/src/Layer/XDSHoverCard.tsx+++ b/packages/core/src/Layer/XDSHoverCard.tsx@@ -19,12 +19,12 @@ import React, {type ReactNode,} from 'react';import * as stylex from '@stylexjs/stylex';-import { ThemeContext } from '../theme/ThemeContext';-import { useXDSHoverCard, type HoverCardFocusTrigger } from './useXDSHoverCard';-import type { LayerAlignment, LayerPlacement } from './useXDSLayer';-import { color } from '../theme/tokens.stylex';+import {ThemeContext} from '../theme/ThemeContext';+import {useXDSHoverCard, type HoverCardFocusTrigger} from './useXDSHoverCard';+import type {LayerAlignment, LayerPlacement} from './useXDSLayer';+import {color} from '../theme/tokens.stylex';-export type { HoverCardFocusTrigger } from './useXDSHoverCard';+export type {HoverCardFocusTrigger} from './useXDSHoverCard';const styles = stylex.create({wrapperContents: {@@ -120,7 +120,7 @@ export interface XDSHoverCardProps {*/function isTextOnly(children: ReactNode): boolean {let hasElement = false;- React.Children.forEach(children, (child) => {+ React.Children.forEach(children, child => {if (React.isValidElement(child)) {hasElement = true;}@@ -175,8 +175,7 @@ export function XDSHoverCard({// Determine if hover indication should be shownconst showHoverIndication =- hasHoverIndication === true ||- (hasHoverIndication === 'auto' && textOnly);+ hasHoverIndication === true || (hasHoverIndication === 'auto' && textOnly);// Use the hook for all hover card behaviorconst hoverCard = useXDSHoverCard({@@ -207,7 +206,7 @@ export function XDSHoverCard({const existingDescribedBy = firstChild.getAttribute('aria-describedby');firstChild.setAttribute('aria-describedby',- mergeIds(existingDescribedBy, hoverCard.describedBy) ?? ''+ mergeIds(existingDescribedBy, hoverCard.describedBy) ?? '',);return () => {@@ -231,9 +230,8 @@ export function XDSHoverCard({{...stylex.props(styles.wrapperInline,showHoverIndication && styles.hoverIndication,- showHoverIndication && themeHoverIndicationOverride- )}- >+ showHoverIndication && themeHoverIndicationOverride,+ )}>{children}</span>{hoverCard.renderHoverCard(content)}@@ -246,8 +244,7 @@ export function XDSHoverCard({<><divref={wrapperRef as React.RefObject<HTMLDivElement>}- {...stylex.props(styles.wrapperContents)}- >+ {...stylex.props(styles.wrapperContents)}>{children}</div>{hoverCard.renderHoverCard(content)}diff --git a/packages/core/src/Layer/XDSTooltip.tsx b/packages/core/src/Layer/XDSTooltip.tsxindex 9c5b8d96bc..057b93f91e 100644--- a/packages/core/src/Layer/XDSTooltip.tsx+++ b/packages/core/src/Layer/XDSTooltip.tsx@@ -19,12 +19,12 @@ import React, {type ReactNode,} from 'react';import * as stylex from '@stylexjs/stylex';-import { ThemeContext } from '../theme/ThemeContext';-import { useXDSTooltip, type TooltipFocusTrigger } from './useXDSTooltip';-import type { LayerAlignment, LayerPlacement } from './useXDSLayer';-import { color } from '../theme/tokens.stylex';+import {ThemeContext} from '../theme/ThemeContext';+import {useXDSTooltip, type TooltipFocusTrigger} from './useXDSTooltip';+import type {LayerAlignment, LayerPlacement} from './useXDSLayer';+import {color} from '../theme/tokens.stylex';-export type { TooltipFocusTrigger } from './useXDSTooltip';+export type {TooltipFocusTrigger} from './useXDSTooltip';const styles = stylex.create({wrapperContents: {@@ -121,7 +121,7 @@ export interface XDSTooltipProps {*/function isTextOnly(children: ReactNode): boolean {let hasElement = false;- React.Children.forEach(children, (child) => {+ React.Children.forEach(children, child => {if (React.isValidElement(child)) {hasElement = true;}@@ -174,8 +174,7 @@ export function XDSTooltip({// Determine if hover indication should be shownconst showHoverIndication =- hasHoverIndication === true ||- (hasHoverIndication === 'auto' && textOnly);+ hasHoverIndication === true || (hasHoverIndication === 'auto' && textOnly);// Use the hook for all tooltip behaviorconst tooltip = useXDSTooltip({@@ -206,7 +205,7 @@ export function XDSTooltip({const existingDescribedBy = firstChild.getAttribute('aria-describedby');firstChild.setAttribute('aria-describedby',- mergeIds(existingDescribedBy, tooltip.describedBy) ?? ''+ mergeIds(existingDescribedBy, tooltip.describedBy) ?? '',);return () => {@@ -230,9 +229,8 @@ export function XDSTooltip({{...stylex.props(styles.wrapperInline,showHoverIndication && styles.hoverIndication,- showHoverIndication && themeHoverIndicationOverride- )}- >+ showHoverIndication && themeHoverIndicationOverride,+ )}>{children}</span>{tooltip.renderTooltip(content)}@@ -245,8 +243,7 @@ export function XDSTooltip({<><divref={wrapperRef as React.RefObject<HTMLDivElement>}- {...stylex.props(styles.wrapperContents)}- >+ {...stylex.props(styles.wrapperContents)}>{children}</div>{tooltip.renderTooltip(content)}diff --git a/packages/core/src/Layer/componentStyles.ts b/packages/core/src/Layer/componentStyles.tsindex a1b249916c..bbc77b7324 100644--- a/packages/core/src/Layer/componentStyles.ts+++ b/packages/core/src/Layer/componentStyles.ts@@ -7,7 +7,7 @@* SYNC: When adding new Layer components, add their style types here.*/-import type { StyleXStyles } from '../theme/types';+import type {StyleXStyles} from '../theme/types';// =============================================================================// Module Augmentation - Register Layer component styles with ComponentStylesdiff --git a/packages/core/src/Layer/index.ts b/packages/core/src/Layer/index.tsindex ef7bc08623..00a7da8427 100644--- a/packages/core/src/Layer/index.ts+++ b/packages/core/src/Layer/index.ts@@ -11,7 +11,7 @@import './componentStyles';// Core layer hook-export { useXDSLayer } from './useXDSLayer';+export {useXDSLayer} from './useXDSLayer';export type {LayerAlignment,LayerPlacement,@@ -24,23 +24,23 @@ export type {} from './useXDSLayer';// HoverCard hook and component-export { useXDSHoverCard } from './useXDSHoverCard';+export {useXDSHoverCard} from './useXDSHoverCard';export type {HoverCardFocusTrigger,XDSHoverCardOptions,XDSHoverCardReturn,} from './useXDSHoverCard';-export { XDSHoverCard } from './XDSHoverCard';-export type { XDSHoverCardProps } from './XDSHoverCard';+export {XDSHoverCard} from './XDSHoverCard';+export type {XDSHoverCardProps} from './XDSHoverCard';// Tooltip hook and component-export { useXDSTooltip } from './useXDSTooltip';+export {useXDSTooltip} from './useXDSTooltip';export type {TooltipFocusTrigger,XDSTooltipOptions,XDSTooltipReturn,} from './useXDSTooltip';-export { XDSTooltip } from './XDSTooltip';-export type { XDSTooltipProps } from './XDSTooltip';+export {XDSTooltip} from './XDSTooltip';+export type {XDSTooltipProps} from './XDSTooltip';diff --git a/packages/core/src/Layer/useXDSHoverCard.tsx b/packages/core/src/Layer/useXDSHoverCard.tsxindex a80a2058d3..554f573725 100644--- a/packages/core/src/Layer/useXDSHoverCard.tsx+++ b/packages/core/src/Layer/useXDSHoverCard.tsx@@ -18,20 +18,15 @@ import {type RefCallback,} from 'react';import * as stylex from '@stylexjs/stylex';-import type { StyleXStyles } from '../theme/types';-import { ThemeContext } from '../theme/ThemeContext';+import type {StyleXStyles} from '../theme/types';+import {ThemeContext} from '../theme/ThemeContext';import {useXDSLayer,type ContextRenderProps,type LayerAlignment,type LayerPlacement,} from './useXDSLayer';-import {- color,- elevation,- radius,- spacing,-} from '../theme/tokens.stylex';+import {color, elevation, radius, spacing} from '../theme/tokens.stylex';const styles = stylex.create({// Base container styles passed to useXDSLayer (includes animations)@@ -176,7 +171,10 @@ export interface XDSHoverCardReturn {* Render function for hover card content.* Returns anchor-positioned popover element.*/- renderHoverCard: (children: ReactNode, props?: ContextRenderProps) => ReactNode;+ renderHoverCard: (+ children: ReactNode,+ props?: ContextRenderProps,+ ) => ReactNode;}/**@@ -225,7 +223,9 @@ function isFocusable(element: HTMLElement): boolean {* // Use positionRef for anchor, interactionRef for event listeners* ```*/-export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardReturn {+export function useXDSHoverCard(+ options: XDSHoverCardOptions = {},+): XDSHoverCardReturn {const {placement = 'above',alignment = 'center',@@ -239,8 +239,10 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCard// Get theme context for component-level overridesconst themeContext = useContext(ThemeContext);- const themeContainerOverride = themeContext?.theme.components?.hoverCard?.container;- const themeContentOverride = themeContext?.theme.components?.hoverCard?.content;+ const themeContainerOverride =+ themeContext?.theme.components?.hoverCard?.container;+ const themeContentOverride =+ themeContext?.theme.components?.hoverCard?.content;// Select margin style based on placement axisconst marginStyle =@@ -327,7 +329,7 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardscheduleHide();},- [layer.id, scheduleHide]+ [layer.id, scheduleHide],);const handleKeyDown = useCallback(@@ -340,7 +342,7 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardlayer.hide();}},- [clearTimeouts, layer]+ [clearTimeouts, layer],);// Interaction ref that handles event listeners only@@ -351,7 +353,10 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardtriggerRef.current.removeEventListener('mouseenter', handleMouseEnter);triggerRef.current.removeEventListener('mouseleave', handleMouseLeave);triggerRef.current.removeEventListener('focusin', handleFocusIn);- triggerRef.current.removeEventListener('focusout', handleFocusOut as EventListener);+ triggerRef.current.removeEventListener(+ 'focusout',+ handleFocusOut as EventListener,+ );triggerRef.current.removeEventListener('keydown', handleKeyDown);}@@ -376,7 +381,14 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardtriggerRef.current = el;},- [focusTrigger, handleMouseEnter, handleMouseLeave, handleFocusIn, handleFocusOut, handleKeyDown]+ [+ focusTrigger,+ handleMouseEnter,+ handleMouseLeave,+ handleFocusIn,+ handleFocusOut,+ handleKeyDown,+ ],);// Combined ref - shorthand for calling both positionRef and interactionRef@@ -385,7 +397,7 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardlayer.ref(el);interactionRef(el);},- [layer.ref, interactionRef]+ [layer.ref, interactionRef],);// Cleanup on unmount@@ -414,7 +426,7 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardisHoveringContentRef.current = false;scheduleHide();}}- onKeyDown={(e) => {+ onKeyDown={e => {if (e.key === 'Escape') {// Stop propagation so parent components don't react to the same Escapee.stopPropagation();@@ -427,7 +439,7 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCardtriggerRef.current?.focus();}}}- onBlur={(e) => {+ onBlur={e => {// Check if focus is moving back to the trigger or staying within contentconst relatedTarget = e.relatedTarget as HTMLElement | null;const popoverElement = e.currentTarget;@@ -444,14 +456,20 @@ export function useXDSHoverCard(options: XDSHoverCardOptions = {}): XDSHoverCard// Focus is leaving the hover card entirelyscheduleHide();- }}- >+ }}>{children}</div>,- renderProps+ renderProps,);},- [layer, placement, alignment, clearTimeouts, scheduleHide, themeContentOverride]+ [+ layer,+ placement,+ alignment,+ clearTimeouts,+ scheduleHide,+ themeContentOverride,+ ],);return {diff --git a/packages/core/src/Layer/useXDSLayer.tsx b/packages/core/src/Layer/useXDSLayer.tsxindex 1e2a3f36af..28f64d703e 100644--- a/packages/core/src/Layer/useXDSLayer.tsx+++ b/packages/core/src/Layer/useXDSLayer.tsx@@ -18,9 +18,8 @@ import React, {type RefCallback,} from 'react';import * as stylex from '@stylexjs/stylex';-import type { StyleXStyles } from '@stylexjs/stylex';-import { spacing } from '../theme/tokens.stylex';-+import type {StyleXStyles} from '@stylexjs/stylex';+import {spacing} from '../theme/tokens.stylex';// Extend React's HTMLAttributes to include popover API attributesdeclare module 'react' {@@ -194,7 +193,7 @@ export interface FixedLayerReturn {*/function getPositionArea(placement: LayerPlacement = 'above',- alignment: LayerAlignment = 'center'+ alignment: LayerAlignment = 'center',): string {const placementMap: Record<LayerPlacement, string> = {above: 'top',@@ -243,9 +242,9 @@ function getPositionArea(export function useXDSLayer(options: ContextLayerOptions): ContextLayerReturn;export function useXDSLayer(options: FixedLayerOptions): FixedLayerReturn;export function useXDSLayer(- options: ContextLayerOptions | FixedLayerOptions+ options: ContextLayerOptions | FixedLayerOptions,): ContextLayerReturn | FixedLayerReturn {- const { mode, onShow, onHide, xstyle } = options;+ const {mode, onShow, onHide, xstyle} = options;const id = useId();const anchorId = `--xds-layer-${id.replace(/:/g, '')}`;@@ -275,11 +274,14 @@ export function useXDSLayer(? (el: HTMLElement | null) => {// Cleanup previous elementif (triggerRef.current) {- (triggerRef.current.style as unknown as Record<string, string>).anchorName = '';+ (+ triggerRef.current.style as unknown as Record<string, string>+ ).anchorName = '';}if (el) {- (el.style as unknown as Record<string, string>).anchorName = anchorId;+ (el.style as unknown as Record<string, string>).anchorName =+ anchorId;}triggerRef.current = el;@@ -298,13 +300,13 @@ export function useXDSLayer(onShow?.();}},- [onShow, onHide]+ [onShow, onHide],);// Render function for context modeconst renderContext = useCallback((children: ReactNode, props?: ContextRenderProps) => {- const { placement = 'above', alignment = 'center' } = props || {};+ const {placement = 'above', alignment = 'center'} = props || {};// CSS anchor positioning properties (dynamic, not in StyleX)const anchorStyle: React.CSSProperties = {@@ -315,7 +317,7 @@ export function useXDSLayer(return (<div- ref={(el) => {+ ref={el => {popoverRef.current = el;if (el) {el.addEventListener('toggle', handleToggle);@@ -324,19 +326,18 @@ export function useXDSLayer(id={id}popover="manual"{...stylex.props(styles.base, xstyle)}- style={anchorStyle}- >+ style={anchorStyle}>{children}</div>);},- [anchorId, handleToggle, id, xstyle]+ [anchorId, handleToggle, id, xstyle],);// Render function for fixed modeconst renderFixed = useCallback((children: ReactNode, props: FixedRenderProps) => {- const { x, y } = props;+ const {x, y} = props;// Dynamic position valuesconst positionStyle: React.CSSProperties = {@@ -346,7 +347,7 @@ export function useXDSLayer(return (<div- ref={(el) => {+ ref={el => {popoverRef.current = el;if (el) {el.addEventListener('toggle', handleToggle);@@ -355,13 +356,12 @@ export function useXDSLayer(id={id}popover="manual"{...stylex.props(styles.base, styles.fixed, xstyle)}- style={positionStyle}- >+ style={positionStyle}>{children}</div>);},- [handleToggle, id, xstyle]+ [handleToggle, id, xstyle],);if (mode === 'context') {diff --git a/packages/core/src/Layer/useXDSTooltip.tsx b/packages/core/src/Layer/useXDSTooltip.tsxindex f097ab43d1..16202405c5 100644--- a/packages/core/src/Layer/useXDSTooltip.tsx+++ b/packages/core/src/Layer/useXDSTooltip.tsx@@ -18,20 +18,15 @@ import {type RefCallback,} from 'react';import * as stylex from '@stylexjs/stylex';-import type { StyleXStyles } from '../theme/types';-import { ThemeContext } from '../theme/ThemeContext';+import type {StyleXStyles} from '../theme/types';+import {ThemeContext} from '../theme/ThemeContext';import {useXDSLayer,type ContextRenderProps,type LayerAlignment,type LayerPlacement,} from './useXDSLayer';-import {- color,- radius,- spacing,- typography,-} from '../theme/tokens.stylex';+import {color, radius, spacing, typography} from '../theme/tokens.stylex';const styles = stylex.create({// Base container styles - inverted colors for high contrast@@ -232,7 +227,9 @@ function isFocusable(element: HTMLElement): boolean {* {tooltip.renderTooltip('Helpful tooltip text')}* ```*/-export function useXDSTooltip(options: XDSTooltipOptions = {}): XDSTooltipReturn {+export function useXDSTooltip(+ options: XDSTooltipOptions = {},+): XDSTooltipReturn {const {placement = 'above',alignment = 'center',@@ -246,7 +243,8 @@ export function useXDSTooltip(options: XDSTooltipOptions = {}): XDSTooltipReturn// Get theme context for component-level overridesconst themeContext = useContext(ThemeContext);- const themeContainerOverride = themeContext?.theme.components?.tooltip?.container;+ const themeContainerOverride =+ themeContext?.theme.components?.tooltip?.container;const themeContentOverride = themeContext?.theme.components?.tooltip?.content;// Select margin style based on placement axis@@ -347,7 +345,13 @@ export function useXDSTooltip(options: XDSTooltipOptions = {}): XDSTooltipReturntriggerRef.current = el;},- [focusTrigger, handleMouseEnter, handleMouseLeave, handleFocusIn, handleFocusOut]+ [+ focusTrigger,+ handleMouseEnter,+ handleMouseLeave,+ handleFocusIn,+ handleFocusOut,+ ],);// Combined ref - shorthand for calling both positionRef and interactionRef@@ -356,7 +360,7 @@ export function useXDSTooltip(options: XDSTooltipOptions = {}): XDSTooltipReturnlayer.ref(el);interactionRef(el);},- [layer.ref, interactionRef]+ [layer.ref, interactionRef],);// Cleanup on unmount@@ -375,11 +379,13 @@ export function useXDSTooltip(options: XDSTooltipOptions = {}): XDSTooltipReturn};return layer.render(- <div {...stylex.props(styles.content, themeContentOverride)}>{children}</div>,- renderProps+ <div {...stylex.props(styles.content, themeContentOverride)}>+ {children}+ </div>,+ renderProps,);},- [layer, placement, alignment, themeContentOverride]+ [layer, placement, alignment, themeContentOverride],);return {diff --git a/packages/core/src/Layout/Container/README.md b/packages/core/src/Layout/Container/README.mdindex ae6bf08342..dd3b6f3246 100644--- a/packages/core/src/Layout/Container/README.md+++ b/packages/core/src/Layout/Container/README.md@@ -7,6 +7,7 @@ Layout container components: a primitive and higher-order containers for cards a## OverviewThis folder contains:+- **XDSLayoutContainer** — A primitive that sets CSS variables for padding- **XDSCard** — Higher-order component with card styling (elevation, radius)- **XDSSection** — Higher-order component with background variants@@ -14,11 +15,7 @@ This folder contains:## Import```tsx-import {- XDSLayoutContainer,- XDSCard,- XDSSection,-} from '@xds/core/Layout';+import {XDSLayoutContainer, XDSCard, XDSSection} from '@xds/core/Layout';```## Components@@ -49,13 +46,13 @@ A card container with elevation and themed styling. Use for elevated content con</XDSCard>```-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `width` | `SizeValue` | — | Width (number = pixels, string = as-is) |-| `height` | `SizeValue` | — | Height (number = pixels, string = as-is) |-| `maxWidth` | `SizeValue` | — | Maximum width |-| `minHeight` | `SizeValue` | — | Minimum height |-| `children` | `ReactNode` | — | Content (typically XDSLayout) |+| Prop | Type | Default | Description |+| ----------- | ----------- | ------- | ---------------------------------------- |+| `width` | `SizeValue` | — | Width (number = pixels, string = as-is) |+| `height` | `SizeValue` | — | Height (number = pixels, string = as-is) |+| `maxWidth` | `SizeValue` | — | Maximum width |+| `minHeight` | `SizeValue` | — | Minimum height |+| `children` | `ReactNode` | — | Content (typically XDSLayout) |### XDSSection@@ -69,22 +66,22 @@ A section container with background variants. Use for content sections within a</XDSSection>```-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `variant` | `'section' \| 'transparent' \| 'wash'` | `'section'` | Background variant |-| `width` | `SizeValue` | — | Width (number = pixels, string = as-is) |-| `height` | `SizeValue` | — | Height (number = pixels, string = as-is) |-| `maxWidth` | `SizeValue` | — | Maximum width |-| `minHeight` | `SizeValue` | — | Minimum height |-| `children` | `ReactNode` | — | Content |+| Prop | Type | Default | Description |+| ----------- | -------------------------------------- | ----------- | ---------------------------------------- |+| `variant` | `'section' \| 'transparent' \| 'wash'` | `'section'` | Background variant |+| `width` | `SizeValue` | — | Width (number = pixels, string = as-is) |+| `height` | `SizeValue` | — | Height (number = pixels, string = as-is) |+| `maxWidth` | `SizeValue` | — | Maximum width |+| `minHeight` | `SizeValue` | — | Minimum height |+| `children` | `ReactNode` | — | Content |**Variants:**-| Variant | Background |-|---------|------------|-| `section` | Surface color |-| `transparent` | Transparent |-| `wash` | Wash color |+| Variant | Background |+| ------------- | ------------- |+| `section` | Surface color |+| `transparent` | Transparent |+| `wash` | Wash color |### XDSLayoutContainer (Primitive)@@ -101,28 +98,29 @@ A low-level primitive that sets CSS variables for layout padding. Prefer XDSCard</XDSLayoutContainer>```-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `xstyle` | `StyleXStyles` | — | Custom styles (background, shadow, radius, sizing) |-| `paddingOuterX` | `SpacingToken` | `'space4'` | Outer horizontal padding |-| `paddingOuterY` | `SpacingToken` | `'space4'` | Outer vertical padding |-| `paddingInnerX` | `SpacingToken` | `'space4'` | Inner horizontal padding for content areas |-| `paddingInnerY` | `SpacingToken` | `'space4'` | Inner vertical padding for content areas |-| `children` | `ReactNode` | — | Content |+| Prop | Type | Default | Description |+| --------------- | -------------- | ---------- | -------------------------------------------------- |+| `xstyle` | `StyleXStyles` | — | Custom styles (background, shadow, radius, sizing) |+| `paddingOuterX` | `SpacingToken` | `'space4'` | Outer horizontal padding |+| `paddingOuterY` | `SpacingToken` | `'space4'` | Outer vertical padding |+| `paddingInnerX` | `SpacingToken` | `'space4'` | Inner horizontal padding for content areas |+| `paddingInnerY` | `SpacingToken` | `'space4'` | Inner vertical padding for content areas |+| `children` | `ReactNode` | — | Content |**CSS Variables Set:**+- `--layout-padding-outer-x`, `--layout-padding-outer-y` — Used by XDSLayout for fullBleed calculations- `--layout-padding-inner-x`, `--layout-padding-inner-y` — Used by content areas (Header, Footer, Content, Panel)## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports all components and types |+| File | Role | Purpose |+| ------------------------ | --------- | ---------------------------------- |+| `index.ts` | Entry | Exports all components and types || `XDSLayoutContainer.tsx` | Primitive | Base container, sets CSS variables |-| `XDSCard.tsx` | Component | Card with elevation |-| `XDSSection.tsx` | Component | Section with background variants |-| `README.md` | Docs | This documentation |+| `XDSCard.tsx` | Component | Card with elevation |+| `XDSSection.tsx` | Component | Section with background variants |+| `README.md` | Docs | This documentation |## Theming@@ -132,14 +130,14 @@ Higher-order components support theme-level overrides:// XDSCard themingdeclare module '@xds/core' {interface ComponentStyles {- card?: { base?: StyleXStyles };+ card?: {base?: StyleXStyles};}}// XDSSection themingdeclare module '@xds/core' {interface ComponentStyles {- section?: { variants?: Partial<Record<XDSSectionVariant, StyleXStyles>> };+ section?: {variants?: Partial<Record<XDSSectionVariant, StyleXStyles>>};}}```diff --git a/packages/core/src/Layout/Container/XDSCard.tsx b/packages/core/src/Layout/Container/XDSCard.tsxindex 1d3eaba68b..98b8581b58 100644--- a/packages/core/src/Layout/Container/XDSCard.tsx+++ b/packages/core/src/Layout/Container/XDSCard.tsx@@ -5,16 +5,12 @@* @position Higher-order container component for card layouts*/-import { forwardRef, useContext, type ReactNode } from 'react';+import {forwardRef, useContext, type ReactNode} from 'react';import * as stylex from '@stylexjs/stylex';-import {- color,- radius,- elevation,-} from '../../theme/tokens.stylex';-import { ThemeContext } from '../../theme/ThemeContext';-import type { StyleXStyles as ThemeStyleXStyles } from '../../theme/types';-import { container } from './container.stylex';+import {color, radius, elevation} from '../../theme/tokens.stylex';+import {ThemeContext} from '../../theme/ThemeContext';+import type {StyleXStyles as ThemeStyleXStyles} from '../../theme/types';+import {container} from './container.stylex';// =============================================================================// Module Augmentation - Register XDSCard's themeable properties@@ -43,7 +39,7 @@ const dynamicStyles = stylex.create({width: SizeValue | null,height: SizeValue | null,maxWidth: SizeValue | null,- minHeight: SizeValue | null+ minHeight: SizeValue | null,) => ({width,height,@@ -107,7 +103,10 @@ export interface XDSCardProps {* ```*/export const XDSCard = forwardRef<HTMLDivElement, XDSCardProps>(- function XDSCard({ width, height, maxWidth, minHeight, children, ...props }, ref) {+ function XDSCard(+ {width, height, maxWidth, minHeight, children, ...props},+ ref,+ ) {// Get theme context for component-level overridesconst themeContext = useContext(ThemeContext);const themeOverride = themeContext?.theme.components?.card?.base;@@ -128,15 +127,14 @@ export const XDSCard = forwardRef<HTMLDivElement, XDSCardProps>(width ?? null,height ?? null,maxWidth ?? null,- minHeight ?? null- )+ minHeight ?? null,+ ),)}- {...props}- >+ {...props}>{children}</div>);- }+ },);XDSCard.displayName = 'XDSCard';diff --git a/packages/core/src/Layout/Container/XDSSection.tsx b/packages/core/src/Layout/Container/XDSSection.tsxindex 8a82ce53be..6f02df16b3 100644--- a/packages/core/src/Layout/Container/XDSSection.tsx+++ b/packages/core/src/Layout/Container/XDSSection.tsx@@ -5,13 +5,13 @@* @position Higher-order container component for section layouts*/-import { forwardRef, useContext, type ReactNode } from 'react';+import {forwardRef, useContext, type ReactNode} from 'react';import * as stylex from '@stylexjs/stylex';-import { color } from '../../theme/tokens.stylex';-import { ThemeContext } from '../../theme/ThemeContext';-import type { StyleXStyles as ThemeStyleXStyles } from '../../theme/types';-import { container } from './container.stylex';-import type { SizeValue } from './XDSCard';+import {color} from '../../theme/tokens.stylex';+import {ThemeContext} from '../../theme/ThemeContext';+import type {StyleXStyles as ThemeStyleXStyles} from '../../theme/types';+import {container} from './container.stylex';+import type {SizeValue} from './XDSCard';/*** Visual variant for the section.@@ -49,7 +49,7 @@ const dynamicStyles = stylex.create({width: SizeValue | null,height: SizeValue | null,maxWidth: SizeValue | null,- minHeight: SizeValue | null+ minHeight: SizeValue | null,) => ({width,height,@@ -116,12 +116,21 @@ export interface XDSSectionProps {*/export const XDSSection = forwardRef<HTMLDivElement, XDSSectionProps>(function XDSSection(- { variant = 'section', width, height, maxWidth, minHeight, children, ...props },- ref+ {+ variant = 'section',+ width,+ height,+ maxWidth,+ minHeight,+ children,+ ...props+ },+ ref,) {// Get theme context for component-level overridesconst themeContext = useContext(ThemeContext);- const themeVariantOverride = themeContext?.theme.components?.section?.variants?.[variant];+ const themeVariantOverride =+ themeContext?.theme.components?.section?.variants?.[variant];return (<div@@ -139,15 +148,14 @@ export const XDSSection = forwardRef<HTMLDivElement, XDSSectionProps>(width ?? null,height ?? null,maxWidth ?? null,- minHeight ?? null- )+ minHeight ?? null,+ ),)}- {...props}- >+ {...props}>{children}</div>);- }+ },);XDSSection.displayName = 'XDSSection';diff --git a/packages/core/src/Layout/Container/container.stylex.ts b/packages/core/src/Layout/Container/container.stylex.tsindex c35b4ff728..8c07222a91 100644--- a/packages/core/src/Layout/Container/container.stylex.ts+++ b/packages/core/src/Layout/Container/container.stylex.ts@@ -8,7 +8,7 @@*/import * as stylex from '@stylexjs/stylex';-import { spacing } from '../../theme/tokens.stylex';+import {spacing} from '../../theme/tokens.stylex';/*** Spacing token keys for padding props.@@ -34,51 +34,51 @@ const baseStyles = stylex.create({});const paddingOuterXStyles = stylex.create({- space0: { '--layout-padding-outer-x': spacing.space0 },- space0_5: { '--layout-padding-outer-x': spacing.space0_5 },- space1: { '--layout-padding-outer-x': spacing.space1 },- space2: { '--layout-padding-outer-x': spacing.space2 },- space3: { '--layout-padding-outer-x': spacing.space3 },- space4: { '--layout-padding-outer-x': spacing.space4 },- space5: { '--layout-padding-outer-x': spacing.space5 },- space6: { '--layout-padding-outer-x': spacing.space6 },- space7: { '--layout-padding-outer-x': spacing.space7 },+ space0: {'--layout-padding-outer-x': spacing.space0},+ space0_5: {'--layout-padding-outer-x': spacing.space0_5},+ space1: {'--layout-padding-outer-x': spacing.space1},+ space2: {'--layout-padding-outer-x': spacing.space2},+ space3: {'--layout-padding-outer-x': spacing.space3},+ space4: {'--layout-padding-outer-x': spacing.space4},+ space5: {'--layout-padding-outer-x': spacing.space5},+ space6: {'--layout-padding-outer-x': spacing.space6},+ space7: {'--layout-padding-outer-x': spacing.space7},});const paddingOuterYStyles = stylex.create({- space0: { '--layout-padding-outer-y': spacing.space0 },- space0_5: { '--layout-padding-outer-y': spacing.space0_5 },- space1: { '--layout-padding-outer-y': spacing.space1 },- space2: { '--layout-padding-outer-y': spacing.space2 },- space3: { '--layout-padding-outer-y': spacing.space3 },- space4: { '--layout-padding-outer-y': spacing.space4 },- space5: { '--layout-padding-outer-y': spacing.space5 },- space6: { '--layout-padding-outer-y': spacing.space6 },- space7: { '--layout-padding-outer-y': spacing.space7 },+ space0: {'--layout-padding-outer-y': spacing.space0},+ space0_5: {'--layout-padding-outer-y': spacing.space0_5},+ space1: {'--layout-padding-outer-y': spacing.space1},+ space2: {'--layout-padding-outer-y': spacing.space2},+ space3: {'--layout-padding-outer-y': spacing.space3},+ space4: {'--layout-padding-outer-y': spacing.space4},+ space5: {'--layout-padding-outer-y': spacing.space5},+ space6: {'--layout-padding-outer-y': spacing.space6},+ space7: {'--layout-padding-outer-y': spacing.space7},});const paddingInnerXStyles = stylex.create({- space0: { '--layout-padding-inner-x': spacing.space0 },- space0_5: { '--layout-padding-inner-x': spacing.space0_5 },- space1: { '--layout-padding-inner-x': spacing.space1 },- space2: { '--layout-padding-inner-x': spacing.space2 },- space3: { '--layout-padding-inner-x': spacing.space3 },- space4: { '--layout-padding-inner-x': spacing.space4 },- space5: { '--layout-padding-inner-x': spacing.space5 },- space6: { '--layout-padding-inner-x': spacing.space6 },- space7: { '--layout-padding-inner-x': spacing.space7 },+ space0: {'--layout-padding-inner-x': spacing.space0},+ space0_5: {'--layout-padding-inner-x': spacing.space0_5},+ space1: {'--layout-padding-inner-x': spacing.space1},+ space2: {'--layout-padding-inner-x': spacing.space2},+ space3: {'--layout-padding-inner-x': spacing.space3},+ space4: {'--layout-padding-inner-x': spacing.space4},+ space5: {'--layout-padding-inner-x': spacing.space5},+ space6: {'--layout-padding-inner-x': spacing.space6},+ space7: {'--layout-padding-inner-x': spacing.space7},});const paddingInnerYStyles = stylex.create({- space0: { '--layout-padding-inner-y': spacing.space0 },- space0_5: { '--layout-padding-inner-y': spacing.space0_5 },- space1: { '--layout-padding-inner-y': spacing.space1 },- space2: { '--layout-padding-inner-y': spacing.space2 },- space3: { '--layout-padding-inner-y': spacing.space3 },- space4: { '--layout-padding-inner-y': spacing.space4 },- space5: { '--layout-padding-inner-y': spacing.space5 },- space6: { '--layout-padding-inner-y': spacing.space6 },- space7: { '--layout-padding-inner-y': spacing.space7 },+ space0: {'--layout-padding-inner-y': spacing.space0},+ space0_5: {'--layout-padding-inner-y': spacing.space0_5},+ space1: {'--layout-padding-inner-y': spacing.space1},+ space2: {'--layout-padding-inner-y': spacing.space2},+ space3: {'--layout-padding-inner-y': spacing.space3},+ space4: {'--layout-padding-inner-y': spacing.space4},+ space5: {'--layout-padding-inner-y': spacing.space5},+ space6: {'--layout-padding-inner-y': spacing.space6},+ space7: {'--layout-padding-inner-y': spacing.space7},});export interface ContainerOptions {diff --git a/packages/core/src/Layout/Container/index.ts b/packages/core/src/Layout/Container/index.tsindex 1e891124be..a8af94bbc8 100644--- a/packages/core/src/Layout/Container/index.ts+++ b/packages/core/src/Layout/Container/index.ts@@ -7,8 +7,8 @@* SYNC: When modified, update /packages/core/src/Layout/Container/README.md*/-export { XDSCard } from './XDSCard';-export type { XDSCardProps, SizeValue } from './XDSCard';+export {XDSCard} from './XDSCard';+export type {XDSCardProps, SizeValue} from './XDSCard';-export { XDSSection } from './XDSSection';-export type { XDSSectionProps, XDSSectionVariant } from './XDSSection';+export {XDSSection} from './XDSSection';+export type {XDSSectionProps, XDSSectionVariant} from './XDSSection';diff --git a/packages/core/src/Layout/README.md b/packages/core/src/Layout/README.mdindex 1e7896dc77..5e4274dc0e 100644--- a/packages/core/src/Layout/README.md+++ b/packages/core/src/Layout/README.md@@ -7,6 +7,7 @@ XDS Layout System - composable utilities and components for building structured## OverviewThe layout system provides a container/content separation pattern with:+- **Primitive + higher-order architecture** — XDSLayoutContainer is a primitive; XDSCard, XDSSection are higher-order- **Directional padding via CSS variables** — Inner/outer, horizontal/vertical padding control- **Context-aware defaults** — Components detect their slot and self-adjust@@ -109,32 +110,32 @@ Layout/### Container Components-| Component | Description |-|-----------|-------------|-| `XDSLayoutContainer` | Primitive that sets CSS variables for padding |-| `XDSCard` | Card with elevation and themed styling |-| `XDSSection` | Section with background variants (section, transparent, wash) |+| Component | Description |+| -------------------- | ------------------------------------------------------------- |+| `XDSLayoutContainer` | Primitive that sets CSS variables for padding |+| `XDSCard` | Card with elevation and themed styling |+| `XDSSection` | Section with background variants (section, transparent, wash) |See [Container/README.md](./Container/README.md) for full documentation.### Layout Structure-| Component | Description |-|-----------|-------------|-| `XDSLayout` | Arranges content into header, footer, content, start, end slots |-| `XDSLayoutHeader` | Header content area with optional divider |-| `XDSLayoutFooter` | Footer content area with optional divider |-| `XDSLayoutContent` | Scrollable main content area |-| `XDSLayoutPanel` | Side panel for start/end slots |+| Component | Description |+| ------------------ | --------------------------------------------------------------- |+| `XDSLayout` | Arranges content into header, footer, content, start, end slots |+| `XDSLayoutHeader` | Header content area with optional divider |+| `XDSLayoutFooter` | Footer content area with optional divider |+| `XDSLayoutContent` | Scrollable main content area |+| `XDSLayoutPanel` | Side panel for start/end slots |See [XDSLayout/README.md](./XDSLayout/README.md) for full documentation.### Stack Components-| Component | Description |-|-----------|-------------|-| `XDSHStack` | Horizontal stack (left-to-right) |-| `XDSVStack` | Vertical stack (top-to-bottom) |+| Component | Description |+| -------------- | -------------------------------------- |+| `XDSHStack` | Horizontal stack (left-to-right) |+| `XDSVStack` | Vertical stack (top-to-bottom) || `XDSStackItem` | Stack item with fill/alignment control |See [Stack/README.md](./Stack/README.md) for full documentation.@@ -161,12 +162,12 @@ See [Stack/README.md](./Stack/README.md) for full documentation.XDSLayoutContainer sets these CSS variables that child components read:-| Variable | Used By | Purpose |-|----------|---------|---------|-| `--layout-padding-outer-x` | XDSLayout | Outer horizontal padding |-| `--layout-padding-outer-y` | XDSLayout | Outer vertical padding |+| Variable | Used By | Purpose |+| -------------------------- | ------------------------------ | ------------------------ |+| `--layout-padding-outer-x` | XDSLayout | Outer horizontal padding |+| `--layout-padding-outer-y` | XDSLayout | Outer vertical padding || `--layout-padding-inner-x` | Header, Footer, Content, Panel | Inner horizontal padding |-| `--layout-padding-inner-y` | Header, Footer, Content, Panel | Inner vertical padding |+| `--layout-padding-inner-y` | Header, Footer, Content, Panel | Inner vertical padding |## Relateddiff --git a/packages/core/src/Layout/Stack/README.md b/packages/core/src/Layout/Stack/README.mdindex 881508ff9d..13c7656bdd 100644--- a/packages/core/src/Layout/Stack/README.md+++ b/packages/core/src/Layout/Stack/README.md@@ -7,6 +7,7 @@ Stack layout primitives for arranging items in horizontal or vertical sequences.## OverviewThe Stack system provides flexbox-based layout components with:+- Horizontal (`XDSHStack`) and vertical (`XDSVStack`) stacking- Themed spacing via gap tokens- Individual item control via `XDSStackItem`@@ -20,7 +21,7 @@ import {XDSVStack,XDSStackItem,stack,- stackItem+ stackItem,} from '@xds/core/Layout';```@@ -50,13 +51,13 @@ Horizontal stack for arranging items left-to-right. Supports polymorphic renderi</XDSHStack>```-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `gap` | `SpacingScale` | — | Spacing token between items |-| `vAlign` | `'start' \| 'center' \| 'end' \| 'stretch'` | `'stretch'` | Vertical alignment |-| `wrap` | `'nowrap' \| 'wrap' \| 'wrap-reverse'` | `'nowrap'` | Flex wrap behavior |-| `element` | `ElementType` | `'div'` | HTML element to render |-| `children` | `ReactNode` | — | Stack content |+| Prop | Type | Default | Description |+| ---------- | ------------------------------------------- | ----------- | --------------------------- |+| `gap` | `SpacingScale` | — | Spacing token between items |+| `vAlign` | `'start' \| 'center' \| 'end' \| 'stretch'` | `'stretch'` | Vertical alignment |+| `wrap` | `'nowrap' \| 'wrap' \| 'wrap-reverse'` | `'nowrap'` | Flex wrap behavior |+| `element` | `ElementType` | `'div'` | HTML element to render |+| `children` | `ReactNode` | — | Stack content |### XDSVStack@@ -82,13 +83,13 @@ Vertical stack for arranging items top-to-bottom. Supports polymorphic rendering</XDSVStack>```-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `gap` | `SpacingScale` | — | Spacing token between items |-| `hAlign` | `'start' \| 'center' \| 'end' \| 'stretch'` | `'stretch'` | Horizontal alignment |-| `wrap` | `'nowrap' \| 'wrap' \| 'wrap-reverse'` | `'nowrap'` | Flex wrap behavior |-| `element` | `ElementType` | `'div'` | HTML element to render |-| `children` | `ReactNode` | — | Stack content |+| Prop | Type | Default | Description |+| ---------- | ------------------------------------------- | ----------- | --------------------------- |+| `gap` | `SpacingScale` | — | Spacing token between items |+| `hAlign` | `'start' \| 'center' \| 'end' \| 'stretch'` | `'stretch'` | Horizontal alignment |+| `wrap` | `'nowrap' \| 'wrap' \| 'wrap-reverse'` | `'nowrap'` | Flex wrap behavior |+| `element` | `ElementType` | `'div'` | HTML element to render |+| `children` | `ReactNode` | — | Stack content |### XDSStackItem@@ -114,12 +115,12 @@ Stack item for controlling individual item behavior within a stack. Supports pol</XDSStackItem>```-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `size` | `'static' \| 'fill'` | `'static'` | Flex grow behavior |-| `crossAlignSelf` | `'start' \| 'center' \| 'end' \| 'stretch'` | — | Override cross-axis alignment |-| `element` | `ElementType` | `'div'` | HTML element to render |-| `children` | `ReactNode` | — | Item content |+| Prop | Type | Default | Description |+| ---------------- | ------------------------------------------- | ---------- | ----------------------------- |+| `size` | `'static' \| 'fill'` | `'static'` | Flex grow behavior |+| `crossAlignSelf` | `'start' \| 'center' \| 'end' \| 'stretch'` | — | Override cross-axis alignment |+| `element` | `ElementType` | `'div'` | HTML element to render |+| `children` | `ReactNode` | — | Item content |## Utilities@@ -130,55 +131,53 @@ For advanced use cases, you can use the underlying StyleX utilities directly.StyleX utility for creating flex containers.```tsx-import { stack } from '@xds/core/Layout';+import {stack} from '@xds/core/Layout';import * as stylex from '@stylexjs/stylex';-<div {...stylex.props(...stack({ direction: 'horizontal', gap: 'space2' }))}>+<div {...stylex.props(...stack({direction: 'horizontal', gap: 'space2'}))}><Child /><Child />-</div>+</div>;```-| Option | Type | Default | Description |-|--------|------|---------|-------------|-| `direction` | `'horizontal' \| 'vertical'` | Required | Stack direction |-| `gap` | `SpacingScale` | — | Spacing token between items |-| `crossAlign` | `'start' \| 'center' \| 'end' \| 'stretch'` | — | Cross-axis alignment |-| `wrap` | `'nowrap' \| 'wrap' \| 'wrap-reverse'` | `'nowrap'` | Flex wrap behavior |+| Option | Type | Default | Description |+| ------------ | ------------------------------------------- | ---------- | --------------------------- |+| `direction` | `'horizontal' \| 'vertical'` | Required | Stack direction |+| `gap` | `SpacingScale` | — | Spacing token between items |+| `crossAlign` | `'start' \| 'center' \| 'end' \| 'stretch'` | — | Cross-axis alignment |+| `wrap` | `'nowrap' \| 'wrap' \| 'wrap-reverse'` | `'nowrap'` | Flex wrap behavior |### stackItemStyleX utility for controlling flex item behavior.```tsx-import { stackItem } from '@xds/core/Layout';+import {stackItem} from '@xds/core/Layout';import * as stylex from '@stylexjs/stylex';-<div {...stylex.props(...stackItem({ size: 'fill' }))}>- Content-</div>+<div {...stylex.props(...stackItem({size: 'fill'}))}>Content</div>;```-| Option | Type | Default | Description |-|--------|------|---------|-------------|-| `size` | `'static' \| 'fill'` | `'static'` | Flex grow behavior |-| `crossAlignSelf` | `'start' \| 'center' \| 'end' \| 'stretch'` | — | Override cross-axis alignment |+| Option | Type | Default | Description |+| ---------------- | ------------------------------------------- | ---------- | ----------------------------- |+| `size` | `'static' \| 'fill'` | `'static'` | Flex grow behavior |+| `crossAlignSelf` | `'start' \| 'center' \| 'end' \| 'stretch'` | — | Override cross-axis alignment |## Spacing ScaleThe `gap` prop uses spacing tokens from the theme:-| Token | Description |-|-------|-------------|-| `space0` | No spacing |-| `space0.5` | Extra small spacing |-| `space1` | Small spacing |-| `space2` | Medium-small spacing |-| `space3` | Medium spacing |-| `space4` | Medium-large spacing |-| `space5` | Large spacing |-| `space6` | Extra large spacing |-| `space7` | Maximum spacing |+| Token | Description |+| ---------- | -------------------- |+| `space0` | No spacing |+| `space0.5` | Extra small spacing |+| `space1` | Small spacing |+| `space2` | Medium-small spacing |+| `space3` | Medium spacing |+| `space4` | Medium-large spacing |+| `space5` | Large spacing |+| `space6` | Extra large spacing |+| `space7` | Maximum spacing |## Common Patterns@@ -229,14 +228,14 @@ The `gap` prop uses spacing tokens from the theme:## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports all stack utilities and components |-| `stack.stylex.ts` | Utility | StyleX styles for stack (flex container) behavior |-| `stackItem.stylex.ts` | Utility | StyleX styles for stack item behavior |-| `XDSHStack.tsx` | Component | Horizontal stack component |-| `XDSHStack.test.tsx` | Test | XDSHStack unit tests |-| `XDSVStack.tsx` | Component | Vertical stack component |-| `XDSVStack.test.tsx` | Test | XDSVStack unit tests |-| `XDSStackItem.tsx` | Component | Stack item wrapper component |-| `XDSStackItem.test.tsx` | Test | XDSStackItem unit tests |+| File | Role | Purpose |+| ----------------------- | --------- | ------------------------------------------------- |+| `index.ts` | Entry | Exports all stack utilities and components |+| `stack.stylex.ts` | Utility | StyleX styles for stack (flex container) behavior |+| `stackItem.stylex.ts` | Utility | StyleX styles for stack item behavior |+| `XDSHStack.tsx` | Component | Horizontal stack component |+| `XDSHStack.test.tsx` | Test | XDSHStack unit tests |+| `XDSVStack.tsx` | Component | Vertical stack component |+| `XDSVStack.test.tsx` | Test | XDSVStack unit tests |+| `XDSStackItem.tsx` | Component | Stack item wrapper component |+| `XDSStackItem.test.tsx` | Test | XDSStackItem unit tests |diff --git a/packages/core/src/Layout/Stack/XDSHStack.test.tsx b/packages/core/src/Layout/Stack/XDSHStack.test.tsxindex c5f84201e8..7573b32eba 100644--- a/packages/core/src/Layout/Stack/XDSHStack.test.tsx+++ b/packages/core/src/Layout/Stack/XDSHStack.test.tsx@@ -7,9 +7,9 @@* SYNC: When XDSHStack.tsx changes, update tests to match new behavior*/-import { describe, it, expect, vi } from 'vitest';-import { render, screen } from '@testing-library/react';-import { XDSHStack } from './XDSHStack';+import {describe, it, expect, vi} from 'vitest';+import {render, screen} from '@testing-library/react';+import {XDSHStack} from './XDSHStack';describe('XDSHStack', () => {it('renders children correctly', () => {@@ -17,7 +17,7 @@ describe('XDSHStack', () => {<XDSHStack><div>Item 1</div><div>Item 2</div>- </XDSHStack>+ </XDSHStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();expect(screen.getByText('Item 2')).toBeInTheDocument();@@ -33,7 +33,7 @@ describe('XDSHStack', () => {render(<XDSHStack element="nav" data-testid="hstack">Content- </XDSHStack>+ </XDSHStack>,);const element = screen.getByTestId('hstack');expect(element.tagName).toBe('NAV');@@ -44,7 +44,7 @@ describe('XDSHStack', () => {<XDSHStack gap="space4"><div>Item 1</div><div>Item 2</div>- </XDSHStack>+ </XDSHStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();});@@ -53,7 +53,7 @@ describe('XDSHStack', () => {render(<XDSHStack vAlign="center"><div>Item 1</div>- </XDSHStack>+ </XDSHStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();});@@ -63,7 +63,7 @@ describe('XDSHStack', () => {<XDSHStack wrap="wrap"><div>Item 1</div><div>Item 2</div>- </XDSHStack>+ </XDSHStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();});@@ -73,7 +73,7 @@ describe('XDSHStack', () => {render(<XDSHStack ref={ref}><div>Test</div>- </XDSHStack>+ </XDSHStack>,);expect(ref).toHaveBeenCalledWith(expect.any(HTMLElement));});@@ -83,7 +83,7 @@ describe('XDSHStack', () => {render(<XDSHStack element="section" ref={ref}><div>Test</div>- </XDSHStack>+ </XDSHStack>,);expect(ref).toHaveBeenCalledWith(expect.any(HTMLElement));});@@ -92,7 +92,7 @@ describe('XDSHStack', () => {render(<XDSHStack data-testid="hstack"><div>Item</div>- </XDSHStack>+ </XDSHStack>,);expect(screen.getByTestId('hstack')).toBeInTheDocument();});diff --git a/packages/core/src/Layout/Stack/XDSHStack.tsx b/packages/core/src/Layout/Stack/XDSHStack.tsxindex 90d8d7a86d..306e9df311 100644--- a/packages/core/src/Layout/Stack/XDSHStack.tsx+++ b/packages/core/src/Layout/Stack/XDSHStack.tsx@@ -19,10 +19,19 @@ import {type Ref,} from 'react';import * as stylex from '@stylexjs/stylex';-import type { StyleXStyles } from '@stylexjs/stylex';-import { stack, type StackCrossAlignment, type StackMainAlignment, type StackWrap, type SpacingScale } from './stack.stylex';+import type {StyleXStyles} from '@stylexjs/stylex';+import {+ stack,+ type StackCrossAlignment,+ type StackMainAlignment,+ type StackWrap,+ type SpacingScale,+} from './stack.stylex';-export interface XDSHStackProps extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'className'> {+export interface XDSHStackProps extends Omit<+ HTMLAttributes<HTMLElement>,+ 'style' | 'className'+> {/*** Horizontal alignment of items (main-axis for horizontal stack).* - `start`: Align to start (left in LTR)@@ -93,8 +102,8 @@ export interface XDSHStackProps extends Omit<HTMLAttributes<HTMLElement>, 'style*/export const XDSHStack = forwardRef<HTMLElement, XDSHStackProps>(function XDSHStack(- { hAlign, vAlign, gap, wrap, element = 'div', xstyle, children, ...props },- ref+ {hAlign, vAlign, gap, wrap, element = 'div', xstyle, children, ...props},+ ref,) {const stylexProps = stylex.props(...stack({@@ -104,7 +113,7 @@ export const XDSHStack = forwardRef<HTMLElement, XDSHStackProps>(gap,wrap,}),- xstyle+ xstyle,);return createElement(@@ -114,9 +123,9 @@ export const XDSHStack = forwardRef<HTMLElement, XDSHStackProps>(...stylexProps,...props,},- children+ children,);- }+ },);XDSHStack.displayName = 'XDSHStack';diff --git a/packages/core/src/Layout/Stack/XDSStackItem.test.tsx b/packages/core/src/Layout/Stack/XDSStackItem.test.tsxindex a6c1fa59f5..26c14011e2 100644--- a/packages/core/src/Layout/Stack/XDSStackItem.test.tsx+++ b/packages/core/src/Layout/Stack/XDSStackItem.test.tsx@@ -7,9 +7,9 @@* SYNC: When XDSStackItem.tsx changes, update tests to match new behavior*/-import { describe, it, expect, vi } from 'vitest';-import { render, screen } from '@testing-library/react';-import { XDSStackItem } from './XDSStackItem';+import {describe, it, expect, vi} from 'vitest';+import {render, screen} from '@testing-library/react';+import {XDSStackItem} from './XDSStackItem';describe('XDSStackItem', () => {it('renders children correctly', () => {@@ -27,7 +27,7 @@ describe('XDSStackItem', () => {render(<XDSStackItem element="section" data-testid="stack-item">Content- </XDSStackItem>+ </XDSStackItem>,);const element = screen.getByTestId('stack-item');expect(element.tagName).toBe('SECTION');@@ -53,7 +53,7 @@ describe('XDSStackItem', () => {render(<XDSStackItem ref={ref}><div>Test</div>- </XDSStackItem>+ </XDSStackItem>,);expect(ref).toHaveBeenCalledWith(expect.any(HTMLDivElement));});@@ -63,7 +63,7 @@ describe('XDSStackItem', () => {render(<XDSStackItem element="section" ref={ref}><div>Test</div>- </XDSStackItem>+ </XDSStackItem>,);expect(ref).toHaveBeenCalledWith(expect.any(HTMLElement));});@@ -72,7 +72,7 @@ describe('XDSStackItem', () => {render(<XDSStackItem data-testid="stack-item" aria-label="Stack item">Content- </XDSStackItem>+ </XDSStackItem>,);const element = screen.getByTestId('stack-item');expect(element).toHaveAttribute('aria-label', 'Stack item');diff --git a/packages/core/src/Layout/Stack/XDSStackItem.tsx b/packages/core/src/Layout/Stack/XDSStackItem.tsxindex a39fd99084..943b766a31 100644--- a/packages/core/src/Layout/Stack/XDSStackItem.tsx+++ b/packages/core/src/Layout/Stack/XDSStackItem.tsx@@ -19,10 +19,17 @@ import {type Ref,} from 'react';import * as stylex from '@stylexjs/stylex';-import type { StyleXStyles } from '@stylexjs/stylex';-import { stackItem, type StackItemCrossAlignSelf, type StackItemSize } from './stackItem.stylex';+import type {StyleXStyles} from '@stylexjs/stylex';+import {+ stackItem,+ type StackItemCrossAlignSelf,+ type StackItemSize,+} from './stackItem.stylex';-export interface XDSStackItemProps extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'className'> {+export interface XDSStackItemProps extends Omit<+ HTMLAttributes<HTMLElement>,+ 'style' | 'className'+> {/*** Overrides the default cross-alignment for this item.* (hAlign for VStack, vAlign for HStack)@@ -71,10 +78,13 @@ export interface XDSStackItemProps extends Omit<HTMLAttributes<HTMLElement>, 'st*/export const XDSStackItem = forwardRef<HTMLElement, XDSStackItemProps>(function XDSStackItem(- { crossAlignSelf, size, element = 'div', xstyle, children, ...props },- ref+ {crossAlignSelf, size, element = 'div', xstyle, children, ...props},+ ref,) {- const stylexProps = stylex.props(...stackItem({ crossAlignSelf, size }), xstyle);+ const stylexProps = stylex.props(+ ...stackItem({crossAlignSelf, size}),+ xstyle,+ );return createElement(element,@@ -83,9 +93,9 @@ export const XDSStackItem = forwardRef<HTMLElement, XDSStackItemProps>(...stylexProps,...props,},- children+ children,);- }+ },);XDSStackItem.displayName = 'XDSStackItem';diff --git a/packages/core/src/Layout/Stack/XDSVStack.test.tsx b/packages/core/src/Layout/Stack/XDSVStack.test.tsxindex be34ccae52..a91f345efa 100644--- a/packages/core/src/Layout/Stack/XDSVStack.test.tsx+++ b/packages/core/src/Layout/Stack/XDSVStack.test.tsx@@ -7,9 +7,9 @@* SYNC: When XDSVStack.tsx changes, update tests to match new behavior*/-import { describe, it, expect, vi } from 'vitest';-import { render, screen } from '@testing-library/react';-import { XDSVStack } from './XDSVStack';+import {describe, it, expect, vi} from 'vitest';+import {render, screen} from '@testing-library/react';+import {XDSVStack} from './XDSVStack';describe('XDSVStack', () => {it('renders children correctly', () => {@@ -17,7 +17,7 @@ describe('XDSVStack', () => {<XDSVStack><div>Item 1</div><div>Item 2</div>- </XDSVStack>+ </XDSVStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();expect(screen.getByText('Item 2')).toBeInTheDocument();@@ -33,7 +33,7 @@ describe('XDSVStack', () => {render(<XDSVStack element="main" data-testid="vstack">Content- </XDSVStack>+ </XDSVStack>,);const element = screen.getByTestId('vstack');expect(element.tagName).toBe('MAIN');@@ -44,7 +44,7 @@ describe('XDSVStack', () => {<XDSVStack gap="space4"><div>Item 1</div><div>Item 2</div>- </XDSVStack>+ </XDSVStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();});@@ -53,7 +53,7 @@ describe('XDSVStack', () => {render(<XDSVStack hAlign="center"><div>Item 1</div>- </XDSVStack>+ </XDSVStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();});@@ -63,7 +63,7 @@ describe('XDSVStack', () => {<XDSVStack wrap="wrap"><div>Item 1</div><div>Item 2</div>- </XDSVStack>+ </XDSVStack>,);expect(screen.getByText('Item 1')).toBeInTheDocument();});@@ -73,7 +73,7 @@ describe('XDSVStack', () => {render(<XDSVStack ref={ref}><div>Test</div>- </XDSVStack>+ </XDSVStack>,);expect(ref).toHaveBeenCalledWith(expect.any(HTMLElement));});@@ -83,7 +83,7 @@ describe('XDSVStack', () => {render(<XDSVStack element="section" ref={ref}><div>Test</div>- </XDSVStack>+ </XDSVStack>,);expect(ref).toHaveBeenCalledWith(expect.any(HTMLElement));});@@ -92,7 +92,7 @@ describe('XDSVStack', () => {render(<XDSVStack data-testid="vstack"><div>Item</div>- </XDSVStack>+ </XDSVStack>,);expect(screen.getByTestId('vstack')).toBeInTheDocument();});diff --git a/packages/core/src/Layout/Stack/XDSVStack.tsx b/packages/core/src/Layout/Stack/XDSVStack.tsxindex 47b7daf548..4b4121152e 100644--- a/packages/core/src/Layout/Stack/XDSVStack.tsx+++ b/packages/core/src/Layout/Stack/XDSVStack.tsx@@ -19,10 +19,19 @@ import {type Ref,} from 'react';import * as stylex from '@stylexjs/stylex';-import type { StyleXStyles } from '@stylexjs/stylex';-import { stack, type StackCrossAlignment, type StackMainAlignment, type StackWrap, type SpacingScale } from './stack.stylex';+import type {StyleXStyles} from '@stylexjs/stylex';+import {+ stack,+ type StackCrossAlignment,+ type StackMainAlignment,+ type StackWrap,+ type SpacingScale,+} from './stack.stylex';-export interface XDSVStackProps extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'className'> {+export interface XDSVStackProps extends Omit<+ HTMLAttributes<HTMLElement>,+ 'style' | 'className'+> {/*** Horizontal alignment of items (cross-axis for vertical stack).* @default 'stretch'@@ -93,8 +102,8 @@ export interface XDSVStackProps extends Omit<HTMLAttributes<HTMLElement>, 'style*/export const XDSVStack = forwardRef<HTMLElement, XDSVStackProps>(function XDSVStack(- { hAlign, vAlign, gap, wrap, element = 'div', xstyle, children, ...props },- ref+ {hAlign, vAlign, gap, wrap, element = 'div', xstyle, children, ...props},+ ref,) {const stylexProps = stylex.props(...stack({@@ -104,7 +113,7 @@ export const XDSVStack = forwardRef<HTMLElement, XDSVStackProps>(gap,wrap,}),- xstyle+ xstyle,);return createElement(@@ -114,9 +123,9 @@ export const XDSVStack = forwardRef<HTMLElement, XDSVStackProps>(...stylexProps,...props,},- children+ children,);- }+ },);XDSVStack.displayName = 'XDSVStack';diff --git a/packages/core/src/Layout/Stack/index.ts b/packages/core/src/Layout/Stack/index.tsindex 4bf3712b23..133307cb77 100644--- a/packages/core/src/Layout/Stack/index.ts+++ b/packages/core/src/Layout/Stack/index.ts@@ -8,11 +8,11 @@*/// Components-export { XDSHStack } from './XDSHStack';-export type { XDSHStackProps } from './XDSHStack';+export {XDSHStack} from './XDSHStack';+export type {XDSHStackProps} from './XDSHStack';-export { XDSVStack } from './XDSVStack';-export type { XDSVStackProps } from './XDSVStack';+export {XDSVStack} from './XDSVStack';+export type {XDSVStackProps} from './XDSVStack';-export { XDSStackItem } from './XDSStackItem';-export type { XDSStackItemProps } from './XDSStackItem';+export {XDSStackItem} from './XDSStackItem';+export type {XDSStackItemProps} from './XDSStackItem';diff --git a/packages/core/src/Layout/Stack/stack.stylex.ts b/packages/core/src/Layout/Stack/stack.stylex.tsindex cfff56d1f3..f30ca557e5 100644--- a/packages/core/src/Layout/Stack/stack.stylex.ts+++ b/packages/core/src/Layout/Stack/stack.stylex.ts@@ -8,7 +8,7 @@*/import * as stylex from '@stylexjs/stylex';-import { spacing } from '../../theme/tokens.stylex';+import {spacing} from '../../theme/tokens.stylex';const alignItemsStyles = stylex.create({center: {diff --git a/packages/core/src/Layout/Stack/stackItem.stylex.ts b/packages/core/src/Layout/Stack/stackItem.stylex.tsindex 0ff3c0bb73..e79f74aa99 100644--- a/packages/core/src/Layout/Stack/stackItem.stylex.ts+++ b/packages/core/src/Layout/Stack/stackItem.stylex.ts@@ -104,10 +104,7 @@ export interface StackItemOptions {* </div>* ```*/-export function stackItem({- crossAlignSelf,- size,-}: StackItemOptions = {}) {+export function stackItem({crossAlignSelf, size}: StackItemOptions = {}) {return [minSizeResetStyles.reset,sizeStyles[size ?? 'static'],diff --git a/packages/core/src/Layout/XDSLayout/README.md b/packages/core/src/Layout/XDSLayout/README.mdindex 2412405dd1..a4eb17e923 100644--- a/packages/core/src/Layout/XDSLayout/README.md+++ b/packages/core/src/Layout/XDSLayout/README.md@@ -101,80 +101,80 @@ Use `isFullBleed` on XDSLayoutContent to remove internal padding, allowing conte## Components-| Component | Description | Renders |-|-----------|-------------|---------|-| `XDSLayout` | Main layout component with named slots | `<div>` |-| `XDSLayoutHeader` | Header content area | `<div>` (use `role` for landmark) |-| `XDSLayoutFooter` | Footer content area | `<div>` (use `role` for landmark) |-| `XDSLayoutContent` | Main content area | `<div>` (use `role` for landmark) |-| `XDSLayoutPanel` | Side panel for start/end slots | `<div>` (use `role` for landmark) |+| Component | Description | Renders |+| ------------------ | -------------------------------------- | --------------------------------- |+| `XDSLayout` | Main layout component with named slots | `<div>` |+| `XDSLayoutHeader` | Header content area | `<div>` (use `role` for landmark) |+| `XDSLayoutFooter` | Footer content area | `<div>` (use `role` for landmark) |+| `XDSLayoutContent` | Main content area | `<div>` (use `role` for landmark) |+| `XDSLayoutPanel` | Side panel for start/end slots | `<div>` (use `role` for landmark) |## Props### XDSLayout-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `header` | `ReactNode` | — | Header slot content |-| `footer` | `ReactNode` | — | Footer slot content |-| `content` | `ReactNode` | — | Main content slot |-| `start` | `ReactNode` | — | Start panel (left in LTR) |-| `end` | `ReactNode` | — | End panel (right in LTR) |-| `height` | `'fill' \| 'auto'` | `'fill'` | `fill`: layout fills container, content scrolls. `auto`: layout grows with content |-| `isFullBleed` | `boolean` | `false` | Removes padding at layout's outer edges |+| Prop | Type | Default | Description |+| ------------- | ------------------ | -------- | ---------------------------------------------------------------------------------- |+| `header` | `ReactNode` | — | Header slot content |+| `footer` | `ReactNode` | — | Footer slot content |+| `content` | `ReactNode` | — | Main content slot |+| `start` | `ReactNode` | — | Start panel (left in LTR) |+| `end` | `ReactNode` | — | End panel (right in LTR) |+| `height` | `'fill' \| 'auto'` | `'fill'` | `fill`: layout fills container, content scrolls. `auto`: layout grows with content |+| `isFullBleed` | `boolean` | `false` | Removes padding at layout's outer edges |### XDSLayoutHeader / XDSLayoutFooter-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `children` | `ReactNode` | — | Area content |-| `hasDivider` | `boolean` | `false` | Adds themed border (bottom for header, top for footer) |-| `isFullBleed` | `boolean` | `false` | Removes internal padding |-| `label` | `string` | — | Accessible label for the landmark (required when multiple landmarks of same type) |-| `role` | `AriaRole` | — | ARIA landmark role (e.g., `'banner'`, `'contentinfo'`) |+| Prop | Type | Default | Description |+| ------------- | ----------- | ------- | --------------------------------------------------------------------------------- |+| `children` | `ReactNode` | — | Area content |+| `hasDivider` | `boolean` | `false` | Adds themed border (bottom for header, top for footer) |+| `isFullBleed` | `boolean` | `false` | Removes internal padding |+| `label` | `string` | — | Accessible label for the landmark (required when multiple landmarks of same type) |+| `role` | `AriaRole` | — | ARIA landmark role (e.g., `'banner'`, `'contentinfo'`) |### XDSLayoutContent-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `children` | `ReactNode` | — | Area content |-| `isFullBleed` | `boolean` | `false` | Removes internal padding |-| `isScrollable` | `boolean` | `true` | Enables scrollable overflow. Set to `false` for auto-height layouts with sticky elements |-| `label` | `string` | — | Accessible label for the landmark |-| `role` | `AriaRole` | — | ARIA landmark role (e.g., `'main'`) |+| Prop | Type | Default | Description |+| -------------- | ----------- | ------- | ---------------------------------------------------------------------------------------- |+| `children` | `ReactNode` | — | Area content |+| `isFullBleed` | `boolean` | `false` | Removes internal padding |+| `isScrollable` | `boolean` | `true` | Enables scrollable overflow. Set to `false` for auto-height layouts with sticky elements |+| `label` | `string` | — | Accessible label for the landmark |+| `role` | `AriaRole` | — | ARIA landmark role (e.g., `'main'`) |### XDSLayoutPanel-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `children` | `ReactNode` | — | Area content |-| `hasDivider` | `boolean` | `false` | Adds themed border (auto-positioned based on slot) |-| `isFullBleed` | `boolean` | `false` | Removes internal padding |-| `label` | `string` | — | Accessible label for the landmark (required when multiple landmarks of same type) |-| `role` | `AriaRole` | — | ARIA landmark role (e.g., `'navigation'`, `'complementary'`) |+| Prop | Type | Default | Description |+| ------------- | ----------- | ------- | --------------------------------------------------------------------------------- |+| `children` | `ReactNode` | — | Area content |+| `hasDivider` | `boolean` | `false` | Adds themed border (auto-positioned based on slot) |+| `isFullBleed` | `boolean` | `false` | Removes internal padding |+| `label` | `string` | — | Accessible label for the landmark (required when multiple landmarks of same type) |+| `role` | `AriaRole` | — | ARIA landmark role (e.g., `'navigation'`, `'complementary'`) |## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports all components and types |-| `XDSLayout.tsx` | Core | Main layout component |-| `XDSLayoutHeader.tsx` | Component | Header content area |-| `XDSLayoutFooter.tsx` | Component | Footer content area |-| `XDSLayoutContent.tsx` | Component | Main content area |-| `XDSLayoutPanel.tsx` | Component | Side panel component |-| `XDSLayoutAreaContext.ts` | Context | Slot detection context |+| File | Role | Purpose |+| ------------------------- | --------- | -------------------------------- |+| `index.ts` | Entry | Exports all components and types |+| `XDSLayout.tsx` | Core | Main layout component |+| `XDSLayoutHeader.tsx` | Component | Header content area |+| `XDSLayoutFooter.tsx` | Component | Footer content area |+| `XDSLayoutContent.tsx` | Component | Main content area |+| `XDSLayoutPanel.tsx` | Component | Side panel component |+| `XDSLayoutAreaContext.ts` | Context | Slot detection context |## Dividers`hasDivider` on content areas auto-places the divider on the correct edge:-| Component | Divider Position |-|-----------|------------------|-| Header | Bottom edge |-| Footer | Top edge |-| Panel (start) | End edge |-| Panel (end) | Start edge |+| Component | Divider Position |+| ------------- | ---------------- |+| Header | Bottom edge |+| Footer | Top edge |+| Panel (start) | End edge |+| Panel (end) | Start edge |When `hasDivider` is false, spacing collapse is applied automatically for seamless visual flow.diff --git a/packages/core/src/Layout/XDSLayout/XDSLayout.tsx b/packages/core/src/Layout/XDSLayout/XDSLayout.tsxindex 1ea5b46da4..35fb40eaa1 100644--- a/packages/core/src/Layout/XDSLayout/XDSLayout.tsx+++ b/packages/core/src/Layout/XDSLayout/XDSLayout.tsx@@ -10,12 +10,12 @@* - /apps/storybook/stories/Layout.stories.tsx*/-import { type ReactNode, useMemo } from 'react';+import {type ReactNode, useMemo} from 'react';import * as stylex from '@stylexjs/stylex';-import { XDSLayoutAreaContext, type LayoutArea } from './XDSLayoutAreaContext';-import { XDSLayoutSlotsContext, type LayoutSlots } from './XDSLayoutSlotsContext';-import { stack } from '../Stack/stack.stylex';-import { stackItem } from '../Stack/stackItem.stylex';+import {XDSLayoutAreaContext, type LayoutArea} from './XDSLayoutAreaContext';+import {XDSLayoutSlotsContext, type LayoutSlots} from './XDSLayoutSlotsContext';+import {stack} from '../Stack/stack.stylex';+import {stackItem} from '../Stack/stackItem.stylex';/*** Height behavior for the layout.@@ -148,22 +148,22 @@ export function XDSLayout({hasStart: start != null,hasEnd: end != null,}),- [header != null, footer != null, start != null, end != null]+ [header != null, footer != null, start != null, end != null],);return (<XDSLayoutSlotsContext.Provider value={slotsValue}><div{...stylex.props(- ...stack({ direction: 'vertical' }),+ ...stack({direction: 'vertical'}),isFill ? styles.fill : styles.auto,- isFullBleed && styles.fullBleed- )}- >+ isFullBleed && styles.fullBleed,+ )}><AreaProvider area="header">{header}</AreaProvider>- <div {...stylex.props(...stack({ direction: 'horizontal' }), styles.middle)}>+ <div+ {...stylex.props(...stack({direction: 'horizontal'}), styles.middle)}><AreaProvider area="start">{start}</AreaProvider>- <div {...stylex.props(...stackItem({ size: 'fill' }))}>+ <div {...stylex.props(...stackItem({size: 'fill'}))}><AreaProvider area="content">{content}</AreaProvider></div><AreaProvider area="end">{end}</AreaProvider>diff --git a/packages/core/src/Layout/XDSLayout/XDSLayoutAreaContext.ts b/packages/core/src/Layout/XDSLayout/XDSLayoutAreaContext.tsindex 983f2b2dab..b61218857f 100644--- a/packages/core/src/Layout/XDSLayout/XDSLayoutAreaContext.ts+++ b/packages/core/src/Layout/XDSLayout/XDSLayoutAreaContext.ts@@ -8,13 +8,19 @@* - /packages/core/src/Layout/XDSLayout/README.md*/-import { createContext } from 'react';+import {createContext} from 'react';/*** Layout area type representing which slot a component is rendered in.* Used by content area components to detect their position and adjust styling.*/-export type LayoutArea = 'header' | 'footer' | 'content' | 'start' | 'end' | null;+export type LayoutArea =+ | 'header'+ | 'footer'+ | 'content'+ | 'start'+ | 'end'+ | null;/*** Context for detecting which layout area a component is rendered in.diff --git a/packages/core/src/Layout/XDSLayout/XDSLayoutContent.tsx b/packages/core/src/Layout/XDSLayout/XDSLayoutContent.tsxindex 878999a730..7e1e82e63c 100644--- a/packages/core/src/Layout/XDSLayout/XDSLayoutContent.tsx+++ b/packages/core/src/Layout/XDSLayout/XDSLayoutContent.tsx@@ -9,11 +9,11 @@* - /apps/storybook/stories/Layout.stories.tsx*/-import type { AriaRole, HTMLAttributes, ReactNode } from 'react';-import { forwardRef, useContext } from 'react';+import type {AriaRole, HTMLAttributes, ReactNode} from 'react';+import {forwardRef, useContext} from 'react';import * as stylex from '@stylexjs/stylex';-import { spacing } from '../../theme/tokens.stylex';-import { XDSLayoutSlotsContext } from './XDSLayoutSlotsContext';+import {spacing} from '../../theme/tokens.stylex';+import {XDSLayoutSlotsContext} from './XDSLayoutSlotsContext';const styles = stylex.create({content: {@@ -55,7 +55,10 @@ const styles = stylex.create({},});-export interface XDSLayoutContentProps extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'className'> {+export interface XDSLayoutContentProps extends Omit<+ HTMLAttributes<HTMLElement>,+ 'style' | 'className'+> {/*** Content to render inside the content area.*/@@ -127,10 +130,12 @@ export interface XDSLayoutContentProps extends Omit<HTMLAttributes<HTMLElement>,*/export const XDSLayoutContent = forwardRef<HTMLElement, XDSLayoutContentProps>(function XDSLayoutContent(- { children, isFullBleed = false, isScrollable = true, label, role, ...props },- ref+ {children, isFullBleed = false, isScrollable = true, label, role, ...props},+ ref,) {- const { hasHeader, hasFooter, hasStart, hasEnd } = useContext(XDSLayoutSlotsContext);+ const {hasHeader, hasFooter, hasStart, hasEnd} = useContext(+ XDSLayoutSlotsContext,+ );return (<div@@ -145,14 +150,13 @@ export const XDSLayoutContent = forwardRef<HTMLElement, XDSLayoutContentProps>(!hasHeader && !isFullBleed && styles.noHeader,!hasFooter && !isFullBleed && styles.noFooter,isScrollable && styles.scrollable,- isFullBleed && styles.fullBleed+ isFullBleed && styles.fullBleed,)}- {...props}- >+ {...props}>{children}</div>);- }+ },);XDSLayoutContent.displayName = 'XDSLayoutContent';diff --git a/packages/core/src/Layout/XDSLayout/XDSLayoutFooter.tsx b/packages/core/src/Layout/XDSLayout/XDSLayoutFooter.tsxindex 738f322e8b..1feeebf035 100644--- a/packages/core/src/Layout/XDSLayout/XDSLayoutFooter.tsx+++ b/packages/core/src/Layout/XDSLayout/XDSLayoutFooter.tsx@@ -9,10 +9,10 @@* - /apps/storybook/stories/Layout.stories.tsx*/-import type { AriaRole, HTMLAttributes, ReactNode } from 'react';-import { forwardRef } from 'react';+import type {AriaRole, HTMLAttributes, ReactNode} from 'react';+import {forwardRef} from 'react';import * as stylex from '@stylexjs/stylex';-import { color, spacing } from '../../theme/tokens.stylex';+import {color, spacing} from '../../theme/tokens.stylex';const styles = stylex.create({footer: {@@ -48,7 +48,10 @@ const dynamicStyles = stylex.create({}),});-export interface XDSLayoutFooterProps extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'className'> {+export interface XDSLayoutFooterProps extends Omit<+ HTMLAttributes<HTMLElement>,+ 'style' | 'className'+> {/*** Content to render inside the footer.*/@@ -102,8 +105,16 @@ export interface XDSLayoutFooterProps extends Omit<HTMLAttributes<HTMLElement>,*/export const XDSLayoutFooter = forwardRef<HTMLElement, XDSLayoutFooterProps>(function XDSLayoutFooter(- { children, hasDivider = false, height, isFullBleed = false, label, role, ...props },- ref+ {+ children,+ hasDivider = false,+ height,+ isFullBleed = false,+ label,+ role,+ ...props+ },+ ref,) {// When no divider, collapse spacing for seamless visual flowconst shouldCollapseSpacing = !hasDivider && !isFullBleed;@@ -118,14 +129,13 @@ export const XDSLayoutFooter = forwardRef<HTMLElement, XDSLayoutFooterProps>(dynamicStyles.sizing(height ?? null),isFullBleed && styles.fullBleed,hasDivider && styles.divider,- shouldCollapseSpacing && styles.collapseTop+ shouldCollapseSpacing && styles.collapseTop,)}- {...props}- >+ {...props}>{children}</div>);- }+ },);XDSLayoutFooter.displayName = 'XDSLayoutFooter';diff --git a/packages/core/src/Layout/XDSLayout/XDSLayoutHeader.tsx b/packages/core/src/Layout/XDSLayout/XDSLayoutHeader.tsxindex 9088a6ebc8..1a89d37216 100644--- a/packages/core/src/Layout/XDSLayout/XDSLayoutHeader.tsx+++ b/packages/core/src/Layout/XDSLayout/XDSLayoutHeader.tsx@@ -9,10 +9,10 @@* - /apps/storybook/stories/Layout.stories.tsx*/-import type { AriaRole, HTMLAttributes, ReactNode } from 'react';-import { forwardRef } from 'react';+import type {AriaRole, HTMLAttributes, ReactNode} from 'react';+import {forwardRef} from 'react';import * as stylex from '@stylexjs/stylex';-import { color, spacing } from '../../theme/tokens.stylex';+import {color, spacing} from '../../theme/tokens.stylex';const styles = stylex.create({header: {@@ -48,7 +48,10 @@ const dynamicStyles = stylex.create({}),});-export interface XDSLayoutHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'className'> {+export interface XDSLayoutHeaderProps extends Omit<+ HTMLAttributes<HTMLElement>,+ 'style' | 'className'+> {/*** Content to render inside the header.*/@@ -102,8 +105,16 @@ export interface XDSLayoutHeaderProps extends Omit<HTMLAttributes<HTMLElement>,*/export const XDSLayoutHeader = forwardRef<HTMLElement, XDSLayoutHeaderProps>(function XDSLayoutHeader(- { children, hasDivider = false, height, isFullBleed = false, label, role, ...props },- ref+ {+ children,+ hasDivider = false,+ height,+ isFullBleed = false,+ label,+ role,+ ...props+ },+ ref,) {// When no divider, collapse spacing for seamless visual flowconst shouldCollapseSpacing = !hasDivider && !isFullBleed;@@ -118,14 +129,13 @@ export const XDSLayoutHeader = forwardRef<HTMLElement, XDSLayoutHeaderProps>(dynamicStyles.sizing(height ?? null),isFullBleed && styles.fullBleed,hasDivider && styles.divider,- shouldCollapseSpacing && styles.collapseBottom+ shouldCollapseSpacing && styles.collapseBottom,)}- {...props}- >+ {...props}>{children}</div>);- }+ },);XDSLayoutHeader.displayName = 'XDSLayoutHeader';diff --git a/packages/core/src/Layout/XDSLayout/XDSLayoutPanel.tsx b/packages/core/src/Layout/XDSLayout/XDSLayoutPanel.tsxindex 0418a1737b..ceffa04dda 100644--- a/packages/core/src/Layout/XDSLayout/XDSLayoutPanel.tsx+++ b/packages/core/src/Layout/XDSLayout/XDSLayoutPanel.tsx@@ -9,12 +9,12 @@* - /apps/storybook/stories/Layout.stories.tsx*/-import type { AriaRole, HTMLAttributes, ReactNode } from 'react';-import { forwardRef, useContext } from 'react';+import type {AriaRole, HTMLAttributes, ReactNode} from 'react';+import {forwardRef, useContext} from 'react';import * as stylex from '@stylexjs/stylex';-import { color, spacing } from '../../theme/tokens.stylex';-import { XDSLayoutAreaContext } from './XDSLayoutAreaContext';-import { XDSLayoutSlotsContext } from './XDSLayoutSlotsContext';+import {color, spacing} from '../../theme/tokens.stylex';+import {XDSLayoutAreaContext} from './XDSLayoutAreaContext';+import {XDSLayoutSlotsContext} from './XDSLayoutSlotsContext';const styles = stylex.create({panel: {@@ -82,7 +82,10 @@ const dynamicStyles = stylex.create({}),});-export interface XDSLayoutPanelProps extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'className'> {+export interface XDSLayoutPanelProps extends Omit<+ HTMLAttributes<HTMLElement>,+ 'style' | 'className'+> {/*** Content to render inside the panel.*/@@ -156,11 +159,20 @@ export interface XDSLayoutPanelProps extends Omit<HTMLAttributes<HTMLElement>, '*/export const XDSLayoutPanel = forwardRef<HTMLElement, XDSLayoutPanelProps>(function XDSLayoutPanel(- { children, hasDivider = false, isFullBleed = false, isScrollable = true, label, role, width, ...props },- ref+ {+ children,+ hasDivider = false,+ isFullBleed = false,+ isScrollable = true,+ label,+ role,+ width,+ ...props+ },+ ref,) {const area = useContext(XDSLayoutAreaContext);- const { hasHeader, hasFooter } = useContext(XDSLayoutSlotsContext);+ const {hasHeader, hasFooter} = useContext(XDSLayoutSlotsContext);// Determine panel positionconst isStartPanel = area === 'start';@@ -170,14 +182,18 @@ export const XDSLayoutPanel = forwardRef<HTMLElement, XDSLayoutPanelProps>(const shouldCollapseSpacing = !hasDivider && !isFullBleed;// Select divider style based on position- const dividerStyle = isStartPanel ? styles.dividerEnd- : isEndPanel ? styles.dividerStart- : null;+ const dividerStyle = isStartPanel+ ? styles.dividerEnd+ : isEndPanel+ ? styles.dividerStart+ : null;// Select collapse style based on position (collapse the side where divider would be)- const collapseStyle = isStartPanel ? styles.collapseEnd- : isEndPanel ? styles.collapseStart- : null;+ const collapseStyle = isStartPanel+ ? styles.collapseEnd+ : isEndPanel+ ? styles.collapseStart+ : null;return (<div@@ -195,14 +211,13 @@ export const XDSLayoutPanel = forwardRef<HTMLElement, XDSLayoutPanelProps>(isScrollable && styles.scrollable,isFullBleed && styles.fullBleed,hasDivider && dividerStyle,- shouldCollapseSpacing && collapseStyle+ shouldCollapseSpacing && collapseStyle,)}- {...props}- >+ {...props}>{children}</div>);- }+ },);XDSLayoutPanel.displayName = 'XDSLayoutPanel';diff --git a/packages/core/src/Layout/XDSLayout/XDSLayoutSlotsContext.ts b/packages/core/src/Layout/XDSLayout/XDSLayoutSlotsContext.tsindex 271355b10a..f9aca19f63 100644--- a/packages/core/src/Layout/XDSLayout/XDSLayoutSlotsContext.ts+++ b/packages/core/src/Layout/XDSLayout/XDSLayoutSlotsContext.ts@@ -9,7 +9,7 @@* - /packages/core/src/Layout/XDSLayout/index.ts*/-import { createContext } from 'react';+import {createContext} from 'react';/*** Information about which layout slots are filled.diff --git a/packages/core/src/Layout/XDSLayout/index.ts b/packages/core/src/Layout/XDSLayout/index.tsindex 030f2d595b..f7fd74d331 100644--- a/packages/core/src/Layout/XDSLayout/index.ts+++ b/packages/core/src/Layout/XDSLayout/index.ts@@ -7,23 +7,23 @@* SYNC: When modified, update /packages/core/src/Layout/XDSLayout/README.md*/-export { XDSLayout } from './XDSLayout';-export type { XDSLayoutProps, XDSLayoutHeight } from './XDSLayout';+export {XDSLayout} from './XDSLayout';+export type {XDSLayoutProps, XDSLayoutHeight} from './XDSLayout';-export { XDSLayoutHeader } from './XDSLayoutHeader';-export type { XDSLayoutHeaderProps } from './XDSLayoutHeader';+export {XDSLayoutHeader} from './XDSLayoutHeader';+export type {XDSLayoutHeaderProps} from './XDSLayoutHeader';-export { XDSLayoutFooter } from './XDSLayoutFooter';-export type { XDSLayoutFooterProps } from './XDSLayoutFooter';+export {XDSLayoutFooter} from './XDSLayoutFooter';+export type {XDSLayoutFooterProps} from './XDSLayoutFooter';-export { XDSLayoutContent } from './XDSLayoutContent';-export type { XDSLayoutContentProps } from './XDSLayoutContent';+export {XDSLayoutContent} from './XDSLayoutContent';+export type {XDSLayoutContentProps} from './XDSLayoutContent';-export { XDSLayoutPanel } from './XDSLayoutPanel';-export type { XDSLayoutPanelProps } from './XDSLayoutPanel';+export {XDSLayoutPanel} from './XDSLayoutPanel';+export type {XDSLayoutPanelProps} from './XDSLayoutPanel';-export { XDSLayoutAreaContext } from './XDSLayoutAreaContext';-export type { LayoutArea } from './XDSLayoutAreaContext';+export {XDSLayoutAreaContext} from './XDSLayoutAreaContext';+export type {LayoutArea} from './XDSLayoutAreaContext';-export { XDSLayoutSlotsContext } from './XDSLayoutSlotsContext';-export type { LayoutSlots } from './XDSLayoutSlotsContext';+export {XDSLayoutSlotsContext} from './XDSLayoutSlotsContext';+export type {LayoutSlots} from './XDSLayoutSlotsContext';diff --git a/packages/core/src/Layout/index.ts b/packages/core/src/Layout/index.tsindex c48bb0e3d6..5cf7d7d0c3 100644--- a/packages/core/src/Layout/index.ts+++ b/packages/core/src/Layout/index.ts@@ -8,10 +8,13 @@*/// Utilities-export { container } from './Container/container.stylex';-export type { ContainerOptions, SpacingToken } from './Container/container.stylex';+export {container} from './Container/container.stylex';+export type {+ ContainerOptions,+ SpacingToken,+} from './Container/container.stylex';-export { stack } from './Stack/stack.stylex';+export {stack} from './Stack/stack.stylex';export type {StackOptions,StackDirection,@@ -21,7 +24,7 @@ export type {SpacingScale,} from './Stack/stack.stylex';-export { stackItem } from './Stack/stackItem.stylex';+export {stackItem} from './Stack/stackItem.stylex';export type {StackItemOptions,StackItemCrossAlignSelf,@@ -29,22 +32,11 @@ export type {} from './Stack/stackItem.stylex';// Stack components-export {- XDSHStack,- XDSVStack,- XDSStackItem,-} from './Stack';-export type {- XDSHStackProps,- XDSVStackProps,- XDSStackItemProps,-} from './Stack';+export {XDSHStack, XDSVStack, XDSStackItem} from './Stack';+export type {XDSHStackProps, XDSVStackProps, XDSStackItemProps} from './Stack';// Container components-export {- XDSCard,- XDSSection,-} from './Container';+export {XDSCard, XDSSection} from './Container';export type {XDSCardProps,SizeValue,diff --git a/packages/core/src/README.md b/packages/core/src/README.mdindex ba80683e8b..007596192d 100644--- a/packages/core/src/README.md+++ b/packages/core/src/README.md@@ -4,8 +4,7 @@ Source code for core UI components.<!-- SYNC: When files in this directory change, update this document. -->-| File/Directory | Role | Purpose |-|----------------|------|---------|-| `index.ts` | Entry | Package entry point; re-exports all components |-| `Button/` | Component | Button component with variants and loading states |-+| File/Directory | Role | Purpose |+| -------------- | --------- | ------------------------------------------------- |+| `index.ts` | Entry | Package entry point; re-exports all components |+| `Button/` | Component | Button component with variants and loading states |diff --git a/packages/core/src/Skeleton/README.md b/packages/core/src/Skeleton/README.mdindex 07360b232a..346ff8ed7f 100644--- a/packages/core/src/Skeleton/README.md+++ b/packages/core/src/Skeleton/README.md@@ -36,24 +36,24 @@ import { XDSSkeleton } from '@xds/core/Skeleton';## Props-| Prop | Type | Default | Description |-|------|------|---------|-------------|-| `width` | `number \| string` | `'100%'` | Width in pixels (number) or CSS value (string) |-| `height` | `number \| string` | `'100%'` | Height in pixels (number) or CSS value (string) |-| `radius` | `'none' \| 'inner' \| 'content' \| 'element' \| 'container' \| 'rounded'` | `'container'` | Border radius using design tokens |-| `index` | `number` | `0` | Index for staggered animation timing |-| `data-testid` | `string` | — | Test ID for testing |+| Prop | Type | Default | Description |+| ------------- | ------------------------------------------------------------------------- | ------------- | ----------------------------------------------- |+| `width` | `number \| string` | `'100%'` | Width in pixels (number) or CSS value (string) |+| `height` | `number \| string` | `'100%'` | Height in pixels (number) or CSS value (string) |+| `radius` | `'none' \| 'inner' \| 'content' \| 'element' \| 'container' \| 'rounded'` | `'container'` | Border radius using design tokens |+| `index` | `number` | `0` | Index for staggered animation timing |+| `data-testid` | `string` | — | Test ID for testing |## Radius Options-| Value | Use Case |-|-------|----------|-| `none` | Sharp corners (images, rectangles) |-| `inner` | Inner elements |-| `content` | Content areas |-| `element` | Standard elements |-| `container` | Container-level rounding (default) |-| `rounded` | Fully rounded (avatars, pills, circles) |+| Value | Use Case |+| ----------- | --------------------------------------- |+| `none` | Sharp corners (images, rectangles) |+| `inner` | Inner elements |+| `content` | Content areas |+| `element` | Standard elements |+| `container` | Container-level rounding (default) |+| `rounded` | Fully rounded (avatars, pills, circles) |## Animation Timing@@ -67,10 +67,10 @@ For element at index `n`, animation starts at: `DELAY_TIME + (STAGGER_TIME × n)## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports component and types |-| `XDSSkeleton.tsx` | Core | Component implementation |+| File | Role | Purpose |+| ----------------- | ----- | --------------------------- |+| `index.ts` | Entry | Exports component and types |+| `XDSSkeleton.tsx` | Core | Component implementation |## Implementation Notesdiff --git a/packages/core/src/Skeleton/XDSSkeleton.tsx b/packages/core/src/Skeleton/XDSSkeleton.tsxindex d688cdf2d0..31a56856d5 100644--- a/packages/core/src/Skeleton/XDSSkeleton.tsx+++ b/packages/core/src/Skeleton/XDSSkeleton.tsx@@ -10,9 +10,9 @@* - /apps/storybook/stories/Skeleton.stories.tsx*/-import { forwardRef, type HTMLAttributes } from 'react';+import {forwardRef, type HTMLAttributes} from 'react';import * as stylex from '@stylexjs/stylex';-import { color, radius } from '../theme/tokens.stylex';+import {color, radius} from '../theme/tokens.stylex';// =============================================================================// Animation Timing Constants@@ -41,8 +41,8 @@ const STAGGER_TIME = 100;// =============================================================================const skeletonFade = stylex.keyframes({- '0%': { opacity: 0.25 },- '100%': { opacity: 1 },+ '0%': {opacity: 0.25},+ '100%': {opacity: 1},});// =============================================================================@@ -154,7 +154,7 @@ export const XDSSkeleton = forwardRef<HTMLDivElement, XDSSkeletonProps>('data-testid': testId,...props},- ref+ ref,) => {return (<div@@ -165,12 +165,12 @@ export const XDSSkeleton = forwardRef<HTMLDivElement, XDSSkeletonProps>(styles.animate,radiusStyles[radiusProp],dynamicStyles.dimensions(width, height),- dynamicStyles.animationDelay(index)+ dynamicStyles.animationDelay(index),)}{...props}/>);- }+ },);XDSSkeleton.displayName = 'XDSSkeleton';diff --git a/packages/core/src/Skeleton/index.ts b/packages/core/src/Skeleton/index.tsindex 387556a097..41b35a3d3d 100644--- a/packages/core/src/Skeleton/index.ts+++ b/packages/core/src/Skeleton/index.ts@@ -1,2 +1,2 @@-export { XDSSkeleton } from './XDSSkeleton';-export type { XDSSkeletonProps, XDSSkeletonRadius } from './XDSSkeleton';+export {XDSSkeleton} from './XDSSkeleton';+export type {XDSSkeletonProps, XDSSkeletonRadius} from './XDSSkeleton';diff --git a/packages/core/src/TextInput/README.md b/packages/core/src/TextInput/README.mdindex 394532e96d..ea1419be1b 100644--- a/packages/core/src/TextInput/README.md+++ b/packages/core/src/TextInput/README.md@@ -41,24 +41,24 @@ import { XDSTextInput } from '@xds/core/TextInput';## Props-| Prop | Type | Required | Description |-|------|------|----------|-------------|-| `label` | `string` | Yes | Label text for the input (always rendered for accessibility) |-| `value` | `string` | Yes | Current value of the input |-| `onChange` | `(value: string, e: ChangeEvent<HTMLInputElement>) => void` | Yes | Callback fired when input value changes |-| `isLabelHidden` | `boolean` | No | Visually hide the label (still accessible to screen readers) |-| `description` | `string` | No | Description text displayed between the label and input |-| `isOptional` | `boolean` | No | Whether the field is optional (mutually exclusive with isRequired) |-| `isRequired` | `boolean` | No | Whether the field is required (mutually exclusive with isOptional) |-| `placeholder` | `string` | No | Placeholder text |+| Prop | Type | Required | Description |+| --------------- | ----------------------------------------------------------- | -------- | ------------------------------------------------------------------ |+| `label` | `string` | Yes | Label text for the input (always rendered for accessibility) |+| `value` | `string` | Yes | Current value of the input |+| `onChange` | `(value: string, e: ChangeEvent<HTMLInputElement>) => void` | Yes | Callback fired when input value changes |+| `isLabelHidden` | `boolean` | No | Visually hide the label (still accessible to screen readers) |+| `description` | `string` | No | Description text displayed between the label and input |+| `isOptional` | `boolean` | No | Whether the field is optional (mutually exclusive with isRequired) |+| `isRequired` | `boolean` | No | Whether the field is required (mutually exclusive with isOptional) |+| `placeholder` | `string` | No | Placeholder text |## Files-| File | Role | Purpose |-|------|------|---------|-| `index.ts` | Entry | Exports component and types |-| `XDSTextInput.tsx` | Core | Component implementation |-| `XDSTextInput.test.tsx` | Test | Unit tests |+| File | Role | Purpose |+| ----------------------- | ----- | --------------------------- |+| `index.ts` | Entry | Exports component and types |+| `XDSTextInput.tsx` | Core | Component implementation |+| `XDSTextInput.test.tsx` | Test | Unit tests |## Implementation Notesdiff --git a/packages/core/src/TextInput/XDSTextInput.test.tsx b/packages/core/src/TextInput/XDSTextInput.test.tsxindex ad6404ee93..8b5a6ae203 100644--- a/packages/core/src/TextInput/XDSTextInput.test.tsx+++ b/packages/core/src/TextInput/XDSTextInput.test.tsx@@ -7,10 +7,10 @@* SYNC: When XDSTextInput.tsx changes, update tests to match new behavior*/-import { describe, it, expect, vi } from 'vitest';-import { render, screen } from '@testing-library/react';+import {describe, it, expect, vi} from 'vitest';+import {render, screen} from '@testing-library/react';import userEvent from '@testing-library/user-event';-import { XDSTextInput } from './XDSTextInput';+import {XDSTextInput} from './XDSTextInput';describe('XDSTextInput', () => {it('renders with label', () => {@@ -19,7 +19,14 @@ describe('XDSTextInput', () => {});it('renders with placeholder', () => {- render(<XDSTextInput label="Name" value="" onChange={() => {}} placeholder="Enter text" />);+ render(+ <XDSTextInput+ label="Name"+ value=""+ onChange={() => {}}+ placeholder="Enter text"+ />,+ );expect(screen.getByPlaceholderText('Enter text')).toBeInTheDocument();});@@ -45,18 +52,33 @@ describe('XDSTextInput', () => {});it('displays controlled value', () => {- render(<XDSTextInput label="Name" value="Controlled value" onChange={() => {}} />);+ render(+ <XDSTextInput+ label="Name"+ value="Controlled value"+ onChange={() => {}}+ />,+ );expect(screen.getByRole('textbox')).toHaveValue('Controlled value');});it('forwards ref correctly', () => {const ref = vi.fn();- render(<XDSTextInput ref={ref} label="Name" value="" onChange={() => {}} />);+ render(+ <XDSTextInput ref={ref} label="Name" value="" onChange={() => {}} />,+ );expect(ref).toHaveBeenCalledWith(expect.any(HTMLInputElement));});it('visually hides label when isLabelHidden is true', () => {- render(<XDSTextInput label="Search" isLabelHidden value="" onChange={() => {}} />);+ render(+ <XDSTextInput+ label="Search"+ isLabelHidden+ value=""+ onChange={() => {}}+ />,+ );const label = screen.getByText('Search');expect(label).toBeInTheDocument();// Label should still be accessible@@ -70,8 +92,13 @@ describe('XDSTextInput', () => {});it('sets aria-required when isRequired is true', () => {- render(<XDSTextInput label="Username" isRequired value="" onChange={() => {}} />);- expect(screen.getByRole('textbox')).toHaveAttribute('aria-required', 'true');+ render(+ <XDSTextInput label="Username" isRequired value="" onChange={() => {}} />,+ );+ expect(screen.getByRole('textbox')).toHaveAttribute(+ 'aria-required',+ 'true',+ );});it('does not set aria-required when isRequired is false', () => {diff --git a/packages/core/src/TextInput/XDSTextInput.tsx b/packages/core/src/TextInput/XDSTextInput.tsxindex 2aaaa02623..40f241e43c 100644--- a/packages/core/src/TextInput/XDSTextInput.tsx+++ b/packages/core/src/TextInput/XDSTextInput.tsx@@ -11,10 +11,16 @@* - /apps/storybook/stories/TextInput.stories.tsx (storybook stories)*/-import { forwardRef, useId, type ChangeEvent } from 'react';+import {forwardRef, useId, type ChangeEvent} from 'react';import * as stylex from '@stylexjs/stylex';-import { color, spacing, radius, transition, typography } from '../theme/tokens.stylex';-import { XDSField } from '../Field';+import {+ color,+ spacing,+ radius,+ transition,+ typography,+} from '../theme/tokens.stylex';+import {XDSField} from '../Field';const styles = stylex.create({input: {@@ -98,7 +104,19 @@ export interface XDSTextInputProps {* ```*/export const XDSTextInput = forwardRef<HTMLInputElement, XDSTextInputProps>(- ({ label, isLabelHidden = false, description, isOptional = false, isRequired = false, onChange, value, placeholder }, ref) => {+ (+ {+ label,+ isLabelHidden = false,+ description,+ isOptional = false,+ isRequired = false,+ onChange,+ value,+ placeholder,+ },+ ref,+ ) => {const id = useId();const descriptionID = useId();@@ -110,14 +128,13 @@ export const XDSTextInput = forwardRef<HTMLInputElement, XDSTextInputProps>(inputID={id}descriptionID={description ? descriptionID : undefined}isOptional={isOptional}- isRequired={isRequired}- >+ isRequired={isRequired}><inputref={ref}id={id}type="text"value={value}- onChange={(e) => onChange(e.target.value, e)}+ onChange={e => onChange(e.target.value, e)}placeholder={placeholder}aria-describedby={description ? descriptionID : undefined}aria-required={isRequired === true ? 'true' : undefined}@@ -125,7 +142,7 @@ export const XDSTextInput = forwardRef<HTMLInputElement, XDSTextInputProps>(/></XDSField>);- }+ },);XDSTextInput.displayName = 'XDSTextInput';diff --git a/packages/core/src/TextInput/index.ts b/packages/core/src/TextInput/index.tsindex 46ce26701b..cd51b81d7f 100644--- a/packages/core/src/TextInput/index.ts+++ b/packages/core/src/TextInput/index.ts@@ -7,5 +7,5 @@* SYNC: When modified, update this header and /packages/core/src/TextInput/README.md*/-export { XDSTextInput } from './XDSTextInput';-export type { XDSTextInputProps } from './XDSTextInput';+export {XDSTextInput} from './XDSTextInput';+export type {XDSTextInputProps} from './XDSTextInput';diff --git a/packages/core/src/theme/Theme.tsx b/packages/core/src/theme/Theme.tsxindex 768ecd9c72..4f7aeecd87 100644--- a/packages/core/src/theme/Theme.tsx+++ b/packages/core/src/theme/Theme.tsx@@ -16,14 +16,14 @@* ```*/-import React, { useContext, useMemo } from 'react';+import React, {useContext, useMemo} from 'react';import * as stylex from '@stylexjs/stylex';-import type { Theme as ThemeType, ThemeMode } from './types';-import { ThemeContext, type ThemeContextValue } from './ThemeContext';-import { color } from './tokens.stylex';+import type {Theme as ThemeType, ThemeMode} from './types';+import {ThemeContext, type ThemeContextValue} from './ThemeContext';+import {color} from './tokens.stylex';// Re-export for backwards compatibility-export { ThemeContext } from './ThemeContext';+export {ThemeContext} from './ThemeContext';/*** Hook to access current theme@@ -78,7 +78,7 @@ export function Theme({mode = 'system',children,}: ThemeProps): React.ReactElement {- const contextValue = useMemo(() => ({ theme, mode }), [theme, mode]);+ const contextValue = useMemo(() => ({theme, mode}), [theme, mode]);// Get the color-scheme style based on modeconst colorSchemeStyle =@@ -97,7 +97,7 @@ export function Theme({theme.styles.radius,theme.styles.elevation,theme.styles.transition,- theme.styles.typography+ theme.styles.typography,);return (@@ -105,8 +105,7 @@ export function Theme({<divclassName={stylexProps.className}style={stylexProps.style}- data-theme={mode === 'system' ? undefined : mode}- >+ data-theme={mode === 'system' ? undefined : mode}>{children}</div></ThemeContext.Provider>diff --git a/packages/core/src/theme/ThemeContext.ts b/packages/core/src/theme/ThemeContext.tsindex 2027e250df..c966721ffb 100644--- a/packages/core/src/theme/ThemeContext.ts+++ b/packages/core/src/theme/ThemeContext.ts@@ -5,8 +5,8 @@* without pulling in the full theme provider implementation.*/-import { createContext } from 'react';-import type { Theme, ThemeMode } from './types';+import {createContext} from 'react';+import type {Theme, ThemeMode} from './types';/*** Theme context valuediff --git a/packages/core/src/theme/defaultTheme.stylex.ts b/packages/core/src/theme/defaultTheme.stylex.tsindex 7daa13eb53..5797520f11 100644--- a/packages/core/src/theme/defaultTheme.stylex.ts+++ b/packages/core/src/theme/defaultTheme.stylex.ts@@ -12,7 +12,7 @@*/import * as stylex from '@stylexjs/stylex';-import type { Theme } from './types';+import type {Theme} from './types';import type {ColorVarName,SpacingVarName,@@ -203,7 +203,8 @@ const themeStyles = stylex.create({const buttonVariants = stylex.create({secondary: {- backgroundColor: 'light-dark(rgba(5 ,54 ,89 ,0.1), rgba(223, 226, 229, 0.2))',+ backgroundColor:+ 'light-dark(rgba(5 ,54 ,89 ,0.1), rgba(223, 226, 229, 0.2))',},});diff --git a/packages/core/src/theme/index.ts b/packages/core/src/theme/index.tsindex 657a7cf597..868e30dc99 100644--- a/packages/core/src/theme/index.ts+++ b/packages/core/src/theme/index.ts@@ -9,9 +9,9 @@* - Token exports for direct use in StyleX*/-export { Theme, useTheme } from './Theme';-export { defaultTheme } from './defaultTheme.stylex';-export { neutralTheme } from './neutralTheme.stylex';+export {Theme, useTheme} from './Theme';+export {defaultTheme} from './defaultTheme.stylex';+export {neutralTheme} from './neutralTheme.stylex';// Export tokens for use in custom componentsexport {diff --git a/packages/core/src/theme/neutralTheme.stylex.ts b/packages/core/src/theme/neutralTheme.stylex.tsindex 76b472158e..5c28b61bd6 100644--- a/packages/core/src/theme/neutralTheme.stylex.ts+++ b/packages/core/src/theme/neutralTheme.stylex.ts@@ -14,7 +14,7 @@*/import * as stylex from '@stylexjs/stylex';-import type { Theme } from './types';+import type {Theme} from './types';import type {ColorVarName,SpacingVarName,@@ -23,7 +23,7 @@ import type {TransitionVarName,TypographyVarName,} from './tokens.stylex';-import { color, spacing } from './tokens.stylex';+import {color, spacing} from './tokens.stylex';// =============================================================================// Raw Theme Values@@ -34,7 +34,8 @@ import { color, spacing } from './tokens.stylex';const colorRaw = {// Core semantic - neutral grayscale palette'--color-accent': 'light-dark(oklch(0.205 0 0), oklch(0.922 0 0))',- '--color-accent-deemphasized': 'light-dark(oklch(0.97 0 0), oklch(0.269 0 0))',+ '--color-accent-deemphasized':+ 'light-dark(oklch(0.97 0 0), oklch(0.269 0 0))','--color-accent-text': 'light-dark(oklch(0.205 0 0), oklch(0.985 0 0))','--color-surface': 'light-dark(oklch(1 0 0), oklch(0.145 0 0))','--color-wash': 'light-dark(oklch(0.97 0 0), oklch(0.269 0 0))',@@ -84,8 +85,7 @@ const colorRaw = {'--color-divider': 'light-dark(oklch(0.922 0 0), oklch(1 0 0 / 10%))','--color-divider-high-contrast':'light-dark(oklch(0.708 0 0), oklch(0.556 0 0))',- '--color-divider-emphasized':- 'light-dark(oklch(0.85 0 0), oklch(0.371 0 0))',+ '--color-divider-emphasized': 'light-dark(oklch(0.85 0 0), oklch(0.371 0 0))',// Disabled/Effects'--color-disabled-overlay':diff --git a/packages/core/src/theme/tokens.stylex.ts b/packages/core/src/theme/tokens.stylex.tsindex b23a2eca87..72bb52a853 100644--- a/packages/core/src/theme/tokens.stylex.ts+++ b/packages/core/src/theme/tokens.stylex.ts@@ -304,9 +304,7 @@ export type ElevationVarName =| '--elevation-hover'| '--elevation-menu';-export type TransitionVarName =- | '--transition-fast'- | '--transition-normal';+export type TransitionVarName = '--transition-fast' | '--transition-normal';export type TypographyVarName =| '--font-body'diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.tsindex 7ee94269c9..8d95eb89e8 100644--- a/packages/core/tsup.config.ts+++ b/packages/core/tsup.config.ts@@ -7,7 +7,7 @@* SYNC: When modified, update this header and /packages/core/README.md*/-import { defineConfig } from 'tsup';+import {defineConfig} from 'tsup';import babel from 'esbuild-plugin-babel';export default defineConfig({@@ -22,7 +22,7 @@ export default defineConfig({filter: /\.[jt]sx?$/,config: {presets: [- ['@babel/preset-react', { runtime: 'automatic' }],+ ['@babel/preset-react', {runtime: 'automatic'}],'@babel/preset-typescript',],plugins: [diff --git a/yarn.lock b/yarn.lockindex 88c75fa5ff..dc537cdb6f 100644--- a/yarn.lock+++ b/yarn.lock@@ -1097,14 +1097,14 @@resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz#9e585ab6086bef994c6e8a5b3a0481219ada862b"integrity sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==-"@eslint-community/eslint-utils@^4.8.0":+"@eslint-community/eslint-utils@^4.8.0", "@eslint-community/eslint-utils@^4.9.1":version "4.9.1"resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595"integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==dependencies:eslint-visitor-keys "^3.4.3"-"@eslint-community/regexpp@^4.12.1":+"@eslint-community/regexpp@^4.12.1", "@eslint-community/regexpp@^4.12.2":version "4.12.2"resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b"integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==@@ -1147,7 +1147,7 @@minimatch "^3.1.2"strip-json-comments "^3.1.1"-"@eslint/[email protected]":+"@eslint/[email protected]", "@eslint/js@^9.39.2":version "9.39.2"resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.2.tgz#2d4b8ec4c3ea13c1b3748e0c97ecd766bdd80599"integrity sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==@@ -1969,6 +1969,102 @@resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba"integrity sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==+"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.1.tgz#f6640f6f8749b71d9ab457263939e8932a3c6b46"+ integrity sha512-cFYYFZ+oQFi6hUnBTbLRXfTJiaQtYE3t4O692agbBl+2Zy+eqSKWtPjhPXJu1G7j4RLjKgeJPDdq3EqOwmX5Ag==+ dependencies:+ "@eslint-community/regexpp" "^4.12.2"+ "@typescript-eslint/scope-manager" "8.53.1"+ "@typescript-eslint/type-utils" "8.53.1"+ "@typescript-eslint/utils" "8.53.1"+ "@typescript-eslint/visitor-keys" "8.53.1"+ ignore "^7.0.5"+ natural-compare "^1.4.0"+ ts-api-utils "^2.4.0"++"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.53.1.tgz#58d4a70cc2daee2becf7d4521d65ea1782d6ec68"+ integrity sha512-nm3cvFN9SqZGXjmw5bZ6cGmvJSyJPn0wU9gHAZZHDnZl2wF9PhHv78Xf06E0MaNk4zLVHL8hb2/c32XvyJOLQg==+ dependencies:+ "@typescript-eslint/scope-manager" "8.53.1"+ "@typescript-eslint/types" "8.53.1"+ "@typescript-eslint/typescript-estree" "8.53.1"+ "@typescript-eslint/visitor-keys" "8.53.1"+ debug "^4.4.3"++"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.53.1.tgz#4e47856a0b14a1ceb28b0294b4badef3be1e9734"+ integrity sha512-WYC4FB5Ra0xidsmlPb+1SsnaSKPmS3gsjIARwbEkHkoWloQmuzcfypljaJcR78uyLA1h8sHdWWPHSLDI+MtNog==+ dependencies:+ "@typescript-eslint/tsconfig-utils" "^8.53.1"+ "@typescript-eslint/types" "^8.53.1"+ debug "^4.4.3"++"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.53.1.tgz#6c4b8c82cd45ae3b365afc2373636e166743a8fa"+ integrity sha512-Lu23yw1uJMFY8cUeq7JlrizAgeQvWugNQzJp8C3x8Eo5Jw5Q2ykMdiiTB9vBVOOUBysMzmRRmUfwFrZuI2C4SQ==+ dependencies:+ "@typescript-eslint/types" "8.53.1"+ "@typescript-eslint/visitor-keys" "8.53.1"++"@typescript-eslint/[email protected]", "@typescript-eslint/tsconfig-utils@^8.53.1":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.1.tgz#efe80b8d019cd49e5a1cf46c2eb0cd2733076424"+ integrity sha512-qfvLXS6F6b1y43pnf0pPbXJ+YoXIC7HKg0UGZ27uMIemKMKA6XH2DTxsEDdpdN29D+vHV07x/pnlPNVLhdhWiA==++"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.53.1.tgz#95de2651a96d580bf5c6c6089ddd694284d558ad"+ integrity sha512-MOrdtNvyhy0rHyv0ENzub1d4wQYKb2NmIqG7qEqPWFW7Mpy2jzFC3pQ2yKDvirZB7jypm5uGjF2Qqs6OIqu47w==+ dependencies:+ "@typescript-eslint/types" "8.53.1"+ "@typescript-eslint/typescript-estree" "8.53.1"+ "@typescript-eslint/utils" "8.53.1"+ debug "^4.4.3"+ ts-api-utils "^2.4.0"++"@typescript-eslint/[email protected]", "@typescript-eslint/types@^8.53.1":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.53.1.tgz#101f203f0807a63216cceceedb815fabe21d5793"+ integrity sha512-jr/swrr2aRmUAUjW5/zQHbMaui//vQlsZcJKijZf3M26bnmLj8LyZUpj8/Rd6uzaek06OWsqdofN/Thenm5O8A==++"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.1.tgz#b6dce2303c9e27e95b8dcd8c325868fff53e488f"+ integrity sha512-RGlVipGhQAG4GxV1s34O91cxQ/vWiHJTDHbXRr0li2q/BGg3RR/7NM8QDWgkEgrwQYCvmJV9ichIwyoKCQ+DTg==+ dependencies:+ "@typescript-eslint/project-service" "8.53.1"+ "@typescript-eslint/tsconfig-utils" "8.53.1"+ "@typescript-eslint/types" "8.53.1"+ "@typescript-eslint/visitor-keys" "8.53.1"+ debug "^4.4.3"+ minimatch "^9.0.5"+ semver "^7.7.3"+ tinyglobby "^0.2.15"+ ts-api-utils "^2.4.0"++"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.53.1.tgz#81fe6c343de288701b774f4d078382f567e6edaa"+ integrity sha512-c4bMvGVWW4hv6JmDUEG7fSYlWOl3II2I4ylt0NM+seinYQlZMQIaKaXIIVJWt9Ofh6whrpM+EdDQXKXjNovvrg==+ dependencies:+ "@eslint-community/eslint-utils" "^4.9.1"+ "@typescript-eslint/scope-manager" "8.53.1"+ "@typescript-eslint/types" "8.53.1"+ "@typescript-eslint/typescript-estree" "8.53.1"++"@typescript-eslint/[email protected]":+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.1.tgz#405f04959be22b9be364939af8ac19c3649b6eb7"+ integrity sha512-oy+wV7xDKFPRyNggmXuZQSBzvoLnpmJs+GhzRhPjrxl2b/jIlyjVokzm47CZCDUdXKr2zd7ZLodPfOBpOPyPlg==+ dependencies:+ "@typescript-eslint/types" "8.53.1"+ eslint-visitor-keys "^4.2.1"+"@vitejs/plugin-react@^4.3.0":version "4.7.0"resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz#647af4e7bb75ad3add578e762ad984b90f4a24b9"@@ -2462,7 +2558,7 @@ data-urls@^6.0.0:whatwg-mimetype "^4.0.0"whatwg-url "^15.0.0"-debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.7, debug@^4.4.0:+debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.7, debug@^4.4.0, debug@^4.4.3:version "4.4.3"resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==@@ -3166,6 +3262,11 @@ human-id@^4.1.1:resolved "https://registry.yarnpkg.com/human-id/-/human-id-4.1.3.tgz#f408633c6febbef4650758f00ffca0967afb566d"integrity sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==+husky@^9.1.7:+ version "9.1.7"+ resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"+ integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==+iconv-lite@^0.7.0:version "0.7.2"resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.2.tgz#d0bdeac3f12b4835b7359c2ad89c422a4d1cc72e"@@ -3178,6 +3279,11 @@ ignore@^5.2.0:resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==+ignore@^7.0.5:+ version "7.0.5"+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9"+ integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==+import-fresh@^3.2.1:version "3.3.1"resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf"@@ -3684,7 +3790,7 @@ minimatch@^3.1.2:dependencies:brace-expansion "^1.1.7"-minimatch@^9.0.4:+minimatch@^9.0.4, minimatch@^9.0.5:version "9.0.5"resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==@@ -4215,7 +4321,7 @@ semver@^6.3.1:resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==-semver@^7.5.3, semver@^7.6.2:+semver@^7.5.3, semver@^7.6.2, semver@^7.7.3:version "7.7.3"resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946"integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==@@ -4452,7 +4558,7 @@ tinyexec@^0.3.1, tinyexec@^0.3.2:resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2"integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==-tinyglobby@^0.2.11:+tinyglobby@^0.2.11, tinyglobby@^0.2.15:version "0.2.15"resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2"integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==@@ -4513,6 +4619,11 @@ tree-kill@^1.2.2:resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==+ts-api-utils@^2.4.0:+ version "2.4.0"+ resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.4.0.tgz#2690579f96d2790253bdcf1ca35d569ad78f9ad8"+ integrity sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==+ts-dedent@^2.0.0, ts-dedent@^2.2.0:version "2.2.0"resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5"@@ -4567,6 +4678,16 @@ type-check@^0.4.0, type-check@~0.4.0:dependencies:prelude-ls "^1.2.1"+typescript-eslint@^8.53.1:+ version "8.53.1"+ resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.53.1.tgz#e8d2888083af4638d2952b938d69458f54865921"+ integrity sha512-gB+EVQfP5RDElh9ittfXlhZJdjSU4jUSTyE2+ia8CYyNvet4ElfaLlAIqDvQV9JPknKx0jQH1racTYe/4LaLSg==+ dependencies:+ "@typescript-eslint/eslint-plugin" "8.53.1"+ "@typescript-eslint/parser" "8.53.1"+ "@typescript-eslint/typescript-estree" "8.53.1"+ "@typescript-eslint/utils" "8.53.1"+typescript@^5.7.0:version "5.9.3"resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"