@skyux/icon 12.0.0-alpha.8 → 12.0.0-beta.0

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.
@@ -33,12 +33,18 @@ class SkyIconHarness extends SkyComponentHarness {
33
33
  if (/^fa-(?=2xs|lg|[2-5]+x)/.test(iconClass)) {
34
34
  return iconClass.replace('fa-', '');
35
35
  }
36
+ else if (/^sky-icon-svg-relative-(?=2xs|lg|[2-5]+x)/.test(iconClass)) {
37
+ return iconClass.replace('sky-icon-svg-relative-', '');
38
+ }
39
+ else if (/^sky-icon-svg-(?=xxxs|xxs|xs|s|m|l|xl|xxl)/.test(iconClass)) {
40
+ return iconClass.replace('sky-icon-svg-', '');
41
+ }
36
42
  }
37
43
  return undefined;
38
44
  }
39
45
  /**
40
46
  * Gets the icon type.
41
- * @deprecated The `iconType` input is no longer used. This method will be removed in a future version.
47
+ * @deprecated The `iconType` input is no longer used. This method will be removed in SKY UX 13.
42
48
  */
43
49
  async getIconType() {
44
50
  return (await this.#getSpecifiedIconInfo()).iconType || 'fa';
@@ -48,13 +54,15 @@ class SkyIconHarness extends SkyComponentHarness {
48
54
  */
49
55
  async getVariant() {
50
56
  const iconInfo = await this.#getSpecifiedIconInfo();
51
- if (iconInfo.iconType === 'skyux') {
57
+ const svgIcon = await this.locatorForOptional('sky-icon-svg')();
58
+ if (svgIcon || iconInfo.iconType === 'skyux') {
52
59
  return iconInfo.variant || 'line';
53
60
  }
54
61
  throw new Error('Variant cannot be determined because variants are only assigned to icons with type `skyux`.');
55
62
  }
56
63
  /**
57
64
  * Whether the icon has fixed width.
65
+ * @deprecated Font Awesome icons are deprecated, and all icons are now fixed width. This method will be removed in SKY UX 13.
58
66
  */
59
67
  async isFixedWidth() {
60
68
  const icon = await this.#getIcon();
@@ -62,9 +70,13 @@ class SkyIconHarness extends SkyComponentHarness {
62
70
  }
63
71
  async #getIcon() {
64
72
  const icon = await this.locatorForOptional('.sky-icon')();
73
+ const svgIcon = await this.locatorForOptional('sky-icon-svg')();
65
74
  if (icon) {
66
75
  return icon;
67
76
  }
77
+ else if (svgIcon) {
78
+ return svgIcon;
79
+ }
68
80
  throw new Error('Icon could not be rendered.');
69
81
  }
70
82
  async #getIconClasses() {
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-icon-testing.mjs","sources":["../../../../../libs/components/icon/testing/src/modules/icon/icon-harness.ts","../../../../../libs/components/icon/testing/src/skyux-icon-testing.ts"],"sourcesContent":["import { HarnessPredicate, TestElement } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyIconHarnessFilters } from './icon-harness-filters';\n\n/**\n * Harness for interacting with an icon component in tests.\n */\nexport class SkyIconHarness extends SkyComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = 'sky-icon';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyIconHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyIconHarnessFilters,\n ): HarnessPredicate<SkyIconHarness> {\n return SkyIconHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the icon name.\n */\n public async getIconName(): Promise<string | undefined> {\n // No need to check for null here since #getIcon() will throw an error when\n // icon name is null.\n return (await this.#getSpecifiedIconInfo()).icon as string;\n }\n\n /**\n * Gets the icon size.\n */\n public async getIconSize(): Promise<string | undefined> {\n const iconClasses = await this.#getIconClasses();\n\n for (const iconClass of iconClasses) {\n // match a class name that starts with `fa-` and follows with `lg`, `2x`, `3x`, `4x`, `5x`\n if (/^fa-(?=2xs|lg|[2-5]+x)/.test(iconClass)) {\n return iconClass.replace('fa-', '');\n }\n }\n\n return undefined;\n }\n\n /**\n * Gets the icon type.\n * @deprecated The `iconType` input is no longer used. This method will be removed in a future version.\n */\n public async getIconType(): Promise<string> {\n return (await this.#getSpecifiedIconInfo()).iconType || 'fa';\n }\n\n /**\n * Gets if the icon is a variant.\n */\n public async getVariant(): Promise<string | undefined> {\n const iconInfo = await this.#getSpecifiedIconInfo();\n\n if (iconInfo.iconType === 'skyux') {\n return iconInfo.variant || 'line';\n }\n\n throw new Error(\n 'Variant cannot be determined because variants are only assigned to icons with type `skyux`.',\n );\n }\n\n /**\n * Whether the icon has fixed width.\n */\n public async isFixedWidth(): Promise<boolean> {\n const icon = await this.#getIcon();\n return await icon.hasClass(`fa-fw`);\n }\n\n async #getIcon(): Promise<TestElement> {\n const icon = await this.locatorForOptional('.sky-icon')();\n\n if (icon) {\n return icon;\n }\n\n throw new Error('Icon could not be rendered.');\n }\n\n async #getIconClasses(): Promise<string[]> {\n const iconClasses = await (await this.#getIcon()).getProperty('classList');\n return Array.from(iconClasses);\n }\n\n async #getSpecifiedIconInfo(): Promise<{\n icon: string | null;\n iconType: string | null;\n variant: string | null;\n }> {\n // Since SKY UX icons have Font Awesome alternatives that may be used\n // in default theme instead of the icon specified by the consumer, we\n // need to get the specified values using data- attributes added by\n // the icon component. This conflicts with the usual pattern of giving\n // the effective state of the component but is necessary in this case.\n const icon = await this.#getIcon();\n\n return {\n icon: await icon.getAttribute('data-sky-icon'),\n iconType: await icon.getAttribute('data-sky-icon-type'),\n variant: await icon.getAttribute('data-sky-icon-variant'),\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAKA;;AAEG;AACG,MAAO,cAAe,SAAQ,mBAAmB,CAAA;AACrD;;AAEG;aACW,IAAY,CAAA,YAAA,GAAG,UAAU,CAAC;AAExC;;;AAGG;IACI,OAAO,IAAI,CAChB,OAA8B,EAAA;AAE9B,QAAA,OAAO,cAAc,CAAC,qBAAqB,CAAC,OAAO,CAAC;;AAGtD;;AAEG;AACI,IAAA,MAAM,WAAW,GAAA;;;QAGtB,OAAO,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAc;;AAG5D;;AAEG;AACI,IAAA,MAAM,WAAW,GAAA;AACtB,QAAA,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,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MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE;QAElC,OAAO;AACL,YAAA,IAAI,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;AAC9C,YAAA,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC;AACvD,YAAA,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC;SAC1D;;;;AC/GL;;AAEG;;;;"}
1
+ {"version":3,"file":"skyux-icon-testing.mjs","sources":["../../../../../libs/components/icon/testing/src/modules/icon/icon-harness.ts","../../../../../libs/components/icon/testing/src/skyux-icon-testing.ts"],"sourcesContent":["import { HarnessPredicate, TestElement } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyIconHarnessFilters } from './icon-harness-filters';\n\n/**\n * Harness for interacting with an icon component in tests.\n */\nexport class SkyIconHarness extends SkyComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = 'sky-icon';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyIconHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyIconHarnessFilters,\n ): HarnessPredicate<SkyIconHarness> {\n return SkyIconHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the icon name.\n */\n public async getIconName(): Promise<string | undefined> {\n // No need to check for null here since #getIcon() will throw an error when\n // icon name is null.\n return (await this.#getSpecifiedIconInfo()).icon as string;\n }\n\n /**\n * Gets the icon size.\n */\n public async getIconSize(): Promise<string | undefined> {\n const iconClasses = await this.#getIconClasses();\n\n for (const iconClass of iconClasses) {\n // match a class name that starts with `fa-` and follows with `lg`, `2x`, `3x`, `4x`, `5x`\n if (/^fa-(?=2xs|lg|[2-5]+x)/.test(iconClass)) {\n return iconClass.replace('fa-', '');\n } else if (/^sky-icon-svg-relative-(?=2xs|lg|[2-5]+x)/.test(iconClass)) {\n return iconClass.replace('sky-icon-svg-relative-', '');\n } else if (/^sky-icon-svg-(?=xxxs|xxs|xs|s|m|l|xl|xxl)/.test(iconClass)) {\n return iconClass.replace('sky-icon-svg-', '');\n }\n }\n return undefined;\n }\n\n /**\n * Gets the icon type.\n * @deprecated The `iconType` input is no longer used. This method will be removed in SKY UX 13.\n */\n public async getIconType(): Promise<string> {\n return (await this.#getSpecifiedIconInfo()).iconType || 'fa';\n }\n\n /**\n * Gets if the icon is a variant.\n */\n public async getVariant(): Promise<string | undefined> {\n const iconInfo = await this.#getSpecifiedIconInfo();\n const svgIcon = await this.locatorForOptional('sky-icon-svg')();\n\n if (svgIcon || iconInfo.iconType === 'skyux') {\n return iconInfo.variant || 'line';\n }\n\n throw new Error(\n 'Variant cannot be determined because variants are only assigned to icons with type `skyux`.',\n );\n }\n\n /**\n * Whether the icon has fixed width.\n * @deprecated Font Awesome icons are deprecated, and all icons are now fixed width. This method will be removed in SKY UX 13.\n */\n public async isFixedWidth(): Promise<boolean> {\n const icon = await this.#getIcon();\n return await icon.hasClass(`fa-fw`);\n }\n\n async #getIcon(): Promise<TestElement> {\n const icon = await this.locatorForOptional('.sky-icon')();\n const svgIcon = await this.locatorForOptional('sky-icon-svg')();\n\n if (icon) {\n return icon;\n } else if (svgIcon) {\n return svgIcon;\n }\n\n throw new Error('Icon could not be rendered.');\n }\n\n async #getIconClasses(): Promise<string[]> {\n const iconClasses = await (await this.#getIcon()).getProperty('classList');\n return Array.from(iconClasses);\n }\n\n async #getSpecifiedIconInfo(): Promise<{\n icon: string | null;\n iconType: string | null;\n variant: string | null;\n }> {\n // Since SKY UX icons have Font Awesome alternatives that may be used\n // in default theme instead of the icon specified by the consumer, we\n // need to get the specified values using data- attributes added by\n // the icon component. This conflicts with the usual pattern of giving\n // the effective state of the component but is necessary in this case.\n const icon = await this.#getIcon();\n\n return {\n icon: await icon.getAttribute('data-sky-icon'),\n iconType: await icon.getAttribute('data-sky-icon-type'),\n variant: await icon.getAttribute('data-sky-icon-variant'),\n };\n }\n}\n","/**\n * Generated bund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}
@@ -1,8 +1,9 @@
1
- import * as i1 from '@angular/common';
2
- import { NgClass, CommonModule } from '@angular/common';
1
+ import * as i1$1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, Injectable, Pipe, Component, Input, input, computed, ChangeDetectionStrategy, NgModule } from '@angular/core';
5
- import { SkyThemeIconManifestService, SkyThemeService } from '@skyux/theme';
4
+ import { inject, Injectable, Pipe, input, computed, Component, Input, ChangeDetectionStrategy, NgModule } from '@angular/core';
5
+ import * as i1 from '@skyux/theme';
6
+ import { SkyThemeIconManifestService, SkyThemeComponentClassDirective, SkyThemeService } from '@skyux/theme';
6
7
  import { toSignal, toObservable } from '@angular/core/rxjs-interop';
7
8
  import { switchMap, catchError, of } from 'rxjs';
8
9
 
@@ -72,10 +73,10 @@ class SkyIconResolverService {
72
73
  iconType,
73
74
  };
74
75
  }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
76
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconResolverService, providedIn: 'root' }); }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
77
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconResolverService, providedIn: 'root' }); }
77
78
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconResolverService, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconResolverService, decorators: [{
79
80
  type: Injectable,
80
81
  args: [{
81
82
  providedIn: 'root',
@@ -104,10 +105,10 @@ class SkyIconClassListPipe {
104
105
  }
105
106
  return classList;
106
107
  }
107
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconClassListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
108
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyIconClassListPipe, isStandalone: false, name: "skyIconClassList" }); }
108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconClassListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
109
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: SkyIconClassListPipe, isStandalone: false, name: "skyIconClassList" }); }
109
110
  }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconClassListPipe, decorators: [{
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconClassListPipe, decorators: [{
111
112
  type: Pipe,
112
113
  args: [{
113
114
  name: 'skyIconClassList',
@@ -115,29 +116,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
115
116
  }]
116
117
  }] });
