@massimo-cassandro/minimo 0.8.2 → 0.8.3
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/design-tokens/btn-color-themes.minimo.tokens.jsonc +4 -4
- package/design-tokens/components/sf-macro.minimo.tokens.jsonc +1 -1
- package/design-tokens/form.minimo.tokens.jsonc +1 -1
- package/design-tokens/web-components/simple-datatable.minimo.tokens.jsonc +1 -1
- package/design-tokens-utilities/build-tokens-src/formats/penpot.mjs +6 -3
- package/design-tokens-utilities/build-tokens-src/transforms.mjs +6 -0
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"outline": {
|
|
28
28
|
"color": {
|
|
29
29
|
"$type": "color",
|
|
30
|
-
"$value": "color-mix(in srgb,
|
|
30
|
+
"$value": "color-mix(in srgb, {btn.primary.background.color} 60%, transparent)"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"background": {
|
|
54
54
|
"color": {
|
|
55
55
|
"$type": "color",
|
|
56
|
-
"$value": "color-mix(in srgb,
|
|
56
|
+
"$value": "color-mix(in srgb, {btn.primary.background.color} 60%, #000)"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"color": {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"outline": {
|
|
114
114
|
"color": {
|
|
115
115
|
"$type": "color",
|
|
116
|
-
"$value": "color-mix(in srgb,
|
|
116
|
+
"$value": "color-mix(in srgb, {btn.secondary.background.color} 60%, transparent)"
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
},
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"background": {
|
|
140
140
|
"color": {
|
|
141
141
|
"$type": "color",
|
|
142
|
-
"$value": "color-mix(in srgb,
|
|
142
|
+
"$value": "color-mix(in srgb, {btn.secondary.background.color} 60%, #000)"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
"color": {
|
|
@@ -168,9 +168,12 @@ StyleDictionary.registerFormat({
|
|
|
168
168
|
value = orig;
|
|
169
169
|
}
|
|
170
170
|
} else {
|
|
171
|
-
// Non-expression value: preserve
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
// Non-expression value: preserve {references} wherever they appear.
|
|
172
|
+
// - Pure alias: "{some.token}" → kept as-is for Penpot token links
|
|
173
|
+
// - CSS function: "color-mix(in srgb, {some.token} 60%, #000)" → kept as-is
|
|
174
|
+
// - Plain value: "#ff0000", "16px", … → use the resolved $value
|
|
175
|
+
const containsRef = typeof orig === 'string' && orig.includes('{');
|
|
176
|
+
value = containsRef ? orig : (token.$value ?? token.value);
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
const entry = { $type: type, $value: value };
|
|
@@ -109,6 +109,12 @@ StyleDictionary.registerTransform({
|
|
|
109
109
|
transform: (token) => {
|
|
110
110
|
const original = token.original?.$value ?? token.original?.value;
|
|
111
111
|
|
|
112
|
+
// If the original is a CSS function containing {references}, return it
|
|
113
|
+
// untouched so the css format can resolve refs to var(--...).
|
|
114
|
+
if (typeof original === 'string' && original.includes('{') && !original.startsWith('{')) {
|
|
115
|
+
return original;
|
|
116
|
+
}
|
|
117
|
+
|
|
112
118
|
const value = (typeof original === 'string' && original.startsWith('{'))
|
|
113
119
|
? (token.$value ?? token.value)
|
|
114
120
|
: (original ?? token.$value ?? token.value);
|