bernova 1.7.9 → 1.7.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/CHANGELOG.md +6 -0
- package/dist/src/lib/generateProvider/template/providerTemplate-link.js +6 -3
- package/dist/src/lib/generateProvider/template/providerTemplate-style.js +6 -3
- package/dist/src/lib/generateProvider/template/providerTemplate.d.ts +7 -3
- package/dist/types/lib/generateProvider/template/providerTemplate-link.d.ts +3 -3
- package/dist/types/lib/generateProvider/template/providerTemplate-style.d.ts +3 -3
- package/package.json +1 -1
- package/src/lib/generateProvider/template/providerTemplate-link.js +6 -3
- package/src/lib/generateProvider/template/providerTemplate-style.js +6 -3
- package/src/lib/generateProvider/template/providerTemplate.d.ts +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -55,7 +55,7 @@ export class $_Provider_$ {
|
|
|
55
55
|
};
|
|
56
56
|
/* Bernova provider methods */
|
|
57
57
|
|
|
58
|
-
constructor({ linkId, jsInCss } = {}) {
|
|
58
|
+
constructor({ linkId, jsInCss, currentTheme } = {}) {
|
|
59
59
|
this.#themes = cssThemes;
|
|
60
60
|
this.#themesVariables = cssVars;
|
|
61
61
|
this.#themesClassNames = cssClasses;
|
|
@@ -63,7 +63,10 @@ export class $_Provider_$ {
|
|
|
63
63
|
this.#themesGlobalStyles = cssGlobalStyles;
|
|
64
64
|
this.#themesMediaQueries = cssMediaQueries;
|
|
65
65
|
this.#linkId = linkId || 'kb-styled-link';
|
|
66
|
-
this.#currentTheme =
|
|
66
|
+
this.#currentTheme =
|
|
67
|
+
currentTheme in this.#themes
|
|
68
|
+
? currentTheme
|
|
69
|
+
: Object.keys(this.#themes)[0];
|
|
67
70
|
this.#jsInCss = !!jsInCss;
|
|
68
71
|
this.getComponentStyles = this.getComponentStyles.bind(this);
|
|
69
72
|
|
|
@@ -82,7 +85,7 @@ export class $_Provider_$ {
|
|
|
82
85
|
return this.#currentTheme;
|
|
83
86
|
}
|
|
84
87
|
set themeSelected(themeName) {
|
|
85
|
-
if (themeName in this.#themes) {
|
|
88
|
+
if (themeName in this.#themes && themeName !== this.#currentTheme) {
|
|
86
89
|
if (this.#jsInCss) {
|
|
87
90
|
this.#cleanUpLinks();
|
|
88
91
|
this.#handlerThemes(this.#themes[themeName]);
|
|
@@ -40,7 +40,7 @@ export class $_Provider_$ {
|
|
|
40
40
|
};
|
|
41
41
|
/* Bernova provider methods */
|
|
42
42
|
|
|
43
|
-
constructor({ linkId, jsInCss } = {}) {
|
|
43
|
+
constructor({ linkId, jsInCss, currentTheme } = {}) {
|
|
44
44
|
this.#themes = cssThemes;
|
|
45
45
|
this.#themesVariables = cssVars;
|
|
46
46
|
this.#themesClassNames = cssClasses;
|
|
@@ -48,7 +48,10 @@ export class $_Provider_$ {
|
|
|
48
48
|
this.#themesGlobalStyles = cssGlobalStyles;
|
|
49
49
|
this.#themesMediaQueries = cssMediaQueries;
|
|
50
50
|
this.#linkId = linkId || 'kb-styled-link';
|
|
51
|
-
this.#currentTheme =
|
|
51
|
+
this.#currentTheme =
|
|
52
|
+
currentTheme in this.#themes
|
|
53
|
+
? currentTheme
|
|
54
|
+
: Object.keys(this.#themes)[0];
|
|
52
55
|
this.#jsInCss = !!jsInCss;
|
|
53
56
|
this.getComponentStyles = this.getComponentStyles.bind(this);
|
|
54
57
|
|
|
@@ -67,7 +70,7 @@ export class $_Provider_$ {
|
|
|
67
70
|
return this.#currentTheme;
|
|
68
71
|
}
|
|
69
72
|
set themeSelected(themeName) {
|
|
70
|
-
if (themeName in this.#themes) {
|
|
73
|
+
if (themeName in this.#themes && themeName !== this.#currentTheme) {
|
|
71
74
|
if (this.#jsInCss) {
|
|
72
75
|
this.#cleanUpLinks();
|
|
73
76
|
this.#handlerThemes(this.#themes[themeName]);
|
|
@@ -41,18 +41,22 @@ export declare class $_Provider_$ {
|
|
|
41
41
|
#cleanUpLinks: () => void;
|
|
42
42
|
/* Bernova provider methods */
|
|
43
43
|
|
|
44
|
-
constructor(options?: {
|
|
44
|
+
constructor(options?: {
|
|
45
|
+
linkId?: string;
|
|
46
|
+
jsInCss?: boolean;
|
|
47
|
+
currentTheme?: ThemesKeys;
|
|
48
|
+
});
|
|
45
49
|
|
|
46
50
|
get themeSelected(): string | null;
|
|
47
51
|
get allThemesNames(): string[];
|
|
48
|
-
get allThemes(): Record<
|
|
52
|
+
get allThemes(): Record<ThemesKeys, string>;
|
|
49
53
|
get variables(): VarFromTheme;
|
|
50
54
|
get classNames(): ClassNameFromTheme;
|
|
51
55
|
get components(): ComponentsFromTheme;
|
|
52
56
|
get globalStyles(): GlobalStylesFromThemes;
|
|
53
57
|
get mediaQueries(): MediaQueriesFromThemes;
|
|
54
58
|
|
|
55
|
-
set themeSelected(themeName:
|
|
59
|
+
set themeSelected(themeName: ThemesKeys);
|
|
56
60
|
|
|
57
61
|
getComponentStyles<T extends ComponentsKey>(params: {
|
|
58
62
|
variant?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export class $_Provider_$ {
|
|
2
|
-
constructor({ linkId, jsInCss }?: {});
|
|
2
|
+
constructor({ linkId, jsInCss, currentTheme }?: {});
|
|
3
3
|
getComponentStyles({ variant, component, additionalClassNames }: {
|
|
4
4
|
variant: any;
|
|
5
5
|
component: any;
|
|
6
6
|
additionalClassNames: any;
|
|
7
7
|
}): {};
|
|
8
|
-
set themeSelected(themeName:
|
|
9
|
-
get themeSelected():
|
|
8
|
+
set themeSelected(themeName: any);
|
|
9
|
+
get themeSelected(): any;
|
|
10
10
|
get allThemesNames(): string[];
|
|
11
11
|
get allThemes(): any;
|
|
12
12
|
get variables(): any;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export class $_Provider_$ {
|
|
2
|
-
constructor({ linkId, jsInCss }?: {});
|
|
2
|
+
constructor({ linkId, jsInCss, currentTheme }?: {});
|
|
3
3
|
getComponentStyles({ variant, component, additionalClassNames }: {
|
|
4
4
|
variant: any;
|
|
5
5
|
component: any;
|
|
6
6
|
additionalClassNames: any;
|
|
7
7
|
}): {};
|
|
8
|
-
set themeSelected(themeName:
|
|
9
|
-
get themeSelected():
|
|
8
|
+
set themeSelected(themeName: any);
|
|
9
|
+
get themeSelected(): any;
|
|
10
10
|
get allThemesNames(): string[];
|
|
11
11
|
get allThemes(): any;
|
|
12
12
|
get variables(): any;
|
package/package.json
CHANGED
|
@@ -55,7 +55,7 @@ export class $_Provider_$ {
|
|
|
55
55
|
};
|
|
56
56
|
/* Bernova provider methods */
|
|
57
57
|
|
|
58
|
-
constructor({ linkId, jsInCss } = {}) {
|
|
58
|
+
constructor({ linkId, jsInCss, currentTheme } = {}) {
|
|
59
59
|
this.#themes = cssThemes;
|
|
60
60
|
this.#themesVariables = cssVars;
|
|
61
61
|
this.#themesClassNames = cssClasses;
|
|
@@ -63,7 +63,10 @@ export class $_Provider_$ {
|
|
|
63
63
|
this.#themesGlobalStyles = cssGlobalStyles;
|
|
64
64
|
this.#themesMediaQueries = cssMediaQueries;
|
|
65
65
|
this.#linkId = linkId || 'kb-styled-link';
|
|
66
|
-
this.#currentTheme =
|
|
66
|
+
this.#currentTheme =
|
|
67
|
+
currentTheme in this.#themes
|
|
68
|
+
? currentTheme
|
|
69
|
+
: Object.keys(this.#themes)[0];
|
|
67
70
|
this.#jsInCss = !!jsInCss;
|
|
68
71
|
this.getComponentStyles = this.getComponentStyles.bind(this);
|
|
69
72
|
|
|
@@ -82,7 +85,7 @@ export class $_Provider_$ {
|
|
|
82
85
|
return this.#currentTheme;
|
|
83
86
|
}
|
|
84
87
|
set themeSelected(themeName) {
|
|
85
|
-
if (themeName in this.#themes) {
|
|
88
|
+
if (themeName in this.#themes && themeName !== this.#currentTheme) {
|
|
86
89
|
if (this.#jsInCss) {
|
|
87
90
|
this.#cleanUpLinks();
|
|
88
91
|
this.#handlerThemes(this.#themes[themeName]);
|
|
@@ -40,7 +40,7 @@ export class $_Provider_$ {
|
|
|
40
40
|
};
|
|
41
41
|
/* Bernova provider methods */
|
|
42
42
|
|
|
43
|
-
constructor({ linkId, jsInCss } = {}) {
|
|
43
|
+
constructor({ linkId, jsInCss, currentTheme } = {}) {
|
|
44
44
|
this.#themes = cssThemes;
|
|
45
45
|
this.#themesVariables = cssVars;
|
|
46
46
|
this.#themesClassNames = cssClasses;
|
|
@@ -48,7 +48,10 @@ export class $_Provider_$ {
|
|
|
48
48
|
this.#themesGlobalStyles = cssGlobalStyles;
|
|
49
49
|
this.#themesMediaQueries = cssMediaQueries;
|
|
50
50
|
this.#linkId = linkId || 'kb-styled-link';
|
|
51
|
-
this.#currentTheme =
|
|
51
|
+
this.#currentTheme =
|
|
52
|
+
currentTheme in this.#themes
|
|
53
|
+
? currentTheme
|
|
54
|
+
: Object.keys(this.#themes)[0];
|
|
52
55
|
this.#jsInCss = !!jsInCss;
|
|
53
56
|
this.getComponentStyles = this.getComponentStyles.bind(this);
|
|
54
57
|
|
|
@@ -67,7 +70,7 @@ export class $_Provider_$ {
|
|
|
67
70
|
return this.#currentTheme;
|
|
68
71
|
}
|
|
69
72
|
set themeSelected(themeName) {
|
|
70
|
-
if (themeName in this.#themes) {
|
|
73
|
+
if (themeName in this.#themes && themeName !== this.#currentTheme) {
|
|
71
74
|
if (this.#jsInCss) {
|
|
72
75
|
this.#cleanUpLinks();
|
|
73
76
|
this.#handlerThemes(this.#themes[themeName]);
|
|
@@ -41,18 +41,22 @@ export declare class $_Provider_$ {
|
|
|
41
41
|
#cleanUpLinks: () => void;
|
|
42
42
|
/* Bernova provider methods */
|
|
43
43
|
|
|
44
|
-
constructor(options?: {
|
|
44
|
+
constructor(options?: {
|
|
45
|
+
linkId?: string;
|
|
46
|
+
jsInCss?: boolean;
|
|
47
|
+
currentTheme?: ThemesKeys;
|
|
48
|
+
});
|
|
45
49
|
|
|
46
50
|
get themeSelected(): string | null;
|
|
47
51
|
get allThemesNames(): string[];
|
|
48
|
-
get allThemes(): Record<
|
|
52
|
+
get allThemes(): Record<ThemesKeys, string>;
|
|
49
53
|
get variables(): VarFromTheme;
|
|
50
54
|
get classNames(): ClassNameFromTheme;
|
|
51
55
|
get components(): ComponentsFromTheme;
|
|
52
56
|
get globalStyles(): GlobalStylesFromThemes;
|
|
53
57
|
get mediaQueries(): MediaQueriesFromThemes;
|
|
54
58
|
|
|
55
|
-
set themeSelected(themeName:
|
|
59
|
+
set themeSelected(themeName: ThemesKeys);
|
|
56
60
|
|
|
57
61
|
getComponentStyles<T extends ComponentsKey>(params: {
|
|
58
62
|
variant?: string;
|