@chaibuilder/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/dist/AddBlocks-04c49399.js +258 -0
- package/dist/AddBlocks-c27c81fa.cjs +3 -0
- package/dist/BrandingOptions-055cf22a.js +157 -0
- package/dist/BrandingOptions-c25f6370.cjs +1 -0
- package/dist/CONTROLS-031e1de3.cjs +1 -0
- package/dist/CONTROLS-442caee5.js +6 -0
- package/dist/CanvasArea-97dfbb52.cjs +60 -0
- package/dist/CanvasArea-a7901131.js +1455 -0
- package/dist/Class-0801d193.cjs +1 -0
- package/dist/Class-e6b07b79.js +1138 -0
- package/dist/ImagesPanel-160aa664.cjs +1 -0
- package/dist/ImagesPanel-815d5e6f.js +27 -0
- package/dist/Layers-3aa6aae7.cjs +1 -0
- package/dist/Layers-6f1c162e.js +370 -0
- package/dist/MarkAsGlobalBlock-209ddfd5.js +73 -0
- package/dist/MarkAsGlobalBlock-536770e7.cjs +1 -0
- package/dist/Settings-2b1ff1a3.cjs +1 -0
- package/dist/Settings-b1afcefe.js +1845 -0
- package/dist/SidePanels-f48777bb.js +144 -0
- package/dist/SidePanels-f79dbace.cjs +1 -0
- package/dist/Topbar-64729901.js +105 -0
- package/dist/Topbar-bff765dc.cjs +1 -0
- package/dist/UnsplashImages-04fffeed.cjs +1 -0
- package/dist/UnsplashImages-315ce7a8.js +160 -0
- package/dist/UploadImages-43c16a2d.cjs +1 -0
- package/dist/UploadImages-f317eef0.js +107 -0
- package/dist/_commonjsHelpers-5a53b418.cjs +1 -0
- package/dist/_commonjsHelpers-d4512b9c.js +6 -0
- package/dist/accordion-0afd8143.cjs +1 -0
- package/dist/accordion-c0176dc5.js +42 -0
- package/dist/context-menu-e1c240ce.js +122 -0
- package/dist/context-menu-fec580f2.cjs +1 -0
- package/dist/core.cjs +1 -0
- package/dist/core.d.ts +353 -0
- package/dist/core.js +83 -0
- package/dist/dialog-170eaad9.cjs +1 -0
- package/dist/dialog-3d4e82ed.js +65 -0
- package/dist/dropdown-menu-a9b096f9.cjs +1 -0
- package/dist/dropdown-menu-d912a52e.js +223 -0
- package/dist/html-to-json-d8ac554d.cjs +1 -0
- package/dist/html-to-json-fecbbe16.js +178 -0
- package/dist/index-aea5c557.cjs +2 -0
- package/dist/index-cdd49c4c.js +2651 -0
- package/dist/jsx-runtime-5c3ac4f7.cjs +27 -0
- package/dist/jsx-runtime-944c88e2.js +631 -0
- package/dist/label-167415e5.cjs +1 -0
- package/dist/label-e770a087.js +10 -0
- package/dist/lib.cjs +1 -0
- package/dist/lib.d.ts +29 -0
- package/dist/lib.js +223 -0
- package/dist/link-43d13383.cjs +1 -0
- package/dist/link-8594fd8f.js +211 -0
- package/dist/popover-7cb9079b.cjs +1 -0
- package/dist/popover-f7addcf4.js +23 -0
- package/dist/render.cjs +2 -0
- package/dist/render.d.ts +49 -0
- package/dist/render.js +1171 -0
- package/dist/scroll-area-088530b9.cjs +1 -0
- package/dist/scroll-area-9f64a082.js +30 -0
- package/dist/select-0e32300c.cjs +1 -0
- package/dist/select-7fddd7c3.js +75 -0
- package/dist/separator-a597dba7.cjs +1 -0
- package/dist/separator-a80d065b.js +18 -0
- package/dist/style.css +6 -0
- package/dist/tabs-85caa1e8.js +46 -0
- package/dist/tabs-860e37aa.cjs +1 -0
- package/dist/textarea-0750bcd2.js +73 -0
- package/dist/textarea-a338ede6.cjs +1 -0
- package/dist/toggle-00c9d11e.js +30 -0
- package/dist/toggle-b90fed97.cjs +1 -0
- package/dist/ui.cjs +1 -0
- package/dist/ui.d.ts +471 -0
- package/dist/ui.js +442 -0
- package/dist/useBuilderProp-5e57d0c8.cjs +1 -0
- package/dist/useBuilderProp-81a14920.js +238 -0
- package/dist/utils-3c452dd0.cjs +1 -0
- package/dist/utils-ac68b2c8.js +6 -0
- package/dist/vite.svg +1 -0
- package/package.json +156 -0
|
@@ -0,0 +1,1138 @@
|
|
|
1
|
+
import { range as o, map as r, values as b, flattenDeep as n, flatten as f, isEmpty as g, startsWith as m, get as x } from "lodash";
|
|
2
|
+
function L(e = 6, s = "abcdefghijklmnopqrstuvwxyzABCD") {
|
|
3
|
+
let a = "";
|
|
4
|
+
for (let l = e; l > 0; --l)
|
|
5
|
+
a += s[Math.floor(Math.random() * s.length)];
|
|
6
|
+
return a;
|
|
7
|
+
}
|
|
8
|
+
const W = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >= 768 ? "MD" : e >= 640 ? "SM" : "XS", E = [
|
|
9
|
+
"hover",
|
|
10
|
+
"focus",
|
|
11
|
+
"focus-within",
|
|
12
|
+
"focus-visible",
|
|
13
|
+
"active",
|
|
14
|
+
"visited",
|
|
15
|
+
"target",
|
|
16
|
+
"first",
|
|
17
|
+
"last",
|
|
18
|
+
"only",
|
|
19
|
+
"odd",
|
|
20
|
+
"even",
|
|
21
|
+
"first-of-type",
|
|
22
|
+
"last-of-type",
|
|
23
|
+
"only-of-type",
|
|
24
|
+
"empty",
|
|
25
|
+
"disabled",
|
|
26
|
+
"checked",
|
|
27
|
+
"indeterminate",
|
|
28
|
+
"default",
|
|
29
|
+
"required",
|
|
30
|
+
"valid",
|
|
31
|
+
"invalid",
|
|
32
|
+
"in-range",
|
|
33
|
+
"out-of-range",
|
|
34
|
+
"placeholder-shown",
|
|
35
|
+
"autofill",
|
|
36
|
+
"read-only",
|
|
37
|
+
"open",
|
|
38
|
+
"before",
|
|
39
|
+
"after",
|
|
40
|
+
"first-letter",
|
|
41
|
+
"first-line",
|
|
42
|
+
"marker",
|
|
43
|
+
"selection",
|
|
44
|
+
"file",
|
|
45
|
+
"placeholder",
|
|
46
|
+
// headless UI
|
|
47
|
+
"ui-open",
|
|
48
|
+
"ui-disabled",
|
|
49
|
+
"ui-active",
|
|
50
|
+
"ui-selected",
|
|
51
|
+
"ui-checked",
|
|
52
|
+
"ui-not-open",
|
|
53
|
+
"ui-not-disabled",
|
|
54
|
+
"ui-not-active",
|
|
55
|
+
"ui-not-selected",
|
|
56
|
+
"ui-not-checked"
|
|
57
|
+
], A = {
|
|
58
|
+
_bodyFont: "Inter",
|
|
59
|
+
_headingFont: "Inter",
|
|
60
|
+
_roundedCorners: 5,
|
|
61
|
+
_primaryColor: "#570df8",
|
|
62
|
+
_secondaryColor: "#f002b8",
|
|
63
|
+
_bodyBgDarkColor: "#031022",
|
|
64
|
+
_bodyBgLightColor: "#fcfcfc",
|
|
65
|
+
_bodyTextDarkColor: "#ffffff",
|
|
66
|
+
_bodyTextLightColor: "#000000"
|
|
67
|
+
}, d = [
|
|
68
|
+
0,
|
|
69
|
+
1,
|
|
70
|
+
2,
|
|
71
|
+
3,
|
|
72
|
+
4,
|
|
73
|
+
5,
|
|
74
|
+
6,
|
|
75
|
+
7,
|
|
76
|
+
8,
|
|
77
|
+
9,
|
|
78
|
+
10,
|
|
79
|
+
11,
|
|
80
|
+
12,
|
|
81
|
+
14,
|
|
82
|
+
16,
|
|
83
|
+
20,
|
|
84
|
+
24,
|
|
85
|
+
28,
|
|
86
|
+
32,
|
|
87
|
+
36,
|
|
88
|
+
40,
|
|
89
|
+
44,
|
|
90
|
+
48,
|
|
91
|
+
52,
|
|
92
|
+
56,
|
|
93
|
+
60,
|
|
94
|
+
64,
|
|
95
|
+
72,
|
|
96
|
+
80,
|
|
97
|
+
96
|
|
98
|
+
], t = {
|
|
99
|
+
columns: [...o(1, 13), "auto", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", ...r(o(2, 8), (e) => `${e}xl`)],
|
|
100
|
+
breakAfter: ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"],
|
|
101
|
+
breakInside: ["auto", "avoid", "avoid-page", "avoid-column"],
|
|
102
|
+
display: ["block", "flex", "grid", "inline-block", "inline", "hidden"],
|
|
103
|
+
objectFit: ["contain", "cover", "fill", "none", "scale-down"],
|
|
104
|
+
objectPosition: ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"],
|
|
105
|
+
overflow: ["auto", "hidden", "clip", "visible", "scroll"],
|
|
106
|
+
overscroll: ["auto", "contain", "none"],
|
|
107
|
+
trbl: [0, "px", "0.5", 1, 1.5, 2, 2.5, 3, 3.5, ...o(4, 13), 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96, "auto", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "full"],
|
|
108
|
+
flexBasis: [...d, "auto", "px", "0.5", "1.5", "2.5", "3.5", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12", "full"],
|
|
109
|
+
padding: [...d, "px", "0.5", "1.5", "2.5", "3.5"],
|
|
110
|
+
margin: ["auto", ...d, "px", "0.5", "1.5", "2.5", "3.5"],
|
|
111
|
+
scale: [0, 50, 75, 90, 95, 100, 105, 110, 125, 150],
|
|
112
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left"],
|
|
113
|
+
blendEffect: ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"],
|
|
114
|
+
borderWidth: [0, 2, 4, 8],
|
|
115
|
+
borderRadius: ["global", "none", "sm", "md", "lg", "xl", "2xl", "3xl", "full"],
|
|
116
|
+
indent: [0, "px", "0.5", 1, 1.5, 2, 2.5, 3, 3.5, ...o(4, 13), 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96],
|
|
117
|
+
maxHeight: [0, "px", "0.5", 1, 1.5, 2, 2.5, 3, 3.5, ...o(4, 13), 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96, "full", "screen", "min", "max", "fit"],
|
|
118
|
+
space: [0, "px", "0.5", 1, 1.5, 2, 2.5, 3, 3.5, ...o(4, 13), 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96, "px", "reverse"],
|
|
119
|
+
width: ["0", "px", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "6", "7", "8", "9", "10", "11", "12", "14", "16", "20", "24", "28", "32", "36", "40", "44", "48", "52", "56", "60", "64", "72", "80", "96", "auto", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"],
|
|
120
|
+
maxWidth: ["0", "none", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "full", "min", "max", "fit", "prose", "screen-sm", "screen-md", "screen-lg", "screen-xl", "screen-2xl"],
|
|
121
|
+
height: ["0", "px", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "6", "7", "8", "9", "10", "11", "12", "14", "16", "20", "24", "28", "32", "36", "40", "44", "48", "52", "56", "60", "64", "72", "80", "96", "auto", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "full", "screen", "min", "max", "fit"]
|
|
122
|
+
}, p = {
|
|
123
|
+
textColor: {
|
|
124
|
+
classes: [],
|
|
125
|
+
regExp: "text-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
126
|
+
},
|
|
127
|
+
// LAYOUT
|
|
128
|
+
aspectRatio: {
|
|
129
|
+
classes: ["aspect-auto", "aspect-square", "aspect-video"],
|
|
130
|
+
regExp: "aspect-(auto|square|video)"
|
|
131
|
+
},
|
|
132
|
+
container: {
|
|
133
|
+
classes: ["container"],
|
|
134
|
+
regExp: "container"
|
|
135
|
+
},
|
|
136
|
+
columns: {
|
|
137
|
+
classes: r(t.columns, (e) => `columns-${e}`),
|
|
138
|
+
regExp: "columns-(auto|[0-9]xl|[0-9]xs|xs|sm|md|lg|xl|\\d+)"
|
|
139
|
+
},
|
|
140
|
+
breakAfter: {
|
|
141
|
+
classes: r(t.breakAfter, (e) => `break-after-${e}`),
|
|
142
|
+
regExp: "break-after-\\S+"
|
|
143
|
+
},
|
|
144
|
+
breakBefore: {
|
|
145
|
+
classes: r(t.breakAfter, (e) => `break-before-${e}`),
|
|
146
|
+
regExp: "break-before-\\S+"
|
|
147
|
+
},
|
|
148
|
+
breakInside: {
|
|
149
|
+
classes: r(t.breakInside, (e) => `break-inside-${e}`),
|
|
150
|
+
regExp: "break-inside-\\S+"
|
|
151
|
+
},
|
|
152
|
+
boxDecoration: {
|
|
153
|
+
classes: ["box-decoration-clone", "box-decoration-slice"],
|
|
154
|
+
regExp: "box-decoration-\\S+"
|
|
155
|
+
},
|
|
156
|
+
boxSizing: {
|
|
157
|
+
classes: ["box-border", "box-content"],
|
|
158
|
+
regExp: "box-(border|content)"
|
|
159
|
+
},
|
|
160
|
+
flexDirection: {
|
|
161
|
+
classes: ["flex-row", "flex-row-reverse", "flex-col", "flex-col-reverse"],
|
|
162
|
+
regExp: "flex-(row|row-reverse|col|col-reverse)"
|
|
163
|
+
},
|
|
164
|
+
flexWrap: {
|
|
165
|
+
classes: ["flex-wrap", "flex-wrap-reverse", "flex-nowrap"],
|
|
166
|
+
regExp: "flex-(wrap|wrap-reverse|nowrap)"
|
|
167
|
+
},
|
|
168
|
+
flexGrowShrink: {
|
|
169
|
+
classes: ["flex-1", "flex-auto", "flex-initial", "flex-none"],
|
|
170
|
+
regExp: "flex-1|flex-auto|flex-initial|flex-none"
|
|
171
|
+
},
|
|
172
|
+
gridColumns: {
|
|
173
|
+
classes: r([...o(0, 13), "none"], (e) => `grid-cols-${e}`),
|
|
174
|
+
regExp: "grid-cols-(\\d+|none)"
|
|
175
|
+
},
|
|
176
|
+
gridFlow: {
|
|
177
|
+
classes: ["grid-flow-row", "grid-flow-col", "grid-flow-row-dense", "grid-flow-col-dense"],
|
|
178
|
+
regExp: "grid-flow-(row|col|row-dense|col-dense)"
|
|
179
|
+
},
|
|
180
|
+
outlineStyle: {
|
|
181
|
+
classes: r(["none", "dashed", "dotted", "double", "hidden"], (e) => `outline-${e}`),
|
|
182
|
+
regExp: "outline-(none|dashed|dotted|double|hidden)"
|
|
183
|
+
},
|
|
184
|
+
borderStyle: {
|
|
185
|
+
classes: r(["solid", "dashed", "dotted", "double", "hidden", "none"], (e) => `border-${e}`),
|
|
186
|
+
regExp: "border-(solid|dashed|dotted|double|hidden|none)"
|
|
187
|
+
},
|
|
188
|
+
overflow: {
|
|
189
|
+
classes: r(t.overflow, (e) => `overflow-${e}`),
|
|
190
|
+
regExp: `overflow-(${t.overflow.join("|")})`
|
|
191
|
+
},
|
|
192
|
+
overflowX: {
|
|
193
|
+
classes: r(t.overflow, (e) => `overflow-x-${e}`),
|
|
194
|
+
regExp: `overflow-x-(${t.overflow.join("|")})`
|
|
195
|
+
},
|
|
196
|
+
overflowY: {
|
|
197
|
+
classes: r(t.overflow, (e) => `overflow-y-${e}`),
|
|
198
|
+
regExp: `overflow-y-(${t.overflow.join("|")})`
|
|
199
|
+
},
|
|
200
|
+
gridRows: { classes: r([1, 2, 3, 4, 5, 6, "none"], (e) => `grid-rows-${e}`), regExp: "grid-rows-(\\d|none)" },
|
|
201
|
+
display: {
|
|
202
|
+
classes: r(t.display, (e) => e.toString()),
|
|
203
|
+
regExp: `(${t.display.join("|")})`
|
|
204
|
+
},
|
|
205
|
+
float: {
|
|
206
|
+
classes: ["float-right", "float-left", "float-none"],
|
|
207
|
+
regExp: "float-\\S+"
|
|
208
|
+
},
|
|
209
|
+
clear: {
|
|
210
|
+
classes: ["clear-right", "clear-left", "clear-none", "clear-both"],
|
|
211
|
+
regExp: "clear-\\S+"
|
|
212
|
+
},
|
|
213
|
+
isolation: {
|
|
214
|
+
classes: ["isolate", "isolation-auto"],
|
|
215
|
+
regExp: "isolate|isolation-auto"
|
|
216
|
+
},
|
|
217
|
+
objectFit: {
|
|
218
|
+
classes: r(t.objectFit, (e) => `object-${e}`),
|
|
219
|
+
regExp: "object-(contain|cover|fill|none|scale-down)"
|
|
220
|
+
},
|
|
221
|
+
objectPosition: {
|
|
222
|
+
classes: r(t.objectPosition, (e) => `object-${e}`),
|
|
223
|
+
regExp: `object-(${t.objectPosition.join("|")})`
|
|
224
|
+
},
|
|
225
|
+
overscroll: {
|
|
226
|
+
classes: r(t.overscroll, (e) => `overscroll-${e}`),
|
|
227
|
+
regExp: `overscroll-(${t.overscroll.join("|")})`
|
|
228
|
+
},
|
|
229
|
+
overscrollX: {
|
|
230
|
+
classes: r(t.overscroll, (e) => `overscroll-x-${e}`),
|
|
231
|
+
regExp: `overscroll-x-(${t.overscroll.join("|")})`
|
|
232
|
+
},
|
|
233
|
+
overscrollY: {
|
|
234
|
+
classes: r(t.overscroll, (e) => `overscroll-y-${e}`),
|
|
235
|
+
regExp: `overscroll-y-(${t.overscroll.join("|")})`
|
|
236
|
+
},
|
|
237
|
+
inset: {
|
|
238
|
+
classes: r(t.trbl, (e) => `inset-${e}`),
|
|
239
|
+
regExp: "-?inset-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
240
|
+
},
|
|
241
|
+
insetX: {
|
|
242
|
+
classes: r(t.trbl, (e) => `inset-x-${e}`),
|
|
243
|
+
regExp: "-?inset-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
244
|
+
},
|
|
245
|
+
insetY: {
|
|
246
|
+
classes: r(t.trbl, (e) => `inset-y-${e}`),
|
|
247
|
+
regExp: "-?inset-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
248
|
+
},
|
|
249
|
+
top: {
|
|
250
|
+
classes: r(t.trbl, (e) => `top-${e}`),
|
|
251
|
+
regExp: "-?top-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
252
|
+
},
|
|
253
|
+
topX: {
|
|
254
|
+
classes: r(t.trbl, (e) => `top-x-${e}`),
|
|
255
|
+
regExp: "-?top-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
256
|
+
},
|
|
257
|
+
topY: {
|
|
258
|
+
classes: r(t.trbl, (e) => `top-y-${e}`),
|
|
259
|
+
regExp: "-?top-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
260
|
+
},
|
|
261
|
+
right: {
|
|
262
|
+
classes: r(t.trbl, (e) => `right-${e}`),
|
|
263
|
+
regExp: "-?right-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
264
|
+
},
|
|
265
|
+
rightX: {
|
|
266
|
+
classes: r(t.trbl, (e) => `right-x-${e}`),
|
|
267
|
+
regExp: "-?right-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
268
|
+
},
|
|
269
|
+
rightY: {
|
|
270
|
+
classes: r(t.trbl, (e) => `right-y-${e}`),
|
|
271
|
+
regExp: "-?right-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
272
|
+
},
|
|
273
|
+
bottom: {
|
|
274
|
+
classes: r(t.trbl, (e) => `bottom-${e}`),
|
|
275
|
+
regExp: "-?bottom-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
276
|
+
},
|
|
277
|
+
bottomX: {
|
|
278
|
+
classes: r(t.trbl, (e) => `bottom-x-${e}`),
|
|
279
|
+
regExp: "-?bottom-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
280
|
+
},
|
|
281
|
+
bottomY: {
|
|
282
|
+
classes: r(t.trbl, (e) => `bottom-y-${e}`),
|
|
283
|
+
regExp: "-?bottom-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
284
|
+
},
|
|
285
|
+
left: {
|
|
286
|
+
classes: r(t.trbl, (e) => `left-${e}`),
|
|
287
|
+
regExp: "-?left-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
288
|
+
},
|
|
289
|
+
leftX: {
|
|
290
|
+
classes: r(t.trbl, (e) => `left-x-${e}`),
|
|
291
|
+
regExp: "-?left-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
292
|
+
},
|
|
293
|
+
leftY: {
|
|
294
|
+
classes: r(t.trbl, (e) => `left-y-${e}`),
|
|
295
|
+
regExp: "-?left-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
296
|
+
},
|
|
297
|
+
visibility: {
|
|
298
|
+
classes: ["visible", "invisible"],
|
|
299
|
+
regExp: "invisible|visible"
|
|
300
|
+
},
|
|
301
|
+
zIndex: {
|
|
302
|
+
classes: r(["0", 10, 20, 30, 40, 50, "auto"], (e) => `z-${e}`),
|
|
303
|
+
regExp: "-?z-(\\d+|auto|\\[.*\\])"
|
|
304
|
+
},
|
|
305
|
+
// Flex box and grids
|
|
306
|
+
flexBasis: {
|
|
307
|
+
classes: r(t.flexBasis, (e) => `basis-${e}`),
|
|
308
|
+
regExp: "basis-(\\d+|\\S+)"
|
|
309
|
+
},
|
|
310
|
+
flexGrow: { classes: ["grow", "grow-0"], regExp: "grow(-0)?" },
|
|
311
|
+
flexShrink: { classes: ["shrink", "shrink-0"], regExp: "shrink(-0)?" },
|
|
312
|
+
// grid
|
|
313
|
+
gridColSpan: {
|
|
314
|
+
classes: ["col-auto", ...r(o(1, 13), (e) => `col-span-${e}`), "col-span-full"],
|
|
315
|
+
regExp: "col-(auto|span-(\\d+|full))"
|
|
316
|
+
},
|
|
317
|
+
gridColStart: {
|
|
318
|
+
classes: [...r(o(1, 14), (e) => `col-start-${e}`), "col-start-auto"],
|
|
319
|
+
regExp: "col-start-(\\d+|auto)"
|
|
320
|
+
},
|
|
321
|
+
gridColEnd: {
|
|
322
|
+
classes: [...r(o(1, 14), (e) => `col-end-${e}`), "col-end-auto"],
|
|
323
|
+
regExp: "col-end-(\\d+|auto)"
|
|
324
|
+
},
|
|
325
|
+
gridRowSpan: {
|
|
326
|
+
classes: ["row-auto", ...r(o(1, 7), (e) => `row-span-${e}`), "row-span-full"],
|
|
327
|
+
regExp: "row-(auto|span-(\\d+|full))"
|
|
328
|
+
},
|
|
329
|
+
gridRowStart: {
|
|
330
|
+
classes: [...r(o(1, 8), (e) => `row-start-${e}`), "row-start-auto"],
|
|
331
|
+
regExp: "row-start-(\\d+|auto)"
|
|
332
|
+
},
|
|
333
|
+
gridRowEnd: {
|
|
334
|
+
classes: [...r(o(1, 8), (e) => `row-end-${e}`), "row-end-auto"],
|
|
335
|
+
regExp: "row-end-(\\d+|auto)"
|
|
336
|
+
},
|
|
337
|
+
gridAutoColumns: {
|
|
338
|
+
classes: ["auto-cols-auto", "auto-cols-min", "auto-cols-max", "auto-cols-fr"],
|
|
339
|
+
regExp: "auto-cols-(auto|min|max|fr)"
|
|
340
|
+
},
|
|
341
|
+
gridAutoRows: {
|
|
342
|
+
classes: ["auto-rows-auto", "auto-rows-min", "auto-rows-max", "auto-rows-fr"],
|
|
343
|
+
regExp: "auto-rows-(auto|min|max|fr)"
|
|
344
|
+
},
|
|
345
|
+
gap: { classes: r(t.indent, (e) => `gap-${e}`), regExp: "gap-(px|\\d.\\d|\\d|\\[.*\\])" },
|
|
346
|
+
gapX: { classes: r(t.indent, (e) => `gap-x-${e}`), regExp: "gap-x-(px|\\d.\\d|\\d|\\[.*\\])" },
|
|
347
|
+
gapY: { classes: r(t.indent, (e) => `gap-y-${e}`), regExp: "gap-y-(px|\\d.\\d|\\d|\\[.*\\])" },
|
|
348
|
+
justifyContent: {
|
|
349
|
+
classes: ["justify-start", "justify-end", "justify-center", "justify-between", "justify-around", "justify-evenly"],
|
|
350
|
+
regExp: "justify-(start|end|center|between|around|evenly)"
|
|
351
|
+
},
|
|
352
|
+
justifyItems: {
|
|
353
|
+
classes: ["justify-items-start", "justify-items-end", "justify-items-center", "justify-items-stretch"],
|
|
354
|
+
regExp: "justify-items-(start|end|center|stretch)"
|
|
355
|
+
},
|
|
356
|
+
justifySelf: {
|
|
357
|
+
classes: [
|
|
358
|
+
"justify-self-auto",
|
|
359
|
+
"justify-self-start",
|
|
360
|
+
"justify-self-end",
|
|
361
|
+
"justify-self-center",
|
|
362
|
+
"justify-self-stretch"
|
|
363
|
+
],
|
|
364
|
+
regExp: "justify-self-(auto|start|end|center|stretch)"
|
|
365
|
+
},
|
|
366
|
+
placeContent: {
|
|
367
|
+
classes: [
|
|
368
|
+
"place-content-center",
|
|
369
|
+
"place-content-start",
|
|
370
|
+
"place-content-end",
|
|
371
|
+
"place-content-between",
|
|
372
|
+
"place-content-around",
|
|
373
|
+
"place-content-evenly",
|
|
374
|
+
"place-content-stretch"
|
|
375
|
+
],
|
|
376
|
+
regExp: "place-content-(center|start|end|between|around|evenly|stretch)"
|
|
377
|
+
},
|
|
378
|
+
placeItems: {
|
|
379
|
+
classes: ["place-items-start", "place-items-end", "place-items-center", "place-items-stretch"],
|
|
380
|
+
regExp: "place-items-(start|end|center|stretch)"
|
|
381
|
+
},
|
|
382
|
+
placeSelf: {
|
|
383
|
+
classes: ["place-self-auto", "place-self-start", "place-self-end", "place-self-center", "place-self-stretch"],
|
|
384
|
+
regExp: "place-self-(auto|start|end|center|stretch)"
|
|
385
|
+
},
|
|
386
|
+
alignContent: {
|
|
387
|
+
classes: ["content-center", "content-start", "content-end", "content-between", "content-around", "content-evenly"],
|
|
388
|
+
regExp: "content-(center|start|end|between|around|evenly)"
|
|
389
|
+
},
|
|
390
|
+
alignItems: {
|
|
391
|
+
classes: ["items-start", "items-end", "items-center", "items-baseline", "items-stretch"],
|
|
392
|
+
regExp: "items-(start|end|center|baseline|stretch)"
|
|
393
|
+
},
|
|
394
|
+
alignSelf: {
|
|
395
|
+
classes: ["self-auto", "self-start", "self-end", "self-center", "self-stretch", "self-baseline"],
|
|
396
|
+
regExp: "self-(auto|start|end|center|stretch|baseline)"
|
|
397
|
+
},
|
|
398
|
+
backgroundClip: {
|
|
399
|
+
classes: ["bg-clip-border", "bg-clip-padding", "bg-clip-content", "bg-clip-text"],
|
|
400
|
+
regExp: "bg-clip-(border|padding|content|text)"
|
|
401
|
+
},
|
|
402
|
+
// FIXME: Add drop-shadow class
|
|
403
|
+
dropShadow: {
|
|
404
|
+
classes: r(["sm", "md", "lg", "xl", "2xl", "none"], (e) => `drop-shadow-${e}`),
|
|
405
|
+
regExp: "drop-shadow-(sm|md|lg|xl|2xl|none)"
|
|
406
|
+
},
|
|
407
|
+
backdropBlur: {
|
|
408
|
+
classes: r(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (e) => `backdrop-blur-${e}`),
|
|
409
|
+
regExp: "backdrop-blur-(none|sm|md|lg|xl|2xl|3xl)"
|
|
410
|
+
},
|
|
411
|
+
backdropBrightness: {
|
|
412
|
+
classes: r([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (e) => `backdrop-brightness-${e}`),
|
|
413
|
+
regExp: "backdrop-brightness-(\\d+)"
|
|
414
|
+
},
|
|
415
|
+
backdropContrast: {
|
|
416
|
+
classes: r([0, 50, 75, 100, 125, 150, 200], (e) => `backdrop-contrast-${e}`),
|
|
417
|
+
regExp: "backdrop-contrast-(\\d+)"
|
|
418
|
+
},
|
|
419
|
+
backdropGrayScale: {
|
|
420
|
+
classes: ["backdrop-grayscale-0", "backdrop-grayscale"],
|
|
421
|
+
regExp: "backdrop-grayscale(-0)?"
|
|
422
|
+
},
|
|
423
|
+
backdropHueRotate: {
|
|
424
|
+
classes: r([0, 15, 30, 60, 90, 180], (e) => `backdrop-hue-rotate-${e}`),
|
|
425
|
+
regExp: "-?backdrop-hue-rotate-(\\d+)"
|
|
426
|
+
},
|
|
427
|
+
backdropInvert: {
|
|
428
|
+
classes: ["backdrop-invert-0", "backdrop-invert"],
|
|
429
|
+
regExp: "backdrop-invert(-0)?"
|
|
430
|
+
},
|
|
431
|
+
backdropOpacity: {
|
|
432
|
+
classes: r([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (e) => `backdrop-opacity-${e}`),
|
|
433
|
+
regExp: "backdrop-opacity-(\\d+)"
|
|
434
|
+
},
|
|
435
|
+
backdropSaturate: {
|
|
436
|
+
classes: r([0, 50, 100, 150, 200], (e) => `backdrop-saturate-${e}`),
|
|
437
|
+
regExp: "backdrop-saturate-(\\d+)"
|
|
438
|
+
},
|
|
439
|
+
backdropSepia: {
|
|
440
|
+
classes: ["backdrop-sepia-0, backdrop-sepia"],
|
|
441
|
+
regExp: "backdrop-sepia(-0)?"
|
|
442
|
+
},
|
|
443
|
+
backgroundOrigin: {
|
|
444
|
+
classes: ["bg-origin-border", "bg-origin-padding", "bg-origin-content"],
|
|
445
|
+
regExp: "bg-origin-(border|padding|content)"
|
|
446
|
+
},
|
|
447
|
+
transformOrigin: {
|
|
448
|
+
classes: r(t.origin, (e) => `origin-${e}`),
|
|
449
|
+
regExp: "origin-(\\d+|\\S+)"
|
|
450
|
+
},
|
|
451
|
+
// spacing
|
|
452
|
+
padding: {
|
|
453
|
+
classes: r(t.padding, (e) => `p-${e}`),
|
|
454
|
+
regExp: "p-(\\d+|\\S+|\\[.*\\])"
|
|
455
|
+
},
|
|
456
|
+
paddingX: {
|
|
457
|
+
classes: r(t.padding, (e) => `px-${e}`),
|
|
458
|
+
regExp: "px-(\\d+|\\S+|\\[.*\\])"
|
|
459
|
+
},
|
|
460
|
+
paddingY: {
|
|
461
|
+
classes: r(t.padding, (e) => `py-${e}`),
|
|
462
|
+
regExp: "py-(\\d+|\\S+|\\[.*\\])"
|
|
463
|
+
},
|
|
464
|
+
paddingTop: {
|
|
465
|
+
classes: r(t.padding, (e) => `pt-${e}`),
|
|
466
|
+
regExp: "pt-(\\d+|\\S+|\\[.*\\])"
|
|
467
|
+
},
|
|
468
|
+
paddingRight: {
|
|
469
|
+
classes: r(t.padding, (e) => `pr-${e}`),
|
|
470
|
+
regExp: "pr-(\\d+|\\S+|\\[.*\\])"
|
|
471
|
+
},
|
|
472
|
+
paddingBottom: {
|
|
473
|
+
classes: r(t.padding, (e) => `pb-${e}`),
|
|
474
|
+
regExp: "pb-(\\d+|\\S+|\\[.*\\])"
|
|
475
|
+
},
|
|
476
|
+
paddingLeft: {
|
|
477
|
+
classes: r(t.padding, (e) => `pl-${e}`),
|
|
478
|
+
regExp: "pl-(\\d+|\\S+|\\[.*\\])"
|
|
479
|
+
},
|
|
480
|
+
textDecorationStyle: {
|
|
481
|
+
classes: ["decoration-solid", "decoration-double", "decoration-dotted", "decoration-dashed", "decoration-wavy"],
|
|
482
|
+
regExp: "decoration-(solid|double|dotted|dashed|wavy)"
|
|
483
|
+
},
|
|
484
|
+
textDecorationThickness: {
|
|
485
|
+
classes: r(["auto", "from-font", "0", 1, 2, 4, 8], (e) => `decoration-${e}`),
|
|
486
|
+
regExp: "decoration-(auto|from-font|\\d+|\\S+)"
|
|
487
|
+
},
|
|
488
|
+
fromColor: {
|
|
489
|
+
classes: [],
|
|
490
|
+
regExp: "from-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
491
|
+
},
|
|
492
|
+
margin: {
|
|
493
|
+
classes: r(t.margin, (e) => `m-${e}`),
|
|
494
|
+
regExp: "-?m-(\\d+|\\S+|\\[.*\\])"
|
|
495
|
+
},
|
|
496
|
+
marginX: {
|
|
497
|
+
classes: r(t.margin, (e) => `mx-${e}`),
|
|
498
|
+
regExp: "-?mx-(\\d+|\\S+|\\[.*\\])"
|
|
499
|
+
},
|
|
500
|
+
marginY: {
|
|
501
|
+
classes: r(t.margin, (e) => `my-${e}`),
|
|
502
|
+
regExp: "-?my-(\\d+|\\S+|\\[.*\\])"
|
|
503
|
+
},
|
|
504
|
+
marginTop: {
|
|
505
|
+
classes: r(t.margin, (e) => `mt-${e}`),
|
|
506
|
+
regExp: "-?mt-(\\d+|\\S+|\\[.*\\])"
|
|
507
|
+
},
|
|
508
|
+
marginRight: {
|
|
509
|
+
classes: r(t.margin, (e) => `mr-${e}`),
|
|
510
|
+
regExp: "-?mr-(\\d+|\\S+|\\[.*\\])"
|
|
511
|
+
},
|
|
512
|
+
marginBottom: {
|
|
513
|
+
classes: r(t.margin, (e) => `mb-${e}`),
|
|
514
|
+
regExp: "-?mb-(\\d+|\\S+|\\[.*\\])"
|
|
515
|
+
},
|
|
516
|
+
marginLeft: {
|
|
517
|
+
classes: r(t.margin, (e) => `ml-${e}`),
|
|
518
|
+
regExp: "-?ml-(\\d+|\\S+|\\[.*\\])"
|
|
519
|
+
},
|
|
520
|
+
spaceX: {
|
|
521
|
+
classes: r(t.space, (e) => `space-x-${e}`),
|
|
522
|
+
regExp: "-?space-x-(\\d+|\\S+|\\[.*\\])"
|
|
523
|
+
},
|
|
524
|
+
spaceY: {
|
|
525
|
+
classes: r(t.space, (e) => `space-y-${e}`),
|
|
526
|
+
regExp: "-?space-y-(\\d+|\\S+|\\[.*\\])"
|
|
527
|
+
},
|
|
528
|
+
boxShadow: {
|
|
529
|
+
classes: r(["sm", "md", "lg", "xl", "2xl", "inner", "none"], (e) => `shadow-${e}`),
|
|
530
|
+
regExp: "shadow-(sm|md|lg|xl|2xl|inner|none)"
|
|
531
|
+
},
|
|
532
|
+
// sizing
|
|
533
|
+
minWidth: {
|
|
534
|
+
classes: ["min-w-0", "min-w-full", "min-w-min", "min-w-max", "min-w-fit"],
|
|
535
|
+
regExp: "min-w-(\\d+|\\S+|\\[.*\\])"
|
|
536
|
+
},
|
|
537
|
+
maxWidth: {
|
|
538
|
+
classes: r(t.maxWidth, (e) => `max-w-${e}`),
|
|
539
|
+
regExp: "max-w-(\\d+|\\S+|\\[.*\\])"
|
|
540
|
+
},
|
|
541
|
+
width: {
|
|
542
|
+
classes: r([...t.width, "full", "screen", "min", "max", "fit"], (e) => `w-${e}`),
|
|
543
|
+
regExp: "w-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])"
|
|
544
|
+
},
|
|
545
|
+
minHeight: {
|
|
546
|
+
classes: ["min-h-0", "min-h-full", "min-h-screen", "min-h-min", "min-h-max", "min-h-fit"],
|
|
547
|
+
regExp: "min-h-(\\d+|\\S+|\\[.*\\])"
|
|
548
|
+
},
|
|
549
|
+
maxHeight: {
|
|
550
|
+
classes: r(t.maxHeight, (e) => `max-h-${e}`),
|
|
551
|
+
regExp: "max-h-(\\d+|\\S+|\\[.*\\])"
|
|
552
|
+
},
|
|
553
|
+
height: {
|
|
554
|
+
classes: r(t.height, (e) => `h-${e}`),
|
|
555
|
+
regExp: "h-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])"
|
|
556
|
+
},
|
|
557
|
+
// typography
|
|
558
|
+
fontFamily: {
|
|
559
|
+
classes: ["font-heading", "font-body", "font-sans", "font-serif", "font-mono"],
|
|
560
|
+
regExp: "font-(heading|body|sans|serif|mono)"
|
|
561
|
+
},
|
|
562
|
+
textAlign: {
|
|
563
|
+
classes: ["text-left", "text-center", "text-right", "text-justify"],
|
|
564
|
+
regExp: "text-(left|center|right|justify)"
|
|
565
|
+
},
|
|
566
|
+
textOverflow: {
|
|
567
|
+
classes: ["truncate", "text-ellipsis", "text-clip"],
|
|
568
|
+
regExp: "truncate|text-ellipsis|text-clip"
|
|
569
|
+
},
|
|
570
|
+
verticalAlign: {
|
|
571
|
+
classes: [
|
|
572
|
+
"align-baseline",
|
|
573
|
+
"align-top",
|
|
574
|
+
"align-middle",
|
|
575
|
+
"align-bottom",
|
|
576
|
+
"align-text-top",
|
|
577
|
+
"align-text-bottom",
|
|
578
|
+
"align-sub",
|
|
579
|
+
"align-super"
|
|
580
|
+
],
|
|
581
|
+
regExp: "align-(baseline|top|middle|bottom|text-top|text-bottom|sub|super)"
|
|
582
|
+
},
|
|
583
|
+
fontSize: {
|
|
584
|
+
classes: [
|
|
585
|
+
"text-xs",
|
|
586
|
+
"text-sm",
|
|
587
|
+
"text-base",
|
|
588
|
+
"text-lg",
|
|
589
|
+
"text-xl",
|
|
590
|
+
"text-2xl",
|
|
591
|
+
"text-3xl",
|
|
592
|
+
"text-4xl",
|
|
593
|
+
"text-5xl",
|
|
594
|
+
"text-6xl",
|
|
595
|
+
"text-7xl",
|
|
596
|
+
"text-8xl",
|
|
597
|
+
"text-9xl"
|
|
598
|
+
],
|
|
599
|
+
regExp: "text-(\\d+|\\S+|\\[.*\\])"
|
|
600
|
+
},
|
|
601
|
+
fontSmoothing: {
|
|
602
|
+
classes: ["antialiased", "subpixel-antialiased"],
|
|
603
|
+
regExp: "antialiased|subpixel-antialiased"
|
|
604
|
+
},
|
|
605
|
+
fontStyle: { classes: ["italic", "not-italic"], regExp: "not-italic|italic" },
|
|
606
|
+
fontWeight: {
|
|
607
|
+
classes: [
|
|
608
|
+
"font-thin",
|
|
609
|
+
"font-extralight",
|
|
610
|
+
"font-light",
|
|
611
|
+
"font-normal",
|
|
612
|
+
"font-medium",
|
|
613
|
+
"font-semibold",
|
|
614
|
+
"font-bold",
|
|
615
|
+
"font-extrabold",
|
|
616
|
+
"font-black"
|
|
617
|
+
],
|
|
618
|
+
regExp: "font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)"
|
|
619
|
+
},
|
|
620
|
+
fontVariantNum: {
|
|
621
|
+
classes: [
|
|
622
|
+
"normal-nums",
|
|
623
|
+
"ordinal",
|
|
624
|
+
"diagonal-fractions",
|
|
625
|
+
"stacked-fractions",
|
|
626
|
+
"tabular-nums",
|
|
627
|
+
"oldstyle-nums",
|
|
628
|
+
"proportional-nums",
|
|
629
|
+
"lining-nums",
|
|
630
|
+
"slashed-zero"
|
|
631
|
+
],
|
|
632
|
+
regExp: "normal-nums|ordinal|diagonal-fractions|stacked-fractions|tabular-nums|oldstyle-nums|proportional-nums|lining-nums|slashed-zero"
|
|
633
|
+
},
|
|
634
|
+
letterSpacing: {
|
|
635
|
+
classes: [
|
|
636
|
+
"tracking-tighter",
|
|
637
|
+
"tracking-tight",
|
|
638
|
+
"tracking-normal",
|
|
639
|
+
"tracking-wide",
|
|
640
|
+
"tracking-wider",
|
|
641
|
+
"tracking-widest"
|
|
642
|
+
],
|
|
643
|
+
regExp: "-?tracking-(tighter|tight|normal|wide|wider|widest|\\[.*\\])"
|
|
644
|
+
},
|
|
645
|
+
lineHeight: {
|
|
646
|
+
classes: [
|
|
647
|
+
"leading-none",
|
|
648
|
+
"leading-tight",
|
|
649
|
+
"leading-snug",
|
|
650
|
+
"leading-normal",
|
|
651
|
+
"leading-relaxed",
|
|
652
|
+
"leading-loose",
|
|
653
|
+
"leading-3",
|
|
654
|
+
"leading-4",
|
|
655
|
+
"leading-5",
|
|
656
|
+
"leading-6",
|
|
657
|
+
"leading-7",
|
|
658
|
+
"leading-8",
|
|
659
|
+
"leading-9",
|
|
660
|
+
"leading-10"
|
|
661
|
+
],
|
|
662
|
+
regExp: "leading-(none|tight|snug|normal|relaxed|loose|\\[.*\\]|\\d+)"
|
|
663
|
+
},
|
|
664
|
+
listStyleType: {
|
|
665
|
+
classes: ["list-none", "list-disc", "list-decimal"],
|
|
666
|
+
regExp: "list-(none|disc|decimal)"
|
|
667
|
+
},
|
|
668
|
+
listStylePosition: {
|
|
669
|
+
classes: ["list-inside", "list-outside"],
|
|
670
|
+
regExp: "list-(inside|outside)"
|
|
671
|
+
},
|
|
672
|
+
textUnderlineOffset: {
|
|
673
|
+
classes: [
|
|
674
|
+
"underline-offset-auto",
|
|
675
|
+
"underline-offset-0",
|
|
676
|
+
"underline-offset-1",
|
|
677
|
+
"underline-offset-2",
|
|
678
|
+
"underline-offset-4",
|
|
679
|
+
"underline-offset-8"
|
|
680
|
+
],
|
|
681
|
+
regExp: "underline-offset-(auto|\\d+|\\S+)"
|
|
682
|
+
},
|
|
683
|
+
textDecoration: {
|
|
684
|
+
classes: ["underline", "overline", "line-through", "no-underline"],
|
|
685
|
+
regExp: "underline|overline|line-through|no-underline"
|
|
686
|
+
},
|
|
687
|
+
textDecorationColor: {
|
|
688
|
+
classes: [],
|
|
689
|
+
regExp: "decoration-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
690
|
+
},
|
|
691
|
+
textTransform: {
|
|
692
|
+
classes: ["uppercase", "lowercase", "capitalize", "normal-case"],
|
|
693
|
+
regExp: "uppercase|lowercase|capitalize|normal-case"
|
|
694
|
+
},
|
|
695
|
+
textIndent: {
|
|
696
|
+
classes: r(t.indent, (e) => `indent-${e}`),
|
|
697
|
+
regExp: "-?indent-(\\d+|\\S+)"
|
|
698
|
+
},
|
|
699
|
+
whitespace: {
|
|
700
|
+
classes: [
|
|
701
|
+
"whitespace-normal",
|
|
702
|
+
"whitespace-no-wrap",
|
|
703
|
+
"whitespace-pre",
|
|
704
|
+
"whitespace-pre-line",
|
|
705
|
+
"whitespace-pre-wrap"
|
|
706
|
+
],
|
|
707
|
+
regExp: "whitespace-(normal|no-wrap|pre|pre-line|pre-wrap)"
|
|
708
|
+
},
|
|
709
|
+
wordBreak: {
|
|
710
|
+
classes: ["break-normal", "break-words", "break-all"],
|
|
711
|
+
regExp: "break-(normal|words|all)"
|
|
712
|
+
},
|
|
713
|
+
content: { classes: ["content-none"], regExp: "content-none" },
|
|
714
|
+
backgroundColor: {
|
|
715
|
+
classes: [],
|
|
716
|
+
regExp: "bg-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
717
|
+
},
|
|
718
|
+
backgroundAttachment: {
|
|
719
|
+
classes: ["bg-fixed", "bg-local", "bg-scroll"],
|
|
720
|
+
regExp: "bg-(fixed|local|scroll)"
|
|
721
|
+
},
|
|
722
|
+
backgroundPosition: {
|
|
723
|
+
classes: [
|
|
724
|
+
"bg-bottom",
|
|
725
|
+
"bg-center",
|
|
726
|
+
"bg-left",
|
|
727
|
+
"bg-left-bottom",
|
|
728
|
+
"bg-left-top",
|
|
729
|
+
"bg-right",
|
|
730
|
+
"bg-right-bottom",
|
|
731
|
+
"bg-right-top",
|
|
732
|
+
"bg-top"
|
|
733
|
+
],
|
|
734
|
+
regExp: "bg-(bottom|center|left|left-bottom|left-top|right|right-bottom|right-top|top)"
|
|
735
|
+
},
|
|
736
|
+
backgroundRepeat: {
|
|
737
|
+
classes: ["bg-repeat", "bg-repeat-x", "bg-repeat-y", "bg-no-repeat", "bg-repeat-round", "bg-repeat-space"],
|
|
738
|
+
regExp: "bg-(repeat|repeat-x|repeat-y|no-repeat|repeat-round|repeat-space)"
|
|
739
|
+
},
|
|
740
|
+
backgroundSize: {
|
|
741
|
+
classes: ["bg-auto", "bg-cover", "bg-contain"],
|
|
742
|
+
regExp: "bg-(auto|cover|contain)"
|
|
743
|
+
},
|
|
744
|
+
backgroundGradient: {
|
|
745
|
+
classes: [
|
|
746
|
+
"bg-gradient-none",
|
|
747
|
+
"bg-gradient-to-t",
|
|
748
|
+
"bg-gradient-to-tr",
|
|
749
|
+
"bg-gradient-to-r",
|
|
750
|
+
"bg-gradient-to-br",
|
|
751
|
+
"bg-gradient-to-b",
|
|
752
|
+
"bg-gradient-to-bl",
|
|
753
|
+
"bg-gradient-to-l",
|
|
754
|
+
"bg-gradient-to-tl"
|
|
755
|
+
],
|
|
756
|
+
regExp: "bg-gradient-(none|to-(t|tr|r|br|b|bl|l|tl))"
|
|
757
|
+
},
|
|
758
|
+
viaColor: {
|
|
759
|
+
classes: [],
|
|
760
|
+
regExp: "via-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
761
|
+
},
|
|
762
|
+
toColor: {
|
|
763
|
+
classes: [],
|
|
764
|
+
regExp: "to-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
765
|
+
},
|
|
766
|
+
position: {
|
|
767
|
+
classes: ["static", "fixed", "absolute", "relative", "sticky"],
|
|
768
|
+
regExp: "(static|fixed|absolute|relative|sticky)"
|
|
769
|
+
},
|
|
770
|
+
// border
|
|
771
|
+
borderRadiusTopLeft: {
|
|
772
|
+
classes: ["rounded-tl", ...r(t.borderRadius, (e) => `rounded-tl-${e}`)],
|
|
773
|
+
regExp: "rounded-tl-?(\\d+|\\S+)?"
|
|
774
|
+
},
|
|
775
|
+
borderRadiusTopRight: {
|
|
776
|
+
classes: ["rounded-tr", ...r(t.borderRadius, (e) => `rounded-tr-${e}`)],
|
|
777
|
+
regExp: "rounded-tr-?(\\d+|\\S+)?"
|
|
778
|
+
},
|
|
779
|
+
borderRadiusBottomRight: {
|
|
780
|
+
classes: ["rounded-br", ...r(t.borderRadius, (e) => `rounded-br-${e}`)],
|
|
781
|
+
regExp: "rounded-br-?(\\d+|\\S+)?"
|
|
782
|
+
},
|
|
783
|
+
borderRadiusBottomLeft: {
|
|
784
|
+
classes: ["rounded-bl", ...r(t.borderRadius, (e) => `rounded-bl-${e}`)],
|
|
785
|
+
regExp: "rounded-bl-?(\\d+|\\S+)?"
|
|
786
|
+
},
|
|
787
|
+
borderRadiusTop: {
|
|
788
|
+
classes: ["rounded-t", ...r(t.borderRadius, (e) => `rounded-t-${e}`)],
|
|
789
|
+
regExp: "rounded-t-?(\\d+|\\S+)?"
|
|
790
|
+
},
|
|
791
|
+
borderRadiusRight: {
|
|
792
|
+
classes: ["rounded-r", ...r(t.borderRadius, (e) => `rounded-r-${e}`)],
|
|
793
|
+
regExp: "rounded-r-?(\\d+|\\S+)?"
|
|
794
|
+
},
|
|
795
|
+
borderRadiusBottom: {
|
|
796
|
+
classes: ["rounded-b", ...r(t.borderRadius, (e) => `rounded-b-${e}`)],
|
|
797
|
+
regExp: "rounded-b-?(\\d+|\\S+)?"
|
|
798
|
+
},
|
|
799
|
+
borderRadiusLeft: {
|
|
800
|
+
classes: ["rounded-l", ...r(t.borderRadius, (e) => `rounded-l-${e}`)],
|
|
801
|
+
regExp: `(rounded-l-(${t.borderRadius.join("|")})|rounded-l$)`
|
|
802
|
+
},
|
|
803
|
+
borderRadius: {
|
|
804
|
+
classes: ["rounded", ...r(t.borderRadius, (e) => `rounded-${e}`)],
|
|
805
|
+
regExp: `(rounded-(${t.borderRadius.join("|")}$)|rounded)`
|
|
806
|
+
},
|
|
807
|
+
borderX: {
|
|
808
|
+
classes: ["border-x", ...r(t.borderWidth, (e) => `border-x-${e}`)],
|
|
809
|
+
regExp: "border-x-?(\\d+|\\S+|\\[.*\\])?"
|
|
810
|
+
},
|
|
811
|
+
borderY: {
|
|
812
|
+
classes: ["border-y", ...r(t.borderWidth, (e) => `border-y-${e}`)],
|
|
813
|
+
regExp: "border-y-?(\\d+|\\S+|\\[.*\\])?"
|
|
814
|
+
},
|
|
815
|
+
borderTop: {
|
|
816
|
+
classes: ["border-t", ...r(t.borderWidth, (e) => `border-t-${e}`)],
|
|
817
|
+
regExp: "border-t-?(\\d+|\\S+|\\[.*\\])?"
|
|
818
|
+
},
|
|
819
|
+
borderRight: {
|
|
820
|
+
classes: ["border-r", ...r(t.borderWidth, (e) => `border-r-${e}`)],
|
|
821
|
+
regExp: "border-r-?(\\d+|\\S+|\\[.*\\])?"
|
|
822
|
+
},
|
|
823
|
+
borderBottom: {
|
|
824
|
+
classes: ["border-b", ...r(t.borderWidth, (e) => `border-b-${e}`)],
|
|
825
|
+
regExp: "border-b-?(\\d+|\\S+|\\[.*\\])?"
|
|
826
|
+
},
|
|
827
|
+
borderLeft: {
|
|
828
|
+
classes: ["border-l", ...r(t.borderWidth, (e) => `border-l-${e}`)],
|
|
829
|
+
regExp: "border-l-?(\\d+|\\S+|\\[.*\\])?"
|
|
830
|
+
},
|
|
831
|
+
borderColor: {
|
|
832
|
+
classes: [],
|
|
833
|
+
regExp: "border-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
834
|
+
},
|
|
835
|
+
border: {
|
|
836
|
+
classes: ["border", ...r(t.borderWidth, (e) => `border-${e}`)],
|
|
837
|
+
regExp: "border-?(\\d+|\\S+|\\[.*\\])?"
|
|
838
|
+
},
|
|
839
|
+
order: {
|
|
840
|
+
classes: r([...o(0, 13), "first", "last", "none"], (e) => `order-${e}`),
|
|
841
|
+
regExp: "-?order-(\\d+|first|last|none)"
|
|
842
|
+
},
|
|
843
|
+
divideXWidth: {
|
|
844
|
+
classes: r(["0", 2, 4, 8], (e) => `divide-x-${e}`),
|
|
845
|
+
regExp: "divide-x-(\\d+|\\[.*\\])"
|
|
846
|
+
},
|
|
847
|
+
divideYWidth: {
|
|
848
|
+
classes: r(["0", 2, 4, 8], (e) => `divide-y-${e}`),
|
|
849
|
+
regExp: "divide-y-(\\d+|\\[.*\\])"
|
|
850
|
+
},
|
|
851
|
+
divideColor: {
|
|
852
|
+
classes: [],
|
|
853
|
+
regExp: "divide-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
854
|
+
},
|
|
855
|
+
divideStyle: {
|
|
856
|
+
classes: r(["solid", "dashed", "dotted", "double", "none"], (e) => `divide-${e}`),
|
|
857
|
+
regExp: "divide-(solid|dashed|dotted|double|none)"
|
|
858
|
+
},
|
|
859
|
+
outlineWidth: {
|
|
860
|
+
classes: r([0, 1, 2, 4, 8], (e) => `outline-${e}`),
|
|
861
|
+
regExp: "outline-(\\d+)"
|
|
862
|
+
},
|
|
863
|
+
outlineOffset: {
|
|
864
|
+
classes: r([0, 1, 2, 4, 8], (e) => `outline-offset-${e}`),
|
|
865
|
+
regExp: "outline-offset-(\\d+)"
|
|
866
|
+
},
|
|
867
|
+
outlineColor: {
|
|
868
|
+
classes: [],
|
|
869
|
+
regExp: "outline-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
870
|
+
},
|
|
871
|
+
ringWidth: {
|
|
872
|
+
classes: r([0, 1, 2, 4, 8, "inset"], (e) => `ring-${e}`),
|
|
873
|
+
regExp: "ring-(\\d+|inset)"
|
|
874
|
+
},
|
|
875
|
+
ringOffsetWidth: {
|
|
876
|
+
classes: r([0, 1, 2, 4, 8], (e) => `ring-offset-${e}`),
|
|
877
|
+
regExp: "ring-offset-(\\d+)"
|
|
878
|
+
},
|
|
879
|
+
ringOffsetColor: {
|
|
880
|
+
classes: [],
|
|
881
|
+
regExp: "ring-offset-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
882
|
+
},
|
|
883
|
+
ringColor: {
|
|
884
|
+
classes: [],
|
|
885
|
+
regExp: "ring-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
886
|
+
},
|
|
887
|
+
// Effects
|
|
888
|
+
// FIXME: "add shadow class
|
|
889
|
+
boxShadowColor: {
|
|
890
|
+
classes: [],
|
|
891
|
+
regExp: "shadow-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
892
|
+
},
|
|
893
|
+
opacity: {
|
|
894
|
+
classes: r([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (e) => `opacity-${e}`),
|
|
895
|
+
regExp: "opacity-(\\d+|\\[.*\\])"
|
|
896
|
+
},
|
|
897
|
+
mixBlendMode: {
|
|
898
|
+
classes: r(t.blendEffect, (e) => `mix-blend-${e}`),
|
|
899
|
+
regExp: "mix-blend-(\\d+|\\S+)"
|
|
900
|
+
},
|
|
901
|
+
bgBlendMode: {
|
|
902
|
+
classes: r(t.blendEffect, (e) => `bg-blend-${e}`),
|
|
903
|
+
regExp: "bg-blend-(\\d+|\\S+)"
|
|
904
|
+
},
|
|
905
|
+
// filters
|
|
906
|
+
blur: {
|
|
907
|
+
classes: r(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (e) => `blur-${e}`),
|
|
908
|
+
regExp: "blur-(none|sm|md|lg|xl|2xl|3xl)"
|
|
909
|
+
},
|
|
910
|
+
brightness: {
|
|
911
|
+
classes: r([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (e) => `brightness-${e}`),
|
|
912
|
+
regExp: "brightness-(\\d+)"
|
|
913
|
+
},
|
|
914
|
+
contrast: {
|
|
915
|
+
classes: r([0, 50, 75, 100, 125, 150, 200], (e) => `contrast-${e}`),
|
|
916
|
+
regExp: "contrast-(\\d+)"
|
|
917
|
+
},
|
|
918
|
+
grayScale: {
|
|
919
|
+
classes: ["grayscale-0", "grayscale"],
|
|
920
|
+
regExp: "grayscale(-0)?"
|
|
921
|
+
},
|
|
922
|
+
hueRotate: {
|
|
923
|
+
classes: r([0, 15, 30, 60, 90, 180], (e) => `hue-rotate-${e}`),
|
|
924
|
+
regExp: "-?hue-rotate-(\\d+)"
|
|
925
|
+
},
|
|
926
|
+
invert: { classes: ["invert-0", "invert"], regExp: "invert(-0)?" },
|
|
927
|
+
saturate: {
|
|
928
|
+
classes: r([0, 50, 100, 150, 200], (e) => `saturate-${e}`),
|
|
929
|
+
regExp: "saturate-(\\d+)"
|
|
930
|
+
},
|
|
931
|
+
sepia: { classes: ["sepia-0", "sepia"], regExp: "sepia(-0)?" },
|
|
932
|
+
// transitions
|
|
933
|
+
transition: {
|
|
934
|
+
classes: [
|
|
935
|
+
"transition-none",
|
|
936
|
+
"transition-all",
|
|
937
|
+
// "transition",
|
|
938
|
+
"transition-colors",
|
|
939
|
+
"transition-opacity",
|
|
940
|
+
"transition-shadow",
|
|
941
|
+
"transition-transform"
|
|
942
|
+
],
|
|
943
|
+
regExp: "transition-(none|all|colors|opacity|shadow|transform)"
|
|
944
|
+
},
|
|
945
|
+
duration: {
|
|
946
|
+
classes: r([75, 100, 150, 200, 300, 500, 700, 1e3], (e) => `duration-${e}`),
|
|
947
|
+
regExp: "duration-(\\d+|\\[.*\\])"
|
|
948
|
+
},
|
|
949
|
+
transitionEase: {
|
|
950
|
+
classes: ["ease-linear", "ease-in", "ease-out", "ease-in-out"],
|
|
951
|
+
regExp: "eas(e-linear|e-in|e-out|e-in-out)"
|
|
952
|
+
},
|
|
953
|
+
transitionDelay: {
|
|
954
|
+
classes: r([75, 100, 150, 200, 300, 500, 700, 1e3], (e) => `delay-${e}`),
|
|
955
|
+
regExp: "delay-(\\d+|\\[.*\\])"
|
|
956
|
+
},
|
|
957
|
+
animation: {
|
|
958
|
+
classes: ["animation-none", "animation-spin", "animation-ping"],
|
|
959
|
+
regExp: "animation-(none|spin|ping)"
|
|
960
|
+
},
|
|
961
|
+
scaleX: {
|
|
962
|
+
classes: r(t.scale, (e) => `scale-x-${e}`),
|
|
963
|
+
regExp: "-?scale-x-(\\d+|\\S+|\\[.*\\])"
|
|
964
|
+
},
|
|
965
|
+
scaleY: {
|
|
966
|
+
classes: r(t.scale, (e) => `scale-y-${e}`),
|
|
967
|
+
regExp: "-?scale-y-(\\d+|\\S+|\\[.*\\])"
|
|
968
|
+
},
|
|
969
|
+
scale: {
|
|
970
|
+
classes: r(t.scale, (e) => `scale-${e}`),
|
|
971
|
+
regExp: "-?scale-(\\d+|\\S+|\\[.*\\])"
|
|
972
|
+
},
|
|
973
|
+
rotate: {
|
|
974
|
+
classes: r([0, 1, 2, 3, 6, 12, 45, 90, 180], (e) => `rotate-${e}`),
|
|
975
|
+
regExp: "-?rotate-(\\d+|\\S+|\\[.*\\])"
|
|
976
|
+
},
|
|
977
|
+
translateX: {
|
|
978
|
+
classes: r([0, "px", "0.5", 1], (e) => `translate-x-${e}`),
|
|
979
|
+
regExp: "-?translate-x-(\\d+|\\S+|\\[.*\\])"
|
|
980
|
+
},
|
|
981
|
+
translateY: {
|
|
982
|
+
classes: r([0, "px", "0.5", 1], (e) => `translate-y-${e}`),
|
|
983
|
+
regExp: "-?translate-y-(\\d+|\\S+|\\[.*\\])"
|
|
984
|
+
},
|
|
985
|
+
skewX: {
|
|
986
|
+
classes: r([0, 1, 2, 3, 6, 12], (e) => `skew-x-${e}`),
|
|
987
|
+
regExp: "-?skew-x-(\\d+|\\S+|\\[.*\\])"
|
|
988
|
+
},
|
|
989
|
+
skewY: {
|
|
990
|
+
classes: r([0, 1, 2, 3, 6, 12], (e) => `skew-y-${e}`),
|
|
991
|
+
regExp: "-?skew-y-(\\d+|\\S+|\\[.*\\])"
|
|
992
|
+
},
|
|
993
|
+
// interactivity
|
|
994
|
+
accentColor: {
|
|
995
|
+
classes: [],
|
|
996
|
+
regExp: "accent-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
997
|
+
},
|
|
998
|
+
appearance: { classes: ["appearance-none"], regExp: "appearance-none" },
|
|
999
|
+
cursor: {
|
|
1000
|
+
classes: [
|
|
1001
|
+
"cursor-auto",
|
|
1002
|
+
"cursor-default",
|
|
1003
|
+
"cursor-pointer",
|
|
1004
|
+
"cursor-wait",
|
|
1005
|
+
"cursor-text",
|
|
1006
|
+
"cursor-move",
|
|
1007
|
+
"cursor-help",
|
|
1008
|
+
"cursor-not-allowed"
|
|
1009
|
+
],
|
|
1010
|
+
regExp: "cursor-(auto|default|pointer|wait|text|move|help|not-allowed)"
|
|
1011
|
+
},
|
|
1012
|
+
caretColor: {
|
|
1013
|
+
classes: [],
|
|
1014
|
+
regExp: "caret-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
1015
|
+
},
|
|
1016
|
+
pointerEvents: {
|
|
1017
|
+
classes: ["pointer-events-none", "pointer-events-auto"],
|
|
1018
|
+
regExp: "pointer-events-(none|auto)"
|
|
1019
|
+
},
|
|
1020
|
+
userSelect: {
|
|
1021
|
+
classes: ["select-none", "select-text", "select-all", "select-auto"],
|
|
1022
|
+
regExp: "select-(none|text|all|auto)"
|
|
1023
|
+
},
|
|
1024
|
+
// SVG
|
|
1025
|
+
fill: { classes: [], regExp: "caret-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)" },
|
|
1026
|
+
stroke: {
|
|
1027
|
+
classes: [],
|
|
1028
|
+
regExp: "caret-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"
|
|
1029
|
+
},
|
|
1030
|
+
strokeWidth: {
|
|
1031
|
+
classes: ["stroke-0", "stroke-1", "stroke-2"],
|
|
1032
|
+
regExp: "stroke-(\\d+|\\[.*\\])"
|
|
1033
|
+
}
|
|
1034
|
+
}, h = {
|
|
1035
|
+
backgroundColor: "bg",
|
|
1036
|
+
textColor: "text",
|
|
1037
|
+
borderColor: "border",
|
|
1038
|
+
boxShadowColor: "shadow",
|
|
1039
|
+
outlineColor: "outline",
|
|
1040
|
+
divideColor: "divide",
|
|
1041
|
+
fromColor: "from",
|
|
1042
|
+
viaColor: "via",
|
|
1043
|
+
toColor: "to",
|
|
1044
|
+
ringColor: "ring",
|
|
1045
|
+
ringOffsetColor: "ring-offset"
|
|
1046
|
+
}, y = ["current", "inherit", "transparent", "black", "white", "primary", "secondary"], w = ["primary", "secondary"], $ = [
|
|
1047
|
+
"slate",
|
|
1048
|
+
"gray",
|
|
1049
|
+
"zinc",
|
|
1050
|
+
"neutral",
|
|
1051
|
+
"stone",
|
|
1052
|
+
"red",
|
|
1053
|
+
"orange",
|
|
1054
|
+
"amber",
|
|
1055
|
+
"yellow",
|
|
1056
|
+
"lime",
|
|
1057
|
+
"green",
|
|
1058
|
+
"emerald",
|
|
1059
|
+
"teal",
|
|
1060
|
+
"cyan",
|
|
1061
|
+
"sky",
|
|
1062
|
+
"blue",
|
|
1063
|
+
"indigo",
|
|
1064
|
+
"violet",
|
|
1065
|
+
"purple",
|
|
1066
|
+
"fuchsia",
|
|
1067
|
+
"pink",
|
|
1068
|
+
"rose"
|
|
1069
|
+
], u = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], i = r(b(h), (e) => e), k = n([
|
|
1070
|
+
...r(y, (e) => f(r(i, (s) => `${s}-${e}`))),
|
|
1071
|
+
...r(
|
|
1072
|
+
w,
|
|
1073
|
+
(e) => n(r(i, (s) => n(r(u, (a) => `${s}-${e}-${a}`))))
|
|
1074
|
+
),
|
|
1075
|
+
...r(
|
|
1076
|
+
$,
|
|
1077
|
+
(e) => n(r(i, (s) => n(r(u, (a) => `${s}-${e}-${a}`))))
|
|
1078
|
+
)
|
|
1079
|
+
]), B = r(
|
|
1080
|
+
n(
|
|
1081
|
+
b(p).map((e) => e.classes).concat(k)
|
|
1082
|
+
),
|
|
1083
|
+
(e) => ({
|
|
1084
|
+
name: e
|
|
1085
|
+
})
|
|
1086
|
+
);
|
|
1087
|
+
function S(e) {
|
|
1088
|
+
if (g(e.trim()))
|
|
1089
|
+
return "";
|
|
1090
|
+
const s = e.match(/sm:|md:|lg:|xl:|2xl:/g);
|
|
1091
|
+
return x(s, 0, "xs").replace(":", "");
|
|
1092
|
+
}
|
|
1093
|
+
function v(e) {
|
|
1094
|
+
const s = r(E, (l) => `${l}:`).join("|"), a = new RegExp(s, "g");
|
|
1095
|
+
return x(a.exec(e.trim()), 0, "").replace(":", "");
|
|
1096
|
+
}
|
|
1097
|
+
function C(e) {
|
|
1098
|
+
return e.trim().split(":").pop() || "";
|
|
1099
|
+
}
|
|
1100
|
+
const c = {};
|
|
1101
|
+
function R(e) {
|
|
1102
|
+
if (g(e))
|
|
1103
|
+
return "";
|
|
1104
|
+
if (c[e])
|
|
1105
|
+
return c[e];
|
|
1106
|
+
let s = "";
|
|
1107
|
+
for (const a in p) {
|
|
1108
|
+
const l = x(p, `${a}.regExp`, "");
|
|
1109
|
+
if (new RegExp(l, "g").test(e)) {
|
|
1110
|
+
s = a, c[e] = s;
|
|
1111
|
+
break;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
return s;
|
|
1115
|
+
}
|
|
1116
|
+
function X(e) {
|
|
1117
|
+
return g(e) ? null : {
|
|
1118
|
+
dark: m(e, "dark:"),
|
|
1119
|
+
mq: S(e),
|
|
1120
|
+
mod: v(e),
|
|
1121
|
+
cls: C(e),
|
|
1122
|
+
fullCls: e,
|
|
1123
|
+
property: R(e)
|
|
1124
|
+
};
|
|
1125
|
+
}
|
|
1126
|
+
function D(e) {
|
|
1127
|
+
let s = "";
|
|
1128
|
+
return e.dark && (s += "dark:"), e.mq.toLowerCase() !== "xs" && (s += `${e.mq}:`), e.mod && (s += `${e.mod}:`), s += e.cls, s;
|
|
1129
|
+
}
|
|
1130
|
+
export {
|
|
1131
|
+
B as A,
|
|
1132
|
+
A as B,
|
|
1133
|
+
p as C,
|
|
1134
|
+
W as a,
|
|
1135
|
+
D as b,
|
|
1136
|
+
X as c,
|
|
1137
|
+
L as g
|
|
1138
|
+
};
|