@electrovir/color 1.7.4 → 1.7.6
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* node:coverage disable */
|
|
2
2
|
import { assertWrap, check } from '@augment-vir/assert';
|
|
3
3
|
import { css, defineElement, html, listen, nothing, onDomCreated, unsafeCSS } from 'element-vir';
|
|
4
|
+
import { setCssVarValue } from 'lit-css-vars';
|
|
4
5
|
import { noNativeFormStyles, noNativeSpacing, viraFontCssVars } from 'vira';
|
|
5
6
|
import { colorCss } from '../data/color-css.js';
|
|
6
7
|
import { calculateContrast } from '../data/contrast/contrast.js';
|
|
@@ -109,7 +110,17 @@ export const VirColorPair = defineElement()({
|
|
|
109
110
|
margin-top: 1px;
|
|
110
111
|
}
|
|
111
112
|
`,
|
|
112
|
-
render({ state, updateState, inputs }) {
|
|
113
|
+
render({ state, updateState, inputs, host }) {
|
|
114
|
+
setCssVarValue({
|
|
115
|
+
onElement: host,
|
|
116
|
+
forCssVar: inputs.color.background,
|
|
117
|
+
toValue: inputs.color.background.default,
|
|
118
|
+
});
|
|
119
|
+
setCssVarValue({
|
|
120
|
+
onElement: host,
|
|
121
|
+
forCssVar: inputs.color.foreground,
|
|
122
|
+
toValue: inputs.color.foreground.default,
|
|
123
|
+
});
|
|
113
124
|
const colorRows = [
|
|
114
125
|
'foreground',
|
|
115
126
|
'background',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electrovir/color",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "A wrapper for culori with an extremely simple API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"color",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@web/test-runner-visual-regression": "^0.10.0",
|
|
77
77
|
"cspell": "^9.6.0",
|
|
78
78
|
"dependency-cruiser": "^17.3.6",
|
|
79
|
-
"element-book": "^26.15.
|
|
79
|
+
"element-book": "^26.15.3",
|
|
80
80
|
"element-vir": "^26.14.2",
|
|
81
81
|
"esbuild": "^0.27.2",
|
|
82
82
|
"eslint": "^9.39.2",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"typedoc": "^0.28.16",
|
|
106
106
|
"typescript": "^5.9.3",
|
|
107
107
|
"typescript-eslint": "^8.53.0",
|
|
108
|
-
"vira": "^28.19.
|
|
108
|
+
"vira": "^28.19.7",
|
|
109
109
|
"virmator": "^14.4.3",
|
|
110
110
|
"vite": "^7.3.1"
|
|
111
111
|
},
|