@astryxdesign/cli 0.1.4-canary.cb78dd0 → 0.1.4-canary.cdee37b

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 (41) hide show
  1. package/docs/getting-started.doc.mjs +4 -0
  2. package/docs/migration.doc.mjs +134 -0
  3. package/docs/styling.doc.mjs +53 -0
  4. package/docs/working-with-ai.doc.mjs +1 -1
  5. package/package.json +10 -10
  6. package/src/codemods/__tests__/registry.test.mjs +1 -0
  7. package/src/codemods/registry.mjs +1 -0
  8. package/src/codemods/transforms/v0.1.5/__tests__/rename-switch-label-spacing-default-to-hug.test.mjs +93 -0
  9. package/src/codemods/transforms/v0.1.5/index.mjs +19 -0
  10. package/src/codemods/transforms/v0.1.5/rename-switch-label-spacing-default-to-hug.mjs +140 -0
  11. package/src/commands/build-theme.color-scheme.test.mjs +153 -0
  12. package/src/commands/build-theme.mjs +2 -1
  13. package/src/commands/build-theme.variants.test.mjs +7 -18
  14. package/src/commands/swizzle.mjs +34 -0
  15. package/src/commands/swizzle.routing.test.mjs +67 -0
  16. package/templates/blocks/components/AspectRatio/AspectRatioCircleImage.tsx +1 -6
  17. package/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx +2 -7
  18. package/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +2 -5
  19. package/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx +1 -6
  20. package/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx +1 -6
  21. package/templates/blocks/components/Collapsible/CollapsibleDividedAccordion.doc.mjs +1 -1
  22. package/templates/blocks/components/Collapsible/CollapsibleDividedAccordion.tsx +1 -1
  23. package/templates/blocks/components/Collapsible/CollapsibleWithoutCard.tsx +25 -23
  24. package/templates/pages/classic-gallery/page.tsx +1 -1
  25. package/templates/pages/dashboard/page.tsx +1 -1
  26. package/templates/pages/documentation/page.tsx +1 -1
  27. package/templates/pages/incident-console/page.tsx +580 -0
  28. package/templates/pages/incident-console/template.doc.mjs +12 -0
  29. package/templates/pages/kanban-board/page.tsx +37 -13
  30. package/templates/pages/messaging-shell/page.tsx +676 -0
  31. package/templates/pages/messaging-shell/template.doc.mjs +12 -0
  32. package/templates/pages/mixed-gallery/page.tsx +1 -1
  33. package/templates/pages/payment-form/page.tsx +2 -6
  34. package/templates/pages/product-detail/page.tsx +3 -11
  35. package/templates/pages/product-gallery/page.tsx +1 -1
  36. package/templates/pages/settings/page.tsx +1 -1
  37. package/templates/pages/side-gallery/page.tsx +1 -1
  38. package/templates/pages/table-page/page.tsx +1 -1
  39. package/templates/pages/table-page-chart/page.tsx +1 -1
  40. package/templates/pages/table-page-heatmap-status/page.tsx +1 -1
  41. package/templates/pages/table-page-shoe-store-heatmap/page.tsx +1 -1
