Skip to content

Commit f8e9e96

Browse files
authored
feat: updated Angular to 20.2, Storybook to 9.1 (#360)
1 parent 4eaabeb commit f8e9e96

File tree

78 files changed

+8813
-8705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+8813
-8705
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const config = {
1212
node: true
1313
},
1414
plugins: ['file-progress'],
15-
extends: ['plugin:eslint-comments/recommended'],
15+
extends: ['plugin:eslint-comments/recommended', 'plugin:storybook/recommended'],
1616
rules: {
1717
// plugin:file-progress
1818
'file-progress/activate': isCI ? 0 : 1,

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
node-version:
66
description: The version of node.js
77
required: false
8-
default: '20.18.1'
8+
default: '20.19.0'
99

1010
runs:
1111
using: composite

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.firebase
33
.vercel
44

5+
debug-storybook.log
56
documentation.json
67
dependency-graph.png
78

@@ -68,3 +69,4 @@ yarn-error.log*
6869
esm
6970

7071
.cursor/rules/nx-rules.mdc
72+
.github/instructions/nx.instructions.md

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.17
1+
20.19

apps/radix-docs/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
},
1313
"dependencies": {
1414
"@alpinejs/focus": "^3.14.9",
15-
"@analogjs/astro-angular": "2.0.0-alpha.9",
15+
"@analogjs/astro-angular": "2.0.0-alpha.18",
1616
"@astrojs/alpinejs": "^0.4.8",
1717
"@astrojs/check": "^0.9.4",
18-
"@astrojs/mdx": "^4.2.6",
18+
"@astrojs/mdx": "^4.3.4",
1919
"@astrojs/sitemap": "^3.3.1",
2020
"@astrojs/vercel": "^8.1.4",
2121
"@astrojs/tailwind": "^5.1.5",
@@ -25,7 +25,7 @@
2525
"@radix-ui/colors": "^3.0.0",
2626
"@radix-ui/themes": "^3.1.6",
2727
"alpinejs": "^3.14.9",
28-
"astro": "^5.7.11",
28+
"astro": "^5.13.5",
2929
"astro-auto-import": "^0.4.4",
3030
"classnames": "^2.5.1",
3131
"clsx": "^2.1.1",
@@ -35,8 +35,8 @@
3535
"tailwindcss-animate": "^1.0.7"
3636
},
3737
"devDependencies": {
38-
"@angular/language-service": "^19.2.4",
39-
"@astrojs/markdown-remark": "^6.3.1",
38+
"@angular/language-service": "^20.2.3",
39+
"@astrojs/markdown-remark": "^6.3.6",
4040
"@shikijs/compat": "^1.29.2",
4141
"@shikijs/transformers": "^1.29.2",
4242
"@stackblitz/sdk": "^1.11.0",
@@ -48,7 +48,7 @@
4848
"rehype-slug": "^6.0.0",
4949
"remark-code-import": "^1.2.0",
5050
"shiki": "^1.29.2",
51-
"typescript": "~5.5.4",
51+
"typescript": "5.8.3",
5252
"unist-builder": "^4.0.0",
5353
"unist-util-visit": "^5.0.0"
5454
}
Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
export const dependencies = {
2-
'@angular/animations': '^19.0.0',
3-
'@angular/cdk': '^19.0.0',
4-
'@angular/cli': '^19.0.0',
5-
'@angular/common': '^19.0.0',
6-
'@angular/compiler': '^19.0.0',
7-
'@angular/core': '^19.0.0',
8-
'@angular/forms': '^19.0.0',
9-
'@angular/platform-browser': '^19.0.0',
10-
'@angular/platform-browser-dynamic': '^19.0.0',
11-
'@radix-ng/primitives': '^0.32.0',
2+
'@angular/animations': '^20.0.0',
3+
'@angular/cdk': '^20.0.0',
4+
'@angular/cli': '^20.0.0',
5+
'@angular/common': '^20.0.0',
6+
'@angular/compiler': '^20.0.0',
7+
'@angular/core': '^20.0.0',
8+
'@angular/forms': '^20.0.0',
9+
'@angular/platform-browser': '^20.0.0',
10+
'@angular/platform-browser-dynamic': '^20.0.0',
11+
'@radix-ng/primitives': '^0.43.0',
1212
'@radix-ui/colors': '^3.0.0',
1313
'@fontsource/inter': '^5.1.0',
1414
'@fontsource/jetbrains-mono': '^5.1.1',
15-
'lucide-angular': '~0.469.0',
15+
'@internationalized/date': '^3.7.0',
16+
'lucide-angular': '~0.542.0',
1617
rxjs: '~7.8.1',
1718
tslib: '^2.5.0',
1819
'zone.js': '~0.15.0'
1920
};
2021

2122
export const devDependencies = {
22-
'@angular-devkit/build-angular': '^19.0.0',
23-
'@angular/cli': '^19.0.0',
24-
'@angular/compiler-cli': '^19.0.0',
25-
'@angular/language-service': '^19.0.0',
23+
'@angular-devkit/build-angular': '^20.0.0',
24+
'@angular/cli': '^20.0.0',
25+
'@angular/compiler-cli': '^20.0.0',
26+
'@angular/language-service': '^20.0.0',
2627
'@types/node': '^20',
2728
'ts-node': '~8.3.0',
28-
typescript: '5.6.3'
29+
typescript: '5.8.3'
2930
};

apps/radix-docs/src/components/demo-component-preview/ComponentThemesPreview.astro

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
import path from 'path';
3-
import { readFileSync } from 'fs';
42
import { DemoThemesLoaderComponent } from './demo-themes-loader.component';
53
64
export interface Props {
@@ -9,20 +7,6 @@ export interface Props {
97
}
108
119
const { name, file } = Astro.props;
12-
13-
async function loadCode(name: string, file: string) {
14-
const filename = path.join(process.cwd(), 'src', 'demos', 'components', `${name}`, `${file}.ts`);
15-
16-
const code = readFileSync(filename, 'utf-8')
17-
.toString()
18-
.replace(/export\s+default\s+.*;\s*/, '');
19-
20-
return {
21-
code
22-
};
23-
}
24-
25-
const { code } = await loadCode(name, file);
2610
---
2711

2812
<div class="rt-Box rt-r-my-5">

apps/radix-docs/src/components/demo-component-preview/demo-themes-loader.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { demos } from '@/demos/components';
77

88
@Component({
99
selector: 'empty-themes-component',
10-
standalone: true,
1110
imports: [NgComponentOutlet, AsyncPipe],
1211
template: `
1312
@let componentRender = this.component() | async;
@@ -22,6 +21,7 @@ import { demos } from '@/demos/components';
2221
export class DemoThemesLoaderComponent {
2322
readonly name = input<string>();
2423
readonly file = input<string>();
24+
2525
demos = demos;
2626

2727
component = computed(async () => {

apps/radix-docs/src/components/demo-primitive-preview/ComponentPreview.astro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import path from 'path';
33
import { readFileSync } from 'fs';
44
55
import { cn } from '@/utils/utils';
6-
import { DemoLoaderComponent } from './demo-loader.component';
7-
import { Tabs, TabsList, TabsTrigger, TabsContent } from '../tabs';
8-
import { CodeButton } from '@/components/code-editor/code-button.ts';
9-
import { LlmsButton } from '@/components/code-editor/llms-button.ts';
6+
import { DemoLoaderComponent } from '@/components/demo-primitive-preview/demo-loader.component';
7+
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/tabs';
8+
import { CodeButton } from '@/components/code-editor/code-button';
9+
import { LlmsButton } from '@/components/code-editor/llms-button';
1010
1111
export interface Props {
1212
name: string;
@@ -73,8 +73,8 @@ const llmsUrl = `${basePath}/llms.txt`;
7373
CSS
7474
</TabsTrigger>
7575
<div class="ml-auto flex items-center gap-2">
76-
<LlmsButton {...{ llmsUrl }} client:visible />
77-
<CodeButton {...{ code, name, css }} client:visible />
76+
<LlmsButton {...{ llmsUrl }} client:only="angular" />
77+
<CodeButton {...{ code, name, css }} client:only="angular" />
7878
</div>
7979
</TabsList>
8080
</div>

apps/radix-docs/src/components/demo-primitive-preview/demo-loader.component.ts

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,45 @@ import { Component, computed, input } from '@angular/core';
66
import { demos } from '@/demos/primitives';
77

88
@Component({
9-
selector: 'empty-component',
10-
standalone: true,
119
imports: [NgComponentOutlet, AsyncPipe],
1210
template: `
1311
@let componentRender = this.component() | async;
1412
15-
@if (!componentRender || !componentRender.default) {
13+
@if (this.existComponent && (!componentRender || !componentRender?.default)) {
1614
<div class="text-sm text-white">Loading...</div>
15+
} @else if (!this.existComponent) {
16+
<div>
17+
<p class="text-muted-foreground text-sm">
18+
Component
19+
<code class="bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm">
20+
{{ name() }}
21+
</code>
22+
.
23+
</p>
24+
</div>
1725
} @else {
18-
<ng-container *ngComponentOutlet="componentRender.default" />
26+
<ng-container *ngComponentOutlet="componentRender!.default" />
1927
}
2028
`
2129
})
2230
export class DemoLoaderComponent {
2331
readonly name = input<string>();
2432
readonly file = input<string>();
33+
2534
demos = demos;
2635

36+
protected existComponent = true;
37+
2738
component = computed(async () => {
2839
if (!this.file() || !this.name()) return null;
2940

30-
return await demos[this.name()!][this.file()!].component();
41+
const component = demos[this.name()!][this.file()!].component();
42+
43+
try {
44+
return component;
45+
} catch {
46+
this.existComponent = false;
47+
return null;
48+
}
3149
});
3250
}

0 commit comments

Comments
 (0)