@astryxdesign/cli 0.1.7 → 0.1.8-canary.07362a9

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 (389) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +115 -19
  3. package/{src/api → api/blog}/blog.mjs +42 -6
  4. package/{src/api → api/blog}/blog.test.mjs +2 -2
  5. package/api/build/build.mjs +92 -0
  6. package/api/build/build.test.mjs +92 -0
  7. package/{src/api → api/component}/component.mjs +49 -26
  8. package/{src/api → api/discover}/discover.mjs +55 -18
  9. package/{src/api → api/docs}/docs.mjs +47 -21
  10. package/{src/api → api/doctor}/doctor.mjs +13 -10
  11. package/{src/api → api}/error.mjs +2 -2
  12. package/{src/api → api/hook}/hook.mjs +11 -11
  13. package/{src/api → api}/index.mjs +16 -9
  14. package/{src/api → api/integration}/validate-integration.mjs +48 -15
  15. package/{src/api → api/integration}/validate-integration.test.mjs +1 -1
  16. package/{src/api → api/layout}/layout.mjs +66 -17
  17. package/{src/api → api/layout}/layout.test.mjs +1 -1
  18. package/{src/api → api/search}/search.mjs +71 -12
  19. package/api/swizzle/swizzle.mjs +283 -0
  20. package/{src/commands → api/swizzle}/swizzle.test.mjs +26 -1
  21. package/{src/api → api/template}/template-integration.test.mjs +2 -2
  22. package/{src/api → api/template}/template-suffix.test.mjs +3 -3
  23. package/{src/api → api/template}/template.mjs +96 -19
  24. package/{src/api → api/theme}/theme-add.mjs +35 -7
  25. package/{src → authoring}/codemod.mjs +6 -6
  26. package/{src → authoring}/config.test.mjs +1 -1
  27. package/{src → authoring}/doc.mjs +1 -1
  28. package/{src → authoring}/doc.test.mjs +1 -1
  29. package/{src → authoring}/template.mjs +1 -1
  30. package/bin/astryx.mjs +12 -10
  31. package/{src → cli}/commands/blog.mjs +48 -7
  32. package/{src → cli}/commands/build-theme.mjs +133 -115
  33. package/cli/commands/build.mjs +172 -0
  34. package/cli/commands/cli-postinstall.test.mjs +42 -0
  35. package/{src → cli}/commands/component/index.mjs +52 -25
  36. package/{src → cli}/commands/component-ownership.test.mjs +3 -3
  37. package/{src → cli}/commands/component-package.test.mjs +1 -1
  38. package/{src → cli}/commands/component-resolution.test.mjs +2 -2
  39. package/{src → cli}/commands/discover.mjs +23 -12
  40. package/{src → cli}/commands/docs.mjs +42 -10
  41. package/{src → cli}/commands/docs.test.mjs +1 -1
  42. package/{src → cli}/commands/doctor.mjs +3 -3
  43. package/{src → cli}/commands/doctor.test.mjs +2 -2
  44. package/{src → cli}/commands/ensure-core-built.mjs +3 -2
  45. package/{src → cli}/commands/external-showcase.test.mjs +1 -1
  46. package/{src → cli}/commands/hook/index.mjs +40 -17
  47. package/{src → cli}/commands/import-hint-correctness.test.mjs +1 -1
  48. package/cli/commands/init.mjs +195 -0
  49. package/{src → cli}/commands/init.next-steps.test.mjs +1 -1
  50. package/cli/commands/interactive-guard.test.mjs +66 -0
  51. package/{src → cli}/commands/json-contract.test.mjs +2 -2
  52. package/{src → cli}/commands/layout.mjs +59 -19
  53. package/{src → cli}/commands/search.mjs +22 -15
  54. package/{src → cli}/commands/search.test.mjs +1 -1
  55. package/cli/commands/setup-nudge.test.mjs +108 -0
  56. package/cli/commands/swizzle.mjs +103 -0
  57. package/{src → cli}/commands/template.mjs +84 -53
  58. package/{src → cli}/commands/template.path-safety.test.mjs +2 -2
  59. package/{src → cli}/commands/upgrade.integration-policy.test.mjs +1 -1
  60. package/{src → cli}/commands/upgrade.mjs +291 -77
  61. package/cli/commands/upgrade.test.mjs +314 -0
  62. package/{src → cli}/commands/validate-integration.mjs +17 -37
  63. package/{src → cli}/index.mjs +55 -19
  64. package/{src/codemods → codemods}/__tests__/registry.test.mjs +1 -0
  65. package/{src/codemods → codemods}/ensure-jscodeshift.mjs +12 -28
  66. package/{src/codemods → codemods}/integration-discovery.mjs +6 -3
  67. package/{src/codemods → codemods}/integration-discovery.test.mjs +1 -1
  68. package/{src/codemods → codemods}/integration-runner.mjs +8 -3
  69. package/{src/codemods → codemods}/registry.mjs +4 -1
  70. package/{src/codemods → codemods}/run-codemod.mjs +18 -11
  71. package/{src/codemods → codemods}/runner.mjs +24 -14
  72. package/{src/codemods → codemods}/transforms/v0.0.10/remove-size-props.mjs +9 -4
  73. package/{src/codemods → codemods}/transforms/v0.0.12/add-is-icon-only.mjs +27 -22
  74. package/{src/codemods → codemods}/transforms/v0.0.13/icon-name-deprecations.mjs +12 -5
  75. package/{src/codemods → codemods}/transforms/v0.0.13/rename-attachments-to-drawer.mjs +15 -8
  76. package/{src/codemods → codemods}/transforms/v0.0.13/toolbar-density-to-size.mjs +10 -4
  77. package/{src/codemods → codemods}/transforms/v0.0.14/rename-action-props.mjs +11 -5
  78. package/{src/codemods → codemods}/transforms/v0.0.14/rename-section-wash-to-muted.mjs +11 -6
  79. package/{src/codemods → codemods}/transforms/v0.0.14/rename-status-variants.mjs +15 -10
  80. package/{src/codemods → codemods}/transforms/v0.0.15/migrate-item-children-to-endcontent.mjs +13 -8
  81. package/{src/codemods → codemods}/transforms/v0.0.15/migrate-selector-children-to-render-option.mjs +18 -13
  82. package/{src/codemods → codemods}/transforms/v0.0.15/migrate-theme-selectors-to-data-attrs.mjs +8 -4
  83. package/{src/codemods → codemods}/transforms/v0.0.15/rename-date-picker-to-input.mjs +11 -6
  84. package/{src/codemods → codemods}/transforms/v0.0.15/rename-imperative-ref-to-handleRef.mjs +6 -1
  85. package/{src/codemods → codemods}/transforms/v0.0.15/rename-isStreaming-to-isStopShown.mjs +6 -1
  86. package/{src/codemods → codemods}/transforms/v0.0.15/rename-stack-element-to-as.mjs +8 -3
  87. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-badge-dot-to-statusdot.mjs +17 -10
  88. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-gap-to-numeric.mjs +7 -1
  89. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-isFullBleed-to-padding.mjs +9 -4
  90. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-useXDSIcon-to-getIcon.mjs +12 -7
  91. package/{src/codemods → codemods}/transforms/v0.0.2/rename-banner-endButton-to-endContent.mjs +7 -2
  92. package/{src/codemods → codemods}/transforms/v0.0.2/rename-form-tooltip-startIcon.mjs +8 -2
  93. package/{src/codemods → codemods}/transforms/v0.0.2/rename-isShown-to-isOpen.mjs +7 -2
  94. package/{src/codemods → codemods}/transforms/v0.0.2/rename-selector-items-to-options.mjs +7 -2
  95. package/{src/codemods → codemods}/transforms/v0.0.2/rename-sidenav-header-to-heading.mjs +11 -4
  96. package/{src/codemods → codemods}/transforms/v0.0.2/rename-topnav-title-to-heading.mjs +10 -4
  97. package/{src/codemods → codemods}/transforms/v0.0.2/unify-uncontrolled-to-defaultX.mjs +7 -2
  98. package/{src/codemods → codemods}/transforms/v0.0.2/unify-visibility-to-onOpenChange.mjs +10 -5
  99. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-badge-children-to-label.mjs +7 -2
  100. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-collapse-to-collapsible.mjs +9 -3
  101. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-radius-tokens.mjs +11 -5
  102. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-shadow-tokens.mjs +13 -6
  103. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-skeleton-radius.mjs +7 -1
  104. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-token-names.mjs +11 -5
  105. package/{src/codemods → codemods}/transforms/v0.0.7/rename-banner-variant-to-container.mjs +8 -3
  106. package/{src/codemods → codemods}/transforms/v0.0.8/migrate-token-renames.mjs +15 -8
  107. package/{src/codemods → codemods}/transforms/v0.0.8/rename-endslot-to-endcontent.mjs +7 -2
  108. package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/drop-xds-prefix-imports.test.mjs +42 -7
  109. package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +43 -0
  110. package/{src/codemods → codemods}/transforms/v0.1.0/drop-xds-prefix-imports.mjs +117 -13
  111. package/{src/codemods → codemods}/transforms/v0.1.0/migrate-xds-css-surfaces.mjs +21 -17
  112. package/{src/codemods → codemods}/transforms/v0.1.0/migrate-xds-declare-module.mjs +7 -2
  113. package/{src/codemods → codemods}/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +86 -15
  114. package/{src/codemods → codemods}/transforms/v0.1.2/rename-text-color-active-to-accent.mjs +15 -9
  115. package/{src/codemods → codemods}/transforms/v0.1.3/migrate-layout-components-to-experimental.mjs +17 -12
  116. package/{src/codemods → codemods}/transforms/v0.1.5/rename-switch-label-spacing-default-to-hug.mjs +15 -9
  117. package/{src/codemods → codemods}/transforms/v0.1.7/migrate-table-tableprops-to-direct-props.mjs +17 -10
  118. package/{src/codemods → codemods}/transforms/v0.1.7/rename-table-renderprops-styles-to-xstyle.mjs +18 -13
  119. package/codemods/transforms/v0.1.8/__tests__/rename-avatar-size-scale.test.mjs +161 -0
  120. package/codemods/transforms/v0.1.8/index.mjs +19 -0
  121. package/codemods/transforms/v0.1.8/rename-avatar-size-scale.mjs +239 -0
  122. package/docs/cli-integrations.doc.mjs +150 -0
  123. package/docs/elevation.doc.mjs +79 -1
  124. package/docs/getting-started.doc.mjs +9 -9
  125. package/docs/internationalization.doc.mjs +92 -46
  126. package/docs/migration.doc.mjs +18 -18
  127. package/docs/principles.doc.dense.mjs +1 -1
  128. package/docs/principles.doc.mjs +6 -6
  129. package/docs/principles.doc.zh.mjs +1 -1
  130. package/docs/styling-libraries.doc.mjs +3 -3
  131. package/docs/styling.doc.mjs +4 -4
  132. package/docs/theme.doc.dense.mjs +2 -2
  133. package/docs/theme.doc.mjs +7 -7
  134. package/docs/theme.doc.zh.mjs +1 -1
  135. package/docs/tokens.doc.mjs +1 -1
  136. package/docs/working-with-ai.doc.mjs +19 -19
  137. package/{src/commands → lib/agent-docs}/agent-docs.mjs +164 -29
  138. package/{src/commands → lib/agent-docs}/agent-docs.path-safety.test.mjs +1 -1
  139. package/{src/commands → lib/agent-docs}/agent-docs.test.mjs +123 -10
  140. package/{src/lib → lib}/cli-error.mjs +2 -2
  141. package/{src/lib → lib}/component-discovery.mjs +44 -2
  142. package/{src/lib → lib}/component-format.mjs +67 -25
  143. package/{src/lib → lib}/component-loader.mjs +27 -13
  144. package/{src/lib → lib}/componentDocOverlay.test.mjs +0 -1
  145. package/{src/lib → lib}/error-codes.test.mjs +1 -1
  146. package/{src/lib → lib}/hook-discovery.mjs +14 -1
  147. package/{src/lib → lib}/hook-format.mjs +29 -5
  148. package/{src/lib → lib}/integration-warnings.mjs +2 -2
  149. package/{src/lib → lib}/integrations.mjs +20 -0
  150. package/{src/lib → lib}/integrations.test.mjs +1 -1
  151. package/{src/lib → lib}/json-contract.test.mjs +1 -1
  152. package/{src/lib → lib}/json-shim.mjs +11 -6
  153. package/{src/lib → lib}/json-shim.test.mjs +1 -1
  154. package/{src/lib → lib}/json.mjs +3 -3
  155. package/{src/lib → lib}/levenshtein.mjs +6 -0
  156. package/{src/lib → lib}/manifest.mjs +7 -5
  157. package/{src/lib → lib}/manifest.test.mjs +2 -2
  158. package/{src/lib → lib}/module-loader.mjs +1 -0
  159. package/{src/lib → lib}/package-scanner.mjs +47 -0
  160. package/{src/lib → lib}/project.mjs +48 -18
  161. package/{src/lib → lib}/project.test.mjs +1 -1
  162. package/{src/lib → lib}/resolve-theme.mjs +5 -0
  163. package/{src/lib → lib}/string-utils.mjs +15 -0
  164. package/lib/term-log.mjs +57 -0
  165. package/{src/lib → lib}/xle/browser.mjs +18 -8
  166. package/{src/lib → lib}/xle/expand.mjs +155 -22
  167. package/{src/lib → lib}/xle/parse.mjs +119 -13
  168. package/{src/lib → lib}/xle/print.mjs +54 -14
  169. package/{src/lib → lib}/xle/registry-core.mjs +28 -3
  170. package/{src/lib → lib}/xle/registry.mjs +9 -4
  171. package/{src/lib → lib}/xle/splice.mjs +13 -2
  172. package/{src/lib → lib}/xle/validate.mjs +95 -14
  173. package/lib/xle/xle-ast.d.ts +214 -0
  174. package/package.json +37 -28
  175. package/scripts/postinstall.mjs +74 -0
  176. package/templates/blocks/components/Avatar/AvatarFallbackChain.tsx +4 -4
  177. package/templates/blocks/components/Avatar/AvatarGroup.tsx +2 -2
  178. package/templates/blocks/components/Avatar/AvatarInitialsFallback.tsx +1 -1
  179. package/templates/blocks/components/Avatar/AvatarShowcase.tsx +5 -5
  180. package/templates/blocks/components/Avatar/AvatarUserCard.tsx +1 -1
  181. package/templates/blocks/components/Avatar/AvatarWithImage.tsx +4 -4
  182. package/templates/blocks/components/Avatar/AvatarWithStatus.tsx +3 -3
  183. package/templates/blocks/components/AvatarGroup/AvatarGroupShowcase.tsx +2 -2
  184. package/templates/blocks/components/AvatarGroupOverflow/AvatarGroupOverflowCustomText.tsx +1 -1
  185. package/templates/blocks/components/AvatarGroupOverflow/AvatarGroupOverflowDefault.tsx +1 -1
  186. package/templates/blocks/components/AvatarGroupOverflow/AvatarGroupOverflowShowcase.tsx +2 -2
  187. package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotShowcase.tsx +3 -3
  188. package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +3 -3
  189. package/templates/blocks/components/Banner/BannerFloating.doc.mjs +14 -0
  190. package/templates/blocks/components/Banner/BannerFloating.tsx +16 -0
  191. package/templates/blocks/components/Button/ButtonFloating.doc.mjs +14 -0
  192. package/templates/blocks/components/Button/ButtonFloating.tsx +37 -0
  193. package/templates/blocks/components/ButtonGroup/ButtonGroupFloating.doc.mjs +14 -0
  194. package/templates/blocks/components/ButtonGroup/ButtonGroupFloating.tsx +23 -0
  195. package/templates/blocks/components/Card/CardElevations.doc.mjs +14 -0
  196. package/templates/blocks/components/Card/CardElevations.tsx +32 -0
  197. package/templates/blocks/components/Card/ClickableCardElevated.doc.mjs +14 -0
  198. package/templates/blocks/components/Card/ClickableCardElevated.tsx +21 -0
  199. package/templates/blocks/components/Card/SelectableCardElevated.doc.mjs +14 -0
  200. package/templates/blocks/components/Card/SelectableCardElevated.tsx +37 -0
  201. package/templates/blocks/components/Carousel/CarouselSnap.tsx +1 -1
  202. package/templates/blocks/components/ChatComposer/ChatComposerFlat.doc.mjs +14 -0
  203. package/templates/blocks/components/ChatComposer/ChatComposerFlat.tsx +75 -0
  204. package/templates/blocks/components/ChatMessage/ChatMessageAvatarName.tsx +2 -2
  205. package/templates/blocks/components/ChatMessage/ChatMessageMultiBubble.tsx +1 -1
  206. package/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleGrouping.tsx +1 -1
  207. package/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleMetadata.tsx +1 -1
  208. package/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx +5 -9
  209. package/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx +1 -1
  210. package/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +1 -1
  211. package/templates/blocks/components/HoverCard/HoverCardShowcase.tsx +1 -1
  212. package/templates/blocks/components/IconButton/IconButtonFloating.doc.mjs +14 -0
  213. package/templates/blocks/components/IconButton/IconButtonFloating.tsx +37 -0
  214. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.doc.mjs +19 -0
  215. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.tsx +46 -0
  216. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.doc.mjs +14 -0
  217. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.tsx +33 -0
  218. package/templates/blocks/components/Item/ItemWithMedia.tsx +2 -2
  219. package/templates/blocks/components/ListItem/ListItemWithMedia.tsx +2 -2
  220. package/templates/blocks/components/OverflowList/OverflowListCappedToolbar.doc.mjs +14 -0
  221. package/templates/blocks/components/OverflowList/OverflowListCappedToolbar.tsx +39 -0
  222. package/templates/blocks/components/OverflowList/OverflowListMultiRowTags.doc.mjs +14 -0
  223. package/templates/blocks/components/OverflowList/OverflowListMultiRowTags.tsx +44 -0
  224. package/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +2 -6
  225. package/templates/blocks/components/Stack/StackFillItem.tsx +2 -6
  226. package/templates/blocks/components/TabList/TabListTabsWithActions.doc.mjs +1 -1
  227. package/templates/blocks/components/TabList/TabListTabsWithActions.tsx +2 -7
  228. package/templates/blocks/components/Table/TableRowStatusTable.doc.mjs +14 -0
  229. package/templates/blocks/components/Table/TableRowStatusTable.tsx +59 -0
  230. package/templates/blocks/components/Thumbnail/ThumbnailDisabled.tsx +6 -1
  231. package/templates/blocks/components/Thumbnail/ThumbnailGallery.tsx +1 -0
  232. package/templates/blocks/components/Thumbnail/ThumbnailRemovable.tsx +1 -0
  233. package/templates/blocks/components/TypeaheadItem/TypeaheadItemShowcase.tsx +1 -1
  234. package/templates/pages/ai-chat/page.tsx +4 -4
  235. package/templates/pages/dashboard-portfolio/page.tsx +3 -11
  236. package/templates/pages/detail-page/page.tsx +5 -12
  237. package/templates/pages/documentation-design/page.tsx +1 -1
  238. package/templates/pages/messaging-shell/page.tsx +6 -8
  239. package/templates/pages/table-grouped/page.tsx +9 -14
  240. package/templates/pages/table-page/page.tsx +7 -9
  241. package/templates/pages/table-page-heatmap-status/page.tsx +5 -13
  242. package/{src/types → types}/api.contract.assert.ts +17 -8
  243. package/{src/types → types}/api.d.ts +110 -9
  244. package/{src/types → types}/base.d.ts +40 -4
  245. package/types/build.d.ts +53 -0
  246. package/types/codemod.d.ts +166 -0
  247. package/{src/types → types}/component.d.ts +1 -1
  248. package/{src/types → types}/discover.d.ts +1 -1
  249. package/{src/types → types}/docs.d.ts +1 -4
  250. package/{src/types → types}/hook.d.ts +1 -1
  251. package/{src/types → types}/index.d.ts +1 -0
  252. package/types/jscodeshift.d.ts +19 -0
  253. package/types/layout.d.ts +74 -0
  254. package/{src/types → types}/swizzle.d.ts +4 -0
  255. package/{src/types → types}/template-api.d.ts +4 -1
  256. package/types/theme.d.ts +53 -0
  257. package/types/upgrade.d.ts +108 -0
  258. package/utils/package-manager.mjs +178 -0
  259. package/utils/package-manager.test.mjs +220 -0
  260. package/{src/utils → utils}/path-safety.mjs +0 -18
  261. package/{src/utils → utils}/paths.mjs +4 -1
  262. package/{src/utils → utils}/update-check.mjs +5 -4
  263. package/{src/utils → utils}/update-check.test.mjs +3 -3
  264. package/docs/integration-authoring.md +0 -105
  265. package/src/commands/build.mjs +0 -196
  266. package/src/commands/init.mjs +0 -288
  267. package/src/commands/interactive-guard.test.mjs +0 -69
  268. package/src/commands/swizzle.mjs +0 -440
  269. package/src/commands/upgrade.test.mjs +0 -160
  270. package/src/types/codemod.d.ts +0 -81
  271. package/src/types/theme.d.ts +0 -23
  272. package/src/types/upgrade.d.ts +0 -64
  273. package/src/utils/interactive.mjs +0 -76
  274. package/src/utils/interactive.test.mjs +0 -70
  275. package/src/utils/package-manager.mjs +0 -74
  276. package/src/utils/package-manager.test.mjs +0 -113
  277. /package/{src/api → api/docs}/docOverlays.test.mjs +0 -0
  278. /package/{src/api → api/integration}/integration-block-exports.test.mjs +0 -0
  279. /package/{src/api → api/template}/template.test.mjs +0 -0
  280. /package/{src → authoring}/codemod.test.mjs +0 -0
  281. /package/{src → authoring}/config.mjs +0 -0
  282. /package/{src → authoring}/integration.mjs +0 -0
  283. /package/{src → authoring}/template.test.mjs +0 -0
  284. /package/{src → cli}/cli-exit-codes.test.mjs +0 -0
  285. /package/{src → cli}/commands/build-theme.color-scheme.test.mjs +0 -0
  286. /package/{src → cli}/commands/build-theme.import-path.test.mjs +0 -0
  287. /package/{src → cli}/commands/build-theme.path-safety.test.mjs +0 -0
  288. /package/{src → cli}/commands/build-theme.prose.test.mjs +0 -0
  289. /package/{src → cli}/commands/build-theme.variants.test.mjs +0 -0
  290. /package/{src → cli}/commands/build-theme.watch.test.mjs +0 -0
  291. /package/{src → cli}/commands/component.test.mjs +0 -0
  292. /package/{src → cli}/commands/detail-levels.test.mjs +0 -0
  293. /package/{src → cli}/commands/swizzle.path-safety.test.mjs +0 -0
  294. /package/{src → cli}/commands/swizzle.routing.test.mjs +0 -0
  295. /package/{src → cli}/commands/template.test.mjs +0 -0
  296. /package/{src → cli}/commands/upgrade.config-ordering.test.mjs +0 -0
  297. /package/{src → cli}/commands/validate-integration.test.mjs +0 -0
  298. /package/{src → cli}/update-hint-commands.test.mjs +0 -0
  299. /package/{src/codemods → codemods}/__tests__/rename-imperative-ref-to-handleRef.test.mjs +0 -0
  300. /package/{src/codemods → codemods}/__tests__/rename-isStreaming-to-isStopShown.test.mjs +0 -0
  301. /package/{src/codemods → codemods}/__tests__/rename-section-wash-to-muted.test.mjs +0 -0
  302. /package/{src/codemods → codemods}/__tests__/runner.test.mjs +0 -0
  303. /package/{src/codemods → codemods}/__tests__/toolbar-density-to-size.test.mjs +0 -0
  304. /package/{src/codemods → codemods}/__tests__/validation.test.mjs +0 -0
  305. /package/{src/codemods → codemods}/transforms/v0.0.10/__tests__/remove-size-props.test.mjs +0 -0
  306. /package/{src/codemods → codemods}/transforms/v0.0.10/index.mjs +0 -0
  307. /package/{src/codemods → codemods}/transforms/v0.0.12/__tests__/add-is-icon-only.test.mjs +0 -0
  308. /package/{src/codemods → codemods}/transforms/v0.0.12/index.mjs +0 -0
  309. /package/{src/codemods → codemods}/transforms/v0.0.13/__tests__/icon-name-deprecations.test.mjs +0 -0
  310. /package/{src/codemods → codemods}/transforms/v0.0.13/__tests__/rename-attachments-to-drawer.test.mjs +0 -0
  311. /package/{src/codemods → codemods}/transforms/v0.0.13/index.mjs +0 -0
  312. /package/{src/codemods → codemods}/transforms/v0.0.14/__tests__/rename-action-props.test.mjs +0 -0
  313. /package/{src/codemods → codemods}/transforms/v0.0.14/__tests__/rename-status-variants.test.mjs +0 -0
  314. /package/{src/codemods → codemods}/transforms/v0.0.14/index.mjs +0 -0
  315. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/migrate-item-children-to-endcontent.test.mjs +0 -0
  316. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/migrate-selector-children-to-render-option.test.mjs +0 -0
  317. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/migrate-theme-selectors-to-data-attrs.test.mjs +0 -0
  318. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/rename-date-picker-to-input.test.mjs +0 -0
  319. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/rename-stack-element-to-as.test.mjs +0 -0
  320. /package/{src/codemods → codemods}/transforms/v0.0.15/index.mjs +0 -0
  321. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-badge-dot-to-statusdot.test.mjs +0 -0
  322. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-gap-to-numeric.test.mjs +0 -0
  323. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-isFullBleed-to-padding.test.mjs +0 -0
  324. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-useXDSIcon-to-getIcon.test.mjs +0 -0
  325. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-banner-endButton-to-endContent.test.mjs +0 -0
  326. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-form-tooltip-startIcon.test.mjs +0 -0
  327. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-isShown-to-isOpen.test.mjs +0 -0
  328. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-selector-items-to-options.test.mjs +0 -0
  329. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-sidenav-header-to-heading.test.mjs +0 -0
  330. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-topnav-title-to-heading.test.mjs +0 -0
  331. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/unify-uncontrolled-to-defaultX.test.mjs +0 -0
  332. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/unify-visibility-to-onOpenChange.test.mjs +0 -0
  333. /package/{src/codemods → codemods}/transforms/v0.0.2/index.mjs +0 -0
  334. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-collapse-to-collapsible.test.mjs +0 -0
  335. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-radius-tokens.test.mjs +0 -0
  336. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-shadow-tokens.test.mjs +0 -0
  337. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-skeleton-radius.test.mjs +0 -0
  338. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-token-names.test.mjs +0 -0
  339. /package/{src/codemods → codemods}/transforms/v0.0.6/index.mjs +0 -0
  340. /package/{src/codemods → codemods}/transforms/v0.0.7/__tests__/rename-banner-variant-to-container.test.mjs +0 -0
  341. /package/{src/codemods → codemods}/transforms/v0.0.7/index.mjs +0 -0
  342. /package/{src/codemods → codemods}/transforms/v0.0.8/__tests__/migrate-token-renames.test.mjs +0 -0
  343. /package/{src/codemods → codemods}/transforms/v0.0.8/__tests__/rename-endslot-to-endcontent.test.mjs +0 -0
  344. /package/{src/codemods → codemods}/transforms/v0.0.8/index.mjs +0 -0
  345. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/migrate-xds-css-surfaces.test.mjs +0 -0
  346. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/migrate-xds-declare-module.test.mjs +0 -0
  347. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/v0.1.0-ordering.test.mjs +0 -0
  348. /package/{src/codemods → codemods}/transforms/v0.1.0/index.mjs +0 -0
  349. /package/{src/codemods → codemods}/transforms/v0.1.2/__tests__/rename-text-color-active-to-accent.test.mjs +0 -0
  350. /package/{src/codemods → codemods}/transforms/v0.1.2/index.mjs +0 -0
  351. /package/{src/codemods → codemods}/transforms/v0.1.3/__tests__/migrate-layout-components-to-experimental.test.mjs +0 -0
  352. /package/{src/codemods → codemods}/transforms/v0.1.3/index.mjs +0 -0
  353. /package/{src/codemods → codemods}/transforms/v0.1.5/__tests__/rename-switch-label-spacing-default-to-hug.test.mjs +0 -0
  354. /package/{src/codemods → codemods}/transforms/v0.1.5/index.mjs +0 -0
  355. /package/{src/codemods → codemods}/transforms/v0.1.7/__tests__/migrate-table-tableprops-to-direct-props.test.mjs +0 -0
  356. /package/{src/codemods → codemods}/transforms/v0.1.7/__tests__/rename-table-renderprops-styles-to-xstyle.test.mjs +0 -0
  357. /package/{src/codemods → codemods}/transforms/v0.1.7/index.mjs +0 -0
  358. /package/{src/lib → lib}/cli-error.test.mjs +0 -0
  359. /package/{src/lib → lib}/component-discovery.importpath.test.mjs +0 -0
  360. /package/{src/lib → lib}/component-format.test.mjs +0 -0
  361. /package/{src/lib → lib}/component-loader.test.mjs +0 -0
  362. /package/{src/lib → lib}/config-cache.mjs +0 -0
  363. /package/{src/lib → lib}/config-cache.test.mjs +0 -0
  364. /package/{src/lib → lib}/config-schema.mjs +0 -0
  365. /package/{src/lib → lib}/error-codes.mjs +0 -0
  366. /package/{src/lib → lib}/integration-warnings.test.mjs +0 -0
  367. /package/{src/lib → lib}/module-loader.test.mjs +0 -0
  368. /package/{src/lib → lib}/node-version.mjs +0 -0
  369. /package/{src/lib → lib}/node-version.test.mjs +0 -0
  370. /package/{src/lib → lib}/parse.mjs +0 -0
  371. /package/{src/lib → lib}/site.mjs +0 -0
  372. /package/{src/lib → lib}/xle/browser.d.ts +0 -0
  373. /package/{src/lib → lib}/xle/xle.test.mjs +0 -0
  374. /package/{src/schemas → schemas}/doc-schema.mjs +0 -0
  375. /package/{src/schemas → schemas}/template-schema.mjs +0 -0
  376. /package/{src/types → types}/config.d.ts +0 -0
  377. /package/{src/types → types}/doc.d.ts +0 -0
  378. /package/{src/types → types}/doctor.d.ts +0 -0
  379. /package/{src/types → types}/error-codes.d.ts +0 -0
  380. /package/{src/types → types}/integration.d.ts +0 -0
  381. /package/{src/types → types}/manifest.d.ts +0 -0
  382. /package/{src/types → types}/search.d.ts +0 -0
  383. /package/{src/types → types}/template.d.ts +0 -0
  384. /package/{src/types → types}/validate-integration.d.ts +0 -0
  385. /package/{src/utils → utils}/github.mjs +0 -0
  386. /package/{src/utils → utils}/path-safety.test.mjs +0 -0
  387. /package/{src/utils → utils}/paths.test.mjs +0 -0
  388. /package/{src/utils → utils}/semver.mjs +0 -0
  389. /package/{src/utils → utils}/semver.test.mjs +0 -0
