@@ -36,6 +36,12 @@ export const functionalPlugins = new Map<string, FunctionalPlugin[]>([
36
36
[ "min-h" , [
37
37
{ scaleKey : "minHeight" , ns : 'minHeight' , class : [ 'min-height' ] , type : 'length' } ,
38
38
] ] ,
39
+ [ "max-h" , [
40
+ { scaleKey : "maxHeight" , ns : 'maxHeight' , class : [ 'max-height' ] , type : 'length' } ,
41
+ ] ] ,
42
+ [ "size" , [
43
+ { scaleKey : "size" , ns : 'size' , class : [ 'width' , 'height' ] , type : 'length' } ,
44
+ ] ] ,
39
45
[ "m" , [
40
46
{ scaleKey : "margin" , ns : 'margin' , class : [ 'margin' ] , type : 'length' , supportNegative : true } ,
41
47
] ] ,
@@ -82,6 +88,16 @@ export const functionalPlugins = new Map<string, FunctionalPlugin[]>([
82
88
{ scaleKey : "fontSize" , ns : 'fontSize' , class : [ 'font-size' ] , type : 'length' } ,
83
89
{ scaleKey : "textColor" , ns : 'textColor' , class : [ 'color' ] , type : 'color' } ,
84
90
] ] ,
91
+ [ "indent" , [
92
+ { scaleKey : "textIndent" , ns : 'textIndent' , class : [ 'text-indent' ] , type : 'length' , supportNegative : true } ,
93
+ ] ] ,
94
+ [ "underline-offset" , [
95
+ { scaleKey : "textUnderlineOffset" , ns : 'textUnderlineOffset' , class : [ 'text-underline-offset' ] , type : 'number' } ,
96
+ ] ] ,
97
+ [ "decoration" , [
98
+ { scaleKey : "textDecorationThickness" , ns : 'textDecorationThickness' , class : [ 'text-decoration-thickness' ] , type : 'number' } ,
99
+ { scaleKey : "textDecorationColor" , ns : 'textDecorationColor' , class : [ 'text-decoration-color' ] , type : 'color' } ,
100
+ ] ] ,
85
101
[ "font" , [
86
102
{ scaleKey : "fontWeight" , ns : 'fontWeight' , class : [ 'font-weight' ] , type : 'number' } ,
87
103
{ scaleKey : "fontFamily" , ns : 'fontFamily' , class : [ 'font-family' ] , type : 'family-name' } ,
@@ -98,6 +114,18 @@ export const functionalPlugins = new Map<string, FunctionalPlugin[]>([
98
114
{ scaleKey : "backgroundSize" , ns : 'backgroundSize' , class : [ 'background-size' ] , type : 'bg-size' } ,
99
115
{ scaleKey : "backgroundColor" , ns : 'backgroundColor' , class : [ 'background-color' ] , type : 'color' } ,
100
116
] ] ,
117
+ [ "from" , [
118
+ { scaleKey : "gradientColorStops" , ns : 'gradientStopsFrom' , class : [ '--tw-gradient-from' , '--tw-gradient-from-position' ] , type : 'color' } ,
119
+ { scaleKey : "gradientColorStopPositions" , ns : 'gradientColorFromStops' , class : [ '--tw-gradient-from' , '--tw-gradient-from-position' ] , type : 'percentage' } ,
120
+ ] ] ,
121
+ [ "to" , [
122
+ { scaleKey : "gradientColorStops" , ns : 'gradientStopsTo' , class : [ '--tw-gradient-to' , '--tw-gradient-to-position' ] , type : 'color' } ,
123
+ { scaleKey : "gradientColorStopPositions" , ns : 'gradientColorToStops' , class : [ '--tw-gradient-from' , '--tw-gradient-from-position' ] , type : 'percentage' } ,
124
+ ] ] ,
125
+ [ "via" , [
126
+ { scaleKey : "gradientColorStops" , ns : 'gradientStopsVia' , class : [ '--tw-gradient-from' ] , type : 'color' } ,
127
+ { scaleKey : "gradientColorStopPositions" , ns : 'gradientColorViaStops' , class : [ '--tw-gradient-from' , '--tw-gradient-from-position' ] , type : 'percentage' } ,
128
+ ] ] ,
101
129
[ "fill" , [
102
130
{ scaleKey : "fill" , ns : 'fillColor' , class : [ 'fill' ] , type : 'color' } ,
103
131
] ] ,
@@ -138,6 +166,18 @@ export const functionalPlugins = new Map<string, FunctionalPlugin[]>([
138
166
[ "gap-y" , [
139
167
{ scaleKey : "gap" , ns : 'gapY' , class : [ 'gap' ] , type : 'length' } ,
140
168
] ] ,
169
+ [ "divide-x" , [
170
+ { scaleKey : "divideWidth" , ns : 'divideX' , class : [ 'border-left-width' , 'border-right-width' ] , type : 'length' } ,
171
+ ] ] ,
172
+ [ "divide-y" , [
173
+ { scaleKey : "divideWidth" , ns : 'divideY' , class : [ 'border-top-width' , 'border-bottom-width' ] , type : 'length' } ,
174
+ ] ] ,
175
+ [ "divide" , [
176
+ { scaleKey : "divideColor" , ns : 'divideColor' , class : [ '--tw-divide-color' ] , type : 'color' } ,
177
+ ] ] ,
178
+ [ "divide-opacity" , [
179
+ { scaleKey : "divideOpacity" , ns : 'divideOpacity' , class : [ '--tw-divide-opacity' ] , type : 'number' } ,
180
+ ] ] ,
141
181
[ "col" , [
142
182
{ scaleKey : "gridColumn" , ns : 'gridColumn' , class : [ 'grid-column' ] , type : 'number' } ,
143
183
] ] ,
@@ -157,9 +197,14 @@ export const functionalPlugins = new Map<string, FunctionalPlugin[]>([
157
197
{ scaleKey : "boxShadow" , ns : 'boxShadow' , class : [ 'box-shadow' ] , type : 'length' } ,
158
198
] ] ,
159
199
[ "transition" , [
160
- { scaleKey : "transitionProperty" , ns : 'transitionProperty' , class : [ 'transition-property' ] , type : 'number' } ,
200
+ { scaleKey : "transitionProperty" , ns : 'transitionProperty' , class : [ 'transition-property' ] , type : 'named' } ,
201
+ ] ] ,
202
+ [ "duration" , [
161
203
{ scaleKey : "transitionDuration" , ns : 'transitionDuration' , class : [ 'transition-duration' ] , type : 'number' } ,
162
204
] ] ,
205
+ [ "delay" , [
206
+ { scaleKey : "transitionDelay" , ns : 'transitionDelay' , class : [ 'transition-delay' ] , type : 'number' } ,
207
+ ] ] ,
163
208
[ "scale" , [
164
209
{ scaleKey : "scale" , ns : 'scale' , class : [ 'scale' ] , type : 'number' , supportNegative : true } ,
165
210
] ] ,
@@ -217,17 +262,59 @@ export const functionalPlugins = new Map<string, FunctionalPlugin[]>([
217
262
[ "order" , [
218
263
{ scaleKey : "order" , ns : 'order' , class : [ 'order' ] , type : 'length' , supportNegative : true } ,
219
264
] ] ,
265
+ [ "blur" , [
266
+ { scaleKey : "blur" , ns : 'blur' , class : [ 'filter' ] , type : 'number' } ,
267
+ ] ] ,
268
+ [ "brightness" , [
269
+ { scaleKey : "brightness" , ns : 'brightness' , class : [ 'filter' ] , type : 'number' } ,
270
+ ] ] ,
271
+ [ "contrast" , [
272
+ { scaleKey : "contrast" , ns : 'contrast' , class : [ 'filter' ] , type : 'number' } ,
273
+ ] ] ,
274
+ [ "drop-shadow" , [
275
+ { scaleKey : "dropShadow" , ns : 'dropShadow' , class : [ 'filter' ] , type : 'number' } ,
276
+ ] ] ,
277
+ [ "hue-rotate" , [
278
+ { scaleKey : "hueRotate" , ns : 'hueRotate' , class : [ 'filter' ] , type : 'number' } ,
279
+ ] ] ,
280
+ [ "saturate" , [
281
+ { scaleKey : "saturate" , ns : 'saturate' , class : [ 'filter' ] , type : 'number' } ,
282
+ ] ] ,
283
+ [ "backdrop-blur" , [
284
+ { scaleKey : "blur" , ns : 'blur' , class : [ 'filter' ] , type : 'number' } ,
285
+ ] ] ,
286
+ [ "backdrop-brightness" , [
287
+ { scaleKey : "backdropBrightness" , ns : 'backdropBrightness' , class : [ 'backdrop-filter' ] , type : 'number' } ,
288
+ ] ] ,
289
+ [ "backdrop-contrast" , [
290
+ { scaleKey : "backdropContrast" , ns : 'backdropContrast' , class : [ 'backdrop-filter' ] , type : 'number' } ,
291
+ ] ] ,
292
+ [ "backdrop-drop-shadow" , [
293
+ { scaleKey : "backdropDropShadow" , ns : 'backdropDropShadow' , class : [ 'backdrop-filter' ] , type : 'number' } ,
294
+ ] ] ,
295
+ [ "backdrop-hue-rotate" , [
296
+ { scaleKey : "backdropHueRotate" , ns : 'backdropHueRotate' , class : [ 'backdrop-filter' ] , type : 'number' } ,
297
+ ] ] ,
298
+ [ "backdrop-saturate" , [
299
+ { scaleKey : "backdropSaturate" , ns : 'backdropSaturate' , class : [ 'backdrop-filter' ] , type : 'number' } ,
300
+ ] ] ,
220
301
] ) ;
221
302
222
303
export const namedPlugins = new Map < string , NamedPlugin > ( [
223
304
// Border Styles
224
- [ "border-solid" , { class : [ 'border-style' ] , value : 'solid' , ns : 'border ' } ] ,
225
- [ "border-dashed" , { class : [ 'border-style' ] , value : 'dashed' , ns : 'border ' } ] ,
226
- [ "border-dotted" , { class : [ 'border-style' ] , value : 'dotted' , ns : 'border ' } ] ,
227
- [ "border-double" , { class : [ 'border-style' ] , value : 'double' , ns : 'border ' } ] ,
228
- [ "border-none" , { class : [ 'border-style' ] , value : 'none' , ns : 'border ' } ] ,
305
+ [ "border-solid" , { class : [ 'border-style' ] , value : 'solid' , ns : 'borderStyle ' } ] ,
306
+ [ "border-dashed" , { class : [ 'border-style' ] , value : 'dashed' , ns : 'borderStyle ' } ] ,
307
+ [ "border-dotted" , { class : [ 'border-style' ] , value : 'dotted' , ns : 'borderStyle ' } ] ,
308
+ [ "border-double" , { class : [ 'border-style' ] , value : 'double' , ns : 'borderStyle ' } ] ,
309
+ [ "border-none" , { class : [ 'border-style' ] , value : 'none' , ns : 'borderStyle ' } ] ,
229
310
[ "ring-inset" , { class : [ '--tw-ring-inset' ] , value : 'inset' , ns : 'ring' } ] ,
230
311
312
+ [ "divide-solid" , { class : [ 'divide-style' ] , value : 'solid' , ns : 'divideStyle' } ] ,
313
+ [ "divide-dashed" , { class : [ 'divide-style' ] , value : 'dashed' , ns : 'divideStyle' } ] ,
314
+ [ "divide-dotted" , { class : [ 'divide-style' ] , value : 'dotted' , ns : 'divideStyle' } ] ,
315
+ [ "divide-double" , { class : [ 'divide-style' ] , value : 'double' , ns : 'divideStyle' } ] ,
316
+ [ "divide-none" , { class : [ 'divide-style' ] , value : 'none' , ns : 'divideStyle' } ] ,
317
+
231
318
// Display
232
319
[ "block" , { class : [ 'display' ] , value : 'block' , ns : 'display' } ] ,
233
320
[ "inline-block" , { class : [ 'display' ] , value : 'inline-block' , ns : 'display' } ] ,
@@ -246,6 +333,25 @@ export const namedPlugins = new Map<string, NamedPlugin>([
246
333
[ "visible" , { class : [ 'visibility' ] , value : 'visible' , ns : 'visibility' } ] ,
247
334
[ "invisible" , { class : [ 'visibility' ] , value : 'hidden' , ns : 'visibility' } ] ,
248
335
336
+ // Hyphens
337
+ [ "hyphens-none" , { class : [ 'hyphens' ] , value : 'none' , ns : 'hyphens' } ] ,
338
+ [ "hyphens-manual" , { class : [ 'hyphens' ] , value : 'manual' , ns : 'hyphens' } ] ,
339
+ [ "hyphens-auto" , { class : [ 'hyphens' ] , value : 'auto' , ns : 'hyphens' } ] ,
340
+
341
+ // Word Break
342
+ [ "break-normal" , { class : [ 'word-break' , 'overflow-wrap' ] , value : 'normal' , ns : 'wordBreak' } ] ,
343
+ [ "break-words" , { class : [ 'overflow-wrap' ] , value : 'break-word' , ns : 'wordBreak' } ] ,
344
+ [ "break-all" , { class : [ 'word-break' ] , value : 'break-all' , ns : 'wordBreak' } ] ,
345
+ [ "break-keep" , { class : [ 'word-break' ] , value : 'keep-all' , ns : 'wordBreak' } ] ,
346
+
347
+ // Whitespace
348
+ [ "whitespace-normal" , { class : [ 'white-space' ] , value : 'normal' , ns : 'whitespace' } ] ,
349
+ [ "whitespace-nowrap" , { class : [ 'white-space' ] , value : 'nowrap' , ns : 'whitespace' } ] ,
350
+ [ "whitespace-pre" , { class : [ 'white-space' ] , value : 'pre' , ns : 'whitespace' } ] ,
351
+ [ "whitespace-pre-line" , { class : [ 'white-space' ] , value : 'pre-line' , ns : 'whitespace' } ] ,
352
+ [ "whitespace-pre-wrap" , { class : [ 'white-space' ] , value : 'pre-wrap' , ns : 'whitespace' } ] ,
353
+ [ "whitespace-break-spaces" , { class : [ 'white-space' ] , value : 'break-spaces' , ns : 'whitespace' } ] ,
354
+
249
355
// Position
250
356
[ "static" , { class : [ 'position' ] , value : 'static' , ns : 'position' } ] ,
251
357
[ "fixed" , { class : [ 'position' ] , value : 'fixed' , ns : 'position' } ] ,
@@ -267,10 +373,30 @@ export const namedPlugins = new Map<string, NamedPlugin>([
267
373
[ "overflow-y-visible" , { class : [ 'overflow-y' ] , value : 'visible' , ns : 'overflowY' } ] ,
268
374
[ "overflow-y-scroll" , { class : [ 'overflow-y' ] , value : 'scroll' , ns : 'overflowY' } ] ,
269
375
376
+ // Text Align
377
+ [ "text-left" , { class : [ 'text-align' ] , value : 'left' , ns : 'textAlign' } ] ,
378
+ [ "text-center" , { class : [ 'text-align' ] , value : 'center' , ns : 'textAlign' } ] ,
379
+ [ "text-right" , { class : [ 'text-align' ] , value : 'right' , ns : 'textAlign' } ] ,
380
+ [ "text-justify" , { class : [ 'text-align' ] , value : 'justify' , ns : 'textAlign' } ] ,
381
+ [ "text-start" , { class : [ 'text-align' ] , value : 'start' , ns : 'textAlign' } ] ,
382
+ [ "text-end" , { class : [ 'text-align' ] , value : 'end' , ns : 'textAlign' } ] ,
383
+
270
384
// Text Decoration
271
- [ "underline" , { class : [ 'text-decoration' ] , value : 'underline' , ns : 'textDecoration' } ] ,
272
- [ "line-through" , { class : [ 'text-decoration' ] , value : 'line-through' , ns : 'textDecoration' } ] ,
273
- [ "no-underline" , { class : [ 'text-decoration' ] , value : 'none' , ns : 'textDecoration' } ] ,
385
+ [ "underline" , { class : [ 'text-decoration-line' ] , value : 'underline' , ns : 'textDecoration' } ] ,
386
+ [ "line-through" , { class : [ 'text-decoration-line' ] , value : 'line-through' , ns : 'textDecoration' } ] ,
387
+ [ "overline" , { class : [ 'text-decoration-line' ] , value : 'overline' , ns : 'textDecoration' } ] ,
388
+ [ "no-underline" , { class : [ 'text-decoration-line' ] , value : 'none' , ns : 'textDecoration' } ] ,
389
+
390
+ // Text Wrap
391
+ [ "text-wrap" , { class : [ 'text-wrap' ] , value : 'wrap' , ns : 'textWrap' } ] ,
392
+ [ "text-nowrap" , { class : [ 'text-wrap' ] , value : 'nowrap' , ns : 'textWrap' } ] ,
393
+ [ "text-balance" , { class : [ 'text-wrap' ] , value : 'balance' , ns : 'textWrap' } ] ,
394
+ [ "text-pretty" , { class : [ 'text-wrap' ] , value : 'pretty' , ns : 'textWrap' } ] ,
395
+
396
+ // Text Overflow
397
+ [ "truncate" , { class : [ 'overflow' , 'text-overflow' , 'white-space' ] , value : '' , ns : 'TextOverflow' } ] ,
398
+ [ "text-ellipsis" , { class : [ 'text-overflow' ] , value : 'ellipsis' , ns : 'textWrap' } ] ,
399
+ [ "text-clip" , { class : [ 'text-overflow' ] , value : 'clip' , ns : 'textWrap' } ] ,
274
400
275
401
// Text Transform
276
402
[ "uppercase" , { class : [ 'text-transform' ] , value : 'uppercase' , ns : 'textTransform' } ] ,
@@ -331,6 +457,24 @@ export const namedPlugins = new Map<string, NamedPlugin>([
331
457
[ "flex-shrink" , { class : [ 'flex-shrink' ] , value : '1' , ns : 'flexShrink' } ] ,
332
458
[ "flex-shrink-0" , { class : [ 'flex-shrink' ] , value : '0' , ns : 'flexShrink' } ] ,
333
459
460
+ // Filters
461
+ [ "grayscale" , { class : [ 'filter' ] , value : 'grayscale(100%)' , ns : 'grayScale' } ] ,
462
+ [ "grayscale-0" , { class : [ 'filter' ] , value : 'grayscale(0)' , ns : 'grayScale' } ] ,
463
+ [ "invert" , { class : [ 'filter' ] , value : 'invert(100%)' , ns : 'invert' } ] ,
464
+ [ "invert-0" , { class : [ 'filter' ] , value : 'invert(0)' , ns : 'invert' } ] ,
465
+ [ "sepia" , { class : [ 'filter' ] , value : 'sepia(100%)' , ns : 'sepia' } ] ,
466
+ [ "sepia-0" , { class : [ 'filter' ] , value : 'sepia(0)' , ns : 'sepia' } ] ,
467
+ [ "backdrop-grayscale" , { class : [ 'backdrop-filter' ] , value : 'backdrop-grayscale(100%)' , ns : 'backdropGrayScale' } ] ,
468
+ [ "backdrop-grayscale-0" , { class : [ 'backdrop-filter' ] , value : 'backdrop-grayscale(0)' , ns : 'backdropGrayScale' } ] ,
469
+ [ "backdrop-invert" , { class : [ 'backdrop-filter' ] , value : 'backdrop-invert(100%)' , ns : 'backdrop-invert' } ] ,
470
+ [ "backdrop-invert-0" , { class : [ 'backdrop-filter' ] , value : 'backdrop-invert(0)' , ns : 'backdrop-invert' } ] ,
471
+ [ "backdrop-sepia" , { class : [ 'backdrop-filter' ] , value : 'backdrop-sepia(100%)' , ns : 'backdrop-sepia' } ] ,
472
+ [ "backdrop-sepia-0" , { class : [ 'backdrop-filter' ] , value : 'backdrop-sepia(0)' , ns : 'backdrop-sepia' } ] ,
473
+
474
+ [ "ease-linear" , { class : [ 'transition-timing-function' ] , value : 'linear' , ns : 'transitionTiming' } ] ,
475
+ [ "ease-in" , { class : [ 'transition-timing-function' ] , value : 'cubic-bezier(0.4, 0, 1, 1)' , ns : 'transitionTiming' } ] ,
476
+ [ "ease-out" , { class : [ 'transition-timing-function' ] , value : 'cubic-bezier(0, 0, 0.2, 1)' , ns : 'transitionTiming' } ] ,
477
+ [ "ease-in-out" , { class : [ 'transition-timing-function' ] , value : 'cubic-bezier(0.4, 0, 0.2, 1)' , ns : 'transitionTiming' } ] ,
334
478
] )
335
479
336
480
export const variants = new Map < string , Variant [ "type" ] > ( [
0 commit comments