@hugeicons/angular 1.0.2 → 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,105 +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 = 1.5;
9
- icon;
10
- altIcon;
11
- color = 'currentColor';
12
- class = '';
13
- showAlt = false;
14
- paths = [];
15
- ngOnInit() {
16
- this.updatePaths();
17
- }
18
- ngOnChanges(changes) {
19
- this.updatePaths();
20
- }
21
- updatePaths() {
22
- 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();
23
17
  if (!currentIcon || !Array.isArray(currentIcon)) {
24
- this.paths = [];
25
- return;
18
+ return [];
26
19
  }
27
- this.paths = currentIcon.map(([_, attrs]) => ({
20
+ const strokeWidthValue = this.strokeWidth();
21
+ const calculatedStrokeWidth = strokeWidthValue !== undefined
22
+ ? (this.absoluteStrokeWidth()
23
+ ? (Number(strokeWidthValue) * 24) / Number(this.size())
24
+ : strokeWidthValue)
25
+ : undefined;
26
+ const strokeProps = calculatedStrokeWidth !== undefined
27
+ ? { strokeWidth: calculatedStrokeWidth, stroke: 'currentColor' }
28
+ : {};
29
+ return currentIcon.map(([_, attrs]) => ({
28
30
  d: attrs['d'],
29
31
  fill: attrs['fill'] || 'none',
30
32
  opacity: attrs['opacity'],
31
33
  fillRule: attrs['fillRule'],
32
- strokeWidth: attrs['strokeWidth'] || this.strokeWidth
34
+ ...strokeProps
33
35
  }));
34
- }
35
- trackByFn(index) {
36
- return index;
37
- }
36
+ });
38
37
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HugeiconsIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
39
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: HugeiconsIconComponent, isStandalone: true, selector: "hugeicons-icon", inputs: { size: "size", strokeWidth: "strokeWidth", 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: `
40
39
  <svg
41
- [attr.width]="size"
42
- [attr.height]="size"
40
+ [attr.width]="size()"
41
+ [attr.height]="size()"
43
42
  viewBox="0 0 24 24"
44
43
  fill="none"
45
- [attr.color]="color"
46
- [class]="class"
44
+ [attr.color]="color()"
45
+ [class]="iconClass()"
47
46
  xmlns="http://www.w3.org/2000/svg"
48
47
  >
49
- <path
50
- *ngFor="let path of paths; trackBy: trackByFn"
51
- [attr.d]="path.d"
52
- [attr.fill]="path.fill"
53
- [attr.opacity]="path.opacity"
54
- [attr.fill-rule]="path.fillRule"
55
- [attr.stroke-width]="strokeWidth"
56
- />
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
+ }
57
58
  </svg>
58
- `, 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 });
59
60
  }
60
61
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HugeiconsIconComponent, decorators: [{
61
62
  type: Component,
62
63
  args: [{
63
64
  selector: 'hugeicons-icon',
64
65
  standalone: true,
65
- imports: [CommonModule],
66
66
  template: `
67
67
  <svg
68
- [attr.width]="size"
69
- [attr.height]="size"
68
+ [attr.width]="size()"
69
+ [attr.height]="size()"
70
70
  viewBox="0 0 24 24"
71
71
  fill="none"
72
- [attr.color]="color"
73
- [class]="class"
72
+ [attr.color]="color()"
73
+ [class]="iconClass()"
74
74
  xmlns="http://www.w3.org/2000/svg"
75
75
  >
76
- <path
77
- *ngFor="let path of paths; trackBy: trackByFn"
78
- [attr.d]="path.d"
79
- [attr.fill]="path.fill"
80
- [attr.opacity]="path.opacity"
81
- [attr.fill-rule]="path.fillRule"
82
- [attr.stroke-width]="strokeWidth"
83
- />
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
+ }
84
86
  </svg>
85
87
  `,
88
+ host: {
89
+ style: 'display: inline-flex; align-items: center; justify-content: center;'
90
+ },
86
91
  changeDetection: ChangeDetectionStrategy.OnPush
87
92
  }]
88
- }], propDecorators: { size: [{
89
- type: Input
90
- }], strokeWidth: [{
91
- type: Input
92
- }], icon: [{
93
- type: Input
94
- }], altIcon: [{
95
- type: Input
96
- }], color: [{
97
- type: Input
98
- }], class: [{
99
- type: Input
100
- }], showAlt: [{
101
- type: Input
102
- }] } });
93
+ }] });
103
94
 
104
95
  /**
105
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-width]=\"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 = 1.5;\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 }> = [];\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 this.paths = currentIcon.map(([_, attrs]) => ({\n d: attrs['d'],\n fill: attrs['fill'] || 'none',\n opacity: attrs['opacity'],\n fillRule: attrs['fillRule'],\n strokeWidth: attrs['strokeWidth'] || this.strokeWidth\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":";;;;;MA+Ba,sBAAsB,CAAA;IACxB,IAAI,GAAoB,EAAE;IAC1B,WAAW,GAAG,GAAG;AACjB,IAAA,IAAI;AACJ,IAAA,OAAO;IACP,KAAK,GAAG,cAAc;IACtB,KAAK,GAAG,EAAE;IACV,OAAO,GAAG,KAAK;IAExB,KAAK,GAKA,EAAE;IAEP,QAAQ,GAAA;QACN,IAAI,CAAC,WAAW,EAAE;;AAGpB,IAAA,WAAW,CAAC,OAAsB,EAAA;QAChC,IAAI,CAAC,WAAW,EAAE;;IAGZ,WAAW,GAAA;QACjB,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI;QAE3E,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;AAC/C,YAAA,IAAI,CAAC,K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AA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAwBX,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBA3BlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;AAmBT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC;AAC1C,iBAAA;8BAGU,IAAI,EAAA,CAAA;sBAAZ;gBACQ,WAAW,EAAA,CAAA;sBAAnB;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;;;ACtCH;;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,IA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EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,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;
@@ -13,6 +29,7 @@ export interface IconData {
13
29
  export interface HugeiconsProps {
14
30
  size?: string | number;
15
31
  strokeWidth?: number;
32
+ absoluteStrokeWidth?: boolean;
16
33
  icon: IconSvgObject;
17
34
  altIcon?: IconSvgObject;
18
35
  color?: string;
package/package.json CHANGED
@@ -1,23 +1,42 @@
1
1
  {
2
2
  "name": "@hugeicons/angular",
3
- "version": "1.0.2",
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 <19.0.0",
20
- "@angular/core": ">=17.0.0 <19.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
+ }