@@ -0,0 +1,74 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file @astryxdesign/cli postinstall — nudge to run `astryx init`.
5
+ *
6
+ * Enforcement layer 2 of making `astryx init` foolproof: when the CLI is
7
+ * installed as a project dependency and the project hasn't run init yet, print a
8
+ * one-line next-step so agents/humans discover it.
9
+ *
10
+ * Reuses the ONE setup check (isAstryxInitialized from agent-docs.mjs — a
11
+ * dep-free import chain, safe at install time). Non-interactive, never fails the
12
+ * install, and stays quiet:
13
+ * - in the monorepo/source build (not under node_modules),
14
+ * - during npx's transient fetch (npx runs the bin — likely `init` — right
15
+ * after, so nudging here would double up), and
16
+ * - once setup is already done.
17
+ */
18
+
19
+ import {fileURLToPath, pathToFileURL} from 'node:url';
20
+
21
+ const HERE = fileURLToPath(import.meta.url);
22
+
23
+ /**
24
+ * Pure decision: should the postinstall print the setup nudge? Split out so the
25
+ * matrix is unit-testable without an actual npm install.
26
+ *
27
+ * @param {object} [opts]
28
+ * @param {string} [opts.scriptPath] - Absolute path of this script (location tells
29
+ * us dependency vs monorepo vs npx-cache).
30
+ * @param {string} [opts.npmCommand] - process.env.npm_command ('install', 'exec', …).
31
+ * @param {boolean} [opts.isSetUp] - Whether the project already ran init.
32
+ * @returns {boolean}
33
+ */
34
+ export function shouldNudge({scriptPath, npmCommand, isSetUp} = {}) {
35
+ if (!scriptPath || !scriptPath.includes('node_modules')) return false; // monorepo/source build
36
+ if (scriptPath.includes('_npx') || npmCommand === 'exec') return false; // npx transient — init runs next
37
+ if (isSetUp) return false; // already set up — stay quiet
38
+ return true;
39
+ }
40
+
41
+ /** @param {string} root @returns {Promise<boolean>} */
42
+ async function projectIsSetUp(root) {
43
+ try {
44
+ const {isAstryxInitialized} = await import('../lib/agent-docs/agent-docs.mjs');
45
+ return isAstryxInitialized(root);
46
+ } catch {
47
+ return false; // best-effort — if the check can't load, fall through and nudge
48
+ }
49
+ }
50
+
51
+ async function main() {
52
+ const root = process.env.INIT_CWD || process.cwd();
53
+ const nudge = shouldNudge({
54
+ scriptPath: HERE,
55
+ npmCommand: process.env.npm_command,
56
+ isSetUp: await projectIsSetUp(root),
57
+ });
58
+ if (nudge) {
59
+ // Scoped package form (`@astryxdesign/cli`) — always resolves to us. Bare
60
+ // `npx astryx` would fetch an unrelated look-alike package (see PR #4151).
61
+ // After that lands, switch this to its getCliInvocation() single source of truth.
62
+ process.stdout.write(
63
+ '\nNext step: run `npx @astryxdesign/cli init` to finish setup and install the Astryx agent prompt.\n\n',
64
+ );
65
+ }
66
+ }
67
+
68
+ // Run only when executed directly (`node scripts/postinstall.mjs`), never when
69
+ // imported by tests.
70
+ if (import.meta.url === pathToFileURL(process.argv[1] || '').href) {
71
+ main()
72
+ .catch(() => {})
73
+ .finally(() => process.exit(0));
74
+ }
@@ -13,7 +13,7 @@ export default function AvatarFallbackChain() {
13
13
  <Avatar
14
14
  src="https://lookaside.facebook.com/assets/astryx/DATA-Daniela-Gimenez.png"
15
15
  name="Daniela Gimenez"
16
- size="medium"
16
+ size="lg"
17
17
  />
18
18
  <Text type="supporting">Valid src</Text>
19
19
  </HStack>
@@ -22,7 +22,7 @@ export default function AvatarFallbackChain() {
22
22
  src="https://lookaside.facebook.com/assets/astryx/does-not-exist-primary.jpg"
23
23
  fallbackSrc="https://lookaside.facebook.com/assets/astryx/DATA-Ami-Pena.png"
24
24
  name="Invalid User"
25
- size="medium"
25
+ size="lg"
26
26
  />
27
27
  <Text type="supporting">Invalid src, valid fallbackSrc</Text>
28
28
  </HStack>
@@ -31,14 +31,14 @@ export default function AvatarFallbackChain() {
31
31
  src="https://lookaside.facebook.com/assets/astryx/does-not-exist-primary.jpg"
32
32
  fallbackSrc="https://lookaside.facebook.com/assets/astryx/does-not-exist-fallback.jpg"
33
33
  name="Test User"
34
- size="medium"
34
+ size="lg"
35
35
  />
36
36
  <Text type="supporting">Both invalid, has name</Text>
37
37
  </HStack>
38
38
  <HStack gap={3} vAlign="center">
39
39
  <Avatar
40
40
  src="https://lookaside.facebook.com/assets/astryx/does-not-exist-primary.jpg"
41
- size="medium"
41
+ size="lg"
42
42
  />
43
43
  <Text type="supporting">All invalid, no name</Text>
44
44
  </HStack>
@@ -37,7 +37,7 @@ export default function AvatarGroupBlock() {
37
37
  <Text type="supporting" color="secondary">
38
38
  Team members
39
39
  </Text>
40
- <AvatarGroup size="medium">
40
+ <AvatarGroup size="lg">
41
41
  {USERS.map(user => (
42
42
  <Avatar key={user.name} src={user.src} name={user.name} />
43
43
  ))}
@@ -48,7 +48,7 @@ export default function AvatarGroupBlock() {
48
48
  <Text type="supporting" color="secondary">
49
49
  Larger group
50
50
  </Text>
51
- <AvatarGroup size="medium">
51
+ <AvatarGroup size="lg">
52
52
  {USERS.slice(0, 3).map(user => (
53
53
  <Avatar key={user.name} src={user.src} name={user.name} />
54
54
  ))}
@@ -18,7 +18,7 @@ export default function AvatarInitialsFallback() {
18
18
  <Stack direction="horizontal" gap={6} vAlign="center">
19
19
  {NAMES.map(({name, note}) => (
20
20
  <Stack key={name} direction="vertical" gap={2} hAlign="center">
21
- <Avatar name={name} size="medium" />
21
+ <Avatar name={name} size="lg" />
22
22
  <Text type="supporting" color="secondary">
23
23
  {note}
24
24
  </Text>
@@ -11,24 +11,24 @@ export default function AvatarShowcase() {
11
11
  <Avatar
12
12
  src="https://lookaside.facebook.com/assets/astryx/DATA-Ana-Thomas.png"
13
13
  name="Ana Thomas"
14
- size="large"
14
+ size="xl"
15
15
  status={<AvatarStatusDot variant="success" label="Online" />}
16
16
  />
17
17
  <Avatar
18
18
  src="https://lookaside.facebook.com/assets/astryx/DATA-Drew-Young.png"
19
19
  name="Drew Young"
20
- size="large"
20
+ size="xl"
21
21
  />
22
22
  <Avatar
23
23
  src="https://lookaside.facebook.com/assets/astryx/DATA-Jihoo-Song.png"
24
24
  name="Jihoo Song"
25
- size="large"
25
+ size="xl"
26
26
  />
27
27
  <Avatar
28
28
  src="https://lookaside.facebook.com/assets/astryx/DATA-Nam-Tran.png"
29
29
  name="Nam Tran"
30
- size="large"
31
- status={<AvatarStatusDot variant="error" label="Online" />}
30
+ size="xl"
31
+ status={<AvatarStatusDot variant="error" label="Busy" />}
32
32
  />
33
33
  </Stack>
34
34
  );
@@ -35,7 +35,7 @@ export default function AvatarUserCard() {
35
35
  <Avatar
36
36
  src={user.src}
37
37
  name={user.name}
38
- size="medium"
38
+ size="lg"
39
39
  status={
40
40
  <AvatarStatusDot variant={user.variant} label={user.variant} />
41
41
  }
@@ -11,22 +11,22 @@ export default function AvatarWithImage() {
11
11
  <Avatar
12
12
  src="https://lookaside.facebook.com/assets/astryx/DATA-Ami-Pena.png"
13
13
  name="Ami Pena"
14
- size="tiny"
14
+ size="xsm"
15
15
  />
16
16
  <Avatar
17
17
  src="https://lookaside.facebook.com/assets/astryx/DATA-Ana-Thomas.png"
18
18
  name="Ana Thomas"
19
- size="small"
19
+ size="md"
20
20
  />
21
21
  <Avatar
22
22
  src="https://lookaside.facebook.com/assets/astryx/DATA-Daniela-Gimenez.png"
23
23
  name="Daniela Gimenez"
24
- size="medium"
24
+ size="lg"
25
25
  />
26
26
  <Avatar
27
27
  src="https://lookaside.facebook.com/assets/astryx/DATA-Gabriela-Fernandez.png"
28
28
  name="Gabriela Fernandez"
29
- size="large"
29
+ size="xl"
30
30
  />
31
31
  </Stack>
32
32
  );
@@ -11,19 +11,19 @@ export default function AvatarWithStatus() {
11
11
  <Avatar
12
12
  src="https://lookaside.facebook.com/assets/astryx/DATA-Itai-Jordaan.png"
13
13
  name="Itai Jordaan"
14
- size="large"
14
+ size="xl"
15
15
  status={<AvatarStatusDot variant="success" label="Online" />}
16
16
  />
17
17
  <Avatar
18
18
  src="https://lookaside.facebook.com/assets/astryx/DATA-Margot-Schroder.png"
19
19
  name="Margot Schroder"
20
- size="large"
20
+ size="xl"
21
21
  status={<AvatarStatusDot variant="neutral" label="Offline" />}
22
22
  />
23
23
  <Avatar
24
24
  src="https://lookaside.facebook.com/assets/astryx/DATA-Pablo-Morales.png"
25
25
  name="Pablo Morales"
26
- size="large"
26
+ size="xl"
27
27
  status={<AvatarStatusDot variant="error" label="Busy" />}
28
28
  />
29
29
  </Stack>
@@ -36,7 +36,7 @@ export default function AvatarGroupShowcase() {
36
36
  <Text type="supporting" color="secondary">
37
37
  Team members
38
38
  </Text>
39
- <AvatarGroup size="medium">
39
+ <AvatarGroup size="lg">
40
40
  {USERS.map(u => (
41
41
  <Avatar key={u.key} name={u.name} />
42
42
  ))}
@@ -46,7 +46,7 @@ export default function AvatarGroupShowcase() {
46
46
  <Text type="supporting" color="secondary">
47
47
  With overflow
48
48
  </Text>
49
- <AvatarGroup size="medium">
49
+ <AvatarGroup size="lg">
50
50
  {USERS.slice(0, 3).map(u => (
51
51
  <Avatar key={u.key} name={u.name} />
52
52
  ))}
@@ -24,7 +24,7 @@ export default function AvatarGroupOverflowCustomText() {
24
24
  <Text type="supporting" color="secondary">
25
25
  Team members
26
26
  </Text>
27
- <AvatarGroup size="medium">
27
+ <AvatarGroup size="lg">
28
28
  {TEAM.map(member => (
29
29
  <Avatar key={member.name} name={member.name} />
30
30
  ))}
@@ -24,7 +24,7 @@ export default function AvatarGroupOverflowDefault() {
24
24
  <Text type="supporting" color="secondary">
25
25
  Reviewers
26
26
  </Text>
27
- <AvatarGroup size="medium">
27
+ <AvatarGroup size="lg">
28
28
  {REVIEWERS.map(reviewer => (
29
29
  <Avatar key={reviewer.name} name={reviewer.name} />
30
30
  ))}
@@ -25,7 +25,7 @@ export default function AvatarGroupOverflowShowcase() {
25
25
  <Text type="supporting" color="secondary">
26
26
  Default overflow
27
27
  </Text>
28
- <AvatarGroup size="medium">
28
+ <AvatarGroup size="lg">
29
29
  {USERS.map(user => (
30
30
  <Avatar key={user.name} name={user.name} />
31
31
  ))}
@@ -36,7 +36,7 @@ export default function AvatarGroupOverflowShowcase() {
36
36
  <Text type="supporting" color="secondary">
37
37
  Custom count text
38
38
  </Text>
39
- <AvatarGroup size="medium">
39
+ <AvatarGroup size="lg">
40
40
  {USERS.slice(0, 2).map(user => (
41
41
  <Avatar key={user.name} name={user.name} />
42
42
  ))}
@@ -10,17 +10,17 @@ export default function AvatarStatusDotShowcase() {
10
10
  <HStack gap={4} vAlign="center">
11
11
  <Avatar
12
12
  name="Online User"
13
- size="large"
13
+ size="xl"
14
14
  status={<AvatarStatusDot variant="success" label="Online" />}
15
15
  />
16
16
  <Avatar
17
17
  name="Away User"
18
- size="large"
18
+ size="xl"
19
19
  status={<AvatarStatusDot variant="neutral" label="Away" />}
20
20
  />
21
21
  <Avatar
22
22
  name="Busy User"
23
- size="large"
23
+ size="xl"
24
24
  status={<AvatarStatusDot variant="error" label="Busy" />}
25
25
  />
26
26
  </HStack>
@@ -10,17 +10,17 @@ export default function AvatarStatusDotVariants() {
10
10
  <HStack gap={4} vAlign="center">
11
11
  <Avatar
12
12
  name="Ana Silva"
13
- size="large"
13
+ size="xl"
14
14
  status={<AvatarStatusDot variant="success" label="Online" />}
15
15
  />
16
16
  <Avatar
17
17
  name="Ben Okafor"
18
- size="large"
18
+ size="xl"
19
19
  status={<AvatarStatusDot variant="neutral" label="Away" />}
20
20
  />
21
21
  <Avatar
22
22
  name="Cleo Marsh"
23
- size="large"
23
+ size="xl"
24
24
  status={<AvatarStatusDot variant="error" label="Do not disturb" />}
25
25
  />
26
26
  </HStack>
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'Banner',
7
+ name: 'Banner — Floating',
8
+ displayName: 'Banner — Floating',
9
+ description:
10
+ 'A floating banner raised with `elevation="med"`. Banners are inline by default; raise one when it should read as an overlay above content.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: ['Banner'],
14
+ };
@@ -0,0 +1,16 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {Banner} from '@astryxdesign/core/Banner';
6
+
7
+ export default function BannerFloating() {
8
+ return (
9
+ <Banner
10
+ status="info"
11
+ title="You have unsaved changes"
12
+ description="A raised banner reads as an overlay floating above the page."
13
+ elevation="med"
14
+ />
15
+ );
16
+ }
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'Button',
7
+ name: 'Button — Floating',
8
+ displayName: 'Button — Floating',
9
+ description:
10
+ 'A floating action button raised with `elevation="med"`. Use elevation for buttons that hover above content, like a FAB.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: ['Button', 'Icon', 'Layout', 'Text'],
14
+ };
@@ -0,0 +1,37 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {Button} from '@astryxdesign/core/Button';
6
+ import {Icon} from '@astryxdesign/core/Icon';
7
+ import {Stack} from '@astryxdesign/core/Layout';
8
+ import {Text} from '@astryxdesign/core/Text';
9
+ import {PlusIcon} from '@heroicons/react/24/outline';
10
+
11
+ const VARIANTS = [
12
+ {variant: 'primary' as const, label: 'Primary'},
13
+ {variant: 'secondary' as const, label: 'Secondary'},
14
+ {variant: 'ghost' as const, label: 'Ghost'},
15
+ {variant: 'destructive' as const, label: 'Destructive'},
16
+ ];
17
+
18
+ export default function ButtonFloating() {
19
+ return (
20
+ <Stack direction="vertical" gap={4}>
21
+ <Text type="supporting" color="secondary">
22
+ Floating action buttons — raised above content with `elevation="med"`
23
+ </Text>
24
+ <Stack direction="horizontal" gap={3} vAlign="center">
25
+ {VARIANTS.map(({variant, label}) => (
26
+ <Button
27
+ key={variant}
28
+ label={label}
29
+ variant={variant}
30
+ icon={<Icon icon={PlusIcon} />}
31
+ elevation="med"
32
+ />
33
+ ))}
34
+ </Stack>
35
+ </Stack>
36
+ );
37
+ }
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'ButtonGroup',
7
+ name: 'ButtonGroup — Floating',
8
+ displayName: 'ButtonGroup — Floating',
9
+ description:
10
+ 'A grouped action bar raised with `elevation="med"`. The connected buttons share one surface, so the shadow lifts them as a unit.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: ['ButtonGroup', 'Button', 'Layout', 'Text'],
14
+ };
@@ -0,0 +1,23 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {ButtonGroup} from '@astryxdesign/core/ButtonGroup';
6
+ import {Button} from '@astryxdesign/core/Button';
7
+ import {Stack} from '@astryxdesign/core/Layout';
8
+ import {Text} from '@astryxdesign/core/Text';
9
+
10
+ export default function ButtonGroupFloating() {
11
+ return (
12
+ <Stack direction="vertical" gap={3} hAlign="start">
13
+ <Text type="supporting" color="secondary">
14
+ The whole group shares one raised surface — a floating action bar
15
+ </Text>
16
+ <ButtonGroup label="Zoom controls" elevation="med">
17
+ <Button label="Zoom out" />
18
+ <Button label="Reset" />
19
+ <Button label="Zoom in" />
20
+ </ButtonGroup>
21
+ </Stack>
22
+ );
23
+ }
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'Card',
7
+ name: 'Card — Elevations',
8
+ displayName: 'Card — Elevations',
9
+ description:
10
+ 'The four elevation levels side by side. Cards are flat by default; raise a card with `elevation` only when it needs to float above surrounding content.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: ['Card', 'Layout', 'Text'],
14
+ };
@@ -0,0 +1,32 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {Card} from '@astryxdesign/core/Card';
6
+ import {Stack} from '@astryxdesign/core/Layout';
7
+ import {Grid} from '@astryxdesign/core/Grid';
8
+ import {Text, Heading} from '@astryxdesign/core/Text';
9
+
10
+ const LEVELS = [
11
+ {elevation: 'none' as const, caption: 'Flat — sits on the page (default)'},
12
+ {elevation: 'low' as const, caption: 'Low — lifts off slightly'},
13
+ {elevation: 'med' as const, caption: 'Med — clearly raised'},
14
+ {elevation: 'high' as const, caption: 'High — floats well above'},
15
+ ];
16
+
17
+ export default function CardElevations() {
18
+ return (
19
+ <Grid columns={2} gap={4} width={520}>
20
+ {LEVELS.map(({elevation, caption}) => (
21
+ <Card key={elevation} elevation={elevation}>
22
+ <Stack direction="vertical" gap={1}>
23
+ <Heading level={4}>elevation=&quot;{elevation}&quot;</Heading>
24
+ <Text type="supporting" color="secondary">
25
+ {caption}
26
+ </Text>
27
+ </Stack>
28
+ </Card>
29
+ ))}
30
+ </Grid>
31
+ );
32
+ }
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'ClickableCard',
7
+ name: 'ClickableCard — Elevated',
8
+ displayName: 'Clickable Card — Elevated',
9
+ description:
10
+ 'A clickable card raised with `elevation="med"` so the shadow signals the whole surface is interactive.',
11
+ isReady: true,
12
+ aspectRatio: 1,
13
+ componentsUsed: ['ClickableCard', 'Layout', 'Text'],
14
+ };
@@ -0,0 +1,21 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {ClickableCard} from '@astryxdesign/core/ClickableCard';
6
+ import {Stack} from '@astryxdesign/core/Layout';
7
+ import {Text, Heading} from '@astryxdesign/core/Text';
8
+
9
+ export default function ClickableCardElevated() {
10
+ return (
11
+ <ClickableCard label="Open report" href="#" elevation="med" width={320}>
12
+ <Stack direction="vertical" gap={2}>
13
+ <Heading level={4}>Quarterly report</Heading>
14
+ <Text type="body" color="secondary">
15
+ A raised shadow signals the whole card is clickable, lifting it above
16
+ the surrounding content.
17
+ </Text>
18
+ </Stack>
19
+ </ClickableCard>
20
+ );
21
+ }
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'SelectableCard',
7
+ name: 'SelectableCard — Elevated',
8
+ displayName: 'Selectable Card — Elevated',
9
+ description:
10
+ 'Raised selectable cards with `elevation="low"`. The inset selection ring composes on top of the shadow, so a selected card keeps its elevation.',
11
+ isReady: true,
12
+ aspectRatio: 2,
13
+ componentsUsed: ['SelectableCard', 'Layout', 'Text'],
14
+ };
@@ -0,0 +1,37 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {useState} from 'react';
6
+ import {SelectableCard} from '@astryxdesign/core/SelectableCard';
7
+ import {Grid} from '@astryxdesign/core/Grid';
8
+ import {Text} from '@astryxdesign/core/Text';
9
+
10
+ const PLANS = [
11
+ {id: 'starter', name: 'Starter'},
12
+ {id: 'pro', name: 'Pro'},
13
+ ];
14
+
15
+ export default function SelectableCardElevated() {
16
+ const [selected, setSelected] = useState('pro');
17
+
18
+ return (
19
+ <Grid columns={2} gap={3} width={420}>
20
+ {PLANS.map(plan => (
21
+ <SelectableCard
22
+ key={plan.id}
23
+ label={plan.name}
24
+ isSelected={selected === plan.id}
25
+ onChange={() => setSelected(plan.id)}
26
+ elevation="low">
27
+ <Text type="body" weight="bold">
28
+ {plan.name}
29
+ </Text>
30
+ <Text type="supporting" color="secondary">
31
+ The resting shadow stays put — the selection ring layers on top.
32
+ </Text>
33
+ </SelectableCard>
34
+ ))}
35
+ </Grid>
36
+ );
37
+ }
@@ -27,7 +27,7 @@ export default function CarouselSnap() {
27
27
  {TEAM.map(person => (
28
28
  <Card key={person.name} width={180} minHeight={140}>
29
29
  <Stack direction="vertical" gap={3} hAlign="center">
30
- <Avatar name={person.name} size="medium" />
30
+ <Avatar name={person.name} size="lg" />
31
31
  <Stack direction="vertical" gap={1} hAlign="center">
32
32
  <Text type="body" weight="bold">
33
33
  {person.name}
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'ChatComposer',
7
+ name: 'ChatComposer — Flat',
8
+ displayName: 'ChatComposer — Flat',
9
+ description:
10
+ 'The composer is raised by default (`elevation="low"`). Set `elevation="none"` to flatten it — it then draws a border with the same rest / hover / focus treatment as a text input.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: ['ChatComposer', 'Layout', 'Text'],
14
+ };