@hugeicons/angular 1.0.4 → 1.0.5

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.
@@ -1,117 +1,96 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
2
+ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
5
3
 
6
4
  class HugeiconsIconComponent {
7
- size = 24;
8
- strokeWidth;
9
- absoluteStrokeWidth = false;
10
- icon;
11
- altIcon;
12
- color = 'currentColor';
13
- class = '';
14
- showAlt = false;
15
- paths = [];
16
- ngOnInit() {
17
- this.updatePaths();
18
- }
19
- ngOnChanges(changes) {
20
- this.updatePaths();
21
- }
22
- updatePaths() {
23
- const currentIcon = this.showAlt && this.altIcon ? this.altIcon : this.icon;
5
+ // Signal inputs - modern Angular 17.1+ approach
6
+ size = input(24);
7
+ strokeWidth = input(undefined);
8
+ absoluteStrokeWidth = input(false);
9
+ icon = input.required();
10
+ altIcon = input(undefined);
11
+ color = input('currentColor');
12
+ iconClass = input('', { alias: 'class' });
13
+ showAlt = input(false);
14
+ // Computed signal for reactive path updates
15
+ paths = computed(() => {
16
+ const currentIcon = this.showAlt() && this.altIcon() ? this.altIcon() : this.icon();
24
17
  if (!currentIcon || !Array.isArray(currentIcon)) {
25
- this.paths = [];
26
- return;
18
+ return [];
27
19
  }
28
- const calculatedStrokeWidth = this.strokeWidth !== undefined
29
- ? (this.absoluteStrokeWidth ? (Number(this.strokeWidth) * 24) / Number(this.size) : this.strokeWidth)
20
+ const strokeWidthValue = this.strokeWidth();
21
+ const calculatedStrokeWidth = strokeWidthValue !== undefined
22
+ ? (this.absoluteStrokeWidth()
23
+ ? (Number(strokeWidthValue) * 24) / Number(this.size())
24
+ : strokeWidthValue)
30
25
  : undefined;
31
- const strokeProps = calculatedStrokeWidth !== undefined ? {
32
- strokeWidth: calculatedStrokeWidth,
33
- stroke: 'currentColor'
34
- } : {};
35
- this.paths = currentIcon.map(([_, attrs]) => ({
26
+ const strokeProps = calculatedStrokeWidth !== undefined
27
+ ? { strokeWidth: calculatedStrokeWidth, stroke: 'currentColor' }
28
+ : {};
29
+ return currentIcon.map(([_, attrs]) => ({
36
30
  d: attrs['d'],
37
31
  fill: attrs['fill'] || 'none',
38
32
  opacity: attrs['opacity'],
39
33
  fillRule: attrs['fillRule'],
40
34
  ...strokeProps
41
35
  }));
42
- }
43
- trackByFn(index) {
44
- return index;
45
- }
36
+ });
46
37
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HugeiconsIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
47
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: HugeiconsIconComponent, isStandalone: true, selector: "hugeicons-icon", inputs: { size: "size", strokeWidth: "strokeWidth", absoluteStrokeWidth: "absoluteStrokeWidth", icon: "icon", altIcon: "altIcon", color: "color", class: "class", showAlt: "showAlt" }, usesOnChanges: true, ngImport: i0, template: `
38
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: HugeiconsIconComponent, isStandalone: true, selector: "hugeicons-icon", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, absoluteStrokeWidth: { classPropertyName: "absoluteStrokeWidth", publicName: "absoluteStrokeWidth", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, altIcon: { classPropertyName: "altIcon", publicName: "altIcon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, iconClass: { classPropertyName: "iconClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, showAlt: { classPropertyName: "showAlt", publicName: "showAlt", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: inline-flex; align-items: center; justify-content: center;" }, ngImport: i0, template: `
48
39
  <svg
49
- [attr.width]="size"
50
- [attr.height]="size"
40
+ [attr.width]="size()"
41
+ [attr.height]="size()"
51
42
  viewBox="0 0 24 24"
52
43
  fill="none"
53
- [attr.color]="color"
54
- [class]="class"
44
+ [attr.color]="color()"
45
+ [class]="iconClass()"
55
46
  xmlns="http://www.w3.org/2000/svg"
56
47
  >
57
- <path
58
- *ngFor="let path of paths; trackBy: trackByFn"
59
- [attr.d]="path.d"
60
- [attr.fill]="path.fill"
61
- [attr.opacity]="path.opacity"
62
- [attr.fill-rule]="path.fillRule"
63
- [attr.stroke]="path.stroke"
64
- [attr.stroke-width]="path.strokeWidth"
65
- />
48
+ @for (path of paths(); track $index) {
49
+ <path
50
+ [attr.d]="path.d"
51
+ [attr.fill]="path.fill"
52
+ [attr.opacity]="path.opacity"
53
+ [attr.fill-rule]="path.fillRule"
54
+ [attr.stroke]="path.stroke"
55
+ [attr.stroke-width]="path.strokeWidth"
56
+ />
57
+ }
66
58
  </svg>
67
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
59
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
60
  }
69
61
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HugeiconsIconComponent, decorators: [{
70
62
  type: Component,
71
63
  args: [{
72
64
  selector: 'hugeicons-icon',
73
65
  standalone: true,
74
- imports: [CommonModule],
75
66
  template: `
76
67
  <svg
77
- [attr.width]="size"
78
- [attr.height]="size"
68
+ [attr.width]="size()"
69
+ [attr.height]="size()"
79
70
  viewBox="0 0 24 24"
80
71
  fill="none"
81
- [attr.color]="color"
82
- [class]="class"
72
+ [attr.color]="color()"
73
+ [class]="iconClass()"
83
74
  xmlns="http://www.w3.org/2000/svg"
84
75
  >
85
- <path
86
- *ngFor="let path of paths; trackBy: trackByFn"
87
- [attr.d]="path.d"
88
- [attr.fill]="path.fill"
89
- [attr.opacity]="path.opacity"
90
- [attr.fill-rule]="path.fillRule"
91
- [attr.stroke]="path.stroke"
92
- [attr.stroke-width]="path.strokeWidth"
93
- />
76
+ @for (path of paths(); track $index) {
77
+ <path
78
+ [attr.d]="path.d"
79
+ [attr.fill]="path.fill"
80
+ [attr.opacity]="path.opacity"
81
+ [attr.fill-rule]="path.fillRule"
82
+ [attr.stroke]="path.stroke"
83
+ [attr.stroke-width]="path.strokeWidth"
84
+ />
85
+ }
94
86
  </svg>
95
87
  `,
88
+ host: {
89
+ style: 'display: inline-flex; align-items: center; justify-content: center;'
90
+ },
96
91
  changeDetection: ChangeDetectionStrategy.OnPush
97
92
  }]
98
- }], propDecorators: { size: [{
99
- type: Input
100
- }], strokeWidth: [{
101
- type: Input
102
- }], absoluteStrokeWidth: [{
103
- type: Input
104
- }], icon: [{
105
- type: Input
106
- }], altIcon: [{
107
- type: Input
108
- }], color: [{
109
- type: Input
110
- }], class: [{
111
- type: Input
112
- }], showAlt: [{
113
- type: Input
114
- }] } });
93
+ }] });
115
94
 
