@vaadin/component-base
Advanced tools
| /** | ||
| * @license | ||
| * Copyright (c) 2025 - 2025 Vaadin Ltd. | ||
| * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
| */ | ||
| /** | ||
| * Add a `<style>` block with given styles to the document. | ||
| * | ||
| * @param {string} id the id to set on the created element, only for informational purposes | ||
| * @param {CSSResultGroup[]} styles the styles to add | ||
| */ | ||
| export const addGlobalStyles = (id, ...styles) => { | ||
| const styleTag = document.createElement('style'); | ||
| styleTag.id = id; | ||
| styleTag.textContent = styles.map((style) => style.toString()).join('\n'); | ||
| document.head.insertAdjacentElement('afterbegin', styleTag); | ||
| }; |
+4
-5
| { | ||
| "name": "@vaadin/component-base", | ||
| "version": "25.0.0-beta7", | ||
| "version": "25.0.0-rc1", | ||
| "publishConfig": { | ||
@@ -36,3 +36,2 @@ "access": "public" | ||
| "@vaadin/vaadin-development-mode-detector": "^2.0.0", | ||
| "@vaadin/vaadin-themable-mixin": "25.0.0-beta7", | ||
| "@vaadin/vaadin-usage-statistics": "^2.1.0", | ||
@@ -42,8 +41,8 @@ "lit": "^3.0.0" | ||
| "devDependencies": { | ||
| "@vaadin/chai-plugins": "25.0.0-beta7", | ||
| "@vaadin/test-runner-commands": "25.0.0-beta7", | ||
| "@vaadin/chai-plugins": "25.0.0-rc1", | ||
| "@vaadin/test-runner-commands": "25.0.0-rc1", | ||
| "@vaadin/testing-helpers": "^2.0.0", | ||
| "sinon": "^21.0.0" | ||
| }, | ||
| "gitHead": "f12f14c37d2c0a72f708baff4a95230168d58dcc" | ||
| "gitHead": "cea5e86ad18824e5631b63c11150b4d7701869c5" | ||
| } |
+1
-1
@@ -16,3 +16,3 @@ /** | ||
| export function defineCustomElement(CustomElement, version = '25.0.0-beta7') { | ||
| export function defineCustomElement(CustomElement, version = '25.0.0-rc1') { | ||
| Object.defineProperty(CustomElement, 'version', { | ||
@@ -19,0 +19,0 @@ get() { |
@@ -40,2 +40,9 @@ /** | ||
| } | ||
| @media (forced-colors: active) { | ||
| [part='loader'] { | ||
| forced-color-adjust: none; | ||
| --vaadin-spinner-color: CanvasText; | ||
| } | ||
| } | ||
| `; |
@@ -7,3 +7,3 @@ /** | ||
| import { css } from 'lit'; | ||
| import { addGlobalThemeStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
| import { addGlobalStyles } from './add-global-styles.js'; | ||
@@ -32,3 +32,3 @@ // NOTE: Base color CSS custom properties are explicitly registered as `<color>` | ||
| addGlobalThemeStyles( | ||
| addGlobalStyles( | ||
| 'vaadin-base', | ||
@@ -35,0 +35,0 @@ css` |
@@ -7,5 +7,5 @@ /** | ||
| import { css } from 'lit'; | ||
| import { addGlobalThemeStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
| import { addGlobalStyles } from './add-global-styles.js'; | ||
| addGlobalThemeStyles( | ||
| addGlobalStyles( | ||
| 'vaadin-base-user-colors', | ||
@@ -12,0 +12,0 @@ css` |
@@ -696,3 +696,3 @@ /** | ||
| _increasePoolIfNeeded(count) { | ||
| if (this._physicalCount > 2 && count) { | ||
| if (this._physicalCount > 2 && this._physicalAverage > 0 && count > 0) { | ||
| // The iron-list logic has already created some physical items and | ||
@@ -699,0 +699,0 @@ // has decided to create more. Since each item creation round is |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
238541
0.29%4
-20%69
1.47%6749
0.34%- Removed