117
118
 
118
- /**
119
- * @internal
120
- */
121
- class SkyIconStackComponent {
122
- constructor() {
123
- this.themeSvc = inject(SkyThemeService, { optional: true });
124
- }
125
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
126
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyIconStackComponent, isStandalone: false, selector: "sky-icon-stack", inputs: { size: "size", baseIcon: "baseIcon", topIcon: "topIcon" }, ngImport: i0, template: "<span\n aria-hidden=\"true\"\n class=\"sky-icon-stack fa-stack\"\n [ngClass]=\"size ? 'fa-' + size + ' sky-icon-stack-size-' + size : ''\"\n>\n @if (baseIcon) {\n <i\n class=\"sky-icon fa-stack-2x\"\n [ngClass]=\"\n baseIcon.icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n \"\n ></i>\n }\n @if (topIcon) {\n <i\n class=\"sky-icon fa-stack-1x fa-inverse sky-icon-inverse\"\n [ngClass]=\"\n topIcon.icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n \"\n ></i>\n }\n</span>\n", styles: [":host{display:inline-block;vertical-align:bottom}.sky-icon-stack-size-xs.fa-stack{width:1.25em;height:1.25em;line-height:1.25em}.sky-icon-stack-size-xs .fa-stack-2x{font-size:1.25em}.sky-icon-stack-size-xs .fa-stack-1x{font-size:.625em}.fa-stack-1x.sky-i-check:before{position:relative;top:.5px}.fa-stack-1x.sky-i-exclamation:before{position:relative;top:1.5px}.sky-icon-inverse{color:var(--sky-icon-stack-top-icon-color-override, #ffffff)}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-icon-inverse{color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-icon-inverse{color:#121212}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: SkyIconClassListPipe, name: "skyIconClassList" }] }); }
127
- }
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconStackComponent, decorators: [{
129
- type: Component,
130
- args: [{ selector: 'sky-icon-stack', standalone: false, template: "<span\n aria-hidden=\"true\"\n class=\"sky-icon-stack fa-stack\"\n [ngClass]=\"size ? 'fa-' + size + ' sky-icon-stack-size-' + size : ''\"\n>\n @if (baseIcon) {\n <i\n class=\"sky-icon fa-stack-2x\"\n [ngClass]=\"\n baseIcon.icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n \"\n ></i>\n }\n @if (topIcon) {\n <i\n class=\"sky-icon fa-stack-1x fa-inverse sky-icon-inverse\"\n [ngClass]=\"\n topIcon.icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n \"\n ></i>\n }\n</span>\n", styles: [":host{display:inline-block;vertical-align:bottom}.sky-icon-stack-size-xs.fa-stack{width:1.25em;height:1.25em;line-height:1.25em}.sky-icon-stack-size-xs .fa-stack-2x{font-size:1.25em}.sky-icon-stack-size-xs .fa-stack-1x{font-size:.625em}.fa-stack-1x.sky-i-check:before{position:relative;top:.5px}.fa-stack-1x.sky-i-exclamation:before{position:relative;top:1.5px}.sky-icon-inverse{color:var(--sky-icon-stack-top-icon-color-override, #ffffff)}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-icon-inverse{color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-icon-inverse{color:#121212}\n"] }]
131
- }], propDecorators: { size: [{
132
- type: Input
133
- }], baseIcon: [{
134
- type: Input
135
- }], topIcon: [{
136
- type: Input
137
- }] } });
138
-
139
119
  async function getIconMap() {
140
120
  const response = await fetch(`https://sky.blackbaudcdn.net/static/skyux-icons/7/assets/svg/skyux-icons.svg`);
121
+ /* istanbul ignore next */
141
122
  if (!response.ok) {
142
123
  throw new Error('Icon sprite could not be loaded.');
143
124
  }
@@ -190,16 +171,16 @@ function getNearestSize(iconMap, name, pixelSize) {
190
171
  }
191
172
  return undefined;
192
173
  }
174
+ let iconMapPromise;
193
175
  /**
194
176
  * @internal
195
177
  */
196
178
  class SkyIconSvgResolverService {
197
- #iconMapPromise;
198
179
  async resolveHref(name, pixelSize = 16, variant = 'line') {
199
- if (!this.#iconMapPromise) {
200
- this.#iconMapPromise = getIconMap();
180
+ if (!iconMapPromise) {
181
+ iconMapPromise = getIconMap();
201
182
  }
202
- const iconMap = await this.#iconMapPromise;
183
+ const iconMap = await iconMapPromise;
203
184
  let href = `#sky-i-${name}`;
204
185
  // Find the icon with the optimal size nearest to the requested size.
205
186
  const nearestSize = getNearestSize(iconMap, name, pixelSize);
@@ -209,10 +190,10 @@ class SkyIconSvgResolverService {
209
190
  href = `${href}-${nearestSize}-${variant}`;
210
191
  return href;
211
192
  }
212
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconSvgResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
213
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconSvgResolverService, providedIn: 'root' }); }
193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconSvgResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
194
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconSvgResolverService, providedIn: 'root' }); }
214
195
  }
