An open source design system that's fully customizable and agent ready
TypeScript
fix(theme-meta): align Meta theme to CDS/XMDS tokens (#1214)
rubyycheungf2b2e65cce4b
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsxindex 6eb51b4183..e7b2a27f6f 100644--- a/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsx+++ b/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsx@@ -20,6 +20,7 @@ import {XDSProgressBar} from '@xds/core/ProgressBar';import {XDSSpinner} from '@xds/core/Spinner';import {XDSSkeleton} from '@xds/core/Skeleton';import {XDSTabList, XDSTab} from '@xds/core/TabList';+import {XDSIcon} from '@xds/core/Icon';import {XDSLink} from '@xds/core/Link';import {XDSStatusDot} from '@xds/core/StatusDot';import {XDSSelector} from '@xds/core/Selector';@@ -144,7 +145,7 @@ export default function ExampleCardsPage() {<XDSHStack gap={2}><XDSSelectorlabel="Theme"- isLabelHidden+options={themeOptions}value={themeName.charAt(0).toUpperCase() + themeName.slice(1)}onChange={(v: string) => setThemeName(v.toLowerCase())}@@ -152,7 +153,7 @@ export default function ExampleCardsPage() {/><XDSSelectorlabel="Mode"- isLabelHidden+options={modeOptions}value={mode === 'dark' ? 'Dark' : 'Light'}onChange={(v: string) => setMode(v.toLowerCase() as ThemeMode)}@@ -171,13 +172,13 @@ export default function ExampleCardsPage() {}}>{/* Contribution History */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Contribution History- </XDSText>+ </XDSHeading><XDSBadge label="+2% vs last month" variant="success" /></div><XDSText type="supporting" color="secondary">@@ -231,14 +232,14 @@ export default function ExampleCardsPage() {{/* Payout Threshold */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Payout Threshold- </XDSText>- <XDSButton label="×" variant="ghost" size="sm" />+ </XDSHeading>+ <XDSButton label="" icon={<XDSIcon icon="close" size="sm" />} variant="ghost" size="sm" /></div><XDSText type="supporting" color="secondary">Set the minimum balance required before a payout is triggered.@@ -277,13 +278,13 @@ export default function ExampleCardsPage() {{/* Savings Targets */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Savings Targets- </XDSText>+ </XDSHeading><XDSButton label="New Goal" variant="primary" size="sm" /></div><XDSText type="supporting" color="secondary">@@ -328,12 +329,12 @@ export default function ExampleCardsPage() {{/* Buy Investment */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Buy Investment- </XDSText>+ </XDSHeading><XDSTextInputlabel="Amount to Invest"value="1,000.00"@@ -376,12 +377,12 @@ export default function ExampleCardsPage() {{/* Account Access */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Account Access- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Update your credentials or re-authenticate.</XDSText>@@ -416,14 +417,14 @@ export default function ExampleCardsPage() {{/* Payout Preferences */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Payout Preferences- </XDSText>- <XDSButton label="×" variant="ghost" size="sm" />+ </XDSHeading>+ <XDSButton label="" icon={<XDSIcon icon="close" size="sm" />} variant="ghost" size="sm" /></div><XDSText type="supporting" color="secondary">Receiving Method@@ -462,12 +463,12 @@ export default function ExampleCardsPage() {{/* Stock Performance */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Stock Performance- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">6-month price history.</XDSText>@@ -476,7 +477,7 @@ export default function ExampleCardsPage() {options={['VOO', 'AAPL', 'GOOGL', 'MSFT']}value={ticker}onChange={setTicker}- isLabelHidden+/><div {...stylex.props(styles.chart)}>{[30, 45, 38, 52, 48, 55, 42, 60, 58, 65, 50, 70].map(@@ -495,12 +496,12 @@ export default function ExampleCardsPage() {{/* Distribute Track */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Distribute Track- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Upload your first master and start reaching listeners onSpotify, Apple Music and more.@@ -515,7 +516,7 @@ export default function ExampleCardsPage() {{/* Clearinghouse Balance */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><XDSText type="supporting" color="secondary">@@ -559,14 +560,14 @@ export default function ExampleCardsPage() {{/* Recent Transactions */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><div {...stylex.props(styles.row)}><XDSVStack gap={1}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Recent Transactions- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Your latest account activity.</XDSText>@@ -644,7 +645,7 @@ export default function ExampleCardsPage() {{/* Card Balance */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><div {...stylex.props(styles.row)}>@@ -712,12 +713,12 @@ export default function ExampleCardsPage() {{/* Power Usage */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Power Usage- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Whole Home</XDSText>@@ -763,12 +764,12 @@ export default function ExampleCardsPage() {{/* Explore Catalog */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Explore Catalog- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Check your ISRC codes, metadata, and visual assets before goinglive.@@ -780,14 +781,14 @@ export default function ExampleCardsPage() {{/* Transfer Funds */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Transfer Funds- </XDSText>- <XDSButton label="×" variant="ghost" size="sm" />+ </XDSHeading>+ <XDSButton label="" icon={<XDSIcon icon="close" size="sm" />} variant="ghost" size="sm" /></div><XDSText type="supporting" color="secondary">Move money between your connected accounts.@@ -857,12 +858,12 @@ export default function ExampleCardsPage() {{/* Set a New Milestone */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Set a new milestone- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Define your financial target and we'll help you pace yoursavings.@@ -895,12 +896,12 @@ export default function ExampleCardsPage() {{/* Connect Bank */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Connect Bank- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Link your payment method to receive monthly royaltydistributions automatically.@@ -912,14 +913,14 @@ export default function ExampleCardsPage() {{/* Preferences */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Preferences- </XDSText>- <XDSButton label="×" variant="ghost" size="sm" />+ </XDSHeading>+ <XDSButton label="" icon={<XDSIcon icon="close" size="sm" />} variant="ghost" size="sm" /></div><XDSText type="supporting" color="secondary">Manage your account settings and notifications.@@ -962,7 +963,7 @@ export default function ExampleCardsPage() {{/* Settings Navigation */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSHStack gap={6}><XDSVStack gap={3} style={{flex: 1}}>@@ -1009,22 +1010,18 @@ export default function ExampleCardsPage() {{/* Payments Navigation */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><XDSHStack gap={2} vAlign="center"><XDSText type="supporting" color="secondary">Home</XDSText>- <XDSText type="supporting" color="secondary">- ›- </XDSText>+ <XDSIcon icon="chevronRight" size="xsm" color="secondary" /><XDSText type="supporting" color="secondary">...</XDSText>- <XDSText type="supporting" color="secondary">- ›- </XDSText>+ <XDSIcon icon="chevronRight" size="xsm" color="secondary" /><XDSText type="label">Payments</XDSText></XDSHStack><XDSDivider />@@ -1055,9 +1052,7 @@ export default function ExampleCardsPage() {{item.desc}</XDSText></XDSVStack>- <XDSText type="body" color="secondary">- ›- </XDSText>+ <XDSIcon icon="chevronRight" size="sm" color="secondary" /></div>))}</XDSVStack>@@ -1066,7 +1061,7 @@ export default function ExampleCardsPage() {{/* FAQ / Settings Tabs */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><XDSTabList value={settingsTab} onChange={setSettingsTab}>@@ -1105,12 +1100,12 @@ export default function ExampleCardsPage() {{/* Upcoming Payments */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Upcoming Payments- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Select a date to view scheduled payments.</XDSText>@@ -1145,7 +1140,7 @@ export default function ExampleCardsPage() {{/* QR Code / Mobile Connect */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><div {...stylex.props(styles.placeholder)}>@@ -1153,9 +1148,9 @@ export default function ExampleCardsPage() {QR Code</XDSText></div>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Scan to connect your mobile device- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Open the Ledger mobile app and scan this code to link yourdevice.@@ -1171,14 +1166,14 @@ export default function ExampleCardsPage() {{/* Q2 Dividend Income */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Q2 Dividend Income- </XDSText>- <XDSButton label="×" variant="ghost" size="sm" />+ </XDSHeading>+ <XDSButton label="" icon={<XDSIcon icon="close" size="sm" />} variant="ghost" size="sm" /></div><XDSText type="supporting" color="secondary">Quarterly dividend payouts across your portfolio holdings.@@ -1213,7 +1208,7 @@ export default function ExampleCardsPage() {{/* Savings Target Progress */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><XDSHeading level={2}>$24,000</XDSHeading>@@ -1246,12 +1241,12 @@ export default function ExampleCardsPage() {{/* Dollar-Cost Averaging */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Dollar-Cost Averaging- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">A strategy for building wealth over time.</XDSText>@@ -1268,7 +1263,7 @@ export default function ExampleCardsPage() {{/* Cover Art / Upload */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><XDSText type="supporting" color="secondary">@@ -1284,9 +1279,9 @@ export default function ExampleCardsPage() {borderRadius: 8,}}/>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Upload Artwork- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Minimum 3000 × 3000px — JPEG or PNG only</XDSText>@@ -1296,14 +1291,14 @@ export default function ExampleCardsPage() {{/* Front Door (Smart Home) */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><div {...stylex.props(styles.row)}><XDSVStack gap={0}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Front Door- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Smart Lock Pro</XDSText>@@ -1322,12 +1317,12 @@ export default function ExampleCardsPage() {{/* Stock Holdings */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><XDSTextInputlabel="Search holdings"- isLabelHidden+placeholder="Search holdings or tickers..."value=""onChange={() => {}}@@ -1399,13 +1394,13 @@ export default function ExampleCardsPage() {{/* Kitchen Island (Smart Home) */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}><div {...stylex.props(styles.row)}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Kitchen Island- </XDSText>+ </XDSHeading><XDSSwitch label="On" value={true} onChange={() => {}} /></div><XDSText type="supporting" color="secondary">@@ -1432,12 +1427,12 @@ export default function ExampleCardsPage() {{/* Living Room (Smart Home) */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Living Room- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Roller Shades</XDSText>@@ -1457,12 +1452,12 @@ export default function ExampleCardsPage() {{/* Social Links */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Social Links- </XDSText>+ </XDSHeading><XDSTextInputlabel="Spotify Artist URL"value={spotifyUrl}@@ -1493,12 +1488,12 @@ export default function ExampleCardsPage() {{/* Notifications */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={4}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Notifications- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">Choose what you want to be notified about.</XDSText>@@ -1551,15 +1546,15 @@ export default function ExampleCardsPage() {{/* Syncing Accounts */}<div- style={{breakInside: 'avoid', marginBottom: 24, overflow: 'hidden'}}>+ style={{breakInside: 'avoid', marginBottom: 24}}><XDSCard><XDSVStack gap={3}><XDSHStack gap={3} vAlign="center"><XDSSpinner size="sm" /><XDSVStack gap={1}>- <XDSText type="label" weight="bold">+ <XDSHeading level={3}>Syncing your accounts- </XDSText>+ </XDSHeading><XDSText type="supporting" color="secondary">We're pulling in your latest transactions. This usuallytakes a few seconds.@@ -1574,6 +1569,277 @@ export default function ExampleCardsPage() {</XDSVStack></XDSCard></div>++ {/* Badges & Tokens */}+ <div+ style={{breakInside: 'avoid', marginBottom: 24, gridColumn: '1 / -1'}}>+ <XDSCard>+ <XDSVStack gap={4}>+ <XDSHeading level={3}>Badges & Tokens</XDSHeading>+ <XDSDivider />+ <XDSVStack gap={3}>+ <XDSText type="supporting" color="secondary">Badge Variants</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSBadge label="Default" />+ <XDSBadge label="Info" variant="info" />+ <XDSBadge label="Success" variant="success" />+ <XDSBadge label="Warning" variant="warning" />+ <XDSBadge label="Error" variant="error" />+ </XDSHStack>+ <XDSDivider />+ <XDSText type="supporting" color="secondary">Tokens</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSToken label="Default" />+ <XDSToken label="Blue" color="blue" />+ <XDSToken label="Green" color="green" />+ <XDSToken label="Red" color="red" />+ <XDSToken label="Orange" color="orange" />+ <XDSToken label="Purple" color="purple" />+ <XDSToken label="Pink" color="pink" />+ <XDSToken label="Gray" color="gray" />+ </XDSHStack>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSToken label="Removable" onRemove={() => {}} />+ <XDSToken label="Clickable" onClick={() => {}} />+ <XDSToken label="Disabled" isDisabled />+ </XDSHStack>+ </XDSVStack>+ </XDSVStack>+ </XDSCard>+ </div>++ {/* Input Components */}+ <div+ style={{breakInside: 'avoid', marginBottom: 24, gridColumn: '1 / -1'}}>+ <XDSCard>+ <XDSVStack gap={4}>+ <XDSHeading level={3}>Input Components</XDSHeading>+ <XDSDivider />+ <XDSVStack gap={4}>+ <XDSHStack gap={4} wrap="wrap">+ <XDSTextInput label="Default" placeholder="Enter text..." value="" onChange={() => {}} />+ <XDSTextInput label="With value" value="Hello world" onChange={() => {}} />+ <XDSTextInput label="Disabled" value="Can't edit" isDisabled onChange={() => {}} />+ </XDSHStack>+ <XDSHStack gap={4} wrap="wrap">+ <XDSTextInput label="Error state" status={{type: "error", message: "This field is required"}} value="" onChange={() => {}} />+ <XDSTextInput label="Success state" status={{type: "success", message: "Looks good!"}} value="Valid input" onChange={() => {}} />+ <XDSTextInput label="With placeholder" placeholder="Enter email..." value="" onChange={() => {}} />+ </XDSHStack>+ <XDSDivider />+ <XDSText type="supporting" color="secondary">Selector</XDSText>+ <XDSHStack gap={4} wrap="wrap">+ <XDSSelector+ label="Choose option"+ options={['Option A', 'Option B', 'Option C']}+ value="Option A"+ onChange={() => {}}+ />+ <XDSSelector+ label="Disabled"+ options={['Locked']}+ value="Locked"+ isDisabled+ onChange={() => {}}+ />+ </XDSHStack>+ <XDSDivider />+ <XDSText type="supporting" color="secondary">Slider</XDSText>+ <XDSSlider label="Volume" value={65} onChange={() => {}} />+ <XDSDivider />+ <XDSText type="supporting" color="secondary">Toggle Controls</XDSText>+ <XDSHStack gap={6} vAlign="center" wrap="wrap">+ <XDSSwitch label="On" value={true} onChange={() => {}} />+ <XDSSwitch label="Off" value={false} onChange={() => {}} />+ <XDSSwitch label="Disabled on" value={true} isDisabled onChange={() => {}} />+ <XDSSwitch label="Disabled off" value={false} isDisabled onChange={() => {}} />+ </XDSHStack>+ <XDSDivider />+ <XDSText type="supporting" color="secondary">Checkbox</XDSText>+ <XDSHStack gap={6} wrap="wrap">+ <XDSCheckboxInput label="Checked" value={true} onChange={() => {}} />+ <XDSCheckboxInput label="Unchecked" value={false} onChange={() => {}} />+ <XDSCheckboxInput label="Checked disabled" value={true} isDisabled onChange={() => {}} />+ <XDSCheckboxInput label="Unchecked disabled" value={false} isDisabled onChange={() => {}} />+ </XDSHStack>+ <XDSDivider />+ <XDSText type="supporting" color="secondary">Radio</XDSText>+ <XDSRadioList label="Radio" value="a" onChange={() => {}}>+ <XDSRadioListItem value="a" label="Choice A" />+ <XDSRadioListItem value="b" label="Choice B" />+ <XDSRadioListItem value="c" label="Choice C (disabled)" isDisabled />+ </XDSRadioList>+ </XDSVStack>+ </XDSVStack>+ </XDSCard>+ </div>++ {/* Button Variants */}+ <div+ style={{breakInside: 'avoid', marginBottom: 24, gridColumn: '1 / -1'}}>+ <XDSCard>+ <XDSVStack gap={4}>+ <XDSHeading level={3}>Button Variants</XDSHeading>+ <XDSDivider />+ <XDSVStack gap={3}>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Primary</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant="primary" size="sm" />+ <XDSButton label="Medium" variant="primary" size="md" />+ <XDSButton label="Large" variant="primary" size="lg" />+ <XDSButton label="Disabled" variant="primary" isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Secondary</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant="secondary" size="sm" />+ <XDSButton label="Medium" variant="secondary" size="md" />+ <XDSButton label="Large" variant="secondary" size="lg" />+ <XDSButton label="Disabled" variant="secondary" isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Destructive</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant="destructive" size="sm" />+ <XDSButton label="Medium" variant="destructive" size="md" />+ <XDSButton label="Large" variant="destructive" size="lg" />+ <XDSButton label="Disabled" variant="destructive" isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Ghost</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant="ghost" size="sm" />+ <XDSButton label="Medium" variant="ghost" size="md" />+ <XDSButton label="Large" variant="ghost" size="lg" />+ <XDSButton label="Disabled" variant="ghost" isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSDivider />+ <XDSText type="supporting" color="secondary">Theme-specific variants (Meta)</XDSText>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Primary Muted</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant={'primary-muted' as never} size="sm" />+ <XDSButton label="Medium" variant={'primary-muted' as never} size="md" />+ <XDSButton label="Large" variant={'primary-muted' as never} size="lg" />+ <XDSButton label="Disabled" variant={'primary-muted' as never} isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Destructive Muted</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant={'destructive-muted' as never} size="sm" />+ <XDSButton label="Medium" variant={'destructive-muted' as never} size="md" />+ <XDSButton label="Large" variant={'destructive-muted' as never} size="lg" />+ <XDSButton label="Disabled" variant={'destructive-muted' as never} isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Primary Outline</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant={'primary-outline' as never} size="sm" />+ <XDSButton label="Medium" variant={'primary-outline' as never} size="md" />+ <XDSButton label="Large" variant={'primary-outline' as never} size="lg" />+ <XDSButton label="Disabled" variant={'primary-outline' as never} isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Secondary Outline</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant={'secondary-outline' as never} size="sm" />+ <XDSButton label="Medium" variant={'secondary-outline' as never} size="md" />+ <XDSButton label="Large" variant={'secondary-outline' as never} size="lg" />+ <XDSButton label="Disabled" variant={'secondary-outline' as never} isDisabled />+ </XDSHStack>+ </XDSVStack>+ <XDSVStack gap={1}>+ <XDSText type="supporting" color="secondary">Destructive Outline</XDSText>+ <XDSHStack gap={2} vAlign="center" wrap="wrap">+ <XDSButton label="Small" variant={'destructive-outline' as never} size="sm" />+ <XDSButton label="Medium" variant={'destructive-outline' as never} size="md" />+ <XDSButton label="Large" variant={'destructive-outline' as never} size="lg" />+ <XDSButton label="Disabled" variant={'destructive-outline' as never} isDisabled />+ </XDSHStack>+ </XDSVStack>+ </XDSVStack>+ </XDSVStack>+ </XDSCard>+ </div>++ {/* Typography Scale */}+ <div+ style={{breakInside: 'avoid', marginBottom: 24, gridColumn: '1 / -1'}}>+ <XDSCard>+ <XDSVStack gap={4}>+ <XDSHeading level={3}>Typography Scale</XDSHeading>+ <XDSDivider />+ <XDSVStack gap={3}>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Display 1</XDSText>+ <XDSText type="display-1" as="h1">The quick brown fox</XDSText>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Display 2</XDSText>+ <XDSText type="display-2" as="h1">The quick brown fox</XDSText>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Display 3</XDSText>+ <XDSText type="display-3" as="h1">The quick brown fox</XDSText>+ </XDSVStack>+ <XDSDivider />+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Heading 1</XDSText>+ <XDSHeading level={1}>The quick brown fox</XDSHeading>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Heading 2</XDSText>+ <XDSHeading level={2}>The quick brown fox</XDSHeading>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Heading 3</XDSText>+ <XDSHeading level={3}>The quick brown fox</XDSHeading>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Heading 4</XDSText>+ <XDSHeading level={4}>The quick brown fox</XDSHeading>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Heading 5</XDSText>+ <XDSHeading level={5}>The quick brown fox</XDSHeading>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Heading 6</XDSText>+ <XDSHeading level={6}>The quick brown fox</XDSHeading>+ </XDSVStack>+ <XDSDivider />+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Large</XDSText>+ <XDSText type="large">The quick brown fox jumps over the lazy dog</XDSText>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Body</XDSText>+ <XDSText type="body">The quick brown fox jumps over the lazy dog</XDSText>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Label</XDSText>+ <XDSText type="label">The quick brown fox jumps over the lazy dog</XDSText>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Supporting</XDSText>+ <XDSText type="supporting">The quick brown fox jumps over the lazy dog</XDSText>+ </XDSVStack>+ <XDSVStack gap={0}>+ <XDSText type="supporting" color="secondary">Code</XDSText>+ <XDSText type="code">const fox = 'quick brown';</XDSText>+ </XDSVStack>+ </XDSVStack>+ </XDSVStack>+ </XDSCard>+ </div></div></>);diff --git a/packages/themes/meta/src/metaTheme.ts b/packages/themes/meta/src/metaTheme.tsindex 5186308017..f9e75de18a 100644--- a/packages/themes/meta/src/metaTheme.ts+++ b/packages/themes/meta/src/metaTheme.ts@@ -17,7 +17,7 @@ export const metaTheme = defineTheme({// Typography — Figtree font family, default scaletypography: {- scale: {base: 14, ratio: 1.2},+ scale: {base: 15, ratio: 1.2},body: {family: 'Figtree',fallbacks:@@ -34,6 +34,10 @@ export const metaTheme = defineTheme({motion: {fast: 175, medium: 410, ratio: 0.75},tokens: {+ // Type workaround: these tokens exist in core but aren't in XDSTokenName yet+ // @ts-expect-error — not in XDSTokenName+ '--color-focus-outline': ['#5D6C7B', '#8C939B'],+ '--elevation-input-hover': 'none',// =========================================================================// Core Accent — Meta Blue (CDS: PRIMARY_BUTTON_BACKGROUND = BLUE_500)// =========================================================================@@ -104,15 +108,20 @@ export const metaTheme = defineTheme({// Borders// ========================================================================='--color-border': ['#DDE2E8', '#F2F4F619'],- '--color-border-emphasized': ['#DDE2E8', '#494D53'],+ '--color-border-emphasized': ['#CCD3DB', '#494D53'],// =========================================================================// Effects// ========================================================================='--color-skeleton': ['#E7EAED', '#28292C'],'--color-shadow': ['rgba(17, 17, 18, 0.12)', 'rgba(17, 17, 18, 0.12)'],+ '--shadow-inset-hover': 'none','--color-tint-hover': ['black', 'white'],+ // =========================================================================+ // Divider / Focus / Elevation — CDS overrides+ // =========================================================================+// =========================================================================// Named palette — CDS XMDS 3.0 color ramps// =========================================================================@@ -179,7 +188,62 @@ export const metaTheme = defineTheme({// =========================================================================// Text size overrides// =========================================================================- '--font-size-2xl': '1.75rem', // 28px — heading 1+ // =========================================================================+ // Element Sizes — aligned to XMDS (32/36/44 vs default 28/32/36)+ // =========================================================================+ '--size-element-sm': '32px',+ '--size-element-md': '36px',+ '--size-element-lg': '44px',++ // =========================================================================+ // Typography Scale — aligned to CDS/XMDS+ // CDS base = 15px, Display = 48px/600, H1/H2 = 24px, H3 = 17px+ // Body = 15px, Label = 15px, Supporting = 13px+ // =========================================================================++ // Font size scale (15px base × 1.2 ratio)+ '--font-size-xs': '0.6875rem', // 11px — CDS Tertiary Label+ '--font-size-sm': '0.8125rem', // 13px — CDS Secondary Label+ '--font-size-base': '0.9375rem', // 15px — CDS Body+ '--font-size-lg': '1.0625rem', // 17px — CDS Headline 3+ '--font-size-xl': '1.25rem', // 20px+ '--font-size-2xl': '1.5rem', // 24px — CDS Headline 1/2+ '--font-size-3xl': '1.8125rem', // 29px+ '--font-size-4xl': '2.1875rem', // 35px+ '--font-size-5xl': '3rem', // 48px — CDS Display++ // Display — CDS: 48px / semibold+ '--text-display-1-size': '3rem',+ '--text-display-1-weight': 'var(--font-weight-semibold)',+ '--text-display-1-leading': '1.1667',+ '--text-display-2-size': '2.1875rem',+ '--text-display-2-weight': 'var(--font-weight-semibold)',+ '--text-display-2-leading': '1.2571',+ '--text-display-3-size': '1.8125rem',+ '--text-display-3-weight': 'var(--font-weight-semibold)',+ '--text-display-3-leading': '1.2414',++ // Headings — CDS: H1/H2 = 24px, H3 = 17px+ '--text-heading-1-size': '1.5rem',+ '--text-heading-1-leading': '1.3333',+ '--text-heading-2-size': '1.5rem',+ '--text-heading-2-leading': '1.3333',++ // Body — CDS: 15px / 400+ '--text-body-size': '0.9375rem',+ '--text-body-leading': '1.4667',++ // Large text — CDS: 17px (Headline 3 size)+ '--text-large-size': '1.0625rem',+ '--text-large-leading': '1.4118',++ // Label — CDS: 15px / 500+ '--text-label-size': '0.9375rem',+ '--text-label-leading': '1.4667',++ // Supporting — CDS: 13px / 400+ '--text-supporting-size': '0.8125rem',+ '--text-supporting-leading': '1.5385'},components: {@@ -189,6 +253,16 @@ export const metaTheme = defineTheme({button: {base: {borderRadius: '9999px !important',+ gap: '4px',+ },+ 'size:sm': {+ paddingInline: '12px',+ },+ 'size:md': {+ paddingInline: '16px',+ },+ 'size:lg': {+ paddingInline: '20px',},'variant:primary': {fontWeight: '500'},'variant:secondary': {fontWeight: '500'},@@ -198,11 +272,15 @@ export const metaTheme = defineTheme({backgroundColor: 'light-dark(#ECF5FF, #182849)',color: 'light-dark(#0457CB, #78BEFF)',fontWeight: '500',+ ':hover': {opacity: '0.85'},+ ':active': {opacity: '0.7'},},'variant:destructive-muted': {backgroundColor: 'light-dark(#FFF0F2, #471B1A)',color: 'light-dark(var(--color-error), #FE9DA6)',fontWeight: '500',+ ':hover': {opacity: '0.85'},+ ':active': {opacity: '0.7'},},'variant:primary-outline': {backgroundColor: 'transparent',@@ -211,6 +289,8 @@ export const metaTheme = defineTheme({borderColor: 'light-dark(var(--color-accent), #4BA9FE)',color: 'light-dark(var(--color-accent), #4BA9FE)',fontWeight: '500',+ ':hover': {backgroundColor: 'light-dark(rgba(0,100,224,0.06), rgba(75,169,254,0.1))'},+ ':active': {opacity: '0.7'},},'variant:secondary-outline': {backgroundColor: 'transparent',@@ -219,6 +299,8 @@ export const metaTheme = defineTheme({borderColor: 'light-dark(var(--color-border), #525456)',color: 'light-dark(var(--color-text-primary), #F3F4F5)',fontWeight: '500',+ ':hover': {backgroundColor: 'light-dark(rgba(0,0,0,0.04), rgba(255,255,255,0.06))'},+ ':active': {opacity: '0.7'},},'variant:destructive-outline': {backgroundColor: 'transparent',@@ -227,6 +309,8 @@ export const metaTheme = defineTheme({borderColor: 'light-dark(var(--color-error), #FB7D87)',color: 'light-dark(var(--color-error), #FB7D87)',fontWeight: '500',+ ':hover': {backgroundColor: 'light-dark(rgba(211,17,48,0.06), rgba(251,125,135,0.1))'},+ ':active': {opacity: '0.7'},},},@@ -235,39 +319,67 @@ export const metaTheme = defineTheme({// =========================================================================card: {base: {- '--xds-card-padding': '20px','--card-radius': '32px',+ '--xds-card-padding': '20px',},},// =========================================================================// Section — 20px padding// =========================================================================- section: {+++ // =========================================================================+ // Text input — CDS: 16px radius, 16px horizontal padding+ // =========================================================================+ 'text-input': {base: {- '--xds-section-padding': '20px',+ borderRadius: '8px !important',+ paddingInline: '12px !important',+ paddingBlock: '12px !important',+ minHeight: '44px',+ borderColor: 'light-dark(#CCD3DB, #494D53)',+ },+ 'variant:search': {+ backgroundColor: 'light-dark(#F3F4F5, #28292C)',+ borderColor: 'transparent',+ borderRadius: '9999px !important',},},// =========================================================================- // Field status — plain text (no background pill)+ // Field status — CDS: plain text below input, 12px gap, no pill bg// ========================================================================='field-status': {base: {- backgroundColor: 'transparent',- paddingBlock: '0',- paddingInline: '0',+ backgroundColor: 'transparent !important',+ marginTop: '4px !important',+ paddingBlockStart: '0 !important',+ paddingBlockEnd: '0 !important',+ paddingInline: '0 !important',+ borderRadius: '0 !important',},},// =========================================================================- // Text input — search variant pill+ // Selector — CDS: 16px radius to match text input// =========================================================================- 'text-input': {- 'variant:search': {- backgroundColor: 'light-dark(#F3F4F5, #28292C)',- borderColor: 'transparent',- borderRadius: '9999px',+ selector: {+ base: {+ borderRadius: '8px !important',+ paddingInline: '12px !important',+ paddingBlock: '12px !important',+ minHeight: '44px',+ },+ },++ // =========================================================================+ // Slider — CDS: 2px track, 24px active handle+ // =========================================================================+ 'slider-track': {+ base: {+ backgroundColor: '#8F9296',+ height: '2px',},},@@ -276,7 +388,7 @@ export const metaTheme = defineTheme({// =========================================================================banner: {base: {- '--banner-radius': '32px',+ '--banner-radius': '16px',},'status:info': {backgroundColor: 'var(--color-background-card)'},'status:warning': {backgroundColor: 'var(--color-background-card)'},@@ -291,7 +403,12 @@ export const metaTheme = defineTheme({// Badge — subtle pastel backgrounds// =========================================================================badge: {- base: {fontWeight: '500'},+ base: {+ fontWeight: '500',+ borderRadius: '20px',+ paddingInline: '8px',+ paddingBlock: '6px',+ },'variant:info': {backgroundColor: 'light-dark(#DBECFF, #14367E)',color: 'var(--color-text-primary)',@@ -315,11 +432,8 @@ export const metaTheme = defineTheme({// =========================================================================radio: {base: {- borderColor: '#8F9296',- borderWidth: '2px',- },- ':hover': {- borderColor: 'color-mix(in srgb, #8F9296, black 20%)',+ borderWidth: '1.5px',+ '--color-border-emphasized': '#8F9296',},},'radio-dot': {@@ -335,37 +449,45 @@ export const metaTheme = defineTheme({// =========================================================================checkbox: {base: {- borderColor: '#8F9296',borderWidth: '2px',- borderRadius: '4px',- },- ':hover': {- borderColor: 'color-mix(in srgb, #8F9296, black 20%)',+ borderRadius: '7px',+ '--color-border-emphasized': '#8F9296',},},// =========================================================================// Switch — gray track, pseudo-class hover (#811)// =========================================================================+switch: {- base: {backgroundColor: '#8F9296'},- ':hover': {- backgroundColor: 'color-mix(in srgb, #8F9296, black 5%)',+ base: {+ '--color-background-gray': '#8F9296',},},'switch-thumb': {base: {boxShadow: '0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15)',- width: '22px',- height: '22px',},},++// =========================================================================- // Slider — custom track via sub-element target (#763)+ // Divider — opaque gray instead of transparent blue-gray// =========================================================================- 'slider-track': {- base: {backgroundColor: '#8F9296'},+ divider: {+ base: {+ backgroundColor: 'light-dark(#DDE2E8, #3E4042)',+ },+ },++ // =========================================================================+ // Tabs — CDS: 1px underline, primary text when active, 12px padding+ // =========================================================================+ tab: {+ base: {+ paddingInline: '12px',+ },},// =========================================================================