@skyux/theme 12.21.0 → 12.23.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.
@@ -18,10 +18,10 @@ class SkyThemeIconManifestService {
18
18
  getManifest() {
19
19
  return getIconManifest();
20
20
  }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeIconManifestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
22
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeIconManifestService, providedIn: 'root' }); }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeIconManifestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
22
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeIconManifestService, providedIn: 'root' }); }
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeIconManifestService, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeIconManifestService, decorators: [{
25
25
  type: Injectable,
26
26
  args: [{
27
27
  providedIn: 'root',
@@ -49,6 +49,41 @@ class SkyThemeMode {
49
49
  this.name = name;
50
50
  this.hostClass = hostClass;
51
51
  }
52
+ /**
53
+ * @internal
54
+ * Serializes the theme mode to a JSON-compatible object.
55
+ */
56
+ serialize() {
57
+ // Check if this instance is a preset
58
+ const presetEntry = Object.entries(SkyThemeMode.presets).find(([, preset]) => preset === this);
59
+ if (presetEntry) {
60
+ return {
61
+ name: this.name,
62
+ isPreset: true,
63
+ };
64
+ }
65
+ return {
66
+ name: this.name,
67
+ hostClass: this.hostClass,
68
+ };
69
+ }
70
+ /**
71
+ * @internal
72
+ * Deserializes a JSON object to a SkyThemeMode instance.
73
+ */
74
+ static deserialize(data) {
75
+ if (data.isPreset) {
76
+ const preset = SkyThemeMode.presets[data.name];
77
+ if (preset) {
78
+ return preset;
79
+ }
80
+ throw new Error(`Unknown theme mode preset: ${data.name}`);
81
+ }
82
+ if (!data.hostClass) {
83
+ throw new Error('hostClass is required for non-preset theme modes');
84
+ }
85
+ return new SkyThemeMode(data.name, data.hostClass);
86
+ }
52
87
  }
53
88
 
54
89
  /**
@@ -72,6 +107,174 @@ class SkyThemeSpacing {
72
107
  this.name = name;
73
108
  this.hostClass = hostClass;
74
109
  }
110
+ /**
111
+ * @internal
112
+ * Serializes the theme spacing to a JSON-compatible object.
113
+ */
114
+ serialize() {
115
+ // Check if this instance is a preset
116
+ const presetEntry = Object.entries(SkyThemeSpacing.presets).find(([, preset]) => preset === this);
117
+ if (presetEntry) {
118
+ return {
119
+ name: this.name,
120
+ isPreset: true,
121
+ };
122
+ }
123
+ return {
124
+ name: this.name,
125
+ hostClass: this.hostClass,
126
+ };
127
+ }
128
+ /**
129
+ * @internal
130
+ * Deserializes a JSON object to a SkyThemeSpacing instance.
131
+ */
132
+ static deserialize(data) {
133
+ if (data.isPreset) {
134
+ const preset = SkyThemeSpacing.presets[data.name];
135
+ if (preset) {
136
+ return preset;
137
+ }
138
+ throw new Error(`Unknown theme spacing preset: ${data.name}`);
139
+ }
140
+ if (!data.hostClass) {
141
+ throw new Error('hostClass is required for non-preset theme spacing');
142
+ }
143
+ return new SkyThemeSpacing(data.name, data.hostClass);
144
+ }
145
+ }
146
+
147
+ /**
148
+ * Defines properties of a SKY UX theme.
149
+ */
150
+ class SkyTheme {
151
+ /**
152
+ * The preset themes available in SKY UX.
153
+ */
154
+ static { this.presets = {
155
+ default: new SkyTheme('default', 'sky-theme-default', [SkyThemeMode.presets.light], [SkyThemeSpacing.presets.standard]),
156
+ modern: new SkyTheme('modern', 'sky-theme-modern', [SkyThemeMode.presets.light, SkyThemeMode.presets.dark], [SkyThemeSpacing.presets.standard, SkyThemeSpacing.presets.compact], true),
157
+ }; }
158
+ /**
159
+ * Creates a new theme.
160
+ * @param name The name of the theme.
161
+ * @param hostClass The class on the host element which child components should reference when
162
+ * adjusting for a specified theme.
163
+ * @param supportedModes An array of modes supported by the theme.
164
+ * @param supportedSpacing An array of spacing modes supported by the theme.
165
+ */
166
+ constructor(name, hostClass, supportedModes, supportedSpacing = [SkyThemeSpacing.presets.standard], supportsBranding = false) {
167
+ this.name = name;
168
+ this.hostClass = hostClass;
169
+ this.supportedModes = supportedModes;
170
+ this.supportedSpacing = supportedSpacing;
171
+ this.supportsBranding = supportsBranding;
172
+ }
173
+ /**
174
+ * @internal
175
+ * Serializes the theme to a JSON-compatible object.
176
+ */
177
+ serialize() {
178
+ // Check if this instance is a preset
179
+ const presetEntry = Object.entries(SkyTheme.presets).find(([, preset]) => preset === this);
180
+ if (presetEntry) {
181
+ return {
182
+ name: this.name,
183
+ supportedModes: this.supportedModes.map((mode) => mode.serialize()),
184
+ isPreset: true,
185
+ };
186
+ }
187
+ const result = {
188
+ name: this.name,
189
+ hostClass: this.hostClass,
190
+ supportedModes: this.supportedModes.map((mode) => mode.serialize()),
191
+ };
192
+ // Only include supportedSpacing if it's not the default
193
+ if (this.supportedSpacing.length !== 1 ||
194
+ this.supportedSpacing[0] !== SkyThemeSpacing.presets.standard) {
195
+ result.supportedSpacing = this.supportedSpacing.map((spacing) => spacing.serialize());
196
+ }
197
+ // Only include supportsBranding if it's true
198
+ if (this.supportsBranding) {
199
+ result.supportsBranding = this.supportsBranding;
200
+ }
201
+ return result;
202
+ }
203
+ /**
204
+ * @internal
205
+ * Deserializes a JSON object to a SkyTheme instance.
206
+ */
207
+ static deserialize(data) {
208
+ if (data.isPreset) {
209
+ const preset = SkyTheme.presets[data.name];
210
+ if (preset) {
211
+ return preset;
212
+ }
213
+ throw new Error(`Unknown theme preset: ${data.name}`);
214
+ }
215
+ if (!data.hostClass) {
216
+ throw new Error('hostClass is required for non-preset themes');
217
+ }
218
+ const supportedModes = data.supportedModes.map((modeData) => SkyThemeMode.deserialize(modeData));
219
+ const supportedSpacing = data.supportedSpacing
220
+ ? data.supportedSpacing.map((spacingData) => SkyThemeSpacing.deserialize(spacingData))
221
+ : [SkyThemeSpacing.presets.standard];
222
+ return new SkyTheme(data.name, data.hostClass, supportedModes, supportedSpacing, data.supportsBranding ?? false);
223
+ }
224
+ }
225
+
226
+ /**
227
+ * @internal
228
+ * Defines properties of SKY UX theme branding.
229
+ */
230
+ class SkyThemeBrand {
231
+ get hostClass() {
232
+ return this.#hostClass || this.#buildDefaultHostClassName();
233
+ }
234
+ set hostClass(value) {
235
+ this.#hostClass = value;
236
+ }
237
+ #hostClass;
238
+ /**
239
+ * Creates a new theme brand.
240
+ * @param name The name of the theme brand.
241
+ * @param hostClass The class on the host element which child components should reference when
242
+ * adjusting for a specified theme brand. This defaults to `sky-theme-brand-<name>
243
+ */
244
+ constructor(name, version, hostClass) {
245
+ this.name = name;
246
+ this.version = version;
247
+ this.hostClass = hostClass;
248
+ if (!/\d+\.\d+\.\d+(?:-(?:alpha|beta|rc)\.\d)*$/.test(version)) {
249
+ throw new Error(`Invalid version format "${version}" for theme brand "${name}".`);
250
+ }
251
+ }
252
+ /**
253
+ * @internal
254
+ * Serializes the theme brand to a JSON-compatible object.
255
+ */
256
+ serialize() {
257
+ const result = {
258
+ name: this.name,
259
+ version: this.version,
260
+ };
261
+ // Only include hostClass if it's different from the default
262
+ const defaultHostClass = this.#buildDefaultHostClassName();
263
+ if (this.hostClass !== defaultHostClass) {
264
+ result.hostClass = this.hostClass;
265
+ }
266
+ return result;
267
+ }
268
+ /**
269
+ * @internal
270
+ * Deserializes a JSON object to a SkyThemeBrand instance.
271
+ */
272
+ static deserialize(data) {
273
+ return new SkyThemeBrand(data.name, data.version, data.hostClass);
274
+ }
275
+ #buildDefaultHostClassName() {
276
+ return `sky-theme-brand-${this.name}`;
277
+ }
75
278
  }
76
279
 
77
280
  /**
@@ -89,6 +292,39 @@ class SkyThemeSettings {
89
292
  this.spacing = spacing;
90
293
  this.brand = brand;
91
294
  }
295
+ /**
296
+ * Serializes the theme settings to a string.
297
+ */
298
+ serialize() {
299
+ const result = {
300
+ theme: this.theme.serialize(),
301
+ mode: this.mode.serialize(),
302
+ };
303
+ // Only include spacing if it's not the default
304
+ if (this.spacing !== SkyThemeSpacing.presets.standard) {
305
+ result.spacing = this.spacing.serialize();
306
+ }
307
+ // Only include brand if it exists
308
+ if (this.brand) {
309
+ result.brand = this.brand.serialize();
310
+ }
311
+ return JSON.stringify(result);
312
+ }
313
+ /**
314
+ * Deserializes a string to a SkyThemeSettings instance.
315
+ */
316
+ static deserialize(value) {
317
+ const settingsData = JSON.parse(value);
318
+ const theme = SkyTheme.deserialize(settingsData.theme);
319
+ const mode = SkyThemeMode.deserialize(settingsData.mode);
320
+ const spacing = settingsData.spacing
321
+ ? SkyThemeSpacing.deserialize(settingsData.spacing)
322
+ : SkyThemeSpacing.presets.standard;
323
+ const brand = settingsData.brand
324
+ ? SkyThemeBrand.deserialize(settingsData.brand)
325
+ : undefined;
326
+ return new SkyThemeSettings(theme, mode, spacing, brand);
327
+ }
92
328
  }