116
95
  /**
117
96
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"hugeicons-angular.mjs","sources":["../../src/components/hugeicons-icon.component.ts","../../src/hugeicons-angular.ts"],"sourcesContent":["import { Component, Input, ChangeDetectionStrategy, OnInit, OnChanges, SimpleChanges } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IconSvgObject } from '../lib/types';\n\n@Component({\n selector: 'hugeicons-icon',\n standalone: true,\n imports: [CommonModule],\n template: `\n <svg\n [attr.width]=\"size\"\n [attr.height]=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n [attr.color]=\"color\"\n [class]=\"class\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n *ngFor=\"let path of paths; trackBy: trackByFn\"\n [attr.d]=\"path.d\"\n [attr.fill]=\"path.fill\"\n [attr.opacity]=\"path.opacity\"\n [attr.fill-rule]=\"path.fillRule\"\n [attr.stroke]=\"path.stroke\"\n [attr.stroke-width]=\"path.strokeWidth\"\n />\n </svg>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class HugeiconsIconComponent implements OnInit, OnChanges {\n @Input() size: string | number = 24;\n @Input() strokeWidth?: number;\n @Input() absoluteStrokeWidth = false;\n @Input() icon!: IconSvgObject;\n @Input() altIcon?: IconSvgObject;\n @Input() color = 'currentColor';\n @Input() class = '';\n @Input() showAlt = false;\n\n paths: Array<{\n d: string;\n fill: string;\n opacity?: string;\n fillRule?: string;\n stroke?: string;\n strokeWidth?: number;\n }> = [];\n\n ngOnInit() {\n this.updatePaths();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this.updatePaths();\n }\n\n private updatePaths() {\n const currentIcon = this.showAlt && this.altIcon ? this.altIcon : this.icon;\n\n if (!currentIcon || !Array.isArray(currentIcon)) {\n this.paths = [];\n return;\n }\n\n const calculatedStrokeWidth = this.strokeWidth !== undefined\n ? (this.absoluteStrokeWidth ? (Number(this.strokeWidth) * 24) / Number(this.size) : this.strokeWidth)\n : undefined;\n\n const strokeProps = calculatedStrokeWidth !== undefined ? {\n strokeWidth: calculatedStrokeWidth,\n stroke: 'currentColor'\n } : {};\n\n this.paths = currentIcon.map(([_, attrs]) => ({\n d: attrs['d'],\n fill: attrs['fill'] || 'none',\n opacity: attrs['opacity'],\n fillRule: attrs['fillRule'],\n ...strokeProps\n }));\n }\n\n trackByFn(index: number) {\n return index;\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAgCa,sBAAsB,CAAA;IACxB,I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AC,YAAY,CAAC;AACvB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;AAoBT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC;AAC1C,iBAAA;8BAGU,IAAI,EAAA,CAAA;sBAAZ;gBACQ,WAAW,EAAA,CAAA;sBAAnB;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,OAAO,EAAA,CAAA;sBAAf;;;ACxCH;;AAEG;;;;"}
1
+ {"version":3,"file":"hugeicons-angular.mjs","sources":["../../src/components/hugeicons-icon.component.ts","../../src/hugeicons-angular.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, computed, input } from '@angular/core';\nimport { IconSvgObject } from '../lib/types';\n\ninterface PathData {\n d: string;\n fill: string;\n opacity?: string;\n fillRule?: string;\n stroke?: string;\n strokeWidth?: number;\n}\n\n@Component({\n selector: 'hugeicons-icon',\n standalone: true,\n template: `\n <svg\n [attr.width]=\"size()\"\n [attr.height]=\"size()\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n [attr.color]=\"color()\"\n [class]=\"iconClass()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n @for (path of paths(); track $index) {\n <path\n [attr.d]=\"path.d\"\n [attr.fill]=\"path.fill\"\n [attr.opacity]=\"path.opacity\"\n [attr.fill-rule]=\"path.fillRule\"\n [attr.stroke]=\"path.stroke\"\n [attr.stroke-width]=\"path.strokeWidth\"\n />\n }\n </svg>\n `,\n host: {\n style: 'display: inline-flex; align-items: center; justify-content: center;'\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class HugeiconsIconComponent {\n // Signal inputs - modern Angular 17.1+ approach\n readonly size = input<string | number>(24);\n readonly strokeWidth = input<number | undefined>(undefined);\n readonly absoluteStrokeWidth = input<boolean>(false);\n readonly icon = input.required<IconSvgObject>();\n readonly altIcon = input<IconSvgObject | undefined>(undefined);\n readonly color = input<string>('currentColor');\n readonly iconClass = input<string>('', { alias: 'class' });\n readonly showAlt = input<boolean>(false);\n\n // Computed signal for reactive path updates\n readonly paths = computed<PathData[]>(() => {\n const currentIcon = this.showAlt() && this.altIcon() ? this.altIcon()! : this.icon();\n\n if (!currentIcon || !Array.isArray(currentIcon)) {\n return [];\n }\n\n const strokeWidthValue = this.strokeWidth();\n const calculatedStrokeWidth = strokeWidthValue !== undefined\n ? (this.absoluteStrokeWidth() \n ? (Number(strokeWidthValue) * 24) / Number(this.size()) \n : strokeWidthValue)\n : undefined;\n\n const strokeProps = calculatedStrokeWidth !== undefined \n ? { strokeWidth: calculatedStrokeWidth, stroke: 'currentColor' } \n : {};\n\n return currentIcon.map(([_, attrs]) => ({\n d: attrs['d'],\n fill: attrs['fill'] || 'none',\n opacity: attrs['opacity'],\n fillRule: attrs['fillRule'],\n ...strokeProps\n }));\n });\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MA0Ca,sBAAsB,CAAA;;AAExB,IAAA,IAAI,GAAG,KAAK,CAAkB,EAAE,CAAC;AACjC,IAAA,WAAW,GAAG,KAAK,CAAqB,SAAS,CAAC;AAClD,IAAA,mBAAmB,GAAG,KAAK,CAAU,KAAK,CAAC;AAC3C,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAiB;AACtC,IAAA,OAAO,GAAG,KAAK,CAA4B,SAAS,CAAC;AACrD,IAAA,KAAK,GAAG,KAAK,CAAS,cAAc,CAAC;IACrC,SAAS,GAAG,KAAK,CAAS,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACjD,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,CAAC;;AAG/B,IAAA,KAAK,GAAG,QAAQ,CAAa,MAAK;QACzC,MAAM,WAAW,GAAG,IAAI,CAAC,OAA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AA,qEAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA3BvB;;;;;;;;;;;;;;;;;;;;;AAqBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAMU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBA9BlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;AAqBT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE;AACR,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC;AAC1C,iBAAA;;;ACzCD;;AAEG;;;;"}
@@ -1,10 +1,26 @@
1
- export type IconSvgObject = readonly (readonly [string, Record<string, any>])[];
1
+ /** SVG path attributes */
2
+ export interface SvgPathAttributes {
3
+ d: string;
4
+ fill?: string;
5
+ opacity?: string;
6
+ fillRule?: 'nonzero' | 'evenodd';
7
+ stroke?: string;
8
+ strokeWidth?: number | string;
9
+ strokeLinecap?: 'butt' | 'round' | 'square';
10
+ strokeLinejoin?: 'miter' | 'round' | 'bevel';
11
+ [key: string]: unknown;
12
+ }
13
+ /** Icon SVG object type - tuple of [element name, attributes] */
14
+ export type IconSvgObject = readonly (readonly [string, SvgPathAttributes])[];
2
15
  export type IconName = string;
