@skyux/theme 12.27.0 → 13.0.0-alpha.1

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.
package/index.d.ts CHANGED
@@ -1,20 +1,439 @@
1
- export { SkyThemeIconManifest } from './lib/icons/icon-manifest';
2
- export { SkyThemeIconManifestGlyph } from './lib/icons/icon-manifest-glyph';
3
- export { SkyThemeIconManifestService } from './lib/icons/icon-manifest.service';
4
- export { SkyAppStyleLoader } from './lib/style-loader';
5
- export { SkyThemeModule } from './lib/theme.module';
6
- export { SkyTheme } from './lib/theming/theme';
7
- export { SkyThemeBrand } from './lib/theming/theme-brand';
8
- export { SkyThemeComponentClassDirective } from './lib/theming/theme-component-class.directive';
9
- export { SkyThemeMode } from './lib/theming/theme-mode';
10
- export { SkyThemeSettings } from './lib/theming/theme-settings';
11
- export { SkyThemeSettingsChange } from './lib/theming/theme-settings-change';
12
- export { SkyThemeSpacing } from './lib/theming/theme-spacing';
13
- export { SkyThemeService } from './lib/theming/theme.service';
14
- export { SkyAppViewportReserveArgs } from './lib/viewport/viewport-reserve-args';
15
- export { SkyAppViewportReservedPositionType } from './lib/viewport/viewport-reserve-position-type';
16
- export { SkyAppViewportService } from './lib/viewport/viewport.service';
17
- export { provideInitialTheme } from './lib/providers/provide-initial-theme';
18
- export { SkyThemeClassDirective as λ2 } from './lib/theming/theme-class.directive';
19
- export { SkyThemeIfDirective as λ3 } from './lib/theming/theme-if.directive';
20
- export { SkyThemeDirective as λ1 } from './lib/theming/theme.directive';
1
+ import { SkyIconManifest, SkyIconManifestGlyph } from '@skyux/icons';
2
+ export { SkyIconManifestGlyph as SkyThemeIconManifestGlyph } from '@skyux/icons';
3
+ import * as i0 from '@angular/core';
4
+ import { Renderer2, OnDestroy, ElementRef, OnInit, TemplateRef, ViewContainerRef, ChangeDetectorRef, EnvironmentProviders } from '@angular/core';
5
+ import { Observable, ReplaySubject } from 'rxjs';
6
+
7
+ interface SkyThemeIconManifest extends SkyIconManifest {
8
+ glyphs: SkyIconManifestGlyph[];
9
+ }
10
+
11
+ /**
12
+ * Provides a method for retrieving metadata about the SKY UX icon font.
13
+ * @internal
14
+ */
15
+ declare class SkyThemeIconManifestService {
16
+ /**
17
+ * Gets metadata about the SKY UX icon font.
18
+ */
19
+ getManifest(): SkyThemeIconManifest;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeIconManifestService, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyThemeIconManifestService>;
22
+ }
23
+
24
+ /**
25
+ * Type definitions for theme serialization and deserialization.
26
+ */
27
+ /**
28
+ * Serialized representation of a SkyThemeMode.
29
+ */
30
+ interface SkyThemeModeData {
31
+ name: string;
32
+ hostClass?: string;
33
+ isPreset?: boolean;
34
+ }
35
+ /**
36
+ * Serialized representation of a SkyThemeSpacing.
37
+ */
38
+ interface SkyThemeSpacingData {
39
+ name: string;
40
+ hostClass?: string;
41
+ isPreset?: boolean;
42
+ }
43
+ /**
44
+ * Serialized representation of a SkyThemeBrand.
45
+ */
46
+ interface SkyThemeBrandData {
47
+ name: string;
48
+ version: string;
49
+ hostClass?: string;
50
+ styleUrl?: string;
51
+ sriHash?: string;
52
+ }
53
+ /**
54
+ * Serialized representation of a SkyTheme.
55
+ */
56
+ interface SkyThemeData {
57
+ name: string;
58
+ hostClass?: string;
59
+ supportedModes: SkyThemeModeData[];
60
+ supportedSpacing?: SkyThemeSpacingData[];
61
+ supportsBranding?: boolean;
62
+ isPreset?: boolean;
63
+ }
64
+
65
+ /**
66
+ * Defines properties of a SKY UX theme mode.
67
+ */
68
+ declare class SkyThemeMode {
69
+ readonly name: string;
70
+ readonly hostClass: string;
71
+ /**
72
+ * The preset themes available in SKY UX.
73
+ */
74
+ static readonly presets: {
75
+ light: SkyThemeMode;
76
+ dark: SkyThemeMode;
77
+ };
78
+ /**
79
+ * Creates a new theme mode.
80
+ * @param name The name of the theme mode.
81
+ * @param hostClass The class on the host element which child components should reference when
82
+ * adjusting for a specified theme mode.
83
+ */
84
+ constructor(name: string, hostClass: string);
85
+ /**
86
+ * @internal
87
+ * Serializes the theme mode to a JSON-compatible object.
88
+ */
89
+ serialize(): SkyThemeModeData;
90
+ /**
91
+ * @internal
92
+ * Deserializes a JSON object to a SkyThemeMode instance.
93
+ */
94
+ static deserialize(data: SkyThemeModeData): SkyThemeMode;
95
+ }
96
+
97
+ /**
98
+ * Defines properties of SKY UX theme spacing.
99
+ */
100
+ declare class SkyThemeSpacing {
101
+ readonly name: string;
102
+ readonly hostClass: string;
103
+ /**
104
+ * The preset spacing available in SKY UX.
105
+ */
106
+ static readonly presets: {
107
+ standard: SkyThemeSpacing;
108
+ compact: SkyThemeSpacing;
109
+ };
110
+ /**
111
+ * Creates a new theme spacing.
112
+ * @param name The name of the theme spacing.
113
+ * @param hostClass The class on the host element which child components should reference when
114
+ * adjusting for a specified theme spacing.
115
+ */
116
+ constructor(name: string, hostClass: string);
117
+ /**
118
+ * @internal
119
+ * Serializes the theme spacing to a JSON-compatible object.
120
+ */
121
+ serialize(): SkyThemeSpacingData;
122
+ /**
123
+ * @internal
124
+ * Deserializes a JSON object to a SkyThemeSpacing instance.
125
+ */
126
+ static deserialize(data: SkyThemeSpacingData): SkyThemeSpacing;
127
+ }
128
+
129
+ /**
130
+ * Defines properties of a SKY UX theme.
131
+ */
132
+ declare class SkyTheme {
133
+ readonly name: string;
134
+ readonly hostClass: string;
135
+ readonly supportedModes: SkyThemeMode[];
136
+ readonly supportedSpacing: SkyThemeSpacing[];
137
+ readonly supportsBranding: boolean;
138
+ /**
139
+ * The preset themes available in SKY UX.
140
+ */
141
+ static readonly presets: {
142
+ default: SkyTheme;
143
+ modern: SkyTheme;
144
+ };
145
+ /**
146
+ * Creates a new theme.
147
+ * @param name The name of the theme.
148
+ * @param hostClass The class on the host element which child components should reference when
149
+ * adjusting for a specified theme.
150
+ * @param supportedModes An array of modes supported by the theme.
151
+ * @param supportedSpacing An array of spacing modes supported by the theme.
152
+ */
153
+ constructor(name: string, hostClass: string, supportedModes: SkyThemeMode[], supportedSpacing?: SkyThemeSpacing[], supportsBranding?: boolean);
154
+ /**
155
+ * @internal
156
+ * Serializes the theme to a JSON-compatible object.
157
+ */
158
+ serialize(): SkyThemeData;
159
+ /**
160
+ * @internal
161
+ * Deserializes a JSON object to a SkyTheme instance.
162
+ */
163
+ static deserialize(data: SkyThemeData): SkyTheme;
164
+ }
165
+
166
+ /**
167
+ * @internal
168
+ * Defines properties of SKY UX theme branding.
169
+ */
170
+ declare class SkyThemeBrand {
171
+ #private;
172
+ readonly name: string;
173
+ readonly version: string;
174
+ readonly styleUrl?: string | undefined;
175
+ readonly sriHash?: string | undefined;
176
+ get hostClass(): string;
177
+ private set hostClass(value);
178
+ /**
179
+ * Creates a new theme brand.
180
+ * @param name The name of the theme brand.
181
+ * @param version The version of the theme brand.
182
+ * @param hostClass The class on the host element which child components should reference when
183
+ * adjusting for a specified theme brand. This defaults to `sky-theme-brand-<name>`
184
+ * @param styleUrl The URL of the stylesheet to load for this brand
185
+ * @param sriHash The subresource integrity hash for the stylesheet
186
+ */
187
+ constructor(name: string, version: string, hostClass?: string, styleUrl?: string | undefined, sriHash?: string | undefined);
188
+ /**
189
+ * @internal
190
+ * Serializes the theme brand to a JSON-compatible object.
191
+ */
192
+ serialize(): SkyThemeBrandData;
193
+ /**
194
+ * @internal
195
+ * Deserializes a JSON object to a SkyThemeBrand instance.
196
+ */
197
+ static deserialize(data: SkyThemeBrandData): SkyThemeBrand;
198
+ }
199
+
200
+ /**
201
+ * Specifies the theme and mode to be applied to a host element.
202
+ */
203
+ declare class SkyThemeSettings {
204
+ readonly theme: SkyTheme;
205
+ readonly mode: SkyThemeMode;
206
+ readonly spacing: SkyThemeSpacing;
207
+ readonly brand?: SkyThemeBrand | undefined;
208
+ /**
209
+ * Creates a new SkyThemeSettings instance.
210
+ * @param theme The theme configuration.
211
+ * @param mode The theme mode.
212
+ */
213
+ constructor(theme: SkyTheme, mode: SkyThemeMode, spacing?: SkyThemeSpacing, brand?: SkyThemeBrand | undefined);
214
+ /**
215
+ * Serializes the theme settings to a string.
216
+ */
217
+ serialize(): string;
218
+ /**
219
+ * Deserializes a string to a SkyThemeSettings instance.
220
+ */
221
+ static deserialize(value: string): SkyThemeSettings;
222
+ }
223
+
224
+ /**
225
+ * Describes a change to the current theme.
226
+ */
227
+ interface SkyThemeSettingsChange {
228
+ /**
229
+ * The theme settings being applied as a result of the change.
230
+ */
231
+ currentSettings: SkyThemeSettings;
232
+ /**
233
+ * The theme settings being replaced as a result of the change. This is undefined if the theme
234
+ * settings are being set for the first time.
235
+ */
236
+ previousSettings: SkyThemeSettings | undefined;
237
+ }
238
+
239
+ /**
240
+ * Provides methods for updating and handling changes to the current theme.
241
+ */
242
+ declare class SkyThemeService {
243
+ #private;
244
+ /**
245
+ * Notifies consumers when the current theme settings have changed.
246
+ */
247
+ get settingsChange(): Observable<SkyThemeSettingsChange>;
248
+ constructor();
249
+ /**
250
+ * Initializes the theme service with the specified parameters. This should only be called
251
+ * from a host component that provides its own theme to child components.
252
+ * @param hostEl The host element under which themed components are rendered.
253
+ * @param renderer A Renderer2 instance for updating the host element with theme changes.
254
+ * @param theme The initial theme.
255
+ * @param registeredBrands An initial set of brands to register. Additional brands can
256
+ * be registered later via the registerBrand() method.
257
+ */
258
+ init(hostEl: any, renderer: Renderer2, theme: SkyThemeSettings, registeredBrands?: SkyThemeBrand[]): void;
259
+ /**
260
+ * Destroys the current theme service. This should only be called from a host component that
261
+ * provides its own theme to child components.
262
+ */
263
+ destroy(): void;
264
+ /**
265
+ * Updates the current theme mode.
266
+ * @param mode The new theme mode to apply.
267
+ */
268
+ setThemeMode(mode: SkyThemeMode): void;
269
+ /**
270
+ * Updates the current theme spacing.
271
+ * @param spacing The new theme spacing to apply.
272
+ */
273
+ setThemeSpacing(spacing: SkyThemeSpacing): void;
274
+ /**
275
+ * Updates the current theme brand.
276
+ * @param brand The new theme brand to apply.
277
+ */
278
+ setThemeBrand(brand: SkyThemeBrand): void;
279
+ /**
280
+ * Updates the current theme settings.
281
+ * @param settings The new theme settings to apply.
282
+ */
283
+ setTheme(settings: SkyThemeSettings): void;
284
+ /**
285
+ * Updates the current theme.
286
+ * @param theme The new theme to apply.
287
+ */
288
+ setTheme(theme: SkyTheme): void;
289
+ registerBrand(brand: SkyThemeBrand): void;
290
+ unregisterBrand(name: string): void;
291
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeService, never>;
292
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyThemeService>;
293
+ }
294
+
295
+ declare class SkyAppStyleLoader {
296
+ #private;
297
+ static readonly LOAD_TIMEOUT = 3000;
298
+ isLoaded: boolean;
299
+ constructor(themeSvc?: SkyThemeService);
300
+ loadStyles(): Promise<any>;
301
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppStyleLoader, [{ optional: true; }]>;
302
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyAppStyleLoader>;
303
+ }
304
+
305
+ type SkyThemeClassMap = Record<string, string>;
306
+ /**
307
+ * Component to add classes conditionally based on the current theme.
308
+ *
309
+ * If the directive is within a `skyTheme` directive, it uses settings from that directive.
310
+ */
311
+ declare class SkyThemeClassDirective implements OnDestroy {
312
+ #private;
313
+ /**
314
+ * The HTML class attribute.
315
+ *
316
+ * @param value
317
+ */
318
+ set class(value: string | undefined);
319
+ /**
320
+ * An object with class names in a string for keys, and theme names (e.g. 'default' or 'modern') as values.
321
+ *
322
+ * @param value
323
+ */
324
+ set skyThemeClass(value: SkyThemeClassMap | undefined);
325
+ constructor(ngEl: ElementRef, renderer: Renderer2, themeSvc?: SkyThemeService);
326
+ ngOnDestroy(): void;
327
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeClassDirective, [null, null, { optional: true; }]>;
328
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeClassDirective, "[skyThemeClass]", never, { "class": { "alias": "class"; "required": false; }; "skyThemeClass": { "alias": "skyThemeClass"; "required": false; }; }, {}, never, never, false, never>;
329
+ }
330
+
331
+ /**
332
+ * Creates a new instance of `SkyThemeService` to allow a container
333
+ * to have its own theme.
334
+ */
335
+ declare class SkyThemeDirective implements OnInit, OnDestroy {
336
+ #private;
337
+ set skyTheme(value: SkyThemeSettings | undefined);
338
+ skyThemeOrDefault: SkyThemeSettings;
339
+ constructor(elRef: ElementRef, renderer: Renderer2, themeSvc: SkyThemeService);
340
+ ngOnInit(): void;
341
+ ngOnDestroy(): void;
342
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeDirective, never>;
343
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeDirective, "[skyTheme]", never, { "skyTheme": { "alias": "skyTheme"; "required": false; }; }, {}, never, never, false, never>;
344
+ }
345
+
346
+ /**
347
+ * Component that works like `ngIf` to show markup for matching theme.
348
+ *
349
+ * If the directive is within a `skyTheme` directive, it uses settings from that directive.
350
+ */
351
+ declare class SkyThemeIfDirective implements OnDestroy {
352
+ #private;
353
+ /**
354
+ * A string that should match the name of a theme, `'default'` or `'modern'`.
355
+ *
356
+ * @param value
357
+ */
358
+ set skyThemeIf(value: 'default' | 'modern' | undefined);
359
+ constructor(templateRef: TemplateRef<unknown>, viewContainer: ViewContainerRef, changeDetector: ChangeDetectorRef, themeSvc?: SkyThemeService);
360
+ ngOnDestroy(): void;
361
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeIfDirective, [null, null, null, { optional: true; }]>;
362
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeIfDirective, "[skyThemeIf]", never, { "skyThemeIf": { "alias": "skyThemeIf"; "required": false; }; }, {}, never, never, false, never>;
363
+ }
364
+
365
+ declare class SkyThemeModule {
366
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeModule, never>;
367
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyThemeModule, [typeof SkyThemeClassDirective, typeof SkyThemeDirective, typeof SkyThemeIfDirective], never, [typeof SkyThemeClassDirective, typeof SkyThemeDirective, typeof SkyThemeIfDirective]>;
368
+ static ɵinj: i0.ɵɵInjectorDeclaration<SkyThemeModule>;
369
+ }
370
+
371
+ declare class SkyThemeComponentClassDirective {
372
+ #private;
373
+ theme: string;
374
+ constructor();
375
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeComponentClassDirective, never>;
376
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeComponentClassDirective, "[skyThemeClass]", never, {}, {}, never, never, true, never>;
377
+ }
378
+
379
+ /**
380
+ * @internal
381
+ */
382
+ type SkyAppViewportReservedPositionType = 'left' | 'top' | 'right' | 'bottom';
383
+
384
+ /**
385
+ * @internal
386
+ */
387
+ interface SkyAppViewportReserveArgs {
388
+ /**
389
+ * A unique ID for the component reserving space.
390
+ */
391
+ id: string;
392
+ /**
393
+ * The position in the viewport where the space will be reserved.
394
+ */
395
+ position: SkyAppViewportReservedPositionType;
396
+ /**
397
+ * The number of pixels to reserve.
398
+ */
399
+ size: number;
400
+ /**
401
+ * Only reserve space when this element is in view.
402
+ */
403
+ reserveForElement?: HTMLElement;
404
+ }
405
+
406
+ /**
407
+ * Provides information about the state of the application's viewport.
408
+ */
409
+ declare class SkyAppViewportService {
410
+ #private;
411
+ /**
412
+ * Updated when the viewport becomes visible. While the page is rendered, the
413
+ * viewport may remain hidden as fonts and styles are loaded asynchronously;
414
+ * this is done to avoid a FOUC (Flash Of Unstyled Content) before the fonts
415
+ * and styles are ready.
416
+ */
417
+ visible: ReplaySubject<boolean>;
418
+ constructor();
419
+ /**
420
+ * Reserves space for components docked to the left, top, right, or bottom of the viewport.
421
+ * @param args
422
+ */
423
+ reserveSpace(args: SkyAppViewportReserveArgs): void;
424
+ /**
425
+ * Removes reserved space for a component by the ID provided when it was reserved.
426
+ * @param id
427
+ */
428
+ unreserveSpace(id: string): void;
429
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppViewportService, never>;
430
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyAppViewportService>;
431
+ }
432
+
433
+ declare function provideInitialTheme(name?: keyof typeof SkyTheme.presets, options?: {
434
+ mode?: keyof typeof SkyThemeMode.presets;
435
+ spacing?: keyof typeof SkyThemeSpacing.presets;
436
+ }): EnvironmentProviders;
437
+
438
+ export { SkyAppStyleLoader, SkyAppViewportService, SkyTheme, SkyThemeBrand, SkyThemeComponentClassDirective, SkyThemeIconManifestService, SkyThemeMode, SkyThemeModule, SkyThemeService, SkyThemeSettings, SkyThemeSpacing, provideInitialTheme, SkyThemeDirective as λ1, SkyThemeClassDirective as λ2, SkyThemeIfDirective as λ3 };
439
+ export type { SkyAppViewportReserveArgs, SkyAppViewportReservedPositionType, SkyThemeIconManifest, SkyThemeSettingsChange };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/theme",
3
- "version": "12.27.0",
3
+ "version": "13.0.0-alpha.1",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -16,11 +16,11 @@
16
16
  },
