@pandacss/preset-base 0.28.0 → 0.29.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.d.mts +63 -4
- package/dist/index.d.ts +63 -4
- package/dist/index.js +193 -112
- package/dist/index.mjs +193 -112
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -90,6 +90,18 @@ var conditions = {
|
|
|
90
90
|
vertical: "&[data-orientation=vertical]"
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
// src/color-mix-transform.ts
|
|
94
|
+
var createColorMixTransform = (prop) => (value, args) => {
|
|
95
|
+
const mix = args.utils.colorMix(value);
|
|
96
|
+
if (mix.invalid)
|
|
97
|
+
return { [prop]: value };
|
|
98
|
+
const cssVar = "--mix-" + prop;
|
|
99
|
+
return {
|
|
100
|
+
[cssVar]: mix.value,
|
|
101
|
+
[prop]: `var(${cssVar}, ${mix.color})`
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
93
105
|
// src/utilities/background.ts
|
|
94
106
|
var background = {
|
|
95
107
|
backgroundPosition: {
|
|
@@ -121,12 +133,14 @@ var background = {
|
|
|
121
133
|
background: {
|
|
122
134
|
shorthand: "bg",
|
|
123
135
|
className: "bg",
|
|
124
|
-
values: "colors"
|
|
136
|
+
values: "colors",
|
|
137
|
+
transform: createColorMixTransform("background")
|
|
125
138
|
},
|
|
126
139
|
backgroundColor: {
|
|
127
140
|
shorthand: "bgColor",
|
|
128
141
|
className: "bg",
|
|
129
|
-
values: "colors"
|
|
142
|
+
values: "colors",
|
|
143
|
+
transform: createColorMixTransform("backgroundColor")
|
|
130
144
|
},
|
|
131
145
|
backgroundOrigin: {
|
|
132
146
|
shorthand: "bgOrigin",
|
|
@@ -201,32 +215,26 @@ var background = {
|
|
|
201
215
|
gradientFrom: {
|
|
202
216
|
className: "from",
|
|
203
217
|
values: "colors",
|
|
204
|
-
transform(
|
|
205
|
-
return {
|
|
206
|
-
"--gradient-from": value
|
|
207
|
-
};
|
|
208
|
-
}
|
|
218
|
+
transform: createColorMixTransform("--gradient-from")
|
|
209
219
|
},
|
|
210
220
|
gradientTo: {
|
|
211
221
|
className: "to",
|
|
212
222
|
values: "colors",
|
|
213
|
-
transform(
|
|
214
|
-
return {
|
|
215
|
-
"--gradient-to": value
|
|
216
|
-
};
|
|
217
|
-
}
|
|
223
|
+
transform: createColorMixTransform("--gradient-to")
|
|
218
224
|
},
|
|
219
225
|
gradientVia: {
|
|
220
226
|
className: "via",
|
|
221
227
|
values: "colors",
|
|
222
|
-
transform(value) {
|
|
228
|
+
transform(value, args) {
|
|
229
|
+
const transformed = gradientVia(value, args);
|
|
223
230
|
return {
|
|
224
|
-
|
|
225
|
-
"--gradient-via":
|
|
231
|
+
...transformed,
|
|
232
|
+
"--gradient-via-stops": "var(--gradient-from), var(--gradient-via), var(--gradient-to)"
|
|
226
233
|
};
|
|
227
234
|
}
|
|
228
235
|
}
|
|
229
236
|
};
|
|
237
|
+
var gradientVia = createColorMixTransform("--gradient-via");
|
|
230
238
|
|
|
231
239
|
// src/utilities/border.ts
|
|
232
240
|
var border = {
|
|
@@ -373,7 +381,8 @@ var border = {
|
|
|
373
381
|
},
|
|
374
382
|
borderColor: {
|
|
375
383
|
className: "border",
|
|
376
|
-
values: "colors"
|
|
384
|
+
values: "colors",
|
|
385
|
+
transform: createColorMixTransform("borderColor")
|
|
377
386
|
},
|
|
378
387
|
borderInline: {
|
|
379
388
|
className: "border-x",
|
|
@@ -388,7 +397,8 @@ var border = {
|
|
|
388
397
|
borderInlineColor: {
|
|
389
398
|
className: "border-x",
|
|
390
399
|
values: "colors",
|
|
391
|
-
shorthand: "borderXColor"
|
|
400
|
+
shorthand: "borderXColor",
|
|
401
|
+
transform: createColorMixTransform("borderInlineColor")
|
|
392
402
|
},
|
|
393
403
|
borderBlock: {
|
|
394
404
|
className: "border-y",
|
|
@@ -403,7 +413,8 @@ var border = {
|
|
|
403
413
|
borderBlockColor: {
|
|
404
414
|
className: "border-y",
|
|
405
415
|
values: "colors",
|
|
406
|
-
shorthand: "borderYColor"
|
|
416
|
+
shorthand: "borderYColor",
|
|
417
|
+
transform: createColorMixTransform("borderBlockColor")
|
|
407
418
|
},
|
|
408
419
|
borderLeft: {
|
|
409
420
|
className: "border-l",
|
|
@@ -411,7 +422,8 @@ var border = {
|
|
|
411
422
|
},
|
|
412
423
|
borderLeftColor: {
|
|
413
424
|
className: "border-l",
|
|
414
|
-
values: "colors"
|
|
425
|
+
values: "colors",
|
|
426
|
+
transform: createColorMixTransform("borderLeftColor")
|
|
415
427
|
},
|
|
416
428
|
borderInlineStart: {
|
|
417
429
|
className: "border-s",
|
|
@@ -426,7 +438,8 @@ var border = {
|
|
|
426
438
|
borderInlineStartColor: {
|
|
427
439
|
className: "border-s",
|
|
428
440
|
values: "colors",
|
|
429
|
-
shorthand: "borderStartColor"
|
|
441
|
+
shorthand: "borderStartColor",
|
|
442
|
+
transform: createColorMixTransform("borderInlineStartColor")
|
|
430
443
|
},
|
|
431
444
|
borderRight: {
|
|
432
445
|
className: "border-r",
|
|
@@ -434,7 +447,8 @@ var border = {
|
|
|
434
447
|
},
|
|
435
448
|
borderRightColor: {
|
|
436
449
|
className: "border-r",
|
|
437
|
-
values: "colors"
|
|
450
|
+
values: "colors",
|
|
451
|
+
transform: createColorMixTransform("borderRightColor")
|
|
438
452
|
},
|
|
439
453
|
borderInlineEnd: {
|
|
440
454
|
className: "border-e",
|
|
@@ -449,7 +463,8 @@ var border = {
|
|
|
449
463
|
borderInlineEndColor: {
|
|
450
464
|
className: "border-e",
|
|
451
465
|
values: "colors",
|
|
452
|
-
shorthand: "borderEndColor"
|
|
466
|
+
shorthand: "borderEndColor",
|
|
467
|
+
transform: createColorMixTransform("borderInlineEndColor")
|
|
453
468
|
},
|
|
454
469
|
borderTop: {
|
|
455
470
|
className: "border-t",
|
|
@@ -457,7 +472,8 @@ var border = {
|
|
|
457
472
|
},
|
|
458
473
|
borderTopColor: {
|
|
459
474
|
className: "border-t",
|
|
460
|
-
values: "colors"
|
|
475
|
+
values: "colors",
|
|
476
|
+
transform: createColorMixTransform("borderTopColor")
|
|
461
477
|
},
|
|
462
478
|
borderBottom: {
|
|
463
479
|
className: "border-b",
|
|
@@ -465,7 +481,8 @@ var border = {
|
|
|
465
481
|
},
|
|
466
482
|
borderBottomColor: {
|
|
467
483
|
className: "border-b",
|
|
468
|
-
values: "colors"
|
|
484
|
+
values: "colors",
|
|
485
|
+
transform: createColorMixTransform("borderBottomColor")
|
|
469
486
|
},
|
|
470
487
|
borderBlockEnd: {
|
|
471
488
|
className: "border-be",
|
|
@@ -473,7 +490,8 @@ var border = {
|
|
|
473
490
|
},
|
|
474
491
|
borderBlockEndColor: {
|
|
475
492
|
className: "border-be",
|
|
476
|
-
values: "colors"
|
|
493
|
+
values: "colors",
|
|
494
|
+
transform: createColorMixTransform("borderBlockEndColor")
|
|
477
495
|
},
|
|
478
496
|
borderBlockStart: {
|
|
479
497
|
className: "border-bs",
|
|
@@ -481,7 +499,23 @@ var border = {
|
|
|
481
499
|
},
|
|
482
500
|
borderBlockStartColor: {
|
|
483
501
|
className: "border-bs",
|
|
484
|
-
values: "colors"
|
|
502
|
+
values: "colors",
|
|
503
|
+
transform: createColorMixTransform("borderBlockStartColor")
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
// src/utilities/container.ts
|
|
508
|
+
var container = {
|
|
509
|
+
container: {
|
|
510
|
+
className: "cq"
|
|
511
|
+
},
|
|
512
|
+
containerName: {
|
|
513
|
+
className: "cq-name",
|
|
514
|
+
property: "containerName",
|
|
515
|
+
values: "containerNames"
|
|
516
|
+
},
|
|
517
|
+
containerType: {
|
|
518
|
+
className: "cq-type"
|
|
485
519
|
}
|
|
486
520
|
};
|
|
487
521
|
|
|
@@ -547,11 +581,9 @@ var divide = {
|
|
|
547
581
|
divideColor: {
|
|
548
582
|
className: "divide",
|
|
549
583
|
values: "colors",
|
|
550
|
-
transform(value) {
|
|
584
|
+
transform(value, args) {
|
|
551
585
|
return {
|
|
552
|
-
"& > :not([hidden]) ~ :not([hidden])":
|
|
553
|
-
borderColor: value
|
|
554
|
-
}
|
|
586
|
+
"& > :not([hidden]) ~ :not([hidden])": divideColor(value, args)
|
|
555
587
|
};
|
|
556
588
|
}
|
|
557
589
|
},
|
|
@@ -567,6 +599,7 @@ var divide = {
|
|
|
567
599
|
}
|
|
568
600
|
}
|
|
569
601
|
};
|
|
602
|
+
var divideColor = createColorMixTransform("borderColor");
|
|
570
603
|
|
|
571
604
|
// src/utilities/effects.ts
|
|
572
605
|
var effects = {
|
|
@@ -582,11 +615,7 @@ var effects = {
|
|
|
582
615
|
shorthand: "shadowColor",
|
|
583
616
|
className: "shadow",
|
|
584
617
|
values: "colors",
|
|
585
|
-
transform(
|
|
586
|
-
return {
|
|
587
|
-
"--shadow-color": value
|
|
588
|
-
};
|
|
589
|
-
}
|
|
618
|
+
transform: createColorMixTransform("--shadow-color")
|
|
590
619
|
},
|
|
591
620
|
mixBlendMode: {
|
|
592
621
|
className: "mix-blend"
|
|
@@ -1018,11 +1047,13 @@ var helpers = {
|
|
|
1018
1047
|
var interactivity = {
|
|
1019
1048
|
accentColor: {
|
|
1020
1049
|
className: "accent",
|
|
1021
|
-
values: "colors"
|
|
1050
|
+
values: "colors",
|
|
1051
|
+
transform: createColorMixTransform("accentColor")
|
|
1022
1052
|
},
|
|
1023
1053
|
caretColor: {
|
|
1024
1054
|
className: "caret",
|
|
1025
|
-
values: "colors"
|
|
1055
|
+
values: "colors",
|
|
1056
|
+
transform: createColorMixTransform("caretColor")
|
|
1026
1057
|
},
|
|
1027
1058
|
scrollBehavior: {
|
|
1028
1059
|
className: "scroll"
|
|
@@ -1401,7 +1432,8 @@ var outline = {
|
|
|
1401
1432
|
outlineColor: {
|
|
1402
1433
|
className: "ring",
|
|
1403
1434
|
values: "colors",
|
|
1404
|
-
shorthand: "ringColor"
|
|
1435
|
+
shorthand: "ringColor",
|
|
1436
|
+
transform: createColorMixTransform("outlineColor")
|
|
1405
1437
|
},
|
|
1406
1438
|
outline: {
|
|
1407
1439
|
className: "ring",
|
|
@@ -1421,6 +1453,58 @@ var outline = {
|
|
|
1421
1453
|
}
|
|
1422
1454
|
};
|
|
1423
1455
|
|
|
1456
|
+
// src/utilities/polyfill.ts
|
|
1457
|
+
var polyfill = {
|
|
1458
|
+
appearance: {
|
|
1459
|
+
className: "appearance",
|
|
1460
|
+
transform(value) {
|
|
1461
|
+
return { appearance: value, WebkitAppearance: value };
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
backfaceVisibility: {
|
|
1465
|
+
className: "backface",
|
|
1466
|
+
transform(value) {
|
|
1467
|
+
return { backfaceVisibility: value, WebkitBackfaceVisibility: value };
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
clipPath: {
|
|
1471
|
+
className: "clip-path",
|
|
1472
|
+
transform(value) {
|
|
1473
|
+
return { clipPath: value, WebkitClipPath: value };
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
hyphens: {
|
|
1477
|
+
className: "hyphens",
|
|
1478
|
+
transform(value) {
|
|
1479
|
+
return { hyphens: value, WebkitHyphens: value };
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
mask: {
|
|
1483
|
+
className: "mask",
|
|
1484
|
+
transform(value) {
|
|
1485
|
+
return { mask: value, WebkitMask: value };
|
|
1486
|
+
}
|
|
1487
|
+
},
|
|
1488
|
+
maskImage: {
|
|
1489
|
+
className: "mask-image",
|
|
1490
|
+
transform(value) {
|
|
1491
|
+
return { maskImage: value, WebkitMaskImage: value };
|
|
1492
|
+
}
|
|
1493
|
+
},
|
|
1494
|
+
maskSize: {
|
|
1495
|
+
className: "mask-size",
|
|
1496
|
+
transform(value) {
|
|
1497
|
+
return { maskSize: value, WebkitMaskSize: value };
|
|
1498
|
+
}
|
|
1499
|
+
},
|
|
1500
|
+
textSizeAdjust: {
|
|
1501
|
+
className: "text-size-adjust",
|
|
1502
|
+
transform(value) {
|
|
1503
|
+
return { textSizeAdjust: value, WebkitTextSizeAdjust: value };
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
};
|
|
1507
|
+
|
|
1424
1508
|
// src/utilities/sizing.ts
|
|
1425
1509
|
var widthValues = (theme) => ({
|
|
1426
1510
|
auto: "auto",
|
|
@@ -1651,11 +1735,13 @@ var spacing = {
|
|
|
1651
1735
|
var svg = {
|
|
1652
1736
|
fill: {
|
|
1653
1737
|
className: "fill",
|
|
1654
|
-
values: "colors"
|
|
1738
|
+
values: "colors",
|
|
1739
|
+
transform: createColorMixTransform("fill")
|
|
1655
1740
|
},
|
|
1656
1741
|
stroke: {
|
|
1657
1742
|
className: "stroke",
|
|
1658
|
-
values: "colors"
|
|
1743
|
+
values: "colors",
|
|
1744
|
+
transform: createColorMixTransform("stroke")
|
|
1659
1745
|
},
|
|
1660
1746
|
strokeWidth: {
|
|
1661
1747
|
className: "stroke-w",
|
|
@@ -1851,7 +1937,8 @@ var transitions = {
|
|
|
1851
1937
|
var typography = {
|
|
1852
1938
|
color: {
|
|
1853
1939
|
className: "text",
|
|
1854
|
-
values: "colors"
|
|
1940
|
+
values: "colors",
|
|
1941
|
+
transform: createColorMixTransform("color")
|
|
1855
1942
|
},
|
|
1856
1943
|
fontFamily: {
|
|
1857
1944
|
className: "font",
|
|
@@ -1896,11 +1983,13 @@ var typography = {
|
|
|
1896
1983
|
},
|
|
1897
1984
|
textDecorationColor: {
|
|
1898
1985
|
className: "text-decor",
|
|
1899
|
-
values: "colors"
|
|
1986
|
+
values: "colors",
|
|
1987
|
+
transform: createColorMixTransform("textDecorationColor")
|
|
1900
1988
|
},
|
|
1901
1989
|
textEmphasisColor: {
|
|
1902
1990
|
className: "text-emphasis",
|
|
1903
|
-
values: "colors"
|
|
1991
|
+
values: "colors",
|
|
1992
|
+
transform: createColorMixTransform("textEmphasisColor")
|
|
1904
1993
|
},
|
|
1905
1994
|
textDecorationStyle: {
|
|
1906
1995
|
className: "decoration"
|
|
@@ -1969,58 +2058,6 @@ var typography = {
|
|
|
1969
2058
|
}
|
|
1970
2059
|
};
|
|
1971
2060
|
|
|
1972
|
-
// src/utilities/polyfill.ts
|
|
1973
|
-
var polyfill = {
|
|
1974
|
-
appearance: {
|
|
1975
|
-
className: "appearance",
|
|
1976
|
-
transform(value) {
|
|
1977
|
-
return { appearance: value, WebkitAppearance: value };
|
|
1978
|
-
}
|
|
1979
|
-
},
|
|
1980
|
-
backfaceVisibility: {
|
|
1981
|
-
className: "backface",
|
|
1982
|
-
transform(value) {
|
|
1983
|
-
return { backfaceVisibility: value, WebkitBackfaceVisibility: value };
|
|
1984
|
-
}
|
|
1985
|
-
},
|
|
1986
|
-
clipPath: {
|
|
1987
|
-
className: "clip-path",
|
|
1988
|
-
transform(value) {
|
|
1989
|
-
return { clipPath: value, WebkitClipPath: value };
|
|
1990
|
-
}
|
|
1991
|
-
},
|
|
1992
|
-
hyphens: {
|
|
1993
|
-
className: "hyphens",
|
|
1994
|
-
transform(value) {
|
|
1995
|
-
return { hyphens: value, WebkitHyphens: value };
|
|
1996
|
-
}
|
|
1997
|
-
},
|
|
1998
|
-
mask: {
|
|
1999
|
-
className: "mask",
|
|
2000
|
-
transform(value) {
|
|
2001
|
-
return { mask: value, WebkitMask: value };
|
|
2002
|
-
}
|
|
2003
|
-
},
|
|
2004
|
-
maskImage: {
|
|
2005
|
-
className: "mask-image",
|
|
2006
|
-
transform(value) {
|
|
2007
|
-
return { maskImage: value, WebkitMaskImage: value };
|
|
2008
|
-
}
|
|
2009
|
-
},
|
|
2010
|
-
maskSize: {
|
|
2011
|
-
className: "mask-size",
|
|
2012
|
-
transform(value) {
|
|
2013
|
-
return { maskSize: value, WebkitMaskSize: value };
|
|
2014
|
-
}
|
|
2015
|
-
},
|
|
2016
|
-
textSizeAdjust: {
|
|
2017
|
-
className: "text-size-adjust",
|
|
2018
|
-
transform(value) {
|
|
2019
|
-
return { textSizeAdjust: value, WebkitTextSizeAdjust: value };
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
|
-
};
|
|
2023
|
-
|
|
2024
2061
|
// src/utilities/index.ts
|
|
2025
2062
|
var utilities = Object.assign(
|
|
2026
2063
|
{},
|
|
@@ -2042,7 +2079,8 @@ var utilities = Object.assign(
|
|
|
2042
2079
|
interactivity,
|
|
2043
2080
|
svg,
|
|
2044
2081
|
helpers,
|
|
2045
|
-
polyfill
|
|
2082
|
+
polyfill,
|
|
2083
|
+
container
|
|
2046
2084
|
);
|
|
2047
2085
|
|
|
2048
2086
|
// src/patterns.ts
|
|
@@ -2086,8 +2124,12 @@ var stack = definePattern({
|
|
|
2086
2124
|
direction: { type: "property", value: "flexDirection" },
|
|
2087
2125
|
gap: { type: "property", value: "gap" }
|
|
2088
2126
|
},
|
|
2127
|
+
defaultValues: {
|
|
2128
|
+
direction: "column",
|
|
2129
|
+
gap: "10px"
|
|
2130
|
+
},
|
|
2089
2131
|
transform(props) {
|
|
2090
|
-
const { align, justify, direction
|
|
2132
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
2091
2133
|
return {
|
|
2092
2134
|
display: "flex",
|
|
2093
2135
|
flexDirection: direction,
|
|
@@ -2104,8 +2146,11 @@ var vstack = definePattern({
|
|
|
2104
2146
|
justify: { type: "property", value: "justifyContent" },
|
|
2105
2147
|
gap: { type: "property", value: "gap" }
|
|
2106
2148
|
},
|
|
2149
|
+
defaultValues: {
|
|
2150
|
+
gap: "10px"
|
|
2151
|
+
},
|
|
2107
2152
|
transform(props) {
|
|
2108
|
-
const { justify, gap
|
|
2153
|
+
const { justify, gap, ...rest } = props;
|
|
2109
2154
|
return {
|
|
2110
2155
|
display: "flex",
|
|
2111
2156
|
alignItems: "center",
|
|
@@ -2122,8 +2167,11 @@ var hstack = definePattern({
|
|
|
2122
2167
|
justify: { type: "property", value: "justifyContent" },
|
|
2123
2168
|
gap: { type: "property", value: "gap" }
|
|
2124
2169
|
},
|
|
2170
|
+
defaultValues: {
|
|
2171
|
+
gap: "10px"
|
|
2172
|
+
},
|
|
2125
2173
|
transform(props) {
|
|
2126
|
-
const { justify, gap
|
|
2174
|
+
const { justify, gap, ...rest } = props;
|
|
2127
2175
|
return {
|
|
2128
2176
|
display: "flex",
|
|
2129
2177
|
alignItems: "center",
|
|
@@ -2191,10 +2239,12 @@ var grid = definePattern({
|
|
|
2191
2239
|
columns: { type: "number" },
|
|
2192
2240
|
minChildWidth: { type: "token", value: "sizes", property: "width" }
|
|
2193
2241
|
},
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2242
|
+
defaultValues(props) {
|
|
2243
|
+
return { gap: props.columnGap || props.rowGap ? void 0 : "10px" };
|
|
2244
|
+
},
|
|
2245
|
+
transform(props, { map, isCssUnit }) {
|
|
2246
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
|
|
2247
|
+
const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
2198
2248
|
return {
|
|
2199
2249
|
display: "grid",
|
|
2200
2250
|
gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
|
|
@@ -2250,7 +2300,7 @@ var wrap = definePattern({
|
|
|
2250
2300
|
};
|
|
2251
2301
|
}
|
|
2252
2302
|
});
|
|
2253
|
-
var
|
|
2303
|
+
var container2 = definePattern({
|
|
2254
2304
|
transform(props) {
|
|
2255
2305
|
return {
|
|
2256
2306
|
position: "relative",
|
|
@@ -2313,8 +2363,12 @@ var divider = definePattern({
|
|
|
2313
2363
|
thickness: { type: "token", value: "sizes", property: "borderWidth" },
|
|
2314
2364
|
color: { type: "token", value: "colors", property: "borderColor" }
|
|
2315
2365
|
},
|
|
2366
|
+
defaultValues: {
|
|
2367
|
+
orientation: "horizontal",
|
|
2368
|
+
thickness: "1px"
|
|
2369
|
+
},
|
|
2316
2370
|
transform(props, { map }) {
|
|
2317
|
-
const { orientation
|
|
2371
|
+
const { orientation, thickness, color, ...rest } = props;
|
|
2318
2372
|
return {
|
|
2319
2373
|
"--thickness": thickness,
|
|
2320
2374
|
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
@@ -2376,8 +2430,12 @@ var float = definePattern({
|
|
|
2376
2430
|
]
|
|
2377
2431
|
}
|
|
2378
2432
|
},
|
|
2433
|
+
defaultValues(props) {
|
|
2434
|
+
const offset = props.offset || "0";
|
|
2435
|
+
return { offset, offsetX: offset, offsetY: offset, placement: "top-end" };
|
|
2436
|
+
},
|
|
2379
2437
|
transform(props, { map }) {
|
|
2380
|
-
const { offset
|
|
2438
|
+
const { offset, offsetX, offsetY, placement, ...rest } = props;
|
|
2381
2439
|
return {
|
|
2382
2440
|
display: "inline-flex",
|
|
2383
2441
|
justifyContent: "center",
|
|
@@ -2418,11 +2476,16 @@ var bleed = definePattern({
|
|
|
2418
2476
|
inline: { type: "property", value: "marginInline" },
|
|
2419
2477
|
block: { type: "property", value: "marginBlock" }
|
|
2420
2478
|
},
|
|
2421
|
-
|
|
2422
|
-
|
|
2479
|
+
defaultValues: {
|
|
2480
|
+
inline: "0",
|
|
2481
|
+
block: "0"
|
|
2482
|
+
},
|
|
2483
|
+
transform(props, { map, isCssUnit, isCssVar }) {
|
|
2484
|
+
const { inline, block, ...rest } = props;
|
|
2485
|
+
const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
2423
2486
|
return {
|
|
2424
|
-
"--bleed-x":
|
|
2425
|
-
"--bleed-y":
|
|
2487
|
+
"--bleed-x": map(inline, valueFn),
|
|
2488
|
+
"--bleed-y": map(block, valueFn),
|
|
2426
2489
|
marginInline: "calc(var(--bleed-x, 0) * -1)",
|
|
2427
2490
|
marginBlock: "calc(var(--bleed-y, 0) * -1)",
|
|
2428
2491
|
...rest
|
|
@@ -2437,6 +2500,23 @@ var visuallyHidden = definePattern({
|
|
|
2437
2500
|
};
|
|
2438
2501
|
}
|
|
2439
2502
|
});
|
|
2503
|
+
var cq = definePattern({
|
|
2504
|
+
properties: {
|
|
2505
|
+
name: { type: "token", value: "containerNames", property: "containerName" },
|
|
2506
|
+
type: { type: "property", value: "containerType" }
|
|
2507
|
+
},
|
|
2508
|
+
defaultValues: {
|
|
2509
|
+
type: "inline-size"
|
|
2510
|
+
},
|
|
2511
|
+
transform(props) {
|
|
2512
|
+
const { name, type, ...rest } = props;
|
|
2513
|
+
return {
|
|
2514
|
+
containerType: type,
|
|
2515
|
+
containerName: name,
|
|
2516
|
+
...rest
|
|
2517
|
+
};
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2440
2520
|
var patterns = {
|
|
2441
2521
|
box,
|
|
2442
2522
|
flex,
|
|
@@ -2453,11 +2533,12 @@ var patterns = {
|
|
|
2453
2533
|
grid,
|
|
2454
2534
|
gridItem,
|
|
2455
2535
|
wrap,
|
|
2456
|
-
container,
|
|
2536
|
+
container: container2,
|
|
2457
2537
|
divider,
|
|
2458
2538
|
float,
|
|
2459
2539
|
bleed,
|
|
2460
|
-
visuallyHidden
|
|
2540
|
+
visuallyHidden,
|
|
2541
|
+
cq
|
|
2461
2542
|
};
|
|
2462
2543
|
|
|
2463
2544
|
// src/index.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/preset-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "The base preset for Panda CSS that contains the conditions and utilities",
|
|
5
5
|
"author": "Segun Adebayo <joseshegs@gmail.com>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@pandacss/types": "0.
|
|
35
|
+
"@pandacss/types": "0.29.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|