@itamarshdev/reactwind 1.0.0 → 1.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.
@@ -150,7 +150,71 @@ var VALUE_PROPS_MAP = {
150
150
  rotate: "rotate",
151
151
  translate: "translate",
152
152
  skew: "skew",
153
- origin: "origin"
153
+ origin: "origin",
154
+ // Layout & Position
155
+ top: "top",
156
+ right: "right",
157
+ bottom: "bottom",
158
+ left: "left",
159
+ inset: "inset",
160
+ "inset-x": "inset-x",
161
+ "inset-y": "inset-y",
162
+ aspect: "aspect",
163
+ columns: "columns",
164
+ float: "float",
165
+ clear: "clear",
166
+ // Flexbox & Grid
167
+ basis: "basis",
168
+ "gap-x": "gap-x",
169
+ "gap-y": "gap-y",
170
+ "auto-cols": "auto-cols",
171
+ "auto-rows": "auto-rows",
172
+ "grid-flow": "grid-flow",
173
+ "space-x": "space-x",
174
+ "space-y": "space-y",
175
+ "justify-items": "justify-items",
176
+ "justify-self": "justify-self",
177
+ // Sizing
178
+ size: "size",
179
+ // Borders
180
+ "border-t": "border-t",
181
+ "border-r": "border-r",
182
+ "border-b": "border-b",
183
+ "border-l": "border-l",
184
+ "border-x": "border-x",
185
+ "border-y": "border-y",
186
+ "rounded-t": "rounded-t",
187
+ "rounded-r": "rounded-r",
188
+ "rounded-b": "rounded-b",
189
+ "rounded-l": "rounded-l",
190
+ "rounded-tl": "rounded-tl",
191
+ "rounded-tr": "rounded-tr",
192
+ "rounded-bl": "rounded-bl",
193
+ "rounded-br": "rounded-br",
194
+ "border-style": "border",
195
+ // Typography
196
+ "text-align": "text",
197
+ align: "align",
198
+ "line-clamp": "line-clamp",
199
+ list: "list",
200
+ indent: "indent",
201
+ // Backgrounds & Gradients
202
+ "bg-gradient": "bg-gradient",
203
+ from: "from",
204
+ via: "via",
205
+ to: "to",
206
+ "bg-size": "bg",
207
+ "bg-position": "bg",
208
+ "bg-repeat": "bg",
209
+ // Interactivity
210
+ scroll: "scroll",
211
+ snap: "snap",
212
+ touch: "touch",
213
+ "will-change": "will-change",
214
+ caret: "caret",
215
+ accent: "accent",
216
+ // SVG
217
+ "stroke-width": "stroke"
154
218
  };
