@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.
Files changed (176) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +117 -75
  3. package/bin/astryx.mjs +22 -7
  4. package/docs/getting-started.doc.mjs +11 -11
  5. package/docs/icons.doc.mjs +1 -1
  6. package/docs/migration.doc.mjs +2 -2
  7. package/docs/shape.doc.mjs +1 -1
  8. package/docs/styling.doc.mjs +3 -4
  9. package/docs/theme.doc.dense.mjs +2 -2
  10. package/docs/theme.doc.mjs +14 -0
  11. package/docs/theme.doc.zh.mjs +2 -2
  12. package/docs/working-with-ai.doc.mjs +4 -4
  13. package/package.json +20 -9
  14. package/src/api/discover.mjs +78 -26
  15. package/src/api/doctor.mjs +3 -3
  16. package/src/api/layout.mjs +301 -0
  17. package/src/api/layout.test.mjs +238 -0
  18. package/src/api/search.mjs +207 -13
  19. package/src/api/template.mjs +193 -51
  20. package/src/api/template.test.mjs +2 -0
  21. package/src/codemods/__tests__/registry.test.mjs +1 -0
  22. package/src/codemods/registry.mjs +1 -0
  23. package/src/codemods/runner.mjs +105 -51
  24. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-config-surfaces.test.mjs +116 -0
  25. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +51 -0
  26. package/src/codemods/transforms/v0.1.0/index.mjs +28 -0
  27. package/src/codemods/transforms/v0.1.0/migrate-xds-config-surfaces.mjs +230 -0
  28. package/src/codemods/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +84 -0
  29. package/src/commands/agent-docs.mjs +119 -66
  30. package/src/commands/agent-docs.path-safety.test.mjs +1 -1
  31. package/src/commands/agent-docs.test.mjs +87 -31
  32. package/src/commands/build-theme.import-path.test.mjs +1 -1
  33. package/src/commands/build-theme.path-safety.test.mjs +1 -1
  34. package/src/commands/build-theme.prose.test.mjs +1 -1
  35. package/src/commands/build.mjs +196 -0
  36. package/src/commands/component-package.test.mjs +1 -1
  37. package/src/commands/component.test.mjs +1 -1
  38. package/src/commands/docs.test.mjs +1 -1
  39. package/src/commands/doctor.test.mjs +1 -1
  40. package/src/commands/external-showcase.test.mjs +1 -1
  41. package/src/commands/gap-report.mjs +17 -9
  42. package/src/commands/gap-report.test.mjs +21 -16
  43. package/src/commands/init.mjs +43 -9
  44. package/src/commands/init.next-steps.test.mjs +46 -0
  45. package/src/commands/interactive-guard.test.mjs +1 -1
  46. package/src/commands/json-contract.test.mjs +10 -3
  47. package/src/commands/layout.mjs +139 -0
  48. package/src/commands/swizzle-gap-safety.test.mjs +1 -1
  49. package/src/commands/swizzle.mjs +51 -23
  50. package/src/commands/swizzle.path-safety.test.mjs +1 -1
  51. package/src/commands/template.path-safety.test.mjs +1 -1
  52. package/src/commands/template.test.mjs +1 -1
  53. package/src/commands/upgrade.mjs +292 -177
  54. package/src/commands/upgrade.test.mjs +41 -27
  55. package/src/config.mjs +31 -0
  56. package/src/config.test.mjs +24 -0
  57. package/src/index.mjs +5 -0
  58. package/src/lib/config-schema.mjs +119 -0
  59. package/src/lib/config.mjs +45 -6
  60. package/src/lib/config.test.mjs +91 -0
  61. package/src/lib/error-codes.mjs +11 -0
  62. package/src/lib/integrations.mjs +155 -0
  63. package/src/lib/integrations.test.mjs +154 -0
  64. package/src/lib/levenshtein.mjs +29 -0
  65. package/src/lib/manifest.mjs +6 -0
  66. package/src/lib/package-scanner.mjs +31 -7
  67. package/src/lib/string-utils.mjs +5 -14
  68. package/src/lib/xle/browser.d.ts +91 -0
  69. package/src/lib/xle/browser.mjs +120 -0
  70. package/src/lib/xle/expand.mjs +622 -0
  71. package/src/lib/xle/parse.mjs +581 -0
  72. package/src/lib/xle/print.mjs +174 -0
  73. package/src/lib/xle/registry-core.mjs +170 -0
  74. package/src/lib/xle/registry.mjs +237 -0
  75. package/src/lib/xle/splice.mjs +137 -0
  76. package/src/lib/xle/validate.mjs +356 -0
  77. package/src/lib/xle/xle.test.mjs +333 -0
  78. package/src/types/config.d.ts +99 -0
  79. package/src/types/error-codes.d.ts +1 -0
  80. package/src/utils/github.mjs +12 -27
  81. package/src/utils/interactive.mjs +1 -1
  82. package/src/utils/interactive.test.mjs +2 -0
  83. package/src/utils/package-manager.mjs +1 -1
  84. package/src/utils/package-manager.test.mjs +1 -1
  85. package/src/utils/path-safety.test.mjs +1 -1
  86. package/src/utils/paths.test.mjs +8 -8
  87. package/src/utils/update-check.mjs +4 -26
  88. package/src/utils/update-check.test.mjs +2 -64
  89. package/templates/blocks/components/AppShell/AppShellContentOnly.tsx +1 -9
  90. package/templates/blocks/components/AppShell/AppShellShowcase.tsx +1 -10
  91. package/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx +1 -9
  92. package/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx +1 -9
  93. package/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx +1 -9
  94. package/templates/blocks/components/AppShell/AppShellWithBanner.tsx +1 -9
  95. package/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +12 -19
  96. package/templates/blocks/components/Banner/BannerShowcase.tsx +1 -8
  97. package/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -8
  98. package/templates/blocks/components/Carousel/CarouselShowcase.tsx +2 -12
  99. package/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx +6 -9
  100. package/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +10 -12
  101. package/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx +1 -9
  102. package/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx +1 -9
  103. package/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx +1 -9
  104. package/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +1 -8
  105. package/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx +1 -8
  106. package/templates/blocks/components/Citation/CitationInlineText.tsx +4 -4
  107. package/templates/blocks/components/Code/CodeInlineInParagraph.tsx +1 -8
  108. package/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx +1 -1
  109. package/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx +1 -1
  110. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyShowcase.doc.mjs +15 -0
  111. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyShowcase.tsx +26 -0
  112. package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx +9 -12
  113. package/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +13 -15
  114. package/templates/blocks/components/DateInput/DateInputDateRange.doc.mjs +2 -2
  115. package/templates/blocks/components/Divider/DividerShowcase.tsx +1 -8
  116. package/templates/blocks/components/Divider/DividerVertical.tsx +7 -9
  117. package/templates/blocks/components/Field/FieldShowcase.tsx +1 -8
  118. package/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx +1 -6
  119. package/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx +1 -9
  120. package/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx +4 -6
  121. package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -6
  122. package/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +2 -8
  123. package/templates/blocks/components/HoverCard/HoverCardShowcase.tsx +1 -8
  124. package/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx +8 -11
  125. package/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +9 -12
  126. package/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +4 -17
  127. package/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +15 -16
  128. package/templates/blocks/components/Overlay/OverlayShowcase.tsx +5 -21
  129. package/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +2 -14
  130. package/templates/blocks/components/Pagination/PaginationPageSize.tsx +12 -14
  131. package/templates/blocks/components/Pagination/PaginationVariants.tsx +1 -8
  132. package/templates/blocks/components/Pagination/PaginationWithTable.tsx +2 -14
  133. package/templates/blocks/components/Slider/SliderShowcase.tsx +10 -1
  134. package/templates/blocks/components/ToggleButton/ToggleButtonGroup.doc.mjs +1 -1
  135. package/templates/blocks/components/Tokenizer/TokenizerClear.tsx +1 -6
  136. package/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +2 -7
  137. package/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +1 -6
  138. package/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +1 -6
  139. package/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx +1 -6
  140. package/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +2 -7
  141. package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +1 -6
  142. package/templates/blocks/components/Tokenizer/TokenizerStates.tsx +4 -9
  143. package/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +1 -10
  144. package/templates/blocks/components/Toolbar/ToolbarSizes.tsx +1 -8
  145. package/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +1 -8
  146. package/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +1 -10
  147. package/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +8 -11
  148. package/templates/pages/ai-chat/page.tsx +71 -64
  149. package/templates/pages/ai-chat-landing/page.tsx +8 -12
  150. package/templates/pages/centered-hero/page.tsx +13 -15
  151. package/templates/pages/classic-gallery/page.tsx +27 -34
  152. package/templates/pages/detail-page/page.tsx +18 -18
  153. package/templates/pages/documentation/page.tsx +42 -58
  154. package/templates/pages/documentation-design/page.tsx +82 -60
  155. package/templates/pages/documentation-technical/page.tsx +101 -60
  156. package/templates/pages/editor/page.tsx +42 -54
  157. package/templates/pages/file-explorer/page.tsx +13 -16
  158. package/templates/pages/form-two-column/page.tsx +13 -17
  159. package/templates/pages/gallery-hero/page.tsx +13 -15
  160. package/templates/pages/ide/page.tsx +188 -264
  161. package/templates/pages/library/page.tsx +16 -23
  162. package/templates/pages/login/page.tsx +14 -18
  163. package/templates/pages/login-card/page.tsx +14 -18
  164. package/templates/pages/login-split/page.tsx +50 -48
  165. package/templates/pages/login-sso/page.tsx +9 -13
  166. package/templates/pages/mixed-gallery/page.tsx +51 -45
  167. package/templates/pages/payment-form/page.tsx +56 -70
  168. package/templates/pages/product-detail/page.tsx +27 -33
  169. package/templates/pages/product-gallery/page.tsx +7 -13
  170. package/templates/pages/settings-dialog/page.tsx +35 -43
  171. package/templates/pages/settings-sidebar/page.tsx +39 -47
  172. package/templates/pages/side-gallery/page.tsx +6 -9
  173. package/templates/pages/table-grouped/page.tsx +11 -15
  174. package/templates/pages/theme-showcase/page.tsx +33 -37
  175. package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.doc.mjs +0 -14
  176. 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 styles = stylex.create({
13
- root: {
14
- width: '100%',
15
- maxWidth: 500,
16
- },
17
- pagination: {
18
- paddingTop: 8,
19
- flexDirection: 'row-reverse',
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" xstyle={styles.root}>
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
- xstyle={styles.pagination}
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" xstyle={styles.root}>
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" xstyle={styles.root}>
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
- xstyle={styles.pagination}
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
- return <Slider label="Volume" value={50} style={{width: 300}} />;
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: 'ToggleButton',
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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
- xstyle={styles.fixed}
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 xstyle={styles.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} xstyle={styles.container}>
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" xstyle={styles.container}>
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 xstyle={styles.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 styles = stylex.create({
16
- card: {
17
- width: '100%',
18
- maxWidth: 500,
19
- height: '100%',
20
- marginTop: 200,
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 xstyle={styles.card}>
24
+ <Card style={card}>
28
25
  <Toolbar
29
26
  label="Section navigation"
30
27
  dividers={['bottom']}