215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconSvgResolverService, decorators: [{
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconSvgResolverService, decorators: [{
216
197
  type: Injectable,
217
198
  args: [{
218
199
  providedIn: 'root',
@@ -220,14 +201,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
220
201
  }] });
221
202
 
222
203
  const SIZE_BASE = 16;
223
- const SIZES = new Map([
224
- ['', SIZE_BASE],
204
+ const RELATIVE_SIZES = new Map([
205
+ ['md', SIZE_BASE],
225
206
  ['lg', 21.333 /* SIZE_BASE * (4/3) */],
226
207
  ['2x', 32 /* SIZE_BASE * 2 */],
227
208
  ['3x', 48 /* SIZE_BASE * 3 */],
228
209
  ['4x', 64 /* SIZE_BASE * 4 */],
229
210
  ['5x', 80 /* SIZE_BASE * 5 */],
230
211
  ]);
212
+ const FIXED_SIZES = new Map([
213
+ ['s', SIZE_BASE],
214
+ ['m', 20],
215
+ ['l', 24],
216
+ ['xl', 32],
217
+ ]);
218
+ function defaultSize(value) {
219
+ return value ?? 'm';
220
+ }
231
221
  /**
232
222
  * @internal
233
223
  */
@@ -235,37 +225,50 @@ class SkyIconSvgComponent {
235
225
  constructor() {
236
226
  this.#resolverSvc = inject(SkyIconSvgResolverService);
237
227
  this.iconName = input.required();
238
- this.iconSize = input();
228
+ this.iconSize = input('m', {
229
+ transform: defaultSize,
230
+ });
231
+ this.relativeSize = input();
239
232
  this.iconVariant = input();
240
233
  this.#iconInfo = computed(() => {
241
234
  return {
242
235
  src: this.iconName(),
243
- size: this.iconSize(),
236
+ relativeSize: this.relativeSize(),
237
+ iconSize: this.iconSize(),
244
238
  variant: this.iconVariant(),
245
239
  };
246
240
  });
247
- this.iconHref = toSignal(toObservable(this.#iconInfo).pipe(switchMap((info) => this.#resolverSvc.resolveHref(info.src, SIZES.get(info.size ?? ''), info.variant)), catchError(() => of(''))));
241
+ this.iconHref = toSignal(toObservable(this.#iconInfo).pipe(switchMap((info) => this.#resolverSvc.resolveHref(info.src, info.relativeSize !== undefined
242
+ ? RELATIVE_SIZES.get(info.relativeSize)
243
+ : FIXED_SIZES.get(info.iconSize), info.variant)), catchError(() => of(''))));
248
244
  }
249
245
  #resolverSvc;
250
246
  #iconInfo;
251
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
252
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SkyIconSvgComponent, isStandalone: true, selector: "sky-icon-svg", inputs: { iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: true, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconVariant: { classPropertyName: "iconVariant", publicName: "iconVariant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<svg\n aria-hidden=\"true\"\n class=\"sky-icon-svg-img\"\n [ngClass]=\"iconSize() && 'sky-icon-svg-img-' + iconSize()\"\n [attr.data-sky-icon]=\"iconName()\"\n [attr.data-sky-icon-variant]=\"iconVariant()\"\n>\n <use [attr.xlink:href]=\"iconHref()\" />\n</svg>\n", styles: [":host{display:inline-block;--sky-icon-svg-img-size: 1em;--sky-icon-svg-img-top: .15em}.sky-icon-svg-img{display:inline-block;fill:var(--sky-icon-svg-color-input, currentColor);height:var(--sky-icon-svg-img-size);width:var(--sky-icon-svg-img-size);text-align:center;position:relative;top:var(--sky-icon-svg-img-top)}.sky-icon-svg-img-lg{--sky-icon-svg-img-size: 1.333em;--sky-icon-svg-img-top: .2em}.sky-icon-svg-img-2x{--sky-icon-svg-img-size: 2em;--sky-icon-svg-img-top: .3em}.sky-icon-svg-img-3x{--sky-icon-svg-img-size: 3em;--sky-icon-svg-img-top: .45em}.sky-icon-svg-img-4x{--sky-icon-svg-img-size: 4em;--sky-icon-svg-img-top: .6em}.sky-icon-svg-img-5x{--sky-icon-svg-img-size: 5em;--sky-icon-svg-img-top: .75em}\n", ":host{display:inline-block;--sky-icon-svg-img-size: 1em;--sky-icon-svg-img-top: .15em}.sky-icon-svg-img{display:inline-block;fill:var(--sky-icon-svg-color-input, currentColor);height:var(--sky-icon-svg-img-size);width:var(--sky-icon-svg-img-size);text-align:center;position:relative;top:var(--sky-icon-svg-img-top)}.sky-icon-svg-img-lg{--sky-icon-svg-img-size: 1.333em;--sky-icon-svg-img-top: .2em}.sky-icon-svg-img-2x{--sky-icon-svg-img-size: 2em;--sky-icon-svg-img-top: .3em}.sky-icon-svg-img-3x{--sky-icon-svg-img-size: 3em;--sky-icon-svg-img-top: .45em}.sky-icon-svg-img-4x{--sky-icon-svg-img-size: 4em;--sky-icon-svg-img-top: .6em}.sky-icon-svg-img-5x{--sky-icon-svg-img-size: 5em;--sky-icon-svg-img-top: .75em}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
247
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
248
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: SkyIconSvgComponent, isStandalone: true, selector: "sky-icon-svg", inputs: { iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: true, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, relativeSize: { classPropertyName: "relativeSize", publicName: "relativeSize", isSignal: true, isRequired: false, transformFunction: null }, iconVariant: { classPropertyName: "iconVariant", publicName: "iconVariant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "relativeSize() ? \"sky-icon-svg-relative-\" + relativeSize() : \"sky-icon-svg-\" + iconSize()" } }, hostDirectives: [{ directive: i1.SkyThemeComponentClassDirective }], ngImport: i0, template: "<div class=\"sky-icon-svg-container\">\n <svg\n aria-hidden=\"true\"\n class=\"sky-icon-svg-img\"\n [attr.data-sky-icon]=\"iconName()\"\n [attr.data-sky-icon-variant]=\"iconVariant()\"\n >\n <use [attr.xlink:href]=\"iconHref()\" />\n </svg>\n</div>\n", styles: ["@charset \"UTF-8\";:host.sky-cmp-theme-default{--sky-override-sky-icon-svg-size-xxxs: 4px;--sky-override-sky-icon-svg-size-xxs: 8px;--sky-override-sky-icon-svg-size-xs: 12px;--sky-override-sky-icon-svg-size-s: 16px;--sky-override-sky-icon-svg-size-m: 20px;--sky-override-sky-icon-svg-size-l: 24px;--sky-override-sky-icon-svg-size-xl: 32px;--sky-override-sky-icon-svg-size-xxl: 40px;--sky-override-sky-icon-svg-size-xxxl: 48px}:host{display:inline-flex;--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-s, var(--sky-size-icon-s) )}:host.sky-icon-svg-relative-md{--sky-icon-svg-img-size: 1em}:host.sky-icon-svg-relative-lg .sky-icon-svg-img{transform:scale(1.33)}:host.sky-icon-svg-relative-lg .sky-icon-svg-container{margin:0 .166em}:host.sky-icon-svg-relative-2x{--sky-icon-svg-img-size: 2em}:host.sky-icon-svg-relative-3x{--sky-icon-svg-img-size: 3em}:host.sky-icon-svg-relative-4x{--sky-icon-svg-img-size: 4em}:host.sky-icon-svg-relative-5x{--sky-icon-svg-img-size: 5em}:host.sky-icon-svg-xxxs{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxxs, var(--sky-size-icon-xxxs) )}:host.sky-icon-svg-xxs{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxs, var(--sky-size-icon-xxs) )}:host.sky-icon-svg-xs{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xs, var(--sky-size-icon-xs) )}:host.sky-icon-svg-m{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-m, var(--sky-size-icon-m) )}:host.sky-icon-svg-l{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-l, var(--sky-size-icon-l) )}:host.sky-icon-svg-xl{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xl, var(--sky-size-icon-xl) )}:host.sky-icon-svg-xxl{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxl, var(--sky-size-icon-xxl) )}:host.sky-icon-svg-xxxl{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxxl, var(--sky-size-icon-xxxl) )}.sky-icon-svg-container{height:var(--sky-icon-svg-img-size);width:var(--sky-icon-svg-img-size);display:inline-flex;align-items:center}.sky-icon-svg-container:before{content:\"\\200b\"}.sky-icon-svg-container svg{height:100%;width:100%;fill:currentColor}\n"] }); }
253
249
  }
254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconSvgComponent, decorators: [{
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconSvgComponent, decorators: [{
255
251
  type: Component,
256
- args: [{ selector: 'sky-icon-svg', imports: [NgClass], template: "<svg\n aria-hidden=\"true\"\n class=\"sky-icon-svg-img\"\n [ngClass]=\"iconSize() && 'sky-icon-svg-img-' + iconSize()\"\n [attr.data-sky-icon]=\"iconName()\"\n [attr.data-sky-icon-variant]=\"iconVariant()\"\n>\n <use [attr.xlink:href]=\"iconHref()\" />\n</svg>\n", styles: [":host{display:inline-block;--sky-icon-svg-img-size: 1em;--sky-icon-svg-img-top: .15em}.sky-icon-svg-img{display:inline-block;fill:var(--sky-icon-svg-color-input, currentColor);height:var(--sky-icon-svg-img-size);width:var(--sky-icon-svg-img-size);text-align:center;position:relative;top:var(--sky-icon-svg-img-top)}.sky-icon-svg-img-lg{--sky-icon-svg-img-size: 1.333em;--sky-icon-svg-img-top: .2em}.sky-icon-svg-img-2x{--sky-icon-svg-img-size: 2em;--sky-icon-svg-img-top: .3em}.sky-icon-svg-img-3x{--sky-icon-svg-img-size: 3em;--sky-icon-svg-img-top: .45em}.sky-icon-svg-img-4x{--sky-icon-svg-img-size: 4em;--sky-icon-svg-img-top: .6em}.sky-icon-svg-img-5x{--sky-icon-svg-img-size: 5em;--sky-icon-svg-img-top: .75em}\n", ":host{display:inline-block;--sky-icon-svg-img-size: 1em;--sky-icon-svg-img-top: .15em}.sky-icon-svg-img{display:inline-block;fill:var(--sky-icon-svg-color-input, currentColor);height:var(--sky-icon-svg-img-size);width:var(--sky-icon-svg-img-size);text-align:center;position:relative;top:var(--sky-icon-svg-img-top)}.sky-icon-svg-img-lg{--sky-icon-svg-img-size: 1.333em;--sky-icon-svg-img-top: .2em}.sky-icon-svg-img-2x{--sky-icon-svg-img-size: 2em;--sky-icon-svg-img-top: .3em}.sky-icon-svg-img-3x{--sky-icon-svg-img-size: 3em;--sky-icon-svg-img-top: .45em}.sky-icon-svg-img-4x{--sky-icon-svg-img-size: 4em;--sky-icon-svg-img-top: .6em}.sky-icon-svg-img-5x{--sky-icon-svg-img-size: 5em;--sky-icon-svg-img-top: .75em}\n"] }]
252
+ args: [{ selector: 'sky-icon-svg', host: {
253
+ '[class]': 'relativeSize() ? "sky-icon-svg-relative-" + relativeSize() : "sky-icon-svg-" + iconSize()',
254
+ }, hostDirectives: [SkyThemeComponentClassDirective], template: "<div class=\"sky-icon-svg-container\">\n <svg\n aria-hidden=\"true\"\n class=\"sky-icon-svg-img\"\n [attr.data-sky-icon]=\"iconName()\"\n [attr.data-sky-icon-variant]=\"iconVariant()\"\n >\n <use [attr.xlink:href]=\"iconHref()\" />\n </svg>\n</div>\n", styles: ["@charset \"UTF-8\";:host.sky-cmp-theme-default{--sky-override-sky-icon-svg-size-xxxs: 4px;--sky-override-sky-icon-svg-size-xxs: 8px;--sky-override-sky-icon-svg-size-xs: 12px;--sky-override-sky-icon-svg-size-s: 16px;--sky-override-sky-icon-svg-size-m: 20px;--sky-override-sky-icon-svg-size-l: 24px;--sky-override-sky-icon-svg-size-xl: 32px;--sky-override-sky-icon-svg-size-xxl: 40px;--sky-override-sky-icon-svg-size-xxxl: 48px}:host{display:inline-flex;--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-s, var(--sky-size-icon-s) )}:host.sky-icon-svg-relative-md{--sky-icon-svg-img-size: 1em}:host.sky-icon-svg-relative-lg .sky-icon-svg-img{transform:scale(1.33)}:host.sky-icon-svg-relative-lg .sky-icon-svg-container{margin:0 .166em}:host.sky-icon-svg-relative-2x{--sky-icon-svg-img-size: 2em}:host.sky-icon-svg-relative-3x{--sky-icon-svg-img-size: 3em}:host.sky-icon-svg-relative-4x{--sky-icon-svg-img-size: 4em}:host.sky-icon-svg-relative-5x{--sky-icon-svg-img-size: 5em}:host.sky-icon-svg-xxxs{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxxs, var(--sky-size-icon-xxxs) )}:host.sky-icon-svg-xxs{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxs, var(--sky-size-icon-xxs) )}:host.sky-icon-svg-xs{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xs, var(--sky-size-icon-xs) )}:host.sky-icon-svg-m{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-m, var(--sky-size-icon-m) )}:host.sky-icon-svg-l{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-l, var(--sky-size-icon-l) )}:host.sky-icon-svg-xl{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xl, var(--sky-size-icon-xl) )}:host.sky-icon-svg-xxl{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxl, var(--sky-size-icon-xxl) )}:host.sky-icon-svg-xxxl{--sky-icon-svg-img-size: var( --sky-override-sky-icon-svg-size-xxxl, var(--sky-size-icon-xxxl) )}.sky-icon-svg-container{height:var(--sky-icon-svg-img-size);width:var(--sky-icon-svg-img-size);display:inline-flex;align-items:center}.sky-icon-svg-container:before{content:\"\\200b\"}.sky-icon-svg-container svg{height:100%;width:100%;fill:currentColor}\n"] }]
257
255
  }] });
258
256
 
259
257
  class SkyIconComponent {
260
258
  constructor() {
259
+ /**
260
+ * The icon size. Size is independent of font size.
261
+ * @default "m"
262
+ */
263
+ this.iconSize = input();
261
264
  this.themeSvc = inject(SkyThemeService, { optional: true });
262
265
  }
263
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
264
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyIconComponent, isStandalone: false, selector: "sky-icon", inputs: { icon: "icon", iconName: "iconName", iconType: "iconType", size: "size", fixedWidth: "fixedWidth", variant: "variant" }, ngImport: i0, template: "@if (iconName) {\n <sky-icon-svg\n [iconName]=\"iconName\"\n [iconSize]=\"size\"\n [iconVariant]=\"variant\"\n />\n} @else if (icon) {\n <i\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [attr.data-sky-icon]=\"icon\"\n [attr.data-sky-icon-type]=\"iconType\"\n [attr.data-sky-icon-variant]=\"variant\"\n [ngClass]=\"\n icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n : size\n : fixedWidth\n : variant\n \"\n ></i>\n}\n", styles: [":host{display:inline-block}i{display:inherit}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SkyIconSvgComponent, selector: "sky-icon-svg", inputs: ["iconName", "iconSize", "iconVariant"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: SkyIconClassListPipe, name: "skyIconClassList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
266
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
267
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: SkyIconComponent, isStandalone: false, selector: "sky-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: false, isRequired: false, transformFunction: null }, iconType: { classPropertyName: "iconType", publicName: "iconType", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, fixedWidth: { classPropertyName: "fixedWidth", publicName: "fixedWidth", isSignal: false, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: false, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (iconName) {\n <sky-icon-svg\n [iconName]=\"iconName\"\n [relativeSize]=\"size\"\n [iconSize]=\"iconSize()\"\n [iconVariant]=\"variant\"\n [attr.data-sky-icon]=\"iconName\"\n [attr.data-sky-icon-variant]=\"variant\"\n />\n} @else if (icon) {\n <i\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [attr.data-sky-icon]=\"icon\"\n [attr.data-sky-icon-type]=\"iconType\"\n [attr.data-sky-icon-variant]=\"variant\"\n [ngClass]=\"\n icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n : size\n : fixedWidth\n : variant\n \"\n ></i>\n}\n", styles: [":host{display:inline-flex}i{display:inherit}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SkyIconSvgComponent, selector: "sky-icon-svg", inputs: ["iconName", "iconSize", "relativeSize", "iconVariant"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: SkyIconClassListPipe, name: "skyIconClassList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
265
268
  }
266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconComponent, decorators: [{
269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconComponent, decorators: [{
267
270
  type: Component,
268
- args: [{ selector: 'sky-icon', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (iconName) {\n <sky-icon-svg\n [iconName]=\"iconName\"\n [iconSize]=\"size\"\n [iconVariant]=\"variant\"\n />\n} @else if (icon) {\n <i\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [attr.data-sky-icon]=\"icon\"\n [attr.data-sky-icon-type]=\"iconType\"\n [attr.data-sky-icon-variant]=\"variant\"\n [ngClass]=\"\n icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n : size\n : fixedWidth\n : variant\n \"\n ></i>\n}\n", styles: [":host{display:inline-block}i{display:inherit}\n"] }]
271
+ args: [{ selector: 'sky-icon', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (iconName) {\n <sky-icon-svg\n [iconName]=\"iconName\"\n [relativeSize]=\"size\"\n [iconSize]=\"iconSize()\"\n [iconVariant]=\"variant\"\n [attr.data-sky-icon]=\"iconName\"\n [attr.data-sky-icon-variant]=\"variant\"\n />\n} @else if (icon) {\n <i\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [attr.data-sky-icon]=\"icon\"\n [attr.data-sky-icon-type]=\"iconType\"\n [attr.data-sky-icon-variant]=\"variant\"\n [ngClass]=\"\n icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n : size\n : fixedWidth\n : variant\n \"\n ></i>\n}\n", styles: [":host{display:inline-flex}i{display:inherit}\n"] }]
269
272
  }], propDecorators: { icon: [{
270
273
  type: Input
271
274
  }], iconName: [{
@@ -281,16 +284,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
281
284
  }] } });
282
285
 
283
286
  class SkyIconModule {
284
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
285
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyIconModule, declarations: [SkyIconClassListPipe, SkyIconComponent, SkyIconStackComponent], imports: [CommonModule, SkyIconSvgComponent], exports: [SkyIconComponent, SkyIconStackComponent] }); }
286
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconModule, imports: [CommonModule] }); }
287
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
288
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: SkyIconModule, declarations: [SkyIconClassListPipe, SkyIconComponent], imports: [CommonModule, SkyIconSvgComponent], exports: [SkyIconComponent] }); }
289
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconModule, imports: [CommonModule] }); }
287
290
  }