155
219
  var MODIFIERS = [
156
220
  "hover",
@@ -195,23 +259,50 @@ var MODIFIERS = [
195
259
  // Print
196
260
  "print"
197
261
  ];
262
+ var BOOLEAN_VALUE_PROPS = ["shadow", "rounded", "border", "transition", "ring", "outline"];
198
263
  var joinClassNames = (classNames) => {
199
264
  if (!classNames || classNames.length === 0) {
200
265
  return "";
201
266
  }
202
267
  return classNames.filter(Boolean).join(" ");
203
268
  };
269
+ var processModifierObject = (modifier, obj, classes) => {
270
+ for (const [key, value] of Object.entries(obj)) {
271
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
272
+ if (MODIFIERS.includes(key)) {
273
+ processModifierObject(`${modifier}:${key}`, value, classes);
274
+ }
275
+ } else if (key in VALUE_PROPS_MAP) {
276
+ const prefix = VALUE_PROPS_MAP[key];
277
+ if (typeof value === "string" || typeof value === "number") {
278
+ classes.push(`${modifier}:${prefix}-${value}`);
279
+ } else if (value === true && BOOLEAN_VALUE_PROPS.includes(key)) {
280
+ classes.push(`${modifier}:${key}`);
281
+ }
282
+ } else if (LAYOUT_PROPS.includes(key) && value === true) {
283
+ classes.push(`${modifier}:${key}`);
284
+ }
285
+ }
286
+ };
204
287
  var withClassNames = (props) => {
205
288
  if (!props) {
206
289
  return props;
207
290
  }
291
+ if ("sx" in props && typeof props.sx === "object" && props.sx !== null) {
292
+ const { sx, ...restProps } = props;
293
+ return withClassNames({ ...restProps, ...sx });
294
+ }
208
295
  const hasClassNames = "classNames" in props;
209
296
  const hasLayoutProps = LAYOUT_PROPS.some((k) => k in props);
210
297
  const hasValueProps = Object.keys(VALUE_PROPS_MAP).some((k) => k in props);
211
298
  const propsKeys = Object.keys(props);
212
- const hasModifiers = propsKeys.some((key) => {
299
+ const hasHyphenatedModifiers = propsKeys.some((key) => {
213
300
  return MODIFIERS.some((mod) => key.startsWith(`${mod}-`));
214
301
  });
302
+ const hasObjectModifiers = propsKeys.some((key) => {
303
+ return MODIFIERS.includes(key) && typeof props[key] === "object" && props[key] !== null;
304
+ });
305
+ const hasModifiers = hasHyphenatedModifiers || hasObjectModifiers;
215
306
  if (!hasClassNames && !hasLayoutProps && !hasValueProps && !hasModifiers) {
216
307
  return props;
217
308
  }
@@ -230,12 +321,21 @@ var withClassNames = (props) => {
230
321
  if (typeof value === "string" || typeof value === "number") {
231
322
  generatedClasses.push(`${prefix}-${value}`);
232
323
  delete cleanRest[prop];
233
- } else if (value === true && (prop === "shadow" || prop === "rounded" || prop === "border" || prop === "transition")) {
324
+ } else if (value === true && BOOLEAN_VALUE_PROPS.includes(prop)) {
234
325
  generatedClasses.push(prop);
235
326
  delete cleanRest[prop];
236
327
  }
237
328
  }
238
329
  }
330
+ for (const modifier of MODIFIERS) {
331
+ if (modifier in cleanRest) {
332
+ const value = cleanRest[modifier];
333
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
334
+ processModifierObject(modifier, value, generatedClasses);
335
+ delete cleanRest[modifier];
336
+ }
337
+ }
338
+ }
239
339
  Object.keys(cleanRest).forEach((key) => {
240
340
  const firstHyphenIndex = key.indexOf("-");
241
341
  if (firstHyphenIndex === -1) return;
@@ -248,7 +348,7 @@ var withClassNames = (props) => {
248
348
  if (typeof value === "string" || typeof value === "number") {
249
349
  generatedClasses.push(`${modifier}:${prefix}-${value}`);
250
350
  delete cleanRest[key];
251
- } else if (value === true && (restKey === "shadow" || restKey === "rounded" || restKey === "border")) {
351
+ } else if (value === true && BOOLEAN_VALUE_PROPS.includes(restKey)) {
252
352
  generatedClasses.push(`${modifier}:${restKey}`);
253
353
  delete cleanRest[key];
254
354
  }
@@ -1,4 +1,4 @@
1
- import './types-WLlcB_RW.cjs';
1
+ import './types-I6XgQvJp.cjs';
2
2
  import React from 'react';
3
3
  export { Fragment } from 'react/jsx-dev-runtime';
4
4
  export { JSX } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import './types-Bdh-X84v.js';
1
+ import './types-DuRT-DEW.js';
2
2
  import React from 'react';
3
3
  export { Fragment } from 'react/jsx-dev-runtime';
4
4
  export { JSX } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withClassNames
3
- } from "./chunk-M5PDERS6.js";
3
+ } from "./chunk-6MX4RX23.js";
4
4
 
5
5
  // src/jsx-dev-runtime.ts
6
6
  import { Fragment, jsxDEV as reactJsxDEV } from "react/jsx-dev-runtime";
@@ -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,23 +260,50 @@ 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;
208
291
  }
292
+ if ("sx" in props && typeof props.sx === "object" && props.sx !== null) {
293
+ const { sx, ...restProps } = props;
294
+ return withClassNames({ ...restProps, ...sx });
295
+ }
209
296
  const hasClassNames = "classNames" in props;
210
297
  const hasLayoutProps = LAYOUT_PROPS.some((k) => k in props);
211
298
  const hasValueProps = Object.keys(VALUE_PROPS_MAP).some((k) => k in props);
212
299
  const propsKeys = Object.keys(props);
213
- const hasModifiers = propsKeys.some((key) => {
300
+ const hasHyphenatedModifiers = propsKeys.some((key) => {
214
301
  return MODIFIERS.some((mod) => key.startsWith(`${mod}-`));
215
302
  });
303
+ const hasObjectModifiers = propsKeys.some((key) => {
304
+ return MODIFIERS.includes(key) && typeof props[key] === "object" && props[key] !== null;
305
+ });
306
+ const hasModifiers = hasHyphenatedModifiers || hasObjectModifiers;
216
307
  if (!hasClassNames && !hasLayoutProps && !hasValueProps && !hasModifiers) {
217
308
  return props;
218
309
  }
@@ -231,12 +322,21 @@ var withClassNames = (props) => {
231
322
  if (typeof value === "string" || typeof value === "number") {
232
323
  generatedClasses.push(`${prefix}-${value}`);
233
324
  delete cleanRest[prop];
234
- } else if (value === true && (prop === "shadow" || prop === "rounded" || prop === "border" || prop === "transition")) {
325
+ } else if (value === true && BOOLEAN_VALUE_PROPS.includes(prop)) {
235
326
  generatedClasses.push(prop);
236
327
  delete cleanRest[prop];
237
328
  }
238
329
  }
239
330
  }
331
+ for (const modifier of MODIFIERS) {
332
+ if (modifier in cleanRest) {
333
+ const value = cleanRest[modifier];
334
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
335
+ processModifierObject(modifier, value, generatedClasses);
336
+ delete cleanRest[modifier];
337
+ }
338
+ }
339
+ }
240
340
  Object.keys(cleanRest).forEach((key) => {
241
341
  const firstHyphenIndex = key.indexOf("-");
242
342
  if (firstHyphenIndex === -1) return;
@@ -249,7 +349,7 @@ var withClassNames = (props) => {
249
349
  if (typeof value === "string" || typeof value === "number") {
250
350
  generatedClasses.push(`${modifier}:${prefix}-${value}`);
251
351
  delete cleanRest[key];
252
- } else if (value === true && (restKey === "shadow" || restKey === "rounded" || restKey === "border")) {
352
+ } else if (value === true && BOOLEAN_VALUE_PROPS.includes(restKey)) {
253
353
  generatedClasses.push(`${modifier}:${restKey}`);
254
354
  delete cleanRest[key];
255
355
  }
@@ -1,4 +1,4 @@
1
- import './types-WLlcB_RW.cjs';
1
+ import './types-I6XgQvJp.cjs';
2
2
  import React from 'react';
3
3
  export { Fragment, JSX } from 'react/jsx-runtime';
4
4
  import './tailwind.types-BSQudz76.cjs';
@@ -1,4 +1,4 @@
1
- import './types-Bdh-X84v.js';
1
+ import './types-DuRT-DEW.js';
2
2
  import React from 'react';
3
3
  export { Fragment, JSX } from 'react/jsx-runtime';
4
4
  import './tailwind.types-BSQudz76.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withClassNames
3
- } from "./chunk-M5PDERS6.js";
3
+ } from "./chunk-6MX4RX23.js";
4
4
 
5
5
  // src/jsx-runtime.ts
6
6
  import { Fragment, jsx as reactJsx, jsxs as reactJsxs } from "react/jsx-runtime";
@@ -0,0 +1,248 @@
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
+ type SxProp = Partial<ValueProps & LayoutProps & ModifierProps>;
237
+ declare module "react" {
238
+ interface HTMLAttributes<T> extends LayoutProps, ValueProps, ModifierProps {
239
+ classNames?: (TailwindClass | string)[];
240
+ sx?: SxProp;
241
+ [key: string]: any;
242
+ }
243
+ interface SVGAttributes<T> extends LayoutProps, ValueProps, ModifierProps {
244
+ classNames?: (TailwindClass | string)[];
245
+ sx?: SxProp;
246
+ [key: string]: any;
247
+ }
248
+ }