@vaadin/vaadin-themable-mixin 24.0.0-alpha3 → 24.0.0-alpha5

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": "24.0.0-alpha3",
3
+ "version": "24.0.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -40,5 +40,5 @@
40
40
  "@vaadin/testing-helpers": "^0.3.2",
41
41
  "sinon": "^13.0.2"
42
42
  },
43
- "gitHead": "7a013a3c5a56abd61dd4f7773c6ec77c3541bdf2"
43
+ "gitHead": "fc0b1721eda9e39cb289b239e440fc9e29573a31"
44
44
  }
@@ -25,28 +25,7 @@ export declare class ThemePropertyMixinClass {
25
25
  * See [Styling Components: Sub-components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components/#sub-components).
26
26
  * page for more information.
27
27
  *
28
- * @deprecated The `theme` property is not supposed for public use and will be dropped in Vaadin 24.
29
- * Please, use the `theme` attribute instead.
30
28
  * @protected
31
29
  */
32
- theme: string | null | undefined;
33
-
34
- /**
35
- * Helper property with theme attribute value facilitating propagation
36
- * in shadow DOM.
37
- *
38
- * Enables the component implementation to propagate the `theme`
39
- * attribute value to the sub-components in Shadow DOM by binding
40
- * the sub-component’s "theme" attribute to the `theme` property of
41
- * the host.
42
- *
43
- * **NOTE:** Extending the mixin only provides the property for binding,
44
- * and does not make the propagation alone.
45
- *
46
- * See [Styling Components: Sub-components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components/#sub-components).
47
- * page for more information.
48
- *
49
- * @protected
50
- */
51
- readonly _theme: string | null | undefined;
30
+ protected readonly _theme: string | null | undefined;
52
31
  }
@@ -10,31 +10,6 @@ export const ThemePropertyMixin = (superClass) =>
10
10
  class VaadinThemePropertyMixin extends superClass {
11
11
  static get properties() {
12
12
  return {
13
- /**
14
- * Helper property with theme attribute value facilitating propagation
15
- * in shadow DOM.
16
- *
17
- * Enables the component implementation to propagate the `theme`
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
- * the host.
21
- *
22
- * **NOTE:** Extending the mixin only provides the property for binding,
23
- * and does not make the propagation alone.
24
- *
25
- * See [Styling Components: Sub-components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components/#sub-components).
26
- * page for more information.
27
- *
28
- * @deprecated The `theme` property is not supposed for public use and will be dropped in Vaadin 24.
29
- * Please, use the `theme` attribute instead.
30
- * @protected
31
- */
32
- theme: {
33
- type: String,
34
- reflectToAttribute: true,
35
- observer: '__deprecatedThemePropertyChanged',
36
- },
37
-
38
13
  /**
39
14
  * Helper property with theme attribute value facilitating propagation
40
15
  * in shadow DOM.
@@ -59,8 +34,16 @@ export const ThemePropertyMixin = (superClass) =>
59
34
  };
60
35
  }
61
36
 
62
- /** @private */
63
- __deprecatedThemePropertyChanged(theme) {
64
- this._set_theme(theme);
37
+ static get observedAttributes() {
38
+ return [...super.observedAttributes, 'theme'];
39
+ }
40
+
41
+ /** @protected */
42
+ attributeChangedCallback(name, oldValue, newValue) {
43
+ super.attributeChangedCallback(name, oldValue, newValue);
44
+
45
+ if (name === 'theme') {
46
+ this._set_theme(newValue);
47
+ }
65
48
  }
66
49
  };