@unocss/preset-mini 66.5.10 → 66.5.12
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-gol_9zmq.mjs +36 -0
- package/dist/colors-C9l2trjD.d.mts +431 -0
- package/dist/colors-Cxq9P2g9.mjs +362 -0
- package/dist/colors.d.mts +2 -354
- package/dist/colors.mjs +2 -360
- package/dist/index-CnsmLem5.d.mts +71 -0
- package/dist/index.d.mts +5 -76
- package/dist/index.mjs +67 -70
- package/dist/rules-CuP-xMI2.mjs +1683 -0
- package/dist/rules.d.mts +72 -48
- package/dist/rules.mjs +4 -5
- package/dist/theme-5nLH7UVx.d.mts +1085 -0
- package/dist/theme-DeYMqZAV.mjs +347 -0
- package/dist/theme.d.mts +3 -338
- package/dist/theme.mjs +5 -6
- package/dist/utils-CNv_IKMQ.d.mts +122 -0
- package/dist/utils-DLpYZ57Q.mjs +638 -0
- package/dist/utils.d.mts +5 -77
- package/dist/utils.mjs +5 -3
- package/dist/variants.d.mts +38 -24
- package/dist/variants.mjs +661 -4
- package/package.json +7 -8
- package/colors.d.ts +0 -1
- package/dist/colors.d.ts +0 -354
- package/dist/index.d.ts +0 -76
- package/dist/rules.d.ts +0 -130
- package/dist/shared/preset-mini.BSnAbT9I.d.mts +0 -748
- package/dist/shared/preset-mini.B_2UJsV2.mjs +0 -693
- package/dist/shared/preset-mini.BjJC-NnU.d.mts +0 -79
- package/dist/shared/preset-mini.BjJC-NnU.d.ts +0 -79
- package/dist/shared/preset-mini.CRliz1QB.d.ts +0 -76
- package/dist/shared/preset-mini.CVEK1uAa.mjs +0 -355
- package/dist/shared/preset-mini.CoOfBKs_.d.ts +0 -748
- package/dist/shared/preset-mini.DBTjVFxS.mjs +0 -580
- package/dist/shared/preset-mini.QLusboLD.mjs +0 -1064
- package/dist/shared/preset-mini.kmtdc_h1.mjs +0 -324
- package/dist/shared/preset-mini.oF7XTPi1.d.mts +0 -76
- package/dist/theme.d.ts +0 -338
- package/dist/utils.d.ts +0 -77
- package/dist/variants.d.ts +0 -52
- package/rules.d.ts +0 -1
- package/theme.d.ts +0 -1
- package/utils.d.ts +0 -1
- package/variants.d.ts +0 -1
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { CSSObject, Arrayable } from '@unocss/core';
|
|
2
|
-
|
|
3
|
-
interface ThemeAnimation {
|
|
4
|
-
keyframes?: Record<string, string>;
|
|
5
|
-
durations?: Record<string, string>;
|
|
6
|
-
timingFns?: Record<string, string>;
|
|
7
|
-
properties?: Record<string, object>;
|
|
8
|
-
counts?: Record<string, string | number>;
|
|
9
|
-
category?: Record<string, string>;
|
|
10
|
-
}
|
|
11
|
-
interface Colors {
|
|
12
|
-
[key: string]: Colors & {
|
|
13
|
-
DEFAULT?: string;
|
|
14
|
-
} | string;
|
|
15
|
-
}
|
|
16
|
-
interface Theme {
|
|
17
|
-
width?: Record<string, string>;
|
|
18
|
-
height?: Record<string, string>;
|
|
19
|
-
maxWidth?: Record<string, string>;
|
|
20
|
-
maxHeight?: Record<string, string>;
|
|
21
|
-
minWidth?: Record<string, string>;
|
|
22
|
-
minHeight?: Record<string, string>;
|
|
23
|
-
inlineSize?: Record<string, string>;
|
|
24
|
-
blockSize?: Record<string, string>;
|
|
25
|
-
maxInlineSize?: Record<string, string>;
|
|
26
|
-
maxBlockSize?: Record<string, string>;
|
|
27
|
-
minInlineSize?: Record<string, string>;
|
|
28
|
-
minBlockSize?: Record<string, string>;
|
|
29
|
-
borderRadius?: Record<string, string>;
|
|
30
|
-
breakpoints?: Record<string, string>;
|
|
31
|
-
verticalBreakpoints?: Record<string, string>;
|
|
32
|
-
colors?: Colors;
|
|
33
|
-
borderColor?: Colors;
|
|
34
|
-
backgroundColor?: Colors;
|
|
35
|
-
textColor?: Colors;
|
|
36
|
-
shadowColor?: Colors;
|
|
37
|
-
accentColor?: Colors;
|
|
38
|
-
fontFamily?: Record<string, string>;
|
|
39
|
-
fontSize?: Record<string, string | [string, string | CSSObject] | [string, string, string]>;
|
|
40
|
-
fontWeight?: Record<string, string>;
|
|
41
|
-
lineHeight?: Record<string, string>;
|
|
42
|
-
letterSpacing?: Record<string, string>;
|
|
43
|
-
wordSpacing?: Record<string, string>;
|
|
44
|
-
boxShadow?: Record<string, string | string[]>;
|
|
45
|
-
textIndent?: Record<string, string>;
|
|
46
|
-
textShadow?: Record<string, string | string[]>;
|
|
47
|
-
textStrokeWidth?: Record<string, string>;
|
|
48
|
-
ringWidth?: Record<string, string>;
|
|
49
|
-
lineWidth?: Record<string, string>;
|
|
50
|
-
spacing?: Record<string, string>;
|
|
51
|
-
duration?: Record<string, string>;
|
|
52
|
-
aria?: Record<string, string>;
|
|
53
|
-
data?: Record<string, string>;
|
|
54
|
-
zIndex?: Record<string, string>;
|
|
55
|
-
blur?: Record<string, string>;
|
|
56
|
-
dropShadow?: Record<string, string | string[]>;
|
|
57
|
-
easing?: Record<string, string>;
|
|
58
|
-
transitionProperty?: Record<string, string>;
|
|
59
|
-
media?: Record<string, string>;
|
|
60
|
-
supports?: Record<string, string>;
|
|
61
|
-
containers?: Record<string, string>;
|
|
62
|
-
animation?: ThemeAnimation;
|
|
63
|
-
gridAutoColumn?: Record<string, string>;
|
|
64
|
-
gridAutoRow?: Record<string, string>;
|
|
65
|
-
gridColumn?: Record<string, string>;
|
|
66
|
-
gridRow?: Record<string, string>;
|
|
67
|
-
gridTemplateColumn?: Record<string, string>;
|
|
68
|
-
gridTemplateRow?: Record<string, string>;
|
|
69
|
-
container?: {
|
|
70
|
-
center?: boolean;
|
|
71
|
-
padding?: string | Record<string, string>;
|
|
72
|
-
maxWidth?: Record<string, string>;
|
|
73
|
-
};
|
|
74
|
-
/** Used to generate CSS custom properties placeholder in preflight */
|
|
75
|
-
preflightRoot?: Arrayable<string>;
|
|
76
|
-
preflightBase?: Record<string, string | number>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type { Colors as C, Theme as T, ThemeAnimation as a };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { CSSObject, Arrayable } from '@unocss/core';
|
|
2
|
-
|
|
3
|
-
interface ThemeAnimation {
|
|
4
|
-
keyframes?: Record<string, string>;
|
|
5
|
-
durations?: Record<string, string>;
|
|
6
|
-
timingFns?: Record<string, string>;
|
|
7
|
-
properties?: Record<string, object>;
|
|
8
|
-
counts?: Record<string, string | number>;
|
|
9
|
-
category?: Record<string, string>;
|
|
10
|
-
}
|
|
11
|
-
interface Colors {
|
|
12
|
-
[key: string]: Colors & {
|
|
13
|
-
DEFAULT?: string;
|
|
14
|
-
} | string;
|
|
15
|
-
}
|
|
16
|
-
interface Theme {
|
|
17
|
-
width?: Record<string, string>;
|
|
18
|
-
height?: Record<string, string>;
|
|
19
|
-
maxWidth?: Record<string, string>;
|
|
20
|
-
maxHeight?: Record<string, string>;
|
|
21
|
-
minWidth?: Record<string, string>;
|
|
22
|
-
minHeight?: Record<string, string>;
|
|
23
|
-
inlineSize?: Record<string, string>;
|
|
24
|
-
blockSize?: Record<string, string>;
|
|
25
|
-
maxInlineSize?: Record<string, string>;
|
|
26
|
-
maxBlockSize?: Record<string, string>;
|
|
27
|
-
minInlineSize?: Record<string, string>;
|
|
28
|
-
minBlockSize?: Record<string, string>;
|
|
29
|
-
borderRadius?: Record<string, string>;
|
|
30
|
-
breakpoints?: Record<string, string>;
|
|
31
|
-
verticalBreakpoints?: Record<string, string>;
|
|
32
|
-
colors?: Colors;
|
|
33
|
-
borderColor?: Colors;
|
|
34
|
-
backgroundColor?: Colors;
|
|
35
|
-
textColor?: Colors;
|
|
36
|
-
shadowColor?: Colors;
|
|
37
|
-
accentColor?: Colors;
|
|
38
|
-
fontFamily?: Record<string, string>;
|
|
39
|
-
fontSize?: Record<string, string | [string, string | CSSObject] | [string, string, string]>;
|
|
40
|
-
fontWeight?: Record<string, string>;
|
|
41
|
-
lineHeight?: Record<string, string>;
|
|
42
|
-
letterSpacing?: Record<string, string>;
|
|
43
|
-
wordSpacing?: Record<string, string>;
|
|
44
|
-
boxShadow?: Record<string, string | string[]>;
|
|
45
|
-
textIndent?: Record<string, string>;
|
|
46
|
-
textShadow?: Record<string, string | string[]>;
|
|
47
|
-
textStrokeWidth?: Record<string, string>;
|
|
48
|
-
ringWidth?: Record<string, string>;
|
|
49
|
-
lineWidth?: Record<string, string>;
|
|
50
|
-
spacing?: Record<string, string>;
|
|
51
|
-
duration?: Record<string, string>;
|
|
52
|
-
aria?: Record<string, string>;
|
|
53
|
-
data?: Record<string, string>;
|
|
54
|
-
zIndex?: Record<string, string>;
|
|
55
|
-
blur?: Record<string, string>;
|
|
56
|
-
dropShadow?: Record<string, string | string[]>;
|
|
57
|
-
easing?: Record<string, string>;
|
|
58
|
-
transitionProperty?: Record<string, string>;
|
|
59
|
-
media?: Record<string, string>;
|
|
60
|
-
supports?: Record<string, string>;
|
|
61
|
-
containers?: Record<string, string>;
|
|
62
|
-
animation?: ThemeAnimation;
|
|
63
|
-
gridAutoColumn?: Record<string, string>;
|
|
64
|
-
gridAutoRow?: Record<string, string>;
|
|
65
|
-
gridColumn?: Record<string, string>;
|
|
66
|
-
gridRow?: Record<string, string>;
|
|
67
|
-
gridTemplateColumn?: Record<string, string>;
|
|
68
|
-
gridTemplateRow?: Record<string, string>;
|
|
69
|
-
container?: {
|
|
70
|
-
center?: boolean;
|
|
71
|
-
padding?: string | Record<string, string>;
|
|
72
|
-
maxWidth?: Record<string, string>;
|
|
73
|
-
};
|
|
74
|
-
/** Used to generate CSS custom properties placeholder in preflight */
|
|
75
|
-
preflightRoot?: Arrayable<string>;
|
|
76
|
-
preflightBase?: Record<string, string | number>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type { Colors as C, Theme as T, ThemeAnimation as a };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { DynamicMatcher, CSSObject, VariantContext, StaticRule } from '@unocss/core';
|
|
2
|
-
import { ParsedColorValue } from '@unocss/rule-utils';
|
|
3
|
-
import { T as Theme } from './preset-mini.BjJC-NnU.js';
|
|
4
|
-
|
|
5
|
-
declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
|
|
6
|
-
/**
|
|
7
|
-
* Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
|
|
8
|
-
*
|
|
9
|
-
* @param propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
|
|
10
|
-
* @see {@link directionMap}
|
|
11
|
-
*/
|
|
12
|
-
declare function directionSize(propertyPrefix: string): DynamicMatcher;
|
|
13
|
-
type ThemeColorKeys = 'colors' | 'borderColor' | 'backgroundColor' | 'textColor' | 'shadowColor' | 'accentColor';
|
|
14
|
-
/**
|
|
15
|
-
* Split utility shorthand delimited by / or :
|
|
16
|
-
*/
|
|
17
|
-
declare function splitShorthand(body: string, type: string): string[] | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Parse color string into {@link ParsedColorValue} (if possible). Color value will first be matched to theme object before parsing.
|
|
20
|
-
* See also color.tests.ts for more examples.
|
|
21
|
-
*
|
|
22
|
-
* @example Parseable strings:
|
|
23
|
-
* 'red' // From theme, if 'red' is available
|
|
24
|
-
* 'red-100' // From theme, plus scale
|
|
25
|
-
* 'red-100/20' // From theme, plus scale/opacity
|
|
26
|
-
* '[rgb(100 2 3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
|
|
27
|
-
*
|
|
28
|
-
* @param body - Color string to be parsed.
|
|
29
|
-
* @param theme - {@link Theme} object.
|
|
30
|
-
* @return object if string is parseable.
|
|
31
|
-
*/
|
|
32
|
-
declare function parseColor(body: string, theme: Theme, key?: ThemeColorKeys): ParsedColorValue | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Provide {@link DynamicMatcher} function to produce color value matched from rule.
|
|
35
|
-
*
|
|
36
|
-
* @see {@link parseColor}
|
|
37
|
-
*
|
|
38
|
-
* @example Resolving 'red' from theme:
|
|
39
|
-
* colorResolver('background-color', 'background')('', 'red')
|
|
40
|
-
* return { 'background-color': '#f12' }
|
|
41
|
-
*
|
|
42
|
-
* @example Resolving 'red-100' from theme:
|
|
43
|
-
* colorResolver('background-color', 'background')('', 'red-100')
|
|
44
|
-
* return { '--un-background-opacity': '1', 'background-color': 'rgb(254 226 226 / var(--un-background-opacity))' }
|
|
45
|
-
*
|
|
46
|
-
* @example Resolving 'red-100/20' from theme:
|
|
47
|
-
* colorResolver('background-color', 'background')('', 'red-100/20')
|
|
48
|
-
* return { 'background-color': 'rgb(204 251 241 / 0.22)' }
|
|
49
|
-
*
|
|
50
|
-
* @example Resolving 'hex-124':
|
|
51
|
-
* colorResolver('color', 'text')('', 'hex-124')
|
|
52
|
-
* return { '--un-text-opacity': '1', 'color': 'rgb(17 34 68 / var(--un-text-opacity))' }
|
|
53
|
-
*
|
|
54
|
-
* @param property - Property for the css value to be created.
|
|
55
|
-
* @param varName - Base name for the opacity variable.
|
|
56
|
-
* @param [key] - Theme key to select the color from.
|
|
57
|
-
* @param [shouldPass] - Function to decide whether to pass the css.
|
|
58
|
-
* @return object.
|
|
59
|
-
*/
|
|
60
|
-
declare function colorResolver(property: string, varName: string, key?: ThemeColorKeys, shouldPass?: (css: CSSObject) => boolean): DynamicMatcher;
|
|
61
|
-
declare function colorableShadows(shadows: string | string[], colorVar: string): string[];
|
|
62
|
-
declare function hasParseableColor(color: string | undefined, theme: Theme, key: ThemeColorKeys): boolean;
|
|
63
|
-
declare function resolveBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>, key?: 'breakpoints' | 'verticalBreakpoints'): {
|
|
64
|
-
point: string;
|
|
65
|
-
size: string;
|
|
66
|
-
}[] | undefined;
|
|
67
|
-
declare function resolveVerticalBreakpoints(context: Readonly<VariantContext<Theme>>): {
|
|
68
|
-
point: string;
|
|
69
|
-
size: string;
|
|
70
|
-
}[] | undefined;
|
|
71
|
-
declare function makeGlobalStaticRules(prefix: string, property?: string): StaticRule[];
|
|
72
|
-
declare function isCSSMathFn(value: string | undefined): boolean;
|
|
73
|
-
declare function isSize(str: string): boolean;
|
|
74
|
-
declare function transformXYZ(d: string, v: string, name: string): [string, string][];
|
|
75
|
-
|
|
76
|
-
export { CONTROL_MINI_NO_NEGATIVE as C, colorableShadows as a, resolveVerticalBreakpoints as b, colorResolver as c, directionSize as d, isSize as e, hasParseableColor as h, isCSSMathFn as i, makeGlobalStaticRules as m, parseColor as p, resolveBreakpoints as r, splitShorthand as s, transformXYZ as t };
|
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import { q as makeGlobalStaticRules, a as h, g as globalKeywords, l as colorResolver, t as isCSSMathFn, n as hasParseableColor, m as colorableShadows, p as positionMap, w as transformXYZ } from './preset-mini.DBTjVFxS.mjs';
|
|
2
|
-
|
|
3
|
-
const cursorValues = ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"];
|
|
4
|
-
const containValues = ["none", "strict", "content", "size", "inline-size", "layout", "style", "paint"];
|
|
5
|
-
const varEmpty = " ";
|
|
6
|
-
const displays = [
|
|
7
|
-
["inline", { display: "inline" }],
|
|
8
|
-
["block", { display: "block" }],
|
|
9
|
-
["inline-block", { display: "inline-block" }],
|
|
10
|
-
["contents", { display: "contents" }],
|
|
11
|
-
["flow-root", { display: "flow-root" }],
|
|
12
|
-
["list-item", { display: "list-item" }],
|
|
13
|
-
["hidden", { display: "none" }],
|
|
14
|
-
[/^display-(.+)$/, ([, c]) => ({ display: h.bracket.cssvar.global(c) })]
|
|
15
|
-
];
|
|
16
|
-
const appearances = [
|
|
17
|
-
["visible", { visibility: "visible" }],
|
|
18
|
-
["invisible", { visibility: "hidden" }],
|
|
19
|
-
["backface-visible", { "backface-visibility": "visible" }],
|
|
20
|
-
["backface-hidden", { "backface-visibility": "hidden" }],
|
|
21
|
-
...makeGlobalStaticRules("backface", "backface-visibility")
|
|
22
|
-
];
|
|
23
|
-
const cursors = [
|
|
24
|
-
[/^cursor-(.+)$/, ([, c]) => ({ cursor: h.bracket.cssvar.global(c) })],
|
|
25
|
-
...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
|
|
26
|
-
];
|
|
27
|
-
const contains = [
|
|
28
|
-
[/^contain-(.*)$/, ([, d]) => {
|
|
29
|
-
if (h.bracket(d) != null) {
|
|
30
|
-
return {
|
|
31
|
-
contain: h.bracket(d).split(" ").map((e) => h.cssvar.fraction(e) ?? e).join(" ")
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
return containValues.includes(d) ? { contain: d } : void 0;
|
|
35
|
-
}]
|
|
36
|
-
];
|
|
37
|
-
const pointerEvents = [
|
|
38
|
-
["pointer-events-auto", { "pointer-events": "auto" }],
|
|
39
|
-
["pointer-events-none", { "pointer-events": "none" }],
|
|
40
|
-
...makeGlobalStaticRules("pointer-events")
|
|
41
|
-
];
|
|
42
|
-
const resizes = [
|
|
43
|
-
["resize-x", { resize: "horizontal" }],
|
|
44
|
-
["resize-y", { resize: "vertical" }],
|
|
45
|
-
["resize", { resize: "both" }],
|
|
46
|
-
["resize-none", { resize: "none" }],
|
|
47
|
-
...makeGlobalStaticRules("resize")
|
|
48
|
-
];
|
|
49
|
-
const userSelects = [
|
|
50
|
-
["select-auto", { "-webkit-user-select": "auto", "user-select": "auto" }],
|
|
51
|
-
["select-all", { "-webkit-user-select": "all", "user-select": "all" }],
|
|
52
|
-
["select-text", { "-webkit-user-select": "text", "user-select": "text" }],
|
|
53
|
-
["select-none", { "-webkit-user-select": "none", "user-select": "none" }],
|
|
54
|
-
...makeGlobalStaticRules("select", "user-select")
|
|
55
|
-
];
|
|
56
|
-
const whitespaces = [
|
|
57
|
-
[
|
|
58
|
-
/^(?:whitespace-|ws-)([-\w]+)$/,
|
|
59
|
-
([, v]) => ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces", ...globalKeywords].includes(v) ? { "white-space": v } : void 0,
|
|
60
|
-
{ autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)" }
|
|
61
|
-
]
|
|
62
|
-
];
|
|
63
|
-
const contentVisibility = [
|
|
64
|
-
[/^intrinsic-size-(.+)$/, ([, d]) => ({ "contain-intrinsic-size": h.bracket.cssvar.global.fraction.rem(d) }), { autocomplete: "intrinsic-size-<num>" }],
|
|
65
|
-
["content-visibility-visible", { "content-visibility": "visible" }],
|
|
66
|
-
["content-visibility-hidden", { "content-visibility": "hidden" }],
|
|
67
|
-
["content-visibility-auto", { "content-visibility": "auto" }],
|
|
68
|
-
...makeGlobalStaticRules("content-visibility")
|
|
69
|
-
];
|
|
70
|
-
const contents = [
|
|
71
|
-
[/^content-(.+)$/, ([, v]) => ({ content: h.bracket.cssvar(v) })],
|
|
72
|
-
["content-empty", { content: '""' }],
|
|
73
|
-
["content-none", { content: "none" }]
|
|
74
|
-
];
|
|
75
|
-
const breaks = [
|
|
76
|
-
["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
|
|
77
|
-
["break-words", { "overflow-wrap": "break-word" }],
|
|
78
|
-
["break-all", { "word-break": "break-all" }],
|
|
79
|
-
["break-keep", { "word-break": "keep-all" }],
|
|
80
|
-
["break-anywhere", { "overflow-wrap": "anywhere" }]
|
|
81
|
-
];
|
|
82
|
-
const textWraps = [
|
|
83
|
-
["text-wrap", { "text-wrap": "wrap" }],
|
|
84
|
-
["text-nowrap", { "text-wrap": "nowrap" }],
|
|
85
|
-
["text-balance", { "text-wrap": "balance" }],
|
|
86
|
-
["text-pretty", { "text-wrap": "pretty" }]
|
|
87
|
-
];
|
|
88
|
-
const textOverflows = [
|
|
89
|
-
["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
|
|
90
|
-
["text-truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
|
|
91
|
-
["text-ellipsis", { "text-overflow": "ellipsis" }],
|
|
92
|
-
["text-clip", { "text-overflow": "clip" }]
|
|
93
|
-
];
|
|
94
|
-
const textTransforms = [
|
|
95
|
-
["case-upper", { "text-transform": "uppercase" }],
|
|
96
|
-
["case-lower", { "text-transform": "lowercase" }],
|
|
97
|
-
["case-capital", { "text-transform": "capitalize" }],
|
|
98
|
-
["case-normal", { "text-transform": "none" }],
|
|
99
|
-
...makeGlobalStaticRules("case", "text-transform")
|
|
100
|
-
];
|
|
101
|
-
const fontStyles = [
|
|
102
|
-
["italic", { "font-style": "italic" }],
|
|
103
|
-
["not-italic", { "font-style": "normal" }],
|
|
104
|
-
["font-italic", { "font-style": "italic" }],
|
|
105
|
-
["font-not-italic", { "font-style": "normal" }],
|
|
106
|
-
["oblique", { "font-style": "oblique" }],
|
|
107
|
-
["not-oblique", { "font-style": "normal" }],
|
|
108
|
-
["font-oblique", { "font-style": "oblique" }],
|
|
109
|
-
["font-not-oblique", { "font-style": "normal" }]
|
|
110
|
-
];
|
|
111
|
-
const fontSmoothings = [
|
|
112
|
-
["antialiased", {
|
|
113
|
-
"-webkit-font-smoothing": "antialiased",
|
|
114
|
-
"-moz-osx-font-smoothing": "grayscale"
|
|
115
|
-
}],
|
|
116
|
-
["subpixel-antialiased", {
|
|
117
|
-
"-webkit-font-smoothing": "auto",
|
|
118
|
-
"-moz-osx-font-smoothing": "auto"
|
|
119
|
-
}]
|
|
120
|
-
];
|
|
121
|
-
const fieldSizing = [
|
|
122
|
-
["field-sizing-fixed", { "field-sizing": "fixed" }],
|
|
123
|
-
["field-sizing-content", { "field-sizing": "content" }]
|
|
124
|
-
];
|
|
125
|
-
|
|
126
|
-
const ringBase = {
|
|
127
|
-
"--un-ring-inset": varEmpty,
|
|
128
|
-
"--un-ring-offset-width": "0px",
|
|
129
|
-
"--un-ring-offset-color": "#fff",
|
|
130
|
-
"--un-ring-width": "0px",
|
|
131
|
-
"--un-ring-color": "rgb(147 197 253 / 0.5)",
|
|
132
|
-
"--un-shadow": "0 0 rgb(0 0 0 / 0)"
|
|
133
|
-
};
|
|
134
|
-
const preflightKeys$2 = Object.keys(ringBase);
|
|
135
|
-
const rings = [
|
|
136
|
-
// ring
|
|
137
|
-
[/^ring(?:-(.+))?$/, ([, d], { theme }) => {
|
|
138
|
-
const value = theme.ringWidth?.[d || "DEFAULT"] ?? h.px(d || "1");
|
|
139
|
-
if (value) {
|
|
140
|
-
return {
|
|
141
|
-
"--un-ring-width": value,
|
|
142
|
-
"--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
|
|
143
|
-
"--un-ring-shadow": "var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color)",
|
|
144
|
-
"box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
}, { custom: { preflightKeys: preflightKeys$2 }, autocomplete: "ring-$ringWidth" }],
|
|
148
|
-
// size
|
|
149
|
-
[/^ring-(?:width-|size-)(.+)$/, handleWidth, { autocomplete: "ring-(width|size)-$lineWidth" }],
|
|
150
|
-
// offset size
|
|
151
|
-
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
152
|
-
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? h.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
|
|
153
|
-
// colors
|
|
154
|
-
[/^ring-(.+)$/, handleColorOrWidth, { autocomplete: "ring-$colors" }],
|
|
155
|
-
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
|
|
156
|
-
// offset color
|
|
157
|
-
[/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset", "borderColor"), { autocomplete: "ring-offset-$colors" }],
|
|
158
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
|
|
159
|
-
// style
|
|
160
|
-
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
161
|
-
];
|
|
162
|
-
function handleWidth([, b], { theme }) {
|
|
163
|
-
return { "--un-ring-width": theme.ringWidth?.[b] ?? h.bracket.cssvar.px(b) };
|
|
164
|
-
}
|
|
165
|
-
function handleColorOrWidth(match, ctx) {
|
|
166
|
-
if (isCSSMathFn(h.bracket(match[1])))
|
|
167
|
-
return handleWidth(match, ctx);
|
|
168
|
-
return colorResolver("--un-ring-color", "ring", "borderColor")(match, ctx);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const boxShadowsBase = {
|
|
172
|
-
"--un-ring-offset-shadow": "0 0 rgb(0 0 0 / 0)",
|
|
173
|
-
"--un-ring-shadow": "0 0 rgb(0 0 0 / 0)",
|
|
174
|
-
"--un-shadow-inset": varEmpty,
|
|
175
|
-
"--un-shadow": "0 0 rgb(0 0 0 / 0)"
|
|
176
|
-
};
|
|
177
|
-
const preflightKeys$1 = Object.keys(boxShadowsBase);
|
|
178
|
-
const boxShadows = [
|
|
179
|
-
// color
|
|
180
|
-
[/^shadow(?:-(.+))?$/, (match, context) => {
|
|
181
|
-
const [, d] = match;
|
|
182
|
-
const { theme } = context;
|
|
183
|
-
const v = theme.boxShadow?.[d || "DEFAULT"];
|
|
184
|
-
const c = d ? h.bracket.cssvar(d) : void 0;
|
|
185
|
-
if ((v != null || c != null) && !hasParseableColor(c, theme, "shadowColor")) {
|
|
186
|
-
return {
|
|
187
|
-
"--un-shadow": colorableShadows(v || c, "--un-shadow-color").join(","),
|
|
188
|
-
"box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
return colorResolver("--un-shadow-color", "shadow", "shadowColor")(match, context);
|
|
192
|
-
}, { custom: { preflightKeys: preflightKeys$1 }, autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
|
|
193
|
-
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
|
|
194
|
-
// inset
|
|
195
|
-
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
196
|
-
];
|
|
197
|
-
|
|
198
|
-
const transformValues = [
|
|
199
|
-
"translate",
|
|
200
|
-
"rotate",
|
|
201
|
-
"scale"
|
|
202
|
-
];
|
|
203
|
-
const transformCpu = [
|
|
204
|
-
"translateX(var(--un-translate-x))",
|
|
205
|
-
"translateY(var(--un-translate-y))",
|
|
206
|
-
// 'translateZ(var(--un-translate-z))',
|
|
207
|
-
"rotate(var(--un-rotate))",
|
|
208
|
-
// 'rotateX(var(--un-rotate-x))',
|
|
209
|
-
// 'rotateY(var(--un-rotate-y))',
|
|
210
|
-
"rotateZ(var(--un-rotate-z))",
|
|
211
|
-
"skewX(var(--un-skew-x))",
|
|
212
|
-
"skewY(var(--un-skew-y))",
|
|
213
|
-
"scaleX(var(--un-scale-x))",
|
|
214
|
-
"scaleY(var(--un-scale-y))"
|
|
215
|
-
// 'scaleZ(var(--un-scale-z))',
|
|
216
|
-
].join(" ");
|
|
217
|
-
const transform = [
|
|
218
|
-
"translateX(var(--un-translate-x))",
|
|
219
|
-
"translateY(var(--un-translate-y))",
|
|
220
|
-
"translateZ(var(--un-translate-z))",
|
|
221
|
-
"rotate(var(--un-rotate))",
|
|
222
|
-
"rotateX(var(--un-rotate-x))",
|
|
223
|
-
"rotateY(var(--un-rotate-y))",
|
|
224
|
-
"rotateZ(var(--un-rotate-z))",
|
|
225
|
-
"skewX(var(--un-skew-x))",
|
|
226
|
-
"skewY(var(--un-skew-y))",
|
|
227
|
-
"scaleX(var(--un-scale-x))",
|
|
228
|
-
"scaleY(var(--un-scale-y))",
|
|
229
|
-
"scaleZ(var(--un-scale-z))"
|
|
230
|
-
].join(" ");
|
|
231
|
-
const transformGpu = [
|
|
232
|
-
"translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
|
|
233
|
-
"rotate(var(--un-rotate))",
|
|
234
|
-
"rotateX(var(--un-rotate-x))",
|
|
235
|
-
"rotateY(var(--un-rotate-y))",
|
|
236
|
-
"rotateZ(var(--un-rotate-z))",
|
|
237
|
-
"skewX(var(--un-skew-x))",
|
|
238
|
-
"skewY(var(--un-skew-y))",
|
|
239
|
-
"scaleX(var(--un-scale-x))",
|
|
240
|
-
"scaleY(var(--un-scale-y))",
|
|
241
|
-
"scaleZ(var(--un-scale-z))"
|
|
242
|
-
].join(" ");
|
|
243
|
-
const transformBase = {
|
|
244
|
-
// transform
|
|
245
|
-
"--un-rotate": 0,
|
|
246
|
-
"--un-rotate-x": 0,
|
|
247
|
-
"--un-rotate-y": 0,
|
|
248
|
-
"--un-rotate-z": 0,
|
|
249
|
-
"--un-scale-x": 1,
|
|
250
|
-
"--un-scale-y": 1,
|
|
251
|
-
"--un-scale-z": 1,
|
|
252
|
-
"--un-skew-x": 0,
|
|
253
|
-
"--un-skew-y": 0,
|
|
254
|
-
"--un-translate-x": 0,
|
|
255
|
-
"--un-translate-y": 0,
|
|
256
|
-
"--un-translate-z": 0
|
|
257
|
-
};
|
|
258
|
-
const preflightKeys = Object.keys(transformBase);
|
|
259
|
-
const transforms = [
|
|
260
|
-
// origins
|
|
261
|
-
[
|
|
262
|
-
/^(?:transform-)?origin-(.+)$/,
|
|
263
|
-
([, s]) => ({ "transform-origin": positionMap[s] ?? h.bracket.cssvar(s) }),
|
|
264
|
-
{ autocomplete: [`transform-origin-(${Object.keys(positionMap).join("|")})`, `origin-(${Object.keys(positionMap).join("|")})`] }
|
|
265
|
-
],
|
|
266
|
-
// perspectives
|
|
267
|
-
[/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
|
|
268
|
-
const v = h.bracket.cssvar.px.numberWithUnit(s);
|
|
269
|
-
if (v != null) {
|
|
270
|
-
return {
|
|
271
|
-
"-webkit-perspective": v,
|
|
272
|
-
"perspective": v
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
}],
|
|
276
|
-
// skip 1 & 2 letters shortcut
|
|
277
|
-
[/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => {
|
|
278
|
-
const v = h.bracket.cssvar(s) ?? (s.length >= 3 ? positionMap[s] : void 0);
|
|
279
|
-
if (v != null) {
|
|
280
|
-
return {
|
|
281
|
-
"-webkit-perspective-origin": v,
|
|
282
|
-
"perspective-origin": v
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
}],
|
|
286
|
-
// modifiers
|
|
287
|
-
[/^(?:transform-)?translate-()(.+)$/, handleTranslate, { custom: { preflightKeys } }],
|
|
288
|
-
[/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate, { custom: { preflightKeys } }],
|
|
289
|
-
[/^(?:transform-)?rotate-()(.+)$/, handleRotate, { custom: { preflightKeys } }],
|
|
290
|
-
[/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate, { custom: { preflightKeys } }],
|
|
291
|
-
[/^(?:transform-)?skew-()(.+)$/, handleSkew, { custom: { preflightKeys } }],
|
|
292
|
-
[/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { custom: { preflightKeys }, autocomplete: ["transform-skew-(x|y)-<percent>", "skew-(x|y)-<percent>"] }],
|
|
293
|
-
[/^(?:transform-)?scale-()(.+)$/, handleScale, { custom: { preflightKeys } }],
|
|
294
|
-
[/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { custom: { preflightKeys }, autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`, `(${transformValues.join("|")})-<percent>`, `(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
|
|
295
|
-
// style
|
|
296
|
-
[/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
|
|
297
|
-
[/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
|
|
298
|
-
// base
|
|
299
|
-
["transform", { transform }, { custom: { preflightKeys } }],
|
|
300
|
-
["transform-cpu", { transform: transformCpu }, {
|
|
301
|
-
custom: { preflightKeys: ["--un-translate-x", "--un-translate-y", "--un-rotate", "--un-rotate-z", "--un-skew-x", "--un-skew-y", "--un-scale-x", "--un-scale-y"] }
|
|
302
|
-
}],
|
|
303
|
-
["transform-gpu", { transform: transformGpu }, { custom: { preflightKeys } }],
|
|
304
|
-
["transform-none", { transform: "none" }],
|
|
305
|
-
...makeGlobalStaticRules("transform")
|
|
306
|
-
];
|
|
307
|
-
function handleTranslate([, d, b], { theme }) {
|
|
308
|
-
const v = theme.spacing?.[b] ?? h.bracket.cssvar.fraction.rem(b);
|
|
309
|
-
if (v != null) {
|
|
310
|
-
return [
|
|
311
|
-
...transformXYZ(d, v, "translate"),
|
|
312
|
-
["transform", transform]
|
|
313
|
-
];
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
function handleScale([, d, b]) {
|
|
317
|
-
const v = h.bracket.cssvar.fraction.percent(b);
|
|
318
|
-
if (v != null) {
|
|
319
|
-
return [
|
|
320
|
-
...transformXYZ(d, v, "scale"),
|
|
321
|
-
["transform", transform]
|
|
322
|
-
];
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
function handleRotate([, d = "", b]) {
|
|
326
|
-
const v = h.bracket.cssvar.degree(b);
|
|
327
|
-
if (v != null) {
|
|
328
|
-
if (d) {
|
|
329
|
-
return {
|
|
330
|
-
"--un-rotate": 0,
|
|
331
|
-
[`--un-rotate-${d}`]: v,
|
|
332
|
-
"transform": transform
|
|
333
|
-
};
|
|
334
|
-
} else {
|
|
335
|
-
return {
|
|
336
|
-
"--un-rotate-x": 0,
|
|
337
|
-
"--un-rotate-y": 0,
|
|
338
|
-
"--un-rotate-z": 0,
|
|
339
|
-
"--un-rotate": v,
|
|
340
|
-
"transform": transform
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
function handleSkew([, d, b]) {
|
|
346
|
-
const v = h.bracket.cssvar.degree(b);
|
|
347
|
-
if (v != null) {
|
|
348
|
-
return [
|
|
349
|
-
...transformXYZ(d, v, "skew"),
|
|
350
|
-
["transform", transform]
|
|
351
|
-
];
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
export { rings as a, boxShadowsBase as b, boxShadows as c, displays as d, appearances as e, cursors as f, contains as g, resizes as h, contentVisibility as i, contents as j, breaks as k, textOverflows as l, textTransforms as m, fontStyles as n, fontSmoothings as o, pointerEvents as p, fieldSizing as q, ringBase as r, transformBase as s, textWraps as t, userSelects as u, varEmpty as v, whitespaces as w, transforms as x };
|