@vaadin/vaadin-themable-mixin 25.2.0-alpha8 → 25.2.0-beta1

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.
@@ -28,8 +28,6 @@ export function findRoot(element) {
28
28
 
29
29
  /**
30
30
  * Mixin for internal use only. Do not use it in custom components.
31
- *
32
- * @polymerMixin
33
31
  */
34
32
  export const LumoInjectionMixin = (superClass) =>
35
33
  class LumoInjectionMixinClass extends superClass {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/vaadin-themable-mixin",
3
- "version": "25.2.0-alpha8",
3
+ "version": "25.2.0-beta1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,15 +33,15 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@open-wc/dedupe-mixin": "^1.3.0",
36
- "@vaadin/component-base": "25.2.0-alpha8",
36
+ "@vaadin/component-base": "25.2.0-beta1",
37
37
  "lit": "^3.0.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/chai-plugins": "25.2.0-alpha8",
42
- "@vaadin/test-runner-commands": "25.2.0-alpha8",
41
+ "@vaadin/chai-plugins": "25.2.0-beta1",
42
+ "@vaadin/test-runner-commands": "25.2.0-beta1",
43
43
  "@vaadin/testing-helpers": "^2.0.0",
44
44
  "sinon": "^21.0.2"
45
45
  },
46
- "gitHead": "2b82e20cdfc605b1187e9a24ae42869e1500ab68"
46
+ "gitHead": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
47
47
  }
package/src/css-utils.js CHANGED
@@ -18,11 +18,12 @@ function getEffectiveStyles(component) {
18
18
  const { baseStyles, themeStyles, elementStyles, lumoInjector } = component.constructor;
19
19
  const lumoStyleSheet = component.__lumoStyleSheet;
20
20
 
21
- if (lumoStyleSheet && (baseStyles || themeStyles)) {
22
- return [...(lumoInjector.includeBaseStyles ? baseStyles : []), lumoStyleSheet, ...themeStyles];
21
+ if (lumoStyleSheet) {
22
+ const base = lumoInjector.includeBaseStyles ? (baseStyles ?? elementStyles) : [];
23
+ return [...base, lumoStyleSheet, ...(themeStyles ?? [])];
23
24
  }
24
25
 
25
- return [lumoStyleSheet, ...elementStyles].filter(Boolean);
26
+ return elementStyles;
26
27
  }
27
28
 
28
29
  /**
@@ -298,10 +298,6 @@ function getThemes(tagName) {
298
298
  return themeRegistry.filter((theme) => theme.moduleId === defaultModuleName);
299
299
  }
300
300
 
301
- /**
302
- * @polymerMixin
303
- * @mixes ThemePropertyMixin
304
- */
305
301
  export const ThemableMixin = (superClass) =>
306
302
  class VaadinThemableMixin extends ThemePropertyMixin(superClass) {
307
303
  constructor() {
@@ -6,8 +6,6 @@ import { ThemeDetector } from './src/theme-detector.js';
6
6
  * Automatically adds a `data-application-theme` attribute to the host
7
7
  * element with the name of the detected theme (`lumo` or `aura`), which
8
8
  * can be used in component styles to apply theme-specific styling.
9
- *
10
- * @polymerMixin
11
9
  */
12
10
  export const ThemeDetectionMixin = (superClass) =>
13
11
  class ThemeDetectionMixinClass extends superClass {
@@ -23,7 +21,7 @@ export const ThemeDetectionMixin = (superClass) =>
23
21
 
24
22
  if (this.isConnected) {
25
23
  const root = findRoot(this);
26
- root.__themeDetector = root.__themeDetector || new ThemeDetector(root);
24
+ root.__themeDetector ||= new ThemeDetector(root);
27
25
  this.__themeDetector = root.__themeDetector;
28
26
  this.__themeDetector.addEventListener('theme-changed', this.__applyDetectedTheme);
29
27
  this.__applyDetectedTheme();
@@ -3,9 +3,6 @@
3
3
  * Copyright (c) 2017 - 2026 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- /**
7
- * @polymerMixin
8
- */
9
6
  export const ThemePropertyMixin = (superClass) =>
10
7
  class VaadinThemePropertyMixin extends superClass {
11
8
  static get properties() {