@astryxdesign/cli 0.3.0-canary.fbc60c5 → 0.3.0-canary.fcbc342
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/README.md +8 -8
- package/api/blog/blog.doc.mjs +2 -2
- package/api/build/build.doc.mjs +1 -1
- package/api/component/component.doc.mjs +1 -1
- package/api/discover/discover.doc.mjs +2 -2
- package/api/docs/docs.doc.mjs +2 -2
- package/api/doctor/doctor.doc.mjs +3 -3
- package/api/hook/hook.doc.mjs +1 -1
- package/api/init/init.doc.mjs +1 -1
- package/api/integration/summarizeIssues.doc.mjs +1 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/json/assertResponse.doc.mjs +2 -2
- package/api/json/isError.doc.mjs +1 -1
- package/api/json/parseResponse.doc.mjs +2 -2
- package/api/layout/layoutCheck.doc.mjs +1 -1
- package/api/layout/layoutExpand.doc.mjs +1 -1
- package/api/layout/layoutGrammar.doc.mjs +1 -1
- package/api/swizzle/swizzle.doc.mjs +1 -1
- package/api/template/template.test.mjs +38 -13
- package/api/theme/listThemes.doc.mjs +2 -2
- package/api/theme/themeAdd.doc.mjs +1 -1
- package/api/theme/themeBuild.doc.mjs +3 -3
- package/api/theme/themeList.doc.mjs +2 -2
- package/api/upgrade/upgrade.doc.mjs +1 -1
- package/assets/codemods/transforms/next/__tests__/next-codemods.test.mjs +92 -0
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/rename-dropdown-menu-radio-dot-target.mjs +152 -0
- package/assets/codemods/transforms/v0.3.0/__tests__/migrate-grid-minchildwidth-to-columns.test.mjs +82 -0
- package/assets/codemods/transforms/v0.3.0/__tests__/migrate-table-rowexpansion-to-tree.test.mjs +201 -0
- package/assets/codemods/transforms/v0.3.0/index.mjs +8 -0
- package/assets/codemods/transforms/v0.3.0/migrate-grid-minchildwidth-to-columns.mjs +38 -2
- package/assets/codemods/transforms/v0.3.0/migrate-table-rowexpansion-to-tree.mjs +214 -0
- package/assets/docs/browser-support.doc.mjs +6 -6
- package/assets/docs/getting-started.doc.mjs +3 -3
- package/assets/docs/icons.doc.mjs +3 -3
- package/assets/docs/illustrations.doc.mjs +2 -2
- package/assets/docs/internationalization.doc.mjs +1 -1
- package/assets/docs/layout.doc.dense.mjs +1 -1
- package/assets/docs/migration.doc.mjs +1 -1
- package/assets/docs/principles.doc.mjs +1 -1
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/styling.doc.mjs +4 -4
- package/assets/docs/theme.doc.mjs +3 -3
- package/assets/docs/typography.doc.mjs +2 -2
- package/assets/templates/blocks/components/AspectRatio/AspectRatioCircleImage.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +3 -3
- package/assets/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarFallbackChain.tsx +6 -6
- package/assets/templates/blocks/components/Avatar/AvatarGroup.tsx +5 -5
- package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +2 -2
- package/assets/templates/blocks/components/Avatar/AvatarShowcase.tsx +4 -4
- package/assets/templates/blocks/components/Avatar/AvatarTooltip.tsx +4 -4
- package/assets/templates/blocks/components/Avatar/AvatarUserCard.tsx +3 -3
- package/assets/templates/blocks/components/Avatar/AvatarWithImage.tsx +4 -4
- package/assets/templates/blocks/components/Avatar/AvatarWithStatus.tsx +3 -3
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerAttachments.tsx +5 -5
- package/assets/templates/blocks/components/Lightbox/LightboxGallery.tsx +4 -4
- package/assets/templates/blocks/components/Lightbox/LightboxShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Lightbox/LightboxVideo.tsx +1 -1
- package/assets/templates/blocks/components/Lightbox/LightboxZoom.tsx +2 -2
- package/assets/templates/blocks/components/MediaTheme/MediaThemeImageOverlay.tsx +1 -1
- package/assets/templates/blocks/components/MediaTheme/MediaThemeLightScrim.tsx +1 -1
- package/assets/templates/blocks/components/MediaTheme/MediaThemeShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +1 -1
- package/assets/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +1 -1
- package/assets/templates/blocks/components/Overlay/OverlayShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Stepper/StepperHorizontal.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperHorizontal.tsx +24 -0
- package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.tsx +68 -0
- package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.tsx +92 -0
- package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.tsx +41 -0
- package/assets/templates/blocks/components/Stepper/StepperShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/Stepper/StepperShowcase.tsx +25 -0
- package/assets/templates/blocks/components/Stepper/StepperStatus.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperStatus.tsx +50 -0
- package/assets/templates/blocks/components/Stepper/StepperVerticalOnboarding.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperVerticalOnboarding.tsx +40 -0
- package/assets/templates/blocks/components/Table/TableRowExpansionTable.tsx +61 -58
- package/assets/templates/blocks/components/TextArea/TextAreaStates.tsx +1 -1
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +1 -1
- package/assets/templates/pages/centered-hero/page.tsx +1 -1
- package/assets/templates/pages/classic-gallery/page.tsx +10 -10
- package/assets/templates/pages/detail-page/page.tsx +5 -5
- package/assets/templates/pages/form-two-column/page.tsx +1 -1
- package/assets/templates/pages/gallery-hero/page.tsx +3 -3
- package/assets/templates/pages/library/page.tsx +30 -30
- package/assets/templates/pages/login/page.tsx +1 -2
- package/assets/templates/pages/login-card/page.tsx +1 -2
- package/assets/templates/pages/login-split/page.tsx +5 -6
- package/assets/templates/pages/login-sso/page.tsx +2 -3
- package/assets/templates/pages/mixed-gallery/page.tsx +5 -5
- package/assets/templates/pages/payment-form/page.tsx +3 -3
- package/assets/templates/pages/product-detail/page.tsx +7 -7
- package/assets/templates/pages/product-gallery/page.tsx +6 -6
- package/assets/templates/pages/shell-top-nav/page.tsx +2 -2
- package/assets/templates/pages/side-gallery/page.tsx +9 -9
- package/assets/templates/pages/table-page-chart/page.tsx +6 -6
- package/assets/templates/pages/theme-showcase/page.tsx +6 -6
- package/assets/templates/themes/neutral/neutralTheme.ts +4 -1
- package/authoring/codemod/codemod.doc.mjs +2 -2
- package/authoring/config/config.doc.mjs +1 -1
- package/authoring/doctypes/base/type.ts +21 -0
- package/authoring/doctypes/command/command.doc.mjs +2 -2
- package/authoring/doctypes/component/component.doc.mjs +7 -7
- package/authoring/doctypes/enum/enum.doc.mjs +2 -2
- package/authoring/doctypes/function/function.doc.mjs +3 -3
- package/authoring/doctypes/hook/hook.doc.mjs +3 -3
- package/authoring/doctypes/reference/reference.doc.mjs +3 -3
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/doctypes/template/template.doc.mjs +3 -3
- package/clients/cli/commands/build-theme.registry.test.mjs +14 -1
- package/clients/cli/commands/build.doc.mjs +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -1
- package/clients/cli/commands/doctor.doc.mjs +2 -2
- package/clients/cli/commands/layout-expand.doc.mjs +1 -1
- package/clients/cli/commands/layout.doc.mjs +1 -1
- package/clients/cli/commands/manifest.doc.mjs +3 -3
- package/clients/cli/commands/search.doc.mjs +1 -1
- package/clients/cli/commands/theme-add.doc.mjs +1 -1
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/commands/theme-list.doc.mjs +1 -1
- package/clients/cli/commands/theme.doc.mjs +2 -2
- package/clients/cli/commands/validate-integration.doc.mjs +2 -2
- package/foundation/agent-docs/agent-docs.mjs +3 -4
- package/foundation/agent-docs/agent-docs.test.mjs +8 -0
- package/foundation/discovery/template-adapter.d.mts +6 -3
- package/foundation/discovery/template-adapter.mjs +33 -13
- package/foundation/response/response-types.doc.mjs +7 -7
- package/foundation/response/response.doc.mjs +5 -5
- package/package.json +9 -9
|
@@ -15,17 +15,17 @@ export default function AvatarTooltip() {
|
|
|
15
15
|
</Text>
|
|
16
16
|
<Stack direction="horizontal" gap={4} vAlign="center">
|
|
17
17
|
<Avatar
|
|
18
|
-
src="
|
|
18
|
+
src="/template-assets/DATA-Ana-Thomas.png"
|
|
19
19
|
name="Ana Thomas"
|
|
20
20
|
size="xl"
|
|
21
21
|
/>
|
|
22
22
|
<Avatar
|
|
23
|
-
src="
|
|
23
|
+
src="/template-assets/DATA-Drew-Young.png"
|
|
24
24
|
name="Drew Young"
|
|
25
25
|
size="xl"
|
|
26
26
|
/>
|
|
27
27
|
<Avatar
|
|
28
|
-
src="
|
|
28
|
+
src="/template-assets/DATA-Jihoo-Song.png"
|
|
29
29
|
name="Jihoo Song"
|
|
30
30
|
size="xl"
|
|
31
31
|
/>
|
|
@@ -36,7 +36,7 @@ export default function AvatarTooltip() {
|
|
|
36
36
|
Custom tooltip text
|
|
37
37
|
</Text>
|
|
38
38
|
<Avatar
|
|
39
|
-
src="
|
|
39
|
+
src="/template-assets/DATA-Itai-Jordaan.png"
|
|
40
40
|
name="Itai Jordaan"
|
|
41
41
|
size="xl"
|
|
42
42
|
tooltip="Itai Jordaan · Engineering Lead"
|
|
@@ -9,19 +9,19 @@ import {Text} from '@astryxdesign/core/Text';
|
|
|
9
9
|
const USERS = [
|
|
10
10
|
{
|
|
11
11
|
name: 'Itai Jordaan',
|
|
12
|
-
src: '
|
|
12
|
+
src: '/template-assets/DATA-Itai-Jordaan.png',
|
|
13
13
|
role: 'Engineering Lead',
|
|
14
14
|
variant: 'success' as const,
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
name: 'Margot Schroder',
|
|
18
|
-
src: '
|
|
18
|
+
src: '/template-assets/DATA-Margot-Schroder.png',
|
|
19
19
|
role: 'Product Designer',
|
|
20
20
|
variant: 'neutral' as const,
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
name: 'Daniela Gimenez',
|
|
24
|
-
src: '
|
|
24
|
+
src: '/template-assets/DATA-Daniela-Gimenez.png',
|
|
25
25
|
role: 'Engineering Manager',
|
|
26
26
|
variant: 'error' as const,
|
|
27
27
|
},
|
|
@@ -9,22 +9,22 @@ export default function AvatarWithImage() {
|
|
|
9
9
|
return (
|
|
10
10
|
<Stack direction="horizontal" gap={4} vAlign="center">
|
|
11
11
|
<Avatar
|
|
12
|
-
src="
|
|
12
|
+
src="/template-assets/DATA-Ami-Pena.png"
|
|
13
13
|
name="Ami Pena"
|
|
14
14
|
size="xsm"
|
|
15
15
|
/>
|
|
16
16
|
<Avatar
|
|
17
|
-
src="
|
|
17
|
+
src="/template-assets/DATA-Ana-Thomas.png"
|
|
18
18
|
name="Ana Thomas"
|
|
19
19
|
size="md"
|
|
20
20
|
/>
|
|
21
21
|
<Avatar
|
|
22
|
-
src="
|
|
22
|
+
src="/template-assets/DATA-Daniela-Gimenez.png"
|
|
23
23
|
name="Daniela Gimenez"
|
|
24
24
|
size="lg"
|
|
25
25
|
/>
|
|
26
26
|
<Avatar
|
|
27
|
-
src="
|
|
27
|
+
src="/template-assets/DATA-Gabriela-Fernandez.png"
|
|
28
28
|
name="Gabriela Fernandez"
|
|
29
29
|
size="xl"
|
|
30
30
|
/>
|
|
@@ -9,19 +9,19 @@ export default function AvatarWithStatus() {
|
|
|
9
9
|
return (
|
|
10
10
|
<Stack direction="horizontal" gap={4} vAlign="center">
|
|
11
11
|
<Avatar
|
|
12
|
-
src="
|
|
12
|
+
src="/template-assets/DATA-Itai-Jordaan.png"
|
|
13
13
|
name="Itai Jordaan"
|
|
14
14
|
size="xl"
|
|
15
15
|
status={<AvatarStatusDot variant="success" label="Online" />}
|
|
16
16
|
/>
|
|
17
17
|
<Avatar
|
|
18
|
-
src="
|
|
18
|
+
src="/template-assets/DATA-Margot-Schroder.png"
|
|
19
19
|
name="Margot Schroder"
|
|
20
20
|
size="xl"
|
|
21
21
|
status={<AvatarStatusDot variant="neutral" label="Offline" />}
|
|
22
22
|
/>
|
|
23
23
|
<Avatar
|
|
24
|
-
src="
|
|
24
|
+
src="/template-assets/DATA-Pablo-Morales.png"
|
|
25
25
|
name="Pablo Morales"
|
|
26
26
|
size="xl"
|
|
27
27
|
status={<AvatarStatusDot variant="error" label="Busy" />}
|
package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerAttachments.tsx
CHANGED
|
@@ -11,31 +11,31 @@ import {Stack} from '@astryxdesign/core/Layout';
|
|
|
11
11
|
const IMAGE_ATTACHMENTS = [
|
|
12
12
|
{
|
|
13
13
|
id: '1',
|
|
14
|
-
src: '
|
|
14
|
+
src: '/template-assets/illustrative-vertical-1.png',
|
|
15
15
|
alt: 'River through a valley',
|
|
16
16
|
label: 'valley.jpg',
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
id: '2',
|
|
20
|
-
src: '
|
|
20
|
+
src: '/template-assets/illustrative-vertical-2.png',
|
|
21
21
|
alt: 'Foggy mountain peak',
|
|
22
22
|
label: 'mountain.jpg',
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
id: '3',
|
|
26
|
-
src: '
|
|
26
|
+
src: '/template-assets/illustrative-vertical-3.png',
|
|
27
27
|
alt: 'Golden retriever puppy',
|
|
28
28
|
label: 'puppy.jpg',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: '4',
|
|
32
|
-
src: '
|
|
32
|
+
src: '/template-assets/illustrative-vertical-4.png',
|
|
33
33
|
alt: 'Bridge at sunset',
|
|
34
34
|
label: 'bridge.jpg',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
id: '5',
|
|
38
|
-
src: '
|
|
38
|
+
src: '/template-assets/illustrative-vertical-5.png',
|
|
39
39
|
alt: 'Lakeside at dusk',
|
|
40
40
|
label: 'lakeside.jpg',
|
|
41
41
|
},
|
|
@@ -8,23 +8,23 @@ import {Thumbnail} from '@astryxdesign/core/Thumbnail';
|
|
|
8
8
|
|
|
9
9
|
const PHOTOS = [
|
|
10
10
|
{
|
|
11
|
-
src: '
|
|
11
|
+
src: '/template-assets/Neutral-Backpack.png',
|
|
12
12
|
alt: 'Backpack',
|
|
13
13
|
caption: 'A backpack displayed on a neutral background.',
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
src: '
|
|
16
|
+
src: '/template-assets/building.png',
|
|
17
17
|
alt: 'Modern building',
|
|
18
18
|
caption: 'A modern building with a contemporary architectural design.',
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
src: '
|
|
21
|
+
src: '/template-assets/light-scene-horizontal-1.png',
|
|
22
22
|
alt: 'Coastal shoreline with ocean waves',
|
|
23
23
|
caption:
|
|
24
24
|
'A scenic coastline with waves rolling onto a sandy beach beneath a clear sky.',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
src: '
|
|
27
|
+
src: '/template-assets/illustrative-vertical-1.png',
|
|
28
28
|
alt: 'Illustrated lakeside landscape at sunset',
|
|
29
29
|
caption:
|
|
30
30
|
'A stylized landscape illustration featuring pink clouds reflected over a calm lake at sunset.',
|
|
@@ -12,7 +12,7 @@ export default function LightboxShowcase() {
|
|
|
12
12
|
isOpen={isOpen}
|
|
13
13
|
onOpenChange={setIsOpen}
|
|
14
14
|
media={{
|
|
15
|
-
src: '
|
|
15
|
+
src: '/template-assets/light-scene-horizontal-1.png',
|
|
16
16
|
alt: 'Coastal shoreline with ocean waves',
|
|
17
17
|
caption:
|
|
18
18
|
'A scenic coastline with waves rolling onto a sandy beach beneath a clear sky.',
|
|
@@ -16,7 +16,7 @@ export default function LightboxVideo() {
|
|
|
16
16
|
isOpen={isOpen}
|
|
17
17
|
onOpenChange={setIsOpen}
|
|
18
18
|
media={{
|
|
19
|
-
src: '
|
|
19
|
+
src: '/template-assets/Nature-1.mp4',
|
|
20
20
|
alt: 'Flower blooming in time-lapse',
|
|
21
21
|
type: 'video',
|
|
22
22
|
caption: 'A flower blooming in time-lapse',
|
|
@@ -12,7 +12,7 @@ export default function LightboxZoom() {
|
|
|
12
12
|
return (
|
|
13
13
|
<>
|
|
14
14
|
<Thumbnail
|
|
15
|
-
src="
|
|
15
|
+
src="/template-assets/light-scene-horizontal-1.png"
|
|
16
16
|
alt="Coastal shoreline with ocean waves"
|
|
17
17
|
label="Coastal shoreline with ocean waves"
|
|
18
18
|
onClick={() => setIsOpen(true)}
|
|
@@ -21,7 +21,7 @@ export default function LightboxZoom() {
|
|
|
21
21
|
isOpen={isOpen}
|
|
22
22
|
onOpenChange={setIsOpen}
|
|
23
23
|
media={{
|
|
24
|
-
src: '
|
|
24
|
+
src: '/template-assets/light-scene-horizontal-1.png',
|
|
25
25
|
alt: 'Coastal shoreline with ocean waves',
|
|
26
26
|
caption:
|
|
27
27
|
'A scenic coastline. Double-click to zoom in and drag to pan.',
|
|
@@ -10,7 +10,7 @@ import {Stack} from '@astryxdesign/core/Layout';
|
|
|
10
10
|
import {Text} from '@astryxdesign/core/Text';
|
|
11
11
|
|
|
12
12
|
const LANDSCAPE_IMAGE_URL =
|
|
13
|
-
'
|
|
13
|
+
'/template-assets/light-scene-horizontal-1.png';
|
|
14
14
|
|
|
15
15
|
export default function MediaThemeImageOverlay() {
|
|
16
16
|
return (
|
|
@@ -10,7 +10,7 @@ import {Stack} from '@astryxdesign/core/Layout';
|
|
|
10
10
|
import {Text} from '@astryxdesign/core/Text';
|
|
11
11
|
|
|
12
12
|
const BRIGHT_ROOM_IMAGE_URL =
|
|
13
|
-
'
|
|
13
|
+
'/template-assets/light-home-square-1.png';
|
|
14
14
|
|
|
15
15
|
export default function MediaThemeLightScrim() {
|
|
16
16
|
return (
|
|
@@ -11,7 +11,7 @@ import {Badge} from '@astryxdesign/core/Badge';
|
|
|
11
11
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
12
12
|
|
|
13
13
|
const SHOWCASE_IMAGE_URL =
|
|
14
|
-
'
|
|
14
|
+
'/template-assets/light-scene-horizontal-1.png';
|
|
15
15
|
|
|
16
16
|
export default function MediaThemeShowcase() {
|
|
17
17
|
return (
|
|
@@ -33,7 +33,7 @@ export default function OverlayBottomStrip() {
|
|
|
33
33
|
overflow: 'clip',
|
|
34
34
|
}}>
|
|
35
35
|
<img
|
|
36
|
-
src="
|
|
36
|
+
src="/template-assets/illustrative-horizontal-1.png"
|
|
37
37
|
alt="Product highlight preview"
|
|
38
38
|
style={{width: '100%', height: '100%', objectFit: 'cover'}}
|
|
39
39
|
/>
|
|
@@ -28,7 +28,7 @@ export default function OverlayHoverReveal() {
|
|
|
28
28
|
content={<Button label="Quick view" variant="secondary" size="sm" />}>
|
|
29
29
|
<AspectRatio ratio={16 / 9} style={frame}>
|
|
30
30
|
<img
|
|
31
|
-
src="
|
|
31
|
+
src="/template-assets/light-working-horizontal-1.png"
|
|
32
32
|
alt="Workspace preview"
|
|
33
33
|
style={image}
|
|
34
34
|
/>
|
|
@@ -29,7 +29,7 @@ export default function OverlayShowcase() {
|
|
|
29
29
|
overflow: 'clip',
|
|
30
30
|
}}>
|
|
31
31
|
<img
|
|
32
|
-
src="
|
|
32
|
+
src="/template-assets/light-scene-horizontal-1.png"
|
|
33
33
|
alt="Abstract landscape"
|
|
34
34
|
style={{width: '100%', height: '100%', objectFit: 'cover'}}
|
|
35
35
|
/>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'Stepper',
|
|
7
|
+
name: 'Stepper — Horizontal Progress',
|
|
8
|
+
displayName: 'Stepper — Horizontal Progress',
|
|
9
|
+
description:
|
|
10
|
+
'A horizontal separated stepper: each step owns a segment of the progress bar above its label. Filled segments track how far the flow has progressed.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: ['Stepper'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {Stepper, Step} from '@astryxdesign/lab';
|
|
7
|
+
|
|
8
|
+
export default function StepperHorizontal() {
|
|
9
|
+
const [active, setActive] = useState(1);
|
|
10
|
+
return (
|
|
11
|
+
<div style={{width: '100%', maxWidth: 600}}>
|
|
12
|
+
<Stepper
|
|
13
|
+
activeStep={active}
|
|
14
|
+
orientation="horizontal"
|
|
15
|
+
onStepClick={setActive}>
|
|
16
|
+
<Step step={0} label="Workspace" />
|
|
17
|
+
<Step step={1} label="Team" />
|
|
18
|
+
<Step step={2} label="Integrations" />
|
|
19
|
+
<Step step={3} label="Import" />
|
|
20
|
+
<Step step={4} label="Launch" />
|
|
21
|
+
</Stepper>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'Stepper',
|
|
7
|
+
name: 'Stepper — Indicator Modes',
|
|
8
|
+
displayName: 'Stepper — Indicator Modes',
|
|
9
|
+
description:
|
|
10
|
+
'The indicator prop side by side: auto (check when done, ring when current, number ahead), always-number, and a custom icon per step.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 4 / 3,
|
|
13
|
+
componentsUsed: ['Stepper', 'Text', 'Icon'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {Stepper, Step} from '@astryxdesign/lab';
|
|
7
|
+
import {Text} from '@astryxdesign/core/Text';
|
|
8
|
+
import {Icon} from '@astryxdesign/core/Icon';
|
|
9
|
+
|
|
10
|
+
export default function StepperIndicatorModes() {
|
|
11
|
+
const [active, setActive] = useState(2);
|
|
12
|
+
return (
|
|
13
|
+
<div style={{display: 'flex', gap: 48, flexWrap: 'wrap'}}>
|
|
14
|
+
<div style={{maxWidth: 220}}>
|
|
15
|
+
<Text type="label">Auto</Text>
|
|
16
|
+
<Stepper
|
|
17
|
+
activeStep={active}
|
|
18
|
+
orientation="vertical"
|
|
19
|
+
onStepClick={setActive}>
|
|
20
|
+
<Step step={0} label="Account" />
|
|
21
|
+
<Step step={1} label="Profile" />
|
|
22
|
+
<Step step={2} label="Settings" />
|
|
23
|
+
<Step step={3} label="Review" />
|
|
24
|
+
</Stepper>
|
|
25
|
+
</div>
|
|
26
|
+
<div style={{maxWidth: 220}}>
|
|
27
|
+
<Text type="label">Number</Text>
|
|
28
|
+
<Stepper
|
|
29
|
+
activeStep={active}
|
|
30
|
+
orientation="vertical"
|
|
31
|
+
onStepClick={setActive}>
|
|
32
|
+
<Step step={0} label="Account" indicator="number" />
|
|
33
|
+
<Step step={1} label="Profile" indicator="number" />
|
|
34
|
+
<Step step={2} label="Settings" indicator="number" />
|
|
35
|
+
<Step step={3} label="Review" indicator="number" />
|
|
36
|
+
</Stepper>
|
|
37
|
+
</div>
|
|
38
|
+
<div style={{maxWidth: 220}}>
|
|
39
|
+
<Text type="label">Custom icon</Text>
|
|
40
|
+
<Stepper
|
|
41
|
+
activeStep={active}
|
|
42
|
+
orientation="vertical"
|
|
43
|
+
onStepClick={setActive}>
|
|
44
|
+
<Step
|
|
45
|
+
step={0}
|
|
46
|
+
label="Account"
|
|
47
|
+
icon={<Icon icon="info" size="sm" />}
|
|
48
|
+
/>
|
|
49
|
+
<Step
|
|
50
|
+
step={1}
|
|
51
|
+
label="Profile"
|
|
52
|
+
icon={<Icon icon="search" size="sm" />}
|
|
53
|
+
/>
|
|
54
|
+
<Step
|
|
55
|
+
step={2}
|
|
56
|
+
label="Settings"
|
|
57
|
+
icon={<Icon icon="wrench" size="sm" />}
|
|
58
|
+
/>
|
|
59
|
+
<Step
|
|
60
|
+
step={3}
|
|
61
|
+
label="Review"
|
|
62
|
+
icon={<Icon icon="check" size="sm" />}
|
|
63
|
+
/>
|
|
64
|
+
</Stepper>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'Stepper',
|
|
7
|
+
name: 'Stepper — Multi-Step Form',
|
|
8
|
+
displayName: 'Stepper — Multi-Step Form',
|
|
9
|
+
description:
|
|
10
|
+
'A vertical stepper driving a multi-step form. Each step renders its own fields in the content slot for the active step, with Back/Continue buttons advancing activeStep.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 4 / 3,
|
|
13
|
+
componentsUsed: ['Stepper', 'TextInput', 'Button', 'Text'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {Stepper, Step} from '@astryxdesign/lab';
|
|
7
|
+
import {TextInput} from '@astryxdesign/core/TextInput';
|
|
8
|
+
import {Button} from '@astryxdesign/core/Button';
|
|
9
|
+
import {Text} from '@astryxdesign/core/Text';
|
|
10
|
+
|
|
11
|
+
export default function StepperMultiStepForm() {
|
|
12
|
+
const [active, setActive] = useState(0);
|
|
13
|
+
return (
|
|
14
|
+
<div style={{width: '100%', maxWidth: 480}}>
|
|
15
|
+
<Stepper
|
|
16
|
+
activeStep={active}
|
|
17
|
+
orientation="vertical"
|
|
18
|
+
onStepClick={setActive}>
|
|
19
|
+
<Step step={0} label="Project details" indicator="number">
|
|
20
|
+
{active === 0 && (
|
|
21
|
+
<div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
|
|
22
|
+
<TextInput
|
|
23
|
+
label="Project name"
|
|
24
|
+
placeholder="My awesome project"
|
|
25
|
+
value=""
|
|
26
|
+
/>
|
|
27
|
+
<TextInput
|
|
28
|
+
label="Repository URL"
|
|
29
|
+
placeholder="https://github.com/..."
|
|
30
|
+
value=""
|
|
31
|
+
/>
|
|
32
|
+
<div>
|
|
33
|
+
<Button
|
|
34
|
+
label="Continue"
|
|
35
|
+
variant="primary"
|
|
36
|
+
onClick={() => setActive(1)}
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
)}
|
|
41
|
+
</Step>
|
|
42
|
+
<Step step={1} label="Environment" indicator="number">
|
|
43
|
+
{active === 1 && (
|
|
44
|
+
<div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
|
|
45
|
+
<TextInput label="Node version" placeholder="20" value="" />
|
|
46
|
+
<TextInput
|
|
47
|
+
label="Build command"
|
|
48
|
+
placeholder="npm run build"
|
|
49
|
+
value=""
|
|
50
|
+
/>
|
|
51
|
+
<div style={{display: 'flex', gap: 8}}>
|
|
52
|
+
<Button
|
|
53
|
+
label="Back"
|
|
54
|
+
variant="secondary"
|
|
55
|
+
onClick={() => setActive(0)}
|
|
56
|
+
/>
|
|
57
|
+
<Button
|
|
58
|
+
label="Continue"
|
|
59
|
+
variant="primary"
|
|
60
|
+
onClick={() => setActive(2)}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
</Step>
|
|
66
|
+
<Step step={2} label="Deploy" indicator="number">
|
|
67
|
+
{active === 2 && (
|
|
68
|
+
<div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
|
|
69
|
+
<Text type="body">
|
|
70
|
+
Ready to deploy. This creates a production build and pushes to
|
|
71
|
+
your configured hosting.
|
|
72
|
+
</Text>
|
|
73
|
+
<div style={{display: 'flex', gap: 8}}>
|
|
74
|
+
<Button
|
|
75
|
+
label="Back"
|
|
76
|
+
variant="secondary"
|
|
77
|
+
onClick={() => setActive(1)}
|
|
78
|
+
/>
|
|
79
|
+
<Button
|
|
80
|
+
label="Deploy now"
|
|
81
|
+
variant="primary"
|
|
82
|
+
onClick={() => setActive(3)}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
</Step>
|
|
88
|
+
<Step step={3} label="Done" indicator="number" />
|
|
89
|
+
</Stepper>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'Stepper',
|
|
7
|
+
name: 'Stepper — On-Track Vertical',
|
|
8
|
+
displayName: 'Stepper — On-Track Vertical',
|
|
9
|
+
description:
|
|
10
|
+
'The on-track layout in vertical orientation: indicators sit inline on a continuous connector rail, with each label and description beside its node.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 4 / 3,
|
|
13
|
+
componentsUsed: ['Stepper'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {Stepper, Step} from '@astryxdesign/lab';
|
|
7
|
+
|
|
8
|
+
export default function StepperOnTrackVertical() {
|
|
9
|
+
const [active, setActive] = useState(2);
|
|
10
|
+
return (
|
|
11
|
+
<div style={{width: '100%', maxWidth: 400}}>
|
|
12
|
+
<Stepper
|
|
13
|
+
activeStep={active}
|
|
14
|
+
orientation="vertical"
|
|
15
|
+
indicatorPosition="on-track"
|
|
16
|
+
onStepClick={setActive}>
|
|
17
|
+
<Step
|
|
18
|
+
step={0}
|
|
19
|
+
label="Create workspace"
|
|
20
|
+
description="Name and configure your workspace"
|
|
21
|
+
/>
|
|
22
|
+
<Step
|
|
23
|
+
step={1}
|
|
24
|
+
label="Invite team members"
|
|
25
|
+
description="Add collaborators by email"
|
|
26
|
+
/>
|
|
27
|
+
<Step
|
|
28
|
+
step={2}
|
|
29
|
+
label="Set up integrations"
|
|
30
|
+
description="Connect Slack, GitHub, Jira"
|
|
31
|
+
/>
|
|
32
|
+
<Step
|
|
33
|
+
step={3}
|
|
34
|
+
label="Import data"
|
|
35
|
+
description="Bring in existing projects"
|
|
36
|
+
/>
|
|
37
|
+
<Step step={4} label="Launch" description="Go live with your team" />
|
|
38
|
+
</Stepper>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'Stepper',
|
|
7
|
+
name: 'Stepper — Checkout Progress',
|
|
8
|
+
displayName: 'Stepper — Checkout Progress',
|
|
9
|
+
description:
|
|
10
|
+
'A horizontal on-track stepper for a checkout flow: numbered nodes sit on a continuous connector, with completed and current steps filled. Click any step to jump.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
isShowcase: true,
|
|
13
|
+
aspectRatio: 16 / 9,
|
|
14
|
+
componentsUsed: ['Stepper'],
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {Stepper, Step} from '@astryxdesign/lab';
|
|
7
|
+
|
|
8
|
+
export default function StepperShowcase() {
|
|
9
|
+
const [active, setActive] = useState(2);
|
|
10
|
+
return (
|
|
11
|
+
<div style={{width: '100%', maxWidth: 640}}>
|
|
12
|
+
<Stepper
|
|
13
|
+
activeStep={active}
|
|
14
|
+
orientation="horizontal"
|
|
15
|
+
indicatorPosition="on-track"
|
|
16
|
+
onStepClick={setActive}>
|
|
17
|
+
<Step step={0} label="Cart" indicator="number" />
|
|
18
|
+
<Step step={1} label="Shipping" indicator="number" />
|
|
19
|
+
<Step step={2} label="Payment" indicator="number" />
|
|
20
|
+
<Step step={3} label="Review" indicator="number" />
|
|
21
|
+
<Step step={4} label="Confirm" indicator="number" />
|
|
22
|
+
</Stepper>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'Stepper',
|
|
7
|
+
name: 'Stepper — Validation Status',
|
|
8
|
+
displayName: 'Stepper — Validation Status',
|
|
9
|
+
description:
|
|
10
|
+
'Semantic status per step in a verification flow: success shows a green check, error a red glyph, accent the in-progress step. Status sets the indicator color and glyph only, never the connector, and is announced to assistive tech as text.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 4 / 3,
|
|
13
|
+
componentsUsed: ['Stepper'],
|
|
14
|
+
};
|