@astryxdesign/cli 0.1.8-canary.08a0957 → 0.1.8-canary.0db5dfd

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 (325) hide show
  1. package/{src/api → api/blog}/blog.mjs +42 -6
  2. package/{src/api → api/blog}/blog.test.mjs +2 -2
  3. package/api/build/build.mjs +92 -0
  4. package/api/build/build.test.mjs +92 -0
  5. package/{src/api → api/component}/component.mjs +49 -26
  6. package/{src/api → api/discover}/discover.mjs +55 -18
  7. package/{src/api → api/docs}/docs.mjs +47 -21
  8. package/{src/api → api/doctor}/doctor.mjs +11 -8
  9. package/{src/api → api}/error.mjs +2 -2
  10. package/{src/api → api/hook}/hook.mjs +11 -11
  11. package/{src/api → api}/index.mjs +16 -9
  12. package/{src/api → api/integration}/validate-integration.mjs +48 -15
  13. package/{src/api → api/integration}/validate-integration.test.mjs +1 -1
  14. package/{src/api → api/layout}/layout.mjs +66 -17
  15. package/{src/api → api/layout}/layout.test.mjs +1 -1
  16. package/{src/api → api/search}/search.mjs +71 -12
  17. package/api/swizzle/swizzle.mjs +283 -0
  18. package/{src/commands → api/swizzle}/swizzle.test.mjs +26 -1
  19. package/{src/api → api/template}/template-integration.test.mjs +2 -2
  20. package/{src/api → api/template}/template-suffix.test.mjs +3 -3
  21. package/{src/api → api/template}/template.mjs +96 -19
  22. package/{src/api → api/theme}/theme-add.mjs +35 -7
  23. package/{src → authoring}/codemod.mjs +6 -6
  24. package/{src → authoring}/config.test.mjs +1 -1
  25. package/{src → authoring}/doc.mjs +1 -1
  26. package/{src → authoring}/doc.test.mjs +1 -1
  27. package/{src → authoring}/template.mjs +1 -1
  28. package/bin/astryx.mjs +12 -10
  29. package/{src → cli}/commands/blog.mjs +48 -7
  30. package/{src → cli}/commands/build-theme.mjs +125 -46
  31. package/{src → cli}/commands/build.mjs +33 -57
  32. package/{src → cli}/commands/component/index.mjs +49 -22
  33. package/{src → cli}/commands/component-ownership.test.mjs +3 -3
  34. package/{src → cli}/commands/component-package.test.mjs +1 -1
  35. package/{src → cli}/commands/component-resolution.test.mjs +2 -2
  36. package/{src → cli}/commands/discover.mjs +17 -8
  37. package/{src → cli}/commands/docs.mjs +39 -7
  38. package/{src → cli}/commands/docs.test.mjs +1 -1
  39. package/{src → cli}/commands/doctor.mjs +3 -3
  40. package/{src → cli}/commands/doctor.test.mjs +2 -2
  41. package/{src → cli}/commands/ensure-core-built.mjs +3 -2
  42. package/{src → cli}/commands/external-showcase.test.mjs +1 -1
  43. package/{src → cli}/commands/hook/index.mjs +37 -14
  44. package/{src → cli}/commands/import-hint-correctness.test.mjs +1 -1
  45. package/{src → cli}/commands/init.mjs +20 -9
  46. package/{src → cli}/commands/layout.mjs +58 -18
  47. package/{src → cli}/commands/search.mjs +19 -12
  48. package/{src → cli}/commands/search.test.mjs +1 -1
  49. package/{src → cli}/commands/setup-nudge.test.mjs +1 -1
  50. package/cli/commands/swizzle.mjs +103 -0
  51. package/{src → cli}/commands/template.mjs +73 -22
  52. package/{src → cli}/commands/template.path-safety.test.mjs +2 -2
  53. package/{src → cli}/commands/upgrade.integration-policy.test.mjs +1 -1
  54. package/{src → cli}/commands/upgrade.mjs +160 -52
  55. package/{src → cli}/commands/upgrade.test.mjs +1 -1
  56. package/{src → cli}/commands/validate-integration.mjs +17 -37
  57. package/{src → cli}/index.mjs +17 -15
  58. package/{src/codemods → codemods}/ensure-jscodeshift.mjs +1 -1
  59. package/{src/codemods → codemods}/integration-discovery.mjs +6 -3
  60. package/{src/codemods → codemods}/integration-discovery.test.mjs +1 -1
  61. package/{src/codemods → codemods}/integration-runner.mjs +8 -3
  62. package/{src/codemods → codemods}/registry.mjs +3 -1
  63. package/{src/codemods → codemods}/run-codemod.mjs +17 -10
  64. package/{src/codemods → codemods}/runner.mjs +22 -12
  65. package/{src/codemods → codemods}/transforms/v0.0.10/remove-size-props.mjs +9 -4
  66. package/{src/codemods → codemods}/transforms/v0.0.12/add-is-icon-only.mjs +27 -22
  67. package/{src/codemods → codemods}/transforms/v0.0.13/icon-name-deprecations.mjs +12 -5
  68. package/{src/codemods → codemods}/transforms/v0.0.13/rename-attachments-to-drawer.mjs +15 -8
  69. package/{src/codemods → codemods}/transforms/v0.0.13/toolbar-density-to-size.mjs +10 -4
  70. package/{src/codemods → codemods}/transforms/v0.0.14/rename-action-props.mjs +11 -5
  71. package/{src/codemods → codemods}/transforms/v0.0.14/rename-section-wash-to-muted.mjs +11 -6
  72. package/{src/codemods → codemods}/transforms/v0.0.14/rename-status-variants.mjs +15 -10
  73. package/{src/codemods → codemods}/transforms/v0.0.15/migrate-item-children-to-endcontent.mjs +13 -8
  74. package/{src/codemods → codemods}/transforms/v0.0.15/migrate-selector-children-to-render-option.mjs +18 -13
  75. package/{src/codemods → codemods}/transforms/v0.0.15/migrate-theme-selectors-to-data-attrs.mjs +8 -4
  76. package/{src/codemods → codemods}/transforms/v0.0.15/rename-date-picker-to-input.mjs +11 -6
  77. package/{src/codemods → codemods}/transforms/v0.0.15/rename-imperative-ref-to-handleRef.mjs +6 -1
  78. package/{src/codemods → codemods}/transforms/v0.0.15/rename-isStreaming-to-isStopShown.mjs +6 -1
  79. package/{src/codemods → codemods}/transforms/v0.0.15/rename-stack-element-to-as.mjs +8 -3
  80. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-badge-dot-to-statusdot.mjs +17 -10
  81. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-gap-to-numeric.mjs +7 -1
  82. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-isFullBleed-to-padding.mjs +9 -4
  83. package/{src/codemods → codemods}/transforms/v0.0.2/migrate-useXDSIcon-to-getIcon.mjs +12 -7
  84. package/{src/codemods → codemods}/transforms/v0.0.2/rename-banner-endButton-to-endContent.mjs +7 -2
  85. package/{src/codemods → codemods}/transforms/v0.0.2/rename-form-tooltip-startIcon.mjs +8 -2
  86. package/{src/codemods → codemods}/transforms/v0.0.2/rename-isShown-to-isOpen.mjs +7 -2
  87. package/{src/codemods → codemods}/transforms/v0.0.2/rename-selector-items-to-options.mjs +7 -2
  88. package/{src/codemods → codemods}/transforms/v0.0.2/rename-sidenav-header-to-heading.mjs +11 -4
  89. package/{src/codemods → codemods}/transforms/v0.0.2/rename-topnav-title-to-heading.mjs +10 -4
  90. package/{src/codemods → codemods}/transforms/v0.0.2/unify-uncontrolled-to-defaultX.mjs +7 -2
  91. package/{src/codemods → codemods}/transforms/v0.0.2/unify-visibility-to-onOpenChange.mjs +10 -5
  92. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-badge-children-to-label.mjs +7 -2
  93. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-collapse-to-collapsible.mjs +9 -3
  94. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-radius-tokens.mjs +11 -5
  95. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-shadow-tokens.mjs +13 -6
  96. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-skeleton-radius.mjs +7 -1
  97. package/{src/codemods → codemods}/transforms/v0.0.6/migrate-token-names.mjs +11 -5
  98. package/{src/codemods → codemods}/transforms/v0.0.7/rename-banner-variant-to-container.mjs +8 -3
  99. package/{src/codemods → codemods}/transforms/v0.0.8/migrate-token-renames.mjs +15 -8
  100. package/{src/codemods → codemods}/transforms/v0.0.8/rename-endslot-to-endcontent.mjs +7 -2
  101. package/{src/codemods → codemods}/transforms/v0.1.0/drop-xds-prefix-imports.mjs +19 -14
  102. package/{src/codemods → codemods}/transforms/v0.1.0/migrate-xds-css-surfaces.mjs +21 -17
  103. package/{src/codemods → codemods}/transforms/v0.1.0/migrate-xds-declare-module.mjs +7 -2
  104. package/{src/codemods → codemods}/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +16 -11
  105. package/{src/codemods → codemods}/transforms/v0.1.2/rename-text-color-active-to-accent.mjs +15 -9
  106. package/{src/codemods → codemods}/transforms/v0.1.3/migrate-layout-components-to-experimental.mjs +17 -12
  107. package/{src/codemods → codemods}/transforms/v0.1.5/rename-switch-label-spacing-default-to-hug.mjs +15 -9
  108. package/{src/codemods → codemods}/transforms/v0.1.7/migrate-table-tableprops-to-direct-props.mjs +17 -10
  109. package/{src/codemods → codemods}/transforms/v0.1.7/rename-table-renderprops-styles-to-xstyle.mjs +18 -13
  110. package/{src/codemods → codemods}/transforms/v0.1.8/rename-avatar-size-scale.mjs +15 -10
  111. package/docs/elevation.doc.mjs +79 -1
  112. package/docs/internationalization.doc.mjs +92 -46
  113. package/{src/commands → lib/agent-docs}/agent-docs.mjs +30 -11
  114. package/{src/commands → lib/agent-docs}/agent-docs.path-safety.test.mjs +1 -1
  115. package/{src/lib → lib}/cli-error.mjs +2 -2
  116. package/{src/lib → lib}/component-discovery.mjs +44 -2
  117. package/{src/lib → lib}/component-format.mjs +65 -24
  118. package/{src/lib → lib}/component-loader.mjs +27 -13
  119. package/{src/lib → lib}/componentDocOverlay.test.mjs +0 -1
  120. package/{src/lib → lib}/error-codes.test.mjs +1 -1
  121. package/{src/lib → lib}/hook-discovery.mjs +14 -1
  122. package/{src/lib → lib}/hook-format.mjs +29 -5
  123. package/{src/lib → lib}/integration-warnings.mjs +2 -2
  124. package/{src/lib → lib}/integrations.mjs +20 -0
  125. package/{src/lib → lib}/integrations.test.mjs +1 -1
  126. package/{src/lib → lib}/json-contract.test.mjs +1 -1
  127. package/{src/lib → lib}/json-shim.mjs +11 -6
  128. package/{src/lib → lib}/json-shim.test.mjs +1 -1
  129. package/{src/lib → lib}/json.mjs +3 -3
  130. package/{src/lib → lib}/levenshtein.mjs +6 -0
  131. package/{src/lib → lib}/manifest.mjs +7 -5
  132. package/{src/lib → lib}/manifest.test.mjs +2 -2
  133. package/{src/lib → lib}/module-loader.mjs +1 -0
  134. package/{src/lib → lib}/package-scanner.mjs +47 -0
  135. package/{src/lib → lib}/project.mjs +48 -18
  136. package/{src/lib → lib}/project.test.mjs +1 -1
  137. package/{src/lib → lib}/resolve-theme.mjs +5 -0
  138. package/{src/lib → lib}/string-utils.mjs +15 -0
  139. package/{src/lib → lib}/term-log.mjs +12 -3
  140. package/{src/lib → lib}/xle/browser.mjs +18 -8
  141. package/{src/lib → lib}/xle/expand.mjs +155 -22
  142. package/{src/lib → lib}/xle/parse.mjs +119 -13
  143. package/{src/lib → lib}/xle/print.mjs +54 -14
  144. package/{src/lib → lib}/xle/registry-core.mjs +28 -3
  145. package/{src/lib → lib}/xle/registry.mjs +9 -4
  146. package/{src/lib → lib}/xle/splice.mjs +13 -2
  147. package/{src/lib → lib}/xle/validate.mjs +95 -14
  148. package/lib/xle/xle-ast.d.ts +214 -0
  149. package/package.json +35 -27
  150. package/scripts/postinstall.mjs +4 -4
  151. package/templates/blocks/components/Avatar/AvatarShowcase.tsx +1 -1
  152. package/templates/blocks/components/Banner/BannerFloating.doc.mjs +14 -0
  153. package/templates/blocks/components/Banner/BannerFloating.tsx +16 -0
  154. package/templates/blocks/components/Button/ButtonFloating.doc.mjs +14 -0
  155. package/templates/blocks/components/Button/ButtonFloating.tsx +37 -0
  156. package/templates/blocks/components/ButtonGroup/ButtonGroupFloating.doc.mjs +14 -0
  157. package/templates/blocks/components/ButtonGroup/ButtonGroupFloating.tsx +23 -0
  158. package/templates/blocks/components/Card/CardElevations.doc.mjs +14 -0
  159. package/templates/blocks/components/Card/CardElevations.tsx +32 -0
  160. package/templates/blocks/components/Card/ClickableCardElevated.doc.mjs +14 -0
  161. package/templates/blocks/components/Card/ClickableCardElevated.tsx +21 -0
  162. package/templates/blocks/components/Card/SelectableCardElevated.doc.mjs +14 -0
  163. package/templates/blocks/components/Card/SelectableCardElevated.tsx +37 -0
  164. package/templates/blocks/components/ChatComposer/ChatComposerFlat.doc.mjs +14 -0
  165. package/templates/blocks/components/ChatComposer/ChatComposerFlat.tsx +75 -0
  166. package/templates/blocks/components/IconButton/IconButtonFloating.doc.mjs +14 -0
  167. package/templates/blocks/components/IconButton/IconButtonFloating.tsx +37 -0
  168. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.doc.mjs +19 -0
  169. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.tsx +46 -0
  170. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.doc.mjs +14 -0
  171. package/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.tsx +33 -0
  172. package/templates/blocks/components/OverflowList/OverflowListCappedToolbar.doc.mjs +14 -0
  173. package/templates/blocks/components/OverflowList/OverflowListCappedToolbar.tsx +39 -0
  174. package/templates/blocks/components/OverflowList/OverflowListMultiRowTags.doc.mjs +14 -0
  175. package/templates/blocks/components/OverflowList/OverflowListMultiRowTags.tsx +44 -0
  176. package/templates/blocks/components/Thumbnail/ThumbnailElevated.doc.mjs +14 -0
  177. package/templates/blocks/components/Thumbnail/ThumbnailElevated.tsx +31 -0
  178. package/{src/types → types}/api.contract.assert.ts +17 -8
  179. package/{src/types → types}/api.d.ts +110 -9
  180. package/{src/types → types}/base.d.ts +40 -4
  181. package/types/build.d.ts +53 -0
  182. package/types/codemod.d.ts +166 -0
  183. package/{src/types → types}/component.d.ts +1 -1
  184. package/{src/types → types}/discover.d.ts +1 -1
  185. package/{src/types → types}/docs.d.ts +1 -4
  186. package/{src/types → types}/hook.d.ts +1 -1
  187. package/{src/types → types}/index.d.ts +1 -0
  188. package/types/jscodeshift.d.ts +19 -0
  189. package/types/layout.d.ts +74 -0
  190. package/{src/types → types}/swizzle.d.ts +4 -0
  191. package/types/theme.d.ts +53 -0
  192. package/{src/types → types}/upgrade.d.ts +8 -1
  193. package/{src/utils → utils}/package-manager.mjs +30 -4
  194. package/{src/utils → utils}/paths.mjs +4 -1
  195. package/{src/utils → utils}/update-check.mjs +3 -3
  196. package/{src/utils → utils}/update-check.test.mjs +3 -3
  197. package/src/commands/swizzle.mjs +0 -417
  198. package/src/types/codemod.d.ts +0 -81
  199. package/src/types/theme.d.ts +0 -23
  200. /package/{src/api → api/docs}/docOverlays.test.mjs +0 -0
  201. /package/{src/api → api/integration}/integration-block-exports.test.mjs +0 -0
  202. /package/{src/api → api/template}/template.test.mjs +0 -0
  203. /package/{src → authoring}/codemod.test.mjs +0 -0
  204. /package/{src → authoring}/config.mjs +0 -0
  205. /package/{src → authoring}/integration.mjs +0 -0
  206. /package/{src → authoring}/template.test.mjs +0 -0
  207. /package/{src → cli}/cli-exit-codes.test.mjs +0 -0
  208. /package/{src → cli}/commands/build-theme.color-scheme.test.mjs +0 -0
  209. /package/{src → cli}/commands/build-theme.import-path.test.mjs +0 -0
  210. /package/{src → cli}/commands/build-theme.path-safety.test.mjs +0 -0
  211. /package/{src → cli}/commands/build-theme.prose.test.mjs +0 -0
  212. /package/{src → cli}/commands/build-theme.variants.test.mjs +0 -0
  213. /package/{src → cli}/commands/build-theme.watch.test.mjs +0 -0
  214. /package/{src → cli}/commands/cli-postinstall.test.mjs +0 -0
  215. /package/{src → cli}/commands/component.test.mjs +0 -0
  216. /package/{src → cli}/commands/detail-levels.test.mjs +0 -0
  217. /package/{src → cli}/commands/init.next-steps.test.mjs +0 -0
  218. /package/{src → cli}/commands/interactive-guard.test.mjs +0 -0
  219. /package/{src → cli}/commands/json-contract.test.mjs +0 -0
  220. /package/{src → cli}/commands/swizzle.path-safety.test.mjs +0 -0
  221. /package/{src → cli}/commands/swizzle.routing.test.mjs +0 -0
  222. /package/{src → cli}/commands/template.test.mjs +0 -0
  223. /package/{src → cli}/commands/upgrade.config-ordering.test.mjs +0 -0
  224. /package/{src → cli}/commands/validate-integration.test.mjs +0 -0
  225. /package/{src → cli}/update-hint-commands.test.mjs +0 -0
  226. /package/{src/codemods → codemods}/__tests__/registry.test.mjs +0 -0
  227. /package/{src/codemods → codemods}/__tests__/rename-imperative-ref-to-handleRef.test.mjs +0 -0
  228. /package/{src/codemods → codemods}/__tests__/rename-isStreaming-to-isStopShown.test.mjs +0 -0
  229. /package/{src/codemods → codemods}/__tests__/rename-section-wash-to-muted.test.mjs +0 -0
  230. /package/{src/codemods → codemods}/__tests__/runner.test.mjs +0 -0
  231. /package/{src/codemods → codemods}/__tests__/toolbar-density-to-size.test.mjs +0 -0
  232. /package/{src/codemods → codemods}/__tests__/validation.test.mjs +0 -0
  233. /package/{src/codemods → codemods}/transforms/v0.0.10/__tests__/remove-size-props.test.mjs +0 -0
  234. /package/{src/codemods → codemods}/transforms/v0.0.10/index.mjs +0 -0
  235. /package/{src/codemods → codemods}/transforms/v0.0.12/__tests__/add-is-icon-only.test.mjs +0 -0
  236. /package/{src/codemods → codemods}/transforms/v0.0.12/index.mjs +0 -0
  237. /package/{src/codemods → codemods}/transforms/v0.0.13/__tests__/icon-name-deprecations.test.mjs +0 -0
  238. /package/{src/codemods → codemods}/transforms/v0.0.13/__tests__/rename-attachments-to-drawer.test.mjs +0 -0
  239. /package/{src/codemods → codemods}/transforms/v0.0.13/index.mjs +0 -0
  240. /package/{src/codemods → codemods}/transforms/v0.0.14/__tests__/rename-action-props.test.mjs +0 -0
  241. /package/{src/codemods → codemods}/transforms/v0.0.14/__tests__/rename-status-variants.test.mjs +0 -0
  242. /package/{src/codemods → codemods}/transforms/v0.0.14/index.mjs +0 -0
  243. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/migrate-item-children-to-endcontent.test.mjs +0 -0
  244. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/migrate-selector-children-to-render-option.test.mjs +0 -0
  245. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/migrate-theme-selectors-to-data-attrs.test.mjs +0 -0
  246. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/rename-date-picker-to-input.test.mjs +0 -0
  247. /package/{src/codemods → codemods}/transforms/v0.0.15/__tests__/rename-stack-element-to-as.test.mjs +0 -0
  248. /package/{src/codemods → codemods}/transforms/v0.0.15/index.mjs +0 -0
  249. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-badge-dot-to-statusdot.test.mjs +0 -0
  250. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-gap-to-numeric.test.mjs +0 -0
  251. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-isFullBleed-to-padding.test.mjs +0 -0
  252. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/migrate-useXDSIcon-to-getIcon.test.mjs +0 -0
  253. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-banner-endButton-to-endContent.test.mjs +0 -0
  254. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-form-tooltip-startIcon.test.mjs +0 -0
  255. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-isShown-to-isOpen.test.mjs +0 -0
  256. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-selector-items-to-options.test.mjs +0 -0
  257. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-sidenav-header-to-heading.test.mjs +0 -0
  258. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/rename-topnav-title-to-heading.test.mjs +0 -0
  259. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/unify-uncontrolled-to-defaultX.test.mjs +0 -0
  260. /package/{src/codemods → codemods}/transforms/v0.0.2/__tests__/unify-visibility-to-onOpenChange.test.mjs +0 -0
  261. /package/{src/codemods → codemods}/transforms/v0.0.2/index.mjs +0 -0
  262. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-collapse-to-collapsible.test.mjs +0 -0
  263. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-radius-tokens.test.mjs +0 -0
  264. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-shadow-tokens.test.mjs +0 -0
  265. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-skeleton-radius.test.mjs +0 -0
  266. /package/{src/codemods → codemods}/transforms/v0.0.6/__tests__/migrate-token-names.test.mjs +0 -0
  267. /package/{src/codemods → codemods}/transforms/v0.0.6/index.mjs +0 -0
  268. /package/{src/codemods → codemods}/transforms/v0.0.7/__tests__/rename-banner-variant-to-container.test.mjs +0 -0
  269. /package/{src/codemods → codemods}/transforms/v0.0.7/index.mjs +0 -0
  270. /package/{src/codemods → codemods}/transforms/v0.0.8/__tests__/migrate-token-renames.test.mjs +0 -0
  271. /package/{src/codemods → codemods}/transforms/v0.0.8/__tests__/rename-endslot-to-endcontent.test.mjs +0 -0
  272. /package/{src/codemods → codemods}/transforms/v0.0.8/index.mjs +0 -0
  273. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/drop-xds-prefix-imports.test.mjs +0 -0
  274. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/migrate-xds-css-surfaces.test.mjs +0 -0
  275. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/migrate-xds-declare-module.test.mjs +0 -0
  276. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +0 -0
  277. /package/{src/codemods → codemods}/transforms/v0.1.0/__tests__/v0.1.0-ordering.test.mjs +0 -0
  278. /package/{src/codemods → codemods}/transforms/v0.1.0/index.mjs +0 -0
  279. /package/{src/codemods → codemods}/transforms/v0.1.2/__tests__/rename-text-color-active-to-accent.test.mjs +0 -0
  280. /package/{src/codemods → codemods}/transforms/v0.1.2/index.mjs +0 -0
  281. /package/{src/codemods → codemods}/transforms/v0.1.3/__tests__/migrate-layout-components-to-experimental.test.mjs +0 -0
  282. /package/{src/codemods → codemods}/transforms/v0.1.3/index.mjs +0 -0
  283. /package/{src/codemods → codemods}/transforms/v0.1.5/__tests__/rename-switch-label-spacing-default-to-hug.test.mjs +0 -0
  284. /package/{src/codemods → codemods}/transforms/v0.1.5/index.mjs +0 -0
  285. /package/{src/codemods → codemods}/transforms/v0.1.7/__tests__/migrate-table-tableprops-to-direct-props.test.mjs +0 -0
  286. /package/{src/codemods → codemods}/transforms/v0.1.7/__tests__/rename-table-renderprops-styles-to-xstyle.test.mjs +0 -0
  287. /package/{src/codemods → codemods}/transforms/v0.1.7/index.mjs +0 -0
  288. /package/{src/codemods → codemods}/transforms/v0.1.8/__tests__/rename-avatar-size-scale.test.mjs +0 -0
  289. /package/{src/codemods → codemods}/transforms/v0.1.8/index.mjs +0 -0
  290. /package/{src/commands → lib/agent-docs}/agent-docs.test.mjs +0 -0
  291. /package/{src/lib → lib}/cli-error.test.mjs +0 -0
  292. /package/{src/lib → lib}/component-discovery.importpath.test.mjs +0 -0
  293. /package/{src/lib → lib}/component-format.test.mjs +0 -0
  294. /package/{src/lib → lib}/component-loader.test.mjs +0 -0
  295. /package/{src/lib → lib}/config-cache.mjs +0 -0
  296. /package/{src/lib → lib}/config-cache.test.mjs +0 -0
  297. /package/{src/lib → lib}/config-schema.mjs +0 -0
  298. /package/{src/lib → lib}/error-codes.mjs +0 -0
  299. /package/{src/lib → lib}/integration-warnings.test.mjs +0 -0
  300. /package/{src/lib → lib}/module-loader.test.mjs +0 -0
  301. /package/{src/lib → lib}/node-version.mjs +0 -0
  302. /package/{src/lib → lib}/node-version.test.mjs +0 -0
  303. /package/{src/lib → lib}/parse.mjs +0 -0
  304. /package/{src/lib → lib}/site.mjs +0 -0
  305. /package/{src/lib → lib}/xle/browser.d.ts +0 -0
  306. /package/{src/lib → lib}/xle/xle.test.mjs +0 -0
  307. /package/{src/schemas → schemas}/doc-schema.mjs +0 -0
  308. /package/{src/schemas → schemas}/template-schema.mjs +0 -0
  309. /package/{src/types → types}/config.d.ts +0 -0
  310. /package/{src/types → types}/doc.d.ts +0 -0
  311. /package/{src/types → types}/doctor.d.ts +0 -0
  312. /package/{src/types → types}/error-codes.d.ts +0 -0
  313. /package/{src/types → types}/integration.d.ts +0 -0
  314. /package/{src/types → types}/manifest.d.ts +0 -0
  315. /package/{src/types → types}/search.d.ts +0 -0
  316. /package/{src/types → types}/template-api.d.ts +0 -0
  317. /package/{src/types → types}/template.d.ts +0 -0
  318. /package/{src/types → types}/validate-integration.d.ts +0 -0
  319. /package/{src/utils → utils}/github.mjs +0 -0
  320. /package/{src/utils → utils}/package-manager.test.mjs +0 -0
  321. /package/{src/utils → utils}/path-safety.mjs +0 -0
  322. /package/{src/utils → utils}/path-safety.test.mjs +0 -0
  323. /package/{src/utils → utils}/paths.test.mjs +0 -0
  324. /package/{src/utils → utils}/semver.mjs +0 -0
  325. /package/{src/utils → utils}/semver.test.mjs +0 -0
