@itamarshdev/reactwind 1.0.0 → 1.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 +44 -0
- package/dist/chunk-KAWYX6WW.js +341 -0
- package/dist/index.cjs +100 -4
- package/dist/index.js +1 -1
- package/dist/jsx-dev-runtime.cjs +100 -4
- package/dist/jsx-dev-runtime.d.cts +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -1
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.cjs +100 -4
- package/dist/jsx-runtime.d.cts +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/types-Bb5v_nmy.d.cts +245 -0
- package/dist/types-CBbQP9uE.d.ts +245 -0
- package/package.json +1 -1
package/dist/jsx-dev-runtime.js
CHANGED
package/dist/jsx-runtime.cjs
CHANGED
|
@@ -151,7 +151,71 @@ var VALUE_PROPS_MAP = {
|
|
|
151
151
|
rotate: "rotate",
|
|
152
152
|
translate: "translate",
|
|
153
153
|
skew: "skew",
|
|
154
|
-
origin: "origin"
|
|
154
|
+
origin: "origin",
|
|
155
|
+
// Layout & Position
|
|
156
|
+
top: "top",
|
|
157
|
+
right: "right",
|
|
158
|
+
bottom: "bottom",
|
|
159
|
+
left: "left",
|
|
160
|
+
inset: "inset",
|
|
161
|
+
"inset-x": "inset-x",
|
|
162
|
+
"inset-y": "inset-y",
|
|
163
|
+
aspect: "aspect",
|
|
164
|
+
columns: "columns",
|
|
165
|
+
float: "float",
|
|
166
|
+
clear: "clear",
|
|
167
|
+
// Flexbox & Grid
|
|
168
|
+
basis: "basis",
|
|
169
|
+
"gap-x": "gap-x",
|
|
170
|
+
"gap-y": "gap-y",
|
|
171
|
+
"auto-cols": "auto-cols",
|
|
172
|
+
"auto-rows": "auto-rows",
|
|
173
|
+
"grid-flow": "grid-flow",
|
|
174
|
+
"space-x": "space-x",
|
|
175
|
+
"space-y": "space-y",
|
|
176
|
+
"justify-items": "justify-items",
|
|
177
|
+
"justify-self": "justify-self",
|
|
178
|
+
// Sizing
|
|
179
|
+
size: "size",
|
|
180
|
+
// Borders
|
|
181
|
+
"border-t": "border-t",
|
|
182
|
+
"border-r": "border-r",
|
|
183
|
+
"border-b": "border-b",
|
|
184
|
+
"border-l": "border-l",
|
|
185
|
+
"border-x": "border-x",
|
|
186
|
+
"border-y": "border-y",
|
|
187
|
+
"rounded-t": "rounded-t",
|
|
188
|
+
"rounded-r": "rounded-r",
|
|
189
|
+
"rounded-b": "rounded-b",
|
|
190
|
+
"rounded-l": "rounded-l",
|
|
191
|
+
"rounded-tl": "rounded-tl",
|
|
192
|
+
"rounded-tr": "rounded-tr",
|
|
193
|
+
"rounded-bl": "rounded-bl",
|
|
194
|
+
"rounded-br": "rounded-br",
|
|
195
|
+
"border-style": "border",
|
|
196
|
+
// Typography
|
|
197
|
+
"text-align": "text",
|
|
198
|
+
align: "align",
|
|
199
|
+
"line-clamp": "line-clamp",
|
|
200
|
+
list: "list",
|
|
201
|
+
indent: "indent",
|
|
202
|
+
// Backgrounds & Gradients
|
|
203
|
+
"bg-gradient": "bg-gradient",
|
|
204
|
+
from: "from",
|
|
205
|
+
via: "via",
|
|
206
|
+
to: "to",
|
|
207
|
+
"bg-size": "bg",
|
|
208
|
+
"bg-position": "bg",
|
|
209
|
+
"bg-repeat": "bg",
|
|
210
|
+
// Interactivity
|
|
211
|
+
scroll: "scroll",
|
|
212
|
+
snap: "snap",
|
|
213
|
+
touch: "touch",
|
|
214
|
+
"will-change": "will-change",
|
|
215
|
+
caret: "caret",
|
|
216
|
+
accent: "accent",
|
|
217
|
+
// SVG
|
|
218
|
+
"stroke-width": "stroke"
|
|
155
219
|
};
|
|
156
220
|
var MODIFIERS = [
|
|
157
221
|
"hover",
|
|
@@ -196,12 +260,31 @@ var MODIFIERS = [
|
|
|
196
260
|
// Print
|
|
197
261
|
"print"
|
|
198
262
|
];
|
|
263
|
+
var BOOLEAN_VALUE_PROPS = ["shadow", "rounded", "border", "transition", "ring", "outline"];
|
|
199
264
|
var joinClassNames = (classNames) => {
|
|
200
265
|
if (!classNames || classNames.length === 0) {
|
|
201
266
|
return "";
|
|
202
267
|
}
|
|
203
268
|
return classNames.filter(Boolean).join(" ");
|
|
204
269
|
};
|
|
270
|
+
var processModifierObject = (modifier, obj, classes) => {
|
|
271
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
272
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
273
|
+
if (MODIFIERS.includes(key)) {
|
|
274
|
+
processModifierObject(`${modifier}:${key}`, value, classes);
|
|
275
|
+
}
|
|
276
|
+
} else if (key in VALUE_PROPS_MAP) {
|
|
277
|
+
const prefix = VALUE_PROPS_MAP[key];
|
|
278
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
279
|
+
classes.push(`${modifier}:${prefix}-${value}`);
|
|
280
|
+
} else if (value === true && BOOLEAN_VALUE_PROPS.includes(key)) {
|
|
281
|
+
classes.push(`${modifier}:${key}`);
|
|
282
|
+
}
|
|
283
|
+
} else if (LAYOUT_PROPS.includes(key) && value === true) {
|
|
284
|
+
classes.push(`${modifier}:${key}`);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
205
288
|
var withClassNames = (props) => {
|
|
206
289
|
if (!props) {
|
|
207
290
|
return props;
|
|
@@ -210,9 +293,13 @@ var withClassNames = (props) => {
|
|
|
210
293
|
const hasLayoutProps = LAYOUT_PROPS.some((k) => k in props);
|
|
211
294
|
const hasValueProps = Object.keys(VALUE_PROPS_MAP).some((k) => k in props);
|
|
212
295
|
const propsKeys = Object.keys(props);
|
|
213
|
-
const
|
|
296
|
+
const hasHyphenatedModifiers = propsKeys.some((key) => {
|
|
214
297
|
return MODIFIERS.some((mod) => key.startsWith(`${mod}-`));
|
|
215
298
|
});
|
|
299
|
+
const hasObjectModifiers = propsKeys.some((key) => {
|
|
300
|
+
return MODIFIERS.includes(key) && typeof props[key] === "object" && props[key] !== null;
|
|
301
|
+
});
|
|
302
|
+
const hasModifiers = hasHyphenatedModifiers || hasObjectModifiers;
|
|
216
303
|
if (!hasClassNames && !hasLayoutProps && !hasValueProps && !hasModifiers) {
|
|
217
304
|
return props;
|
|
218
305
|
}
|
|
@@ -231,12 +318,21 @@ var withClassNames = (props) => {
|
|
|
231
318
|
if (typeof value === "string" || typeof value === "number") {
|
|
232
319
|
generatedClasses.push(`${prefix}-${value}`);
|
|
233
320
|
delete cleanRest[prop];
|
|
234
|
-
} else if (value === true && (prop
|
|
321
|
+
} else if (value === true && BOOLEAN_VALUE_PROPS.includes(prop)) {
|
|
235
322
|
generatedClasses.push(prop);
|
|
236
323
|
delete cleanRest[prop];
|
|
237
324
|
}
|
|
238
325
|
}
|
|
239
326
|
}
|
|
327
|
+
for (const modifier of MODIFIERS) {
|
|
328
|
+
if (modifier in cleanRest) {
|
|
329
|
+
const value = cleanRest[modifier];
|
|
330
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
331
|
+
processModifierObject(modifier, value, generatedClasses);
|
|
332
|
+
delete cleanRest[modifier];
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
240
336
|
Object.keys(cleanRest).forEach((key) => {
|
|
241
337
|
const firstHyphenIndex = key.indexOf("-");
|
|
242
338
|
if (firstHyphenIndex === -1) return;
|
|
@@ -249,7 +345,7 @@ var withClassNames = (props) => {
|
|
|
249
345
|
if (typeof value === "string" || typeof value === "number") {
|
|
250
346
|
generatedClasses.push(`${modifier}:${prefix}-${value}`);
|
|
251
347
|
delete cleanRest[key];
|
|
252
|
-
} else if (value === true && (restKey
|
|
348
|
+
} else if (value === true && BOOLEAN_VALUE_PROPS.includes(restKey)) {
|
|
253
349
|
generatedClasses.push(`${modifier}:${restKey}`);
|
|
254
350
|
delete cleanRest[key];
|
|
255
351
|
}
|
package/dist/jsx-runtime.d.cts
CHANGED
package/dist/jsx-runtime.d.ts
CHANGED
package/dist/jsx-runtime.js
CHANGED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { T as TailwindColor, a as TailwindSpacing, b as TailwindRadius, c as TailwindShadow, d as TailwindClass } from './tailwind.types-BSQudz76.cjs';
|
|
2
|
+
|
|
3
|
+
interface ValueProps {
|
|
4
|
+
bg?: TailwindColor | string;
|
|
5
|
+
text?: TailwindColor | string;
|
|
6
|
+
border?: TailwindColor | string | boolean;
|
|
7
|
+
fill?: TailwindColor | string;
|
|
8
|
+
stroke?: TailwindColor | string;
|
|
9
|
+
font?: string;
|
|
10
|
+
p?: TailwindSpacing | string | number;
|
|
11
|
+
m?: TailwindSpacing | string | number;
|
|
12
|
+
px?: TailwindSpacing | string | number;
|
|
13
|
+
py?: TailwindSpacing | string | number;
|
|
14
|
+
mx?: TailwindSpacing | string | number;
|
|
15
|
+
my?: TailwindSpacing | string | number;
|
|
16
|
+
gap?: TailwindSpacing | string | number;
|
|
17
|
+
w?: TailwindSpacing | string | number;
|
|
18
|
+
h?: TailwindSpacing | string | number;
|
|
19
|
+
rounded?: TailwindRadius | string | boolean;
|
|
20
|
+
shadow?: TailwindShadow | boolean | string;
|
|
21
|
+
z?: TailwindSpacing | string | number;
|
|
22
|
+
mb?: TailwindSpacing | string | number;
|
|
23
|
+
mt?: TailwindSpacing | string | number;
|
|
24
|
+
ml?: TailwindSpacing | string | number;
|
|
25
|
+
mr?: TailwindSpacing | string | number;
|
|
26
|
+
pb?: TailwindSpacing | string | number;
|
|
27
|
+
pt?: TailwindSpacing | string | number;
|
|
28
|
+
pl?: TailwindSpacing | string | number;
|
|
29
|
+
pr?: TailwindSpacing | string | number;
|
|
30
|
+
"min-w"?: TailwindSpacing | string | number;
|
|
31
|
+
"max-w"?: TailwindSpacing | string | number;
|
|
32
|
+
"min-h"?: TailwindSpacing | string | number;
|
|
33
|
+
"max-h"?: TailwindSpacing | string | number;
|
|
34
|
+
overflow?: string;
|
|
35
|
+
"grid-cols"?: string | number;
|
|
36
|
+
"grid-rows"?: string | number;
|
|
37
|
+
"col-span"?: string | number;
|
|
38
|
+
"row-span"?: string | number;
|
|
39
|
+
items?: string;
|
|
40
|
+
justify?: string;
|
|
41
|
+
self?: string;
|
|
42
|
+
"place-content"?: string;
|
|
43
|
+
"place-items"?: string;
|
|
44
|
+
"place-self"?: string;
|
|
45
|
+
order?: string | number;
|
|
46
|
+
tracking?: string;
|
|
47
|
+
leading?: string;
|
|
48
|
+
decoration?: string;
|
|
49
|
+
align?: string;
|
|
50
|
+
whitespace?: string;
|
|
51
|
+
break?: string;
|
|
52
|
+
content?: string;
|
|
53
|
+
opacity?: string | number;
|
|
54
|
+
"bg-opacity"?: string | number;
|
|
55
|
+
"text-opacity"?: string | number;
|
|
56
|
+
"border-opacity"?: string | number;
|
|
57
|
+
ring?: string | boolean;
|
|
58
|
+
"ring-offset"?: string;
|
|
59
|
+
outline?: string | boolean;
|
|
60
|
+
divide?: string;
|
|
61
|
+
"mix-blend"?: string;
|
|
62
|
+
"backdrop-blur"?: string;
|
|
63
|
+
blur?: string;
|
|
64
|
+
brightness?: string;
|
|
65
|
+
contrast?: string;
|
|
66
|
+
grayscale?: string;
|
|
67
|
+
"hue-rotate"?: string;
|
|
68
|
+
invert?: string;
|
|
69
|
+
saturate?: string;
|
|
70
|
+
sepia?: string;
|
|
71
|
+
"drop-shadow"?: string;
|
|
72
|
+
transition?: string | boolean;
|
|
73
|
+
duration?: string | number;
|
|
74
|
+
ease?: string;
|
|
75
|
+
delay?: string | number;
|
|
76
|
+
animate?: string;
|
|
77
|
+
cursor?: string;
|
|
78
|
+
"pointer-events"?: string;
|
|
79
|
+
resize?: string;
|
|
80
|
+
select?: string;
|
|
81
|
+
scale?: string | number;
|
|
82
|
+
rotate?: string | number;
|
|
83
|
+
translate?: string;
|
|
84
|
+
skew?: string;
|
|
85
|
+
origin?: string;
|
|
86
|
+
top?: TailwindSpacing | string | number;
|
|
87
|
+
right?: TailwindSpacing | string | number;
|
|
88
|
+
bottom?: TailwindSpacing | string | number;
|
|
89
|
+
left?: TailwindSpacing | string | number;
|
|
90
|
+
inset?: TailwindSpacing | string | number;
|
|
91
|
+
"inset-x"?: TailwindSpacing | string | number;
|
|
92
|
+
"inset-y"?: TailwindSpacing | string | number;
|
|
93
|
+
aspect?: "auto" | "square" | "video" | string;
|
|
94
|
+
columns?: string | number;
|
|
95
|
+
float?: "right" | "left" | "none" | "start" | "end" | string;
|
|
96
|
+
clear?: "left" | "right" | "both" | "none" | "start" | "end" | string;
|
|
97
|
+
basis?: TailwindSpacing | string | number;
|
|
98
|
+
"gap-x"?: TailwindSpacing | string | number;
|
|
99
|
+
"gap-y"?: TailwindSpacing | string | number;
|
|
100
|
+
"auto-cols"?: "auto" | "min" | "max" | "fr" | string;
|
|
101
|
+
"auto-rows"?: "auto" | "min" | "max" | "fr" | string;
|
|
102
|
+
"grid-flow"?: "row" | "col" | "dense" | "row-dense" | "col-dense" | string;
|
|
103
|
+
"space-x"?: TailwindSpacing | string | number;
|
|
104
|
+
"space-y"?: TailwindSpacing | string | number;
|
|
105
|
+
"justify-items"?: "start" | "end" | "center" | "stretch" | string;
|
|
106
|
+
"justify-self"?: "auto" | "start" | "end" | "center" | "stretch" | string;
|
|
107
|
+
size?: TailwindSpacing | string | number;
|
|
108
|
+
"border-t"?: TailwindColor | string | number;
|
|
109
|
+
"border-r"?: TailwindColor | string | number;
|
|
110
|
+
"border-b"?: TailwindColor | string | number;
|
|
111
|
+
"border-l"?: TailwindColor | string | number;
|
|
112
|
+
"border-x"?: TailwindColor | string | number;
|
|
113
|
+
"border-y"?: TailwindColor | string | number;
|
|
114
|
+
"rounded-t"?: TailwindRadius | string;
|
|
115
|
+
"rounded-r"?: TailwindRadius | string;
|
|
116
|
+
"rounded-b"?: TailwindRadius | string;
|
|
117
|
+
"rounded-l"?: TailwindRadius | string;
|
|
118
|
+
"rounded-tl"?: TailwindRadius | string;
|
|
119
|
+
"rounded-tr"?: TailwindRadius | string;
|
|
120
|
+
"rounded-bl"?: TailwindRadius | string;
|
|
121
|
+
"rounded-br"?: TailwindRadius | string;
|
|
122
|
+
"border-style"?: "solid" | "dashed" | "dotted" | "double" | "hidden" | "none" | string;
|
|
123
|
+
"text-align"?: "left" | "center" | "right" | "justify" | "start" | "end" | string;
|
|
124
|
+
"line-clamp"?: string | number;
|
|
125
|
+
list?: "none" | "disc" | "decimal" | "inside" | "outside" | string;
|
|
126
|
+
indent?: TailwindSpacing | string | number;
|
|
127
|
+
"bg-gradient"?: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl" | string;
|
|
128
|
+
from?: TailwindColor | string;
|
|
129
|
+
via?: TailwindColor | string;
|
|
130
|
+
to?: TailwindColor | string;
|
|
131
|
+
"bg-size"?: "auto" | "cover" | "contain" | string;
|
|
132
|
+
"bg-position"?: "bottom" | "center" | "left" | "left-bottom" | "left-top" | "right" | "right-bottom" | "right-top" | "top" | string;
|
|
133
|
+
"bg-repeat"?: "repeat" | "no-repeat" | "repeat-x" | "repeat-y" | "repeat-round" | "repeat-space" | string;
|
|
134
|
+
scroll?: "auto" | "smooth" | string;
|
|
135
|
+
snap?: "start" | "end" | "center" | "align-none" | "normal" | "always" | string;
|
|
136
|
+
touch?: "auto" | "none" | "pan-x" | "pan-left" | "pan-right" | "pan-y" | "pan-up" | "pan-down" | "pinch-zoom" | "manipulation" | string;
|
|
137
|
+
"will-change"?: "auto" | "scroll" | "contents" | "transform" | string;
|
|
138
|
+
caret?: TailwindColor | string;
|
|
139
|
+
accent?: TailwindColor | string;
|
|
140
|
+
"stroke-width"?: string | number;
|
|
141
|
+
}
|
|
142
|
+
interface LayoutProps {
|
|
143
|
+
flex?: boolean;
|
|
144
|
+
grid?: boolean;
|
|
145
|
+
hidden?: boolean;
|
|
146
|
+
block?: boolean;
|
|
147
|
+
inline?: boolean;
|
|
148
|
+
"inline-block"?: boolean;
|
|
149
|
+
"inline-flex"?: boolean;
|
|
150
|
+
"inline-grid"?: boolean;
|
|
151
|
+
relative?: boolean;
|
|
152
|
+
absolute?: boolean;
|
|
153
|
+
fixed?: boolean;
|
|
154
|
+
sticky?: boolean;
|
|
155
|
+
static?: boolean;
|
|
156
|
+
"flex-row"?: boolean;
|
|
157
|
+
"flex-col"?: boolean;
|
|
158
|
+
"flex-wrap"?: boolean;
|
|
159
|
+
"flex-nowrap"?: boolean;
|
|
160
|
+
"items-center"?: boolean;
|
|
161
|
+
"items-start"?: boolean;
|
|
162
|
+
"items-end"?: boolean;
|
|
163
|
+
"justify-center"?: boolean;
|
|
164
|
+
"justify-between"?: boolean;
|
|
165
|
+
"justify-start"?: boolean;
|
|
166
|
+
"justify-end"?: boolean;
|
|
167
|
+
grow?: boolean;
|
|
168
|
+
shrink?: boolean;
|
|
169
|
+
italic?: boolean;
|
|
170
|
+
"not-italic"?: boolean;
|
|
171
|
+
underline?: boolean;
|
|
172
|
+
uppercase?: boolean;
|
|
173
|
+
lowercase?: boolean;
|
|
174
|
+
capitalize?: boolean;
|
|
175
|
+
truncate?: boolean;
|
|
176
|
+
visible?: boolean;
|
|
177
|
+
invisible?: boolean;
|
|
178
|
+
collapse?: boolean;
|
|
179
|
+
"pointer-events-none"?: boolean;
|
|
180
|
+
"pointer-events-auto"?: boolean;
|
|
181
|
+
"sr-only"?: boolean;
|
|
182
|
+
"not-sr-only"?: boolean;
|
|
183
|
+
}
|
|
184
|
+
type ModifierValue = Partial<ValueProps & LayoutProps> & {
|
|
185
|
+
hover?: ModifierValue;
|
|
186
|
+
focus?: ModifierValue;
|
|
187
|
+
active?: ModifierValue;
|
|
188
|
+
visited?: ModifierValue;
|
|
189
|
+
disabled?: ModifierValue;
|
|
190
|
+
"group-hover"?: ModifierValue;
|
|
191
|
+
"group-focus"?: ModifierValue;
|
|
192
|
+
"focus-within"?: ModifierValue;
|
|
193
|
+
"focus-visible"?: ModifierValue;
|
|
194
|
+
first?: ModifierValue;
|
|
195
|
+
last?: ModifierValue;
|
|
196
|
+
odd?: ModifierValue;
|
|
197
|
+
even?: ModifierValue;
|
|
198
|
+
checked?: ModifierValue;
|
|
199
|
+
required?: ModifierValue;
|
|
200
|
+
valid?: ModifierValue;
|
|
201
|
+
invalid?: ModifierValue;
|
|
202
|
+
sm?: ModifierValue;
|
|
203
|
+
md?: ModifierValue;
|
|
204
|
+
lg?: ModifierValue;
|
|
205
|
+
xl?: ModifierValue;
|
|
206
|
+
"2xl"?: ModifierValue;
|
|
207
|
+
dark?: ModifierValue;
|
|
208
|
+
print?: ModifierValue;
|
|
209
|
+
};
|
|
210
|
+
interface ModifierProps {
|
|
211
|
+
hover?: ModifierValue;
|
|
212
|
+
focus?: ModifierValue;
|
|
213
|
+
active?: ModifierValue;
|
|
214
|
+
visited?: ModifierValue;
|
|
215
|
+
disabled?: ModifierValue;
|
|
216
|
+
"group-hover"?: ModifierValue;
|
|
217
|
+
"group-focus"?: ModifierValue;
|
|
218
|
+
"focus-within"?: ModifierValue;
|
|
219
|
+
"focus-visible"?: ModifierValue;
|
|
220
|
+
first?: ModifierValue;
|
|
221
|
+
last?: ModifierValue;
|
|
222
|
+
odd?: ModifierValue;
|
|
223
|
+
even?: ModifierValue;
|
|
224
|
+
checked?: ModifierValue;
|
|
225
|
+
required?: ModifierValue;
|
|
226
|
+
valid?: ModifierValue;
|
|
227
|
+
invalid?: ModifierValue;
|
|
228
|
+
sm?: ModifierValue;
|
|
229
|
+
md?: ModifierValue;
|
|
230
|
+
lg?: ModifierValue;
|
|
231
|
+
xl?: ModifierValue;
|
|
232
|
+
"2xl"?: ModifierValue;
|
|
233
|
+
dark?: ModifierValue;
|
|
234
|
+
print?: ModifierValue;
|
|
235
|
+
}
|
|
236
|
+
declare module "react" {
|
|
237
|
+
interface HTMLAttributes<T> extends LayoutProps, ValueProps, ModifierProps {
|
|
238
|
+
classNames?: (TailwindClass | string)[];
|
|
239
|
+
[key: string]: any;
|
|
240
|
+
}
|
|
241
|
+
interface SVGAttributes<T> extends LayoutProps, ValueProps, ModifierProps {
|
|
242
|
+
classNames?: (TailwindClass | string)[];
|
|
243
|
+
[key: string]: any;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { T as TailwindColor, a as TailwindSpacing, b as TailwindRadius, c as TailwindShadow, d as TailwindClass } from './tailwind.types-BSQudz76.js';
|
|
2
|
+
|
|
3
|
+
interface ValueProps {
|
|
4
|
+
bg?: TailwindColor | string;
|
|
5
|
+
text?: TailwindColor | string;
|
|
6
|
+
border?: TailwindColor | string | boolean;
|
|
7
|
+
fill?: TailwindColor | string;
|
|
8
|
+
stroke?: TailwindColor | string;
|
|
9
|
+
font?: string;
|
|
10
|
+
p?: TailwindSpacing | string | number;
|
|
11
|
+
m?: TailwindSpacing | string | number;
|
|
12
|
+
px?: TailwindSpacing | string | number;
|
|
13
|
+
py?: TailwindSpacing | string | number;
|
|
14
|
+
mx?: TailwindSpacing | string | number;
|
|
15
|
+
my?: TailwindSpacing | string | number;
|
|
16
|
+
gap?: TailwindSpacing | string | number;
|
|
17
|
+
w?: TailwindSpacing | string | number;
|
|
18
|
+
h?: TailwindSpacing | string | number;
|
|
19
|
+
rounded?: TailwindRadius | string | boolean;
|
|
20
|
+
shadow?: TailwindShadow | boolean | string;
|
|
21
|
+
z?: TailwindSpacing | string | number;
|
|
22
|
+
mb?: TailwindSpacing | string | number;
|
|
23
|
+
mt?: TailwindSpacing | string | number;
|
|
24
|
+
ml?: TailwindSpacing | string | number;
|
|
25
|
+
mr?: TailwindSpacing | string | number;
|
|
26
|
+
pb?: TailwindSpacing | string | number;
|
|
27
|
+
pt?: TailwindSpacing | string | number;
|
|
28
|
+
pl?: TailwindSpacing | string | number;
|
|
29
|
+
pr?: TailwindSpacing | string | number;
|
|
30
|
+
"min-w"?: TailwindSpacing | string | number;
|
|
31
|
+
"max-w"?: TailwindSpacing | string | number;
|
|
32
|
+
"min-h"?: TailwindSpacing | string | number;
|
|
33
|
+
"max-h"?: TailwindSpacing | string | number;
|
|
34
|
+
overflow?: string;
|
|
35
|
+
"grid-cols"?: string | number;
|
|
36
|
+
"grid-rows"?: string | number;
|
|
37
|
+
"col-span"?: string | number;
|
|
38
|
+
"row-span"?: string | number;
|
|
39
|
+
items?: string;
|
|
40
|
+
justify?: string;
|
|
41
|
+
self?: string;
|
|
42
|
+
"place-content"?: string;
|
|
43
|
+
"place-items"?: string;
|
|
44
|
+
"place-self"?: string;
|
|
45
|
+
order?: string | number;
|
|
46
|
+
tracking?: string;
|
|
47
|
+
leading?: string;
|
|
48
|
+
decoration?: string;
|
|
49
|
+
align?: string;
|
|
50
|
+
whitespace?: string;
|
|
51
|
+
break?: string;
|
|
52
|
+
content?: string;
|
|
53
|
+
opacity?: string | number;
|
|
54
|
+
"bg-opacity"?: string | number;
|
|
55
|
+
"text-opacity"?: string | number;
|
|
56
|
+
"border-opacity"?: string | number;
|
|
57
|
+
ring?: string | boolean;
|
|
58
|
+
"ring-offset"?: string;
|
|
59
|
+
outline?: string | boolean;
|
|
60
|
+
divide?: string;
|
|
61
|
+
"mix-blend"?: string;
|
|
62
|
+
"backdrop-blur"?: string;
|
|
63
|
+
blur?: string;
|
|
64
|
+
brightness?: string;
|
|
65
|
+
contrast?: string;
|
|
66
|
+
grayscale?: string;
|
|
67
|
+
"hue-rotate"?: string;
|
|
68
|
+
invert?: string;
|
|
69
|
+
saturate?: string;
|
|
70
|
+
sepia?: string;
|
|
71
|
+
"drop-shadow"?: string;
|
|
72
|
+
transition?: string | boolean;
|
|
73
|
+
duration?: string | number;
|
|
74
|
+
ease?: string;
|
|
75
|
+
delay?: string | number;
|
|
76
|
+
animate?: string;
|
|
77
|
+
cursor?: string;
|
|
78
|
+
"pointer-events"?: string;
|
|
79
|
+
resize?: string;
|
|
80
|
+
select?: string;
|
|
81
|
+
scale?: string | number;
|
|
82
|
+
rotate?: string | number;
|
|
83
|
+
translate?: string;
|
|
84
|
+
skew?: string;
|
|
85
|
+
origin?: string;
|
|
86
|
+
top?: TailwindSpacing | string | number;
|
|
87
|
+
right?: TailwindSpacing | string | number;
|
|
88
|
+
bottom?: TailwindSpacing | string | number;
|
|
89
|
+
left?: TailwindSpacing | string | number;
|
|
90
|
+
inset?: TailwindSpacing | string | number;
|
|
91
|
+
"inset-x"?: TailwindSpacing | string | number;
|
|
92
|
+
"inset-y"?: TailwindSpacing | string | number;
|
|
93
|
+
aspect?: "auto" | "square" | "video" | string;
|
|
94
|
+
columns?: string | number;
|
|
95
|
+
float?: "right" | "left" | "none" | "start" | "end" | string;
|
|
96
|
+
clear?: "left" | "right" | "both" | "none" | "start" | "end" | string;
|
|
97
|
+
basis?: TailwindSpacing | string | number;
|
|
98
|
+
"gap-x"?: TailwindSpacing | string | number;
|
|
99
|
+
"gap-y"?: TailwindSpacing | string | number;
|
|
100
|
+
"auto-cols"?: "auto" | "min" | "max" | "fr" | string;
|
|
101
|
+
"auto-rows"?: "auto" | "min" | "max" | "fr" | string;
|
|
102
|
+
"grid-flow"?: "row" | "col" | "dense" | "row-dense" | "col-dense" | string;
|
|
103
|
+
"space-x"?: TailwindSpacing | string | number;
|
|
104
|
+
"space-y"?: TailwindSpacing | string | number;
|
|
105
|
+
"justify-items"?: "start" | "end" | "center" | "stretch" | string;
|
|
106
|
+
"justify-self"?: "auto" | "start" | "end" | "center" | "stretch" | string;
|
|
107
|
+
size?: TailwindSpacing | string | number;
|
|
108
|
+
"border-t"?: TailwindColor | string | number;
|
|
109
|
+
"border-r"?: TailwindColor | string | number;
|
|
110
|
+
"border-b"?: TailwindColor | string | number;
|
|
111
|
+
"border-l"?: TailwindColor | string | number;
|
|
112
|
+
"border-x"?: TailwindColor | string | number;
|
|
113
|
+
"border-y"?: TailwindColor | string | number;
|
|
114
|
+
"rounded-t"?: TailwindRadius | string;
|
|
115
|
+
"rounded-r"?: TailwindRadius | string;
|
|
116
|
+
"rounded-b"?: TailwindRadius | string;
|
|
117
|
+
"rounded-l"?: TailwindRadius | string;
|
|
118
|
+
"rounded-tl"?: TailwindRadius | string;
|
|
119
|
+
"rounded-tr"?: TailwindRadius | string;
|
|
120
|
+
"rounded-bl"?: TailwindRadius | string;
|
|
121
|
+
"rounded-br"?: TailwindRadius | string;
|
|
122
|
+
"border-style"?: "solid" | "dashed" | "dotted" | "double" | "hidden" | "none" | string;
|
|
123
|
+
"text-align"?: "left" | "center" | "right" | "justify" | "start" | "end" | string;
|
|
124
|
+
"line-clamp"?: string | number;
|
|
125
|
+
list?: "none" | "disc" | "decimal" | "inside" | "outside" | string;
|
|
126
|
+
indent?: TailwindSpacing | string | number;
|
|
127
|
+
"bg-gradient"?: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl" | string;
|
|
128
|
+
from?: TailwindColor | string;
|
|
129
|
+
via?: TailwindColor | string;
|
|
130
|
+
to?: TailwindColor | string;
|
|
131
|
+
"bg-size"?: "auto" | "cover" | "contain" | string;
|
|
132
|
+
"bg-position"?: "bottom" | "center" | "left" | "left-bottom" | "left-top" | "right" | "right-bottom" | "right-top" | "top" | string;
|
|
133
|
+
"bg-repeat"?: "repeat" | "no-repeat" | "repeat-x" | "repeat-y" | "repeat-round" | "repeat-space" | string;
|
|
134
|
+
scroll?: "auto" | "smooth" | string;
|
|
135
|
+
snap?: "start" | "end" | "center" | "align-none" | "normal" | "always" | string;
|
|
136
|
+
touch?: "auto" | "none" | "pan-x" | "pan-left" | "pan-right" | "pan-y" | "pan-up" | "pan-down" | "pinch-zoom" | "manipulation" | string;
|
|
137
|
+
"will-change"?: "auto" | "scroll" | "contents" | "transform" | string;
|
|
138
|
+
caret?: TailwindColor | string;
|
|
139
|
+
accent?: TailwindColor | string;
|
|
140
|
+
"stroke-width"?: string | number;
|
|
141
|
+
}
|
|
142
|
+
interface LayoutProps {
|
|
143
|
+
flex?: boolean;
|
|
144
|
+
grid?: boolean;
|
|
145
|
+
hidden?: boolean;
|
|
146
|
+
block?: boolean;
|
|
147
|
+
inline?: boolean;
|
|
148
|
+
"inline-block"?: boolean;
|
|
149
|
+
"inline-flex"?: boolean;
|
|
150
|
+
"inline-grid"?: boolean;
|
|
151
|
+
relative?: boolean;
|
|
152
|
+
absolute?: boolean;
|
|
153
|
+
fixed?: boolean;
|
|
154
|
+
sticky?: boolean;
|
|
155
|
+
static?: boolean;
|
|
156
|
+
"flex-row"?: boolean;
|
|
157
|
+
"flex-col"?: boolean;
|
|
158
|
+
"flex-wrap"?: boolean;
|
|
159
|
+
"flex-nowrap"?: boolean;
|
|
160
|
+
"items-center"?: boolean;
|
|
161
|
+
"items-start"?: boolean;
|
|
162
|
+
"items-end"?: boolean;
|
|
163
|
+
"justify-center"?: boolean;
|
|
164
|
+
"justify-between"?: boolean;
|
|
165
|
+
"justify-start"?: boolean;
|
|
166
|
+
"justify-end"?: boolean;
|
|
167
|
+
grow?: boolean;
|
|
168
|
+
shrink?: boolean;
|
|
169
|
+
italic?: boolean;
|
|
170
|
+
"not-italic"?: boolean;
|
|
171
|
+
underline?: boolean;
|
|
172
|
+
uppercase?: boolean;
|
|
173
|
+
lowercase?: boolean;
|
|
174
|
+
capitalize?: boolean;
|
|
175
|
+
truncate?: boolean;
|
|
176
|
+
visible?: boolean;
|
|
177
|
+
invisible?: boolean;
|
|
178
|
+
collapse?: boolean;
|
|
179
|
+
"pointer-events-none"?: boolean;
|
|
180
|
+
"pointer-events-auto"?: boolean;
|
|
181
|
+
"sr-only"?: boolean;
|
|
182
|
+
"not-sr-only"?: boolean;
|
|
183
|
+
}
|
|
184
|
+
type ModifierValue = Partial<ValueProps & LayoutProps> & {
|
|
185
|
+
hover?: ModifierValue;
|
|
186
|
+
focus?: ModifierValue;
|
|
187
|
+
active?: ModifierValue;
|
|
188
|
+
visited?: ModifierValue;
|
|
189
|
+
disabled?: ModifierValue;
|
|
190
|
+
"group-hover"?: ModifierValue;
|
|
191
|
+
"group-focus"?: ModifierValue;
|
|
192
|
+
"focus-within"?: ModifierValue;
|
|
193
|
+
"focus-visible"?: ModifierValue;
|
|
194
|
+
first?: ModifierValue;
|
|
195
|
+
last?: ModifierValue;
|
|
196
|
+
odd?: ModifierValue;
|
|
197
|
+
even?: ModifierValue;
|
|
198
|
+
checked?: ModifierValue;
|
|
199
|
+
required?: ModifierValue;
|
|
200
|
+
valid?: ModifierValue;
|
|
201
|
+
invalid?: ModifierValue;
|
|
202
|
+
sm?: ModifierValue;
|
|
203
|
+
md?: ModifierValue;
|
|
204
|
+
lg?: ModifierValue;
|
|
205
|
+
xl?: ModifierValue;
|
|
206
|
+
"2xl"?: ModifierValue;
|
|
207
|
+
dark?: ModifierValue;
|
|
208
|
+
print?: ModifierValue;
|
|
209
|
+
};
|
|
210
|
+
interface ModifierProps {
|
|
211
|
+
hover?: ModifierValue;
|
|
212
|
+
focus?: ModifierValue;
|
|
213
|
+
active?: ModifierValue;
|
|
214
|
+
visited?: ModifierValue;
|
|
215
|
+
disabled?: ModifierValue;
|
|
216
|
+
"group-hover"?: ModifierValue;
|
|
217
|
+
"group-focus"?: ModifierValue;
|
|
218
|
+
"focus-within"?: ModifierValue;
|
|
219
|
+
"focus-visible"?: ModifierValue;
|
|
220
|
+
first?: ModifierValue;
|
|
221
|
+
last?: ModifierValue;
|
|
222
|
+
odd?: ModifierValue;
|
|
223
|
+
even?: ModifierValue;
|
|
224
|
+
checked?: ModifierValue;
|
|
225
|
+
required?: ModifierValue;
|
|
226
|
+
valid?: ModifierValue;
|
|
227
|
+
invalid?: ModifierValue;
|
|
228
|
+
sm?: ModifierValue;
|
|
229
|
+
md?: ModifierValue;
|
|
230
|
+
lg?: ModifierValue;
|
|
231
|
+
xl?: ModifierValue;
|
|
232
|
+
"2xl"?: ModifierValue;
|
|
233
|
+
dark?: ModifierValue;
|
|
234
|
+
print?: ModifierValue;
|
|
235
|
+
}
|
|
236
|
+
declare module "react" {
|
|
237
|
+
interface HTMLAttributes<T> extends LayoutProps, ValueProps, ModifierProps {
|
|
238
|
+
classNames?: (TailwindClass | string)[];
|
|
239
|
+
[key: string]: any;
|
|
240
|
+
}
|
|
241
|
+
interface SVGAttributes<T> extends LayoutProps, ValueProps, ModifierProps {
|
|
242
|
+
classNames?: (TailwindClass | string)[];
|
|
243
|
+
[key: string]: any;
|
|
244
|
+
}
|
|
245
|
+
}
|