@astryxdesign/cli 0.1.0 → 0.1.1
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 +2 -2
- package/src/api/doctor.mjs +3 -3
- package/src/api/search.mjs +207 -13
- package/src/api/template.mjs +2 -1
- package/src/codemods/__tests__/registry.test.mjs +1 -0
- package/src/codemods/registry.mjs +1 -0
- package/src/codemods/runner.mjs +105 -51
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-config-surfaces.test.mjs +116 -0
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +51 -0
- package/src/codemods/transforms/v0.1.0/index.mjs +28 -0
- package/src/codemods/transforms/v0.1.0/migrate-xds-config-surfaces.mjs +230 -0
- package/src/codemods/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +84 -0
- package/src/commands/agent-docs.mjs +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/init.mjs +10 -2
- package/src/commands/interactive-guard.test.mjs +1 -1
- package/src/commands/json-contract.test.mjs +10 -3
- package/src/commands/swizzle-gap-safety.test.mjs +1 -1
- package/src/commands/swizzle.path-safety.test.mjs +1 -1
- package/src/commands/template.path-safety.test.mjs +1 -1
- package/src/commands/template.test.mjs +1 -1
- package/src/commands/upgrade.mjs +353 -169
- package/src/commands/upgrade.test.mjs +41 -27
- package/src/index.mjs +1 -0
- package/src/lib/config.mjs +12 -0
- package/src/lib/config.test.mjs +42 -0
- package/src/lib/error-codes.mjs +3 -0
- package/src/types/error-codes.d.ts +1 -0
- package/src/utils/interactive.mjs +1 -1
- package/src/utils/interactive.test.mjs +2 -0
- package/src/utils/package-manager.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/CommandPaletteItem/CommandPaletteItemShowcase.tsx +9 -12
- package/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +13 -15
- package/templates/blocks/components/Divider/DividerShowcase.tsx +1 -8
- package/templates/blocks/components/Divider/DividerVertical.tsx +7 -9
- package/templates/blocks/components/Field/FieldShowcase.tsx +1 -8
- package/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx +1 -6
- package/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx +1 -9
- package/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx +4 -6
- package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -6
- package/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +2 -8
- package/templates/blocks/components/HoverCard/HoverCardShowcase.tsx +1 -8
- package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +2 -12
- package/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx +8 -11
- package/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +9 -12
- package/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +4 -17
- package/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +15 -16
- package/templates/blocks/components/Overlay/OverlayShowcase.tsx +5 -21
- package/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +2 -14
- package/templates/blocks/components/Pagination/PaginationPageSize.tsx +12 -14
- package/templates/blocks/components/Pagination/PaginationVariants.tsx +1 -8
- package/templates/blocks/components/Pagination/PaginationWithTable.tsx +2 -14
- package/templates/blocks/components/Tokenizer/TokenizerClear.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +2 -7
- package/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +2 -7
- package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerStates.tsx +4 -9
- package/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +1 -10
- package/templates/blocks/components/Toolbar/ToolbarSizes.tsx +1 -8
- package/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +1 -8
- package/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +1 -10
- package/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +8 -11
- package/templates/pages/ai-chat/page.tsx +71 -64
- package/templates/pages/ai-chat-landing/page.tsx +8 -12
- package/templates/pages/centered-hero/page.tsx +13 -15
- package/templates/pages/classic-gallery/page.tsx +27 -34
- package/templates/pages/detail-page/page.tsx +18 -18
- package/templates/pages/documentation/page.tsx +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
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import * as stylex from '@stylexjs/stylex';
|
|
6
5
|
import {HoverCard} from '@astryxdesign/core/HoverCard';
|
|
7
6
|
import {Avatar} from '@astryxdesign/core/Avatar';
|
|
8
7
|
import {Button} from '@astryxdesign/core/Button';
|
|
@@ -11,18 +10,13 @@ import {VStack, HStack} from '@astryxdesign/core/Layout';
|
|
|
11
10
|
import {Text, Heading} from '@astryxdesign/core/Text';
|
|
12
11
|
import {CalendarIcon} from '@heroicons/react/24/outline';
|
|
13
12
|
|
|
14
|
-
const styles = stylex.create({
|
|
15
|
-
avatar: {flexShrink: 0},
|
|
16
|
-
content: {maxWidth: 280},
|
|
17
|
-
});
|
|
18
|
-
|
|
19
13
|
export default function HoverCardProfileHoverCard() {
|
|
20
14
|
return (
|
|
21
15
|
<HoverCard
|
|
22
16
|
placement="below"
|
|
23
17
|
content={
|
|
24
|
-
<HStack gap={3} vAlign="start"
|
|
25
|
-
<Avatar name="Jane Doe" size={48}
|
|
18
|
+
<HStack gap={3} vAlign="start" style={{maxWidth: 280}}>
|
|
19
|
+
<Avatar name="Jane Doe" size={48} style={{flexShrink: 0}} />
|
|
26
20
|
<VStack gap={1}>
|
|
27
21
|
<Heading level={3}>@janedoe</Heading>
|
|
28
22
|
<Text type="body" color="secondary">
|
|
@@ -7,20 +7,13 @@ import {Button} from '@astryxdesign/core/Button';
|
|
|
7
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
8
8
|
import {Text, Heading} from '@astryxdesign/core/Text';
|
|
9
9
|
import {Avatar} from '@astryxdesign/core/Avatar';
|
|
10
|
-
import * as stylex from '@stylexjs/stylex';
|
|
11
|
-
|
|
12
|
-
const styles = stylex.create({
|
|
13
|
-
card: {
|
|
14
|
-
width: 240,
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
10
|
|
|
18
11
|
export default function HoverCardShowcase() {
|
|
19
12
|
return (
|
|
20
13
|
<HoverCard
|
|
21
14
|
placement="above"
|
|
22
15
|
content={
|
|
23
|
-
<Stack direction="vertical" gap={2}
|
|
16
|
+
<Stack direction="vertical" gap={2} style={{width: 240}}>
|
|
24
17
|
<Stack direction="horizontal" gap={2} vAlign="center">
|
|
25
18
|
<Avatar name="Jane Doe" size="medium" />
|
|
26
19
|
<Stack direction="vertical" gap={0}>
|
|
@@ -15,20 +15,10 @@ import {
|
|
|
15
15
|
ShareIcon,
|
|
16
16
|
TrashIcon,
|
|
17
17
|
} from '@heroicons/react/24/outline';
|
|
18
|
-
import * as stylex from '@stylexjs/stylex';
|
|
19
|
-
|
|
20
|
-
const styles = stylex.create({
|
|
21
|
-
card: {
|
|
22
|
-
marginTop: 100,
|
|
23
|
-
},
|
|
24
|
-
moreMenuWrapper: {
|
|
25
|
-
marginInlineEnd: 8,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
18
|
|
|
29
19
|
export default function MoreMenuInToolbar() {
|
|
30
20
|
return (
|
|
31
|
-
<Card width="100%" height="100%"
|
|
21
|
+
<Card width="100%" height="100%" style={{marginTop: 100}}>
|
|
32
22
|
<Toolbar
|
|
33
23
|
label="Project actions"
|
|
34
24
|
size="sm"
|
|
@@ -44,7 +34,7 @@ export default function MoreMenuInToolbar() {
|
|
|
44
34
|
centerContent={<Heading level={5}>Title</Heading>}
|
|
45
35
|
endContent={
|
|
46
36
|
<>
|
|
47
|
-
<div {
|
|
37
|
+
<div style={{marginInlineEnd: 8}}>
|
|
48
38
|
<MoreMenu
|
|
49
39
|
label="More actions"
|
|
50
40
|
size="sm"
|
|
@@ -2,23 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import * as stylex from '@stylexjs/stylex';
|
|
6
5
|
import {OverflowList} from '@astryxdesign/core/OverflowList';
|
|
7
6
|
import {Badge} from '@astryxdesign/core/Badge';
|
|
8
7
|
import {Card} from '@astryxdesign/core/Card';
|
|
9
8
|
|
|
10
|
-
const styles = stylex.create({
|
|
11
|
-
resizable: {
|
|
12
|
-
resize: 'horizontal',
|
|
13
|
-
overflow: 'hidden',
|
|
14
|
-
minWidth: 80,
|
|
15
|
-
width: 300,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
|
|
19
9
|
export default function OverflowListOverflowBadges() {
|
|
20
10
|
return (
|
|
21
|
-
<Card
|
|
11
|
+
<Card
|
|
12
|
+
padding={2}
|
|
13
|
+
style={{
|
|
14
|
+
resize: 'horizontal',
|
|
15
|
+
overflow: 'hidden',
|
|
16
|
+
minWidth: 80,
|
|
17
|
+
width: 300,
|
|
18
|
+
}}>
|
|
22
19
|
<OverflowList
|
|
23
20
|
gap={1}
|
|
24
21
|
overflowRenderer={overflowItems => (
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import * as stylex from '@stylexjs/stylex';
|
|
6
5
|
import {OverflowList} from '@astryxdesign/core/OverflowList';
|
|
7
6
|
import {Button} from '@astryxdesign/core/Button';
|
|
8
7
|
import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';
|
|
@@ -10,19 +9,17 @@ import {Card} from '@astryxdesign/core/Card';
|
|
|
10
9
|
|
|
11
10
|
const actions = ['Save', 'Edit', 'Duplicate', 'Share', 'Archive', 'Delete'];
|
|
12
11
|
|
|
13
|
-
const styles = stylex.create({
|
|
14
|
-
resizable: {
|
|
15
|
-
resize: 'horizontal',
|
|
16
|
-
overflow: 'hidden',
|
|
17
|
-
minWidth: 100,
|
|
18
|
-
width: 350,
|
|
19
|
-
maxWidth: '100%',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
12
|
export default function OverflowListOverflowDropdownActions() {
|
|
24
13
|
return (
|
|
25
|
-
<Card
|
|
14
|
+
<Card
|
|
15
|
+
padding={2}
|
|
16
|
+
style={{
|
|
17
|
+
resize: 'horizontal',
|
|
18
|
+
overflow: 'hidden',
|
|
19
|
+
minWidth: 100,
|
|
20
|
+
width: 350,
|
|
21
|
+
maxWidth: '100%',
|
|
22
|
+
}}>
|
|
26
23
|
<OverflowList
|
|
27
24
|
gap={2}
|
|
28
25
|
overflowRenderer={overflowItems => (
|
|
@@ -2,27 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import * as stylex from '@stylexjs/stylex';
|
|
6
5
|
import {Overlay} from '@astryxdesign/core/Overlay';
|
|
7
6
|
import {AspectRatio} from '@astryxdesign/core/AspectRatio';
|
|
8
7
|
import {Badge} from '@astryxdesign/core/Badge';
|
|
9
8
|
import {VStack} from '@astryxdesign/core/Layout';
|
|
10
9
|
import {Text} from '@astryxdesign/core/Text';
|
|
11
10
|
|
|
12
|
-
const styles = stylex.create({
|
|
13
|
-
frame: {
|
|
14
|
-
width: 420,
|
|
15
|
-
maxWidth: '100%',
|
|
16
|
-
borderRadius: 12,
|
|
17
|
-
overflow: 'clip',
|
|
18
|
-
},
|
|
19
|
-
image: {
|
|
20
|
-
width: '100%',
|
|
21
|
-
height: '100%',
|
|
22
|
-
objectFit: 'cover',
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
|
|
26
11
|
export default function OverlayBottomStrip() {
|
|
27
12
|
return (
|
|
28
13
|
<Overlay
|
|
@@ -39,11 +24,13 @@ export default function OverlayBottomStrip() {
|
|
|
39
24
|
</Text>
|
|
40
25
|
</VStack>
|
|
41
26
|
}>
|
|
42
|
-
<AspectRatio
|
|
27
|
+
<AspectRatio
|
|
28
|
+
ratio={16 / 9}
|
|
29
|
+
style={{width: 420, maxWidth: '100%', borderRadius: 12, overflow: 'clip'}}>
|
|
43
30
|
<img
|
|
44
31
|
src="https://lookaside.facebook.com/assets/astryx/illustrative-horizontal-1.png"
|
|
45
32
|
alt="Product highlight preview"
|
|
46
|
-
{
|
|
33
|
+
style={{width: '100%', height: '100%', objectFit: 'cover'}}
|
|
47
34
|
/>
|
|
48
35
|
</AspectRatio>
|
|
49
36
|
</Overlay>
|
|
@@ -2,24 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import type {CSSProperties} from 'react';
|
|
6
6
|
import {Overlay} from '@astryxdesign/core/Overlay';
|
|
7
7
|
import {AspectRatio} from '@astryxdesign/core/AspectRatio';
|
|
8
8
|
import {Button} from '@astryxdesign/core/Button';
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
10
|
+
const frame: CSSProperties = {
|
|
11
|
+
width: 420,
|
|
12
|
+
maxWidth: '100%',
|
|
13
|
+
borderRadius: 12,
|
|
14
|
+
overflow: 'clip',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const image: CSSProperties = {
|
|
18
|
+
width: '100%',
|
|
19
|
+
height: '100%',
|
|
20
|
+
objectFit: 'cover',
|
|
21
|
+
};
|
|
23
22
|
|
|
24
23
|
export default function OverlayHoverReveal() {
|
|
25
24
|
return (
|
|
@@ -27,11 +26,11 @@ export default function OverlayHoverReveal() {
|
|
|
27
26
|
showOn="hover"
|
|
28
27
|
align="center"
|
|
29
28
|
content={<Button label="Quick view" variant="secondary" size="sm" />}>
|
|
30
|
-
<AspectRatio ratio={16 / 9}
|
|
29
|
+
<AspectRatio ratio={16 / 9} style={frame}>
|
|
31
30
|
<img
|
|
32
31
|
src="https://lookaside.facebook.com/assets/astryx/light-working-horizontal-1.png"
|
|
33
32
|
alt="Workspace preview"
|
|
34
|
-
{
|
|
33
|
+
style={image}
|
|
35
34
|
/>
|
|
36
35
|
</AspectRatio>
|
|
37
36
|
</Overlay>
|
|
@@ -2,47 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import * as stylex from '@stylexjs/stylex';
|
|
6
5
|
import {Overlay} from '@astryxdesign/core/Overlay';
|
|
7
6
|
import {AspectRatio} from '@astryxdesign/core/AspectRatio';
|
|
8
7
|
import {Button} from '@astryxdesign/core/Button';
|
|
9
8
|
import {VStack} from '@astryxdesign/core/Layout';
|
|
10
9
|
import {Text} from '@astryxdesign/core/Text';
|
|
11
10
|
|
|
12
|
-
const styles = stylex.create({
|
|
13
|
-
frame: {
|
|
14
|
-
width: 520,
|
|
15
|
-
maxWidth: '100%',
|
|
16
|
-
borderRadius: 16,
|
|
17
|
-
overflow: 'clip',
|
|
18
|
-
},
|
|
19
|
-
image: {
|
|
20
|
-
width: '100%',
|
|
21
|
-
height: '100%',
|
|
22
|
-
objectFit: 'cover',
|
|
23
|
-
},
|
|
24
|
-
content: {
|
|
25
|
-
textAlign: 'center',
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
11
|
export default function OverlayShowcase() {
|
|
30
12
|
return (
|
|
31
13
|
<Overlay
|
|
32
14
|
align="center"
|
|
33
15
|
content={
|
|
34
|
-
<VStack gap={2}
|
|
16
|
+
<VStack gap={2} style={{textAlign: 'center'}}>
|
|
35
17
|
<Text type="supporting" weight="bold" color="inherit">
|
|
36
18
|
Design system foundations
|
|
37
19
|
</Text>
|
|
38
20
|
<Button label="Open gallery" variant="secondary" size="sm" />
|
|
39
21
|
</VStack>
|
|
40
22
|
}>
|
|
41
|
-
<AspectRatio
|
|
23
|
+
<AspectRatio
|
|
24
|
+
ratio={16 / 9}
|
|
25
|
+
style={{width: 520, maxWidth: '100%', borderRadius: 16, overflow: 'clip'}}>
|
|
42
26
|
<img
|
|
43
27
|
src="https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png"
|
|
44
28
|
alt="Abstract landscape"
|
|
45
|
-
{
|
|
29
|
+
style={{width: '100%', height: '100%', objectFit: 'cover'}}
|
|
46
30
|
/>
|
|
47
31
|
</AspectRatio>
|
|
48
32
|
</Overlay>
|
|
@@ -10,7 +10,6 @@ import {Stack} from '@astryxdesign/core/Layout';
|
|
|
10
10
|
import {Avatar} from '@astryxdesign/core/Avatar';
|
|
11
11
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
12
12
|
import {StarIcon} from '@heroicons/react/24/solid';
|
|
13
|
-
import * as stylex from '@stylexjs/stylex';
|
|
14
13
|
|
|
15
14
|
const REVIEWS = [
|
|
16
15
|
{
|
|
@@ -43,17 +42,6 @@ const REVIEWS = [
|
|
|
43
42
|
},
|
|
44
43
|
];
|
|
45
44
|
|
|
46
|
-
const styles = stylex.create({
|
|
47
|
-
root: {
|
|
48
|
-
maxWidth: 480,
|
|
49
|
-
width: '100%',
|
|
50
|
-
},
|
|
51
|
-
pagination: {
|
|
52
|
-
justifyContent: 'center',
|
|
53
|
-
paddingTop: 4,
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
|
|
57
45
|
function Stars({count}: {count: number}) {
|
|
58
46
|
return (
|
|
59
47
|
<Stack direction="horizontal" gap={0}>
|
|
@@ -69,7 +57,7 @@ export default function PaginationDotsCarousel() {
|
|
|
69
57
|
const review = REVIEWS[page - 1];
|
|
70
58
|
|
|
71
59
|
return (
|
|
72
|
-
<Stack direction="vertical" gap={3}
|
|
60
|
+
<Stack direction="vertical" gap={3} style={{maxWidth: 480, width: '100%'}}>
|
|
73
61
|
<Card padding={5}>
|
|
74
62
|
<Stack direction="vertical" gap={3}>
|
|
75
63
|
<Stars count={review.stars} />
|
|
@@ -96,7 +84,7 @@ export default function PaginationDotsCarousel() {
|
|
|
96
84
|
onChange={setPage}
|
|
97
85
|
totalPages={REVIEWS.length}
|
|
98
86
|
variant="dots"
|
|
99
|
-
|
|
87
|
+
style={{justifyContent: 'center', paddingTop: 4}}
|
|
100
88
|
/>
|
|
101
89
|
</Stack>
|
|
102
90
|
);
|
|
@@ -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
|
);
|
|
@@ -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
|
}
|