@@ -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
+ }
@@ -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
+ };
@@ -0,0 +1,75 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {ChatComposer} from '@astryxdesign/core/Chat';
6
+ import {Button} from '@astryxdesign/core/Button';
7
+ import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';
8
+ import {Icon} from '@astryxdesign/core/Icon';
9
+ import {Stack} from '@astryxdesign/core/Layout';
10
+ import {Text} from '@astryxdesign/core/Text';
11
+ import {
12
+ Cog6ToothIcon,
13
+ MicrophoneIcon,
14
+ SparklesIcon,
15
+ } from '@heroicons/react/24/outline';
16
+
17
+ export default function ChatComposerFlat() {
18
+ return (
19
+ <Stack direction="vertical" gap={2} style={{width: '100%', maxWidth: 450}}>
20
+ <Text type="supporting" color="secondary">
21
+ elevation=&quot;none&quot; — flat, with a text-input-style border and
22
+ focus ring
23
+ </Text>
24
+ <ChatComposer
25
+ elevation="none"
26
+ onSubmit={value => {
27
+ console.log('Sent:', value);
28
+ }}
29
+ footerActions={
30
+ <>
31
+ <DropdownMenu
32
+ button={{
33
+ label: 'Auto',
34
+ variant: 'ghost',
35
+ size: 'md',
36
+ icon: <Icon icon={SparklesIcon} size="sm" />,
37
+ children: 'Auto',
38
+ }}
39
+ menuWidth={200}
40
+ items={[
41
+ {label: 'Auto', onClick: () => {}},
42
+ {label: 'Model A', onClick: () => {}},
43
+ {label: 'Model B', onClick: () => {}},
44
+ ]}
45
+ />
46
+ <DropdownMenu
47
+ button={{
48
+ label: 'Settings',
49
+ variant: 'ghost',
50
+ size: 'md',
51
+ icon: <Icon icon={Cog6ToothIcon} size="sm" />,
52
+ children: 'Settings',
53
+ }}
54
+ menuWidth={200}
55
+ items={[
56
+ {label: 'Preferences', onClick: () => {}},
57
+ {label: 'Keyboard shortcuts', onClick: () => {}},
58
+ {label: 'About', onClick: () => {}},
59
+ ]}
60
+ />
61
+ </>
62
+ }
63
+ sendActions={
64
+ <Button
65
+ label="Microphone"
66
+ variant="ghost"
67
+ size="md"
68
+ icon={<Icon icon={MicrophoneIcon} />}
69
+ isIconOnly
70
+ />
71
+ }
72
+ />
73
+ </Stack>
74
+ );
75
+ }
@@ -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: 'IconButton',
7
+ name: 'IconButton — Floating',
8
+ displayName: 'IconButton — Floating',
9
+ description:
10
+ 'A floating action button (FAB) — the most common floating-button shape is icon-only. Raised here with `elevation="high"`.',
11
+ isReady: true,
12
+ aspectRatio: 4 / 3,
13
+ componentsUsed: ['IconButton', 'Icon', 'Layout', 'Text'],
14
+ };
@@ -0,0 +1,37 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {IconButton} from '@astryxdesign/core/IconButton';
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 IconButtonFloating() {
19
+ return (
20
+ <Stack direction="vertical" gap={4}>
21
+ <Text type="supporting" color="secondary">
22
+ FABs are usually icon-only — raise one with `elevation="high"`
23
+ </Text>
24
+ <Stack direction="horizontal" gap={3} vAlign="center">
25
+ {VARIANTS.map(({variant, label}) => (
26
+ <IconButton
27
+ key={variant}
28
+ label={label}
29
+ variant={variant}
30
+ icon={<Icon icon={PlusIcon} />}
31
+ elevation="high"
32
+ />
33
+ ))}
34
+ </Stack>
35
+ </Stack>
36
+ );
37
+ }
@@ -0,0 +1,19 @@
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: 'InternationalizationProvider',
7
+ name: 'InternationalizationProvider — Shipped Locale',
8
+ displayName: 'Internationalization Provider — Shipped Locale',
9
+ description:
10
+ 'Load a locale catalog shipped by Astryx and re-render InternationalizationProvider with a new locale to update Astryx strings live.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: [
14
+ 'InternationalizationProvider',
15
+ 'SegmentedControl',
16
+ 'Selector',
17
+ 'Layout',
18
+ ],
19
+ };
@@ -0,0 +1,46 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {useState} from 'react';
6
+ import {InternationalizationProvider} from '@astryxdesign/core/i18n';
7
+ import frFR from '@astryxdesign/core/locales/fr-FR.json';
8
+ import {Stack} from '@astryxdesign/core/Layout';
9
+ import {
10
+ SegmentedControl,
11
+ SegmentedControlItem,
12
+ } from '@astryxdesign/core/SegmentedControl';
13
+ import {Selector} from '@astryxdesign/core/Selector';
14
+
15
+ type Locale = 'en' | 'fr-FR';
16
+
17
+ export default function InternationalizationProviderShippedLocale() {
18
+ const [locale, setLocale] = useState<Locale>('en');
19
+ const [value, setValue] = useState<string | null>(null);
20
+ return (
21
+ <InternationalizationProvider locale={locale} messages={{'fr-FR': frFR}}>
22
+ <Stack direction="vertical" gap={4} hAlign="center">
23
+ <SegmentedControl
24
+ label="Language"
25
+ value={locale}
26
+ onChange={nextLocale => setLocale(nextLocale as Locale)}
27
+ size="sm">
28
+ <SegmentedControlItem value="en" label="EN" />
29
+ <SegmentedControlItem value="fr-FR" label="FR" />
30
+ </SegmentedControl>
31
+ <Selector
32
+ style={{width: 300}}
33
+ label="Billing region"
34
+ options={[
35
+ {value: 'americas', label: 'Americas'},
36
+ {value: 'emea', label: 'EMEA'},
37
+ {value: 'apac', label: 'APAC'},
38
+ ]}
39
+ value={value}
40
+ onChange={setValue}
41
+ hasClear
42
+ />
43
+ </Stack>
44
+ </InternationalizationProvider>
45
+ );
46
+ }
@@ -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: 'InternationalizationProvider',
7
+ name: 'InternationalizationProvider — Overrides',
8
+ displayName: 'Internationalization Provider — Overrides',
9
+ description:
10
+ 'Override a small number of Astryx strings without providing a full locale catalog.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: ['InternationalizationProvider', 'Selector'],
14
+ };
@@ -0,0 +1,33 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {useState} from 'react';
6
+ import {InternationalizationProvider} from '@astryxdesign/core/i18n';
7
+ import {Selector} from '@astryxdesign/core/Selector';
8
+
9
+ export default function InternationalizationProviderOverrides() {
10
+ const [value, setValue] = useState<string | null>(null);
11
+ return (
12
+ <InternationalizationProvider
13
+ locale="en"
14
+ overrides={{
15
+ en: {
16
+ '@astryx.selector.placeholder': 'Choose...',
17
+ },
18
+ }}>
19
+ <Selector
20
+ style={{width: 300}}
21
+ label="Billing region"
22
+ options={[
23
+ {value: 'americas', label: 'Americas'},
24
+ {value: 'emea', label: 'EMEA'},
25
+ {value: 'apac', label: 'APAC'},
26
+ ]}
27
+ value={value}
28
+ onChange={setValue}
29
+ hasClear
30
+ />
31
+ </InternationalizationProvider>
32
+ );
33
+ }
@@ -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: 'OverflowList',
7
+ name: 'OverflowList — Capped Toolbar',
8
+ displayName: 'OverflowList — Capped Toolbar',
9
+ description:
10
+ 'maxVisibleItems caps the row at three actions even when more would fit; the rest move to a dropdown',
11
+ isReady: true,
12
+ aspectRatio: 4 / 3,
13
+ componentsUsed: ['OverflowList', 'Button', 'DropdownMenu', 'Card', 'Center'],
14
+ };
@@ -0,0 +1,39 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {OverflowList} from '@astryxdesign/core/OverflowList';
6
+ import {Button} from '@astryxdesign/core/Button';
7
+ import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';
8
+ import {Card} from '@astryxdesign/core/Card';
9
+ import {Center} from '@astryxdesign/core/Center';
10
+
11
+ const actions = ['Save', 'Edit', 'Duplicate', 'Share', 'Archive', 'Delete'];
12
+
13
+ export default function OverflowListCappedToolbar() {
14
+ return (
15
+ <Center width={420}>
16
+ <Card padding={2}>
17
+ <OverflowList
18
+ gap={2}
19
+ maxVisibleItems={3}
20
+ overflowRenderer={overflowItems => (
21
+ <DropdownMenu
22
+ button={{
23
+ label: `+${overflowItems.length}`,
24
+ variant: 'ghost',
25
+ size: 'sm',
26
+ }}
27
+ items={overflowItems.map(({index}) => ({
28
+ label: actions[index],
29
+ }))}
30
+ />
31
+ )}>
32
+ {actions.map(action => (
33
+ <Button key={action} label={action} size="sm" />
34
+ ))}
35
+ </OverflowList>
36
+ </Card>
37
+ </Center>
38
+ );
39
+ }
@@ -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: 'OverflowList',
7
+ name: 'OverflowList — Multi-row Tags',
8
+ displayName: 'OverflowList — Multi-row Tags',
9
+ description:
10
+ 'Tags wrap onto up to two rows with maxRows, then collapse the rest into a count badge',
11
+ isReady: true,
12
+ aspectRatio: 4 / 3,
13
+ componentsUsed: ['OverflowList', 'Badge', 'Card'],
14
+ };
@@ -0,0 +1,44 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {OverflowList} from '@astryxdesign/core/OverflowList';
6
+ import {Badge} from '@astryxdesign/core/Badge';
7
+ import {Card} from '@astryxdesign/core/Card';
8
+
9
+ const tags = [
10
+ 'React',
11
+ 'TypeScript',
12
+ 'StyleX',
13
+ 'Storybook',
14
+ 'Vitest',
15
+ 'Playwright',
16
+ 'ESLint',
17
+ 'Prettier',
18
+ 'Vite',
19
+ 'pnpm',
20
+ ];
21
+
22
+ export default function OverflowListMultiRowTags() {
23
+ return (
24
+ <Card
25
+ padding={2}
26
+ style={{
27
+ resize: 'horizontal',
28
+ overflow: 'hidden',
29
+ minWidth: 120,
30
+ width: 260,
31
+ }}>
32
+ <OverflowList
33
+ gap={1}
34
+ maxRows={2}
35
+ overflowRenderer={overflowItems => (
36
+ <Badge variant="neutral" label={`+${overflowItems.length}`} />
37
+ )}>
38
+ {tags.map(tag => (
39
+ <Badge key={tag} variant="info" label={tag} />
40
+ ))}
41
+ </OverflowList>
42
+ </Card>
43
+ );
44
+ }
@@ -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: 'Thumbnail',
7
+ name: 'Thumbnail — Elevated',
8
+ displayName: 'Thumbnail — Elevated',
9
+ description:
10
+ 'Image tiles raised at rest with `elevation`. The default keeps the existing hover-only shadow; a set level lifts the tile off the page.',
11
+ isReady: true,
12
+ aspectRatio: 16 / 9,
13
+ componentsUsed: ['Thumbnail', 'Layout', 'Text'],
14
+ };