tailwindcss 0.0.0-insiders.ca1dfd6 → 0.0.0-insiders.d1f066d
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/CHANGELOG.md +60 -1
- package/lib/cli.js +73 -74
- package/lib/constants.js +1 -1
- package/lib/corePluginList.js +7 -1
- package/lib/corePlugins.js +295 -228
- package/lib/css/preflight.css +12 -0
- package/lib/featureFlags.js +12 -9
- package/lib/lib/collapseDuplicateDeclarations.js +29 -0
- package/lib/lib/evaluateTailwindFunctions.js +3 -3
- package/lib/lib/expandApplyAtRules.js +7 -7
- package/lib/lib/expandTailwindAtRules.js +14 -26
- package/lib/lib/generateRules.js +170 -27
- package/lib/lib/normalizeTailwindDirectives.js +3 -2
- package/lib/lib/resolveDefaultsAtRules.js +44 -47
- package/lib/lib/setupContextUtils.js +192 -123
- package/lib/lib/setupTrackingContext.js +3 -3
- package/lib/lib/setupWatchingContext.js +8 -4
- package/lib/lib/sharedState.js +2 -12
- package/lib/processTailwindFeatures.js +4 -0
- package/lib/public/colors.js +4 -8
- package/lib/util/createUtilityPlugin.js +5 -5
- package/lib/util/dataTypes.js +24 -4
- package/lib/util/formatVariantSelector.js +102 -0
- package/lib/util/log.js +30 -18
- package/lib/util/nameClass.js +1 -1
- package/lib/util/negateValue.js +3 -1
- package/lib/util/normalizeConfig.js +208 -0
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/pluginUtils.js +62 -158
- package/lib/util/prefixSelector.js +1 -3
- package/lib/util/resolveConfig.js +18 -77
- package/lib/util/transformThemeValue.js +23 -13
- package/package.json +11 -11
- package/peers/index.js +955 -2671
- package/scripts/create-plugin-list.js +2 -2
- package/src/cli.js +19 -13
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +303 -366
- package/src/css/preflight.css +12 -0
- package/src/featureFlags.js +12 -6
- package/src/lib/collapseDuplicateDeclarations.js +28 -0
- package/src/lib/expandTailwindAtRules.js +15 -29
- package/src/lib/generateRules.js +194 -19
- package/src/lib/normalizeTailwindDirectives.js +3 -2
- package/src/lib/resolveDefaultsAtRules.js +39 -43
- package/src/lib/setupContextUtils.js +183 -105
- package/src/lib/setupTrackingContext.js +3 -5
- package/src/lib/setupWatchingContext.js +10 -5
- package/src/lib/sharedState.js +1 -4
- package/src/processTailwindFeatures.js +5 -0
- package/src/public/colors.js +4 -9
- package/src/util/createUtilityPlugin.js +2 -2
- package/src/util/dataTypes.js +32 -5
- package/src/util/formatVariantSelector.js +105 -0
- package/src/util/log.js +18 -21
- package/src/util/nameClass.js +1 -1
- package/src/util/negateValue.js +4 -2
- package/src/util/normalizeConfig.js +249 -0
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/pluginUtils.js +50 -146
- package/src/util/prefixSelector.js +1 -4
- package/src/util/resolveConfig.js +11 -64
- package/src/util/transformThemeValue.js +22 -7
- package/stubs/defaultConfig.stub.js +134 -91
- package/stubs/simpleConfig.stub.js +0 -1
package/lib/corePlugins.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports.
|
|
5
|
+
exports.corePlugins = exports.variantPlugins = void 0;
|
|
6
6
|
var _fs = _interopRequireDefault(require("fs"));
|
|
7
|
+
var path = _interopRequireWildcard(require("path"));
|
|
7
8
|
var _postcss = _interopRequireDefault(require("postcss"));
|
|
8
9
|
var _createUtilityPlugin = _interopRequireDefault(require("./util/createUtilityPlugin"));
|
|
9
10
|
var _buildMediaQuery = _interopRequireDefault(require("./util/buildMediaQuery"));
|
|
10
|
-
var _prefixSelector = _interopRequireDefault(require("./util/prefixSelector"));
|
|
11
11
|
var _parseAnimationValue = _interopRequireDefault(require("./util/parseAnimationValue"));
|
|
12
12
|
var _flattenColorPalette = _interopRequireDefault(require("./util/flattenColorPalette"));
|
|
13
13
|
var _withAlphaVariable = _interopRequireWildcard(require("./util/withAlphaVariable"));
|
|
14
14
|
var _toColorValue = _interopRequireDefault(require("./util/toColorValue"));
|
|
15
15
|
var _isPlainObject = _interopRequireDefault(require("./util/isPlainObject"));
|
|
16
16
|
var _transformThemeValue = _interopRequireDefault(require("./util/transformThemeValue"));
|
|
17
|
-
var _pluginUtils = require("./util/pluginUtils");
|
|
18
17
|
var _packageJson = require("../package.json");
|
|
19
18
|
var _log = _interopRequireDefault(require("./util/log"));
|
|
19
|
+
var _parseBoxShadowValue = require("./util/parseBoxShadowValue");
|
|
20
20
|
function _interopRequireDefault(obj) {
|
|
21
21
|
return obj && obj.__esModule ? obj : {
|
|
22
22
|
default: obj
|
|
@@ -45,56 +45,21 @@ function _interopRequireWildcard(obj) {
|
|
|
45
45
|
return newObj;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
addVariant('first-
|
|
52
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
53
|
-
return withPseudo(`first-letter${config('separator')}${className}`, '::first-letter');
|
|
54
|
-
});
|
|
55
|
-
}));
|
|
56
|
-
addVariant('first-line', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
57
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
58
|
-
return withPseudo(`first-line${config('separator')}${className}`, '::first-line');
|
|
59
|
-
});
|
|
60
|
-
}));
|
|
48
|
+
let variantPlugins = {
|
|
49
|
+
pseudoElementVariants: ({ addVariant })=>{
|
|
50
|
+
addVariant('first-letter', '&::first-letter');
|
|
51
|
+
addVariant('first-line', '&::first-line');
|
|
61
52
|
addVariant('marker', [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return `marker${config('separator')}${className}`;
|
|
65
|
-
});
|
|
66
|
-
return `${variantSelector} *::marker`;
|
|
67
|
-
}),
|
|
68
|
-
(0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
69
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
70
|
-
return withPseudo(`marker${config('separator')}${className}`, '::marker');
|
|
71
|
-
});
|
|
72
|
-
}),
|
|
53
|
+
'& *::marker',
|
|
54
|
+
'&::marker'
|
|
73
55
|
]);
|
|
74
56
|
addVariant('selection', [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return `selection${config('separator')}${className}`;
|
|
78
|
-
});
|
|
79
|
-
return `${variantSelector} *::selection`;
|
|
80
|
-
}),
|
|
81
|
-
(0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
82
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
83
|
-
return withPseudo(`selection${config('separator')}${className}`, '::selection');
|
|
84
|
-
});
|
|
85
|
-
}),
|
|
57
|
+
'& *::selection',
|
|
58
|
+
'&::selection'
|
|
86
59
|
]);
|
|
87
|
-
addVariant('file',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
});
|
|
91
|
-
}));
|
|
92
|
-
addVariant('before', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
93
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
94
|
-
return withPseudo(`before${config('separator')}${className}`, '::before');
|
|
95
|
-
});
|
|
96
|
-
}, {
|
|
97
|
-
withRule: (rule)=>{
|
|
60
|
+
addVariant('file', '&::file-selector-button');
|
|
61
|
+
addVariant('before', ({ container })=>{
|
|
62
|
+
container.walkRules((rule)=>{
|
|
98
63
|
let foundContent = false;
|
|
99
64
|
rule.walkDecls('content', ()=>{
|
|
100
65
|
foundContent = true;
|
|
@@ -102,17 +67,14 @@ var _default = {
|
|
|
102
67
|
if (!foundContent) {
|
|
103
68
|
rule.prepend(_postcss.default.decl({
|
|
104
69
|
prop: 'content',
|
|
105
|
-
value: '
|
|
70
|
+
value: 'var(--tw-content)'
|
|
106
71
|
}));
|
|
107
72
|
}
|
|
108
|
-
}
|
|
109
|
-
}));
|
|
110
|
-
addVariant('after', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
111
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
112
|
-
return withPseudo(`after${config('separator')}${className}`, '::after');
|
|
113
73
|
});
|
|
114
|
-
|
|
115
|
-
|
|
74
|
+
return '&::before';
|
|
75
|
+
});
|
|
76
|
+
addVariant('after', ({ container })=>{
|
|
77
|
+
container.walkRules((rule)=>{
|
|
116
78
|
let foundContent = false;
|
|
117
79
|
rule.walkDecls('content', ()=>{
|
|
118
80
|
foundContent = true;
|
|
@@ -120,13 +82,14 @@ var _default = {
|
|
|
120
82
|
if (!foundContent) {
|
|
121
83
|
rule.prepend(_postcss.default.decl({
|
|
122
84
|
prop: 'content',
|
|
123
|
-
value: '
|
|
85
|
+
value: 'var(--tw-content)'
|
|
124
86
|
}));
|
|
125
87
|
}
|
|
126
|
-
}
|
|
127
|
-
|
|
88
|
+
});
|
|
89
|
+
return '&::after';
|
|
90
|
+
});
|
|
128
91
|
},
|
|
129
|
-
pseudoClassVariants: ({
|
|
92
|
+
pseudoClassVariants: ({ addVariant })=>{
|
|
130
93
|
let pseudoVariants = [
|
|
131
94
|
// Positional
|
|
132
95
|
[
|
|
@@ -180,133 +143,71 @@ var _default = {
|
|
|
180
143
|
'focus-visible',
|
|
181
144
|
'active',
|
|
182
145
|
'disabled',
|
|
183
|
-
]
|
|
184
|
-
for (let variant of pseudoVariants){
|
|
185
|
-
let [variantName, state] = Array.isArray(variant) ? variant : [
|
|
146
|
+
].map((variant)=>Array.isArray(variant) ? variant : [
|
|
186
147
|
variant,
|
|
187
148
|
`:${variant}`
|
|
188
|
-
]
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
} else if (state.startsWith('[')) {
|
|
193
|
-
return withAttr(`${variantName}${config('separator')}${className}`, state);
|
|
194
|
-
}
|
|
195
|
-
}));
|
|
149
|
+
]
|
|
150
|
+
);
|
|
151
|
+
for (let [variantName, state] of pseudoVariants){
|
|
152
|
+
addVariant(variantName, `&${state}`);
|
|
196
153
|
}
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
let [variantName, state] = Array.isArray(variant1) ? variant1 : [
|
|
200
|
-
variant1,
|
|
201
|
-
`:${variant1}`
|
|
202
|
-
];
|
|
203
|
-
let groupVariantName = `group-${variantName}`;
|
|
204
|
-
addVariant(groupVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
205
|
-
let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
|
|
206
|
-
if (`.${className}` === groupMarker) return className;
|
|
207
|
-
return `${groupVariantName}${config('separator')}${className}`;
|
|
208
|
-
});
|
|
209
|
-
if (variantSelector === selector) {
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
return (0, _pluginUtils).applyStateToMarker(variantSelector, groupMarker, state, (marker, selector)=>`${marker} ${selector}`
|
|
213
|
-
);
|
|
214
|
-
}));
|
|
154
|
+
for (let [variantName1, state1] of pseudoVariants){
|
|
155
|
+
addVariant(`group-${variantName1}`, `:merge(.group)${state1} &`);
|
|
215
156
|
}
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
let [variantName, state] = Array.isArray(variant2) ? variant2 : [
|
|
219
|
-
variant2,
|
|
220
|
-
`:${variant2}`
|
|
221
|
-
];
|
|
222
|
-
let peerVariantName = `peer-${variantName}`;
|
|
223
|
-
addVariant(peerVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
224
|
-
let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
|
|
225
|
-
if (`.${className}` === peerMarker) return className;
|
|
226
|
-
return `${peerVariantName}${config('separator')}${className}`;
|
|
227
|
-
});
|
|
228
|
-
if (variantSelector === selector) {
|
|
229
|
-
return null;
|
|
230
|
-
}
|
|
231
|
-
return (0, _pluginUtils).applyStateToMarker(variantSelector, peerMarker, state, (marker, selector)=>selector.trim().startsWith('~') ? `${marker}${selector}` : `${marker} ~ ${selector}`
|
|
232
|
-
);
|
|
233
|
-
}));
|
|
157
|
+
for (let [variantName2, state2] of pseudoVariants){
|
|
158
|
+
addVariant(`peer-${variantName2}`, `:merge(.peer)${state2} ~ &`);
|
|
234
159
|
}
|
|
235
160
|
},
|
|
236
|
-
directionVariants: ({
|
|
237
|
-
addVariant('ltr', (
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
)
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
addVariant('motion-
|
|
254
|
-
|
|
255
|
-
}, {
|
|
256
|
-
wrap: ()=>_postcss.default.atRule({
|
|
257
|
-
name: 'media',
|
|
258
|
-
params: '(prefers-reduced-motion: reduce)'
|
|
259
|
-
})
|
|
260
|
-
}));
|
|
161
|
+
directionVariants: ({ addVariant })=>{
|
|
162
|
+
addVariant('ltr', ()=>{
|
|
163
|
+
_log.default.warn('rtl-experimental', [
|
|
164
|
+
'The RTL features in Tailwind CSS are currently in preview.',
|
|
165
|
+
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
166
|
+
]);
|
|
167
|
+
return '[dir="ltr"] &';
|
|
168
|
+
});
|
|
169
|
+
addVariant('rtl', ()=>{
|
|
170
|
+
_log.default.warn('rtl-experimental', [
|
|
171
|
+
'The RTL features in Tailwind CSS are currently in preview.',
|
|
172
|
+
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
173
|
+
]);
|
|
174
|
+
return '[dir="rtl"] &';
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
reducedMotionVariants: ({ addVariant })=>{
|
|
178
|
+
addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)');
|
|
179
|
+
addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)');
|
|
261
180
|
},
|
|
262
181
|
darkVariants: ({ config , addVariant })=>{
|
|
263
182
|
let mode = config('darkMode', 'media');
|
|
264
183
|
if (mode === false) {
|
|
265
184
|
mode = 'media';
|
|
266
|
-
_log.default.warn([
|
|
267
|
-
'`darkMode` is set to `false
|
|
268
|
-
'
|
|
185
|
+
_log.default.warn('darkmode-false', [
|
|
186
|
+
'The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.',
|
|
187
|
+
'Change `darkMode` to `media` or remove it entirely.',
|
|
269
188
|
]);
|
|
270
189
|
}
|
|
271
190
|
if (mode === 'class') {
|
|
272
|
-
addVariant('dark',
|
|
273
|
-
let variantSelector = (0, _pluginUtils).updateLastClasses(selector, (className)=>{
|
|
274
|
-
return `dark${config('separator')}${className}`;
|
|
275
|
-
});
|
|
276
|
-
if (variantSelector === selector) {
|
|
277
|
-
return null;
|
|
278
|
-
}
|
|
279
|
-
let darkSelector = (0, _prefixSelector).default(config('prefix'), `.dark`);
|
|
280
|
-
return `${darkSelector} ${variantSelector}`;
|
|
281
|
-
}));
|
|
191
|
+
addVariant('dark', '.dark &');
|
|
282
192
|
} else if (mode === 'media') {
|
|
283
|
-
addVariant('dark', (
|
|
284
|
-
return `dark${config('separator')}${className}`;
|
|
285
|
-
}, {
|
|
286
|
-
wrap: ()=>_postcss.default.atRule({
|
|
287
|
-
name: 'media',
|
|
288
|
-
params: '(prefers-color-scheme: dark)'
|
|
289
|
-
})
|
|
290
|
-
}));
|
|
193
|
+
addVariant('dark', '@media (prefers-color-scheme: dark)');
|
|
291
194
|
}
|
|
292
195
|
},
|
|
293
|
-
|
|
196
|
+
printVariant: ({ addVariant })=>{
|
|
197
|
+
addVariant('print', '@media print');
|
|
198
|
+
},
|
|
199
|
+
screenVariants: ({ theme , addVariant })=>{
|
|
294
200
|
for(let screen in theme('screens')){
|
|
295
201
|
let size = theme('screens')[screen];
|
|
296
202
|
let query = (0, _buildMediaQuery).default(size);
|
|
297
|
-
addVariant(screen,
|
|
298
|
-
return `${screen}${config('separator')}${className}`;
|
|
299
|
-
}, {
|
|
300
|
-
wrap: ()=>_postcss.default.atRule({
|
|
301
|
-
name: 'media',
|
|
302
|
-
params: query
|
|
303
|
-
})
|
|
304
|
-
}));
|
|
203
|
+
addVariant(screen, `@media ${query}`);
|
|
305
204
|
}
|
|
306
|
-
}
|
|
307
|
-
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
exports.variantPlugins = variantPlugins;
|
|
208
|
+
let corePlugins1 = {
|
|
308
209
|
preflight: ({ addBase })=>{
|
|
309
|
-
let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(
|
|
210
|
+
let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(path.join(__dirname, './css/preflight.css'), 'utf8'));
|
|
310
211
|
addBase([
|
|
311
212
|
_postcss.default.comment({
|
|
312
213
|
text: `! tailwindcss v${_packageJson.version} | MIT License | https://tailwindcss.com`
|
|
@@ -315,8 +216,8 @@ var _default = {
|
|
|
315
216
|
]);
|
|
316
217
|
},
|
|
317
218
|
container: (()=>{
|
|
318
|
-
function extractMinWidths(
|
|
319
|
-
return Object.values(
|
|
219
|
+
function extractMinWidths(breakpoints1) {
|
|
220
|
+
return Object.values(breakpoints1 !== null && breakpoints1 !== void 0 ? breakpoints1 : {
|
|
320
221
|
}).flatMap((breakpoints)=>{
|
|
321
222
|
if (typeof breakpoints === 'string') {
|
|
322
223
|
breakpoints = {
|
|
@@ -528,7 +429,9 @@ var _default = {
|
|
|
528
429
|
]
|
|
529
430
|
],
|
|
530
431
|
],
|
|
531
|
-
]
|
|
432
|
+
], {
|
|
433
|
+
supportsNegativeValues: true
|
|
434
|
+
}),
|
|
532
435
|
isolation: ({ addUtilities })=>{
|
|
533
436
|
addUtilities({
|
|
534
437
|
'.isolate': {
|
|
@@ -546,8 +449,12 @@ var _default = {
|
|
|
546
449
|
'zIndex'
|
|
547
450
|
]
|
|
548
451
|
]
|
|
549
|
-
]
|
|
550
|
-
|
|
452
|
+
], {
|
|
453
|
+
supportsNegativeValues: true
|
|
454
|
+
}),
|
|
455
|
+
order: (0, _createUtilityPlugin).default('order', undefined, {
|
|
456
|
+
supportsNegativeValues: true
|
|
457
|
+
}),
|
|
551
458
|
gridColumn: (0, _createUtilityPlugin).default('gridColumn', [
|
|
552
459
|
[
|
|
553
460
|
'col',
|
|
@@ -674,7 +581,9 @@ var _default = {
|
|
|
674
581
|
]
|
|
675
582
|
],
|
|
676
583
|
],
|
|
677
|
-
]
|
|
584
|
+
], {
|
|
585
|
+
supportsNegativeValues: true
|
|
586
|
+
}),
|
|
678
587
|
boxSizing: ({ addUtilities })=>{
|
|
679
588
|
addUtilities({
|
|
680
589
|
'.box-border': {
|
|
@@ -815,7 +724,13 @@ var _default = {
|
|
|
815
724
|
[
|
|
816
725
|
'flex-shrink'
|
|
817
726
|
]
|
|
818
|
-
]
|
|
727
|
+
],
|
|
728
|
+
[
|
|
729
|
+
'shrink',
|
|
730
|
+
[
|
|
731
|
+
'flex-shrink'
|
|
732
|
+
]
|
|
733
|
+
],
|
|
819
734
|
]),
|
|
820
735
|
flexGrow: (0, _createUtilityPlugin).default('flexGrow', [
|
|
821
736
|
[
|
|
@@ -823,6 +738,20 @@ var _default = {
|
|
|
823
738
|
[
|
|
824
739
|
'flex-grow'
|
|
825
740
|
]
|
|
741
|
+
],
|
|
742
|
+
[
|
|
743
|
+
'grow',
|
|
744
|
+
[
|
|
745
|
+
'flex-grow'
|
|
746
|
+
]
|
|
747
|
+
],
|
|
748
|
+
]),
|
|
749
|
+
flexBasis: (0, _createUtilityPlugin).default('flexBasis', [
|
|
750
|
+
[
|
|
751
|
+
'basis',
|
|
752
|
+
[
|
|
753
|
+
'flex-basis'
|
|
754
|
+
]
|
|
826
755
|
]
|
|
827
756
|
]),
|
|
828
757
|
tableLayout: ({ addUtilities })=>{
|
|
@@ -886,7 +815,9 @@ var _default = {
|
|
|
886
815
|
],
|
|
887
816
|
],
|
|
888
817
|
],
|
|
889
|
-
]
|
|
818
|
+
], {
|
|
819
|
+
supportsNegativeValues: true
|
|
820
|
+
}),
|
|
890
821
|
rotate: (0, _createUtilityPlugin).default('rotate', [
|
|
891
822
|
[
|
|
892
823
|
'rotate',
|
|
@@ -901,9 +832,11 @@ var _default = {
|
|
|
901
832
|
'transform',
|
|
902
833
|
'var(--tw-transform)'
|
|
903
834
|
]
|
|
904
|
-
]
|
|
835
|
+
],
|
|
905
836
|
],
|
|
906
|
-
]
|
|
837
|
+
], {
|
|
838
|
+
supportsNegativeValues: true
|
|
839
|
+
}),
|
|
907
840
|
skew: (0, _createUtilityPlugin).default('skew', [
|
|
908
841
|
[
|
|
909
842
|
[
|
|
@@ -937,7 +870,9 @@ var _default = {
|
|
|
937
870
|
],
|
|
938
871
|
],
|
|
939
872
|
],
|
|
940
|
-
]
|
|
873
|
+
], {
|
|
874
|
+
supportsNegativeValues: true
|
|
875
|
+
}),
|
|
941
876
|
scale: (0, _createUtilityPlugin).default('scale', [
|
|
942
877
|
[
|
|
943
878
|
'scale',
|
|
@@ -1049,31 +984,26 @@ var _default = {
|
|
|
1049
984
|
}).map(([key, value])=>{
|
|
1050
985
|
return [
|
|
1051
986
|
key,
|
|
1052
|
-
|
|
1053
|
-
{
|
|
1054
|
-
|
|
1055
|
-
}
|
|
1056
|
-
]
|
|
987
|
+
{
|
|
988
|
+
[`@keyframes ${prefixName(key)}`]: value
|
|
989
|
+
}
|
|
1057
990
|
];
|
|
1058
991
|
}));
|
|
1059
992
|
matchUtilities({
|
|
1060
|
-
animate: (
|
|
1061
|
-
let animations = (0, _parseAnimationValue).default(
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
})
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
return value.replace(name, prefixName(name));
|
|
1075
|
-
}).join(', ')
|
|
1076
|
-
};
|
|
993
|
+
animate: (value1)=>{
|
|
994
|
+
let animations = (0, _parseAnimationValue).default(value1);
|
|
995
|
+
return [
|
|
996
|
+
...animations.flatMap((animation)=>keyframes[animation.name]
|
|
997
|
+
),
|
|
998
|
+
{
|
|
999
|
+
animation: animations.map(({ name , value })=>{
|
|
1000
|
+
if (name === undefined || keyframes[name] === undefined) {
|
|
1001
|
+
return value;
|
|
1002
|
+
}
|
|
1003
|
+
return value.replace(name, prefixName(name));
|
|
1004
|
+
}).join(', ')
|
|
1005
|
+
},
|
|
1006
|
+
];
|
|
1077
1007
|
}
|
|
1078
1008
|
}, {
|
|
1079
1009
|
values: theme('animation')
|
|
@@ -1254,7 +1184,9 @@ var _default = {
|
|
|
1254
1184
|
]
|
|
1255
1185
|
],
|
|
1256
1186
|
],
|
|
1257
|
-
]
|
|
1187
|
+
], {
|
|
1188
|
+
supportsNegativeValues: true
|
|
1189
|
+
}),
|
|
1258
1190
|
scrollPadding: (0, _createUtilityPlugin).default('scrollPadding', [
|
|
1259
1191
|
[
|
|
1260
1192
|
'scroll-p',
|
|
@@ -1652,7 +1584,8 @@ var _default = {
|
|
|
1652
1584
|
};
|
|
1653
1585
|
}
|
|
1654
1586
|
}, {
|
|
1655
|
-
values: theme('space')
|
|
1587
|
+
values: theme('space'),
|
|
1588
|
+
supportsNegativeValues: true
|
|
1656
1589
|
});
|
|
1657
1590
|
addUtilities({
|
|
1658
1591
|
'.space-y-reverse > :not([hidden]) ~ :not([hidden])': {
|
|
@@ -2602,7 +2535,9 @@ var _default = {
|
|
|
2602
2535
|
'text-indent'
|
|
2603
2536
|
]
|
|
2604
2537
|
]
|
|
2605
|
-
]
|
|
2538
|
+
], {
|
|
2539
|
+
supportsNegativeValues: true
|
|
2540
|
+
}),
|
|
2606
2541
|
verticalAlign: ({ addUtilities , matchUtilities })=>{
|
|
2607
2542
|
addUtilities({
|
|
2608
2543
|
'.align-baseline': {
|
|
@@ -2722,40 +2657,64 @@ var _default = {
|
|
|
2722
2657
|
},
|
|
2723
2658
|
fontVariantNumeric: ({ addUtilities })=>{
|
|
2724
2659
|
addUtilities({
|
|
2725
|
-
'
|
|
2660
|
+
'@defaults font-variant-numeric': {
|
|
2726
2661
|
'--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2727
2662
|
'--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2728
2663
|
'--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2729
2664
|
'--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2730
2665
|
'--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2731
|
-
'font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
2666
|
+
'--tw-font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
2732
2667
|
},
|
|
2733
2668
|
'.normal-nums': {
|
|
2734
2669
|
'font-variant-numeric': 'normal'
|
|
2735
2670
|
},
|
|
2736
2671
|
'.ordinal': {
|
|
2737
|
-
'
|
|
2672
|
+
'@defaults font-variant-numeric': {
|
|
2673
|
+
},
|
|
2674
|
+
'--tw-ordinal': 'ordinal',
|
|
2675
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2738
2676
|
},
|
|
2739
2677
|
'.slashed-zero': {
|
|
2740
|
-
'
|
|
2678
|
+
'@defaults font-variant-numeric': {
|
|
2679
|
+
},
|
|
2680
|
+
'--tw-slashed-zero': 'slashed-zero',
|
|
2681
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2741
2682
|
},
|
|
2742
2683
|
'.lining-nums': {
|
|
2743
|
-
'
|
|
2684
|
+
'@defaults font-variant-numeric': {
|
|
2685
|
+
},
|
|
2686
|
+
'--tw-numeric-figure': 'lining-nums',
|
|
2687
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2744
2688
|
},
|
|
2745
2689
|
'.oldstyle-nums': {
|
|
2746
|
-
'
|
|
2690
|
+
'@defaults font-variant-numeric': {
|
|
2691
|
+
},
|
|
2692
|
+
'--tw-numeric-figure': 'oldstyle-nums',
|
|
2693
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2747
2694
|
},
|
|
2748
2695
|
'.proportional-nums': {
|
|
2749
|
-
'
|
|
2696
|
+
'@defaults font-variant-numeric': {
|
|
2697
|
+
},
|
|
2698
|
+
'--tw-numeric-spacing': 'proportional-nums',
|
|
2699
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2750
2700
|
},
|
|
2751
2701
|
'.tabular-nums': {
|
|
2752
|
-
'
|
|
2702
|
+
'@defaults font-variant-numeric': {
|
|
2703
|
+
},
|
|
2704
|
+
'--tw-numeric-spacing': 'tabular-nums',
|
|
2705
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2753
2706
|
},
|
|
2754
2707
|
'.diagonal-fractions': {
|
|
2755
|
-
'
|
|
2708
|
+
'@defaults font-variant-numeric': {
|
|
2709
|
+
},
|
|
2710
|
+
'--tw-numeric-fraction': 'diagonal-fractions',
|
|
2711
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2756
2712
|
},
|
|
2757
2713
|
'.stacked-fractions': {
|
|
2758
|
-
'
|
|
2714
|
+
'@defaults font-variant-numeric': {
|
|
2715
|
+
},
|
|
2716
|
+
'--tw-numeric-fraction': 'stacked-fractions',
|
|
2717
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2759
2718
|
}
|
|
2760
2719
|
});
|
|
2761
2720
|
},
|
|
@@ -2774,7 +2733,9 @@ var _default = {
|
|
|
2774
2733
|
'letterSpacing'
|
|
2775
2734
|
]
|
|
2776
2735
|
]
|
|
2777
|
-
]
|
|
2736
|
+
], {
|
|
2737
|
+
supportsNegativeValues: true
|
|
2738
|
+
}),
|
|
2778
2739
|
textColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2779
2740
|
matchUtilities({
|
|
2780
2741
|
text: (value)=>{
|
|
@@ -2815,6 +2776,21 @@ var _default = {
|
|
|
2815
2776
|
}
|
|
2816
2777
|
});
|
|
2817
2778
|
},
|
|
2779
|
+
textDecorationColor: ({ matchUtilities , theme })=>{
|
|
2780
|
+
matchUtilities({
|
|
2781
|
+
decoration: (value)=>{
|
|
2782
|
+
return {
|
|
2783
|
+
'text-decoration-color': (0, _toColorValue).default(value)
|
|
2784
|
+
};
|
|
2785
|
+
}
|
|
2786
|
+
}, {
|
|
2787
|
+
values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
|
|
2788
|
+
type: [
|
|
2789
|
+
'color',
|
|
2790
|
+
'any'
|
|
2791
|
+
]
|
|
2792
|
+
});
|
|
2793
|
+
},
|
|
2818
2794
|
fontSmoothing: ({ addUtilities })=>{
|
|
2819
2795
|
addUtilities({
|
|
2820
2796
|
'.antialiased': {
|
|
@@ -3020,38 +2996,115 @@ var _default = {
|
|
|
3020
2996
|
'@defaults box-shadow': {
|
|
3021
2997
|
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
3022
2998
|
'--tw-ring-shadow': '0 0 #0000',
|
|
3023
|
-
'--tw-shadow': '0 0 #0000'
|
|
2999
|
+
'--tw-shadow': '0 0 #0000',
|
|
3000
|
+
'--tw-shadow-colored': '0 0 #0000'
|
|
3024
3001
|
}
|
|
3025
3002
|
});
|
|
3026
3003
|
matchUtilities({
|
|
3027
3004
|
shadow: (value)=>{
|
|
3028
3005
|
value = transformValue(value);
|
|
3006
|
+
let ast = (0, _parseBoxShadowValue).parseBoxShadowValue(value);
|
|
3007
|
+
for (let shadow of ast){
|
|
3008
|
+
// Don't override color if the whole shadow is a variable
|
|
3009
|
+
if (!shadow.valid) {
|
|
3010
|
+
continue;
|
|
3011
|
+
}
|
|
3012
|
+
shadow.color = 'var(--tw-shadow-color)';
|
|
3013
|
+
}
|
|
3029
3014
|
return {
|
|
3030
3015
|
'@defaults box-shadow': {
|
|
3031
3016
|
},
|
|
3032
3017
|
'--tw-shadow': value === 'none' ? '0 0 #0000' : value,
|
|
3018
|
+
'--tw-shadow-colored': value === 'none' ? '0 0 #0000' : (0, _parseBoxShadowValue).formatBoxShadowValue(ast),
|
|
3033
3019
|
'box-shadow': defaultBoxShadow
|
|
3034
3020
|
};
|
|
3035
3021
|
}
|
|
3036
3022
|
}, {
|
|
3037
|
-
values: theme('boxShadow')
|
|
3023
|
+
values: theme('boxShadow'),
|
|
3024
|
+
type: [
|
|
3025
|
+
'shadow'
|
|
3026
|
+
]
|
|
3038
3027
|
});
|
|
3039
3028
|
};
|
|
3040
3029
|
})(),
|
|
3041
|
-
|
|
3030
|
+
boxShadowColor: ({ matchUtilities , theme })=>{
|
|
3031
|
+
matchUtilities({
|
|
3032
|
+
shadow: (value)=>{
|
|
3033
|
+
return {
|
|
3034
|
+
'--tw-shadow-color': (0, _toColorValue).default(value),
|
|
3035
|
+
'--tw-shadow': 'var(--tw-shadow-colored)'
|
|
3036
|
+
};
|
|
3037
|
+
}
|
|
3038
|
+
}, {
|
|
3039
|
+
values: (0, _flattenColorPalette).default(theme('boxShadowColor')),
|
|
3040
|
+
type: [
|
|
3041
|
+
'color'
|
|
3042
|
+
]
|
|
3043
|
+
});
|
|
3044
|
+
},
|
|
3045
|
+
outlineStyle: ({ addUtilities })=>{
|
|
3046
|
+
addUtilities({
|
|
3047
|
+
'.outline-none': {
|
|
3048
|
+
outline: '2px solid transparent',
|
|
3049
|
+
'outline-offset': '2px'
|
|
3050
|
+
},
|
|
3051
|
+
'.outline': {
|
|
3052
|
+
'outline-style': 'solid'
|
|
3053
|
+
},
|
|
3054
|
+
'.outline-dashed': {
|
|
3055
|
+
'outline-style': 'dashed'
|
|
3056
|
+
},
|
|
3057
|
+
'.outline-dotted': {
|
|
3058
|
+
'outline-style': 'dotted'
|
|
3059
|
+
},
|
|
3060
|
+
'.outline-double': {
|
|
3061
|
+
'outline-style': 'double'
|
|
3062
|
+
},
|
|
3063
|
+
'.outline-hidden': {
|
|
3064
|
+
'outline-style': 'hidden'
|
|
3065
|
+
}
|
|
3066
|
+
});
|
|
3067
|
+
},
|
|
3068
|
+
outlineWidth: (0, _createUtilityPlugin).default('outlineWidth', [
|
|
3069
|
+
[
|
|
3070
|
+
'outline',
|
|
3071
|
+
[
|
|
3072
|
+
'outline-width'
|
|
3073
|
+
]
|
|
3074
|
+
]
|
|
3075
|
+
], {
|
|
3076
|
+
type: [
|
|
3077
|
+
'length',
|
|
3078
|
+
'number',
|
|
3079
|
+
'percentage'
|
|
3080
|
+
]
|
|
3081
|
+
}),
|
|
3082
|
+
outlineOffset: (0, _createUtilityPlugin).default('outlineOffset', [
|
|
3083
|
+
[
|
|
3084
|
+
'outline-offset',
|
|
3085
|
+
[
|
|
3086
|
+
'outline-offset'
|
|
3087
|
+
]
|
|
3088
|
+
]
|
|
3089
|
+
], {
|
|
3090
|
+
type: [
|
|
3091
|
+
'length',
|
|
3092
|
+
'number',
|
|
3093
|
+
'percentage'
|
|
3094
|
+
]
|
|
3095
|
+
}),
|
|
3096
|
+
outlineColor: ({ matchUtilities , theme })=>{
|
|
3042
3097
|
matchUtilities({
|
|
3043
3098
|
outline: (value)=>{
|
|
3044
|
-
value = Array.isArray(value) ? value : value.split(',');
|
|
3045
|
-
let [outline, outlineOffset = '0'] = Array.isArray(value) ? value : [
|
|
3046
|
-
value
|
|
3047
|
-
];
|
|
3048
3099
|
return {
|
|
3049
|
-
outline,
|
|
3050
|
-
'outline-offset': outlineOffset
|
|
3100
|
+
'outline-color': (0, _toColorValue).default(value)
|
|
3051
3101
|
};
|
|
3052
3102
|
}
|
|
3053
3103
|
}, {
|
|
3054
|
-
values: theme('
|
|
3104
|
+
values: (0, _flattenColorPalette).default(theme('outlineColor')),
|
|
3105
|
+
type: [
|
|
3106
|
+
'color'
|
|
3107
|
+
]
|
|
3055
3108
|
});
|
|
3056
3109
|
},
|
|
3057
3110
|
ringWidth: ({ matchUtilities , addBase , addUtilities , theme })=>{
|
|
@@ -3065,7 +3118,8 @@ var _default = {
|
|
|
3065
3118
|
'--tw-ring-color': ringColorDefault,
|
|
3066
3119
|
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
3067
3120
|
'--tw-ring-shadow': '0 0 #0000',
|
|
3068
|
-
'--tw-shadow': '0 0 #0000'
|
|
3121
|
+
'--tw-shadow': '0 0 #0000',
|
|
3122
|
+
'--tw-shadow-colored': '0 0 #0000'
|
|
3069
3123
|
}
|
|
3070
3124
|
});
|
|
3071
3125
|
matchUtilities({
|
|
@@ -3223,7 +3277,8 @@ var _default = {
|
|
|
3223
3277
|
};
|
|
3224
3278
|
}
|
|
3225
3279
|
}, {
|
|
3226
|
-
values: theme('hueRotate')
|
|
3280
|
+
values: theme('hueRotate'),
|
|
3281
|
+
supportsNegativeValues: true
|
|
3227
3282
|
});
|
|
3228
3283
|
},
|
|
3229
3284
|
invert: ({ matchUtilities , theme })=>{
|
|
@@ -3371,7 +3426,8 @@ var _default = {
|
|
|
3371
3426
|
};
|
|
3372
3427
|
}
|
|
3373
3428
|
}, {
|
|
3374
|
-
values: theme('backdropHueRotate')
|
|
3429
|
+
values: theme('backdropHueRotate'),
|
|
3430
|
+
supportsNegativeValues: true
|
|
3375
3431
|
});
|
|
3376
3432
|
},
|
|
3377
3433
|
backdropInvert: ({ matchUtilities , theme })=>{
|
|
@@ -3520,6 +3576,17 @@ var _default = {
|
|
|
3520
3576
|
]
|
|
3521
3577
|
]
|
|
3522
3578
|
]),
|
|
3523
|
-
content: (0, _createUtilityPlugin).default('content'
|
|
3579
|
+
content: (0, _createUtilityPlugin).default('content', [
|
|
3580
|
+
[
|
|
3581
|
+
'content',
|
|
3582
|
+
[
|
|
3583
|
+
'--tw-content',
|
|
3584
|
+
[
|
|
3585
|
+
'content',
|
|
3586
|
+
'var(--tw-content)'
|
|
3587
|
+
]
|
|
3588
|
+
]
|
|
3589
|
+
],
|
|
3590
|
+
])
|
|
3524
3591
|
};
|
|
3525
|
-
exports.
|
|
3592
|
+
exports.corePlugins = corePlugins1;
|