16
+ /** Icon style variants */
17
+ export type IconStyle = 'stroke-rounded' | 'stroke-sharp' | 'stroke-standard' | 'solid-rounded' | 'solid-sharp' | 'solid-standard' | 'bulk-rounded' | 'duotone-rounded' | 'duotone-standard' | 'twotone-rounded';
3
18
  export interface IconMetadata {
4
19
  name: IconName;
5
20
  category: string;
6
21
  tags: string[];
7
22
  pack: string;
23
+ style?: IconStyle;
8
24
  }
9
25
  export interface IconData {
10
26
  icon: IconSvgObject;
package/package.json CHANGED
@@ -1,23 +1,42 @@
1
1
  {
2
2
  "name": "@hugeicons/angular",
3
- "version": "1.0.4",
4
- "description": "HugeIcons Pro Angular Component Library https://hugeicons.com",
3
+ "version": "1.0.5",
4
+ "description": "Hugeicons Angular Component Library https://hugeicons.com",
5
5
  "homepage": "https://hugeicons.com",
6
+ "license": "MIT",
6
7
  "type": "module",
7
8
  "main": "./dist/bundles/hugeicons-angular.umd.js",
8
9
  "module": "./dist/fesm2022/hugeicons-angular.mjs",
9
10
  "typings": "./dist/index.d.ts",
10
11
  "sideEffects": false,
11
12
  "files": [
12
- "dist"
13
+ "dist",
14
+ "CHANGELOG.md",
15
+ "LICENSE.md",
16
+ "PRO-LICENSE.md",
17
+ "README.md"
13
18
  ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/hugeicons/angular.git"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/hugeicons/angular/issues"
25
+ },
14
26
  "author": "Hugeicons",
27
+ "scripts": {
28
+ "build": "pnpm clean && ng-packagr -p ng-package.json",
29
+ "clean": "rm -rf dist",
30
+ "test": "ng test",
31
+ "publish:beta": "pnpm build && npm publish --tag beta --no-git-checks",
32
+ "publish:prod": "pnpm build && npm publish --no-git-checks"
33
+ },
15
34
  "dependencies": {
16
35
  "tslib": "^2.6.0"
17
36
  },
18
37
  "peerDependencies": {
19
- "@angular/common": ">=17.0.0 <20.0.0",
20
- "@angular/core": ">=17.0.0 <20.0.0"
38
+ "@angular/common": ">=17.1.0 <21.0.0",
39
+ "@angular/core": ">=17.1.0 <21.0.0"
21
40
  },
22
41
  "devDependencies": {
23
42
  "@angular/common": "^17.0.0",
@@ -29,20 +48,14 @@
29
48
  "typescript": "~5.2.0"
30
49
  },
31
50
  "keywords": [
51
+ "hugeicons",
52
+ "angular",
32
53
  "icons",
33
54
  "angular-icons",
34
- "ui-components",
35
- "design-system",
55
+ "svg-icons",
56
+ "svg",
36
57
  "vector-icons",
37
- "angular-component-library",
38
- "web-icons",
39
- "scalable-icons",
40
- "customizable-icons",
41
- "icon-library"
42
- ],
43
- "scripts": {
44
- "build": "pnpm clean && ng-packagr -p ng-package.json",
45
- "clean": "rm -rf dist",
46
- "test": "ng test"
47
- }
48
- }
58
+ "icon-library",
59
+ "typescript"
60
+ ]
61
+ }