@skyux/theme 12.22.0 → 13.0.0-alpha.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.
- package/css/themes/modern/styles.css +18 -172
- package/fesm2022/skyux-theme.mjs +29 -30
- package/fesm2022/skyux-theme.mjs.map +1 -1
- package/index.d.ts +428 -20
- package/package.json +4 -4
- package/lib/icons/icon-manifest-glyph.d.ts +0 -1
- package/lib/icons/icon-manifest.d.ts +0 -5
- package/lib/icons/icon-manifest.service.d.ts +0 -14
- package/lib/providers/provide-initial-theme.d.ts +0 -8
- package/lib/style-loader.d.ts +0 -11
- package/lib/theme.module.d.ts +0 -9
- package/lib/theming/theme-brand.d.ts +0 -29
- package/lib/theming/theme-class.directive.d.ts +0 -29
- package/lib/theming/theme-component-class.directive.d.ts +0 -8
- package/lib/theming/theme-if.directive.d.ts +0 -21
- package/lib/theming/theme-mode.d.ts +0 -32
- package/lib/theming/theme-serialization-types.d.ts +0 -47
- package/lib/theming/theme-settings-change.d.ts +0 -15
- package/lib/theming/theme-settings.d.ts +0 -27
- package/lib/theming/theme-spacing.d.ts +0 -32
- package/lib/theming/theme.d.ts +0 -39
- package/lib/theming/theme.directive.d.ts +0 -18
- package/lib/theming/theme.service.d.ts +0 -60
- package/lib/viewport/viewport-reserve-args.d.ts +0 -22
- package/lib/viewport/viewport-reserve-position-type.d.ts +0 -4
- package/lib/viewport/viewport.service.d.ts +0 -29
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for theme serialization and deserialization.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Serialized representation of a SkyThemeMode.
|
|
6
|
-
*/
|
|
7
|
-
export interface SkyThemeModeData {
|
|
8
|
-
name: string;
|
|
9
|
-
hostClass?: string;
|
|
10
|
-
isPreset?: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Serialized representation of a SkyThemeSpacing.
|
|
14
|
-
*/
|
|
15
|
-
export interface SkyThemeSpacingData {
|
|
16
|
-
name: string;
|
|
17
|
-
hostClass?: string;
|
|
18
|
-
isPreset?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Serialized representation of a SkyThemeBrand.
|
|
22
|
-
*/
|
|
23
|
-
export interface SkyThemeBrandData {
|
|
24
|
-
name: string;
|
|
25
|
-
version: string;
|
|
26
|
-
hostClass?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Serialized representation of a SkyTheme.
|
|
30
|
-
*/
|
|
31
|
-
export interface SkyThemeData {
|
|
32
|
-
name: string;
|
|
33
|
-
hostClass?: string;
|
|
34
|
-
supportedModes: SkyThemeModeData[];
|
|
35
|
-
supportedSpacing?: SkyThemeSpacingData[];
|
|
36
|
-
supportsBranding?: boolean;
|
|
37
|
-
isPreset?: boolean;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Serialized representation of SkyThemeSettings (internal structure before JSON stringification).
|
|
41
|
-
*/
|
|
42
|
-
export interface SkyThemeSettingsData {
|
|
43
|
-
theme: SkyThemeData;
|
|
44
|
-
mode: SkyThemeModeData;
|
|
45
|
-
spacing?: SkyThemeSpacingData;
|
|
46
|
-
brand?: SkyThemeBrandData;
|
|
47
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SkyThemeSettings } from './theme-settings';
|
|
2
|
-
/**
|
|
3
|
-
* Describes a change to the current theme.
|
|
4
|
-
*/
|
|
5
|
-
export interface SkyThemeSettingsChange {
|
|
6
|
-
/**
|
|
7
|
-
* The theme settings being applied as a result of the change.
|
|
8
|
-
*/
|
|
9
|
-
currentSettings: SkyThemeSettings;
|
|
10
|
-
/**
|
|
11
|
-
* The theme settings being replaced as a result of the change. This is undefined if the theme
|
|
12
|
-
* settings are being set for the first time.
|
|
13
|
-
*/
|
|
14
|
-
previousSettings: SkyThemeSettings | undefined;
|
|
15
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SkyTheme } from './theme';
|
|
2
|
-
import { SkyThemeBrand } from './theme-brand';
|
|
3
|
-
import { SkyThemeMode } from './theme-mode';
|
|
4
|
-
import { SkyThemeSpacing } from './theme-spacing';
|
|
5
|
-
/**
|
|
6
|
-
* Specifies the theme and mode to be applied to a host element.
|
|
7
|
-
*/
|
|
8
|
-
export declare class SkyThemeSettings {
|
|
9
|
-
readonly theme: SkyTheme;
|
|
10
|
-
readonly mode: SkyThemeMode;
|
|
11
|
-
readonly spacing: SkyThemeSpacing;
|
|
12
|
-
readonly brand?: SkyThemeBrand | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a new SkyThemeSettings instance.
|
|
15
|
-
* @param theme The theme configuration.
|
|
16
|
-
* @param mode The theme mode.
|
|
17
|
-
*/
|
|
18
|
-
constructor(theme: SkyTheme, mode: SkyThemeMode, spacing?: SkyThemeSpacing, brand?: SkyThemeBrand | undefined);
|
|
19
|
-
/**
|
|
20
|
-
* Serializes the theme settings to a string.
|
|
21
|
-
*/
|
|
22
|
-
serialize(): string;
|
|
23
|
-
/**
|
|
24
|
-
* Deserializes a string to a SkyThemeSettings instance.
|
|
25
|
-
*/
|
|
26
|
-
static deserialize(value: string): SkyThemeSettings;
|
|
27
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { SkyThemeSpacingData } from './theme-serialization-types';
|
|
2
|
-
/**
|
|
3
|
-
* Defines properties of SKY UX theme spacing.
|
|
4
|
-
*/
|
|
5
|
-
export declare class SkyThemeSpacing {
|
|
6
|
-
readonly name: string;
|
|
7
|
-
readonly hostClass: string;
|
|
8
|
-
/**
|
|
9
|
-
* The preset spacing available in SKY UX.
|
|
10
|
-
*/
|
|
11
|
-
static readonly presets: {
|
|
12
|
-
standard: SkyThemeSpacing;
|
|
13
|
-
compact: SkyThemeSpacing;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new theme spacing.
|
|
17
|
-
* @param name The name of the theme spacing.
|
|
18
|
-
* @param hostClass The class on the host element which child components should reference when
|
|
19
|
-
* adjusting for a specified theme spacing.
|
|
20
|
-
*/
|
|
21
|
-
constructor(name: string, hostClass: string);
|
|
22
|
-
/**
|
|
23
|
-
* @internal
|
|
24
|
-
* Serializes the theme spacing to a JSON-compatible object.
|
|
25
|
-
*/
|
|
26
|
-
serialize(): SkyThemeSpacingData;
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
* Deserializes a JSON object to a SkyThemeSpacing instance.
|
|
30
|
-
*/
|
|
31
|
-
static deserialize(data: SkyThemeSpacingData): SkyThemeSpacing;
|
|
32
|
-
}
|
package/lib/theming/theme.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { SkyThemeMode } from './theme-mode';
|
|
2
|
-
import { SkyThemeData } from './theme-serialization-types';
|
|
3
|
-
import { SkyThemeSpacing } from './theme-spacing';
|
|
4
|
-
/**
|
|
5
|
-
* Defines properties of a SKY UX theme.
|
|
6
|
-
*/
|
|
7
|
-
export declare class SkyTheme {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly hostClass: string;
|
|
10
|
-
readonly supportedModes: SkyThemeMode[];
|
|
11
|
-
readonly supportedSpacing: SkyThemeSpacing[];
|
|
12
|
-
readonly supportsBranding: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The preset themes available in SKY UX.
|
|
15
|
-
*/
|
|
16
|
-
static readonly presets: {
|
|
17
|
-
default: SkyTheme;
|
|
18
|
-
modern: SkyTheme;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Creates a new theme.
|
|
22
|
-
* @param name The name of the theme.
|
|
23
|
-
* @param hostClass The class on the host element which child components should reference when
|
|
24
|
-
* adjusting for a specified theme.
|
|
25
|
-
* @param supportedModes An array of modes supported by the theme.
|
|
26
|
-
* @param supportedSpacing An array of spacing modes supported by the theme.
|
|
27
|
-
*/
|
|
28
|
-
constructor(name: string, hostClass: string, supportedModes: SkyThemeMode[], supportedSpacing?: SkyThemeSpacing[], supportsBranding?: boolean);
|
|
29
|
-
/**
|
|
30
|
-
* @internal
|
|
31
|
-
* Serializes the theme to a JSON-compatible object.
|
|
32
|
-
*/
|
|
33
|
-
serialize(): SkyThemeData;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
* Deserializes a JSON object to a SkyTheme instance.
|
|
37
|
-
*/
|
|
38
|
-
static deserialize(data: SkyThemeData): SkyTheme;
|
|
39
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
-
import { SkyThemeSettings } from './theme-settings';
|
|
3
|
-
import { SkyThemeService } from './theme.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Creates a new instance of `SkyThemeService` to allow a container
|
|
7
|
-
* to have its own theme.
|
|
8
|
-
*/
|
|
9
|
-
export declare class SkyThemeDirective implements OnInit, OnDestroy {
|
|
10
|
-
#private;
|
|
11
|
-
set skyTheme(value: SkyThemeSettings | undefined);
|
|
12
|
-
skyThemeOrDefault: SkyThemeSettings;
|
|
13
|
-
constructor(elRef: ElementRef, renderer: Renderer2, themeSvc: SkyThemeService);
|
|
14
|
-
ngOnInit(): void;
|
|
15
|
-
ngOnDestroy(): void;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeDirective, never>;
|
|
17
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyThemeDirective, "[skyTheme]", never, { "skyTheme": { "alias": "skyTheme"; "required": false; }; }, {}, never, never, false, never>;
|
|
18
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Renderer2 } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { SkyTheme } from './theme';
|
|
4
|
-
import { SkyThemeBrand } from './theme-brand';
|
|
5
|
-
import { SkyThemeMode } from './theme-mode';
|
|
6
|
-
import { SkyThemeSettings } from './theme-settings';
|
|
7
|
-
import { SkyThemeSettingsChange } from './theme-settings-change';
|
|
8
|
-
import { SkyThemeSpacing } from './theme-spacing';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* Provides methods for updating and handling changes to the current theme.
|
|
12
|
-
*/
|
|
13
|
-
export declare class SkyThemeService {
|
|
14
|
-
#private;
|
|
15
|
-
/**
|
|
16
|
-
* Notifies consumers when the current theme settings have changed.
|
|
17
|
-
*/
|
|
18
|
-
get settingsChange(): Observable<SkyThemeSettingsChange>;
|
|
19
|
-
constructor();
|
|
20
|
-
/**
|
|
21
|
-
* Initializes the theme service with the specified parameters. This should only be called
|
|
22
|
-
* from a host component that provides its own theme to child components.
|
|
23
|
-
* @param hostEl The host element under which themed components are rendered.
|
|
24
|
-
* @param renderer A Renderer2 instance for updating the host element with theme changes.
|
|
25
|
-
* @param theme The initial theme.
|
|
26
|
-
*/
|
|
27
|
-
init(hostEl: any, renderer: Renderer2, theme: SkyThemeSettings): void;
|
|
28
|
-
/**
|
|
29
|
-
* Destroys the current theme service. This should only be called from a host component that
|
|
30
|
-
* provides its own theme to child components.
|
|
31
|
-
*/
|
|
32
|
-
destroy(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Updates the current theme mode.
|
|
35
|
-
* @param mode The new theme mode to apply.
|
|
36
|
-
*/
|
|
37
|
-
setThemeMode(mode: SkyThemeMode): void;
|
|
38
|
-
/**
|
|
39
|
-
* Updates the current theme spacing.
|
|
40
|
-
* @param spacing The new theme spacing to apply.
|
|
41
|
-
*/
|
|
42
|
-
setThemeSpacing(spacing: SkyThemeSpacing): void;
|
|
43
|
-
/**
|
|
44
|
-
* Updates the current theme brand.
|
|
45
|
-
* @param brand The new theme brand to apply.
|
|
46
|
-
*/
|
|
47
|
-
setThemeBrand(brand: SkyThemeBrand): void;
|
|
48
|
-
/**
|
|
49
|
-
* Updates the current theme settings.
|
|
50
|
-
* @param settings The new theme settings to apply.
|
|
51
|
-
*/
|
|
52
|
-
setTheme(settings: SkyThemeSettings): void;
|
|
53
|
-
/**
|
|
54
|
-
* Updates the current theme.
|
|
55
|
-
* @param theme The new theme to apply.
|
|
56
|
-
*/
|
|
57
|
-
setTheme(theme: SkyTheme): void;
|
|
58
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeService, never>;
|
|
59
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SkyThemeService>;
|
|
60
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SkyAppViewportReservedPositionType } from './viewport-reserve-position-type';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export interface SkyAppViewportReserveArgs {
|
|
6
|
-
/**
|
|
7
|
-
* A unique ID for the component reserving space.
|
|
8
|
-
*/
|
|
9
|
-
id: string;
|
|
10
|
-
/**
|
|
11
|
-
* The position in the viewport where the space will be reserved.
|
|
12
|
-
*/
|
|
13
|
-
position: SkyAppViewportReservedPositionType;
|
|
14
|
-
/**
|
|
15
|
-
* The number of pixels to reserve.
|
|
16
|
-
*/
|
|
17
|
-
size: number;
|
|
18
|
-
/**
|
|
19
|
-
* Only reserve space when this element is in view.
|
|
20
|
-
*/
|
|
21
|
-
reserveForElement?: HTMLElement;
|
|
22
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ReplaySubject } from 'rxjs';
|
|
2
|
-
import { SkyAppViewportReserveArgs } from './viewport-reserve-args';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Provides information about the state of the application's viewport.
|
|
6
|
-
*/
|
|
7
|
-
export declare class SkyAppViewportService {
|
|
8
|
-
#private;
|
|
9
|
-
/**
|
|
10
|
-
* Updated when the viewport becomes visible. While the page is rendered, the
|
|
11
|
-
* viewport may remain hidden as fonts and styles are loaded asynchronously;
|
|
12
|
-
* this is done to avoid a FOUC (Flash Of Unstyled Content) before the fonts
|
|
13
|
-
* and styles are ready.
|
|
14
|
-
*/
|
|
15
|
-
visible: ReplaySubject<boolean>;
|
|
16
|
-
constructor();
|
|
17
|
-
/**
|
|
18
|
-
* Reserves space for components docked to the left, top, right, or bottom of the viewport.
|
|
19
|
-
* @param args
|
|
20
|
-
*/
|
|
21
|
-
reserveSpace(args: SkyAppViewportReserveArgs): void;
|
|
22
|
-
/**
|
|
23
|
-
* Removes reserved space for a component by the ID provided when it was reserved.
|
|
24
|
-
* @param id
|
|
25
|
-
*/
|
|
26
|
-
unreserveSpace(id: string): void;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppViewportService, never>;
|
|
28
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SkyAppViewportService>;
|
|
29
|
-
}
|