17
17
  "homepage": "https://github.com/blackbaud/skyux#readme",
18
18
  "peerDependencies": {
19
- "@angular/common": "^19.2.14",
20
- "@angular/core": "^19.2.14"
19
+ "@angular/common": "^20.0.5",
20
+ "@angular/core": "^20.0.5"
21
21
  },
22
22
  "dependencies": {
23
- "@blackbaud/skyux-design-tokens": "2.0.0-alpha.2",
23
+ "@blackbaud/skyux-design-tokens": "2.0.0-alpha.3",
24
24
  "@skyux/icons": "9.0.0",
25
25
  "fontfaceobserver": "2.3.0",
26
26
  "tslib": "^2.8.1"
@@ -1 +0,0 @@
1
- export { SkyIconManifestGlyph as SkyThemeIconManifestGlyph } from '@skyux/icons';
@@ -1,5 +0,0 @@
1
- import { SkyIconManifest } from '@skyux/icons';
2
- import { SkyThemeIconManifestGlyph } from './icon-manifest-glyph';
3
- export interface SkyThemeIconManifest extends SkyIconManifest {
4
- glyphs: SkyThemeIconManifestGlyph[];
5
- }
@@ -1,14 +0,0 @@
1
- import { SkyThemeIconManifest } from './icon-manifest';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Provides a method for retrieving metadata about the SKY UX icon font.
5
- * @internal
6
- */
7
- export declare class SkyThemeIconManifestService {
8
- /**
9
- * Gets metadata about the SKY UX icon font.
10
- */
11
- getManifest(): SkyThemeIconManifest;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeIconManifestService, never>;
13
- static ɵprov: i0.ɵɵInjectableDeclaration<SkyThemeIconManifestService>;
14
- }
@@ -1,8 +0,0 @@
1
- import { EnvironmentProviders } from '@angular/core';
2
- import { SkyTheme } from '../theming/theme';
3
- import { SkyThemeMode } from '../theming/theme-mode';
4
- import { SkyThemeSpacing } from '../theming/theme-spacing';
5
- export declare function provideInitialTheme(name?: keyof typeof SkyTheme.presets, options?: {
6
- mode?: keyof typeof SkyThemeMode.presets;
7
- spacing?: keyof typeof SkyThemeSpacing.presets;
8
- }): EnvironmentProviders;
@@ -1,11 +0,0 @@
1
- import { SkyThemeService } from './theming/theme.service';
2
- import * as i0 from "@angular/core";
3
- export declare class SkyAppStyleLoader {
4
- #private;
5
- static readonly LOAD_TIMEOUT = 3000;
6
- isLoaded: boolean;
7
- constructor(themeSvc?: SkyThemeService);
8
- loadStyles(): Promise<any>;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppStyleLoader, [{ optional: true; }]>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<SkyAppStyleLoader>;
11
- }
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./theming/theme-class.directive";
3
- import * as i2 from "./theming/theme.directive";
4
- import * as i3 from "./theming/theme-if.directive";
5
- export declare class SkyThemeModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyThemeModule, [typeof i1.SkyThemeClassDirective, typeof i2.SkyThemeDirective, typeof i3.SkyThemeIfDirective], never, [typeof i1.SkyThemeClassDirective, typeof i2.SkyThemeDirective, typeof i3.SkyThemeIfDirective]>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<SkyThemeModule>;
9
- }
@@ -1,34 +0,0 @@
1
- import { SkyThemeBrandData } from './theme-serialization-types';
2
- /**
3
- * @internal
4
- * Defines properties of SKY UX theme branding.
5
- */
6
- export declare class SkyThemeBrand {
7
- #private;
8
- readonly name: string;
9
- readonly version: string;
10
- readonly styleUrl?: string | undefined;
11
- readonly sriHash?: string | undefined;
12
- get hostClass(): string;
13
- private set hostClass(value);
14
- /**
15
- * Creates a new theme brand.
16
- * @param name The name of the theme brand.
17
- * @param version The version of the theme brand.
18
- * @param hostClass The class on the host element which child components should reference when
19
- * adjusting for a specified theme brand. This defaults to `sky-theme-brand-<name>`
20
- * @param styleUrl The URL of the stylesheet to load for this brand
21
- * @param sriHash The subresource integrity hash for the stylesheet
22
- */
23
- constructor(name: string, version: string, hostClass?: string, styleUrl?: string | undefined, sriHash?: string | undefined);
24
- /**
25
- * @internal
26
- * Serializes the theme brand to a JSON-compatible object.
27
- */
28
- serialize(): SkyThemeBrandData;
29
- /**
30
- * @internal
31
- * Deserializes a JSON object to a SkyThemeBrand instance.
32
- */
33
- static deserialize(data: SkyThemeBrandData): SkyThemeBrand;
34
- }
@@ -1,29 +0,0 @@
1
- import { ElementRef, OnDestroy, Renderer2 } from '@angular/core';
2
- import { SkyThemeService } from './theme.service';
3
- import * as i0 from "@angular/core";
4
- type SkyThemeClassMap = Record<string, string>;
5
- /**
6
- * Component to add classes conditionally based on the current theme.
7
- *
8
- * If the directive is within a `skyTheme` directive, it uses settings from that directive.
9
- */
10
- export declare class SkyThemeClassDirective implements OnDestroy {
11
- #private;
12
- /**
13
- * The HTML class attribute.
14
- *
15
- * @param value
16
- */
17
- set class(value: string | undefined);
18
- /**
19
- * An object with class names in a string for keys, and theme names (e.g. 'default' or 'modern') as values.
20
- *
21
- * @param value
22
- */
23
- set skyThemeClass(value: SkyThemeClassMap | undefined);
24
- constructor(ngEl: ElementRef, renderer: Renderer2, themeSvc?: SkyThemeService);
25
- ngOnDestroy(): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeClassDirective, [null, null, { optional: true; }]>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeClassDirective, "[skyThemeClass]", never, { "class": { "alias": "class"; "required": false; }; "skyThemeClass": { "alias": "skyThemeClass"; "required": false; }; }, {}, never, never, false, never>;
28
- }
29
- export {};
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class SkyThemeComponentClassDirective {
3
- #private;
4
- theme: string;
5
- constructor();
6
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeComponentClassDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeComponentClassDirective, "[skyThemeClass]", never, {}, {}, never, never, true, never>;
8
- }
@@ -1,21 +0,0 @@
1
- import { ChangeDetectorRef, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { SkyThemeService } from './theme.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Component that works like `ngIf` to show markup for matching theme.
6
- *
7
- * If the directive is within a `skyTheme` directive, it uses settings from that directive.
8
- */
9
- export declare class SkyThemeIfDirective implements OnDestroy {
10
- #private;
11
- /**
12
- * A string that should match the name of a theme, `'default'` or `'modern'`.
13
- *
14
- * @param value
15
- */
16
- set skyThemeIf(value: 'default' | 'modern' | undefined);
17
- constructor(templateRef: TemplateRef<unknown>, viewContainer: ViewContainerRef, changeDetector: ChangeDetectorRef, themeSvc?: SkyThemeService);
18
- ngOnDestroy(): void;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeIfDirective, [null, null, null, { optional: true; }]>;
20
- static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeIfDirective, "[skyThemeIf]", never, { "skyThemeIf": { "alias": "skyThemeIf"; "required": false; }; }, {}, never, never, false, never>;
21
- }
@@ -1,32 +0,0 @@
1
- import { SkyThemeModeData } from './theme-serialization-types';
2
- /**
3
- * Defines properties of a SKY UX theme mode.
4
- */
5
- export declare class SkyThemeMode {
6
- readonly name: string;
7
- readonly hostClass: string;
8
- /**
9
- * The preset themes available in SKY UX.
10
- */
11
- static readonly presets: {
12
- light: SkyThemeMode;
13
- dark: SkyThemeMode;
14
- };
15
- /**
16
- * Creates a new theme mode.
17
- * @param name The name of the theme mode.
18
- * @param hostClass The class on the host element which child components should reference when
19
- * adjusting for a specified theme mode.
20
- */
21
- constructor(name: string, hostClass: string);
22
- /**
23
- * @internal
24
- * Serializes the theme mode to a JSON-compatible object.
25
- */
26
- serialize(): SkyThemeModeData;
27
- /**
28
- * @internal
29
- * Deserializes a JSON object to a SkyThemeMode instance.
30
- */
31
- static deserialize(data: SkyThemeModeData): SkyThemeMode;
32
- }