288
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyIconModule, decorators: [{
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyIconModule, decorators: [{
289
292
  type: NgModule,
290
293
  args: [{
291
- declarations: [SkyIconClassListPipe, SkyIconComponent, SkyIconStackComponent],
294
+ declarations: [SkyIconClassListPipe, SkyIconComponent],
292
295
  imports: [CommonModule, SkyIconSvgComponent],
293
- exports: [SkyIconComponent, SkyIconStackComponent],
296
+ exports: [SkyIconComponent],
294
297
  }]
295
298
  }] });
296
299
 
@@ -298,5 +301,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
298
301
  * Generated bundle index. Do not edit.
299
302
  */
300
303
 
301
- export { SkyIconModule, SkyIconComponent as λ1, SkyIconStackComponent as λ2 };
304
+ export { SkyIconModule, SkyIconSvgResolverService, SkyIconComponent as λ1 };
302
305
  //# sourceMappingURL=skyux-icon.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-icon.mjs","sources":["../../../../../libs/components/icon/src/lib/modules/icon/icon-resolver.service.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-class-list.pipe.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-stack.component.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-stack.component.html","../../../../../libs/components/icon/src/lib/modules/icon/icon-svg-resolver.service.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-svg.component.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-svg.component.html","../../../../../libs/components/icon/src/lib/modules/icon/icon.component.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon.component.html","../../../../../libs/components/icon/src/lib/modules/icon/icon.module.ts","../../../../../libs/components/icon/src/skyux-icon.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport {\n SkyThemeIconManifestGlyph,\n SkyThemeIconManifestService,\n SkyThemeSettings,\n} from '@skyux/theme';\n\nimport { SkyIconResolved } from './types/icon-resolved';\nimport type { SkyIconVariantType } from './types/icon-variant-type';\n\n/**\n * @internal\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyIconResolverService {\n #glyphMap = new Map<string, SkyThemeIconManifestGlyph>();\n\n #manifestSvc = inject(SkyThemeIconManifestService);\n\n constructor() {\n // Map the icons by name for more efficient lookup.\n for (const glyph of this.#manifestSvc.getManifest().glyphs) {\n // TODO: keep this until `faName` is removed just in case any icons get added with the wrong shape\n if (glyph.faName && !glyph.faNames) {\n glyph.faNames = [glyph.faName];\n }\n this.#glyphMap.set(glyph.name, glyph);\n }\n }\n\n public resolveIcon(\n icon: string,\n variant?: SkyIconVariantType,\n themeSettings?: SkyThemeSettings,\n ): SkyIconResolved {\n let iconType = 'fa';\n const variantIcon = variant && `${icon}-${variant}`;\n const lineIcon = `${icon}-line`;\n\n // Get the specified variant, or fall back to the icon name.\n // If the pure icon name doesn't exist, try the line variant.\n let glyph =\n this.#glyphMap.get(variantIcon as string) ??\n this.#glyphMap.get(icon) ??\n this.#glyphMap.get(lineIcon) ??\n Array.from(this.#glyphMap.values()).find(\n (glyph) =>\n glyph.aliases?.includes(variantIcon as string) ||\n glyph.aliases?.includes(lineIcon) ||\n glyph.aliases?.includes(icon),\n );\n\n // If still no icon is found, search through the icons that match the FA name.\n if (!glyph) {\n let glyphs = Array.from(this.#glyphMap.values()).filter((g) =>\n g.faNames?.includes(icon),\n );\n if (glyphs.length) {\n if (glyphs.length > 1) {\n // If multiples are found, make sure we select the correct variant, if requested.\n // The icons are ordered such that the \"default\" variant will be the first one.\n if (variant) {\n const variantGlyph = glyphs.find((g) => g.name.endsWith(variant));\n if (variantGlyph) {\n glyphs = [variantGlyph];\n }\n }\n }\n glyph = glyphs[0];\n }\n // If none of the above works, no matching icon was found\n }\n\n if (glyph) {\n // If a glyph is found, use it for modern theme or if no FA fallback exists.\n if (themeSettings?.theme.name === 'modern' || !glyph.faNames?.length) {\n icon = glyph.name;\n iconType = 'skyux';\n } else {\n // For default theme, use a known FA fallback.\n // If the icon name requested is already a FA icon, just use it. Otherwise use the first one.\n if (!glyph.faNames?.includes(icon)) {\n icon = glyph.faNames[0];\n }\n }\n }\n\n // If no SKY UX glyph is found, assume icon is part of FA and pass it along.\n return {\n icon,\n iconType,\n };\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { SkyThemeSettings } from '@skyux/theme';\n\nimport { SkyIconResolverService } from './icon-resolver.service';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\n/**\n * @internal\n */\n@Pipe({\n name: 'skyIconClassList',\n standalone: false,\n})\nexport class SkyIconClassListPipe implements PipeTransform {\n #resolver = inject(SkyIconResolverService);\n\n public transform(\n icon: string,\n themeSettings?: SkyThemeSettings,\n size?: string,\n fixedWidth?: boolean,\n variant?: SkyIconVariantType,\n ): string[] {\n let classList: string[];\n\n const { icon: resolvedIcon, iconType: resolvedIconType } =\n this.#resolver.resolveIcon(icon, variant, themeSettings);\n\n if (resolvedIconType === 'skyux') {\n classList = ['sky-i-' + resolvedIcon];\n } else {\n classList = ['fa', 'fa-' + resolvedIcon];\n }\n\n if (size) {\n classList.push('fa-' + size);\n }\n\n if (fixedWidth) {\n classList.push('fa-fw');\n }\n\n return classList;\n }\n}\n","import { Component, Input, inject } from '@angular/core';\nimport { SkyThemeService } from '@skyux/theme';\n\nimport { SkyIconStackItem } from './icon-stack-item';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-icon-stack',\n templateUrl: './icon-stack.component.html',\n styleUrls: ['./icon-stack.component.scss'],\n standalone: false,\n})\nexport class SkyIconStackComponent {\n /**\n * The size of the icon using\n * [Font Awesome sizes](https://fontawesome.com/v4/examples/).\n */\n @Input()\n public size: string | undefined;\n\n /**\n * The icon to display at the bottom of the stack.\n */\n @Input()\n public baseIcon: SkyIconStackItem | undefined;\n\n /**\n * The icon to display at the top of the stack.\n */\n @Input()\n public topIcon: SkyIconStackItem | undefined;\n\n protected themeSvc = inject(SkyThemeService, { optional: true });\n}\n","<span\n aria-hidden=\"true\"\n class=\"sky-icon-stack fa-stack\"\n [ngClass]=\"size ? 'fa-' + size + ' sky-icon-stack-size-' + size : ''\"\n>\n @if (baseIcon) {\n <i\n class=\"sky-icon fa-stack-2x\"\n [ngClass]=\"\n baseIcon.icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n \"\n ></i>\n }\n @if (topIcon) {\n <i\n class=\"sky-icon fa-stack-1x fa-inverse sky-icon-inverse\"\n [ngClass]=\"\n topIcon.icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n \"\n ></i>\n }\n</span>\n","import { Injectable } from '@angular/core';\n\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\nasync function getIconMap(): Promise<Map<string, number[]>> {\n const response = await fetch(\n `https://sky.blackbaudcdn.net/static/skyux-icons/7/assets/svg/skyux-icons.svg`,\n );\n\n if (!response.ok) {\n throw new Error('Icon sprite could not be loaded.');\n }\n\n const markup = await response.text();\n\n document.body.insertAdjacentHTML('afterbegin', markup);\n\n const iconMap = Array.from<SVGSymbolElement>(\n document.querySelectorAll('#sky-icon-svg-sprite symbol'),\n ).reduce((map, el) => {\n const idParts = el.id.split('-');\n\n // Construct the icon name by removing `sky-i-` from the beginning\n // and `-<size>-<variant>` from the end.\n const name = idParts.slice(2, idParts.length - 2).join('-');\n\n let sizes = map.get(name);\n\n if (!sizes) {\n sizes = [];\n map.set(name, sizes);\n }\n\n // The penultimate segment is the size for which the icon has\n // been optimized.\n sizes.push(+idParts[idParts.length - 2]);\n\n return map;\n }, new Map<string, number[]>());\n\n // Sort all the sizes for later comparison.\n for (const id of iconMap.keys()) {\n // Dedupe and sort the icon sizes.\n iconMap.set(id, [...new Set(iconMap.get(id))].sort());\n }\n\n return iconMap;\n}\n\nfunction getNearestSize(\n iconMap: Map<string, number[]>,\n name: string,\n pixelSize: number,\n): number | undefined {\n const sizes = iconMap.get(name);\n\n if (sizes) {\n let nearestSizeUnder = -Infinity;\n let nearestSizeOver = Infinity;\n\n for (const availableSize of sizes) {\n if (availableSize === pixelSize) {\n return pixelSize;\n } else if (availableSize < pixelSize) {\n nearestSizeUnder = availableSize;\n } else {\n nearestSizeOver = availableSize;\n break;\n }\n }\n\n const underDiff = Math.abs(pixelSize - nearestSizeUnder);\n const overDiff = Math.abs(pixelSize - nearestSizeOver);\n\n return isNaN(overDiff) || underDiff < overDiff\n ? nearestSizeUnder\n : nearestSizeOver;\n }\n\n return undefined;\n}\n\n/**\n * @internal\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyIconSvgResolverService {\n #iconMapPromise: Promise<Map<string, number[]>> | undefined;\n\n public async resolveHref(\n name: string,\n pixelSize = 16,\n variant: SkyIconVariantType = 'line',\n ): Promise<string> {\n if (!this.#iconMapPromise) {\n this.#iconMapPromise = getIconMap();\n }\n\n const iconMap = await this.#iconMapPromise;\n\n let href = `#sky-i-${name}`;\n\n // Find the icon with the optimal size nearest to the requested size.\n const nearestSize = getNearestSize(iconMap, name, pixelSize);\n\n if (!nearestSize) {\n throw new Error(`Icon with name '${name}' was not found.`);\n }\n\n href = `${href}-${nearestSize}-${variant}`;\n\n return href;\n }\n}\n","import { NgClass } from '@angular/common';\nimport { Component, computed, inject, input } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\n\nimport { catchError, of, switchMap } from 'rxjs';\n\nimport { SkyIconSvgResolverService } from './icon-svg-resolver.service';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\nconst SIZE_BASE = 16;\n\nconst SIZES = new Map([\n ['', SIZE_BASE],\n ['lg', 21.333 /* SIZE_BASE * (4/3) */],\n ['2x', 32 /* SIZE_BASE * 2 */],\n ['3x', 48 /* SIZE_BASE * 3 */],\n ['4x', 64 /* SIZE_BASE * 4 */],\n ['5x', 80 /* SIZE_BASE * 5 */],\n]);\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-icon-svg',\n imports: [NgClass],\n templateUrl: './icon-svg.component.html',\n styleUrls: [\n './icon-svg.default.component.scss',\n './icon-svg.modern.component.scss',\n ],\n})\nexport class SkyIconSvgComponent {\n readonly #resolverSvc = inject(SkyIconSvgResolverService);\n\n public readonly iconName = input.required<string>();\n public readonly iconSize = input<string>();\n public readonly iconVariant = input<SkyIconVariantType>();\n\n readonly #iconInfo = computed(() => {\n return {\n src: this.iconName(),\n size: this.iconSize(),\n variant: this.iconVariant(),\n };\n });\n\n protected readonly iconHref = toSignal(\n toObservable(this.#iconInfo).pipe(\n switchMap((info) =>\n this.#resolverSvc.resolveHref(\n info.src,\n SIZES.get(info.size ?? ''),\n info.variant,\n ),\n ),\n catchError(() => of('')),\n ),\n );\n}\n","<svg\n aria-hidden=\"true\"\n class=\"sky-icon-svg-img\"\n [ngClass]=\"iconSize() && 'sky-icon-svg-img-' + iconSize()\"\n [attr.data-sky-icon]=\"iconName()\"\n [attr.data-sky-icon-variant]=\"iconVariant()\"\n>\n <use [attr.xlink:href]=\"iconHref()\" />\n</svg>\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n inject,\n} from '@angular/core';\nimport { SkyThemeService } from '@skyux/theme';\n\nimport { SkyIconType } from './types/icon-type';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\n@Component({\n selector: 'sky-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class SkyIconComponent {\n /**\n * The name of\n * [the Font Awesome 4.7 icon](https://fontawesome.com/v4.7/icons/) or the SKY UX icon to\n * display. When specifying a Font Awesome icon, do not prefix the name with `fa-`.\n * @required\n */\n @Input()\n public icon: string | undefined;\n\n /**\n * The name of the Blackbaud SVG icon to display. For internal use only.\n * @internal\n */\n @Input()\n public iconName: string | undefined;\n\n /**\n * The type of icon to display. Specifying `\"fa\"` displays a Font Awesome icon,\n * while specifying `\"skyux\"` displays an icon from the custom SKY UX icon font. Note that\n * the custom SKY UX icon font is currently in beta.\n * @default \"fa\"\n * @deprecated The icon component now automatically infers which type of icon to use based on the current theme. This input will be removed in a future version.\n */\n @Input()\n public iconType: SkyIconType | undefined;\n\n /**\n * The size of the icon using\n * [Font Awesome sizes](https://fontawesome.com/v4/examples/). Do not prefix the size with `fa-`.\n */\n @Input()\n public size: string | undefined;\n\n /**\n * Whether to enforce a fixed width based on icon size. By default, icons of a specified size share a\n * consistent height, but their widths vary and can throw off vertical alignment. Use a fixed width when\n * you stack icons vertically, such as in lists.\n * @default false\n */\n @Input()\n public fixedWidth: boolean | undefined;\n\n /**\n * The icon variant. If the variant doesn't exist for the\n * specified icon, the normal icon is displayed. This property only applies when using SKY UX icons.\n */\n @Input()\n public variant: SkyIconVariantType | undefined;\n\n protected themeSvc = inject(SkyThemeService, { optional: true });\n}\n","@if (iconName) {\n <sky-icon-svg\n [iconName]=\"iconName\"\n [iconSize]=\"size\"\n [iconVariant]=\"variant\"\n />\n} @else if (icon) {\n <i\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [attr.data-sky-icon]=\"icon\"\n [attr.data-sky-icon-type]=\"iconType\"\n [attr.data-sky-icon-variant]=\"variant\"\n [ngClass]=\"\n icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n : size\n : fixedWidth\n : variant\n \"\n ></i>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyIconClassListPipe } from './icon-class-list.pipe';\nimport { SkyIconStackComponent } from './icon-stack.component';\nimport { SkyIconSvgComponent } from './icon-svg.component';\nimport { SkyIconComponent } from './icon.component';\n\n@NgModule({\n declarations: [SkyIconClassListPipe, SkyIconComponent, SkyIconStackComponent],\n imports: [CommonModule, SkyIconSvgComponent],\n exports: [SkyIconComponent, SkyIconStackComponent],\n})\nexport class SkyIconModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.SkyIconClassListPipe","i2.SkyIconSvgComponent","i3.SkyIconClassListPipe"],"mappings":";;;;;;;;AAUA;;AAEG;MAIU,sBAAsB,CAAA;AACjC,IAAA,SAAS,GAAG,IAAI,GAAG,EAAqC;AAExD,IAAA,YAAY,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAElD,IAAA,WAAA,GAAA;;AAEE,QAAA,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE;;YAE1D,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBAClC,KAAK,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;;YAEhC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;;;AAIlC,IAAA,WAAW,CAChB,IAAY,EACZ,OAA4B,EAC5B,aAAgC,EAAA;QAEhC,IAAI,QAAQ,GAAG,IAAI;QACnB,MAAM,WAAW,GAAG,OAAO,IAAI,GAAG,IAAI,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE;AACnD,QAAA,MAAM,QAAQ,GAAG,CAAG,EAAA,IAAI,OAAO;;;QAI/B,IAAI,KAAK,GACP,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAqB,CAAC;AACzC,YAAA,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A,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAJT,YAAA,EAAA,CAAA,oBAAoB,EAAE,gBAAgB,EAAE,qBAAqB,CAClE,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,CACjC,EAAA,OAAA,EAAA,CAAA,gBAAgB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEtC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHd,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGX,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC;AAC7E,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;AAC5C,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;AACnD,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"skyux-icon.mjs","sources":["../../../../../libs/components/icon/src/lib/modules/icon/icon-resolver.service.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-class-list.pipe.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-svg-resolver.service.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-svg.component.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon-svg.component.html","../../../../../libs/components/icon/src/lib/modules/icon/icon.component.ts","../../../../../libs/components/icon/src/lib/modules/icon/icon.component.html","../../../../../libs/components/icon/src/lib/modules/icon/icon.module.ts","../../../../../libs/components/icon/src/skyux-icon.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport {\n SkyThemeIconManifestGlyph,\n SkyThemeIconManifestService,\n SkyThemeSettings,\n} from '@skyux/theme';\n\nimport { SkyIconResolved } from './types/icon-resolved';\nimport type { SkyIconVariantType } from './types/icon-variant-type';\n\n/**\n * @internal\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyIconResolverService {\n #glyphMap = new Map<string, SkyThemeIconManifestGlyph>();\n\n #manifestSvc = inject(SkyThemeIconManifestService);\n\n constructor() {\n // Map the icons by name for more efficient lookup.\n for (const glyph of this.#manifestSvc.getManifest().glyphs) {\n // TODO: keep this until `faName` is removed just in case any icons get added with the wrong shape\n if (glyph.faName && !glyph.faNames) {\n glyph.faNames = [glyph.faName];\n }\n this.#glyphMap.set(glyph.name, glyph);\n }\n }\n\n public resolveIcon(\n icon: string,\n variant?: SkyIconVariantType,\n themeSettings?: SkyThemeSettings,\n ): SkyIconResolved {\n let iconType = 'fa';\n const variantIcon = variant && `${icon}-${variant}`;\n const lineIcon = `${icon}-line`;\n\n // Get the specified variant, or fall back to the icon name.\n // If the pure icon name doesn't exist, try the line variant.\n let glyph =\n this.#glyphMap.get(variantIcon as string) ??\n this.#glyphMap.get(icon) ??\n this.#glyphMap.get(lineIcon) ??\n Array.from(this.#glyphMap.values()).find(\n (glyph) =>\n glyph.aliases?.includes(variantIcon as string) ||\n glyph.aliases?.includes(lineIcon) ||\n glyph.aliases?.includes(icon),\n );\n\n // If still no icon is found, search through the icons that match the FA name.\n if (!glyph) {\n let glyphs = Array.from(this.#glyphMap.values()).filter((g) =>\n g.faNames?.includes(icon),\n );\n if (glyphs.length) {\n if (glyphs.length > 1) {\n // If multiples are found, make sure we select the correct variant, if requested.\n // The icons are ordered such that the \"default\" variant will be the first one.\n if (variant) {\n const variantGlyph = glyphs.find((g) => g.name.endsWith(variant));\n if (variantGlyph) {\n glyphs = [variantGlyph];\n }\n }\n }\n glyph = glyphs[0];\n }\n // If none of the above works, no matching icon was found\n }\n\n if (glyph) {\n // If a glyph is found, use it for modern theme or if no FA fallback exists.\n if (themeSettings?.theme.name === 'modern' || !glyph.faNames?.length) {\n icon = glyph.name;\n iconType = 'skyux';\n } else {\n // For default theme, use a known FA fallback.\n // If the icon name requested is already a FA icon, just use it. Otherwise use the first one.\n if (!glyph.faNames?.includes(icon)) {\n icon = glyph.faNames[0];\n }\n }\n }\n\n // If no SKY UX glyph is found, assume icon is part of FA and pass it along.\n return {\n icon,\n iconType,\n };\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { SkyThemeSettings } from '@skyux/theme';\n\nimport { SkyIconResolverService } from './icon-resolver.service';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\n/**\n * @internal\n */\n@Pipe({\n name: 'skyIconClassList',\n standalone: false,\n})\nexport class SkyIconClassListPipe implements PipeTransform {\n #resolver = inject(SkyIconResolverService);\n\n public transform(\n icon: string,\n themeSettings?: SkyThemeSettings,\n size?: string,\n fixedWidth?: boolean,\n variant?: SkyIconVariantType,\n ): string[] {\n let classList: string[];\n\n const { icon: resolvedIcon, iconType: resolvedIconType } =\n this.#resolver.resolveIcon(icon, variant, themeSettings);\n\n if (resolvedIconType === 'skyux') {\n classList = ['sky-i-' + resolvedIcon];\n } else {\n classList = ['fa', 'fa-' + resolvedIcon];\n }\n\n if (size) {\n classList.push('fa-' + size);\n }\n\n if (fixedWidth) {\n classList.push('fa-fw');\n }\n\n return classList;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\nasync function getIconMap(): Promise<Map<string, number[]>> {\n const response = await fetch(\n `https://sky.blackbaudcdn.net/static/skyux-icons/7/assets/svg/skyux-icons.svg`,\n );\n\n /* istanbul ignore next */\n if (!response.ok) {\n throw new Error('Icon sprite could not be loaded.');\n }\n\n const markup = await response.text();\n\n document.body.insertAdjacentHTML('afterbegin', markup);\n\n const iconMap = Array.from<SVGSymbolElement>(\n document.querySelectorAll('#sky-icon-svg-sprite symbol'),\n ).reduce((map, el) => {\n const idParts = el.id.split('-');\n\n // Construct the icon name by removing `sky-i-` from the beginning\n // and `-<size>-<variant>` from the end.\n const name = idParts.slice(2, idParts.length - 2).join('-');\n\n let sizes = map.get(name);\n\n if (!sizes) {\n sizes = [];\n map.set(name, sizes);\n }\n\n // The penultimate segment is the size for which the icon has\n // been optimized.\n sizes.push(+idParts[idParts.length - 2]);\n\n return map;\n }, new Map<string, number[]>());\n\n // Sort all the sizes for later comparison.\n for (const id of iconMap.keys()) {\n // Dedupe and sort the icon sizes.\n iconMap.set(id, [...new Set(iconMap.get(id))].sort());\n }\n\n return iconMap;\n}\n\nfunction getNearestSize(\n iconMap: Map<string, number[]>,\n name: string,\n pixelSize: number,\n): number | undefined {\n const sizes = iconMap.get(name);\n\n if (sizes) {\n let nearestSizeUnder = -Infinity;\n let nearestSizeOver = Infinity;\n\n for (const availableSize of sizes) {\n if (availableSize === pixelSize) {\n return pixelSize;\n } else if (availableSize < pixelSize) {\n nearestSizeUnder = availableSize;\n } else {\n nearestSizeOver = availableSize;\n break;\n }\n }\n\n const underDiff = Math.abs(pixelSize - nearestSizeUnder);\n const overDiff = Math.abs(pixelSize - nearestSizeOver);\n\n return isNaN(overDiff) || underDiff < overDiff\n ? nearestSizeUnder\n : nearestSizeOver;\n }\n\n return undefined;\n}\n\nlet iconMapPromise: Promise<Map<string, number[]>> | undefined;\n\n/**\n * @internal\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyIconSvgResolverService {\n public async resolveHref(\n name: string,\n pixelSize = 16,\n variant: SkyIconVariantType = 'line',\n ): Promise<string> {\n if (!iconMapPromise) {\n iconMapPromise = getIconMap();\n }\n\n const iconMap = await iconMapPromise;\n\n let href = `#sky-i-${name}`;\n\n // Find the icon with the optimal size nearest to the requested size.\n const nearestSize = getNearestSize(iconMap, name, pixelSize);\n\n if (!nearestSize) {\n throw new Error(`Icon with name '${name}' was not found.`);\n }\n\n href = `${href}-${nearestSize}-${variant}`;\n\n return href;\n }\n}\n","import { Component, computed, inject, input } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { SkyThemeComponentClassDirective } from '@skyux/theme';\n\nimport { catchError, of, switchMap } from 'rxjs';\n\nimport { SkyIconSvgResolverService } from './icon-svg-resolver.service';\nimport { SkyIconSize } from './types/icon-size';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\nconst SIZE_BASE = 16;\n\nconst RELATIVE_SIZES = new Map([\n ['md', SIZE_BASE],\n ['lg', 21.333 /* SIZE_BASE * (4/3) */],\n ['2x', 32 /* SIZE_BASE * 2 */],\n ['3x', 48 /* SIZE_BASE * 3 */],\n ['4x', 64 /* SIZE_BASE * 4 */],\n ['5x', 80 /* SIZE_BASE * 5 */],\n]);\n\nconst FIXED_SIZES = new Map([\n ['s', SIZE_BASE],\n ['m', 20],\n ['l', 24],\n ['xl', 32],\n]);\n\nfunction defaultSize(value: SkyIconSize | undefined): SkyIconSize {\n return value ?? 'm';\n}\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-icon-svg',\n templateUrl: './icon-svg.component.html',\n styleUrls: ['./icon-svg.component.scss'],\n host: {\n '[class]':\n 'relativeSize() ? \"sky-icon-svg-relative-\" + relativeSize() : \"sky-icon-svg-\" + iconSize()',\n },\n hostDirectives: [SkyThemeComponentClassDirective],\n})\nexport class SkyIconSvgComponent {\n readonly #resolverSvc = inject(SkyIconSvgResolverService);\n\n public readonly iconName = input.required<string>();\n public readonly iconSize = input<SkyIconSize, SkyIconSize | undefined>('m', {\n transform: defaultSize,\n });\n public readonly relativeSize = input<string | undefined>();\n public readonly iconVariant = input<SkyIconVariantType>();\n\n readonly #iconInfo = computed(() => {\n return {\n src: this.iconName(),\n relativeSize: this.relativeSize(),\n iconSize: this.iconSize(),\n variant: this.iconVariant(),\n };\n });\n\n protected readonly iconHref = toSignal(\n toObservable(this.#iconInfo).pipe(\n switchMap((info) =>\n this.#resolverSvc.resolveHref(\n info.src,\n info.relativeSize !== undefined\n ? RELATIVE_SIZES.get(info.relativeSize)\n : FIXED_SIZES.get(info.iconSize),\n info.variant,\n ),\n ),\n catchError(() => of('')),\n ),\n );\n}\n","<div class=\"sky-icon-svg-container\">\n <svg\n aria-hidden=\"true\"\n class=\"sky-icon-svg-img\"\n [attr.data-sky-icon]=\"iconName()\"\n [attr.data-sky-icon-variant]=\"iconVariant()\"\n >\n <use [attr.xlink:href]=\"iconHref()\" />\n </svg>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n inject,\n input,\n} from '@angular/core';\nimport { SkyThemeService } from '@skyux/theme';\n\nimport { SkyIconSize } from './types/icon-size';\nimport { SkyIconType } from './types/icon-type';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\n@Component({\n selector: 'sky-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class SkyIconComponent {\n /**\n * The name of\n * [the Font Awesome 4.7 icon](https://fontawesome.com/v4.7/icons/) or the SKY UX icon to\n * display. When specifying a Font Awesome icon, do not prefix the name with `fa-`.\n * @deprecated Font Awesome support will be removed in SKY UX 13. Use iconName instead.\n */\n @Input()\n public icon: string | undefined;\n\n /**\n * The name of the Blackbaud SVG icon to display.\n */\n @Input()\n public iconName: string | undefined;\n\n /**\n * The type of icon to display. Specifying `\"fa\"` displays a Font Awesome icon,\n * while specifying `\"skyux\"` displays an icon from the custom SKY UX icon font. Note that\n * the custom SKY UX icon font is currently in beta.\n * @default \"fa\"\n * @deprecated The icon component now automatically infers which type of icon to use based on the current theme. This input will be removed in SKY UX 13.\n */\n @Input()\n public iconType: SkyIconType | undefined;\n\n /**\n * The size of the icon using\n * [Font Awesome sizes](https://fontawesome.com/v4/examples/). Size is relative to the font size. Do not prefix the size with `fa-`.\n * @deprecated `size` is deprecated and will be removed in SKY UX 13. Use `iconSize` to set a specific size that does not scale with font size instead.\n */\n @Input()\n public size: string | undefined;\n\n /**\n * Whether to enforce a fixed width based on icon size. By default, icons of a specified size share a\n * consistent height, but their widths vary and can throw off vertical alignment. Use a fixed width when\n * you stack icons vertically, such as in lists.\n * @default false\n * @deprecated `fixedWidth` is a Font Awesome input and will be removed when Font Awesome support is dropped in SKY UX 13.\n * All icons using iconName are automatically fixed width.\n */\n @Input()\n public fixedWidth: boolean | undefined;\n\n /**\n * The icon variant. If the variant doesn't exist for the\n * specified icon, the normal icon is displayed. This property only applies when using SKY UX icons.\n */\n @Input()\n public variant: SkyIconVariantType | undefined;\n\n /**\n * The icon size. Size is independent of font size.\n * @default \"m\"\n */\n public readonly iconSize = input<SkyIconSize | undefined>();\n\n protected themeSvc = inject(SkyThemeService, { optional: true });\n}\n","@if (iconName) {\n <sky-icon-svg\n [iconName]=\"iconName\"\n [relativeSize]=\"size\"\n [iconSize]=\"iconSize()\"\n [iconVariant]=\"variant\"\n [attr.data-sky-icon]=\"iconName\"\n [attr.data-sky-icon-variant]=\"variant\"\n />\n} @else if (icon) {\n <i\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [attr.data-sky-icon]=\"icon\"\n [attr.data-sky-icon-type]=\"iconType\"\n [attr.data-sky-icon-variant]=\"variant\"\n [ngClass]=\"\n icon\n | skyIconClassList\n : (themeSvc?.settingsChange | async)?.currentSettings\n : size\n : fixedWidth\n : variant\n \"\n ></i>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyIconClassListPipe } from './icon-class-list.pipe';\nimport { SkyIconSvgComponent } from './icon-svg.component';\nimport { SkyIconComponent } from './icon.component';\n\n@NgModule({\n declarations: [SkyIconClassListPipe, SkyIconComponent],\n imports: [CommonModule, SkyIconSvgComponent],\n exports: [SkyIconComponent],\n})\nexport class SkyIconModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.SkyIconSvgComponent","i3.SkyIconClassListPipe"],"mappings":";;;;;;;;;AAUA;;AAEG;MAIU,sBAAsB,CAAA;AACjC,IAAA,SAAS,GAAG,IAAI,GAAG,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oBAAA,YAAY,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;oBAC5C,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,iBAAA;;;ACXD;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { SkyIconStackItem } from './lib/modules/icon/icon-stack-item';
