@pandacss/token-dictionary 0.43.0 → 0.45.0
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/dist/index.js +4 -1
- package/dist/index.mjs +5 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -512,6 +512,9 @@ function svgToDataUri(svgString) {
|
|
|
512
512
|
var objectKeys = (obj) => Object.keys(obj);
|
|
513
513
|
|
|
514
514
|
// src/transform.ts
|
|
515
|
+
function toUnit(v) {
|
|
516
|
+
return (0, import_shared4.isCssUnit)(v) ? v : `${v}px`;
|
|
517
|
+
}
|
|
515
518
|
var transformShadow = {
|
|
516
519
|
name: "tokens/shadow",
|
|
517
520
|
match: (token) => token.extensions.category === "shadows",
|
|
@@ -581,7 +584,7 @@ var transformBorders = {
|
|
|
581
584
|
}
|
|
582
585
|
if (isCompositeBorder(token.value)) {
|
|
583
586
|
const { width, style, color } = token.value;
|
|
584
|
-
return `${width}
|
|
587
|
+
return `${toUnit(width)} ${style} ${color}`;
|
|
585
588
|
}
|
|
586
589
|
return token.value;
|
|
587
590
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -382,7 +382,7 @@ var removeEmptyTokens = {
|
|
|
382
382
|
var middlewares = [addNegativeTokens, addVirtualPalette, removeEmptyTokens, addPixelUnit];
|
|
383
383
|
|
|
384
384
|
// src/transform.ts
|
|
385
|
-
import { isString } from "@pandacss/shared";
|
|
385
|
+
import { isCssUnit, isString } from "@pandacss/shared";
|
|
386
386
|
import { P as P2, match } from "ts-pattern";
|
|
387
387
|
|
|
388
388
|
// src/mini-svg-uri.ts
|
|
@@ -488,6 +488,9 @@ function svgToDataUri(svgString) {
|
|
|
488
488
|
var objectKeys = (obj) => Object.keys(obj);
|
|
489
489
|
|
|
490
490
|
// src/transform.ts
|
|
491
|
+
function toUnit(v) {
|
|
492
|
+
return isCssUnit(v) ? v : `${v}px`;
|
|
493
|
+
}
|
|
491
494
|
var transformShadow = {
|
|
492
495
|
name: "tokens/shadow",
|
|
493
496
|
match: (token) => token.extensions.category === "shadows",
|
|
@@ -557,7 +560,7 @@ var transformBorders = {
|
|
|
557
560
|
}
|
|
558
561
|
if (isCompositeBorder(token.value)) {
|
|
559
562
|
const { width, style, color } = token.value;
|
|
560
|
-
return `${width}
|
|
563
|
+
return `${toUnit(width)} ${style} ${color}`;
|
|
561
564
|
}
|
|
562
565
|
return token.value;
|
|
563
566
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/token-dictionary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Common error messages for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ts-pattern": "5.0.8",
|
|
36
|
-
"@pandacss/logger": "^0.
|
|
37
|
-
"@pandacss/
|
|
38
|
-
"@pandacss/
|
|
36
|
+
"@pandacss/logger": "^0.45.0",
|
|
37
|
+
"@pandacss/shared": "0.45.0",
|
|
38
|
+
"@pandacss/types": "0.45.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|