@pandacss/preset-base 0.36.1 → 0.37.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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +947 -794
- package/dist/index.mjs +947 -794
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -74,8 +74,8 @@ var conditions = {
|
|
|
74
74
|
print: "@media print",
|
|
75
75
|
landscape: "@media (orientation: landscape)",
|
|
76
76
|
portrait: "@media (orientation: portrait)",
|
|
77
|
-
dark: "
|
|
78
|
-
light: "
|
|
77
|
+
dark: ".dark &",
|
|
78
|
+
light: ".light &",
|
|
79
79
|
osDark: "@media (prefers-color-scheme: dark)",
|
|
80
80
|
osLight: "@media (prefers-color-scheme: light)",
|
|
81
81
|
highContrast: "@media (forced-colors: active)",
|
|
@@ -87,171 +87,594 @@ var conditions = {
|
|
|
87
87
|
scrollbarThumb: "&::-webkit-scrollbar-thumb",
|
|
88
88
|
scrollbarTrack: "&::-webkit-scrollbar-track",
|
|
89
89
|
horizontal: "&[data-orientation=horizontal]",
|
|
90
|
-
vertical: "&[data-orientation=vertical]"
|
|
90
|
+
vertical: "&[data-orientation=vertical]",
|
|
91
|
+
starting: "@starting-style"
|
|
91
92
|
};
|
|
92
93
|
|
|
93
|
-
// src/
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
// src/global-css.ts
|
|
95
|
+
var EMPTY = "/*-*/ /*-*/";
|
|
96
|
+
var globalCss = {
|
|
97
|
+
"*, ::before, ::after, ::backdrop": {
|
|
98
|
+
"--blur": EMPTY,
|
|
99
|
+
"--brightness": EMPTY,
|
|
100
|
+
"--contrast": EMPTY,
|
|
101
|
+
"--grayscale": EMPTY,
|
|
102
|
+
"--hue-rotate": EMPTY,
|
|
103
|
+
"--invert": EMPTY,
|
|
104
|
+
"--saturate": EMPTY,
|
|
105
|
+
"--sepia": EMPTY,
|
|
106
|
+
"--drop-shadow": EMPTY,
|
|
107
|
+
"--backdrop-blur": EMPTY,
|
|
108
|
+
"--backdrop-brightness": EMPTY,
|
|
109
|
+
"--backdrop-contrast": EMPTY,
|
|
110
|
+
"--backdrop-grayscale": EMPTY,
|
|
111
|
+
"--backdrop-hue-rotate": EMPTY,
|
|
112
|
+
"--backdrop-invert": EMPTY,
|
|
113
|
+
"--backdrop-opacity": EMPTY,
|
|
114
|
+
"--backdrop-saturate": EMPTY,
|
|
115
|
+
"--backdrop-sepia": EMPTY,
|
|
116
|
+
"--gradient-from-position": EMPTY,
|
|
117
|
+
"--gradient-to-position": EMPTY,
|
|
118
|
+
"--gradient-via-position": EMPTY,
|
|
119
|
+
"--scroll-snap-strictness": "proximity",
|
|
120
|
+
"--border-spacing-x": 0,
|
|
121
|
+
"--border-spacing-y": 0,
|
|
122
|
+
"--translate-x": 0,
|
|
123
|
+
"--translate-y": 0,
|
|
124
|
+
"--rotate": 0,
|
|
125
|
+
"--rotate-x": 0,
|
|
126
|
+
"--rotate-y": 0,
|
|
127
|
+
"--skew-x": 0,
|
|
128
|
+
"--skew-y": 0,
|
|
129
|
+
"--scale-x": 1,
|
|
130
|
+
"--scale-y": 1
|
|
131
|
+
}
|
|
103
132
|
};
|
|
104
133
|
|
|
105
|
-
// src/
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
134
|
+
// src/patterns.ts
|
|
135
|
+
function definePattern(config) {
|
|
136
|
+
return config;
|
|
137
|
+
}
|
|
138
|
+
var box = definePattern({
|
|
139
|
+
transform(props) {
|
|
140
|
+
return props;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
var flex = definePattern({
|
|
144
|
+
properties: {
|
|
145
|
+
align: { type: "property", value: "alignItems" },
|
|
146
|
+
justify: { type: "property", value: "justifyContent" },
|
|
147
|
+
direction: { type: "property", value: "flexDirection" },
|
|
148
|
+
wrap: { type: "property", value: "flexWrap" },
|
|
149
|
+
basis: { type: "property", value: "flexBasis" },
|
|
150
|
+
grow: { type: "property", value: "flexGrow" },
|
|
151
|
+
shrink: { type: "property", value: "flexShrink" }
|
|
111
152
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
153
|
+
transform(props) {
|
|
154
|
+
const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
|
|
155
|
+
return {
|
|
156
|
+
display: "flex",
|
|
157
|
+
flexDirection: direction,
|
|
158
|
+
alignItems: align,
|
|
159
|
+
justifyContent: justify,
|
|
160
|
+
flexWrap: wrap2,
|
|
161
|
+
flexBasis: basis,
|
|
162
|
+
flexGrow: grow,
|
|
163
|
+
flexShrink: shrink,
|
|
164
|
+
...rest
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
var stack = definePattern({
|
|
169
|
+
properties: {
|
|
170
|
+
align: { type: "property", value: "alignItems" },
|
|
171
|
+
justify: { type: "property", value: "justifyContent" },
|
|
172
|
+
direction: { type: "property", value: "flexDirection" },
|
|
173
|
+
gap: { type: "property", value: "gap" }
|
|
116
174
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
group: "Background"
|
|
175
|
+
defaultValues: {
|
|
176
|
+
direction: "column",
|
|
177
|
+
gap: "10px"
|
|
121
178
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
179
|
+
transform(props) {
|
|
180
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
181
|
+
return {
|
|
182
|
+
display: "flex",
|
|
183
|
+
flexDirection: direction,
|
|
184
|
+
alignItems: align,
|
|
185
|
+
justifyContent: justify,
|
|
186
|
+
gap,
|
|
187
|
+
...rest
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
var vstack = definePattern({
|
|
192
|
+
jsxName: "VStack",
|
|
193
|
+
properties: {
|
|
194
|
+
justify: { type: "property", value: "justifyContent" },
|
|
195
|
+
gap: { type: "property", value: "gap" }
|
|
126
196
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
className: "bg-clip",
|
|
130
|
-
group: "Background",
|
|
131
|
-
transform(value) {
|
|
132
|
-
return {
|
|
133
|
-
backgroundClip: value,
|
|
134
|
-
WebkitBackgroundClip: value
|
|
135
|
-
};
|
|
136
|
-
}
|
|
197
|
+
defaultValues: {
|
|
198
|
+
gap: "10px"
|
|
137
199
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
200
|
+
transform(props) {
|
|
201
|
+
const { justify, gap, ...rest } = props;
|
|
202
|
+
return {
|
|
203
|
+
display: "flex",
|
|
204
|
+
alignItems: "center",
|
|
205
|
+
justifyContent: justify,
|
|
206
|
+
gap,
|
|
207
|
+
flexDirection: "column",
|
|
208
|
+
...rest
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
var hstack = definePattern({
|
|
213
|
+
jsxName: "HStack",
|
|
214
|
+
properties: {
|
|
215
|
+
justify: { type: "property", value: "justifyContent" },
|
|
216
|
+
gap: { type: "property", value: "gap" }
|
|
144
217
|
},
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
className: "bg",
|
|
148
|
-
values: "colors",
|
|
149
|
-
group: "Background",
|
|
150
|
-
transform: createColorMixTransform("backgroundColor")
|
|
218
|
+
defaultValues: {
|
|
219
|
+
gap: "10px"
|
|
151
220
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
221
|
+
transform(props) {
|
|
222
|
+
const { justify, gap, ...rest } = props;
|
|
223
|
+
return {
|
|
224
|
+
display: "flex",
|
|
225
|
+
alignItems: "center",
|
|
226
|
+
justifyContent: justify,
|
|
227
|
+
gap,
|
|
228
|
+
flexDirection: "row",
|
|
229
|
+
...rest
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
var spacer = definePattern({
|
|
234
|
+
properties: {
|
|
235
|
+
size: { type: "token", value: "spacing" }
|
|
156
236
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
237
|
+
transform(props, { map }) {
|
|
238
|
+
const { size, ...rest } = props;
|
|
239
|
+
return {
|
|
240
|
+
alignSelf: "stretch",
|
|
241
|
+
justifySelf: "stretch",
|
|
242
|
+
flex: map(size, (v) => v == null ? "1" : `0 0 ${v}`),
|
|
243
|
+
...rest
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
var circle = definePattern({
|
|
248
|
+
properties: {
|
|
249
|
+
size: { type: "property", value: "width" }
|
|
162
250
|
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
251
|
+
transform(props) {
|
|
252
|
+
const { size, ...rest } = props;
|
|
253
|
+
return {
|
|
254
|
+
display: "flex",
|
|
255
|
+
alignItems: "center",
|
|
256
|
+
justifyContent: "center",
|
|
257
|
+
flex: "0 0 auto",
|
|
258
|
+
width: size,
|
|
259
|
+
height: size,
|
|
260
|
+
borderRadius: "9999px",
|
|
261
|
+
...rest
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
var square = definePattern({
|
|
266
|
+
properties: {
|
|
267
|
+
size: { type: "property", value: "width" }
|
|
167
268
|
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
269
|
+
transform(props) {
|
|
270
|
+
const { size, ...rest } = props;
|
|
271
|
+
return {
|
|
272
|
+
display: "flex",
|
|
273
|
+
alignItems: "center",
|
|
274
|
+
justifyContent: "center",
|
|
275
|
+
flex: "0 0 auto",
|
|
276
|
+
width: size,
|
|
277
|
+
height: size,
|
|
278
|
+
...rest
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
var grid = definePattern({
|
|
283
|
+
properties: {
|
|
284
|
+
gap: { type: "property", value: "gap" },
|
|
285
|
+
columnGap: { type: "property", value: "gap" },
|
|
286
|
+
rowGap: { type: "property", value: "gap" },
|
|
287
|
+
columns: { type: "number" },
|
|
288
|
+
minChildWidth: { type: "token", value: "sizes", property: "width" }
|
|
172
289
|
},
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
className: "bg",
|
|
176
|
-
group: "Background"
|
|
290
|
+
defaultValues(props) {
|
|
291
|
+
return { gap: props.columnGap || props.rowGap ? void 0 : "10px" };
|
|
177
292
|
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
backgroundImage: value
|
|
200
|
-
};
|
|
201
|
-
}
|
|
293
|
+
transform(props, { map, isCssUnit }) {
|
|
294
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
|
|
295
|
+
const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
296
|
+
return {
|
|
297
|
+
display: "grid",
|
|
298
|
+
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,
|
|
299
|
+
gap,
|
|
300
|
+
columnGap,
|
|
301
|
+
rowGap,
|
|
302
|
+
...rest
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
var gridItem = definePattern({
|
|
307
|
+
properties: {
|
|
308
|
+
colSpan: { type: "number" },
|
|
309
|
+
rowSpan: { type: "number" },
|
|
310
|
+
colStart: { type: "number" },
|
|
311
|
+
rowStart: { type: "number" },
|
|
312
|
+
colEnd: { type: "number" },
|
|
313
|
+
rowEnd: { type: "number" }
|
|
202
314
|
},
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
315
|
+
transform(props, { map }) {
|
|
316
|
+
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
|
|
317
|
+
const spanFn = (v) => v === "auto" ? v : `span ${v}`;
|
|
318
|
+
return {
|
|
319
|
+
gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
|
|
320
|
+
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
321
|
+
gridColumnStart: colStart,
|
|
322
|
+
gridColumnEnd: colEnd,
|
|
323
|
+
gridRowStart: rowStart,
|
|
324
|
+
gridRowEnd: rowEnd,
|
|
325
|
+
...rest
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
var wrap = definePattern({
|
|
330
|
+
properties: {
|
|
331
|
+
gap: { type: "property", value: "gap" },
|
|
332
|
+
rowGap: { type: "property", value: "gap" },
|
|
333
|
+
columnGap: { type: "property", value: "gap" },
|
|
334
|
+
align: { type: "property", value: "alignItems" },
|
|
335
|
+
justify: { type: "property", value: "justifyContent" }
|
|
336
|
+
},
|
|
337
|
+
transform(props) {
|
|
338
|
+
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "10px", align, justify, ...rest } = props;
|
|
339
|
+
return {
|
|
340
|
+
display: "flex",
|
|
341
|
+
flexWrap: "wrap",
|
|
342
|
+
alignItems: align,
|
|
343
|
+
justifyContent: justify,
|
|
344
|
+
gap,
|
|
345
|
+
columnGap,
|
|
346
|
+
rowGap,
|
|
347
|
+
...rest
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
var container = definePattern({
|
|
352
|
+
transform(props) {
|
|
353
|
+
return {
|
|
354
|
+
position: "relative",
|
|
355
|
+
maxWidth: "8xl",
|
|
356
|
+
mx: "auto",
|
|
357
|
+
px: { base: "4", md: "6", lg: "8" },
|
|
358
|
+
...props
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
var center = definePattern({
|
|
363
|
+
properties: {
|
|
364
|
+
inline: { type: "boolean" }
|
|
365
|
+
},
|
|
366
|
+
transform(props) {
|
|
367
|
+
const { inline, ...rest } = props;
|
|
368
|
+
return {
|
|
369
|
+
display: inline ? "inline-flex" : "flex",
|
|
370
|
+
alignItems: "center",
|
|
371
|
+
justifyContent: "center",
|
|
372
|
+
...rest
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
var aspectRatio = definePattern({
|
|
377
|
+
properties: {
|
|
378
|
+
ratio: { type: "number" }
|
|
379
|
+
},
|
|
380
|
+
blocklist: ["aspectRatio"],
|
|
381
|
+
transform(props, { map }) {
|
|
382
|
+
const { ratio = 4 / 3, ...rest } = props;
|
|
383
|
+
return {
|
|
384
|
+
position: "relative",
|
|
385
|
+
_before: {
|
|
386
|
+
content: `""`,
|
|
387
|
+
display: "block",
|
|
388
|
+
height: "0",
|
|
389
|
+
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
390
|
+
},
|
|
391
|
+
"&>*": {
|
|
392
|
+
display: "flex",
|
|
393
|
+
justifyContent: "center",
|
|
394
|
+
alignItems: "center",
|
|
395
|
+
overflow: "hidden",
|
|
396
|
+
position: "absolute",
|
|
397
|
+
inset: "0",
|
|
398
|
+
width: "100%",
|
|
399
|
+
height: "100%"
|
|
400
|
+
},
|
|
401
|
+
"&>img, &>video": {
|
|
402
|
+
objectFit: "cover"
|
|
403
|
+
},
|
|
404
|
+
...rest
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
var divider = definePattern({
|
|
409
|
+
properties: {
|
|
410
|
+
orientation: { type: "enum", value: ["horizontal", "vertical"] },
|
|
411
|
+
thickness: { type: "token", value: "sizes", property: "borderWidth" },
|
|
412
|
+
color: { type: "token", value: "colors", property: "borderColor" }
|
|
413
|
+
},
|
|
414
|
+
defaultValues: {
|
|
415
|
+
orientation: "horizontal",
|
|
416
|
+
thickness: "1px"
|
|
417
|
+
},
|
|
418
|
+
transform(props, { map }) {
|
|
419
|
+
const { orientation, thickness, color, ...rest } = props;
|
|
420
|
+
return {
|
|
421
|
+
"--thickness": thickness,
|
|
422
|
+
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
423
|
+
height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
|
|
424
|
+
borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
|
|
425
|
+
borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
|
|
426
|
+
borderColor: color,
|
|
427
|
+
...rest
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
var linkBox = definePattern({
|
|
432
|
+
transform(props) {
|
|
433
|
+
return {
|
|
434
|
+
position: "relative",
|
|
435
|
+
"& :where(a, abbr)": {
|
|
436
|
+
position: "relative",
|
|
437
|
+
zIndex: "1"
|
|
438
|
+
},
|
|
439
|
+
...props
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
var linkOverlay = definePattern({
|
|
444
|
+
jsxElement: "a",
|
|
445
|
+
transform(props) {
|
|
446
|
+
return {
|
|
447
|
+
position: "static",
|
|
448
|
+
_before: {
|
|
449
|
+
content: '""',
|
|
450
|
+
display: "block",
|
|
451
|
+
position: "absolute",
|
|
452
|
+
cursor: "inherit",
|
|
453
|
+
inset: "0",
|
|
454
|
+
zIndex: "0",
|
|
455
|
+
...props["_before"]
|
|
456
|
+
},
|
|
457
|
+
...props
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
var float = definePattern({
|
|
462
|
+
properties: {
|
|
463
|
+
offsetX: { type: "token", value: "spacing", property: "left" },
|
|
464
|
+
offsetY: { type: "token", value: "spacing", property: "top" },
|
|
465
|
+
offset: { type: "token", value: "spacing", property: "top" },
|
|
466
|
+
placement: {
|
|
467
|
+
type: "enum",
|
|
468
|
+
value: [
|
|
469
|
+
"bottom-end",
|
|
470
|
+
"bottom-start",
|
|
471
|
+
"top-end",
|
|
472
|
+
"top-start",
|
|
473
|
+
"bottom-center",
|
|
474
|
+
"top-center",
|
|
475
|
+
"middle-center",
|
|
476
|
+
"middle-end",
|
|
477
|
+
"middle-start"
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
defaultValues(props) {
|
|
482
|
+
const offset = props.offset || "0";
|
|
483
|
+
return { offset, offsetX: offset, offsetY: offset, placement: "top-end" };
|
|
484
|
+
},
|
|
485
|
+
transform(props, { map }) {
|
|
486
|
+
const { offset, offsetX, offsetY, placement, ...rest } = props;
|
|
487
|
+
return {
|
|
488
|
+
display: "inline-flex",
|
|
489
|
+
justifyContent: "center",
|
|
490
|
+
alignItems: "center",
|
|
491
|
+
position: "absolute",
|
|
492
|
+
insetBlockStart: map(placement, (v) => {
|
|
493
|
+
const [side] = v.split("-");
|
|
494
|
+
const map2 = { top: offsetY, middle: "50%", bottom: "auto" };
|
|
495
|
+
return map2[side];
|
|
496
|
+
}),
|
|
497
|
+
insetBlockEnd: map(placement, (v) => {
|
|
498
|
+
const [side] = v.split("-");
|
|
499
|
+
const map2 = { top: "auto", middle: "50%", bottom: offsetY };
|
|
500
|
+
return map2[side];
|
|
501
|
+
}),
|
|
502
|
+
insetInlineStart: map(placement, (v) => {
|
|
503
|
+
const [, align] = v.split("-");
|
|
504
|
+
const map2 = { start: offsetX, center: "50%", end: "auto" };
|
|
505
|
+
return map2[align];
|
|
506
|
+
}),
|
|
507
|
+
insetInlineEnd: map(placement, (v) => {
|
|
508
|
+
const [, align] = v.split("-");
|
|
509
|
+
const map2 = { start: "auto", center: "50%", end: offsetX };
|
|
510
|
+
return map2[align];
|
|
511
|
+
}),
|
|
512
|
+
translate: map(placement, (v) => {
|
|
513
|
+
const [side, align] = v.split("-");
|
|
514
|
+
const mapX = { start: "-50%", center: "-50%", end: "50%" };
|
|
515
|
+
const mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
|
|
516
|
+
return `${mapX[align]} ${mapY[side]}`;
|
|
517
|
+
}),
|
|
518
|
+
...rest
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
var bleed = definePattern({
|
|
523
|
+
properties: {
|
|
524
|
+
inline: { type: "property", value: "marginInline" },
|
|
525
|
+
block: { type: "property", value: "marginBlock" }
|
|
526
|
+
},
|
|
527
|
+
defaultValues: {
|
|
528
|
+
inline: "0",
|
|
529
|
+
block: "0"
|
|
530
|
+
},
|
|
531
|
+
transform(props, { map, isCssUnit, isCssVar }) {
|
|
532
|
+
const { inline, block, ...rest } = props;
|
|
533
|
+
const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
534
|
+
return {
|
|
535
|
+
"--bleed-x": map(inline, valueFn),
|
|
536
|
+
"--bleed-y": map(block, valueFn),
|
|
537
|
+
marginInline: "calc(var(--bleed-x, 0) * -1)",
|
|
538
|
+
marginBlock: "calc(var(--bleed-y, 0) * -1)",
|
|
539
|
+
...rest
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
var visuallyHidden = definePattern({
|
|
544
|
+
transform(props) {
|
|
545
|
+
return {
|
|
546
|
+
srOnly: true,
|
|
547
|
+
...props
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
var cq = definePattern({
|
|
552
|
+
properties: {
|
|
553
|
+
name: { type: "token", value: "containerNames", property: "containerName" },
|
|
554
|
+
type: { type: "property", value: "containerType" }
|
|
555
|
+
},
|
|
556
|
+
defaultValues: {
|
|
557
|
+
type: "inline-size"
|
|
558
|
+
},
|
|
559
|
+
transform(props) {
|
|
560
|
+
const { name, type, ...rest } = props;
|
|
561
|
+
return {
|
|
562
|
+
containerType: type,
|
|
563
|
+
containerName: name,
|
|
564
|
+
...rest
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
var patterns = {
|
|
569
|
+
box,
|
|
570
|
+
flex,
|
|
571
|
+
stack,
|
|
572
|
+
vstack,
|
|
573
|
+
hstack,
|
|
574
|
+
spacer,
|
|
575
|
+
square,
|
|
576
|
+
circle,
|
|
577
|
+
center,
|
|
578
|
+
linkBox,
|
|
579
|
+
linkOverlay,
|
|
580
|
+
aspectRatio,
|
|
581
|
+
grid,
|
|
582
|
+
gridItem,
|
|
583
|
+
wrap,
|
|
584
|
+
container,
|
|
585
|
+
divider,
|
|
586
|
+
float,
|
|
587
|
+
bleed,
|
|
588
|
+
visuallyHidden,
|
|
589
|
+
cq
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
// src/color-mix-transform.ts
|
|
593
|
+
var createColorMixTransform = (prop) => (value, args) => {
|
|
594
|
+
const mix = args.utils.colorMix(value);
|
|
595
|
+
if (mix.invalid)
|
|
596
|
+
return { [prop]: value };
|
|
597
|
+
const cssVar = "--mix-" + prop;
|
|
598
|
+
return {
|
|
599
|
+
[cssVar]: mix.value,
|
|
600
|
+
[prop]: `var(${cssVar}, ${mix.color})`
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
// src/utilities/background.ts
|
|
605
|
+
var background = {
|
|
606
|
+
backgroundPosition: {
|
|
607
|
+
shorthand: "bgPosition",
|
|
608
|
+
className: "bg-pos",
|
|
609
|
+
group: "Background"
|
|
610
|
+
},
|
|
611
|
+
backgroundPositionX: {
|
|
612
|
+
shorthand: "bgPositionX",
|
|
613
|
+
className: "bg-pos-x",
|
|
614
|
+
group: "Background"
|
|
615
|
+
},
|
|
616
|
+
backgroundPositionY: {
|
|
617
|
+
shorthand: "bgPositionY",
|
|
618
|
+
className: "bg-pos-y",
|
|
619
|
+
group: "Background"
|
|
620
|
+
},
|
|
621
|
+
backgroundAttachment: {
|
|
622
|
+
shorthand: "bgAttachment",
|
|
623
|
+
className: "bg-attach",
|
|
624
|
+
group: "Background"
|
|
625
|
+
},
|
|
626
|
+
backgroundClip: {
|
|
627
|
+
shorthand: "bgClip",
|
|
628
|
+
className: "bg-clip",
|
|
629
|
+
group: "Background",
|
|
219
630
|
transform(value) {
|
|
220
631
|
return {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
backgroundImage: value,
|
|
224
|
-
WebkitBackgroundClip: "text",
|
|
225
|
-
color: "transparent"
|
|
632
|
+
backgroundClip: value,
|
|
633
|
+
WebkitBackgroundClip: value
|
|
226
634
|
};
|
|
227
635
|
}
|
|
228
636
|
},
|
|
229
|
-
|
|
230
|
-
|
|
637
|
+
background: {
|
|
638
|
+
shorthand: "bg",
|
|
639
|
+
className: "bg",
|
|
231
640
|
values: "colors",
|
|
232
641
|
group: "Background",
|
|
233
|
-
transform: createColorMixTransform("
|
|
642
|
+
transform: createColorMixTransform("background")
|
|
234
643
|
},
|
|
235
|
-
|
|
236
|
-
|
|
644
|
+
backgroundColor: {
|
|
645
|
+
shorthand: "bgColor",
|
|
646
|
+
className: "bg",
|
|
237
647
|
values: "colors",
|
|
238
648
|
group: "Background",
|
|
239
|
-
transform: createColorMixTransform("
|
|
649
|
+
transform: createColorMixTransform("backgroundColor")
|
|
240
650
|
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
group: "Background"
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
651
|
+
backgroundOrigin: {
|
|
652
|
+
shorthand: "bgOrigin",
|
|
653
|
+
className: "bg-origin",
|
|
654
|
+
group: "Background"
|
|
655
|
+
},
|
|
656
|
+
backgroundImage: {
|
|
657
|
+
shorthand: "bgImage",
|
|
658
|
+
className: "bg-img",
|
|
659
|
+
values: "assets",
|
|
660
|
+
group: "Background"
|
|
661
|
+
},
|
|
662
|
+
backgroundRepeat: {
|
|
663
|
+
shorthand: "bgRepeat",
|
|
664
|
+
className: "bg-repeat",
|
|
665
|
+
group: "Background"
|
|
666
|
+
},
|
|
667
|
+
backgroundBlendMode: {
|
|
668
|
+
shorthand: "bgBlendMode",
|
|
669
|
+
className: "bg-blend",
|
|
670
|
+
group: "Background"
|
|
671
|
+
},
|
|
672
|
+
backgroundSize: {
|
|
673
|
+
shorthand: "bgSize",
|
|
674
|
+
className: "bg-size",
|
|
675
|
+
group: "Background"
|
|
252
676
|
}
|
|
253
677
|
};
|
|
254
|
-
var gradientVia = createColorMixTransform("--gradient-via");
|
|
255
678
|
|
|
256
679
|
// src/utilities/border.ts
|
|
257
680
|
var border = {
|
|
@@ -568,7 +991,7 @@ var border = {
|
|
|
568
991
|
};
|
|
569
992
|
|
|
570
993
|
// src/utilities/container.ts
|
|
571
|
-
var
|
|
994
|
+
var container2 = {
|
|
572
995
|
container: {
|
|
573
996
|
className: "cq",
|
|
574
997
|
group: "Container"
|
|
@@ -622,10 +1045,11 @@ var display = {
|
|
|
622
1045
|
};
|
|
623
1046
|
|
|
624
1047
|
// src/utilities/divide.ts
|
|
1048
|
+
var divideColor = createColorMixTransform("borderColor");
|
|
625
1049
|
var divide = {
|
|
626
1050
|
divideX: {
|
|
627
1051
|
className: "divide-x",
|
|
628
|
-
values:
|
|
1052
|
+
values: "borderWidths",
|
|
629
1053
|
group: "Border",
|
|
630
1054
|
transform(value) {
|
|
631
1055
|
return {
|
|
@@ -638,7 +1062,7 @@ var divide = {
|
|
|
638
1062
|
},
|
|
639
1063
|
divideY: {
|
|
640
1064
|
className: "divide-y",
|
|
641
|
-
values:
|
|
1065
|
+
values: "borderWidths",
|
|
642
1066
|
group: "Border",
|
|
643
1067
|
transform(value) {
|
|
644
1068
|
return {
|
|
@@ -650,7 +1074,7 @@ var divide = {
|
|
|
650
1074
|
}
|
|
651
1075
|
},
|
|
652
1076
|
divideColor: {
|
|
653
|
-
className: "divide",
|
|
1077
|
+
className: "divide-color",
|
|
654
1078
|
values: "colors",
|
|
655
1079
|
group: "Border",
|
|
656
1080
|
transform(value, args) {
|
|
@@ -660,7 +1084,7 @@ var divide = {
|
|
|
660
1084
|
}
|
|
661
1085
|
},
|
|
662
1086
|
divideStyle: {
|
|
663
|
-
className: "divide",
|
|
1087
|
+
className: "divide-style",
|
|
664
1088
|
property: "borderStyle",
|
|
665
1089
|
group: "Border",
|
|
666
1090
|
transform(value) {
|
|
@@ -672,7 +1096,6 @@ var divide = {
|
|
|
672
1096
|
}
|
|
673
1097
|
}
|
|
674
1098
|
};
|
|
675
|
-
var divideColor = createColorMixTransform("borderColor");
|
|
676
1099
|
|
|
677
1100
|
// src/utilities/effects.ts
|
|
678
1101
|
var effects = {
|
|
@@ -688,7 +1111,7 @@ var effects = {
|
|
|
688
1111
|
},
|
|
689
1112
|
boxShadowColor: {
|
|
690
1113
|
shorthand: "shadowColor",
|
|
691
|
-
className: "shadow",
|
|
1114
|
+
className: "shadow-color",
|
|
692
1115
|
values: "colors",
|
|
693
1116
|
transform: createColorMixTransform("--shadow-color"),
|
|
694
1117
|
group: "Color"
|
|
@@ -701,17 +1124,7 @@ var effects = {
|
|
|
701
1124
|
className: "filter",
|
|
702
1125
|
group: "Effect",
|
|
703
1126
|
values: {
|
|
704
|
-
auto:
|
|
705
|
-
"var(--blur)",
|
|
706
|
-
"var(--brightness)",
|
|
707
|
-
"var(--contrast)",
|
|
708
|
-
"var(--grayscale)",
|
|
709
|
-
"var(--hue-rotate)",
|
|
710
|
-
"var(--invert)",
|
|
711
|
-
"var(--saturate)",
|
|
712
|
-
"var(--sepia)",
|
|
713
|
-
"var(--drop-shadow)"
|
|
714
|
-
].join(" ")
|
|
1127
|
+
auto: "var(--blur, ) var(--brightness, ) var(--contrast, ) var(--grayscale, ) var(--hue-rotate, ) var(--invert, ) var(--saturate, ) var(--sepia, ) var(--drop-shadow, )"
|
|
715
1128
|
}
|
|
716
1129
|
},
|
|
717
1130
|
brightness: {
|
|
@@ -801,16 +1214,7 @@ var effects = {
|
|
|
801
1214
|
className: "backdrop",
|
|
802
1215
|
group: "Effect",
|
|
803
1216
|
values: {
|
|
804
|
-
auto:
|
|
805
|
-
"var(--backdrop-blur)",
|
|
806
|
-
"var(--backdrop-brightness)",
|
|
807
|
-
"var(--backdrop-contrast)",
|
|
808
|
-
"var(--backdrop-grayscale)",
|
|
809
|
-
"var(--backdrop-hue-rotate)",
|
|
810
|
-
"var(--backdrop-invert)",
|
|
811
|
-
"var(--backdrop-saturate)",
|
|
812
|
-
"var(--backdrop-sepia)"
|
|
813
|
-
].join(" ")
|
|
1217
|
+
auto: "var(--backdrop-blur, ) var(--backdrop-brightness, ) var(--backdrop-contrast, ) var(--backdrop-grayscale, ) var(--backdrop-hue-rotate, ) var(--backdrop-invert, ) var(--backdrop-opacity, ) var(--backdrop-saturate, ) var(--backdrop-sepia, )"
|
|
814
1218
|
},
|
|
815
1219
|
transform(value) {
|
|
816
1220
|
return {
|
|
@@ -1116,6 +1520,111 @@ var flexGrid = {
|
|
|
1116
1520
|
}
|
|
1117
1521
|
};
|
|
1118
1522
|
|
|
1523
|
+
// src/utilities/gradient.ts
|
|
1524
|
+
var gradientVia = createColorMixTransform("--gradient-via");
|
|
1525
|
+
var gradientTemplate = {
|
|
1526
|
+
"to-t": "linear-gradient(to top, var(--gradient))",
|
|
1527
|
+
"to-tr": "linear-gradient(to top right, var(--gradient))",
|
|
1528
|
+
"to-r": "linear-gradient(to right, var(--gradient))",
|
|
1529
|
+
"to-br": "linear-gradient(to bottom right, var(--gradient))",
|
|
1530
|
+
"to-b": "linear-gradient(to bottom, var(--gradient))",
|
|
1531
|
+
"to-bl": "linear-gradient(to bottom left, var(--gradient))",
|
|
1532
|
+
"to-l": "linear-gradient(to left, var(--gradient))",
|
|
1533
|
+
"to-tl": "linear-gradient(to top left, var(--gradient))"
|
|
1534
|
+
};
|
|
1535
|
+
var gradientVars = {
|
|
1536
|
+
"--gradient-stops": "var(--gradient-via-stops, var(--gradient-from) var(--gradient-from-position), var(--gradient-to) var(--gradient-to-position))",
|
|
1537
|
+
"--gradient": "var(--gradient-via-stops, var(--gradient-stops))"
|
|
1538
|
+
};
|
|
1539
|
+
var backgroundGradients = {
|
|
1540
|
+
backgroundGradient: {
|
|
1541
|
+
shorthand: "bgGradient",
|
|
1542
|
+
className: "bg-gradient",
|
|
1543
|
+
group: "Background Gradient",
|
|
1544
|
+
values(theme) {
|
|
1545
|
+
return {
|
|
1546
|
+
...theme("gradients"),
|
|
1547
|
+
...gradientTemplate
|
|
1548
|
+
};
|
|
1549
|
+
},
|
|
1550
|
+
transform(value) {
|
|
1551
|
+
return {
|
|
1552
|
+
...gradientVars,
|
|
1553
|
+
backgroundImage: value
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
textGradient: {
|
|
1558
|
+
className: "text-gradient",
|
|
1559
|
+
group: "Background Gradient",
|
|
1560
|
+
values(theme) {
|
|
1561
|
+
return {
|
|
1562
|
+
...theme("gradients"),
|
|
1563
|
+
...gradientTemplate
|
|
1564
|
+
};
|
|
1565
|
+
},
|
|
1566
|
+
transform(value) {
|
|
1567
|
+
return {
|
|
1568
|
+
...gradientVars,
|
|
1569
|
+
backgroundImage: value,
|
|
1570
|
+
WebkitBackgroundClip: "text",
|
|
1571
|
+
color: "transparent"
|
|
1572
|
+
};
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
gradientFromPosition: {
|
|
1576
|
+
className: "gradient-from-pos",
|
|
1577
|
+
group: "Background Gradient",
|
|
1578
|
+
transform(value) {
|
|
1579
|
+
return {
|
|
1580
|
+
"--gradient-from-position": value
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
},
|
|
1584
|
+
gradientToPosition: {
|
|
1585
|
+
className: "gradient-to-pos",
|
|
1586
|
+
group: "Background Gradient",
|
|
1587
|
+
transform(value) {
|
|
1588
|
+
return {
|
|
1589
|
+
"--gradient-to-position": value
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
gradientFrom: {
|
|
1594
|
+
className: "gradient-from",
|
|
1595
|
+
values: "colors",
|
|
1596
|
+
group: "Background Gradient",
|
|
1597
|
+
transform: createColorMixTransform("--gradient-from")
|
|
1598
|
+
},
|
|
1599
|
+
gradientTo: {
|
|
1600
|
+
className: "gradient-to",
|
|
1601
|
+
values: "colors",
|
|
1602
|
+
group: "Background Gradient",
|
|
1603
|
+
transform: createColorMixTransform("--gradient-to")
|
|
1604
|
+
},
|
|
1605
|
+
gradientVia: {
|
|
1606
|
+
className: "gradient-via",
|
|
1607
|
+
values: "colors",
|
|
1608
|
+
group: "Background Gradient",
|
|
1609
|
+
transform(value, args) {
|
|
1610
|
+
const transformed = gradientVia(value, args);
|
|
1611
|
+
return {
|
|
1612
|
+
...transformed,
|
|
1613
|
+
"--gradient-stops": "var(--gradient-from) var(--gradient-from-position), var(--gradient-via) var(--gradient-via-position), var(--gradient-to) var(--gradient-to-position)"
|
|
1614
|
+
};
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
gradientViaPosition: {
|
|
1618
|
+
className: "gradient-via-pos",
|
|
1619
|
+
group: "Background Gradient",
|
|
1620
|
+
transform(value) {
|
|
1621
|
+
return {
|
|
1622
|
+
"--gradient-via-position": value
|
|
1623
|
+
};
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
};
|
|
1627
|
+
|
|
1119
1628
|
// src/utilities/helpers.ts
|
|
1120
1629
|
var srMapping = {
|
|
1121
1630
|
true: {
|
|
@@ -1324,15 +1833,15 @@ var interactivity = {
|
|
|
1324
1833
|
group: "Scroll"
|
|
1325
1834
|
},
|
|
1326
1835
|
scrollSnapAlign: {
|
|
1327
|
-
className: "snap",
|
|
1836
|
+
className: "snap-align",
|
|
1328
1837
|
group: "Scroll"
|
|
1329
1838
|
},
|
|
1330
1839
|
scrollSnapStop: {
|
|
1331
|
-
className: "snap",
|
|
1840
|
+
className: "snap-stop",
|
|
1332
1841
|
group: "Scroll"
|
|
1333
1842
|
},
|
|
1334
1843
|
scrollSnapType: {
|
|
1335
|
-
className: "snap",
|
|
1844
|
+
className: "snap-type",
|
|
1336
1845
|
group: "Scroll",
|
|
1337
1846
|
values: {
|
|
1338
1847
|
none: "none",
|
|
@@ -1342,7 +1851,7 @@ var interactivity = {
|
|
|
1342
1851
|
}
|
|
1343
1852
|
},
|
|
1344
1853
|
scrollSnapStrictness: {
|
|
1345
|
-
className: "strictness",
|
|
1854
|
+
className: "snap-strictness",
|
|
1346
1855
|
values: ["mandatory", "proximity"],
|
|
1347
1856
|
group: "Scroll",
|
|
1348
1857
|
transform(value) {
|
|
@@ -1419,11 +1928,11 @@ var layout = {
|
|
|
1419
1928
|
group: "System"
|
|
1420
1929
|
},
|
|
1421
1930
|
objectPosition: {
|
|
1422
|
-
className: "
|
|
1931
|
+
className: "obj-pos",
|
|
1423
1932
|
group: "Layout"
|
|
1424
1933
|
},
|
|
1425
1934
|
objectFit: {
|
|
1426
|
-
className: "
|
|
1935
|
+
className: "obj-fit",
|
|
1427
1936
|
group: "Layout"
|
|
1428
1937
|
},
|
|
1429
1938
|
overscrollBehavior: {
|
|
@@ -1540,11 +2049,11 @@ var layout = {
|
|
|
1540
2049
|
// src/utilities/list.ts
|
|
1541
2050
|
var list = {
|
|
1542
2051
|
listStyleType: {
|
|
1543
|
-
className: "list",
|
|
2052
|
+
className: "list-type",
|
|
1544
2053
|
group: "List"
|
|
1545
2054
|
},
|
|
1546
2055
|
listStylePosition: {
|
|
1547
|
-
className: "list",
|
|
2056
|
+
className: "list-pos",
|
|
1548
2057
|
group: "List"
|
|
1549
2058
|
},
|
|
1550
2059
|
listStyleImage: {
|
|
@@ -1557,13 +2066,13 @@ var list = {
|
|
|
1557
2066
|
// src/utilities/outline.ts
|
|
1558
2067
|
var outline = {
|
|
1559
2068
|
outlineWidth: {
|
|
1560
|
-
className: "ring",
|
|
2069
|
+
className: "ring-width",
|
|
1561
2070
|
shorthand: "ringWidth",
|
|
1562
2071
|
values: "borderWidths",
|
|
1563
2072
|
group: "Border"
|
|
1564
2073
|
},
|
|
1565
2074
|
outlineColor: {
|
|
1566
|
-
className: "ring",
|
|
2075
|
+
className: "ring-color",
|
|
1567
2076
|
values: "colors",
|
|
1568
2077
|
group: "Color",
|
|
1569
2078
|
shorthand: "ringColor",
|
|
@@ -1582,7 +2091,7 @@ var outline = {
|
|
|
1582
2091
|
}
|
|
1583
2092
|
},
|
|
1584
2093
|
outlineOffset: {
|
|
1585
|
-
className: "ring",
|
|
2094
|
+
className: "ring-offset",
|
|
1586
2095
|
shorthand: "ringOffset",
|
|
1587
2096
|
values: "spacing",
|
|
1588
2097
|
group: "Border"
|
|
@@ -1641,7 +2150,7 @@ var polyfill = {
|
|
|
1641
2150
|
}
|
|
1642
2151
|
},
|
|
1643
2152
|
textSizeAdjust: {
|
|
1644
|
-
className: "text-
|
|
2153
|
+
className: "text-adjust",
|
|
1645
2154
|
group: "Typography",
|
|
1646
2155
|
transform(value) {
|
|
1647
2156
|
return { textSizeAdjust: value, WebkitTextSizeAdjust: value };
|
|
@@ -1906,6 +2415,34 @@ var spacing = {
|
|
|
1906
2415
|
shorthand: ["ms", "marginStart"],
|
|
1907
2416
|
values: marginValues,
|
|
1908
2417
|
group: "Margin"
|
|
2418
|
+
},
|
|
2419
|
+
spaceX: {
|
|
2420
|
+
className: "space-x",
|
|
2421
|
+
values: marginValues,
|
|
2422
|
+
property: "marginInlineStart",
|
|
2423
|
+
group: "Margin",
|
|
2424
|
+
transform(value) {
|
|
2425
|
+
return {
|
|
2426
|
+
"& > :not([hidden]) ~ :not([hidden])": {
|
|
2427
|
+
marginInlineStart: value,
|
|
2428
|
+
marginInlineEnd: "0px"
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2431
|
+
}
|
|
2432
|
+
},
|
|
2433
|
+
spaceY: {
|
|
2434
|
+
className: "space-y",
|
|
2435
|
+
values: marginValues,
|
|
2436
|
+
property: "marginBlockStart",
|
|
2437
|
+
group: "Margin",
|
|
2438
|
+
transform(value) {
|
|
2439
|
+
return {
|
|
2440
|
+
"& > :not([hidden]) ~ :not([hidden])": {
|
|
2441
|
+
marginTop: value,
|
|
2442
|
+
marginBottom: "0px"
|
|
2443
|
+
}
|
|
2444
|
+
};
|
|
2445
|
+
}
|
|
1909
2446
|
}
|
|
1910
2447
|
};
|
|
1911
2448
|
|
|
@@ -1938,8 +2475,13 @@ var tables = {
|
|
|
1938
2475
|
},
|
|
1939
2476
|
borderSpacing: {
|
|
1940
2477
|
className: "border-spacing",
|
|
1941
|
-
|
|
1942
|
-
|
|
2478
|
+
group: "Table",
|
|
2479
|
+
values(theme) {
|
|
2480
|
+
return {
|
|
2481
|
+
...theme("spacing"),
|
|
2482
|
+
auto: "var(--border-spacing-x) var(--border-spacing-y)"
|
|
2483
|
+
};
|
|
2484
|
+
}
|
|
1943
2485
|
},
|
|
1944
2486
|
borderSpacingX: {
|
|
1945
2487
|
className: "border-spacing-x",
|
|
@@ -1947,7 +2489,7 @@ var tables = {
|
|
|
1947
2489
|
group: "Table",
|
|
1948
2490
|
transform(value) {
|
|
1949
2491
|
return {
|
|
1950
|
-
|
|
2492
|
+
"--border-spacing-x": value
|
|
1951
2493
|
};
|
|
1952
2494
|
}
|
|
1953
2495
|
},
|
|
@@ -1957,7 +2499,7 @@ var tables = {
|
|
|
1957
2499
|
group: "Table",
|
|
1958
2500
|
transform(value) {
|
|
1959
2501
|
return {
|
|
1960
|
-
|
|
2502
|
+
"--border-spacing-y": value
|
|
1961
2503
|
};
|
|
1962
2504
|
}
|
|
1963
2505
|
},
|
|
@@ -1986,6 +2528,45 @@ var transforms = {
|
|
|
1986
2528
|
className: "origin",
|
|
1987
2529
|
group: "Transform"
|
|
1988
2530
|
},
|
|
2531
|
+
rotate: {
|
|
2532
|
+
className: "rotate",
|
|
2533
|
+
group: "Transform",
|
|
2534
|
+
property: "rotate",
|
|
2535
|
+
values: {
|
|
2536
|
+
auto: "var(--rotate-x) var(--rotate-y)",
|
|
2537
|
+
"auto-3d": "var(--rotate-x) var(--rotate-y) var(--rotate-z)"
|
|
2538
|
+
}
|
|
2539
|
+
},
|
|
2540
|
+
rotateX: {
|
|
2541
|
+
className: "rotate-x",
|
|
2542
|
+
group: "Transform",
|
|
2543
|
+
property: "rotate",
|
|
2544
|
+
transform(value) {
|
|
2545
|
+
return {
|
|
2546
|
+
"--rotate-x": value
|
|
2547
|
+
};
|
|
2548
|
+
}
|
|
2549
|
+
},
|
|
2550
|
+
rotateY: {
|
|
2551
|
+
className: "rotate-y",
|
|
2552
|
+
group: "Transform",
|
|
2553
|
+
property: "rotate",
|
|
2554
|
+
transform(value) {
|
|
2555
|
+
return {
|
|
2556
|
+
"--rotate-y": value
|
|
2557
|
+
};
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
rotateZ: {
|
|
2561
|
+
className: "rotate-z",
|
|
2562
|
+
group: "Transform",
|
|
2563
|
+
property: "rotate",
|
|
2564
|
+
transform(value) {
|
|
2565
|
+
return {
|
|
2566
|
+
"--rotate-z": value
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
},
|
|
1989
2570
|
scale: {
|
|
1990
2571
|
className: "scale",
|
|
1991
2572
|
group: "Transform",
|
|
@@ -2017,7 +2598,8 @@ var transforms = {
|
|
|
2017
2598
|
group: "Transform",
|
|
2018
2599
|
property: "translate",
|
|
2019
2600
|
values: {
|
|
2020
|
-
auto: "var(--translate-x) var(--translate-y)"
|
|
2601
|
+
auto: "var(--translate-x) var(--translate-y)",
|
|
2602
|
+
"auto-3d": "var(--translate-x) var(--translate-y) var(--translate-z)"
|
|
2021
2603
|
}
|
|
2022
2604
|
},
|
|
2023
2605
|
translateX: {
|
|
@@ -2051,6 +2633,22 @@ var transforms = {
|
|
|
2051
2633
|
"--translate-y": value
|
|
2052
2634
|
};
|
|
2053
2635
|
}
|
|
2636
|
+
},
|
|
2637
|
+
translateZ: {
|
|
2638
|
+
shorthand: "z",
|
|
2639
|
+
className: "translate-z",
|
|
2640
|
+
group: "Transform",
|
|
2641
|
+
values(theme) {
|
|
2642
|
+
return {
|
|
2643
|
+
...theme("spacing"),
|
|
2644
|
+
...fractions
|
|
2645
|
+
};
|
|
2646
|
+
},
|
|
2647
|
+
transform(value) {
|
|
2648
|
+
return {
|
|
2649
|
+
"--translate-z": value
|
|
2650
|
+
};
|
|
2651
|
+
}
|
|
2054
2652
|
}
|
|
2055
2653
|
};
|
|
2056
2654
|
|
|
@@ -2127,6 +2725,16 @@ var transitions = {
|
|
|
2127
2725
|
values: "animationName",
|
|
2128
2726
|
group: "Transition"
|
|
2129
2727
|
},
|
|
2728
|
+
animationTimingFunction: {
|
|
2729
|
+
className: "animation-ease",
|
|
2730
|
+
values: "easings",
|
|
2731
|
+
group: "Transition"
|
|
2732
|
+
},
|
|
2733
|
+
animationDuration: {
|
|
2734
|
+
className: "animation-duration",
|
|
2735
|
+
values: "durations",
|
|
2736
|
+
group: "Transition"
|
|
2737
|
+
},
|
|
2130
2738
|
animationDelay: {
|
|
2131
2739
|
className: "animation-delay",
|
|
2132
2740
|
values: "durations",
|
|
@@ -2138,647 +2746,192 @@ var transitions = {
|
|
|
2138
2746
|
var typography = {
|
|
2139
2747
|
color: {
|
|
2140
2748
|
className: "text",
|
|
2141
|
-
values: "colors",
|
|
2142
|
-
group: "Color",
|
|
2143
|
-
transform: createColorMixTransform("color")
|
|
2144
|
-
},
|
|
2145
|
-
fontFamily: {
|
|
2146
|
-
className: "font",
|
|
2147
|
-
values: "fonts",
|
|
2148
|
-
group: "Typography"
|
|
2149
|
-
},
|
|
2150
|
-
fontSize: {
|
|
2151
|
-
className: "fs",
|
|
2152
|
-
values: "fontSizes",
|
|
2153
|
-
group: "Typography"
|
|
2154
|
-
},
|
|
2155
|
-
fontWeight: {
|
|
2156
|
-
className: "font",
|
|
2157
|
-
values: "fontWeights",
|
|
2158
|
-
group: "Typography"
|
|
2159
|
-
},
|
|
2160
|
-
fontSmoothing: {
|
|
2161
|
-
className: "smoothing",
|
|
2162
|
-
group: "Typography",
|
|
2163
|
-
values: {
|
|
2164
|
-
antialiased: "antialiased",
|
|
2165
|
-
"subpixel-antialiased": "auto"
|
|
2166
|
-
},
|
|
2167
|
-
transform(value) {
|
|
2168
|
-
return {
|
|
2169
|
-
WebkitFontSmoothing: value
|
|
2170
|
-
};
|
|
2171
|
-
}
|
|
2172
|
-
},
|
|
2173
|
-
fontVariantNumeric: {
|
|
2174
|
-
className: "numeric",
|
|
2175
|
-
group: "Typography"
|
|
2176
|
-
},
|
|
2177
|
-
letterSpacing: {
|
|
2178
|
-
className: "tracking",
|
|
2179
|
-
values: "letterSpacings",
|
|
2180
|
-
group: "Typography"
|
|
2181
|
-
},
|
|
2182
|
-
lineHeight: {
|
|
2183
|
-
className: "leading",
|
|
2184
|
-
values: "lineHeights",
|
|
2185
|
-
group: "Typography"
|
|
2186
|
-
},
|
|
2187
|
-
textAlign: {
|
|
2188
|
-
className: "text",
|
|
2189
|
-
group: "Typography"
|
|
2190
|
-
},
|
|
2191
|
-
textDecoration: {
|
|
2192
|
-
className: "text-decor",
|
|
2193
|
-
group: "Typography"
|
|
2194
|
-
},
|
|
2195
|
-
textDecorationColor: {
|
|
2196
|
-
className: "text-decor",
|
|
2197
|
-
values: "colors",
|
|
2198
|
-
transform: createColorMixTransform("textDecorationColor"),
|
|
2199
|
-
group: "Typography"
|
|
2200
|
-
},
|
|
2201
|
-
textEmphasisColor: {
|
|
2202
|
-
className: "text-emphasis",
|
|
2203
|
-
values: "colors",
|
|
2204
|
-
transform: createColorMixTransform("textEmphasisColor"),
|
|
2205
|
-
group: "Typography"
|
|
2206
|
-
},
|
|
2207
|
-
textDecorationStyle: {
|
|
2208
|
-
className: "decoration",
|
|
2209
|
-
group: "Typography"
|
|
2210
|
-
},
|
|
2211
|
-
textDecorationThickness: {
|
|
2212
|
-
className: "decoration",
|
|
2213
|
-
group: "Typography"
|
|
2214
|
-
},
|
|
2215
|
-
textUnderlineOffset: {
|
|
2216
|
-
className: "underline-offset",
|
|
2217
|
-
group: "Typography"
|
|
2218
|
-
},
|
|
2219
|
-
textTransform: {
|
|
2220
|
-
className: "text",
|
|
2221
|
-
group: "Typography"
|
|
2222
|
-
},
|
|
2223
|
-
textIndent: {
|
|
2224
|
-
className: "indent",
|
|
2225
|
-
group: "Typography",
|
|
2226
|
-
values: "spacing"
|
|
2227
|
-
},
|
|
2228
|
-
textShadow: {
|
|
2229
|
-
className: "text-shadow",
|
|
2230
|
-
values: "shadows",
|
|
2231
|
-
group: "Typography"
|
|
2232
|
-
},
|
|
2233
|
-
textShadowColor: {
|
|
2234
|
-
shorthand: "textShadowColor",
|
|
2235
|
-
className: "text-shadow",
|
|
2236
|
-
values: "colors",
|
|
2237
|
-
transform: createColorMixTransform("--text-shadow-color"),
|
|
2238
|
-
group: "Typography"
|
|
2239
|
-
},
|
|
2240
|
-
textOverflow: {
|
|
2241
|
-
className: "text",
|
|
2242
|
-
group: "Typography"
|
|
2243
|
-
},
|
|
2244
|
-
verticalAlign: {
|
|
2245
|
-
className: "align",
|
|
2246
|
-
group: "Typography"
|
|
2247
|
-
},
|
|
2248
|
-
wordBreak: {
|
|
2249
|
-
className: "break",
|
|
2250
|
-
group: "Typography"
|
|
2251
|
-
},
|
|
2252
|
-
textWrap: {
|
|
2253
|
-
className: "text",
|
|
2254
|
-
values: ["wrap", "balance", "nowrap"],
|
|
2255
|
-
group: "Typography",
|
|
2256
|
-
transform(value) {
|
|
2257
|
-
return { textWrap: value };
|
|
2258
|
-
}
|
|
2259
|
-
},
|
|
2260
|
-
truncate: {
|
|
2261
|
-
className: "truncate",
|
|
2262
|
-
values: { type: "boolean" },
|
|
2263
|
-
group: "Typography",
|
|
2264
|
-
transform(value) {
|
|
2265
|
-
if (!value)
|
|
2266
|
-
return {};
|
|
2267
|
-
return {
|
|
2268
|
-
overflow: "hidden",
|
|
2269
|
-
textOverflow: "ellipsis",
|
|
2270
|
-
whiteSpace: "nowrap"
|
|
2271
|
-
};
|
|
2272
|
-
}
|
|
2273
|
-
},
|
|
2274
|
-
lineClamp: {
|
|
2275
|
-
className: "clamp",
|
|
2276
|
-
group: "Typography",
|
|
2277
|
-
transform(value) {
|
|
2278
|
-
if (value === "none") {
|
|
2279
|
-
return {
|
|
2280
|
-
WebkitLineClamp: "unset"
|
|
2281
|
-
};
|
|
2282
|
-
}
|
|
2283
|
-
return {
|
|
2284
|
-
overflow: "hidden",
|
|
2285
|
-
display: "-webkit-box",
|
|
2286
|
-
WebkitLineClamp: value,
|
|
2287
|
-
WebkitBoxOrient: "vertical"
|
|
2288
|
-
};
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
};
|
|
2292
|
-
|
|
2293
|
-
// src/utilities/index.ts
|
|
2294
|
-
var utilities = Object.assign(
|
|
2295
|
-
{},
|
|
2296
|
-
layout,
|
|
2297
|
-
display,
|
|
2298
|
-
flexGrid,
|
|
2299
|
-
spacing,
|
|
2300
|
-
outline,
|
|
2301
|
-
divide,
|
|
2302
|
-
sizing,
|
|
2303
|
-
typography,
|
|
2304
|
-
list,
|
|
2305
|
-
background,
|
|
2306
|
-
border,
|
|
2307
|
-
effects,
|
|
2308
|
-
tables,
|
|
2309
|
-
transitions,
|
|
2310
|
-
transforms,
|
|
2311
|
-
interactivity,
|
|
2312
|
-
svg,
|
|
2313
|
-
helpers,
|
|
2314
|
-
polyfill,
|
|
2315
|
-
container
|
|
2316
|
-
);
|
|
2317
|
-
|
|
2318
|
-
// src/patterns.ts
|
|
2319
|
-
function definePattern(config) {
|
|
2320
|
-
return config;
|
|
2321
|
-
}
|
|
2322
|
-
var box = definePattern({
|
|
2323
|
-
transform(props) {
|
|
2324
|
-
return props;
|
|
2325
|
-
}
|
|
2326
|
-
});
|
|
2327
|
-
var flex = definePattern({
|
|
2328
|
-
properties: {
|
|
2329
|
-
align: { type: "property", value: "alignItems" },
|
|
2330
|
-
justify: { type: "property", value: "justifyContent" },
|
|
2331
|
-
direction: { type: "property", value: "flexDirection" },
|
|
2332
|
-
wrap: { type: "property", value: "flexWrap" },
|
|
2333
|
-
basis: { type: "property", value: "flexBasis" },
|
|
2334
|
-
grow: { type: "property", value: "flexGrow" },
|
|
2335
|
-
shrink: { type: "property", value: "flexShrink" }
|
|
2336
|
-
},
|
|
2337
|
-
transform(props) {
|
|
2338
|
-
const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
|
|
2339
|
-
return {
|
|
2340
|
-
display: "flex",
|
|
2341
|
-
flexDirection: direction,
|
|
2342
|
-
alignItems: align,
|
|
2343
|
-
justifyContent: justify,
|
|
2344
|
-
flexWrap: wrap2,
|
|
2345
|
-
flexBasis: basis,
|
|
2346
|
-
flexGrow: grow,
|
|
2347
|
-
flexShrink: shrink,
|
|
2348
|
-
...rest
|
|
2349
|
-
};
|
|
2350
|
-
}
|
|
2351
|
-
});
|
|
2352
|
-
var stack = definePattern({
|
|
2353
|
-
properties: {
|
|
2354
|
-
align: { type: "property", value: "alignItems" },
|
|
2355
|
-
justify: { type: "property", value: "justifyContent" },
|
|
2356
|
-
direction: { type: "property", value: "flexDirection" },
|
|
2357
|
-
gap: { type: "property", value: "gap" }
|
|
2358
|
-
},
|
|
2359
|
-
defaultValues: {
|
|
2360
|
-
direction: "column",
|
|
2361
|
-
gap: "10px"
|
|
2362
|
-
},
|
|
2363
|
-
transform(props) {
|
|
2364
|
-
const { align, justify, direction, gap, ...rest } = props;
|
|
2365
|
-
return {
|
|
2366
|
-
display: "flex",
|
|
2367
|
-
flexDirection: direction,
|
|
2368
|
-
alignItems: align,
|
|
2369
|
-
justifyContent: justify,
|
|
2370
|
-
gap,
|
|
2371
|
-
...rest
|
|
2372
|
-
};
|
|
2373
|
-
}
|
|
2374
|
-
});
|
|
2375
|
-
var vstack = definePattern({
|
|
2376
|
-
jsxName: "VStack",
|
|
2377
|
-
properties: {
|
|
2378
|
-
justify: { type: "property", value: "justifyContent" },
|
|
2379
|
-
gap: { type: "property", value: "gap" }
|
|
2749
|
+
values: "colors",
|
|
2750
|
+
group: "Color",
|
|
2751
|
+
transform: createColorMixTransform("color")
|
|
2380
2752
|
},
|
|
2381
|
-
|
|
2382
|
-
|
|
2753
|
+
fontFamily: {
|
|
2754
|
+
className: "font",
|
|
2755
|
+
values: "fonts",
|
|
2756
|
+
group: "Typography"
|
|
2383
2757
|
},
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
alignItems: "center",
|
|
2389
|
-
justifyContent: justify,
|
|
2390
|
-
gap,
|
|
2391
|
-
flexDirection: "column",
|
|
2392
|
-
...rest
|
|
2393
|
-
};
|
|
2394
|
-
}
|
|
2395
|
-
});
|
|
2396
|
-
var hstack = definePattern({
|
|
2397
|
-
jsxName: "HStack",
|
|
2398
|
-
properties: {
|
|
2399
|
-
justify: { type: "property", value: "justifyContent" },
|
|
2400
|
-
gap: { type: "property", value: "gap" }
|
|
2758
|
+
fontSize: {
|
|
2759
|
+
className: "fs",
|
|
2760
|
+
values: "fontSizes",
|
|
2761
|
+
group: "Typography"
|
|
2401
2762
|
},
|
|
2402
|
-
|
|
2403
|
-
|
|
2763
|
+
fontWeight: {
|
|
2764
|
+
className: "fw",
|
|
2765
|
+
values: "fontWeights",
|
|
2766
|
+
group: "Typography"
|
|
2404
2767
|
},
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
}
|
|
2417
|
-
var spacer = definePattern({
|
|
2418
|
-
properties: {
|
|
2419
|
-
size: { type: "token", value: "spacing" }
|
|
2768
|
+
fontSmoothing: {
|
|
2769
|
+
className: "smoothing",
|
|
2770
|
+
group: "Typography",
|
|
2771
|
+
values: {
|
|
2772
|
+
antialiased: "antialiased",
|
|
2773
|
+
"subpixel-antialiased": "auto"
|
|
2774
|
+
},
|
|
2775
|
+
transform(value) {
|
|
2776
|
+
return {
|
|
2777
|
+
WebkitFontSmoothing: value
|
|
2778
|
+
};
|
|
2779
|
+
}
|
|
2420
2780
|
},
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
alignSelf: "stretch",
|
|
2425
|
-
justifySelf: "stretch",
|
|
2426
|
-
flex: map(size, (v) => v == null ? "1" : `0 0 ${v}`),
|
|
2427
|
-
...rest
|
|
2428
|
-
};
|
|
2429
|
-
}
|
|
2430
|
-
});
|
|
2431
|
-
var circle = definePattern({
|
|
2432
|
-
properties: {
|
|
2433
|
-
size: { type: "property", value: "width" }
|
|
2781
|
+
fontVariantNumeric: {
|
|
2782
|
+
className: "numeric",
|
|
2783
|
+
group: "Typography"
|
|
2434
2784
|
},
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
alignItems: "center",
|
|
2440
|
-
justifyContent: "center",
|
|
2441
|
-
flex: "0 0 auto",
|
|
2442
|
-
width: size,
|
|
2443
|
-
height: size,
|
|
2444
|
-
borderRadius: "9999px",
|
|
2445
|
-
...rest
|
|
2446
|
-
};
|
|
2447
|
-
}
|
|
2448
|
-
});
|
|
2449
|
-
var square = definePattern({
|
|
2450
|
-
properties: {
|
|
2451
|
-
size: { type: "property", value: "width" }
|
|
2785
|
+
letterSpacing: {
|
|
2786
|
+
className: "tracking",
|
|
2787
|
+
values: "letterSpacings",
|
|
2788
|
+
group: "Typography"
|
|
2452
2789
|
},
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
alignItems: "center",
|
|
2458
|
-
justifyContent: "center",
|
|
2459
|
-
flex: "0 0 auto",
|
|
2460
|
-
width: size,
|
|
2461
|
-
height: size,
|
|
2462
|
-
...rest
|
|
2463
|
-
};
|
|
2464
|
-
}
|
|
2465
|
-
});
|
|
2466
|
-
var grid = definePattern({
|
|
2467
|
-
properties: {
|
|
2468
|
-
gap: { type: "property", value: "gap" },
|
|
2469
|
-
columnGap: { type: "property", value: "gap" },
|
|
2470
|
-
rowGap: { type: "property", value: "gap" },
|
|
2471
|
-
columns: { type: "number" },
|
|
2472
|
-
minChildWidth: { type: "token", value: "sizes", property: "width" }
|
|
2790
|
+
lineHeight: {
|
|
2791
|
+
className: "leading",
|
|
2792
|
+
values: "lineHeights",
|
|
2793
|
+
group: "Typography"
|
|
2473
2794
|
},
|
|
2474
|
-
|
|
2475
|
-
|
|
2795
|
+
textAlign: {
|
|
2796
|
+
className: "text-align",
|
|
2797
|
+
group: "Typography"
|
|
2476
2798
|
},
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
return {
|
|
2481
|
-
display: "grid",
|
|
2482
|
-
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,
|
|
2483
|
-
gap,
|
|
2484
|
-
columnGap,
|
|
2485
|
-
rowGap,
|
|
2486
|
-
...rest
|
|
2487
|
-
};
|
|
2488
|
-
}
|
|
2489
|
-
});
|
|
2490
|
-
var gridItem = definePattern({
|
|
2491
|
-
properties: {
|
|
2492
|
-
colSpan: { type: "number" },
|
|
2493
|
-
rowSpan: { type: "number" },
|
|
2494
|
-
colStart: { type: "number" },
|
|
2495
|
-
rowStart: { type: "number" },
|
|
2496
|
-
colEnd: { type: "number" },
|
|
2497
|
-
rowEnd: { type: "number" }
|
|
2799
|
+
textDecoration: {
|
|
2800
|
+
className: "text-decor",
|
|
2801
|
+
group: "Typography"
|
|
2498
2802
|
},
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
2505
|
-
gridColumnStart: colStart,
|
|
2506
|
-
gridColumnEnd: colEnd,
|
|
2507
|
-
gridRowStart: rowStart,
|
|
2508
|
-
gridRowEnd: rowEnd,
|
|
2509
|
-
...rest
|
|
2510
|
-
};
|
|
2511
|
-
}
|
|
2512
|
-
});
|
|
2513
|
-
var wrap = definePattern({
|
|
2514
|
-
properties: {
|
|
2515
|
-
gap: { type: "property", value: "gap" },
|
|
2516
|
-
rowGap: { type: "property", value: "gap" },
|
|
2517
|
-
columnGap: { type: "property", value: "gap" },
|
|
2518
|
-
align: { type: "property", value: "alignItems" },
|
|
2519
|
-
justify: { type: "property", value: "justifyContent" }
|
|
2803
|
+
textDecorationColor: {
|
|
2804
|
+
className: "text-decor-color",
|
|
2805
|
+
values: "colors",
|
|
2806
|
+
transform: createColorMixTransform("textDecorationColor"),
|
|
2807
|
+
group: "Typography"
|
|
2520
2808
|
},
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
alignItems: align,
|
|
2527
|
-
justifyContent: justify,
|
|
2528
|
-
gap,
|
|
2529
|
-
columnGap,
|
|
2530
|
-
rowGap,
|
|
2531
|
-
...rest
|
|
2532
|
-
};
|
|
2533
|
-
}
|
|
2534
|
-
});
|
|
2535
|
-
var container2 = definePattern({
|
|
2536
|
-
transform(props) {
|
|
2537
|
-
return {
|
|
2538
|
-
position: "relative",
|
|
2539
|
-
maxWidth: "8xl",
|
|
2540
|
-
mx: "auto",
|
|
2541
|
-
px: { base: "4", md: "6", lg: "8" },
|
|
2542
|
-
...props
|
|
2543
|
-
};
|
|
2544
|
-
}
|
|
2545
|
-
});
|
|
2546
|
-
var center = definePattern({
|
|
2547
|
-
properties: {
|
|
2548
|
-
inline: { type: "boolean" }
|
|
2809
|
+
textEmphasisColor: {
|
|
2810
|
+
className: "text-emphasis-color",
|
|
2811
|
+
values: "colors",
|
|
2812
|
+
transform: createColorMixTransform("textEmphasisColor"),
|
|
2813
|
+
group: "Typography"
|
|
2549
2814
|
},
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
display: inline ? "inline-flex" : "flex",
|
|
2554
|
-
alignItems: "center",
|
|
2555
|
-
justifyContent: "center",
|
|
2556
|
-
...rest
|
|
2557
|
-
};
|
|
2558
|
-
}
|
|
2559
|
-
});
|
|
2560
|
-
var aspectRatio = definePattern({
|
|
2561
|
-
properties: {
|
|
2562
|
-
ratio: { type: "number" }
|
|
2815
|
+
textDecorationStyle: {
|
|
2816
|
+
className: "decoration-style",
|
|
2817
|
+
group: "Typography"
|
|
2563
2818
|
},
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
return {
|
|
2568
|
-
position: "relative",
|
|
2569
|
-
_before: {
|
|
2570
|
-
content: `""`,
|
|
2571
|
-
display: "block",
|
|
2572
|
-
height: "0",
|
|
2573
|
-
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
2574
|
-
},
|
|
2575
|
-
"&>*": {
|
|
2576
|
-
display: "flex",
|
|
2577
|
-
justifyContent: "center",
|
|
2578
|
-
alignItems: "center",
|
|
2579
|
-
overflow: "hidden",
|
|
2580
|
-
position: "absolute",
|
|
2581
|
-
inset: "0",
|
|
2582
|
-
width: "100%",
|
|
2583
|
-
height: "100%"
|
|
2584
|
-
},
|
|
2585
|
-
"&>img, &>video": {
|
|
2586
|
-
objectFit: "cover"
|
|
2587
|
-
},
|
|
2588
|
-
...rest
|
|
2589
|
-
};
|
|
2590
|
-
}
|
|
2591
|
-
});
|
|
2592
|
-
var divider = definePattern({
|
|
2593
|
-
properties: {
|
|
2594
|
-
orientation: { type: "enum", value: ["horizontal", "vertical"] },
|
|
2595
|
-
thickness: { type: "token", value: "sizes", property: "borderWidth" },
|
|
2596
|
-
color: { type: "token", value: "colors", property: "borderColor" }
|
|
2819
|
+
textDecorationThickness: {
|
|
2820
|
+
className: "decoration-thickness",
|
|
2821
|
+
group: "Typography"
|
|
2597
2822
|
},
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2823
|
+
textUnderlineOffset: {
|
|
2824
|
+
className: "underline-offset",
|
|
2825
|
+
group: "Typography"
|
|
2601
2826
|
},
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
"--thickness": thickness,
|
|
2606
|
-
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
2607
|
-
height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
|
|
2608
|
-
borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
|
|
2609
|
-
borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
|
|
2610
|
-
borderColor: color,
|
|
2611
|
-
...rest
|
|
2612
|
-
};
|
|
2613
|
-
}
|
|
2614
|
-
});
|
|
2615
|
-
var linkBox = definePattern({
|
|
2616
|
-
transform(props) {
|
|
2617
|
-
return {
|
|
2618
|
-
position: "relative",
|
|
2619
|
-
"& :where(a, abbr)": {
|
|
2620
|
-
position: "relative",
|
|
2621
|
-
zIndex: "1"
|
|
2622
|
-
},
|
|
2623
|
-
...props
|
|
2624
|
-
};
|
|
2625
|
-
}
|
|
2626
|
-
});
|
|
2627
|
-
var linkOverlay = definePattern({
|
|
2628
|
-
jsxElement: "a",
|
|
2629
|
-
transform(props) {
|
|
2630
|
-
return {
|
|
2631
|
-
position: "static",
|
|
2632
|
-
_before: {
|
|
2633
|
-
content: '""',
|
|
2634
|
-
display: "block",
|
|
2635
|
-
position: "absolute",
|
|
2636
|
-
cursor: "inherit",
|
|
2637
|
-
inset: "0",
|
|
2638
|
-
zIndex: "0",
|
|
2639
|
-
...props["_before"]
|
|
2640
|
-
},
|
|
2641
|
-
...props
|
|
2642
|
-
};
|
|
2643
|
-
}
|
|
2644
|
-
});
|
|
2645
|
-
var float = definePattern({
|
|
2646
|
-
properties: {
|
|
2647
|
-
offsetX: { type: "token", value: "spacing", property: "left" },
|
|
2648
|
-
offsetY: { type: "token", value: "spacing", property: "top" },
|
|
2649
|
-
offset: { type: "token", value: "spacing", property: "top" },
|
|
2650
|
-
placement: {
|
|
2651
|
-
type: "enum",
|
|
2652
|
-
value: [
|
|
2653
|
-
"bottom-end",
|
|
2654
|
-
"bottom-start",
|
|
2655
|
-
"top-end",
|
|
2656
|
-
"top-start",
|
|
2657
|
-
"bottom-center",
|
|
2658
|
-
"top-center",
|
|
2659
|
-
"middle-center",
|
|
2660
|
-
"middle-end",
|
|
2661
|
-
"middle-start"
|
|
2662
|
-
]
|
|
2663
|
-
}
|
|
2827
|
+
textTransform: {
|
|
2828
|
+
className: "text-transform",
|
|
2829
|
+
group: "Typography"
|
|
2664
2830
|
},
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2831
|
+
textIndent: {
|
|
2832
|
+
className: "indent",
|
|
2833
|
+
group: "Typography",
|
|
2834
|
+
values: "spacing"
|
|
2668
2835
|
},
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
justifyContent: "center",
|
|
2674
|
-
alignItems: "center",
|
|
2675
|
-
position: "absolute",
|
|
2676
|
-
insetBlockStart: map(placement, (v) => {
|
|
2677
|
-
const [side] = v.split("-");
|
|
2678
|
-
const map2 = { top: offsetY, middle: "50%", bottom: "auto" };
|
|
2679
|
-
return map2[side];
|
|
2680
|
-
}),
|
|
2681
|
-
insetBlockEnd: map(placement, (v) => {
|
|
2682
|
-
const [side] = v.split("-");
|
|
2683
|
-
const map2 = { top: "auto", middle: "50%", bottom: offsetY };
|
|
2684
|
-
return map2[side];
|
|
2685
|
-
}),
|
|
2686
|
-
insetInlineStart: map(placement, (v) => {
|
|
2687
|
-
const [, align] = v.split("-");
|
|
2688
|
-
const map2 = { start: offsetX, center: "50%", end: "auto" };
|
|
2689
|
-
return map2[align];
|
|
2690
|
-
}),
|
|
2691
|
-
insetInlineEnd: map(placement, (v) => {
|
|
2692
|
-
const [, align] = v.split("-");
|
|
2693
|
-
const map2 = { start: "auto", center: "50%", end: offsetX };
|
|
2694
|
-
return map2[align];
|
|
2695
|
-
}),
|
|
2696
|
-
translate: map(placement, (v) => {
|
|
2697
|
-
const [side, align] = v.split("-");
|
|
2698
|
-
const mapX = { start: "-50%", center: "-50%", end: "50%" };
|
|
2699
|
-
const mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
|
|
2700
|
-
return `${mapX[align]} ${mapY[side]}`;
|
|
2701
|
-
}),
|
|
2702
|
-
...rest
|
|
2703
|
-
};
|
|
2704
|
-
}
|
|
2705
|
-
});
|
|
2706
|
-
var bleed = definePattern({
|
|
2707
|
-
properties: {
|
|
2708
|
-
inline: { type: "property", value: "marginInline" },
|
|
2709
|
-
block: { type: "property", value: "marginBlock" }
|
|
2836
|
+
textShadow: {
|
|
2837
|
+
className: "text-shadow",
|
|
2838
|
+
values: "shadows",
|
|
2839
|
+
group: "Typography"
|
|
2710
2840
|
},
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2841
|
+
textShadowColor: {
|
|
2842
|
+
shorthand: "textShadowColor",
|
|
2843
|
+
className: "text-shadow",
|
|
2844
|
+
values: "colors",
|
|
2845
|
+
transform: createColorMixTransform("--text-shadow-color"),
|
|
2846
|
+
group: "Typography"
|
|
2714
2847
|
},
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
return {
|
|
2719
|
-
"--bleed-x": map(inline, valueFn),
|
|
2720
|
-
"--bleed-y": map(block, valueFn),
|
|
2721
|
-
marginInline: "calc(var(--bleed-x, 0) * -1)",
|
|
2722
|
-
marginBlock: "calc(var(--bleed-y, 0) * -1)",
|
|
2723
|
-
...rest
|
|
2724
|
-
};
|
|
2725
|
-
}
|
|
2726
|
-
});
|
|
2727
|
-
var visuallyHidden = definePattern({
|
|
2728
|
-
transform(props) {
|
|
2729
|
-
return {
|
|
2730
|
-
srOnly: true,
|
|
2731
|
-
...props
|
|
2732
|
-
};
|
|
2733
|
-
}
|
|
2734
|
-
});
|
|
2735
|
-
var cq = definePattern({
|
|
2736
|
-
properties: {
|
|
2737
|
-
name: { type: "token", value: "containerNames", property: "containerName" },
|
|
2738
|
-
type: { type: "property", value: "containerType" }
|
|
2848
|
+
textOverflow: {
|
|
2849
|
+
className: "text-overflow",
|
|
2850
|
+
group: "Typography"
|
|
2739
2851
|
},
|
|
2740
|
-
|
|
2741
|
-
|
|
2852
|
+
verticalAlign: {
|
|
2853
|
+
className: "v-align",
|
|
2854
|
+
group: "Typography"
|
|
2742
2855
|
},
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2856
|
+
wordBreak: {
|
|
2857
|
+
className: "break",
|
|
2858
|
+
group: "Typography"
|
|
2859
|
+
},
|
|
2860
|
+
textWrap: {
|
|
2861
|
+
className: "text-wrap",
|
|
2862
|
+
values: ["wrap", "balance", "nowrap"],
|
|
2863
|
+
group: "Typography",
|
|
2864
|
+
transform(value) {
|
|
2865
|
+
return { textWrap: value };
|
|
2866
|
+
}
|
|
2867
|
+
},
|
|
2868
|
+
truncate: {
|
|
2869
|
+
className: "truncate",
|
|
2870
|
+
values: { type: "boolean" },
|
|
2871
|
+
group: "Typography",
|
|
2872
|
+
transform(value) {
|
|
2873
|
+
if (!value)
|
|
2874
|
+
return {};
|
|
2875
|
+
return {
|
|
2876
|
+
overflow: "hidden",
|
|
2877
|
+
textOverflow: "ellipsis",
|
|
2878
|
+
whiteSpace: "nowrap"
|
|
2879
|
+
};
|
|
2880
|
+
}
|
|
2881
|
+
},
|
|
2882
|
+
lineClamp: {
|
|
2883
|
+
className: "clamp",
|
|
2884
|
+
group: "Typography",
|
|
2885
|
+
transform(value) {
|
|
2886
|
+
if (value === "none") {
|
|
2887
|
+
return {
|
|
2888
|
+
WebkitLineClamp: "unset"
|
|
2889
|
+
};
|
|
2890
|
+
}
|
|
2891
|
+
return {
|
|
2892
|
+
overflow: "hidden",
|
|
2893
|
+
display: "-webkit-box",
|
|
2894
|
+
WebkitLineClamp: value,
|
|
2895
|
+
WebkitBoxOrient: "vertical"
|
|
2896
|
+
};
|
|
2897
|
+
}
|
|
2750
2898
|
}
|
|
2751
|
-
});
|
|
2752
|
-
var patterns = {
|
|
2753
|
-
box,
|
|
2754
|
-
flex,
|
|
2755
|
-
stack,
|
|
2756
|
-
vstack,
|
|
2757
|
-
hstack,
|
|
2758
|
-
spacer,
|
|
2759
|
-
square,
|
|
2760
|
-
circle,
|
|
2761
|
-
center,
|
|
2762
|
-
linkBox,
|
|
2763
|
-
linkOverlay,
|
|
2764
|
-
aspectRatio,
|
|
2765
|
-
grid,
|
|
2766
|
-
gridItem,
|
|
2767
|
-
wrap,
|
|
2768
|
-
container: container2,
|
|
2769
|
-
divider,
|
|
2770
|
-
float,
|
|
2771
|
-
bleed,
|
|
2772
|
-
visuallyHidden,
|
|
2773
|
-
cq
|
|
2774
2899
|
};
|
|
2775
2900
|
|
|
2901
|
+
// src/utilities/index.ts
|
|
2902
|
+
var utilities = Object.assign(
|
|
2903
|
+
{},
|
|
2904
|
+
layout,
|
|
2905
|
+
display,
|
|
2906
|
+
flexGrid,
|
|
2907
|
+
spacing,
|
|
2908
|
+
outline,
|
|
2909
|
+
divide,
|
|
2910
|
+
sizing,
|
|
2911
|
+
typography,
|
|
2912
|
+
list,
|
|
2913
|
+
background,
|
|
2914
|
+
backgroundGradients,
|
|
2915
|
+
border,
|
|
2916
|
+
effects,
|
|
2917
|
+
tables,
|
|
2918
|
+
transitions,
|
|
2919
|
+
transforms,
|
|
2920
|
+
interactivity,
|
|
2921
|
+
svg,
|
|
2922
|
+
helpers,
|
|
2923
|
+
polyfill,
|
|
2924
|
+
container2
|
|
2925
|
+
);
|
|
2926
|
+
|
|
2776
2927
|
// src/index.ts
|
|
2777
2928
|
var definePreset = (preset2) => preset2;
|
|
2778
2929
|
var preset = definePreset({
|
|
2779
2930
|
conditions,
|
|
2780
2931
|
utilities,
|
|
2781
|
-
patterns
|
|
2932
|
+
patterns,
|
|
2933
|
+
// globalVars,
|
|
2934
|
+
globalCss
|
|
2782
2935
|
});
|
|
2783
2936
|
var src_default = preset;
|
|
2784
2937
|
export {
|