@pandacss/preset-base 0.3.2 → 0.5.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.
@@ -0,0 +1,479 @@
1
+ import * as _pandacss_types_dist_pattern from '@pandacss/types/dist/pattern';
2
+ import * as _pandacss_types from '@pandacss/types';
3
+
4
+ declare const preset: {
5
+ conditions: {
6
+ hover: string;
7
+ focus: string;
8
+ focusWithin: string;
9
+ focusVisible: string;
10
+ disabled: string;
11
+ active: string;
12
+ visited: string;
13
+ target: string;
14
+ readOnly: string;
15
+ readWrite: string;
16
+ empty: string;
17
+ checked: string;
18
+ enabled: string;
19
+ expanded: string;
20
+ highlighted: string;
21
+ before: string;
22
+ after: string;
23
+ firstLetter: string;
24
+ firstLine: string;
25
+ marker: string;
26
+ selection: string;
27
+ file: string;
28
+ backdrop: string;
29
+ first: string;
30
+ last: string;
31
+ only: string;
32
+ even: string;
33
+ odd: string;
34
+ firstOfType: string;
35
+ lastOfType: string;
36
+ onlyOfType: string;
37
+ peerFocus: string;
38
+ peerHover: string;
39
+ peerActive: string;
40
+ peerFocusWithin: string;
41
+ peerFocusVisible: string;
42
+ peerDisabled: string;
43
+ peerChecked: string;
44
+ peerInvalid: string;
45
+ peerExpanded: string;
46
+ peerPlaceholderShown: string;
47
+ groupFocus: string;
48
+ groupHover: string;
49
+ groupActive: string;
50
+ groupFocusWithin: string;
51
+ groupFocusVisible: string;
52
+ groupDisabled: string;
53
+ groupChecked: string;
54
+ groupExpanded: string;
55
+ groupInvalid: string;
56
+ indeterminate: string;
57
+ required: string;
58
+ valid: string;
59
+ invalid: string;
60
+ autofill: string;
61
+ inRange: string;
62
+ outOfRange: string;
63
+ placeholder: string;
64
+ placeholderShown: string;
65
+ pressed: string;
66
+ selected: string;
67
+ default: string;
68
+ optional: string;
69
+ open: string;
70
+ fullscreen: string;
71
+ loading: string;
72
+ currentPage: string;
73
+ currentStep: string;
74
+ motionReduce: string;
75
+ motionSafe: string;
76
+ print: string;
77
+ landscape: string;
78
+ portrait: string;
79
+ dark: string;
80
+ light: string;
81
+ osDark: string;
82
+ osLight: string;
83
+ highConstrast: string;
84
+ lessContrast: string;
85
+ moreContrast: string;
86
+ ltr: string;
87
+ rtl: string;
88
+ scrollbar: string;
89
+ scrollbarThumb: string;
90
+ scrollbarTrack: string;
91
+ horizontal: string;
92
+ vertical: string;
93
+ };
94
+ utilities: _pandacss_types.UtilityConfig;
95
+ patterns: {
96
+ box: {
97
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>;
98
+ };
99
+ flex: {
100
+ properties: {
101
+ align: {
102
+ type: "property";
103
+ value: "alignItems";
104
+ };
105
+ justify: {
106
+ type: "property";
107
+ value: "justifyContent";
108
+ };
109
+ direction: {
110
+ type: "property";
111
+ value: "flexDirection";
112
+ };
113
+ wrap: {
114
+ type: "property";
115
+ value: "flexWrap";
116
+ };
117
+ basis: {
118
+ type: "property";
119
+ value: "flexBasis";
120
+ };
121
+ grow: {
122
+ type: "property";
123
+ value: "flexGrow";
124
+ };
125
+ shrink: {
126
+ type: "property";
127
+ value: "flexShrink";
128
+ };
129
+ };
130
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
131
+ display: "flex";
132
+ flexDirection: any;
133
+ alignItems: any;
134
+ justifyContent: any;
135
+ flexWrap: any;
136
+ flexBasis: any;
137
+ flexGrow: any;
138
+ flexShrink: any;
139
+ };
140
+ };
141
+ stack: {
142
+ properties: {
143
+ align: {
144
+ type: "property";
145
+ value: "alignItems";
146
+ };
147
+ justify: {
148
+ type: "property";
149
+ value: "justifyContent";
150
+ };
151
+ direction: {
152
+ type: "property";
153
+ value: "flexDirection";
154
+ };
155
+ gap: {
156
+ type: "property";
157
+ value: "gap";
158
+ };
159
+ };
160
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
161
+ display: "flex";
162
+ flexDirection: any;
163
+ alignItems: any;
164
+ justifyContent: any;
165
+ gap: any;
166
+ };
167
+ };
168
+ vstack: {
169
+ jsx: string;
170
+ properties: {
171
+ justify: {
172
+ type: "property";
173
+ value: "justifyContent";
174
+ };
175
+ gap: {
176
+ type: "property";
177
+ value: "gap";
178
+ };
179
+ };
180
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
181
+ display: "flex";
182
+ alignItems: "center";
183
+ justifyContent: any;
184
+ gap: any;
185
+ flexDirection: "column";
186
+ };
187
+ };
188
+ hstack: {
189
+ jsx: string;
190
+ properties: {
191
+ justify: {
192
+ type: "property";
193
+ value: "justifyContent";
194
+ };
195
+ gap: {
196
+ type: "property";
197
+ value: "gap";
198
+ };
199
+ };
200
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
201
+ display: "flex";
202
+ alignItems: "center";
203
+ justifyContent: any;
204
+ gap: any;
205
+ flexDirection: "row";
206
+ };
207
+ };
208
+ spacer: {
209
+ properties: {
210
+ size: {
211
+ type: "token";
212
+ value: "spacing";
213
+ };
214
+ };
215
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
216
+ alignSelf: "stretch";
217
+ justifySelf: "stretch";
218
+ flex: any;
219
+ };
220
+ };
221
+ square: {
222
+ properties: {
223
+ size: {
224
+ type: "property";
225
+ value: "width";
226
+ };
227
+ };
228
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
229
+ display: "flex";
230
+ alignItems: "center";
231
+ justifyContent: "center";
232
+ flex: "0 0 auto";
233
+ width: any;
234
+ height: any;
235
+ };
236
+ };
237
+ circle: {
238
+ properties: {
239
+ size: {
240
+ type: "property";
241
+ value: "width";
242
+ };
243
+ };
244
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
245
+ display: "flex";
246
+ alignItems: "center";
247
+ justifyContent: "center";
248
+ flex: "0 0 auto";
249
+ width: any;
250
+ height: any;
251
+ borderRadius: "9999px";
252
+ };
253
+ };
254
+ center: {
255
+ properties: {
256
+ inline: {
257
+ type: "boolean";
258
+ };
259
+ };
260
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
261
+ display: "flex" | "inline-flex";
262
+ alignItems: "center";
263
+ justifyContent: "center";
264
+ };
265
+ };
266
+ linkBox: {
267
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
268
+ position: "relative";
269
+ '& :where(a, abbr)': {
270
+ position: "relative";
271
+ zIndex: "1";
272
+ };
273
+ };
274
+ };
275
+ linkOverlay: {
276
+ jsxElement: string;
277
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
278
+ position: "static";
279
+ _before: any;
280
+ };
281
+ };
282
+ aspectRatio: {
283
+ properties: {
284
+ ratio: {
285
+ type: "number";
286
+ };
287
+ };
288
+ blocklist: "aspectRatio"[];
289
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
290
+ position: "relative";
291
+ _before: {
292
+ content: "\"\"";
293
+ display: "block";
294
+ height: "0";
295
+ paddingBottom: any;
296
+ };
297
+ '&>*': {
298
+ display: "flex";
299
+ justifyContent: "center";
300
+ alignItems: "center";
301
+ overflow: "hidden";
302
+ position: "absolute";
303
+ inset: "0";
304
+ width: "100%";
305
+ height: "100%";
306
+ };
307
+ '&>img, &>video': {
308
+ objectFit: "cover";
309
+ };
310
+ };
311
+ };
312
+ grid: {
313
+ properties: {
314
+ gap: {
315
+ type: "property";
316
+ value: "gap";
317
+ };
318
+ columnGap: {
319
+ type: "property";
320
+ value: "gap";
321
+ };
322
+ rowGap: {
323
+ type: "property";
324
+ value: "gap";
325
+ };
326
+ columns: {
327
+ type: "number";
328
+ };
329
+ minChildWidth: {
330
+ type: "token";
331
+ value: "sizes";
332
+ property: "width";
333
+ };
334
+ };
335
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
336
+ display: "grid";
337
+ gridTemplateColumns: any;
338
+ gap: any;
339
+ columnGap: any;
340
+ rowGap: any;
341
+ };
342
+ };
343
+ gridItem: {
344
+ properties: {
345
+ colSpan: {
346
+ type: "number";
347
+ };
348
+ rowSpan: {
349
+ type: "number";
350
+ };
351
+ colStart: {
352
+ type: "number";
353
+ };
354
+ rowStart: {
355
+ type: "number";
356
+ };
357
+ colEnd: {
358
+ type: "number";
359
+ };
360
+ rowEnd: {
361
+ type: "number";
362
+ };
363
+ };
364
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
365
+ gridColumn: any;
366
+ gridRow: any;
367
+ gridColumnEnd: any;
368
+ gridRowEnd: any;
369
+ };
370
+ };
371
+ wrap: {
372
+ properties: {
373
+ gap: {
374
+ type: "property";
375
+ value: "gap";
376
+ };
377
+ rowGap: {
378
+ type: "property";
379
+ value: "gap";
380
+ };
381
+ columnGap: {
382
+ type: "property";
383
+ value: "gap";
384
+ };
385
+ align: {
386
+ type: "property";
387
+ value: "alignItems";
388
+ };
389
+ justify: {
390
+ type: "property";
391
+ value: "justifyContent";
392
+ };
393
+ };
394
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
395
+ display: "flex";
396
+ flexWrap: "wrap";
397
+ alignItems: any;
398
+ justifyContent: any;
399
+ gap: any;
400
+ columnGap: any;
401
+ rowGap: any;
402
+ };
403
+ };
404
+ container: {
405
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
406
+ position: "relative";
407
+ maxWidth: "8xl";
408
+ mx: string;
409
+ px: {
410
+ base: string;
411
+ md: string;
412
+ lg: string;
413
+ };
414
+ };
415
+ };
416
+ divider: {
417
+ properties: {
418
+ orientation: {
419
+ type: "enum";
420
+ value: string[];
421
+ };
422
+ thickness: {
423
+ type: "token";
424
+ value: "sizes";
425
+ property: "borderWidth";
426
+ };
427
+ color: {
428
+ type: "token";
429
+ value: "colors";
430
+ property: "borderColor";
431
+ };
432
+ };
433
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
434
+ '--thickness': any;
435
+ width: any;
436
+ height: any;
437
+ borderBlockEndWidth: any;
438
+ borderInlineEndWidth: any;
439
+ borderColor: any;
440
+ };
441
+ };
442
+ float: {
443
+ properties: {
444
+ offsetX: {
445
+ type: "token";
446
+ value: "spacing";
447
+ property: "left";
448
+ };
449
+ offsetY: {
450
+ type: "token";
451
+ value: "spacing";
452
+ property: "top";
453
+ };
454
+ offset: {
455
+ type: "token";
456
+ value: "spacing";
457
+ property: "top";
458
+ };
459
+ placement: {
460
+ type: "enum";
461
+ value: string[];
462
+ };
463
+ };
464
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
465
+ display: "inline-flex";
466
+ justifyContent: "center";
467
+ alignItems: "center";
468
+ position: "absolute";
469
+ insetBlockStart: any;
470
+ insetBlockEnd: any;
471
+ insetInlineStart: any;
472
+ insetInlineEnd: any;
473
+ translate: any;
474
+ };
475
+ };
476
+ };
477
+ };
478
+
479
+ export { preset as default, preset };
package/dist/index.d.ts CHANGED
@@ -94,7 +94,6 @@ declare const preset: {
94
94
  utilities: _pandacss_types.UtilityConfig;
95
95
  patterns: {
96
96
  box: {
97
- properties: {};
98
97
  transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>;
99
98
  };
100
99
  flex: {
@@ -265,7 +264,6 @@ declare const preset: {
265
264
  };
266
265
  };
267
266
  linkBox: {
268
- properties: {};
269
267
  transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
270
268
  position: "relative";
271
269
  '& :where(a, abbr)': {
@@ -276,7 +274,6 @@ declare const preset: {
276
274
  };
277
275
  linkOverlay: {
278
276
  jsxElement: string;
279
- properties: {};
280
277
  transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
281
278
  position: "static";
282
279
  _before: any;
@@ -289,15 +286,25 @@ declare const preset: {
289
286
  };
290
287
  };
291
288
  blocklist: "aspectRatio"[];
292
- transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
293
- aspectRatio: any;
294
- overflow: "hidden";
295
- display: "flex";
296
- justifyContent: "center";
297
- alignItems: "center";
298
- '&>img, &>video': {
289
+ transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>, { map }: _pandacss_types.PatternHelpers): {
290
+ position: "relative";
291
+ _before: {
292
+ content: "\"\"";
293
+ display: "block";
294
+ height: "0";
295
+ paddingBottom: any;
296
+ };
297
+ '&>*': {
298
+ display: "flex";
299
+ justifyContent: "center";
300
+ alignItems: "center";
301
+ overflow: "hidden";
302
+ position: "absolute";
303
+ inset: "0";
299
304
  width: "100%";
300
305
  height: "100%";
306
+ };
307
+ '&>img, &>video': {
301
308
  objectFit: "cover";
302
309
  };
303
310
  };
@@ -395,7 +402,6 @@ declare const preset: {
395
402
  };
396
403
  };
397
404
  container: {
398
- properties: {};
399
405
  transform(props: _pandacss_types_dist_pattern.Props<_pandacss_types_dist_pattern.PatternProperties>): {
400
406
  position: "relative";
401
407
  maxWidth: "8xl";
@@ -428,7 +434,7 @@ declare const preset: {
428
434
  '--thickness': any;
429
435
  width: any;
430
436
  height: any;
431
- borderInlineStartWidth: any;
437
+ borderBlockEndWidth: any;
432
438
  borderInlineEndWidth: any;
433
439
  borderColor: any;
434
440
  };
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: "&: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: "spacing"
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: "spacing"
1593
+ values: marginValues
1560
1594
  },
1561
1595
  marginRight: {
1562
1596
  className: "mr",
1563
1597
  shorthand: "mr",
1564
- values: "spacing"
1598
+ values: marginValues
1565
1599
  },
1566
1600
  marginTop: {
1567
1601
  className: "mt",
1568
1602
  shorthand: "mt",
1569
- values: "spacing"
1603
+ values: marginValues
1570
1604
  },
1571
1605
  marginBottom: {
1572
1606
  className: "mb",
1573
1607
  shorthand: "mb",
1574
- values: "spacing"
1608
+ values: marginValues
1575
1609
  },
1576
1610
  margin: {
1577
1611
  className: "m",
1578
1612
  shorthand: "m",
1579
- values: "spacing"
1613
+ values: marginValues
1580
1614
  },
1581
1615
  marginBlock: {
1582
1616
  className: "my",
1583
- values: "spacing",
1617
+ values: marginValues,
1584
1618
  shorthand: ["my", "marginY"]
1585
1619
  },
1586
1620
  marginBlockEnd: {
1587
1621
  className: "mb",
1588
- values: "spacing"
1622
+ values: marginValues
1589
1623
  },
1590
1624
  marginBlockStart: {
1591
1625
  className: "mt",
1592
- values: "spacing"
1626
+ values: marginValues
1593
1627
  },
1594
1628
  marginInline: {
1595
1629
  className: "mx",
1596
- values: "spacing",
1630
+ values: marginValues,
1597
1631
  shorthand: ["mx", "marginX"]
1598
1632
  },
1599
1633
  marginInlineEnd: {
1600
1634
  className: "me",
1601
1635
  shorthand: ["me", "marginEnd"],
1602
- values: "spacing"
1636
+ values: marginValues
1603
1637
  },
1604
1638
  marginInlineStart: {
1605
1639
  className: "ms",
1606
1640
  shorthand: ["ms", "marginStart"],
1607
- values: "spacing"
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
@@ -1918,7 +2005,6 @@ function definePattern(config) {
1918
2005
  return config;
1919
2006
  }
1920
2007
  var box = definePattern({
1921
- properties: {},
1922
2008
  transform(props) {
1923
2009
  return props;
1924
2010
  }
@@ -2116,7 +2202,6 @@ var wrap = definePattern({
2116
2202
  }
2117
2203
  });
2118
2204
  var container = definePattern({
2119
- properties: {},
2120
2205
  transform(props) {
2121
2206
  return {
2122
2207
  position: "relative",
@@ -2146,17 +2231,27 @@ var aspectRatio = definePattern({
2146
2231
  ratio: { type: "number" }
2147
2232
  },
2148
2233
  blocklist: ["aspectRatio"],
2149
- transform(props) {
2150
- const { ratio, ...rest } = props;
2234
+ transform(props, { map }) {
2235
+ const { ratio = 4 / 3, ...rest } = props;
2151
2236
  return {
2152
- aspectRatio: ratio,
2153
- overflow: "hidden",
2154
- display: "flex",
2155
- justifyContent: "center",
2156
- alignItems: "center",
2157
- "&>img, &>video": {
2237
+ position: "relative",
2238
+ _before: {
2239
+ content: `""`,
2240
+ display: "block",
2241
+ height: "0",
2242
+ paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
2243
+ },
2244
+ "&>*": {
2245
+ display: "flex",
2246
+ justifyContent: "center",
2247
+ alignItems: "center",
2248
+ overflow: "hidden",
2249
+ position: "absolute",
2250
+ inset: "0",
2158
2251
  width: "100%",
2159
- height: "100%",
2252
+ height: "100%"
2253
+ },
2254
+ "&>img, &>video": {
2160
2255
  objectFit: "cover"
2161
2256
  },
2162
2257
  ...rest
@@ -2175,7 +2270,7 @@ var divider = definePattern({
2175
2270
  "--thickness": thickness,
2176
2271
  width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
2177
2272
  height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
2178
- borderInlineStartWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
2273
+ borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
2179
2274
  borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
2180
2275
  borderColor: color,
2181
2276
  ...rest
@@ -2183,7 +2278,6 @@ var divider = definePattern({
2183
2278
  }
2184
2279
  });
2185
2280
  var linkBox = definePattern({
2186
- properties: {},
2187
2281
  transform(props) {
2188
2282
  return {
2189
2283
  position: "relative",
@@ -2197,7 +2291,6 @@ var linkBox = definePattern({
2197
2291
  });
2198
2292
  var linkOverlay = definePattern({
2199
2293
  jsxElement: "a",
2200
- properties: {},
2201
2294
  transform(props) {
2202
2295
  return {
2203
2296
  position: "static",
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: "&: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: "spacing"
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: "spacing"
1566
+ values: marginValues
1533
1567
  },
1534
1568
  marginRight: {
1535
1569
  className: "mr",
1536
1570
  shorthand: "mr",
1537
- values: "spacing"
1571
+ values: marginValues
1538
1572
  },
1539
1573
  marginTop: {
1540
1574
  className: "mt",
1541
1575
  shorthand: "mt",
1542
- values: "spacing"
1576
+ values: marginValues
1543
1577
  },
1544
1578
  marginBottom: {
1545
1579
  className: "mb",
1546
1580
  shorthand: "mb",
1547
- values: "spacing"
1581
+ values: marginValues
1548
1582
  },
1549
1583
  margin: {
1550
1584
  className: "m",
1551
1585
  shorthand: "m",
1552
- values: "spacing"
1586
+ values: marginValues
1553
1587
  },
1554
1588
  marginBlock: {
1555
1589
  className: "my",
1556
- values: "spacing",
1590
+ values: marginValues,
1557
1591
  shorthand: ["my", "marginY"]
1558
1592
  },
1559
1593
  marginBlockEnd: {
1560
1594
  className: "mb",
1561
- values: "spacing"
1595
+ values: marginValues
1562
1596
  },
1563
1597
  marginBlockStart: {
1564
1598
  className: "mt",
1565
- values: "spacing"
1599
+ values: marginValues
1566
1600
  },
1567
1601
  marginInline: {
1568
1602
  className: "mx",
1569
- values: "spacing",
1603
+ values: marginValues,
1570
1604
  shorthand: ["mx", "marginX"]
1571
1605
  },
1572
1606
  marginInlineEnd: {
1573
1607
  className: "me",
1574
1608
  shorthand: ["me", "marginEnd"],
1575
- values: "spacing"
1609
+ values: marginValues
1576
1610
  },
1577
1611
  marginInlineStart: {
1578
1612
  className: "ms",
1579
1613
  shorthand: ["ms", "marginStart"],
1580
- values: "spacing"
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
@@ -1891,7 +1978,6 @@ function definePattern(config) {
1891
1978
  return config;
1892
1979
  }
1893
1980
  var box = definePattern({
1894
- properties: {},
1895
1981
  transform(props) {
1896
1982
  return props;
1897
1983
  }
@@ -2089,7 +2175,6 @@ var wrap = definePattern({
2089
2175
  }
2090
2176
  });
2091
2177
  var container = definePattern({
2092
- properties: {},
2093
2178
  transform(props) {
2094
2179
  return {
2095
2180
  position: "relative",
@@ -2119,17 +2204,27 @@ var aspectRatio = definePattern({
2119
2204
  ratio: { type: "number" }
2120
2205
  },
2121
2206
  blocklist: ["aspectRatio"],
2122
- transform(props) {
2123
- const { ratio, ...rest } = props;
2207
+ transform(props, { map }) {
2208
+ const { ratio = 4 / 3, ...rest } = props;
2124
2209
  return {
2125
- aspectRatio: ratio,
2126
- overflow: "hidden",
2127
- display: "flex",
2128
- justifyContent: "center",
2129
- alignItems: "center",
2130
- "&>img, &>video": {
2210
+ position: "relative",
2211
+ _before: {
2212
+ content: `""`,
2213
+ display: "block",
2214
+ height: "0",
2215
+ paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
2216
+ },
2217
+ "&>*": {
2218
+ display: "flex",
2219
+ justifyContent: "center",
2220
+ alignItems: "center",
2221
+ overflow: "hidden",
2222
+ position: "absolute",
2223
+ inset: "0",
2131
2224
  width: "100%",
2132
- height: "100%",
2225
+ height: "100%"
2226
+ },
2227
+ "&>img, &>video": {
2133
2228
  objectFit: "cover"
2134
2229
  },
2135
2230
  ...rest
@@ -2148,7 +2243,7 @@ var divider = definePattern({
2148
2243
  "--thickness": thickness,
2149
2244
  width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
2150
2245
  height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
2151
- borderInlineStartWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
2246
+ borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
2152
2247
  borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
2153
2248
  borderColor: color,
2154
2249
  ...rest
@@ -2156,7 +2251,6 @@ var divider = definePattern({
2156
2251
  }
2157
2252
  });
2158
2253
  var linkBox = definePattern({
2159
- properties: {},
2160
2254
  transform(props) {
2161
2255
  return {
2162
2256
  position: "relative",
@@ -2170,7 +2264,6 @@ var linkBox = definePattern({
2170
2264
  });
2171
2265
  var linkOverlay = definePattern({
2172
2266
  jsxElement: "a",
2173
- properties: {},
2174
2267
  transform(props) {
2175
2268
  return {
2176
2269
  position: "static",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/preset-base",
3
- "version": "0.3.2",
3
+ "version": "0.5.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.3.2"
17
+ "@pandacss/types": "0.5.0"
18
18
  },
19
19
  "scripts": {
20
20
  "build": "tsup src/index.ts --format=esm,cjs --dts",