@@ -0,0 +1,153 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file Regression test for the `color-scheme` declaration `astryx theme build`
5
+ * emits alongside `light-dark()` token output (see #3658).
6
+ *
7
+ * `astryx theme build` injects a `color-scheme` declaration into
8
+ * `@layer astryx-theme` whenever the generated CSS contains `light-dark()`,
9
+ * so LightningCSS/browsers can resolve it. That declaration must mirror
10
+ * reset.css's own `html[data-theme]` -> `color-scheme` mapping (a bare
11
+ * `:root { color-scheme: light dark; }` alone permanently pins the page to
12
+ * "light dark", defeating `<Theme mode="light|dark">` forcing regardless of
13
+ * `@layer astryx-theme` being declared after `@layer reset` in layer order):
14
+ *
15
+ * :root { color-scheme: light dark; }
16
+ * html[data-theme="light"] { color-scheme: light; }
17
+ * html[data-theme="dark"] { color-scheme: dark; }
18
+ *
19
+ * Themes that never use `light-dark()` have no `color-scheme` ambiguity to
20
+ * resolve, so none of the three rules should be emitted for them.
21
+ *
22
+ * Building `astryx theme build` requires a compiled @astryxdesign/core (there is no in-CLI
23
+ * fallback generator), so this suite builds core once in beforeAll via the
24
+ * shared ensureCoreBuilt() helper — which serializes concurrent Vitest workers
25
+ * behind a lock — to stay self-sufficient regardless of CI job ordering.
26
+ */
27
+
28
+ import {describe, it, expect, beforeAll, beforeEach, afterEach} from 'vitest';
29
+ import {execFileSync} from 'node:child_process';
30
+ import * as fs from 'node:fs';
31
+ import * as path from 'node:path';
32
+ import * as os from 'node:os';
33
+ import {fileURLToPath} from 'node:url';
34
+ import {ensureCoreBuilt} from './ensure-core-built.mjs';
35
+
36
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
37
+ const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');
38
+
39
+ const COLOR_SCHEME_ROOT_DECL = ':root { color-scheme: light dark; }';
40
+ const COLOR_SCHEME_LIGHT_DECL = 'html[data-theme="light"] { color-scheme: light; }';
41
+ const COLOR_SCHEME_DARK_DECL = 'html[data-theme="dark"] { color-scheme: dark; }';
42
+
43
+ function runCli(args, cwd) {
44
+ try {
45
+ const out = execFileSync('node', [CLI_BIN, ...args], {
46
+ cwd,
47
+ encoding: 'utf-8',
48
+ stdio: ['ignore', 'pipe', 'pipe'],
49
+ env: {...process.env, FORCE_COLOR: '0'},
50
+ });
51
+ return {code: 0, stdout: out, stderr: ''};
52
+ } catch (e) {
53
+ return {
54
+ code: e.status ?? 1,
55
+ stdout: e.stdout?.toString() ?? '',
56
+ stderr: e.stderr?.toString() ?? '',
57
+ };
58
+ }
59
+ }
60
+
61
+ function writeTheme(dir, name, tokens) {
62
+ fs.mkdirSync(dir, {recursive: true});
63
+ // The CLI writes <basename>.css next to the source file, so use the
64
+ // theme name as the filename for unambiguous fixtures.
65
+ const file = path.join(dir, `${name}.mjs`);
66
+ fs.writeFileSync(
67
+ file,
68
+ `export default { name: ${JSON.stringify(name)}, tokens: ${JSON.stringify(tokens)} };\n`,
69
+ );
70
+ return file;
71
+ }
72
+
73
+ // `astryx theme build` imports the compiled @astryxdesign/core/theme entry. Build core
74
+ // once if it isn't already present so the suite works in any CI job.
75
+ beforeAll(() => {
76
+ ensureCoreBuilt();
77
+ }, 200_000);
78
+
79
+ let tmpDir;
80
+ beforeEach(() => {
81
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'astryx-build-theme-color-scheme-'));
82
+ });
83
+ afterEach(() => {
84
+ fs.rmSync(tmpDir, {recursive: true, force: true});
85
+ });
86
+
87
+ describe('theme build color-scheme output', () => {
88
+ it('emits the mode-aware color-scheme rules in @layer astryx-theme for a light-dark() theme', () => {
89
+ const project = path.join(tmpDir, 'project');
90
+ const themesDir = path.join(project, 'themes');
91
+ // A raw light-dark() token value is what triggers the color-scheme
92
+ // injection in build-theme.mjs (it checks the generated CSS for the
93
+ // literal substring). `defineTheme.test.ts` already covers the separate
94
+ // [light, dark] tuple -> light-dark() conversion; this fixture writes
95
+ // the string directly so this test stays focused on the CLI's own
96
+ // color-scheme decision, not on that conversion.
97
+ const themeFile = writeTheme(themesDir, 'with-light-dark', {
98
+ '--color-accent': 'light-dark(#0077B6, #48CAE4)',
99
+ });
100
+
101
+ const result = runCli(
102
+ ['theme', 'build', path.relative(project, themeFile)],
103
+ project,
104
+ );
105
+
106
+ expect(result.code).toBe(0);
107
+
108
+ const cssPath = path.join(themesDir, 'with-light-dark.css');
109
+ expect(fs.existsSync(cssPath)).toBe(true);
110
+ const css = fs.readFileSync(cssPath, 'utf-8');
111
+
112
+ expect(css).toContain('light-dark(#0077B6, #48CAE4)');
113
+
114
+ // All 3 rules must be present...
115
+ expect(css).toContain(COLOR_SCHEME_ROOT_DECL);
116
+ expect(css).toContain(COLOR_SCHEME_LIGHT_DECL);
117
+ expect(css).toContain(COLOR_SCHEME_DARK_DECL);
118
+
119
+ // ...and specifically inside @layer astryx-theme, not @layer reset (the
120
+ // declaration must sit alongside the light-dark() token/component output
121
+ // it resolves, not the zero-specificity prose defaults).
122
+ const themeLayerStart = css.indexOf('@layer astryx-theme');
123
+ expect(themeLayerStart).toBeGreaterThanOrEqual(0);
124
+ const themeLayerBody = css.slice(themeLayerStart);
125
+ expect(themeLayerBody).toContain(COLOR_SCHEME_ROOT_DECL);
126
+ expect(themeLayerBody).toContain(COLOR_SCHEME_LIGHT_DECL);
127
+ expect(themeLayerBody).toContain(COLOR_SCHEME_DARK_DECL);
128
+ });
129
+
130
+ it('omits all color-scheme rules for a theme with no light-dark() tokens', () => {
131
+ const project = path.join(tmpDir, 'project');
132
+ const themesDir = path.join(project, 'themes');
133
+ const themeFile = writeTheme(themesDir, 'no-light-dark', {
134
+ '--color-accent': '#0077B6',
135
+ });
136
+
137
+ const result = runCli(
138
+ ['theme', 'build', path.relative(project, themeFile)],
139
+ project,
140
+ );
141
+
142
+ expect(result.code).toBe(0);
143
+
144
+ const cssPath = path.join(themesDir, 'no-light-dark.css');
145
+ expect(fs.existsSync(cssPath)).toBe(true);
146
+ const css = fs.readFileSync(cssPath, 'utf-8');
147
+
148
+ expect(css).not.toContain('light-dark(');
149
+ expect(css).not.toContain(COLOR_SCHEME_ROOT_DECL);
150
+ expect(css).not.toContain(COLOR_SCHEME_LIGHT_DECL);
151
+ expect(css).not.toContain(COLOR_SCHEME_DARK_DECL);
152
+ });
153
+ });
@@ -939,8 +939,9 @@ export function registerTheme(program) {
939
939
  if (component.length > 0) {
940
940
  const componentInner = component.join('\n\n');
941
941
  const componentScope = `@scope (${scopeSelector}) to (${scopeTo}) {\n${componentInner}\n}`;
942
+ // #3658: also emit attribute-specific rules so <Theme mode> can override color-scheme
942
943
  const colorSchemeDecl = componentScope.includes('light-dark(')
943
- ? ' :root { color-scheme: light dark; }\n\n'
944
+ ? ' :root { color-scheme: light dark; }\n html[data-theme="light"] { color-scheme: light; }\n html[data-theme="dark"] { color-scheme: dark; }\n\n'
944
945
  : '';
945
946
  cssParts.push(
946
947
  `@layer astryx-theme {\n${colorSchemeDecl}${componentScope}\n}`,
@@ -28,20 +28,10 @@ import * as fs from 'node:fs';
28
28
  import * as path from 'node:path';
29
29
  import * as os from 'node:os';
30
30
  import {fileURLToPath} from 'node:url';
31
+ import {ensureCoreBuilt} from './ensure-core-built.mjs';
31
32
 
32
33
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
33
34
  const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');
34
- const REPO_ROOT = path.resolve(__dirname, '../../../..');
35
- const CORE_THEME_ENTRY = path.join(
36
- REPO_ROOT,
37
- 'packages/core/dist/theme/index.js',
38
- );
39
- // The fix reads core's shipped component declarations to decide whether an
40
- // interface is augmentable; those .d.ts files come from the same core build.
41
- const CORE_BUTTON_DTS = path.join(
42
- REPO_ROOT,
43
- 'packages/core/dist/Button/index.d.ts',
44
- );
45
35
 
46
36
  function runCli(args, cwd) {
47
37
  try {
@@ -68,14 +58,13 @@ function writeTheme(dir, contents) {
68
58
  return file;
69
59
  }
70
60
 
61
+ // Build core through the shared lock helper — this suite previously ran its
62
+ // own unguarded `if (!exists) pnpm -F core build`, and when Vitest scheduled
63
+ // it alongside the other build-theme suites on a fresh checkout, the
64
+ // concurrent builds collided on packages/core/dist (core's build starts by
65
+ // wiping dist), nondeterministically breaking whichever suite was mid-read.
71
66
  beforeAll(() => {
72
- if (!fs.existsSync(CORE_THEME_ENTRY) || !fs.existsSync(CORE_BUTTON_DTS)) {
73
- execFileSync('pnpm', ['-F', '@astryxdesign/core', 'build'], {
74
- cwd: REPO_ROOT,
75
- stdio: 'pipe',
76
- timeout: 180_000,
77
- });
78
- }
67
+ ensureCoreBuilt();
79
68
  }, 200_000);
80
69
 
81
70
  let tmpDir;
@@ -26,6 +26,7 @@ import {jsonOut, humanLog} from '../lib/json.mjs';
26
26
  import {cliError} from '../lib/cli-error.mjs';
27
27
  import {ERROR_CODES} from '../lib/error-codes.mjs';
28
28
  import {checkGhCli} from '../utils/github.mjs';
29
+ import {getRunPrefix} from '../utils/package-manager.mjs';
29
30
  import {Project} from '../lib/project.mjs';
30
31
  import {
31
32
  CORE_PACKAGE,
@@ -339,6 +340,10 @@ export function registerSwizzle(program) {
339
340
  // Copy all non-test, non-doc, non-README files
340
341
  const files = fs.readdirSync(componentDir);
341
342
  let copied = 0;
343
+ // Track whether any copied source uses StyleX. Swizzled StyleX source
344
+ // needs a build-time StyleX compiler in the consumer's app or it renders
345
+ // unstyled with no error — so we surface a setup note after copying.
346
+ let usesStyleX = false;
342
347
 
343
348
  for (const file of files) {
344
349
  // Skip test files, doc files, and README
@@ -355,6 +360,13 @@ export function registerSwizzle(program) {
355
360
  content = rewriteImports(content, owner.ownerPackage);
356
361
  }
357
362
 
363
+ if (
364
+ (file.endsWith('.ts') || file.endsWith('.tsx')) &&
365
+ content.includes('@stylexjs/stylex')
366
+ ) {
367
+ usesStyleX = true;
368
+ }
369
+
358
370
  fs.writeFileSync(path.join(outputDir, file), content);
359
371
  copied++;
360
372
  }
@@ -376,6 +388,7 @@ export function registerSwizzle(program) {
376
388
  outputDir: relOutput,
377
389
  filesCopied: copied,
378
390
  files: copiedFiles.map(f => f),
391
+ usesStyleX,
379
392
  };
380
393
  if (feedback) payload.feedback = feedback;
381
394
  return jsonOut('swizzle.copy', payload);
@@ -387,6 +400,27 @@ export function registerSwizzle(program) {
387
400
  );
388
401
  humanLog('You can now customize the component source freely.\n');
389
402
 
403
+ // StyleX build requirement. Swizzled components ship raw StyleX source,
404
+ // which needs a build-time StyleX compiler in the consumer's app to
405
+ // produce atomic CSS. Without it the component compiles but renders
406
+ // unstyled, with no error — a confusing silent failure, so call it out.
407
+ if (usesStyleX) {
408
+ humanLog(
409
+ '⚠ These components use StyleX and require a StyleX compiler in your build.',
410
+ );
411
+ humanLog(
412
+ ' Without one they render unstyled (no error). See setup per framework:',
413
+ );
414
+ humanLog(` ${getRunPrefix()} astryx docs styling`);
415
+ humanLog(
416
+ ' Next.js note: the StyleX Babel plugin disables SWC and breaks next/font —',
417
+ );
418
+ humanLog(
419
+ ' use an SWC-based StyleX transform instead (covered in the guide).',
420
+ );
421
+ humanLog('');
422
+ }
423
+
390
424
  // Maintainer feedback note. If we couldn't swizzle cleanly, the team
391
425
  // wants to know — point users at the issue tracker. Skipped when the
392
426
  // owning package ships no issues URL.
@@ -277,3 +277,70 @@ describe('swizzle — ambiguous ownership', () => {
277
277
  expect(out).toContain(`from '@astryxdesign/core/theme'`);
278
278
  });
279
279
  });
280
+
281
+ /**
282
+ * Build a fake @astryxdesign/core with a component that imports StyleX directly
283
+ * (so the swizzle StyleX-build note should fire) and one that doesn't.
284
+ */
285
+ function buildStyleXCore(project) {
286
+ const core = path.join(project, 'node_modules', '@astryxdesign', 'core');
287
+ // StyleX component.
288
+ const styledDir = path.join(core, 'src', 'Styled');
289
+ fs.mkdirSync(styledDir, {recursive: true});
290
+ fs.writeFileSync(
291
+ path.join(core, 'package.json'),
292
+ '{"name":"@astryxdesign/core","version":"0.0.13"}',
293
+ );
294
+ fs.writeFileSync(
295
+ path.join(styledDir, 'Styled.tsx'),
296
+ [
297
+ `import * as stylex from '@stylexjs/stylex';`,
298
+ `const styles = stylex.create({base: {color: 'red'}});`,
299
+ `export const Styled = () => null;`,
300
+ '',
301
+ ].join('\n'),
302
+ );
303
+ // Plain component (no StyleX).
304
+ const plainDir = path.join(core, 'src', 'Plain');
305
+ fs.mkdirSync(plainDir, {recursive: true});
306
+ fs.writeFileSync(
307
+ path.join(plainDir, 'Plain.tsx'),
308
+ `export const Plain = () => null;\n`,
309
+ );
310
+ return core;
311
+ }
312
+
313
+ describe('swizzle — StyleX build setup note (#3373)', () => {
314
+ it('reports usesStyleX and prints a setup note for StyleX components', () => {
315
+ buildStyleXCore(project);
316
+ writeProjectPackageJson(project);
317
+
318
+ // JSON payload carries the machine-readable flag.
319
+ const jsonResult = runCli(['--json', 'swizzle', 'Styled', '-f'], project);
320
+ expect(jsonResult.code).toBe(0);
321
+ const env = JSON.parse(jsonResult.stdout);
322
+ expect(env.data.usesStyleX).toBe(true);
323
+
324
+ // Human output surfaces the compiler requirement + Next.js caveat.
325
+ const humanResult = runCli(['swizzle', 'Styled', '-f'], project);
326
+ expect(humanResult.code).toBe(0);
327
+ expect(humanResult.stdout).toMatch(/StyleX compiler/i);
328
+ expect(humanResult.stdout).toMatch(/unstyled/i);
329
+ expect(humanResult.stdout).toMatch(/next\/font/i);
330
+ expect(humanResult.stdout).toMatch(/astryx docs styling/);
331
+ });
332
+
333
+ it('does not print the StyleX note for components without StyleX', () => {
334
+ buildStyleXCore(project);
335
+ writeProjectPackageJson(project);
336
+
337
+ const jsonResult = runCli(['--json', 'swizzle', 'Plain', '-f'], project);
338
+ expect(jsonResult.code).toBe(0);
339
+ const env = JSON.parse(jsonResult.stdout);
340
+ expect(env.data.usesStyleX).toBe(false);
341
+
342
+ const humanResult = runCli(['swizzle', 'Plain', '-f'], project);
343
+ expect(humanResult.code).toBe(0);
344
+ expect(humanResult.stdout).not.toMatch(/StyleX compiler/i);
345
+ });
346
+ });
@@ -8,15 +8,10 @@ import {Center} from '@astryxdesign/core/Center';
8
8
  export default function AspectRatioCircleImage() {
9
9
  return (
10
10
  <Center width={300}>
11
- <AspectRatio ratio={1} shape="ellipse">
11
+ <AspectRatio ratio={1} shape="ellipse" fit="cover">
12
12
  <img
13
13
  src="https://lookaside.facebook.com/assets/astryx/light-home-square-1.png"
14
14
  alt="Circular image"
15
- style={{
16
- width: '100%',
17
- height: '100%',
18
- objectFit: 'cover',
19
- }}
20
15
  />
21
16
  </AspectRatio>
22
17
  </Center>
@@ -25,16 +25,11 @@ export default function AspectRatioImageGallery() {
25
25
  <Center width={600}>
26
26
  <Grid columns={3} gap={4} width="100%">
27
27
  {images.map(({id, alt}) => (
28
- <AspectRatio key={id} ratio={4 / 3}>
28
+ <AspectRatio key={id} ratio={4 / 3} fit="cover">
29
29
  <img
30
30
  src="https://lookaside.facebook.com/assets/astryx/illustrative-horizontal-1.png"
31
31
  alt={alt}
32
- style={{
33
- width: '100%',
34
- height: '100%',
35
- objectFit: 'cover',
36
- borderRadius: 8,
37
- }}
32
+ style={{borderRadius: 8}}
38
33
  />
39
34
  </AspectRatio>
40
35
  ))}
@@ -34,16 +34,13 @@ export default function AspectRatioShowcase() {
34
34
  <VStack key={label} gap={2} hAlign="center">
35
35
  <AspectRatio
36
36
  ratio={ratio}
37
+ fit="cover"
37
38
  style={{
38
39
  height: 120,
39
40
  width: 'auto',
40
41
  borderRadius: 'var(--radius-container)',
41
42
  }}>
42
- <img
43
- src={src}
44
- alt={alt}
45
- style={{width: '100%', height: '100%', objectFit: 'cover'}}
46
- />
43
+ <img src={src} alt={alt} />
47
44
  </AspectRatio>
48
45
  <Text type="supporting" color="secondary">
49
46
  {label}
@@ -8,15 +8,10 @@ import {Center} from '@astryxdesign/core/Center';
8
8
  export default function AspectRatioSquareImage() {
9
9
  return (
10
10
  <Center width={300}>
11
- <AspectRatio ratio={1}>
11
+ <AspectRatio ratio={1} fit="cover">
12
12
  <img
13
13
  src="https://lookaside.facebook.com/assets/astryx/light-home-square-1.png"
14
14
  alt="1:1 square"
15
- style={{
16
- width: '100%',
17
- height: '100%',
18
- objectFit: 'cover',
19
- }}
20
15
  />
21
16
  </AspectRatio>
22
17
  </Center>
@@ -8,15 +8,10 @@ import {Center} from '@astryxdesign/core/Center';
8
8
  export default function AspectRatioWidescreen() {
9
9
  return (
10
10
  <Center width={600}>
11
- <AspectRatio ratio={16 / 9}>
11
+ <AspectRatio ratio={16 / 9} fit="cover">
12
12
  <img
13
13
  src="https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png"
14
14
  alt="16:9 widescreen"
15
- style={{
16
- width: '100%',
17
- height: '100%',
18
- objectFit: 'cover',
19
- }}
20
15
  />
21
16
  </AspectRatio>
22
17
  </Center>
@@ -6,7 +6,7 @@ export const doc = {
6
6
  exampleFor: 'Collapsible',
7
7
  name: 'Collapsible — Divided Accordion',
8
8
  displayName: 'Collapsible — Divided Accordion',
9
- description: 'FAQ-style accordion using the dividers prop on CollapsibleGroup: built-in row hairlines and density padding with zero custom CSS. Use for FAQs, settings lists, and nav sections.',
9
+ description: 'FAQ-style accordion using the hasDividers prop on CollapsibleGroup: built-in row hairlines and density padding with zero custom CSS. Use for FAQs, settings lists, and nav sections.',
10
10
  isReady: true,
11
11
  aspectRatio: 4 / 3,
12
12
  componentsUsed: ['Collapsible', 'CollapsibleGroup', 'Text'],
@@ -8,7 +8,7 @@ import {Text} from '@astryxdesign/core/Text';
8
8
  export default function CollapsibleDividedAccordion() {
9
9
  return (
10
10
  <div style={{width: '100%', maxWidth: 400}}>
11
- <CollapsibleGroup type="single" dividers="between" defaultValue="reset">
11
+ <CollapsibleGroup type="single" hasDividers defaultValue="reset">
12
12
  <Collapsible trigger="How do I reset my password?" value="reset">
13
13
  <Text type="body">
14
14
  Go to Settings → Security → Change Password. You'll receive a
@@ -2,34 +2,36 @@
2
2
 
3
3
  'use client';
4
4
 
5
- import {Collapsible} from '@astryxdesign/core/Collapsible';
5
+ import {Collapsible, CollapsibleGroup} from '@astryxdesign/core/Collapsible';
6
6
  import {Divider} from '@astryxdesign/core/Divider';
7
7
  import {Text} from '@astryxdesign/core/Text';
8
8
  import {VStack} from '@astryxdesign/core/Layout';
9
9
 
10
10
  export default function CollapsibleWithoutCard() {
11
11
  return (
12
- <VStack gap={3} style={{width: '100%', maxWidth: 400}}>
13
- <Collapsible trigger="Deployment Details">
14
- <Text type="body">
15
- Last deployed on April 18, 2026 at 3:42 PM by Sarah Chen. Build
16
- duration was 2m 14s with zero warnings.
17
- </Text>
18
- </Collapsible>
19
- <Divider />
20
- <Collapsible trigger="Environment Variables" defaultIsOpen={false}>
21
- <Text type="body">
22
- 12 variables configured. Last updated March 30, 2026. All secrets are
23
- encrypted at rest with AES-256.
24
- </Text>
25
- </Collapsible>
26
- <Divider />
27
- <Collapsible trigger="Build Logs" defaultIsOpen={false}>
28
- <Text type="body">
29
- Build completed successfully. 847 modules compiled, 0 errors, 0
30
- warnings. Bundle size: 142 KB gzipped.
31
- </Text>
32
- </Collapsible>
33
- </VStack>
12
+ <CollapsibleGroup type="single" defaultValue="deployment">
13
+ <VStack gap={3} style={{width: '100%', maxWidth: 400}}>
14
+ <Collapsible trigger="Deployment Details" value="deployment">
15
+ <Text type="body">
16
+ Last deployed on April 18, 2026 at 3:42 PM by Sarah Chen. Build
17
+ duration was 2m 14s with zero warnings.
18
+ </Text>
19
+ </Collapsible>
20
+ <Divider />
21
+ <Collapsible trigger="Environment Variables" value="environment">
22
+ <Text type="body">
23
+ 12 variables configured. Last updated March 30, 2026. All secrets
24
+ are encrypted at rest with AES-256.
25
+ </Text>
26
+ </Collapsible>
27
+ <Divider />
28
+ <Collapsible trigger="Build Logs" value="logs">
29
+ <Text type="body">
30
+ Build completed successfully. 847 modules compiled, 0 errors, 0
31
+ warnings. Bundle size: 142 KB gzipped.
32
+ </Text>
33
+ </Collapsible>
34
+ </VStack>
35
+ </CollapsibleGroup>
34
36
  );
35
37
  }
@@ -110,7 +110,7 @@ export default function ClassicGalleryTemplate() {
110
110
 
111
111
  return (
112
112
  <Layout
113
- height="auto"
113
+ height="fill"
114
114
  content={
115
115
  <LayoutContent padding={0}>
116
116
  <Center axis="horizontal">
@@ -729,7 +729,7 @@ function TableCard<T extends {id: string}>({
729
729
  export default function DashboardTemplate() {
730
730
  return (
731
731
  <Layout
732
- height="auto"
732
+ height="fill"
733
733
  content={
734
734
  <LayoutContent padding={6}>
735
735
  <VStack gap={6}>
@@ -209,7 +209,7 @@ const COMPONENT_CATEGORIES = [
209
209
  export default function DocumentationOverviewPage() {
210
210
  return (
211
211
  <Layout
212
- height="auto"
212
+ height="fill"
213
213
  contentWidth={1200}
214
214
  content={
215
215
  <LayoutContent padding={8}>