93
329
 
94
330
  function assertCurrentSettings(currentSettings) {
@@ -281,10 +517,10 @@ class SkyThemeService {
281
517
  currentSetting instanceof SkyThemeSpacing) &&
282
518
  current.theme[supportedProp].includes(currentSetting)));
283
519
  }
284
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
285
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeService }); }
520
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
521
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeService }); }
286
522
  }
287
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeService, decorators: [{
523
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeService, decorators: [{
288
524
  type: Injectable
289
525
  }], ctorParameters: () => [] });
290
526
 
@@ -329,10 +565,10 @@ class SkyAppStyleLoader {
329
565
  });
330
566
  });
331
567
  }
332
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAppStyleLoader, deps: [{ token: SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
333
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAppStyleLoader, providedIn: 'root' }); }
568
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyAppStyleLoader, deps: [{ token: SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
569
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyAppStyleLoader, providedIn: 'root' }); }
334
570
  }
335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAppStyleLoader, decorators: [{
571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyAppStyleLoader, decorators: [{
336
572
  type: Injectable,
337
573
  args: [{
338
574
  providedIn: 'root',
@@ -439,10 +675,10 @@ class SkyThemeClassDirective {
439
675
  });
440
676
  }
441
677
  }
442
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeClassDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
443
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.7", type: SkyThemeClassDirective, isStandalone: false, selector: "[skyThemeClass]", inputs: { class: "class", skyThemeClass: "skyThemeClass" }, ngImport: i0 }); }
678
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeClassDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
679
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: SkyThemeClassDirective, isStandalone: false, selector: "[skyThemeClass]", inputs: { class: "class", skyThemeClass: "skyThemeClass" }, ngImport: i0 }); }
444
680
  }
