@removify/tailwind-preset 0.2.11 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +22 -1
- package/dist/index.d.cts +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +453 -17
- package/package.json +20 -14
- package/readme.md +14 -6
- package/tailwind-dist/index.css +351 -0
- package/tailwind-dist/tailwindcss-animate.css +578 -0
- package/bin/index.js +0 -2
- package/dist/chunk-Y7GWGRSA.js +0 -444
- package/dist/cli/index.cjs +0 -275
- package/dist/cli/index.d.cts +0 -2
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js +0 -88
package/dist/index.cjs
CHANGED
|
@@ -64,7 +64,12 @@ var uiAnimation = {
|
|
|
64
64
|
"reka-accordion-down": "reka-accordion-down 0.1s ease-out",
|
|
65
65
|
"reka-accordion-up": "reka-accordion-up 0.1s ease-out",
|
|
66
66
|
"reka-collapsible-down": "reka-collapsible-down 0.1s ease-in-out",
|
|
67
|
-
"reka-collapsible-up": "reka-collapsible-up 0.1s ease-in-out"
|
|
67
|
+
"reka-collapsible-up": "reka-collapsible-up 0.1s ease-in-out",
|
|
68
|
+
// V4
|
|
69
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
70
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
71
|
+
"collapsible-down": "collapsible-down 0.2s ease-in-out",
|
|
72
|
+
"collapsible-up": "collapsible-up 0.2s ease-in-out"
|
|
68
73
|
};
|
|
69
74
|
var uiKeyframes = {
|
|
70
75
|
"radix-accordion-down": {
|
|
@@ -99,6 +104,22 @@ var uiKeyframes = {
|
|
|
99
104
|
"reka-collapsible-up": {
|
|
100
105
|
from: { height: "var(--reka-collapsible-content-height)" },
|
|
101
106
|
to: { height: "0" }
|
|
107
|
+
},
|
|
108
|
+
"accordion-down": {
|
|
109
|
+
from: { height: "0" },
|
|
110
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
111
|
+
},
|
|
112
|
+
"accordion-up": {
|
|
113
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
114
|
+
to: { height: "0" }
|
|
115
|
+
},
|
|
116
|
+
"collapsible-down": {
|
|
117
|
+
from: { height: "0" },
|
|
118
|
+
to: { height: "var(--radix-collapsible-content-height)" }
|
|
119
|
+
},
|
|
120
|
+
"collapsible-up": {
|
|
121
|
+
from: { height: "var(--radix-collapsible-content-height)" },
|
|
122
|
+
to: { height: "0" }
|
|
102
123
|
}
|
|
103
124
|
};
|
|
104
125
|
var animation2 = {
|
package/dist/index.d.cts
CHANGED
|
@@ -105,6 +105,10 @@ declare const animation: {
|
|
|
105
105
|
'reka-accordion-up': string;
|
|
106
106
|
'reka-collapsible-down': string;
|
|
107
107
|
'reka-collapsible-up': string;
|
|
108
|
+
'accordion-down': string;
|
|
109
|
+
'accordion-up': string;
|
|
110
|
+
'collapsible-down': string;
|
|
111
|
+
'collapsible-up': string;
|
|
108
112
|
};
|
|
109
113
|
declare const keyframes: {
|
|
110
114
|
'radix-accordion-down': {
|
|
@@ -171,6 +175,38 @@ declare const keyframes: {
|
|
|
171
175
|
height: string;
|
|
172
176
|
};
|
|
173
177
|
};
|
|
178
|
+
'accordion-down': {
|
|
179
|
+
from: {
|
|
180
|
+
height: string;
|
|
181
|
+
};
|
|
182
|
+
to: {
|
|
183
|
+
height: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
'accordion-up': {
|
|
187
|
+
from: {
|
|
188
|
+
height: string;
|
|
189
|
+
};
|
|
190
|
+
to: {
|
|
191
|
+
height: string;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
'collapsible-down': {
|
|
195
|
+
from: {
|
|
196
|
+
height: string;
|
|
197
|
+
};
|
|
198
|
+
to: {
|
|
199
|
+
height: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
'collapsible-up': {
|
|
203
|
+
from: {
|
|
204
|
+
height: string;
|
|
205
|
+
};
|
|
206
|
+
to: {
|
|
207
|
+
height: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
174
210
|
};
|
|
175
211
|
|
|
176
212
|
declare const colors: {
|
|
@@ -661,4 +697,4 @@ declare const unocssTheme: {
|
|
|
661
697
|
|
|
662
698
|
declare function buildPreset(extend?: boolean, buildOptions?: BuildThemeOptions): Partial<Config>;
|
|
663
699
|
|
|
664
|
-
export { type BuildThemeOptions, type ColorString, type Colors, type ColorsNames, type ConfiguredThemes, type FontSizes, type Screens, type ScreensNumber, type Shadows, type ThemeOptions, type UnocssFontSizes, animation, boxShadow, buildPreset, buildTheme, colors, colorsNames, configuredThemes, defaultTheme, factory, customFontFamily as fontFamily, fontSize, isDetailFont, keyframes, screenSizes, screens, screensNumber, unocssTheme };
|
|
700
|
+
export { type BuildThemeOptions, type ColorString, type Colors, type ColorsNames, type ConfiguredThemes, type FontSizeDetail, type FontSizes, type Screens, type ScreensNumber, type Shadows, type ThemeOptions, type UnocssFontSizes, animation, boxShadow, buildPreset, buildTheme, colors, colorsNames, configuredThemes, defaultTheme, factory, customFontFamily as fontFamily, fontSize, isDetailFont, keyframes, screenSizes, screens, screensNumber, unocssTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -105,6 +105,10 @@ declare const animation: {
|
|
|
105
105
|
'reka-accordion-up': string;
|
|
106
106
|
'reka-collapsible-down': string;
|
|
107
107
|
'reka-collapsible-up': string;
|
|
108
|
+
'accordion-down': string;
|
|
109
|
+
'accordion-up': string;
|
|
110
|
+
'collapsible-down': string;
|
|
111
|
+
'collapsible-up': string;
|
|
108
112
|
};
|
|
109
113
|
declare const keyframes: {
|
|
110
114
|
'radix-accordion-down': {
|
|
@@ -171,6 +175,38 @@ declare const keyframes: {
|
|
|
171
175
|
height: string;
|
|
172
176
|
};
|
|
173
177
|
};
|
|
178
|
+
'accordion-down': {
|
|
179
|
+
from: {
|
|
180
|
+
height: string;
|
|
181
|
+
};
|
|
182
|
+
to: {
|
|
183
|
+
height: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
'accordion-up': {
|
|
187
|
+
from: {
|
|
188
|
+
height: string;
|
|
189
|
+
};
|
|
190
|
+
to: {
|
|
191
|
+
height: string;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
'collapsible-down': {
|
|
195
|
+
from: {
|
|
196
|
+
height: string;
|
|
197
|
+
};
|
|
198
|
+
to: {
|
|
199
|
+
height: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
'collapsible-up': {
|
|
203
|
+
from: {
|
|
204
|
+
height: string;
|
|
205
|
+
};
|
|
206
|
+
to: {
|
|
207
|
+
height: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
174
210
|
};
|
|
175
211
|
|
|
176
212
|
declare const colors: {
|
|
@@ -661,4 +697,4 @@ declare const unocssTheme: {
|
|
|
661
697
|
|
|
662
698
|
declare function buildPreset(extend?: boolean, buildOptions?: BuildThemeOptions): Partial<Config>;
|
|
663
699
|
|
|
664
|
-
export { type BuildThemeOptions, type ColorString, type Colors, type ColorsNames, type ConfiguredThemes, type FontSizes, type Screens, type ScreensNumber, type Shadows, type ThemeOptions, type UnocssFontSizes, animation, boxShadow, buildPreset, buildTheme, colors, colorsNames, configuredThemes, defaultTheme, factory, customFontFamily as fontFamily, fontSize, isDetailFont, keyframes, screenSizes, screens, screensNumber, unocssTheme };
|
|
700
|
+
export { type BuildThemeOptions, type ColorString, type Colors, type ColorsNames, type ConfiguredThemes, type FontSizeDetail, type FontSizes, type Screens, type ScreensNumber, type Shadows, type ThemeOptions, type UnocssFontSizes, animation, boxShadow, buildPreset, buildTheme, colors, colorsNames, configuredThemes, defaultTheme, factory, customFontFamily as fontFamily, fontSize, isDetailFont, keyframes, screenSizes, screens, screensNumber, unocssTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,458 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// src/plugins/index.ts
|
|
2
|
+
import animation from "tailwindcss-animate";
|
|
3
|
+
var plugins = [animation];
|
|
4
|
+
|
|
5
|
+
// src/theme/animation.ts
|
|
6
|
+
var uiAnimation = {
|
|
7
|
+
"radix-accordion-down": "radix-accordion-down 0.1s ease-out",
|
|
8
|
+
"radix-accordion-up": "radix-accordion-up 0.1s ease-out",
|
|
9
|
+
"radix-collapsible-down": "radix-collapsible-down 0.1s ease-in-out",
|
|
10
|
+
"radix-collapsible-up": "radix-collapsible-up 0.1s ease-in-out",
|
|
11
|
+
// V2 aka reka animation
|
|
12
|
+
"reka-accordion-down": "reka-accordion-down 0.1s ease-out",
|
|
13
|
+
"reka-accordion-up": "reka-accordion-up 0.1s ease-out",
|
|
14
|
+
"reka-collapsible-down": "reka-collapsible-down 0.1s ease-in-out",
|
|
15
|
+
"reka-collapsible-up": "reka-collapsible-up 0.1s ease-in-out",
|
|
16
|
+
// V4
|
|
17
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
18
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
19
|
+
"collapsible-down": "collapsible-down 0.2s ease-in-out",
|
|
20
|
+
"collapsible-up": "collapsible-up 0.2s ease-in-out"
|
|
21
|
+
};
|
|
22
|
+
var uiKeyframes = {
|
|
23
|
+
"radix-accordion-down": {
|
|
24
|
+
from: { height: "0" },
|
|
25
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
26
|
+
},
|
|
27
|
+
"radix-accordion-up": {
|
|
28
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
29
|
+
to: { height: "0" }
|
|
30
|
+
},
|
|
31
|
+
"radix-collapsible-down": {
|
|
32
|
+
from: { height: "0" },
|
|
33
|
+
to: { height: "var(--radix-collapsible-content-height)" }
|
|
34
|
+
},
|
|
35
|
+
"radix-collapsible-up": {
|
|
36
|
+
from: { height: "var(--radix-collapsible-content-height)" },
|
|
37
|
+
to: { height: "0" }
|
|
38
|
+
},
|
|
39
|
+
// V2 aka reka animation
|
|
40
|
+
"reka-accordion-down": {
|
|
41
|
+
from: { height: "0" },
|
|
42
|
+
to: { height: "var(--reka-accordion-content-height)" }
|
|
43
|
+
},
|
|
44
|
+
"reka-accordion-up": {
|
|
45
|
+
from: { height: "var(--reka-accordion-content-height)" },
|
|
46
|
+
to: { height: "0" }
|
|
47
|
+
},
|
|
48
|
+
"reka-collapsible-down": {
|
|
49
|
+
from: { height: "0" },
|
|
50
|
+
to: { height: "var(--reka-collapsible-content-height)" }
|
|
51
|
+
},
|
|
52
|
+
"reka-collapsible-up": {
|
|
53
|
+
from: { height: "var(--reka-collapsible-content-height)" },
|
|
54
|
+
to: { height: "0" }
|
|
55
|
+
},
|
|
56
|
+
"accordion-down": {
|
|
57
|
+
from: { height: "0" },
|
|
58
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
59
|
+
},
|
|
60
|
+
"accordion-up": {
|
|
61
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
62
|
+
to: { height: "0" }
|
|
63
|
+
},
|
|
64
|
+
"collapsible-down": {
|
|
65
|
+
from: { height: "0" },
|
|
66
|
+
to: { height: "var(--radix-collapsible-content-height)" }
|
|
67
|
+
},
|
|
68
|
+
"collapsible-up": {
|
|
69
|
+
from: { height: "var(--radix-collapsible-content-height)" },
|
|
70
|
+
to: { height: "0" }
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var animation2 = {
|
|
74
|
+
...uiAnimation
|
|
75
|
+
};
|
|
76
|
+
var keyframes = {
|
|
77
|
+
...uiKeyframes
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// src/theme/colors.ts
|
|
81
|
+
var mainColors = {
|
|
82
|
+
inherit: "inherit",
|
|
83
|
+
current: "currentColor",
|
|
84
|
+
transparent: "transparent",
|
|
85
|
+
danger: "#EA3529",
|
|
86
|
+
warning: "#F97316",
|
|
87
|
+
success: "#15A46E",
|
|
88
|
+
info: "#3EC2C9",
|
|
89
|
+
special: "#686DF4",
|
|
90
|
+
black: "#000000",
|
|
91
|
+
white: "#FFFFFF",
|
|
92
|
+
bateau: {
|
|
93
|
+
DEFAULT: "#1C749F",
|
|
94
|
+
50: "#F2F5F7",
|
|
95
|
+
100: "#E7ECF0",
|
|
96
|
+
200: "#CCD7E1",
|
|
97
|
+
300: "#ADC0D0",
|
|
98
|
+
400: "#6390B0",
|
|
99
|
+
500: "#1C749F",
|
|
100
|
+
600: "#1B6F98",
|
|
101
|
+
700: "#186388",
|
|
102
|
+
800: "#155675",
|
|
103
|
+
900: "#114660",
|
|
104
|
+
950: "#0C3144"
|
|
105
|
+
},
|
|
106
|
+
pompelmo: {
|
|
107
|
+
DEFAULT: "#FF6663",
|
|
108
|
+
50: "#FFF4F4",
|
|
109
|
+
100: "#FFEBEA",
|
|
110
|
+
200: "#FFD4D4",
|
|
111
|
+
300: "#FFBCBB",
|
|
112
|
+
400: "#FF9F9E",
|
|
113
|
+
500: "#FF6663",
|
|
114
|
+
600: "#F3615E",
|
|
115
|
+
700: "#DA5754",
|
|
116
|
+
800: "#BC4B49",
|
|
117
|
+
900: "#9A3E3C",
|
|
118
|
+
950: "#6D2C2A"
|
|
119
|
+
},
|
|
120
|
+
neutral: {
|
|
121
|
+
DEFAULT: "#BEC7D1",
|
|
122
|
+
50: "#F9FAFB",
|
|
123
|
+
100: "#F4F6F7",
|
|
124
|
+
200: "#E9ECEF",
|
|
125
|
+
300: "#DEE2E7",
|
|
126
|
+
400: "#D2D8DE",
|
|
127
|
+
500: "#BEC7D1",
|
|
128
|
+
600: "#B5BEC7",
|
|
129
|
+
700: "#A2AAB2",
|
|
130
|
+
800: "#8C939A",
|
|
131
|
+
900: "#73787E",
|
|
132
|
+
950: "#515559"
|
|
133
|
+
},
|
|
134
|
+
orange: {
|
|
135
|
+
DEFAULT: "#F97316",
|
|
136
|
+
50: "#FEF5F2",
|
|
137
|
+
100: "#FEECE7",
|
|
138
|
+
200: "#FDD7CC",
|
|
139
|
+
300: "#FCC0AD",
|
|
140
|
+
400: "#FBA586",
|
|
141
|
+
500: "#F97316",
|
|
142
|
+
600: "#EE6E15",
|
|
143
|
+
700: "#D46213",
|
|
144
|
+
800: "#B85510",
|
|
145
|
+
900: "#96450D",
|
|
146
|
+
950: "#6A3109"
|
|
147
|
+
},
|
|
148
|
+
amber: {
|
|
149
|
+
DEFAULT: "#FBBF24",
|
|
150
|
+
50: "#FFF9F2",
|
|
151
|
+
100: "#FEF5E7",
|
|
152
|
+
200: "#FEEACD",
|
|
153
|
+
300: "#FDDEAE",
|
|
154
|
+
400: "#FCD288",
|
|
155
|
+
500: "#FBBF24",
|
|
156
|
+
600: "#EFB622",
|
|
157
|
+
700: "#D6A31F",
|
|
158
|
+
800: "#B98D1B",
|
|
159
|
+
900: "#977316",
|
|
160
|
+
950: "#6B510F"
|
|
161
|
+
},
|
|
162
|
+
indigo: {
|
|
163
|
+
DEFAULT: "#686DF4",
|
|
164
|
+
50: "#F4F4FE",
|
|
165
|
+
100: "#EBEBFD",
|
|
166
|
+
200: "#D5D6FB",
|
|
167
|
+
300: "#BCBEF9",
|
|
168
|
+
400: "#A0A2F7",
|
|
169
|
+
500: "#686DF4",
|
|
170
|
+
600: "#6368E9",
|
|
171
|
+
700: "#595DD0",
|
|
172
|
+
800: "#4D51B4",
|
|
173
|
+
900: "#3F4293",
|
|
174
|
+
950: "#2C2F68"
|
|
175
|
+
},
|
|
176
|
+
seafoam: {
|
|
177
|
+
DEFAULT: "#3EC2C9",
|
|
178
|
+
50: "#F3FAFA",
|
|
179
|
+
100: "#E8F5F6",
|
|
180
|
+
200: "#CFEBED",
|
|
181
|
+
300: "#B2E0E3",
|
|
182
|
+
400: "#8FD4D9",
|
|
183
|
+
500: "#3EC2C9",
|
|
184
|
+
600: "#3BB9C0",
|
|
185
|
+
700: "#35A6AB",
|
|
186
|
+
800: "#2E8F95",
|
|
187
|
+
900: "#257579",
|
|
188
|
+
950: "#1A5356"
|
|
189
|
+
},
|
|
190
|
+
green: {
|
|
191
|
+
DEFAULT: "#15A46E",
|
|
192
|
+
50: "#F2F7F4",
|
|
193
|
+
100: "#E7F1EB",
|
|
194
|
+
200: "#CCE2D6",
|
|
195
|
+
300: "#ADD2BE",
|
|
196
|
+
400: "#86C1A3",
|
|
197
|
+
500: "#15A46E",
|
|
198
|
+
600: "#149C69",
|
|
199
|
+
700: "#128C5E",
|
|
200
|
+
800: "#107951",
|
|
201
|
+
900: "#0D6342",
|
|
202
|
+
950: "#09462F"
|
|
203
|
+
},
|
|
204
|
+
fuchsia: {
|
|
205
|
+
DEFAULT: "#C53DE7",
|
|
206
|
+
50: "#FAF3FD",
|
|
207
|
+
100: "#F5E8FB",
|
|
208
|
+
200: "#ECCFF7",
|
|
209
|
+
300: "#E1B2F2",
|
|
210
|
+
400: "#D68FEE",
|
|
211
|
+
500: "#C53DE7",
|
|
212
|
+
600: "#BC3ADC",
|
|
213
|
+
700: "#A834C5",
|
|
214
|
+
800: "#922DAB",
|
|
215
|
+
900: "#77258B",
|
|
216
|
+
950: "#541A63"
|
|
217
|
+
},
|
|
218
|
+
red: {
|
|
219
|
+
DEFAULT: "#EA3529",
|
|
220
|
+
50: "#FDF2F2",
|
|
221
|
+
100: "#FBE8E7",
|
|
222
|
+
200: "#F8CECD",
|
|
223
|
+
300: "#F4B0AE",
|
|
224
|
+
400: "#F08C8A",
|
|
225
|
+
500: "#EA3529",
|
|
226
|
+
600: "#DF3327",
|
|
227
|
+
700: "#C82D23",
|
|
228
|
+
800: "#AD271E",
|
|
229
|
+
900: "#8D2019",
|
|
230
|
+
950: "#641711"
|
|
231
|
+
},
|
|
232
|
+
rating: {
|
|
233
|
+
"high": "#15A46E",
|
|
234
|
+
"medium": "#EC5818",
|
|
235
|
+
"low": "#EA3529",
|
|
236
|
+
"high-star": "#86C1A3",
|
|
237
|
+
"medium-star": "#FCD288",
|
|
238
|
+
"low-star": "#F08C8A"
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
var colors = {
|
|
242
|
+
...mainColors,
|
|
243
|
+
primary: mainColors.bateau,
|
|
244
|
+
secondary: mainColors.pompelmo
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
// src/theme/fontFamily.ts
|
|
248
|
+
var fontFamilySans = [
|
|
249
|
+
"ui-sans-serif",
|
|
250
|
+
"system-ui",
|
|
251
|
+
"sans-serif",
|
|
252
|
+
'"Apple Color Emoji"',
|
|
253
|
+
'"Segoe UI Emoji"',
|
|
254
|
+
'"Segoe UI Symbol"',
|
|
255
|
+
'"Noto Color Emoji"'
|
|
256
|
+
];
|
|
257
|
+
var customFontFamily = {
|
|
258
|
+
sans: ["DM Sans", ...fontFamilySans]
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// src/util/font.ts
|
|
262
|
+
import { kebabKeys } from "string-ts";
|
|
263
|
+
|
|
264
|
+
// src/types/fontSize.ts
|
|
265
|
+
function isDetailFont(value) {
|
|
266
|
+
return Array.isArray(value) && typeof value[1] === "object";
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// src/util/font.ts
|
|
270
|
+
var entries = Object.entries;
|
|
271
|
+
function fontConfigKeysKebabCase(fontConfig) {
|
|
272
|
+
const result = {};
|
|
273
|
+
for (const [key, value] of entries(fontConfig)) {
|
|
274
|
+
if (value) {
|
|
275
|
+
if (isDetailFont(value)) {
|
|
276
|
+
const [size, detail] = value;
|
|
277
|
+
const kebabDetail = kebabKeys(detail);
|
|
278
|
+
result[key] = [size, kebabDetail];
|
|
279
|
+
} else {
|
|
280
|
+
result[key] = value;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return result;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// src/theme/fontSize.ts
|
|
288
|
+
var fontSize = {
|
|
289
|
+
"2xs": ["0.6875rem", "1rem"],
|
|
290
|
+
"xs": ["0.75rem", "1rem"],
|
|
291
|
+
"sm": ["0.875rem", "1.25rem"],
|
|
292
|
+
"base": ["1rem", "1.5rem"],
|
|
293
|
+
"md": ["1.125rem", "1.5rem"],
|
|
294
|
+
"lg": ["1.25rem", "1.625rem"],
|
|
295
|
+
"display1": ["3.75rem", {
|
|
296
|
+
fontWeight: 700,
|
|
297
|
+
lineHeight: "5rem",
|
|
298
|
+
letterSpacing: "-0.0625rem"
|
|
299
|
+
}],
|
|
300
|
+
"display2": ["3.25rem", {
|
|
301
|
+
fontWeight: 700,
|
|
302
|
+
lineHeight: "4.25rem",
|
|
303
|
+
letterSpacing: "-0.05rem"
|
|
304
|
+
}],
|
|
305
|
+
"display3": ["2.75rem", {
|
|
306
|
+
fontWeight: 700,
|
|
307
|
+
lineHeight: "3.625rem",
|
|
308
|
+
letterSpacing: "-0.0375rem"
|
|
309
|
+
}],
|
|
310
|
+
"h1": ["3rem", {
|
|
311
|
+
fontWeight: 700,
|
|
312
|
+
lineHeight: "3.75rem",
|
|
313
|
+
letterSpacing: "-0.0125rem"
|
|
314
|
+
}],
|
|
315
|
+
"h2": ["2.5rem", {
|
|
316
|
+
fontWeight: 700,
|
|
317
|
+
lineHeight: "3.25rem",
|
|
318
|
+
letterSpacing: "-0.0125rem"
|
|
319
|
+
}],
|
|
320
|
+
"h3": ["2.25rem", {
|
|
321
|
+
fontWeight: 700,
|
|
322
|
+
lineHeight: "3rem",
|
|
323
|
+
letterSpacing: "-0.0125rem"
|
|
324
|
+
}],
|
|
325
|
+
"h4": ["2rem", {
|
|
326
|
+
fontWeight: 700,
|
|
327
|
+
lineHeight: "2.625rem",
|
|
328
|
+
letterSpacing: "-0.0125rem"
|
|
329
|
+
}],
|
|
330
|
+
"h5": ["1.5rem", {
|
|
331
|
+
fontWeight: 700,
|
|
332
|
+
lineHeight: "2rem",
|
|
333
|
+
letterSpacing: "-0.0125rem"
|
|
334
|
+
}],
|
|
335
|
+
"h6": ["1.25rem", {
|
|
336
|
+
fontWeight: 700,
|
|
337
|
+
lineHeight: "1.625rem",
|
|
338
|
+
letterSpacing: "-0.0125rem"
|
|
339
|
+
}]
|
|
340
|
+
};
|
|
341
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSize);
|
|
342
|
+
|
|
343
|
+
// src/theme/screen.ts
|
|
344
|
+
var screensNumber = {
|
|
345
|
+
"xs": 480,
|
|
346
|
+
"sm": 640,
|
|
347
|
+
"md": 768,
|
|
348
|
+
"lg": 1024,
|
|
349
|
+
"xl": 1280,
|
|
350
|
+
"2xl": 1536,
|
|
351
|
+
"tablet": 640,
|
|
352
|
+
"tablet-lg": 960,
|
|
353
|
+
"laptop": 1024,
|
|
354
|
+
"desktop": 1280
|
|
355
|
+
};
|
|
356
|
+
var screens = {
|
|
357
|
+
"xs": `${screensNumber.xs}px`,
|
|
358
|
+
"sm": `${screensNumber.sm}px`,
|
|
359
|
+
"md": `${screensNumber.md}px`,
|
|
360
|
+
"lg": `${screensNumber.lg}px`,
|
|
361
|
+
"xl": `${screensNumber.xl}px`,
|
|
362
|
+
"2xl": `${screensNumber["2xl"]}px`,
|
|
363
|
+
"tablet": `${screensNumber.tablet}px`,
|
|
364
|
+
"tablet-lg": `${screensNumber["tablet-lg"]}px`,
|
|
365
|
+
"laptop": `${screensNumber.laptop}px`,
|
|
366
|
+
"desktop": `${screensNumber.desktop}px`
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// src/theme/shadows.ts
|
|
370
|
+
var boxShadow = {
|
|
371
|
+
"elevation-0": "0 0 0 0 rgba(0, 0, 0, 0.10)",
|
|
372
|
+
"elevation-1": "0 1px 2px 0 rgba(0, 0, 0, 0.10)",
|
|
373
|
+
"elevation-2": "0 4px 8px 0 rgba(0, 0, 0, 0.10)",
|
|
374
|
+
"elevation-3": "0 6px 12px 0 rgba(0, 0, 0, 0.10)",
|
|
375
|
+
"elevation-4": "0 8px 16px 0 rgba(0, 0, 0, 0.10)",
|
|
376
|
+
"elevation-5": "0 12px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
// src/theme/index.ts
|
|
380
|
+
function buildTheme(object, option = {}) {
|
|
381
|
+
const {
|
|
382
|
+
enabled = true,
|
|
383
|
+
prefix = ""
|
|
384
|
+
} = option;
|
|
385
|
+
if (!enabled) {
|
|
386
|
+
return null;
|
|
387
|
+
}
|
|
388
|
+
if (prefix) {
|
|
389
|
+
return Object.fromEntries(Object.entries(object).map(([k, v]) => [
|
|
390
|
+
`${prefix}${k}`,
|
|
391
|
+
v
|
|
392
|
+
]));
|
|
393
|
+
}
|
|
394
|
+
return object;
|
|
395
|
+
}
|
|
396
|
+
function factory(options = {}) {
|
|
397
|
+
const theme = {};
|
|
398
|
+
if (options.colors?.enabled !== false) {
|
|
399
|
+
const _colors = buildTheme(colors, options.colors);
|
|
400
|
+
if (_colors != null) {
|
|
401
|
+
theme.colors = _colors;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
if (options.boxShadow?.enabled !== false) {
|
|
405
|
+
const _boxShadow = buildTheme(boxShadow, options.boxShadow);
|
|
406
|
+
if (_boxShadow != null) {
|
|
407
|
+
theme.boxShadow = _boxShadow;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
if (options.fontSize?.enabled !== false) {
|
|
411
|
+
const _fontSize = buildTheme(fontSize, options.fontSize);
|
|
412
|
+
if (_fontSize != null) {
|
|
413
|
+
theme.fontSize = _fontSize;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
if (options.fontFamily?.enabled !== false) {
|
|
417
|
+
const _fontFamily = buildTheme(customFontFamily, options.fontFamily);
|
|
418
|
+
if (_fontFamily != null) {
|
|
419
|
+
theme.fontFamily = _fontFamily;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (options.animation?.enabled !== false) {
|
|
423
|
+
const _animation = buildTheme(animation2, options.animation);
|
|
424
|
+
if (_animation != null) {
|
|
425
|
+
theme.animation = _animation;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (options.keyframes?.enabled !== false) {
|
|
429
|
+
const _keyframes = buildTheme(keyframes, options.keyframes);
|
|
430
|
+
if (_keyframes != null) {
|
|
431
|
+
theme.keyframes = _keyframes;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
if (options.screens?.enabled !== false) {
|
|
435
|
+
const _screens = buildTheme(screens, options.screens);
|
|
436
|
+
if (_screens != null) {
|
|
437
|
+
theme.screens = _screens;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return theme;
|
|
441
|
+
}
|
|
442
|
+
var defaultTheme = {
|
|
5
443
|
colors,
|
|
6
|
-
|
|
7
|
-
defaultTheme,
|
|
8
|
-
factory,
|
|
444
|
+
boxShadow,
|
|
9
445
|
fontSize,
|
|
10
|
-
|
|
446
|
+
fontFamily: customFontFamily,
|
|
447
|
+
animation: animation2,
|
|
11
448
|
keyframes,
|
|
12
|
-
screens
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var plugins = [animation2];
|
|
449
|
+
screens
|
|
450
|
+
};
|
|
451
|
+
var unocssTheme = {
|
|
452
|
+
colors,
|
|
453
|
+
boxShadow,
|
|
454
|
+
fontSize: unocssFontSizes
|
|
455
|
+
};
|
|
20
456
|
|
|
21
457
|
// src/constant/index.ts
|
|
22
458
|
var colorsNames = [
|
|
@@ -75,7 +511,7 @@ function buildPreset(extend = true, buildOptions = {}) {
|
|
|
75
511
|
};
|
|
76
512
|
}
|
|
77
513
|
export {
|
|
78
|
-
animation,
|
|
514
|
+
animation2 as animation,
|
|
79
515
|
boxShadow,
|
|
80
516
|
buildPreset,
|
|
81
517
|
buildTheme,
|