@unocss/preset-uno 0.13.1 → 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-GBKIE2NK.js → chunks/default.cjs} +567 -591
- package/dist/{chunk-RDUXYWRV.mjs → chunks/default.mjs} +404 -541
- package/dist/{chunk-BOWXQI3B.js → chunks/default2.cjs} +41 -48
- package/dist/{chunk-BLAKJWHG.mjs → chunks/default2.mjs} +21 -48
- package/dist/chunks/default3.cjs +128 -0
- package/dist/chunks/default3.mjs +119 -0
- package/dist/{chunk-O7YRGPXQ.mjs → chunks/index.cjs} +38 -59
- package/dist/{chunk-LPZDYB4J.js → chunks/index.mjs} +23 -60
- package/dist/chunks/pseudo.cjs +106 -0
- package/dist/chunks/pseudo.mjs +101 -0
- 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 -26
- package/dist/rules.cjs +123 -0
- package/dist/rules.d.ts +3 -1
- package/dist/rules.mjs +4 -226
- 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.d.ts +2 -1
- package/dist/variants.mjs +4 -28
- package/package.json +11 -11
- package/dist/chunk-5SH5BFJ4.mjs +0 -11
- package/dist/chunk-64RIF3V4.js +0 -232
- package/dist/chunk-IFOGL3S7.mjs +0 -232
- package/dist/chunk-Y6EUTGDC.js +0 -11
- package/dist/colors.js +0 -7
- package/dist/index.js +0 -39
- package/dist/rules.js +0 -226
- package/dist/theme.js +0 -47
- package/dist/utils.js +0 -37
- package/dist/variants.js +0 -28
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
+
const core = require('@unocss/core');
|
|
4
|
+
const index = require('./index.cjs');
|
|
5
|
+
const pseudo = require('./pseudo.cjs');
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkLPZDYB4Jjs = require('./chunk-LPZDYB4J.js');
|
|
8
|
-
|
|
9
|
-
// src/rules/align.ts
|
|
10
|
-
var verticalAlignAlias = {
|
|
7
|
+
const verticalAlignAlias = {
|
|
11
8
|
mid: "middle",
|
|
12
9
|
base: "baseline",
|
|
13
10
|
btm: "bottom"
|
|
14
11
|
};
|
|
15
|
-
|
|
12
|
+
const verticalAligns = [
|
|
16
13
|
[/^(?:vertical|align|v)-(baseline|top|bottom|middle|text-top|text-bottom|mid|base|btm)$/, ([, v]) => ({ "vertical-align": verticalAlignAlias[v] || v })]
|
|
17
14
|
];
|
|
18
|
-
|
|
15
|
+
const textAligns = [
|
|
19
16
|
["text-center", { "text-align": "center" }],
|
|
20
17
|
["text-left", { "text-align": "left" }],
|
|
21
18
|
["text-right", { "text-align": "right" }],
|
|
22
19
|
["text-justify", { "text-align": "justify" }]
|
|
23
20
|
];
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
var keyframes = {
|
|
22
|
+
const keyframes = {
|
|
27
23
|
"spin": "{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",
|
|
28
24
|
"ping": "{0%{transform:scale(1);opacity:1}75%,100%{transform:scale(2);opacity:0}}",
|
|
29
25
|
"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)}}",
|
|
@@ -124,7 +120,7 @@ var keyframes = {
|
|
|
124
120
|
"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)}}",
|
|
125
121
|
"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)}}"
|
|
126
122
|
};
|
|
127
|
-
|
|
123
|
+
const durations = {
|
|
128
124
|
"heart-beat": "1.3s",
|
|
129
125
|
"bounce-in": "0.75s",
|
|
130
126
|
"bounce-out": "0.75s",
|
|
@@ -132,7 +128,7 @@ var durations = {
|
|
|
132
128
|
"flip-out-y": "0.75s",
|
|
133
129
|
"hinge": "2s"
|
|
134
130
|
};
|
|
135
|
-
|
|
131
|
+
const timingFns = {
|
|
136
132
|
"head-shake": "ease-in-out",
|
|
137
133
|
"heart-beat": "ease-in-out",
|
|
138
134
|
"pulse": "ease-in-out",
|
|
@@ -141,7 +137,7 @@ var timingFns = {
|
|
|
141
137
|
"light-speed-out-left": "ease-in",
|
|
142
138
|
"light-speed-out-right": "ease-in"
|
|
143
139
|
};
|
|
144
|
-
|
|
140
|
+
const properties = {
|
|
145
141
|
"bounce": { "transform-origin": "center bottom" },
|
|
146
142
|
"jello": { "transform-origin": "center" },
|
|
147
143
|
"swing": { "transform-origin": "top center" },
|
|
@@ -166,7 +162,7 @@ var properties = {
|
|
|
166
162
|
"zoom-out-right": { "transform-origin": "right center" },
|
|
167
163
|
"zoom-out-up": { "transform-origin": "center bottom" }
|
|
168
164
|
};
|
|
169
|
-
|
|
165
|
+
const animations = [
|
|
170
166
|
[/^animate-(.*)$/, ([, name], { constructCSS }) => {
|
|
171
167
|
const kf = keyframes[name];
|
|
172
168
|
if (kf) {
|
|
@@ -175,8 +171,8 @@ ${constructCSS(Object.assign({ animation: `${name} ${durations[name] || "1s"} ${
|
|
|
175
171
|
}
|
|
176
172
|
}],
|
|
177
173
|
["animate-none", { animation: "none" }],
|
|
178
|
-
[/^animate(?:-duration)?-((.+)(?:(s|ms)?))$/, ([, d]) => ({ "animation-duration":
|
|
179
|
-
[/^animate-delay-((.+)(?:(s|ms)?))$/, ([, d]) => ({ "animation-delay":
|
|
174
|
+
[/^animate(?:-duration)?-((.+)(?:(s|ms)?))$/, ([, d]) => ({ "animation-duration": index.handler.bracket.time(d.replace(/-duration/, "")) })],
|
|
175
|
+
[/^animate-delay-((.+)(?:(s|ms)?))$/, ([, d]) => ({ "animation-delay": index.handler.bracket.time(d) })],
|
|
180
176
|
[/^animate-(?:fill-)?mode-(none|forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
|
|
181
177
|
[/^animate-(?:direction-)?(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
|
|
182
178
|
[/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": d.replace(/\-/g, ", ") })],
|
|
@@ -184,22 +180,19 @@ ${constructCSS(Object.assign({ animation: `${name} ${durations[name] || "1s"} ${
|
|
|
184
180
|
[/^animate-play(?:-state)?-(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })]
|
|
185
181
|
];
|
|
186
182
|
|
|
187
|
-
|
|
188
|
-
var _core = require('@unocss/core');
|
|
189
|
-
var parseColorUtil = (body, theme) => {
|
|
190
|
-
var _a;
|
|
183
|
+
const parseColorUtil = (body, theme) => {
|
|
191
184
|
const [main, opacity2] = body.split(/(?:\/|:)/);
|
|
192
185
|
const [name, no = "DEFAULT"] = main.replace(/([a-z])([0-9])/g, "$1-$2").split(/-/g);
|
|
193
186
|
if (!name)
|
|
194
187
|
return;
|
|
195
188
|
let color;
|
|
196
|
-
const bracket =
|
|
189
|
+
const bracket = index.handler.bracket(main) || main;
|
|
197
190
|
if (bracket.startsWith("#"))
|
|
198
191
|
color = bracket.slice(1);
|
|
199
192
|
if (bracket.startsWith("hex-"))
|
|
200
193
|
color = bracket.slice(4);
|
|
201
194
|
if (!color) {
|
|
202
|
-
const colorData =
|
|
195
|
+
const colorData = theme.colors?.[name];
|
|
203
196
|
if (typeof colorData === "string")
|
|
204
197
|
color = colorData;
|
|
205
198
|
else if (no && colorData)
|
|
@@ -210,17 +203,17 @@ var parseColorUtil = (body, theme) => {
|
|
|
210
203
|
name,
|
|
211
204
|
no,
|
|
212
205
|
color,
|
|
213
|
-
rgba:
|
|
206
|
+
rgba: core.hex2rgba(color)
|
|
214
207
|
};
|
|
215
208
|
};
|
|
216
|
-
|
|
209
|
+
const colorResolver$2 = (attribute, varName) => ([, body], { theme }) => {
|
|
217
210
|
const data = parseColorUtil(body, theme);
|
|
218
211
|
if (!data)
|
|
219
212
|
return;
|
|
220
213
|
const { opacity: opacity2, color, rgba } = data;
|
|
221
214
|
if (!color)
|
|
222
215
|
return;
|
|
223
|
-
const a = opacity2 ? opacity2[0] === "[" ?
|
|
216
|
+
const a = opacity2 ? opacity2[0] === "[" ? index.handler.bracket.percent(opacity2) : parseFloat(opacity2) / 100 : rgba?.[3];
|
|
224
217
|
if (rgba) {
|
|
225
218
|
if (a != null && !Number.isNaN(a)) {
|
|
226
219
|
rgba[3] = typeof a === "string" && !a.includes("%") ? parseFloat(a) : a;
|
|
@@ -239,16 +232,16 @@ var colorResolver = (attribute, varName) => ([, body], { theme }) => {
|
|
|
239
232
|
};
|
|
240
233
|
}
|
|
241
234
|
};
|
|
242
|
-
|
|
243
|
-
[/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity:
|
|
235
|
+
const opacity = [
|
|
236
|
+
[/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: index.handler.bracket.percent.cssvar(d) })]
|
|
244
237
|
];
|
|
245
|
-
|
|
246
|
-
[/^(?:text|color|c)-(.+)$/, colorResolver("color", "text")],
|
|
247
|
-
[/^(?:text|color|c)-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-text-opacity":
|
|
238
|
+
const textColors = [
|
|
239
|
+
[/^(?:text|color|c)-(.+)$/, colorResolver$2("color", "text")],
|
|
240
|
+
[/^(?:text|color|c)-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-text-opacity": index.handler.bracket.percent.cssvar(opacity2) })]
|
|
248
241
|
];
|
|
249
|
-
|
|
242
|
+
const textDecorationColors = [
|
|
250
243
|
[/^underline-(.+)$/, (match, ctx) => {
|
|
251
|
-
const result = colorResolver("text-decoration-color", "line")(match, ctx);
|
|
244
|
+
const result = colorResolver$2("text-decoration-color", "line")(match, ctx);
|
|
252
245
|
if (result) {
|
|
253
246
|
return {
|
|
254
247
|
"-webkit-text-decoration-color": result["text-decoration-color"],
|
|
@@ -256,49 +249,48 @@ var textDecorationColors = [
|
|
|
256
249
|
};
|
|
257
250
|
}
|
|
258
251
|
}],
|
|
259
|
-
[/^underline-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-line-opacity":
|
|
252
|
+
[/^underline-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-line-opacity": index.handler.bracket.percent(opacity2) })]
|
|
260
253
|
];
|
|
261
|
-
|
|
262
|
-
[/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke")],
|
|
263
|
-
[/^text-stroke-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-text-stroke-opacity":
|
|
254
|
+
const textStrokeColors = [
|
|
255
|
+
[/^text-stroke-(.+)$/, colorResolver$2("-webkit-text-stroke-color", "text-stroke")],
|
|
256
|
+
[/^text-stroke-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-text-stroke-opacity": index.handler.bracket.percent(opacity2) })]
|
|
264
257
|
];
|
|
265
|
-
|
|
266
|
-
[/^bg-(.+)$/, colorResolver("background-color", "bg")],
|
|
267
|
-
[/^bg-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-bg-opacity":
|
|
258
|
+
const bgColors = [
|
|
259
|
+
[/^bg-(.+)$/, colorResolver$2("background-color", "bg")],
|
|
260
|
+
[/^bg-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-bg-opacity": index.handler.bracket.percent(opacity2) })]
|
|
268
261
|
];
|
|
269
|
-
|
|
270
|
-
[/^(?:border|b)-(.+)$/, colorResolver("border-color", "border")],
|
|
271
|
-
[/^(?:border|b)-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-border-opacity":
|
|
262
|
+
const borderColors = [
|
|
263
|
+
[/^(?:border|b)-(.+)$/, colorResolver$2("border-color", "border")],
|
|
264
|
+
[/^(?:border|b)-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-border-opacity": index.handler.bracket.percent(opacity2) })]
|
|
272
265
|
];
|
|
273
|
-
|
|
274
|
-
[/^ring-(.+)$/, colorResolver("--un-ring-color", "ring")],
|
|
275
|
-
[/^ring-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-ring-opacity":
|
|
266
|
+
const ringColors = [
|
|
267
|
+
[/^ring-(.+)$/, colorResolver$2("--un-ring-color", "ring")],
|
|
268
|
+
[/^ring-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-ring-opacity": index.handler.bracket.percent(opacity2) })]
|
|
276
269
|
];
|
|
277
|
-
|
|
278
|
-
[/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset")],
|
|
279
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-ring-offset-opacity":
|
|
270
|
+
const ringOffsetColors = [
|
|
271
|
+
[/^ring-offset-(.+)$/, colorResolver$2("--un-ring-offset-color", "ring-offset")],
|
|
272
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-ring-offset-opacity": index.handler.bracket.percent(opacity2) })]
|
|
280
273
|
];
|
|
281
|
-
|
|
282
|
-
[/^divide-(.+)$/, colorResolver("border-color", "divide")],
|
|
283
|
-
[/^divide-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-divide-opacity":
|
|
274
|
+
const divideColors = [
|
|
275
|
+
[/^divide-(.+)$/, colorResolver$2("border-color", "divide")],
|
|
276
|
+
[/^divide-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-divide-opacity": index.handler.bracket.percent(opacity2) })]
|
|
284
277
|
];
|
|
285
|
-
|
|
278
|
+
const fillColors = [
|
|
286
279
|
["fill-none", { fill: "none" }],
|
|
287
|
-
[/^fill-(.+)$/, colorResolver("fill", "fill")],
|
|
288
|
-
[/^fill-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-fill-opacity":
|
|
280
|
+
[/^fill-(.+)$/, colorResolver$2("fill", "fill")],
|
|
281
|
+
[/^fill-op(?:acity)?-?(.+)$/m, ([, opacity2]) => ({ "--un-fill-opacity": index.handler.bracket.percent(opacity2) })]
|
|
289
282
|
];
|
|
290
283
|
|
|
291
|
-
|
|
292
|
-
var colorResolver2 = (mode) => ([, body], { theme }) => {
|
|
284
|
+
const colorResolver$1 = (mode) => ([, body], { theme }) => {
|
|
293
285
|
const data = parseColorUtil(body, theme);
|
|
294
286
|
if (!data)
|
|
295
287
|
return;
|
|
296
|
-
const { opacity
|
|
288
|
+
const { opacity, color, rgba } = data;
|
|
297
289
|
if (!color)
|
|
298
290
|
return;
|
|
299
291
|
let colorString = color;
|
|
300
292
|
if (rgba) {
|
|
301
|
-
const a =
|
|
293
|
+
const a = opacity ? opacity[0] === "[" ? index.handler.bracket.percent(opacity) : parseFloat(opacity) / 100 : rgba[3];
|
|
302
294
|
if (a != null && !Number.isNaN(a)) {
|
|
303
295
|
rgba[3] = typeof a === "string" && !a.includes("%") ? parseFloat(a) : a;
|
|
304
296
|
colorString = `rgba(${rgba.join(",")})`;
|
|
@@ -322,12 +314,12 @@ var colorResolver2 = (mode) => ([, body], { theme }) => {
|
|
|
322
314
|
};
|
|
323
315
|
}
|
|
324
316
|
};
|
|
325
|
-
|
|
317
|
+
const bgAttachments = [
|
|
326
318
|
["bg-fixed", { "background-attachment": "fixed" }],
|
|
327
319
|
["bg-local", { "background-attachment": "local" }],
|
|
328
320
|
["bg-scroll", { "background-attachment": "scroll" }]
|
|
329
321
|
];
|
|
330
|
-
|
|
322
|
+
const bgBlendModes = [
|
|
331
323
|
["bg-blend-normal", { "background-blend-mode": "normal" }],
|
|
332
324
|
["bg-blend-multiply", { "background-blend-mode": "multiply" }],
|
|
333
325
|
["bg-blend-screen", { "background-blend-mode": "screen" }],
|
|
@@ -345,21 +337,21 @@ var bgBlendModes = [
|
|
|
345
337
|
["bg-blend-color", { "background-blend-mode": "color" }],
|
|
346
338
|
["bg-blend-luminosity", { "background-blend-mode": "luminosity" }]
|
|
347
339
|
];
|
|
348
|
-
|
|
340
|
+
const bgClips = [
|
|
349
341
|
["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
|
|
350
342
|
["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
|
|
351
343
|
["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
|
|
352
344
|
["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }]
|
|
353
345
|
];
|
|
354
|
-
|
|
355
|
-
[/^from-(.+)$/,
|
|
356
|
-
[/^to-(.+)$/,
|
|
357
|
-
[/^via-(.+)$/,
|
|
358
|
-
[/^from-op(?:acity)?-?(.+)$/m, ([,
|
|
359
|
-
[/^to-op(?:acity)?-?(.+)$/m, ([,
|
|
360
|
-
[/^via-op(?:acity)?-?(.+)$/m, ([,
|
|
346
|
+
const bgGradients = [
|
|
347
|
+
[/^from-(.+)$/, colorResolver$1("from")],
|
|
348
|
+
[/^to-(.+)$/, colorResolver$1("to")],
|
|
349
|
+
[/^via-(.+)$/, colorResolver$1("via")],
|
|
350
|
+
[/^from-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-from-opacity": index.handler.bracket.percent(opacity) })],
|
|
351
|
+
[/^to-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-to-opacity": index.handler.bracket.percent(opacity) })],
|
|
352
|
+
[/^via-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-via-opacity": index.handler.bracket.percent(opacity) })]
|
|
361
353
|
];
|
|
362
|
-
|
|
354
|
+
const bgImages = [
|
|
363
355
|
["bg-none", { "background-image": "none" }],
|
|
364
356
|
["bg-gradient-to-t", {
|
|
365
357
|
"background-image": "linear-gradient(to top, var(--un-gradient-stops))"
|
|
@@ -386,12 +378,12 @@ var bgImages = [
|
|
|
386
378
|
"background-image": "linear-gradient(to top left, var(--un-gradient-stops))"
|
|
387
379
|
}]
|
|
388
380
|
];
|
|
389
|
-
|
|
381
|
+
const bgOrigins = [
|
|
390
382
|
["bg-origin-border", { "background-origin": "border-box" }],
|
|
391
383
|
["bg-origin-padding", { "background-origin": "padding-box" }],
|
|
392
384
|
["bg-origin-content", { "background-origin": "content-box" }]
|
|
393
385
|
];
|
|
394
|
-
|
|
386
|
+
const bgPositions = [
|
|
395
387
|
["bg-bottom", { "background-position": "bottom" }],
|
|
396
388
|
["bg-center", { "background-position": "center" }],
|
|
397
389
|
["bg-left", { "background-position": "left" }],
|
|
@@ -402,7 +394,7 @@ var bgPositions = [
|
|
|
402
394
|
["bg-right-top", { "background-position": "right top" }],
|
|
403
395
|
["bg-top", { "background-position": "top" }]
|
|
404
396
|
];
|
|
405
|
-
|
|
397
|
+
const bgRepeats = [
|
|
406
398
|
["bg-repeat", { "background-repeat": "repeat" }],
|
|
407
399
|
["bg-no-repeat", { "background-repeat": "no-repeat" }],
|
|
408
400
|
["bg-repeat-x", { "background-position": "repeat-x" }],
|
|
@@ -410,25 +402,24 @@ var bgRepeats = [
|
|
|
410
402
|
["bg-repeat-round", { "background-position": "round" }],
|
|
411
403
|
["bg-repeat-space", { "background-position": "space" }]
|
|
412
404
|
];
|
|
413
|
-
|
|
405
|
+
const bgSizes = [
|
|
414
406
|
["bg-auto", { "background-size": "auto" }],
|
|
415
407
|
["bg-cover", { "background-repeat": "cover" }],
|
|
416
408
|
["bg-contain", { "background-position": "contain" }]
|
|
417
409
|
];
|
|
418
410
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
var parseOutlineSize = (s) => {
|
|
411
|
+
const outlineStyle = ["none", "auto", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"];
|
|
412
|
+
const listStyleProps = ["none", "disc", "circle", "square", "decimal", "zero-decimal", "greek", "roman", "upper-roman", "alpha", "upper-alpha"];
|
|
413
|
+
const parseOutlineSize = (s) => {
|
|
423
414
|
const propName = ["width", "offset"].find((item) => s.startsWith(item)) || "width";
|
|
424
|
-
const size =
|
|
415
|
+
const size = index.handler.bracket.fraction.rem(s.replace(/^(offset\-|width\-)/, ""));
|
|
425
416
|
if (size) {
|
|
426
417
|
return {
|
|
427
418
|
[`outline-${propName}`]: size
|
|
428
419
|
};
|
|
429
420
|
}
|
|
430
421
|
};
|
|
431
|
-
|
|
422
|
+
const outline = [
|
|
432
423
|
["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }],
|
|
433
424
|
["outline", { "outline-style": "solid" }],
|
|
434
425
|
[
|
|
@@ -449,7 +440,7 @@ var outline = [
|
|
|
449
440
|
const sizeSheet = parseOutlineSize(d);
|
|
450
441
|
if (sizeSheet)
|
|
451
442
|
return sizeSheet;
|
|
452
|
-
const colorSheet = colorResolver("outline-color", "outline-color")([
|
|
443
|
+
const colorSheet = colorResolver$2("outline-color", "outline-color")([
|
|
453
444
|
match[0],
|
|
454
445
|
match[1].replace(/^color-/, "")
|
|
455
446
|
], config);
|
|
@@ -458,11 +449,10 @@ var outline = [
|
|
|
458
449
|
}
|
|
459
450
|
]
|
|
460
451
|
];
|
|
461
|
-
|
|
452
|
+
const listStyle = [
|
|
462
453
|
[new RegExp(`^list-((${listStyleProps.join("|")})(?:(-outside|-inside))?)$`), ([, value]) => {
|
|
463
|
-
var _a;
|
|
464
454
|
const style = value.split(/-outside|-inside/)[0];
|
|
465
|
-
const position =
|
|
455
|
+
const position = /inside|outside/.exec(value) ?? [];
|
|
466
456
|
if (position.length) {
|
|
467
457
|
return {
|
|
468
458
|
"list-style-position": `${position[0]}`,
|
|
@@ -479,17 +469,17 @@ var listStyle = [
|
|
|
479
469
|
};
|
|
480
470
|
}]
|
|
481
471
|
];
|
|
482
|
-
|
|
472
|
+
const boxDecorationBreaks = [
|
|
483
473
|
["decoration-slice", { "box-decoration-break": "slice" }],
|
|
484
474
|
["decoration-clone", { "box-decoration-break": "clone" }]
|
|
485
475
|
];
|
|
486
|
-
|
|
487
|
-
[/^caret-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-caret-opacity":
|
|
476
|
+
const caretOpacity = [
|
|
477
|
+
[/^caret-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-caret-opacity": index.handler.bracket.percent(d) })]
|
|
488
478
|
];
|
|
489
|
-
|
|
490
|
-
[/^caret-(.+)$/, colorResolver("caret-color", "caret")]
|
|
479
|
+
const caretColors = [
|
|
480
|
+
[/^caret-(.+)$/, colorResolver$2("caret-color", "caret")]
|
|
491
481
|
];
|
|
492
|
-
|
|
482
|
+
const imageRenderings = [
|
|
493
483
|
["image-render-auto", { "image-rendering": "auto" }],
|
|
494
484
|
["image-render-edge", { "image-rendering": "crisp-edges" }],
|
|
495
485
|
["image-render-pixel", [
|
|
@@ -500,28 +490,28 @@ var imageRenderings = [
|
|
|
500
490
|
["image-rendering", "pixelated"]
|
|
501
491
|
]]
|
|
502
492
|
];
|
|
503
|
-
|
|
493
|
+
const appearance = [
|
|
504
494
|
["appearance-none", {
|
|
505
495
|
"appearance": "none",
|
|
506
496
|
"-webkit-appearance": "none"
|
|
507
497
|
}]
|
|
508
498
|
];
|
|
509
|
-
|
|
499
|
+
const placeholder = [
|
|
510
500
|
[
|
|
511
501
|
/^placeholder-opacity-(\d+)$/,
|
|
512
502
|
([, d]) => ({
|
|
513
|
-
"placeholder-opacity":
|
|
503
|
+
"placeholder-opacity": index.handler.bracket.percent(d)
|
|
514
504
|
})
|
|
515
505
|
],
|
|
516
506
|
[
|
|
517
507
|
/^placeholder-(?!opacity)(.+)$/,
|
|
518
508
|
(match, config) => {
|
|
519
509
|
match[1] = match[1].replace(/^color-/, "");
|
|
520
|
-
return colorResolver("placeholder-color", "placeholder-color")(match, config);
|
|
510
|
+
return colorResolver$2("placeholder-color", "placeholder-color")(match, config);
|
|
521
511
|
}
|
|
522
512
|
]
|
|
523
513
|
];
|
|
524
|
-
|
|
514
|
+
const overflowValues$1 = [
|
|
525
515
|
"none",
|
|
526
516
|
"auto",
|
|
527
517
|
"hidden",
|
|
@@ -529,66 +519,61 @@ var overflowValues = [
|
|
|
529
519
|
"scroll",
|
|
530
520
|
"contain"
|
|
531
521
|
];
|
|
532
|
-
|
|
533
|
-
[/^overscroll-(.+)$/, ([, v]) => overflowValues.includes(v) ? { "overscroll-behavior": v } : void 0],
|
|
534
|
-
[/^overscroll-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overscroll-behavior-${d}`]: v } : void 0]
|
|
522
|
+
const overscrolls = [
|
|
523
|
+
[/^overscroll-(.+)$/, ([, v]) => overflowValues$1.includes(v) ? { "overscroll-behavior": v } : void 0],
|
|
524
|
+
[/^overscroll-([xy])-(.+)$/, ([, d, v]) => overflowValues$1.includes(v) ? { [`overscroll-behavior-${d}`]: v } : void 0]
|
|
535
525
|
];
|
|
536
526
|
|
|
537
|
-
|
|
538
|
-
var borderSizes = [
|
|
527
|
+
const borderSizes = [
|
|
539
528
|
[/^border$/, handlerBorder],
|
|
540
529
|
[/^(?:border|b)(?:-([^-]+))?$/, handlerBorder],
|
|
541
530
|
[/^(?:border|b)(?:-([^-]+))?(?:-([^-]+))?$/, handlerBorder]
|
|
542
531
|
];
|
|
543
|
-
|
|
532
|
+
const borderRadius = [
|
|
544
533
|
[/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
|
|
545
534
|
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?$/, handlerRounded],
|
|
546
535
|
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-([^-]+))?$/, handlerRounded]
|
|
547
536
|
];
|
|
548
|
-
|
|
537
|
+
const borderStyles = [
|
|
549
538
|
["border-solid", { "border-style": "solid" }],
|
|
550
539
|
["border-dashed", { "border-style": "dashed" }],
|
|
551
540
|
["border-dotted", { "border-style": "dotted" }],
|
|
552
541
|
["border-double", { "border-style": "double" }],
|
|
553
542
|
["border-none", { "border-style": "none" }]
|
|
554
543
|
];
|
|
555
|
-
|
|
544
|
+
const borders = [
|
|
556
545
|
borderSizes,
|
|
557
546
|
borderColors,
|
|
558
547
|
borderStyles,
|
|
559
548
|
borderRadius
|
|
560
549
|
].flat(1);
|
|
561
550
|
function handlerBorder([, a, b]) {
|
|
562
|
-
const [d, s = "1"] =
|
|
563
|
-
const v =
|
|
551
|
+
const [d, s = "1"] = index.directionMap[a] ? [a, b] : ["", a];
|
|
552
|
+
const v = index.handler.bracket.px(s);
|
|
564
553
|
if (v != null) {
|
|
565
554
|
return [
|
|
566
|
-
...
|
|
555
|
+
...index.directionMap[d].map((i) => [`border${i}-width`, v]),
|
|
567
556
|
["border-style", "solid"]
|
|
568
557
|
];
|
|
569
558
|
}
|
|
570
559
|
}
|
|
571
560
|
function handlerRounded([, a, b], { theme }) {
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
const v = ((_a = theme.borderRadius) == null ? void 0 : _a[s]) || _chunkLPZDYB4Jjs.handler.bracket.fraction.rem(s);
|
|
561
|
+
const [d, s = "DEFAULT"] = index.cornerMap[a] ? [a, b] : ["", a];
|
|
562
|
+
const v = theme.borderRadius?.[s] || index.handler.bracket.fraction.rem(s);
|
|
575
563
|
if (v != null)
|
|
576
|
-
return
|
|
564
|
+
return index.cornerMap[d].map((i) => [`border${i}-radius`, v]);
|
|
577
565
|
}
|
|
578
566
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
var queryMatcher = /@media \(min-width: (.+)\)/;
|
|
582
|
-
var container = [
|
|
567
|
+
const queryMatcher = /@media \(min-width: (.+)\)/;
|
|
568
|
+
const container = [
|
|
583
569
|
[
|
|
584
570
|
/^__container$/,
|
|
585
571
|
(m, { variantHandlers }) => {
|
|
586
|
-
var _a;
|
|
587
572
|
let width = "100%";
|
|
588
573
|
for (const v of variantHandlers) {
|
|
589
|
-
const query =
|
|
574
|
+
const query = core.toArray(v.parent || [])[0];
|
|
590
575
|
if (typeof query === "string") {
|
|
591
|
-
const match =
|
|
576
|
+
const match = query.match(queryMatcher)?.[1];
|
|
592
577
|
if (match)
|
|
593
578
|
width = match;
|
|
594
579
|
}
|
|
@@ -598,7 +583,7 @@ var container = [
|
|
|
598
583
|
{ internal: true }
|
|
599
584
|
]
|
|
600
585
|
];
|
|
601
|
-
|
|
586
|
+
const containerShortcuts = [
|
|
602
587
|
[/^(?:(\w+)[:-])?container$/, ([, bp], { theme }) => {
|
|
603
588
|
let points = Object.keys(theme.breakpoints || {});
|
|
604
589
|
if (bp) {
|
|
@@ -613,8 +598,7 @@ var containerShortcuts = [
|
|
|
613
598
|
}]
|
|
614
599
|
];
|
|
615
600
|
|
|
616
|
-
|
|
617
|
-
var transitionBasicProps = [
|
|
601
|
+
const transitionBasicProps = [
|
|
618
602
|
"color",
|
|
619
603
|
"border-color",
|
|
620
604
|
"background-color",
|
|
@@ -633,7 +617,7 @@ var transitionBasicProps = [
|
|
|
633
617
|
"transform",
|
|
634
618
|
"box-shadow"
|
|
635
619
|
];
|
|
636
|
-
|
|
620
|
+
const transitionPositionProps = [
|
|
637
621
|
"backround-position",
|
|
638
622
|
"left",
|
|
639
623
|
"right",
|
|
@@ -641,7 +625,7 @@ var transitionPositionProps = [
|
|
|
641
625
|
"bottom",
|
|
642
626
|
"object-position"
|
|
643
627
|
];
|
|
644
|
-
|
|
628
|
+
const transitionSizeProps = [
|
|
645
629
|
"max-height",
|
|
646
630
|
"min-height",
|
|
647
631
|
"max-width",
|
|
@@ -661,21 +645,21 @@ var transitionSizeProps = [
|
|
|
661
645
|
"letter-spacing",
|
|
662
646
|
"word-spacing"
|
|
663
647
|
];
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
648
|
+
const transitionSwitchProps = ["all", "none"];
|
|
649
|
+
const transitionEnhanceProps = ["stroke", "filter", "backdrop-filter", "fill", "mask", "mask-size", "mask-border", "clip-path", "clip"];
|
|
650
|
+
const transitionProps = [
|
|
667
651
|
...transitionBasicProps,
|
|
668
652
|
...transitionPositionProps,
|
|
669
653
|
...transitionSizeProps,
|
|
670
654
|
...transitionEnhanceProps
|
|
671
655
|
];
|
|
672
|
-
|
|
673
|
-
|
|
656
|
+
const transitionPropsStr = transitionProps.join(", ");
|
|
657
|
+
const validateProperty = (prop) => {
|
|
674
658
|
if (prop && ![...transitionProps, ...transitionSwitchProps].includes(prop))
|
|
675
659
|
return;
|
|
676
660
|
return prop || transitionPropsStr;
|
|
677
661
|
};
|
|
678
|
-
|
|
662
|
+
const transitions = [
|
|
679
663
|
[/^transition(?:-([a-z-]+))?(?:-(\d+))?$/, ([, prop, duration = "150"]) => {
|
|
680
664
|
const transitionProperty = validateProperty(prop);
|
|
681
665
|
if (!transitionProperty)
|
|
@@ -704,73 +688,72 @@ var transitions = [
|
|
|
704
688
|
}]
|
|
705
689
|
];
|
|
706
690
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
691
|
+
const varEmpty$1 = "var(--un-empty,/*!*/ /*!*/)";
|
|
692
|
+
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)";
|
|
693
|
+
const filterBase = {
|
|
694
|
+
"--un-blur": varEmpty$1,
|
|
695
|
+
"--un-brightness": varEmpty$1,
|
|
696
|
+
"--un-contrast": varEmpty$1,
|
|
697
|
+
"--un-grayscale": varEmpty$1,
|
|
698
|
+
"--un-hue-rotate": varEmpty$1,
|
|
699
|
+
"--un-invert": varEmpty$1,
|
|
700
|
+
"--un-saturate": varEmpty$1,
|
|
701
|
+
"--un-sepia": varEmpty$1,
|
|
702
|
+
"--un-drop-shadow": varEmpty$1,
|
|
703
|
+
"filter": filterContnet,
|
|
704
|
+
[pseudo.CONTROL_BYPASS_PSEUDO]: ""
|
|
713
705
|
};
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
706
|
+
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)";
|
|
707
|
+
const backdropFilterBase = {
|
|
708
|
+
"--un-backdrop-blur": varEmpty$1,
|
|
709
|
+
"--un-backdrop-brightness": varEmpty$1,
|
|
710
|
+
"--un-backdrop-contrast": varEmpty$1,
|
|
711
|
+
"--un-backdrop-grayscale": varEmpty$1,
|
|
712
|
+
"--un-backdrop-hue-rotate": varEmpty$1,
|
|
713
|
+
"--un-backdrop-invert": varEmpty$1,
|
|
714
|
+
"--un-backdrop-saturate": varEmpty$1,
|
|
715
|
+
"--un-backdrop-sepia": varEmpty$1,
|
|
716
|
+
"-webkit-backdrop-filter": backdropFilterContent,
|
|
717
|
+
"backdrop-filter": backdropFilterContent,
|
|
718
|
+
[pseudo.CONTROL_BYPASS_PSEUDO]: ""
|
|
718
719
|
};
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
"--un-brightness": varEmpty,
|
|
723
|
-
"--un-contrast": varEmpty,
|
|
724
|
-
"--un-grayscale": varEmpty,
|
|
725
|
-
"--un-hue-rotate": varEmpty,
|
|
726
|
-
"--un-invert": varEmpty,
|
|
727
|
-
"--un-saturate": varEmpty,
|
|
728
|
-
"--un-sepia": varEmpty,
|
|
729
|
-
"--un-drop-shadow": varEmpty,
|
|
730
|
-
"filter": filterContnet
|
|
720
|
+
const percentWithDefault = (defaultValue = "1") => (str) => {
|
|
721
|
+
const v = str ? index.handler.bracket.percent(str) : defaultValue;
|
|
722
|
+
return v && parseFloat(v) <= 1 ? v : void 0;
|
|
731
723
|
};
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
"--un-backdrop-saturate": varEmpty,
|
|
741
|
-
"--un-backdrop-sepia": varEmpty,
|
|
742
|
-
"-webkit-backdrop-filter": backdropFilterContent,
|
|
743
|
-
"backdrop-filter": backdropFilterContent
|
|
724
|
+
const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
|
|
725
|
+
const value = resolver(s, theme);
|
|
726
|
+
if (value) {
|
|
727
|
+
return [
|
|
728
|
+
b ? backdropFilterBase : filterBase,
|
|
729
|
+
{ [`--un-${b || ""}${varName}`]: `${varName}(${value})` }
|
|
730
|
+
];
|
|
731
|
+
}
|
|
744
732
|
};
|
|
745
|
-
|
|
746
|
-
["filter",
|
|
733
|
+
const filters = [
|
|
734
|
+
["filter", filterBase],
|
|
747
735
|
["filter-none", { filter: "none" }],
|
|
748
|
-
["backdrop-filter",
|
|
736
|
+
["backdrop-filter", backdropFilterBase],
|
|
749
737
|
["backdrop-filter-none", {
|
|
750
738
|
"-webkit-backdrop-filter": "none",
|
|
751
739
|
"backdrop-filter": "none"
|
|
752
740
|
}],
|
|
753
|
-
[/^(backdrop-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) =>
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
})],
|
|
757
|
-
[/^(backdrop-)?brightness-(\d+)$/, toFilter("brightness", (s) => _chunkLPZDYB4Jjs.handler.bracket.percent(s))],
|
|
758
|
-
[/^(backdrop-)?contrast-(\d+)$/, toFilter("contrast", (s) => _chunkLPZDYB4Jjs.handler.bracket.percent(s))],
|
|
741
|
+
[/^(backdrop-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || index.handler.bracket.px(s))],
|
|
742
|
+
[/^(backdrop-)?brightness-(\d+)$/, toFilter("brightness", (s) => index.handler.bracket.percent(s))],
|
|
743
|
+
[/^(backdrop-)?contrast-(\d+)$/, toFilter("contrast", (s) => index.handler.bracket.percent(s))],
|
|
759
744
|
[/^()?drop-shadow(?:-(.+))?$/, toFilter("drop-shadow", (s, theme) => {
|
|
760
|
-
|
|
761
|
-
const v = _chunkLPZDYB4Jjs.handler.bracket(s) || ((_a = theme.dropShadow) == null ? void 0 : _a[s || "DEFAULT"]);
|
|
745
|
+
const v = index.handler.bracket(s) || theme.dropShadow?.[s || "DEFAULT"];
|
|
762
746
|
if (v)
|
|
763
|
-
return
|
|
747
|
+
return core.toArray(v).map((v2) => `drop-shadow(${v2})`).join(" ");
|
|
764
748
|
})],
|
|
765
749
|
[/^(backdrop-)?grayscale(?:-(\d+))?$/, toFilter("grayscale", percentWithDefault())],
|
|
766
|
-
[/^(backdrop-)?hue-rotate-(\d+)$/, toFilter("hue-rotate", (s) => `${
|
|
750
|
+
[/^(backdrop-)?hue-rotate-(\d+)$/, toFilter("hue-rotate", (s) => `${index.handler.bracket.number(s)}deg`)],
|
|
767
751
|
[/^(backdrop-)?invert(?:-(\d+))?$/, toFilter("invert", percentWithDefault())],
|
|
768
752
|
[/^(backdrop-)?saturate(?:-(\d+))?$/, toFilter("saturate", percentWithDefault("0"))],
|
|
769
753
|
[/^(backdrop-)?sepia(?:-(\d+))?$/, toFilter("sepia", percentWithDefault())]
|
|
770
754
|
];
|
|
771
755
|
|
|
772
|
-
|
|
773
|
-
var flex = [
|
|
756
|
+
const flex = [
|
|
774
757
|
["flex-col", { "flex-direction": "column" }],
|
|
775
758
|
["flex-col-reverse", { "flex-direction": "column-reverse" }],
|
|
776
759
|
["flex-row", { "flex-direction": "row" }],
|
|
@@ -792,12 +775,155 @@ var flex = [
|
|
|
792
775
|
["flex-inline", { display: "inline-flex" }]
|
|
793
776
|
];
|
|
794
777
|
|
|
795
|
-
|
|
778
|
+
const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
|
|
779
|
+
const displays = [
|
|
780
|
+
["inline", { display: "inline" }],
|
|
781
|
+
["block", { display: "block" }],
|
|
782
|
+
["inline-block", { display: "inline-block" }],
|
|
783
|
+
["contents", { display: "contents" }],
|
|
784
|
+
["flow-root", { display: "flow-root" }],
|
|
785
|
+
["list-item", { display: "list-item" }],
|
|
786
|
+
["hidden", { display: "none" }]
|
|
787
|
+
];
|
|
788
|
+
const appearances = [
|
|
789
|
+
["visible", { visibility: "visible" }],
|
|
790
|
+
["invisible", { visibility: "hidden" }],
|
|
791
|
+
["backface-visible", { "backface-visibility": "visible" }],
|
|
792
|
+
["backface-hidden", { "backface-visibility": "hidden" }]
|
|
793
|
+
];
|
|
794
|
+
const cursors = [
|
|
795
|
+
[/^cursor-(.+)$/, ([, c]) => ({ cursor: c })]
|
|
796
|
+
];
|
|
797
|
+
const pointerEvents = [
|
|
798
|
+
["pointer-events-none", { "pointer-events": "none" }],
|
|
799
|
+
["pointer-events-auto", { "pointer-events": "auto" }]
|
|
800
|
+
];
|
|
801
|
+
const resizes = [
|
|
802
|
+
["resize-none", { resize: "none" }],
|
|
803
|
+
["resize-x", { resize: "horizontal" }],
|
|
804
|
+
["resize-y", { resize: "vertical" }],
|
|
805
|
+
["resize", { resize: "both" }]
|
|
806
|
+
];
|
|
807
|
+
const userSelects = [
|
|
808
|
+
[/^select-(none|text|all|auto)$/, ([, v]) => ({ "user-select": v })]
|
|
809
|
+
];
|
|
810
|
+
const whitespaces = [
|
|
811
|
+
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v })]
|
|
812
|
+
];
|
|
813
|
+
const contents = [
|
|
814
|
+
["content-empty", { content: '""' }]
|
|
815
|
+
];
|
|
816
|
+
const breaks = [
|
|
817
|
+
["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
|
|
818
|
+
["break-word", { "overflow-wrap": "break-word" }],
|
|
819
|
+
["break-all", { "word-break": "break-all" }]
|
|
820
|
+
];
|
|
821
|
+
const textOverflows = [
|
|
822
|
+
["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
|
|
823
|
+
["text-ellipsis", { "text-overflow": "ellipsis" }],
|
|
824
|
+
["text-clip", { "text-overflow": "clip" }]
|
|
825
|
+
];
|
|
826
|
+
const textTransforms = [
|
|
827
|
+
["case-upper", { "text-transform": "uppercase" }],
|
|
828
|
+
["case-lower", { "text-transform": "lowercase" }],
|
|
829
|
+
["case-capital", { "text-transform": "capitalize" }],
|
|
830
|
+
["case-normal", { "text-transform": "none" }],
|
|
831
|
+
["uppercase", { "text-transform": "uppercase" }],
|
|
832
|
+
["lowercase", { "text-transform": "lowercase" }],
|
|
833
|
+
["capitalize", { "text-transform": "capitalize" }],
|
|
834
|
+
["normal-case", { "text-transform": "none" }]
|
|
835
|
+
];
|
|
836
|
+
const textDecorations = [
|
|
837
|
+
["underline", { "text-decoration": "underline" }],
|
|
838
|
+
["line-through", { "text-decoration": "line-through" }],
|
|
839
|
+
["no-underline", { "text-decoration": "none" }]
|
|
840
|
+
];
|
|
841
|
+
const textDecorationStyles = [
|
|
842
|
+
["underline-solid", { "text-decoration-style": "solid" }],
|
|
843
|
+
["underline-double", { "text-decoration-style": "double" }],
|
|
844
|
+
["underline-dotted", { "text-decoration-style": "dotted" }],
|
|
845
|
+
["underline-dashed", { "text-decoration-style": "dashed" }]
|
|
846
|
+
];
|
|
847
|
+
const fontStyles = [
|
|
848
|
+
["italic", { "font-style": "italic" }],
|
|
849
|
+
["not-italic", { "font-style": "normal" }]
|
|
850
|
+
];
|
|
851
|
+
const fontSmoothings = [
|
|
852
|
+
["antialiased", {
|
|
853
|
+
"-webkit-font-smoothing": "antialiased",
|
|
854
|
+
"-moz-osx-font-smoothing": "grayscale",
|
|
855
|
+
"font-smoothing": "grayscale"
|
|
856
|
+
}],
|
|
857
|
+
["subpixel-antialiased", {
|
|
858
|
+
"-webkit-font-smoothing": "auto",
|
|
859
|
+
"-moz-osx-font-smoothing": "auto",
|
|
860
|
+
"font-smoothing": "auto"
|
|
861
|
+
}]
|
|
862
|
+
];
|
|
863
|
+
const hyphens = [
|
|
864
|
+
["hyphens-none", {
|
|
865
|
+
"-webkit-hyphens": "none",
|
|
866
|
+
"-ms-hyphens": "none",
|
|
867
|
+
"hyphens": "none"
|
|
868
|
+
}],
|
|
869
|
+
["hyphens-manual", {
|
|
870
|
+
"-webkit-hyphens": "manual",
|
|
871
|
+
"-ms-hyphens": "manual",
|
|
872
|
+
"hyphens": "manual"
|
|
873
|
+
}],
|
|
874
|
+
["hyphens-auto", {
|
|
875
|
+
"-webkit-hyphens": "auto",
|
|
876
|
+
"-ms-hyphens": "auto",
|
|
877
|
+
"hyphens": "auto"
|
|
878
|
+
}]
|
|
879
|
+
];
|
|
880
|
+
const writingModes = [
|
|
881
|
+
["write-normal", { "writing-mode": "horizontal-tb" }],
|
|
882
|
+
["write-vertical-right", { "writing-mode": "vertical-rl" }],
|
|
883
|
+
["write-vertical-left", { "writing-mode": "vertical-lr" }]
|
|
884
|
+
];
|
|
885
|
+
const writingOrientations = [
|
|
886
|
+
["write-orient-mixed", { "text-orientation": "mixed" }],
|
|
887
|
+
["write-orient-upright", { "text-orientation": "upright" }],
|
|
888
|
+
["write-orient-sideways", { "text-orientation": "sideways" }]
|
|
889
|
+
];
|
|
890
|
+
const screenReadersAccess = [
|
|
891
|
+
[
|
|
892
|
+
"sr-only",
|
|
893
|
+
{
|
|
894
|
+
"position": "absolute",
|
|
895
|
+
"width": "1px",
|
|
896
|
+
"height": "1px",
|
|
897
|
+
"padding": "0",
|
|
898
|
+
"margin": "-1px",
|
|
899
|
+
"overflow": "hidden",
|
|
900
|
+
"clip": "rect(0,0,0,0)",
|
|
901
|
+
"white-space": "nowrap",
|
|
902
|
+
"border-width": 0
|
|
903
|
+
}
|
|
904
|
+
],
|
|
905
|
+
[
|
|
906
|
+
"not-sr-only",
|
|
907
|
+
{
|
|
908
|
+
"position": "static",
|
|
909
|
+
"width": "auto",
|
|
910
|
+
"height": "auto",
|
|
911
|
+
"padding": "0",
|
|
912
|
+
"margin": "0",
|
|
913
|
+
"overflow": "visible",
|
|
914
|
+
"clip": "auto",
|
|
915
|
+
"white-space": "normal"
|
|
916
|
+
}
|
|
917
|
+
]
|
|
918
|
+
];
|
|
919
|
+
const isolations = [
|
|
920
|
+
["isolate", { isolation: "isolate" }],
|
|
921
|
+
["isolate-auto", { isolation: "auto" }]
|
|
922
|
+
];
|
|
796
923
|
|
|
797
|
-
|
|
924
|
+
const fontsFamilies = [
|
|
798
925
|
[/^font-(\w+)$/, ([, d], { theme }) => {
|
|
799
|
-
|
|
800
|
-
const font = (_a = theme.fontFamily) == null ? void 0 : _a[d];
|
|
926
|
+
const font = theme.fontFamily?.[d];
|
|
801
927
|
if (font) {
|
|
802
928
|
return {
|
|
803
929
|
"font-family": font
|
|
@@ -805,7 +931,7 @@ var fontsFamilies = [
|
|
|
805
931
|
}
|
|
806
932
|
}]
|
|
807
933
|
];
|
|
808
|
-
|
|
934
|
+
const weightMap = {
|
|
809
935
|
thin: "100",
|
|
810
936
|
extralight: "200",
|
|
811
937
|
light: "300",
|
|
@@ -816,11 +942,10 @@ var weightMap = {
|
|
|
816
942
|
extrabold: "800",
|
|
817
943
|
black: "900"
|
|
818
944
|
};
|
|
819
|
-
|
|
945
|
+
const fontSizes = [
|
|
820
946
|
[/^text-([^-]+)$/, ([, s = "base"], { theme }) => {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
if (result == null ? void 0 : result[0]) {
|
|
947
|
+
const result = core.toArray(theme.fontSize?.[s] || index.handler.bracket.rem(s));
|
|
948
|
+
if (result?.[0]) {
|
|
824
949
|
const [size, height = "1"] = result;
|
|
825
950
|
return {
|
|
826
951
|
"font-size": size,
|
|
@@ -829,41 +954,38 @@ var fontSizes = [
|
|
|
829
954
|
}
|
|
830
955
|
}]
|
|
831
956
|
];
|
|
832
|
-
|
|
957
|
+
const fontWeights = [
|
|
833
958
|
[/^(?:font|fw)-?([^-]+)$/, ([, s]) => {
|
|
834
|
-
const v = weightMap[s] ||
|
|
959
|
+
const v = weightMap[s] || index.handler.number(s);
|
|
835
960
|
if (v)
|
|
836
961
|
return { "font-weight": v };
|
|
837
962
|
}]
|
|
838
963
|
];
|
|
839
|
-
|
|
964
|
+
const leadings = [
|
|
840
965
|
[/^(?:leading|lh)-([^-]+)$/, ([, s], { theme }) => {
|
|
841
|
-
|
|
842
|
-
const v = ((_a = theme.lineHeight) == null ? void 0 : _a[s]) || _chunkLPZDYB4Jjs.handler.bracket.rem(s);
|
|
966
|
+
const v = theme.lineHeight?.[s] || index.handler.bracket.rem(s);
|
|
843
967
|
if (v !== null)
|
|
844
968
|
return { "line-height": v };
|
|
845
969
|
}]
|
|
846
970
|
];
|
|
847
|
-
|
|
971
|
+
const trackings = [
|
|
848
972
|
[/^tracking-([^-]+)$/, ([, s], { theme }) => {
|
|
849
|
-
|
|
850
|
-
const v = ((_a = theme.letterSpacing) == null ? void 0 : _a[s]) || _chunkLPZDYB4Jjs.handler.bracket.rem(s);
|
|
973
|
+
const v = theme.letterSpacing?.[s] || index.handler.bracket.rem(s);
|
|
851
974
|
if (v !== null)
|
|
852
975
|
return { "letter-spacing": v };
|
|
853
976
|
}]
|
|
854
977
|
];
|
|
855
|
-
|
|
978
|
+
const wordSpacings = [
|
|
856
979
|
[/^word-spacing-([^-]+)$/, ([, s], { theme }) => {
|
|
857
|
-
|
|
858
|
-
const v = ((_a = theme.wordSpacing) == null ? void 0 : _a[s]) || _chunkLPZDYB4Jjs.handler.bracket.rem(s);
|
|
980
|
+
const v = theme.wordSpacing?.[s] || index.handler.bracket.rem(s);
|
|
859
981
|
if (v !== null)
|
|
860
982
|
return { "word-spacing": v };
|
|
861
983
|
}]
|
|
862
984
|
];
|
|
863
|
-
|
|
985
|
+
const tabSizes = [
|
|
864
986
|
[/^tab-?([^-]*)$/, ([, s]) => {
|
|
865
987
|
s = s || "4";
|
|
866
|
-
const v =
|
|
988
|
+
const v = index.handler.bracket.global.number(s);
|
|
867
989
|
if (v !== null) {
|
|
868
990
|
return {
|
|
869
991
|
"-moz-tab-size": v,
|
|
@@ -873,54 +995,70 @@ var tabSizes = [
|
|
|
873
995
|
}
|
|
874
996
|
}]
|
|
875
997
|
];
|
|
876
|
-
|
|
998
|
+
const textDecorationLengths = [
|
|
877
999
|
[/^underline-([^-]+)$/, ([, s]) => {
|
|
878
|
-
const v = s === "auto" ? s :
|
|
1000
|
+
const v = s === "auto" ? s : index.handler.bracket.px(s);
|
|
879
1001
|
if (v != null)
|
|
880
1002
|
return { "text-decoration-thickness": v };
|
|
881
1003
|
}]
|
|
882
1004
|
];
|
|
883
|
-
|
|
1005
|
+
const textDecorationOffsets = [
|
|
884
1006
|
[/^underline-offset-([^-]+)$/, ([, s]) => {
|
|
885
|
-
const v = s === "auto" ? s :
|
|
1007
|
+
const v = s === "auto" ? s : index.handler.bracket.px(s);
|
|
886
1008
|
if (v != null)
|
|
887
1009
|
return { "text-underline-offset": v };
|
|
888
1010
|
}]
|
|
889
1011
|
];
|
|
890
|
-
|
|
1012
|
+
const textIndents = [
|
|
891
1013
|
[/^indent(?:-(.+))?$/, ([, s], { theme }) => {
|
|
892
|
-
|
|
893
|
-
const v = ((_a = theme.textIndent) == null ? void 0 : _a[s || "DEFAULT"]) || _chunkLPZDYB4Jjs.handler.bracket.cssvar.fraction.rem(s);
|
|
1014
|
+
const v = theme.textIndent?.[s || "DEFAULT"] || index.handler.bracket.cssvar.fraction.rem(s);
|
|
894
1015
|
if (v != null)
|
|
895
1016
|
return { "text-indent": v };
|
|
896
1017
|
}]
|
|
897
1018
|
];
|
|
898
|
-
|
|
1019
|
+
const textStrokeWidths = [
|
|
899
1020
|
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => {
|
|
900
|
-
|
|
901
|
-
const v = ((_a = theme.textStrokeWidth) == null ? void 0 : _a[s || "DEFAULT"]) || _chunkLPZDYB4Jjs.handler.bracket.cssvar.px(s);
|
|
1021
|
+
const v = theme.textStrokeWidth?.[s || "DEFAULT"] || index.handler.bracket.cssvar.px(s);
|
|
902
1022
|
if (v != null)
|
|
903
1023
|
return { "-webkit-text-stroke-width": v };
|
|
904
1024
|
}]
|
|
905
1025
|
];
|
|
906
|
-
|
|
1026
|
+
const textShadows = [
|
|
907
1027
|
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
908
|
-
|
|
909
|
-
const v = ((_a = theme.textShadow) == null ? void 0 : _a[s || "DEFAULT"]) || _chunkLPZDYB4Jjs.handler.bracket.cssvar(s);
|
|
1028
|
+
const v = theme.textShadow?.[s || "DEFAULT"] || index.handler.bracket.cssvar(s);
|
|
910
1029
|
if (v != null)
|
|
911
1030
|
return { "text-shadow": v };
|
|
912
1031
|
}]
|
|
913
1032
|
];
|
|
914
|
-
|
|
1033
|
+
const fontVariantNumericBase = {
|
|
1034
|
+
"--un-ordinal": varEmpty,
|
|
1035
|
+
"--un-slashed-zero": varEmpty,
|
|
1036
|
+
"--un-numeric-figure": varEmpty,
|
|
1037
|
+
"--un-numeric-spacing": varEmpty,
|
|
1038
|
+
"--un-numeric-fraction": varEmpty,
|
|
1039
|
+
"font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)",
|
|
1040
|
+
[pseudo.CONTROL_BYPASS_PSEUDO]: ""
|
|
1041
|
+
};
|
|
1042
|
+
const fontVariantNumeric = [
|
|
1043
|
+
[/^ordinal$/, () => [fontVariantNumericBase, { "--un-ordinal": "ordinal" }]],
|
|
1044
|
+
[/^slashed-zero$/, () => [fontVariantNumericBase, { "--un-slashed-zero": "slashed-zero" }]],
|
|
1045
|
+
[/^lining-nums$/, () => [fontVariantNumericBase, { "--un-numeric-figure": "lining-nums" }]],
|
|
1046
|
+
[/^oldstyle-nums$/, () => [fontVariantNumericBase, { "--un-numeric-figure": "oldstyle-nums" }]],
|
|
1047
|
+
[/^proportional-nums$/, () => [fontVariantNumericBase, { "--un-numeric-spacing": "proportional-nums" }]],
|
|
1048
|
+
[/^tabular-nums$/, () => [fontVariantNumericBase, { "--un-numeric-spacing": "tabular-nums" }]],
|
|
1049
|
+
[/^diagonal-fractions$/, () => [fontVariantNumericBase, { "--un-numeric-fraction": "diagonal-fractions" }]],
|
|
1050
|
+
[/^stacked-fractions$/, () => [fontVariantNumericBase, { "--un-numeric-fraction": "stacked-fractions" }]],
|
|
1051
|
+
["normal-nums", { "font-variant-numeric": "normal" }]
|
|
1052
|
+
];
|
|
1053
|
+
const fonts = [
|
|
915
1054
|
fontsFamilies,
|
|
916
1055
|
fontSizes,
|
|
917
1056
|
fontWeights
|
|
918
1057
|
].flat(1);
|
|
919
1058
|
|
|
920
|
-
|
|
921
|
-
var gaps = [
|
|
1059
|
+
const gaps = [
|
|
922
1060
|
[/^(?:flex-|grid-)?gap-([^-]+)$/, ([, s]) => {
|
|
923
|
-
const v =
|
|
1061
|
+
const v = index.handler.bracket.rem(s);
|
|
924
1062
|
if (v != null) {
|
|
925
1063
|
return {
|
|
926
1064
|
"grid-gap": v,
|
|
@@ -929,7 +1067,7 @@ var gaps = [
|
|
|
929
1067
|
}
|
|
930
1068
|
}],
|
|
931
1069
|
[/^(?:flex-|grid-)?gap-x-([^-]+)$/, ([, s]) => {
|
|
932
|
-
const v =
|
|
1070
|
+
const v = index.handler.bracket.rem(s);
|
|
933
1071
|
if (v != null) {
|
|
934
1072
|
return {
|
|
935
1073
|
"grid-column-gap": v,
|
|
@@ -938,7 +1076,7 @@ var gaps = [
|
|
|
938
1076
|
}
|
|
939
1077
|
}],
|
|
940
1078
|
[/^(?:flex-|grid-)?gap-y-([^-]+)$/, ([, s]) => {
|
|
941
|
-
const v =
|
|
1079
|
+
const v = index.handler.bracket.rem(s);
|
|
942
1080
|
if (v != null) {
|
|
943
1081
|
return {
|
|
944
1082
|
"grid-row-gap": v,
|
|
@@ -948,13 +1086,8 @@ var gaps = [
|
|
|
948
1086
|
}]
|
|
949
1087
|
];
|
|
950
1088
|
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
var calSize = (s, theme) => {
|
|
954
|
-
var _a;
|
|
955
|
-
return _core.toArray.call(void 0, ((_a = theme.fontSize) == null ? void 0 : _a[s]) || _chunkLPZDYB4Jjs.handler.bracket.rem(s))[0];
|
|
956
|
-
};
|
|
957
|
-
var autoDirection = (selector, theme) => {
|
|
1089
|
+
const calSize = (s, theme) => core.toArray(theme.fontSize?.[s] || index.handler.bracket.rem(s))[0];
|
|
1090
|
+
const autoDirection = (selector, theme) => {
|
|
958
1091
|
if (selector === "min")
|
|
959
1092
|
return "min-content";
|
|
960
1093
|
else if (selector === "max")
|
|
@@ -963,7 +1096,7 @@ var autoDirection = (selector, theme) => {
|
|
|
963
1096
|
return "minmax(0,1fr)";
|
|
964
1097
|
return calSize(selector, theme);
|
|
965
1098
|
};
|
|
966
|
-
|
|
1099
|
+
const grids = [
|
|
967
1100
|
["grid", { display: "grid" }],
|
|
968
1101
|
["inline-grid", { display: "inline-grid" }],
|
|
969
1102
|
[/^grid-cols-minmax-([\w.-]+)$/, ([, d]) => ({ "grid-template-columns": `repeat(auto-fill, minmax(${d}, 1fr))` })],
|
|
@@ -973,9 +1106,8 @@ var grids = [
|
|
|
973
1106
|
[/^grid-cols-\[(.+)\]$/, ([, v]) => ({ "grid-template-columns": v.replace(/,/g, " ") })],
|
|
974
1107
|
[/^grid-rows-\[(.+)\]$/, ([, v]) => ({ "grid-template-rows": v.replace(/,/g, " ") })],
|
|
975
1108
|
[/^(?:grid-)?(row|col)-(.+)$/, ([, d, v]) => {
|
|
976
|
-
var _a;
|
|
977
1109
|
const key = d === "row" ? "grid-row" : "grid-column";
|
|
978
|
-
let raw =
|
|
1110
|
+
let raw = index.handler.bracket(v);
|
|
979
1111
|
if (raw)
|
|
980
1112
|
return { [key]: raw };
|
|
981
1113
|
const parts = v.split("-");
|
|
@@ -984,7 +1116,7 @@ var grids = [
|
|
|
984
1116
|
if (parts[0] === "span") {
|
|
985
1117
|
if (parts[1] === "full")
|
|
986
1118
|
return { [key]: "1/-1" };
|
|
987
|
-
raw =
|
|
1119
|
+
raw = index.handler.number.bracket(parts[1])?.toString().replace(/_/g, " ");
|
|
988
1120
|
if (raw)
|
|
989
1121
|
return { [key]: `span ${raw}/span ${raw}` };
|
|
990
1122
|
}
|
|
@@ -998,27 +1130,25 @@ var grids = [
|
|
|
998
1130
|
[/^(?:grid-)?auto-cols-([\w.-]+)$/, ([, v], { theme }) => ({ "grid-auto-columns": `${autoDirection(v, theme)}` })]
|
|
999
1131
|
];
|
|
1000
1132
|
|
|
1001
|
-
|
|
1002
|
-
var overflowValues2 = [
|
|
1133
|
+
const overflowValues = [
|
|
1003
1134
|
"auto",
|
|
1004
1135
|
"hidden",
|
|
1005
1136
|
"visible",
|
|
1006
1137
|
"scroll"
|
|
1007
1138
|
];
|
|
1008
|
-
|
|
1009
|
-
[/^(?:overflow|of)-(.+)$/, ([, v]) =>
|
|
1010
|
-
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) =>
|
|
1139
|
+
const overflows = [
|
|
1140
|
+
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0],
|
|
1141
|
+
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overflow-${d}`]: v } : void 0]
|
|
1011
1142
|
];
|
|
1012
1143
|
|
|
1013
|
-
|
|
1014
|
-
var positions = [
|
|
1144
|
+
const positions = [
|
|
1015
1145
|
["relative", { position: "relative" }],
|
|
1016
1146
|
["absolute", { position: "absolute" }],
|
|
1017
1147
|
["fixed", { position: "fixed" }],
|
|
1018
1148
|
["sticky", { position: "sticky" }],
|
|
1019
1149
|
["static", { position: "static" }]
|
|
1020
1150
|
];
|
|
1021
|
-
|
|
1151
|
+
const justifies = [
|
|
1022
1152
|
["justify-start", { "justify-content": "flex-start" }],
|
|
1023
1153
|
["justify-end", { "justify-content": "flex-end" }],
|
|
1024
1154
|
["justify-center", { "justify-content": "center" }],
|
|
@@ -1026,13 +1156,13 @@ var justifies = [
|
|
|
1026
1156
|
["justify-around", { "justify-content": "space-around" }],
|
|
1027
1157
|
["justify-evenly", { "justify-content": "space-evenly" }]
|
|
1028
1158
|
];
|
|
1029
|
-
|
|
1030
|
-
[/^order-(.+)$/, ([, v]) => ({ order: { first: "-9999", last: "9999", none: "0" }[v] ||
|
|
1159
|
+
const orders = [
|
|
1160
|
+
[/^order-(.+)$/, ([, v]) => ({ order: { first: "-9999", last: "9999", none: "0" }[v] || index.handler.bracket.number(v) })]
|
|
1031
1161
|
];
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1162
|
+
const basicSet = ["auto", "start", "end", "center", "stretch"];
|
|
1163
|
+
const justifyItems = basicSet.map((i) => [`justify-items-${i}`, { "justify-items": i }]);
|
|
1164
|
+
const justifySelfs = basicSet.map((i) => [`justify-self-${i}`, { "justify-self": i }]);
|
|
1165
|
+
const alignContents = [
|
|
1036
1166
|
["content-start", { "align-content": "flex-start" }],
|
|
1037
1167
|
["content-end", { "align-content": "flex-end" }],
|
|
1038
1168
|
["content-center", { "align-content": "center" }],
|
|
@@ -1040,21 +1170,21 @@ var alignContents = [
|
|
|
1040
1170
|
["content-around", { "align-content": "space-around" }],
|
|
1041
1171
|
["content-evenly", { "align-content": "space-evenly" }]
|
|
1042
1172
|
];
|
|
1043
|
-
|
|
1173
|
+
const alignItems = [
|
|
1044
1174
|
["items-start", { "align-items": "flex-start" }],
|
|
1045
1175
|
["items-end", { "align-items": "flex-end" }],
|
|
1046
1176
|
["items-center", { "align-items": "center" }],
|
|
1047
1177
|
["items-baseline", { "align-items": "baseline" }],
|
|
1048
1178
|
["items-stretch", { "align-items": "stretch" }]
|
|
1049
1179
|
];
|
|
1050
|
-
|
|
1180
|
+
const alignSelfs = [
|
|
1051
1181
|
["self-auto", { "align-self": "auto" }],
|
|
1052
1182
|
["self-start", { "align-self": "flex-start" }],
|
|
1053
1183
|
["self-end", { "align-self": "flex-end" }],
|
|
1054
1184
|
["self-center", { "align-self": "center" }],
|
|
1055
1185
|
["self-stretch", { "align-items": "stretch" }]
|
|
1056
1186
|
];
|
|
1057
|
-
|
|
1187
|
+
const placeContents = [
|
|
1058
1188
|
["place-content-start", { "place-content": "start" }],
|
|
1059
1189
|
["place-content-end", { "place-content": "end" }],
|
|
1060
1190
|
["place-content-center", { "place-content": "center" }],
|
|
@@ -1063,29 +1193,28 @@ var placeContents = [
|
|
|
1063
1193
|
["place-content-evenly", { "place-content": "space-evenly" }],
|
|
1064
1194
|
["place-content-stretch", { "place-content": "stretch" }]
|
|
1065
1195
|
];
|
|
1066
|
-
|
|
1067
|
-
|
|
1196
|
+
const placeItems = basicSet.map((i) => [`place-items-${i}`, { "place-items": i }]);
|
|
1197
|
+
const placeSelfs = basicSet.map((i) => [`place-self-${i}`, { "place-self": i }]);
|
|
1068
1198
|
function handleInsetValue(v) {
|
|
1069
|
-
|
|
1070
|
-
return (_a = { auto: "auto", full: "100%" }[v]) != null ? _a : _chunkLPZDYB4Jjs.handler.bracket.fraction.cssvar.rem(v);
|
|
1199
|
+
return { auto: "auto", full: "100%" }[v] ?? index.handler.bracket.fraction.cssvar.rem(v);
|
|
1071
1200
|
}
|
|
1072
|
-
|
|
1201
|
+
const insets = [
|
|
1073
1202
|
[/^(top|left|right|bottom|inset)-(.+)$/, ([, d, v]) => ({ [d]: handleInsetValue(v) })],
|
|
1074
1203
|
[/^inset-([xy])-(.+)$/, ([, d, v]) => {
|
|
1075
1204
|
const r = handleInsetValue(v);
|
|
1076
|
-
if (r != null && d in
|
|
1077
|
-
return
|
|
1205
|
+
if (r != null && d in index.directionMap)
|
|
1206
|
+
return index.directionMap[d].map((i) => [i.slice(1), r]);
|
|
1078
1207
|
}]
|
|
1079
1208
|
];
|
|
1080
|
-
|
|
1209
|
+
const floats = [
|
|
1081
1210
|
[/^float-(left|right|none)$/, ([, value]) => ({ float: value })],
|
|
1082
1211
|
[/^clear-(left|right|both|none)$/, ([, value]) => ({ clear: value })]
|
|
1083
1212
|
];
|
|
1084
|
-
|
|
1213
|
+
const zIndexes = [
|
|
1085
1214
|
["z-auto", { "z-index": "auto" }],
|
|
1086
|
-
[/^z-([^-]+)$/, ([, v]) => ({ "z-index":
|
|
1215
|
+
[/^z-([^-]+)$/, ([, v]) => ({ "z-index": index.handler.number(v) })]
|
|
1087
1216
|
];
|
|
1088
|
-
|
|
1217
|
+
const objectPositions = [
|
|
1089
1218
|
["object-cover", { "object-fit": "cover" }],
|
|
1090
1219
|
["object-contain", { "object-fit": "contain" }],
|
|
1091
1220
|
["object-fill", { "object-fit": "fill" }],
|
|
@@ -1103,7 +1232,7 @@ var objectPositions = [
|
|
|
1103
1232
|
["object-cb", { "object-position": "center bottom" }],
|
|
1104
1233
|
["object-ct", { "object-position": "center top" }]
|
|
1105
1234
|
];
|
|
1106
|
-
|
|
1235
|
+
const boxSizing = [
|
|
1107
1236
|
[
|
|
1108
1237
|
/^box-(border|content)$/,
|
|
1109
1238
|
([, value]) => ({
|
|
@@ -1112,10 +1241,9 @@ var boxSizing = [
|
|
|
1112
1241
|
]
|
|
1113
1242
|
];
|
|
1114
1243
|
|
|
1115
|
-
|
|
1116
|
-
var rings = [
|
|
1244
|
+
const rings = [
|
|
1117
1245
|
[/^ring-?(.*)$/, ([, d]) => {
|
|
1118
|
-
const value =
|
|
1246
|
+
const value = index.handler.px(d || "1");
|
|
1119
1247
|
if (value) {
|
|
1120
1248
|
return {
|
|
1121
1249
|
"--un-ring-inset": "var(--un-empty, )",
|
|
@@ -1130,7 +1258,7 @@ var rings = [
|
|
|
1130
1258
|
}
|
|
1131
1259
|
}],
|
|
1132
1260
|
[/^ring-offset-?(.*)$/, ([, d]) => {
|
|
1133
|
-
const value =
|
|
1261
|
+
const value = index.handler.px(d || "1");
|
|
1134
1262
|
if (value) {
|
|
1135
1263
|
return {
|
|
1136
1264
|
"--un-ring-offset-width": value
|
|
@@ -1142,8 +1270,7 @@ var rings = [
|
|
|
1142
1270
|
...ringOffsetColors
|
|
1143
1271
|
];
|
|
1144
1272
|
|
|
1145
|
-
|
|
1146
|
-
var colorResolver3 = (body, theme) => {
|
|
1273
|
+
const colorResolver = (body, theme) => {
|
|
1147
1274
|
const data = parseColorUtil(body, theme);
|
|
1148
1275
|
if (!data)
|
|
1149
1276
|
return;
|
|
@@ -1160,7 +1287,7 @@ var colorResolver3 = (body, theme) => {
|
|
|
1160
1287
|
};
|
|
1161
1288
|
}
|
|
1162
1289
|
};
|
|
1163
|
-
|
|
1290
|
+
const mixBlendModes = [
|
|
1164
1291
|
["mix-blend-normal", { "mix-blend-mode": "normal" }],
|
|
1165
1292
|
["mix-blend-multiply", { "mix-blend-mode": "multiply" }],
|
|
1166
1293
|
["mix-blend-screen", { "mix-blend-mode": "screen" }],
|
|
@@ -1178,10 +1305,9 @@ var mixBlendModes = [
|
|
|
1178
1305
|
["mix-blend-color", { "mix-blend-mode": "color" }],
|
|
1179
1306
|
["mix-blend-luminosity", { "mix-blend-mode": "luminosity" }]
|
|
1180
1307
|
];
|
|
1181
|
-
|
|
1308
|
+
const boxShadows = [
|
|
1182
1309
|
[/^shadow-?(.*)$/, ([, d], { theme }) => {
|
|
1183
|
-
|
|
1184
|
-
const value = (_a = theme == null ? void 0 : theme.boxShadow) == null ? void 0 : _a[d || "DEFAULT"];
|
|
1310
|
+
const value = theme?.boxShadow?.[d || "DEFAULT"];
|
|
1185
1311
|
if (value) {
|
|
1186
1312
|
return {
|
|
1187
1313
|
"--un-shadow-color": "0,0,0",
|
|
@@ -1189,66 +1315,61 @@ var boxShadows = [
|
|
|
1189
1315
|
"box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
|
|
1190
1316
|
};
|
|
1191
1317
|
}
|
|
1192
|
-
const color =
|
|
1318
|
+
const color = colorResolver(d, theme);
|
|
1193
1319
|
if (color)
|
|
1194
1320
|
return color;
|
|
1195
1321
|
}]
|
|
1196
1322
|
];
|
|
1197
1323
|
|
|
1198
|
-
// src/rules/size.ts
|
|
1199
1324
|
function getPropName(minmax, hw) {
|
|
1200
1325
|
return `${minmax ? `${minmax}-` : ""}${hw === "h" ? "height" : "width"}`;
|
|
1201
1326
|
}
|
|
1202
1327
|
function getThemeValue(minmax, hw, theme, prop) {
|
|
1203
|
-
var _a;
|
|
1204
1328
|
let str = `${hw === "h" ? "height" : "width"}`;
|
|
1205
1329
|
if (minmax)
|
|
1206
|
-
str = `${minmax}${
|
|
1207
|
-
return
|
|
1330
|
+
str = `${minmax}${index.capitalize(str)}`;
|
|
1331
|
+
return theme[str]?.[prop];
|
|
1208
1332
|
}
|
|
1209
|
-
|
|
1333
|
+
const sizes = [
|
|
1210
1334
|
[/^(?:(min|max)-)?(w|h)-(.+)$/, ([, m, w, s], { theme }) => {
|
|
1211
|
-
const v = getThemeValue(m, w, theme, s) ||
|
|
1335
|
+
const v = getThemeValue(m, w, theme, s) || index.handler.bracket.cssvar.fraction.rem(s);
|
|
1212
1336
|
if (v != null)
|
|
1213
1337
|
return { [getPropName(m, w)]: v };
|
|
1214
1338
|
}],
|
|
1215
1339
|
[/^(?:(min|max)-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => {
|
|
1216
|
-
|
|
1217
|
-
const v = (_a = theme.breakpoints) == null ? void 0 : _a[s];
|
|
1340
|
+
const v = theme.breakpoints?.[s];
|
|
1218
1341
|
if (v != null)
|
|
1219
1342
|
return { [getPropName(m, w)]: v };
|
|
1220
1343
|
}]
|
|
1221
1344
|
];
|
|
1222
|
-
|
|
1345
|
+
const aspectRatio = [
|
|
1223
1346
|
["aspect-ratio-auto", { "aspect-ratio": "auto" }],
|
|
1224
1347
|
[/^aspect-ratio-(.+)$/, ([, d]) => {
|
|
1225
|
-
const v = (/^\d+\/\d+$/.test(d) ? d : null) ||
|
|
1348
|
+
const v = (/^\d+\/\d+$/.test(d) ? d : null) || index.handler.bracket.cssvar.number(d);
|
|
1226
1349
|
if (v != null)
|
|
1227
1350
|
return { "aspect-ratio": v };
|
|
1228
1351
|
}]
|
|
1229
1352
|
];
|
|
1230
1353
|
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
const v = _chunkLPZDYB4Jjs.handler.bracket.rem.fraction.cssvar(size);
|
|
1354
|
+
const directionSize = (prefix) => ([_, direction, size]) => {
|
|
1355
|
+
const v = index.handler.bracket.rem.fraction.cssvar(size);
|
|
1234
1356
|
if (v)
|
|
1235
|
-
return
|
|
1357
|
+
return index.directionMap[direction].map((i) => [prefix + i, v]);
|
|
1236
1358
|
};
|
|
1237
|
-
|
|
1359
|
+
const paddings = [
|
|
1238
1360
|
[/^pa?()-?(-?.+)$/, directionSize("padding")],
|
|
1239
1361
|
[/^p-?([xy])-?(-?.+)$/, directionSize("padding")],
|
|
1240
1362
|
[/^p-?([rltbse])-?(-?.+)$/, directionSize("padding")]
|
|
1241
1363
|
];
|
|
1242
|
-
|
|
1364
|
+
const margins = [
|
|
1243
1365
|
[/^ma?()-?(-?.+)$/, directionSize("margin")],
|
|
1244
1366
|
[/^m-?([xy])-?(-?.+)$/, directionSize("margin")],
|
|
1245
1367
|
[/^m-?([rltbse])-?(-?.+)$/, directionSize("margin")],
|
|
1246
1368
|
[/^space-?([xy])-?(-?.+)$/, (match) => {
|
|
1247
|
-
var _a;
|
|
1248
1369
|
const [, direction, size] = match;
|
|
1249
1370
|
if (size === "reverse")
|
|
1250
1371
|
return { [`--un-space-${direction}-reverse`]: 1 };
|
|
1251
|
-
const results =
|
|
1372
|
+
const results = directionSize("margin")(match)?.map((item) => {
|
|
1252
1373
|
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)))`;
|
|
1253
1374
|
return [item[0], value];
|
|
1254
1375
|
});
|
|
@@ -1261,154 +1382,7 @@ var margins = [
|
|
|
1261
1382
|
}]
|
|
1262
1383
|
];
|
|
1263
1384
|
|
|
1264
|
-
|
|
1265
|
-
var displays = [
|
|
1266
|
-
["inline", { display: "inline" }],
|
|
1267
|
-
["block", { display: "block" }],
|
|
1268
|
-
["inline-block", { display: "inline-block" }],
|
|
1269
|
-
["contents", { display: "contents" }],
|
|
1270
|
-
["flow-root", { display: "flow-root" }],
|
|
1271
|
-
["list-item", { display: "list-item" }],
|
|
1272
|
-
["hidden", { display: "none" }]
|
|
1273
|
-
];
|
|
1274
|
-
var appearances = [
|
|
1275
|
-
["visible", { visibility: "visible" }],
|
|
1276
|
-
["invisible", { visibility: "hidden" }],
|
|
1277
|
-
["backface-visible", { "backface-visibility": "visible" }],
|
|
1278
|
-
["backface-hidden", { "backface-visibility": "hidden" }]
|
|
1279
|
-
];
|
|
1280
|
-
var cursors = [
|
|
1281
|
-
[/^cursor-(.+)$/, ([, c]) => ({ cursor: c })]
|
|
1282
|
-
];
|
|
1283
|
-
var pointerEvents = [
|
|
1284
|
-
["pointer-events-none", { "pointer-events": "none" }],
|
|
1285
|
-
["pointer-events-auto", { "pointer-events": "auto" }]
|
|
1286
|
-
];
|
|
1287
|
-
var resizes = [
|
|
1288
|
-
["resize-none", { resize: "none" }],
|
|
1289
|
-
["resize-x", { resize: "horizontal" }],
|
|
1290
|
-
["resize-y", { resize: "vertical" }],
|
|
1291
|
-
["resize", { resize: "both" }]
|
|
1292
|
-
];
|
|
1293
|
-
var userSelects = [
|
|
1294
|
-
[/^select-(none|text|all|auto)$/, ([, v]) => ({ "user-select": v })]
|
|
1295
|
-
];
|
|
1296
|
-
var whitespaces = [
|
|
1297
|
-
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v })]
|
|
1298
|
-
];
|
|
1299
|
-
var contents = [
|
|
1300
|
-
["content-empty", { content: '""' }]
|
|
1301
|
-
];
|
|
1302
|
-
var breaks = [
|
|
1303
|
-
["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
|
|
1304
|
-
["break-word", { "overflow-wrap": "break-word" }],
|
|
1305
|
-
["break-all", { "word-break": "break-all" }]
|
|
1306
|
-
];
|
|
1307
|
-
var textOverflows = [
|
|
1308
|
-
["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
|
|
1309
|
-
["text-ellipsis", { "text-overflow": "ellipsis" }],
|
|
1310
|
-
["text-clip", { "text-overflow": "clip" }]
|
|
1311
|
-
];
|
|
1312
|
-
var textTransforms = [
|
|
1313
|
-
["case-upper", { "text-transform": "uppercase" }],
|
|
1314
|
-
["case-lower", { "text-transform": "lowercase" }],
|
|
1315
|
-
["case-capital", { "text-transform": "capitalize" }],
|
|
1316
|
-
["case-normal", { "text-transform": "none" }],
|
|
1317
|
-
["uppercase", { "text-transform": "uppercase" }],
|
|
1318
|
-
["lowercase", { "text-transform": "lowercase" }],
|
|
1319
|
-
["capitalize", { "text-transform": "capitalize" }],
|
|
1320
|
-
["normal-case", { "text-transform": "none" }]
|
|
1321
|
-
];
|
|
1322
|
-
var textDecorations = [
|
|
1323
|
-
["underline", { "text-decoration": "underline" }],
|
|
1324
|
-
["line-through", { "text-decoration": "line-through" }],
|
|
1325
|
-
["no-underline", { "text-decoration": "none" }]
|
|
1326
|
-
];
|
|
1327
|
-
var textDecorationStyles = [
|
|
1328
|
-
["underline-solid", { "text-decoration-style": "solid" }],
|
|
1329
|
-
["underline-double", { "text-decoration-style": "double" }],
|
|
1330
|
-
["underline-dotted", { "text-decoration-style": "dotted" }],
|
|
1331
|
-
["underline-dashed", { "text-decoration-style": "dashed" }]
|
|
1332
|
-
];
|
|
1333
|
-
var fontStyles = [
|
|
1334
|
-
["italic", { "font-style": "italic" }],
|
|
1335
|
-
["not-italic", { "font-style": "normal" }]
|
|
1336
|
-
];
|
|
1337
|
-
var fontSmoothings = [
|
|
1338
|
-
["antialiased", {
|
|
1339
|
-
"-webkit-font-smoothing": "antialiased",
|
|
1340
|
-
"-moz-osx-font-smoothing": "grayscale",
|
|
1341
|
-
"font-smoothing": "grayscale"
|
|
1342
|
-
}],
|
|
1343
|
-
["subpixel-antialiased", {
|
|
1344
|
-
"-webkit-font-smoothing": "auto",
|
|
1345
|
-
"-moz-osx-font-smoothing": "auto",
|
|
1346
|
-
"font-smoothing": "auto"
|
|
1347
|
-
}]
|
|
1348
|
-
];
|
|
1349
|
-
var hyphens = [
|
|
1350
|
-
["hyphens-none", {
|
|
1351
|
-
"-webkit-hyphens": "none",
|
|
1352
|
-
"-ms-hyphens": "none",
|
|
1353
|
-
"hyphens": "none"
|
|
1354
|
-
}],
|
|
1355
|
-
["hyphens-manual", {
|
|
1356
|
-
"-webkit-hyphens": "manual",
|
|
1357
|
-
"-ms-hyphens": "manual",
|
|
1358
|
-
"hyphens": "manual"
|
|
1359
|
-
}],
|
|
1360
|
-
["hyphens-auto", {
|
|
1361
|
-
"-webkit-hyphens": "auto",
|
|
1362
|
-
"-ms-hyphens": "auto",
|
|
1363
|
-
"hyphens": "auto"
|
|
1364
|
-
}]
|
|
1365
|
-
];
|
|
1366
|
-
var writingModes = [
|
|
1367
|
-
["write-normal", { "writing-mode": "horizontal-tb" }],
|
|
1368
|
-
["write-vertical-right", { "writing-mode": "vertical-rl" }],
|
|
1369
|
-
["write-vertical-left", { "writing-mode": "vertical-lr" }]
|
|
1370
|
-
];
|
|
1371
|
-
var writingOrientations = [
|
|
1372
|
-
["write-orient-mixed", { "text-orientation": "mixed" }],
|
|
1373
|
-
["write-orient-upright", { "text-orientation": "upright" }],
|
|
1374
|
-
["write-orient-sideways", { "text-orientation": "sideways" }]
|
|
1375
|
-
];
|
|
1376
|
-
var screenReadersAccess = [
|
|
1377
|
-
[
|
|
1378
|
-
"sr-only",
|
|
1379
|
-
{
|
|
1380
|
-
"position": "absolute",
|
|
1381
|
-
"width": "1px",
|
|
1382
|
-
"height": "1px",
|
|
1383
|
-
"padding": "0",
|
|
1384
|
-
"margin": "-1px",
|
|
1385
|
-
"overflow": "hidden",
|
|
1386
|
-
"clip": "rect(0,0,0,0)",
|
|
1387
|
-
"white-space": "nowrap",
|
|
1388
|
-
"border-width": 0
|
|
1389
|
-
}
|
|
1390
|
-
],
|
|
1391
|
-
[
|
|
1392
|
-
"not-sr-only",
|
|
1393
|
-
{
|
|
1394
|
-
"position": "static",
|
|
1395
|
-
"width": "auto",
|
|
1396
|
-
"height": "auto",
|
|
1397
|
-
"padding": "0",
|
|
1398
|
-
"margin": "0",
|
|
1399
|
-
"overflow": "visible",
|
|
1400
|
-
"clip": "auto",
|
|
1401
|
-
"white-space": "normal"
|
|
1402
|
-
}
|
|
1403
|
-
]
|
|
1404
|
-
];
|
|
1405
|
-
var isolations = [
|
|
1406
|
-
["isolate", { isolation: "isolate" }],
|
|
1407
|
-
["isolate-auto", { isolation: "auto" }]
|
|
1408
|
-
];
|
|
1409
|
-
|
|
1410
|
-
// src/rules/table.ts
|
|
1411
|
-
var tables = [
|
|
1385
|
+
const tables = [
|
|
1412
1386
|
["border-collapse", { "border-collapse": "collapse" }],
|
|
1413
1387
|
["border-separate", { "border-collapse": "separate" }],
|
|
1414
1388
|
["caption-top", { "caption-side": "top" }],
|
|
@@ -1429,26 +1403,22 @@ var tables = [
|
|
|
1429
1403
|
["table-row-group", { display: "table-row-group" }]
|
|
1430
1404
|
];
|
|
1431
1405
|
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
],
|
|
1449
|
-
[/^preserve-(3d|flat)$/, ([, value]) => ({
|
|
1450
|
-
"transform-style": value === "3d" ? `preserve-${value}` : value
|
|
1451
|
-
})],
|
|
1406
|
+
const transformBase = {
|
|
1407
|
+
"--un-rotate": 0,
|
|
1408
|
+
"--un-scale-x": 1,
|
|
1409
|
+
"--un-scale-y": 1,
|
|
1410
|
+
"--un-scale-z": 1,
|
|
1411
|
+
"--un-skew-x": 0,
|
|
1412
|
+
"--un-skew-y": 0,
|
|
1413
|
+
"--un-translate-x": 0,
|
|
1414
|
+
"--un-translate-y": 0,
|
|
1415
|
+
"--un-translate-z": 0,
|
|
1416
|
+
"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))",
|
|
1417
|
+
[pseudo.CONTROL_BYPASS_PSEUDO]: ""
|
|
1418
|
+
};
|
|
1419
|
+
const transforms = [
|
|
1420
|
+
["transform", transformBase],
|
|
1421
|
+
[/^preserve-(3d|flat)$/, ([, value]) => ({ "transform-style": value === "3d" ? `preserve-${value}` : value })],
|
|
1452
1422
|
[/^translate()-([^-]+)$/, handleTranslate],
|
|
1453
1423
|
[/^translate-([xyz])-([^-]+)$/, handleTranslate],
|
|
1454
1424
|
[/^scale()-([^-]+)$/, handleScale],
|
|
@@ -1465,29 +1435,38 @@ var transforms = [
|
|
|
1465
1435
|
["origin-top-left", { "transform-origin": "top left" }]
|
|
1466
1436
|
];
|
|
1467
1437
|
function handleTranslate([, d, b]) {
|
|
1468
|
-
const v =
|
|
1438
|
+
const v = index.handler.bracket.fraction.rem(b);
|
|
1469
1439
|
if (v != null) {
|
|
1470
1440
|
return [
|
|
1471
|
-
|
|
1441
|
+
transformBase,
|
|
1442
|
+
[
|
|
1443
|
+
...index.xyzMap[d].map((i) => [`--un-translate${i}`, v])
|
|
1444
|
+
]
|
|
1472
1445
|
];
|
|
1473
1446
|
}
|
|
1474
1447
|
}
|
|
1475
1448
|
function handleScale([, d, b]) {
|
|
1476
|
-
const v =
|
|
1449
|
+
const v = index.handler.bracket.fraction.percent(b);
|
|
1477
1450
|
if (v != null) {
|
|
1478
1451
|
return [
|
|
1479
|
-
|
|
1452
|
+
transformBase,
|
|
1453
|
+
[
|
|
1454
|
+
...index.xyzMap[d].map((i) => [`--un-scale${i}`, v])
|
|
1455
|
+
]
|
|
1480
1456
|
];
|
|
1481
1457
|
}
|
|
1482
1458
|
}
|
|
1483
1459
|
function handleRotate([, b]) {
|
|
1484
|
-
const v =
|
|
1485
|
-
if (v != null)
|
|
1486
|
-
return
|
|
1460
|
+
const v = index.handler.bracket.number(b);
|
|
1461
|
+
if (v != null) {
|
|
1462
|
+
return [
|
|
1463
|
+
transformBase,
|
|
1464
|
+
{ "--un-rotate": `${v}deg` }
|
|
1465
|
+
];
|
|
1466
|
+
}
|
|
1487
1467
|
}
|
|
1488
1468
|
|
|
1489
|
-
|
|
1490
|
-
var variablesAbbrMap = {
|
|
1469
|
+
const variablesAbbrMap = {
|
|
1491
1470
|
"visible": "visibility",
|
|
1492
1471
|
"select": "user-select",
|
|
1493
1472
|
"vertical": "vertical-align",
|
|
@@ -1525,7 +1504,7 @@ var variablesAbbrMap = {
|
|
|
1525
1504
|
"mix-blend": "mix-blend-mode",
|
|
1526
1505
|
"animate-speed": "animation-speed"
|
|
1527
1506
|
};
|
|
1528
|
-
|
|
1507
|
+
const cssVariables = [[
|
|
1529
1508
|
/^(.+)-\$(.+)$/,
|
|
1530
1509
|
([, name, varname]) => {
|
|
1531
1510
|
const prop = variablesAbbrMap[name];
|
|
@@ -1537,8 +1516,7 @@ var cssVariables = [[
|
|
|
1537
1516
|
}
|
|
1538
1517
|
]];
|
|
1539
1518
|
|
|
1540
|
-
|
|
1541
|
-
var questionMark = [
|
|
1519
|
+
const questionMark = [
|
|
1542
1520
|
[
|
|
1543
1521
|
/^(where|\?)$/,
|
|
1544
1522
|
(_, { constructCSS, generator }) => {
|
|
@@ -1549,25 +1527,24 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
|
|
|
1549
1527
|
]
|
|
1550
1528
|
];
|
|
1551
1529
|
|
|
1552
|
-
|
|
1553
|
-
var divideSizes = [
|
|
1530
|
+
const divideSizes = [
|
|
1554
1531
|
[/^divide-?([xy])$/, handlerDivide],
|
|
1555
1532
|
[/^divide-?([xy])-?(-?.+)$/, handlerDivide],
|
|
1556
1533
|
[/^divide-?([xy])-reverse$/, ([, d]) => [[`--un-divide-${d}-reverse`, 1]]]
|
|
1557
1534
|
];
|
|
1558
|
-
|
|
1535
|
+
const divideStyles = [
|
|
1559
1536
|
["divide-solid", { "border-style": "solid" }],
|
|
1560
1537
|
["divide-dashed", { "border-style": "dashed" }],
|
|
1561
1538
|
["divide-dotted", { "border-style": "dotted" }],
|
|
1562
1539
|
["divide-double", { "border-style": "double" }],
|
|
1563
1540
|
["divide-none", { "border-style": "none" }]
|
|
1564
1541
|
];
|
|
1565
|
-
|
|
1542
|
+
const divides = [divideSizes, divideColors, divideStyles].flat(1);
|
|
1566
1543
|
function handlerDivide([, a, b]) {
|
|
1567
|
-
const [d, s = "1"] =
|
|
1568
|
-
const v =
|
|
1544
|
+
const [d, s = "1"] = index.directionMap[a] ? [a, b] : ["", a];
|
|
1545
|
+
const v = index.handler.bracket.px(s);
|
|
1569
1546
|
if (v != null) {
|
|
1570
|
-
const results =
|
|
1547
|
+
const results = index.directionMap[d].map((item) => {
|
|
1571
1548
|
const key = `border${item}-width`;
|
|
1572
1549
|
const value = item.endsWith("right") || item.endsWith("bottom") ? `calc(${v} * var(--un-divide-${d}-reverse))` : `calc(${v} * calc(1 - var(--un-divide-${d}-reverse)))`;
|
|
1573
1550
|
return [key, value];
|
|
@@ -1577,8 +1554,7 @@ function handlerDivide([, a, b]) {
|
|
|
1577
1554
|
}
|
|
1578
1555
|
}
|
|
1579
1556
|
|
|
1580
|
-
|
|
1581
|
-
var lineClamps = [
|
|
1557
|
+
const lineClamps = [
|
|
1582
1558
|
[/^line-clamp-(\d+)$/, ([, v]) => ({
|
|
1583
1559
|
"overflow": "hidden",
|
|
1584
1560
|
"display": "-webkit-box",
|
|
@@ -1592,8 +1568,7 @@ var lineClamps = [
|
|
|
1592
1568
|
}]
|
|
1593
1569
|
];
|
|
1594
1570
|
|
|
1595
|
-
|
|
1596
|
-
var rules = [
|
|
1571
|
+
const rules = [
|
|
1597
1572
|
screenReadersAccess,
|
|
1598
1573
|
cssVariables,
|
|
1599
1574
|
paddings,
|
|
@@ -1633,6 +1608,7 @@ var rules = [
|
|
|
1633
1608
|
textAligns,
|
|
1634
1609
|
textColors,
|
|
1635
1610
|
fontStyles,
|
|
1611
|
+
fontVariantNumeric,
|
|
1636
1612
|
fontSmoothings,
|
|
1637
1613
|
hyphens,
|
|
1638
1614
|
writingModes,
|
|
@@ -1691,115 +1667,115 @@ var rules = [
|
|
|
1691
1667
|
questionMark
|
|
1692
1668
|
].flat(1);
|
|
1693
1669
|
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
exports.
|
|
1670
|
+
exports.alignContents = alignContents;
|
|
1671
|
+
exports.alignItems = alignItems;
|
|
1672
|
+
exports.alignSelfs = alignSelfs;
|
|
1673
|
+
exports.animations = animations;
|
|
1674
|
+
exports.appearance = appearance;
|
|
1675
|
+
exports.appearances = appearances;
|
|
1676
|
+
exports.aspectRatio = aspectRatio;
|
|
1677
|
+
exports.bgAttachments = bgAttachments;
|
|
1678
|
+
exports.bgBlendModes = bgBlendModes;
|
|
1679
|
+
exports.bgClips = bgClips;
|
|
1680
|
+
exports.bgColors = bgColors;
|
|
1681
|
+
exports.bgGradients = bgGradients;
|
|
1682
|
+
exports.bgImages = bgImages;
|
|
1683
|
+
exports.bgOrigins = bgOrigins;
|
|
1684
|
+
exports.bgPositions = bgPositions;
|
|
1685
|
+
exports.bgRepeats = bgRepeats;
|
|
1686
|
+
exports.bgSizes = bgSizes;
|
|
1687
|
+
exports.borderColors = borderColors;
|
|
1688
|
+
exports.borderRadius = borderRadius;
|
|
1689
|
+
exports.borderSizes = borderSizes;
|
|
1690
|
+
exports.borderStyles = borderStyles;
|
|
1691
|
+
exports.borders = borders;
|
|
1692
|
+
exports.boxDecorationBreaks = boxDecorationBreaks;
|
|
1693
|
+
exports.boxShadows = boxShadows;
|
|
1694
|
+
exports.boxSizing = boxSizing;
|
|
1695
|
+
exports.breaks = breaks;
|
|
1696
|
+
exports.caretColors = caretColors;
|
|
1697
|
+
exports.caretOpacity = caretOpacity;
|
|
1698
|
+
exports.colorResolver = colorResolver$2;
|
|
1699
|
+
exports.container = container;
|
|
1700
|
+
exports.containerShortcuts = containerShortcuts;
|
|
1701
|
+
exports.contents = contents;
|
|
1702
|
+
exports.cssVariables = cssVariables;
|
|
1703
|
+
exports.cursors = cursors;
|
|
1704
|
+
exports.displays = displays;
|
|
1705
|
+
exports.divideColors = divideColors;
|
|
1706
|
+
exports.divideSizes = divideSizes;
|
|
1707
|
+
exports.divideStyles = divideStyles;
|
|
1708
|
+
exports.divides = divides;
|
|
1709
|
+
exports.fillColors = fillColors;
|
|
1710
|
+
exports.filters = filters;
|
|
1711
|
+
exports.flex = flex;
|
|
1712
|
+
exports.floats = floats;
|
|
1713
|
+
exports.fontSizes = fontSizes;
|
|
1714
|
+
exports.fontSmoothings = fontSmoothings;
|
|
1715
|
+
exports.fontStyles = fontStyles;
|
|
1716
|
+
exports.fontVariantNumeric = fontVariantNumeric;
|
|
1717
|
+
exports.fontWeights = fontWeights;
|
|
1718
|
+
exports.fonts = fonts;
|
|
1719
|
+
exports.fontsFamilies = fontsFamilies;
|
|
1720
|
+
exports.gaps = gaps;
|
|
1721
|
+
exports.grids = grids;
|
|
1722
|
+
exports.hyphens = hyphens;
|
|
1723
|
+
exports.imageRenderings = imageRenderings;
|
|
1724
|
+
exports.insets = insets;
|
|
1725
|
+
exports.isolations = isolations;
|
|
1726
|
+
exports.justifies = justifies;
|
|
1727
|
+
exports.justifyItems = justifyItems;
|
|
1728
|
+
exports.justifySelfs = justifySelfs;
|
|
1729
|
+
exports.leadings = leadings;
|
|
1730
|
+
exports.lineClamps = lineClamps;
|
|
1731
|
+
exports.listStyle = listStyle;
|
|
1732
|
+
exports.margins = margins;
|
|
1733
|
+
exports.mixBlendModes = mixBlendModes;
|
|
1734
|
+
exports.objectPositions = objectPositions;
|
|
1735
|
+
exports.opacity = opacity;
|
|
1736
|
+
exports.orders = orders;
|
|
1737
|
+
exports.outline = outline;
|
|
1738
|
+
exports.overflows = overflows;
|
|
1739
|
+
exports.overscrolls = overscrolls;
|
|
1740
|
+
exports.paddings = paddings;
|
|
1741
|
+
exports.parseColorUtil = parseColorUtil;
|
|
1742
|
+
exports.placeContents = placeContents;
|
|
1743
|
+
exports.placeItems = placeItems;
|
|
1744
|
+
exports.placeSelfs = placeSelfs;
|
|
1745
|
+
exports.placeholder = placeholder;
|
|
1746
|
+
exports.pointerEvents = pointerEvents;
|
|
1747
|
+
exports.positions = positions;
|
|
1748
|
+
exports.questionMark = questionMark;
|
|
1749
|
+
exports.resizes = resizes;
|
|
1750
|
+
exports.ringColors = ringColors;
|
|
1751
|
+
exports.ringOffsetColors = ringOffsetColors;
|
|
1752
|
+
exports.rings = rings;
|
|
1753
|
+
exports.rules = rules;
|
|
1754
|
+
exports.screenReadersAccess = screenReadersAccess;
|
|
1755
|
+
exports.sizes = sizes;
|
|
1756
|
+
exports.tabSizes = tabSizes;
|
|
1757
|
+
exports.tables = tables;
|
|
1758
|
+
exports.textAligns = textAligns;
|
|
1759
|
+
exports.textColors = textColors;
|
|
1760
|
+
exports.textDecorationColors = textDecorationColors;
|
|
1761
|
+
exports.textDecorationLengths = textDecorationLengths;
|
|
1762
|
+
exports.textDecorationOffsets = textDecorationOffsets;
|
|
1763
|
+
exports.textDecorationStyles = textDecorationStyles;
|
|
1764
|
+
exports.textDecorations = textDecorations;
|
|
1765
|
+
exports.textIndents = textIndents;
|
|
1766
|
+
exports.textOverflows = textOverflows;
|
|
1767
|
+
exports.textShadows = textShadows;
|
|
1768
|
+
exports.textStrokeColors = textStrokeColors;
|
|
1769
|
+
exports.textStrokeWidths = textStrokeWidths;
|
|
1770
|
+
exports.textTransforms = textTransforms;
|
|
1771
|
+
exports.trackings = trackings;
|
|
1772
|
+
exports.transforms = transforms;
|
|
1773
|
+
exports.transitions = transitions;
|
|
1774
|
+
exports.userSelects = userSelects;
|
|
1775
|
+
exports.varEmpty = varEmpty;
|
|
1776
|
+
exports.verticalAligns = verticalAligns;
|
|
1777
|
+
exports.whitespaces = whitespaces;
|
|
1778
|
+
exports.wordSpacings = wordSpacings;
|
|
1779
|
+
exports.writingModes = writingModes;
|
|
1780
|
+
exports.writingOrientations = writingOrientations;
|
|
1781
|
+
exports.zIndexes = zIndexes;
|