@unocss/preset-mini 0.57.7 → 0.58.1
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/colors.d.cts +1 -1
- package/dist/colors.d.mts +1 -1
- package/dist/colors.d.ts +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +6 -6
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +7 -7
- package/dist/rules.cjs +50 -972
- package/dist/rules.d.cts +2 -6
- package/dist/rules.d.mts +2 -6
- package/dist/rules.d.ts +2 -6
- package/dist/rules.mjs +5 -931
- package/dist/shared/{preset-mini.MACvs-wn.cjs → preset-mini.-3Qybdh5.cjs} +49 -39
- package/dist/shared/{preset-mini.Stl9mkMB.mjs → preset-mini.0CcynBZx.mjs} +45 -26
- package/dist/shared/{preset-mini.dPVVIvNm.mjs → preset-mini.0UJFjS_1.mjs} +16 -6
- package/dist/shared/{preset-mini.XmVozI6N.d.mts → preset-mini.20fUBpHS.d.cts} +4 -3
- package/dist/shared/{preset-mini.QW22c5Df.d.ts → preset-mini.8w2rXvMk.d.ts} +4 -3
- package/dist/shared/preset-mini.AVP8I7_j.mjs +747 -0
- package/dist/shared/preset-mini.ORVb5Lu8.mjs +978 -0
- package/dist/shared/{preset-mini.ImRm63ih.cjs → preset-mini.UhMMbd34.cjs} +44 -26
- package/dist/shared/{preset-mini.4DxDu2I8.d.mts → preset-mini.YxT4AwuI.d.cts} +1 -1
- package/dist/shared/preset-mini.fgwIVvur.cjs +322 -0
- package/dist/shared/preset-mini.g6cWGZM2.cjs +1021 -0
- package/dist/shared/{preset-mini.5daNC9yh.d.ts → preset-mini.gVNz4b9u.d.ts} +1 -1
- package/dist/shared/{preset-mini.7XoWRZIl.d.mts → preset-mini.hpPpX7ws.d.cts} +1 -1
- package/dist/shared/{preset-mini.7XoWRZIl.d.ts → preset-mini.hpPpX7ws.d.mts} +1 -1
- package/dist/shared/{preset-mini.7XoWRZIl.d.cts → preset-mini.hpPpX7ws.d.ts} +1 -1
- package/dist/shared/preset-mini.jXC5Sr98.cjs +772 -0
- package/dist/shared/{preset-mini.Jpc0QYPj.d.cts → preset-mini.nzD7Hw_0.d.mts} +4 -3
- package/dist/shared/{preset-mini.5-XKlNyK.d.cts → preset-mini.vMrmsD3H.d.mts} +1 -1
- package/dist/shared/preset-mini.zC_vZg74.mjs +291 -0
- package/dist/theme.cjs +34 -318
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.d.ts +3 -3
- package/dist/theme.mjs +5 -293
- package/dist/utils.cjs +23 -23
- package/dist/utils.d.cts +4 -4
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/dist/utils.mjs +1 -1
- package/dist/variants.cjs +31 -739
- package/dist/variants.d.cts +5 -5
- package/dist/variants.d.mts +5 -5
- package/dist/variants.d.ts +5 -5
- package/dist/variants.mjs +4 -716
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const ruleUtils = require('@unocss/rule-utils');
|
|
4
3
|
const core = require('@unocss/core');
|
|
4
|
+
const ruleUtils = require('@unocss/rule-utils');
|
|
5
5
|
|
|
6
6
|
const directionMap = {
|
|
7
7
|
"l": ["-left"],
|
|
@@ -108,11 +108,12 @@ const globalKeywords = [
|
|
|
108
108
|
"revert-layer",
|
|
109
109
|
"unset"
|
|
110
110
|
];
|
|
111
|
-
const cssMathFnRE =
|
|
111
|
+
const cssMathFnRE = /^(calc|clamp|min|max)\s*\((.+)\)(.*)/;
|
|
112
112
|
|
|
113
113
|
const numberWithUnitRE = /^(-?\d*(?:\.\d+)?)(px|pt|pc|%|r?(?:em|ex|lh|cap|ch|ic)|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i;
|
|
114
114
|
const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
|
|
115
115
|
const unitOnlyRE = /^(px)$/i;
|
|
116
|
+
const bracketTypeRe = /^\[(color|length|position|quoted|string):/i;
|
|
116
117
|
|
|
117
118
|
const cssProps = [
|
|
118
119
|
// basic props
|
|
@@ -188,7 +189,7 @@ function auto(str) {
|
|
|
188
189
|
return "auto";
|
|
189
190
|
}
|
|
190
191
|
function rem(str) {
|
|
191
|
-
if (
|
|
192
|
+
if (unitOnlyRE.test(str))
|
|
192
193
|
return `1${str}`;
|
|
193
194
|
const match = str.match(numberWithUnitRE);
|
|
194
195
|
if (!match)
|
|
@@ -202,7 +203,7 @@ function rem(str) {
|
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
205
|
function px(str) {
|
|
205
|
-
if (
|
|
206
|
+
if (unitOnlyRE.test(str))
|
|
206
207
|
return `1${str}`;
|
|
207
208
|
const match = str.match(numberWithUnitRE);
|
|
208
209
|
if (!match)
|
|
@@ -239,7 +240,6 @@ function fraction(str) {
|
|
|
239
240
|
return `${round(num * 100)}%`;
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
|
-
const bracketTypeRe = /^\[(color|length|position|quoted|string):/i;
|
|
243
243
|
function bracketWithType(str, requiredType) {
|
|
244
244
|
if (str && str.startsWith("[") && str.endsWith("]")) {
|
|
245
245
|
let base;
|
|
@@ -298,8 +298,10 @@ function bracketOfPosition(str) {
|
|
|
298
298
|
return bracketWithType(str, "position");
|
|
299
299
|
}
|
|
300
300
|
function cssvar(str) {
|
|
301
|
-
if (
|
|
302
|
-
|
|
301
|
+
if (/^\$[^\s'"`;{}]/.test(str)) {
|
|
302
|
+
const [name, defaultValue] = str.slice(1).split(",");
|
|
303
|
+
return `var(--${core.escapeSelector(name)}${defaultValue ? `, ${defaultValue}` : ""})`;
|
|
304
|
+
}
|
|
303
305
|
}
|
|
304
306
|
function time(str) {
|
|
305
307
|
const match = str.match(/^(-?[0-9.]+)(s|ms)?$/i);
|
|
@@ -392,17 +394,18 @@ function getThemeColor(theme, colors, key) {
|
|
|
392
394
|
return getThemeColorForKey(theme, colors, key) || getThemeColorForKey(theme, colors, "colors");
|
|
393
395
|
}
|
|
394
396
|
function splitShorthand(body, type) {
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
];
|
|
397
|
+
const [front, rest] = ruleUtils.getStringComponent(body, "[", "]", ["/", ":"]) ?? [];
|
|
398
|
+
if (front != null) {
|
|
399
|
+
const match = (front.match(bracketTypeRe) ?? [])[1];
|
|
400
|
+
if (match == null || match === type)
|
|
401
|
+
return [front, rest];
|
|
401
402
|
}
|
|
402
|
-
return split;
|
|
403
403
|
}
|
|
404
404
|
function parseColor(body, theme, key) {
|
|
405
|
-
const
|
|
405
|
+
const split = splitShorthand(body, "color");
|
|
406
|
+
if (!split)
|
|
407
|
+
return;
|
|
408
|
+
const [main, opacity] = split;
|
|
406
409
|
const colors = main.replace(/([a-z])([0-9])/g, "$1-$2").split(/-/g);
|
|
407
410
|
const [name] = colors;
|
|
408
411
|
if (!name)
|
|
@@ -412,9 +415,9 @@ function parseColor(body, theme, key) {
|
|
|
412
415
|
const bracketOrMain = bracket || main;
|
|
413
416
|
if (h.numberWithUnit(bracketOrMain))
|
|
414
417
|
return;
|
|
415
|
-
if (
|
|
418
|
+
if (/^#[\da-fA-F]+/.test(bracketOrMain))
|
|
416
419
|
color = bracketOrMain;
|
|
417
|
-
else if (
|
|
420
|
+
else if (/^hex-[\da-fA-F]+/.test(bracketOrMain))
|
|
418
421
|
color = `#${bracketOrMain.slice(4)}`;
|
|
419
422
|
else if (main.startsWith("$"))
|
|
420
423
|
color = h.cssvar(main);
|
|
@@ -428,7 +431,7 @@ function parseColor(body, theme, key) {
|
|
|
428
431
|
if (!color) {
|
|
429
432
|
let colorData;
|
|
430
433
|
const [scale] = colors.slice(-1);
|
|
431
|
-
if (
|
|
434
|
+
if (/^\d+$/.test(scale)) {
|
|
432
435
|
no = scale;
|
|
433
436
|
colorData = getThemeColor(theme, colors.slice(0, -1), key);
|
|
434
437
|
if (!colorData || typeof colorData === "string")
|
|
@@ -467,11 +470,22 @@ function colorResolver(property, varName, key, shouldPass) {
|
|
|
467
470
|
if (alpha != null) {
|
|
468
471
|
css[property] = ruleUtils.colorToString(cssColor, alpha);
|
|
469
472
|
} else {
|
|
470
|
-
|
|
471
|
-
|
|
473
|
+
const opacityVar = `--un-${varName}-opacity`;
|
|
474
|
+
const result = ruleUtils.colorToString(cssColor, `var(${opacityVar})`);
|
|
475
|
+
if (result.includes(opacityVar))
|
|
476
|
+
css[opacityVar] = ruleUtils.colorOpacityToString(cssColor);
|
|
477
|
+
css[property] = result;
|
|
472
478
|
}
|
|
473
479
|
} else if (color) {
|
|
474
|
-
|
|
480
|
+
if (alpha != null) {
|
|
481
|
+
css[property] = ruleUtils.colorToString(color, alpha);
|
|
482
|
+
} else {
|
|
483
|
+
const opacityVar = `--un-${varName}-opacity`;
|
|
484
|
+
const result = ruleUtils.colorToString(color, `var(${opacityVar})`);
|
|
485
|
+
if (result.includes(opacityVar))
|
|
486
|
+
css[opacityVar] = 1;
|
|
487
|
+
css[property] = result;
|
|
488
|
+
}
|
|
475
489
|
}
|
|
476
490
|
if (shouldPass?.(css) !== false)
|
|
477
491
|
return css;
|
|
@@ -484,10 +498,15 @@ function colorableShadows(shadows, colorVar) {
|
|
|
484
498
|
const components = ruleUtils.getStringComponents(shadows[i], " ", 6);
|
|
485
499
|
if (!components || components.length < 3)
|
|
486
500
|
return shadows;
|
|
487
|
-
|
|
488
|
-
if (color == null)
|
|
501
|
+
if (ruleUtils.parseCssColor(components.at(0)))
|
|
489
502
|
return shadows;
|
|
490
|
-
|
|
503
|
+
let colorVarValue = "";
|
|
504
|
+
if (ruleUtils.parseCssColor(components.at(-1))) {
|
|
505
|
+
const color = ruleUtils.parseCssColor(components.pop());
|
|
506
|
+
if (color)
|
|
507
|
+
colorVarValue = `, ${ruleUtils.colorToString(color)}`;
|
|
508
|
+
}
|
|
509
|
+
colored.push(`${components.join(" ")} var(${colorVar}${colorVarValue})`);
|
|
491
510
|
}
|
|
492
511
|
return colored;
|
|
493
512
|
}
|
|
@@ -509,7 +528,7 @@ function makeGlobalStaticRules(prefix, property) {
|
|
|
509
528
|
return globalKeywords.map((keyword) => [`${prefix}-${keyword}`, { [property ?? prefix]: keyword }]);
|
|
510
529
|
}
|
|
511
530
|
function isCSSMathFn(value) {
|
|
512
|
-
return cssMathFnRE.test(value);
|
|
531
|
+
return value != null && cssMathFnRE.test(value);
|
|
513
532
|
}
|
|
514
533
|
function isSize(str) {
|
|
515
534
|
if (str[0] === "[" && str.slice(-1) === "]")
|
|
@@ -532,7 +551,6 @@ exports.insetMap = insetMap;
|
|
|
532
551
|
exports.isCSSMathFn = isCSSMathFn;
|
|
533
552
|
exports.isSize = isSize;
|
|
534
553
|
exports.makeGlobalStaticRules = makeGlobalStaticRules;
|
|
535
|
-
exports.numberWithUnitRE = numberWithUnitRE;
|
|
536
554
|
exports.parseColor = parseColor;
|
|
537
555
|
exports.positionMap = positionMap;
|
|
538
556
|
exports.resolveBreakpoints = resolveBreakpoints;
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const colors = require('../colors.cjs');
|
|
4
|
+
const transform = require('./preset-mini.-3Qybdh5.cjs');
|
|
5
|
+
|
|
6
|
+
const fontFamily = {
|
|
7
|
+
sans: [
|
|
8
|
+
"ui-sans-serif",
|
|
9
|
+
"system-ui",
|
|
10
|
+
"-apple-system",
|
|
11
|
+
"BlinkMacSystemFont",
|
|
12
|
+
'"Segoe UI"',
|
|
13
|
+
"Roboto",
|
|
14
|
+
'"Helvetica Neue"',
|
|
15
|
+
"Arial",
|
|
16
|
+
'"Noto Sans"',
|
|
17
|
+
"sans-serif",
|
|
18
|
+
'"Apple Color Emoji"',
|
|
19
|
+
'"Segoe UI Emoji"',
|
|
20
|
+
'"Segoe UI Symbol"',
|
|
21
|
+
'"Noto Color Emoji"'
|
|
22
|
+
].join(","),
|
|
23
|
+
serif: [
|
|
24
|
+
"ui-serif",
|
|
25
|
+
"Georgia",
|
|
26
|
+
"Cambria",
|
|
27
|
+
'"Times New Roman"',
|
|
28
|
+
"Times",
|
|
29
|
+
"serif"
|
|
30
|
+
].join(","),
|
|
31
|
+
mono: [
|
|
32
|
+
"ui-monospace",
|
|
33
|
+
"SFMono-Regular",
|
|
34
|
+
"Menlo",
|
|
35
|
+
"Monaco",
|
|
36
|
+
"Consolas",
|
|
37
|
+
'"Liberation Mono"',
|
|
38
|
+
'"Courier New"',
|
|
39
|
+
"monospace"
|
|
40
|
+
].join(",")
|
|
41
|
+
};
|
|
42
|
+
const fontSize = {
|
|
43
|
+
"xs": ["0.75rem", "1rem"],
|
|
44
|
+
"sm": ["0.875rem", "1.25rem"],
|
|
45
|
+
"base": ["1rem", "1.5rem"],
|
|
46
|
+
"lg": ["1.125rem", "1.75rem"],
|
|
47
|
+
"xl": ["1.25rem", "1.75rem"],
|
|
48
|
+
"2xl": ["1.5rem", "2rem"],
|
|
49
|
+
"3xl": ["1.875rem", "2.25rem"],
|
|
50
|
+
"4xl": ["2.25rem", "2.5rem"],
|
|
51
|
+
"5xl": ["3rem", "1"],
|
|
52
|
+
"6xl": ["3.75rem", "1"],
|
|
53
|
+
"7xl": ["4.5rem", "1"],
|
|
54
|
+
"8xl": ["6rem", "1"],
|
|
55
|
+
"9xl": ["8rem", "1"]
|
|
56
|
+
};
|
|
57
|
+
const textIndent = {
|
|
58
|
+
"DEFAULT": "1.5rem",
|
|
59
|
+
"xs": "0.5rem",
|
|
60
|
+
"sm": "1rem",
|
|
61
|
+
"md": "1.5rem",
|
|
62
|
+
"lg": "2rem",
|
|
63
|
+
"xl": "2.5rem",
|
|
64
|
+
"2xl": "3rem",
|
|
65
|
+
"3xl": "4rem"
|
|
66
|
+
};
|
|
67
|
+
const textStrokeWidth = {
|
|
68
|
+
DEFAULT: "1.5rem",
|
|
69
|
+
none: "0",
|
|
70
|
+
sm: "thin",
|
|
71
|
+
md: "medium",
|
|
72
|
+
lg: "thick"
|
|
73
|
+
};
|
|
74
|
+
const textShadow = {
|
|
75
|
+
DEFAULT: ["0 0 1px rgb(0 0 0 / 0.2)", "0 0 1px rgb(1 0 5 / 0.1)"],
|
|
76
|
+
none: "0 0 rgb(0 0 0 / 0)",
|
|
77
|
+
sm: "1px 1px 3px rgb(36 37 47 / 0.25)",
|
|
78
|
+
md: ["0 1px 2px rgb(30 29 39 / 0.19)", "1px 2px 4px rgb(54 64 147 / 0.18)"],
|
|
79
|
+
lg: ["3px 3px 6px rgb(0 0 0 / 0.26)", "0 0 5px rgb(15 3 86 / 0.22)"],
|
|
80
|
+
xl: ["1px 1px 3px rgb(0 0 0 / 0.29)", "2px 4px 7px rgb(73 64 125 / 0.35)"]
|
|
81
|
+
};
|
|
82
|
+
const lineHeight = {
|
|
83
|
+
none: "1",
|
|
84
|
+
tight: "1.25",
|
|
85
|
+
snug: "1.375",
|
|
86
|
+
normal: "1.5",
|
|
87
|
+
relaxed: "1.625",
|
|
88
|
+
loose: "2"
|
|
89
|
+
};
|
|
90
|
+
const letterSpacing = {
|
|
91
|
+
tighter: "-0.05em",
|
|
92
|
+
tight: "-0.025em",
|
|
93
|
+
normal: "0em",
|
|
94
|
+
wide: "0.025em",
|
|
95
|
+
wider: "0.05em",
|
|
96
|
+
widest: "0.1em"
|
|
97
|
+
};
|
|
98
|
+
const fontWeight = {
|
|
99
|
+
thin: "100",
|
|
100
|
+
extralight: "200",
|
|
101
|
+
light: "300",
|
|
102
|
+
normal: "400",
|
|
103
|
+
medium: "500",
|
|
104
|
+
semibold: "600",
|
|
105
|
+
bold: "700",
|
|
106
|
+
extrabold: "800",
|
|
107
|
+
black: "900"
|
|
108
|
+
// int[0, 900] -> int
|
|
109
|
+
};
|
|
110
|
+
const wordSpacing = letterSpacing;
|
|
111
|
+
|
|
112
|
+
const breakpoints = {
|
|
113
|
+
"sm": "640px",
|
|
114
|
+
"md": "768px",
|
|
115
|
+
"lg": "1024px",
|
|
116
|
+
"xl": "1280px",
|
|
117
|
+
"2xl": "1536px"
|
|
118
|
+
};
|
|
119
|
+
const verticalBreakpoints = { ...breakpoints };
|
|
120
|
+
const lineWidth = {
|
|
121
|
+
DEFAULT: "1px",
|
|
122
|
+
none: "0"
|
|
123
|
+
};
|
|
124
|
+
const spacing = {
|
|
125
|
+
"DEFAULT": "1rem",
|
|
126
|
+
"none": "0",
|
|
127
|
+
"xs": "0.75rem",
|
|
128
|
+
"sm": "0.875rem",
|
|
129
|
+
"lg": "1.125rem",
|
|
130
|
+
"xl": "1.25rem",
|
|
131
|
+
"2xl": "1.5rem",
|
|
132
|
+
"3xl": "1.875rem",
|
|
133
|
+
"4xl": "2.25rem",
|
|
134
|
+
"5xl": "3rem",
|
|
135
|
+
"6xl": "3.75rem",
|
|
136
|
+
"7xl": "4.5rem",
|
|
137
|
+
"8xl": "6rem",
|
|
138
|
+
"9xl": "8rem"
|
|
139
|
+
};
|
|
140
|
+
const duration = {
|
|
141
|
+
DEFAULT: "150ms",
|
|
142
|
+
none: "0s",
|
|
143
|
+
75: "75ms",
|
|
144
|
+
100: "100ms",
|
|
145
|
+
150: "150ms",
|
|
146
|
+
200: "200ms",
|
|
147
|
+
300: "300ms",
|
|
148
|
+
500: "500ms",
|
|
149
|
+
700: "700ms",
|
|
150
|
+
1e3: "1000ms"
|
|
151
|
+
};
|
|
152
|
+
const borderRadius = {
|
|
153
|
+
"DEFAULT": "0.25rem",
|
|
154
|
+
"none": "0",
|
|
155
|
+
"sm": "0.125rem",
|
|
156
|
+
"md": "0.375rem",
|
|
157
|
+
"lg": "0.5rem",
|
|
158
|
+
"xl": "0.75rem",
|
|
159
|
+
"2xl": "1rem",
|
|
160
|
+
"3xl": "1.5rem",
|
|
161
|
+
"full": "9999px"
|
|
162
|
+
};
|
|
163
|
+
const boxShadow = {
|
|
164
|
+
"DEFAULT": ["var(--un-shadow-inset) 0 1px 3px 0 rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 1px 2px -1px rgb(0 0 0 / 0.1)"],
|
|
165
|
+
"none": "0 0 rgb(0 0 0 / 0)",
|
|
166
|
+
"sm": "var(--un-shadow-inset) 0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
167
|
+
"md": ["var(--un-shadow-inset) 0 4px 6px -1px rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 2px 4px -2px rgb(0 0 0 / 0.1)"],
|
|
168
|
+
"lg": ["var(--un-shadow-inset) 0 10px 15px -3px rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 4px 6px -4px rgb(0 0 0 / 0.1)"],
|
|
169
|
+
"xl": ["var(--un-shadow-inset) 0 20px 25px -5px rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 8px 10px -6px rgb(0 0 0 / 0.1)"],
|
|
170
|
+
"2xl": "var(--un-shadow-inset) 0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
171
|
+
"inner": "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"
|
|
172
|
+
};
|
|
173
|
+
const easing = {
|
|
174
|
+
"DEFAULT": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
175
|
+
"linear": "linear",
|
|
176
|
+
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
177
|
+
"out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
178
|
+
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
179
|
+
};
|
|
180
|
+
const ringWidth = {
|
|
181
|
+
DEFAULT: "1px",
|
|
182
|
+
none: "0"
|
|
183
|
+
};
|
|
184
|
+
const zIndex = {
|
|
185
|
+
auto: "auto"
|
|
186
|
+
};
|
|
187
|
+
const media = {
|
|
188
|
+
mouse: "(hover) and (pointer: fine)"
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
const blur = {
|
|
192
|
+
"DEFAULT": "8px",
|
|
193
|
+
"0": "0",
|
|
194
|
+
"sm": "4px",
|
|
195
|
+
"md": "12px",
|
|
196
|
+
"lg": "16px",
|
|
197
|
+
"xl": "24px",
|
|
198
|
+
"2xl": "40px",
|
|
199
|
+
"3xl": "64px"
|
|
200
|
+
};
|
|
201
|
+
const dropShadow = {
|
|
202
|
+
"DEFAULT": ["0 1px 2px rgb(0 0 0 / 0.1)", "0 1px 1px rgb(0 0 0 / 0.06)"],
|
|
203
|
+
"sm": "0 1px 1px rgb(0 0 0 / 0.05)",
|
|
204
|
+
"md": ["0 4px 3px rgb(0 0 0 / 0.07)", "0 2px 2px rgb(0 0 0 / 0.06)"],
|
|
205
|
+
"lg": ["0 10px 8px rgb(0 0 0 / 0.04)", "0 4px 3px rgb(0 0 0 / 0.1)"],
|
|
206
|
+
"xl": ["0 20px 13px rgb(0 0 0 / 0.03)", "0 8px 5px rgb(0 0 0 / 0.08)"],
|
|
207
|
+
"2xl": "0 25px 25px rgb(0 0 0 / 0.15)",
|
|
208
|
+
"none": "0 0 rgb(0 0 0 / 0)"
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const baseSize = {
|
|
212
|
+
"xs": "20rem",
|
|
213
|
+
"sm": "24rem",
|
|
214
|
+
"md": "28rem",
|
|
215
|
+
"lg": "32rem",
|
|
216
|
+
"xl": "36rem",
|
|
217
|
+
"2xl": "42rem",
|
|
218
|
+
"3xl": "48rem",
|
|
219
|
+
"4xl": "56rem",
|
|
220
|
+
"5xl": "64rem",
|
|
221
|
+
"6xl": "72rem",
|
|
222
|
+
"7xl": "80rem",
|
|
223
|
+
"prose": "65ch"
|
|
224
|
+
};
|
|
225
|
+
const width = {
|
|
226
|
+
auto: "auto",
|
|
227
|
+
...baseSize,
|
|
228
|
+
screen: "100vw"
|
|
229
|
+
};
|
|
230
|
+
const maxWidth = {
|
|
231
|
+
none: "none",
|
|
232
|
+
...baseSize,
|
|
233
|
+
screen: "100vw"
|
|
234
|
+
};
|
|
235
|
+
const height = {
|
|
236
|
+
auto: "auto",
|
|
237
|
+
...baseSize,
|
|
238
|
+
screen: "100vh"
|
|
239
|
+
};
|
|
240
|
+
const maxHeight = {
|
|
241
|
+
none: "none",
|
|
242
|
+
...baseSize,
|
|
243
|
+
screen: "100vh"
|
|
244
|
+
};
|
|
245
|
+
const containers = Object.fromEntries(Object.entries(baseSize).map(([k, v]) => [k, `(min-width: ${v})`]));
|
|
246
|
+
|
|
247
|
+
const preflightBase = {
|
|
248
|
+
...transform.transformBase,
|
|
249
|
+
...transform.boxShadowsBase,
|
|
250
|
+
...transform.ringBase
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
const theme = {
|
|
254
|
+
width,
|
|
255
|
+
height,
|
|
256
|
+
maxWidth,
|
|
257
|
+
maxHeight,
|
|
258
|
+
minWidth: maxWidth,
|
|
259
|
+
minHeight: maxHeight,
|
|
260
|
+
inlineSize: width,
|
|
261
|
+
blockSize: height,
|
|
262
|
+
maxInlineSize: maxWidth,
|
|
263
|
+
maxBlockSize: maxHeight,
|
|
264
|
+
minInlineSize: maxWidth,
|
|
265
|
+
minBlockSize: maxHeight,
|
|
266
|
+
colors: colors.colors,
|
|
267
|
+
fontFamily,
|
|
268
|
+
fontSize,
|
|
269
|
+
fontWeight,
|
|
270
|
+
breakpoints,
|
|
271
|
+
verticalBreakpoints,
|
|
272
|
+
borderRadius,
|
|
273
|
+
lineHeight,
|
|
274
|
+
letterSpacing,
|
|
275
|
+
wordSpacing,
|
|
276
|
+
boxShadow,
|
|
277
|
+
textIndent,
|
|
278
|
+
textShadow,
|
|
279
|
+
textStrokeWidth,
|
|
280
|
+
blur,
|
|
281
|
+
dropShadow,
|
|
282
|
+
easing,
|
|
283
|
+
lineWidth,
|
|
284
|
+
spacing,
|
|
285
|
+
duration,
|
|
286
|
+
ringWidth,
|
|
287
|
+
preflightBase,
|
|
288
|
+
containers,
|
|
289
|
+
zIndex,
|
|
290
|
+
media
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
exports.baseSize = baseSize;
|
|
294
|
+
exports.blur = blur;
|
|
295
|
+
exports.borderRadius = borderRadius;
|
|
296
|
+
exports.boxShadow = boxShadow;
|
|
297
|
+
exports.breakpoints = breakpoints;
|
|
298
|
+
exports.containers = containers;
|
|
299
|
+
exports.dropShadow = dropShadow;
|
|
300
|
+
exports.duration = duration;
|
|
301
|
+
exports.easing = easing;
|
|
302
|
+
exports.fontFamily = fontFamily;
|
|
303
|
+
exports.fontSize = fontSize;
|
|
304
|
+
exports.fontWeight = fontWeight;
|
|
305
|
+
exports.height = height;
|
|
306
|
+
exports.letterSpacing = letterSpacing;
|
|
307
|
+
exports.lineHeight = lineHeight;
|
|
308
|
+
exports.lineWidth = lineWidth;
|
|
309
|
+
exports.maxHeight = maxHeight;
|
|
310
|
+
exports.maxWidth = maxWidth;
|
|
311
|
+
exports.media = media;
|
|
312
|
+
exports.preflightBase = preflightBase;
|
|
313
|
+
exports.ringWidth = ringWidth;
|
|
314
|
+
exports.spacing = spacing;
|
|
315
|
+
exports.textIndent = textIndent;
|
|
316
|
+
exports.textShadow = textShadow;
|
|
317
|
+
exports.textStrokeWidth = textStrokeWidth;
|
|
318
|
+
exports.theme = theme;
|
|
319
|
+
exports.verticalBreakpoints = verticalBreakpoints;
|
|
320
|
+
exports.width = width;
|
|
321
|
+
exports.wordSpacing = wordSpacing;
|
|
322
|
+
exports.zIndex = zIndex;
|