@react-email/tailwind 1.0.1 → 1.0.2
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.d.ts +19 -2
- package/dist/tailwindcss/config.d.ts +376 -0
- package/dist/tailwindcss/generated/.gitkeep +0 -0
- package/dist/tailwindcss/generated/colors.d.ts +298 -0
- package/dist/tailwindcss/generated/corePluginList.d.ts +1 -0
- package/dist/tailwindcss/generated/default-theme.d.ts +397 -0
- package/dist/tailwindcss/index.d.ts +11 -0
- package/package.json +8 -8
- package/dist/hooks/use-suspensed-promise.d.ts +0 -2
- package/dist/hooks/use-suspensed-promise.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tailwind.d.ts +0 -14
- package/dist/tailwind.d.ts.map +0 -1
- package/dist/tailwind.spec.d.ts +0 -2
- package/dist/tailwind.spec.d.ts.map +0 -1
- package/dist/utils/compatibility/convert-css-property-to-react-property.d.ts +0 -2
- package/dist/utils/compatibility/convert-css-property-to-react-property.d.ts.map +0 -1
- package/dist/utils/compatibility/escape-class-name.d.ts +0 -9
- package/dist/utils/compatibility/escape-class-name.d.ts.map +0 -1
- package/dist/utils/compatibility/escape-class-name.spec.d.ts +0 -2
- package/dist/utils/compatibility/escape-class-name.spec.d.ts.map +0 -1
- package/dist/utils/compatibility/sanitize-class-name.d.ts +0 -8
- package/dist/utils/compatibility/sanitize-class-name.d.ts.map +0 -1
- package/dist/utils/compatibility/sanitize-class-name.spec.d.ts +0 -2
- package/dist/utils/compatibility/sanitize-class-name.spec.d.ts.map +0 -1
- package/dist/utils/compatibility/unescape-class.d.ts +0 -2
- package/dist/utils/compatibility/unescape-class.d.ts.map +0 -1
- package/dist/utils/css/make-inline-styles-for.d.ts +0 -6
- package/dist/utils/css/make-inline-styles-for.d.ts.map +0 -1
- package/dist/utils/css/make-inline-styles-for.spec.d.ts +0 -2
- package/dist/utils/css/make-inline-styles-for.spec.d.ts.map +0 -1
- package/dist/utils/css/media-queries/sanitize-media-queries.d.ts +0 -17
- package/dist/utils/css/media-queries/sanitize-media-queries.d.ts.map +0 -1
- package/dist/utils/css/media-queries/sanitize-media-queries.spec.d.ts +0 -2
- package/dist/utils/css/media-queries/sanitize-media-queries.spec.d.ts.map +0 -1
- package/dist/utils/css/minify-css.d.ts +0 -2
- package/dist/utils/css/minify-css.d.ts.map +0 -1
- package/dist/utils/css/remove-if-empty-recursively.d.ts +0 -3
- package/dist/utils/css/remove-if-empty-recursively.d.ts.map +0 -1
- package/dist/utils/css/remove-rule-duplicates-from-root.d.ts +0 -3
- package/dist/utils/css/remove-rule-duplicates-from-root.d.ts.map +0 -1
- package/dist/utils/css/resolve-all-css-variables.d.ts +0 -3
- package/dist/utils/css/resolve-all-css-variables.d.ts.map +0 -1
- package/dist/utils/css/resolve-all-css-variables.spec.d.ts +0 -2
- package/dist/utils/css/resolve-all-css-variables.spec.d.ts.map +0 -1
- package/dist/utils/css/sanitize-declarations.d.ts +0 -10
- package/dist/utils/css/sanitize-declarations.d.ts.map +0 -1
- package/dist/utils/react/is-component.d.ts +0 -2
- package/dist/utils/react/is-component.d.ts.map +0 -1
- package/dist/utils/react/map-react-tree.d.ts +0 -15
- package/dist/utils/react/map-react-tree.d.ts.map +0 -1
- package/dist/utils/react/map-react-tree.spec.d.ts +0 -2
- package/dist/utils/react/map-react-tree.spec.d.ts.map +0 -1
- package/dist/utils/tailwindcss/clone-element-with-inlined-styles.d.ts +0 -10
- package/dist/utils/tailwindcss/clone-element-with-inlined-styles.d.ts.map +0 -1
- package/dist/utils/tailwindcss/setup-tailwind-context.d.ts +0 -4
- package/dist/utils/tailwindcss/setup-tailwind-context.d.ts.map +0 -1
- package/dist/utils/tailwindcss/setup-tailwind.d.ts +0 -5
- package/dist/utils/tailwindcss/setup-tailwind.d.ts.map +0 -1
- package/dist/utils/tailwindcss/setup-tailwind.spec.d.ts +0 -2
- package/dist/utils/tailwindcss/setup-tailwind.spec.d.ts.map +0 -1
- package/dist/utils/text/from-dash-case-to-camel-case.d.ts +0 -2
- package/dist/utils/text/from-dash-case-to-camel-case.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Config } from '../dist/tailwindcss';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
export declare interface EmailElementProps {
|
|
5
|
+
children?: React_2.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React_2.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare const Tailwind: React_2.FC<TailwindProps>;
|
|
11
|
+
|
|
12
|
+
export declare type TailwindConfig = Pick<Config, "important" | "prefix" | "separator" | "safelist" | "blocklist" | "presets" | "future" | "experimental" | "darkMode" | "theme" | "corePlugins" | "plugins">;
|
|
13
|
+
|
|
14
|
+
export declare interface TailwindProps {
|
|
15
|
+
children: React_2.ReactNode;
|
|
16
|
+
config?: TailwindConfig;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { }
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import type { CorePluginList } from './generated/corePluginList'
|
|
2
|
+
import type { DefaultColors } from './generated/colors'
|
|
3
|
+
|
|
4
|
+
// Helpers
|
|
5
|
+
type Expand<T> = T extends object
|
|
6
|
+
? T extends infer O
|
|
7
|
+
? { [K in keyof O]: Expand<O[K]> }
|
|
8
|
+
: never
|
|
9
|
+
: T
|
|
10
|
+
type KeyValuePair<K extends keyof any = string, V = string> = Record<K, V>
|
|
11
|
+
interface RecursiveKeyValuePair<K extends keyof any = string, V = string> {
|
|
12
|
+
[key: string]: V | RecursiveKeyValuePair<K, V>
|
|
13
|
+
}
|
|
14
|
+
export type ResolvableTo<T> = T | ((utils: PluginUtils) => T)
|
|
15
|
+
type CSSRuleObject = RecursiveKeyValuePair<string, null | string | string[]>
|
|
16
|
+
|
|
17
|
+
interface PluginUtils {
|
|
18
|
+
colors: DefaultColors
|
|
19
|
+
theme(path: string, defaultValue?: unknown): any
|
|
20
|
+
breakpoints<I = Record<string, unknown>, O = I>(arg: I): O
|
|
21
|
+
rgb(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
|
|
22
|
+
hsl(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Content related config
|
|
26
|
+
type FilePath = string
|
|
27
|
+
type RawFile = { raw: string; extension?: string }
|
|
28
|
+
type ExtractorFn = (content: string) => string[]
|
|
29
|
+
type TransformerFn = (content: string) => string
|
|
30
|
+
type ContentConfig =
|
|
31
|
+
| (FilePath | RawFile)[]
|
|
32
|
+
| {
|
|
33
|
+
files: (FilePath | RawFile)[]
|
|
34
|
+
relative?: boolean
|
|
35
|
+
extract?: ExtractorFn | { [extension: string]: ExtractorFn }
|
|
36
|
+
transform?: TransformerFn | { [extension: string]: TransformerFn }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Important related config
|
|
40
|
+
type ImportantConfig = boolean | string
|
|
41
|
+
|
|
42
|
+
// Prefix related config
|
|
43
|
+
type PrefixConfig = string
|
|
44
|
+
|
|
45
|
+
// Separator related config
|
|
46
|
+
type SeparatorConfig = string
|
|
47
|
+
|
|
48
|
+
// Safelist related config
|
|
49
|
+
type SafelistConfig = string | { pattern: RegExp; variants?: string[] }
|
|
50
|
+
|
|
51
|
+
// Blocklist related config
|
|
52
|
+
type BlocklistConfig = string
|
|
53
|
+
|
|
54
|
+
// Presets related config
|
|
55
|
+
type PresetsConfig = Partial<Config>
|
|
56
|
+
|
|
57
|
+
// Future related config
|
|
58
|
+
type FutureConfigValues =
|
|
59
|
+
| 'hoverOnlyWhenSupported'
|
|
60
|
+
| 'respectDefaultRingColorOpacity'
|
|
61
|
+
| 'disableColorOpacityUtilitiesByDefault'
|
|
62
|
+
| 'relativeContentPathsByDefault'
|
|
63
|
+
type FutureConfig = Expand<'all' | Partial<Record<FutureConfigValues, boolean>>> | []
|
|
64
|
+
|
|
65
|
+
// Experimental related config
|
|
66
|
+
type ExperimentalConfigValues = 'optimizeUniversalDefaults' | 'matchVariant'
|
|
67
|
+
type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues, boolean>>> | []
|
|
68
|
+
|
|
69
|
+
// DarkMode related config
|
|
70
|
+
type DarkModeConfig =
|
|
71
|
+
// Use the `media` query strategy.
|
|
72
|
+
| 'media'
|
|
73
|
+
// Use the `class` strategy, which requires a `.dark` class on the `html`.
|
|
74
|
+
| 'class'
|
|
75
|
+
// Use the `class` strategy with a custom class instead of `.dark`.
|
|
76
|
+
| ['class', string]
|
|
77
|
+
// Use the `selector` strategy — same as `class` but uses `:where()` for more predicable behavior
|
|
78
|
+
| 'selector'
|
|
79
|
+
// Use the `selector` strategy with a custom selector instead of `.dark`.
|
|
80
|
+
| ['selector', string]
|
|
81
|
+
// Use the `variant` strategy, which allows you to completely customize the selector
|
|
82
|
+
// It takes a string or an array of strings, which are passed directly to `addVariant()`
|
|
83
|
+
| ['variant', string | string[]]
|
|
84
|
+
|
|
85
|
+
type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
|
|
86
|
+
type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>
|
|
87
|
+
|
|
88
|
+
// Theme related config
|
|
89
|
+
export interface ThemeConfig {
|
|
90
|
+
// Responsiveness
|
|
91
|
+
screens: ResolvableTo<ScreensConfig>
|
|
92
|
+
supports: ResolvableTo<Record<string, string>>
|
|
93
|
+
data: ResolvableTo<Record<string, string>>
|
|
94
|
+
|
|
95
|
+
// Reusable base configs
|
|
96
|
+
colors: ResolvableTo<RecursiveKeyValuePair>
|
|
97
|
+
spacing: ResolvableTo<KeyValuePair>
|
|
98
|
+
|
|
99
|
+
// Components
|
|
100
|
+
container: ResolvableTo<
|
|
101
|
+
Partial<{
|
|
102
|
+
screens: ScreensConfig
|
|
103
|
+
center: boolean
|
|
104
|
+
padding: string | Record<string, string>
|
|
105
|
+
}>
|
|
106
|
+
>
|
|
107
|
+
|
|
108
|
+
// Utilities
|
|
109
|
+
inset: ThemeConfig['spacing']
|
|
110
|
+
zIndex: ResolvableTo<KeyValuePair>
|
|
111
|
+
order: ResolvableTo<KeyValuePair>
|
|
112
|
+
gridColumn: ResolvableTo<KeyValuePair>
|
|
113
|
+
gridColumnStart: ResolvableTo<KeyValuePair>
|
|
114
|
+
gridColumnEnd: ResolvableTo<KeyValuePair>
|
|
115
|
+
gridRow: ResolvableTo<KeyValuePair>
|
|
116
|
+
gridRowStart: ResolvableTo<KeyValuePair>
|
|
117
|
+
gridRowEnd: ResolvableTo<KeyValuePair>
|
|
118
|
+
margin: ThemeConfig['spacing']
|
|
119
|
+
aspectRatio: ResolvableTo<KeyValuePair>
|
|
120
|
+
height: ThemeConfig['spacing']
|
|
121
|
+
maxHeight: ThemeConfig['spacing']
|
|
122
|
+
minHeight: ResolvableTo<KeyValuePair>
|
|
123
|
+
width: ThemeConfig['spacing']
|
|
124
|
+
maxWidth: ResolvableTo<KeyValuePair>
|
|
125
|
+
minWidth: ResolvableTo<KeyValuePair>
|
|
126
|
+
flex: ResolvableTo<KeyValuePair>
|
|
127
|
+
flexShrink: ResolvableTo<KeyValuePair>
|
|
128
|
+
flexGrow: ResolvableTo<KeyValuePair>
|
|
129
|
+
flexBasis: ThemeConfig['spacing']
|
|
130
|
+
borderSpacing: ThemeConfig['spacing']
|
|
131
|
+
transformOrigin: ResolvableTo<KeyValuePair>
|
|
132
|
+
translate: ThemeConfig['spacing']
|
|
133
|
+
rotate: ResolvableTo<KeyValuePair>
|
|
134
|
+
skew: ResolvableTo<KeyValuePair>
|
|
135
|
+
scale: ResolvableTo<KeyValuePair>
|
|
136
|
+
animation: ResolvableTo<KeyValuePair>
|
|
137
|
+
keyframes: ResolvableTo<KeyValuePair<string, KeyValuePair<string, KeyValuePair>>>
|
|
138
|
+
cursor: ResolvableTo<KeyValuePair>
|
|
139
|
+
scrollMargin: ThemeConfig['spacing']
|
|
140
|
+
scrollPadding: ThemeConfig['spacing']
|
|
141
|
+
listStyleType: ResolvableTo<KeyValuePair>
|
|
142
|
+
columns: ResolvableTo<KeyValuePair>
|
|
143
|
+
gridAutoColumns: ResolvableTo<KeyValuePair>
|
|
144
|
+
gridAutoRows: ResolvableTo<KeyValuePair>
|
|
145
|
+
gridTemplateColumns: ResolvableTo<KeyValuePair>
|
|
146
|
+
gridTemplateRows: ResolvableTo<KeyValuePair>
|
|
147
|
+
gap: ThemeConfig['spacing']
|
|
148
|
+
space: ThemeConfig['spacing']
|
|
149
|
+
divideWidth: ThemeConfig['borderWidth']
|
|
150
|
+
divideColor: ThemeConfig['borderColor']
|
|
151
|
+
divideOpacity: ThemeConfig['borderOpacity']
|
|
152
|
+
borderRadius: ResolvableTo<KeyValuePair>
|
|
153
|
+
borderWidth: ResolvableTo<KeyValuePair>
|
|
154
|
+
borderColor: ThemeConfig['colors']
|
|
155
|
+
borderOpacity: ThemeConfig['opacity']
|
|
156
|
+
backgroundColor: ThemeConfig['colors']
|
|
157
|
+
backgroundOpacity: ThemeConfig['opacity']
|
|
158
|
+
backgroundImage: ResolvableTo<KeyValuePair>
|
|
159
|
+
gradientColorStops: ThemeConfig['colors']
|
|
160
|
+
backgroundSize: ResolvableTo<KeyValuePair>
|
|
161
|
+
backgroundPosition: ResolvableTo<KeyValuePair>
|
|
162
|
+
fill: ThemeConfig['colors']
|
|
163
|
+
stroke: ThemeConfig['colors']
|
|
164
|
+
strokeWidth: ResolvableTo<KeyValuePair>
|
|
165
|
+
objectPosition: ResolvableTo<KeyValuePair>
|
|
166
|
+
padding: ThemeConfig['spacing']
|
|
167
|
+
textIndent: ThemeConfig['spacing']
|
|
168
|
+
fontFamily: ResolvableTo<
|
|
169
|
+
KeyValuePair<
|
|
170
|
+
string,
|
|
171
|
+
| string
|
|
172
|
+
| string[]
|
|
173
|
+
| [
|
|
174
|
+
fontFamily: string | string[],
|
|
175
|
+
configuration: Partial<{
|
|
176
|
+
fontFeatureSettings: string
|
|
177
|
+
fontVariationSettings: string
|
|
178
|
+
}>
|
|
179
|
+
]
|
|
180
|
+
>
|
|
181
|
+
>
|
|
182
|
+
fontSize: ResolvableTo<
|
|
183
|
+
KeyValuePair<
|
|
184
|
+
string,
|
|
185
|
+
| string
|
|
186
|
+
| [fontSize: string, lineHeight: string]
|
|
187
|
+
| [
|
|
188
|
+
fontSize: string,
|
|
189
|
+
configuration: Partial<{
|
|
190
|
+
lineHeight: string
|
|
191
|
+
letterSpacing: string
|
|
192
|
+
fontWeight: string | number
|
|
193
|
+
}>
|
|
194
|
+
]
|
|
195
|
+
>
|
|
196
|
+
>
|
|
197
|
+
fontWeight: ResolvableTo<KeyValuePair>
|
|
198
|
+
lineHeight: ResolvableTo<KeyValuePair>
|
|
199
|
+
letterSpacing: ResolvableTo<KeyValuePair>
|
|
200
|
+
textColor: ThemeConfig['colors']
|
|
201
|
+
textOpacity: ThemeConfig['opacity']
|
|
202
|
+
textDecorationColor: ThemeConfig['colors']
|
|
203
|
+
textDecorationThickness: ResolvableTo<KeyValuePair>
|
|
204
|
+
textUnderlineOffset: ResolvableTo<KeyValuePair>
|
|
205
|
+
placeholderColor: ThemeConfig['colors']
|
|
206
|
+
placeholderOpacity: ThemeConfig['opacity']
|
|
207
|
+
caretColor: ThemeConfig['colors']
|
|
208
|
+
accentColor: ThemeConfig['colors']
|
|
209
|
+
opacity: ResolvableTo<KeyValuePair>
|
|
210
|
+
boxShadow: ResolvableTo<KeyValuePair>
|
|
211
|
+
boxShadowColor: ThemeConfig['colors']
|
|
212
|
+
outlineWidth: ResolvableTo<KeyValuePair>
|
|
213
|
+
outlineOffset: ResolvableTo<KeyValuePair>
|
|
214
|
+
outlineColor: ThemeConfig['colors']
|
|
215
|
+
ringWidth: ResolvableTo<KeyValuePair>
|
|
216
|
+
ringColor: ThemeConfig['colors']
|
|
217
|
+
ringOpacity: ThemeConfig['opacity']
|
|
218
|
+
ringOffsetWidth: ResolvableTo<KeyValuePair>
|
|
219
|
+
ringOffsetColor: ThemeConfig['colors']
|
|
220
|
+
blur: ResolvableTo<KeyValuePair>
|
|
221
|
+
brightness: ResolvableTo<KeyValuePair>
|
|
222
|
+
contrast: ResolvableTo<KeyValuePair>
|
|
223
|
+
dropShadow: ResolvableTo<KeyValuePair<string, string | string[]>>
|
|
224
|
+
grayscale: ResolvableTo<KeyValuePair>
|
|
225
|
+
hueRotate: ResolvableTo<KeyValuePair>
|
|
226
|
+
invert: ResolvableTo<KeyValuePair>
|
|
227
|
+
saturate: ResolvableTo<KeyValuePair>
|
|
228
|
+
sepia: ResolvableTo<KeyValuePair>
|
|
229
|
+
backdropBlur: ThemeConfig['blur']
|
|
230
|
+
backdropBrightness: ThemeConfig['brightness']
|
|
231
|
+
backdropContrast: ThemeConfig['contrast']
|
|
232
|
+
backdropGrayscale: ThemeConfig['grayscale']
|
|
233
|
+
backdropHueRotate: ThemeConfig['hueRotate']
|
|
234
|
+
backdropInvert: ThemeConfig['invert']
|
|
235
|
+
backdropOpacity: ThemeConfig['opacity']
|
|
236
|
+
backdropSaturate: ThemeConfig['saturate']
|
|
237
|
+
backdropSepia: ThemeConfig['sepia']
|
|
238
|
+
transitionProperty: ResolvableTo<KeyValuePair>
|
|
239
|
+
transitionTimingFunction: ResolvableTo<KeyValuePair>
|
|
240
|
+
transitionDelay: ResolvableTo<KeyValuePair>
|
|
241
|
+
transitionDuration: ResolvableTo<KeyValuePair>
|
|
242
|
+
willChange: ResolvableTo<KeyValuePair>
|
|
243
|
+
content: ResolvableTo<KeyValuePair>
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
interface CustomThemeConfig extends ThemeConfig {
|
|
247
|
+
[key: string]: any
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Core plugins related config
|
|
251
|
+
type CorePluginsConfig = CorePluginList[] | Expand<Partial<Record<CorePluginList, boolean>>>
|
|
252
|
+
|
|
253
|
+
// Plugins related config
|
|
254
|
+
type ValueType =
|
|
255
|
+
| 'any'
|
|
256
|
+
| 'color'
|
|
257
|
+
| 'url'
|
|
258
|
+
| 'image'
|
|
259
|
+
| 'length'
|
|
260
|
+
| 'percentage'
|
|
261
|
+
| 'position'
|
|
262
|
+
| 'lookup'
|
|
263
|
+
| 'generic-name'
|
|
264
|
+
| 'family-name'
|
|
265
|
+
| 'number'
|
|
266
|
+
| 'line-width'
|
|
267
|
+
| 'absolute-size'
|
|
268
|
+
| 'relative-size'
|
|
269
|
+
| 'shadow'
|
|
270
|
+
export interface PluginAPI {
|
|
271
|
+
// for registering new static utility styles
|
|
272
|
+
addUtilities(
|
|
273
|
+
utilities: CSSRuleObject | CSSRuleObject[],
|
|
274
|
+
options?: Partial<{
|
|
275
|
+
respectPrefix: boolean
|
|
276
|
+
respectImportant: boolean
|
|
277
|
+
}>
|
|
278
|
+
): void
|
|
279
|
+
// for registering new dynamic utility styles
|
|
280
|
+
matchUtilities<T = string, U = string>(
|
|
281
|
+
utilities: KeyValuePair<
|
|
282
|
+
string,
|
|
283
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
284
|
+
>,
|
|
285
|
+
options?: Partial<{
|
|
286
|
+
respectPrefix: boolean
|
|
287
|
+
respectImportant: boolean
|
|
288
|
+
type: ValueType | ValueType[]
|
|
289
|
+
values: KeyValuePair<string, T>
|
|
290
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
291
|
+
supportsNegativeValues: boolean
|
|
292
|
+
}>
|
|
293
|
+
): void
|
|
294
|
+
// for registering new static component styles
|
|
295
|
+
addComponents(
|
|
296
|
+
components: CSSRuleObject | CSSRuleObject[],
|
|
297
|
+
options?: Partial<{
|
|
298
|
+
respectPrefix: boolean
|
|
299
|
+
respectImportant: boolean
|
|
300
|
+
}>
|
|
301
|
+
): void
|
|
302
|
+
// for registering new dynamic component styles
|
|
303
|
+
matchComponents<T = string, U = string>(
|
|
304
|
+
components: KeyValuePair<
|
|
305
|
+
string,
|
|
306
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
307
|
+
>,
|
|
308
|
+
options?: Partial<{
|
|
309
|
+
respectPrefix: boolean
|
|
310
|
+
respectImportant: boolean
|
|
311
|
+
type: ValueType | ValueType[]
|
|
312
|
+
values: KeyValuePair<string, T>
|
|
313
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
314
|
+
supportsNegativeValues: boolean
|
|
315
|
+
}>
|
|
316
|
+
): void
|
|
317
|
+
// for registering new base styles
|
|
318
|
+
addBase(base: CSSRuleObject | CSSRuleObject[]): void
|
|
319
|
+
// for registering custom variants
|
|
320
|
+
addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
|
|
321
|
+
matchVariant<T = string>(
|
|
322
|
+
name: string,
|
|
323
|
+
cb: (value: T | string, extra: { modifier: string | null }) => string | string[],
|
|
324
|
+
options?: {
|
|
325
|
+
values?: KeyValuePair<string, T>
|
|
326
|
+
sort?(
|
|
327
|
+
a: { value: T | string; modifier: string | null },
|
|
328
|
+
b: { value: T | string; modifier: string | null }
|
|
329
|
+
): number
|
|
330
|
+
}
|
|
331
|
+
): void
|
|
332
|
+
// for looking up values in the user’s theme configuration
|
|
333
|
+
theme: <TDefaultValue = Config['theme']>(
|
|
334
|
+
path?: string,
|
|
335
|
+
defaultValue?: TDefaultValue
|
|
336
|
+
) => TDefaultValue
|
|
337
|
+
// for looking up values in the user’s Tailwind configuration
|
|
338
|
+
config: <TDefaultValue = Config>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue
|
|
339
|
+
// for checking if a core plugin is enabled
|
|
340
|
+
corePlugins(path: string): boolean
|
|
341
|
+
// for manually escaping strings meant to be used in class names
|
|
342
|
+
e: (className: string) => string
|
|
343
|
+
}
|
|
344
|
+
export type PluginCreator = (api: PluginAPI) => void
|
|
345
|
+
export type PluginsConfig = (
|
|
346
|
+
| PluginCreator
|
|
347
|
+
| { handler: PluginCreator; config?: Partial<Config> }
|
|
348
|
+
| {
|
|
349
|
+
(options: any): { handler: PluginCreator; config?: Partial<Config> }
|
|
350
|
+
__isOptionsFunction: true
|
|
351
|
+
}
|
|
352
|
+
)[]
|
|
353
|
+
|
|
354
|
+
// Top level config related
|
|
355
|
+
interface RequiredConfig {
|
|
356
|
+
content: ContentConfig
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
interface OptionalConfig {
|
|
360
|
+
important: Partial<ImportantConfig>
|
|
361
|
+
prefix: Partial<PrefixConfig>
|
|
362
|
+
separator: Partial<SeparatorConfig>
|
|
363
|
+
safelist: Array<SafelistConfig>
|
|
364
|
+
blocklist: Array<BlocklistConfig>
|
|
365
|
+
presets: Array<PresetsConfig>
|
|
366
|
+
future: Partial<FutureConfig>
|
|
367
|
+
experimental: Partial<ExperimentalConfig>
|
|
368
|
+
darkMode: Partial<DarkModeConfig>
|
|
369
|
+
theme: Partial<CustomThemeConfig & { extend: Partial<CustomThemeConfig> }>
|
|
370
|
+
corePlugins: Partial<CorePluginsConfig>
|
|
371
|
+
plugins: Partial<PluginsConfig>
|
|
372
|
+
// Custom
|
|
373
|
+
[key: string]: any
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export type Config = RequiredConfig & Partial<OptionalConfig>
|
|
File without changes
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
export interface DefaultColors {
|
|
2
|
+
inherit: 'inherit'
|
|
3
|
+
current: 'currentColor'
|
|
4
|
+
transparent: 'transparent'
|
|
5
|
+
black: '#000'
|
|
6
|
+
white: '#fff'
|
|
7
|
+
slate: {
|
|
8
|
+
'50': '#f8fafc'
|
|
9
|
+
'100': '#f1f5f9'
|
|
10
|
+
'200': '#e2e8f0'
|
|
11
|
+
'300': '#cbd5e1'
|
|
12
|
+
'400': '#94a3b8'
|
|
13
|
+
'500': '#64748b'
|
|
14
|
+
'600': '#475569'
|
|
15
|
+
'700': '#334155'
|
|
16
|
+
'800': '#1e293b'
|
|
17
|
+
'900': '#0f172a'
|
|
18
|
+
'950': '#020617'
|
|
19
|
+
}
|
|
20
|
+
gray: {
|
|
21
|
+
'50': '#f9fafb'
|
|
22
|
+
'100': '#f3f4f6'
|
|
23
|
+
'200': '#e5e7eb'
|
|
24
|
+
'300': '#d1d5db'
|
|
25
|
+
'400': '#9ca3af'
|
|
26
|
+
'500': '#6b7280'
|
|
27
|
+
'600': '#4b5563'
|
|
28
|
+
'700': '#374151'
|
|
29
|
+
'800': '#1f2937'
|
|
30
|
+
'900': '#111827'
|
|
31
|
+
'950': '#030712'
|
|
32
|
+
}
|
|
33
|
+
zinc: {
|
|
34
|
+
'50': '#fafafa'
|
|
35
|
+
'100': '#f4f4f5'
|
|
36
|
+
'200': '#e4e4e7'
|
|
37
|
+
'300': '#d4d4d8'
|
|
38
|
+
'400': '#a1a1aa'
|
|
39
|
+
'500': '#71717a'
|
|
40
|
+
'600': '#52525b'
|
|
41
|
+
'700': '#3f3f46'
|
|
42
|
+
'800': '#27272a'
|
|
43
|
+
'900': '#18181b'
|
|
44
|
+
'950': '#09090b'
|
|
45
|
+
}
|
|
46
|
+
neutral: {
|
|
47
|
+
'50': '#fafafa'
|
|
48
|
+
'100': '#f5f5f5'
|
|
49
|
+
'200': '#e5e5e5'
|
|
50
|
+
'300': '#d4d4d4'
|
|
51
|
+
'400': '#a3a3a3'
|
|
52
|
+
'500': '#737373'
|
|
53
|
+
'600': '#525252'
|
|
54
|
+
'700': '#404040'
|
|
55
|
+
'800': '#262626'
|
|
56
|
+
'900': '#171717'
|
|
57
|
+
'950': '#0a0a0a'
|
|
58
|
+
}
|
|
59
|
+
stone: {
|
|
60
|
+
'50': '#fafaf9'
|
|
61
|
+
'100': '#f5f5f4'
|
|
62
|
+
'200': '#e7e5e4'
|
|
63
|
+
'300': '#d6d3d1'
|
|
64
|
+
'400': '#a8a29e'
|
|
65
|
+
'500': '#78716c'
|
|
66
|
+
'600': '#57534e'
|
|
67
|
+
'700': '#44403c'
|
|
68
|
+
'800': '#292524'
|
|
69
|
+
'900': '#1c1917'
|
|
70
|
+
'950': '#0c0a09'
|
|
71
|
+
}
|
|
72
|
+
red: {
|
|
73
|
+
'50': '#fef2f2'
|
|
74
|
+
'100': '#fee2e2'
|
|
75
|
+
'200': '#fecaca'
|
|
76
|
+
'300': '#fca5a5'
|
|
77
|
+
'400': '#f87171'
|
|
78
|
+
'500': '#ef4444'
|
|
79
|
+
'600': '#dc2626'
|
|
80
|
+
'700': '#b91c1c'
|
|
81
|
+
'800': '#991b1b'
|
|
82
|
+
'900': '#7f1d1d'
|
|
83
|
+
'950': '#450a0a'
|
|
84
|
+
}
|
|
85
|
+
orange: {
|
|
86
|
+
'50': '#fff7ed'
|
|
87
|
+
'100': '#ffedd5'
|
|
88
|
+
'200': '#fed7aa'
|
|
89
|
+
'300': '#fdba74'
|
|
90
|
+
'400': '#fb923c'
|
|
91
|
+
'500': '#f97316'
|
|
92
|
+
'600': '#ea580c'
|
|
93
|
+
'700': '#c2410c'
|
|
94
|
+
'800': '#9a3412'
|
|
95
|
+
'900': '#7c2d12'
|
|
96
|
+
'950': '#431407'
|
|
97
|
+
}
|
|
98
|
+
amber: {
|
|
99
|
+
'50': '#fffbeb'
|
|
100
|
+
'100': '#fef3c7'
|
|
101
|
+
'200': '#fde68a'
|
|
102
|
+
'300': '#fcd34d'
|
|
103
|
+
'400': '#fbbf24'
|
|
104
|
+
'500': '#f59e0b'
|
|
105
|
+
'600': '#d97706'
|
|
106
|
+
'700': '#b45309'
|
|
107
|
+
'800': '#92400e'
|
|
108
|
+
'900': '#78350f'
|
|
109
|
+
'950': '#451a03'
|
|
110
|
+
}
|
|
111
|
+
yellow: {
|
|
112
|
+
'50': '#fefce8'
|
|
113
|
+
'100': '#fef9c3'
|
|
114
|
+
'200': '#fef08a'
|
|
115
|
+
'300': '#fde047'
|
|
116
|
+
'400': '#facc15'
|
|
117
|
+
'500': '#eab308'
|
|
118
|
+
'600': '#ca8a04'
|
|
119
|
+
'700': '#a16207'
|
|
120
|
+
'800': '#854d0e'
|
|
121
|
+
'900': '#713f12'
|
|
122
|
+
'950': '#422006'
|
|
123
|
+
}
|
|
124
|
+
lime: {
|
|
125
|
+
'50': '#f7fee7'
|
|
126
|
+
'100': '#ecfccb'
|
|
127
|
+
'200': '#d9f99d'
|
|
128
|
+
'300': '#bef264'
|
|
129
|
+
'400': '#a3e635'
|
|
130
|
+
'500': '#84cc16'
|
|
131
|
+
'600': '#65a30d'
|
|
132
|
+
'700': '#4d7c0f'
|
|
133
|
+
'800': '#3f6212'
|
|
134
|
+
'900': '#365314'
|
|
135
|
+
'950': '#1a2e05'
|
|
136
|
+
}
|
|
137
|
+
green: {
|
|
138
|
+
'50': '#f0fdf4'
|
|
139
|
+
'100': '#dcfce7'
|
|
140
|
+
'200': '#bbf7d0'
|
|
141
|
+
'300': '#86efac'
|
|
142
|
+
'400': '#4ade80'
|
|
143
|
+
'500': '#22c55e'
|
|
144
|
+
'600': '#16a34a'
|
|
145
|
+
'700': '#15803d'
|
|
146
|
+
'800': '#166534'
|
|
147
|
+
'900': '#14532d'
|
|
148
|
+
'950': '#052e16'
|
|
149
|
+
}
|
|
150
|
+
emerald: {
|
|
151
|
+
'50': '#ecfdf5'
|
|
152
|
+
'100': '#d1fae5'
|
|
153
|
+
'200': '#a7f3d0'
|
|
154
|
+
'300': '#6ee7b7'
|
|
155
|
+
'400': '#34d399'
|
|
156
|
+
'500': '#10b981'
|
|
157
|
+
'600': '#059669'
|
|
158
|
+
'700': '#047857'
|
|
159
|
+
'800': '#065f46'
|
|
160
|
+
'900': '#064e3b'
|
|
161
|
+
'950': '#022c22'
|
|
162
|
+
}
|
|
163
|
+
teal: {
|
|
164
|
+
'50': '#f0fdfa'
|
|
165
|
+
'100': '#ccfbf1'
|
|
166
|
+
'200': '#99f6e4'
|
|
167
|
+
'300': '#5eead4'
|
|
168
|
+
'400': '#2dd4bf'
|
|
169
|
+
'500': '#14b8a6'
|
|
170
|
+
'600': '#0d9488'
|
|
171
|
+
'700': '#0f766e'
|
|
172
|
+
'800': '#115e59'
|
|
173
|
+
'900': '#134e4a'
|
|
174
|
+
'950': '#042f2e'
|
|
175
|
+
}
|
|
176
|
+
cyan: {
|
|
177
|
+
'50': '#ecfeff'
|
|
178
|
+
'100': '#cffafe'
|
|
179
|
+
'200': '#a5f3fc'
|
|
180
|
+
'300': '#67e8f9'
|
|
181
|
+
'400': '#22d3ee'
|
|
182
|
+
'500': '#06b6d4'
|
|
183
|
+
'600': '#0891b2'
|
|
184
|
+
'700': '#0e7490'
|
|
185
|
+
'800': '#155e75'
|
|
186
|
+
'900': '#164e63'
|
|
187
|
+
'950': '#083344'
|
|
188
|
+
}
|
|
189
|
+
sky: {
|
|
190
|
+
'50': '#f0f9ff'
|
|
191
|
+
'100': '#e0f2fe'
|
|
192
|
+
'200': '#bae6fd'
|
|
193
|
+
'300': '#7dd3fc'
|
|
194
|
+
'400': '#38bdf8'
|
|
195
|
+
'500': '#0ea5e9'
|
|
196
|
+
'600': '#0284c7'
|
|
197
|
+
'700': '#0369a1'
|
|
198
|
+
'800': '#075985'
|
|
199
|
+
'900': '#0c4a6e'
|
|
200
|
+
'950': '#082f49'
|
|
201
|
+
}
|
|
202
|
+
blue: {
|
|
203
|
+
'50': '#eff6ff'
|
|
204
|
+
'100': '#dbeafe'
|
|
205
|
+
'200': '#bfdbfe'
|
|
206
|
+
'300': '#93c5fd'
|
|
207
|
+
'400': '#60a5fa'
|
|
208
|
+
'500': '#3b82f6'
|
|
209
|
+
'600': '#2563eb'
|
|
210
|
+
'700': '#1d4ed8'
|
|
211
|
+
'800': '#1e40af'
|
|
212
|
+
'900': '#1e3a8a'
|
|
213
|
+
'950': '#172554'
|
|
214
|
+
}
|
|
215
|
+
indigo: {
|
|
216
|
+
'50': '#eef2ff'
|
|
217
|
+
'100': '#e0e7ff'
|
|
218
|
+
'200': '#c7d2fe'
|
|
219
|
+
'300': '#a5b4fc'
|
|
220
|
+
'400': '#818cf8'
|
|
221
|
+
'500': '#6366f1'
|
|
222
|
+
'600': '#4f46e5'
|
|
223
|
+
'700': '#4338ca'
|
|
224
|
+
'800': '#3730a3'
|
|
225
|
+
'900': '#312e81'
|
|
226
|
+
'950': '#1e1b4b'
|
|
227
|
+
}
|
|
228
|
+
violet: {
|
|
229
|
+
'50': '#f5f3ff'
|
|
230
|
+
'100': '#ede9fe'
|
|
231
|
+
'200': '#ddd6fe'
|
|
232
|
+
'300': '#c4b5fd'
|
|
233
|
+
'400': '#a78bfa'
|
|
234
|
+
'500': '#8b5cf6'
|
|
235
|
+
'600': '#7c3aed'
|
|
236
|
+
'700': '#6d28d9'
|
|
237
|
+
'800': '#5b21b6'
|
|
238
|
+
'900': '#4c1d95'
|
|
239
|
+
'950': '#2e1065'
|
|
240
|
+
}
|
|
241
|
+
purple: {
|
|
242
|
+
'50': '#faf5ff'
|
|
243
|
+
'100': '#f3e8ff'
|
|
244
|
+
'200': '#e9d5ff'
|
|
245
|
+
'300': '#d8b4fe'
|
|
246
|
+
'400': '#c084fc'
|
|
247
|
+
'500': '#a855f7'
|
|
248
|
+
'600': '#9333ea'
|
|
249
|
+
'700': '#7e22ce'
|
|
250
|
+
'800': '#6b21a8'
|
|
251
|
+
'900': '#581c87'
|
|
252
|
+
'950': '#3b0764'
|
|
253
|
+
}
|
|
254
|
+
fuchsia: {
|
|
255
|
+
'50': '#fdf4ff'
|
|
256
|
+
'100': '#fae8ff'
|
|
257
|
+
'200': '#f5d0fe'
|
|
258
|
+
'300': '#f0abfc'
|
|
259
|
+
'400': '#e879f9'
|
|
260
|
+
'500': '#d946ef'
|
|
261
|
+
'600': '#c026d3'
|
|
262
|
+
'700': '#a21caf'
|
|
263
|
+
'800': '#86198f'
|
|
264
|
+
'900': '#701a75'
|
|
265
|
+
'950': '#4a044e'
|
|
266
|
+
}
|
|
267
|
+
pink: {
|
|
268
|
+
'50': '#fdf2f8'
|
|
269
|
+
'100': '#fce7f3'
|
|
270
|
+
'200': '#fbcfe8'
|
|
271
|
+
'300': '#f9a8d4'
|
|
272
|
+
'400': '#f472b6'
|
|
273
|
+
'500': '#ec4899'
|
|
274
|
+
'600': '#db2777'
|
|
275
|
+
'700': '#be185d'
|
|
276
|
+
'800': '#9d174d'
|
|
277
|
+
'900': '#831843'
|
|
278
|
+
'950': '#500724'
|
|
279
|
+
}
|
|
280
|
+
rose: {
|
|
281
|
+
'50': '#fff1f2'
|
|
282
|
+
'100': '#ffe4e6'
|
|
283
|
+
'200': '#fecdd3'
|
|
284
|
+
'300': '#fda4af'
|
|
285
|
+
'400': '#fb7185'
|
|
286
|
+
'500': '#f43f5e'
|
|
287
|
+
'600': '#e11d48'
|
|
288
|
+
'700': '#be123c'
|
|
289
|
+
'800': '#9f1239'
|
|
290
|
+
'900': '#881337'
|
|
291
|
+
'950': '#4c0519'
|
|
292
|
+
}
|
|
293
|
+
/** @deprecated As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`. Update your configuration file to silence this warning. */ lightBlue: DefaultColors['sky']
|
|
294
|
+
/** @deprecated As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`. Update your configuration file to silence this warning. */ warmGray: DefaultColors['stone']
|
|
295
|
+
/** @deprecated As of Tailwind CSS v3.0, `trueGray` has been renamed to `neutral`. Update your configuration file to silence this warning. */ trueGray: DefaultColors['neutral']
|
|
296
|
+
/** @deprecated As of Tailwind CSS v3.0, `coolGray` has been renamed to `gray`. Update your configuration file to silence this warning. */ coolGray: DefaultColors['gray']
|
|
297
|
+
/** @deprecated As of Tailwind CSS v3.0, `blueGray` has been renamed to `slate`. Update your configuration file to silence this warning. */ blueGray: DefaultColors['slate']
|
|
298
|
+
}
|