@removify/tailwind-preset 0.1.9 → 0.2.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/dist/{chunk-JF5QV6S4.js → chunk-QZWKJNXG.js} +116 -67
- package/dist/cli/index.cjs +72 -49
- package/dist/cli/index.js +2 -2
- package/dist/index.cjs +130 -80
- package/dist/index.d.cts +189 -141
- package/dist/index.d.ts +189 -141
- package/dist/index.js +14 -12
- package/package.json +15 -15
- package/readme.md +2 -1
|
@@ -1,3 +1,57 @@
|
|
|
1
|
+
// src/theme/animation.ts
|
|
2
|
+
var uiAnimation = {
|
|
3
|
+
"radix-accordion-down": "radix-accordion-down 0.2s ease-out",
|
|
4
|
+
"radix-accordion-up": "radix-accordion-up 0.2s ease-out",
|
|
5
|
+
"radix-collapsible-down": "radix-collapsible-down 0.2s ease-in-out",
|
|
6
|
+
"radix-collapsible-up": "radix-collapsible-up 0.2s ease-in-out",
|
|
7
|
+
// V2 aka reka animation
|
|
8
|
+
"reka-accordion-down": "reka-accordion-down 0.2s ease-out",
|
|
9
|
+
"reka-accordion-up": "reka-accordion-up 0.2s ease-out",
|
|
10
|
+
"reka-collapsible-down": "reka-collapsible-down 0.2s ease-in-out",
|
|
11
|
+
"reka-collapsible-up": "reka-collapsible-up 0.2s ease-in-out"
|
|
12
|
+
};
|
|
13
|
+
var uiKeyframes = {
|
|
14
|
+
"radix-accordion-down": {
|
|
15
|
+
from: { height: "0" },
|
|
16
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
17
|
+
},
|
|
18
|
+
"radix-accordion-up": {
|
|
19
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
20
|
+
to: { height: "0" }
|
|
21
|
+
},
|
|
22
|
+
"radix-collapsible-down": {
|
|
23
|
+
from: { height: "0" },
|
|
24
|
+
to: { height: "var(--radix-collapsible-content-height)" }
|
|
25
|
+
},
|
|
26
|
+
"radix-collapsible-up": {
|
|
27
|
+
from: { height: "var(--radix-collapsible-content-height)" },
|
|
28
|
+
to: { height: "0" }
|
|
29
|
+
},
|
|
30
|
+
// V2 aka reka animation
|
|
31
|
+
"reka-accordion-down": {
|
|
32
|
+
from: { height: "0" },
|
|
33
|
+
to: { height: "var(--reka-accordion-content-height)" }
|
|
34
|
+
},
|
|
35
|
+
"reka-accordion-up": {
|
|
36
|
+
from: { height: "var(--reka-accordion-content-height)" },
|
|
37
|
+
to: { height: "0" }
|
|
38
|
+
},
|
|
39
|
+
"reka-collapsible-down": {
|
|
40
|
+
from: { height: "0" },
|
|
41
|
+
to: { height: "var(--reka-collapsible-content-height)" }
|
|
42
|
+
},
|
|
43
|
+
"reka-collapsible-up": {
|
|
44
|
+
from: { height: "var(--reka-collapsible-content-height)" },
|
|
45
|
+
to: { height: "0" }
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var animation = {
|
|
49
|
+
...uiAnimation
|
|
50
|
+
};
|
|
51
|
+
var keyframes = {
|
|
52
|
+
...uiKeyframes
|
|
53
|
+
};
|
|
54
|
+
|
|
1
55
|
// src/theme/colors.ts
|
|
2
56
|
var mainColors = {
|
|
3
57
|
inherit: "inherit",
|
|
@@ -157,6 +211,20 @@ var colors = {
|
|
|
157
211
|
secondary: mainColors.pompelmo
|
|
158
212
|
};
|
|
159
213
|
|
|
214
|
+
// src/theme/fontFamily.ts
|
|
215
|
+
var fontFamilySans = [
|
|
216
|
+
"ui-sans-serif",
|
|
217
|
+
"system-ui",
|
|
218
|
+
"sans-serif",
|
|
219
|
+
'"Apple Color Emoji"',
|
|
220
|
+
'"Segoe UI Emoji"',
|
|
221
|
+
'"Segoe UI Symbol"',
|
|
222
|
+
'"Noto Color Emoji"'
|
|
223
|
+
];
|
|
224
|
+
var customFontFamily = {
|
|
225
|
+
sans: ["DM Sans", ...fontFamilySans]
|
|
226
|
+
};
|
|
227
|
+
|
|
160
228
|
// src/util/font.ts
|
|
161
229
|
import { kebabKeys } from "string-ts";
|
|
162
230
|
|
|
@@ -184,11 +252,12 @@ function fontConfigKeysKebabCase(fontConfig) {
|
|
|
184
252
|
}
|
|
185
253
|
|
|
186
254
|
// src/theme/fontSize.ts
|
|
187
|
-
var
|
|
255
|
+
var fontSize = {
|
|
188
256
|
"2xs": ["0.6875rem", "1rem"],
|
|
189
257
|
"xs": ["0.75rem", "1rem"],
|
|
190
258
|
"sm": ["0.875rem", "1.25rem"],
|
|
191
259
|
"base": ["1rem", "1.5rem"],
|
|
260
|
+
"md": ["1.125rem", "1.5rem"],
|
|
192
261
|
"lg": ["1.25rem", "1.625rem"],
|
|
193
262
|
"display1": ["3.75rem", {
|
|
194
263
|
fontWeight: 700,
|
|
@@ -236,63 +305,7 @@ var fontSizes = {
|
|
|
236
305
|
letterSpacing: "-0.0125rem"
|
|
237
306
|
}]
|
|
238
307
|
};
|
|
239
|
-
var unocssFontSizes = fontConfigKeysKebabCase(
|
|
240
|
-
|
|
241
|
-
// src/theme/shadows.ts
|
|
242
|
-
var shadows = {
|
|
243
|
-
"elevation-0": "0 0 0 0 rgba(0, 0, 0, 0.10)",
|
|
244
|
-
"elevation-1": "0 1px 2px 0 rgba(0, 0, 0, 0.10)",
|
|
245
|
-
"elevation-2": "0 4px 8px 0 rgba(0, 0, 0, 0.10)",
|
|
246
|
-
"elevation-3": "0 6px 12px 0 rgba(0, 0, 0, 0.10)",
|
|
247
|
-
"elevation-4": "0 8px 16px 0 rgba(0, 0, 0, 0.10)",
|
|
248
|
-
"elevation-5": "0 12px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
// src/theme/fontFamily.ts
|
|
252
|
-
var fontFamilySans = [
|
|
253
|
-
"ui-sans-serif",
|
|
254
|
-
"system-ui",
|
|
255
|
-
"sans-serif",
|
|
256
|
-
'"Apple Color Emoji"',
|
|
257
|
-
'"Segoe UI Emoji"',
|
|
258
|
-
'"Segoe UI Symbol"',
|
|
259
|
-
'"Noto Color Emoji"'
|
|
260
|
-
];
|
|
261
|
-
var customFontFamily = {
|
|
262
|
-
sans: ["DM Sans", ...fontFamilySans]
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
// src/theme/animation.ts
|
|
266
|
-
var radixAnimation = {
|
|
267
|
-
"radix-accordion-down": "radix-accordion-down 0.2s ease-out",
|
|
268
|
-
"radix-accordion-up": "radix-accordion-up 0.2s ease-out",
|
|
269
|
-
"radix-collapsible-down": "radix-collapsible-down 0.2s ease-in-out",
|
|
270
|
-
"radix-collapsible-up": "radix-collapsible-up 0.2s ease-in-out"
|
|
271
|
-
};
|
|
272
|
-
var radixKeyframes = {
|
|
273
|
-
"radix-accordion-down": {
|
|
274
|
-
from: { height: "0" },
|
|
275
|
-
to: { height: "var(--radix-accordion-content-height)" }
|
|
276
|
-
},
|
|
277
|
-
"radix-accordion-up": {
|
|
278
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
279
|
-
to: { height: "0" }
|
|
280
|
-
},
|
|
281
|
-
"radix-collapsible-down": {
|
|
282
|
-
from: { height: "0" },
|
|
283
|
-
to: { height: "var(--radix-collapsible-content-height)" }
|
|
284
|
-
},
|
|
285
|
-
"radix-collapsible-up": {
|
|
286
|
-
from: { height: "var(--radix-collapsible-content-height)" },
|
|
287
|
-
to: { height: "0" }
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
var animation = {
|
|
291
|
-
...radixAnimation
|
|
292
|
-
};
|
|
293
|
-
var keyframes = {
|
|
294
|
-
...radixKeyframes
|
|
295
|
-
};
|
|
308
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSize);
|
|
296
309
|
|
|
297
310
|
// src/theme/screen.ts
|
|
298
311
|
var screensNumber = {
|
|
@@ -316,11 +329,46 @@ var screens = {
|
|
|
316
329
|
"desktop": `${screensNumber.desktop}px`
|
|
317
330
|
};
|
|
318
331
|
|
|
332
|
+
// src/theme/shadows.ts
|
|
333
|
+
var boxShadow = {
|
|
334
|
+
"elevation-0": "0 0 0 0 rgba(0, 0, 0, 0.10)",
|
|
335
|
+
"elevation-1": "0 1px 2px 0 rgba(0, 0, 0, 0.10)",
|
|
336
|
+
"elevation-2": "0 4px 8px 0 rgba(0, 0, 0, 0.10)",
|
|
337
|
+
"elevation-3": "0 6px 12px 0 rgba(0, 0, 0, 0.10)",
|
|
338
|
+
"elevation-4": "0 8px 16px 0 rgba(0, 0, 0, 0.10)",
|
|
339
|
+
"elevation-5": "0 12px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
340
|
+
};
|
|
341
|
+
|
|
319
342
|
// src/theme/index.ts
|
|
320
|
-
|
|
343
|
+
function buildTheme(options = {}) {
|
|
344
|
+
const theme = {};
|
|
345
|
+
if (options.colors !== false) {
|
|
346
|
+
theme.colors = colors;
|
|
347
|
+
}
|
|
348
|
+
if (options.boxShadow !== false) {
|
|
349
|
+
theme.boxShadow = boxShadow;
|
|
350
|
+
}
|
|
351
|
+
if (options.fontSize !== false) {
|
|
352
|
+
theme.fontSize = fontSize;
|
|
353
|
+
}
|
|
354
|
+
if (options.fontFamily !== false) {
|
|
355
|
+
theme.fontFamily = customFontFamily;
|
|
356
|
+
}
|
|
357
|
+
if (options.animation !== false) {
|
|
358
|
+
theme.animation = animation;
|
|
359
|
+
}
|
|
360
|
+
if (options.keyframes !== false) {
|
|
361
|
+
theme.keyframes = keyframes;
|
|
362
|
+
}
|
|
363
|
+
if (options.screens !== false) {
|
|
364
|
+
theme.screens = screens;
|
|
365
|
+
}
|
|
366
|
+
return theme;
|
|
367
|
+
}
|
|
368
|
+
var defaultTheme = {
|
|
321
369
|
colors,
|
|
322
|
-
boxShadow
|
|
323
|
-
fontSize
|
|
370
|
+
boxShadow,
|
|
371
|
+
fontSize,
|
|
324
372
|
fontFamily: customFontFamily,
|
|
325
373
|
animation,
|
|
326
374
|
keyframes,
|
|
@@ -328,19 +376,20 @@ var theme = {
|
|
|
328
376
|
};
|
|
329
377
|
var unocssTheme = {
|
|
330
378
|
colors,
|
|
331
|
-
boxShadow
|
|
379
|
+
boxShadow,
|
|
332
380
|
fontSize: unocssFontSizes
|
|
333
381
|
};
|
|
334
382
|
|
|
335
383
|
export {
|
|
336
|
-
colors,
|
|
337
|
-
fontSizes,
|
|
338
|
-
shadows,
|
|
339
|
-
customFontFamily,
|
|
340
384
|
animation,
|
|
341
385
|
keyframes,
|
|
386
|
+
colors,
|
|
387
|
+
customFontFamily,
|
|
388
|
+
fontSize,
|
|
342
389
|
screensNumber,
|
|
343
390
|
screens,
|
|
344
|
-
|
|
391
|
+
boxShadow,
|
|
392
|
+
buildTheme,
|
|
393
|
+
defaultTheme,
|
|
345
394
|
unocssTheme
|
|
346
395
|
};
|
package/dist/cli/index.cjs
CHANGED
|
@@ -24,8 +24,62 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
|
|
25
25
|
// src/cli/index.ts
|
|
26
26
|
var import_node_process = __toESM(require("process"), 1);
|
|
27
|
-
var import_helpers = require("yargs/helpers");
|
|
28
27
|
var import_yargs = __toESM(require("yargs"), 1);
|
|
28
|
+
var import_helpers = require("yargs/helpers");
|
|
29
|
+
|
|
30
|
+
// src/theme/animation.ts
|
|
31
|
+
var uiAnimation = {
|
|
32
|
+
"radix-accordion-down": "radix-accordion-down 0.2s ease-out",
|
|
33
|
+
"radix-accordion-up": "radix-accordion-up 0.2s ease-out",
|
|
34
|
+
"radix-collapsible-down": "radix-collapsible-down 0.2s ease-in-out",
|
|
35
|
+
"radix-collapsible-up": "radix-collapsible-up 0.2s ease-in-out",
|
|
36
|
+
// V2 aka reka animation
|
|
37
|
+
"reka-accordion-down": "reka-accordion-down 0.2s ease-out",
|
|
38
|
+
"reka-accordion-up": "reka-accordion-up 0.2s ease-out",
|
|
39
|
+
"reka-collapsible-down": "reka-collapsible-down 0.2s ease-in-out",
|
|
40
|
+
"reka-collapsible-up": "reka-collapsible-up 0.2s ease-in-out"
|
|
41
|
+
};
|
|
42
|
+
var uiKeyframes = {
|
|
43
|
+
"radix-accordion-down": {
|
|
44
|
+
from: { height: "0" },
|
|
45
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
46
|
+
},
|
|
47
|
+
"radix-accordion-up": {
|
|
48
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
49
|
+
to: { height: "0" }
|
|
50
|
+
},
|
|
51
|
+
"radix-collapsible-down": {
|
|
52
|
+
from: { height: "0" },
|
|
53
|
+
to: { height: "var(--radix-collapsible-content-height)" }
|
|
54
|
+
},
|
|
55
|
+
"radix-collapsible-up": {
|
|
56
|
+
from: { height: "var(--radix-collapsible-content-height)" },
|
|
57
|
+
to: { height: "0" }
|
|
58
|
+
},
|
|
59
|
+
// V2 aka reka animation
|
|
60
|
+
"reka-accordion-down": {
|
|
61
|
+
from: { height: "0" },
|
|
62
|
+
to: { height: "var(--reka-accordion-content-height)" }
|
|
63
|
+
},
|
|
64
|
+
"reka-accordion-up": {
|
|
65
|
+
from: { height: "var(--reka-accordion-content-height)" },
|
|
66
|
+
to: { height: "0" }
|
|
67
|
+
},
|
|
68
|
+
"reka-collapsible-down": {
|
|
69
|
+
from: { height: "0" },
|
|
70
|
+
to: { height: "var(--reka-collapsible-content-height)" }
|
|
71
|
+
},
|
|
72
|
+
"reka-collapsible-up": {
|
|
73
|
+
from: { height: "var(--reka-collapsible-content-height)" },
|
|
74
|
+
to: { height: "0" }
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var animation = {
|
|
78
|
+
...uiAnimation
|
|
79
|
+
};
|
|
80
|
+
var keyframes = {
|
|
81
|
+
...uiKeyframes
|
|
82
|
+
};
|
|
29
83
|
|
|
30
84
|
// src/theme/colors.ts
|
|
31
85
|
var mainColors = {
|
|
@@ -186,6 +240,20 @@ var colors = {
|
|
|
186
240
|
secondary: mainColors.pompelmo
|
|
187
241
|
};
|
|
188
242
|
|
|
243
|
+
// src/theme/fontFamily.ts
|
|
244
|
+
var fontFamilySans = [
|
|
245
|
+
"ui-sans-serif",
|
|
246
|
+
"system-ui",
|
|
247
|
+
"sans-serif",
|
|
248
|
+
'"Apple Color Emoji"',
|
|
249
|
+
'"Segoe UI Emoji"',
|
|
250
|
+
'"Segoe UI Symbol"',
|
|
251
|
+
'"Noto Color Emoji"'
|
|
252
|
+
];
|
|
253
|
+
var customFontFamily = {
|
|
254
|
+
sans: ["DM Sans", ...fontFamilySans]
|
|
255
|
+
};
|
|
256
|
+
|
|
189
257
|
// src/util/font.ts
|
|
190
258
|
var import_string_ts = require("string-ts");
|
|
191
259
|
|
|
@@ -213,11 +281,12 @@ function fontConfigKeysKebabCase(fontConfig) {
|
|
|
213
281
|
}
|
|
214
282
|
|
|
215
283
|
// src/theme/fontSize.ts
|
|
216
|
-
var
|
|
284
|
+
var fontSize = {
|
|
217
285
|
"2xs": ["0.6875rem", "1rem"],
|
|
218
286
|
"xs": ["0.75rem", "1rem"],
|
|
219
287
|
"sm": ["0.875rem", "1.25rem"],
|
|
220
288
|
"base": ["1rem", "1.5rem"],
|
|
289
|
+
"md": ["1.125rem", "1.5rem"],
|
|
221
290
|
"lg": ["1.25rem", "1.625rem"],
|
|
222
291
|
"display1": ["3.75rem", {
|
|
223
292
|
fontWeight: 700,
|
|
@@ -265,53 +334,7 @@ var fontSizes = {
|
|
|
265
334
|
letterSpacing: "-0.0125rem"
|
|
266
335
|
}]
|
|
267
336
|
};
|
|
268
|
-
var unocssFontSizes = fontConfigKeysKebabCase(
|
|
269
|
-
|
|
270
|
-
// src/theme/fontFamily.ts
|
|
271
|
-
var fontFamilySans = [
|
|
272
|
-
"ui-sans-serif",
|
|
273
|
-
"system-ui",
|
|
274
|
-
"sans-serif",
|
|
275
|
-
'"Apple Color Emoji"',
|
|
276
|
-
'"Segoe UI Emoji"',
|
|
277
|
-
'"Segoe UI Symbol"',
|
|
278
|
-
'"Noto Color Emoji"'
|
|
279
|
-
];
|
|
280
|
-
var customFontFamily = {
|
|
281
|
-
sans: ["DM Sans", ...fontFamilySans]
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
// src/theme/animation.ts
|
|
285
|
-
var radixAnimation = {
|
|
286
|
-
"radix-accordion-down": "radix-accordion-down 0.2s ease-out",
|
|
287
|
-
"radix-accordion-up": "radix-accordion-up 0.2s ease-out",
|
|
288
|
-
"radix-collapsible-down": "radix-collapsible-down 0.2s ease-in-out",
|
|
289
|
-
"radix-collapsible-up": "radix-collapsible-up 0.2s ease-in-out"
|
|
290
|
-
};
|
|
291
|
-
var radixKeyframes = {
|
|
292
|
-
"radix-accordion-down": {
|
|
293
|
-
from: { height: "0" },
|
|
294
|
-
to: { height: "var(--radix-accordion-content-height)" }
|
|
295
|
-
},
|
|
296
|
-
"radix-accordion-up": {
|
|
297
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
298
|
-
to: { height: "0" }
|
|
299
|
-
},
|
|
300
|
-
"radix-collapsible-down": {
|
|
301
|
-
from: { height: "0" },
|
|
302
|
-
to: { height: "var(--radix-collapsible-content-height)" }
|
|
303
|
-
},
|
|
304
|
-
"radix-collapsible-up": {
|
|
305
|
-
from: { height: "var(--radix-collapsible-content-height)" },
|
|
306
|
-
to: { height: "0" }
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
var animation = {
|
|
310
|
-
...radixAnimation
|
|
311
|
-
};
|
|
312
|
-
var keyframes = {
|
|
313
|
-
...radixKeyframes
|
|
314
|
-
};
|
|
337
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSize);
|
|
315
338
|
|
|
316
339
|
// src/theme/screen.ts
|
|
317
340
|
var screensNumber = {
|
package/dist/cli/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
colors
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-QZWKJNXG.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/index.ts
|
|
6
6
|
import process from "process";
|
|
7
|
-
import { hideBin } from "yargs/helpers";
|
|
8
7
|
import yargs from "yargs";
|
|
8
|
+
import { hideBin } from "yargs/helpers";
|
|
9
9
|
|
|
10
10
|
// src/cli/src/theme/color.ts
|
|
11
11
|
var css = String.raw;
|
package/dist/index.cjs
CHANGED
|
@@ -30,22 +30,81 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
-
animation: () =>
|
|
33
|
+
animation: () => animation2,
|
|
34
|
+
boxShadow: () => boxShadow,
|
|
35
|
+
buildPreset: () => buildPreset,
|
|
36
|
+
buildTheme: () => buildTheme,
|
|
34
37
|
colors: () => colors,
|
|
35
38
|
colorsNames: () => colorsNames,
|
|
36
|
-
config: () => config,
|
|
37
39
|
default: () => src_default,
|
|
40
|
+
defaultTheme: () => defaultTheme,
|
|
38
41
|
fontFamily: () => customFontFamily,
|
|
39
|
-
|
|
42
|
+
fontSize: () => fontSize,
|
|
40
43
|
keyframes: () => keyframes,
|
|
41
44
|
screens: () => screens,
|
|
42
45
|
screensNumber: () => screensNumber,
|
|
43
|
-
shadows: () => shadows,
|
|
44
|
-
theme: () => theme,
|
|
45
46
|
unocssTheme: () => unocssTheme
|
|
46
47
|
});
|
|
47
48
|
module.exports = __toCommonJS(src_exports);
|
|
48
49
|
|
|
50
|
+
// src/plugins/index.ts
|
|
51
|
+
var import_tailwindcss_animate = __toESM(require("tailwindcss-animate"), 1);
|
|
52
|
+
var plugins = [import_tailwindcss_animate.default];
|
|
53
|
+
|
|
54
|
+
// src/theme/animation.ts
|
|
55
|
+
var uiAnimation = {
|
|
56
|
+
"radix-accordion-down": "radix-accordion-down 0.2s ease-out",
|
|
57
|
+
"radix-accordion-up": "radix-accordion-up 0.2s ease-out",
|
|
58
|
+
"radix-collapsible-down": "radix-collapsible-down 0.2s ease-in-out",
|
|
59
|
+
"radix-collapsible-up": "radix-collapsible-up 0.2s ease-in-out",
|
|
60
|
+
// V2 aka reka animation
|
|
61
|
+
"reka-accordion-down": "reka-accordion-down 0.2s ease-out",
|
|
62
|
+
"reka-accordion-up": "reka-accordion-up 0.2s ease-out",
|
|
63
|
+
"reka-collapsible-down": "reka-collapsible-down 0.2s ease-in-out",
|
|
64
|
+
"reka-collapsible-up": "reka-collapsible-up 0.2s ease-in-out"
|
|
65
|
+
};
|
|
66
|
+
var uiKeyframes = {
|
|
67
|
+
"radix-accordion-down": {
|
|
68
|
+
from: { height: "0" },
|
|
69
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
70
|
+
},
|
|
71
|
+
"radix-accordion-up": {
|
|
72
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
73
|
+
to: { height: "0" }
|
|
74
|
+
},
|
|
75
|
+
"radix-collapsible-down": {
|
|
76
|
+
from: { height: "0" },
|
|
77
|
+
to: { height: "var(--radix-collapsible-content-height)" }
|
|
78
|
+
},
|
|
79
|
+
"radix-collapsible-up": {
|
|
80
|
+
from: { height: "var(--radix-collapsible-content-height)" },
|
|
81
|
+
to: { height: "0" }
|
|
82
|
+
},
|
|
83
|
+
// V2 aka reka animation
|
|
84
|
+
"reka-accordion-down": {
|
|
85
|
+
from: { height: "0" },
|
|
86
|
+
to: { height: "var(--reka-accordion-content-height)" }
|
|
87
|
+
},
|
|
88
|
+
"reka-accordion-up": {
|
|
89
|
+
from: { height: "var(--reka-accordion-content-height)" },
|
|
90
|
+
to: { height: "0" }
|
|
91
|
+
},
|
|
92
|
+
"reka-collapsible-down": {
|
|
93
|
+
from: { height: "0" },
|
|
94
|
+
to: { height: "var(--reka-collapsible-content-height)" }
|
|
95
|
+
},
|
|
96
|
+
"reka-collapsible-up": {
|
|
97
|
+
from: { height: "var(--reka-collapsible-content-height)" },
|
|
98
|
+
to: { height: "0" }
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
var animation2 = {
|
|
102
|
+
...uiAnimation
|
|
103
|
+
};
|
|
104
|
+
var keyframes = {
|
|
105
|
+
...uiKeyframes
|
|
106
|
+
};
|
|
107
|
+
|
|
49
108
|
// src/theme/colors.ts
|
|
50
109
|
var mainColors = {
|
|
51
110
|
inherit: "inherit",
|
|
@@ -205,6 +264,20 @@ var colors = {
|
|
|
205
264
|
secondary: mainColors.pompelmo
|
|
206
265
|
};
|
|
207
266
|
|
|
267
|
+
// src/theme/fontFamily.ts
|
|
268
|
+
var fontFamilySans = [
|
|
269
|
+
"ui-sans-serif",
|
|
270
|
+
"system-ui",
|
|
271
|
+
"sans-serif",
|
|
272
|
+
'"Apple Color Emoji"',
|
|
273
|
+
'"Segoe UI Emoji"',
|
|
274
|
+
'"Segoe UI Symbol"',
|
|
275
|
+
'"Noto Color Emoji"'
|
|
276
|
+
];
|
|
277
|
+
var customFontFamily = {
|
|
278
|
+
sans: ["DM Sans", ...fontFamilySans]
|
|
279
|
+
};
|
|
280
|
+
|
|
208
281
|
// src/util/font.ts
|
|
209
282
|
var import_string_ts = require("string-ts");
|
|
210
283
|
|
|
@@ -232,11 +305,12 @@ function fontConfigKeysKebabCase(fontConfig) {
|
|
|
232
305
|
}
|
|
233
306
|
|
|
234
307
|
// src/theme/fontSize.ts
|
|
235
|
-
var
|
|
308
|
+
var fontSize = {
|
|
236
309
|
"2xs": ["0.6875rem", "1rem"],
|
|
237
310
|
"xs": ["0.75rem", "1rem"],
|
|
238
311
|
"sm": ["0.875rem", "1.25rem"],
|
|
239
312
|
"base": ["1rem", "1.5rem"],
|
|
313
|
+
"md": ["1.125rem", "1.5rem"],
|
|
240
314
|
"lg": ["1.25rem", "1.625rem"],
|
|
241
315
|
"display1": ["3.75rem", {
|
|
242
316
|
fontWeight: 700,
|
|
@@ -284,63 +358,7 @@ var fontSizes = {
|
|
|
284
358
|
letterSpacing: "-0.0125rem"
|
|
285
359
|
}]
|
|
286
360
|
};
|
|
287
|
-
var unocssFontSizes = fontConfigKeysKebabCase(
|
|
288
|
-
|
|
289
|
-
// src/theme/shadows.ts
|
|
290
|
-
var shadows = {
|
|
291
|
-
"elevation-0": "0 0 0 0 rgba(0, 0, 0, 0.10)",
|
|
292
|
-
"elevation-1": "0 1px 2px 0 rgba(0, 0, 0, 0.10)",
|
|
293
|
-
"elevation-2": "0 4px 8px 0 rgba(0, 0, 0, 0.10)",
|
|
294
|
-
"elevation-3": "0 6px 12px 0 rgba(0, 0, 0, 0.10)",
|
|
295
|
-
"elevation-4": "0 8px 16px 0 rgba(0, 0, 0, 0.10)",
|
|
296
|
-
"elevation-5": "0 12px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
// src/theme/fontFamily.ts
|
|
300
|
-
var fontFamilySans = [
|
|
301
|
-
"ui-sans-serif",
|
|
302
|
-
"system-ui",
|
|
303
|
-
"sans-serif",
|
|
304
|
-
'"Apple Color Emoji"',
|
|
305
|
-
'"Segoe UI Emoji"',
|
|
306
|
-
'"Segoe UI Symbol"',
|
|
307
|
-
'"Noto Color Emoji"'
|
|
308
|
-
];
|
|
309
|
-
var customFontFamily = {
|
|
310
|
-
sans: ["DM Sans", ...fontFamilySans]
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
// src/theme/animation.ts
|
|
314
|
-
var radixAnimation = {
|
|
315
|
-
"radix-accordion-down": "radix-accordion-down 0.2s ease-out",
|
|
316
|
-
"radix-accordion-up": "radix-accordion-up 0.2s ease-out",
|
|
317
|
-
"radix-collapsible-down": "radix-collapsible-down 0.2s ease-in-out",
|
|
318
|
-
"radix-collapsible-up": "radix-collapsible-up 0.2s ease-in-out"
|
|
319
|
-
};
|
|
320
|
-
var radixKeyframes = {
|
|
321
|
-
"radix-accordion-down": {
|
|
322
|
-
from: { height: "0" },
|
|
323
|
-
to: { height: "var(--radix-accordion-content-height)" }
|
|
324
|
-
},
|
|
325
|
-
"radix-accordion-up": {
|
|
326
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
327
|
-
to: { height: "0" }
|
|
328
|
-
},
|
|
329
|
-
"radix-collapsible-down": {
|
|
330
|
-
from: { height: "0" },
|
|
331
|
-
to: { height: "var(--radix-collapsible-content-height)" }
|
|
332
|
-
},
|
|
333
|
-
"radix-collapsible-up": {
|
|
334
|
-
from: { height: "var(--radix-collapsible-content-height)" },
|
|
335
|
-
to: { height: "0" }
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
var animation = {
|
|
339
|
-
...radixAnimation
|
|
340
|
-
};
|
|
341
|
-
var keyframes = {
|
|
342
|
-
...radixKeyframes
|
|
343
|
-
};
|
|
361
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSize);
|
|
344
362
|
|
|
345
363
|
// src/theme/screen.ts
|
|
346
364
|
var screensNumber = {
|
|
@@ -364,26 +382,57 @@ var screens = {
|
|
|
364
382
|
"desktop": `${screensNumber.desktop}px`
|
|
365
383
|
};
|
|
366
384
|
|
|
385
|
+
// src/theme/shadows.ts
|
|
386
|
+
var boxShadow = {
|
|
387
|
+
"elevation-0": "0 0 0 0 rgba(0, 0, 0, 0.10)",
|
|
388
|
+
"elevation-1": "0 1px 2px 0 rgba(0, 0, 0, 0.10)",
|
|
389
|
+
"elevation-2": "0 4px 8px 0 rgba(0, 0, 0, 0.10)",
|
|
390
|
+
"elevation-3": "0 6px 12px 0 rgba(0, 0, 0, 0.10)",
|
|
391
|
+
"elevation-4": "0 8px 16px 0 rgba(0, 0, 0, 0.10)",
|
|
392
|
+
"elevation-5": "0 12px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
393
|
+
};
|
|
394
|
+
|
|
367
395
|
// src/theme/index.ts
|
|
368
|
-
|
|
396
|
+
function buildTheme(options = {}) {
|
|
397
|
+
const theme = {};
|
|
398
|
+
if (options.colors !== false) {
|
|
399
|
+
theme.colors = colors;
|
|
400
|
+
}
|
|
401
|
+
if (options.boxShadow !== false) {
|
|
402
|
+
theme.boxShadow = boxShadow;
|
|
403
|
+
}
|
|
404
|
+
if (options.fontSize !== false) {
|
|
405
|
+
theme.fontSize = fontSize;
|
|
406
|
+
}
|
|
407
|
+
if (options.fontFamily !== false) {
|
|
408
|
+
theme.fontFamily = customFontFamily;
|
|
409
|
+
}
|
|
410
|
+
if (options.animation !== false) {
|
|
411
|
+
theme.animation = animation2;
|
|
412
|
+
}
|
|
413
|
+
if (options.keyframes !== false) {
|
|
414
|
+
theme.keyframes = keyframes;
|
|
415
|
+
}
|
|
416
|
+
if (options.screens !== false) {
|
|
417
|
+
theme.screens = screens;
|
|
418
|
+
}
|
|
419
|
+
return theme;
|
|
420
|
+
}
|
|
421
|
+
var defaultTheme = {
|
|
369
422
|
colors,
|
|
370
|
-
boxShadow
|
|
371
|
-
fontSize
|
|
423
|
+
boxShadow,
|
|
424
|
+
fontSize,
|
|
372
425
|
fontFamily: customFontFamily,
|
|
373
|
-
animation,
|
|
426
|
+
animation: animation2,
|
|
374
427
|
keyframes,
|
|
375
428
|
screens
|
|
376
429
|
};
|
|
377
430
|
var unocssTheme = {
|
|
378
431
|
colors,
|
|
379
|
-
boxShadow
|
|
432
|
+
boxShadow,
|
|
380
433
|
fontSize: unocssFontSizes
|
|
381
434
|
};
|
|
382
435
|
|
|
383
|
-
// src/plugins/index.ts
|
|
384
|
-
var import_tailwindcss_animate = __toESM(require("tailwindcss-animate"), 1);
|
|
385
|
-
var plugins = [import_tailwindcss_animate.default];
|
|
386
|
-
|
|
387
436
|
// src/constant/index.ts
|
|
388
437
|
var colorsNames = [
|
|
389
438
|
"primary",
|
|
@@ -401,33 +450,34 @@ var colorsNames = [
|
|
|
401
450
|
];
|
|
402
451
|
|
|
403
452
|
// src/index.ts
|
|
404
|
-
function
|
|
453
|
+
function buildPreset(extend = true, buildOptions = {}) {
|
|
405
454
|
if (extend === false) {
|
|
406
455
|
return {
|
|
407
|
-
theme,
|
|
456
|
+
theme: buildTheme(buildOptions),
|
|
408
457
|
plugins
|
|
409
458
|
};
|
|
410
459
|
}
|
|
411
460
|
return {
|
|
412
461
|
theme: {
|
|
413
|
-
extend:
|
|
462
|
+
extend: buildTheme(buildOptions)
|
|
414
463
|
},
|
|
415
464
|
plugins
|
|
416
465
|
};
|
|
417
466
|
}
|
|
418
|
-
var src_default =
|
|
467
|
+
var src_default = buildPreset();
|
|
419
468
|
// Annotate the CommonJS export names for ESM import in node:
|
|
420
469
|
0 && (module.exports = {
|
|
421
470
|
animation,
|
|
471
|
+
boxShadow,
|
|
472
|
+
buildPreset,
|
|
473
|
+
buildTheme,
|
|
422
474
|
colors,
|
|
423
475
|
colorsNames,
|
|
424
|
-
|
|
476
|
+
defaultTheme,
|
|
425
477
|
fontFamily,
|
|
426
|
-
|
|
478
|
+
fontSize,
|
|
427
479
|
keyframes,
|
|
428
480
|
screens,
|
|
429
481
|
screensNumber,
|
|
430
|
-
shadows,
|
|
431
|
-
theme,
|
|
432
482
|
unocssTheme
|
|
433
483
|
});
|