@astryxdesign/cli 0.6.5-canary.e5d11eb → 0.6.5-canary.eb0010b
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/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +38 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.doc.mjs +20 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.tsx +48 -0
- package/package.json +9 -9
package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.doc.mjs
ADDED
|
@@ -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: 'DropdownMenuGroup',
|
|
7
|
+
name: 'DropdownMenuGroup',
|
|
8
|
+
displayName: 'Dropdown Menu Group',
|
|
9
|
+
description:
|
|
10
|
+
'A compound-mode menu whose rows are titled in groups. Each DropdownMenuGroup renders a role="group" named by its heading; arrow keys and typeahead skip the heading.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
isShowcase: true,
|
|
13
|
+
aspectRatio: 16 / 9,
|
|
14
|
+
componentsUsed: ['DropdownMenu', 'DropdownMenuGroup', 'DropdownMenuItem'],
|
|
15
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
DropdownMenu,
|
|
7
|
+
DropdownMenuDivider,
|
|
8
|
+
DropdownMenuGroup,
|
|
9
|
+
DropdownMenuItem,
|
|
10
|
+
} from '@astryxdesign/core/DropdownMenu';
|
|
11
|
+
|
|
12
|
+
export default function DropdownMenuGroupShowcase() {
|
|
13
|
+
return (
|
|
14
|
+
<DropdownMenu button={{label: 'Version'}}>
|
|
15
|
+
<DropdownMenuGroup title="Version history">
|
|
16
|
+
<DropdownMenuItem
|
|
17
|
+
icon="arrowDown"
|
|
18
|
+
label="Restore this version"
|
|
19
|
+
onClick={() => {}}
|
|
20
|
+
/>
|
|
21
|
+
<DropdownMenuItem
|
|
22
|
+
icon="copy"
|
|
23
|
+
label="Compare with current"
|
|
24
|
+
onClick={() => {}}
|
|
25
|
+
/>
|
|
26
|
+
</DropdownMenuGroup>
|
|
27
|
+
<DropdownMenuDivider />
|
|
28
|
+
<DropdownMenuGroup title="Add to message">
|
|
29
|
+
<DropdownMenuItem
|
|
30
|
+
icon="externalLink"
|
|
31
|
+
label="As a link"
|
|
32
|
+
onClick={() => {}}
|
|
33
|
+
/>
|
|
34
|
+
<DropdownMenuItem label="As a snippet" onClick={() => {}} />
|
|
35
|
+
</DropdownMenuGroup>
|
|
36
|
+
</DropdownMenu>
|
|
37
|
+
);
|
|
38
|
+
}
|
package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.doc.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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: 'DropdownMenuGroup',
|
|
7
|
+
name: 'DropdownMenuGroup — Selectable rows',
|
|
8
|
+
displayName: 'DropdownMenuGroup — Selectable rows',
|
|
9
|
+
description:
|
|
10
|
+
'Titled groups around a radio group and checkbox rows — the rows the data API cannot express, which is why the heading lives in compound mode.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: [
|
|
14
|
+
'DropdownMenu',
|
|
15
|
+
'DropdownMenuGroup',
|
|
16
|
+
'DropdownMenuRadioGroup',
|
|
17
|
+
'DropdownMenuRadioItem',
|
|
18
|
+
'DropdownMenuCheckboxItem',
|
|
19
|
+
],
|
|
20
|
+
};
|
package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.tsx
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenu,
|
|
8
|
+
DropdownMenuCheckboxItem,
|
|
9
|
+
DropdownMenuDivider,
|
|
10
|
+
DropdownMenuGroup,
|
|
11
|
+
DropdownMenuRadioGroup,
|
|
12
|
+
DropdownMenuRadioItem,
|
|
13
|
+
} from '@astryxdesign/core/DropdownMenu';
|
|
14
|
+
|
|
15
|
+
export default function DropdownMenuGroupWithSelectable() {
|
|
16
|
+
const [model, setModel] = useState('balanced');
|
|
17
|
+
const [notify, setNotify] = useState(true);
|
|
18
|
+
const [retry, setRetry] = useState(false);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<DropdownMenu button={{label: 'Run settings'}}>
|
|
22
|
+
<DropdownMenuGroup title="Model">
|
|
23
|
+
<DropdownMenuRadioGroup
|
|
24
|
+
label="Model"
|
|
25
|
+
value={model}
|
|
26
|
+
onChange={setModel}
|
|
27
|
+
hasCloseOnSelect={false}>
|
|
28
|
+
<DropdownMenuRadioItem value="fast" label="Fast" />
|
|
29
|
+
<DropdownMenuRadioItem value="balanced" label="Balanced" />
|
|
30
|
+
<DropdownMenuRadioItem value="thorough" label="Thorough" />
|
|
31
|
+
</DropdownMenuRadioGroup>
|
|
32
|
+
</DropdownMenuGroup>
|
|
33
|
+
<DropdownMenuDivider />
|
|
34
|
+
<DropdownMenuGroup title="On completion">
|
|
35
|
+
<DropdownMenuCheckboxItem
|
|
36
|
+
label="Notify me"
|
|
37
|
+
value={notify}
|
|
38
|
+
onChange={setNotify}
|
|
39
|
+
/>
|
|
40
|
+
<DropdownMenuCheckboxItem
|
|
41
|
+
label="Retry on failure"
|
|
42
|
+
value={retry}
|
|
43
|
+
onChange={setRetry}
|
|
44
|
+
/>
|
|
45
|
+
</DropdownMenuGroup>
|
|
46
|
+
</DropdownMenu>
|
|
47
|
+
);
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.6.5-canary.
|
|
3
|
+
"version": "0.6.5-canary.eb0010b",
|
|
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",
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
"zod": "^4.4.3"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@astryxdesign/charts": "0.6.5-canary.
|
|
105
|
-
"@astryxdesign/core": "0.6.5-canary.
|
|
106
|
-
"@astryxdesign/lab": "0.6.5-canary.
|
|
107
|
-
"@astryxdesign/theme-neutral": "0.6.5-canary.
|
|
104
|
+
"@astryxdesign/charts": "0.6.5-canary.eb0010b",
|
|
105
|
+
"@astryxdesign/core": "0.6.5-canary.eb0010b",
|
|
106
|
+
"@astryxdesign/lab": "0.6.5-canary.eb0010b",
|
|
107
|
+
"@astryxdesign/theme-neutral": "0.6.5-canary.eb0010b"
|
|
108
108
|
},
|
|
109
109
|
"peerDependenciesMeta": {
|
|
110
110
|
"@astryxdesign/charts": {
|
|
@@ -121,10 +121,10 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"@astryxdesign/charts": "0.6.5-canary.
|
|
125
|
-
"@astryxdesign/core": "0.6.5-canary.
|
|
126
|
-
"@astryxdesign/lab": "0.6.5-canary.
|
|
127
|
-
"@astryxdesign/theme-neutral": "0.6.5-canary.
|
|
124
|
+
"@astryxdesign/charts": "0.6.5-canary.eb0010b",
|
|
125
|
+
"@astryxdesign/core": "0.6.5-canary.eb0010b",
|
|
126
|
+
"@astryxdesign/lab": "0.6.5-canary.eb0010b",
|
|
127
|
+
"@astryxdesign/theme-neutral": "0.6.5-canary.eb0010b",
|
|
128
128
|
"@heroicons/react": "^2.2.0",
|
|
129
129
|
"@stylexjs/stylex": "^0.19.0",
|
|
130
130
|
"@types/babel__core": "^7.20.5",
|