@pandacss/preset-base 0.3.1 → 0.4.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.ts +18 -8
- package/dist/index.js +124 -27
- package/dist/index.mjs +124 -27
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -289,15 +289,25 @@ declare const preset: {
|
|
|
289
289
|
};
|
|
290
290
|
};
|
|
291
291
|
blocklist: "aspectRatio"[];
|
|
292
|
-
transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
292
|
+
transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
|
|
293
|
+
position: "relative";
|
|
294
|
+
_before: {
|
|
295
|
+
content: "\"\"";
|
|
296
|
+
display: "block";
|
|
297
|
+
height: "0";
|
|
298
|
+
paddingBottom: any;
|
|
299
|
+
};
|
|
300
|
+
'&>*': {
|
|
301
|
+
display: "flex";
|
|
302
|
+
justifyContent: "center";
|
|
303
|
+
alignItems: "center";
|
|
304
|
+
overflow: "hidden";
|
|
305
|
+
position: "absolute";
|
|
306
|
+
inset: "0";
|
|
299
307
|
width: "100%";
|
|
300
308
|
height: "100%";
|
|
309
|
+
};
|
|
310
|
+
'&>img, &>video': {
|
|
301
311
|
objectFit: "cover";
|
|
302
312
|
};
|
|
303
313
|
};
|
|
@@ -428,7 +438,7 @@ declare const preset: {
|
|
|
428
438
|
'--thickness': any;
|
|
429
439
|
width: any;
|
|
430
440
|
height: any;
|
|
431
|
-
|
|
441
|
+
borderBlockEndWidth: any;
|
|
432
442
|
borderInlineEndWidth: any;
|
|
433
443
|
borderColor: any;
|
|
434
444
|
};
|
package/dist/index.js
CHANGED
|
@@ -84,7 +84,7 @@ var conditions = {
|
|
|
84
84
|
autofill: "&:autofill",
|
|
85
85
|
inRange: "&:in-range",
|
|
86
86
|
outOfRange: "&:out-of-range",
|
|
87
|
-
placeholder: "
|
|
87
|
+
placeholder: "&::placeholder",
|
|
88
88
|
placeholderShown: "&:placeholder-shown",
|
|
89
89
|
pressed: "&:where([aria-pressed=true], [data-pressed])",
|
|
90
90
|
selected: "&:where([aria-selected=true], [data-selected])",
|
|
@@ -136,7 +136,13 @@ var background = {
|
|
|
136
136
|
},
|
|
137
137
|
backgroundClip: {
|
|
138
138
|
shorthand: "bgClip",
|
|
139
|
-
className: "bg-clip"
|
|
139
|
+
className: "bg-clip",
|
|
140
|
+
transform(value) {
|
|
141
|
+
return {
|
|
142
|
+
backgroundClip: value,
|
|
143
|
+
WebkitBackgroundClip: value
|
|
144
|
+
};
|
|
145
|
+
}
|
|
140
146
|
},
|
|
141
147
|
background: {
|
|
142
148
|
shorthand: "bg",
|
|
@@ -677,6 +683,12 @@ var effects = {
|
|
|
677
683
|
"var(--backdrop-saturate)",
|
|
678
684
|
"var(--backdrop-sepia)"
|
|
679
685
|
].join(" ")
|
|
686
|
+
},
|
|
687
|
+
transform(value) {
|
|
688
|
+
return {
|
|
689
|
+
backdropFilter: value,
|
|
690
|
+
WebkitBackdropFilter: value
|
|
691
|
+
};
|
|
680
692
|
}
|
|
681
693
|
},
|
|
682
694
|
backdropBlur: {
|
|
@@ -1204,7 +1216,13 @@ var interactivity = {
|
|
|
1204
1216
|
className: "touch"
|
|
1205
1217
|
},
|
|
1206
1218
|
userSelect: {
|
|
1207
|
-
className: "select"
|
|
1219
|
+
className: "select",
|
|
1220
|
+
transform(value) {
|
|
1221
|
+
return {
|
|
1222
|
+
WebkitUserSelect: value,
|
|
1223
|
+
userSelect: value
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1208
1226
|
}
|
|
1209
1227
|
};
|
|
1210
1228
|
|
|
@@ -1213,6 +1231,7 @@ var layout = {
|
|
|
1213
1231
|
aspectRatio: {
|
|
1214
1232
|
className: "aspect",
|
|
1215
1233
|
values: {
|
|
1234
|
+
auto: "auto",
|
|
1216
1235
|
square: "1 / 1",
|
|
1217
1236
|
landscape: "4 / 3",
|
|
1218
1237
|
portrait: "3 / 4",
|
|
@@ -1222,7 +1241,13 @@ var layout = {
|
|
|
1222
1241
|
}
|
|
1223
1242
|
},
|
|
1224
1243
|
boxDecorationBreak: {
|
|
1225
|
-
className: "decoration"
|
|
1244
|
+
className: "decoration",
|
|
1245
|
+
transform(value) {
|
|
1246
|
+
return {
|
|
1247
|
+
boxDecorationBreak: value,
|
|
1248
|
+
WebkitBoxDecorationBreak: value
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1226
1251
|
},
|
|
1227
1252
|
zIndex: {
|
|
1228
1253
|
className: "z"
|
|
@@ -1267,7 +1292,10 @@ var layout = {
|
|
|
1267
1292
|
},
|
|
1268
1293
|
inset: {
|
|
1269
1294
|
className: "inset",
|
|
1270
|
-
values:
|
|
1295
|
+
values: (theme) => ({
|
|
1296
|
+
auto: "auto",
|
|
1297
|
+
...theme("spacing")
|
|
1298
|
+
})
|
|
1271
1299
|
},
|
|
1272
1300
|
insetBlockEnd: {
|
|
1273
1301
|
className: "inset-b",
|
|
@@ -1390,6 +1418,7 @@ var outline = {
|
|
|
1390
1418
|
|
|
1391
1419
|
// src/utilities/sizing.ts
|
|
1392
1420
|
var widthValues = (theme) => ({
|
|
1421
|
+
auto: "auto",
|
|
1393
1422
|
...theme("sizes"),
|
|
1394
1423
|
"1/2": "50%",
|
|
1395
1424
|
"1/3": "33.333333%",
|
|
@@ -1420,6 +1449,7 @@ var widthValues = (theme) => ({
|
|
|
1420
1449
|
screen: "100vw"
|
|
1421
1450
|
});
|
|
1422
1451
|
var heightValues = (theme) => ({
|
|
1452
|
+
auto: "auto",
|
|
1423
1453
|
...theme("sizes"),
|
|
1424
1454
|
svh: "100svh",
|
|
1425
1455
|
lvh: "100lvh",
|
|
@@ -1499,6 +1529,10 @@ var sizing = {
|
|
|
1499
1529
|
};
|
|
1500
1530
|
|
|
1501
1531
|
// src/utilities/spacing.ts
|
|
1532
|
+
var marginValues = (theme) => ({
|
|
1533
|
+
auto: "auto",
|
|
1534
|
+
...theme("spacing")
|
|
1535
|
+
});
|
|
1502
1536
|
var spacing = {
|
|
1503
1537
|
padding: {
|
|
1504
1538
|
className: "p",
|
|
@@ -1556,55 +1590,55 @@ var spacing = {
|
|
|
1556
1590
|
marginLeft: {
|
|
1557
1591
|
className: "ml",
|
|
1558
1592
|
shorthand: "ml",
|
|
1559
|
-
values:
|
|
1593
|
+
values: marginValues
|
|
1560
1594
|
},
|
|
1561
1595
|
marginRight: {
|
|
1562
1596
|
className: "mr",
|
|
1563
1597
|
shorthand: "mr",
|
|
1564
|
-
values:
|
|
1598
|
+
values: marginValues
|
|
1565
1599
|
},
|
|
1566
1600
|
marginTop: {
|
|
1567
1601
|
className: "mt",
|
|
1568
1602
|
shorthand: "mt",
|
|
1569
|
-
values:
|
|
1603
|
+
values: marginValues
|
|
1570
1604
|
},
|
|
1571
1605
|
marginBottom: {
|
|
1572
1606
|
className: "mb",
|
|
1573
1607
|
shorthand: "mb",
|
|
1574
|
-
values:
|
|
1608
|
+
values: marginValues
|
|
1575
1609
|
},
|
|
1576
1610
|
margin: {
|
|
1577
1611
|
className: "m",
|
|
1578
1612
|
shorthand: "m",
|
|
1579
|
-
values:
|
|
1613
|
+
values: marginValues
|
|
1580
1614
|
},
|
|
1581
1615
|
marginBlock: {
|
|
1582
1616
|
className: "my",
|
|
1583
|
-
values:
|
|
1617
|
+
values: marginValues,
|
|
1584
1618
|
shorthand: ["my", "marginY"]
|
|
1585
1619
|
},
|
|
1586
1620
|
marginBlockEnd: {
|
|
1587
1621
|
className: "mb",
|
|
1588
|
-
values:
|
|
1622
|
+
values: marginValues
|
|
1589
1623
|
},
|
|
1590
1624
|
marginBlockStart: {
|
|
1591
1625
|
className: "mt",
|
|
1592
|
-
values:
|
|
1626
|
+
values: marginValues
|
|
1593
1627
|
},
|
|
1594
1628
|
marginInline: {
|
|
1595
1629
|
className: "mx",
|
|
1596
|
-
values:
|
|
1630
|
+
values: marginValues,
|
|
1597
1631
|
shorthand: ["mx", "marginX"]
|
|
1598
1632
|
},
|
|
1599
1633
|
marginInlineEnd: {
|
|
1600
1634
|
className: "me",
|
|
1601
1635
|
shorthand: ["me", "marginEnd"],
|
|
1602
|
-
values:
|
|
1636
|
+
values: marginValues
|
|
1603
1637
|
},
|
|
1604
1638
|
marginInlineStart: {
|
|
1605
1639
|
className: "ms",
|
|
1606
1640
|
shorthand: ["ms", "marginStart"],
|
|
1607
|
-
values:
|
|
1641
|
+
values: marginValues
|
|
1608
1642
|
}
|
|
1609
1643
|
};
|
|
1610
1644
|
|
|
@@ -1890,6 +1924,58 @@ var typography = {
|
|
|
1890
1924
|
}
|
|
1891
1925
|
};
|
|
1892
1926
|
|
|
1927
|
+
// src/utilities/polyfill.ts
|
|
1928
|
+
var polyfill = {
|
|
1929
|
+
appearance: {
|
|
1930
|
+
className: "appearance",
|
|
1931
|
+
transform(value) {
|
|
1932
|
+
return { appearance: value, WebkitAppearance: value };
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
backfaceVisibility: {
|
|
1936
|
+
className: "backface",
|
|
1937
|
+
transform(value) {
|
|
1938
|
+
return { backfaceVisibility: value, WebkitBackfaceVisibility: value };
|
|
1939
|
+
}
|
|
1940
|
+
},
|
|
1941
|
+
clipPath: {
|
|
1942
|
+
className: "clip-path",
|
|
1943
|
+
transform(value) {
|
|
1944
|
+
return { clipPath: value, WebkitClipPath: value };
|
|
1945
|
+
}
|
|
1946
|
+
},
|
|
1947
|
+
hyphens: {
|
|
1948
|
+
className: "hyphens",
|
|
1949
|
+
transform(value) {
|
|
1950
|
+
return { hyphens: value, WebkitHyphens: value };
|
|
1951
|
+
}
|
|
1952
|
+
},
|
|
1953
|
+
mask: {
|
|
1954
|
+
className: "mask",
|
|
1955
|
+
transform(value) {
|
|
1956
|
+
return { mask: value, WebkitMask: value };
|
|
1957
|
+
}
|
|
1958
|
+
},
|
|
1959
|
+
maskImage: {
|
|
1960
|
+
className: "mask-image",
|
|
1961
|
+
transform(value) {
|
|
1962
|
+
return { maskImage: value, WebkitMaskImage: value };
|
|
1963
|
+
}
|
|
1964
|
+
},
|
|
1965
|
+
maskSize: {
|
|
1966
|
+
className: "mask-size",
|
|
1967
|
+
transform(value) {
|
|
1968
|
+
return { maskSize: value, WebkitMaskSize: value };
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
textSizeAdjust: {
|
|
1972
|
+
className: "text-size-adjust",
|
|
1973
|
+
transform(value) {
|
|
1974
|
+
return { textSizeAdjust: value, WebkitTextSizeAdjust: value };
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
};
|
|
1978
|
+
|
|
1893
1979
|
// src/utilities/index.ts
|
|
1894
1980
|
var utilities = Object.assign(
|
|
1895
1981
|
{},
|
|
@@ -1910,7 +1996,8 @@ var utilities = Object.assign(
|
|
|
1910
1996
|
transforms,
|
|
1911
1997
|
interactivity,
|
|
1912
1998
|
svg,
|
|
1913
|
-
helpers
|
|
1999
|
+
helpers,
|
|
2000
|
+
polyfill
|
|
1914
2001
|
);
|
|
1915
2002
|
|
|
1916
2003
|
// src/patterns.ts
|
|
@@ -2146,17 +2233,27 @@ var aspectRatio = definePattern({
|
|
|
2146
2233
|
ratio: { type: "number" }
|
|
2147
2234
|
},
|
|
2148
2235
|
blocklist: ["aspectRatio"],
|
|
2149
|
-
transform(props) {
|
|
2150
|
-
const { ratio, ...rest } = props;
|
|
2236
|
+
transform(props, { map }) {
|
|
2237
|
+
const { ratio = 4 / 3, ...rest } = props;
|
|
2151
2238
|
return {
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2239
|
+
position: "relative",
|
|
2240
|
+
_before: {
|
|
2241
|
+
content: `""`,
|
|
2242
|
+
display: "block",
|
|
2243
|
+
height: "0",
|
|
2244
|
+
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
2245
|
+
},
|
|
2246
|
+
"&>*": {
|
|
2247
|
+
display: "flex",
|
|
2248
|
+
justifyContent: "center",
|
|
2249
|
+
alignItems: "center",
|
|
2250
|
+
overflow: "hidden",
|
|
2251
|
+
position: "absolute",
|
|
2252
|
+
inset: "0",
|
|
2158
2253
|
width: "100%",
|
|
2159
|
-
height: "100%"
|
|
2254
|
+
height: "100%"
|
|
2255
|
+
},
|
|
2256
|
+
"&>img, &>video": {
|
|
2160
2257
|
objectFit: "cover"
|
|
2161
2258
|
},
|
|
2162
2259
|
...rest
|
|
@@ -2175,7 +2272,7 @@ var divider = definePattern({
|
|
|
2175
2272
|
"--thickness": thickness,
|
|
2176
2273
|
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
2177
2274
|
height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
|
|
2178
|
-
|
|
2275
|
+
borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
|
|
2179
2276
|
borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
|
|
2180
2277
|
borderColor: color,
|
|
2181
2278
|
...rest
|
package/dist/index.mjs
CHANGED
|
@@ -57,7 +57,7 @@ var conditions = {
|
|
|
57
57
|
autofill: "&:autofill",
|
|
58
58
|
inRange: "&:in-range",
|
|
59
59
|
outOfRange: "&:out-of-range",
|
|
60
|
-
placeholder: "
|
|
60
|
+
placeholder: "&::placeholder",
|
|
61
61
|
placeholderShown: "&:placeholder-shown",
|
|
62
62
|
pressed: "&:where([aria-pressed=true], [data-pressed])",
|
|
63
63
|
selected: "&:where([aria-selected=true], [data-selected])",
|
|
@@ -109,7 +109,13 @@ var background = {
|
|
|
109
109
|
},
|
|
110
110
|
backgroundClip: {
|
|
111
111
|
shorthand: "bgClip",
|
|
112
|
-
className: "bg-clip"
|
|
112
|
+
className: "bg-clip",
|
|
113
|
+
transform(value) {
|
|
114
|
+
return {
|
|
115
|
+
backgroundClip: value,
|
|
116
|
+
WebkitBackgroundClip: value
|
|
117
|
+
};
|
|
118
|
+
}
|
|
113
119
|
},
|
|
114
120
|
background: {
|
|
115
121
|
shorthand: "bg",
|
|
@@ -650,6 +656,12 @@ var effects = {
|
|
|
650
656
|
"var(--backdrop-saturate)",
|
|
651
657
|
"var(--backdrop-sepia)"
|
|
652
658
|
].join(" ")
|
|
659
|
+
},
|
|
660
|
+
transform(value) {
|
|
661
|
+
return {
|
|
662
|
+
backdropFilter: value,
|
|
663
|
+
WebkitBackdropFilter: value
|
|
664
|
+
};
|
|
653
665
|
}
|
|
654
666
|
},
|
|
655
667
|
backdropBlur: {
|
|
@@ -1177,7 +1189,13 @@ var interactivity = {
|
|
|
1177
1189
|
className: "touch"
|
|
1178
1190
|
},
|
|
1179
1191
|
userSelect: {
|
|
1180
|
-
className: "select"
|
|
1192
|
+
className: "select",
|
|
1193
|
+
transform(value) {
|
|
1194
|
+
return {
|
|
1195
|
+
WebkitUserSelect: value,
|
|
1196
|
+
userSelect: value
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1181
1199
|
}
|
|
1182
1200
|
};
|
|
1183
1201
|
|
|
@@ -1186,6 +1204,7 @@ var layout = {
|
|
|
1186
1204
|
aspectRatio: {
|
|
1187
1205
|
className: "aspect",
|
|
1188
1206
|
values: {
|
|
1207
|
+
auto: "auto",
|
|
1189
1208
|
square: "1 / 1",
|
|
1190
1209
|
landscape: "4 / 3",
|
|
1191
1210
|
portrait: "3 / 4",
|
|
@@ -1195,7 +1214,13 @@ var layout = {
|
|
|
1195
1214
|
}
|
|
1196
1215
|
},
|
|
1197
1216
|
boxDecorationBreak: {
|
|
1198
|
-
className: "decoration"
|
|
1217
|
+
className: "decoration",
|
|
1218
|
+
transform(value) {
|
|
1219
|
+
return {
|
|
1220
|
+
boxDecorationBreak: value,
|
|
1221
|
+
WebkitBoxDecorationBreak: value
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1199
1224
|
},
|
|
1200
1225
|
zIndex: {
|
|
1201
1226
|
className: "z"
|
|
@@ -1240,7 +1265,10 @@ var layout = {
|
|
|
1240
1265
|
},
|
|
1241
1266
|
inset: {
|
|
1242
1267
|
className: "inset",
|
|
1243
|
-
values:
|
|
1268
|
+
values: (theme) => ({
|
|
1269
|
+
auto: "auto",
|
|
1270
|
+
...theme("spacing")
|
|
1271
|
+
})
|
|
1244
1272
|
},
|
|
1245
1273
|
insetBlockEnd: {
|
|
1246
1274
|
className: "inset-b",
|
|
@@ -1363,6 +1391,7 @@ var outline = {
|
|
|
1363
1391
|
|
|
1364
1392
|
// src/utilities/sizing.ts
|
|
1365
1393
|
var widthValues = (theme) => ({
|
|
1394
|
+
auto: "auto",
|
|
1366
1395
|
...theme("sizes"),
|
|
1367
1396
|
"1/2": "50%",
|
|
1368
1397
|
"1/3": "33.333333%",
|
|
@@ -1393,6 +1422,7 @@ var widthValues = (theme) => ({
|
|
|
1393
1422
|
screen: "100vw"
|
|
1394
1423
|
});
|
|
1395
1424
|
var heightValues = (theme) => ({
|
|
1425
|
+
auto: "auto",
|
|
1396
1426
|
...theme("sizes"),
|
|
1397
1427
|
svh: "100svh",
|
|
1398
1428
|
lvh: "100lvh",
|
|
@@ -1472,6 +1502,10 @@ var sizing = {
|
|
|
1472
1502
|
};
|
|
1473
1503
|
|
|
1474
1504
|
// src/utilities/spacing.ts
|
|
1505
|
+
var marginValues = (theme) => ({
|
|
1506
|
+
auto: "auto",
|
|
1507
|
+
...theme("spacing")
|
|
1508
|
+
});
|
|
1475
1509
|
var spacing = {
|
|
1476
1510
|
padding: {
|
|
1477
1511
|
className: "p",
|
|
@@ -1529,55 +1563,55 @@ var spacing = {
|
|
|
1529
1563
|
marginLeft: {
|
|
1530
1564
|
className: "ml",
|
|
1531
1565
|
shorthand: "ml",
|
|
1532
|
-
values:
|
|
1566
|
+
values: marginValues
|
|
1533
1567
|
},
|
|
1534
1568
|
marginRight: {
|
|
1535
1569
|
className: "mr",
|
|
1536
1570
|
shorthand: "mr",
|
|
1537
|
-
values:
|
|
1571
|
+
values: marginValues
|
|
1538
1572
|
},
|
|
1539
1573
|
marginTop: {
|
|
1540
1574
|
className: "mt",
|
|
1541
1575
|
shorthand: "mt",
|
|
1542
|
-
values:
|
|
1576
|
+
values: marginValues
|
|
1543
1577
|
},
|
|
1544
1578
|
marginBottom: {
|
|
1545
1579
|
className: "mb",
|
|
1546
1580
|
shorthand: "mb",
|
|
1547
|
-
values:
|
|
1581
|
+
values: marginValues
|
|
1548
1582
|
},
|
|
1549
1583
|
margin: {
|
|
1550
1584
|
className: "m",
|
|
1551
1585
|
shorthand: "m",
|
|
1552
|
-
values:
|
|
1586
|
+
values: marginValues
|
|
1553
1587
|
},
|
|
1554
1588
|
marginBlock: {
|
|
1555
1589
|
className: "my",
|
|
1556
|
-
values:
|
|
1590
|
+
values: marginValues,
|
|
1557
1591
|
shorthand: ["my", "marginY"]
|
|
1558
1592
|
},
|
|
1559
1593
|
marginBlockEnd: {
|
|
1560
1594
|
className: "mb",
|
|
1561
|
-
values:
|
|
1595
|
+
values: marginValues
|
|
1562
1596
|
},
|
|
1563
1597
|
marginBlockStart: {
|
|
1564
1598
|
className: "mt",
|
|
1565
|
-
values:
|
|
1599
|
+
values: marginValues
|
|
1566
1600
|
},
|
|
1567
1601
|
marginInline: {
|
|
1568
1602
|
className: "mx",
|
|
1569
|
-
values:
|
|
1603
|
+
values: marginValues,
|
|
1570
1604
|
shorthand: ["mx", "marginX"]
|
|
1571
1605
|
},
|
|
1572
1606
|
marginInlineEnd: {
|
|
1573
1607
|
className: "me",
|
|
1574
1608
|
shorthand: ["me", "marginEnd"],
|
|
1575
|
-
values:
|
|
1609
|
+
values: marginValues
|
|
1576
1610
|
},
|
|
1577
1611
|
marginInlineStart: {
|
|
1578
1612
|
className: "ms",
|
|
1579
1613
|
shorthand: ["ms", "marginStart"],
|
|
1580
|
-
values:
|
|
1614
|
+
values: marginValues
|
|
1581
1615
|
}
|
|
1582
1616
|
};
|
|
1583
1617
|
|
|
@@ -1863,6 +1897,58 @@ var typography = {
|
|
|
1863
1897
|
}
|
|
1864
1898
|
};
|
|
1865
1899
|
|
|
1900
|
+
// src/utilities/polyfill.ts
|
|
1901
|
+
var polyfill = {
|
|
1902
|
+
appearance: {
|
|
1903
|
+
className: "appearance",
|
|
1904
|
+
transform(value) {
|
|
1905
|
+
return { appearance: value, WebkitAppearance: value };
|
|
1906
|
+
}
|
|
1907
|
+
},
|
|
1908
|
+
backfaceVisibility: {
|
|
1909
|
+
className: "backface",
|
|
1910
|
+
transform(value) {
|
|
1911
|
+
return { backfaceVisibility: value, WebkitBackfaceVisibility: value };
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1914
|
+
clipPath: {
|
|
1915
|
+
className: "clip-path",
|
|
1916
|
+
transform(value) {
|
|
1917
|
+
return { clipPath: value, WebkitClipPath: value };
|
|
1918
|
+
}
|
|
1919
|
+
},
|
|
1920
|
+
hyphens: {
|
|
1921
|
+
className: "hyphens",
|
|
1922
|
+
transform(value) {
|
|
1923
|
+
return { hyphens: value, WebkitHyphens: value };
|
|
1924
|
+
}
|
|
1925
|
+
},
|
|
1926
|
+
mask: {
|
|
1927
|
+
className: "mask",
|
|
1928
|
+
transform(value) {
|
|
1929
|
+
return { mask: value, WebkitMask: value };
|
|
1930
|
+
}
|
|
1931
|
+
},
|
|
1932
|
+
maskImage: {
|
|
1933
|
+
className: "mask-image",
|
|
1934
|
+
transform(value) {
|
|
1935
|
+
return { maskImage: value, WebkitMaskImage: value };
|
|
1936
|
+
}
|
|
1937
|
+
},
|
|
1938
|
+
maskSize: {
|
|
1939
|
+
className: "mask-size",
|
|
1940
|
+
transform(value) {
|
|
1941
|
+
return { maskSize: value, WebkitMaskSize: value };
|
|
1942
|
+
}
|
|
1943
|
+
},
|
|
1944
|
+
textSizeAdjust: {
|
|
1945
|
+
className: "text-size-adjust",
|
|
1946
|
+
transform(value) {
|
|
1947
|
+
return { textSizeAdjust: value, WebkitTextSizeAdjust: value };
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
};
|
|
1951
|
+
|
|
1866
1952
|
// src/utilities/index.ts
|
|
1867
1953
|
var utilities = Object.assign(
|
|
1868
1954
|
{},
|
|
@@ -1883,7 +1969,8 @@ var utilities = Object.assign(
|
|
|
1883
1969
|
transforms,
|
|
1884
1970
|
interactivity,
|
|
1885
1971
|
svg,
|
|
1886
|
-
helpers
|
|
1972
|
+
helpers,
|
|
1973
|
+
polyfill
|
|
1887
1974
|
);
|
|
1888
1975
|
|
|
1889
1976
|
// src/patterns.ts
|
|
@@ -2119,17 +2206,27 @@ var aspectRatio = definePattern({
|
|
|
2119
2206
|
ratio: { type: "number" }
|
|
2120
2207
|
},
|
|
2121
2208
|
blocklist: ["aspectRatio"],
|
|
2122
|
-
transform(props) {
|
|
2123
|
-
const { ratio, ...rest } = props;
|
|
2209
|
+
transform(props, { map }) {
|
|
2210
|
+
const { ratio = 4 / 3, ...rest } = props;
|
|
2124
2211
|
return {
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2212
|
+
position: "relative",
|
|
2213
|
+
_before: {
|
|
2214
|
+
content: `""`,
|
|
2215
|
+
display: "block",
|
|
2216
|
+
height: "0",
|
|
2217
|
+
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
2218
|
+
},
|
|
2219
|
+
"&>*": {
|
|
2220
|
+
display: "flex",
|
|
2221
|
+
justifyContent: "center",
|
|
2222
|
+
alignItems: "center",
|
|
2223
|
+
overflow: "hidden",
|
|
2224
|
+
position: "absolute",
|
|
2225
|
+
inset: "0",
|
|
2131
2226
|
width: "100%",
|
|
2132
|
-
height: "100%"
|
|
2227
|
+
height: "100%"
|
|
2228
|
+
},
|
|
2229
|
+
"&>img, &>video": {
|
|
2133
2230
|
objectFit: "cover"
|
|
2134
2231
|
},
|
|
2135
2232
|
...rest
|
|
@@ -2148,7 +2245,7 @@ var divider = definePattern({
|
|
|
2148
2245
|
"--thickness": thickness,
|
|
2149
2246
|
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
2150
2247
|
height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
|
|
2151
|
-
|
|
2248
|
+
borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
|
|
2152
2249
|
borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
|
|
2153
2250
|
borderColor: color,
|
|
2154
2251
|
...rest
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/preset-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "The base preset for Panda CSS that contains the conditions and utilities",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pandacss/types": "0.
|
|
17
|
+
"@pandacss/types": "0.4.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|