2
1
  export { SkyIconModule } from './lib/modules/icon/icon.module';
2
+ export { SkyIconSize } from './lib/modules/icon/types/icon-size';
3
3
  export { SkyIconType } from './lib/modules/icon/types/icon-type';
4
4
  export { SkyIconVariantType } from './lib/modules/icon/types/icon-variant-type';
5
+ export { SkyIconSvgResolverService } from './lib/modules/icon/icon-svg-resolver.service';
5
6
  export { SkyIconComponent as λ1 } from './lib/modules/icon/icon.component';
6
- export { SkyIconStackComponent as λ2 } from './lib/modules/icon/icon-stack.component';
@@ -4,7 +4,6 @@ import * as i0 from "@angular/core";
4
4
  * @internal
5
5
  */
6
6
  export declare class SkyIconSvgResolverService {
7
- #private;
8
7
  resolveHref(name: string, pixelSize?: number, variant?: SkyIconVariantType): Promise<string>;
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyIconSvgResolverService, never>;
10
9
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyIconSvgResolverService>;
@@ -1,14 +1,17 @@
1
+ import { SkyIconSize } from './types/icon-size';
1
2
  import { SkyIconVariantType } from './types/icon-variant-type';
2
3
  import * as i0 from "@angular/core";
4
+ import * as i1 from "@skyux/theme";
3
5
  /**
4
6
  * @internal
5
7
  */
6
8
  export declare class SkyIconSvgComponent {
7
9
  #private;
8
10
  readonly iconName: import("@angular/core").InputSignal<string>;
9
- readonly iconSize: import("@angular/core").InputSignal<string | undefined>;
11
+ readonly iconSize: import("@angular/core").InputSignalWithTransform<SkyIconSize, SkyIconSize | undefined>;
12
+ readonly relativeSize: import("@angular/core").InputSignal<string | undefined>;
10
13
  readonly iconVariant: import("@angular/core").InputSignal<SkyIconVariantType | undefined>;
11
14
  protected readonly iconHref: import("@angular/core").Signal<string | undefined>;
12
15
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyIconSvgComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyIconSvgComponent, "sky-icon-svg", never, { "iconName": { "alias": "iconName"; "required": true; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "iconVariant": { "alias": "iconVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyIconSvgComponent, "sky-icon-svg", never, { "iconName": { "alias": "iconName"; "required": true; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "relativeSize": { "alias": "relativeSize"; "required": false; "isSignal": true; }; "iconVariant": { "alias": "iconVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.SkyThemeComponentClassDirective; inputs: {}; outputs: {}; }]>;
14
17
  }
@@ -1,4 +1,5 @@
1
1
  import { SkyThemeService } from '@skyux/theme';
2
+ import { SkyIconSize } from './types/icon-size';
2
3
  import { SkyIconType } from './types/icon-type';
3
4
  import { SkyIconVariantType } from './types/icon-variant-type';
4
5
  import * as i0 from "@angular/core";
@@ -7,12 +8,11 @@ export declare class SkyIconComponent {
7
8
  * The name of
8
9
  * [the Font Awesome 4.7 icon](https://fontawesome.com/v4.7/icons/) or the SKY UX icon to
9
10
  * display. When specifying a Font Awesome icon, do not prefix the name with `fa-`.
10
- * @required
11
+ * @deprecated Font Awesome support will be removed in SKY UX 13. Use iconName instead.
11
12
  */
12
13
  icon: string | undefined;
13
14
  /**
14
- * The name of the Blackbaud SVG icon to display. For internal use only.
15
- * @internal
15
+ * The name of the Blackbaud SVG icon to display.
16
16
  */
17
17
  iconName: string | undefined;
18
18
  /**
@@ -20,12 +20,13 @@ export declare class SkyIconComponent {
20
20
  * while specifying `"skyux"` displays an icon from the custom SKY UX icon font. Note that
21
21
  * the custom SKY UX icon font is currently in beta.
22
22
  * @default "fa"
23
- * @deprecated The icon component now automatically infers which type of icon to use based on the current theme. This input will be removed in a future version.
23
+ * @deprecated The icon component now automatically infers which type of icon to use based on the current theme. This input will be removed in SKY UX 13.
24
24
  */
25
25
  iconType: SkyIconType | undefined;
26
26
  /**
27
27
  * The size of the icon using
28
- * [Font Awesome sizes](https://fontawesome.com/v4/examples/). Do not prefix the size with `fa-`.
28
+ * [Font Awesome sizes](https://fontawesome.com/v4/examples/). Size is relative to the font size. Do not prefix the size with `fa-`.
29
+ * @deprecated `size` is deprecated and will be removed in SKY UX 13. Use `iconSize` to set a specific size that does not scale with font size instead.
29
30
  */
30
31
  size: string | undefined;
31
32
  /**
@@ -33,6 +34,8 @@ export declare class SkyIconComponent {
33
34
  * consistent height, but their widths vary and can throw off vertical alignment. Use a fixed width when
34
35
  * you stack icons vertically, such as in lists.
35
36
  * @default false
37
+ * @deprecated `fixedWidth` is a Font Awesome input and will be removed when Font Awesome support is dropped in SKY UX 13.
38
+ * All icons using iconName are automatically fixed width.
36
39
  */
37
40
  fixedWidth: boolean | undefined;
38
41
  /**
@@ -40,7 +43,12 @@ export declare class SkyIconComponent {
40
43
  * specified icon, the normal icon is displayed. This property only applies when using SKY UX icons.
41
44
  */
42
45
  variant: SkyIconVariantType | undefined;
46
+ /**
47
+ * The icon size. Size is independent of font size.
48
+ * @default "m"
49
+ */
50
+ readonly iconSize: import("@angular/core").InputSignal<SkyIconSize | undefined>;
43
51
  protected themeSvc: SkyThemeService | null;
44
52
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyIconComponent, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyIconComponent, "sky-icon", never, { "icon": { "alias": "icon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "iconType": { "alias": "iconType"; "required": false; }; "size": { "alias": "size"; "required": false; }; "fixedWidth": { "alias": "fixedWidth"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, never, false, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyIconComponent, "sky-icon", never, { "icon": { "alias": "icon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "iconType": { "alias": "iconType"; "required": false; }; "size": { "alias": "size"; "required": false; }; "fixedWidth": { "alias": "fixedWidth"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
46
54
  }
@@ -1,11 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./icon-class-list.pipe";
3
3
  import * as i2 from "./icon.component";
4
- import * as i3 from "./icon-stack.component";
5
- import * as i4 from "@angular/common";
6
- import * as i5 from "./icon-svg.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "./icon-svg.component";
7
6
  export declare class SkyIconModule {
8
7
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyIconModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyIconModule, [typeof i1.SkyIconClassListPipe, typeof i2.SkyIconComponent, typeof i3.SkyIconStackComponent], [typeof i4.CommonModule, typeof i5.SkyIconSvgComponent], [typeof i2.SkyIconComponent, typeof i3.SkyIconStackComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyIconModule, [typeof i1.SkyIconClassListPipe, typeof i2.SkyIconComponent], [typeof i3.CommonModule, typeof i4.SkyIconSvgComponent], [typeof i2.SkyIconComponent]>;
10
9
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyIconModule>;
11
10
  }
@@ -0,0 +1 @@
1
+ export type SkyIconSize = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';