@unocss/preset-uno 0.14.2 → 0.14.3
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/{chunk-P5HELYQA.mjs → chunks/colors.cjs} +4 -5
- package/dist/{chunk-7O4GGKN3.js → chunks/colors.mjs} +2 -5
- package/dist/{chunk-VYMMTQ2N.js → chunks/default.cjs} +392 -458
- package/dist/{chunk-XF2Z5UCK.mjs → chunks/default.mjs} +222 -401
- package/dist/{chunk-BOWXQI3B.js → chunks/default2.cjs} +41 -48
- package/dist/{chunk-BLAKJWHG.mjs → chunks/default2.mjs} +21 -48
- package/dist/{chunk-HD4ZLDCQ.js → chunks/default3.cjs} +31 -42
- package/dist/{chunk-SVHXUA5V.mjs → chunks/default3.mjs} +14 -34
- package/dist/{chunk-O7YRGPXQ.mjs → chunks/index.cjs} +38 -59
- package/dist/{chunk-LPZDYB4J.js → chunks/index.mjs} +23 -60
- package/dist/{chunk-VQNLS43G.js → chunks/pseudo.cjs} +20 -20
- package/dist/{chunk-CKV32YDT.mjs → chunks/pseudo.mjs} +14 -19
- package/dist/chunks/variants.cjs +14 -0
- package/dist/chunks/variants.mjs +12 -0
- package/dist/colors.cjs +9 -0
- package/dist/colors.mjs +1 -7
- package/dist/index.cjs +31 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +12 -27
- package/dist/rules.cjs +123 -0
- package/dist/rules.mjs +4 -231
- package/dist/theme.cjs +29 -0
- package/dist/theme.mjs +2 -47
- package/dist/utils.cjs +25 -0
- package/dist/utils.mjs +2 -37
- package/dist/variants.cjs +23 -0
- package/dist/variants.mjs +4 -32
- package/package.json +11 -11
- package/dist/chunk-5SH5BFJ4.mjs +0 -11
- package/dist/chunk-Y6EUTGDC.js +0 -11
- package/dist/colors.js +0 -7
- package/dist/index.js +0 -40
- package/dist/rules.js +0 -231
- package/dist/theme.js +0 -47
- package/dist/utils.js +0 -37
- package/dist/variants.js +0 -32
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from
|
|
4
|
-
import {
|
|
5
|
-
capitalize,
|
|
6
|
-
cornerMap,
|
|
7
|
-
directionMap,
|
|
8
|
-
handler,
|
|
9
|
-
xyzMap
|
|
10
|
-
} from "./chunk-O7YRGPXQ.mjs";
|
|
1
|
+
import { hex2rgba, toArray } from '@unocss/core';
|
|
2
|
+
import { h as handler, d as directionMap, c as cornerMap, a as capitalize, x as xyzMap } from './index.mjs';
|
|
3
|
+
import { C as CONTROL_BYPASS_PSEUDO } from './pseudo.mjs';
|
|
11
4
|
|
|
12
|
-
|
|
13
|
-
var verticalAlignAlias = {
|
|
5
|
+
const verticalAlignAlias = {
|
|
14
6
|
mid: "middle",
|
|
15
7
|
base: "baseline",
|
|
16
8
|
btm: "bottom"
|
|
17
9
|
};
|
|
18
|
-
|
|
10
|
+
const verticalAligns = [
|
|
19
11
|
[/^(?:vertical|align|v)-(baseline|top|bottom|middle|text-top|text-bottom|mid|base|btm)$/, ([, v]) => ({ "vertical-align": verticalAlignAlias[v] || v })]
|
|
20
12
|
];
|
|
21
|
-
|
|
13
|
+
const textAligns = [
|
|
22
14
|
["text-center", { "text-align": "center" }],
|
|
23
15
|
["text-left", { "text-align": "left" }],
|
|
24
16
|
["text-right", { "text-align": "right" }],
|
|
25
17
|
["text-justify", { "text-align": "justify" }]
|
|
26
18
|
];
|
|
27
19
|
|
|
28
|
-
|
|
29
|
-
var keyframes = {
|
|
20
|
+
const keyframes = {
|
|
30
21
|
"spin": "{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",
|
|
31
22
|
"ping": "{0%{transform:scale(1);opacity:1}75%,100%{transform:scale(2);opacity:0}}",
|
|
32
23
|
"bounce": "{from,20%,53%,80%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1);transform:translate3d(0,0,0)}40%,43%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-30px,0)}70%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}",
|
|
@@ -127,7 +118,7 @@ var keyframes = {
|
|
|
127
118
|
"back-out-right": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateY(0px) scale(0.7)}100%{opacity:0.7;transform:translateX(2000px) scale(0.7)}}",
|
|
128
119
|
"back-out-left": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateX(-2000px) scale(0.7)}100%{opacity:0.7;transform:translateY(-700px) scale(0.7)}}"
|
|
129
120
|
};
|
|
130
|
-
|
|
121
|
+
const durations = {
|
|
131
122
|
"heart-beat": "1.3s",
|
|
132
123
|
"bounce-in": "0.75s",
|
|
133
124
|
"bounce-out": "0.75s",
|
|
@@ -135,7 +126,7 @@ var durations = {
|
|
|
135
126
|
"flip-out-y": "0.75s",
|
|
136
127
|
"hinge": "2s"
|
|
137
128
|
};
|
|
138
|
-
|
|
129
|
+
const timingFns = {
|
|
139
130
|
"head-shake": "ease-in-out",
|
|
140
131
|
"heart-beat": "ease-in-out",
|
|
141
132
|
"pulse": "ease-in-out",
|
|
@@ -144,7 +135,7 @@ var timingFns = {
|
|
|
144
135
|
"light-speed-out-left": "ease-in",
|
|
145
136
|
"light-speed-out-right": "ease-in"
|
|
146
137
|
};
|
|
147
|
-
|
|
138
|
+
const properties = {
|
|
148
139
|
"bounce": { "transform-origin": "center bottom" },
|
|
149
140
|
"jello": { "transform-origin": "center" },
|
|
150
141
|
"swing": { "transform-origin": "top center" },
|
|
@@ -169,7 +160,7 @@ var properties = {
|
|
|
169
160
|
"zoom-out-right": { "transform-origin": "right center" },
|
|
170
161
|
"zoom-out-up": { "transform-origin": "center bottom" }
|
|
171
162
|
};
|
|
172
|
-
|
|
163
|
+
const animations = [
|
|
173
164
|
[/^animate-(.*)$/, ([, name], { constructCSS }) => {
|
|
174
165
|
const kf = keyframes[name];
|
|
175
166
|
if (kf) {
|
|
@@ -187,10 +178,7 @@ ${constructCSS(Object.assign({ animation: `${name} ${durations[name] || "1s"} ${
|
|
|
187
178
|
[/^animate-play(?:-state)?-(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })]
|
|
188
179
|
];
|
|
189
180
|
|
|
190
|
-
|
|
191
|
-
import { hex2rgba } from "@unocss/core";
|
|
192
|
-
var parseColorUtil = (body, theme) => {
|
|
193
|
-
var _a;
|
|
181
|
+
const parseColorUtil = (body, theme) => {
|
|
194
182
|
const [main, opacity2] = body.split(/(?:\/|:)/);
|
|
195
183
|
const [name, no = "DEFAULT"] = main.replace(/([a-z])([0-9])/g, "$1-$2").split(/-/g);
|
|
196
184
|
if (!name)
|
|
@@ -202,7 +190,7 @@ var parseColorUtil = (body, theme) => {
|
|
|
202
190
|
if (bracket.startsWith("hex-"))
|
|
203
191
|
color = bracket.slice(4);
|
|
204
192
|
if (!color) {
|
|
205
|
-
const colorData =
|
|
193
|
+
const colorData = theme.colors?.[name];
|
|
206
194
|
if (typeof colorData === "string")
|
|
207
195
|
color = colorData;
|
|
208
196
|
else if (no && colorData)
|
|
@@ -216,14 +204,14 @@ var parseColorUtil = (body, theme) => {
|
|
|
216
204
|
rgba: hex2rgba(color)
|
|
217
205
|
};
|
|
218
206
|
};
|
|
219
|
-
|
|
207
|
+
const colorResolver$2 = (attribute, varName) => ([, body], { theme }) => {
|
|
220
208
|
const data = parseColorUtil(body, theme);
|
|
221
209
|
if (!data)
|
|
222
210
|
return;
|
|
223
211
|
const { opacity: opacity2, color, rgba } = data;
|
|
224
212
|
if (!color)
|
|
225
213
|
return;
|
|
226
|
-
const a = opacity2 ? opacity2[0] === "[" ? handler.bracket.percent(opacity2) : parseFloat(opacity2) / 100 : rgba
|
|
214
|
+
const a = opacity2 ? opacity2[0] === "[" ? handler.bracket.percent(opacity2) : parseFloat(opacity2) / 100 : rgba?.[3];
|
|
227
215
|
if (rgba) {
|
|
228
216
|
if (a != null && !Number.isNaN(a)) {
|
|
229
217
|
rgba[3] = typeof a === "string" && !a.includes("%") ? parseFloat(a) : a;
|
|
@@ -242,16 +230,16 @@ var colorResolver = (attribute, varName) => ([, body], { theme }) => {
|
|
|
242
230
|
};
|
|
243
231
|
}
|
|
244
232
|
};
|
|
245
|
-
|
|
233
|
+
const opacity = [
|
|
246
234
|
[/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: handler.bracket.percent.cssvar(d) })]
|
|
247
235
|
];
|
|
248
|
-
|
|
249
|
-
[/^(?:text|color|c)-(.+)$/, colorResolver("color", "text")],
|
|
236
|
+
const textColors = [
|
|
237
|
+
[/^(?:text|color|c)-(.+)$/, colorResolver$2("color", "text")],
|
|
250
238
|
[/^(?:text|color|c)-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-text-opacity": handler.bracket.percent.cssvar(opacity2) })]
|
|
251
239
|
];
|
|
252
|
-
|
|
240
|
+
const textDecorationColors = [
|
|
253
241
|
[/^underline-(.+)$/, (match, ctx) => {
|
|
254
|
-
const result = colorResolver("text-decoration-color", "line")(match, ctx);
|
|
242
|
+
const result = colorResolver$2("text-decoration-color", "line")(match, ctx);
|
|
255
243
|
if (result) {
|
|
256
244
|
return {
|
|
257
245
|
"-webkit-text-decoration-color": result["text-decoration-color"],
|
|
@@ -261,47 +249,46 @@ var textDecorationColors = [
|
|
|
261
249
|
}],
|
|
262
250
|
[/^underline-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-line-opacity": handler.bracket.percent(opacity2) })]
|
|
263
251
|
];
|
|
264
|
-
|
|
265
|
-
[/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke")],
|
|
252
|
+
const textStrokeColors = [
|
|
253
|
+
[/^text-stroke-(.+)$/, colorResolver$2("-webkit-text-stroke-color", "text-stroke")],
|
|
266
254
|
[/^text-stroke-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-text-stroke-opacity": handler.bracket.percent(opacity2) })]
|
|
267
255
|
];
|
|
268
|
-
|
|
269
|
-
[/^bg-(.+)$/, colorResolver("background-color", "bg")],
|
|
256
|
+
const bgColors = [
|
|
257
|
+
[/^bg-(.+)$/, colorResolver$2("background-color", "bg")],
|
|
270
258
|
[/^bg-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-bg-opacity": handler.bracket.percent(opacity2) })]
|
|
271
259
|
];
|
|
272
|
-
|
|
273
|
-
[/^(?:border|b)-(.+)$/, colorResolver("border-color", "border")],
|
|
260
|
+
const borderColors = [
|
|
261
|
+
[/^(?:border|b)-(.+)$/, colorResolver$2("border-color", "border")],
|
|
274
262
|
[/^(?:border|b)-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-border-opacity": handler.bracket.percent(opacity2) })]
|
|
275
263
|
];
|
|
276
|
-
|
|
277
|
-
[/^ring-(.+)$/, colorResolver("--un-ring-color", "ring")],
|
|
264
|
+
const ringColors = [
|
|
265
|
+
[/^ring-(.+)$/, colorResolver$2("--un-ring-color", "ring")],
|
|
278
266
|
[/^ring-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-ring-opacity": handler.bracket.percent(opacity2) })]
|
|
279
267
|
];
|
|
280
|
-
|
|
281
|
-
[/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset")],
|
|
268
|
+
const ringOffsetColors = [
|
|
269
|
+
[/^ring-offset-(.+)$/, colorResolver$2("--un-ring-offset-color", "ring-offset")],
|
|
282
270
|
[/^ring-offset-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity2) })]
|
|
283
271
|
];
|
|
284
|
-
|
|
285
|
-
[/^divide-(.+)$/, colorResolver("border-color", "divide")],
|
|
272
|
+
const divideColors = [
|
|
273
|
+
[/^divide-(.+)$/, colorResolver$2("border-color", "divide")],
|
|
286
274
|
[/^divide-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-divide-opacity": handler.bracket.percent(opacity2) })]
|
|
287
275
|
];
|
|
288
|
-
|
|
276
|
+
const fillColors = [
|
|
289
277
|
["fill-none", { fill: "none" }],
|
|
290
|
-
[/^fill-(.+)$/, colorResolver("fill", "fill")],
|
|
278
|
+
[/^fill-(.+)$/, colorResolver$2("fill", "fill")],
|
|
291
279
|
[/^fill-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-fill-opacity": handler.bracket.percent(opacity2) })]
|
|
292
280
|
];
|
|
293
281
|
|
|
294
|
-
|
|
295
|
-
var colorResolver2 = (mode) => ([, body], { theme }) => {
|
|
282
|
+
const colorResolver$1 = (mode) => ([, body], { theme }) => {
|
|
296
283
|
const data = parseColorUtil(body, theme);
|
|
297
284
|
if (!data)
|
|
298
285
|
return;
|
|
299
|
-
const { opacity
|
|
286
|
+
const { opacity, color, rgba } = data;
|
|
300
287
|
if (!color)
|
|
301
288
|
return;
|
|
302
289
|
let colorString = color;
|
|
303
290
|
if (rgba) {
|
|
304
|
-
const a =
|
|
291
|
+
const a = opacity ? opacity[0] === "[" ? handler.bracket.percent(opacity) : parseFloat(opacity) / 100 : rgba[3];
|
|
305
292
|
if (a != null && !Number.isNaN(a)) {
|
|
306
293
|
rgba[3] = typeof a === "string" && !a.includes("%") ? parseFloat(a) : a;
|
|
307
294
|
colorString = `rgba(${rgba.join(",")})`;
|
|
@@ -325,12 +312,12 @@ var colorResolver2 = (mode) => ([, body], { theme }) => {
|
|
|
325
312
|
};
|
|
326
313
|
}
|
|
327
314
|
};
|
|
328
|
-
|
|
315
|
+
const bgAttachments = [
|
|
329
316
|
["bg-fixed", { "background-attachment": "fixed" }],
|
|
330
317
|
["bg-local", { "background-attachment": "local" }],
|
|
331
318
|
["bg-scroll", { "background-attachment": "scroll" }]
|
|
332
319
|
];
|
|
333
|
-
|
|
320
|
+
const bgBlendModes = [
|
|
334
321
|
["bg-blend-normal", { "background-blend-mode": "normal" }],
|
|
335
322
|
["bg-blend-multiply", { "background-blend-mode": "multiply" }],
|
|
336
323
|
["bg-blend-screen", { "background-blend-mode": "screen" }],
|
|
@@ -348,21 +335,21 @@ var bgBlendModes = [
|
|
|
348
335
|
["bg-blend-color", { "background-blend-mode": "color" }],
|
|
349
336
|
["bg-blend-luminosity", { "background-blend-mode": "luminosity" }]
|
|
350
337
|
];
|
|
351
|
-
|
|
338
|
+
const bgClips = [
|
|
352
339
|
["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
|
|
353
340
|
["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
|
|
354
341
|
["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
|
|
355
342
|
["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }]
|
|
356
343
|
];
|
|
357
|
-
|
|
358
|
-
[/^from-(.+)$/,
|
|
359
|
-
[/^to-(.+)$/,
|
|
360
|
-
[/^via-(.+)$/,
|
|
361
|
-
[/^from-op(?:acity)?-?(.+)$/m, ([,
|
|
362
|
-
[/^to-op(?:acity)?-?(.+)$/m, ([,
|
|
363
|
-
[/^via-op(?:acity)?-?(.+)$/m, ([,
|
|
344
|
+
const bgGradients = [
|
|
345
|
+
[/^from-(.+)$/, colorResolver$1("from")],
|
|
346
|
+
[/^to-(.+)$/, colorResolver$1("to")],
|
|
347
|
+
[/^via-(.+)$/, colorResolver$1("via")],
|
|
348
|
+
[/^from-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-from-opacity": handler.bracket.percent(opacity) })],
|
|
349
|
+
[/^to-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-to-opacity": handler.bracket.percent(opacity) })],
|
|
350
|
+
[/^via-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-via-opacity": handler.bracket.percent(opacity) })]
|
|
364
351
|
];
|
|
365
|
-
|
|
352
|
+
const bgImages = [
|
|
366
353
|
["bg-none", { "background-image": "none" }],
|
|
367
354
|
["bg-gradient-to-t", {
|
|
368
355
|
"background-image": "linear-gradient(to top, var(--un-gradient-stops))"
|
|
@@ -389,12 +376,12 @@ var bgImages = [
|
|
|
389
376
|
"background-image": "linear-gradient(to top left, var(--un-gradient-stops))"
|
|
390
377
|
}]
|
|
391
378
|
];
|
|
392
|
-
|
|
379
|
+
const bgOrigins = [
|
|
393
380
|
["bg-origin-border", { "background-origin": "border-box" }],
|
|
394
381
|
["bg-origin-padding", { "background-origin": "padding-box" }],
|
|
395
382
|
["bg-origin-content", { "background-origin": "content-box" }]
|
|
396
383
|
];
|
|
397
|
-
|
|
384
|
+
const bgPositions = [
|
|
398
385
|
["bg-bottom", { "background-position": "bottom" }],
|
|
399
386
|
["bg-center", { "background-position": "center" }],
|
|
400
387
|
["bg-left", { "background-position": "left" }],
|
|
@@ -405,7 +392,7 @@ var bgPositions = [
|
|
|
405
392
|
["bg-right-top", { "background-position": "right top" }],
|
|
406
393
|
["bg-top", { "background-position": "top" }]
|
|
407
394
|
];
|
|
408
|
-
|
|
395
|
+
const bgRepeats = [
|
|
409
396
|
["bg-repeat", { "background-repeat": "repeat" }],
|
|
410
397
|
["bg-no-repeat", { "background-repeat": "no-repeat" }],
|
|
411
398
|
["bg-repeat-x", { "background-position": "repeat-x" }],
|
|
@@ -413,16 +400,15 @@ var bgRepeats = [
|
|
|
413
400
|
["bg-repeat-round", { "background-position": "round" }],
|
|
414
401
|
["bg-repeat-space", { "background-position": "space" }]
|
|
415
402
|
];
|
|
416
|
-
|
|
403
|
+
const bgSizes = [
|
|
417
404
|
["bg-auto", { "background-size": "auto" }],
|
|
418
405
|
["bg-cover", { "background-repeat": "cover" }],
|
|
419
406
|
["bg-contain", { "background-position": "contain" }]
|
|
420
407
|
];
|
|
421
408
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
var parseOutlineSize = (s) => {
|
|
409
|
+
const outlineStyle = ["none", "auto", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"];
|
|
410
|
+
const listStyleProps = ["none", "disc", "circle", "square", "decimal", "zero-decimal", "greek", "roman", "upper-roman", "alpha", "upper-alpha"];
|
|
411
|
+
const parseOutlineSize = (s) => {
|
|
426
412
|
const propName = ["width", "offset"].find((item) => s.startsWith(item)) || "width";
|
|
427
413
|
const size = handler.bracket.fraction.rem(s.replace(/^(offset\-|width\-)/, ""));
|
|
428
414
|
if (size) {
|
|
@@ -431,7 +417,7 @@ var parseOutlineSize = (s) => {
|
|
|
431
417
|
};
|
|
432
418
|
}
|
|
433
419
|
};
|
|
434
|
-
|
|
420
|
+
const outline = [
|
|
435
421
|
["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }],
|
|
436
422
|
["outline", { "outline-style": "solid" }],
|
|
437
423
|
[
|
|
@@ -452,7 +438,7 @@ var outline = [
|
|
|
452
438
|
const sizeSheet = parseOutlineSize(d);
|
|
453
439
|
if (sizeSheet)
|
|
454
440
|
return sizeSheet;
|
|
455
|
-
const colorSheet = colorResolver("outline-color", "outline-color")([
|
|
441
|
+
const colorSheet = colorResolver$2("outline-color", "outline-color")([
|
|
456
442
|
match[0],
|
|
457
443
|
match[1].replace(/^color-/, "")
|
|
458
444
|
], config);
|
|
@@ -461,11 +447,10 @@ var outline = [
|
|
|
461
447
|
}
|
|
462
448
|
]
|
|
463
449
|
];
|
|
464
|
-
|
|
450
|
+
const listStyle = [
|
|
465
451
|
[new RegExp(`^list-((${listStyleProps.join("|")})(?:(-outside|-inside))?)$`), ([, value]) => {
|
|
466
|
-
var _a;
|
|
467
452
|
const style = value.split(/-outside|-inside/)[0];
|
|
468
|
-
const position =
|
|
453
|
+
const position = /inside|outside/.exec(value) ?? [];
|
|
469
454
|
if (position.length) {
|
|
470
455
|
return {
|
|
471
456
|
"list-style-position": `${position[0]}`,
|
|
@@ -482,17 +467,17 @@ var listStyle = [
|
|
|
482
467
|
};
|
|
483
468
|
}]
|
|
484
469
|
];
|
|
485
|
-
|
|
470
|
+
const boxDecorationBreaks = [
|
|
486
471
|
["decoration-slice", { "box-decoration-break": "slice" }],
|
|
487
472
|
["decoration-clone", { "box-decoration-break": "clone" }]
|
|
488
473
|
];
|
|
489
|
-
|
|
474
|
+
const caretOpacity = [
|
|
490
475
|
[/^caret-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-caret-opacity": handler.bracket.percent(d) })]
|
|
491
476
|
];
|
|
492
|
-
|
|
493
|
-
[/^caret-(.+)$/, colorResolver("caret-color", "caret")]
|
|
477
|
+
const caretColors = [
|
|
478
|
+
[/^caret-(.+)$/, colorResolver$2("caret-color", "caret")]
|
|
494
479
|
];
|
|
495
|
-
|
|
480
|
+
const imageRenderings = [
|
|
496
481
|
["image-render-auto", { "image-rendering": "auto" }],
|
|
497
482
|
["image-render-edge", { "image-rendering": "crisp-edges" }],
|
|
498
483
|
["image-render-pixel", [
|
|
@@ -503,13 +488,13 @@ var imageRenderings = [
|
|
|
503
488
|
["image-rendering", "pixelated"]
|
|
504
489
|
]]
|
|
505
490
|
];
|
|
506
|
-
|
|
491
|
+
const appearance = [
|
|
507
492
|
["appearance-none", {
|
|
508
493
|
"appearance": "none",
|
|
509
494
|
"-webkit-appearance": "none"
|
|
510
495
|
}]
|
|
511
496
|
];
|
|
512
|
-
|
|
497
|
+
const placeholder = [
|
|
513
498
|
[
|
|
514
499
|
/^placeholder-opacity-(\d+)$/,
|
|
515
500
|
([, d]) => ({
|
|
@@ -520,11 +505,11 @@ var placeholder = [
|
|
|
520
505
|
/^placeholder-(?!opacity)(.+)$/,
|
|
521
506
|
(match, config) => {
|
|
522
507
|
match[1] = match[1].replace(/^color-/, "");
|
|
523
|
-
return colorResolver("placeholder-color", "placeholder-color")(match, config);
|
|
508
|
+
return colorResolver$2("placeholder-color", "placeholder-color")(match, config);
|
|
524
509
|
}
|
|
525
510
|
]
|
|
526
511
|
];
|
|
527
|
-
|
|
512
|
+
const overflowValues$1 = [
|
|
528
513
|
"none",
|
|
529
514
|
"auto",
|
|
530
515
|
"hidden",
|
|
@@ -532,30 +517,29 @@ var overflowValues = [
|
|
|
532
517
|
"scroll",
|
|
533
518
|
"contain"
|
|
534
519
|
];
|
|
535
|
-
|
|
536
|
-
[/^overscroll-(.+)$/, ([, v]) => overflowValues.includes(v) ? { "overscroll-behavior": v } : void 0],
|
|
537
|
-
[/^overscroll-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overscroll-behavior-${d}`]: v } : void 0]
|
|
520
|
+
const overscrolls = [
|
|
521
|
+
[/^overscroll-(.+)$/, ([, v]) => overflowValues$1.includes(v) ? { "overscroll-behavior": v } : void 0],
|
|
522
|
+
[/^overscroll-([xy])-(.+)$/, ([, d, v]) => overflowValues$1.includes(v) ? { [`overscroll-behavior-${d}`]: v } : void 0]
|
|
538
523
|
];
|
|
539
524
|
|
|
540
|
-
|
|
541
|
-
var borderSizes = [
|
|
525
|
+
const borderSizes = [
|
|
542
526
|
[/^border$/, handlerBorder],
|
|
543
527
|
[/^(?:border|b)(?:-([^-]+))?$/, handlerBorder],
|
|
544
528
|
[/^(?:border|b)(?:-([^-]+))?(?:-([^-]+))?$/, handlerBorder]
|
|
545
529
|
];
|
|
546
|
-
|
|
530
|
+
const borderRadius = [
|
|
547
531
|
[/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
|
|
548
532
|
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?$/, handlerRounded],
|
|
549
533
|
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-([^-]+))?$/, handlerRounded]
|
|
550
534
|
];
|
|
551
|
-
|
|
535
|
+
const borderStyles = [
|
|
552
536
|
["border-solid", { "border-style": "solid" }],
|
|
553
537
|
["border-dashed", { "border-style": "dashed" }],
|
|
554
538
|
["border-dotted", { "border-style": "dotted" }],
|
|
555
539
|
["border-double", { "border-style": "double" }],
|
|
556
540
|
["border-none", { "border-style": "none" }]
|
|
557
541
|
];
|
|
558
|
-
|
|
542
|
+
const borders = [
|
|
559
543
|
borderSizes,
|
|
560
544
|
borderColors,
|
|
561
545
|
borderStyles,
|
|
@@ -572,26 +556,22 @@ function handlerBorder([, a, b]) {
|
|
|
572
556
|
}
|
|
573
557
|
}
|
|
574
558
|
function handlerRounded([, a, b], { theme }) {
|
|
575
|
-
var _a;
|
|
576
559
|
const [d, s = "DEFAULT"] = cornerMap[a] ? [a, b] : ["", a];
|
|
577
|
-
const v =
|
|
560
|
+
const v = theme.borderRadius?.[s] || handler.bracket.fraction.rem(s);
|
|
578
561
|
if (v != null)
|
|
579
562
|
return cornerMap[d].map((i) => [`border${i}-radius`, v]);
|
|
580
563
|
}
|
|
581
564
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
var queryMatcher = /@media \(min-width: (.+)\)/;
|
|
585
|
-
var container = [
|
|
565
|
+
const queryMatcher = /@media \(min-width: (.+)\)/;
|
|
566
|
+
const container = [
|
|
586
567
|
[
|
|
587
568
|
/^__container$/,
|
|
588
569
|
(m, { variantHandlers }) => {
|
|
589
|
-
var _a;
|
|
590
570
|
let width = "100%";
|
|
591
571
|
for (const v of variantHandlers) {
|
|
592
572
|
const query = toArray(v.parent || [])[0];
|
|
593
573
|
if (typeof query === "string") {
|
|
594
|
-
const match =
|
|
574
|
+
const match = query.match(queryMatcher)?.[1];
|
|
595
575
|
if (match)
|
|
596
576
|
width = match;
|
|
597
577
|
}
|
|
@@ -601,7 +581,7 @@ var container = [
|
|
|
601
581
|
{ internal: true }
|
|
602
582
|
]
|
|
603
583
|
];
|
|
604
|
-
|
|
584
|
+
const containerShortcuts = [
|
|
605
585
|
[/^(?:(\w+)[:-])?container$/, ([, bp], { theme }) => {
|
|
606
586
|
let points = Object.keys(theme.breakpoints || {});
|
|
607
587
|
if (bp) {
|
|
@@ -616,8 +596,7 @@ var containerShortcuts = [
|
|
|
616
596
|
}]
|
|
617
597
|
];
|
|
618
598
|
|
|
619
|
-
|
|
620
|
-
var transitionBasicProps = [
|
|
599
|
+
const transitionBasicProps = [
|
|
621
600
|
"color",
|
|
622
601
|
"border-color",
|
|
623
602
|
"background-color",
|
|
@@ -636,7 +615,7 @@ var transitionBasicProps = [
|
|
|
636
615
|
"transform",
|
|
637
616
|
"box-shadow"
|
|
638
617
|
];
|
|
639
|
-
|
|
618
|
+
const transitionPositionProps = [
|
|
640
619
|
"backround-position",
|
|
641
620
|
"left",
|
|
642
621
|
"right",
|
|
@@ -644,7 +623,7 @@ var transitionPositionProps = [
|
|
|
644
623
|
"bottom",
|
|
645
624
|
"object-position"
|
|
646
625
|
];
|
|
647
|
-
|
|
626
|
+
const transitionSizeProps = [
|
|
648
627
|
"max-height",
|
|
649
628
|
"min-height",
|
|
650
629
|
"max-width",
|
|
@@ -664,21 +643,21 @@ var transitionSizeProps = [
|
|
|
664
643
|
"letter-spacing",
|
|
665
644
|
"word-spacing"
|
|
666
645
|
];
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
646
|
+
const transitionSwitchProps = ["all", "none"];
|
|
647
|
+
const transitionEnhanceProps = ["stroke", "filter", "backdrop-filter", "fill", "mask", "mask-size", "mask-border", "clip-path", "clip"];
|
|
648
|
+
const transitionProps = [
|
|
670
649
|
...transitionBasicProps,
|
|
671
650
|
...transitionPositionProps,
|
|
672
651
|
...transitionSizeProps,
|
|
673
652
|
...transitionEnhanceProps
|
|
674
653
|
];
|
|
675
|
-
|
|
676
|
-
|
|
654
|
+
const transitionPropsStr = transitionProps.join(", ");
|
|
655
|
+
const validateProperty = (prop) => {
|
|
677
656
|
if (prop && ![...transitionProps, ...transitionSwitchProps].includes(prop))
|
|
678
657
|
return;
|
|
679
658
|
return prop || transitionPropsStr;
|
|
680
659
|
};
|
|
681
|
-
|
|
660
|
+
const transitions = [
|
|
682
661
|
[/^transition(?:-([a-z-]+))?(?:-(\d+))?$/, ([, prop, duration = "150"]) => {
|
|
683
662
|
const transitionProperty = validateProperty(prop);
|
|
684
663
|
if (!transitionProperty)
|
|
@@ -707,42 +686,40 @@ var transitions = [
|
|
|
707
686
|
}]
|
|
708
687
|
];
|
|
709
688
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
"--un-
|
|
716
|
-
"--un-
|
|
717
|
-
"--un-
|
|
718
|
-
"--un-
|
|
719
|
-
"--un-
|
|
720
|
-
"--un-
|
|
721
|
-
"--un-
|
|
722
|
-
"--un-sepia": varEmpty,
|
|
723
|
-
"--un-drop-shadow": varEmpty,
|
|
689
|
+
const varEmpty$1 = "var(--un-empty,/*!*/ /*!*/)";
|
|
690
|
+
const filterContnet = "var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia) var(--un-drop-shadow)";
|
|
691
|
+
const filterBase = {
|
|
692
|
+
"--un-blur": varEmpty$1,
|
|
693
|
+
"--un-brightness": varEmpty$1,
|
|
694
|
+
"--un-contrast": varEmpty$1,
|
|
695
|
+
"--un-grayscale": varEmpty$1,
|
|
696
|
+
"--un-hue-rotate": varEmpty$1,
|
|
697
|
+
"--un-invert": varEmpty$1,
|
|
698
|
+
"--un-saturate": varEmpty$1,
|
|
699
|
+
"--un-sepia": varEmpty$1,
|
|
700
|
+
"--un-drop-shadow": varEmpty$1,
|
|
724
701
|
"filter": filterContnet,
|
|
725
702
|
[CONTROL_BYPASS_PSEUDO]: ""
|
|
726
703
|
};
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
"--un-backdrop-blur": varEmpty,
|
|
730
|
-
"--un-backdrop-brightness": varEmpty,
|
|
731
|
-
"--un-backdrop-contrast": varEmpty,
|
|
732
|
-
"--un-backdrop-grayscale": varEmpty,
|
|
733
|
-
"--un-backdrop-hue-rotate": varEmpty,
|
|
734
|
-
"--un-backdrop-invert": varEmpty,
|
|
735
|
-
"--un-backdrop-saturate": varEmpty,
|
|
736
|
-
"--un-backdrop-sepia": varEmpty,
|
|
704
|
+
const backdropFilterContent = "var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-saturate) var(--un-backdrop-sepia)";
|
|
705
|
+
const backdropFilterBase = {
|
|
706
|
+
"--un-backdrop-blur": varEmpty$1,
|
|
707
|
+
"--un-backdrop-brightness": varEmpty$1,
|
|
708
|
+
"--un-backdrop-contrast": varEmpty$1,
|
|
709
|
+
"--un-backdrop-grayscale": varEmpty$1,
|
|
710
|
+
"--un-backdrop-hue-rotate": varEmpty$1,
|
|
711
|
+
"--un-backdrop-invert": varEmpty$1,
|
|
712
|
+
"--un-backdrop-saturate": varEmpty$1,
|
|
713
|
+
"--un-backdrop-sepia": varEmpty$1,
|
|
737
714
|
"-webkit-backdrop-filter": backdropFilterContent,
|
|
738
715
|
"backdrop-filter": backdropFilterContent,
|
|
739
716
|
[CONTROL_BYPASS_PSEUDO]: ""
|
|
740
717
|
};
|
|
741
|
-
|
|
718
|
+
const percentWithDefault = (defaultValue = "1") => (str) => {
|
|
742
719
|
const v = str ? handler.bracket.percent(str) : defaultValue;
|
|
743
720
|
return v && parseFloat(v) <= 1 ? v : void 0;
|
|
744
721
|
};
|
|
745
|
-
|
|
722
|
+
const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
|
|
746
723
|
const value = resolver(s, theme);
|
|
747
724
|
if (value) {
|
|
748
725
|
return [
|
|
@@ -751,7 +728,7 @@ var toFilter = (varName, resolver) => ([, b, s], { theme }) => {
|
|
|
751
728
|
];
|
|
752
729
|
}
|
|
753
730
|
};
|
|
754
|
-
|
|
731
|
+
const filters = [
|
|
755
732
|
["filter", filterBase],
|
|
756
733
|
["filter-none", { filter: "none" }],
|
|
757
734
|
["backdrop-filter", backdropFilterBase],
|
|
@@ -759,17 +736,13 @@ var filters = [
|
|
|
759
736
|
"-webkit-backdrop-filter": "none",
|
|
760
737
|
"backdrop-filter": "none"
|
|
761
738
|
}],
|
|
762
|
-
[/^(backdrop-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) =>
|
|
763
|
-
var _a;
|
|
764
|
-
return ((_a = theme.blur) == null ? void 0 : _a[s || "DEFAULT"]) || handler.bracket.px(s);
|
|
765
|
-
})],
|
|
739
|
+
[/^(backdrop-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || handler.bracket.px(s))],
|
|
766
740
|
[/^(backdrop-)?brightness-(\d+)$/, toFilter("brightness", (s) => handler.bracket.percent(s))],
|
|
767
741
|
[/^(backdrop-)?contrast-(\d+)$/, toFilter("contrast", (s) => handler.bracket.percent(s))],
|
|
768
742
|
[/^()?drop-shadow(?:-(.+))?$/, toFilter("drop-shadow", (s, theme) => {
|
|
769
|
-
|
|
770
|
-
const v = handler.bracket(s) || ((_a = theme.dropShadow) == null ? void 0 : _a[s || "DEFAULT"]);
|
|
743
|
+
const v = handler.bracket(s) || theme.dropShadow?.[s || "DEFAULT"];
|
|
771
744
|
if (v)
|
|
772
|
-
return
|
|
745
|
+
return toArray(v).map((v2) => `drop-shadow(${v2})`).join(" ");
|
|
773
746
|
})],
|
|
774
747
|
[/^(backdrop-)?grayscale(?:-(\d+))?$/, toFilter("grayscale", percentWithDefault())],
|
|
775
748
|
[/^(backdrop-)?hue-rotate-(\d+)$/, toFilter("hue-rotate", (s) => `${handler.bracket.number(s)}deg`)],
|
|
@@ -778,8 +751,7 @@ var filters = [
|
|
|
778
751
|
[/^(backdrop-)?sepia(?:-(\d+))?$/, toFilter("sepia", percentWithDefault())]
|
|
779
752
|
];
|
|
780
753
|
|
|
781
|
-
|
|
782
|
-
var flex = [
|
|
754
|
+
const flex = [
|
|
783
755
|
["flex-col", { "flex-direction": "column" }],
|
|
784
756
|
["flex-col-reverse", { "flex-direction": "column-reverse" }],
|
|
785
757
|
["flex-row", { "flex-direction": "row" }],
|
|
@@ -801,12 +773,8 @@ var flex = [
|
|
|
801
773
|
["flex-inline", { display: "inline-flex" }]
|
|
802
774
|
];
|
|
803
775
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
// src/rules/static.ts
|
|
808
|
-
var varEmpty2 = "var(--un-empty,/*!*/ /*!*/)";
|
|
809
|
-
var displays = [
|
|
776
|
+
const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
|
|
777
|
+
const displays = [
|
|
810
778
|
["inline", { display: "inline" }],
|
|
811
779
|
["block", { display: "block" }],
|
|
812
780
|
["inline-block", { display: "inline-block" }],
|
|
@@ -815,45 +783,45 @@ var displays = [
|
|
|
815
783
|
["list-item", { display: "list-item" }],
|
|
816
784
|
["hidden", { display: "none" }]
|
|
817
785
|
];
|
|
818
|
-
|
|
786
|
+
const appearances = [
|
|
819
787
|
["visible", { visibility: "visible" }],
|
|
820
788
|
["invisible", { visibility: "hidden" }],
|
|
821
789
|
["backface-visible", { "backface-visibility": "visible" }],
|
|
822
790
|
["backface-hidden", { "backface-visibility": "hidden" }]
|
|
823
791
|
];
|
|
824
|
-
|
|
792
|
+
const cursors = [
|
|
825
793
|
[/^cursor-(.+)$/, ([, c]) => ({ cursor: c })]
|
|
826
794
|
];
|
|
827
|
-
|
|
795
|
+
const pointerEvents = [
|
|
828
796
|
["pointer-events-none", { "pointer-events": "none" }],
|
|
829
797
|
["pointer-events-auto", { "pointer-events": "auto" }]
|
|
830
798
|
];
|
|
831
|
-
|
|
799
|
+
const resizes = [
|
|
832
800
|
["resize-none", { resize: "none" }],
|
|
833
801
|
["resize-x", { resize: "horizontal" }],
|
|
834
802
|
["resize-y", { resize: "vertical" }],
|
|
835
803
|
["resize", { resize: "both" }]
|
|
836
804
|
];
|
|
837
|
-
|
|
805
|
+
const userSelects = [
|
|
838
806
|
[/^select-(none|text|all|auto)$/, ([, v]) => ({ "user-select": v })]
|
|
839
807
|
];
|
|
840
|
-
|
|
808
|
+
const whitespaces = [
|
|
841
809
|
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v })]
|
|
842
810
|
];
|
|
843
|
-
|
|
811
|
+
const contents = [
|
|
844
812
|
["content-empty", { content: '""' }]
|
|
845
813
|
];
|
|
846
|
-
|
|
814
|
+
const breaks = [
|
|
847
815
|
["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
|
|
848
816
|
["break-word", { "overflow-wrap": "break-word" }],
|
|
849
817
|
["break-all", { "word-break": "break-all" }]
|
|
850
818
|
];
|
|
851
|
-
|
|
819
|
+
const textOverflows = [
|
|
852
820
|
["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
|
|
853
821
|
["text-ellipsis", { "text-overflow": "ellipsis" }],
|
|
854
822
|
["text-clip", { "text-overflow": "clip" }]
|
|
855
823
|
];
|
|
856
|
-
|
|
824
|
+
const textTransforms = [
|
|
857
825
|
["case-upper", { "text-transform": "uppercase" }],
|
|
858
826
|
["case-lower", { "text-transform": "lowercase" }],
|
|
859
827
|
["case-capital", { "text-transform": "capitalize" }],
|
|
@@ -863,22 +831,22 @@ var textTransforms = [
|
|
|
863
831
|
["capitalize", { "text-transform": "capitalize" }],
|
|
864
832
|
["normal-case", { "text-transform": "none" }]
|
|
865
833
|
];
|
|
866
|
-
|
|
834
|
+
const textDecorations = [
|
|
867
835
|
["underline", { "text-decoration": "underline" }],
|
|
868
836
|
["line-through", { "text-decoration": "line-through" }],
|
|
869
837
|
["no-underline", { "text-decoration": "none" }]
|
|
870
838
|
];
|
|
871
|
-
|
|
839
|
+
const textDecorationStyles = [
|
|
872
840
|
["underline-solid", { "text-decoration-style": "solid" }],
|
|
873
841
|
["underline-double", { "text-decoration-style": "double" }],
|
|
874
842
|
["underline-dotted", { "text-decoration-style": "dotted" }],
|
|
875
843
|
["underline-dashed", { "text-decoration-style": "dashed" }]
|
|
876
844
|
];
|
|
877
|
-
|
|
845
|
+
const fontStyles = [
|
|
878
846
|
["italic", { "font-style": "italic" }],
|
|
879
847
|
["not-italic", { "font-style": "normal" }]
|
|
880
848
|
];
|
|
881
|
-
|
|
849
|
+
const fontSmoothings = [
|
|
882
850
|
["antialiased", {
|
|
883
851
|
"-webkit-font-smoothing": "antialiased",
|
|
884
852
|
"-moz-osx-font-smoothing": "grayscale",
|
|
@@ -890,7 +858,7 @@ var fontSmoothings = [
|
|
|
890
858
|
"font-smoothing": "auto"
|
|
891
859
|
}]
|
|
892
860
|
];
|
|
893
|
-
|
|
861
|
+
const hyphens = [
|
|
894
862
|
["hyphens-none", {
|
|
895
863
|
"-webkit-hyphens": "none",
|
|
896
864
|
"-ms-hyphens": "none",
|
|
@@ -907,17 +875,17 @@ var hyphens = [
|
|
|
907
875
|
"hyphens": "auto"
|
|
908
876
|
}]
|
|
909
877
|
];
|
|
910
|
-
|
|
878
|
+
const writingModes = [
|
|
911
879
|
["write-normal", { "writing-mode": "horizontal-tb" }],
|
|
912
880
|
["write-vertical-right", { "writing-mode": "vertical-rl" }],
|
|
913
881
|
["write-vertical-left", { "writing-mode": "vertical-lr" }]
|
|
914
882
|
];
|
|
915
|
-
|
|
883
|
+
const writingOrientations = [
|
|
916
884
|
["write-orient-mixed", { "text-orientation": "mixed" }],
|
|
917
885
|
["write-orient-upright", { "text-orientation": "upright" }],
|
|
918
886
|
["write-orient-sideways", { "text-orientation": "sideways" }]
|
|
919
887
|
];
|
|
920
|
-
|
|
888
|
+
const screenReadersAccess = [
|
|
921
889
|
[
|
|
922
890
|
"sr-only",
|
|
923
891
|
{
|
|
@@ -946,16 +914,14 @@ var screenReadersAccess = [
|
|
|
946
914
|
}
|
|
947
915
|
]
|
|
948
916
|
];
|
|
949
|
-
|
|
917
|
+
const isolations = [
|
|
950
918
|
["isolate", { isolation: "isolate" }],
|
|
951
919
|
["isolate-auto", { isolation: "auto" }]
|
|
952
920
|
];
|
|
953
921
|
|
|
954
|
-
|
|
955
|
-
var fontsFamilies = [
|
|
922
|
+
const fontsFamilies = [
|
|
956
923
|
[/^font-(\w+)$/, ([, d], { theme }) => {
|
|
957
|
-
|
|
958
|
-
const font = (_a = theme.fontFamily) == null ? void 0 : _a[d];
|
|
924
|
+
const font = theme.fontFamily?.[d];
|
|
959
925
|
if (font) {
|
|
960
926
|
return {
|
|
961
927
|
"font-family": font
|
|
@@ -963,7 +929,7 @@ var fontsFamilies = [
|
|
|
963
929
|
}
|
|
964
930
|
}]
|
|
965
931
|
];
|
|
966
|
-
|
|
932
|
+
const weightMap = {
|
|
967
933
|
thin: "100",
|
|
968
934
|
extralight: "200",
|
|
969
935
|
light: "300",
|
|
@@ -974,11 +940,10 @@ var weightMap = {
|
|
|
974
940
|
extrabold: "800",
|
|
975
941
|
black: "900"
|
|
976
942
|
};
|
|
977
|
-
|
|
943
|
+
const fontSizes = [
|
|
978
944
|
[/^text-([^-]+)$/, ([, s = "base"], { theme }) => {
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
if (result == null ? void 0 : result[0]) {
|
|
945
|
+
const result = toArray(theme.fontSize?.[s] || handler.bracket.rem(s));
|
|
946
|
+
if (result?.[0]) {
|
|
982
947
|
const [size, height = "1"] = result;
|
|
983
948
|
return {
|
|
984
949
|
"font-size": size,
|
|
@@ -987,38 +952,35 @@ var fontSizes = [
|
|
|
987
952
|
}
|
|
988
953
|
}]
|
|
989
954
|
];
|
|
990
|
-
|
|
955
|
+
const fontWeights = [
|
|
991
956
|
[/^(?:font|fw)-?([^-]+)$/, ([, s]) => {
|
|
992
957
|
const v = weightMap[s] || handler.number(s);
|
|
993
958
|
if (v)
|
|
994
959
|
return { "font-weight": v };
|
|
995
960
|
}]
|
|
996
961
|
];
|
|
997
|
-
|
|
962
|
+
const leadings = [
|
|
998
963
|
[/^(?:leading|lh)-([^-]+)$/, ([, s], { theme }) => {
|
|
999
|
-
|
|
1000
|
-
const v = ((_a = theme.lineHeight) == null ? void 0 : _a[s]) || handler.bracket.rem(s);
|
|
964
|
+
const v = theme.lineHeight?.[s] || handler.bracket.rem(s);
|
|
1001
965
|
if (v !== null)
|
|
1002
966
|
return { "line-height": v };
|
|
1003
967
|
}]
|
|
1004
968
|
];
|
|
1005
|
-
|
|
969
|
+
const trackings = [
|
|
1006
970
|
[/^tracking-([^-]+)$/, ([, s], { theme }) => {
|
|
1007
|
-
|
|
1008
|
-
const v = ((_a = theme.letterSpacing) == null ? void 0 : _a[s]) || handler.bracket.rem(s);
|
|
971
|
+
const v = theme.letterSpacing?.[s] || handler.bracket.rem(s);
|
|
1009
972
|
if (v !== null)
|
|
1010
973
|
return { "letter-spacing": v };
|
|
1011
974
|
}]
|
|
1012
975
|
];
|
|
1013
|
-
|
|
976
|
+
const wordSpacings = [
|
|
1014
977
|
[/^word-spacing-([^-]+)$/, ([, s], { theme }) => {
|
|
1015
|
-
|
|
1016
|
-
const v = ((_a = theme.wordSpacing) == null ? void 0 : _a[s]) || handler.bracket.rem(s);
|
|
978
|
+
const v = theme.wordSpacing?.[s] || handler.bracket.rem(s);
|
|
1017
979
|
if (v !== null)
|
|
1018
980
|
return { "word-spacing": v };
|
|
1019
981
|
}]
|
|
1020
982
|
];
|
|
1021
|
-
|
|
983
|
+
const tabSizes = [
|
|
1022
984
|
[/^tab-?([^-]*)$/, ([, s]) => {
|
|
1023
985
|
s = s || "4";
|
|
1024
986
|
const v = handler.bracket.global.number(s);
|
|
@@ -1031,54 +993,51 @@ var tabSizes = [
|
|
|
1031
993
|
}
|
|
1032
994
|
}]
|
|
1033
995
|
];
|
|
1034
|
-
|
|
996
|
+
const textDecorationLengths = [
|
|
1035
997
|
[/^underline-([^-]+)$/, ([, s]) => {
|
|
1036
998
|
const v = s === "auto" ? s : handler.bracket.px(s);
|
|
1037
999
|
if (v != null)
|
|
1038
1000
|
return { "text-decoration-thickness": v };
|
|
1039
1001
|
}]
|
|
1040
1002
|
];
|
|
1041
|
-
|
|
1003
|
+
const textDecorationOffsets = [
|
|
1042
1004
|
[/^underline-offset-([^-]+)$/, ([, s]) => {
|
|
1043
1005
|
const v = s === "auto" ? s : handler.bracket.px(s);
|
|
1044
1006
|
if (v != null)
|
|
1045
1007
|
return { "text-underline-offset": v };
|
|
1046
1008
|
}]
|
|
1047
1009
|
];
|
|
1048
|
-
|
|
1010
|
+
const textIndents = [
|
|
1049
1011
|
[/^indent(?:-(.+))?$/, ([, s], { theme }) => {
|
|
1050
|
-
|
|
1051
|
-
const v = ((_a = theme.textIndent) == null ? void 0 : _a[s || "DEFAULT"]) || handler.bracket.cssvar.fraction.rem(s);
|
|
1012
|
+
const v = theme.textIndent?.[s || "DEFAULT"] || handler.bracket.cssvar.fraction.rem(s);
|
|
1052
1013
|
if (v != null)
|
|
1053
1014
|
return { "text-indent": v };
|
|
1054
1015
|
}]
|
|
1055
1016
|
];
|
|
1056
|
-
|
|
1017
|
+
const textStrokeWidths = [
|
|
1057
1018
|
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => {
|
|
1058
|
-
|
|
1059
|
-
const v = ((_a = theme.textStrokeWidth) == null ? void 0 : _a[s || "DEFAULT"]) || handler.bracket.cssvar.px(s);
|
|
1019
|
+
const v = theme.textStrokeWidth?.[s || "DEFAULT"] || handler.bracket.cssvar.px(s);
|
|
1060
1020
|
if (v != null)
|
|
1061
1021
|
return { "-webkit-text-stroke-width": v };
|
|
1062
1022
|
}]
|
|
1063
1023
|
];
|
|
1064
|
-
|
|
1024
|
+
const textShadows = [
|
|
1065
1025
|
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
1066
|
-
|
|
1067
|
-
const v = ((_a = theme.textShadow) == null ? void 0 : _a[s || "DEFAULT"]) || handler.bracket.cssvar(s);
|
|
1026
|
+
const v = theme.textShadow?.[s || "DEFAULT"] || handler.bracket.cssvar(s);
|
|
1068
1027
|
if (v != null)
|
|
1069
1028
|
return { "text-shadow": v };
|
|
1070
1029
|
}]
|
|
1071
1030
|
];
|
|
1072
|
-
|
|
1073
|
-
"--un-ordinal":
|
|
1074
|
-
"--un-slashed-zero":
|
|
1075
|
-
"--un-numeric-figure":
|
|
1076
|
-
"--un-numeric-spacing":
|
|
1077
|
-
"--un-numeric-fraction":
|
|
1031
|
+
const fontVariantNumericBase = {
|
|
1032
|
+
"--un-ordinal": varEmpty,
|
|
1033
|
+
"--un-slashed-zero": varEmpty,
|
|
1034
|
+
"--un-numeric-figure": varEmpty,
|
|
1035
|
+
"--un-numeric-spacing": varEmpty,
|
|
1036
|
+
"--un-numeric-fraction": varEmpty,
|
|
1078
1037
|
"font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)",
|
|
1079
1038
|
[CONTROL_BYPASS_PSEUDO]: ""
|
|
1080
1039
|
};
|
|
1081
|
-
|
|
1040
|
+
const fontVariantNumeric = [
|
|
1082
1041
|
[/^ordinal$/, () => [fontVariantNumericBase, { "--un-ordinal": "ordinal" }]],
|
|
1083
1042
|
[/^slashed-zero$/, () => [fontVariantNumericBase, { "--un-slashed-zero": "slashed-zero" }]],
|
|
1084
1043
|
[/^lining-nums$/, () => [fontVariantNumericBase, { "--un-numeric-figure": "lining-nums" }]],
|
|
@@ -1089,14 +1048,13 @@ var fontVariantNumeric = [
|
|
|
1089
1048
|
[/^stacked-fractions$/, () => [fontVariantNumericBase, { "--un-numeric-fraction": "stacked-fractions" }]],
|
|
1090
1049
|
["normal-nums", { "font-variant-numeric": "normal" }]
|
|
1091
1050
|
];
|
|
1092
|
-
|
|
1051
|
+
const fonts = [
|
|
1093
1052
|
fontsFamilies,
|
|
1094
1053
|
fontSizes,
|
|
1095
1054
|
fontWeights
|
|
1096
1055
|
].flat(1);
|
|
1097
1056
|
|
|
1098
|
-
|
|
1099
|
-
var gaps = [
|
|
1057
|
+
const gaps = [
|
|
1100
1058
|
[/^(?:flex-|grid-)?gap-([^-]+)$/, ([, s]) => {
|
|
1101
1059
|
const v = handler.bracket.rem(s);
|
|
1102
1060
|
if (v != null) {
|
|
@@ -1126,13 +1084,8 @@ var gaps = [
|
|
|
1126
1084
|
}]
|
|
1127
1085
|
];
|
|
1128
1086
|
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
var calSize = (s, theme) => {
|
|
1132
|
-
var _a;
|
|
1133
|
-
return toArray4(((_a = theme.fontSize) == null ? void 0 : _a[s]) || handler.bracket.rem(s))[0];
|
|
1134
|
-
};
|
|
1135
|
-
var autoDirection = (selector, theme) => {
|
|
1087
|
+
const calSize = (s, theme) => toArray(theme.fontSize?.[s] || handler.bracket.rem(s))[0];
|
|
1088
|
+
const autoDirection = (selector, theme) => {
|
|
1136
1089
|
if (selector === "min")
|
|
1137
1090
|
return "min-content";
|
|
1138
1091
|
else if (selector === "max")
|
|
@@ -1141,7 +1094,7 @@ var autoDirection = (selector, theme) => {
|
|
|
1141
1094
|
return "minmax(0,1fr)";
|
|
1142
1095
|
return calSize(selector, theme);
|
|
1143
1096
|
};
|
|
1144
|
-
|
|
1097
|
+
const grids = [
|
|
1145
1098
|
["grid", { display: "grid" }],
|
|
1146
1099
|
["inline-grid", { display: "inline-grid" }],
|
|
1147
1100
|
[/^grid-cols-minmax-([\w.-]+)$/, ([, d]) => ({ "grid-template-columns": `repeat(auto-fill, minmax(${d}, 1fr))` })],
|
|
@@ -1151,7 +1104,6 @@ var grids = [
|
|
|
1151
1104
|
[/^grid-cols-\[(.+)\]$/, ([, v]) => ({ "grid-template-columns": v.replace(/,/g, " ") })],
|
|
1152
1105
|
[/^grid-rows-\[(.+)\]$/, ([, v]) => ({ "grid-template-rows": v.replace(/,/g, " ") })],
|
|
1153
1106
|
[/^(?:grid-)?(row|col)-(.+)$/, ([, d, v]) => {
|
|
1154
|
-
var _a;
|
|
1155
1107
|
const key = d === "row" ? "grid-row" : "grid-column";
|
|
1156
1108
|
let raw = handler.bracket(v);
|
|
1157
1109
|
if (raw)
|
|
@@ -1162,7 +1114,7 @@ var grids = [
|
|
|
1162
1114
|
if (parts[0] === "span") {
|
|
1163
1115
|
if (parts[1] === "full")
|
|
1164
1116
|
return { [key]: "1/-1" };
|
|
1165
|
-
raw =
|
|
1117
|
+
raw = handler.number.bracket(parts[1])?.toString().replace(/_/g, " ");
|
|
1166
1118
|
if (raw)
|
|
1167
1119
|
return { [key]: `span ${raw}/span ${raw}` };
|
|
1168
1120
|
}
|
|
@@ -1176,27 +1128,25 @@ var grids = [
|
|
|
1176
1128
|
[/^(?:grid-)?auto-cols-([\w.-]+)$/, ([, v], { theme }) => ({ "grid-auto-columns": `${autoDirection(v, theme)}` })]
|
|
1177
1129
|
];
|
|
1178
1130
|
|
|
1179
|
-
|
|
1180
|
-
var overflowValues2 = [
|
|
1131
|
+
const overflowValues = [
|
|
1181
1132
|
"auto",
|
|
1182
1133
|
"hidden",
|
|
1183
1134
|
"visible",
|
|
1184
1135
|
"scroll"
|
|
1185
1136
|
];
|
|
1186
|
-
|
|
1187
|
-
[/^(?:overflow|of)-(.+)$/, ([, v]) =>
|
|
1188
|
-
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) =>
|
|
1137
|
+
const overflows = [
|
|
1138
|
+
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0],
|
|
1139
|
+
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overflow-${d}`]: v } : void 0]
|
|
1189
1140
|
];
|
|
1190
1141
|
|
|
1191
|
-
|
|
1192
|
-
var positions = [
|
|
1142
|
+
const positions = [
|
|
1193
1143
|
["relative", { position: "relative" }],
|
|
1194
1144
|
["absolute", { position: "absolute" }],
|
|
1195
1145
|
["fixed", { position: "fixed" }],
|
|
1196
1146
|
["sticky", { position: "sticky" }],
|
|
1197
1147
|
["static", { position: "static" }]
|
|
1198
1148
|
];
|
|
1199
|
-
|
|
1149
|
+
const justifies = [
|
|
1200
1150
|
["justify-start", { "justify-content": "flex-start" }],
|
|
1201
1151
|
["justify-end", { "justify-content": "flex-end" }],
|
|
1202
1152
|
["justify-center", { "justify-content": "center" }],
|
|
@@ -1204,13 +1154,13 @@ var justifies = [
|
|
|
1204
1154
|
["justify-around", { "justify-content": "space-around" }],
|
|
1205
1155
|
["justify-evenly", { "justify-content": "space-evenly" }]
|
|
1206
1156
|
];
|
|
1207
|
-
|
|
1157
|
+
const orders = [
|
|
1208
1158
|
[/^order-(.+)$/, ([, v]) => ({ order: { first: "-9999", last: "9999", none: "0" }[v] || handler.bracket.number(v) })]
|
|
1209
1159
|
];
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1160
|
+
const basicSet = ["auto", "start", "end", "center", "stretch"];
|
|
1161
|
+
const justifyItems = basicSet.map((i) => [`justify-items-${i}`, { "justify-items": i }]);
|
|
1162
|
+
const justifySelfs = basicSet.map((i) => [`justify-self-${i}`, { "justify-self": i }]);
|
|
1163
|
+
const alignContents = [
|
|
1214
1164
|
["content-start", { "align-content": "flex-start" }],
|
|
1215
1165
|
["content-end", { "align-content": "flex-end" }],
|
|
1216
1166
|
["content-center", { "align-content": "center" }],
|
|
@@ -1218,21 +1168,21 @@ var alignContents = [
|
|
|
1218
1168
|
["content-around", { "align-content": "space-around" }],
|
|
1219
1169
|
["content-evenly", { "align-content": "space-evenly" }]
|
|
1220
1170
|
];
|
|
1221
|
-
|
|
1171
|
+
const alignItems = [
|
|
1222
1172
|
["items-start", { "align-items": "flex-start" }],
|
|
1223
1173
|
["items-end", { "align-items": "flex-end" }],
|
|
1224
1174
|
["items-center", { "align-items": "center" }],
|
|
1225
1175
|
["items-baseline", { "align-items": "baseline" }],
|
|
1226
1176
|
["items-stretch", { "align-items": "stretch" }]
|
|
1227
1177
|
];
|
|
1228
|
-
|
|
1178
|
+
const alignSelfs = [
|
|
1229
1179
|
["self-auto", { "align-self": "auto" }],
|
|
1230
1180
|
["self-start", { "align-self": "flex-start" }],
|
|
1231
1181
|
["self-end", { "align-self": "flex-end" }],
|
|
1232
1182
|
["self-center", { "align-self": "center" }],
|
|
1233
1183
|
["self-stretch", { "align-items": "stretch" }]
|
|
1234
1184
|
];
|
|
1235
|
-
|
|
1185
|
+
const placeContents = [
|
|
1236
1186
|
["place-content-start", { "place-content": "start" }],
|
|
1237
1187
|
["place-content-end", { "place-content": "end" }],
|
|
1238
1188
|
["place-content-center", { "place-content": "center" }],
|
|
@@ -1241,13 +1191,12 @@ var placeContents = [
|
|
|
1241
1191
|
["place-content-evenly", { "place-content": "space-evenly" }],
|
|
1242
1192
|
["place-content-stretch", { "place-content": "stretch" }]
|
|
1243
1193
|
];
|
|
1244
|
-
|
|
1245
|
-
|
|
1194
|
+
const placeItems = basicSet.map((i) => [`place-items-${i}`, { "place-items": i }]);
|
|
1195
|
+
const placeSelfs = basicSet.map((i) => [`place-self-${i}`, { "place-self": i }]);
|
|
1246
1196
|
function handleInsetValue(v) {
|
|
1247
|
-
|
|
1248
|
-
return (_a = { auto: "auto", full: "100%" }[v]) != null ? _a : handler.bracket.fraction.cssvar.rem(v);
|
|
1197
|
+
return { auto: "auto", full: "100%" }[v] ?? handler.bracket.fraction.cssvar.rem(v);
|
|
1249
1198
|
}
|
|
1250
|
-
|
|
1199
|
+
const insets = [
|
|
1251
1200
|
[/^(top|left|right|bottom|inset)-(.+)$/, ([, d, v]) => ({ [d]: handleInsetValue(v) })],
|
|
1252
1201
|
[/^inset-([xy])-(.+)$/, ([, d, v]) => {
|
|
1253
1202
|
const r = handleInsetValue(v);
|
|
@@ -1255,15 +1204,15 @@ var insets = [
|
|
|
1255
1204
|
return directionMap[d].map((i) => [i.slice(1), r]);
|
|
1256
1205
|
}]
|
|
1257
1206
|
];
|
|
1258
|
-
|
|
1207
|
+
const floats = [
|
|
1259
1208
|
[/^float-(left|right|none)$/, ([, value]) => ({ float: value })],
|
|
1260
1209
|
[/^clear-(left|right|both|none)$/, ([, value]) => ({ clear: value })]
|
|
1261
1210
|
];
|
|
1262
|
-
|
|
1211
|
+
const zIndexes = [
|
|
1263
1212
|
["z-auto", { "z-index": "auto" }],
|
|
1264
1213
|
[/^z-([^-]+)$/, ([, v]) => ({ "z-index": handler.number(v) })]
|
|
1265
1214
|
];
|
|
1266
|
-
|
|
1215
|
+
const objectPositions = [
|
|
1267
1216
|
["object-cover", { "object-fit": "cover" }],
|
|
1268
1217
|
["object-contain", { "object-fit": "contain" }],
|
|
1269
1218
|
["object-fill", { "object-fit": "fill" }],
|
|
@@ -1281,7 +1230,7 @@ var objectPositions = [
|
|
|
1281
1230
|
["object-cb", { "object-position": "center bottom" }],
|
|
1282
1231
|
["object-ct", { "object-position": "center top" }]
|
|
1283
1232
|
];
|
|
1284
|
-
|
|
1233
|
+
const boxSizing = [
|
|
1285
1234
|
[
|
|
1286
1235
|
/^box-(border|content)$/,
|
|
1287
1236
|
([, value]) => ({
|
|
@@ -1290,8 +1239,7 @@ var boxSizing = [
|
|
|
1290
1239
|
]
|
|
1291
1240
|
];
|
|
1292
1241
|
|
|
1293
|
-
|
|
1294
|
-
var rings = [
|
|
1242
|
+
const rings = [
|
|
1295
1243
|
[/^ring-?(.*)$/, ([, d]) => {
|
|
1296
1244
|
const value = handler.px(d || "1");
|
|
1297
1245
|
if (value) {
|
|
@@ -1320,8 +1268,7 @@ var rings = [
|
|
|
1320
1268
|
...ringOffsetColors
|
|
1321
1269
|
];
|
|
1322
1270
|
|
|
1323
|
-
|
|
1324
|
-
var colorResolver3 = (body, theme) => {
|
|
1271
|
+
const colorResolver = (body, theme) => {
|
|
1325
1272
|
const data = parseColorUtil(body, theme);
|
|
1326
1273
|
if (!data)
|
|
1327
1274
|
return;
|
|
@@ -1338,7 +1285,7 @@ var colorResolver3 = (body, theme) => {
|
|
|
1338
1285
|
};
|
|
1339
1286
|
}
|
|
1340
1287
|
};
|
|
1341
|
-
|
|
1288
|
+
const mixBlendModes = [
|
|
1342
1289
|
["mix-blend-normal", { "mix-blend-mode": "normal" }],
|
|
1343
1290
|
["mix-blend-multiply", { "mix-blend-mode": "multiply" }],
|
|
1344
1291
|
["mix-blend-screen", { "mix-blend-mode": "screen" }],
|
|
@@ -1356,10 +1303,9 @@ var mixBlendModes = [
|
|
|
1356
1303
|
["mix-blend-color", { "mix-blend-mode": "color" }],
|
|
1357
1304
|
["mix-blend-luminosity", { "mix-blend-mode": "luminosity" }]
|
|
1358
1305
|
];
|
|
1359
|
-
|
|
1306
|
+
const boxShadows = [
|
|
1360
1307
|
[/^shadow-?(.*)$/, ([, d], { theme }) => {
|
|
1361
|
-
|
|
1362
|
-
const value = (_a = theme == null ? void 0 : theme.boxShadow) == null ? void 0 : _a[d || "DEFAULT"];
|
|
1308
|
+
const value = theme?.boxShadow?.[d || "DEFAULT"];
|
|
1363
1309
|
if (value) {
|
|
1364
1310
|
return {
|
|
1365
1311
|
"--un-shadow-color": "0,0,0",
|
|
@@ -1367,37 +1313,34 @@ var boxShadows = [
|
|
|
1367
1313
|
"box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
|
|
1368
1314
|
};
|
|
1369
1315
|
}
|
|
1370
|
-
const color =
|
|
1316
|
+
const color = colorResolver(d, theme);
|
|
1371
1317
|
if (color)
|
|
1372
1318
|
return color;
|
|
1373
1319
|
}]
|
|
1374
1320
|
];
|
|
1375
1321
|
|
|
1376
|
-
// src/rules/size.ts
|
|
1377
1322
|
function getPropName(minmax, hw) {
|
|
1378
1323
|
return `${minmax ? `${minmax}-` : ""}${hw === "h" ? "height" : "width"}`;
|
|
1379
1324
|
}
|
|
1380
1325
|
function getThemeValue(minmax, hw, theme, prop) {
|
|
1381
|
-
var _a;
|
|
1382
1326
|
let str = `${hw === "h" ? "height" : "width"}`;
|
|
1383
1327
|
if (minmax)
|
|
1384
1328
|
str = `${minmax}${capitalize(str)}`;
|
|
1385
|
-
return
|
|
1329
|
+
return theme[str]?.[prop];
|
|
1386
1330
|
}
|
|
1387
|
-
|
|
1331
|
+
const sizes = [
|
|
1388
1332
|
[/^(?:(min|max)-)?(w|h)-(.+)$/, ([, m, w, s], { theme }) => {
|
|
1389
1333
|
const v = getThemeValue(m, w, theme, s) || handler.bracket.cssvar.fraction.rem(s);
|
|
1390
1334
|
if (v != null)
|
|
1391
1335
|
return { [getPropName(m, w)]: v };
|
|
1392
1336
|
}],
|
|
1393
1337
|
[/^(?:(min|max)-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => {
|
|
1394
|
-
|
|
1395
|
-
const v = (_a = theme.breakpoints) == null ? void 0 : _a[s];
|
|
1338
|
+
const v = theme.breakpoints?.[s];
|
|
1396
1339
|
if (v != null)
|
|
1397
1340
|
return { [getPropName(m, w)]: v };
|
|
1398
1341
|
}]
|
|
1399
1342
|
];
|
|
1400
|
-
|
|
1343
|
+
const aspectRatio = [
|
|
1401
1344
|
["aspect-ratio-auto", { "aspect-ratio": "auto" }],
|
|
1402
1345
|
[/^aspect-ratio-(.+)$/, ([, d]) => {
|
|
1403
1346
|
const v = (/^\d+\/\d+$/.test(d) ? d : null) || handler.bracket.cssvar.number(d);
|
|
@@ -1406,27 +1349,25 @@ var aspectRatio = [
|
|
|
1406
1349
|
}]
|
|
1407
1350
|
];
|
|
1408
1351
|
|
|
1409
|
-
|
|
1410
|
-
var directionSize = (prefix) => ([_, direction, size]) => {
|
|
1352
|
+
const directionSize = (prefix) => ([_, direction, size]) => {
|
|
1411
1353
|
const v = handler.bracket.rem.fraction.cssvar(size);
|
|
1412
1354
|
if (v)
|
|
1413
1355
|
return directionMap[direction].map((i) => [prefix + i, v]);
|
|
1414
1356
|
};
|
|
1415
|
-
|
|
1357
|
+
const paddings = [
|
|
1416
1358
|
[/^pa?()-?(-?.+)$/, directionSize("padding")],
|
|
1417
1359
|
[/^p-?([xy])-?(-?.+)$/, directionSize("padding")],
|
|
1418
1360
|
[/^p-?([rltbse])-?(-?.+)$/, directionSize("padding")]
|
|
1419
1361
|
];
|
|
1420
|
-
|
|
1362
|
+
const margins = [
|
|
1421
1363
|
[/^ma?()-?(-?.+)$/, directionSize("margin")],
|
|
1422
1364
|
[/^m-?([xy])-?(-?.+)$/, directionSize("margin")],
|
|
1423
1365
|
[/^m-?([rltbse])-?(-?.+)$/, directionSize("margin")],
|
|
1424
1366
|
[/^space-?([xy])-?(-?.+)$/, (match) => {
|
|
1425
|
-
var _a;
|
|
1426
1367
|
const [, direction, size] = match;
|
|
1427
1368
|
if (size === "reverse")
|
|
1428
1369
|
return { [`--un-space-${direction}-reverse`]: 1 };
|
|
1429
|
-
const results =
|
|
1370
|
+
const results = directionSize("margin")(match)?.map((item) => {
|
|
1430
1371
|
const value = item[0].endsWith("right") || item[0].endsWith("bottom") ? `calc(${item[1]} * var(--un-space-${direction}-reverse))` : `calc(${item[1]} * calc(1 - var(--un-space-${direction}-reverse)))`;
|
|
1431
1372
|
return [item[0], value];
|
|
1432
1373
|
});
|
|
@@ -1439,8 +1380,7 @@ var margins = [
|
|
|
1439
1380
|
}]
|
|
1440
1381
|
];
|
|
1441
1382
|
|
|
1442
|
-
|
|
1443
|
-
var tables = [
|
|
1383
|
+
const tables = [
|
|
1444
1384
|
["border-collapse", { "border-collapse": "collapse" }],
|
|
1445
1385
|
["border-separate", { "border-collapse": "separate" }],
|
|
1446
1386
|
["caption-top", { "caption-side": "top" }],
|
|
@@ -1461,8 +1401,7 @@ var tables = [
|
|
|
1461
1401
|
["table-row-group", { display: "table-row-group" }]
|
|
1462
1402
|
];
|
|
1463
1403
|
|
|
1464
|
-
|
|
1465
|
-
var transformBase = {
|
|
1404
|
+
const transformBase = {
|
|
1466
1405
|
"--un-rotate": 0,
|
|
1467
1406
|
"--un-scale-x": 1,
|
|
1468
1407
|
"--un-scale-y": 1,
|
|
@@ -1475,7 +1414,7 @@ var transformBase = {
|
|
|
1475
1414
|
"transform": "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z))",
|
|
1476
1415
|
[CONTROL_BYPASS_PSEUDO]: ""
|
|
1477
1416
|
};
|
|
1478
|
-
|
|
1417
|
+
const transforms = [
|
|
1479
1418
|
["transform", transformBase],
|
|
1480
1419
|
[/^preserve-(3d|flat)$/, ([, value]) => ({ "transform-style": value === "3d" ? `preserve-${value}` : value })],
|
|
1481
1420
|
[/^translate()-([^-]+)$/, handleTranslate],
|
|
@@ -1525,8 +1464,7 @@ function handleRotate([, b]) {
|
|
|
1525
1464
|
}
|
|
1526
1465
|
}
|
|
1527
1466
|
|
|
1528
|
-
|
|
1529
|
-
var variablesAbbrMap = {
|
|
1467
|
+
const variablesAbbrMap = {
|
|
1530
1468
|
"visible": "visibility",
|
|
1531
1469
|
"select": "user-select",
|
|
1532
1470
|
"vertical": "vertical-align",
|
|
@@ -1564,7 +1502,7 @@ var variablesAbbrMap = {
|
|
|
1564
1502
|
"mix-blend": "mix-blend-mode",
|
|
1565
1503
|
"animate-speed": "animation-speed"
|
|
1566
1504
|
};
|
|
1567
|
-
|
|
1505
|
+
const cssVariables = [[
|
|
1568
1506
|
/^(.+)-\$(.+)$/,
|
|
1569
1507
|
([, name, varname]) => {
|
|
1570
1508
|
const prop = variablesAbbrMap[name];
|
|
@@ -1576,8 +1514,7 @@ var cssVariables = [[
|
|
|
1576
1514
|
}
|
|
1577
1515
|
]];
|
|
1578
1516
|
|
|
1579
|
-
|
|
1580
|
-
var questionMark = [
|
|
1517
|
+
const questionMark = [
|
|
1581
1518
|
[
|
|
1582
1519
|
/^(where|\?)$/,
|
|
1583
1520
|
(_, { constructCSS, generator }) => {
|
|
@@ -1588,20 +1525,19 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
|
|
|
1588
1525
|
]
|
|
1589
1526
|
];
|
|
1590
1527
|
|
|
1591
|
-
|
|
1592
|
-
var divideSizes = [
|
|
1528
|
+
const divideSizes = [
|
|
1593
1529
|
[/^divide-?([xy])$/, handlerDivide],
|
|
1594
1530
|
[/^divide-?([xy])-?(-?.+)$/, handlerDivide],
|
|
1595
1531
|
[/^divide-?([xy])-reverse$/, ([, d]) => [[`--un-divide-${d}-reverse`, 1]]]
|
|
1596
1532
|
];
|
|
1597
|
-
|
|
1533
|
+
const divideStyles = [
|
|
1598
1534
|
["divide-solid", { "border-style": "solid" }],
|
|
1599
1535
|
["divide-dashed", { "border-style": "dashed" }],
|
|
1600
1536
|
["divide-dotted", { "border-style": "dotted" }],
|
|
1601
1537
|
["divide-double", { "border-style": "double" }],
|
|
1602
1538
|
["divide-none", { "border-style": "none" }]
|
|
1603
1539
|
];
|
|
1604
|
-
|
|
1540
|
+
const divides = [divideSizes, divideColors, divideStyles].flat(1);
|
|
1605
1541
|
function handlerDivide([, a, b]) {
|
|
1606
1542
|
const [d, s = "1"] = directionMap[a] ? [a, b] : ["", a];
|
|
1607
1543
|
const v = handler.bracket.px(s);
|
|
@@ -1616,8 +1552,7 @@ function handlerDivide([, a, b]) {
|
|
|
1616
1552
|
}
|
|
1617
1553
|
}
|
|
1618
1554
|
|
|
1619
|
-
|
|
1620
|
-
var lineClamps = [
|
|
1555
|
+
const lineClamps = [
|
|
1621
1556
|
[/^line-clamp-(\d+)$/, ([, v]) => ({
|
|
1622
1557
|
"overflow": "hidden",
|
|
1623
1558
|
"display": "-webkit-box",
|
|
@@ -1631,8 +1566,7 @@ var lineClamps = [
|
|
|
1631
1566
|
}]
|
|
1632
1567
|
];
|
|
1633
1568
|
|
|
1634
|
-
|
|
1635
|
-
var rules = [
|
|
1569
|
+
const rules = [
|
|
1636
1570
|
screenReadersAccess,
|
|
1637
1571
|
cssVariables,
|
|
1638
1572
|
paddings,
|
|
@@ -1731,117 +1665,4 @@ var rules = [
|
|
|
1731
1665
|
questionMark
|
|
1732
1666
|
].flat(1);
|
|
1733
1667
|
|
|
1734
|
-
export {
|
|
1735
|
-
verticalAligns,
|
|
1736
|
-
textAligns,
|
|
1737
|
-
animations,
|
|
1738
|
-
parseColorUtil,
|
|
1739
|
-
colorResolver,
|
|
1740
|
-
opacity,
|
|
1741
|
-
textColors,
|
|
1742
|
-
textDecorationColors,
|
|
1743
|
-
textStrokeColors,
|
|
1744
|
-
bgColors,
|
|
1745
|
-
borderColors,
|
|
1746
|
-
ringColors,
|
|
1747
|
-
ringOffsetColors,
|
|
1748
|
-
divideColors,
|
|
1749
|
-
fillColors,
|
|
1750
|
-
bgAttachments,
|
|
1751
|
-
bgBlendModes,
|
|
1752
|
-
bgClips,
|
|
1753
|
-
bgGradients,
|
|
1754
|
-
bgImages,
|
|
1755
|
-
bgOrigins,
|
|
1756
|
-
bgPositions,
|
|
1757
|
-
bgRepeats,
|
|
1758
|
-
bgSizes,
|
|
1759
|
-
outline,
|
|
1760
|
-
listStyle,
|
|
1761
|
-
boxDecorationBreaks,
|
|
1762
|
-
caretOpacity,
|
|
1763
|
-
caretColors,
|
|
1764
|
-
imageRenderings,
|
|
1765
|
-
appearance,
|
|
1766
|
-
placeholder,
|
|
1767
|
-
overscrolls,
|
|
1768
|
-
borderSizes,
|
|
1769
|
-
borderRadius,
|
|
1770
|
-
borderStyles,
|
|
1771
|
-
borders,
|
|
1772
|
-
container,
|
|
1773
|
-
containerShortcuts,
|
|
1774
|
-
transitions,
|
|
1775
|
-
filters,
|
|
1776
|
-
flex,
|
|
1777
|
-
varEmpty2 as varEmpty,
|
|
1778
|
-
displays,
|
|
1779
|
-
appearances,
|
|
1780
|
-
cursors,
|
|
1781
|
-
pointerEvents,
|
|
1782
|
-
resizes,
|
|
1783
|
-
userSelects,
|
|
1784
|
-
whitespaces,
|
|
1785
|
-
contents,
|
|
1786
|
-
breaks,
|
|
1787
|
-
textOverflows,
|
|
1788
|
-
textTransforms,
|
|
1789
|
-
textDecorations,
|
|
1790
|
-
textDecorationStyles,
|
|
1791
|
-
fontStyles,
|
|
1792
|
-
fontSmoothings,
|
|
1793
|
-
hyphens,
|
|
1794
|
-
writingModes,
|
|
1795
|
-
writingOrientations,
|
|
1796
|
-
screenReadersAccess,
|
|
1797
|
-
isolations,
|
|
1798
|
-
fontsFamilies,
|
|
1799
|
-
fontSizes,
|
|
1800
|
-
fontWeights,
|
|
1801
|
-
leadings,
|
|
1802
|
-
trackings,
|
|
1803
|
-
wordSpacings,
|
|
1804
|
-
tabSizes,
|
|
1805
|
-
textDecorationLengths,
|
|
1806
|
-
textDecorationOffsets,
|
|
1807
|
-
textIndents,
|
|
1808
|
-
textStrokeWidths,
|
|
1809
|
-
textShadows,
|
|
1810
|
-
fontVariantNumeric,
|
|
1811
|
-
fonts,
|
|
1812
|
-
gaps,
|
|
1813
|
-
grids,
|
|
1814
|
-
overflows,
|
|
1815
|
-
positions,
|
|
1816
|
-
justifies,
|
|
1817
|
-
orders,
|
|
1818
|
-
justifyItems,
|
|
1819
|
-
justifySelfs,
|
|
1820
|
-
alignContents,
|
|
1821
|
-
alignItems,
|
|
1822
|
-
alignSelfs,
|
|
1823
|
-
placeContents,
|
|
1824
|
-
placeItems,
|
|
1825
|
-
placeSelfs,
|
|
1826
|
-
insets,
|
|
1827
|
-
floats,
|
|
1828
|
-
zIndexes,
|
|
1829
|
-
objectPositions,
|
|
1830
|
-
boxSizing,
|
|
1831
|
-
rings,
|
|
1832
|
-
mixBlendModes,
|
|
1833
|
-
boxShadows,
|
|
1834
|
-
sizes,
|
|
1835
|
-
aspectRatio,
|
|
1836
|
-
paddings,
|
|
1837
|
-
margins,
|
|
1838
|
-
tables,
|
|
1839
|
-
transforms,
|
|
1840
|
-
cssVariables,
|
|
1841
|
-
questionMark,
|
|
1842
|
-
divideSizes,
|
|
1843
|
-
divideStyles,
|
|
1844
|
-
divides,
|
|
1845
|
-
lineClamps,
|
|
1846
|
-
rules
|
|
1847
|
-
};
|
|
1668
|
+
export { justifySelfs as $, borders as A, parseColorUtil as B, colorResolver$2 as C, opacity as D, textColors as E, textDecorationColors as F, textStrokeColors as G, bgColors as H, borderColors as I, ringColors as J, ringOffsetColors as K, divideColors as L, fillColors as M, container as N, divideSizes as O, divideStyles as P, divides as Q, filters as R, flex as S, gaps as T, grids as U, overflows as V, lineClamps as W, positions as X, justifies as Y, orders as Z, justifyItems as _, animations as a, alignContents as a0, alignItems as a1, alignSelfs as a2, placeContents as a3, placeItems as a4, placeSelfs as a5, insets as a6, floats as a7, zIndexes as a8, objectPositions as a9, writingModes as aA, writingOrientations as aB, screenReadersAccess as aC, isolations as aD, tables as aE, transforms as aF, transitions as aG, fontsFamilies as aH, fontSizes as aI, fontWeights as aJ, leadings as aK, trackings as aL, wordSpacings as aM, tabSizes as aN, textDecorationLengths as aO, textDecorationOffsets as aP, textIndents as aQ, textStrokeWidths as aR, textShadows as aS, fontVariantNumeric as aT, fonts as aU, cssVariables as aV, boxSizing as aa, questionMark as ab, rings as ac, mixBlendModes as ad, boxShadows as ae, sizes as af, aspectRatio as ag, paddings as ah, margins as ai, varEmpty as aj, displays as ak, appearances as al, cursors as am, pointerEvents as an, resizes as ao, userSelects as ap, whitespaces as aq, contents as ar, breaks as as, textOverflows as at, textTransforms as au, textDecorations as av, textDecorationStyles as aw, fontStyles as ax, fontSmoothings as ay, hyphens as az, bgAttachments as b, containerShortcuts as c, bgBlendModes as d, bgClips as e, bgGradients as f, bgImages as g, bgOrigins as h, bgPositions as i, bgRepeats as j, bgSizes as k, listStyle as l, boxDecorationBreaks as m, caretOpacity as n, outline as o, caretColors as p, imageRenderings as q, rules as r, appearance as s, textAligns as t, placeholder as u, verticalAligns as v, overscrolls as w, borderSizes as x, borderRadius as y, borderStyles as z };
|