445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeClassDirective, decorators: [{
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeClassDirective, decorators: [{
446
682
  type: Directive,
447
683
  args: [{
448
684
  selector: '[skyThemeClass]',
@@ -510,10 +746,10 @@ class SkyThemeIfDirective {
510
746
  this.#hasView = false;
511
747
  }
512
748
  }
513
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeIfDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
514
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.7", type: SkyThemeIfDirective, isStandalone: false, selector: "[skyThemeIf]", inputs: { skyThemeIf: "skyThemeIf" }, ngImport: i0 }); }
749
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeIfDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
750
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: SkyThemeIfDirective, isStandalone: false, selector: "[skyThemeIf]", inputs: { skyThemeIf: "skyThemeIf" }, ngImport: i0 }); }
515
751
  }
516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeIfDirective, decorators: [{
752
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeIfDirective, decorators: [{
517
753
  type: Directive,
518
754
  args: [{
519
755
  selector: '[skyThemeIf]',
@@ -525,34 +761,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
525
761
  type: Input
526
762
  }] } });
527
763
 
528
- /**
529
- * Defines properties of a SKY UX theme.
530
- */
531
- class SkyTheme {
532
- /**
533
- * The preset themes available in SKY UX.
534
- */
535
- static { this.presets = {
536
- default: new SkyTheme('default', 'sky-theme-default', [SkyThemeMode.presets.light], [SkyThemeSpacing.presets.standard]),
537
- modern: new SkyTheme('modern', 'sky-theme-modern', [SkyThemeMode.presets.light, SkyThemeMode.presets.dark], [SkyThemeSpacing.presets.standard, SkyThemeSpacing.presets.compact], true),
538
- }; }
539
- /**
540
- * Creates a new theme.
541
- * @param name The name of the theme.
542
- * @param hostClass The class on the host element which child components should reference when
543
- * adjusting for a specified theme.
544
- * @param supportedModes An array of modes supported by the theme.
545
- * @param supportedSpacing An array of spacing modes supported by the theme.
546
- */
547
- constructor(name, hostClass, supportedModes, supportedSpacing = [SkyThemeSpacing.presets.standard], supportsBranding = false) {
548
- this.name = name;
549
- this.hostClass = hostClass;
550
- this.supportedModes = supportedModes;
551
- this.supportedSpacing = supportedSpacing;
552
- this.supportsBranding = supportsBranding;
553
- }
554
- }
555
-
556
764
  const defaultTheme = new SkyThemeSettings(SkyTheme.presets.default, SkyThemeMode.presets.light);
557
765
  /**
558
766
  * Creates a new instance of `SkyThemeService` to allow a container
@@ -583,10 +791,10 @@ class SkyThemeDirective {
583
791
  ngOnDestroy() {
584
792
  this.#themeSvc.destroy();
585
793
  }
586
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SkyThemeService }], target: i0.ɵɵFactoryTarget.Directive }); }
587
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.7", type: SkyThemeDirective, isStandalone: false, selector: "[skyTheme]", inputs: { skyTheme: "skyTheme" }, providers: [SkyThemeService], ngImport: i0 }); }
794
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SkyThemeService }], target: i0.ɵɵFactoryTarget.Directive }); }
795
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: SkyThemeDirective, isStandalone: false, selector: "[skyTheme]", inputs: { skyTheme: "skyTheme" }, providers: [SkyThemeService], ngImport: i0 }); }
588
796
  }
589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeDirective, decorators: [{
797
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeDirective, decorators: [{
590
798
  type: Directive,
591
799
  args: [{
592
800
  selector: '[skyTheme]',
@@ -598,13 +806,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
598
806
  }] } });
599
807
 
600
808
  class SkyThemeModule {
601
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
602
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeModule, declarations: [SkyThemeClassDirective,
809
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
810
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeModule, declarations: [SkyThemeClassDirective,
603
811
  SkyThemeDirective,
604
812
  SkyThemeIfDirective], exports: [SkyThemeClassDirective, SkyThemeDirective, SkyThemeIfDirective] }); }
605
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeModule }); }
813
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeModule }); }
606
814
  }
607
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeModule, decorators: [{
815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeModule, decorators: [{
608
816
  type: NgModule,
609
817
  args: [{
610
818
  declarations: [
@@ -616,34 +824,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
616
824
  }]
617
825
  }] });
618
826
 
619
- /**
620
- * @internal
621
- * Defines properties of SKY UX theme branding.
622
- */
623
- class SkyThemeBrand {
624
- get hostClass() {
625
- return this.#hostClass || `sky-theme-brand-${this.name}`;
626
- }
627
- set hostClass(value) {
628
- this.#hostClass = value;
629
- }
630
- #hostClass;
631
- /**
632
- * Creates a new theme brand.
633
- * @param name The name of the theme brand.
634
- * @param hostClass The class on the host element which child components should reference when
635
- * adjusting for a specified theme brand. This defaults to `sky-theme-brand-<name>
636
- */
637
- constructor(name, version, hostClass) {
638
- this.name = name;
639
- this.version = version;
640
- this.hostClass = hostClass;
641
- if (!/\d+\.\d+\.\d+(?:-(?:alpha|beta|rc)\.\d)*$/.test(version)) {
642
- throw new Error(`Invalid version format "${version}" for theme brand "${name}".`);
643
- }
644
- }
645
- }
646
-
647
827
  class SkyThemeComponentClassDirective {
648
828
  #changeDetector;
649
829
  #themeService;
@@ -658,10 +838,10 @@ class SkyThemeComponentClassDirective {
658
838
  this.#changeDetector.markForCheck();
659
839
  });
660
840
  }
661
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeComponentClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
662
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.7", type: SkyThemeComponentClassDirective, isStandalone: true, selector: "[skyThemeClass]", host: { properties: { "class": "this.theme" } }, ngImport: i0 }); }
841
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeComponentClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
842
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: SkyThemeComponentClassDirective, isStandalone: true, selector: "[skyThemeClass]", host: { properties: { "class": "this.theme" } }, ngImport: i0 }); }
663
843
  }
664
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyThemeComponentClassDirective, decorators: [{
844
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyThemeComponentClassDirective, decorators: [{
665
845
  type: Directive,
666
846
  args: [{
667
847
  selector: '[skyThemeClass]',
@@ -816,10 +996,10 @@ class SkyAppViewportService {
816
996
  }
817
997
  return false;
818
998
  }
819
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAppViewportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
820
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAppViewportService, providedIn: 'root' }); }
999
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyAppViewportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1000
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyAppViewportService, providedIn: 'root' }); }
821
1001
  }
822
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAppViewportService, decorators: [{
1002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SkyAppViewportService, decorators: [{
823
1003
  type: Injectable,
824
1004
  args: [{
825
1005
  providedIn: 'root',