@skyux/theme 13.0.0-alpha.0 → 13.0.0-alpha.10
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/sky.css +193 -128
- package/css/themes/modern/styles.css +1026 -1704
- package/fesm2022/skyux-theme.mjs +220 -61
- package/fesm2022/skyux-theme.mjs.map +1 -1
- package/index.d.ts +67 -32
- package/package.json +15 -3
- package/scss/_compat/_mixins.scss +6 -3
- package/scss/_compat/_variables.scss +2 -0
- package/scss/component-theme.scss +112 -0
- package/scss/mixins.scss +3 -206
- package/scss/responsive.scss +97 -0
- package/scss/themes/modern/_compat/_mixins.scss +2 -0
- package/scss/themes/modern/_compat/_variables.scss +2 -0
- package/scss/variables.scss +2 -1
package/index.d.ts
CHANGED
|
@@ -21,9 +21,64 @@ declare class SkyThemeIconManifestService {
|
|
|
21
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<SkyThemeIconManifestService>;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
* Defines properties for a mask icon.
|
|
27
|
+
*/
|
|
28
|
+
interface SkyThemeBrandMaskIcon {
|
|
29
|
+
/**
|
|
30
|
+
* The URL of the mask icon.
|
|
31
|
+
*/
|
|
32
|
+
url: string;
|
|
33
|
+
/**
|
|
34
|
+
* The color of the mask icon.
|
|
35
|
+
*/
|
|
36
|
+
color: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
* Defines properties of SKY UX theme branding.
|
|
41
|
+
*/
|
|
42
|
+
declare class SkyThemeBrand {
|
|
43
|
+
#private;
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly version: string;
|
|
46
|
+
readonly styleUrl?: string | undefined;
|
|
47
|
+
readonly sriHash?: string | undefined;
|
|
48
|
+
readonly title?: string | undefined;
|
|
49
|
+
readonly faviconUrl?: string | undefined;
|
|
50
|
+
readonly maskIcon?: SkyThemeBrandMaskIcon | undefined;
|
|
51
|
+
get hostClass(): string;
|
|
52
|
+
private set hostClass(value);
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new theme brand.
|
|
55
|
+
* @param name The name of the theme brand.
|
|
56
|
+
* @param version The version of the theme brand.
|
|
57
|
+
* @param hostClass The class on the host element which child components should reference when
|
|
58
|
+
* adjusting for a specified theme brand. This defaults to `sky-theme-brand-<name>`
|
|
59
|
+
* @param styleUrl The URL of the stylesheet to load for this brand
|
|
60
|
+
* @param sriHash The subresource integrity hash for the stylesheet
|
|
61
|
+
* @param title The title to display for this brand
|
|
62
|
+
* @param faviconUrl The URL of the favicon to use for this brand
|
|
63
|
+
* @param maskIcon The mask icon configuration for this brand
|
|
64
|
+
*/
|
|
65
|
+
constructor(name: string, version: string, hostClass?: string, styleUrl?: string | undefined, sriHash?: string | undefined, title?: string | undefined, faviconUrl?: string | undefined, maskIcon?: SkyThemeBrandMaskIcon | undefined);
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* Serializes the theme brand to a JSON-compatible object.
|
|
69
|
+
*/
|
|
70
|
+
serialize(): SkyThemeBrandData;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
* Deserializes a JSON object to a SkyThemeBrand instance.
|
|
74
|
+
*/
|
|
75
|
+
static deserialize(data: SkyThemeBrandData): SkyThemeBrand;
|
|
76
|
+
}
|
|
77
|
+
|
|
24
78
|
/**
|
|
25
79
|
* Type definitions for theme serialization and deserialization.
|
|
26
80
|
*/
|
|
81
|
+
|
|
27
82
|
/**
|
|
28
83
|
* Serialized representation of a SkyThemeMode.
|
|
29
84
|
*/
|
|
@@ -47,6 +102,11 @@ interface SkyThemeBrandData {
|
|
|
47
102
|
name: string;
|
|
48
103
|
version: string;
|
|
49
104
|
hostClass?: string;
|
|
105
|
+
styleUrl?: string;
|
|
106
|
+
sriHash?: string;
|
|
107
|
+
title?: string;
|
|
108
|
+
faviconUrl?: string;
|
|
109
|
+
maskIcon?: SkyThemeBrandMaskIcon;
|
|
50
110
|
}
|
|
51
111
|
/**
|
|
52
112
|
* Serialized representation of a SkyTheme.
|
|
@@ -161,35 +221,6 @@ declare class SkyTheme {
|
|
|
161
221
|
static deserialize(data: SkyThemeData): SkyTheme;
|
|
162
222
|
}
|
|
163
223
|
|
|
164
|
-
/**
|
|
165
|
-
* @internal
|
|
166
|
-
* Defines properties of SKY UX theme branding.
|
|
167
|
-
*/
|
|
168
|
-
declare class SkyThemeBrand {
|
|
169
|
-
#private;
|
|
170
|
-
readonly name: string;
|
|
171
|
-
readonly version: string;
|
|
172
|
-
get hostClass(): string;
|
|
173
|
-
private set hostClass(value);
|
|
174
|
-
/**
|
|
175
|
-
* Creates a new theme brand.
|
|
176
|
-
* @param name The name of the theme brand.
|
|
177
|
-
* @param hostClass The class on the host element which child components should reference when
|
|
178
|
-
* adjusting for a specified theme brand. This defaults to `sky-theme-brand-<name>
|
|
179
|
-
*/
|
|
180
|
-
constructor(name: string, version: string, hostClass?: string);
|
|
181
|
-
/**
|
|
182
|
-
* @internal
|
|
183
|
-
* Serializes the theme brand to a JSON-compatible object.
|
|
184
|
-
*/
|
|
185
|
-
serialize(): SkyThemeBrandData;
|
|
186
|
-
/**
|
|
187
|
-
* @internal
|
|
188
|
-
* Deserializes a JSON object to a SkyThemeBrand instance.
|
|
189
|
-
*/
|
|
190
|
-
static deserialize(data: SkyThemeBrandData): SkyThemeBrand;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
224
|
/**
|
|
194
225
|
* Specifies the theme and mode to be applied to a host element.
|
|
195
226
|
*/
|
|
@@ -245,8 +276,10 @@ declare class SkyThemeService {
|
|
|
245
276
|
* @param hostEl The host element under which themed components are rendered.
|
|
246
277
|
* @param renderer A Renderer2 instance for updating the host element with theme changes.
|
|
247
278
|
* @param theme The initial theme.
|
|
279
|
+
* @param registeredBrands An initial set of brands to register. Additional brands can
|
|
280
|
+
* be registered later via the registerBrand() method.
|
|
248
281
|
*/
|
|
249
|
-
init(hostEl: any, renderer: Renderer2, theme: SkyThemeSettings): void;
|
|
282
|
+
init(hostEl: any, renderer: Renderer2, theme: SkyThemeSettings, registeredBrands?: SkyThemeBrand[]): void;
|
|
250
283
|
/**
|
|
251
284
|
* Destroys the current theme service. This should only be called from a host component that
|
|
252
285
|
* provides its own theme to child components.
|
|
@@ -264,9 +297,9 @@ declare class SkyThemeService {
|
|
|
264
297
|
setThemeSpacing(spacing: SkyThemeSpacing): void;
|
|
265
298
|
/**
|
|
266
299
|
* Updates the current theme brand.
|
|
267
|
-
* @param brand The new theme brand to apply.
|
|
300
|
+
* @param brand The new theme brand to apply, or undefined to clear the current brand.
|
|
268
301
|
*/
|
|
269
|
-
setThemeBrand(brand: SkyThemeBrand): void;
|
|
302
|
+
setThemeBrand(brand: SkyThemeBrand | undefined): void;
|
|
270
303
|
/**
|
|
271
304
|
* Updates the current theme settings.
|
|
272
305
|
* @param settings The new theme settings to apply.
|
|
@@ -277,6 +310,8 @@ declare class SkyThemeService {
|
|
|
277
310
|
* @param theme The new theme to apply.
|
|
278
311
|
*/
|
|
279
312
|
setTheme(theme: SkyTheme): void;
|
|
313
|
+
registerBrand(brand: SkyThemeBrand): void;
|
|
314
|
+
unregisterBrand(name: string): void;
|
|
280
315
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyThemeService, never>;
|
|
281
316
|
static ɵprov: i0.ɵɵInjectableDeclaration<SkyThemeService>;
|
|
282
317
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/theme",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.10",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@angular/core": "^20.0.5"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@blackbaud/skyux-design-tokens": "0.0.
|
|
24
|
-
"@skyux/icons": "
|
|
23
|
+
"@blackbaud/skyux-design-tokens": "3.0.0-alpha.3",
|
|
24
|
+
"@skyux/icons": "9.0.0",
|
|
25
25
|
"fontfaceobserver": "2.3.0",
|
|
26
26
|
"tslib": "^2.8.1"
|
|
27
27
|
},
|
|
@@ -48,12 +48,24 @@
|
|
|
48
48
|
"./css/themes/modern/styles.css": {
|
|
49
49
|
"default": "./css/themes/modern/styles.css"
|
|
50
50
|
},
|
|
51
|
+
"./scss/component-theme": {
|
|
52
|
+
"default": "./scss/component-theme.scss"
|
|
53
|
+
},
|
|
54
|
+
"./scss/component-theme.scss": {
|
|
55
|
+
"default": "./scss/component-theme.scss"
|
|
56
|
+
},
|
|
51
57
|
"./scss/mixins": {
|
|
52
58
|
"default": "./scss/mixins.scss"
|
|
53
59
|
},
|
|
54
60
|
"./scss/mixins.scss": {
|
|
55
61
|
"default": "./scss/mixins.scss"
|
|
56
62
|
},
|
|
63
|
+
"./scss/responsive": {
|
|
64
|
+
"default": "./scss/responsive.scss"
|
|
65
|
+
},
|
|
66
|
+
"./scss/responsive.scss": {
|
|
67
|
+
"default": "./scss/responsive.scss"
|
|
68
|
+
},
|
|
57
69
|
"./scss/variables": {
|
|
58
70
|
"default": "./scss/variables.scss"
|
|
59
71
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @internal
|
|
2
|
+
|
|
1
3
|
@use '../variables' as vars;
|
|
2
4
|
@use 'variables' as compatVars;
|
|
3
5
|
@use 'sass:color';
|
|
@@ -54,10 +56,11 @@
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
@mixin sky-danger {
|
|
57
|
-
content: '
|
|
58
|
-
|
|
59
|
+
content: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGNsYXNzPSJza3ktaS1wYXRoLTEiIGQ9Ik0xNC4wNDM3IDMuMTgxODJDMTQuOTEzMiAxLjYwNjA2IDE3LjA4NjggMS42MDYwNiAxNy45NTYzIDMuMTgxODJMMjkuNjk0IDI0LjQ1NDVDMzAuNTYzNSAyNi4wMzAzIDI5LjQ3NjYgMjggMjcuNzM3NyAyOEg0LjI2MjI5QzIuNTIzMzcgMjggMS40MzY1NSAyNi4wMzAzIDIuMzA2MDEgMjQuNDU0NUwxNC4wNDM3IDMuMTgxODJaIiBmaWxsPSIjRUY0MDQ0Ii8+CjxwYXRoIGNsYXNzPSJza3ktaS1wYXRoLTIiIGQ9Ik0xNC42MTA0IDEwLjM4MzRIMTcuNDgxNkwxNy4xNjg3IDE4Ljc5NDVIMTQuOTIzM0wxNC42MTA0IDEwLjM4MzRaTTE1Ljk5MDggMjMuNjE2NkMxNS41NzM2IDIzLjYxNjYgMTUuMjE3OCAyMy40NjkzIDE0LjkyMzMgMjMuMTc0OEMxNC42NDExIDIyLjg4MDQgMTQuNSAyMi41MjQ1IDE0LjUgMjIuMTA3NEMxNC41IDIxLjY5MDIgMTQuNjQxMSAyMS4zMzQ0IDE0LjkyMzMgMjEuMDM5OUMxNS4yMTc4IDIwLjc0NTQgMTUuNTczNiAyMC41OTgyIDE1Ljk5MDggMjAuNTk4MkMxNi40MDggMjAuNTk4MiAxNi43NjM4IDIwLjc0NTQgMTcuMDU4MyAyMS4wMzk5QzE3LjM1MjggMjEuMzM0NCAxNy41IDIxLjY5MDIgMTcuNSAyMi4xMDc0QzE3LjUgMjIuNTI0NSAxNy4zNTI4IDIyLjg4MDQgMTcuMDU4MyAyMy4xNzQ4QzE2Ljc3NjEgMjMuNDY5MyAxNi40MjAyIDIzLjYxNjYgMTUuOTkwOCAyMy42MTY2WiIgZmlsbD0iI0ZGRkZGRiIvPgo8L3N2Zz4K');
|
|
60
|
+
display: inline-block;
|
|
61
|
+
width: var(--sky-size-icon-s, 16px);
|
|
62
|
+
vertical-align: middle;
|
|
59
63
|
margin-right: 5px;
|
|
60
|
-
color: var(--sky-highlight-color-danger);
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
@mixin sky-dropdown-item-btn {
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// @internal
|
|
2
|
+
|
|
3
|
+
@use 'responsive' as res;
|
|
4
|
+
|
|
5
|
+
@mixin sky-component($theme, $selector, $encapsulate: true, $breakpoint: '') {
|
|
6
|
+
@if $breakpoint == '' {
|
|
7
|
+
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
8
|
+
@content;
|
|
9
|
+
}
|
|
10
|
+
} @else if $breakpoint == 'xs' {
|
|
11
|
+
@include res.sky-host-responsive-container-xs-min($encapsulate) {
|
|
12
|
+
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
13
|
+
@content;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
} @else if $breakpoint == 'sm' {
|
|
17
|
+
@include res.sky-host-responsive-container-sm-min($encapsulate) {
|
|
18
|
+
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
19
|
+
@content;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
} @else if $breakpoint == 'md' {
|
|
23
|
+
@include res.sky-host-responsive-container-md-min($encapsulate) {
|
|
24
|
+
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
25
|
+
@content;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
} @else if $breakpoint == 'lg' {
|
|
29
|
+
@include res.sky-host-responsive-container-lg-min($encapsulate) {
|
|
30
|
+
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
31
|
+
@content;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin sky-component-theme($theme, $selector, $encapsulate: true) {
|
|
38
|
+
@if $theme == 'modern' {
|
|
39
|
+
@if $encapsulate {
|
|
40
|
+
:host-context(.sky-theme-modern) #{$selector} {
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
} @else {
|
|
44
|
+
.sky-theme-modern #{$selector} {
|
|
45
|
+
@content;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
} @else {
|
|
49
|
+
#{$selector}:not(.sky-theme-modern *) {
|
|
50
|
+
@content;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin sky-component-host(
|
|
56
|
+
$theme,
|
|
57
|
+
$selector: ':host',
|
|
58
|
+
$encapsulate: true,
|
|
59
|
+
$breakpoint: ''
|
|
60
|
+
) {
|
|
61
|
+
@if $breakpoint == '' {
|
|
62
|
+
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
63
|
+
@content;
|
|
64
|
+
}
|
|
65
|
+
} @else if $breakpoint == 'xs' {
|
|
66
|
+
@include res.sky-host-responsive-container-xs-min($encapsulate) {
|
|
67
|
+
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
68
|
+
@content;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
} @else if $breakpoint == 'sm' {
|
|
72
|
+
@include res.sky-host-responsive-container-sm-min($encapsulate) {
|
|
73
|
+
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
74
|
+
@content;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
} @else if $breakpoint == 'md' {
|
|
78
|
+
@include res.sky-host-responsive-container-md-min($encapsulate) {
|
|
79
|
+
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
80
|
+
@content;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
} @else if $breakpoint == 'lg' {
|
|
84
|
+
@include res.sky-host-responsive-container-lg-min($encapsulate) {
|
|
85
|
+
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
86
|
+
@content;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@mixin sky-component-host-theme(
|
|
93
|
+
$theme,
|
|
94
|
+
$selector: ':host',
|
|
95
|
+
$encapsulate: true
|
|
96
|
+
) {
|
|
97
|
+
@if $theme == 'default' {
|
|
98
|
+
#{$selector}.sky-cmp-theme-default {
|
|
99
|
+
@content;
|
|
100
|
+
}
|
|
101
|
+
} @else {
|
|
102
|
+
@if $encapsulate {
|
|
103
|
+
:host-context(.sky-theme-modern) #{$selector}.sky-cmp-theme-modern {
|
|
104
|
+
@content;
|
|
105
|
+
}
|
|
106
|
+
} @else {
|
|
107
|
+
.sky-theme-modern #{$selector}.sky-cmp-theme-modern {
|
|
108
|
+
@content;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
package/scss/mixins.scss
CHANGED
|
@@ -1,214 +1,11 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @internal
|
|
2
2
|
|
|
3
3
|
@forward '@blackbaud/skyux-design-tokens/scss/mixins';
|
|
4
|
+
@forward 'component-theme';
|
|
5
|
+
@forward 'responsive';
|
|
4
6
|
|
|
5
7
|
@use 'variables' as vars;
|
|
6
8
|
|
|
7
|
-
@mixin sky-host-responsive-container-xs-min($encapsulate: true) {
|
|
8
|
-
@if $encapsulate {
|
|
9
|
-
:host {
|
|
10
|
-
@content;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host-context(.sky-responsive-container-xs),
|
|
14
|
-
:host-context(.sky-responsive-container-sm),
|
|
15
|
-
:host-context(.sky-responsive-container-md),
|
|
16
|
-
:host-context(.sky-responsive-container-lg) {
|
|
17
|
-
@content;
|
|
18
|
-
}
|
|
19
|
-
} @else {
|
|
20
|
-
@content;
|
|
21
|
-
|
|
22
|
-
.sky-responsive-container-xs,
|
|
23
|
-
.sky-responsive-container-sm,
|
|
24
|
-
.sky-responsive-container-md,
|
|
25
|
-
.sky-responsive-container-lg {
|
|
26
|
-
@content;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@mixin sky-host-responsive-container-sm-min($encapsulate: true) {
|
|
32
|
-
@if $encapsulate {
|
|
33
|
-
@media (min-width: vars.$sky-screen-sm-min) {
|
|
34
|
-
:host {
|
|
35
|
-
@content;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host-context(.sky-responsive-container-sm),
|
|
40
|
-
:host-context(.sky-responsive-container-md),
|
|
41
|
-
:host-context(.sky-responsive-container-lg) {
|
|
42
|
-
@content;
|
|
43
|
-
}
|
|
44
|
-
} @else {
|
|
45
|
-
@media (min-width: vars.$sky-screen-sm-min) {
|
|
46
|
-
@content;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.sky-responsive-container-sm,
|
|
50
|
-
.sky-responsive-container-md,
|
|
51
|
-
.sky-responsive-container-lg {
|
|
52
|
-
@content;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@mixin sky-host-responsive-container-md-min($encapsulate: true) {
|
|
58
|
-
@if $encapsulate {
|
|
59
|
-
@media (min-width: vars.$sky-screen-md-min) {
|
|
60
|
-
:host {
|
|
61
|
-
@content;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host-context(.sky-responsive-container-md),
|
|
66
|
-
:host-context(.sky-responsive-container-lg) {
|
|
67
|
-
@content;
|
|
68
|
-
}
|
|
69
|
-
} @else {
|
|
70
|
-
@media (min-width: vars.$sky-screen-md-min) {
|
|
71
|
-
@content;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.sky-responsive-container-md,
|
|
75
|
-
.sky-responsive-container-lg {
|
|
76
|
-
@content;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@mixin sky-host-responsive-container-lg-min($encapsulate: true) {
|
|
82
|
-
@if $encapsulate {
|
|
83
|
-
@media (min-width: vars.$sky-screen-lg-min) {
|
|
84
|
-
:host {
|
|
85
|
-
@content;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:host-context(.sky-responsive-container-lg) {
|
|
90
|
-
@content;
|
|
91
|
-
}
|
|
92
|
-
} @else {
|
|
93
|
-
@media (min-width: vars.$sky-screen-lg-min) {
|
|
94
|
-
@content;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.sky-responsive-container-lg {
|
|
98
|
-
@content;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@mixin sky-component($theme, $selector, $encapsulate: true, $breakpoint: '') {
|
|
104
|
-
@if $breakpoint == '' {
|
|
105
|
-
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
106
|
-
@content;
|
|
107
|
-
}
|
|
108
|
-
} @else if $breakpoint == 'xs' {
|
|
109
|
-
@include sky-host-responsive-container-xs-min($encapsulate) {
|
|
110
|
-
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
111
|
-
@content;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
} @else if $breakpoint == 'sm' {
|
|
115
|
-
@include sky-host-responsive-container-sm-min($encapsulate) {
|
|
116
|
-
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
117
|
-
@content;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
} @else if $breakpoint == 'md' {
|
|
121
|
-
@include sky-host-responsive-container-md-min($encapsulate) {
|
|
122
|
-
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
123
|
-
@content;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
} @else if $breakpoint == 'lg' {
|
|
127
|
-
@include sky-host-responsive-container-lg-min($encapsulate) {
|
|
128
|
-
@include sky-component-theme($theme, $selector, $encapsulate) {
|
|
129
|
-
@content;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@mixin sky-component-theme($theme, $selector, $encapsulate: true) {
|
|
136
|
-
@if $theme == 'modern' {
|
|
137
|
-
@if $encapsulate {
|
|
138
|
-
:host-context(.sky-theme-modern) #{$selector} {
|
|
139
|
-
@content;
|
|
140
|
-
}
|
|
141
|
-
} @else {
|
|
142
|
-
.sky-theme-modern #{$selector} {
|
|
143
|
-
@content;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
} @else {
|
|
147
|
-
#{$selector}:not(.sky-theme-modern *) {
|
|
148
|
-
@content;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
@mixin sky-component-host(
|
|
154
|
-
$theme,
|
|
155
|
-
$selector: ':host',
|
|
156
|
-
$encapsulate: true,
|
|
157
|
-
$breakpoint: ''
|
|
158
|
-
) {
|
|
159
|
-
@if $breakpoint == '' {
|
|
160
|
-
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
161
|
-
@content;
|
|
162
|
-
}
|
|
163
|
-
} @else if $breakpoint == 'xs' {
|
|
164
|
-
@include sky-host-responsive-container-xs-min($encapsulate) {
|
|
165
|
-
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
166
|
-
@content;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
} @else if $breakpoint == 'sm' {
|
|
170
|
-
@include sky-host-responsive-container-sm-min($encapsulate) {
|
|
171
|
-
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
172
|
-
@content;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
} @else if $breakpoint == 'md' {
|
|
176
|
-
@include sky-host-responsive-container-md-min($encapsulate) {
|
|
177
|
-
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
178
|
-
@content;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
} @else if $breakpoint == 'lg' {
|
|
182
|
-
@include sky-host-responsive-container-lg-min($encapsulate) {
|
|
183
|
-
@include sky-component-host-theme($theme, $selector, $encapsulate) {
|
|
184
|
-
@content;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
@mixin sky-component-host-theme(
|
|
191
|
-
$theme,
|
|
192
|
-
$selector: ':host',
|
|
193
|
-
$encapsulate: true
|
|
194
|
-
) {
|
|
195
|
-
@if $theme == 'default' {
|
|
196
|
-
#{$selector}.sky-cmp-theme-default {
|
|
197
|
-
@content;
|
|
198
|
-
}
|
|
199
|
-
} @else {
|
|
200
|
-
@if $encapsulate {
|
|
201
|
-
:host-context(.sky-theme-modern) #{$selector}.sky-cmp-theme-modern {
|
|
202
|
-
@content;
|
|
203
|
-
}
|
|
204
|
-
} @else {
|
|
205
|
-
.sky-theme-modern #{$selector}.sky-cmp-theme-modern {
|
|
206
|
-
@content;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
9
|
@mixin sky-theme-modern {
|
|
213
10
|
:host-context(.sky-theme-modern) {
|
|
214
11
|
@content;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@use 'variables' as vars;
|
|
2
|
+
|
|
3
|
+
@mixin sky-host-responsive-container-xs-min($encapsulate: true) {
|
|
4
|
+
@if $encapsulate {
|
|
5
|
+
:host {
|
|
6
|
+
@content;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host-context(.sky-responsive-container-xs),
|
|
10
|
+
:host-context(.sky-responsive-container-sm),
|
|
11
|
+
:host-context(.sky-responsive-container-md),
|
|
12
|
+
:host-context(.sky-responsive-container-lg) {
|
|
13
|
+
@content;
|
|
14
|
+
}
|
|
15
|
+
} @else {
|
|
16
|
+
@content;
|
|
17
|
+
|
|
18
|
+
.sky-responsive-container-xs,
|
|
19
|
+
.sky-responsive-container-sm,
|
|
20
|
+
.sky-responsive-container-md,
|
|
21
|
+
.sky-responsive-container-lg {
|
|
22
|
+
@content;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin sky-host-responsive-container-sm-min($encapsulate: true) {
|
|
28
|
+
@if $encapsulate {
|
|
29
|
+
@media (min-width: vars.$sky-screen-sm-min) {
|
|
30
|
+
:host {
|
|
31
|
+
@content;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host-context(.sky-responsive-container-sm),
|
|
36
|
+
:host-context(.sky-responsive-container-md),
|
|
37
|
+
:host-context(.sky-responsive-container-lg) {
|
|
38
|
+
@content;
|
|
39
|
+
}
|
|
40
|
+
} @else {
|
|
41
|
+
@media (min-width: vars.$sky-screen-sm-min) {
|
|
42
|
+
@content;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sky-responsive-container-sm,
|
|
46
|
+
.sky-responsive-container-md,
|
|
47
|
+
.sky-responsive-container-lg {
|
|
48
|
+
@content;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@mixin sky-host-responsive-container-md-min($encapsulate: true) {
|
|
54
|
+
@if $encapsulate {
|
|
55
|
+
@media (min-width: vars.$sky-screen-md-min) {
|
|
56
|
+
:host {
|
|
57
|
+
@content;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:host-context(.sky-responsive-container-md),
|
|
62
|
+
:host-context(.sky-responsive-container-lg) {
|
|
63
|
+
@content;
|
|
64
|
+
}
|
|
65
|
+
} @else {
|
|
66
|
+
@media (min-width: vars.$sky-screen-md-min) {
|
|
67
|
+
@content;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.sky-responsive-container-md,
|
|
71
|
+
.sky-responsive-container-lg {
|
|
72
|
+
@content;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@mixin sky-host-responsive-container-lg-min($encapsulate: true) {
|
|
78
|
+
@if $encapsulate {
|
|
79
|
+
@media (min-width: vars.$sky-screen-lg-min) {
|
|
80
|
+
:host {
|
|
81
|
+
@content;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host-context(.sky-responsive-container-lg) {
|
|
86
|
+
@content;
|
|
87
|
+
}
|
|
88
|
+
} @else {
|
|
89
|
+
@media (min-width: vars.$sky-screen-lg-min) {
|
|
90
|
+
@content;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.sky-responsive-container-lg {
|
|
94
|
+
@content;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
package/scss/variables.scss
CHANGED