Skip to content

Commit 5ebbb80

Browse files
authored
refactor: move to ng-icons instead of raw icons
* refactor: move select and checkbox to icons * refactor: drawer,dialog,radio-button,dark-mode to ng-icons * refactor: accordion,pagination to icons * refactor: move to ng-icons * refactor: move away from lucide * refactor: remove lucide angular * fix: url design fix
1 parent 380277d commit 5ebbb80

File tree

62 files changed

+269
-655
lines changed

Some content is hidden

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

62 files changed

+269
-655
lines changed

package-lock.json

+25-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
"@angular/router": "^19.0.6",
4141
"@angular/ssr": "^19.0.7",
4242
"@docsearch/js": "^3.8.3",
43+
"@ng-icons/core": "^30.4.0",
44+
"@ng-icons/material-icons": "^30.4.0",
4345
"@ngverse/icons-lu": "^0.0.12",
4446
"@tailwindcss/postcss": "^4.0.8",
4547
"@types/file-saver": "^2.0.7",
@@ -48,7 +50,6 @@
4850
"file-saver": "^2.0.5",
4951
"i": "^0.3.7",
5052
"jszip": "^3.10.1",
51-
"lucide-angular": "^0.462.0",
5253
"ngx-highlightjs": "^12.0.0",
5354
"npm": "^10.9.2",
5455
"postcss": "^8.5.3",

projects/docs/public/images/arrow-left.svg

-6
This file was deleted.

projects/docs/public/images/arrow-right.svg

-6
This file was deleted.

projects/docs/public/images/check.svg

-14
This file was deleted.

projects/docs/public/images/clipboard-paste.svg

-7
This file was deleted.

projects/docs/public/images/clipboard.svg

-6
This file was deleted.

projects/docs/public/images/external-link.svg

-1
This file was deleted.

projects/docs/public/images/rocket.svg

-10
This file was deleted.

projects/docs/public/images/star.svg

-7
This file was deleted.

projects/docs/src/app/app.component.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { IconRegistry } from '@/ui/icon/icon.registry';
12
import { Component, inject } from '@angular/core';
23
import { RouterOutlet } from '@angular/router';
34
import { HeaderComponent } from './features/header/header.component';
4-
import { IconRegistry } from '@/ui/icon/icon.registry';
55

