@vaadin/vaadin-themable-mixin 23.0.4 → 23.1.0-alpha2

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