@vaadin/vaadin-themable-mixin 22.0.0-alpha7 → 22.0.0-beta2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-themable-mixin",
|
|
3
|
-
"version": "22.0.0-
|
|
3
|
+
"version": "22.0.0-beta2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"polymer"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
33
34
|
"lit": "^2.0.0"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
@@ -38,5 +39,5 @@
|
|
|
38
39
|
"@vaadin/testing-helpers": "^0.3.0",
|
|
39
40
|
"sinon": "^9.2.4"
|
|
40
41
|
},
|
|
41
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4"
|
|
42
43
|
}
|
|
@@ -3,19 +3,22 @@
|
|
|
3
3
|
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
+
import { Constructor } from '@open-wc/dedupe-mixin';
|
|
6
7
|
import { CSSResult, CSSResultGroup } from 'lit';
|
|
7
|
-
import {
|
|
8
|
+
import { ThemePropertyMixinClass } from './vaadin-theme-property-mixin.js';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* A mixin for `nav` elements, facilitating navigation and selection of childNodes.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ThemableMixin<T extends Constructor<HTMLElement>>(
|
|
10
14
|
base: T
|
|
11
|
-
): T &
|
|
15
|
+
): T & Constructor<ThemableMixinClass> & Constructor<ThemePropertyMixinClass>;
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
finalize(): void;
|
|
16
|
-
}
|
|
17
|
+
export declare class ThemableMixinClass {
|
|
18
|
+
protected static finalize(): void;
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
protected static finalizeStyles(styles?: CSSResultGroup): CSSResult[];
|
|
21
|
+
}
|
|
19
22
|
|
|
20
23
|
/**
|
|
21
24
|
* Registers CSS styles for a component type. Make sure to register the styles before
|
|
@@ -37,4 +40,4 @@ declare const __themeRegistry: Theme[];
|
|
|
37
40
|
|
|
38
41
|
export { css, unsafeCSS } from 'lit';
|
|
39
42
|
|
|
40
|
-
export {
|
|
43
|
+
export { registerStyles, __themeRegistry };
|
package/vaadin-themable-mixin.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { css, CSSResult, unsafeCSS } from 'lit';
|
|
7
7
|
import { ThemePropertyMixin } from './vaadin-theme-property-mixin.js';
|
|
8
8
|
|
|
9
9
|
export { css, unsafeCSS };
|
|
@@ -3,29 +3,27 @@
|
|
|
3
3
|
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
import { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export declare function ThemePropertyMixin<T extends Constructor<HTMLElement>>(
|
|
9
|
+
base: T
|
|
10
|
+
): T & Constructor<ThemePropertyMixinClass>;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
export declare class ThemePropertyMixinClass {
|
|
13
13
|
/**
|
|
14
14
|
* Helper property with theme attribute value facilitating propagation
|
|
15
15
|
* in shadow DOM.
|
|
16
16
|
*
|
|
17
17
|
* Enables the component implementation to propagate the `theme`
|
|
18
|
-
* attribute value to the
|
|
19
|
-
* the
|
|
18
|
+
* attribute value to the sub-components in Shadow DOM by binding
|
|
19
|
+
* the sub-component’s "theme" attribute to the `theme` property of
|
|
20
20
|
* the host.
|
|
21
21
|
*
|
|
22
22
|
* **NOTE:** Extending the mixin only provides the property for binding,
|
|
23
23
|
* and does not make the propagation alone.
|
|
24
24
|
*
|
|
25
|
-
* See [
|
|
25
|
+
* See [Styling Components: Sub-components](https://vaadin.com/docs/latest/ds/customization/styling-components/#sub-components).
|
|
26
26
|
* page for more information.
|
|
27
27
|
*/
|
|
28
28
|
readonly theme: string | null | undefined;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
export { ThemePropertyMixin, ThemePropertyMixinConstructor };
|
|
@@ -15,14 +15,14 @@ export const ThemePropertyMixin = (superClass) =>
|
|
|
15
15
|
* in shadow DOM.
|
|
16
16
|
*
|
|
17
17
|
* Enables the component implementation to propagate the `theme`
|
|
18
|
-
* attribute value to the
|
|
19
|
-
* the
|
|
18
|
+
* attribute value to the sub-components in Shadow DOM by binding
|
|
19
|
+
* the sub-component’s "theme" attribute to the `theme` property of
|
|
20
20
|
* the host.
|
|
21
21
|
*
|
|
22
22
|
* **NOTE:** Extending the mixin only provides the property for binding,
|
|
23
23
|
* and does not make the propagation alone.
|
|
24
24
|
*
|
|
25
|
-
* See [
|
|
25
|
+
* See [Styling Components: Sub-components](https://vaadin.com/docs/latest/ds/customization/styling-components/#sub-components).
|
|
26
26
|
* page for more information.
|
|
27
27
|
*
|
|
28
28
|
* @protected
|