@vaadin/component-base 25.0.0-beta6 → 25.0.0-rc1
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/component-base",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-rc1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,15 +33,14 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
35
35
|
"@vaadin/vaadin-development-mode-detector": "^2.0.0",
|
|
36
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-beta6",
|
|
37
36
|
"@vaadin/vaadin-usage-statistics": "^2.1.0",
|
|
38
37
|
"lit": "^3.0.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
42
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
40
|
+
"@vaadin/chai-plugins": "25.0.0-rc1",
|
|
41
|
+
"@vaadin/test-runner-commands": "25.0.0-rc1",
|
|
43
42
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
44
43
|
"sinon": "^21.0.0"
|
|
45
44
|
},
|
|
46
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "cea5e86ad18824e5631b63c11150b4d7701869c5"
|
|
47
46
|
}
|
package/src/define.js
CHANGED
|
@@ -13,7 +13,7 @@ function dashToCamelCase(dash) {
|
|
|
13
13
|
|
|
14
14
|
const experimentalMap = {};
|
|
15
15
|
|
|
16
|
-
export function defineCustomElement(CustomElement, version = '25.0.0-
|
|
16
|
+
export function defineCustomElement(CustomElement, version = '25.0.0-rc1') {
|
|
17
17
|
Object.defineProperty(CustomElement, 'version', {
|
|
18
18
|
get() {
|
|
19
19
|
return version;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2025 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Add a `<style>` block with given styles to the document.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} id the id to set on the created element, only for informational purposes
|
|
11
|
+
* @param {CSSResultGroup[]} styles the styles to add
|
|
12
|
+
*/
|
|
13
|
+
export const addGlobalStyles = (id, ...styles) => {
|
|
14
|
+
const styleTag = document.createElement('style');
|
|
15
|
+
styleTag.id = id;
|
|
16
|
+
styleTag.textContent = styles.map((style) => style.toString()).join('\n');
|
|
17
|
+
|
|
18
|
+
document.head.insertAdjacentElement('afterbegin', styleTag);
|
|
19
|
+
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { css } from 'lit';
|
|
7
|
-
import {
|
|
7
|
+
import { addGlobalStyles } from './add-global-styles.js';
|
|
8
8
|
|
|
9
9
|
// NOTE: Base color CSS custom properties are explicitly registered as `<color>`
|
|
10
10
|
// here to avoid performance issues in Aura. Aura overrides these properties with
|
|
@@ -28,7 +28,7 @@ import { addGlobalThemeStyles } from '@vaadin/vaadin-themable-mixin/register-sty
|
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
addGlobalStyles(
|
|
32
32
|
'vaadin-base',
|
|
33
33
|
css`
|
|
34
34
|
@layer vaadin.base {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { css } from 'lit';
|
|
7
|
-
import {
|
|
7
|
+
import { addGlobalStyles } from './add-global-styles.js';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
addGlobalStyles(
|
|
10
10
|
'vaadin-base-user-colors',
|
|
11
11
|
css`
|
|
12
12
|
@layer vaadin.base {
|
|
@@ -693,7 +693,7 @@ export class IronListAdapter {
|
|
|
693
693
|
* @override
|
|
694
694
|
*/
|
|
695
695
|
_increasePoolIfNeeded(count) {
|
|
696
|
-
if (this._physicalCount > 2 && count) {
|
|
696
|
+
if (this._physicalCount > 2 && this._physicalAverage > 0 && count > 0) {
|
|
697
697
|
// The iron-list logic has already created some physical items and
|
|
698
698
|
// has decided to create more. Since each item creation round is
|
|
699
699
|
// expensive, let's try to create the remaining items in one go.
|