Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix (sandbox) Block example styling updates (#2061)

Kenton Quatman662ee226a25e
diff --git a/packages/cli/templates/blocks/components/GridSpan/GridSpanShowcase.tsx b/packages/cli/templates/blocks/components/GridSpan/GridSpanShowcase.tsx
index 7abcd6f2e7..c98f74113b 100644
--- a/packages/cli/templates/blocks/components/GridSpan/GridSpanShowcase.tsx
+++ b/packages/cli/templates/blocks/components/GridSpan/GridSpanShowcase.tsx
@@ -6,38 +6,45 @@ import {XDSText} from '@xds/core/Text';
export default function GridSpanShowcase() {
return (
- <XDSGrid columns={3} gap={3}>
- <XDSGridSpan columns={2}>
- <XDSCard variant="muted" padding={4} height={80}>
+ <XDSGrid columns={4} gap={3} width={400}>
+ <XDSGridSpan columns={3}>
+ <XDSCard height={80}>
<XDSText type="body" color="secondary">
- Spans 2 columns
+ Spans 3 columns
</XDSText>
</XDSCard>
</XDSGridSpan>
- <XDSCard variant="muted" padding={4} height={80}>
+ <XDSCard height={80}>
<XDSText type="body" color="secondary">
1 col
</XDSText>
</XDSCard>
- <XDSCard variant="muted" padding={4} height={60}>
+ <XDSGridSpan rows={2}>
+ <XDSCard>
+ <XDSText type="body" color="secondary">
+ 1 col
+ </XDSText>
+ </XDSCard>
+ </XDSGridSpan>
+ <XDSGridSpan columns={3}>
+ <XDSCard height={80}>
+ <XDSText type="body" color="secondary">
+ Full-width row
+ </XDSText>
+ </XDSCard>
+ </XDSGridSpan>
+ <XDSCard height={80}>
<XDSText type="body" color="secondary">
1 col
</XDSText>
</XDSCard>
<XDSGridSpan columns={2}>
- <XDSCard variant="muted" padding={4} height={60}>
+ <XDSCard height={80}>
<XDSText type="body" color="secondary">
Spans 2 columns
</XDSText>
</XDSCard>
</XDSGridSpan>
- <XDSGridSpan columns="full">
- <XDSCard variant="muted" padding={4} height={60}>
- <XDSText type="body" color="secondary">
- Full-width row
- </XDSText>
- </XDSCard>
- </XDSGridSpan>
</XDSGrid>
);
}
diff --git a/packages/cli/templates/blocks/components/HStack/HStackShowcase.tsx b/packages/cli/templates/blocks/components/HStack/HStackShowcase.tsx
index bc4983cdc2..0ccfd3c0ca 100644
--- a/packages/cli/templates/blocks/components/HStack/HStackShowcase.tsx
+++ b/packages/cli/templates/blocks/components/HStack/HStackShowcase.tsx
@@ -6,9 +6,11 @@ import {XDSText} from '@xds/core/Text';
export default function HStackShowcase() {
return (
- <XDSVStack gap={6}>
+ <XDSVStack gap={6} width="100%" style={{maxWidth: 400}}>
<XDSVStack gap={2}>
- <XDSText type="supporting" color="secondary">gap=2, start-aligned</XDSText>
+ <XDSText type="supporting" color="secondary">
+ HAlign: start
+ </XDSText>
<XDSHStack gap={2}>
<XDSBadge label="React" />
<XDSBadge label="TypeScript" />
@@ -16,7 +18,9 @@ export default function HStackShowcase() {
</XDSHStack>
</XDSVStack>
<XDSVStack gap={2}>
- <XDSText type="supporting" color="secondary">gap=4, center-aligned</XDSText>
+ <XDSText type="supporting" color="secondary">
+ HAlign: center
+ </XDSText>
<XDSHStack gap={4} hAlign="center">
<XDSBadge label="Design" />
<XDSBadge label="Engineering" />
@@ -24,7 +28,9 @@ export default function HStackShowcase() {
</XDSHStack>
</XDSVStack>
<XDSVStack gap={2}>
- <XDSText type="supporting" color="secondary">gap=2, space-between</XDSText>
+ <XDSText type="supporting" color="secondary">
+ HAlign: between
+ </XDSText>
<XDSHStack gap={2} hAlign="between">
<XDSBadge label="Start" />
<XDSBadge label="Middle" />
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.tsx b/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.tsx
index 14cb82fbaa..ad4bba0f07 100644
--- a/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.tsx
+++ b/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.tsx
@@ -1,52 +1,22 @@
'use client';
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
import {XDSHeading, XDSText} from '@xds/core/Text';
-const cards = [
- {
- title: 'Very Long Card Title That Gets Truncated',
- updated: '1 hour ago',
- },
- {
- title: 'Another Card',
- updated: '2 hours ago',
- },
- {
- title: 'Third Card With An Even Longer Title That Will Be Truncated',
- updated: '3 hours ago',
- },
-];
-
export default function HeadingCardGrid() {
return (
- <div
- style={{
- display: 'grid',
- gridTemplateColumns: 'repeat(auto-fill, minmax(250px, 1fr))',
- gap: 16,
- maxWidth: 800,
- }}>
- {cards.map(card => (
- <div
- key={card.title}
- style={{
- padding: 16,
- borderRadius: 8,
- border: '1px solid #e0e0e0',
- boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
- }}>
- <XDSHeading level={3} maxLines={1}>
- {card.title}
- </XDSHeading>
- <XDSText type="body" maxLines={2} display="block">
- This is a card description that might be quite long and needs to be
- truncated after two lines to keep the card compact and uniform.
- </XDSText>
- <XDSText type="supporting" display="block">
- Updated {card.updated}
- </XDSText>
- </div>
- ))}
- </div>
+ <XDSCard width={300}>
+ <XDSVStack gap={2}>
+ <XDSHeading level={3}>Card Title</XDSHeading>
+ <XDSText type="body" maxLines={2} display="block">
+ This is a card description that might be quite long and needs to be
+ truncated after two lines to keep the card compact and uniform.
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ Updated 1 hour ago
+ </XDSText>
+ </XDSVStack>
+ </XDSCard>
);
}
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.doc.mjs b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.doc.mjs
index 60323b6445..33e3a49732 100644
--- a/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.doc.mjs
@@ -6,6 +6,6 @@ export const doc = {
description:
'Real-world page layout demonstrating heading levels h1 through h3 with supporting text',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['Heading', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.tsx b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.tsx
index 9eff77e5e2..efa541dbcb 100644
--- a/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.tsx
+++ b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.tsx
@@ -1,23 +1,26 @@
'use client';
+import {XDSVStack} from '@xds/core/Layout';
import {XDSHeading, XDSText} from '@xds/core/Text';
export default function HeadingPageLayout() {
return (
- <div style={{maxWidth: 800}}>
- <XDSHeading level={1}>Dashboard Overview</XDSHeading>
- <XDSText type="supporting" display="block">
- Last updated 5 minutes ago
- </XDSText>
+ <XDSVStack gap={6} width="100%" style={{maxWidth: 400}}>
+ <XDSVStack>
+ <XDSHeading level={1}>Dashboard Overview</XDSHeading>
+ <XDSText type="supporting" display="block">
+ Last updated 5 minutes ago
+ </XDSText>
+ </XDSVStack>
- <div style={{marginTop: 32}}>
+ <XDSVStack>
<XDSHeading level={2}>Recent Activity</XDSHeading>
<XDSText type="body" display="block">
Here's what's been happening in your workspace.
</XDSText>
- </div>
+ </XDSVStack>
- <div style={{marginTop: 24}}>
+ <XDSVStack>
<XDSHeading level={3}>Today</XDSHeading>
<XDSText type="body" display="block">
• Project Alpha updated
@@ -25,7 +28,7 @@ export default function HeadingPageLayout() {
• 3 new comments
<br />• Task completed
</XDSText>
- </div>
- </div>
+ </XDSVStack>
+ </XDSVStack>
);
}
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingShowcase.tsx b/packages/cli/templates/blocks/components/Heading/HeadingShowcase.tsx
index 28a4519afa..74e0f9469f 100644
--- a/packages/cli/templates/blocks/components/Heading/HeadingShowcase.tsx
+++ b/packages/cli/templates/blocks/components/Heading/HeadingShowcase.tsx
@@ -1,7 +1,17 @@
'use client';
+import {XDSVStack} from '@xds/core/Layout';
import {XDSHeading} from '@xds/core/Text';
export default function HeadingShowcase() {
- return <XDSHeading level={1}>Dashboard Overview</XDSHeading>;
+ return (
+ <XDSVStack gap={2} hAlign="start">
+ <XDSHeading level={1}>Heading Level 1</XDSHeading>
+ <XDSHeading level={2}>Heading Level 2</XDSHeading>
+ <XDSHeading level={3}>Heading Level 3</XDSHeading>
+ <XDSHeading level={4}>Heading Level 4</XDSHeading>
+ <XDSHeading level={5}>Heading Level 5</XDSHeading>
+ <XDSHeading level={6}>Heading Level 6</XDSHeading>
+ </XDSVStack>
+ );
}
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingTruncation.doc.mjs b/packages/cli/templates/blocks/components/Heading/HeadingTruncation.doc.mjs
index eb688e9340..489a4d8968 100644
--- a/packages/cli/templates/blocks/components/Heading/HeadingTruncation.doc.mjs
+++ b/packages/cli/templates/blocks/components/Heading/HeadingTruncation.doc.mjs
@@ -6,6 +6,6 @@ export const doc = {
description:
'Single-line and multi-line heading truncation with ellipsis for constrained layouts',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['Heading'],
};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx
index 01378e8ef2..10a3703dc3 100644
--- a/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx
+++ b/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx
@@ -14,7 +14,7 @@ import {XDSHeading, XDSText} from '@xds/core/Text';
export default function LayoutBasicCardLayout() {
return (
- <XDSCard height={300}>
+ <XDSCard height={300} width="100%" style={{maxWidth: 400}}>
<XDSLayout
header={
<XDSLayoutHeader hasDivider>
@@ -31,8 +31,8 @@ export default function LayoutBasicCardLayout() {
</XDSText>
<XDSText type="body">
When content exceeds the available height, the content area
- scrolls independently while the header and footer stay fixed
- in place.
+ scrolls independently while the header and footer stay fixed in
+ place.
</XDSText>
<XDSText type="body">
This pattern works well for modal dialogs, detail panels, and
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.tsx
index b827929ed4..5f3864cba5 100644
--- a/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.tsx
+++ b/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.tsx
@@ -6,15 +6,15 @@ import {XDSHeading, XDSText} from '@xds/core/Text';
export default function LayoutContentOnlyLayout() {
return (
- <XDSCard>
+ <XDSCard width="100%" style={{maxWidth: 400}}>
<XDSLayout
content={
<XDSLayoutContent>
<XDSVStack gap={3}>
<XDSHeading level={4}>Simple Content</XDSHeading>
<XDSText type="body">
- A layout can have just content without header or footer. This
- is useful for simple cards or content blocks that don&apos;t need
+ A layout can have just content without header or footer. This is
+ useful for simple cards or content blocks that don&apos;t need
structured sections.
</XDSText>
</XDSVStack>
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.tsx
index 26c19d407a..14e947614d 100644
--- a/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.tsx
+++ b/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.tsx
@@ -13,7 +13,7 @@ import {XDSList, XDSListItem} from '@xds/core/List';
export default function LayoutDualPanelLayout() {
return (
- <XDSCard>
+ <XDSCard width="100%" style={{maxWidth: 500}}>
<XDSLayout
header={
<XDSLayoutHeader hasDivider>
@@ -21,7 +21,7 @@ export default function LayoutDualPanelLayout() {
</XDSLayoutHeader>
}
start={
- <XDSLayoutPanel hasDivider>
+ <XDSLayoutPanel width={120} hasDivider>
<XDSVStack gap={1}>
<XDSText type="label" color="secondary">
Folders
@@ -49,7 +49,7 @@ export default function LayoutDualPanelLayout() {
</XDSLayoutContent>
}
end={
- <XDSLayoutPanel hasDivider>
+ <XDSLayoutPanel width={120} hasDivider>
<XDSVStack gap={2}>
<XDSText type="label" color="secondary">
Details
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.tsx b/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.tsx
index 13e5cb6e24..e7bd9bf93a 100644
--- a/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.tsx
+++ b/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.tsx
@@ -14,7 +14,7 @@ import {XDSHeading, XDSText} from '@xds/core/Text';
export default function LayoutFullBleedContent() {
return (
- <XDSCard>
+ <XDSCard width="100%" style={{maxWidth: 400}}>
<XDSLayout
header={
<XDSLayoutHeader hasDivider>
@@ -25,8 +25,8 @@ export default function LayoutFullBleedContent() {
<XDSLayoutContent padding={0}>
<XDSSection variant="wash">
<XDSText type="body">
- XDSSection automatically escapes the parent container padding
- to fill edge-to-edge. Useful for wash backgrounds, tables, or
+ XDSSection automatically escapes the parent container padding to
+ fill edge-to-edge. Useful for wash backgrounds, tables, or
images that need to span the full width.
</XDSText>
</XDSSection>
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.tsx
index a590bac971..77fb45e84a 100644
--- a/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.tsx
+++ b/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.tsx
@@ -16,7 +16,7 @@ import {XDSList, XDSListItem} from '@xds/core/List';
export default function LayoutSidebarLayout() {
return (
- <XDSCard>
+ <XDSCard width="100%" style={{maxWidth: 500}}>
<XDSLayout
header={
<XDSLayoutHeader hasDivider>
@@ -24,7 +24,7 @@ export default function LayoutSidebarLayout() {
</XDSLayoutHeader>
}
start={
- <XDSLayoutPanel hasDivider role="navigation" width={140}>
+ <XDSLayoutPanel hasDivider role="navigation" width={150}>
<XDSList>
<XDSListItem label="General" isSelected />
<XDSListItem label="Account" />
diff --git a/packages/cli/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx b/packages/cli/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx
index da80254863..67c6cfaedb 100644
--- a/packages/cli/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx
+++ b/packages/cli/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx
@@ -14,8 +14,9 @@ import {XDSText, XDSHeading} from '@xds/core/Text';
export default function LayoutContentShowcase() {
return (
- <XDSCenter width={600}>
+ <XDSCenter width={500}>
<XDSLayout
+ style={{width: '100%'}}
height="fill"
header={
<XDSLayoutHeader hasDivider>
diff --git a/packages/cli/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx b/packages/cli/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx
index 55f3f47c46..132a750879 100644
--- a/packages/cli/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx
+++ b/packages/cli/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx
@@ -14,8 +14,9 @@ import {XDSButton} from '@xds/core/Button';
export default function LayoutFooterShowcase() {
return (
- <XDSCenter width={600}>
+ <XDSCenter width={400}>
<XDSLayout
+ style={{width: '100%'}}
height="fill"
header={
<XDSLayoutHeader hasDivider>
diff --git a/packages/cli/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx b/packages/cli/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx
index 4bc5d2cd29..178841ac09 100644
--- a/packages/cli/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx
+++ b/packages/cli/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx
@@ -15,8 +15,9 @@ import {XDSButton} from '@xds/core/Button';
export default function LayoutHeaderShowcase() {
return (
- <XDSCenter width={600}>
+ <XDSCenter width={400}>
<XDSLayout
+ style={{width: '100%'}}
height="fill"
header={
<XDSLayoutHeader hasDivider>
diff --git a/packages/cli/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx b/packages/cli/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx
index f89110d6ee..28e107b3f2 100644
--- a/packages/cli/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx
+++ b/packages/cli/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx
@@ -13,8 +13,9 @@ import {XDSList, XDSListItem} from '@xds/core/List';
export default function LayoutPanelShowcase() {
return (
- <XDSCenter width={600}>
+ <XDSCenter width={400}>
<XDSLayout
+ style={{width: '100%'}}
height="fill"
header={
<XDSLayoutHeader hasDivider>
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.tsx
index 0074033ad8..c2162919f7 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.tsx
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.tsx
@@ -1,5 +1,6 @@
'use client';
+import {XDSCenter} from '@xds/core/Center';
import {XDSMarkdown} from '@xds/core/Markdown';
const sources = {
@@ -33,11 +34,6 @@ const content = [
'Tokyo is the capital of Japan with a population of over 14 million[abc1].',
"It's the most populous metropolitan area in the world[def2][ghi3].",
'',
- '### Economy',
- '',
- "Tokyo's GDP exceeds $1.9 trillion, making it the largest city economy globally[jkl4].",
- 'The metropolitan area is expected to remain the most populous urban agglomeration through 2035[mno5].',
- '',
'### Key Facts',
'',
'- Population: 13.96 million (city proper)[abc1]',
@@ -47,8 +43,10 @@ const content = [
export default function MarkdownCitedContent() {
return (
- <XDSMarkdown sources={sources} density="compact" headingLevelStart={3}>
- {content}
- </XDSMarkdown>
+ <XDSCenter width="100%" style={{maxWidth: 450}}>
+ <XDSMarkdown sources={sources} density="compact" headingLevelStart={3}>
+ {content}
+ </XDSMarkdown>
+ </XDSCenter>
);
}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.tsx
index b2a37a0197..dbd8d605b6 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.tsx
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.tsx
@@ -1,45 +1,32 @@
'use client';
+import {XDSCenter} from '@xds/core/Center';
import {XDSMarkdown} from '@xds/core/Markdown';
const content = [
- '## Setting Up a Design System',
+ '## Design Tokens',
'',
- "A design system is more than a component library — it's a **shared language** between design and engineering.",
- '',
- '### 1. Start with Tokens',
- '',
- 'Design tokens are the atomic values that define your visual language:',
+ 'Tokens are the **shared language** between design and code.',
'',
'```typescript',
'const tokens = {',
- ' color: {',
- " primary: '#0066FF',",
- " secondary: '#6B7280',",
- ' },',
- ' spacing: {',
- " sm: '8px',",
- " md: '16px',",
- " lg: '24px',",
- ' },',
+ " primary: '#0066FF',",
+ " spacing: '8px',",
'};',
'```',
'',
- '### 2. Component Architecture',
- '',
- 'Good components follow these principles:',
- '',
- '- **Composable** — small pieces that combine into complex UIs',
- '- **Accessible** — keyboard navigation and screen reader support built-in',
- '- **Themeable** — visual customization without forking',
+ '- **Composable** — small pieces',
+ '- **Accessible** — built-in a11y',
'',
- '> The best design systems are *opinionated enough* to ensure consistency, but *flexible enough* to handle edge cases gracefully.',
+ '> Opinionated enough for consistency, *flexible* enough for edge cases.',
].join('\n');
export default function MarkdownCompactAIResponse() {
return (
- <XDSMarkdown density="compact" headingLevelStart={3}>
- {content}
- </XDSMarkdown>
+ <XDSCenter style={{maxWidth: 450}}>
+ <XDSMarkdown density="compact" headingLevelStart={3}>
+ {content}
+ </XDSMarkdown>
+ </XDSCenter>
);
}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.tsx
index e1d144f295..cdfeba2e83 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.tsx
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.tsx
@@ -1,5 +1,6 @@
'use client';
+import {XDSCenter} from '@xds/core/Center';
import {XDSMarkdown} from '@xds/core/Markdown';
const content = [
@@ -14,5 +15,9 @@ const content = [
].join('\n');
export default function MarkdownDataTable() {
- return <XDSMarkdown>{content}</XDSMarkdown>;
+ return (
+ <XDSCenter width="100%" style={{maxWidth: 450}}>
+ <XDSMarkdown>{content}</XDSMarkdown>
+ </XDSCenter>
+ );
}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.tsx
index 7a996c3752..35a70e7468 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.tsx
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.tsx
@@ -1,55 +1,30 @@
'use client';
+import {XDSCenter} from '@xds/core/Center';
import {XDSMarkdown} from '@xds/core/Markdown';
const content = [
- '# XDSMarkdown Demo',
+ '# Markdown Demo',
'',
- 'Renders **markdown** with *design-system-consistent* styling.',
+ 'Renders **markdown** with *XDS* styling.',
'',
'## Features',
'',
- '- Headings mapped to XDS type scale',
- '- **Bold**, *italic*, and ~~strikethrough~~ text',
- '- [Links](https://example.com) with external detection',
- '- Inline `code` and fenced code blocks',
- '',
- '### Code Block',
+ '- **Bold**, *italic*, `code`',
+ '- [Links](https://example.com)',
'',
'```typescript',
- 'interface User {',
- ' id: string;',
- ' name: string;',
- '}',
- '',
- 'function greet(user: User) {',
- ' return `Hello, ${user.name}!`;',
- '}',
+ 'interface User {name: string;}',
'```',
'',
- '### Blockquote',
- '',
- '> Design systems free teams to focus on problems that matter.',
- '',
- '### Table',
- '',
- '| Component | Status | Tests |',
- '|:----------|:------:|------:|',
- '| XDSMarkdown | Active | 73 |',
- '| XDSCodeBlock | Active | 44 |',
- '',
- '### Task List',
- '',
'- [x] Parser',
- '- [x] Renderer',
- '- [ ] Storybook stories',
- '',
- '---',
- '',
- '1. First ordered item',
- '2. Second ordered item',
+ '- [ ] Stories',
].join('\n');
export default function MarkdownRichContent() {
- return <XDSMarkdown>{content}</XDSMarkdown>;
+ return (
+ <XDSCenter width="100%" style={{maxWidth: 450}}>
+ <XDSMarkdown>{content}</XDSMarkdown>
+ </XDSCenter>
+ );
}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownShowcase.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownShowcase.tsx
index 21a1205003..3b5d2db61f 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownShowcase.tsx
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownShowcase.tsx
@@ -1,6 +1,7 @@
'use client';
import {XDSMarkdown} from '@xds/core/Markdown';
+import {XDSCenter} from '@xds/core/Center';
const content = [
'# Markdown Demo',
@@ -12,11 +13,14 @@ const content = [
'- Headings mapped to the XDS type scale',
'- **Bold**, *italic*, and ~~strikethrough~~ text',
'- [Links](https://example.com) with external detection',
- '- Inline `code` and fenced code blocks',
'',
- '> Design systems free teams to focus on problems that matter.',
+ '> Block quote indented text',
].join('\n');
export default function MarkdownShowcase() {
- return <XDSMarkdown>{content}</XDSMarkdown>;
+ return (
+ <XDSCenter width={400}>
+ <XDSMarkdown>{content}</XDSMarkdown>
+ </XDSCenter>
+ );
}
diff --git a/packages/cli/templates/blocks/components/MobileNavToggle/MobileNavToggleShowcase.tsx b/packages/cli/templates/blocks/components/MobileNavToggle/MobileNavToggleShowcase.tsx
index 4d1a80f194..e9f5c9b689 100644
--- a/packages/cli/templates/blocks/components/MobileNavToggle/MobileNavToggleShowcase.tsx
+++ b/packages/cli/templates/blocks/components/MobileNavToggle/MobileNavToggleShowcase.tsx
@@ -1,30 +1,40 @@
'use client';
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSMobileNavToggle} from '@xds/core/MobileNav';
+import {useState} from 'react';
+import {XDSMobileNav, XDSMobileNavToggle} from '@xds/core/MobileNav';
+import {XDSAppShellMobileContext} from '@xds/core/AppShell';
import {XDSSideNavItem, XDSSideNavSection} from '@xds/core/SideNav';
-import {XDSCenter} from '@xds/core/Center';
-import {XDSVStack} from '@xds/core/Layout';
+import {XDSHStack} from '@xds/core/Layout';
import {XDSText} from '@xds/core/Text';
export default function MobileNavToggleShowcase() {
+ const [isOpen, setIsOpen] = useState(false);
return (
- <XDSAppShell
- mobileNav={{hasToggle: false, breakpoint: 'lg'}}
- sideNav={
+ <XDSAppShellMobileContext.Provider
+ value={{
+ isMobile: true,
+ isMobileNavOpen: isOpen,
+ toggleMobileNav: () => setIsOpen(v => !v),
+ openMobileNav: () => setIsOpen(true),
+ closeMobileNav: () => setIsOpen(false),
+ isMobileNavEnabled: true,
+ hasAutoToggle: false,
+ }}>
+ <XDSHStack gap={3} vAlign="center">
+ <XDSMobileNavToggle />
+ <XDSText type="body" weight="bold">
+ Page title
+ </XDSText>
+ </XDSHStack>
+ <XDSMobileNav
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ header="Navigation">
<XDSSideNavSection title="Pages">
<XDSSideNavItem label="Home" isSelected href="#" />
<XDSSideNavItem label="Settings" href="#" />
</XDSSideNavSection>
- }>
- <XDSCenter>
- <XDSVStack gap={3} hAlign="center">
- <XDSMobileNavToggle />
- <XDSText type="supporting" color="secondary">
- Resize below the large breakpoint to see the toggle
- </XDSText>
- </XDSVStack>
- </XDSCenter>
- </XDSAppShell>
+ </XDSMobileNav>
+ </XDSAppShellMobileContext.Provider>
);
}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.tsx
index 9694c8d801..213e9d5885 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.tsx
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.tsx
@@ -2,7 +2,6 @@
import {useState} from 'react';
import {XDSMultiSelector} from '@xds/core/MultiSelector';
-import {XDSCenter} from '@xds/core/Center';
const allColumns = [
{value: 'name', label: 'Name'},
@@ -22,7 +21,7 @@ export default function MultiSelectorColumnVisibilitySelector() {
'status',
]);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSMultiSelector
label="Columns"
isLabelHidden
@@ -34,6 +33,6 @@ export default function MultiSelectorColumnVisibilitySelector() {
triggerDisplay="count"
placeholder="Columns"
/>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.tsx
index ae4e64aaa2..81cfaa5749 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.tsx
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.tsx
@@ -3,13 +3,12 @@
import {useState} from 'react';
import {XDSMultiSelector} from '@xds/core/MultiSelector';
import {XDSVStack} from '@xds/core/Layout';
-import {XDSCenter} from '@xds/core/Center';
export default function MultiSelectorForm() {
const [columns, setColumns] = useState<string[]>(['name', 'email']);
const [filters, setFilters] = useState<string[]>([]);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSVStack gap={4}>
<XDSMultiSelector
label="Visible columns"
@@ -38,6 +37,6 @@ export default function MultiSelectorForm() {
placeholder="All statuses"
/>
</XDSVStack>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.tsx
index 8e8d27f245..c6c366f3ac 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.tsx
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.tsx
@@ -2,7 +2,6 @@
import {useState} from 'react';
import {XDSMultiSelector} from '@xds/core/MultiSelector';
-import {XDSCenter} from '@xds/core/Center';
const countries = [
'United States',
@@ -20,7 +19,7 @@ const countries = [
export default function MultiSelectorSearchableMultiSelector() {
const [value, setValue] = useState<string[]>([]);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSMultiSelector
label="Countries"
options={countries}
@@ -30,6 +29,6 @@ export default function MultiSelectorSearchableMultiSelector() {
hasSelectAll
placeholder="Select countries..."
/>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.tsx
index ea02e232d4..c404027470 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.tsx
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.tsx
@@ -2,12 +2,11 @@
import {useState} from 'react';
import {XDSMultiSelector} from '@xds/core/MultiSelector';
-import {XDSCenter} from '@xds/core/Center';
export default function MultiSelectorSectionedMultiSelector() {
const [value, setValue] = useState<string[]>([]);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSMultiSelector
label="Permissions"
options={[
@@ -33,6 +32,6 @@ export default function MultiSelectorSectionedMultiSelector() {
onChange={setValue}
placeholder="Select permissions..."
/>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.doc.mjs
index 8a5319259d..ab1bb82097 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.doc.mjs
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.doc.mjs
@@ -5,6 +5,6 @@ export const doc = {
name: 'NumberInput — Clearable',
description: 'Number input with a clear button, unit suffix, and min/max constraint',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['NumberInput', 'Center'],
};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.tsx
index a7e0a0f9eb..bb9cfbb64d 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.tsx
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.tsx
@@ -2,12 +2,11 @@
import {useState} from 'react';
import {XDSNumberInput} from '@xds/core/NumberInput';
-import {XDSCenter} from '@xds/core/Center';
export default function NumberInputClearableNumberInput() {
const [value, setValue] = useState<number | null>(75);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSNumberInput
label="Progress"
units="%"
@@ -17,6 +16,6 @@ export default function NumberInputClearableNumberInput() {
onChange={setValue}
hasClear
/>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.doc.mjs
index 249389f463..94ba88b21a 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.doc.mjs
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.doc.mjs
@@ -5,6 +5,6 @@ export const doc = {
name: 'NumberInput — Range Constrained',
description: 'Number input with min/max boundaries and a helper description',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['NumberInput', 'Center'],
};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.tsx
index 2b80a93fc7..29df86b853 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.tsx
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.tsx
@@ -2,12 +2,11 @@
import {useState} from 'react';
import {XDSNumberInput} from '@xds/core/NumberInput';
-import {XDSCenter} from '@xds/core/Center';
export default function NumberInputRangeNumberInput() {
const [value, setValue] = useState<number | null>(3);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSNumberInput
label="Team Size"
placeholder="1–50"
@@ -17,6 +16,6 @@ export default function NumberInputRangeNumberInput() {
value={value}
onChange={setValue}
/>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputShowcase.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputShowcase.tsx
index c722badf82..e3f99a3b6c 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputShowcase.tsx
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputShowcase.tsx
@@ -2,7 +2,7 @@ import {XDSNumberInput} from '@xds/core/NumberInput';
export default function NumberInputShowcase() {
return (
- <div style={{maxWidth: 300}}>
+ <div style={{width: 300}}>
<XDSNumberInput
label="Quantity"
placeholder="Enter quantity"
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.tsx
index c5e8a05c6c..8cc67970cd 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.tsx
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.tsx
@@ -3,14 +3,13 @@
import {useState} from 'react';
import {XDSNumberInput} from '@xds/core/NumberInput';
import {XDSVStack} from '@xds/core/Stack';
-import {XDSCenter} from '@xds/core/Center';
export default function NumberInputStatuses() {
const [error, setError] = useState<number | null>(-5);
const [warning, setWarning] = useState<number | null>(150);
const [success, setSuccess] = useState<number | null>(25);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSVStack gap={4}>
<XDSNumberInput
label="Budget"
@@ -32,6 +31,6 @@ export default function NumberInputStatuses() {
status={{type: 'success', message: 'On track'}}
/>
</XDSVStack>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.doc.mjs
index 2232f7cdbe..6559a22348 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.doc.mjs
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.doc.mjs
@@ -5,6 +5,6 @@ export const doc = {
name: 'NumberInput — With Units',
description: 'Number input with a percentage unit suffix and valid range',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['NumberInput', 'Center'],
};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.tsx
index 145144d8db..cab5a000e0 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.tsx
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.tsx
@@ -2,12 +2,11 @@
import {useState} from 'react';
import {XDSNumberInput} from '@xds/core/NumberInput';
-import {XDSCenter} from '@xds/core/Center';
export default function NumberInputWithUnits() {
const [value, setValue] = useState<number | null>(50);
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSNumberInput
label="Discount"
placeholder="Enter discount"
@@ -17,6 +16,6 @@ export default function NumberInputWithUnits() {
value={value}
onChange={setValue}
/>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsx
index 259462bb31..e12c2b9b4a 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsx
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsx
@@ -10,6 +10,7 @@ import * as stylex from '@stylexjs/stylex';
const styles = stylex.create({
root: {
width: '100%',
+ maxWidth: 500,
},
pagination: {
paddingTop: 8,
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsx
index e8d4b0fd88..90f926827d 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsx
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsx
@@ -9,6 +9,7 @@ import * as stylex from '@stylexjs/stylex';
const styles = stylex.create({
root: {
width: '100%',
+ maxWidth: 500,
},
pagination: {
justifyContent: 'center',
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.doc.mjs b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.doc.mjs
index 19b1cbad64..40387fefce 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.doc.mjs
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.doc.mjs
@@ -6,6 +6,6 @@ export const doc = {
description:
'Power search with contentSearchFieldKey so free-text input maps to a title field automatically.',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['PowerSearch'],
};
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx
index cde0e24c91..780a01b824 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx
@@ -62,6 +62,7 @@ export default function PowerSearchContentSearch() {
return (
<XDSPowerSearch
+ style={{width: 300}}
config={config}
filters={filters}
onChange={newFilters => setFilters([...newFilters])}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.doc.mjs b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.doc.mjs
index 355b8f6613..9e40c3b59e 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.doc.mjs
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.doc.mjs
@@ -6,6 +6,6 @@ export const doc = {
description:
'Power search with multiple field types: enum, multi-select, entity, and text filters.',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['PowerSearch'],
};
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx
index 8982b87155..b0c5356a6d 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx
@@ -90,6 +90,7 @@ export default function PowerSearchFullFeatured() {
return (
<XDSPowerSearch
+ style={{width: 300}}
config={config}
filters={filters}
onChange={newFilters => setFilters([...newFilters])}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.doc.mjs b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.doc.mjs
index 4b6fd137f2..323121fd42 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.doc.mjs
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.doc.mjs
@@ -6,6 +6,6 @@ export const doc = {
description:
'Power search initialized with pre-set filter tokens for status and priority.',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['PowerSearch'],
};
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx
index 43cf76e84f..5f3039f85b 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx
@@ -65,6 +65,7 @@ export default function PowerSearchPresetFilters() {
return (
<XDSPowerSearch
+ style={{width: 360}}
config={config}
filters={filters}
onChange={newFilters => setFilters([...newFilters])}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx
index a73ea491d7..b9ce0a011c 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx
@@ -87,7 +87,7 @@ export default function PowerSearchSearchWithTable() {
const filteredBooks = applyFilters(filters, books);
return (
- <XDSVStack gap={4}>
+ <XDSVStack gap={4} width="100%" style={{maxWidth: 500}}>
<XDSPowerSearch
config={config}
filters={filters}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx
index c4586d1cb9..da364312e3 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx
@@ -51,6 +51,7 @@ export default function PowerSearchShowcase() {
return (
<XDSPowerSearch
+ style={{width: 400}}
config={config}
filters={filters}
onChange={newFilters => setFilters([...newFilters])}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.doc.mjs
index b28b688ba7..88ae32e317 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.doc.mjs
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.doc.mjs
@@ -6,6 +6,6 @@ export const doc = {
description:
'Progress bar with a custom value label showing disk usage in GB.',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['ProgressBar', 'Center', 'VStack', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.tsx
index d218839df5..f63ece3fab 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.tsx
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.tsx
@@ -7,7 +7,7 @@ import {XDSText} from '@xds/core/Text';
export default function ProgressBarCustomFormat() {
return (
- <XDSCenter width={300}>
+ <div style={{width: 300}}>
<XDSVStack gap={1}>
<XDSProgressBar
value={3.2}
@@ -22,6 +22,6 @@ export default function ProgressBarCustomFormat() {
1.8 GB remaining
</XDSText>
</XDSVStack>
- </XDSCenter>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.doc.mjs
index b0dacd82ed..2a530690c9 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.doc.mjs
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.doc.mjs
@@ -6,6 +6,6 @@ export const doc = {
description:
'Indeterminate progress bar for operations with unknown duration.',
isReady: true,
- aspectRatio: 4 / 3,
+ aspectRatio: 16 / 9,
componentsUsed: ['ProgressBar', 'Center'],
};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.tsx
index abbe402049..93761c7393 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.tsx
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.tsx
@@ -5,8 +5,6 @@ import {XDSCenter} from '@xds/core/Center';
export default function ProgressBarIndeterminate() {
return (
- <XDSCenter width={300}>
- <XDSProgressBar isIndeterminate label="Loading..." />
- </XDSCenter>
+ <XDSProgressBar isIndeterminate label="Loading..." style={{width: 300}} />
);
}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.tsx
index 79f5c5ffca..47bc2f2a4c 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.tsx
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.tsx
@@ -6,14 +6,37 @@ import {XDSVStack} from '@xds/core/Layout';
export default function ProgressBarSemanticVariants() {
return (
- <XDSCenter width={300}>
- <XDSVStack gap={4}>
- <XDSProgressBar value={60} label="Accent" variant="accent" hasValueLabel />
- <XDSProgressBar value={80} label="Positive" variant="positive" hasValueLabel />
- <XDSProgressBar value={50} label="Warning" variant="warning" hasValueLabel />
- <XDSProgressBar value={92} label="Negative" variant="negative" hasValueLabel />
- <XDSProgressBar value={35} label="Neutral" variant="neutral" hasValueLabel />
- </XDSVStack>
- </XDSCenter>
+ <XDSVStack gap={4} width="100%" style={{maxWidth: 300}}>
+ <XDSProgressBar
+ value={60}
+ label="Accent"
+ variant="accent"
+ hasValueLabel
+ />
+ <XDSProgressBar
+ value={80}
+ label="Positive"
+ variant="positive"
+ hasValueLabel
+ />
+ <XDSProgressBar
+ value={50}
+ label="Warning"
+ variant="warning"
+ hasValueLabel
+ />
+ <XDSProgressBar
+ value={92}
+ label="Negative"
+ variant="negative"
+ hasValueLabel
+ />
+ <XDSProgressBar
+ value={35}
+ label="Neutral"
+ variant="neutral"
+ hasValueLabel
+ />
+ </XDSVStack>
);
}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarShowcase.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarShowcase.tsx
index cb108d1de3..3981cd09be 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarShowcase.tsx
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarShowcase.tsx
@@ -3,5 +3,5 @@
import {XDSProgressBar} from '@xds/core/ProgressBar';
export default function ProgressBarShowcase() {
- return <XDSProgressBar value={60} label="Progress" />;
+ return <XDSProgressBar value={60} label="Progress" style={{width: 300}} />;
}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.tsx
index 73a97a7904..07508b6889 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.tsx
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.tsx
@@ -5,8 +5,11 @@ import {XDSCenter} from '@xds/core/Center';
export default function ProgressBarWithValueLabel() {
return (
- <XDSCenter width={300}>
- <XDSProgressBar value={75} label="Storage used" hasValueLabel />
- </XDSCenter>
+ <XDSProgressBar
+ value={75}
+ label="Storage used"
+ hasValueLabel
+ style={{width: 300}}
+ />
);
}