@astryxdesign/cli 0.1.0-canary.f94dd07 → 0.1.1-canary.a514b99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/README.md +117 -75
- package/bin/astryx.mjs +22 -7
- package/docs/icons.doc.mjs +1 -1
- package/docs/migration.doc.mjs +2 -2
- package/docs/shape.doc.mjs +1 -1
- package/docs/styling.doc.mjs +2 -2
- package/docs/theme.doc.dense.mjs +2 -2
- package/docs/theme.doc.mjs +14 -0
- package/docs/theme.doc.zh.mjs +2 -2
- package/docs/working-with-ai.doc.mjs +4 -4
- package/package.json +8 -8
- package/src/api/search.mjs +207 -13
- package/src/api/template.mjs +2 -1
- package/src/codemods/__tests__/registry.test.mjs +1 -0
- package/src/codemods/registry.mjs +1 -0
- package/src/codemods/runner.mjs +105 -51
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-config-surfaces.test.mjs +116 -0
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +51 -0
- package/src/codemods/transforms/v0.1.0/index.mjs +28 -0
- package/src/codemods/transforms/v0.1.0/migrate-xds-config-surfaces.mjs +230 -0
- package/src/codemods/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +84 -0
- package/src/commands/agent-docs.mjs +92 -56
- package/src/commands/agent-docs.path-safety.test.mjs +1 -1
- package/src/commands/agent-docs.test.mjs +66 -10
- package/src/commands/build-theme.import-path.test.mjs +1 -1
- package/src/commands/build-theme.path-safety.test.mjs +1 -1
- package/src/commands/build-theme.prose.test.mjs +1 -1
- package/src/commands/build.mjs +196 -0
- package/src/commands/component-package.test.mjs +1 -1
- package/src/commands/component.test.mjs +1 -1
- package/src/commands/docs.test.mjs +1 -1
- package/src/commands/doctor.test.mjs +1 -1
- package/src/commands/external-showcase.test.mjs +1 -1
- package/src/commands/init.mjs +9 -1
- package/src/commands/interactive-guard.test.mjs +1 -1
- package/src/commands/json-contract.test.mjs +10 -3
- package/src/commands/swizzle-gap-safety.test.mjs +1 -1
- package/src/commands/swizzle.path-safety.test.mjs +1 -1
- package/src/commands/template.path-safety.test.mjs +1 -1
- package/src/commands/template.test.mjs +1 -1
- package/src/commands/upgrade.mjs +353 -169
- package/src/commands/upgrade.test.mjs +41 -27
- package/src/index.mjs +1 -0
- package/src/lib/config.mjs +12 -0
- package/src/lib/config.test.mjs +42 -0
- package/src/lib/error-codes.mjs +3 -0
- package/src/types/error-codes.d.ts +1 -0
- package/src/utils/interactive.mjs +1 -1
- package/src/utils/interactive.test.mjs +2 -0
- package/src/utils/package-manager.test.mjs +1 -1
- package/src/utils/path-safety.test.mjs +1 -1
- package/src/utils/paths.test.mjs +8 -8
- package/src/utils/update-check.mjs +4 -26
- package/src/utils/update-check.test.mjs +2 -64
- package/templates/blocks/components/AppShell/AppShellContentOnly.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellShowcase.tsx +1 -10
- package/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellWithBanner.tsx +1 -9
- package/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +12 -19
- package/templates/blocks/components/Banner/BannerShowcase.tsx +1 -8
- package/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -8
- package/templates/blocks/components/Carousel/CarouselShowcase.tsx +2 -12
- package/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx +6 -9
- package/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +10 -12
- package/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx +1 -9
- package/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx +1 -9
- package/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx +1 -9
- package/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +1 -8
- package/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx +1 -8
- package/templates/blocks/components/Citation/CitationInlineText.tsx +4 -4
- package/templates/blocks/components/Code/CodeInlineInParagraph.tsx +1 -8
- package/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx +1 -1
- package/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx +1 -1
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx +9 -12
- package/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +13 -15
- package/templates/blocks/components/Divider/DividerShowcase.tsx +1 -8
- package/templates/blocks/components/Divider/DividerVertical.tsx +7 -9
- package/templates/blocks/components/Field/FieldShowcase.tsx +1 -8
- package/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx +1 -6
- package/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx +1 -9
- package/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx +4 -6
- package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -6
- package/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +2 -8
- package/templates/blocks/components/HoverCard/HoverCardShowcase.tsx +1 -8
- package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +2 -12
- package/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx +8 -11
- package/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +9 -12
- package/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +4 -17
- package/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +15 -16
- package/templates/blocks/components/Overlay/OverlayShowcase.tsx +5 -21
- package/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +2 -14
- package/templates/blocks/components/Pagination/PaginationPageSize.tsx +12 -14
- package/templates/blocks/components/Pagination/PaginationVariants.tsx +1 -8
- package/templates/blocks/components/Pagination/PaginationWithTable.tsx +2 -14
- package/templates/blocks/components/Tokenizer/TokenizerClear.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +2 -7
- package/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +2 -7
- package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerStates.tsx +4 -9
- package/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +1 -10
- package/templates/blocks/components/Toolbar/ToolbarSizes.tsx +1 -8
- package/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +1 -8
- package/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +1 -10
- package/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +8 -11
- package/templates/pages/ai-chat/page.tsx +71 -64
- package/templates/pages/ai-chat-landing/page.tsx +8 -12
- package/templates/pages/centered-hero/page.tsx +13 -15
- package/templates/pages/classic-gallery/page.tsx +27 -34
- package/templates/pages/detail-page/page.tsx +18 -18
- package/templates/pages/documentation/page.tsx +11 -14
- package/templates/pages/documentation-design/page.tsx +10 -13
- package/templates/pages/documentation-technical/page.tsx +15 -16
- package/templates/pages/editor/page.tsx +42 -54
- package/templates/pages/file-explorer/page.tsx +13 -16
- package/templates/pages/form-two-column/page.tsx +13 -17
- package/templates/pages/gallery-hero/page.tsx +13 -15
- package/templates/pages/ide/page.tsx +32 -39
- package/templates/pages/library/page.tsx +16 -23
- package/templates/pages/login/page.tsx +14 -18
- package/templates/pages/login-card/page.tsx +14 -18
- package/templates/pages/login-split/page.tsx +50 -48
- package/templates/pages/login-sso/page.tsx +9 -13
- package/templates/pages/mixed-gallery/page.tsx +51 -45
- package/templates/pages/payment-form/page.tsx +56 -70
- package/templates/pages/product-detail/page.tsx +27 -33
- package/templates/pages/product-gallery/page.tsx +7 -13
- package/templates/pages/settings-dialog/page.tsx +35 -43
- package/templates/pages/settings-sidebar/page.tsx +39 -47
- package/templates/pages/side-gallery/page.tsx +6 -9
- package/templates/pages/table-grouped/page.tsx +11 -15
- package/templates/pages/theme-showcase/page.tsx +33 -37
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import React, {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
5
|
+
import React, {useState, type CSSProperties} from 'react';
|
|
7
6
|
import {
|
|
8
7
|
VStack,
|
|
9
8
|
HStack,
|
|
@@ -26,11 +25,6 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';
|
|
|
26
25
|
import {Badge} from '@astryxdesign/core/Badge';
|
|
27
26
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
28
27
|
import {Center} from '@astryxdesign/core/Center';
|
|
29
|
-
import {
|
|
30
|
-
colorVars,
|
|
31
|
-
radiusVars,
|
|
32
|
-
spacingVars,
|
|
33
|
-
} from '@astryxdesign/core/theme/tokens.stylex';
|
|
34
28
|
import {
|
|
35
29
|
UserIcon,
|
|
36
30
|
LockClosedIcon,
|
|
@@ -46,33 +40,31 @@ import {
|
|
|
46
40
|
ShareIcon,
|
|
47
41
|
} from '@heroicons/react/24/outline';
|
|
48
42
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
});
|
|
43
|
+
const iconBox: CSSProperties = {
|
|
44
|
+
borderRadius: 'var(--radius-container)',
|
|
45
|
+
backgroundColor: 'var(--color-background-surface)',
|
|
46
|
+
flexShrink: 0,
|
|
47
|
+
};
|
|
48
|
+
// Sticky dialog header bar — no Astryx prop for sticky/background/z-index.
|
|
49
|
+
// Inline + block padding comes from the parent LayoutContent `padding`.
|
|
50
|
+
const headerSticky: CSSProperties = {
|
|
51
|
+
position: 'sticky',
|
|
52
|
+
top: 0,
|
|
53
|
+
backgroundColor: 'var(--color-background-surface)',
|
|
54
|
+
zIndex: 1,
|
|
55
|
+
};
|
|
56
|
+
// No `maxWidth` prop on VStack — width only. Inline padding comes from
|
|
57
|
+
// the parent LayoutContent `padding`.
|
|
58
|
+
const contentMaxWidth: CSSProperties = {
|
|
59
|
+
maxWidth: 680,
|
|
60
|
+
};
|
|
61
|
+
// Aligns the sidebar heading with list-item label text. No heading margin prop.
|
|
62
|
+
const sideNavHeading: CSSProperties = {
|
|
63
|
+
marginInline: 'var(--spacing-4)',
|
|
64
|
+
};
|
|
65
|
+
const dialogHeight: CSSProperties = {
|
|
66
|
+
height: '85vh',
|
|
67
|
+
};
|
|
76
68
|
|
|
77
69
|
const NAV_ITEMS = [
|
|
78
70
|
{label: 'Personal information', icon: UserIcon},
|
|
@@ -274,7 +266,7 @@ export default function SettingsDialogTemplate() {
|
|
|
274
266
|
maxHeight="85vh"
|
|
275
267
|
padding={0}
|
|
276
268
|
purpose="form"
|
|
277
|
-
|
|
269
|
+
style={dialogHeight}>
|
|
278
270
|
<Layout
|
|
279
271
|
height="fill"
|
|
280
272
|
start={
|
|
@@ -284,7 +276,7 @@ export default function SettingsDialogTemplate() {
|
|
|
284
276
|
role="navigation"
|
|
285
277
|
padding={3}>
|
|
286
278
|
<VStack gap={4}>
|
|
287
|
-
<Heading level={2}
|
|
279
|
+
<Heading level={2} style={sideNavHeading}>
|
|
288
280
|
Account settings
|
|
289
281
|
</Heading>
|
|
290
282
|
<List density="spacious">
|
|
@@ -315,7 +307,7 @@ export default function SettingsDialogTemplate() {
|
|
|
315
307
|
content={
|
|
316
308
|
<LayoutContent isScrollable padding={6}>
|
|
317
309
|
<VStack gap={6}>
|
|
318
|
-
<VStack
|
|
310
|
+
<VStack style={headerSticky}>
|
|
319
311
|
<DialogHeader
|
|
320
312
|
title={
|
|
321
313
|
activeNav === 'Personal information'
|
|
@@ -326,7 +318,7 @@ export default function SettingsDialogTemplate() {
|
|
|
326
318
|
hasDivider={false}
|
|
327
319
|
/>
|
|
328
320
|
</VStack>
|
|
329
|
-
<VStack gap={0}
|
|
321
|
+
<VStack gap={0} style={contentMaxWidth}>
|
|
330
322
|
{activeNav === 'Personal information' && (
|
|
331
323
|
<VStack gap={6}>
|
|
332
324
|
<VStack gap={4}>
|
|
@@ -441,7 +433,7 @@ export default function SettingsDialogTemplate() {
|
|
|
441
433
|
<Center
|
|
442
434
|
width={48}
|
|
443
435
|
height={48}
|
|
444
|
-
|
|
436
|
+
style={iconBox}>
|
|
445
437
|
<Icon icon={LockClosedIcon} />
|
|
446
438
|
</Center>
|
|
447
439
|
<VStack gap={0}>
|
|
@@ -465,7 +457,7 @@ export default function SettingsDialogTemplate() {
|
|
|
465
457
|
<Center
|
|
466
458
|
width={48}
|
|
467
459
|
height={48}
|
|
468
|
-
|
|
460
|
+
style={iconBox}>
|
|
469
461
|
<Icon icon={PencilSquareIcon} />
|
|
470
462
|
</Center>
|
|
471
463
|
<VStack gap={0}>
|
|
@@ -491,7 +483,7 @@ export default function SettingsDialogTemplate() {
|
|
|
491
483
|
<Center
|
|
492
484
|
width={48}
|
|
493
485
|
height={48}
|
|
494
|
-
|
|
486
|
+
style={iconBox}>
|
|
495
487
|
<Icon icon={ShareIcon} />
|
|
496
488
|
</Center>
|
|
497
489
|
<VStack gap={0}>
|
|
@@ -620,7 +612,7 @@ export default function SettingsDialogTemplate() {
|
|
|
620
612
|
<Center
|
|
621
613
|
width={48}
|
|
622
614
|
height={48}
|
|
623
|
-
|
|
615
|
+
style={iconBox}>
|
|
624
616
|
<Icon icon={LockClosedIcon} />
|
|
625
617
|
</Center>
|
|
626
618
|
<VStack gap={1}>
|
|
@@ -813,7 +805,7 @@ export default function SettingsDialogTemplate() {
|
|
|
813
805
|
<Center
|
|
814
806
|
width={48}
|
|
815
807
|
height={48}
|
|
816
|
-
|
|
808
|
+
style={iconBox}>
|
|
817
809
|
<Icon icon={ShieldCheckIcon} />
|
|
818
810
|
</Center>
|
|
819
811
|
<VStack gap={1}>
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import {useState} from 'react';
|
|
5
|
+
import {useState, type CSSProperties} from 'react';
|
|
6
6
|
import {useMediaQuery} from '@astryxdesign/core/hooks';
|
|
7
|
-
import * as stylex from '@stylexjs/stylex';
|
|
8
7
|
import {
|
|
9
8
|
VStack,
|
|
10
9
|
HStack,
|
|
@@ -27,11 +26,6 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';
|
|
|
27
26
|
import {Badge} from '@astryxdesign/core/Badge';
|
|
28
27
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
29
28
|
import {Center} from '@astryxdesign/core/Center';
|
|
30
|
-
import {
|
|
31
|
-
colorVars,
|
|
32
|
-
radiusVars,
|
|
33
|
-
spacingVars,
|
|
34
|
-
} from '@astryxdesign/core/theme/tokens.stylex';
|
|
35
29
|
import {
|
|
36
30
|
UserIcon,
|
|
37
31
|
LockClosedIcon,
|
|
@@ -49,29 +43,27 @@ import {
|
|
|
49
43
|
ChevronRightIcon,
|
|
50
44
|
} from '@heroicons/react/24/outline';
|
|
51
45
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
});
|
|
46
|
+
// Anchor the page to the viewport height so the sidebar + content fill the
|
|
47
|
+
// screen. Layout height="fill" is min-height:100% which collapses when the
|
|
48
|
+
// host container is content-sized; Layout has no viewport-height prop.
|
|
49
|
+
const fillViewport: CSSProperties = {
|
|
50
|
+
minHeight: '100dvh',
|
|
51
|
+
};
|
|
52
|
+
const iconBox: CSSProperties = {
|
|
53
|
+
borderRadius: 'var(--radius-container)',
|
|
54
|
+
backgroundColor: 'var(--color-background-surface)',
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
};
|
|
57
|
+
const rowPadding: CSSProperties = {
|
|
58
|
+
paddingBlock: 'var(--spacing-4)',
|
|
59
|
+
};
|
|
60
|
+
const sideNavPadding: CSSProperties = {
|
|
61
|
+
paddingBlock: 'var(--spacing-4)',
|
|
62
|
+
paddingInline: 'var(--spacing-3)',
|
|
63
|
+
};
|
|
64
|
+
const sideNavHeading: CSSProperties = {
|
|
65
|
+
marginInline: 'var(--spacing-4)',
|
|
66
|
+
};
|
|
75
67
|
|
|
76
68
|
const NAV_ITEMS = [
|
|
77
69
|
{label: 'Personal information', icon: UserIcon},
|
|
@@ -129,7 +121,7 @@ const DEVICE_ROWS: {
|
|
|
129
121
|
function InfoRowItem({label, value, action}: InfoRow) {
|
|
130
122
|
return (
|
|
131
123
|
<>
|
|
132
|
-
<HStack hAlign="between" vAlign="start"
|
|
124
|
+
<HStack hAlign="between" vAlign="start" style={rowPadding}>
|
|
133
125
|
<VStack gap={0}>
|
|
134
126
|
<Text type="body" weight="semibold" display="block">
|
|
135
127
|
{label}
|
|
@@ -167,7 +159,7 @@ function ExpandableRow({
|
|
|
167
159
|
return (
|
|
168
160
|
<>
|
|
169
161
|
{isExpanded ? (
|
|
170
|
-
<VStack gap={4}
|
|
162
|
+
<VStack gap={4} style={rowPadding}>
|
|
171
163
|
<Text type="body" weight="semibold" display="block">
|
|
172
164
|
{label}
|
|
173
165
|
</Text>
|
|
@@ -178,7 +170,7 @@ function ExpandableRow({
|
|
|
178
170
|
</HStack>
|
|
179
171
|
</VStack>
|
|
180
172
|
) : (
|
|
181
|
-
<HStack hAlign="between" vAlign="start"
|
|
173
|
+
<HStack hAlign="between" vAlign="start" style={rowPadding}>
|
|
182
174
|
<VStack gap={0}>
|
|
183
175
|
<Text type="body" weight="semibold" display="block">
|
|
184
176
|
{label}
|
|
@@ -263,8 +255,8 @@ export default function SettingsSecurityTemplate() {
|
|
|
263
255
|
};
|
|
264
256
|
|
|
265
257
|
const navList = (
|
|
266
|
-
<VStack gap={4}
|
|
267
|
-
<Heading level={2}
|
|
258
|
+
<VStack gap={4} style={sideNavPadding}>
|
|
259
|
+
<Heading level={2} style={sideNavHeading}>
|
|
268
260
|
Account settings
|
|
269
261
|
</Heading>
|
|
270
262
|
<List density="spacious">
|
|
@@ -299,7 +291,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
299
291
|
return (
|
|
300
292
|
<Layout
|
|
301
293
|
height="fill"
|
|
302
|
-
|
|
294
|
+
style={fillViewport}
|
|
303
295
|
content={<LayoutContent padding={2}>{navList}</LayoutContent>}
|
|
304
296
|
/>
|
|
305
297
|
);
|
|
@@ -309,7 +301,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
309
301
|
<Layout
|
|
310
302
|
height="fill"
|
|
311
303
|
contentWidth={1200}
|
|
312
|
-
|
|
304
|
+
style={fillViewport}
|
|
313
305
|
start={
|
|
314
306
|
isNarrow ? undefined : (
|
|
315
307
|
<LayoutPanel hasDivider padding={0}>
|
|
@@ -385,7 +377,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
385
377
|
key={i}
|
|
386
378
|
gap={3}
|
|
387
379
|
vAlign="start"
|
|
388
|
-
|
|
380
|
+
style={rowPadding}>
|
|
389
381
|
<Icon icon={ComputerDesktopIcon} />
|
|
390
382
|
<StackItem size="fill">
|
|
391
383
|
<VStack gap={0}>
|
|
@@ -419,7 +411,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
419
411
|
<HStack
|
|
420
412
|
hAlign="between"
|
|
421
413
|
vAlign="start"
|
|
422
|
-
|
|
414
|
+
style={rowPadding}>
|
|
423
415
|
<VStack gap={0}>
|
|
424
416
|
<Text
|
|
425
417
|
type="body"
|
|
@@ -459,7 +451,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
459
451
|
<Center
|
|
460
452
|
width={48}
|
|
461
453
|
height={48}
|
|
462
|
-
|
|
454
|
+
style={iconBox}>
|
|
463
455
|
<Icon icon={LockClosedIcon} />
|
|
464
456
|
</Center>
|
|
465
457
|
<VStack gap={1}>
|
|
@@ -659,7 +651,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
659
651
|
<Card padding={4}>
|
|
660
652
|
<VStack gap={4}>
|
|
661
653
|
<HStack gap={3} vAlign="start">
|
|
662
|
-
<Center width={48} height={48}
|
|
654
|
+
<Center width={48} height={48} style={iconBox}>
|
|
663
655
|
<Icon icon={LockClosedIcon} />
|
|
664
656
|
</Center>
|
|
665
657
|
<VStack gap={0}>
|
|
@@ -677,7 +669,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
677
669
|
</HStack>
|
|
678
670
|
<Divider />
|
|
679
671
|
<HStack gap={3} vAlign="start">
|
|
680
|
-
<Center width={48} height={48}
|
|
672
|
+
<Center width={48} height={48} style={iconBox}>
|
|
681
673
|
<Icon icon={PencilSquareIcon} />
|
|
682
674
|
</Center>
|
|
683
675
|
<VStack gap={0}>
|
|
@@ -697,7 +689,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
697
689
|
</HStack>
|
|
698
690
|
<Divider />
|
|
699
691
|
<HStack gap={3} vAlign="start">
|
|
700
|
-
<Center width={48} height={48}
|
|
692
|
+
<Center width={48} height={48} style={iconBox}>
|
|
701
693
|
<Icon icon={ShareIcon} />
|
|
702
694
|
</Center>
|
|
703
695
|
<VStack gap={0}>
|
|
@@ -725,7 +717,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
725
717
|
<VStack gap={8}>
|
|
726
718
|
<VStack gap={0}>
|
|
727
719
|
<Heading level={3}>Messages</Heading>
|
|
728
|
-
<VStack
|
|
720
|
+
<VStack style={rowPadding}>
|
|
729
721
|
<Switch
|
|
730
722
|
label="Show people when I've read their messages."
|
|
731
723
|
value={readReceipts}
|
|
@@ -737,7 +729,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
737
729
|
<HStack
|
|
738
730
|
hAlign="between"
|
|
739
731
|
vAlign="center"
|
|
740
|
-
|
|
732
|
+
style={rowPadding}>
|
|
741
733
|
<Text type="body" weight="semibold">
|
|
742
734
|
Blocked people
|
|
743
735
|
</Text>
|
|
@@ -748,7 +740,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
748
740
|
|
|
749
741
|
<VStack gap={0}>
|
|
750
742
|
<Heading level={3}>Listings</Heading>
|
|
751
|
-
<VStack
|
|
743
|
+
<VStack style={rowPadding}>
|
|
752
744
|
<Switch
|
|
753
745
|
label="Include my listing(s) in search engines"
|
|
754
746
|
description="Turning this on means search engines, like Google, will display your listing page(s) in search results."
|
|
@@ -833,7 +825,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
833
825
|
<Center
|
|
834
826
|
width={48}
|
|
835
827
|
height={48}
|
|
836
|
-
|
|
828
|
+
style={iconBox}>
|
|
837
829
|
<Icon icon={ShieldCheckIcon} />
|
|
838
830
|
</Center>
|
|
839
831
|
<VStack gap={1}>
|
|
@@ -13,21 +13,18 @@ import {Button} from '@astryxdesign/core/Button';
|
|
|
13
13
|
import {AspectRatio} from '@astryxdesign/core/AspectRatio';
|
|
14
14
|
import {Grid} from '@astryxdesign/core/Grid';
|
|
15
15
|
import {Divider} from '@astryxdesign/core/Divider';
|
|
16
|
-
import * as stylex from '@stylexjs/stylex';
|
|
17
16
|
|
|
18
|
-
// Image fill is a plain inline style
|
|
19
|
-
// preview's runtime TS compile
|
|
17
|
+
// Image fill is a plain inline style so it renders without any CSS compiler
|
|
18
|
+
// (works in the playground preview's runtime TS compile too).
|
|
20
19
|
const imageStyle = {
|
|
21
20
|
width: '100%',
|
|
22
21
|
height: '100%',
|
|
23
22
|
objectFit: 'cover' as const,
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
});
|
|
25
|
+
const imageClip = {
|
|
26
|
+
borderRadius: 'var(--radius-element)',
|
|
27
|
+
};
|
|
31
28
|
|
|
32
29
|
// ─── Image Data ─────────────────────────────────────────────────────────────
|
|
33
30
|
|
|
@@ -91,7 +88,7 @@ function ImageGrid() {
|
|
|
91
88
|
return (
|
|
92
89
|
<Grid columns={3} gap={3}>
|
|
93
90
|
{IMAGES.map(img => (
|
|
94
|
-
<AspectRatio key={img.src} ratio={1}
|
|
91
|
+
<AspectRatio key={img.src} ratio={1} style={imageClip}>
|
|
95
92
|
<img src={img.src} alt={img.alt} style={imageStyle} />
|
|
96
93
|
</AspectRatio>
|
|
97
94
|
))}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import React, {useState, useMemo} from 'react';
|
|
6
6
|
import {useResizable, ResizeHandle} from '@astryxdesign/core/Resizable';
|
|
7
7
|
import type {ResizableProps} from '@astryxdesign/core/Resizable';
|
|
8
|
-
import * as stylex from '@stylexjs/stylex';
|
|
9
8
|
import {
|
|
10
9
|
Layout,
|
|
11
10
|
LayoutContent,
|
|
@@ -56,15 +55,15 @@ import {
|
|
|
56
55
|
import {XMarkIcon} from '@heroicons/react/24/outline';
|
|
57
56
|
import {ChartBarIcon} from '@heroicons/react/24/solid';
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
58
|
+
// Plain inline styles using Astryx design-token CSS variables (declared at
|
|
59
|
+
// :root by `@astryxdesign/core/astryx.css`). No StyleX compiler required.
|
|
60
|
+
// The group-header background + cursor live on the colSpan TableCell (which
|
|
61
|
+
// reliably forwards `style`) so they fill the full row width.
|
|
62
|
+
const groupHeaderCell: React.CSSProperties = {
|
|
63
|
+
cursor: 'pointer',
|
|
64
|
+
backgroundColor: 'var(--color-background-muted)',
|
|
65
|
+
padding: 'var(--spacing-3) var(--spacing-4)',
|
|
66
|
+
};
|
|
68
67
|
|
|
69
68
|
// Types
|
|
70
69
|
type TaskStatus = 'in_progress' | 'todo' | 'backlog' | 'done';
|
|
@@ -988,11 +987,8 @@ export default function DataTableTemplate() {
|
|
|
988
987
|
e.preventDefault();
|
|
989
988
|
toggleGroup(key);
|
|
990
989
|
}
|
|
991
|
-
}}
|
|
992
|
-
|
|
993
|
-
<TableCell
|
|
994
|
-
colSpan={COL_COUNT}
|
|
995
|
-
xstyle={pageStyles.groupHeaderCell}>
|
|
990
|
+
}}>
|
|
991
|
+
<TableCell colSpan={COL_COUNT} style={groupHeaderCell}>
|
|
996
992
|
<HStack gap={2} vAlign="center">
|
|
997
993
|
<Icon
|
|
998
994
|
icon={
|