Skip to content

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

TypeScript

feat(sandbox): brand moodboard theme cards and composer/picker fixes (#1626)

rubyycheung4f39ad91cdbf
diff --git a/apps/sandbox/public/templates/theme-preview-daily.png b/apps/sandbox/public/templates/theme-preview-daily.png
new file mode 100644
index 0000000000..151fcf436b
Binary files /dev/null and b/apps/sandbox/public/templates/theme-preview-daily.png differ
diff --git a/apps/sandbox/public/templates/theme-preview-forest.png b/apps/sandbox/public/templates/theme-preview-forest.png
new file mode 100644
index 0000000000..fff8ac42d9
Binary files /dev/null and b/apps/sandbox/public/templates/theme-preview-forest.png differ
diff --git a/apps/sandbox/public/templates/theme-preview-midnight.png b/apps/sandbox/public/templates/theme-preview-midnight.png
new file mode 100644
index 0000000000..f0f90db15b
Binary files /dev/null and b/apps/sandbox/public/templates/theme-preview-midnight.png differ
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/AIComposer.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/AIComposer.tsx
index b054820d73..7d149c13d4 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/AIComposer.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/AIComposer.tsx
@@ -9,7 +9,7 @@ export type ComposerMode = 'template' | 'theme';
const PLACEHOLDER: Record<ComposerMode, string> = {
template: 'What should we build?',
- theme: 'Describe your brand or style...',
+ theme: 'Describe or drop in a screenshot of your brand...',
};
const MODE_ICON: Record<ComposerMode, React.ReactNode> = {
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/AppTopNav.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/AppTopNav.tsx
index 0d86beb701..48ca649316 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/AppTopNav.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/AppTopNav.tsx
@@ -142,8 +142,8 @@ export function AppTopNav({
sortOption === 'trending'
? 'Trending'
: sortOption === 'newest'
- ? 'Newest first'
- : 'Oldest first',
+ ? 'Newest'
+ : 'Oldest',
variant: 'ghost',
size: 'sm',
style: {marginRight: -8},
@@ -154,11 +154,11 @@ export function AppTopNav({
onClick: () => onSortChange?.('trending'),
},
{
- label: 'Newest first',
+ label: 'Newest',
onClick: () => onSortChange?.('newest'),
},
{
- label: 'Oldest first',
+ label: 'Oldest',
onClick: () => onSortChange?.('oldest'),
},
]}
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/ChatPanel.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/ChatPanel.tsx
index 318983259e..4848133b69 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/ChatPanel.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/ChatPanel.tsx
@@ -199,7 +199,7 @@ export function ChatPanel({
)}
</XDSText>
</div>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSMetadataList title="Layout">
<XDSMetadataListItem label="Width">
{pointedElement.rect
@@ -212,7 +212,7 @@ export function ChatPanel({
: '—'}
</XDSMetadataListItem>
</XDSMetadataList>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSMetadataList title="Styles">
<XDSMetadataListItem label="Background">
#ffffff
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/TemplatePreviewModal.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/TemplatePreviewModal.tsx
index 2540151591..5f30822cbf 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/TemplatePreviewModal.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/TemplatePreviewModal.tsx
@@ -59,13 +59,12 @@ const tokenStyles = stylex.create({
outline: {
borderWidth: 1,
borderStyle: 'solid',
- borderColor: 'var(--color-border-emphasized)',
+ borderColor: 'var(--color-border-strong, #999)',
},
pill: {
borderWidth: 1,
borderStyle: 'solid',
- borderColor: 'var(--color-border-emphasized)',
- borderRadius: 9999,
+ borderColor: 'var(--color-border-strong, #999)',
},
});
@@ -147,12 +146,14 @@ export function TemplatePreviewModal({
width="90vw"
maxHeight="90vh"
purpose="info"
- style={{
- padding: 0,
- overflow: 'visible',
- maxWidth: 1600,
- '--xds-dialog-padding': '0px',
- } as React.CSSProperties}>
+ style={
+ {
+ padding: 0,
+ overflow: 'visible',
+ maxWidth: 1600,
+ '--xds-dialog-padding': '0px',
+ } as React.CSSProperties
+ }>
<div style={{position: 'absolute', top: 0, right: -40, zIndex: 1}}>
<XDSCard padding={0} style={{borderRadius: '50%'}}>
<XDSButton
@@ -177,8 +178,7 @@ export function TemplatePreviewModal({
aspectRatio: '16 / 10',
backgroundColor: 'var(--color-background-muted, #f9f9f9)',
borderRadius: 12,
- overflowY: 'auto',
- overflowX: 'hidden',
+ overflow: 'hidden',
border: '1px solid var(--color-border, #e0e0e0)',
}}>
{item.slug ? (
@@ -218,9 +218,7 @@ export function TemplatePreviewModal({
style={{
opacity: transitioning ? 0 : 1,
transition: 'opacity 250ms ease',
- animation: transitioning
- ? 'none'
- : 'previewFadeIn 300ms ease',
+ animation: transitioning ? 'none' : 'previewFadeIn 300ms ease',
}}>
<XDSText type="display-2">{item.name}</XDSText>
@@ -245,9 +243,7 @@ export function TemplatePreviewModal({
<XDSText type="supporting" color="secondary">
Crafted by
</XDSText>
- <XDSText
- type="body"
- style={{fontWeight: 600, fontSize: 16}}>
+ <XDSText type="body" style={{fontWeight: 600, fontSize: 16}}>
{item.author}
</XDSText>
</XDSVStack>
@@ -255,9 +251,7 @@ export function TemplatePreviewModal({
</div>
{/* CTA buttons */}
- <XDSVStack
- gap={2}
- style={{marginTop: 32, position: 'relative'}}>
+ <XDSVStack gap={2} style={{marginTop: 32, position: 'relative'}}>
<XDSButton
variant="primary"
label="Start crafting"
@@ -283,11 +277,7 @@ export function TemplatePreviewModal({
size="lg"
isIconOnly
icon={
- isBookmarked ? (
- <BookmarkFilledIcon />
- ) : (
- <BookmarkIcon />
- )
+ isBookmarked ? <BookmarkFilledIcon /> : <BookmarkIcon />
}
onClick={onBookmarkToggle}
/>
@@ -367,214 +357,202 @@ export function TemplatePreviewModal({
flexDirection: 'column',
gap: 16,
}}>
- {(['official', 'community'] as const).map(
- category => {
- const entries = THEME_PICKER_ENTRIES.filter(
- e =>
- e.category === category &&
- e.name
- .toLowerCase()
- .includes(themeSearch.toLowerCase()),
- );
- if (entries.length === 0) return null;
- return (
- <div key={category}>
- <div style={{marginBottom: 8}}>
- <XDSText
- type="supporting"
- color="secondary">
- {category.charAt(0).toUpperCase() +
- category.slice(1)}
- </XDSText>
- </div>
- <div
- style={{
- display: 'grid',
- gridTemplateColumns: '1fr 1fr 1fr',
- gap: 8,
- }}>
- {entries.map(entry => {
- const isSelected =
- selectedTheme === entry.key;
- const isPinned = pinnedThemes.has(
- entry.key,
- );
- const p = entry.preview;
- return (
+ {(['official', 'community'] as const).map(category => {
+ const entries = THEME_PICKER_ENTRIES.filter(
+ e =>
+ e.category === category &&
+ e.name
+ .toLowerCase()
+ .includes(themeSearch.toLowerCase()),
+ );
+ if (entries.length === 0) return null;
+ return (
+ <div key={category}>
+ <div style={{marginBottom: 8}}>
+ <XDSText type="supporting" color="secondary">
+ {category.charAt(0).toUpperCase() +
+ category.slice(1)}
+ </XDSText>
+ </div>
+ <div
+ style={{
+ display: 'grid',
+ gridTemplateColumns: '1fr 1fr 1fr',
+ gap: 8,
+ }}>
+ {entries.map(entry => {
+ const isSelected =
+ selectedTheme === entry.key;
+ const isPinned = pinnedThemes.has(entry.key);
+ const p = entry.preview;
+ return (
+ <div
+ key={entry.key}
+ style={{
+ borderRadius: 12,
+ overflow: 'hidden',
+ cursor: 'pointer',
+ border: isSelected
+ ? '1.5px solid var(--color-accent)'
+ : '1px solid var(--color-border-emphasized)',
+ transition: 'border-color 0.15s ease',
+ }}>
<div
- key={entry.key}
+ onClick={() => {
+ setSelectedTheme(entry.key);
+ setThemeBrowseOpen(false);
+ setThemeSearch('');
+ }}
style={{
- borderRadius: 12,
+ height: 100,
+ backgroundColor: p.bg,
+ display: 'flex',
+ flexDirection: 'column',
overflow: 'hidden',
- cursor: 'pointer',
- border: isSelected
- ? '1.5px solid var(--color-accent)'
- : '1px solid var(--color-border-emphasized)',
- transition:
- 'border-color 0.15s ease',
}}>
<div
- onClick={() => {
- setSelectedTheme(entry.key);
- setThemeBrowseOpen(false);
- setThemeSearch('');
- }}
style={{
- height: 100,
- backgroundColor: p.bg,
+ height: 14,
+ backgroundColor: p.surface,
+ borderBottom: `1px solid ${p.text}1A`,
display: 'flex',
- flexDirection: 'column',
- overflow: 'hidden',
+ alignItems: 'center',
+ paddingInline: 8,
+ gap: 4,
}}>
<div
style={{
- height: 14,
- backgroundColor: p.surface,
- borderBottom: `1px solid ${p.text}1A`,
- display: 'flex',
- alignItems: 'center',
- paddingInline: 8,
- gap: 4,
- }}>
- <div
- style={{
- width: 5,
- height: 5,
- borderRadius: '50%',
- backgroundColor: p.accent,
- }}
- />
- <div
- style={{
- width: 16,
- height: 2,
- borderRadius: 1,
- backgroundColor: p.text,
- opacity: 0.3,
- }}
- />
- </div>
+ width: 5,
+ height: 5,
+ borderRadius: '50%',
+ backgroundColor: p.accent,
+ }}
+ />
<div
style={{
- flex: 1,
- padding: 8,
- display: 'flex',
- flexDirection: 'column',
- gap: 5,
- }}>
- <div
- style={{
- width: '65%',
- height: 4,
- borderRadius: 2,
- backgroundColor: p.text,
- opacity: 0.6,
- }}
- />
- <div
- style={{
- width: '45%',
- height: 3,
- borderRadius: 1.5,
- backgroundColor: p.text,
- opacity: 0.25,
- }}
- />
- <div
- style={{
- width: 28,
- height: 10,
- borderRadius: 4,
- backgroundColor: p.accent,
- marginTop: 'auto',
- }}
- />
- </div>
+ width: 16,
+ height: 2,
+ borderRadius: 1,
+ backgroundColor: p.text,
+ opacity: 0.3,
+ }}
+ />
</div>
<div
style={{
+ flex: 1,
+ padding: 8,
display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- padding: '6px 8px',
- backgroundColor:
- 'var(--color-surface, #f5f5f5)',
+ flexDirection: 'column',
+ gap: 5,
}}>
<div
style={{
- display: 'flex',
- alignItems: 'center',
- gap: 6,
- }}>
- {(() => {
- const Logo =
- BRAND_LOGOS[entry.key];
- return Logo ? (
- <Logo
- width={14}
- height={14}
- />
- ) : (
- <div
- style={{
- width: 14,
- height: 14,
- borderRadius: '50%',
- backgroundColor:
- entry.accent,
- }}
- />
- );
- })()}
- <XDSText
- type="supporting"
- style={{
- fontWeight: isSelected
- ? 600
- : 400,
- }}>
- {entry.name}
- </XDSText>
- </div>
+ width: '65%',
+ height: 4,
+ borderRadius: 2,
+ backgroundColor: p.text,
+ opacity: 0.6,
+ }}
+ />
<div
- onClick={e => {
- e.stopPropagation();
- togglePin(entry.key);
+ style={{
+ width: '45%',
+ height: 3,
+ borderRadius: 1.5,
+ backgroundColor: p.text,
+ opacity: 0.25,
}}
+ />
+ <div
style={{
- cursor: 'pointer',
- display: 'flex',
- padding: 2,
- }}>
- {isPinned ? (
- <StarFilledIcon
- width={14}
- height={14}
- style={{
- color:
- 'var(--color-text-primary, #111)',
- }}
- />
+ width: 28,
+ height: 10,
+ borderRadius: 4,
+ backgroundColor: p.accent,
+ marginTop: 'auto',
+ }}
+ />
+ </div>
+ </div>
+ <div
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ padding: '6px 8px',
+ backgroundColor:
+ 'var(--color-surface, #f5f5f5)',
+ }}>
+ <div
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ gap: 6,
+ }}>
+ {(() => {
+ const Logo = BRAND_LOGOS[entry.key];
+ return Logo ? (
+ <Logo width={14} height={14} />
) : (
- <StarIcon
- width={14}
- height={14}
+ <div
style={{
- color:
- 'var(--color-secondary, #999)',
+ width: 14,
+ height: 14,
+ borderRadius: '50%',
+ backgroundColor: entry.accent,
}}
/>
- )}
- </div>
+ );
+ })()}
+ <XDSText
+ type="supporting"
+ style={{
+ fontWeight: isSelected
+ ? 600
+ : 400,
+ }}>
+ {entry.name}
+ </XDSText>
+ </div>
+ <div
+ onClick={e => {
+ e.stopPropagation();
+ togglePin(entry.key);
+ }}
+ style={{
+ cursor: 'pointer',
+ display: 'flex',
+ padding: 2,
+ }}>
+ {isPinned ? (
+ <StarFilledIcon
+ width={14}
+ height={14}
+ style={{
+ color:
+ 'var(--color-text-primary, #111)',
+ }}
+ />
+ ) : (
+ <StarIcon
+ width={14}
+ height={14}
+ style={{
+ color:
+ 'var(--color-secondary, #999)',
+ }}
+ />
+ )}
</div>
</div>
- );
- })}
- </div>
+ </div>
+ );
+ })}
</div>
- );
- },
- )}
+ </div>
+ );
+ })}
</div>
</div>
}>
@@ -696,9 +674,7 @@ export function TemplatePreviewModal({
marginTop: 16,
opacity: transitioning ? 0 : 1,
transition: 'opacity 250ms ease',
- animation: transitioning
- ? 'none'
- : 'previewFadeIn 300ms ease',
+ animation: transitioning ? 'none' : 'previewFadeIn 300ms ease',
}}>
{exploreTags.map(tag => (
<XDSToken
@@ -725,9 +701,7 @@ export function TemplatePreviewModal({
marginTop: 16,
opacity: transitioning ? 0 : 1,
transition: 'opacity 250ms ease',
- animation: transitioning
- ? 'none'
- : 'previewFadeIn 300ms ease',
+ animation: transitioning ? 'none' : 'previewFadeIn 300ms ease',
}}>
{componentTags.map(c => (
<XDSToken
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/ThemeEditorView.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/ThemeEditorView.tsx
index 105c50fa68..62ae2dc6b4 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/ThemeEditorView.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/ThemeEditorView.tsx
@@ -1059,7 +1059,7 @@ function ComponentPreview() {
</XDSText>
))}
</XDSHStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSHStack gap={3}>
<div style={{...SEC_BOX, flex: 1}}>
<XDSVStack gap={1}>
@@ -1188,7 +1188,7 @@ function ComponentPreview() {
<XDSText type="supporting" color="secondary">
Market orders execute at the current price.
</XDSText>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div style={ROW}>
<XDSText type="body">Estimated Shares</XDSText>
<XDSText type="body" weight="bold">
@@ -1388,7 +1388,7 @@ function ComponentPreview() {
<div key={i} style={{...BAR_BASE, height: h}} />
))}
</div>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div style={ROW}>
<XDSVStack gap={0}>
<XDSText type="supporting" color="secondary">
@@ -1438,7 +1438,7 @@ function ComponentPreview() {
Pending Setup
</XDSText>
</XDSHStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div style={ROW}>
<XDSText type="body">Net Royalties</XDSText>
<XDSText type="body" weight="bold">
@@ -1451,7 +1451,7 @@ function ComponentPreview() {
-$0.00
</XDSText>
</div>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div style={ROW}>
<XDSText type="body">Total Ready to Claim</XDSText>
<XDSText type="body" weight="bold">
@@ -1604,7 +1604,7 @@ function ComponentPreview() {
<XDSBreadcrumbItem href="#">...</XDSBreadcrumbItem>
<XDSBreadcrumbItem isCurrent>Payments</XDSBreadcrumbItem>
</XDSBreadcrumbs>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSCollapsibleGroup type="single" defaultValue="0">
{[
{
@@ -1668,11 +1668,11 @@ function ComponentPreview() {
category, set a target amount and date, and we&apos;ll
calculate the monthly contribution needed.
</XDSText>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSText type="label" weight="bold">
Can I track multiple goals at once?
</XDSText>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSText type="label" weight="bold">
How are monthly contributions calculated?
</XDSText>
@@ -1701,7 +1701,7 @@ function ComponentPreview() {
80% of $30,000
</XDSText>
<XDSProgressBar label="Savings Progress" value={80} />
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div style={ROW}>
<XDSText type="body">Projected Finish</XDSText>
<XDSText type="body" weight="bold">
@@ -1774,7 +1774,7 @@ function ComponentPreview() {
Select a date to view scheduled payments.
</XDSText>
<XDSCalendar />
- <XDSDivider />
+ <XDSDivider variant="strong" />
{[
{
name: 'Netflix Subscription',
@@ -1928,7 +1928,7 @@ function ComponentPreview() {
]}
/>
</XDSHStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSHStack gap={2} vAlign="center" wrap="wrap">
<XDSPopover
content={<PopoverSettingsContent />}
@@ -1994,7 +1994,7 @@ function ComponentPreview() {
onChange={setCheck2}
/>
</XDSHStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSHStack gap={4} vAlign="end">
<div style={{flex: 1, maxWidth: 200}}>
<XDSSlider
@@ -2028,7 +2028,7 @@ function ComponentPreview() {
<XDSSpinner size="md" />
<XDSSpinner size="lg" />
</XDSHStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSVStack gap={2}>
<XDSHStack gap={3} vAlign="center">
<XDSSkeleton
@@ -2045,7 +2045,7 @@ function ComponentPreview() {
<XDSSkeleton width="100%" height={12} index={3} />
<XDSSkeleton width="80%" height={12} index={4} />
</XDSVStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSVStack gap={3}>
<XDSProgressBar
value={progressValue}
@@ -2063,7 +2063,7 @@ function ComponentPreview() {
))}
</XDSHStack>
</XDSVStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSHStack gap={4} vAlign="center">
<XDSHStack gap={2} vAlign="center">
<XDSStatusDot variant="positive" label="Online" isPulsing />
@@ -2093,7 +2093,7 @@ function ComponentPreview() {
<XDSTab value="reports" label="Reports" />
<XDSTab value="settings" label="Settings" />
</XDSTabList>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSList density="balanced">
<XDSListItem
label="Dashboard"
@@ -2144,7 +2144,7 @@ function LandingPagePreview() {
<XDSButton label="Documentation" variant="secondary" />
</div>
</div>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div>
<XDSHeading level={2} style={{marginBottom: 16}}>
Features
@@ -2410,7 +2410,7 @@ function PopoverSettingsContent() {
<XDSText type="label" display="block">
Settings
</XDSText>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSSwitch
label="Notifications"
description="Receive push notifications"
@@ -2470,7 +2470,7 @@ function MicroInteractionsPreview() {
/>
</XDSHStack>
</div>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div>
<XDSText type="supporting" color="secondary" display="block">
Popover / HoverCard / Tooltip
@@ -2514,7 +2514,7 @@ function MicroInteractionsPreview() {
</XDSTooltip>
</XDSHStack>
</div>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div>
<XDSText type="supporting" color="secondary" display="block">
Switches & Checkboxes
@@ -2534,7 +2534,7 @@ function MicroInteractionsPreview() {
/>
</XDSHStack>
</div>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<div>
<XDSText type="supporting" color="secondary" display="block">
Slider & Selector
@@ -2577,7 +2577,7 @@ function LoadingStatusPreview() {
<XDSSpinner size="md" />
<XDSSpinner size="lg" />
</XDSHStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSVStack gap={2}>
<XDSHStack gap={3} vAlign="center">
<XDSSkeleton width={40} height={40} radius="rounded" index={0} />
@@ -2589,7 +2589,7 @@ function LoadingStatusPreview() {
<XDSSkeleton width="100%" height={12} index={3} />
<XDSSkeleton width="80%" height={12} index={4} />
</XDSVStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSVStack gap={3}>
<XDSProgressBar value={progressValue} label={`${progressValue}%`} />
<XDSHStack gap={2}>
@@ -2604,7 +2604,7 @@ function LoadingStatusPreview() {
))}
</XDSHStack>
</XDSVStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSHStack gap={4} vAlign="center">
<XDSHStack gap={2} vAlign="center">
<XDSStatusDot variant="positive" label="Online" isPulsing />
@@ -2638,7 +2638,7 @@ function SurfaceInteractionsPreview() {
<XDSTab value="reports" label="Reports" />
<XDSTab value="settings" label="Settings" />
</XDSTabList>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSList density="balanced">
<XDSListItem
label="Dashboard"
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/constants.ts b/apps/sandbox/src/app/(fullscreen)/pages/docsite/constants.ts
index 17c89a9503..0562d59e0d 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/constants.ts
+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/constants.ts
@@ -186,23 +186,18 @@ export const TEMPLATES: {
isOfficial: boolean;
}[] = [
{
- name: 'Contact Form',
- src: FIRST_CARD_IMAGE,
+ name: 'Login (SSO)',
+ src: DUMMY_IMAGE,
+ slug: 'login-sso',
size: 'large',
- author: 'Andrea Anderson',
- isOfficial: true,
- },
- {
- name: 'Shopping Details',
- src: SHOPPING_DETAILS_IMAGE,
- size: 'small',
- author: 'Andrea Anderson',
+ author: 'XDS Design',
isOfficial: true,
},
{
- name: 'Button Component',
- src: SCREENSHOT_3_IMAGE,
- size: 'small',
+ name: 'Product Detail',
+ src: DUMMY_IMAGE,
+ slug: 'product-detail',
+ size: 'large',
author: 'XDS Design',
isOfficial: true,
},
@@ -214,88 +209,66 @@ export const TEMPLATES: {
isOfficial: true,
},
{
- name: 'Login (SSO)',
+ name: 'Classic Gallery',
src: DUMMY_IMAGE,
- slug: 'login-sso',
+ slug: 'classic-gallery',
size: 'large',
author: 'XDS Design',
isOfficial: true,
},
{
- name: 'Login (Split)',
+ name: 'Payment Form',
src: DUMMY_IMAGE,
- slug: 'login-split',
+ slug: 'payment-form',
size: 'large',
author: 'XDS Design',
isOfficial: true,
},
{
- name: 'Dashboard',
+ name: 'Login (Split)',
src: DUMMY_IMAGE,
+ slug: 'login-split',
size: 'large',
- author: 'Marcus Chen',
- isOfficial: false,
- },
- {
- name: 'Data Table',
- src: DUMMY_IMAGE,
- size: 'small',
author: 'XDS Design',
isOfficial: true,
},
{
- name: 'File Explorer',
- src: DUMMY_IMAGE,
- size: 'small',
- author: 'Sarah Kim',
- isOfficial: false,
- },
- {
- name: 'Contact Form',
+ name: 'Side Gallery',
src: DUMMY_IMAGE,
- size: 'small',
- author: 'Sarah Kim',
- isOfficial: false,
- },
- {
- name: 'Editor',
- src: DUMMY_IMAGE,
- size: 'xlarge',
- author: 'Andrea Anderson',
+ slug: 'side-gallery',
+ size: 'large',
+ author: 'XDS Design',
isOfficial: true,
},
{
- name: 'Analytics',
+ name: 'Settings Sidebar',
src: DUMMY_IMAGE,
+ slug: 'settings-sidebar',
size: 'large',
- author: 'Marcus Chen',
- isOfficial: false,
- },
- {
- name: 'User Profile',
- src: DUMMY_IMAGE,
- size: 'small',
- author: 'Sarah Kim',
- isOfficial: false,
+ author: 'XDS Design',
+ isOfficial: true,
},
{
- name: 'Notifications',
+ name: 'Product Gallery',
src: DUMMY_IMAGE,
- size: 'small',
+ slug: 'product-gallery',
+ size: 'large',
author: 'XDS Design',
isOfficial: true,
},
{
- name: 'Calendar',
+ name: 'Mixed Gallery',
src: DUMMY_IMAGE,
- size: 'small',
- author: 'Andrea Anderson',
- isOfficial: false,
+ slug: 'mixed-gallery',
+ size: 'large',
+ author: 'XDS Design',
+ isOfficial: true,
},
{
- name: 'Onboarding',
+ name: 'Dashboard',
src: DUMMY_IMAGE,
- size: 'xlarge',
+ slug: 'dashboard',
+ size: 'large',
author: 'XDS Design',
isOfficial: true,
},
@@ -788,6 +761,7 @@ export type ThemePickerEntry = {
text: string;
radius?: number;
font?: string;
+ img?: string;
};
};
@@ -872,7 +846,7 @@ export const THEME_PICKER_ENTRIES: ThemePickerEntry[] = [
// Community — future user-contributed themes
{
key: 'forest',
- name: 'Forest',
+ name: 'Matcha',
category: 'community',
accent: '#2D8A4E',
description: 'Earthy greens and warm browns',
@@ -883,36 +857,39 @@ export const THEME_PICKER_ENTRIES: ThemePickerEntry[] = [
text: '#1A2E1A',
radius: 6,
font: 'Georgia, serif',
+ img: 'theme-preview-forest.png',
},
},
{
- key: 'sunset',
- name: 'Sunset',
+ key: 'midnight',
+ name: 'Midnight',
category: 'community',
- accent: '#E5484D',
- description: 'Warm reds and golden highlights',
+ accent: '#C9A96E',
+ description: 'Dark tones with warm bronze accents',
preview: {
- bg: '#FFF5F5',
- surface: '#FDE8E8',
- accent: '#E5484D',
- text: '#2D1515',
- radius: 12,
- font: 'Avenir Next, sans-serif',
+ bg: '#121212',
+ surface: '#1E1E1E',
+ accent: '#C9A96E',
+ text: '#E8E0D4',
+ radius: 4,
+ font: 'SF Mono, monospace',
+ img: 'theme-preview-midnight.png',
},
},
{
- key: 'midnight',
- name: 'Midnight',
+ key: 'daily',
+ name: 'Daily',
category: 'community',
- accent: '#818CF8',
- description: 'Deep blues with soft violet accents',
+ accent: '#4A90D9',
+ description: 'Soft blues and warm neutrals for everyday tools',
preview: {
- bg: '#0F172A',
- surface: '#1E293B',
- accent: '#818CF8',
- text: '#E2E8F0',
- radius: 4,
- font: 'SF Mono, monospace',
+ bg: '#E8F0FE',
+ surface: '#FFFFFF',
+ accent: '#4A90D9',
+ text: '#1A1A2E',
+ radius: 16,
+ font: 'Inter, sans-serif',
+ img: 'theme-preview-daily.png',
},
},
];
@@ -990,7 +967,7 @@ export const PREVIEW_THEMES: Array<{
},
{
key: 'forest',
- name: 'Forest',
+ name: 'Matcha',
category: 'community',
colors: {
background: '#F0F5F1',
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsx
index c1062f1897..8968c7e135 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/page.tsx
@@ -60,6 +60,8 @@ import {
MoonIcon,
VerifiedIcon,
FilterIcon,
+ BookmarkIcon,
+ BookmarkFilledIcon,
} from './docsite-icons';
const popoverStyles = stylex.create({
@@ -164,12 +166,15 @@ function ThemeCard({
theme,
index,
onCustomize,
+ onEdit,
}: {
theme: ThemePickerEntry;
index: number;
onCustomize: () => void;
+ onEdit: () => void;
}) {
const [hovered, setHovered] = useState(false);
+ const [bookmarked, setBookmarked] = useState(false);
return (
<div
@@ -186,57 +191,109 @@ function ThemeCard({
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
onClick={onCustomize}>
- <div
- style={{
- position: 'relative',
- aspectRatio: '1920 / 1205',
- overflow: 'hidden',
- backgroundColor: theme.preview.bg,
- }}>
+ {theme.preview.img ? (
<img
- src={`${basePath}/templates/theme-preview.png`}
+ src={`${basePath}/templates/${theme.preview.img}`}
alt={theme.name}
style={{
display: 'block',
width: '100%',
- height: '100%',
+ aspectRatio: '1920 / 1205',
objectFit: 'cover',
}}
/>
+ ) : (
<div
style={{
- position: 'absolute',
- inset: 0,
- backgroundColor: theme.preview.accent,
- mixBlendMode: 'color',
- opacity: 0.35,
- }}
- />
- <div
- style={{
- position: 'absolute',
- inset: 0,
+ aspectRatio: '1920 / 1205',
backgroundColor: theme.preview.bg,
- mixBlendMode: 'overlay',
- opacity: 0.4,
- }}
- />
- <span
- style={{
- position: 'absolute',
- top: 12,
- left: 16,
- fontSize: 18,
- fontWeight: 700,
- letterSpacing: '0.04em',
+ padding: '6% 7%',
+ display: 'flex',
+ flexDirection: 'column',
+ justifyContent: 'space-between',
fontFamily: theme.preview.font ?? 'system-ui, sans-serif',
- color: theme.preview.text,
- lineHeight: 1,
- textShadow: '0 1px 3px rgba(0,0,0,0.15)',
+ overflow: 'hidden',
}}>
- {theme.name}
- </span>
- </div>
+ {/* Brand name + accent dot */}
+ <div style={{display: 'flex', alignItems: 'center', gap: 8}}>
+ <div
+ style={{
+ width: 14,
+ height: 14,
+ borderRadius: theme.preview.radius ?? 4,
+ backgroundColor: theme.preview.accent,
+ flexShrink: 0,
+ }}
+ />
+ <span
+ style={{
+ fontSize: 20,
+ fontWeight: 700,
+ color: theme.preview.text,
+ lineHeight: 1,
+ }}>
+ {theme.name}
+ </span>
+ </div>
+ {/* Color palette */}
+ <div style={{display: 'flex', gap: '3%'}}>
+ {[
+ {color: theme.preview.accent, label: 'Accent'},
+ {color: theme.preview.bg, label: 'Background'},
+ {color: theme.preview.surface, label: 'Surface'},
+ {color: theme.preview.text, label: 'Text'},
+ ].map(swatch => (
+ <div key={swatch.label} style={{flex: 1}}>
+ <div
+ style={{
+ aspectRatio: '1',
+ borderRadius: theme.preview.radius ?? 8,
+ backgroundColor: swatch.color,
+ border:
+ swatch.color === theme.preview.bg
+ ? `1px solid ${theme.preview.surface}`
+ : 'none',
+ }}
+ />
+ <div
+ style={{
+ fontSize: 7,
+ color: theme.preview.text,
+ opacity: 0.5,
+ marginTop: 3,
+ textAlign: 'center',
+ textTransform: 'uppercase',
+ letterSpacing: '0.05em',
+ }}>
+ {swatch.label}
+ </div>
+ </div>
+ ))}
+ </div>
+ {/* Font + description */}
+ <div>
+ <div
+ style={{
+ fontSize: 28,
+ fontWeight: 300,
+ color: theme.preview.text,
+ lineHeight: 1,
+ opacity: 0.8,
+ }}>
+ Aa
+ </div>
+ <div
+ style={{
+ fontSize: 8,
+ color: theme.preview.text,
+ opacity: 0.4,
+ marginTop: 2,
+ }}>
+ {(theme.preview.font ?? 'System UI').split(',')[0].trim()}
+ </div>
+ </div>
+ </div>
+ )}
<div
style={{
position: 'absolute',
@@ -250,18 +307,17 @@ function ThemeCard({
position: 'absolute',
top: 12,
right: 12,
- }}>
- <span
- style={{
- fontSize: 11,
- fontWeight: 600,
- padding: '2px 8px',
- borderRadius: 9999,
- backgroundColor: 'rgba(255,255,255,0.9)',
- color: '#333',
- }}>
- {theme.category === 'official' ? 'Official' : 'Community'}
- </span>
+ }}
+ onClick={e => e.stopPropagation()}>
+ <XDSButton
+ label="Bookmark"
+ variant="ghost"
+ size="sm"
+ isIconOnly
+ icon={bookmarked ? <BookmarkFilledIcon /> : <BookmarkIcon />}
+ style={{color: '#fff'}}
+ onClick={() => setBookmarked(prev => !prev)}
+ />
</div>
<div
style={{
@@ -288,19 +344,28 @@ function ThemeCard({
</XDSText>
)}
</XDSStack>
- <XDSButton
- label="Customize"
- variant="secondary"
- size="sm"
- style={{
- backgroundColor: 'var(--color-background-surface)',
- flexShrink: 0,
- }}
- onClick={e => {
- e.stopPropagation();
- onCustomize();
- }}
- />
+ <XDSStack direction="horizontal" gap={2}>
+ <XDSButton
+ label="Use"
+ variant="secondary"
+ size="sm"
+ style={{backgroundColor: 'var(--color-background-surface)'}}
+ onClick={e => {
+ e.stopPropagation();
+ onCustomize();
+ }}
+ />
+ <XDSButton
+ label="Craft"
+ variant="secondary"
+ size="sm"
+ style={{backgroundColor: 'var(--color-background-surface)'}}
+ onClick={e => {
+ e.stopPropagation();
+ onEdit();
+ }}
+ />
+ </XDSStack>
</div>
</div>
</div>
@@ -487,6 +552,7 @@ function DocsiteLandingTemplate() {
const scrollContainerRef = useRef<HTMLDivElement>(null);
const [isHeaderCollapsed, setIsHeaderCollapsed] = useState(false);
const [card4Bookmarked, setCard4Bookmarked] = useState(false);
+ const [themePreviewKey, setThemePreviewKey] = useState<string | null>(null);
const handleEditorResizeStart = useCallback(
(e: React.MouseEvent) => {
@@ -834,7 +900,7 @@ function DocsiteLandingTemplate() {
<XDSTab value="properties" label="Properties" />
</XDSTabList>
</XDSStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
</XDSStack>
)}
{showPublishCard1 ? (
@@ -971,6 +1037,7 @@ function DocsiteLandingTemplate() {
<XDSAppShell
variant="surface"
height="fill"
+ style={{} as React.CSSProperties}
topNav={
<AppTopNav
activeView={activeView}
@@ -1208,13 +1275,13 @@ function DocsiteLandingTemplate() {
/>
<XDSDropdownMenu
button={{
- label: 'Theme',
+ label:
+ previewTheme.charAt(0).toUpperCase() +
+ previewTheme.slice(1),
variant: 'ghost',
size: 'sm',
- isIconOnly: true,
icon: <PaletteIcon />,
}}
- hasChevron={false}
menuWidth={160}
items={[
{
@@ -1248,8 +1315,8 @@ function DocsiteLandingTemplate() {
sortOption === 'trending'
? 'Trending'
: sortOption === 'newest'
- ? 'Newest first'
- : 'Oldest first',
+ ? 'Newest'
+ : 'Oldest',
variant: 'ghost',
size: 'sm',
}}
@@ -1259,11 +1326,11 @@ function DocsiteLandingTemplate() {
onClick: () => setSortOption('trending'),
},
{
- label: 'Newest first',
+ label: 'Newest',
onClick: () => setSortOption('newest'),
},
{
- label: 'Oldest first',
+ label: 'Oldest',
onClick: () => setSortOption('oldest'),
},
]}
@@ -1351,8 +1418,8 @@ function DocsiteLandingTemplate() {
sortOption === 'trending'
? 'Trending'
: sortOption === 'newest'
- ? 'Newest first'
- : 'Oldest first',
+ ? 'Newest'
+ : 'Oldest',
variant: 'ghost',
size: 'sm',
}}
@@ -1362,11 +1429,11 @@ function DocsiteLandingTemplate() {
onClick: () => setSortOption('trending'),
},
{
- label: 'Newest first',
+ label: 'Newest',
onClick: () => setSortOption('newest'),
},
{
- label: 'Oldest first',
+ label: 'Oldest',
onClick: () => setSortOption('oldest'),
},
]}
@@ -1494,14 +1561,34 @@ function DocsiteLandingTemplate() {
: 'repeat(3, 1fr)',
gap: 16,
}}>
- {THEME_PICKER_ENTRIES.map((theme, i) => (
- <ThemeCard
- key={theme.key}
- theme={theme}
- index={i}
- onCustomize={() => setActiveView('theme')}
- />
- ))}
+ {[...THEME_PICKER_ENTRIES]
+ .sort((a, b) => {
+ const imgOrder = [
+ 'forest',
+ 'daily',
+ 'midnight',
+ 'sunset',
+ ];
+ const ai = a.preview.img
+ ? imgOrder.indexOf(a.key)
+ : imgOrder.length;
+ const bi = b.preview.img
+ ? imgOrder.indexOf(b.key)
+ : imgOrder.length;
+ return (
+ (ai === -1 ? imgOrder.length : ai) -
+ (bi === -1 ? imgOrder.length : bi)
+ );
+ })
+ .map((theme, i) => (
+ <ThemeCard
+ key={theme.key}
+ theme={theme}
+ index={i}
+ onCustomize={() => setThemePreviewKey(theme.key)}
+ onEdit={() => setActiveView('theme')}
+ />
+ ))}
</div>
)}
@@ -1629,7 +1716,7 @@ function DocsiteLandingTemplate() {
fontSize: 11,
fontWeight: 600,
padding: '2px 8px',
- borderRadius: 9999,
+ borderRadius: 'var(--radius-control)',
whiteSpace: 'nowrap' as const,
flexShrink: 0,
backgroundColor:
@@ -1755,13 +1842,14 @@ function DocsiteLandingTemplate() {
if (activeTab === 'all' && i === 2) {
items.push(
...THEME_PICKER_ENTRIES.filter(
- t => t.key === 'forest' || t.key === 'midnight',
+ t => t.key === 'daily' || t.key === 'forest',
).map((t, ti) => (
<ThemeCard
key={`theme-${t.key}`}
theme={t}
index={i + ti + 1}
- onCustomize={() => setActiveView('theme')}
+ onCustomize={() => setThemePreviewKey(t.key)}
+ onEdit={() => setActiveView('theme')}
/>
)),
);
@@ -1843,6 +1931,307 @@ function DocsiteLandingTemplate() {
/>
);
})()}
+ {/* Theme preview modal */}
+ {themePreviewKey !== null &&
+ (() => {
+ const t = THEME_PICKER_ENTRIES.find(e => e.key === themePreviewKey);
+ if (!t) return null;
+ const r = t.preview.radius ?? 8;
+ const font = t.preview.font ?? 'system-ui, sans-serif';
+ return (
+ <XDSDialog
+ isOpen={true}
+ onOpenChange={open => {
+ if (!open) setThemePreviewKey(null);
+ }}
+ width="90vw"
+ maxHeight="90vh"
+ purpose="info"
+ style={
+ {
+ padding: 0,
+ overflow: 'visible',
+ maxWidth: 900,
+ '--xds-dialog-padding': '0px',
+ } as React.CSSProperties
+ }>
+ <div
+ style={{position: 'absolute', top: 0, right: -40, zIndex: 1}}>
+ <XDSCard padding={0} style={{borderRadius: '50%'}}>
+ <XDSButton
+ label="Close"
+ variant="ghost"
+ size="sm"
+ isIconOnly
+ icon={<span style={{fontSize: 16, lineHeight: 1}}>✕</span>}
+ onClick={() => setThemePreviewKey(null)}
+ />
+ </XDSCard>
+ </div>
+ <div style={{overflowY: 'auto', maxHeight: '85vh'}}>
+ <div
+ style={{
+ display: 'flex',
+ gap: 32,
+ padding: 32,
+ fontFamily: font,
+ }}>
+ {/* Left — brand moodboard */}
+ <div style={{flex: 1, minWidth: 0}}>
+ {/* Header */}
+ <div
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ gap: 12,
+ marginBottom: 24,
+ }}>
+ <div
+ style={{
+ width: 32,
+ height: 32,
+ borderRadius: r,
+ backgroundColor: t.preview.accent,
+ }}
+ />
+ <XDSHeading level={2}>{t.name}</XDSHeading>
+ <span
+ style={{
+ fontSize: 11,
+ fontWeight: 600,
+ padding: '2px 10px',
+ borderRadius: 'var(--radius-control)',
+ backgroundColor: 'var(--color-background-muted)',
+ color: 'var(--color-text-secondary)',
+ }}>
+ {t.category === 'official' ? 'Official' : 'Community'}
+ </span>
+ </div>
+ {t.description && (
+ <XDSText
+ type="body"
+ color="secondary"
+ style={{marginBottom: 24}}>
+ {t.description}
+ </XDSText>
+ )}
+ {/* Color palette */}
+ <XDSText
+ type="label"
+ color="secondary"
+ style={{marginBottom: 12, display: 'block'}}>
+ Colors
+ </XDSText>
+ <div style={{display: 'flex', gap: 12, marginBottom: 28}}>
+ {[
+ {
+ color: t.preview.accent,
+ label: 'Accent',
+ hex: t.preview.accent,
+ },
+ {
+ color: t.preview.bg,
+ label: 'Background',
+ hex: t.preview.bg,
+ },
+ {
+ color: t.preview.surface,
+ label: 'Surface',
+ hex: t.preview.surface,
+ },
+ {
+ color: t.preview.text,
+ label: 'Text',
+ hex: t.preview.text,
+ },
+ ].map(swatch => (
+ <div
+ key={swatch.label}
+ style={{flex: 1, textAlign: 'center'}}>
+ <div
+ style={{
+ aspectRatio: '1',
+ borderRadius: r,
+ backgroundColor: swatch.color,
+ border:
+ swatch.color.toUpperCase() === '#FFFFFF'
+ ? '1px solid var(--color-border-default)'
+ : 'none',
+ marginBottom: 6,
+ }}
+ />
+ <XDSText type="supporting" style={{display: 'block'}}>
+ {swatch.label}
+ </XDSText>
+ <XDSText
+ type="supporting"
+ color="secondary"
+ style={{display: 'block', fontSize: 10}}>
+ {swatch.hex}
+ </XDSText>
+ </div>
+ ))}
+ </div>
+ {/* Typography */}
+ <XDSText
+ type="label"
+ color="secondary"
+ style={{marginBottom: 12, display: 'block'}}>
+ Typography
+ </XDSText>
+ <div
+ style={{
+ padding: 20,
+ borderRadius: r,
+ backgroundColor: 'var(--color-background-muted)',
+ marginBottom: 28,
+ }}>
+ <div
+ style={{
+ fontSize: 48,
+ fontWeight: 300,
+ lineHeight: 1,
+ marginBottom: 8,
+ }}>
+ Aa
+ </div>
+ <XDSText type="body" color="secondary">
+ {font.split(',')[0].trim()}
+ </XDSText>
+ <div
+ style={{
+ marginTop: 12,
+ fontSize: 13,
+ lineHeight: 1.6,
+ opacity: 0.6,
+ }}>
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ <br />
+ abcdefghijklmnopqrstuvwxyz
+ <br />
+ 0123456789
+ </div>
+ </div>
+ {/* Radius */}
+ <XDSText
+ type="label"
+ color="secondary"
+ style={{marginBottom: 12, display: 'block'}}>
+ Border Radius
+ </XDSText>
+ <div
+ style={{
+ display: 'flex',
+ gap: 12,
+ alignItems: 'flex-end',
+ marginBottom: 28,
+ }}>
+ {[r * 0.5, r, r * 1.5, r * 2].map((rv, i) => (
+ <div key={i} style={{textAlign: 'center'}}>
+ <div
+ style={{
+ width: 40 + i * 8,
+ height: 40 + i * 8,
+ borderRadius: rv,
+ backgroundColor:
+ i === 1
+ ? t.preview.accent
+ : 'var(--color-background-muted)',
+ border:
+ i !== 1
+ ? '1px solid var(--color-border-default)'
+ : 'none',
+ }}
+ />
+ <XDSText
+ type="supporting"
+ color="secondary"
+ style={{
+ display: 'block',
+ marginTop: 4,
+ fontSize: 10,
+ }}>
+ {Math.round(rv)}px
+ </XDSText>
+ </div>
+ ))}
+ </div>
+ </div>
+ {/* Right — actions */}
+ <div style={{width: 220, flexShrink: 0, paddingTop: 8}}>
+ <XDSButton
+ label="Customize theme"
+ onClick={() => {
+ setThemePreviewKey(null);
+ setActiveView('theme');
+ }}
+ style={{width: '100%', marginBottom: 12}}
+ />
+ <XDSButton
+ label="Close"
+ variant="secondary"
+ onClick={() => setThemePreviewKey(null)}
+ style={{width: '100%', marginBottom: 24}}
+ />
+ {/* More themes */}
+ <XDSText
+ type="label"
+ color="secondary"
+ style={{marginBottom: 12, display: 'block'}}>
+ More themes
+ </XDSText>
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 8,
+ }}>
+ {THEME_PICKER_ENTRIES.filter(
+ e => e.key !== themePreviewKey,
+ )
+ .slice(0, 4)
+ .map(other => (
+ <div
+ key={other.key}
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ gap: 10,
+ padding: '8px 10px',
+ borderRadius: 8,
+ cursor: 'pointer',
+ transition: 'background-color 150ms',
+ }}
+ onClick={() => setThemePreviewKey(other.key)}
+ onMouseEnter={e =>
+ (e.currentTarget.style.backgroundColor =
+ 'var(--color-background-muted)')
+ }
+ onMouseLeave={e =>
+ (e.currentTarget.style.backgroundColor =
+ 'transparent')
+ }>
+ <div
+ style={{
+ width: 20,
+ height: 20,
+ borderRadius: other.preview.radius ?? 4,
+ backgroundColor: other.preview.accent,
+ flexShrink: 0,
+ }}
+ />
+ <XDSText type="body" style={{fontSize: 13}}>
+ {other.name}
+ </XDSText>
+ </div>
+ ))}
+ </div>
+ </div>
+ </div>
+ </div>
+ </XDSDialog>
+ );
+ })()}
{/* Settings dialog */}
<XDSDialog
isOpen={isSettingsOpen}
@@ -1868,7 +2257,7 @@ function DocsiteLandingTemplate() {
}
/>
</XDSStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSStack direction="horizontal" hAlign="between" vAlign="center">
<XDSStack direction="vertical" gap={1}>
<XDSText type="body" style={{fontWeight: 600}}>
@@ -1897,7 +2286,7 @@ function DocsiteLandingTemplate() {
]}
/>
</XDSStack>
- <XDSDivider />
+ <XDSDivider variant="strong" />
<XDSStack direction="horizontal" hAlign="between" vAlign="center">
<XDSStack direction="vertical" gap={1}>
<XDSText type="body" style={{fontWeight: 600}}>
@@ -1913,15 +2302,15 @@ function DocsiteLandingTemplate() {
sortOption === 'trending'
? 'Trending'
: sortOption === 'newest'
- ? 'Newest first'
- : 'Oldest first',
+ ? 'Newest'
+ : 'Oldest',
variant: 'secondary',
size: 'sm',
}}
items={[
{label: 'Trending', onClick: () => setSortOption('trending')},
- {label: 'Newest first', onClick: () => setSortOption('newest')},
- {label: 'Oldest first', onClick: () => setSortOption('oldest')},
+ {label: 'Newest', onClick: () => setSortOption('newest')},
+ {label: 'Oldest', onClick: () => setSortOption('oldest')},
]}
/>
</XDSStack>