66
@Component({
77
selector: 'doc-root',
@@ -13,15 +13,6 @@ export class AppComponent {
1313
iconRegistry = inject(IconRegistry);
1414

1515
constructor() {
16-
this.iconRegistry.addIcon('copy', 'images/copy.svg');
17-
this.iconRegistry.addIcon('check', 'images/check.svg');
18-
this.iconRegistry.addIcon('arrow-right', 'images/arrow-right.svg');
19-
this.iconRegistry.addIcon('arrow-left', 'images/arrow-left.svg');
20-
this.iconRegistry.addIcon('clipboard', 'images/clipboard.svg');
21-
this.iconRegistry.addIcon('clipboard-paste', 'images/clipboard-paste.svg');
22-
this.iconRegistry.addIcon('rocket', 'images/rocket.svg');
23-
this.iconRegistry.addIcon('external-link', 'images/external-link.svg');
24-
this.iconRegistry.addIcon('star', 'images/star.svg');
2516
this.iconRegistry.addIcon('github', 'images/github.svg');
2617
this.iconRegistry.addIcon('logo', 'logo.svg');
2718
}

projects/docs/src/app/blueprint/api-info/api-info.component.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[href]="api.articleLink"
99
target="_blank"
1010
>Article
11-
<app-icon width="18" height="18" name="external-link"></app-icon>
11+
<ng-icon [svg]="EXTERNAL_LINK" size="18"></ng-icon>
1212
</a>
1313
</p>
1414
}
@@ -21,7 +21,7 @@ <h5 class="my-0 pb-2 text-lg font-medium">API</h5>
2121
target="_blank"
2222
class="inline-flex items-center gap-1 rounded-xl bg-slate-200 px-2 py-1 text-xs"
2323
>
24-
WAI-ARIA <external-link-icon size="14"> </external-link-icon>
24+
WAI-ARIA <ng-icon [svg]="EXTERNAL_LINK" size="14"></ng-icon>
2525
</a>
2626
}
2727
@if (api.reliesOn) {
@@ -30,12 +30,12 @@ <h5 class="my-0 pb-2 text-lg font-medium">API</h5>
3030
target="_blank"
3131
class="inline-flex items-center gap-1 rounded-xl bg-slate-200 px-2 py-1 text-xs"
3232
>
33-
Relies on<external-link-icon size="14"> </external-link-icon>
33+
Relies on<ng-icon [svg]="EXTERNAL_LINK" size="14"></ng-icon>
3434
</a>
3535
}
3636
</div>
3737

38-
<app-divider class="mb-6"></app-divider>
38+
<app-divider class="mt-2 mb-6"></app-divider>
3939
@if (api; as api) {
4040
@if (api.ariaDescription) {
4141
<p class="mb-6">WAI-ARIA: {{ api.ariaDescription }}</p>
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { DividerComponent } from '@/ui/divider/divider.component';
2-
import { IconComponent } from '@/ui/icon/icon.component';
32
import { Component, input } from '@angular/core';
43
import { RouterLink } from '@angular/router';
5-
import { ExternalLinkIcon } from '@ngverse/icons-lu';
4+
import { NgIcon } from '@ng-icons/core';
5+
import { matOpenInNew } from '@ng-icons/material-icons/baseline';
66
import {
77
ApiEntity,
88
ApiInputsComponent,
@@ -18,16 +18,11 @@ export interface ApiInfo {
1818
}
1919
@Component({
2020
selector: 'doc-api-info',
21-
imports: [
22-
ApiInputsComponent,
23-
ExternalLinkIcon,
24-
RouterLink,
25-
IconComponent,
26-
DividerComponent,
27-
],
21+
imports: [ApiInputsComponent, RouterLink, DividerComponent, NgIcon],
2822
templateUrl: './api-info.component.html',
2923
styleUrl: './api-info.component.css',
3024
})
3125
export class ApiInfoComponent {
3226
apiInfo = input.required<ApiInfo>();
27+
EXTERNAL_LINK = matOpenInNew;
3328
}

projects/docs/src/app/blueprint/source-code/source-code.component.html

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
(click)="copy()"
55
class="copy-button"
66
>
7-
@if (copied()) {
8-
<app-icon name="check" width="20" height="20"></app-icon>
9-
} @else {
10-
<app-icon name="copy" width="20" height="20"></app-icon>
11-
}
7+
<ng-icon size="20" [svg]="copied() ? CHECK_ICON : COPY_ICON"></ng-icon>
128
</doc-icon-button>
139
}
1410
<app-card

projects/docs/src/app/blueprint/source-code/source-code.component.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
import { CardComponent } from '@/ui/card/card.component';
12
import { ClipboardModule } from '@angular/cdk/clipboard';
23
import { Component, computed, input, signal } from '@angular/core';
4+
import { NgIcon } from '@ng-icons/core';
5+
import { matCheck, matContentCopy } from '@ng-icons/material-icons/baseline';
36
import { Highlight } from 'ngx-highlightjs';
4-
import { CardComponent } from '@/ui/card/card.component';
5-
import { IconComponent } from '@/ui/icon/icon.component';
67
import { EMPTY_FILE_TOKEN } from '../../services/file.service';
78

89
@Component({
910
selector: 'doc-source-code',
10-
imports: [Highlight, ClipboardModule, IconComponent, CardComponent],
11+
imports: [Highlight, ClipboardModule, CardComponent, NgIcon],
1112
templateUrl: './source-code.component.html',
1213
styleUrl: './source-code.component.css',
1314
})
@@ -23,6 +24,9 @@ export class SourceCodeComponent {
2324

2425
surface = input(false);
2526

27+
COPY_ICON = matContentCopy;
28+
CHECK_ICON = matCheck;
29+
2630
showCopy = computed(
2731
() => this.allowCopy() && !!this.code() && this.code() !== EMPTY_FILE_TOKEN
2832
);

projects/docs/src/app/blueprint/source-tree/source-tree-select/source-tree-select.component.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import { OptionGroupLabelComponent } from '@/ui/select/option-group-label.component';
2+
import { OptionGroupComponent } from '@/ui/select/option-group.component';
3+
import { OptionComponent } from '@/ui/select/option.component';
4+
import { SelectComponent } from '@/ui/select/select.component';
15
import {
26
Component,
37
computed,
@@ -8,17 +12,11 @@ import {
812
signal,
913
} from '@angular/core';
1014
import { FormsModule } from '@angular/forms';
11-
import { ChevronDown, Folder, LucideAngularModule } from 'lucide-angular';
12-
import { OptionGroupLabelComponent } from '@/ui/select/option-group-label.component';
13-
import { OptionGroupComponent } from '@/ui/select/option-group.component';
14-
import { OptionComponent } from '@/ui/select/option.component';
15-
import { SelectComponent } from '@/ui/select/select.component';
1615
import { SourceTreeFile, SourceTreeFolder } from '../source-tree-builder';
1716

1817
@Component({
1918
selector: 'doc-source-tree-select',
2019
imports: [
21-
LucideAngularModule,
2220
SelectComponent,
2321
OptionComponent,
2422
FormsModule,
@@ -38,9 +36,6 @@ export class SourceTreeSelectComponent {
3836

3937
allFiles = computed(() => this.sourceTree().flatMap((sour) => sour.files));
4038

41-
ChevronDown = ChevronDown;
42-
Folder = Folder;
43-
4439
constructor() {
4540
effect(() => {
4641
if (this.selectedFile()) {

projects/docs/src/app/examples/button/show-case-button/show-case-button.component.html

+25-8
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,34 @@
1515
<div>
1616
<p class="buttons-label">Icon Button</p>
1717
<div class="buttons-container">
18-
<button appButton icon>
19-
<app-icon name="arrow-right"></app-icon>
18+
<button appButton icon aria-label="show case button icon">
19+
<ng-icon size="24" [svg]="ARROW_RIGHT"></ng-icon>
2020
</button>
21-
<button appButton icon color="secondary">
22-
<app-icon name="arrow-right"></app-icon>
21+
<button
22+
appButton
23+
icon
24+
color="secondary"
25+
aria-label="show case button icon"
26+
>
27+
<ng-icon size="24" [svg]="ARROW_RIGHT"></ng-icon>
2328
</button>
24-
<button appButton icon color="danger" variant="outline">
25-
<app-icon name="arrow-right"></app-icon>
29+
<button
30+
appButton
31+
icon
32+
color="danger"
33+
variant="outline"
34+
aria-label="show case button icon"
35+
>
36+
<ng-icon size="24" [svg]="ARROW_RIGHT"></ng-icon>
2637
</button>
27-
<button appButton icon color="success" variant="link">
28-
<app-icon name="arrow-right"></app-icon>
38+
<button
39+
appButton
40+
icon
41+
color="success"
42+
variant="link"
43+
aria-label="show case button icon"
44+
>
45+
<ng-icon size="24" [svg]="ARROW_RIGHT"></ng-icon>
2946
</button>
3047
</div>
3148
</div>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { Component } from '@angular/core';
21
import { ButtonComponent } from '@/ui/button/button.component';
3-
import { IconComponent } from '@/ui/icon/icon.component';
2+
import { Component } from '@angular/core';
3+
import { NgIcon } from '@ng-icons/core';
4+
import { matArrowForward } from '@ng-icons/material-icons/baseline';
45

56
@Component({
67
selector: 'doc-show-case-button',
7-
imports: [ButtonComponent, IconComponent],
8+
imports: [ButtonComponent, NgIcon],
89
templateUrl: './show-case-button.component.html',
910
styleUrl: './show-case-button.component.css',
1011
})
11-
export class ShowCaseButtonComponent {}
12+
export class ShowCaseButtonComponent {
13+
ARROW_RIGHT = matArrowForward;
14+
}

projects/docs/src/app/examples/tab/show-case-tab/show-case-tab.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ng-template appTabHeader>
55
<div class="custom-label">
66
<span>Custom Label</span>
7-
<app-icon name="check" width="16" height="16"></app-icon>
7+
<ng-icon [svg]="CHECK_ICON"></ng-icon>
88
</div>
99
</ng-template>
1010
This is Custom Label Tab enjoy!

0 commit comments

Comments
 (0)