@astryxdesign/cli 0.1.0 → 0.1.1-canary.080d887
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/getting-started.doc.mjs +11 -11
- 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 +3 -4
- 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 +20 -9
- package/src/api/discover.mjs +78 -26
- package/src/api/doctor.mjs +3 -3
- package/src/api/layout.mjs +301 -0
- package/src/api/layout.test.mjs +238 -0
- package/src/api/search.mjs +207 -13
- package/src/api/template.mjs +193 -51
- package/src/api/template.test.mjs +2 -0
- 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 +119 -66
- package/src/commands/agent-docs.path-safety.test.mjs +1 -1
- package/src/commands/agent-docs.test.mjs +87 -31
- 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/gap-report.mjs +17 -9
- package/src/commands/gap-report.test.mjs +21 -16
- package/src/commands/init.mjs +43 -9
- package/src/commands/init.next-steps.test.mjs +46 -0
- package/src/commands/interactive-guard.test.mjs +1 -1
- package/src/commands/json-contract.test.mjs +10 -3
- package/src/commands/layout.mjs +139 -0
- package/src/commands/swizzle-gap-safety.test.mjs +1 -1
- package/src/commands/swizzle.mjs +51 -23
- 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 +292 -177
- package/src/commands/upgrade.test.mjs +41 -27
- package/src/config.mjs +31 -0
- package/src/config.test.mjs +24 -0
- package/src/index.mjs +5 -0
- package/src/lib/config-schema.mjs +119 -0
- package/src/lib/config.mjs +45 -6
- package/src/lib/config.test.mjs +91 -0
- package/src/lib/error-codes.mjs +11 -0
- package/src/lib/integrations.mjs +155 -0
- package/src/lib/integrations.test.mjs +154 -0
- package/src/lib/levenshtein.mjs +29 -0
- package/src/lib/manifest.mjs +6 -0
- package/src/lib/package-scanner.mjs +31 -7
- package/src/lib/string-utils.mjs +5 -14
- package/src/lib/xle/browser.d.ts +91 -0
- package/src/lib/xle/browser.mjs +120 -0
- package/src/lib/xle/expand.mjs +622 -0
- package/src/lib/xle/parse.mjs +581 -0
- package/src/lib/xle/print.mjs +174 -0
- package/src/lib/xle/registry-core.mjs +170 -0
- package/src/lib/xle/registry.mjs +237 -0
- package/src/lib/xle/splice.mjs +137 -0
- package/src/lib/xle/validate.mjs +356 -0
- package/src/lib/xle/xle.test.mjs +333 -0
- package/src/types/config.d.ts +99 -0
- package/src/types/error-codes.d.ts +1 -0
- package/src/utils/github.mjs +12 -27
- package/src/utils/interactive.mjs +1 -1
- package/src/utils/interactive.test.mjs +2 -0
- package/src/utils/package-manager.mjs +1 -1
- 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/CommandPaletteEmpty/CommandPaletteEmptyShowcase.doc.mjs +15 -0
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyShowcase.tsx +26 -0
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx +9 -12
- package/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +13 -15
- package/templates/blocks/components/DateInput/DateInputDateRange.doc.mjs +2 -2
- 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/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/Slider/SliderShowcase.tsx +10 -1
- package/templates/blocks/components/ToggleButton/ToggleButtonGroup.doc.mjs +1 -1
- 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 +42 -58
- package/templates/pages/documentation-design/page.tsx +82 -60
- package/templates/pages/documentation-technical/page.tsx +101 -60
- 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 +188 -264
- 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
- package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.doc.mjs +0 -14
- package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +0 -67
|
@@ -2,23 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import {useState} from 'react';
|
|
5
|
+
import {useState, type CSSProperties} from 'react';
|
|
6
6
|
import {Pagination} from '@astryxdesign/core/Pagination';
|
|
7
7
|
import {Heading} from '@astryxdesign/core/Text';
|
|
8
8
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
9
|
import {Table} from '@astryxdesign/core/Table';
|
|
10
|
-
import * as stylex from '@stylexjs/stylex';
|
|
11
10
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
11
|
+
const root: CSSProperties = {
|
|
12
|
+
width: '100%',
|
|
13
|
+
maxWidth: 500,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const pagination: CSSProperties = {
|
|
17
|
+
paddingTop: 8,
|
|
18
|
+
flexDirection: 'row-reverse',
|
|
19
|
+
};
|
|
22
20
|
|
|
23
21
|
const DATA = [
|
|
24
22
|
{
|
|
@@ -42,7 +40,7 @@ export default function PaginationPageSize() {
|
|
|
42
40
|
const [pageSize, setPageSize] = useState(10);
|
|
43
41
|
|
|
44
42
|
return (
|
|
45
|
-
<Stack direction="vertical"
|
|
43
|
+
<Stack direction="vertical" style={root}>
|
|
46
44
|
<Heading level={4}>Transactions</Heading>
|
|
47
45
|
<Table
|
|
48
46
|
idKey="id"
|
|
@@ -61,7 +59,7 @@ export default function PaginationPageSize() {
|
|
|
61
59
|
onPageSizeChange={setPageSize}
|
|
62
60
|
pageSizeOptions={[10, 25, 50, 100]}
|
|
63
61
|
variant="count"
|
|
64
|
-
|
|
62
|
+
style={pagination}
|
|
65
63
|
/>
|
|
66
64
|
</Stack>
|
|
67
65
|
);
|
|
@@ -5,13 +5,6 @@
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
6
|
import {Pagination} from '@astryxdesign/core/Pagination';
|
|
7
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
8
|
-
import * as stylex from '@stylexjs/stylex';
|
|
9
|
-
|
|
10
|
-
const styles = stylex.create({
|
|
11
|
-
root: {
|
|
12
|
-
width: '100%',
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
8
|
|
|
16
9
|
export default function PaginationVariants() {
|
|
17
10
|
const [pagesPage, setPagesPage] = useState(3);
|
|
@@ -20,7 +13,7 @@ export default function PaginationVariants() {
|
|
|
20
13
|
const [dotsPage, setDotsPage] = useState(3);
|
|
21
14
|
|
|
22
15
|
return (
|
|
23
|
-
<Stack direction="vertical" gap={5} hAlign="center"
|
|
16
|
+
<Stack direction="vertical" gap={5} hAlign="center" style={{width: '100%'}}>
|
|
24
17
|
<Pagination
|
|
25
18
|
page={dotsPage}
|
|
26
19
|
onChange={setDotsPage}
|
|
@@ -6,18 +6,6 @@ import {useState} from 'react';
|
|
|
6
6
|
import {Pagination} from '@astryxdesign/core/Pagination';
|
|
7
7
|
import {Table} from '@astryxdesign/core/Table';
|
|
8
8
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
|
-
import * as stylex from '@stylexjs/stylex';
|
|
10
|
-
|
|
11
|
-
const styles = stylex.create({
|
|
12
|
-
root: {
|
|
13
|
-
width: '100%',
|
|
14
|
-
maxWidth: 500,
|
|
15
|
-
},
|
|
16
|
-
pagination: {
|
|
17
|
-
justifyContent: 'center',
|
|
18
|
-
paddingTop: 8,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
9
|
|
|
22
10
|
const ALL_DATA = [
|
|
23
11
|
{id: '1', name: 'Olivia Chen', role: 'Engineer', status: 'Active'},
|
|
@@ -42,7 +30,7 @@ export default function PaginationWithTable() {
|
|
|
42
30
|
const pageData = ALL_DATA.slice(start, start + PAGE_SIZE);
|
|
43
31
|
|
|
44
32
|
return (
|
|
45
|
-
<Stack direction="vertical"
|
|
33
|
+
<Stack direction="vertical" style={{width: '100%', maxWidth: 500}}>
|
|
46
34
|
<Table
|
|
47
35
|
idKey="id"
|
|
48
36
|
columns={[
|
|
@@ -59,7 +47,7 @@ export default function PaginationWithTable() {
|
|
|
59
47
|
pageSize={PAGE_SIZE}
|
|
60
48
|
variant="count"
|
|
61
49
|
size="sm"
|
|
62
|
-
|
|
50
|
+
style={{justifyContent: 'center', paddingTop: 8}}
|
|
63
51
|
/>
|
|
64
52
|
</Stack>
|
|
65
53
|
);
|
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
+
import {useState} from 'react';
|
|
5
6
|
import {Slider} from '@astryxdesign/core/Slider';
|
|
6
7
|
|
|
7
8
|
export default function SliderShowcase() {
|
|
8
|
-
|
|
9
|
+
const [value, setValue] = useState(50);
|
|
10
|
+
return (
|
|
11
|
+
<Slider
|
|
12
|
+
label="Volume"
|
|
13
|
+
value={value}
|
|
14
|
+
onChange={setValue}
|
|
15
|
+
style={{width: 300}}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
9
18
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
4
|
export const doc = {
|
|
5
5
|
type: 'block',
|
|
6
|
-
exampleFor: '
|
|
6
|
+
exampleFor: 'ToggleButtonGroup',
|
|
7
7
|
name: 'ToggleButton — Group',
|
|
8
8
|
displayName: 'ToggleButton — Group',
|
|
9
9
|
description: 'Toggle button groups in single-select and multi-select modes. Single selection acts as a view mode switcher; multiple selection forms a formatting toolbar.',
|
|
@@ -3,16 +3,11 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
6
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
8
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
8
|
import {Text} from '@astryxdesign/core/Text';
|
|
10
9
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
11
10
|
|
|
12
|
-
const styles = stylex.create({
|
|
13
|
-
fixed: {width: 400},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
11
|
const users: SearchableItem[] = [
|
|
17
12
|
{id: '1', label: 'Alice Johnson'},
|
|
18
13
|
{id: '2', label: 'Bob Smith'},
|
|
@@ -42,7 +37,7 @@ export default function TokenizerClear() {
|
|
|
42
37
|
value={value}
|
|
43
38
|
onChange={items => setValue(items)}
|
|
44
39
|
hasClear
|
|
45
|
-
|
|
40
|
+
style={{width: 400}}
|
|
46
41
|
/>
|
|
47
42
|
</Stack>
|
|
48
43
|
);
|
|
@@ -3,16 +3,11 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
6
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
8
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
8
|
import {Text} from '@astryxdesign/core/Text';
|
|
10
9
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
11
10
|
|
|
12
|
-
const styles = stylex.create({
|
|
13
|
-
fixed: {width: 400},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
11
|
const emptySource: SearchSource = {
|
|
17
12
|
search: () => [],
|
|
18
13
|
bootstrap: () => [],
|
|
@@ -49,7 +44,7 @@ export default function TokenizerCreatable() {
|
|
|
49
44
|
onChange={items => setTags(items)}
|
|
50
45
|
hasCreate
|
|
51
46
|
placeholder="Type a tag and press Enter..."
|
|
52
|
-
|
|
47
|
+
style={{width: 400}}
|
|
53
48
|
/>
|
|
54
49
|
</Stack>
|
|
55
50
|
<Stack direction="vertical" gap={1}>
|
|
@@ -64,7 +59,7 @@ export default function TokenizerCreatable() {
|
|
|
64
59
|
hasCreate
|
|
65
60
|
hasEntriesOnFocus
|
|
66
61
|
placeholder="Search or type a new name..."
|
|
67
|
-
|
|
62
|
+
style={{width: 400}}
|
|
68
63
|
/>
|
|
69
64
|
</Stack>
|
|
70
65
|
</Stack>
|
|
@@ -3,17 +3,12 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
6
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
8
7
|
import {Button} from '@astryxdesign/core/Button';
|
|
9
8
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
10
9
|
import {Text} from '@astryxdesign/core/Text';
|
|
11
10
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
12
11
|
|
|
13
|
-
const styles = stylex.create({
|
|
14
|
-
fixed: {width: 400},
|
|
15
|
-
});
|
|
16
|
-
|
|
17
12
|
const users: SearchableItem[] = [
|
|
18
13
|
{id: '1', label: 'Alice Johnson'},
|
|
19
14
|
{id: '2', label: 'Bob Smith'},
|
|
@@ -44,7 +39,7 @@ export default function TokenizerEndContent() {
|
|
|
44
39
|
value={value}
|
|
45
40
|
onChange={items => setValue(items)}
|
|
46
41
|
endContent={<Button label="Apply" variant="primary" size="sm" />}
|
|
47
|
-
|
|
42
|
+
style={{width: 400}}
|
|
48
43
|
/>
|
|
49
44
|
</Stack>
|
|
50
45
|
);
|
|
@@ -3,17 +3,12 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
6
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
8
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
8
|
import {Text} from '@astryxdesign/core/Text';
|
|
10
9
|
import {MagnifyingGlassIcon} from '@heroicons/react/24/outline';
|
|
11
10
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
12
11
|
|
|
13
|
-
const styles = stylex.create({
|
|
14
|
-
fixed: {width: 400},
|
|
15
|
-
});
|
|
16
|
-
|
|
17
12
|
const users: SearchableItem[] = [
|
|
18
13
|
{id: '1', label: 'Alice Johnson'},
|
|
19
14
|
{id: '2', label: 'Bob Smith'},
|
|
@@ -43,7 +38,7 @@ export default function TokenizerIcon() {
|
|
|
43
38
|
value={value}
|
|
44
39
|
onChange={items => setValue(items)}
|
|
45
40
|
startIcon={MagnifyingGlassIcon}
|
|
46
|
-
|
|
41
|
+
style={{width: 400}}
|
|
47
42
|
/>
|
|
48
43
|
</Stack>
|
|
49
44
|
);
|
|
@@ -3,16 +3,11 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
6
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
8
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
8
|
import {Text} from '@astryxdesign/core/Text';
|
|
10
9
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
11
10
|
|
|
12
|
-
const styles = stylex.create({
|
|
13
|
-
fixed: {width: 400},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
11
|
const skills: SearchableItem[] = [
|
|
17
12
|
{id: '1', label: 'React'},
|
|
18
13
|
{id: '2', label: 'TypeScript'},
|
|
@@ -52,7 +47,7 @@ export default function TokenizerMaxEntries() {
|
|
|
52
47
|
value={value}
|
|
53
48
|
onChange={items => setValue(items)}
|
|
54
49
|
maxEntries={MAX_SKILLS}
|
|
55
|
-
|
|
50
|
+
style={{width: 400}}
|
|
56
51
|
/>
|
|
57
52
|
</Stack>
|
|
58
53
|
);
|
|
@@ -3,16 +3,11 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
6
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
8
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
8
|
import {Text} from '@astryxdesign/core/Text';
|
|
10
9
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
11
10
|
|
|
12
|
-
const styles = stylex.create({
|
|
13
|
-
fixed: {width: 400, maxWidth: 400},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
11
|
const users: SearchableItem[] = [
|
|
17
12
|
{id: '1', label: 'Alice Johnson'},
|
|
18
13
|
{id: '2', label: 'Bob Smith'},
|
|
@@ -45,7 +40,7 @@ export default function TokenizerOverflow() {
|
|
|
45
40
|
value={inlineValue}
|
|
46
41
|
onChange={items => setInlineValue(items)}
|
|
47
42
|
tokenOverflowBehavior="unfocusedInline"
|
|
48
|
-
|
|
43
|
+
style={{width: 400, maxWidth: 400}}
|
|
49
44
|
/>
|
|
50
45
|
</Stack>
|
|
51
46
|
<Stack direction="vertical" gap={1}>
|
|
@@ -59,7 +54,7 @@ export default function TokenizerOverflow() {
|
|
|
59
54
|
value={layerValue}
|
|
60
55
|
onChange={items => setLayerValue(items)}
|
|
61
56
|
tokenOverflowBehavior="unfocusedLayer"
|
|
62
|
-
|
|
57
|
+
style={{width: 400, maxWidth: 400}}
|
|
63
58
|
/>
|
|
64
59
|
</Stack>
|
|
65
60
|
</Stack>
|
|
@@ -2,14 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import * as stylex from '@stylexjs/stylex';
|
|
6
5
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
7
6
|
import type {SearchSource} from '@astryxdesign/core/Typeahead';
|
|
8
7
|
|
|
9
|
-
const styles = stylex.create({
|
|
10
|
-
fixed: {width: 400},
|
|
11
|
-
});
|
|
12
|
-
|
|
13
8
|
const source: SearchSource = {
|
|
14
9
|
search: () => [],
|
|
15
10
|
bootstrap: () => [],
|
|
@@ -26,7 +21,7 @@ export default function TokenizerShowcase() {
|
|
|
26
21
|
{id: '2', label: 'Engineering'},
|
|
27
22
|
]}
|
|
28
23
|
onChange={() => {}}
|
|
29
|
-
|
|
24
|
+
style={{width: 400}}
|
|
30
25
|
/>
|
|
31
26
|
);
|
|
32
27
|
}
|
|
@@ -3,15 +3,10 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
6
|
import {Tokenizer} from '@astryxdesign/core/Tokenizer';
|
|
8
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
8
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
10
9
|
|
|
11
|
-
const styles = stylex.create({
|
|
12
|
-
fixed: {width: 400},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
10
|
const users: SearchableItem[] = [
|
|
16
11
|
{id: '1', label: 'Alice Johnson'},
|
|
17
12
|
{id: '2', label: 'Bob Smith'},
|
|
@@ -44,7 +39,7 @@ export default function TokenizerStates() {
|
|
|
44
39
|
value={[users[0], users[2]]}
|
|
45
40
|
onChange={() => {}}
|
|
46
41
|
isDisabled
|
|
47
|
-
|
|
42
|
+
style={{width: 400}}
|
|
48
43
|
/>
|
|
49
44
|
<Tokenizer
|
|
50
45
|
label="Error message"
|
|
@@ -54,7 +49,7 @@ export default function TokenizerStates() {
|
|
|
54
49
|
onChange={items => setErrorValue(items)}
|
|
55
50
|
isRequired
|
|
56
51
|
status={{type: 'error', message: 'At least one reviewer is required'}}
|
|
57
|
-
|
|
52
|
+
style={{width: 400}}
|
|
58
53
|
/>
|
|
59
54
|
<Tokenizer
|
|
60
55
|
label="Warning message"
|
|
@@ -66,7 +61,7 @@ export default function TokenizerStates() {
|
|
|
66
61
|
type: 'warning',
|
|
67
62
|
message: 'Consider adding at least 2 approvers',
|
|
68
63
|
}}
|
|
69
|
-
|
|
64
|
+
style={{width: 400}}
|
|
70
65
|
/>
|
|
71
66
|
<Tokenizer
|
|
72
67
|
label="Success message"
|
|
@@ -75,7 +70,7 @@ export default function TokenizerStates() {
|
|
|
75
70
|
value={successValue}
|
|
76
71
|
onChange={items => setSuccessValue(items)}
|
|
77
72
|
status={{type: 'success', message: 'All required reviewers added'}}
|
|
78
|
-
|
|
73
|
+
style={{width: 400}}
|
|
79
74
|
/>
|
|
80
75
|
</Stack>
|
|
81
76
|
);
|
|
@@ -9,19 +9,10 @@ import {Heading} from '@astryxdesign/core/Text';
|
|
|
9
9
|
import {Card} from '@astryxdesign/core/Card';
|
|
10
10
|
import {Section} from '@astryxdesign/core/Section';
|
|
11
11
|
import {FunnelIcon, PlusIcon} from '@heroicons/react/24/outline';
|
|
12
|
-
import * as stylex from '@stylexjs/stylex';
|
|
13
|
-
|
|
14
|
-
const styles = stylex.create({
|
|
15
|
-
card: {
|
|
16
|
-
width: 500,
|
|
17
|
-
height: '100%',
|
|
18
|
-
marginTop: 260,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
12
|
|
|
22
13
|
export default function ToolbarCardHeader() {
|
|
23
14
|
return (
|
|
24
|
-
<Card
|
|
15
|
+
<Card style={{width: 500, height: '100%', marginTop: 260}}>
|
|
25
16
|
<Toolbar
|
|
26
17
|
label="User list actions"
|
|
27
18
|
size="sm"
|
|
@@ -9,13 +9,6 @@ import {Heading} from '@astryxdesign/core/Text';
|
|
|
9
9
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
10
10
|
import {Card} from '@astryxdesign/core/Card';
|
|
11
11
|
import {FunnelIcon, PlusIcon} from '@heroicons/react/24/outline';
|
|
12
|
-
import * as stylex from '@stylexjs/stylex';
|
|
13
|
-
|
|
14
|
-
const styles = stylex.create({
|
|
15
|
-
container: {
|
|
16
|
-
width: 500,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
12
|
|
|
20
13
|
const SIZES = [
|
|
21
14
|
{size: 'sm' as const, label: 'Small'},
|
|
@@ -25,7 +18,7 @@ const SIZES = [
|
|
|
25
18
|
|
|
26
19
|
export default function ToolbarSizes() {
|
|
27
20
|
return (
|
|
28
|
-
<Stack direction="vertical" gap={4}
|
|
21
|
+
<Stack direction="vertical" gap={4} style={{width: 500}}>
|
|
29
22
|
{SIZES.map(({size, label}) => (
|
|
30
23
|
<Card key={size}>
|
|
31
24
|
<Toolbar
|
|
@@ -9,21 +9,14 @@ import {TextInput} from '@astryxdesign/core/TextInput';
|
|
|
9
9
|
import {MoreMenu} from '@astryxdesign/core/MoreMenu';
|
|
10
10
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
11
11
|
import {Table} from '@astryxdesign/core/Table';
|
|
12
|
-
import * as stylex from '@stylexjs/stylex';
|
|
13
12
|
import {
|
|
14
13
|
MagnifyingGlassIcon,
|
|
15
14
|
ChevronDownIcon,
|
|
16
15
|
} from '@heroicons/react/24/outline';
|
|
17
16
|
|
|
18
|
-
const styles = stylex.create({
|
|
19
|
-
container: {
|
|
20
|
-
width: '100%',
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
|
|
24
17
|
export default function ToolbarTableFilter() {
|
|
25
18
|
return (
|
|
26
|
-
<Stack direction="vertical"
|
|
19
|
+
<Stack direction="vertical" style={{width: '100%'}}>
|
|
27
20
|
<Toolbar
|
|
28
21
|
label="Table filters"
|
|
29
22
|
size="sm"
|
|
@@ -9,19 +9,10 @@ import {Heading} from '@astryxdesign/core/Text';
|
|
|
9
9
|
import {Card} from '@astryxdesign/core/Card';
|
|
10
10
|
import {Section} from '@astryxdesign/core/Section';
|
|
11
11
|
import {ArrowLeftIcon} from '@heroicons/react/24/outline';
|
|
12
|
-
import * as stylex from '@stylexjs/stylex';
|
|
13
|
-
|
|
14
|
-
const styles = stylex.create({
|
|
15
|
-
card: {
|
|
16
|
-
width: 600,
|
|
17
|
-
height: '100%',
|
|
18
|
-
marginTop: 260,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
12
|
|
|
22
13
|
export default function ToolbarThreeSlot() {
|
|
23
14
|
return (
|
|
24
|
-
<Card
|
|
15
|
+
<Card style={{width: 600, height: '100%', marginTop: 260}}>
|
|
25
16
|
<Toolbar
|
|
26
17
|
label="Document toolbar"
|
|
27
18
|
dividers={['bottom']}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import {useState} from 'react';
|
|
5
|
+
import {useState, type CSSProperties} from 'react';
|
|
6
6
|
import {Toolbar} from '@astryxdesign/core/Toolbar';
|
|
7
7
|
import {Button} from '@astryxdesign/core/Button';
|
|
8
8
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
@@ -10,21 +10,18 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';
|
|
|
10
10
|
import {Card} from '@astryxdesign/core/Card';
|
|
11
11
|
import {Section} from '@astryxdesign/core/Section';
|
|
12
12
|
import {PlusIcon} from '@heroicons/react/24/outline';
|
|
13
|
-
import * as stylex from '@stylexjs/stylex';
|
|
14
13
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
});
|
|
14
|
+
const card: CSSProperties = {
|
|
15
|
+
width: '100%',
|
|
16
|
+
maxWidth: 500,
|
|
17
|
+
height: '100%',
|
|
18
|
+
marginTop: 200,
|
|
19
|
+
};
|
|
23
20
|
|
|
24
21
|
export default function ToolbarWithTabs() {
|
|
25
22
|
const [tab, setTab] = useState('overview');
|
|
26
23
|
return (
|
|
27
|
-
<Card
|
|
24
|
+
<Card style={card}>
|
|
28
25
|
<Toolbar
|
|
29
26
|
label="Section navigation"
|
|
30
27
|
dividers={['bottom']}
|