@astryxdesign/cli 0.1.2-canary.2200fc9 → 0.1.2-canary.22ccb69
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/package.json +7 -7
- package/templates/blocks/components/DropdownMenu/DropdownMenuShowcase.tsx +5 -0
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemShowcase.tsx +4 -1
- package/templates/blocks/components/MoreMenu/MoreMenuShowcase.tsx +5 -0
- package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.doc.mjs +14 -0
- package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.tsx +64 -0
- package/templates/blocks/components/TreeListItem/TreeListItemShowcase.doc.mjs +14 -0
- package/templates/blocks/components/TreeListItem/TreeListItemShowcase.tsx +60 -0
- package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.doc.mjs +0 -14
- package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +0 -28
- package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.tsx +0 -15
- package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.doc.mjs +0 -14
- package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.tsx +0 -16
- package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.doc.mjs +0 -19
- package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.tsx +0 -34
- package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.tsx +0 -30
- package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.doc.mjs +0 -14
- package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.tsx +0 -31
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.doc.mjs +0 -14
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.tsx +0 -26
- package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.doc.mjs +0 -14
- package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.tsx +0 -32
- package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.doc.mjs +0 -18
- package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +0 -32
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.tsx +0 -27
- package/templates/blocks/components/ContextMenu/ContextMenuBasic.doc.mjs +0 -14
- package/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +0 -32
- package/templates/blocks/components/DialogHeader/DialogHeaderBasic.doc.mjs +0 -14
- package/templates/blocks/components/DialogHeader/DialogHeaderBasic.tsx +0 -30
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.tsx +0 -27
- package/templates/blocks/components/FieldLabel/FieldLabelBasic.doc.mjs +0 -14
- package/templates/blocks/components/FieldLabel/FieldLabelBasic.tsx +0 -20
- package/templates/blocks/components/FieldStatus/FieldStatusBasic.doc.mjs +0 -14
- package/templates/blocks/components/FieldStatus/FieldStatusBasic.tsx +0 -23
- package/templates/blocks/components/FileInput/FileInputBasic.doc.mjs +0 -14
- package/templates/blocks/components/FileInput/FileInputBasic.tsx +0 -22
- package/templates/blocks/components/GridSpan/GridSpanColumns.doc.mjs +0 -14
- package/templates/blocks/components/GridSpan/GridSpanColumns.tsx +0 -38
- package/templates/blocks/components/HStack/HStackBasic.doc.mjs +0 -14
- package/templates/blocks/components/HStack/HStackBasic.tsx +0 -16
- package/templates/blocks/components/InputGroup/InputGroupBasic.doc.mjs +0 -14
- package/templates/blocks/components/InputGroup/InputGroupBasic.tsx +0 -27
- package/templates/blocks/components/LayoutContent/LayoutContentBasic.doc.mjs +0 -23
- package/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +0 -40
- package/templates/blocks/components/LayoutFooter/LayoutFooterActions.doc.mjs +0 -22
- package/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +0 -41
- package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.doc.mjs +0 -23
- package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +0 -40
- package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.doc.mjs +0 -22
- package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +0 -37
- package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.tsx +0 -19
- package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.doc.mjs +0 -23
- package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.tsx +0 -42
- package/templates/blocks/components/NavIcon/NavIconBasic.doc.mjs +0 -14
- package/templates/blocks/components/NavIcon/NavIconBasic.tsx +0 -16
- package/templates/blocks/components/RadioListItem/RadioListItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/RadioListItem/RadioListItemBasic.tsx +0 -30
- package/templates/blocks/components/Resizable/ResizableSidebar.doc.mjs +0 -25
- package/templates/blocks/components/Resizable/ResizableSidebar.tsx +0 -67
- package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.tsx +0 -21
- package/templates/blocks/components/SelectorOption/SelectorOptionBasic.doc.mjs +0 -14
- package/templates/blocks/components/SelectorOption/SelectorOptionBasic.tsx +0 -39
- package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.tsx +0 -55
- package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.tsx +0 -38
- package/templates/blocks/components/SideNavItem/SideNavItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavItem/SideNavItemBasic.tsx +0 -49
- package/templates/blocks/components/SideNavSection/SideNavSectionBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavSection/SideNavSectionBasic.tsx +0 -71
- package/templates/blocks/components/StackItem/StackItemFill.doc.mjs +0 -14
- package/templates/blocks/components/StackItem/StackItemFill.tsx +0 -28
- package/templates/blocks/components/TabMenu/TabMenuBasic.doc.mjs +0 -14
- package/templates/blocks/components/TabMenu/TabMenuBasic.tsx +0 -23
- package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.tsx +0 -22
- package/templates/blocks/components/TopNavItem/TopNavItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavItem/TopNavItemBasic.tsx +0 -21
- package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.doc.mjs +0 -20
- package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.tsx +0 -46
- package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.tsx +0 -16
- package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.tsx +0 -26
- package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.tsx +0 -43
- package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.tsx +0 -43
- package/templates/blocks/components/VStack/VStackBasic.doc.mjs +0 -14
- package/templates/blocks/components/VStack/VStackBasic.tsx +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.1.2-canary.
|
|
3
|
+
"version": "0.1.2-canary.22ccb69",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"zod": "^4.4.3"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@astryxdesign/core": "0.1.2-canary.
|
|
79
|
-
"@astryxdesign/lab": "0.1.2-canary.
|
|
80
|
-
"@astryxdesign/theme-neutral": "0.1.2-canary.
|
|
78
|
+
"@astryxdesign/core": "0.1.2-canary.22ccb69",
|
|
79
|
+
"@astryxdesign/lab": "0.1.2-canary.22ccb69",
|
|
80
|
+
"@astryxdesign/theme-neutral": "0.1.2-canary.22ccb69",
|
|
81
81
|
"gpt-tokenizer": "^2.0.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependenciesMeta": {
|
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@astryxdesign/core": "0.1.2-canary.
|
|
96
|
-
"@astryxdesign/lab": "0.1.2-canary.
|
|
97
|
-
"@astryxdesign/theme-neutral": "0.1.2-canary.
|
|
95
|
+
"@astryxdesign/core": "0.1.2-canary.22ccb69",
|
|
96
|
+
"@astryxdesign/lab": "0.1.2-canary.22ccb69",
|
|
97
|
+
"@astryxdesign/theme-neutral": "0.1.2-canary.22ccb69",
|
|
98
98
|
"gpt-tokenizer": "^2.0.0"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
+
import {useState} from 'react';
|
|
5
6
|
import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';
|
|
6
7
|
|
|
7
8
|
export default function DropdownMenuShowcase() {
|
|
9
|
+
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
10
|
+
|
|
8
11
|
return (
|
|
9
12
|
<DropdownMenu
|
|
13
|
+
isMenuOpen={isMenuOpen}
|
|
14
|
+
onOpenChange={setIsMenuOpen}
|
|
10
15
|
button={{label: 'Actions'}}
|
|
11
16
|
items={[
|
|
12
17
|
{label: 'Edit', onClick: () => {}},
|
|
@@ -65,7 +65,10 @@ const TrashIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
|
|
65
65
|
|
|
66
66
|
export default function DropdownMenuItemShowcase() {
|
|
67
67
|
return (
|
|
68
|
-
<DropdownMenu
|
|
68
|
+
<DropdownMenu
|
|
69
|
+
button={{label: 'Actions'}}
|
|
70
|
+
isMenuOpen
|
|
71
|
+
onOpenChange={() => {}}>
|
|
69
72
|
<DropdownMenuItem
|
|
70
73
|
icon={PencilIcon}
|
|
71
74
|
label="Edit"
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
+
import {useState} from 'react';
|
|
5
6
|
import {MoreMenu} from '@astryxdesign/core/MoreMenu';
|
|
6
7
|
|
|
7
8
|
export default function MoreMenuShowcase() {
|
|
9
|
+
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
10
|
+
|
|
8
11
|
return (
|
|
9
12
|
<MoreMenu
|
|
13
|
+
isMenuOpen={isMenuOpen}
|
|
14
|
+
onOpenChange={setIsMenuOpen}
|
|
10
15
|
items={[
|
|
11
16
|
{label: 'Edit', onClick: () => {}},
|
|
12
17
|
{label: 'Duplicate', onClick: () => {}},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'TreeListBranches',
|
|
7
|
+
name: 'TreeListBranches',
|
|
8
|
+
displayName: 'Tree List Branches',
|
|
9
|
+
description: 'Tree with expandable branches at multiple nesting levels.',
|
|
10
|
+
isReady: true,
|
|
11
|
+
isShowcase: true,
|
|
12
|
+
aspectRatio: 4 / 3,
|
|
13
|
+
componentsUsed: ['TreeList'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {TreeList} from '@astryxdesign/core/TreeList';
|
|
6
|
+
|
|
7
|
+
const noop = () => {};
|
|
8
|
+
|
|
9
|
+
export default function TreeListBranchesShowcase() {
|
|
10
|
+
return (
|
|
11
|
+
<TreeList
|
|
12
|
+
items={[
|
|
13
|
+
{
|
|
14
|
+
id: 'design-system',
|
|
15
|
+
label: 'Design System',
|
|
16
|
+
isExpanded: true,
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
id: 'components',
|
|
20
|
+
label: 'Components',
|
|
21
|
+
isExpanded: true,
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
id: 'inputs',
|
|
25
|
+
label: 'Inputs',
|
|
26
|
+
children: [
|
|
27
|
+
{id: 'text-input', label: 'TextInput', onClick: noop},
|
|
28
|
+
{id: 'checkbox', label: 'Checkbox', onClick: noop},
|
|
29
|
+
{id: 'selector', label: 'Selector', onClick: noop},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'layout',
|
|
34
|
+
label: 'Layout',
|
|
35
|
+
children: [
|
|
36
|
+
{id: 'stack', label: 'Stack', onClick: noop},
|
|
37
|
+
{id: 'grid', label: 'Grid', onClick: noop},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'tokens',
|
|
44
|
+
label: 'Tokens',
|
|
45
|
+
children: [
|
|
46
|
+
{id: 'colors', label: 'Colors', onClick: noop},
|
|
47
|
+
{id: 'spacing', label: 'Spacing', onClick: noop},
|
|
48
|
+
{id: 'typography', label: 'Typography', onClick: noop},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 'utilities',
|
|
55
|
+
label: 'Utilities',
|
|
56
|
+
children: [
|
|
57
|
+
{id: 'hooks', label: 'Hooks', onClick: noop},
|
|
58
|
+
{id: 'helpers', label: 'Helpers', onClick: noop},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
]}
|
|
62
|
+
/>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'TreeListItem',
|
|
7
|
+
name: 'TreeListItem',
|
|
8
|
+
displayName: 'Tree List Item',
|
|
9
|
+
description: 'Tree items with descriptions, icons, badges, selection, disabled state, and nested expand/collapse. TreeList is data-driven: no composed children API.',
|
|
10
|
+
isReady: true,
|
|
11
|
+
isShowcase: true,
|
|
12
|
+
aspectRatio: 4 / 3,
|
|
13
|
+
componentsUsed: ['TreeList', 'Badge', 'Icon', 'Layout', 'Text'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {TreeList} from '@astryxdesign/core/TreeList';
|
|
6
|
+
import {Badge} from '@astryxdesign/core/Badge';
|
|
7
|
+
import {Icon} from '@astryxdesign/core/Icon';
|
|
8
|
+
|
|
9
|
+
const noop = () => {};
|
|
10
|
+
|
|
11
|
+
export default function TreeListItemShowcase() {
|
|
12
|
+
return (
|
|
13
|
+
<TreeList
|
|
14
|
+
style={{width: 400}}
|
|
15
|
+
items={[
|
|
16
|
+
{
|
|
17
|
+
id: 'inbox',
|
|
18
|
+
label: 'Inbox',
|
|
19
|
+
description: '12 unread messages',
|
|
20
|
+
isExpanded: true,
|
|
21
|
+
startContent: <Icon icon="info" size="sm" />,
|
|
22
|
+
endContent: <Badge label="12" variant="info" />,
|
|
23
|
+
children: [
|
|
24
|
+
{
|
|
25
|
+
id: 'primary',
|
|
26
|
+
label: 'Primary',
|
|
27
|
+
isSelected: true,
|
|
28
|
+
startContent: <Icon icon="check" size="sm" />,
|
|
29
|
+
onClick: noop,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'updates',
|
|
33
|
+
label: 'Updates',
|
|
34
|
+
endContent: <Badge label="4" variant="info" />,
|
|
35
|
+
onClick: noop,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 'drafts',
|
|
41
|
+
label: 'Drafts',
|
|
42
|
+
description: '3 draft messages',
|
|
43
|
+
startContent: <Icon icon="clock" size="sm" />,
|
|
44
|
+
onClick: noop,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'archive',
|
|
48
|
+
label: 'Archive',
|
|
49
|
+
onClick: noop,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'spam',
|
|
53
|
+
label: 'Spam',
|
|
54
|
+
isDisabled: true,
|
|
55
|
+
startContent: <Icon icon="warning" size="sm" />,
|
|
56
|
+
},
|
|
57
|
+
]}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'AvatarStatusDot',
|
|
7
|
-
name: 'AvatarStatusDot — Variants',
|
|
8
|
-
displayName: 'AvatarStatusDot — Variants',
|
|
9
|
-
description:
|
|
10
|
-
'Presence dots on Avatars using the success, neutral, and error variants. Pass an AvatarStatusDot to the Avatar status prop; the dot sizes itself to match the Avatar.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['Avatar', 'AvatarStatusDot', 'HStack'],
|
|
14
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {Avatar, AvatarStatusDot} from '@astryxdesign/core/Avatar';
|
|
6
|
-
import {HStack} from '@astryxdesign/core/Layout';
|
|
7
|
-
|
|
8
|
-
export default function AvatarStatusDotVariants() {
|
|
9
|
-
return (
|
|
10
|
-
<HStack gap={4} vAlign="center">
|
|
11
|
-
<Avatar
|
|
12
|
-
name="Ana Silva"
|
|
13
|
-
size="large"
|
|
14
|
-
status={<AvatarStatusDot variant="success" label="Online" />}
|
|
15
|
-
/>
|
|
16
|
-
<Avatar
|
|
17
|
-
name="Ben Okafor"
|
|
18
|
-
size="large"
|
|
19
|
-
status={<AvatarStatusDot variant="neutral" label="Away" />}
|
|
20
|
-
/>
|
|
21
|
-
<Avatar
|
|
22
|
-
name="Cleo Marsh"
|
|
23
|
-
size="large"
|
|
24
|
-
status={<AvatarStatusDot variant="error" label="Do not disturb" />}
|
|
25
|
-
/>
|
|
26
|
-
</HStack>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'BreadcrumbItem',
|
|
7
|
-
name: 'BreadcrumbItem — Basic',
|
|
8
|
-
displayName: 'BreadcrumbItem — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'Breadcrumb links inside a Breadcrumbs trail. Ancestor pages get an href; mark the last item with isCurrent to render it as plain text for the current page.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['Breadcrumbs', 'BreadcrumbItem'],
|
|
14
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {Breadcrumbs, BreadcrumbItem} from '@astryxdesign/core/Breadcrumbs';
|
|
6
|
-
|
|
7
|
-
export default function BreadcrumbItemBasic() {
|
|
8
|
-
return (
|
|
9
|
-
<Breadcrumbs>
|
|
10
|
-
<BreadcrumbItem href="/">Home</BreadcrumbItem>
|
|
11
|
-
<BreadcrumbItem href="/settings">Settings</BreadcrumbItem>
|
|
12
|
-
<BreadcrumbItem isCurrent>Profile</BreadcrumbItem>
|
|
13
|
-
</Breadcrumbs>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'ButtonGroup',
|
|
7
|
-
name: 'ButtonGroup — Basic',
|
|
8
|
-
displayName: 'ButtonGroup — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'Three related actions joined into a single connected control. Provide a group label for accessibility and keep all buttons the same variant so they read as one unit.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['ButtonGroup', 'Button'],
|
|
14
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {ButtonGroup} from '@astryxdesign/core/ButtonGroup';
|
|
6
|
-
import {Button} from '@astryxdesign/core/Button';
|
|
7
|
-
|
|
8
|
-
export default function ButtonGroupBasic() {
|
|
9
|
-
return (
|
|
10
|
-
<ButtonGroup label="Text editing actions">
|
|
11
|
-
<Button label="Copy" />
|
|
12
|
-
<Button label="Cut" />
|
|
13
|
-
<Button label="Paste" />
|
|
14
|
-
</ButtonGroup>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'ChatDictationButton',
|
|
7
|
-
name: 'ChatDictationButton — Basic',
|
|
8
|
-
displayName: 'ChatDictationButton — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'A dictation button wired to useChatDictation and placed in the sendActions slot of a ChatComposer. Click the microphone to transcribe speech into the input.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: [
|
|
14
|
-
'Chat',
|
|
15
|
-
'ChatDictationButton',
|
|
16
|
-
'ChatComposer',
|
|
17
|
-
'ChatComposerInput',
|
|
18
|
-
],
|
|
19
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {useRef} from 'react';
|
|
6
|
-
import {
|
|
7
|
-
ChatDictationButton,
|
|
8
|
-
ChatComposer,
|
|
9
|
-
ChatComposerInput,
|
|
10
|
-
useChatDictation,
|
|
11
|
-
} from '@astryxdesign/core/Chat';
|
|
12
|
-
import type {ChatComposerInputHandle} from '@astryxdesign/core/Chat';
|
|
13
|
-
import {Stack} from '@astryxdesign/core/Layout';
|
|
14
|
-
|
|
15
|
-
export default function ChatDictationButtonBasic() {
|
|
16
|
-
const inputRef = useRef<ChatComposerInputHandle>(null);
|
|
17
|
-
|
|
18
|
-
const dictation = useChatDictation({
|
|
19
|
-
inputRef,
|
|
20
|
-
onResult: text => {
|
|
21
|
-
console.log('Dictation result:', text);
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Stack direction="vertical" width="100%" style={{maxWidth: 450}}>
|
|
27
|
-
<ChatComposer
|
|
28
|
-
onSubmit={value => console.log('Submit:', value)}
|
|
29
|
-
input={<ChatComposerInput handleRef={inputRef} />}
|
|
30
|
-
sendActions={<ChatDictationButton dictation={dictation} />}
|
|
31
|
-
/>
|
|
32
|
-
</Stack>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'CheckboxListItem',
|
|
7
|
-
name: 'CheckboxListItem — Basic',
|
|
8
|
-
displayName: 'CheckboxListItem — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'Checkbox items with labels and descriptions inside a controlled CheckboxList. Use for multi-select option groups like notification preferences.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['CheckboxList', 'CheckboxListItem'],
|
|
14
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {useState} from 'react';
|
|
6
|
-
import {CheckboxList, CheckboxListItem} from '@astryxdesign/core/CheckboxList';
|
|
7
|
-
|
|
8
|
-
export default function CheckboxListItemBasic() {
|
|
9
|
-
const [value, setValue] = useState<string[]>(['updates']);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<CheckboxList label="Email preferences" value={value} onChange={setValue}>
|
|
13
|
-
<CheckboxListItem
|
|
14
|
-
label="Product updates"
|
|
15
|
-
value="updates"
|
|
16
|
-
description="New features and improvements"
|
|
17
|
-
/>
|
|
18
|
-
<CheckboxListItem
|
|
19
|
-
label="Security alerts"
|
|
20
|
-
value="security"
|
|
21
|
-
description="Important account security notifications"
|
|
22
|
-
/>
|
|
23
|
-
<CheckboxListItem
|
|
24
|
-
label="Marketing"
|
|
25
|
-
value="marketing"
|
|
26
|
-
description="Tips, offers, and promotions"
|
|
27
|
-
/>
|
|
28
|
-
</CheckboxList>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'CollapsibleGroup',
|
|
7
|
-
name: 'CollapsibleGroup — Accordion',
|
|
8
|
-
displayName: 'CollapsibleGroup — Accordion',
|
|
9
|
-
description:
|
|
10
|
-
'An accordion built with type="single": opening one Collapsible automatically closes the others. Use defaultValue to pre-expand the most important section.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['CollapsibleGroup', 'Collapsible', 'VStack', 'Text'],
|
|
14
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {Collapsible, CollapsibleGroup} from '@astryxdesign/core/Collapsible';
|
|
6
|
-
import {VStack} from '@astryxdesign/core/Layout';
|
|
7
|
-
import {Text} from '@astryxdesign/core/Text';
|
|
8
|
-
|
|
9
|
-
export default function CollapsibleGroupAccordion() {
|
|
10
|
-
return (
|
|
11
|
-
<CollapsibleGroup type="single" defaultValue="account">
|
|
12
|
-
<VStack gap={2} width="100%">
|
|
13
|
-
<Collapsible trigger="Account" value="account">
|
|
14
|
-
<Text type="body" color="secondary">
|
|
15
|
-
Manage your profile details, email address, and password.
|
|
16
|
-
</Text>
|
|
17
|
-
</Collapsible>
|
|
18
|
-
<Collapsible trigger="Notifications" value="notifications">
|
|
19
|
-
<Text type="body" color="secondary">
|
|
20
|
-
Choose which activity triggers email and push notifications.
|
|
21
|
-
</Text>
|
|
22
|
-
</Collapsible>
|
|
23
|
-
<Collapsible trigger="Billing" value="billing">
|
|
24
|
-
<Text type="body" color="secondary">
|
|
25
|
-
View invoices and update your payment method.
|
|
26
|
-
</Text>
|
|
27
|
-
</Collapsible>
|
|
28
|
-
</VStack>
|
|
29
|
-
</CollapsibleGroup>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'CommandPaletteEmpty',
|
|
7
|
-
name: 'CommandPaletteEmpty — Basic',
|
|
8
|
-
displayName: 'CommandPaletteEmpty — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'A command palette with no results, showing a custom empty message via emptyBootstrapText. Use to explain why the palette is empty and what the user can do next.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['CommandPalette', 'CommandPaletteEmpty', 'Text'],
|
|
14
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {useMemo} from 'react';
|
|
6
|
-
import {CommandPalette} from '@astryxdesign/core/CommandPalette';
|
|
7
|
-
import {Text} from '@astryxdesign/core/Text';
|
|
8
|
-
import {createStaticSource} from '@astryxdesign/core/Typeahead';
|
|
9
|
-
|
|
10
|
-
export default function CommandPaletteEmptyBasic() {
|
|
11
|
-
const emptySource = useMemo(() => createStaticSource([]), []);
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<CommandPalette
|
|
15
|
-
isOpen
|
|
16
|
-
isInline
|
|
17
|
-
onOpenChange={() => {}}
|
|
18
|
-
searchSource={emptySource}
|
|
19
|
-
emptyBootstrapText={
|
|
20
|
-
<Text type="supporting" color="secondary">
|
|
21
|
-
No commands available
|
|
22
|
-
</Text>
|
|
23
|
-
}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'CommandPaletteFooter',
|
|
7
|
-
name: 'CommandPaletteFooter — Basic',
|
|
8
|
-
displayName: 'CommandPaletteFooter — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'A command palette footer with no children, rendering the built-in keyboard navigation hints. Use CommandPaletteFooter without content to get the default arrow-key, Enter, and Esc hints below the results list.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['CommandPalette', 'CommandPaletteFooter'],
|
|
14
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {useMemo} from 'react';
|
|
6
|
-
import {
|
|
7
|
-
CommandPalette,
|
|
8
|
-
CommandPaletteFooter,
|
|
9
|
-
} from '@astryxdesign/core/CommandPalette';
|
|
10
|
-
import {createStaticSource} from '@astryxdesign/core/Typeahead';
|
|
11
|
-
|
|
12
|
-
export default function CommandPaletteFooterBasic() {
|
|
13
|
-
const source = useMemo(
|
|
14
|
-
() =>
|
|
15
|
-
createStaticSource([
|
|
16
|
-
{id: 'new-file', label: 'New File'},
|
|
17
|
-
{id: 'open-recent', label: 'Open Recent'},
|
|
18
|
-
{id: 'save-all', label: 'Save All'},
|
|
19
|
-
]),
|
|
20
|
-
[],
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<CommandPalette
|
|
25
|
-
isOpen
|
|
26
|
-
isInline
|
|
27
|
-
onOpenChange={() => {}}
|
|
28
|
-
searchSource={source}
|
|
29
|
-
footer={<CommandPaletteFooter />}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'CommandPaletteGroup',
|
|
7
|
-
name: 'CommandPaletteGroup — Basic',
|
|
8
|
-
displayName: 'CommandPaletteGroup — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'Command palette items organized under group headings using the composed CommandPaletteGroup form. Use to separate related commands into labeled sections.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: [
|
|
14
|
-
'CommandPaletteGroup',
|
|
15
|
-
'CommandPaletteItem',
|
|
16
|
-
'CommandPaletteList',
|
|
17
|
-
],
|
|
18
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
CommandPaletteList,
|
|
7
|
-
CommandPaletteGroup,
|
|
8
|
-
CommandPaletteItem,
|
|
9
|
-
} from '@astryxdesign/core/CommandPalette';
|
|
10
|
-
|
|
11
|
-
export default function CommandPaletteGroupBasic() {
|
|
12
|
-
return (
|
|
13
|
-
<CommandPaletteList>
|
|
14
|
-
<CommandPaletteGroup heading="Navigation">
|
|
15
|
-
<CommandPaletteItem value="home" onSelect={() => {}}>
|
|
16
|
-
Go to Home
|
|
17
|
-
</CommandPaletteItem>
|
|
18
|
-
<CommandPaletteItem value="dashboard" onSelect={() => {}}>
|
|
19
|
-
Go to Dashboard
|
|
20
|
-
</CommandPaletteItem>
|
|
21
|
-
</CommandPaletteGroup>
|
|
22
|
-
<CommandPaletteGroup heading="Actions">
|
|
23
|
-
<CommandPaletteItem value="new-file" onSelect={() => {}}>
|
|
24
|
-
New File
|
|
25
|
-
</CommandPaletteItem>
|
|
26
|
-
<CommandPaletteItem value="save-all" onSelect={() => {}}>
|
|
27
|
-
Save All
|
|
28
|
-
</CommandPaletteItem>
|
|
29
|
-
</CommandPaletteGroup>
|
|
30
|
-
</CommandPaletteList>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'CommandPaletteItem',
|
|
7
|
-
name: 'CommandPaletteItem — Basic',
|
|
8
|
-
displayName: 'CommandPaletteItem — Basic',
|
|
9
|
-
description:
|
|
10
|
-
'Selectable command palette items inside a CommandPaletteList, including highlighted and disabled states. Use when composing a palette manually instead of a search source.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['CommandPaletteItem', 'CommandPaletteList'],
|
|
14
|
-
};
|