1 | function _nullishCoalesce$6(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$9(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
2 |
|
3 |
|
4 |
|
5 | function toArray(v) {
|
6 | if (Array.isArray(v))
|
7 | return v;
|
8 | return [v];
|
9 | }
|
10 |
|
11 | function hash(str) {
|
12 | str = str.replace(/\r/g, '');
|
13 | let hash = 5381;
|
14 | let i = str.length;
|
15 |
|
16 | while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
|
17 | return (hash >>> 0).toString(36);
|
18 | }
|
19 |
|
20 | function indent(code, tab = 2) {
|
21 | const spaces = Array(tab).fill(' ').join('');
|
22 | return code
|
23 | .split('\n')
|
24 | .map((line) => spaces + line)
|
25 | .join('\n');
|
26 | }
|
27 |
|
28 | function wrapit(
|
29 | code,
|
30 | start = '{',
|
31 | end = '}',
|
32 | tab = 2,
|
33 | minify = false
|
34 | ) {
|
35 | if (minify) return `${start}${code}${end}`;
|
36 | return `${start}\n${indent(code, tab)}\n${end}`;
|
37 | }
|
38 |
|
39 | function isNumber(
|
40 | amount,
|
41 | start = -Infinity,
|
42 | end = Infinity,
|
43 | type = 'int'
|
44 | ) {
|
45 | const isInt = /^-?\d+$/.test(amount);
|
46 | if (type === 'int') {
|
47 | if (!isInt) return false;
|
48 | } else {
|
49 | const isFloat = /^-?\d+\.\d+$/.test(amount);
|
50 | if (!(isInt || isFloat)) return false;
|
51 | }
|
52 | const num = parseFloat(amount);
|
53 | return num >= start && num <= end;
|
54 | }
|
55 |
|
56 | function isFraction(amount) {
|
57 | return /^\d+\/\d+$/.test(amount);
|
58 | }
|
59 |
|
60 | function isSize(amount) {
|
61 | return /^-?(\d+(\.\d+)?)+(rem|em|px|rpx|vh|vw|ch|ex)$/.test(amount);
|
62 | }
|
63 |
|
64 | function isSpace(str) {
|
65 | return /^\s*$/.test(str);
|
66 | }
|
67 |
|
68 | function roundUp(num, precision = 0) {
|
69 | precision = Math.pow(10, precision);
|
70 | return Math.round(num * precision) / precision;
|
71 | }
|
72 |
|
73 | function fracToPercent(amount) {
|
74 | const matches = amount.match(/[^/]+/g);
|
75 | if (!matches || matches.length < 2) return;
|
76 | const a = +matches[0];
|
77 | const b = +matches[1];
|
78 | return roundUp((a / b) * 100, 6) + '%';
|
79 | }
|
80 |
|
81 | function hex2RGB(hex) {
|
82 | const RGB_HEX = /^#?(?:([\da-f]{3})[\da-f]?|([\da-f]{6})(?:[\da-f]{2})?)$/i;
|
83 | const [, short, long] = String(hex).match(RGB_HEX) || [];
|
84 |
|
85 | if (long) {
|
86 | const value = Number.parseInt(long, 16);
|
87 | return [value >> 16, (value >> 8) & 0xff, value & 0xff];
|
88 | } else if (short) {
|
89 | return Array.from(short, (s) => Number.parseInt(s, 16)).map(
|
90 | (n) => (n << 4) | n
|
91 | );
|
92 | }
|
93 | }
|
94 |
|
95 | function camelToDash(str) {
|
96 |
|
97 | return str.replace(/([A-Z])/g, '-$1').replace(/^ms-/, '-ms-').toLowerCase();
|
98 | }
|
99 |
|
100 | function dashToCamel(str) {
|
101 | if (!/-/.test(str)) return str;
|
102 | return str.toLowerCase().replace(/-(.)/g, (_, group) => group.toUpperCase());
|
103 | }
|
104 |
|
105 |
|
106 | function getNestedValue(obj, key) {
|
107 | const topKey = key.match(/^[^.[]+/);
|
108 | if (!topKey) return;
|
109 | let topValue = obj[topKey[0]];
|
110 | if (!topValue) return;
|
111 | let index = topKey[0].length;
|
112 | while(index < key.length) {
|
113 | const square = key.slice(index, ).match(/\[[^\s\]]+?\]/);
|
114 | const dot = key.slice(index, ).match(/\.[^.[]+$|\.[^.[]+(?=\.)/);
|
115 | if (( !square && !dot ) || ( _optionalChain$9([square, 'optionalAccess', _2 => _2.index]) === undefined && _optionalChain$9([dot, 'optionalAccess', _3 => _3.index]) === undefined )) return topValue;
|
116 | if (typeof topValue !== 'object') return;
|
117 | if (dot && dot.index !== undefined && (_optionalChain$9([square, 'optionalAccess', _4 => _4.index]) === undefined || dot.index < square.index)) {
|
118 | const arg = dot[0].slice(1,);
|
119 | topValue = topValue[arg];
|
120 | index += dot.index + dot[0].length;
|
121 | } else if (square && square.index !== undefined) {
|
122 | const arg = square[0].slice(1, -1).trim().replace(/^['"]+|['"]+$/g, '');
|
123 | topValue = topValue[arg];
|
124 | index += square.index + square[0].length;
|
125 | }
|
126 | }
|
127 | return topValue;
|
128 | }
|
129 |
|
130 | function negateValue(value) {
|
131 | if (/(^0\w)|(^-)|(^0$)/.test(value)) return value;
|
132 | return '-' + value;
|
133 | }
|
134 |
|
135 | function searchFrom(
|
136 | text,
|
137 | target,
|
138 | startIndex = 0,
|
139 | endIndex
|
140 | ) {
|
141 |
|
142 | const subText = text.substring(startIndex, endIndex);
|
143 | const relativeIndex = subText.search(target);
|
144 | return relativeIndex === -1 ? -1 : startIndex + relativeIndex;
|
145 | }
|
146 |
|
147 | function connectList(a, b, append = true) {
|
148 | return append ? [...(_nullishCoalesce$6(a, () => ( []))), ...(_nullishCoalesce$6(b, () => ( [])))] : [...(_nullishCoalesce$6(b, () => ( []))), ...(_nullishCoalesce$6(a, () => ( [])))];
|
149 | }
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 | function toType(
|
158 | value,
|
159 | type
|
160 | ) {
|
161 | switch (type) {
|
162 | case 'object':
|
163 | return value && typeof value === 'object' ? value : {};
|
164 | case 'string':
|
165 | if (typeof value === 'string') return value ;
|
166 | break;
|
167 | case 'number':
|
168 | if (typeof value === 'number') return value ;
|
169 | break;
|
170 | }
|
171 | }
|
172 |
|
173 | function deepCopy(source) {
|
174 | return Array.isArray(source)
|
175 | ? (source ).map((item) => deepCopy(item))
|
176 | : source instanceof Date
|
177 | ? new Date(source.getTime())
|
178 | : source && typeof source === 'object'
|
179 | ? Object.getOwnPropertyNames(source).reduce((o, prop) => {
|
180 | const descriptor = Object.getOwnPropertyDescriptor(source, prop);
|
181 | if (descriptor) {
|
182 | Object.defineProperty(o, prop, descriptor);
|
183 | if (source && typeof source === 'object') {
|
184 | o[prop] = deepCopy(
|
185 | ((source ) )[prop]
|
186 | );
|
187 | }
|
188 | }
|
189 | return o;
|
190 | }, Object.create(Object.getPrototypeOf(source)))
|
191 | : (source );
|
192 | }
|
193 |
|
194 | function isTagName(name) {
|
195 | return ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embd', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr'].includes(name);
|
196 | }
|
197 |
|
198 | function flatColors(colors, head) {
|
199 | let flatten = {};
|
200 | for (const [key, value] of Object.entries(colors)) {
|
201 | if (typeof value === 'string' || typeof value === 'function') {
|
202 | flatten[(head && key === 'DEFAULT') ? head : head ? `${head}-${key}`: key] = value;
|
203 | } else {
|
204 | flatten = { ...flatten, ...flatColors(value, head ? `${head}-${key}`: key) };
|
205 | }
|
206 | }
|
207 | return flatten;
|
208 | }
|
209 |
|
210 | function testRegexr(text, expressions) {
|
211 | for (const exp of expressions) {
|
212 | if (exp.test(text)) return true;
|
213 | }
|
214 | return false;
|
215 | }
|
216 |
|
217 | function searchPropEnd(text, startIndex = 0) {
|
218 | let index = startIndex;
|
219 | let output = -1;
|
220 | let openSingleQuote = false;
|
221 | let openDoubleQuote = false;
|
222 | let openBracket = false;
|
223 | let isEscaped = false;
|
224 | while (index < text.length) {
|
225 | switch (text.charAt(index)) {
|
226 | case '\\':
|
227 | isEscaped = !isEscaped;
|
228 | break;
|
229 | case '\'':
|
230 | if (!openDoubleQuote && !openBracket && !isEscaped) openSingleQuote = !openSingleQuote;
|
231 | isEscaped = false;
|
232 | break;
|
233 | case '"':
|
234 | if (!openSingleQuote && !openBracket && !isEscaped) openDoubleQuote = !openDoubleQuote;
|
235 | isEscaped = false;
|
236 | break;
|
237 | case '(':
|
238 | if (!openBracket && !openSingleQuote && !openDoubleQuote && !isEscaped) openBracket = true;
|
239 | isEscaped = false;
|
240 | break;
|
241 | case ')':
|
242 | if (openBracket && !isEscaped) openBracket = false;
|
243 | isEscaped = false;
|
244 | break;
|
245 | case ';':
|
246 | if (!isEscaped && !openSingleQuote && !openDoubleQuote && !openBracket) output = index;
|
247 | isEscaped = false;
|
248 | break;
|
249 | default:
|
250 | isEscaped = false;
|
251 | break;
|
252 | }
|
253 | if (output !== -1) break;
|
254 | index++;
|
255 | }
|
256 | return output;
|
257 | }
|
258 |
|
259 | function searchNotEscape(text, chars = ['{']) {
|
260 | if (!Array.isArray(chars)) chars = [ chars ];
|
261 | let i = 0;
|
262 | while (i < text.length) {
|
263 | if (chars.includes(text.charAt(i)) && text.charAt(i - 1) !== '\\') {
|
264 | return i;
|
265 | }
|
266 | i ++;
|
267 | }
|
268 | return -1;
|
269 | }
|
270 |
|
271 | function splitSelectors(selectors) {
|
272 | const splitted = [];
|
273 | let parens = 0;
|
274 | let angulars = 0;
|
275 | let soFar = '';
|
276 | for (let i = 0, len = selectors.length; i < len; i++) {
|
277 | const char = selectors[i];
|
278 | if (char === '(') {
|
279 | parens += 1;
|
280 | } else if (char === ')') {
|
281 | parens -= 1;
|
282 | } else if (char === '[') {
|
283 | angulars += 1;
|
284 | } else if (char === ']') {
|
285 | angulars -= 1;
|
286 | } else if (char === ',') {
|
287 | if (!parens && !angulars) {
|
288 | splitted.push(soFar.trim());
|
289 | soFar = '';
|
290 | continue;
|
291 | }
|
292 | }
|
293 | soFar += char;
|
294 | }
|
295 | splitted.push(soFar.trim());
|
296 | return splitted;
|
297 | }
|
298 |
|
299 | function guessClassName(selector) {
|
300 | if (selector.indexOf(',') >= 0) return splitSelectors(selector).map(i => guessClassName(i) );
|
301 |
|
302 | if (selector.charAt(0) !== '.' || searchNotEscape(selector, ['[', '>', '+', '~']) >= 0 || selector.trim().indexOf(' ') >= 0 || searchNotEscape(selector.slice(1), '.') >=0)
|
303 | return { selector, isClass: false };
|
304 | const pseudo = searchNotEscape(selector, ':');
|
305 | const className = (_optionalChain$9([selector, 'access', _5 => _5.match, 'call', _6 => _6(/^\.([\w-]|(\\\W))+/), 'optionalAccess', _7 => _7[0], 'access', _8 => _8.slice, 'call', _9 => _9(1,)]) || '').replace(/\\/g, '');
|
306 | if (pseudo === -1) return { selector: className, isClass: true };
|
307 | return { selector: className, isClass: true, pseudo: selector.slice(pseudo,) };
|
308 | }
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 | function increaseWithUnit(target, delta) {
|
319 | if (typeof target === 'number')
|
320 | return target + delta;
|
321 | const value = _optionalChain$9([target, 'access', _10 => _10.match, 'call', _11 => _11(/^-?[0-9]+\.?[0-9]*/), 'optionalAccess', _12 => _12[0]]) || '';
|
322 | const unit = target.slice(value.length);
|
323 | const result = (parseFloat(value) + delta);
|
324 | if (Number.isNaN(result))
|
325 | return target;
|
326 | return result + unit;
|
327 | }
|
328 |
|
329 |
|
330 | function splitColorGroup(color) {
|
331 | const sep = color.indexOf('/');
|
332 | if (sep === -1) return [ color, undefined ];
|
333 | return [ color.slice(0, sep), color.slice(sep+1) ];
|
334 | }
|
335 |
|
336 | function _nullishCoalesce$5(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 | class Property {
|
352 | __init() {this.meta = { type: 'utilities', group: 'plugin', order: 0, offset: 0, corePlugin: false };}
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 | constructor(
|
359 | name,
|
360 | value,
|
361 | comment,
|
362 | important = false
|
363 | ) {Property.prototype.__init.call(this);
|
364 | this.name = name;
|
365 | this.value = value;
|
366 | this.comment = comment;
|
367 | this.important = important;
|
368 | }
|
369 |
|
370 | static _singleParse(
|
371 | css
|
372 | ) {
|
373 | css = css.trim();
|
374 | if (!css) return;
|
375 | if (css.charAt(0) === '@') return InlineAtRule.parse(css);
|
376 | const split = css.search(':');
|
377 | const end = searchPropEnd(css);
|
378 | if (split === -1) return;
|
379 | let important = false;
|
380 | let prop = css.substring(split + 1, end === -1 ? undefined : end).trim();
|
381 | if (/!important;?$/.test(prop)) {
|
382 | important = true;
|
383 | prop = prop.replace(/!important/, '').trimRight();
|
384 | }
|
385 | return new Property(
|
386 | css.substring(0, split).trim(),
|
387 | prop,
|
388 | undefined,
|
389 | important
|
390 | );
|
391 | }
|
392 |
|
393 | static parse(
|
394 | css
|
395 | ) {
|
396 | if (!/;\s*$/.test(css)) css += ';';
|
397 | const properties = [];
|
398 | let index = 0;
|
399 | let end = searchPropEnd(css, index);
|
400 | while (end !== -1) {
|
401 | const parsed = this._singleParse(css.substring(searchFrom(css, /\S/, index), end + 1));
|
402 | if (parsed) properties.push(parsed);
|
403 | index = end + 1;
|
404 | end = searchPropEnd(css, index);
|
405 | }
|
406 | const count = properties.length;
|
407 | if (count > 1) return properties;
|
408 | if (count === 1) return properties[0];
|
409 | }
|
410 |
|
411 | clone() {
|
412 | return deepCopy(this);
|
413 | }
|
414 |
|
415 | toStyle(selector) {
|
416 | const style = new Style(selector, this, this.important);
|
417 | style.meta = this.meta;
|
418 | return style;
|
419 | }
|
420 |
|
421 | build(minify = false) {
|
422 | const createProperty = (name, value) => {
|
423 | if (minify) {
|
424 | return `${name}:${value}${this.important ? '!important' : ''};`;
|
425 | } else {
|
426 | const p = `${name}: ${value}${this.important ? ' !important' : ''};`;
|
427 | return this.comment ? p + ` /* ${this.comment} */` : p;
|
428 | }
|
429 | };
|
430 | if (!this.value) return '';
|
431 | return typeof this.name === 'string'
|
432 | ? createProperty(this.name, this.value)
|
433 | : this.name
|
434 | .map((i) => createProperty(i, this.value))
|
435 | .join(minify ? '' : '\n');
|
436 | }
|
437 |
|
438 | updateMeta(type, group, order, offset = 0, corePlugin = false) {
|
439 | this.meta = {
|
440 | type,
|
441 | group,
|
442 | order,
|
443 | offset,
|
444 | corePlugin,
|
445 | };
|
446 | return this;
|
447 | }
|
448 | }
|
449 |
|
450 | class InlineAtRule extends Property {
|
451 |
|
452 | constructor(name, value, important = false) {
|
453 | super(name, value, undefined, important);
|
454 | this.name = name;
|
455 | }
|
456 | static parse(css) {
|
457 | const matchName = css.match(/@[^\s;{}]+/);
|
458 | if (matchName) {
|
459 | const name = matchName[0].substring(1);
|
460 | let important = false;
|
461 | let expression =
|
462 | matchName.index !== undefined
|
463 | ? _optionalChain$8([css
|
464 | , 'access', _ => _.substring, 'call', _2 => _2(matchName.index + name.length + 1)
|
465 | , 'access', _3 => _3.match, 'call', _4 => _4(/(?:(['"]).*?\1|[^;])*/), 'optionalAccess', _5 => _5[0]
|
466 | , 'access', _6 => _6.trim, 'call', _7 => _7()])
|
467 | : undefined;
|
468 | if (expression && /!important;?$/.test(expression)) {
|
469 | important = true;
|
470 | expression = expression.replace(/!important/, '').trimRight();
|
471 | }
|
472 | return new InlineAtRule(
|
473 | name,
|
474 | expression === '' ? undefined : expression,
|
475 | important
|
476 | );
|
477 | }
|
478 | }
|
479 | build() {
|
480 | return this.value
|
481 | ? `@${this.name} ${this.value}${this.important ? ' !important' : ''};`
|
482 | : `@${this.name}${this.important ? ' !important' : ''};`;
|
483 | }
|
484 | }
|
485 |
|
486 | class Style {
|
487 | __init2() {this.meta = { type: 'components', group: 'plugin', order: 0, offset: 0, corePlugin: false };}
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 |
|
498 |
|
499 |
|
500 |
|
501 | constructor(
|
502 | selector,
|
503 | property,
|
504 | important = false
|
505 | ) {Style.prototype.__init2.call(this);
|
506 | this.selector = selector;
|
507 | this.important = important;
|
508 | this.property = toArray(property || []);
|
509 | }
|
510 |
|
511 | get rule() {
|
512 | let selectors = (_nullishCoalesce$5(this.selector, () => ( ''))).trim().split(/\s*,\s*/g);
|
513 | this._parentSelectors && (selectors = selectors.map(i => `${_optionalChain$8([this, 'access', _8 => _8._parentSelectors, 'optionalAccess', _9 => _9.join, 'call', _10 => _10(' ')])} ${i}`));
|
514 | (_nullishCoalesce$5(this._wrapSelectors, () => ( []))).forEach((func) => (selectors = selectors.map(i => func(i))));
|
515 | this._pseudoClasses && (selectors = selectors.map(i => i + `:${_optionalChain$8([this, 'access', _11 => _11._pseudoClasses, 'optionalAccess', _12 => _12.join, 'call', _13 => _13(':')])}`));
|
516 | this._pseudoElements && (selectors = selectors.map(i => i + `::${_optionalChain$8([this, 'access', _14 => _14._pseudoElements, 'optionalAccess', _15 => _15.join, 'call', _16 => _16('::')])}`));
|
517 | this._brotherSelectors && (selectors = selectors.map(i => i + `.${_optionalChain$8([this, 'access', _17 => _17._brotherSelectors, 'optionalAccess', _18 => _18.join, 'call', _19 => _19('.')])}`));
|
518 | this._childSelectors && (selectors = selectors.map(i => i + ` ${_optionalChain$8([this, 'access', _20 => _20._childSelectors, 'optionalAccess', _21 => _21.join, 'call', _22 => _22(' ')])}`));
|
519 | (_nullishCoalesce$5(this._wrapRules, () => ( []))).forEach((func) => (selectors = selectors.map(i => func(i))));
|
520 | return selectors.join(', ');
|
521 | }
|
522 |
|
523 | get pseudoClasses() {
|
524 | return this._pseudoClasses;
|
525 | }
|
526 |
|
527 | get pseudoElements() {
|
528 | return this._pseudoElements;
|
529 | }
|
530 |
|
531 | get parentSelectors() {
|
532 | return this._parentSelectors;
|
533 | }
|
534 |
|
535 | get childSelectors() {
|
536 | return this._childSelectors;
|
537 | }
|
538 |
|
539 | get brotherSelectors() {
|
540 | return this._brotherSelectors;
|
541 | }
|
542 |
|
543 | get wrapProperties() {
|
544 | return this._wrapProperties;
|
545 | }
|
546 |
|
547 | get wrapSelectors() {
|
548 | return this._wrapSelectors;
|
549 | }
|
550 |
|
551 | get wrapRules() {
|
552 | return this._wrapRules;
|
553 | }
|
554 |
|
555 | get simple() {
|
556 |
|
557 | return !(this.atRules || this._pseudoClasses || this._pseudoElements || this._parentSelectors || this._childSelectors || this._brotherSelectors || this._wrapProperties || this._wrapSelectors || this._wrapRules);
|
558 | }
|
559 |
|
560 | get isAtrule() {
|
561 | return !(this.atRules === undefined || this.atRules.length === 0);
|
562 | }
|
563 |
|
564 | static generate(
|
565 | parent,
|
566 | property,
|
567 | root,
|
568 | ) {
|
569 | if (!root)
|
570 | root = _optionalChain$8([parent, 'optionalAccess', _23 => _23.startsWith, 'call', _24 => _24('@')])
|
571 | ? new Style().atRule(parent)
|
572 | : new Style(parent);
|
573 |
|
574 | let output = [];
|
575 |
|
576 | for (const [key, value] of Object.entries(_nullishCoalesce$5(property, () => ( {})))) {
|
577 | if (typeof value === 'string') {
|
578 | root.add(new Property(camelToDash(key), value));
|
579 | } else if (Array.isArray(value)) {
|
580 | value.map(i => _optionalChain$8([root, 'optionalAccess', _25 => _25.add, 'call', _26 => _26(new Property(camelToDash(key), i))]));
|
581 | } else {
|
582 | const wrap = deepCopy(root);
|
583 | wrap.property = [];
|
584 | let child;
|
585 | if (key.startsWith('@')) {
|
586 | child = wrap.atRule(key, false);
|
587 | } else {
|
588 | if (wrap.selector === undefined) {
|
589 | wrap.selector = key;
|
590 | child = wrap;
|
591 | } else {
|
592 | if (/^[a-z]+$/.test(key) && !isTagName(key)) {
|
593 | wrap.wrapProperty(property => `${key}-${property}`);
|
594 | child = wrap;
|
595 | } else {
|
596 | const _hKey = (selector, key) => (/&/.test(key) ? key : `& ${key}`).replace('&', selector);
|
597 | wrap.wrapSelector((selector) =>
|
598 | selector
|
599 | .trim()
|
600 | .split(/\s*,\s*/g)
|
601 | .map((s) =>
|
602 | key
|
603 | .split(/\s*,\s*/g)
|
604 | .map((i) => _hKey(s, i))
|
605 | .join(', ')
|
606 | )
|
607 | .join(', ')
|
608 | );
|
609 | child = wrap;
|
610 | }
|
611 | }
|
612 | }
|
613 | output = output.concat(Style.generate(key.startsWith('@') ? undefined : key, value, child));
|
614 | }
|
615 | }
|
616 | if (root.property.length > 0) output.unshift(root);
|
617 | return output;
|
618 | }
|
619 |
|
620 | atRule(atrule, append = true) {
|
621 | if (!atrule) return this;
|
622 | if (this.atRules) {
|
623 | append ? this.atRules.push(atrule) : this.atRules.unshift(atrule);
|
624 | } else {
|
625 | this.atRules = [atrule];
|
626 | }
|
627 | return this;
|
628 | }
|
629 |
|
630 | pseudoClass(string) {
|
631 | if (this._pseudoClasses) {
|
632 | this._pseudoClasses.push(string);
|
633 | } else {
|
634 | this._pseudoClasses = [string];
|
635 | }
|
636 | return this;
|
637 | }
|
638 |
|
639 | pseudoElement(string) {
|
640 | if (this._pseudoElements) {
|
641 | this._pseudoElements.push(string);
|
642 | } else {
|
643 | this._pseudoElements = [string];
|
644 | }
|
645 | return this;
|
646 | }
|
647 |
|
648 | brother(string) {
|
649 | if (this._brotherSelectors) {
|
650 | this._brotherSelectors.push(string);
|
651 | } else {
|
652 | this._brotherSelectors = [string];
|
653 | }
|
654 | return this;
|
655 | }
|
656 |
|
657 | parent(string) {
|
658 | if (this._parentSelectors) {
|
659 | this._parentSelectors.push(string);
|
660 | } else {
|
661 | this._parentSelectors = [string];
|
662 | }
|
663 | return this;
|
664 | }
|
665 |
|
666 | child(string) {
|
667 | if (this._childSelectors) {
|
668 | this._childSelectors.push(string);
|
669 | } else {
|
670 | this._childSelectors = [string];
|
671 | }
|
672 | return this;
|
673 | }
|
674 |
|
675 | wrapProperty(func) {
|
676 | if (this._wrapProperties) {
|
677 | this._wrapProperties.push(func);
|
678 | } else {
|
679 | this._wrapProperties = [func];
|
680 | }
|
681 | return this;
|
682 | }
|
683 |
|
684 | wrapSelector(func) {
|
685 | if (this._wrapSelectors) {
|
686 | this._wrapSelectors.push(func);
|
687 | } else {
|
688 | this._wrapSelectors = [func];
|
689 | }
|
690 | return this;
|
691 | }
|
692 |
|
693 | wrapRule(func) {
|
694 | if (this._wrapRules) {
|
695 | this._wrapRules.push(func);
|
696 | } else {
|
697 | this._wrapRules = [func];
|
698 | }
|
699 | return this;
|
700 | }
|
701 |
|
702 | add(item) {
|
703 | item = toArray(item);
|
704 | if (this.important) item.forEach((i) => (i.important = true));
|
705 | this.property = [...this.property, ...item];
|
706 | return this;
|
707 | }
|
708 |
|
709 | extend(item, onlyProperty = false, append = true) {
|
710 | if (!item) return this;
|
711 | if (item.wrapProperties) {
|
712 | const props = [];
|
713 | item.property.forEach((p) => {
|
714 | const pc = new Property(p.name, p.value, p.comment);
|
715 | _optionalChain$8([item, 'access', _27 => _27.wrapProperties, 'optionalAccess', _28 => _28.forEach, 'call', _29 => _29((wrap) => {
|
716 | pc.name = Array.isArray(pc.name)
|
717 | ? pc.name.map((i) => wrap(i))
|
718 | : wrap(pc.name);
|
719 | })]);
|
720 | if (item.important) pc.important = true;
|
721 | props.push(pc);
|
722 | });
|
723 | this.property = connectList(this.property, props, append);
|
724 | } else {
|
725 | if (item.important) item.property.forEach((i) => (i.important = true));
|
726 | this.property = connectList(this.property, item.property, append);
|
727 | }
|
728 | if (onlyProperty) return this;
|
729 | item.selector && (this.selector = item.selector);
|
730 | this.meta = item.meta;
|
731 | item.atRules &&
|
732 | (this.atRules = connectList(item.atRules, this.atRules, append));
|
733 | item._brotherSelectors &&
|
734 | (this._brotherSelectors = connectList(
|
735 | this._brotherSelectors,
|
736 | item._brotherSelectors,
|
737 | append
|
738 | ));
|
739 | item._childSelectors &&
|
740 | (this._childSelectors = connectList(
|
741 | this._childSelectors,
|
742 | item._childSelectors,
|
743 | append
|
744 | ));
|
745 | item._parentSelectors &&
|
746 | (this._parentSelectors = connectList(
|
747 | this._parentSelectors,
|
748 | item._parentSelectors,
|
749 | append
|
750 | ));
|
751 | item._pseudoClasses &&
|
752 | (this._pseudoClasses = connectList(
|
753 | this._pseudoClasses,
|
754 | item._pseudoClasses,
|
755 | append
|
756 | ));
|
757 | item._pseudoElements &&
|
758 | (this._pseudoElements = connectList(
|
759 | this._pseudoElements,
|
760 | item._pseudoElements,
|
761 | append
|
762 | ));
|
763 | item._wrapRules &&
|
764 | (this._wrapRules = connectList(this._wrapRules, item._wrapRules, append));
|
765 | item._wrapSelectors &&
|
766 | (this._wrapSelectors = connectList(
|
767 | this._wrapSelectors,
|
768 | item._wrapSelectors,
|
769 | append
|
770 | ));
|
771 | return this;
|
772 | }
|
773 |
|
774 | clean() {
|
775 |
|
776 | const property = [];
|
777 | const cache = [];
|
778 | this.property.forEach((i) => {
|
779 | const inline = i.build();
|
780 | if (!cache.includes(inline)) {
|
781 | cache.push(inline);
|
782 | property.push(i);
|
783 | }
|
784 | });
|
785 | this.property = property;
|
786 | return this;
|
787 | }
|
788 |
|
789 | flat() {
|
790 | const properties = [];
|
791 | this.property.forEach((p) => {
|
792 | if (Array.isArray(p.name)) {
|
793 | p.name.forEach((i) => {
|
794 | properties.push(new Property(i, p.value, p.comment));
|
795 | });
|
796 | } else {
|
797 | properties.push(p);
|
798 | }
|
799 | });
|
800 | this.property = properties;
|
801 | return this;
|
802 | }
|
803 |
|
804 | clone(selector, property) {
|
805 | const newStyle = deepCopy(this);
|
806 | if (selector) newStyle.selector = selector;
|
807 | if (property) newStyle.property = Array.isArray(property) ? property: [ property ];
|
808 | return newStyle;
|
809 | }
|
810 |
|
811 | sort() {
|
812 |
|
813 | this.property = this.property.sort((a, b) => {
|
814 | return `${a.name}`.substring(0, 2) > `${b.name}`.substring(0, 2) ? 1 : -1;
|
815 | });
|
816 | return this;
|
817 | }
|
818 |
|
819 | build(minify = false, prefixer = true) {
|
820 | let properties = this.property;
|
821 | if (!prefixer) properties = properties.filter(p => {
|
822 | if (p.value && /-(webkit|ms|moz|o)-/.test(p.value)) return false;
|
823 | if (Array.isArray(p.name)) {
|
824 | p.name = p.name.filter(i => !/^-(webkit|ms|moz|o)-/.test(i));
|
825 | return true;
|
826 | }
|
827 | return !/^-(webkit|ms|moz|o)-/.test(p.name);
|
828 | });
|
829 | let result = properties.map(p => {
|
830 | if (this._wrapProperties) {
|
831 | let name = p.name;
|
832 | this._wrapProperties.forEach(w => (name = Array.isArray(name) ? name.map(n => w(n)) : w(name)));
|
833 | return new Property(name, p.value, p.comment, this.important ? true : p.important).build(minify);
|
834 | }
|
835 | return this.important ? new Property(p.name, p.value, p.comment, true).build(minify) : p.build(minify);
|
836 | }).join(minify ? '' : '\n');
|
837 | if (!this.selector && !this.atRules) return result.replace(/;}/g, '}');
|
838 | if (this.selector) result = (minify ? this.rule.replace(/,\s/g, ',') : this.rule + ' ') + wrapit(result, undefined, undefined, undefined, result !== '' ? minify : true);
|
839 | if (this.atRules) {
|
840 | for (const rule of this.atRules) {
|
841 | result = minify ? `${rule.replace(/\s/g, '')}${wrapit(result, undefined, undefined, undefined, minify)}` : `${rule} ${wrapit(result, undefined, undefined, undefined, result !== '' ? minify : true)}`;
|
842 | }
|
843 | }
|
844 | return minify ? result.replace(/;}/g, '}') : result;
|
845 | }
|
846 |
|
847 | updateMeta(type, group, order, offset = 0, corePlugin = false, respectSelector = false) {
|
848 | this.meta = {
|
849 | type,
|
850 | group,
|
851 | order,
|
852 | offset,
|
853 | corePlugin,
|
854 | respectSelector,
|
855 | };
|
856 | return this;
|
857 | }
|
858 | }
|
859 |
|
860 | class Keyframes extends Style {
|
861 | constructor(
|
862 | selector,
|
863 | property,
|
864 | important,
|
865 | ) {
|
866 | super(selector, property, important);
|
867 | }
|
868 |
|
869 |
|
870 |
|
871 | static generate(name, children, root = undefined, prefixer = true) {
|
872 | const styles = [];
|
873 | const webkitStyles = [];
|
874 | for (const [key, value] of Object.entries(children)) {
|
875 | const style = new Keyframes(key).atRule(`@keyframes ${name}`);
|
876 | const webkitStyle = new Keyframes(key).atRule(
|
877 | `@-webkit-keyframes ${name}`
|
878 | );
|
879 | for (const [pkey, pvalue] of Object.entries(value)) {
|
880 | let prop = pkey;
|
881 | if (pkey === 'transform') {
|
882 | prop = prefixer ? ['-webkit-transform', 'transform'] : 'transform';
|
883 | } else if (
|
884 | ['animationTimingFunction', 'animation-timing-function'].includes(pkey)
|
885 | ) {
|
886 | prop = prefixer ? [
|
887 | '-webkit-animation-timing-function',
|
888 | 'animation-timing-function',
|
889 | ] : 'animation-timing-function';
|
890 | }
|
891 | style.add(new Property(prop, pvalue));
|
892 | webkitStyle.add(new Property(prop, pvalue));
|
893 | }
|
894 | styles.push(style);
|
895 | if (prefixer) webkitStyles.push(webkitStyle);
|
896 | }
|
897 | return [...styles, ...webkitStyles];
|
898 | }
|
899 | }
|
900 |
|
901 | class Container extends Style {
|
902 | constructor(
|
903 | selector,
|
904 | property,
|
905 | important,
|
906 | ) {
|
907 | super(selector, property, important);
|
908 | }
|
909 | }
|
910 |
|
911 | const minMaxWidth = /(!?\(\s*min(-device-)?-width).+\(\s*max(-device)?-width/i;
|
912 | const minWidth = /\(\s*min(-device)?-width/i;
|
913 | const maxMinWidth = /(!?\(\s*max(-device)?-width).+\(\s*min(-device)?-width/i;
|
914 | const maxWidth = /\(\s*max(-device)?-width/i;
|
915 |
|
916 | const isMinWidth = _testQuery(minMaxWidth, maxMinWidth, minWidth);
|
917 | const isMaxWidth = _testQuery(maxMinWidth, minMaxWidth, maxWidth);
|
918 |
|
919 | const minMaxHeight = /(!?\(\s*min(-device)?-height).+\(\s*max(-device)?-height/i;
|
920 | const minHeight = /\(\s*min(-device)?-height/i;
|
921 | const maxMinHeight = /(!?\(\s*max(-device)?-height).+\(\s*min(-device)?-height/i;
|
922 | const maxHeight = /\(\s*max(-device)?-height/i;
|
923 |
|
924 | const isMinHeight = _testQuery(minMaxHeight, maxMinHeight, minHeight);
|
925 | const isMaxHeight = _testQuery(maxMinHeight, minMaxHeight, maxHeight);
|
926 |
|
927 | const isPrint = /print/i;
|
928 | const isPrintOnly = /^print\$/i;
|
929 | const isAtRule = /^\s*@/i;
|
930 | const isMedia = /^\s*@media/i;
|
931 |
|
932 | const maxValue = Number.MAX_VALUE;
|
933 |
|
934 | function _getQueryLength(length) {
|
935 | const result = /(-?\d*\.?\d+)(ch|em|ex|px|rpx|rem)/.exec(length);
|
936 |
|
937 | if (result === null) {
|
938 | return maxValue;
|
939 | }
|
940 |
|
941 | const number = result[1];
|
942 | const unit = result[2];
|
943 |
|
944 | switch (unit) {
|
945 | case 'ch':
|
946 | return parseFloat(number) * 8.8984375;
|
947 | case 'em':
|
948 | case 'rem':
|
949 | return parseFloat(number) * 16;
|
950 | case 'ex':
|
951 | return parseFloat(number) * 8.296875;
|
952 | case 'px':
|
953 | case 'rpx':
|
954 | return parseFloat(number);
|
955 | }
|
956 |
|
957 | return +number;
|
958 | }
|
959 |
|
960 | function _testQuery(
|
961 | doubleTestTrue,
|
962 | doubleTestFalse,
|
963 | singleTest
|
964 | ) {
|
965 | return function (query) {
|
966 | if (doubleTestTrue.test(query)) {
|
967 | return true;
|
968 | } else if (doubleTestFalse.test(query)) {
|
969 | return false;
|
970 | }
|
971 | return singleTest.test(query);
|
972 | };
|
973 | }
|
974 |
|
975 | function _testAtRule(a, b) {
|
976 | const isMediaA = isMedia.test(a);
|
977 | const isMediaB = isMedia.test(b);
|
978 |
|
979 | if (isMediaA && isMediaB) return null;
|
980 |
|
981 | const isAtRuleA = isAtRule.test(a);
|
982 | const isAtRuleB = isAtRule.test(b);
|
983 |
|
984 | if (isAtRuleA) return 1;
|
985 | if (isAtRuleB) return -1;
|
986 |
|
987 | return 0;
|
988 | }
|
989 |
|
990 | function _testIsPrint(a, b) {
|
991 | const isPrintA = isPrint.test(a);
|
992 | const isPrintOnlyA = isPrintOnly.test(a);
|
993 |
|
994 | const isPrintB = isPrint.test(b);
|
995 | const isPrintOnlyB = isPrintOnly.test(b);
|
996 |
|
997 | if (isPrintA && isPrintB) {
|
998 | if (!isPrintOnlyA && isPrintOnlyB) {
|
999 | return 1;
|
1000 | }
|
1001 | if (isPrintOnlyA && !isPrintOnlyB) {
|
1002 | return -1;
|
1003 | }
|
1004 | return a.localeCompare(b);
|
1005 | }
|
1006 | if (isPrintA) {
|
1007 | return 1;
|
1008 | }
|
1009 | if (isPrintB) {
|
1010 | return -1;
|
1011 | }
|
1012 |
|
1013 | return null;
|
1014 | }
|
1015 |
|
1016 | function sortMediaQuery(a, b) {
|
1017 | const testAtRule = _testAtRule(a, b);
|
1018 | if (testAtRule !== null) return testAtRule;
|
1019 | const testIsPrint = _testIsPrint(a, b);
|
1020 | if (testIsPrint !== null) return testIsPrint;
|
1021 |
|
1022 | const minA = isMinWidth(a) || isMinHeight(a);
|
1023 | const maxA = isMaxWidth(a) || isMaxHeight(a);
|
1024 |
|
1025 | const minB = isMinWidth(b) || isMinHeight(b);
|
1026 | const maxB = isMaxWidth(b) || isMaxHeight(b);
|
1027 |
|
1028 | if (minA && maxB) {
|
1029 | return -1;
|
1030 | }
|
1031 | if (maxA && minB) {
|
1032 | return 1;
|
1033 | }
|
1034 |
|
1035 | const lengthA = _getQueryLength(a);
|
1036 | const lengthB = _getQueryLength(b);
|
1037 |
|
1038 | if (lengthA === maxValue && lengthB === maxValue) {
|
1039 | return a.localeCompare(b);
|
1040 | } else if (lengthA === maxValue) {
|
1041 | return 1;
|
1042 | } else if (lengthB === maxValue) {
|
1043 | return -1;
|
1044 | }
|
1045 |
|
1046 | if (lengthA > lengthB) {
|
1047 | if (maxA) {
|
1048 | return -1;
|
1049 | }
|
1050 | return 1;
|
1051 | }
|
1052 |
|
1053 | if (lengthA < lengthB) {
|
1054 | if (maxA) {
|
1055 | return 1;
|
1056 | }
|
1057 | return -1;
|
1058 | }
|
1059 |
|
1060 | return a.localeCompare(b);
|
1061 | }
|
1062 |
|
1063 | function _nullishCoalesce$4(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$7(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
1064 |
|
1065 | function getWeights(a) {
|
1066 | const first = a.charAt(0);
|
1067 | const second = a.charAt(1);
|
1068 | if (first === ':' && second === ':') return 59;
|
1069 | if (first === '#') return 500;
|
1070 | if (first !== '.') return first.charCodeAt(0);
|
1071 | return 499;
|
1072 | }
|
1073 |
|
1074 | function sortMeta(a, b) {
|
1075 | if (a.meta.type === 'base' && b.meta.type === 'base') return getWeights(_nullishCoalesce$4(a.selector, () => ( ''))) - getWeights(_nullishCoalesce$4(b.selector, () => ( '')));
|
1076 | return sortMediaQuery(_optionalChain$7([a, 'access', _ => _.meta, 'access', _2 => _2.variants, 'optionalAccess', _3 => _3[0]]) || '', _optionalChain$7([b, 'access', _4 => _4.meta, 'access', _5 => _5.variants, 'optionalAccess', _6 => _6[0]]) || '') || (a.meta.order - b.meta.order) || (a.meta.offset - b.meta.offset) || +b.meta.corePlugin - +a.meta.corePlugin;
|
1077 | }
|
1078 |
|
1079 | function sortGroup(a, b) {
|
1080 | return sortMediaQuery(_optionalChain$7([a, 'access', _7 => _7.meta, 'access', _8 => _8.variants, 'optionalAccess', _9 => _9[0]]) || '', _optionalChain$7([b, 'access', _10 => _10.meta, 'access', _11 => _11.variants, 'optionalAccess', _12 => _12[0]]) || '') || (a.meta.order - b.meta.order);
|
1081 | }
|
1082 |
|
1083 | function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
1084 |
|
1085 | function _buildAtrule(atrule, children, minify = false, prefixer = true) {
|
1086 | return `${ atrule }${ minify ? '' : ' ' }${ wrapit(_buildStyleList(children, minify, prefixer), undefined, undefined, undefined, minify) }`;
|
1087 | }
|
1088 |
|
1089 | function _buildStyleList(styleList, minify = false, prefixer = true) {
|
1090 | let currentAtrule;
|
1091 | let currentStyle;
|
1092 | let styleStack = [];
|
1093 | const output = [];
|
1094 | for (const style of styleList) {
|
1095 | if (style.isAtrule) {
|
1096 | if (currentStyle) {
|
1097 | output.push(currentStyle.clean().build(minify, prefixer));
|
1098 | currentStyle = undefined;
|
1099 | }
|
1100 | const newAtrule = (style.atRules ).pop();
|
1101 | if (currentAtrule) {
|
1102 | if (currentAtrule === newAtrule && newAtrule !== '@font-face') {
|
1103 | styleStack.push(style);
|
1104 | } else {
|
1105 | output.push(_buildAtrule(currentAtrule, styleStack, minify, prefixer));
|
1106 | currentAtrule = newAtrule;
|
1107 | styleStack = [ style ];
|
1108 | }
|
1109 | } else {
|
1110 | currentAtrule = newAtrule;
|
1111 | styleStack = [ style ];
|
1112 | }
|
1113 | } else {
|
1114 | if (currentAtrule) {
|
1115 | output.push(_buildAtrule(currentAtrule, styleStack, minify, prefixer));
|
1116 | currentAtrule = undefined;
|
1117 | styleStack = [];
|
1118 | }
|
1119 | if (currentStyle) {
|
1120 | if (style.rule === currentStyle.rule) {
|
1121 | if (style.important) style.property.forEach(p => p.important = true);
|
1122 | if (style.wrapProperties) style.property.forEach(p => _optionalChain$6([style, 'access', _ => _.wrapProperties, 'optionalAccess', _2 => _2.forEach, 'call', _3 => _3(wrap => p.name = Array.isArray(p.name) ? p.name.map(i => wrap(i)) : wrap(p.name))]));
|
1123 | currentStyle.add(style.property);
|
1124 | } else {
|
1125 | output.push(currentStyle.clean().build(minify, prefixer));
|
1126 | currentStyle = style;
|
1127 | }
|
1128 | } else {
|
1129 | currentStyle = style;
|
1130 | }
|
1131 | }
|
1132 | }
|
1133 | if (currentAtrule) output.push(_buildAtrule(currentAtrule, styleStack, minify, prefixer));
|
1134 | if (currentStyle) output.push(currentStyle.clean().build(minify, prefixer));
|
1135 | return output.join(minify ? '' : '\n');
|
1136 | }
|
1137 |
|
1138 | function compileStyleSheet (styleList, minify = false, prefixer = true) {
|
1139 | return _buildStyleList(deepCopy(styleList), minify, prefixer);
|
1140 | }
|
1141 |
|
1142 | function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
1143 |
|
1144 | class StyleSheet {
|
1145 |
|
1146 | __init() {this.prefixer = true;}
|
1147 |
|
1148 | constructor(children) {StyleSheet.prototype.__init.call(this);
|
1149 | this.children = children || [];
|
1150 | }
|
1151 |
|
1152 | add(item) {
|
1153 | if (!item) return this;
|
1154 | if (Array.isArray(item)) {
|
1155 | this.children = [...this.children, ...item];
|
1156 | } else {
|
1157 | this.children.push(item);
|
1158 | }
|
1159 | return this;
|
1160 | }
|
1161 |
|
1162 | extend(styleSheet, append = true, dedup = false) {
|
1163 | if (styleSheet) {
|
1164 | let extended = styleSheet.children;
|
1165 | if (dedup) {
|
1166 | const hashes = extended.map(i => hash(i.build()));
|
1167 | extended = extended.filter(i => !hashes.includes(hash(i.build())));
|
1168 | }
|
1169 | this.prefixer = styleSheet.prefixer;
|
1170 | this.children = append? [...this.children, ...extended]: [...extended, ...this.children];
|
1171 | }
|
1172 | return this;
|
1173 | }
|
1174 |
|
1175 | combine() {
|
1176 | const styleMap = {};
|
1177 | this.children.forEach((style, index) => {
|
1178 | const hashValue = hash(style.atRules + style.rule);
|
1179 | if (hashValue in styleMap) {
|
1180 | if (_optionalChain$5([style, 'access', _ => _.atRules, 'optionalAccess', _2 => _2.includes, 'call', _3 => _3('@font-face')])) {
|
1181 |
|
1182 | styleMap[hashValue + index] = style;
|
1183 | } else {
|
1184 | styleMap[hashValue] = styleMap[hashValue].extend(style, true);
|
1185 | }
|
1186 | } else {
|
1187 | styleMap[hashValue] = style;
|
1188 | }
|
1189 | });
|
1190 | this.children = Object.values(styleMap).map((i) => i.clean());
|
1191 | return this;
|
1192 | }
|
1193 |
|
1194 | layer(type) {
|
1195 | const styleSheet = new StyleSheet(this.children.filter(i => i.meta.type === type));
|
1196 | styleSheet.prefixer = this.prefixer;
|
1197 | return styleSheet;
|
1198 | }
|
1199 |
|
1200 | split() {
|
1201 | return {
|
1202 | base: this.layer('base'),
|
1203 | components: this.layer('components'),
|
1204 | utilities: this.layer('utilities'),
|
1205 | };
|
1206 | }
|
1207 |
|
1208 | clone() {
|
1209 | return deepCopy(this);
|
1210 | }
|
1211 |
|
1212 | sort() {
|
1213 | this.children = this.children.sort(sortMeta);
|
1214 | return this;
|
1215 | }
|
1216 |
|
1217 | sortby(compareFn) {
|
1218 | this.children = this.children.sort(compareFn);
|
1219 | return this;
|
1220 | }
|
1221 |
|
1222 | build(minify = false) {
|
1223 | return compileStyleSheet(this.children, minify, this.prefixer);
|
1224 | }
|
1225 | }
|
1226 |
|
1227 | function linearGradient(value) {
|
1228 |
|
1229 | const map = {
|
1230 | 'linear-gradient(to top, var(--tw-gradient-stops))': [
|
1231 | '-o-linear-gradient(bottom, var(--tw-gradient-stops))',
|
1232 | '-webkit-gradient(linear, left bottom, left top, from(var(--tw-gradient-stops)))',
|
1233 | 'linear-gradient(to top, var(--tw-gradient-stops))',
|
1234 | ],
|
1235 | 'linear-gradient(to top right, var(--tw-gradient-stops))': [
|
1236 | '-o-linear-gradient(bottom left, var(--tw-gradient-stops))',
|
1237 | '-webkit-gradient(linear, left bottom, right top, from(var(--tw-gradient-stops)))',
|
1238 | 'linear-gradient(to top right, var(--tw-gradient-stops))',
|
1239 | ],
|
1240 | 'linear-gradient(to right, var(--tw-gradient-stops))': [
|
1241 | '-o-linear-gradient(left, var(--tw-gradient-stops))',
|
1242 | '-webkit-gradient(linear, left top, right top, from(var(--tw-gradient-stops)))',
|
1243 | 'linear-gradient(to right, var(--tw-gradient-stops))',
|
1244 | ],
|
1245 | 'linear-gradient(to bottom right, var(--tw-gradient-stops))': [
|
1246 | '-o-linear-gradient(top left, var(--tw-gradient-stops))',
|
1247 | '-webkit-gradient(linear, left top, right bottom, from(var(--tw-gradient-stops)))',
|
1248 | 'linear-gradient(to bottom right, var(--tw-gradient-stops))',
|
1249 | ],
|
1250 | 'linear-gradient(to bottom, var(--tw-gradient-stops))': [
|
1251 | '-o-linear-gradient(top, var(--tw-gradient-stops))',
|
1252 | '-webkit-gradient(linear, left top, left bottom, from(var(--tw-gradient-stops)))',
|
1253 | 'linear-gradient(to bottom, var(--tw-gradient-stops))',
|
1254 | ],
|
1255 | 'linear-gradient(to bottom left, var(--tw-gradient-stops))': [
|
1256 | '-o-linear-gradient(top right, var(--tw-gradient-stops))',
|
1257 | '-webkit-gradient(linear, right top, left bottom, from(var(--tw-gradient-stops)))',
|
1258 | 'linear-gradient(to bottom left, var(--tw-gradient-stops))',
|
1259 | ],
|
1260 | 'linear-gradient(to left, var(--tw-gradient-stops))': [
|
1261 | '-o-linear-gradient(right, var(--tw-gradient-stops))',
|
1262 | '-webkit-gradient(linear, right top, left top, from(var(--tw-gradient-stops)))',
|
1263 | 'linear-gradient(to left, var(--tw-gradient-stops))',
|
1264 | ],
|
1265 | 'linear-gradient(to top left, var(--tw-gradient-stops))': [
|
1266 | '-o-linear-gradient(bottom right, var(--tw-gradient-stops))',
|
1267 | '-webkit-gradient(linear, right bottom, left top, from(var(--tw-gradient-stops)))',
|
1268 | 'linear-gradient(to top left, var(--tw-gradient-stops))',
|
1269 | ],
|
1270 | };
|
1271 | if (Object.keys(map).includes(value)) return map[value];
|
1272 | return value;
|
1273 | }
|
1274 |
|
1275 | function minMaxContent(value) {
|
1276 | if (value === 'min-content') {
|
1277 | return ['-webkit-min-content', 'min-content'];
|
1278 | } else if (value === 'max-content') {
|
1279 | return ['-webkit-max-content', 'max-content'];
|
1280 | }
|
1281 | return value;
|
1282 | }
|
1283 |
|
1284 | function isString(value) {
|
1285 | return typeof value === 'string';
|
1286 | }
|
1287 |
|
1288 | function negative(scale
|
1289 |
|
1290 | ) {
|
1291 | return Object.keys(scale)
|
1292 | .filter((key) => scale[key] !== '0')
|
1293 | .reduce(
|
1294 | (negativeScale, key) => ({
|
1295 | ...negativeScale,
|
1296 | [`-${key}`]: negateValue(scale[key]),
|
1297 | }),
|
1298 | {}
|
1299 | );
|
1300 | }
|
1301 |
|
1302 | function breakpoints(
|
1303 | screens = {}
|
1304 | ) {
|
1305 | return Object.keys(screens)
|
1306 | .filter((key) => typeof screens[key] === 'string')
|
1307 | .reduce(
|
1308 | (breakpoints, key) => ({
|
1309 | ...breakpoints,
|
1310 | [`screen-${key}`]: screens[key],
|
1311 | }),
|
1312 | {}
|
1313 | );
|
1314 | }
|
1315 |
|
1316 | function generateFontSize(font) {
|
1317 | if (typeof font === 'string') return [ new Property('font-size', font) ];
|
1318 | const properties = [];
|
1319 | if (font[0]) properties.push(new Property('font-size', font[0]));
|
1320 | if (typeof font[1] === 'string') {
|
1321 | properties.push(new Property('line-height', font[1]));
|
1322 | } else if (font[1]){
|
1323 | if (font[1].lineHeight) properties.push(new Property('line-height', font[1].lineHeight));
|
1324 | if (font[1].letterSpacing) properties.push(new Property('letter-spacing', font[1].letterSpacing));
|
1325 | }
|
1326 | return properties;
|
1327 | }
|
1328 |
|
1329 | function expandDirection(
|
1330 | value,
|
1331 | divide = false
|
1332 | ) {
|
1333 | const map = {
|
1334 | '': ['*'],
|
1335 | y: ['top', 'bottom'],
|
1336 | x: ['left', 'right'],
|
1337 | t: divide ? ['top-left', 'top-right'] : ['top'],
|
1338 | r: divide ? ['top-right', 'bottom-right'] : ['right'],
|
1339 | b: divide ? ['bottom-right', 'bottom-left'] : ['bottom'],
|
1340 | l: divide ? ['top-left', 'bottom-left'] : ['left'],
|
1341 | tl: ['top-left'],
|
1342 | tr: ['top-right'],
|
1343 | br: ['bottom-right'],
|
1344 | bl: ['bottom-left'],
|
1345 | };
|
1346 | if (value in map) return map[value];
|
1347 | }
|
1348 |
|
1349 | function generatePlaceholder(selector, property, prefixer = false) {
|
1350 | if (!prefixer) return [ new Style(selector, property).pseudoElement('placeholder') ];
|
1351 | return [
|
1352 | new Style(selector, property).pseudoElement('-webkit-input-placeholder'),
|
1353 | new Style(selector, property).pseudoElement('-moz-placeholder'),
|
1354 | new Style(selector, property).pseudoClass('-ms-input-placeholder'),
|
1355 | new Style(selector, property).pseudoElement('-ms-input-placeholder'),
|
1356 | new Style(selector, property).pseudoElement('placeholder'),
|
1357 | ];
|
1358 | }
|
1359 |
|
1360 | function createCommonjsModule(fn) {
|
1361 | var module = { exports: {} };
|
1362 | return fn(module, module.exports), module.exports;
|
1363 | }
|
1364 |
|
1365 | var colorName = {
|
1366 | "aliceblue": [240, 248, 255],
|
1367 | "antiquewhite": [250, 235, 215],
|
1368 | "aqua": [0, 255, 255],
|
1369 | "aquamarine": [127, 255, 212],
|
1370 | "azure": [240, 255, 255],
|
1371 | "beige": [245, 245, 220],
|
1372 | "bisque": [255, 228, 196],
|
1373 | "black": [0, 0, 0],
|
1374 | "blanchedalmond": [255, 235, 205],
|
1375 | "blue": [0, 0, 255],
|
1376 | "blueviolet": [138, 43, 226],
|
1377 | "brown": [165, 42, 42],
|
1378 | "burlywood": [222, 184, 135],
|
1379 | "cadetblue": [95, 158, 160],
|
1380 | "chartreuse": [127, 255, 0],
|
1381 | "chocolate": [210, 105, 30],
|
1382 | "coral": [255, 127, 80],
|
1383 | "cornflowerblue": [100, 149, 237],
|
1384 | "cornsilk": [255, 248, 220],
|
1385 | "crimson": [220, 20, 60],
|
1386 | "cyan": [0, 255, 255],
|
1387 | "darkblue": [0, 0, 139],
|
1388 | "darkcyan": [0, 139, 139],
|
1389 | "darkgoldenrod": [184, 134, 11],
|
1390 | "darkgray": [169, 169, 169],
|
1391 | "darkgreen": [0, 100, 0],
|
1392 | "darkgrey": [169, 169, 169],
|
1393 | "darkkhaki": [189, 183, 107],
|
1394 | "darkmagenta": [139, 0, 139],
|
1395 | "darkolivegreen": [85, 107, 47],
|
1396 | "darkorange": [255, 140, 0],
|
1397 | "darkorchid": [153, 50, 204],
|
1398 | "darkred": [139, 0, 0],
|
1399 | "darksalmon": [233, 150, 122],
|
1400 | "darkseagreen": [143, 188, 143],
|
1401 | "darkslateblue": [72, 61, 139],
|
1402 | "darkslategray": [47, 79, 79],
|
1403 | "darkslategrey": [47, 79, 79],
|
1404 | "darkturquoise": [0, 206, 209],
|
1405 | "darkviolet": [148, 0, 211],
|
1406 | "deeppink": [255, 20, 147],
|
1407 | "deepskyblue": [0, 191, 255],
|
1408 | "dimgray": [105, 105, 105],
|
1409 | "dimgrey": [105, 105, 105],
|
1410 | "dodgerblue": [30, 144, 255],
|
1411 | "firebrick": [178, 34, 34],
|
1412 | "floralwhite": [255, 250, 240],
|
1413 | "forestgreen": [34, 139, 34],
|
1414 | "fuchsia": [255, 0, 255],
|
1415 | "gainsboro": [220, 220, 220],
|
1416 | "ghostwhite": [248, 248, 255],
|
1417 | "gold": [255, 215, 0],
|
1418 | "goldenrod": [218, 165, 32],
|
1419 | "gray": [128, 128, 128],
|
1420 | "green": [0, 128, 0],
|
1421 | "greenyellow": [173, 255, 47],
|
1422 | "grey": [128, 128, 128],
|
1423 | "honeydew": [240, 255, 240],
|
1424 | "hotpink": [255, 105, 180],
|
1425 | "indianred": [205, 92, 92],
|
1426 | "indigo": [75, 0, 130],
|
1427 | "ivory": [255, 255, 240],
|
1428 | "khaki": [240, 230, 140],
|
1429 | "lavender": [230, 230, 250],
|
1430 | "lavenderblush": [255, 240, 245],
|
1431 | "lawngreen": [124, 252, 0],
|
1432 | "lemonchiffon": [255, 250, 205],
|
1433 | "lightblue": [173, 216, 230],
|
1434 | "lightcoral": [240, 128, 128],
|
1435 | "lightcyan": [224, 255, 255],
|
1436 | "lightgoldenrodyellow": [250, 250, 210],
|
1437 | "lightgray": [211, 211, 211],
|
1438 | "lightgreen": [144, 238, 144],
|
1439 | "lightgrey": [211, 211, 211],
|
1440 | "lightpink": [255, 182, 193],
|
1441 | "lightsalmon": [255, 160, 122],
|
1442 | "lightseagreen": [32, 178, 170],
|
1443 | "lightskyblue": [135, 206, 250],
|
1444 | "lightslategray": [119, 136, 153],
|
1445 | "lightslategrey": [119, 136, 153],
|
1446 | "lightsteelblue": [176, 196, 222],
|
1447 | "lightyellow": [255, 255, 224],
|
1448 | "lime": [0, 255, 0],
|
1449 | "limegreen": [50, 205, 50],
|
1450 | "linen": [250, 240, 230],
|
1451 | "magenta": [255, 0, 255],
|
1452 | "maroon": [128, 0, 0],
|
1453 | "mediumaquamarine": [102, 205, 170],
|
1454 | "mediumblue": [0, 0, 205],
|
1455 | "mediumorchid": [186, 85, 211],
|
1456 | "mediumpurple": [147, 112, 219],
|
1457 | "mediumseagreen": [60, 179, 113],
|
1458 | "mediumslateblue": [123, 104, 238],
|
1459 | "mediumspringgreen": [0, 250, 154],
|
1460 | "mediumturquoise": [72, 209, 204],
|
1461 | "mediumvioletred": [199, 21, 133],
|
1462 | "midnightblue": [25, 25, 112],
|
1463 | "mintcream": [245, 255, 250],
|
1464 | "mistyrose": [255, 228, 225],
|
1465 | "moccasin": [255, 228, 181],
|
1466 | "navajowhite": [255, 222, 173],
|
1467 | "navy": [0, 0, 128],
|
1468 | "oldlace": [253, 245, 230],
|
1469 | "olive": [128, 128, 0],
|
1470 | "olivedrab": [107, 142, 35],
|
1471 | "orange": [255, 165, 0],
|
1472 | "orangered": [255, 69, 0],
|
1473 | "orchid": [218, 112, 214],
|
1474 | "palegoldenrod": [238, 232, 170],
|
1475 | "palegreen": [152, 251, 152],
|
1476 | "paleturquoise": [175, 238, 238],
|
1477 | "palevioletred": [219, 112, 147],
|
1478 | "papayawhip": [255, 239, 213],
|
1479 | "peachpuff": [255, 218, 185],
|
1480 | "peru": [205, 133, 63],
|
1481 | "pink": [255, 192, 203],
|
1482 | "plum": [221, 160, 221],
|
1483 | "powderblue": [176, 224, 230],
|
1484 | "purple": [128, 0, 128],
|
1485 | "rebeccapurple": [102, 51, 153],
|
1486 | "red": [255, 0, 0],
|
1487 | "rosybrown": [188, 143, 143],
|
1488 | "royalblue": [65, 105, 225],
|
1489 | "saddlebrown": [139, 69, 19],
|
1490 | "salmon": [250, 128, 114],
|
1491 | "sandybrown": [244, 164, 96],
|
1492 | "seagreen": [46, 139, 87],
|
1493 | "seashell": [255, 245, 238],
|
1494 | "sienna": [160, 82, 45],
|
1495 | "silver": [192, 192, 192],
|
1496 | "skyblue": [135, 206, 235],
|
1497 | "slateblue": [106, 90, 205],
|
1498 | "slategray": [112, 128, 144],
|
1499 | "slategrey": [112, 128, 144],
|
1500 | "snow": [255, 250, 250],
|
1501 | "springgreen": [0, 255, 127],
|
1502 | "steelblue": [70, 130, 180],
|
1503 | "tan": [210, 180, 140],
|
1504 | "teal": [0, 128, 128],
|
1505 | "thistle": [216, 191, 216],
|
1506 | "tomato": [255, 99, 71],
|
1507 | "turquoise": [64, 224, 208],
|
1508 | "violet": [238, 130, 238],
|
1509 | "wheat": [245, 222, 179],
|
1510 | "white": [255, 255, 255],
|
1511 | "whitesmoke": [245, 245, 245],
|
1512 | "yellow": [255, 255, 0],
|
1513 | "yellowgreen": [154, 205, 50]
|
1514 | };
|
1515 |
|
1516 | var isArrayish = function isArrayish(obj) {
|
1517 | if (!obj || typeof obj === 'string') {
|
1518 | return false;
|
1519 | }
|
1520 |
|
1521 | return obj instanceof Array || Array.isArray(obj) ||
|
1522 | (obj.length >= 0 && (obj.splice instanceof Function ||
|
1523 | (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));
|
1524 | };
|
1525 |
|
1526 | var simpleSwizzle = createCommonjsModule(function (module) {
|
1527 |
|
1528 |
|
1529 |
|
1530 | var concat = Array.prototype.concat;
|
1531 | var slice = Array.prototype.slice;
|
1532 |
|
1533 | var swizzle = module.exports = function swizzle(args) {
|
1534 | var results = [];
|
1535 |
|
1536 | for (var i = 0, len = args.length; i < len; i++) {
|
1537 | var arg = args[i];
|
1538 |
|
1539 | if (isArrayish(arg)) {
|
1540 |
|
1541 | results = concat.call(results, slice.call(arg));
|
1542 | } else {
|
1543 | results.push(arg);
|
1544 | }
|
1545 | }
|
1546 |
|
1547 | return results;
|
1548 | };
|
1549 |
|
1550 | swizzle.wrap = function (fn) {
|
1551 | return function () {
|
1552 | return fn(swizzle(arguments));
|
1553 | };
|
1554 | };
|
1555 | });
|
1556 |
|
1557 |
|
1558 |
|
1559 | var colorString = createCommonjsModule(function (module) {
|
1560 | var reverseNames = {};
|
1561 |
|
1562 |
|
1563 | for (var name in colorName) {
|
1564 | if (colorName.hasOwnProperty(name)) {
|
1565 | reverseNames[colorName[name]] = name;
|
1566 | }
|
1567 | }
|
1568 |
|
1569 | var cs = module.exports = {
|
1570 | to: {},
|
1571 | get: {}
|
1572 | };
|
1573 |
|
1574 | cs.get = function (string) {
|
1575 | var prefix = string.substring(0, 3).toLowerCase();
|
1576 | var val;
|
1577 | var model;
|
1578 | switch (prefix) {
|
1579 | case 'hsl':
|
1580 | val = cs.get.hsl(string);
|
1581 | model = 'hsl';
|
1582 | break;
|
1583 | case 'hwb':
|
1584 | val = cs.get.hwb(string);
|
1585 | model = 'hwb';
|
1586 | break;
|
1587 | default:
|
1588 | val = cs.get.rgb(string);
|
1589 | model = 'rgb';
|
1590 | break;
|
1591 | }
|
1592 |
|
1593 | if (!val) {
|
1594 | return null;
|
1595 | }
|
1596 |
|
1597 | return {model: model, value: val};
|
1598 | };
|
1599 |
|
1600 | cs.get.rgb = function (string) {
|
1601 | if (!string) {
|
1602 | return null;
|
1603 | }
|
1604 |
|
1605 | var abbr = /^#([a-f0-9]{3,4})$/i;
|
1606 | var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
|
1607 | var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
|
1608 | var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
|
1609 | var keyword = /(\D+)/;
|
1610 |
|
1611 | var rgb = [0, 0, 0, 1];
|
1612 | var match;
|
1613 | var i;
|
1614 | var hexAlpha;
|
1615 |
|
1616 | if (match = string.match(hex)) {
|
1617 | hexAlpha = match[2];
|
1618 | match = match[1];
|
1619 |
|
1620 | for (i = 0; i < 3; i++) {
|
1621 |
|
1622 | var i2 = i * 2;
|
1623 | rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
|
1624 | }
|
1625 |
|
1626 | if (hexAlpha) {
|
1627 | rgb[3] = parseInt(hexAlpha, 16) / 255;
|
1628 | }
|
1629 | } else if (match = string.match(abbr)) {
|
1630 | match = match[1];
|
1631 | hexAlpha = match[3];
|
1632 |
|
1633 | for (i = 0; i < 3; i++) {
|
1634 | rgb[i] = parseInt(match[i] + match[i], 16);
|
1635 | }
|
1636 |
|
1637 | if (hexAlpha) {
|
1638 | rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
|
1639 | }
|
1640 | } else if (match = string.match(rgba)) {
|
1641 | for (i = 0; i < 3; i++) {
|
1642 | rgb[i] = parseInt(match[i + 1], 0);
|
1643 | }
|
1644 |
|
1645 | if (match[4]) {
|
1646 | rgb[3] = parseFloat(match[4]);
|
1647 | }
|
1648 | } else if (match = string.match(per)) {
|
1649 | for (i = 0; i < 3; i++) {
|
1650 | rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
|
1651 | }
|
1652 |
|
1653 | if (match[4]) {
|
1654 | rgb[3] = parseFloat(match[4]);
|
1655 | }
|
1656 | } else if (match = string.match(keyword)) {
|
1657 | if (match[1] === 'transparent') {
|
1658 | return [0, 0, 0, 0];
|
1659 | }
|
1660 |
|
1661 | rgb = colorName[match[1]];
|
1662 |
|
1663 | if (!rgb) {
|
1664 | return null;
|
1665 | }
|
1666 |
|
1667 | rgb[3] = 1;
|
1668 |
|
1669 | return rgb;
|
1670 | } else {
|
1671 | return null;
|
1672 | }
|
1673 |
|
1674 | for (i = 0; i < 3; i++) {
|
1675 | rgb[i] = clamp(rgb[i], 0, 255);
|
1676 | }
|
1677 | rgb[3] = clamp(rgb[3], 0, 1);
|
1678 |
|
1679 | return rgb;
|
1680 | };
|
1681 |
|
1682 | cs.get.hsl = function (string) {
|
1683 | if (!string) {
|
1684 | return null;
|
1685 | }
|
1686 |
|
1687 | var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/;
|
1688 | var match = string.match(hsl);
|
1689 |
|
1690 | if (match) {
|
1691 | var alpha = parseFloat(match[4]);
|
1692 | var h = (parseFloat(match[1]) + 360) % 360;
|
1693 | var s = clamp(parseFloat(match[2]), 0, 100);
|
1694 | var l = clamp(parseFloat(match[3]), 0, 100);
|
1695 | var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
1696 |
|
1697 | return [h, s, l, a];
|
1698 | }
|
1699 |
|
1700 | return null;
|
1701 | };
|
1702 |
|
1703 | cs.get.hwb = function (string) {
|
1704 | if (!string) {
|
1705 | return null;
|
1706 | }
|
1707 |
|
1708 | var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
|
1709 | var match = string.match(hwb);
|
1710 |
|
1711 | if (match) {
|
1712 | var alpha = parseFloat(match[4]);
|
1713 | var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
1714 | var w = clamp(parseFloat(match[2]), 0, 100);
|
1715 | var b = clamp(parseFloat(match[3]), 0, 100);
|
1716 | var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
1717 | return [h, w, b, a];
|
1718 | }
|
1719 |
|
1720 | return null;
|
1721 | };
|
1722 |
|
1723 | cs.to.hex = function () {
|
1724 | var rgba = simpleSwizzle(arguments);
|
1725 |
|
1726 | return (
|
1727 | '#' +
|
1728 | hexDouble(rgba[0]) +
|
1729 | hexDouble(rgba[1]) +
|
1730 | hexDouble(rgba[2]) +
|
1731 | (rgba[3] < 1
|
1732 | ? (hexDouble(Math.round(rgba[3] * 255)))
|
1733 | : '')
|
1734 | );
|
1735 | };
|
1736 |
|
1737 | cs.to.rgb = function () {
|
1738 | var rgba = simpleSwizzle(arguments);
|
1739 |
|
1740 | return rgba.length < 4 || rgba[3] === 1
|
1741 | ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
|
1742 | : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
|
1743 | };
|
1744 |
|
1745 | cs.to.rgb.percent = function () {
|
1746 | var rgba = simpleSwizzle(arguments);
|
1747 |
|
1748 | var r = Math.round(rgba[0] / 255 * 100);
|
1749 | var g = Math.round(rgba[1] / 255 * 100);
|
1750 | var b = Math.round(rgba[2] / 255 * 100);
|
1751 |
|
1752 | return rgba.length < 4 || rgba[3] === 1
|
1753 | ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
|
1754 | : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
|
1755 | };
|
1756 |
|
1757 | cs.to.hsl = function () {
|
1758 | var hsla = simpleSwizzle(arguments);
|
1759 | return hsla.length < 4 || hsla[3] === 1
|
1760 | ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
|
1761 | : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
|
1762 | };
|
1763 |
|
1764 |
|
1765 |
|
1766 | cs.to.hwb = function () {
|
1767 | var hwba = simpleSwizzle(arguments);
|
1768 |
|
1769 | var a = '';
|
1770 | if (hwba.length >= 4 && hwba[3] !== 1) {
|
1771 | a = ', ' + hwba[3];
|
1772 | }
|
1773 |
|
1774 | return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
|
1775 | };
|
1776 |
|
1777 | cs.to.keyword = function (rgb) {
|
1778 | return reverseNames[rgb.slice(0, 3)];
|
1779 | };
|
1780 |
|
1781 |
|
1782 | function clamp(num, min, max) {
|
1783 | return Math.min(Math.max(min, num), max);
|
1784 | }
|
1785 |
|
1786 | function hexDouble(num) {
|
1787 | var str = num.toString(16).toUpperCase();
|
1788 | return (str.length < 2) ? '0' + str : str;
|
1789 | }
|
1790 | });
|
1791 |
|
1792 | function _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
1793 |
|
1794 | function hsl2rgb(h, s, l) {
|
1795 | s = s / 100,
|
1796 | l = l / 100;
|
1797 | if (h >= 360)
|
1798 | h %= 360;
|
1799 |
|
1800 | const c = (1 - Math.abs(2 * l - 1)) * s;
|
1801 | const x = c * (1 - Math.abs((h / 60) % 2 - 1));
|
1802 | const m = l - c/2;
|
1803 | let r = 0;
|
1804 | let g = 0;
|
1805 | let b = 0;
|
1806 |
|
1807 | if (0 <= h && h < 60) {
|
1808 | r = c; g = x; b = 0;
|
1809 | } else if (60 <= h && h < 120) {
|
1810 | r = x; g = c; b = 0;
|
1811 | } else if (120 <= h && h < 180) {
|
1812 | r = 0; g = c; b = x;
|
1813 | } else if (180 <= h && h < 240) {
|
1814 | r = 0; g = x; b = c;
|
1815 | } else if (240 <= h && h < 300) {
|
1816 | r = x; g = 0; b = c;
|
1817 | } else if (300 <= h && h < 360) {
|
1818 | r = c; g = 0; b = x;
|
1819 | }
|
1820 |
|
1821 | r = Math.round((r + m) * 255);
|
1822 | g = Math.round((g + m) * 255);
|
1823 | b = Math.round((b + m) * 255);
|
1824 | return [r, g, b];
|
1825 | }
|
1826 |
|
1827 | function hwb2rgb(h, w, b) {
|
1828 | const rgb = hsl2rgb(h, 100, 50);
|
1829 |
|
1830 | for (let i = 0; i < 3; ++i) {
|
1831 | let c = rgb[i] / 255;
|
1832 |
|
1833 | c *= 1 - w/100 - b/100;
|
1834 | c += w/100;
|
1835 |
|
1836 | rgb[i] = Math.round(c * 255);
|
1837 | }
|
1838 |
|
1839 | return rgb;
|
1840 | }
|
1841 |
|
1842 | function toRGBA(color) {
|
1843 | if (/^hsla?/.test(color)) {
|
1844 | const colorTuple = colorString.get.hsl(color);
|
1845 | if (!colorTuple) return;
|
1846 | return [...hsl2rgb(colorTuple[0], colorTuple[1], colorTuple[2]), colorTuple[3]];
|
1847 | } else if (/^rgba?/.test(color)) {
|
1848 | const colorTuple = colorString.get.rgb(color);
|
1849 | if (!colorTuple) return;
|
1850 | return colorTuple;
|
1851 | } else if (color.startsWith('hwb')) {
|
1852 | const colorTuple = colorString.get.hwb(color);
|
1853 | if (!colorTuple) return;
|
1854 | return [...hwb2rgb(colorTuple[0], colorTuple[1], colorTuple[2]), colorTuple[3]];
|
1855 | }
|
1856 | return _optionalChain$4([colorString, 'access', _ => _.get, 'call', _2 => _2(color), 'optionalAccess', _3 => _3.value]);
|
1857 | }
|
1858 |
|
1859 | function toColor(colorStr) {
|
1860 | const rgba = toRGBA(colorStr);
|
1861 | const color = rgba ? rgba.slice(0, 3).join(', ') : colorStr;
|
1862 | const opacity = rgba ? rgba[3].toString() : '1';
|
1863 |
|
1864 | return {
|
1865 | color,
|
1866 | opacity,
|
1867 | };
|
1868 | }
|
1869 |
|
1870 | function generateScreens(screens
|
1871 |
|
1872 | ) {
|
1873 | const variants = {};
|
1874 |
|
1875 | const breakpoints = Object.entries(screens).sort(([, sizeA], [, sizeB]) =>
|
1876 | sortWeight(sizeA) - sortWeight(sizeB)
|
1877 | );
|
1878 |
|
1879 | breakpoints.forEach(([name, size], index) => {
|
1880 | if (isString(size)) {
|
1881 | const [, nextSize] = breakpoints[index + 1] || [];
|
1882 | variants[name] = styleForBreakpoint({ min: size });
|
1883 | variants[`<${name}`] = styleForBreakpoint({ max: increaseWithUnit(size, -0.1) });
|
1884 | variants[`@${name}`] = styleForBreakpoint(
|
1885 | nextSize ? { min: size, max: increaseWithUnit(nextSize , -0.1) } : { min: size }
|
1886 | );
|
1887 | variants[`-${name}`] = styleForBreakpoint({ max: size });
|
1888 | variants[`+${name}`] = styleForBreakpoint(
|
1889 | nextSize ? { min: size, max: nextSize } : { min: size }
|
1890 | );
|
1891 | } else {
|
1892 | variants[name] = styleForBreakpoint(size);
|
1893 | }
|
1894 | });
|
1895 |
|
1896 | return variants;
|
1897 | }
|
1898 |
|
1899 | function styleForBreakpoint(rule) {
|
1900 | const mediaConditions = 'raw' in rule ? rule.raw : [
|
1901 | rule.min && `(min-width: ${rule.min})`,
|
1902 | rule.max && `(max-width: ${rule.max})`,
|
1903 | ].filter(condition => condition).join(' and ');
|
1904 | return () => new Style().atRule(`@media ${mediaConditions}`);
|
1905 | }
|
1906 |
|
1907 |
|
1908 |
|
1909 | function sortWeight(breakpoint) {
|
1910 | return isString(breakpoint) ? parseInt(breakpoint) : Number.NEGATIVE_INFINITY;
|
1911 | }
|
1912 |
|
1913 | function generateThemes (
|
1914 | darkMode
|
1915 | ) {
|
1916 | if (!darkMode) return {};
|
1917 | return {
|
1918 | '@dark': () => new Style().atRule('@media (prefers-color-scheme: dark)'),
|
1919 | '@light': () => new Style().atRule('@media (prefers-color-scheme: light)'),
|
1920 | '.dark': () => new Style().parent('.dark'),
|
1921 | '.light': () => new Style().parent('.light'),
|
1922 | dark: () => darkMode === 'media'? new Style().atRule('@media (prefers-color-scheme: dark)'): new Style().parent('.dark'),
|
1923 | light: () => darkMode === 'media'? new Style().atRule('@media (prefers-color-scheme: light)'): new Style().parent('.light'),
|
1924 | } ;
|
1925 | }
|
1926 |
|
1927 |
|
1928 |
|
1929 |
|
1930 |
|
1931 |
|
1932 | function generateStates (
|
1933 | variantOrder
|
1934 | ) {
|
1935 | const states = {
|
1936 |
|
1937 | hover: () => new Style().pseudoClass('hover'),
|
1938 | focus: () => new Style().pseudoClass('focus'),
|
1939 | active: () => new Style().pseudoClass('active'),
|
1940 | visited: () => new Style().pseudoClass('visited'),
|
1941 | link: () => new Style().pseudoClass('link'),
|
1942 | target: () => new Style().pseudoClass('target'),
|
1943 | 'focus-visible': () => new Style().pseudoClass('focus-visible'),
|
1944 | 'focus-within': () => new Style().pseudoClass('focus-within'),
|
1945 |
|
1946 |
|
1947 | checked: () => new Style().pseudoClass('checked'),
|
1948 | 'not-checked': () => new Style().pseudoClass('not(:checked)'),
|
1949 | default: () => new Style().pseudoClass('default'),
|
1950 | disabled: () => new Style().pseudoClass('disabled'),
|
1951 | enabled: () => new Style().pseudoClass('enabled'),
|
1952 | indeterminate: () => new Style().pseudoClass('indeterminate'),
|
1953 | invalid: () => new Style().pseudoClass('invalid'),
|
1954 | valid: () => new Style().pseudoClass('valid'),
|
1955 | optional: () => new Style().pseudoClass('optional'),
|
1956 | required: () => new Style().pseudoClass('required'),
|
1957 | 'placeholder-shown': () => new Style().pseudoClass('placeholder-shown'),
|
1958 | 'read-only': () => new Style().pseudoClass('read-only'),
|
1959 | 'read-write': () => new Style().pseudoClass('read-write'),
|
1960 |
|
1961 |
|
1962 | 'not-disabled': () => new Style().pseudoClass('not(:disabled)'),
|
1963 | 'first-of-type': () => new Style().pseudoClass('first-of-type'),
|
1964 | 'not-first-of-type': () => new Style().pseudoClass('not(:first-of-type)'),
|
1965 | 'last-of-type': () => new Style().pseudoClass('last-of-type'),
|
1966 | 'not-last-of-type': () => new Style().pseudoClass('not(:last-of-type)'),
|
1967 | first: () => new Style().pseudoClass('first-child'),
|
1968 | last: () => new Style().pseudoClass('last-child'),
|
1969 | 'not-first': () => new Style().pseudoClass('not(:first-child)'),
|
1970 | 'not-last': () => new Style().pseudoClass('not(:last-child)'),
|
1971 | 'only-child': () => new Style().pseudoClass('only-child'),
|
1972 | 'not-only-child': () => new Style().pseudoClass('not(:only-child)'),
|
1973 | 'only-of-type': () => new Style().pseudoClass('only-of-type'),
|
1974 | 'not-only-of-type': () => new Style().pseudoClass('not(:only-of-type)'),
|
1975 | even: () => new Style().pseudoClass('nth-child(even)'),
|
1976 | odd: () => new Style().pseudoClass('nth-child(odd)'),
|
1977 | 'even-of-type': () => new Style().pseudoClass('nth-of-type(even)'),
|
1978 | 'odd-of-type': () => new Style().pseudoClass('nth-of-type(odd)'),
|
1979 | root: () => new Style().pseudoClass('root'),
|
1980 | empty: () => new Style().pseudoClass('empty'),
|
1981 |
|
1982 |
|
1983 | before: () => new Style().pseudoElement('before'),
|
1984 | after: () => new Style().pseudoElement('after'),
|
1985 | 'first-letter': () => new Style().pseudoElement('first-letter'),
|
1986 | 'first-line': () => new Style().pseudoElement('first-line'),
|
1987 | 'file-selector-button': () => new Style().pseudoElement('file-selector-button'),
|
1988 | selection: () => new Style().pseudoElement('selection'),
|
1989 |
|
1990 | svg: () => new Style().child('svg'),
|
1991 | all: () => new Style().child('*'),
|
1992 | children: () => new Style().child('> *'),
|
1993 | siblings: () => new Style().child('~ *'),
|
1994 | sibling: () => new Style().child('+ *'),
|
1995 |
|
1996 |
|
1997 |
|
1998 | ltr: () => new Style().wrapSelector(selector => `[dir='ltr'] ${selector}, [dir='ltr']${selector}`),
|
1999 | rtl: () => new Style().wrapSelector(selector => `[dir='rtl'] ${selector}, [dir='rtl']${selector}`),
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 | 'group-hover': () => new Style().parent('.group:hover'),
|
2005 | 'group-focus': () => new Style().parent('.group:focus'),
|
2006 | 'group-active': () => new Style().parent('.group:active'),
|
2007 | 'group-visited': () => new Style().parent('.group:visited'),
|
2008 |
|
2009 |
|
2010 |
|
2011 | 'motion-safe': () => new Style().atRule('@media (prefers-reduced-motion: no-preference)'),
|
2012 | 'motion-reduce': () => new Style().atRule('@media (prefers-reduced-motion: reduce)'),
|
2013 | };
|
2014 | const orderedStates = {};
|
2015 | variantOrder.forEach((v) => {
|
2016 | if (v in states) {
|
2017 | orderedStates[v] = states[v];
|
2018 | }
|
2019 | });
|
2020 | return orderedStates;
|
2021 | }
|
2022 |
|
2023 | function _nullishCoalesce$3(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 | function resolveVariants(config) {
|
2034 | return {
|
2035 | screen: generateScreens((_nullishCoalesce$3(_optionalChain$3([(config.theme ), 'optionalAccess', _ => _.screens]), () => ( {}))) ),
|
2036 | theme: generateThemes(config.darkMode),
|
2037 | state: generateStates(_nullishCoalesce$3(config.variantOrder, () => ( []))),
|
2038 | };
|
2039 | }
|
2040 |
|
2041 | function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
2042 |
|
2043 |
|
2044 | const preflights
|
2045 |
|
2046 |
|
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 | = [
|
2052 |
|
2053 |
|
2054 |
|
2055 | |
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 | |
2061 |
|
2062 |
|
2063 |
|
2064 |
|
2065 |
|
2066 |
|
2067 |
|
2068 |
|
2069 |
|
2070 |
|
2071 |
|
2072 |
|
2073 |
|
2074 | |
2075 |
|
2076 |
|
2077 |
|
2078 | {
|
2079 | keys: ['root'],
|
2080 | global: true,
|
2081 | selector: ':root',
|
2082 | properties: {
|
2083 | '-moz-tab-size': (theme) => theme('tabSize.DEFAULT', '4'),
|
2084 | '-o-tab-size': (theme) => theme('tabSize.DEFAULT', '4'),
|
2085 | 'tab-size': (theme) => theme('tabSize.DEFAULT', '4'),
|
2086 | },
|
2087 | },
|
2088 |
|
2089 | |
2090 |
|
2091 |
|
2092 |
|
2093 |
|
2094 | {
|
2095 | keys: ['html'],
|
2096 | global: true,
|
2097 | selector: 'html',
|
2098 | properties: {
|
2099 |
|
2100 | '-webkit-text-size-adjust': '100%',
|
2101 | },
|
2102 | },
|
2103 |
|
2104 | |
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 | |
2110 |
|
2111 |
|
2112 |
|
2113 | {
|
2114 | keys: ['body'],
|
2115 | global: true,
|
2116 | selector: 'body',
|
2117 | properties: {
|
2118 | 'margin': '0',
|
2119 | },
|
2120 | },
|
2121 |
|
2122 | |
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 |
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 |
|
2136 | |
2137 |
|
2138 |
|
2139 |
|
2140 |
|
2141 | |
2142 |
|
2143 |
|
2144 |
|
2145 |
|
2146 | {
|
2147 | keys: ['hr'],
|
2148 | properties: {
|
2149 | 'height': '0',
|
2150 | 'color': 'inherit',
|
2151 | },
|
2152 | },
|
2153 |
|
2154 | |
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 | |
2160 |
|
2161 |
|
2162 |
|
2163 | {
|
2164 | keys: ['title'],
|
2165 | global: true,
|
2166 | selector: 'abbr[title]',
|
2167 | properties: {
|
2168 | '-webkit-text-decoration': 'underline dotted',
|
2169 | 'text-decoration': 'underline dotted',
|
2170 | },
|
2171 | },
|
2172 |
|
2173 | |
2174 |
|
2175 |
|
2176 |
|
2177 | {
|
2178 | keys: ['b', 'strong'],
|
2179 | properties: {
|
2180 | 'font-weight': 'bolder',
|
2181 | },
|
2182 | },
|
2183 |
|
2184 | |
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 | {
|
2190 | keys: ['code', 'kbd', 'samp', 'pre'],
|
2191 | properties: {
|
2192 |
|
2193 | 'font-size': '1em',
|
2194 | },
|
2195 | },
|
2196 |
|
2197 | |
2198 |
|
2199 |
|
2200 |
|
2201 | {
|
2202 | keys: ['small'],
|
2203 | properties: {
|
2204 | 'font-size': '80%',
|
2205 | },
|
2206 | },
|
2207 |
|
2208 | |
2209 |
|
2210 |
|
2211 |
|
2212 | {
|
2213 | keys: ['sub', 'sup'],
|
2214 | properties: {
|
2215 | 'font-size': '75%',
|
2216 | 'line-height': '0',
|
2217 | 'position': 'relative',
|
2218 | 'vertical-align': 'baseline',
|
2219 | },
|
2220 | },
|
2221 |
|
2222 | {
|
2223 | keys: ['sub'],
|
2224 | properties: {
|
2225 | 'bottom': '-0.25em',
|
2226 | },
|
2227 | },
|
2228 |
|
2229 | {
|
2230 | keys: ['sup'],
|
2231 | properties: {
|
2232 | 'top': '-0.5em',
|
2233 | },
|
2234 | },
|
2235 |
|
2236 | |
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 | |
2242 |
|
2243 |
|
2244 |
|
2245 |
|
2246 | {
|
2247 | keys: ['table'],
|
2248 | properties: {
|
2249 | 'text-indent': '0',
|
2250 | 'border-color': 'inherit',
|
2251 | },
|
2252 | },
|
2253 |
|
2254 | |
2255 |
|
2256 |
|
2257 |
|
2258 |
|
2259 | |
2260 |
|
2261 |
|
2262 |
|
2263 |
|
2264 | {
|
2265 | keys: ['button', 'input', 'optgroup', 'select', 'textarea'],
|
2266 | properties: {
|
2267 | 'font-family': 'inherit',
|
2268 | 'font-size': '100%',
|
2269 | 'line-height': '1.15',
|
2270 | 'margin': '0',
|
2271 | },
|
2272 | },
|
2273 |
|
2274 | |
2275 |
|
2276 |
|
2277 |
|
2278 |
|
2279 | {
|
2280 | keys: ['button', 'select'],
|
2281 | properties: {
|
2282 | 'text-transform': 'none',
|
2283 | },
|
2284 | },
|
2285 |
|
2286 | |
2287 |
|
2288 |
|
2289 |
|
2290 | {
|
2291 | keys: ['button'],
|
2292 | selector: 'button, [type=\'button\'], [type=\'reset\'], [type=\'submit\']',
|
2293 | properties: {
|
2294 | '-webkit-appearance': 'button',
|
2295 | },
|
2296 | },
|
2297 |
|
2298 | |
2299 |
|
2300 |
|
2301 |
|
2302 | {
|
2303 | keys: ['inner'],
|
2304 | global: true,
|
2305 | selector: '::moz-focus-inner',
|
2306 | properties: {
|
2307 | 'border-style': 'none',
|
2308 | 'padding': '0',
|
2309 | },
|
2310 | },
|
2311 |
|
2312 | |
2313 |
|
2314 |
|
2315 |
|
2316 | {
|
2317 | keys: ['focusring'],
|
2318 | global: true,
|
2319 | selector: ':-moz-focusring',
|
2320 | properties: {
|
2321 | 'outline': '1px dotted ButtonText',
|
2322 | },
|
2323 | },
|
2324 |
|
2325 | |
2326 |
|
2327 |
|
2328 |
|
2329 |
|
2330 | {
|
2331 | keys: ['invalid'],
|
2332 | global: true,
|
2333 | selector: ':-moz-ui-invalid',
|
2334 | properties: {
|
2335 | 'box-shadow': 'none',
|
2336 | },
|
2337 | },
|
2338 |
|
2339 | |
2340 |
|
2341 |
|
2342 |
|
2343 | {
|
2344 | keys: ['legend'],
|
2345 | properties: {
|
2346 | 'padding': '0',
|
2347 | },
|
2348 | },
|
2349 |
|
2350 | |
2351 |
|
2352 |
|
2353 |
|
2354 | {
|
2355 | keys: ['progress'],
|
2356 | properties: {
|
2357 | 'vertical-align': 'baseline',
|
2358 | },
|
2359 | },
|
2360 |
|
2361 | |
2362 |
|
2363 |
|
2364 |
|
2365 | {
|
2366 | keys: ['spin'],
|
2367 | global: true,
|
2368 | selector: '::-webkit-inner-spin-button, ::-webkit-outer-spin-button',
|
2369 | properties: {
|
2370 | 'height': 'auto',
|
2371 | },
|
2372 | },
|
2373 |
|
2374 | |
2375 |
|
2376 |
|
2377 |
|
2378 |
|
2379 | {
|
2380 | keys: ['search'],
|
2381 | global: true,
|
2382 | selector: '[type=\'search\']',
|
2383 | properties: {
|
2384 | '-webkit-appearance': 'textfield',
|
2385 | 'outline-offset': '-2px',
|
2386 |
|
2387 | },
|
2388 | },
|
2389 |
|
2390 | |
2391 |
|
2392 |
|
2393 |
|
2394 | {
|
2395 | keys: ['search'],
|
2396 | global: true,
|
2397 | selector: '::-webkit-search-decoration',
|
2398 | properties: {
|
2399 | '-webkit-appearance': 'none',
|
2400 | },
|
2401 | },
|
2402 |
|
2403 | |
2404 |
|
2405 |
|
2406 |
|
2407 |
|
2408 | {
|
2409 | keys: ['file'],
|
2410 | global: true,
|
2411 | selector: '::-webkit-file-upload-button',
|
2412 | properties: {
|
2413 | '-webkit-appearance': 'button',
|
2414 | 'font': 'inherit',
|
2415 | },
|
2416 | },
|
2417 |
|
2418 | |
2419 |
|
2420 |
|
2421 |
|
2422 |
|
2423 | |
2424 |
|
2425 |
|
2426 |
|
2427 | {
|
2428 | keys: ['summary'],
|
2429 | properties: {
|
2430 | 'display': 'list-item',
|
2431 | },
|
2432 | },
|
2433 |
|
2434 | |
2435 |
|
2436 |
|
2437 |
|
2438 |
|
2439 |
|
2440 | |
2441 |
|
2442 |
|
2443 |
|
2444 | {
|
2445 | keys: ['blockquote', 'dl', 'dd', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'figure', 'p', 'pre'],
|
2446 | properties: {
|
2447 | 'margin': '0',
|
2448 | },
|
2449 | },
|
2450 |
|
2451 | {
|
2452 | keys: ['button'],
|
2453 | properties: {
|
2454 | 'background-color': 'transparent',
|
2455 | 'background-image': 'none' },
|
2456 | },
|
2457 |
|
2458 | |
2459 |
|
2460 |
|
2461 |
|
2462 |
|
2463 | {
|
2464 | keys: ['button'],
|
2465 | selector: 'button:focus',
|
2466 | properties: {
|
2467 | 'outline': [
|
2468 | '1px dotted',
|
2469 | '5px auto -webkit-focus-ring-color',
|
2470 | ],
|
2471 | },
|
2472 | },
|
2473 |
|
2474 | {
|
2475 | keys: ['fieldset'],
|
2476 | properties: {
|
2477 | 'margin': '0',
|
2478 | 'padding': '0',
|
2479 | },
|
2480 | },
|
2481 |
|
2482 | {
|
2483 | keys: ['ol', 'ul'],
|
2484 | properties: {
|
2485 | 'list-style': 'none',
|
2486 | 'margin': '0',
|
2487 | 'padding': '0',
|
2488 | },
|
2489 | },
|
2490 |
|
2491 | |
2492 |
|
2493 |
|
2494 |
|
2495 | |
2496 |
|
2497 |
|
2498 |
|
2499 |
|
2500 |
|
2501 |
|
2502 | {
|
2503 | keys: ['html'],
|
2504 | global: true,
|
2505 | selector: 'html',
|
2506 | properties: {
|
2507 | 'font-family': (theme) => theme('fontFamily.sans', 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"') ,
|
2508 | 'line-height': '1.5',
|
2509 | },
|
2510 | },
|
2511 |
|
2512 | |
2513 |
|
2514 |
|
2515 |
|
2516 |
|
2517 | {
|
2518 | keys: ['body'],
|
2519 | global: true,
|
2520 | selector: 'body',
|
2521 | properties: {
|
2522 | 'font-family': 'inherit',
|
2523 | 'line-height': 'inherit',
|
2524 | },
|
2525 | },
|
2526 |
|
2527 | |
2528 |
|
2529 |
|
2530 |
|
2531 |
|
2532 |
|
2533 |
|
2534 |
|
2535 |
|
2536 |
|
2537 |
|
2538 |
|
2539 |
|
2540 |
|
2541 |
|
2542 |
|
2543 |
|
2544 |
|
2545 |
|
2546 |
|
2547 |
|
2548 |
|
2549 |
|
2550 |
|
2551 |
|
2552 | {
|
2553 | keys: ['*'],
|
2554 | global: true,
|
2555 | selector: '*, ::before, ::after',
|
2556 | properties: {
|
2557 | '-webkit-box-sizing': 'border-box',
|
2558 | 'box-sizing': 'border-box',
|
2559 | 'border-width': '0',
|
2560 | 'border-style': 'solid',
|
2561 | 'border-color': (theme) => theme('borderColor.DEFAULT', 'currentColor') ,
|
2562 | },
|
2563 | },
|
2564 |
|
2565 | |
2566 |
|
2567 |
|
2568 |
|
2569 | {
|
2570 | keys: ['hr'],
|
2571 | properties: {
|
2572 | 'border-top-width': '1px',
|
2573 | },
|
2574 | },
|
2575 |
|
2576 | |
2577 |
|
2578 |
|
2579 |
|
2580 |
|
2581 |
|
2582 |
|
2583 |
|
2584 |
|
2585 | {
|
2586 | keys: ['img'],
|
2587 | properties: {
|
2588 | 'border-style': 'solid',
|
2589 | },
|
2590 | },
|
2591 |
|
2592 | {
|
2593 | keys: ['textarea'],
|
2594 | properties: {
|
2595 | 'resize': 'vertical',
|
2596 | },
|
2597 | },
|
2598 |
|
2599 |
|
2600 |
|
2601 |
|
2602 |
|
2603 |
|
2604 |
|
2605 | {
|
2606 | keys: ['input'],
|
2607 | selector: 'input::placeholder',
|
2608 | properties: {
|
2609 | 'opacity': '1',
|
2610 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2611 | },
|
2612 | },
|
2613 |
|
2614 | {
|
2615 | keys: ['input'],
|
2616 | selector: 'input::webkit-input-placeholder',
|
2617 | properties: {
|
2618 | 'opacity': '1',
|
2619 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2620 | },
|
2621 | },
|
2622 |
|
2623 | {
|
2624 | keys: ['input'],
|
2625 | selector: 'input::-moz-placeholder',
|
2626 | properties: {
|
2627 | 'opacity': '1',
|
2628 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2629 | },
|
2630 | },
|
2631 |
|
2632 | {
|
2633 | keys: ['input'],
|
2634 | selector: 'input:-ms-input-placeholder',
|
2635 | properties: {
|
2636 | 'opacity': '1',
|
2637 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2638 | },
|
2639 | },
|
2640 |
|
2641 | {
|
2642 | keys: ['input'],
|
2643 | selector: 'input::-ms-input-placeholder',
|
2644 | properties: {
|
2645 | 'opacity': '1',
|
2646 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2647 | },
|
2648 | },
|
2649 |
|
2650 | {
|
2651 | keys: ['textarea'],
|
2652 | selector: 'textarea::placeholder',
|
2653 | properties: {
|
2654 | 'opacity': '1',
|
2655 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2656 | },
|
2657 | },
|
2658 |
|
2659 | {
|
2660 | keys: ['textarea'],
|
2661 | selector: 'textarea::webkit-input-placeholder',
|
2662 | properties: {
|
2663 | 'opacity': '1',
|
2664 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2665 | },
|
2666 | },
|
2667 |
|
2668 | {
|
2669 | keys: ['textarea'],
|
2670 | selector: 'textarea::-moz-placeholder',
|
2671 | properties: {
|
2672 | 'opacity': '1',
|
2673 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2674 | },
|
2675 | },
|
2676 |
|
2677 | {
|
2678 | keys: ['textarea'],
|
2679 | selector: 'textarea:-ms-input-placeholder',
|
2680 | properties: {
|
2681 | 'opacity': '1',
|
2682 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2683 | },
|
2684 | },
|
2685 |
|
2686 | {
|
2687 | keys: ['textarea'],
|
2688 | selector: 'textarea::-ms-input-placeholder',
|
2689 | properties: {
|
2690 | 'opacity': '1',
|
2691 | 'color': (theme) => theme('colors.gray.400', '#a1a1aa') ,
|
2692 | },
|
2693 | },
|
2694 |
|
2695 | {
|
2696 | keys: ['button'],
|
2697 | selector: 'button, [role="button"]',
|
2698 | properties: {
|
2699 | 'cursor': 'pointer',
|
2700 | },
|
2701 | },
|
2702 |
|
2703 | {
|
2704 | keys: ['table'],
|
2705 | properties: {
|
2706 | 'border-collapse': 'collapse',
|
2707 | },
|
2708 | },
|
2709 |
|
2710 | {
|
2711 | keys: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
2712 | properties: {
|
2713 | 'font-size': 'inherit',
|
2714 | 'font-weight': 'inherit',
|
2715 | },
|
2716 | },
|
2717 |
|
2718 | |
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 | {
|
2724 | keys: ['a'],
|
2725 | properties: {
|
2726 | 'color': 'inherit',
|
2727 | 'text-decoration': 'inherit',
|
2728 | },
|
2729 | },
|
2730 |
|
2731 | |
2732 |
|
2733 |
|
2734 |
|
2735 |
|
2736 |
|
2737 |
|
2738 |
|
2739 | {
|
2740 | keys: ['button', 'input', 'optgroup', 'select', 'textarea'],
|
2741 | properties: {
|
2742 | 'padding': '0',
|
2743 | 'line-height': 'inherit',
|
2744 | 'color': 'inherit',
|
2745 | },
|
2746 | },
|
2747 |
|
2748 | |
2749 |
|
2750 |
|
2751 |
|
2752 |
|
2753 |
|
2754 |
|
2755 | {
|
2756 | keys: ['pre', 'code', 'kbd', 'samp'],
|
2757 | properties: {
|
2758 | 'font-family': (theme) => theme('fontFamily.mono', 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace') ,
|
2759 | },
|
2760 | },
|
2761 |
|
2762 | |
2763 |
|
2764 |
|
2765 |
|
2766 |
|
2767 |
|
2768 |
|
2769 |
|
2770 | {
|
2771 | keys: ['img', 'svg', 'video', 'canvas', 'audio', 'iframe', 'embed', 'object'],
|
2772 | properties: {
|
2773 | 'display': 'block',
|
2774 | 'vertical-align': 'middle',
|
2775 | },
|
2776 | },
|
2777 |
|
2778 | |
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 |
|
2784 |
|
2785 | {
|
2786 | keys: ['img', 'video'],
|
2787 | properties: {
|
2788 | 'max-width': '100%',
|
2789 | 'height': 'auto',
|
2790 | },
|
2791 | },
|
2792 |
|
2793 |
|
2794 |
|
2795 | {
|
2796 | keys: ['*'],
|
2797 | global: true,
|
2798 | selector: '*',
|
2799 | properties: {
|
2800 | '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
2801 | '--tw-ring-offset-width': theme => theme('ringOffsetWidth.DEFAULT', '0px') ,
|
2802 | '--tw-ring-offset-color': theme => theme('ringOffsetColor.DEFAULT', '#fff') ,
|
2803 | '--tw-ring-color': theme => `rgba(${_optionalChain$2([hex2RGB, 'call', _ => _(theme('ringColor.DEFAULT', '#93C5FD') ), 'optionalAccess', _2 => _2.join, 'call', _3 => _3(', ')])}, ${theme('ringOpacity.DEFAULT', '0.5') })`,
|
2804 | '--tw-ring-offset-shadow': '0 0 #0000',
|
2805 | '--tw-ring-shadow': '0 0 #0000',
|
2806 | },
|
2807 | },
|
2808 |
|
2809 |
|
2810 |
|
2811 | {
|
2812 | keys: ['*'],
|
2813 | global: true,
|
2814 | selector: '*',
|
2815 | properties: {
|
2816 | '--tw-shadow': '0 0 #0000',
|
2817 | },
|
2818 | },
|
2819 | ];
|
2820 |
|
2821 | const fontVariants = {
|
2822 | '--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
|
2823 | '--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
|
2824 | '--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
|
2825 | '--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
|
2826 | '--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
|
2827 | 'font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)',
|
2828 | };
|
2829 |
|
2830 | const staticUtilities = {
|
2831 |
|
2832 | 'decoration-slice': {
|
2833 | 'utility': {
|
2834 | '-webkit-box-decoration-break': 'slice',
|
2835 | 'box-decoration-break': 'slice',
|
2836 | },
|
2837 | 'meta': {
|
2838 | 'group': 'boxDecorationBreak',
|
2839 | 'order': 1,
|
2840 | },
|
2841 | },
|
2842 |
|
2843 | 'decoration-clone': {
|
2844 | 'utility': {
|
2845 | '-webkit-box-decoration-break': 'clone',
|
2846 | 'box-decoration-break': 'clone',
|
2847 | },
|
2848 | 'meta': {
|
2849 | 'group': 'boxDecorationBreak',
|
2850 | 'order': 2,
|
2851 | },
|
2852 | },
|
2853 |
|
2854 |
|
2855 | 'box-border': {
|
2856 | 'utility': {
|
2857 | '-webkit-box-sizing': 'border-box',
|
2858 | 'box-sizing': 'border-box',
|
2859 | },
|
2860 | 'meta': {
|
2861 | 'group': 'boxSizing',
|
2862 | 'order': 1,
|
2863 | },
|
2864 | },
|
2865 | 'box-content': {
|
2866 | 'utility': {
|
2867 | '-webkit-box-sizing': 'content-box',
|
2868 | 'box-sizing': 'content-box',
|
2869 | },
|
2870 | 'meta': {
|
2871 | 'group': 'boxSizing',
|
2872 | 'order': 2,
|
2873 | },
|
2874 | },
|
2875 |
|
2876 |
|
2877 | 'block': {
|
2878 | 'utility': {
|
2879 | 'display': 'block',
|
2880 | },
|
2881 | 'meta': {
|
2882 | 'group': 'display',
|
2883 | 'order': 1,
|
2884 | },
|
2885 | },
|
2886 | 'inline-block': {
|
2887 | 'utility': {
|
2888 | 'display': 'inline-block',
|
2889 | },
|
2890 | 'meta': {
|
2891 | 'group': 'display',
|
2892 | 'order': 2,
|
2893 | },
|
2894 | },
|
2895 | 'inline': {
|
2896 | 'utility': {
|
2897 | 'display': 'inline',
|
2898 | },
|
2899 | 'meta': {
|
2900 | 'group': 'display',
|
2901 | 'order': 3,
|
2902 | },
|
2903 | },
|
2904 |
|
2905 |
|
2906 | 'flex': {
|
2907 | 'utility': {
|
2908 | 'display': [
|
2909 | '-webkit-box',
|
2910 | '-ms-flexbox',
|
2911 | '-webkit-flex',
|
2912 | 'flex',
|
2913 | ],
|
2914 | },
|
2915 | 'meta': {
|
2916 | 'group': 'display',
|
2917 | 'order': 4,
|
2918 | },
|
2919 | },
|
2920 | 'inline-flex': {
|
2921 | 'utility': {
|
2922 | 'display': [
|
2923 | '-webkit-inline-box',
|
2924 | '-ms-inline-flexbox',
|
2925 | '-webkit-inline-flex',
|
2926 | 'inline-flex',
|
2927 | ],
|
2928 | },
|
2929 | 'meta': {
|
2930 | 'group': 'display',
|
2931 | 'order': 5,
|
2932 | },
|
2933 | },
|
2934 |
|
2935 |
|
2936 | 'table': {
|
2937 | 'utility': {
|
2938 | 'display': 'table',
|
2939 | },
|
2940 | 'meta': {
|
2941 | 'group': 'display',
|
2942 | 'order': 6,
|
2943 | },
|
2944 | },
|
2945 | 'inline-table': {
|
2946 | 'utility': {
|
2947 | 'display': 'inline-table',
|
2948 | },
|
2949 | 'meta': {
|
2950 | 'group': 'display',
|
2951 | 'order': 7,
|
2952 | },
|
2953 | },
|
2954 | 'table-caption': {
|
2955 | 'utility': {
|
2956 | 'display': 'table-caption',
|
2957 | },
|
2958 | 'meta': {
|
2959 | 'group': 'display',
|
2960 | 'order': 8,
|
2961 | },
|
2962 | },
|
2963 | 'table-cell': {
|
2964 | 'utility': {
|
2965 | 'display': 'table-cell',
|
2966 | },
|
2967 | 'meta': {
|
2968 | 'group': 'display',
|
2969 | 'order': 9,
|
2970 | },
|
2971 | },
|
2972 | 'table-column': {
|
2973 | 'utility': {
|
2974 | 'display': 'table-column',
|
2975 | },
|
2976 | 'meta': {
|
2977 | 'group': 'display',
|
2978 | 'order': 10,
|
2979 | },
|
2980 | },
|
2981 | 'table-column-group': {
|
2982 | 'utility': {
|
2983 | 'display': 'table-column-group',
|
2984 | },
|
2985 | 'meta': {
|
2986 | 'group': 'display',
|
2987 | 'order': 11,
|
2988 | },
|
2989 | },
|
2990 | 'table-footer-group': {
|
2991 | 'utility': {
|
2992 | 'display': 'table-footer-group',
|
2993 | },
|
2994 | 'meta': {
|
2995 | 'group': 'display',
|
2996 | 'order': 12,
|
2997 | },
|
2998 | },
|
2999 | 'table-header-group': {
|
3000 | 'utility': {
|
3001 | 'display': 'table-header-group',
|
3002 | },
|
3003 | 'meta': {
|
3004 | 'group': 'display',
|
3005 | 'order': 13,
|
3006 | },
|
3007 | },
|
3008 | 'table-row-group': {
|
3009 | 'utility': {
|
3010 | 'display': 'table-row-group',
|
3011 | },
|
3012 | 'meta': {
|
3013 | 'group': 'display',
|
3014 | 'order': 14,
|
3015 | },
|
3016 | },
|
3017 | 'table-row': {
|
3018 | 'utility': {
|
3019 | 'display': 'table-row',
|
3020 | },
|
3021 | 'meta': {
|
3022 | 'group': 'display',
|
3023 | 'order': 15,
|
3024 | },
|
3025 | },
|
3026 | 'flow-root': {
|
3027 | 'utility': {
|
3028 | 'display': 'flow-root',
|
3029 | },
|
3030 | 'meta': {
|
3031 | 'group': 'display',
|
3032 | 'order': 16,
|
3033 | },
|
3034 | },
|
3035 |
|
3036 |
|
3037 | 'grid': {
|
3038 | 'utility': {
|
3039 | 'display': [
|
3040 | '-ms-grid',
|
3041 | 'grid',
|
3042 | ],
|
3043 | },
|
3044 | 'meta': {
|
3045 | 'group': 'display',
|
3046 | 'order': 17,
|
3047 | },
|
3048 | },
|
3049 | 'inline-grid': {
|
3050 | 'utility': {
|
3051 | 'display': [
|
3052 | '-ms-inline-grid',
|
3053 | 'inline-grid',
|
3054 | ],
|
3055 | },
|
3056 | 'meta': {
|
3057 | 'group': 'display',
|
3058 | 'order': 18,
|
3059 | },
|
3060 | },
|
3061 | 'contents': {
|
3062 | 'utility': {
|
3063 | 'display': 'contents',
|
3064 | },
|
3065 | 'meta': {
|
3066 | 'group': 'display',
|
3067 | 'order': 19,
|
3068 | },
|
3069 | },
|
3070 | 'list-item': {
|
3071 | 'utility': {
|
3072 | 'display': 'list-item',
|
3073 | },
|
3074 | 'meta': {
|
3075 | 'group': 'display',
|
3076 | 'order': 20,
|
3077 | },
|
3078 | },
|
3079 | 'hidden': {
|
3080 | 'utility': {
|
3081 | 'display': 'none',
|
3082 | },
|
3083 | 'meta': {
|
3084 | 'group': 'display',
|
3085 | 'order': 21,
|
3086 | },
|
3087 | },
|
3088 |
|
3089 |
|
3090 | 'float-right': {
|
3091 | 'utility': {
|
3092 | 'float': 'right',
|
3093 | },
|
3094 | 'meta': {
|
3095 | 'group': 'float',
|
3096 | 'order': 1,
|
3097 | },
|
3098 | },
|
3099 | 'float-left': {
|
3100 | 'utility': {
|
3101 | 'float': 'left',
|
3102 | },
|
3103 | 'meta': {
|
3104 | 'group': 'float',
|
3105 | 'order': 2,
|
3106 | },
|
3107 | },
|
3108 | 'float-none': {
|
3109 | 'utility': {
|
3110 | 'float': 'none',
|
3111 | },
|
3112 | 'meta': {
|
3113 | 'group': 'float',
|
3114 | 'order': 3,
|
3115 | },
|
3116 | },
|
3117 |
|
3118 |
|
3119 | 'clear-left': {
|
3120 | 'utility': {
|
3121 | 'clear': 'left',
|
3122 | },
|
3123 | 'meta': {
|
3124 | 'group': 'clear',
|
3125 | 'order': 1,
|
3126 | },
|
3127 | },
|
3128 | 'clear-right': {
|
3129 | 'utility': {
|
3130 | 'clear': 'right',
|
3131 | },
|
3132 | 'meta': {
|
3133 | 'group': 'clear',
|
3134 | 'order': 2,
|
3135 | },
|
3136 | },
|
3137 | 'clear-both': {
|
3138 | 'utility': {
|
3139 | 'clear': 'both',
|
3140 | },
|
3141 | 'meta': {
|
3142 | 'group': 'clear',
|
3143 | 'order': 3,
|
3144 | },
|
3145 | },
|
3146 | 'clear-none': {
|
3147 | 'utility': {
|
3148 | 'clear': 'none',
|
3149 | },
|
3150 | 'meta': {
|
3151 | 'group': 'clear',
|
3152 | 'order': 4,
|
3153 | },
|
3154 | },
|
3155 |
|
3156 |
|
3157 | 'isolate': {
|
3158 | 'utility': {
|
3159 | 'isolation': 'isolate',
|
3160 | },
|
3161 | 'meta': {
|
3162 | 'group': 'isolation',
|
3163 | 'order': 1,
|
3164 | },
|
3165 | },
|
3166 | 'isolation-auto': {
|
3167 | 'utility': {
|
3168 | 'isolation': 'auto',
|
3169 | },
|
3170 | 'meta': {
|
3171 | 'group': 'isolation',
|
3172 | 'order': 2,
|
3173 | },
|
3174 | },
|
3175 |
|
3176 |
|
3177 | 'object-contain': {
|
3178 | 'utility': {
|
3179 | '-o-object-fit': 'contain',
|
3180 | 'object-fit': 'contain',
|
3181 | },
|
3182 | 'meta': {
|
3183 | 'group': 'objectFit',
|
3184 | 'order': 1,
|
3185 | },
|
3186 | },
|
3187 | 'object-cover': {
|
3188 | 'utility': {
|
3189 | '-o-object-fit': 'cover',
|
3190 | 'object-fit': 'cover',
|
3191 | },
|
3192 | 'meta': {
|
3193 | 'group': 'objectFit',
|
3194 | 'order': 2,
|
3195 | },
|
3196 | },
|
3197 | 'object-fill': {
|
3198 | 'utility': {
|
3199 | '-o-object-fit': 'fill',
|
3200 | 'object-fit': 'fill',
|
3201 | },
|
3202 | 'meta': {
|
3203 | 'group': 'objectFit',
|
3204 | 'order': 3,
|
3205 | },
|
3206 | },
|
3207 | 'object-none': {
|
3208 | 'utility': {
|
3209 | '-o-object-fit': 'none',
|
3210 | 'object-fit': 'none',
|
3211 | },
|
3212 | 'meta': {
|
3213 | 'group': 'objectFit',
|
3214 | 'order': 4,
|
3215 | },
|
3216 | },
|
3217 | 'object-scale-down': {
|
3218 | 'utility': {
|
3219 | '-o-object-fit': 'scale-down',
|
3220 | 'object-fit': 'scale-down',
|
3221 | },
|
3222 | 'meta': {
|
3223 | 'group': 'objectFit',
|
3224 | 'order': 5,
|
3225 | },
|
3226 | },
|
3227 |
|
3228 |
|
3229 | 'overflow-auto': {
|
3230 | 'utility': {
|
3231 | 'overflow': 'auto',
|
3232 | },
|
3233 | 'meta': {
|
3234 | 'group': 'overflow',
|
3235 | 'order': 1,
|
3236 | },
|
3237 | },
|
3238 | 'overflow-hidden': {
|
3239 | 'utility': {
|
3240 | 'overflow': 'hidden',
|
3241 | },
|
3242 | 'meta': {
|
3243 | 'group': 'overflow',
|
3244 | 'order': 2,
|
3245 | },
|
3246 | },
|
3247 | 'overflow-visible': {
|
3248 | 'utility': {
|
3249 | 'overflow': 'visible',
|
3250 | },
|
3251 | 'meta': {
|
3252 | 'group': 'overflow',
|
3253 | 'order': 3,
|
3254 | },
|
3255 | },
|
3256 | 'overflow-scroll': {
|
3257 | 'utility': {
|
3258 | 'overflow': 'scroll',
|
3259 | },
|
3260 | 'meta': {
|
3261 | 'group': 'overflow',
|
3262 | 'order': 4,
|
3263 | },
|
3264 | },
|
3265 | 'overflow-x-auto': {
|
3266 | 'utility': {
|
3267 | 'overflow-x': 'auto',
|
3268 | },
|
3269 | 'meta': {
|
3270 | 'group': 'overflow',
|
3271 | 'order': 5,
|
3272 | },
|
3273 | },
|
3274 | 'overflow-y-auto': {
|
3275 | 'utility': {
|
3276 | 'overflow-y': 'auto',
|
3277 | },
|
3278 | 'meta': {
|
3279 | 'group': 'overflow',
|
3280 | 'order': 6,
|
3281 | },
|
3282 | },
|
3283 | 'overflow-x-hidden': {
|
3284 | 'utility': {
|
3285 | 'overflow-x': 'hidden',
|
3286 | },
|
3287 | 'meta': {
|
3288 | 'group': 'overflow',
|
3289 | 'order': 7,
|
3290 | },
|
3291 | },
|
3292 | 'overflow-y-hidden': {
|
3293 | 'utility': {
|
3294 | 'overflow-y': 'hidden',
|
3295 | },
|
3296 | 'meta': {
|
3297 | 'group': 'overflow',
|
3298 | 'order': 8,
|
3299 | },
|
3300 | },
|
3301 | 'overflow-x-visible': {
|
3302 | 'utility': {
|
3303 | 'overflow-x': 'visible',
|
3304 | },
|
3305 | 'meta': {
|
3306 | 'group': 'overflow',
|
3307 | 'order': 9,
|
3308 | },
|
3309 | },
|
3310 | 'overflow-y-visible': {
|
3311 | 'utility': {
|
3312 | 'overflow-y': 'visible',
|
3313 | },
|
3314 | 'meta': {
|
3315 | 'group': 'overflow',
|
3316 | 'order': 10,
|
3317 | },
|
3318 | },
|
3319 | 'overflow-x-scroll': {
|
3320 | 'utility': {
|
3321 | 'overflow-x': 'scroll',
|
3322 | },
|
3323 | 'meta': {
|
3324 | 'group': 'overflow',
|
3325 | 'order': 11,
|
3326 | },
|
3327 | },
|
3328 | 'overflow-y-scroll': {
|
3329 | 'utility': {
|
3330 | 'overflow-y': 'scroll',
|
3331 | },
|
3332 | 'meta': {
|
3333 | 'group': 'overflow',
|
3334 | 'order': 12,
|
3335 | },
|
3336 | },
|
3337 |
|
3338 |
|
3339 | 'overscroll-auto': {
|
3340 | 'utility': {
|
3341 | 'overscroll-behavior': 'auto',
|
3342 | '-ms-scroll-chaining': 'chained',
|
3343 | },
|
3344 | 'meta': {
|
3345 | 'group': 'overscrollBehavior',
|
3346 | 'order': 1,
|
3347 | },
|
3348 | },
|
3349 | 'overscroll-contain': {
|
3350 | 'utility': {
|
3351 | 'overscroll-behavior': 'contain',
|
3352 | '-ms-scroll-chaining': 'none',
|
3353 | },
|
3354 | 'meta': {
|
3355 | 'group': 'overscrollBehavior',
|
3356 | 'order': 2,
|
3357 | },
|
3358 | },
|
3359 | 'overscroll-none': {
|
3360 | 'utility': {
|
3361 | 'overscroll-behavior': 'none',
|
3362 | '-ms-scroll-chaining': 'none',
|
3363 | },
|
3364 | 'meta': {
|
3365 | 'group': 'overscrollBehavior',
|
3366 | 'order': 3,
|
3367 | },
|
3368 | },
|
3369 | 'overscroll-y-auto': {
|
3370 | 'utility': {
|
3371 | 'overscroll-behavior-y': 'auto',
|
3372 | },
|
3373 | 'meta': {
|
3374 | 'group': 'overscrollBehavior',
|
3375 | 'order': 4,
|
3376 | },
|
3377 | },
|
3378 | 'overscroll-y-contain': {
|
3379 | 'utility': {
|
3380 | 'overscroll-behavior-y': 'contain',
|
3381 | },
|
3382 | 'meta': {
|
3383 | 'group': 'overscrollBehavior',
|
3384 | 'order': 5,
|
3385 | },
|
3386 | },
|
3387 | 'overscroll-y-none': {
|
3388 | 'utility': {
|
3389 | 'overscroll-behavior-y': 'none',
|
3390 | },
|
3391 | 'meta': {
|
3392 | 'group': 'overscrollBehavior',
|
3393 | 'order': 6,
|
3394 | },
|
3395 | },
|
3396 | 'overscroll-x-auto': {
|
3397 | 'utility': {
|
3398 | 'overscroll-behavior-x': 'auto',
|
3399 | },
|
3400 | 'meta': {
|
3401 | 'group': 'overscrollBehavior',
|
3402 | 'order': 7,
|
3403 | },
|
3404 | },
|
3405 | 'overscroll-x-contain': {
|
3406 | 'utility': {
|
3407 | 'overscroll-behavior-x': 'contain',
|
3408 | },
|
3409 | 'meta': {
|
3410 | 'group': 'overscrollBehavior',
|
3411 | 'order': 8,
|
3412 | },
|
3413 | },
|
3414 | 'overscroll-x-none': {
|
3415 | 'utility': {
|
3416 | 'overscroll-behavior-x': 'none',
|
3417 | },
|
3418 | 'meta': {
|
3419 | 'group': 'overscrollBehavior',
|
3420 | 'order': 9,
|
3421 | },
|
3422 | },
|
3423 |
|
3424 |
|
3425 | 'static': {
|
3426 | 'utility': {
|
3427 | 'position': 'static',
|
3428 | },
|
3429 | 'meta': {
|
3430 | 'group': 'position',
|
3431 | 'order': 1,
|
3432 | },
|
3433 | },
|
3434 | 'fixed': {
|
3435 | 'utility': {
|
3436 | 'position': 'fixed',
|
3437 | },
|
3438 | 'meta': {
|
3439 | 'group': 'position',
|
3440 | 'order': 2,
|
3441 | },
|
3442 | },
|
3443 | 'absolute': {
|
3444 | 'utility': {
|
3445 | 'position': 'absolute',
|
3446 | },
|
3447 | 'meta': {
|
3448 | 'group': 'position',
|
3449 | 'order': 3,
|
3450 | },
|
3451 | },
|
3452 | 'relative': {
|
3453 | 'utility': {
|
3454 | 'position': 'relative',
|
3455 | },
|
3456 | 'meta': {
|
3457 | 'group': 'position',
|
3458 | 'order': 4,
|
3459 | },
|
3460 | },
|
3461 | 'sticky': {
|
3462 | 'utility': {
|
3463 | 'position': [
|
3464 | 'sticky',
|
3465 | '-webkit-sticky',
|
3466 | ],
|
3467 | },
|
3468 | 'meta': {
|
3469 | 'group': 'position',
|
3470 | 'order': 5,
|
3471 | },
|
3472 | },
|
3473 |
|
3474 |
|
3475 | 'visible': {
|
3476 | 'utility': {
|
3477 | 'visibility': 'visible',
|
3478 | },
|
3479 | 'meta': {
|
3480 | 'group': 'visibility',
|
3481 | 'order': 1,
|
3482 | },
|
3483 | },
|
3484 | 'invisible': {
|
3485 | 'utility': {
|
3486 | 'visibility': 'hidden',
|
3487 | },
|
3488 | 'meta': {
|
3489 | 'group': 'visibility',
|
3490 | 'order': 2,
|
3491 | },
|
3492 | },
|
3493 |
|
3494 |
|
3495 | 'backface-visible': {
|
3496 | 'utility': {
|
3497 | '-webkit-backface-visibility': 'visible',
|
3498 | 'backface-visibility': 'visible',
|
3499 | },
|
3500 | 'meta': {
|
3501 | 'group': 'backfaceVisibility',
|
3502 | 'order': 1,
|
3503 | },
|
3504 | },
|
3505 | 'backface-hidden': {
|
3506 | 'utility': {
|
3507 | '-webkit-backface-visibility': 'hidden',
|
3508 | 'backface-visibility': 'hidden',
|
3509 | },
|
3510 | 'meta': {
|
3511 | 'group': 'backfaceVisibility',
|
3512 | 'order': 2,
|
3513 | },
|
3514 | },
|
3515 |
|
3516 |
|
3517 | 'flex-row': {
|
3518 | 'utility': {
|
3519 | '-webkit-box-orient': 'horizontal',
|
3520 | '-webkit-box-direction': 'normal',
|
3521 | '-ms-flex-direction': 'row',
|
3522 | '-webkit-flex-direction': 'row',
|
3523 | 'flex-direction': 'row',
|
3524 | },
|
3525 | 'meta': {
|
3526 | 'group': 'flexDirection',
|
3527 | 'order': 1,
|
3528 | },
|
3529 | },
|
3530 | 'flex-row-reverse': {
|
3531 | 'utility': {
|
3532 | '-webkit-box-orient': 'horizontal',
|
3533 | '-webkit-box-direction': 'reverse',
|
3534 | '-ms-flex-direction': 'row-reverse',
|
3535 | '-webkit-flex-direction': 'row-reverse',
|
3536 | 'flex-direction': 'row-reverse',
|
3537 | },
|
3538 | 'meta': {
|
3539 | 'group': 'flexDirection',
|
3540 | 'order': 2,
|
3541 | },
|
3542 | },
|
3543 | 'flex-col': {
|
3544 | 'utility': {
|
3545 | '-webkit-box-orient': 'vertical',
|
3546 | '-webkit-box-direction': 'normal',
|
3547 | '-ms-flex-direction': 'column',
|
3548 | '-webkit-flex-direction': 'column',
|
3549 | 'flex-direction': 'column',
|
3550 | },
|
3551 | 'meta': {
|
3552 | 'group': 'flexDirection',
|
3553 | 'order': 3,
|
3554 | },
|
3555 | },
|
3556 | 'flex-col-reverse': {
|
3557 | 'utility': {
|
3558 | '-webkit-box-orient': 'vertical',
|
3559 | '-webkit-box-direction': 'reverse',
|
3560 | '-ms-flex-direction': 'column-reverse',
|
3561 | '-webkit-flex-direction': 'column-reverse',
|
3562 | 'flex-direction': 'column-reverse',
|
3563 | },
|
3564 | 'meta': {
|
3565 | 'group': 'flexDirection',
|
3566 | 'order': 4,
|
3567 | },
|
3568 | },
|
3569 |
|
3570 |
|
3571 | 'flex-wrap': {
|
3572 | 'utility': {
|
3573 | '-ms-flex-wrap': 'wrap',
|
3574 | '-webkit-flex-wrap': 'wrap',
|
3575 | 'flex-wrap': 'wrap',
|
3576 | },
|
3577 | 'meta': {
|
3578 | 'group': 'flexWrap',
|
3579 | 'order': 1,
|
3580 | },
|
3581 | },
|
3582 | 'flex-wrap-reverse': {
|
3583 | 'utility': {
|
3584 | '-ms-flex-wrap': 'wrap-reverse',
|
3585 | '-webkit-flex-wrap': 'wrap-reverse',
|
3586 | 'flex-wrap': 'wrap-reverse',
|
3587 | },
|
3588 | 'meta': {
|
3589 | 'group': 'flexWrap',
|
3590 | 'order': 2,
|
3591 | },
|
3592 | },
|
3593 | 'flex-nowrap': {
|
3594 | 'utility': {
|
3595 | '-ms-flex-wrap': 'nowrap',
|
3596 | '-webkit-flex-wrap': 'nowrap',
|
3597 | 'flex-wrap': 'nowrap',
|
3598 | },
|
3599 | 'meta': {
|
3600 | 'group': 'flexWrap',
|
3601 | 'order': 3,
|
3602 | },
|
3603 | },
|
3604 |
|
3605 |
|
3606 | 'col-auto': {
|
3607 | 'utility': {
|
3608 | 'grid-column': 'auto',
|
3609 | },
|
3610 | 'meta': {
|
3611 | 'group': 'gridColumn',
|
3612 | 'order': 1,
|
3613 | },
|
3614 | },
|
3615 |
|
3616 |
|
3617 | 'row-auto': {
|
3618 | 'utility': {
|
3619 | 'grid-row': 'auto',
|
3620 | },
|
3621 | 'meta': {
|
3622 | 'group': 'gridRow',
|
3623 | 'order': 1,
|
3624 | },
|
3625 | },
|
3626 |
|
3627 |
|
3628 | 'grid-flow-row': {
|
3629 | 'utility': {
|
3630 | 'grid-auto-flow': 'row',
|
3631 | },
|
3632 | 'meta': {
|
3633 | 'group': 'gridAutoFlow',
|
3634 | 'order': 1,
|
3635 | },
|
3636 | },
|
3637 | 'grid-flow-col': {
|
3638 | 'utility': {
|
3639 | 'grid-auto-flow': 'column',
|
3640 | },
|
3641 | 'meta': {
|
3642 | 'group': 'gridAutoFlow',
|
3643 | 'order': 2,
|
3644 | },
|
3645 | },
|
3646 | 'grid-flow-row-dense': {
|
3647 | 'utility': {
|
3648 | 'grid-auto-flow': 'row dense',
|
3649 | },
|
3650 | 'meta': {
|
3651 | 'group': 'gridAutoFlow',
|
3652 | 'order': 3,
|
3653 | },
|
3654 | },
|
3655 | 'grid-flow-col-dense': {
|
3656 | 'utility': {
|
3657 | 'grid-auto-flow': 'column dense',
|
3658 | },
|
3659 | 'meta': {
|
3660 | 'group': 'gridAutoFlow',
|
3661 | 'order': 4,
|
3662 | },
|
3663 | },
|
3664 |
|
3665 |
|
3666 | 'justify-start': {
|
3667 | 'utility': {
|
3668 | '-webkit-box-pack': 'start',
|
3669 | '-ms-flex-pack': 'start',
|
3670 | '-webkit-justify-content': 'flex-start',
|
3671 | 'justify-content': 'flex-start',
|
3672 | },
|
3673 | 'meta': {
|
3674 | 'group': 'justifyContent',
|
3675 | 'order': 1,
|
3676 | },
|
3677 | },
|
3678 | 'justify-end': {
|
3679 | 'utility': {
|
3680 | '-webkit-box-pack': 'end',
|
3681 | '-ms-flex-pack': 'end',
|
3682 | '-webkit-justify-content': 'flex-end',
|
3683 | 'justify-content': 'flex-end',
|
3684 | },
|
3685 | 'meta': {
|
3686 | 'group': 'justifyContent',
|
3687 | 'order': 2,
|
3688 | },
|
3689 | },
|
3690 | 'justify-center': {
|
3691 | 'utility': {
|
3692 | '-webkit-box-pack': 'center',
|
3693 | '-ms-flex-pack': 'center',
|
3694 | '-webkit-justify-content': 'center',
|
3695 | 'justify-content': 'center',
|
3696 | },
|
3697 | 'meta': {
|
3698 | 'group': 'justifyContent',
|
3699 | 'order': 3,
|
3700 | },
|
3701 | },
|
3702 | 'justify-between': {
|
3703 | 'utility': {
|
3704 | '-webkit-box-pack': 'justify',
|
3705 | '-ms-flex-pack': 'justify',
|
3706 | '-webkit-justify-content': 'space-between',
|
3707 | 'justify-content': 'space-between',
|
3708 | },
|
3709 | 'meta': {
|
3710 | 'group': 'justifyContent',
|
3711 | 'order': 4,
|
3712 | },
|
3713 | },
|
3714 | 'justify-around': {
|
3715 | 'utility': {
|
3716 | '-ms-flex-pack': 'distribute',
|
3717 | '-webkit-justify-content': 'space-around',
|
3718 | 'justify-content': 'space-around',
|
3719 | },
|
3720 | 'meta': {
|
3721 | 'group': 'justifyContent',
|
3722 | 'order': 5,
|
3723 | },
|
3724 | },
|
3725 | 'justify-evenly': {
|
3726 | 'utility': {
|
3727 | '-webkit-box-pack': 'space-evenly',
|
3728 | '-ms-flex-pack': 'space-evenly',
|
3729 | '-webkit-justify-content': 'space-evenly',
|
3730 | 'justify-content': 'space-evenly',
|
3731 | },
|
3732 | 'meta': {
|
3733 | 'group': 'justifyContent',
|
3734 | 'order': 6,
|
3735 | },
|
3736 | },
|
3737 |
|
3738 |
|
3739 | 'justify-items-auto': {
|
3740 | 'utility': {
|
3741 | 'justify-items': 'auto',
|
3742 | },
|
3743 | 'meta': {
|
3744 | 'group': 'justifyItems',
|
3745 | 'order': 1,
|
3746 | },
|
3747 | },
|
3748 | 'justify-items-start': {
|
3749 | 'utility': {
|
3750 | 'justify-items': 'start',
|
3751 | },
|
3752 | 'meta': {
|
3753 | 'group': 'justifyItems',
|
3754 | 'order': 2,
|
3755 | },
|
3756 | },
|
3757 | 'justify-items-end': {
|
3758 | 'utility': {
|
3759 | 'justify-items': 'end',
|
3760 | },
|
3761 | 'meta': {
|
3762 | 'group': 'justifyItems',
|
3763 | 'order': 3,
|
3764 | },
|
3765 | },
|
3766 | 'justify-items-center': {
|
3767 | 'utility': {
|
3768 | 'justify-items': 'center',
|
3769 | },
|
3770 | 'meta': {
|
3771 | 'group': 'justifyItems',
|
3772 | 'order': 4,
|
3773 | },
|
3774 | },
|
3775 | 'justify-items-stretch': {
|
3776 | 'utility': {
|
3777 | 'justify-items': 'stretch',
|
3778 | },
|
3779 | 'meta': {
|
3780 | 'group': 'justifyItems',
|
3781 | 'order': 5,
|
3782 | },
|
3783 | },
|
3784 |
|
3785 |
|
3786 | 'justify-self-auto': {
|
3787 | 'utility': {
|
3788 | '-ms-grid-column-align': 'auto',
|
3789 | 'justify-self': 'auto',
|
3790 | },
|
3791 | 'meta': {
|
3792 | 'group': 'justifySelf',
|
3793 | 'order': 1,
|
3794 | },
|
3795 | },
|
3796 | 'justify-self-start': {
|
3797 | 'utility': {
|
3798 | '-ms-grid-column-align': 'start',
|
3799 | 'justify-self': 'start',
|
3800 | },
|
3801 | 'meta': {
|
3802 | 'group': 'justifySelf',
|
3803 | 'order': 2,
|
3804 | },
|
3805 | },
|
3806 | 'justify-self-end': {
|
3807 | 'utility': {
|
3808 | '-ms-grid-column-align': 'end',
|
3809 | 'justify-self': 'end',
|
3810 | },
|
3811 | 'meta': {
|
3812 | 'group': 'justifySelf',
|
3813 | 'order': 3,
|
3814 | },
|
3815 | },
|
3816 | 'justify-self-center': {
|
3817 | 'utility': {
|
3818 | '-ms-grid-column-align': 'center',
|
3819 | 'justify-self': 'center',
|
3820 | },
|
3821 | 'meta': {
|
3822 | 'group': 'justifySelf',
|
3823 | 'order': 4,
|
3824 | },
|
3825 | },
|
3826 | 'justify-self-stretch': {
|
3827 | 'utility': {
|
3828 | '-ms-grid-column-align': 'stretch',
|
3829 | 'justify-self': 'stretch',
|
3830 | },
|
3831 | 'meta': {
|
3832 | 'group': 'justifySelf',
|
3833 | 'order': 5,
|
3834 | },
|
3835 | },
|
3836 |
|
3837 |
|
3838 | 'content-center': {
|
3839 | 'utility': {
|
3840 | '-ms-flex-line-pack': 'center',
|
3841 | '-webkit-align-content': 'center',
|
3842 | 'align-content': 'center',
|
3843 | },
|
3844 | 'meta': {
|
3845 | 'group': 'alignContent',
|
3846 | 'order': 1,
|
3847 | },
|
3848 | },
|
3849 | 'content-start': {
|
3850 | 'utility': {
|
3851 | '-ms-flex-line-pack': 'start',
|
3852 | '-webkit-align-content': 'flex-start',
|
3853 | 'align-content': 'flex-start',
|
3854 | },
|
3855 | 'meta': {
|
3856 | 'group': 'alignContent',
|
3857 | 'order': 2,
|
3858 | },
|
3859 | },
|
3860 | 'content-end': {
|
3861 | 'utility': {
|
3862 | '-ms-flex-line-pack': 'end',
|
3863 | '-webkit-align-content': 'flex-end',
|
3864 | 'align-content': 'flex-end',
|
3865 | },
|
3866 | 'meta': {
|
3867 | 'group': 'alignContent',
|
3868 | 'order': 3,
|
3869 | },
|
3870 | },
|
3871 | 'content-between': {
|
3872 | 'utility': {
|
3873 | '-ms-flex-line-pack': 'justify',
|
3874 | '-webkit-align-content': 'space-between',
|
3875 | 'align-content': 'space-between',
|
3876 | },
|
3877 | 'meta': {
|
3878 | 'group': 'alignContent',
|
3879 | 'order': 4,
|
3880 | },
|
3881 | },
|
3882 | 'content-around': {
|
3883 | 'utility': {
|
3884 | '-ms-flex-line-pack': 'distribute',
|
3885 | '-webkit-align-content': 'space-around',
|
3886 | 'align-content': 'space-around',
|
3887 | },
|
3888 | 'meta': {
|
3889 | 'group': 'alignContent',
|
3890 | 'order': 5,
|
3891 | },
|
3892 | },
|
3893 | 'content-evenly': {
|
3894 | 'utility': {
|
3895 | '-ms-flex-line-pack': 'space-evenly',
|
3896 | '-webkit-align-content': 'space-evenly',
|
3897 | 'align-content': 'space-evenly',
|
3898 | },
|
3899 | 'meta': {
|
3900 | 'group': 'alignContent',
|
3901 | 'order': 6,
|
3902 | },
|
3903 | },
|
3904 |
|
3905 |
|
3906 | 'items-start': {
|
3907 | 'utility': {
|
3908 | '-webkit-box-align': 'start',
|
3909 | '-ms-flex-align': 'start',
|
3910 | '-webkit-align-items': 'flex-start',
|
3911 | 'align-items': 'flex-start',
|
3912 | },
|
3913 | 'meta': {
|
3914 | 'group': 'alignItems',
|
3915 | 'order': 1,
|
3916 | },
|
3917 | },
|
3918 | 'items-end': {
|
3919 | 'utility': {
|
3920 | '-webkit-box-align': 'end',
|
3921 | '-ms-flex-align': 'end',
|
3922 | '-webkit-align-items': 'flex-end',
|
3923 | 'align-items': 'flex-end',
|
3924 | },
|
3925 | 'meta': {
|
3926 | 'group': 'alignItems',
|
3927 | 'order': 2,
|
3928 | },
|
3929 | },
|
3930 | 'items-center': {
|
3931 | 'utility': {
|
3932 | '-webkit-box-align': 'center',
|
3933 | '-ms-flex-align': 'center',
|
3934 | '-webkit-align-items': 'center',
|
3935 | 'align-items': 'center',
|
3936 | },
|
3937 | 'meta': {
|
3938 | 'group': 'alignItems',
|
3939 | 'order': 3,
|
3940 | },
|
3941 | },
|
3942 | 'items-baseline': {
|
3943 | 'utility': {
|
3944 | '-webkit-box-align': 'baseline',
|
3945 | '-ms-flex-align': 'baseline',
|
3946 | '-webkit-align-items': 'baseline',
|
3947 | 'align-items': 'baseline',
|
3948 | },
|
3949 | 'meta': {
|
3950 | 'group': 'alignItems',
|
3951 | 'order': 4,
|
3952 | },
|
3953 | },
|
3954 | 'items-stretch': {
|
3955 | 'utility': {
|
3956 | '-webkit-box-align': 'stretch',
|
3957 | '-ms-flex-align': 'stretch',
|
3958 | '-webkit-align-items': 'stretch',
|
3959 | 'align-items': 'stretch',
|
3960 | },
|
3961 | 'meta': {
|
3962 | 'group': 'alignItems',
|
3963 | 'order': 5,
|
3964 | },
|
3965 | },
|
3966 |
|
3967 |
|
3968 | 'self-auto': {
|
3969 | 'utility': {
|
3970 | '-ms-flex-item-align': 'auto',
|
3971 | '-ms-grid-row-align': 'auto',
|
3972 | '-webkit-align-self': 'auto',
|
3973 | 'align-self': 'auto',
|
3974 | },
|
3975 | 'meta': {
|
3976 | 'group': 'alignSelf',
|
3977 | 'order': 1,
|
3978 | },
|
3979 | },
|
3980 | 'self-start': {
|
3981 | 'utility': {
|
3982 | '-ms-flex-item-align': 'start',
|
3983 | '-webkit-align-self': 'flex-start',
|
3984 | 'align-self': 'flex-start',
|
3985 | },
|
3986 | 'meta': {
|
3987 | 'group': 'alignSelf',
|
3988 | 'order': 2,
|
3989 | },
|
3990 | },
|
3991 | 'self-end': {
|
3992 | 'utility': {
|
3993 | '-ms-flex-item-align': 'end',
|
3994 | '-webkit-align-self': 'flex-end',
|
3995 | 'align-self': 'flex-end',
|
3996 | },
|
3997 | 'meta': {
|
3998 | 'group': 'alignSelf',
|
3999 | 'order': 3,
|
4000 | },
|
4001 | },
|
4002 | 'self-center': {
|
4003 | 'utility': {
|
4004 | '-ms-flex-item-align': 'center',
|
4005 | '-ms-grid-row-align': 'center',
|
4006 | '-webkit-align-self': 'center',
|
4007 | 'align-self': 'center',
|
4008 | },
|
4009 | 'meta': {
|
4010 | 'group': 'alignSelf',
|
4011 | 'order': 4,
|
4012 | },
|
4013 | },
|
4014 | 'self-stretch': {
|
4015 | 'utility': {
|
4016 | '-ms-flex-item-align': 'stretch',
|
4017 | '-ms-grid-row-align': 'stretch',
|
4018 | '-webkit-align-self': 'stretch',
|
4019 | 'align-self': 'stretch',
|
4020 | },
|
4021 | 'meta': {
|
4022 | 'group': 'alignSelf',
|
4023 | 'order': 5,
|
4024 | },
|
4025 | },
|
4026 |
|
4027 |
|
4028 | 'place-content-center': {
|
4029 | 'utility': {
|
4030 | 'place-content': 'center',
|
4031 | },
|
4032 | 'meta': {
|
4033 | 'group': 'placeContent',
|
4034 | 'order': 1,
|
4035 | },
|
4036 | },
|
4037 | 'place-content-start': {
|
4038 | 'utility': {
|
4039 | 'place-content': 'start',
|
4040 | },
|
4041 | 'meta': {
|
4042 | 'group': 'placeContent',
|
4043 | 'order': 2,
|
4044 | },
|
4045 | },
|
4046 | 'place-content-end': {
|
4047 | 'utility': {
|
4048 | 'place-content': 'end',
|
4049 | },
|
4050 | 'meta': {
|
4051 | 'group': 'placeContent',
|
4052 | 'order': 3,
|
4053 | },
|
4054 | },
|
4055 | 'place-content-between': {
|
4056 | 'utility': {
|
4057 | 'place-content': 'space-between',
|
4058 | },
|
4059 | 'meta': {
|
4060 | 'group': 'placeContent',
|
4061 | 'order': 4,
|
4062 | },
|
4063 | },
|
4064 | 'place-content-around': {
|
4065 | 'utility': {
|
4066 | 'place-content': 'space-around',
|
4067 | },
|
4068 | 'meta': {
|
4069 | 'group': 'placeContent',
|
4070 | 'order': 5,
|
4071 | },
|
4072 | },
|
4073 | 'place-content-evenly': {
|
4074 | 'utility': {
|
4075 | 'place-content': 'space-evenly',
|
4076 | },
|
4077 | 'meta': {
|
4078 | 'group': 'placeContent',
|
4079 | 'order': 6,
|
4080 | },
|
4081 | },
|
4082 | 'place-content-stretch': {
|
4083 | 'utility': {
|
4084 | 'place-content': 'stretch',
|
4085 | },
|
4086 | 'meta': {
|
4087 | 'group': 'placeContent',
|
4088 | 'order': 7,
|
4089 | },
|
4090 | },
|
4091 |
|
4092 |
|
4093 | 'place-items-auto': {
|
4094 | 'utility': {
|
4095 | 'place-items': 'auto',
|
4096 | },
|
4097 | 'meta': {
|
4098 | 'group': 'placeItems',
|
4099 | 'order': 1,
|
4100 | },
|
4101 | },
|
4102 | 'place-items-start': {
|
4103 | 'utility': {
|
4104 | 'place-items': 'start',
|
4105 | },
|
4106 | 'meta': {
|
4107 | 'group': 'placeItems',
|
4108 | 'order': 2,
|
4109 | },
|
4110 | },
|
4111 | 'place-items-end': {
|
4112 | 'utility': {
|
4113 | 'place-items': 'end',
|
4114 | },
|
4115 | 'meta': {
|
4116 | 'group': 'placeItems',
|
4117 | 'order': 3,
|
4118 | },
|
4119 | },
|
4120 | 'place-items-center': {
|
4121 | 'utility': {
|
4122 | 'place-items': 'center',
|
4123 | },
|
4124 | 'meta': {
|
4125 | 'group': 'placeItems',
|
4126 | 'order': 4,
|
4127 | },
|
4128 | },
|
4129 | 'place-items-stretch': {
|
4130 | 'utility': {
|
4131 | 'place-items': 'stretch',
|
4132 | },
|
4133 | 'meta': {
|
4134 | 'group': 'placeItems',
|
4135 | 'order': 5,
|
4136 | },
|
4137 | },
|
4138 |
|
4139 |
|
4140 | 'place-self-auto': {
|
4141 | 'utility': {
|
4142 | '-ms-grid-row-align': 'auto',
|
4143 | '-ms-grid-column-align': 'auto',
|
4144 | 'place-self': 'auto',
|
4145 | },
|
4146 | 'meta': {
|
4147 | 'group': 'placeSelf',
|
4148 | 'order': 1,
|
4149 | },
|
4150 | },
|
4151 | 'place-self-start': {
|
4152 | 'utility': {
|
4153 | '-ms-grid-row-align': 'start',
|
4154 | '-ms-grid-column-align': 'start',
|
4155 | 'place-self': 'start',
|
4156 | },
|
4157 | 'meta': {
|
4158 | 'group': 'placeSelf',
|
4159 | 'order': 2,
|
4160 | },
|
4161 | },
|
4162 | 'place-self-end': {
|
4163 | 'utility': {
|
4164 | '-ms-grid-row-align': 'end',
|
4165 | '-ms-grid-column-align': 'end',
|
4166 | 'place-self': 'end',
|
4167 | },
|
4168 | 'meta': {
|
4169 | 'group': 'placeSelf',
|
4170 | 'order': 3,
|
4171 | },
|
4172 | },
|
4173 | 'place-self-center': {
|
4174 | 'utility': {
|
4175 | '-ms-grid-row-align': 'center',
|
4176 | '-ms-grid-column-align': 'center',
|
4177 | 'place-self': 'center',
|
4178 | },
|
4179 | 'meta': {
|
4180 | 'group': 'placeSelf',
|
4181 | 'order': 4,
|
4182 | },
|
4183 | },
|
4184 | 'place-self-stretch': {
|
4185 | 'utility': {
|
4186 | '-ms-grid-row-align': 'stretch',
|
4187 | '-ms-grid-column-align': 'stretch',
|
4188 | 'place-self': 'stretch',
|
4189 | },
|
4190 | 'meta': {
|
4191 | 'group': 'placeSelf',
|
4192 | 'order': 5,
|
4193 | },
|
4194 | },
|
4195 |
|
4196 |
|
4197 | 'antialiased': {
|
4198 | 'utility': {
|
4199 | '-webkit-font-smoothing': 'antialiased',
|
4200 | '-moz-osx-font-smoothing': 'grayscale',
|
4201 | },
|
4202 | 'meta': {
|
4203 | 'group': 'fontSmoothing',
|
4204 | 'order': 1,
|
4205 | },
|
4206 | },
|
4207 | 'subpixel-antialiased': {
|
4208 | 'utility': {
|
4209 | '-webkit-font-smoothing': 'auto',
|
4210 | '-moz-osx-font-smoothing': 'auto',
|
4211 | },
|
4212 | 'meta': {
|
4213 | 'group': 'fontSmoothing',
|
4214 | 'order': 2,
|
4215 | },
|
4216 | },
|
4217 |
|
4218 |
|
4219 | 'italic': {
|
4220 | 'utility': {
|
4221 | 'font-style': 'italic',
|
4222 | },
|
4223 | 'meta': {
|
4224 | 'group': 'fontStyle',
|
4225 | 'order': 1,
|
4226 | },
|
4227 | },
|
4228 | 'not-italic': {
|
4229 | 'utility': {
|
4230 | 'font-style': 'normal',
|
4231 | },
|
4232 | 'meta': {
|
4233 | 'group': 'fontStyle',
|
4234 | 'order': 2,
|
4235 | },
|
4236 | },
|
4237 |
|
4238 |
|
4239 | 'normal-nums': {
|
4240 | 'utility': {
|
4241 | 'font-variant-numeric': 'normal',
|
4242 | },
|
4243 | 'meta': {
|
4244 | 'group': 'fontVariantNumeric',
|
4245 | 'order': 1,
|
4246 | },
|
4247 | },
|
4248 | 'ordinal': {
|
4249 | 'utility': {
|
4250 | ...fontVariants,
|
4251 | '--tw-ordinal': 'ordinal',
|
4252 | },
|
4253 | 'meta': {
|
4254 | 'group': 'fontVariantNumeric',
|
4255 | 'order': 2,
|
4256 | },
|
4257 | },
|
4258 | 'slashed-zero': {
|
4259 | 'utility': {
|
4260 | ...fontVariants,
|
4261 | '--tw-slashed-zero': 'slashed-zero',
|
4262 | },
|
4263 | 'meta': {
|
4264 | 'group': 'fontVariantNumeric',
|
4265 | 'order': 3,
|
4266 | },
|
4267 | },
|
4268 | 'lining-nums': {
|
4269 | 'utility': {
|
4270 | ...fontVariants,
|
4271 | '--tw-numeric-figure': 'lining-nums',
|
4272 | },
|
4273 | 'meta': {
|
4274 | 'group': 'fontVariantNumeric',
|
4275 | 'order': 4,
|
4276 | },
|
4277 | },
|
4278 | 'oldstyle-nums': {
|
4279 | 'utility': {
|
4280 | ...fontVariants,
|
4281 | '--tw-numeric-figure': 'oldstyle-nums',
|
4282 | },
|
4283 | 'meta': {
|
4284 | 'group': 'fontVariantNumeric',
|
4285 | 'order': 5,
|
4286 | },
|
4287 | },
|
4288 | 'proportional-nums': {
|
4289 | 'utility': {
|
4290 | ...fontVariants,
|
4291 | '--tw-numeric-spacing': 'proportional-nums',
|
4292 | },
|
4293 | 'meta': {
|
4294 | 'group': 'fontVariantNumeric',
|
4295 | 'order': 6,
|
4296 | },
|
4297 | },
|
4298 | 'tabular-nums': {
|
4299 | 'utility': {
|
4300 | ...fontVariants,
|
4301 | '--tw-numeric-spacing': 'tabular-nums',
|
4302 | },
|
4303 | 'meta': {
|
4304 | 'group': 'fontVariantNumeric',
|
4305 | 'order': 7,
|
4306 | },
|
4307 | },
|
4308 | 'diagonal-fractions': {
|
4309 | 'utility': {
|
4310 | ...fontVariants,
|
4311 | '--tw-numeric-fraction': 'diagonal-fractions',
|
4312 | },
|
4313 | 'meta': {
|
4314 | 'group': 'fontVariantNumeric',
|
4315 | 'order': 8,
|
4316 | },
|
4317 | },
|
4318 | 'stacked-fractions': {
|
4319 | 'utility': {
|
4320 | ...fontVariants,
|
4321 | '--tw-numeric-fraction': 'stacked-fractions',
|
4322 | },
|
4323 | 'meta': {
|
4324 | 'group': 'fontVariantNumeric',
|
4325 | 'order': 9,
|
4326 | },
|
4327 | },
|
4328 |
|
4329 |
|
4330 | 'list-inside': {
|
4331 | 'utility': {
|
4332 | 'list-style-position': 'inside',
|
4333 | },
|
4334 | 'meta': {
|
4335 | 'group': 'listStylePosition',
|
4336 | 'order': 1,
|
4337 | },
|
4338 | },
|
4339 | 'list-outside': {
|
4340 | 'utility': {
|
4341 | 'list-style-position': 'outside',
|
4342 | },
|
4343 | 'meta': {
|
4344 | 'group': 'listStylePosition',
|
4345 | 'order': 2,
|
4346 | },
|
4347 | },
|
4348 |
|
4349 |
|
4350 | 'text-left': {
|
4351 | 'utility': {
|
4352 | 'text-align': 'left',
|
4353 | },
|
4354 | 'meta': {
|
4355 | 'group': 'textAlign',
|
4356 | 'order': 1,
|
4357 | },
|
4358 | },
|
4359 | 'text-center': {
|
4360 | 'utility': {
|
4361 | 'text-align': 'center',
|
4362 | },
|
4363 | 'meta': {
|
4364 | 'group': 'textAlign',
|
4365 | 'order': 2,
|
4366 | },
|
4367 | },
|
4368 | 'text-right': {
|
4369 | 'utility': {
|
4370 | 'text-align': 'right',
|
4371 | },
|
4372 | 'meta': {
|
4373 | 'group': 'textAlign',
|
4374 | 'order': 3,
|
4375 | },
|
4376 | },
|
4377 | 'text-justify': {
|
4378 | 'utility': {
|
4379 | 'text-align': 'justify',
|
4380 | },
|
4381 | 'meta': {
|
4382 | 'group': 'textAlign',
|
4383 | 'order': 4,
|
4384 | },
|
4385 | },
|
4386 |
|
4387 |
|
4388 | 'underline': {
|
4389 | 'utility': {
|
4390 | '-webkit-text-decoration-line': 'underline',
|
4391 | 'text-decoration-line': 'underline',
|
4392 | },
|
4393 | 'meta': {
|
4394 | 'group': 'textDecoration',
|
4395 | 'order': 1,
|
4396 | },
|
4397 | },
|
4398 | 'line-through': {
|
4399 | 'utility': {
|
4400 | '-webkit-text-decoration-line': 'line-through',
|
4401 | 'text-decoration-line': 'line-through',
|
4402 | },
|
4403 | 'meta': {
|
4404 | 'group': 'textDecoration',
|
4405 | 'order': 2,
|
4406 | },
|
4407 | },
|
4408 | 'no-underline': {
|
4409 | 'utility': {
|
4410 | 'text-decoration': 'none',
|
4411 | },
|
4412 | 'meta': {
|
4413 | 'group': 'textDecoration',
|
4414 | 'order': 3,
|
4415 | },
|
4416 | },
|
4417 |
|
4418 |
|
4419 | 'underline-solid': {
|
4420 | 'utility': {
|
4421 | '-webkit-text-decoration-style': 'solid',
|
4422 | 'text-decoration-style': 'solid',
|
4423 | },
|
4424 | 'meta': {
|
4425 | 'group': 'textDecorationStyle',
|
4426 | 'order': 1,
|
4427 | },
|
4428 | },
|
4429 | 'underline-double': {
|
4430 | 'utility': {
|
4431 | '-webkit-text-decoration-style': 'double',
|
4432 | 'text-decoration-style': 'double',
|
4433 | },
|
4434 | 'meta': {
|
4435 | 'group': 'textDecorationStyle',
|
4436 | 'order': 2,
|
4437 | },
|
4438 | },
|
4439 | 'underline-dotted': {
|
4440 | 'utility': {
|
4441 | '-webkit-text-decoration-style': 'dotted',
|
4442 | 'text-decoration-style': 'dotted',
|
4443 | },
|
4444 | 'meta': {
|
4445 | 'group': 'textDecorationStyle',
|
4446 | 'order': 3,
|
4447 | },
|
4448 | },
|
4449 | 'underline-dashed': {
|
4450 | 'utility': {
|
4451 | '-webkit-text-decoration-style': 'dashed',
|
4452 | 'text-decoration-style': 'dashed',
|
4453 | },
|
4454 | 'meta': {
|
4455 | 'group': 'textDecorationStyle',
|
4456 | 'order': 4,
|
4457 | },
|
4458 | },
|
4459 |
|
4460 |
|
4461 | 'uppercase': {
|
4462 | 'utility': {
|
4463 | 'text-transform': 'uppercase',
|
4464 | },
|
4465 | 'meta': {
|
4466 | 'group': 'textTransform',
|
4467 | 'order': 1,
|
4468 | },
|
4469 | },
|
4470 | 'lowercase': {
|
4471 | 'utility': {
|
4472 | 'text-transform': 'lowercase',
|
4473 | },
|
4474 | 'meta': {
|
4475 | 'group': 'textTransform',
|
4476 | 'order': 2,
|
4477 | },
|
4478 | },
|
4479 | 'capitalize': {
|
4480 | 'utility': {
|
4481 | 'text-transform': 'capitalize',
|
4482 | },
|
4483 | 'meta': {
|
4484 | 'group': 'textTransform',
|
4485 | 'order': 3,
|
4486 | },
|
4487 | },
|
4488 | 'normal-case': {
|
4489 | 'utility': {
|
4490 | 'text-transform': 'none',
|
4491 | },
|
4492 | 'meta': {
|
4493 | 'group': 'textTransform',
|
4494 | 'order': 4,
|
4495 | },
|
4496 | },
|
4497 |
|
4498 |
|
4499 | 'truncate': {
|
4500 | 'utility': {
|
4501 | 'overflow': 'hidden',
|
4502 | '-o-text-overflow': 'ellipsis',
|
4503 | 'text-overflow': 'ellipsis',
|
4504 | 'white-space': 'nowrap',
|
4505 | },
|
4506 | 'meta': {
|
4507 | 'group': 'textOverflow',
|
4508 | 'order': 1,
|
4509 | },
|
4510 | },
|
4511 | 'overflow-ellipsis': {
|
4512 | 'utility': {
|
4513 | '-o-text-overflow': 'ellipsis',
|
4514 | 'text-overflow': 'ellipsis',
|
4515 | },
|
4516 | 'meta': {
|
4517 | 'group': 'textOverflow',
|
4518 | 'order': 2,
|
4519 | },
|
4520 | },
|
4521 | 'overflow-clip': {
|
4522 | 'utility': {
|
4523 | '-o-text-overflow': 'clip',
|
4524 | 'text-overflow': 'clip',
|
4525 | },
|
4526 | 'meta': {
|
4527 | 'group': 'textOverflow',
|
4528 | 'order': 3,
|
4529 | },
|
4530 | },
|
4531 |
|
4532 |
|
4533 | 'align-baseline': {
|
4534 | 'utility': {
|
4535 | 'vertical-align': 'baseline',
|
4536 | },
|
4537 | 'meta': {
|
4538 | 'group': 'verticalAlign',
|
4539 | 'order': 1,
|
4540 | },
|
4541 | },
|
4542 | 'align-top': {
|
4543 | 'utility': {
|
4544 | 'vertical-align': 'top',
|
4545 | },
|
4546 | 'meta': {
|
4547 | 'group': 'verticalAlign',
|
4548 | 'order': 2,
|
4549 | },
|
4550 | },
|
4551 | 'align-middle': {
|
4552 | 'utility': {
|
4553 | 'vertical-align': 'middle',
|
4554 | },
|
4555 | 'meta': {
|
4556 | 'group': 'verticalAlign',
|
4557 | 'order': 3,
|
4558 | },
|
4559 | },
|
4560 | 'align-bottom': {
|
4561 | 'utility': {
|
4562 | 'vertical-align': 'bottom',
|
4563 | },
|
4564 | 'meta': {
|
4565 | 'group': 'verticalAlign',
|
4566 | 'order': 4,
|
4567 | },
|
4568 | },
|
4569 | 'align-text-top': {
|
4570 | 'utility': {
|
4571 | 'vertical-align': 'text-top',
|
4572 | },
|
4573 | 'meta': {
|
4574 | 'group': 'verticalAlign',
|
4575 | 'order': 5,
|
4576 | },
|
4577 | },
|
4578 | 'align-text-bottom': {
|
4579 | 'utility': {
|
4580 | 'vertical-align': 'text-bottom',
|
4581 | },
|
4582 | 'meta': {
|
4583 | 'group': 'verticalAlign',
|
4584 | 'order': 6,
|
4585 | },
|
4586 | },
|
4587 |
|
4588 |
|
4589 | 'whitespace-normal': {
|
4590 | 'utility': {
|
4591 | 'white-space': 'normal',
|
4592 | },
|
4593 | 'meta': {
|
4594 | 'group': 'whitespace',
|
4595 | 'order': 1,
|
4596 | },
|
4597 | },
|
4598 | 'whitespace-nowrap': {
|
4599 | 'utility': {
|
4600 | 'white-space': 'nowrap',
|
4601 | },
|
4602 | 'meta': {
|
4603 | 'group': 'whitespace',
|
4604 | 'order': 2,
|
4605 | },
|
4606 | },
|
4607 | 'whitespace-pre': {
|
4608 | 'utility': {
|
4609 | 'white-space': 'pre',
|
4610 | },
|
4611 | 'meta': {
|
4612 | 'group': 'whitespace',
|
4613 | 'order': 3,
|
4614 | },
|
4615 | },
|
4616 | 'whitespace-pre-line': {
|
4617 | 'utility': {
|
4618 | 'white-space': 'pre-line',
|
4619 | },
|
4620 | 'meta': {
|
4621 | 'group': 'whitespace',
|
4622 | 'order': 4,
|
4623 | },
|
4624 | },
|
4625 | 'whitespace-pre-wrap': {
|
4626 | 'utility': {
|
4627 | 'white-space': 'pre-wrap',
|
4628 | },
|
4629 | 'meta': {
|
4630 | 'group': 'whitespace',
|
4631 | 'order': 5,
|
4632 | },
|
4633 | },
|
4634 |
|
4635 |
|
4636 | 'break-normal': {
|
4637 | 'utility': {
|
4638 | 'word-break': 'normal',
|
4639 | 'overflow-wrap': 'normal',
|
4640 | },
|
4641 | 'meta': {
|
4642 | 'group': 'wordBreak',
|
4643 | 'order': 1,
|
4644 | },
|
4645 | },
|
4646 | 'break-words': {
|
4647 | 'utility': {
|
4648 | 'overflow-wrap': 'break-word',
|
4649 | },
|
4650 | 'meta': {
|
4651 | 'group': 'wordBreak',
|
4652 | 'order': 2,
|
4653 | },
|
4654 | },
|
4655 | 'break-all': {
|
4656 | 'utility': {
|
4657 | 'word-break': 'break-all',
|
4658 | },
|
4659 | 'meta': {
|
4660 | 'group': 'wordBreak',
|
4661 | 'order': 3,
|
4662 | },
|
4663 | },
|
4664 |
|
4665 |
|
4666 | 'write-normal': {
|
4667 | 'utility': {
|
4668 | '-webkit-writing-mode': 'horizontal-tb',
|
4669 | '-ms-writing-mode': 'lr-tb',
|
4670 | 'writing-mode': 'horizontal-tb',
|
4671 | },
|
4672 | 'meta': {
|
4673 | 'group': 'writingMode',
|
4674 | 'order': 1,
|
4675 | },
|
4676 | },
|
4677 |
|
4678 | 'write-vertical-right': {
|
4679 | 'utility': {
|
4680 | '-webkit-writing-mode': 'vertical-rl',
|
4681 | '-ms-writing-mode': 'tb-rl',
|
4682 | 'writing-mode': 'vertical-rl',
|
4683 | },
|
4684 | 'meta': {
|
4685 | 'group': 'writingMode',
|
4686 | 'order': 2,
|
4687 | },
|
4688 | },
|
4689 |
|
4690 | 'write-vertical-left': {
|
4691 | 'utility': {
|
4692 | '-webkit-writing-mode': 'vertical-lr',
|
4693 | '-ms-writing-mode': 'tb-lr',
|
4694 | 'writing-mode': 'vertical-lr',
|
4695 | },
|
4696 | 'meta': {
|
4697 | 'group': 'writingMode',
|
4698 | 'order': 3,
|
4699 | },
|
4700 | },
|
4701 |
|
4702 |
|
4703 | 'write-orient-mixed': {
|
4704 | 'utility': {
|
4705 | '-webkit-text-orientation': 'mixed',
|
4706 | 'text-orientation': 'mixed',
|
4707 | },
|
4708 | 'meta': {
|
4709 | 'group': 'writingMode',
|
4710 | 'order': 4,
|
4711 | },
|
4712 | },
|
4713 |
|
4714 | 'write-orient-upright': {
|
4715 | 'utility': {
|
4716 | '-webkit-text-orientation': 'upright',
|
4717 | 'text-orientation': 'upright',
|
4718 | },
|
4719 | 'meta': {
|
4720 | 'group': 'writingMode',
|
4721 | 'order': 5,
|
4722 | },
|
4723 | },
|
4724 |
|
4725 | 'write-orient-sideways': {
|
4726 | 'utility': {
|
4727 | '-webkit-text-orientation': 'sideways',
|
4728 | 'text-orientation': 'sideways',
|
4729 | },
|
4730 | 'meta': {
|
4731 | 'group': 'writingMode',
|
4732 | 'order': 6,
|
4733 | },
|
4734 | },
|
4735 |
|
4736 |
|
4737 | 'hyphens-none': {
|
4738 | 'utility': {
|
4739 | '-webkit-hyphens': 'none',
|
4740 | '-ms-hyphens': 'none',
|
4741 | 'hyphens': 'none',
|
4742 | },
|
4743 | 'meta': {
|
4744 | 'group': 'hyphens',
|
4745 | 'order': 1,
|
4746 | },
|
4747 | },
|
4748 | 'hyphens-manual': {
|
4749 | 'utility': {
|
4750 | '-webkit-hyphens': 'manual',
|
4751 | '-ms-hyphens': 'manual',
|
4752 | 'hyphens': 'manual',
|
4753 | },
|
4754 | 'meta': {
|
4755 | 'group': 'hyphens',
|
4756 | 'order': 2,
|
4757 | },
|
4758 | },
|
4759 | 'hyphens-auto': {
|
4760 | 'utility': {
|
4761 | '-webkit-hyphens': 'auto',
|
4762 | '-ms-hyphens': 'auto',
|
4763 | 'hyphens': 'auto',
|
4764 | },
|
4765 | 'meta': {
|
4766 | 'group': 'hyphens',
|
4767 | 'order': 3,
|
4768 | },
|
4769 | },
|
4770 |
|
4771 |
|
4772 | 'bg-fixed': {
|
4773 | 'utility': {
|
4774 | 'background-attachment': 'fixed',
|
4775 | },
|
4776 | 'meta': {
|
4777 | 'group': 'backgroundAttachment',
|
4778 | 'order': 1,
|
4779 | },
|
4780 | },
|
4781 | 'bg-local': {
|
4782 | 'utility': {
|
4783 | 'background-attachment': 'local',
|
4784 | },
|
4785 | 'meta': {
|
4786 | 'group': 'backgroundAttachment',
|
4787 | 'order': 2,
|
4788 | },
|
4789 | },
|
4790 | 'bg-scroll': {
|
4791 | 'utility': {
|
4792 | 'background-attachment': 'scroll',
|
4793 | },
|
4794 | 'meta': {
|
4795 | 'group': 'backgroundAttachment',
|
4796 | 'order': 3,
|
4797 | },
|
4798 | },
|
4799 |
|
4800 |
|
4801 | 'bg-clip-border': {
|
4802 | 'utility': {
|
4803 | '-webkit-background-clip': 'border-box',
|
4804 | 'background-clip': 'border-box',
|
4805 | },
|
4806 | 'meta': {
|
4807 | 'group': 'backgroundClip',
|
4808 | 'order': 1,
|
4809 | },
|
4810 | },
|
4811 | 'bg-clip-padding': {
|
4812 | 'utility': {
|
4813 | '-webkit-background-clip': 'padding-box',
|
4814 | 'background-clip': 'padding-box',
|
4815 | },
|
4816 | 'meta': {
|
4817 | 'group': 'backgroundClip',
|
4818 | 'order': 2,
|
4819 | },
|
4820 | },
|
4821 | 'bg-clip-content': {
|
4822 | 'utility': {
|
4823 | '-webkit-background-clip': 'content-box',
|
4824 | 'background-clip': 'content-box',
|
4825 | },
|
4826 | 'meta': {
|
4827 | 'group': 'backgroundClip',
|
4828 | 'order': 3,
|
4829 | },
|
4830 | },
|
4831 | 'bg-clip-text': {
|
4832 | 'utility': {
|
4833 | '-webkit-background-clip': 'text',
|
4834 | 'background-clip': 'text',
|
4835 | },
|
4836 | 'meta': {
|
4837 | 'group': 'backgroundClip',
|
4838 | 'order': 4,
|
4839 | },
|
4840 | },
|
4841 |
|
4842 |
|
4843 | 'bg-repeat': {
|
4844 | 'utility': {
|
4845 | 'background-repeat': 'repeat',
|
4846 | },
|
4847 | 'meta': {
|
4848 | 'group': 'backgroundRepeat',
|
4849 | 'order': 1,
|
4850 | },
|
4851 | },
|
4852 | 'bg-no-repeat': {
|
4853 | 'utility': {
|
4854 | 'background-repeat': 'no-repeat',
|
4855 | },
|
4856 | 'meta': {
|
4857 | 'group': 'backgroundRepeat',
|
4858 | 'order': 2,
|
4859 | },
|
4860 | },
|
4861 | 'bg-repeat-x': {
|
4862 | 'utility': {
|
4863 | 'background-repeat': 'repeat-x',
|
4864 | },
|
4865 | 'meta': {
|
4866 | 'group': 'backgroundRepeat',
|
4867 | 'order': 3,
|
4868 | },
|
4869 | },
|
4870 | 'bg-repeat-y': {
|
4871 | 'utility': {
|
4872 | 'background-repeat': 'repeat-y',
|
4873 | },
|
4874 | 'meta': {
|
4875 | 'group': 'backgroundRepeat',
|
4876 | 'order': 4,
|
4877 | },
|
4878 | },
|
4879 | 'bg-repeat-round': {
|
4880 | 'utility': {
|
4881 | 'background-repeat': 'round',
|
4882 | },
|
4883 | 'meta': {
|
4884 | 'group': 'backgroundRepeat',
|
4885 | 'order': 5,
|
4886 | },
|
4887 | },
|
4888 | 'bg-repeat-space': {
|
4889 | 'utility': {
|
4890 | 'background-repeat': 'space',
|
4891 | },
|
4892 | 'meta': {
|
4893 | 'group': 'backgroundRepeat',
|
4894 | 'order': 6,
|
4895 | },
|
4896 | },
|
4897 |
|
4898 |
|
4899 | 'bg-origin-border': {
|
4900 | 'utility': {
|
4901 | 'background-origin': 'border-box',
|
4902 | },
|
4903 | 'meta': {
|
4904 | 'group': 'backgroundOrigin',
|
4905 | 'order': 1,
|
4906 | },
|
4907 | },
|
4908 | 'bg-origin-padding': {
|
4909 | 'utility': {
|
4910 | 'background-origin': 'padding-box',
|
4911 | },
|
4912 | 'meta': {
|
4913 | 'group': 'backgroundOrigin',
|
4914 | 'order': 2,
|
4915 | },
|
4916 | },
|
4917 | 'bg-origin-content': {
|
4918 | 'utility': {
|
4919 | 'background-origin': 'content-box',
|
4920 | },
|
4921 | 'meta': {
|
4922 | 'group': 'backgroundOrigin',
|
4923 | 'order': 3,
|
4924 | },
|
4925 | },
|
4926 |
|
4927 |
|
4928 | 'border-solid': {
|
4929 | 'utility': {
|
4930 | 'border-style': 'solid',
|
4931 | },
|
4932 | 'meta': {
|
4933 | 'group': 'borderStyle',
|
4934 | 'order': 1,
|
4935 | },
|
4936 | },
|
4937 | 'border-dashed': {
|
4938 | 'utility': {
|
4939 | 'border-style': 'dashed',
|
4940 | },
|
4941 | 'meta': {
|
4942 | 'group': 'borderStyle',
|
4943 | 'order': 2,
|
4944 | },
|
4945 | },
|
4946 | 'border-dotted': {
|
4947 | 'utility': {
|
4948 | 'border-style': 'dotted',
|
4949 | },
|
4950 | 'meta': {
|
4951 | 'group': 'borderStyle',
|
4952 | 'order': 3,
|
4953 | },
|
4954 | },
|
4955 | 'border-double': {
|
4956 | 'utility': {
|
4957 | 'border-style': 'double',
|
4958 | },
|
4959 | 'meta': {
|
4960 | 'group': 'borderStyle',
|
4961 | 'order': 4,
|
4962 | },
|
4963 | },
|
4964 | 'border-none': {
|
4965 | 'utility': {
|
4966 | 'border-style': 'none',
|
4967 | },
|
4968 | 'meta': {
|
4969 | 'group': 'borderStyle',
|
4970 | 'order': 5,
|
4971 | },
|
4972 | },
|
4973 |
|
4974 |
|
4975 | 'image-render-auto': {
|
4976 | 'utility': {
|
4977 | 'image-rendering': 'auto',
|
4978 | },
|
4979 | 'meta': {
|
4980 | 'group': 'imageRendering',
|
4981 | 'order': 1,
|
4982 | },
|
4983 | },
|
4984 | 'image-render-pixel': {
|
4985 | 'utility': {
|
4986 | '-ms-interpolation-mode': 'nearest-neighbor',
|
4987 | 'image-rendering': ['-webkit-optimize-contrast', '-moz-crisp-edges', '-o-pixelated', 'pixelated'],
|
4988 | },
|
4989 | 'meta': {
|
4990 | 'group': 'imageRendering',
|
4991 | 'order': 2,
|
4992 | },
|
4993 | },
|
4994 | 'image-render-edge': {
|
4995 | 'utility': {
|
4996 | 'image-rendering': 'crisp-edges',
|
4997 | },
|
4998 | 'meta': {
|
4999 | 'group': 'imageRendering',
|
5000 | 'order': 3,
|
5001 | },
|
5002 | },
|
5003 |
|
5004 |
|
5005 | 'mix-blend-normal': {
|
5006 | 'utility': {
|
5007 | 'mix-blend-mode': 'normal',
|
5008 | },
|
5009 | 'meta': {
|
5010 | 'group': 'mixBlendMode',
|
5011 | 'order': 1,
|
5012 | },
|
5013 | },
|
5014 | 'mix-blend-multiply': {
|
5015 | 'utility': {
|
5016 | 'mix-blend-mode': 'multiply',
|
5017 | },
|
5018 | 'meta': {
|
5019 | 'group': 'mixBlendMode',
|
5020 | 'order': 2,
|
5021 | },
|
5022 | },
|
5023 | 'mix-blend-screen': {
|
5024 | 'utility': {
|
5025 | 'mix-blend-mode': 'screen',
|
5026 | },
|
5027 | 'meta': {
|
5028 | 'group': 'mixBlendMode',
|
5029 | 'order': 3,
|
5030 | },
|
5031 | },
|
5032 | 'mix-blend-overlay': {
|
5033 | 'utility': {
|
5034 | 'mix-blend-mode': 'overlay',
|
5035 | },
|
5036 | 'meta': {
|
5037 | 'group': 'mixBlendMode',
|
5038 | 'order': 4,
|
5039 | },
|
5040 | },
|
5041 | 'mix-blend-darken': {
|
5042 | 'utility': {
|
5043 | 'mix-blend-mode': 'darken',
|
5044 | },
|
5045 | 'meta': {
|
5046 | 'group': 'mixBlendMode',
|
5047 | 'order': 5,
|
5048 | },
|
5049 | },
|
5050 | 'mix-blend-lighten': {
|
5051 | 'utility': {
|
5052 | 'mix-blend-mode': 'lighten',
|
5053 | },
|
5054 | 'meta': {
|
5055 | 'group': 'mixBlendMode',
|
5056 | 'order': 6,
|
5057 | },
|
5058 | },
|
5059 | 'mix-blend-color-dodge': {
|
5060 | 'utility': {
|
5061 | 'mix-blend-mode': 'color-dodge',
|
5062 | },
|
5063 | 'meta': {
|
5064 | 'group': 'mixBlendMode',
|
5065 | 'order': 7,
|
5066 | },
|
5067 | },
|
5068 | 'mix-blend-color-burn': {
|
5069 | 'utility': {
|
5070 | 'mix-blend-mode': 'color-burn',
|
5071 | },
|
5072 | 'meta': {
|
5073 | 'group': 'mixBlendMode',
|
5074 | 'order': 8,
|
5075 | },
|
5076 | },
|
5077 | 'mix-blend-hard-light': {
|
5078 | 'utility': {
|
5079 | 'mix-blend-mode': 'hard-light',
|
5080 | },
|
5081 | 'meta': {
|
5082 | 'group': 'mixBlendMode',
|
5083 | 'order': 9,
|
5084 | },
|
5085 | },
|
5086 | 'mix-blend-soft-light': {
|
5087 | 'utility': {
|
5088 | 'mix-blend-mode': 'soft-light',
|
5089 | },
|
5090 | 'meta': {
|
5091 | 'group': 'mixBlendMode',
|
5092 | 'order': 10,
|
5093 | },
|
5094 | },
|
5095 | 'mix-blend-difference': {
|
5096 | 'utility': {
|
5097 | 'mix-blend-mode': 'difference',
|
5098 | },
|
5099 | 'meta': {
|
5100 | 'group': 'mixBlendMode',
|
5101 | 'order': 11,
|
5102 | },
|
5103 | },
|
5104 | 'mix-blend-exclusion': {
|
5105 | 'utility': {
|
5106 | 'mix-blend-mode': 'exclusion',
|
5107 | },
|
5108 | 'meta': {
|
5109 | 'group': 'mixBlendMode',
|
5110 | 'order': 12,
|
5111 | },
|
5112 | },
|
5113 | 'mix-blend-hue': {
|
5114 | 'utility': {
|
5115 | 'mix-blend-mode': 'hue',
|
5116 | },
|
5117 | 'meta': {
|
5118 | 'group': 'mixBlendMode',
|
5119 | 'order': 13,
|
5120 | },
|
5121 | },
|
5122 | 'mix-blend-saturation': {
|
5123 | 'utility': {
|
5124 | 'mix-blend-mode': 'saturation',
|
5125 | },
|
5126 | 'meta': {
|
5127 | 'group': 'mixBlendMode',
|
5128 | 'order': 14,
|
5129 | },
|
5130 | },
|
5131 | 'mix-blend-color': {
|
5132 | 'utility': {
|
5133 | 'mix-blend-mode': 'color',
|
5134 | },
|
5135 | 'meta': {
|
5136 | 'group': 'mixBlendMode',
|
5137 | 'order': 15,
|
5138 | },
|
5139 | },
|
5140 | 'mix-blend-luminosity': {
|
5141 | 'utility': {
|
5142 | 'mix-blend-mode': 'luminosity',
|
5143 | },
|
5144 | 'meta': {
|
5145 | 'group': 'mixBlendMode',
|
5146 | 'order': 16,
|
5147 | },
|
5148 | },
|
5149 |
|
5150 | 'bg-blend-normal': {
|
5151 | 'utility': {
|
5152 | 'background-blend-mode': 'normal',
|
5153 | },
|
5154 | 'meta': {
|
5155 | 'group': 'backgroundBlendMode',
|
5156 | 'order': 1,
|
5157 | },
|
5158 | },
|
5159 | 'bg-blend-multiply': {
|
5160 | 'utility': {
|
5161 | 'background-blend-mode': 'multiply',
|
5162 | },
|
5163 | 'meta': {
|
5164 | 'group': 'backgroundBlendMode',
|
5165 | 'order': 2,
|
5166 | },
|
5167 | },
|
5168 | 'bg-blend-screen': {
|
5169 | 'utility': {
|
5170 | 'background-blend-mode': 'screen',
|
5171 | },
|
5172 | 'meta': {
|
5173 | 'group': 'backgroundBlendMode',
|
5174 | 'order': 3,
|
5175 | },
|
5176 | },
|
5177 | 'bg-blend-overlay': {
|
5178 | 'utility': {
|
5179 | 'background-blend-mode': 'overlay',
|
5180 | },
|
5181 | 'meta': {
|
5182 | 'group': 'backgroundBlendMode',
|
5183 | 'order': 4,
|
5184 | },
|
5185 | },
|
5186 | 'bg-blend-darken': {
|
5187 | 'utility': {
|
5188 | 'background-blend-mode': 'darken',
|
5189 | },
|
5190 | 'meta': {
|
5191 | 'group': 'backgroundBlendMode',
|
5192 | 'order': 5,
|
5193 | },
|
5194 | },
|
5195 | 'bg-blend-lighten': {
|
5196 | 'utility': {
|
5197 | 'background-blend-mode': 'lighten',
|
5198 | },
|
5199 | 'meta': {
|
5200 | 'group': 'backgroundBlendMode',
|
5201 | 'order': 6,
|
5202 | },
|
5203 | },
|
5204 | 'bg-blend-color-dodge': {
|
5205 | 'utility': {
|
5206 | 'background-blend-mode': 'color-dodge',
|
5207 | },
|
5208 | 'meta': {
|
5209 | 'group': 'backgroundBlendMode',
|
5210 | 'order': 7,
|
5211 | },
|
5212 | },
|
5213 | 'bg-blend-color-burn': {
|
5214 | 'utility': {
|
5215 | 'background-blend-mode': 'color-burn',
|
5216 | },
|
5217 | 'meta': {
|
5218 | 'group': 'backgroundBlendMode',
|
5219 | 'order': 8,
|
5220 | },
|
5221 | },
|
5222 | 'bg-blend-hard-light': {
|
5223 | 'utility': {
|
5224 | 'background-blend-mode': 'hard-light',
|
5225 | },
|
5226 | 'meta': {
|
5227 | 'group': 'backgroundBlendMode',
|
5228 | 'order': 9,
|
5229 | },
|
5230 | },
|
5231 | 'bg-blend-soft-light': {
|
5232 | 'utility': {
|
5233 | 'background-blend-mode': 'soft-light',
|
5234 | },
|
5235 | 'meta': {
|
5236 | 'group': 'backgroundBlendMode',
|
5237 | 'order': 10,
|
5238 | },
|
5239 | },
|
5240 | 'bg-blend-difference': {
|
5241 | 'utility': {
|
5242 | 'background-blend-mode': 'difference',
|
5243 | },
|
5244 | 'meta': {
|
5245 | 'group': 'backgroundBlendMode',
|
5246 | 'order': 11,
|
5247 | },
|
5248 | },
|
5249 | 'bg-blend-exclusion': {
|
5250 | 'utility': {
|
5251 | 'background-blend-mode': 'exclusion',
|
5252 | },
|
5253 | 'meta': {
|
5254 | 'group': 'backgroundBlendMode',
|
5255 | 'order': 12,
|
5256 | },
|
5257 | },
|
5258 | 'bg-blend-hue': {
|
5259 | 'utility': {
|
5260 | 'background-blend-mode': 'hue',
|
5261 | },
|
5262 | 'meta': {
|
5263 | 'group': 'backgroundBlendMode',
|
5264 | 'order': 13,
|
5265 | },
|
5266 | },
|
5267 | 'bg-blend-saturation': {
|
5268 | 'utility': {
|
5269 | 'background-blend-mode': 'saturation',
|
5270 | },
|
5271 | 'meta': {
|
5272 | 'group': 'backgroundBlendMode',
|
5273 | 'order': 14,
|
5274 | },
|
5275 | },
|
5276 | 'bg-blend-color': {
|
5277 | 'utility': {
|
5278 | 'background-blend-mode': 'color',
|
5279 | },
|
5280 | 'meta': {
|
5281 | 'group': 'backgroundBlendMode',
|
5282 | 'order': 15,
|
5283 | },
|
5284 | },
|
5285 | 'bg-blend-luminosity': {
|
5286 | 'utility': {
|
5287 | 'background-blend-mode': 'luminosity',
|
5288 | },
|
5289 | 'meta': {
|
5290 | 'group': 'backgroundBlendMode',
|
5291 | 'order': 16,
|
5292 | },
|
5293 | },
|
5294 |
|
5295 |
|
5296 | 'filter': {
|
5297 | 'utility': {
|
5298 | '--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
5299 | '--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
5300 | '--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
5301 | '--tw-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
5302 | '--tw-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
5303 | '--tw-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
5304 | '--tw-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
5305 | '--tw-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
5306 | '--tw-drop-shadow': 'var(--tw-empty,/*!*/ /*!*/)',
|
5307 | '-webkit-filter': 'var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)',
|
5308 | 'filter': 'var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)',
|
5309 | },
|
5310 | 'meta': {
|
5311 | 'group': 'filter',
|
5312 | 'order': 1,
|
5313 | },
|
5314 | },
|
5315 |
|
5316 | 'filter-none': {
|
5317 | 'utility': {
|
5318 | '-webkit-filter': 'none',
|
5319 | 'filter': 'none',
|
5320 | },
|
5321 | 'meta': {
|
5322 | 'group': 'filter',
|
5323 | 'order': 2,
|
5324 | },
|
5325 | },
|
5326 |
|
5327 |
|
5328 | 'backdrop-filter': {
|
5329 | 'utility': {
|
5330 | '--tw-backdrop-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
5331 | '--tw-backdrop-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
5332 | '--tw-backdrop-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
5333 | '--tw-backdrop-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
5334 | '--tw-backdrop-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
5335 | '--tw-backdrop-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
5336 | '--tw-backdrop-opacity': 'var(--tw-empty,/*!*/ /*!*/)',
|
5337 | '--tw-backdrop-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
5338 | '--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
5339 | '-webkit-backdrop-filter': 'var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)',
|
5340 | 'backdrop-filter': 'var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)',
|
5341 | },
|
5342 | 'meta': {
|
5343 | 'group': 'backdropFilter',
|
5344 | 'order': 1,
|
5345 | },
|
5346 | },
|
5347 |
|
5348 | 'backdrop-filter-none': {
|
5349 | 'utility': {
|
5350 | '-webkit-backdrop-filter': 'none',
|
5351 | 'backdrop-filter': 'none',
|
5352 | },
|
5353 | 'meta': {
|
5354 | 'group': 'backdropFilter',
|
5355 | 'order': 2,
|
5356 | },
|
5357 | },
|
5358 |
|
5359 |
|
5360 | 'border-collapse': {
|
5361 | 'utility': {
|
5362 | 'border-collapse': 'collapse',
|
5363 | },
|
5364 | 'meta': {
|
5365 | 'group': 'borderCollapse',
|
5366 | 'order': 1,
|
5367 | },
|
5368 | },
|
5369 | 'border-separate': {
|
5370 | 'utility': {
|
5371 | 'border-collapse': 'separate',
|
5372 | },
|
5373 | 'meta': {
|
5374 | 'group': 'borderCollapse',
|
5375 | 'order': 2,
|
5376 | },
|
5377 | },
|
5378 |
|
5379 |
|
5380 | 'caption-top': {
|
5381 | 'utility': {
|
5382 | 'caption-side': 'top',
|
5383 | },
|
5384 | 'meta': {
|
5385 | 'group': 'captionSide',
|
5386 | 'order': 1,
|
5387 | },
|
5388 | },
|
5389 |
|
5390 | 'caption-bottom': {
|
5391 | 'utility': {
|
5392 | 'caption-side': 'bottom',
|
5393 | },
|
5394 | 'meta': {
|
5395 | 'group': 'captionSide',
|
5396 | 'order': 2,
|
5397 | },
|
5398 | },
|
5399 |
|
5400 |
|
5401 | 'empty-cells-visible': {
|
5402 | 'utility': {
|
5403 | 'empty-cells': 'show',
|
5404 | },
|
5405 | 'meta': {
|
5406 | 'group': 'emptyCells',
|
5407 | 'order': 1,
|
5408 | },
|
5409 | },
|
5410 |
|
5411 | 'empty-cells-hidden': {
|
5412 | 'utility': {
|
5413 | 'empty-cells': 'hide',
|
5414 | },
|
5415 | 'meta': {
|
5416 | 'group': 'emptyCells',
|
5417 | 'order': 2,
|
5418 | },
|
5419 | },
|
5420 |
|
5421 |
|
5422 | 'table-auto': {
|
5423 | 'utility': {
|
5424 | 'table-layout': 'auto',
|
5425 | },
|
5426 | 'meta': {
|
5427 | 'group': 'tableLayout',
|
5428 | 'order': 1,
|
5429 | },
|
5430 | },
|
5431 | 'table-fixed': {
|
5432 | 'utility': {
|
5433 | 'table-layout': 'fixed',
|
5434 | },
|
5435 | 'meta': {
|
5436 | 'group': 'tableLayout',
|
5437 | 'order': 2,
|
5438 | },
|
5439 | },
|
5440 |
|
5441 |
|
5442 | 'transform': {
|
5443 | 'utility': {
|
5444 | '--tw-rotate': '0',
|
5445 | '--tw-rotate-x': '0',
|
5446 | '--tw-rotate-y': '0',
|
5447 | '--tw-rotate-z': '0',
|
5448 | '--tw-scale-x': '1',
|
5449 | '--tw-scale-y': '1',
|
5450 | '--tw-scale-z': '1',
|
5451 | '--tw-skew-x': '0',
|
5452 | '--tw-skew-y': '0',
|
5453 | '--tw-translate-x': '0',
|
5454 | '--tw-translate-y': '0',
|
5455 | '--tw-translate-z': '0',
|
5456 | '-webkit-transform': 'rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z))',
|
5457 | '-ms-transform': 'rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z))',
|
5458 | 'transform': 'rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z))',
|
5459 | },
|
5460 | 'meta': {
|
5461 | 'group': 'transform',
|
5462 | 'order': 1,
|
5463 | },
|
5464 | },
|
5465 | 'transform-gpu': {
|
5466 | 'utility': {
|
5467 | '--tw-rotate': '0',
|
5468 | '--tw-rotate-x': '0',
|
5469 | '--tw-rotate-y': '0',
|
5470 | '--tw-rotate-z': '0',
|
5471 | '--tw-scale-x': '1',
|
5472 | '--tw-scale-y': '1',
|
5473 | '--tw-scale-z': '1',
|
5474 | '--tw-skew-x': '0',
|
5475 | '--tw-skew-y': '0',
|
5476 | '--tw-translate-x': '0',
|
5477 | '--tw-translate-y': '0',
|
5478 | '--tw-translate-z': '0',
|
5479 | '-webkit-transform': 'rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translate3d(var(--tw-translate-x), var(--tw-translate-y), var(--tw-translate-z))',
|
5480 | '-ms-transform': 'rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translate3d(var(--tw-translate-x), var(--tw-translate-y), var(--tw-translate-z))',
|
5481 | 'transform': 'rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translate3d(var(--tw-translate-x), var(--tw-translate-y), var(--tw-translate-z))',
|
5482 | },
|
5483 | 'meta': {
|
5484 | 'group': 'transform',
|
5485 | 'order': 2,
|
5486 | },
|
5487 | },
|
5488 | 'transform-none': {
|
5489 | 'utility': {
|
5490 | '-webkit-transform': 'none',
|
5491 | '-ms-transform': 'none',
|
5492 | 'transform': 'none',
|
5493 | },
|
5494 | 'meta': {
|
5495 | 'group': 'transform',
|
5496 | 'order': 3,
|
5497 | },
|
5498 | },
|
5499 |
|
5500 |
|
5501 | 'preserve-flat': {
|
5502 | 'utility': {
|
5503 | '-webkit-transform-style': 'flat',
|
5504 | 'transform-style': 'flat',
|
5505 | },
|
5506 | 'meta': {
|
5507 | 'group': 'transform',
|
5508 | 'order': 4,
|
5509 | },
|
5510 | },
|
5511 |
|
5512 | 'preserve-3d': {
|
5513 | 'utility': {
|
5514 | '-webkit-transform-style': 'preserve-3d',
|
5515 | 'transform-style': 'preserve-3d',
|
5516 | },
|
5517 | 'meta': {
|
5518 | 'group': 'transform',
|
5519 | 'order': 5,
|
5520 | },
|
5521 | },
|
5522 |
|
5523 | 'animated': {
|
5524 | 'utility': {
|
5525 | '-webkit-animation-duration': '1000ms',
|
5526 | '-webkit-animation-fill-mode': 'both',
|
5527 | 'animation-duration': '1000ms',
|
5528 | 'animation-fill-mode': 'both',
|
5529 | },
|
5530 | 'meta': {
|
5531 | 'group': 'animation',
|
5532 | 'order': 3,
|
5533 | },
|
5534 | },
|
5535 |
|
5536 | 'animate-reverse': {
|
5537 | 'utility': {
|
5538 | '-webkit-animation-direction': 'reverse',
|
5539 | 'animation-direction': 'reverse',
|
5540 | },
|
5541 | 'meta': {
|
5542 | 'group': 'animation',
|
5543 | 'order': 4,
|
5544 | },
|
5545 | },
|
5546 |
|
5547 | 'animate-alternate': {
|
5548 | 'utility': {
|
5549 | '-webkit-animation-direction': 'alternate',
|
5550 | 'animation-direction': 'alternate',
|
5551 | },
|
5552 | 'meta': {
|
5553 | 'group': 'animation',
|
5554 | 'order': 5,
|
5555 | },
|
5556 | },
|
5557 |
|
5558 | 'animate-alternate-reverse': {
|
5559 | 'utility': {
|
5560 | '-webkit-animation-direction': 'alternate-reverse',
|
5561 | 'animation-direction': 'alternate-reverse',
|
5562 | },
|
5563 | 'meta': {
|
5564 | 'group': 'animation',
|
5565 | 'order': 6,
|
5566 | },
|
5567 | },
|
5568 |
|
5569 | 'animate-fill-none': {
|
5570 | 'utility': {
|
5571 | '-webkit-animation-fill-mode': 'none',
|
5572 | 'animation-fill-mode': 'none',
|
5573 | },
|
5574 | 'meta': {
|
5575 | 'group': 'animation',
|
5576 | 'order': 7,
|
5577 | },
|
5578 | },
|
5579 |
|
5580 | 'animate-fill-forwards': {
|
5581 | 'utility': {
|
5582 | '-webkit-animation-fill-mode': 'forwards',
|
5583 | 'animation-fill-mode': 'forwards',
|
5584 | },
|
5585 | 'meta': {
|
5586 | 'group': 'animation',
|
5587 | 'order': 8,
|
5588 | },
|
5589 | },
|
5590 |
|
5591 | 'animate-fill-backwards': {
|
5592 | 'utility': {
|
5593 | '-webkit-animation-fill-mode': 'backwards',
|
5594 | 'animation-fill-mode': 'backwards',
|
5595 | },
|
5596 | 'meta': {
|
5597 | 'group': 'animation',
|
5598 | 'order': 9,
|
5599 | },
|
5600 | },
|
5601 |
|
5602 | 'animate-fill-both': {
|
5603 | 'utility': {
|
5604 | '-webkit-animation-fill-mode': 'both',
|
5605 | 'animation-fill-mode': 'both',
|
5606 | },
|
5607 | 'meta': {
|
5608 | 'group': 'animation',
|
5609 | 'order': 10,
|
5610 | },
|
5611 | },
|
5612 |
|
5613 | 'animate-paused': {
|
5614 | 'utility': {
|
5615 | '-webkit-animation-play-state': 'paused',
|
5616 | 'animation-play-state': 'paused',
|
5617 | },
|
5618 | 'meta': {
|
5619 | 'group': 'animation',
|
5620 | 'order': 11,
|
5621 | },
|
5622 | },
|
5623 |
|
5624 | 'animate-running': {
|
5625 | 'utility': {
|
5626 | '-webkit-animation-play-state': 'running',
|
5627 | 'animation-play-state': 'running',
|
5628 | },
|
5629 | 'meta': {
|
5630 | 'group': 'animation',
|
5631 | 'order': 12,
|
5632 | },
|
5633 | },
|
5634 |
|
5635 |
|
5636 | 'appearance-none': {
|
5637 | 'utility': {
|
5638 | '-webkit-appearance': 'none',
|
5639 | '-moz-appearance': 'none',
|
5640 | 'appearance': 'none',
|
5641 | },
|
5642 | 'meta': {
|
5643 | 'group': 'appearance',
|
5644 | 'order': 1,
|
5645 | },
|
5646 | },
|
5647 |
|
5648 |
|
5649 | 'pointer-events-none': {
|
5650 | 'utility': {
|
5651 | 'pointer-events': 'none',
|
5652 | },
|
5653 | 'meta': {
|
5654 | 'group': 'pointerEvents',
|
5655 | 'order': 1,
|
5656 | },
|
5657 | },
|
5658 | 'pointer-events-auto': {
|
5659 | 'utility': {
|
5660 | 'pointer-events': 'auto',
|
5661 | },
|
5662 | 'meta': {
|
5663 | 'group': 'pointerEvents',
|
5664 | 'order': 2,
|
5665 | },
|
5666 | },
|
5667 |
|
5668 |
|
5669 | 'resize-none': {
|
5670 | 'utility': {
|
5671 | 'resize': 'none',
|
5672 | },
|
5673 | 'meta': {
|
5674 | 'group': 'resize',
|
5675 | 'order': 1,
|
5676 | },
|
5677 | },
|
5678 | 'resize-y': {
|
5679 | 'utility': {
|
5680 | 'resize': 'vertical',
|
5681 | },
|
5682 | 'meta': {
|
5683 | 'group': 'resize',
|
5684 | 'order': 2,
|
5685 | },
|
5686 | },
|
5687 | 'resize-x': {
|
5688 | 'utility': {
|
5689 | 'resize': 'horizontal',
|
5690 | },
|
5691 | 'meta': {
|
5692 | 'group': 'resize',
|
5693 | 'order': 3,
|
5694 | },
|
5695 | },
|
5696 | 'resize': {
|
5697 | 'utility': {
|
5698 | 'resize': 'both',
|
5699 | },
|
5700 | 'meta': {
|
5701 | 'group': 'resize',
|
5702 | 'order': 4,
|
5703 | },
|
5704 | },
|
5705 |
|
5706 |
|
5707 | 'select-none': {
|
5708 | 'utility': {
|
5709 | '-webkit-user-select': 'none',
|
5710 | '-moz-user-select': 'none',
|
5711 | '-ms-user-select': 'none',
|
5712 | 'user-select': 'none',
|
5713 | },
|
5714 | 'meta': {
|
5715 | 'group': 'userSelect',
|
5716 | 'order': 1,
|
5717 | },
|
5718 | },
|
5719 | 'select-text': {
|
5720 | 'utility': {
|
5721 | '-webkit-user-select': 'text',
|
5722 | '-moz-user-select': 'text',
|
5723 | '-ms-user-select': 'text',
|
5724 | 'user-select': 'text',
|
5725 | },
|
5726 | 'meta': {
|
5727 | 'group': 'userSelect',
|
5728 | 'order': 2,
|
5729 | },
|
5730 | },
|
5731 | 'select-all': {
|
5732 | 'utility': {
|
5733 | '-webkit-user-select': 'all',
|
5734 | '-moz-user-select': 'all',
|
5735 | '-ms-user-select': 'all',
|
5736 | 'user-select': 'all',
|
5737 | },
|
5738 | 'meta': {
|
5739 | 'group': 'userSelect',
|
5740 | 'order': 3,
|
5741 | },
|
5742 | },
|
5743 | 'select-auto': {
|
5744 | 'utility': {
|
5745 | '-webkit-user-select': 'auto',
|
5746 | '-moz-user-select': 'auto',
|
5747 | '-ms-user-select': 'auto',
|
5748 | 'user-select': 'auto',
|
5749 | },
|
5750 | 'meta': {
|
5751 | 'group': 'userSelect',
|
5752 | 'order': 4,
|
5753 | },
|
5754 | },
|
5755 |
|
5756 |
|
5757 |
|
5758 | 'fill-current': {
|
5759 | 'utility': {
|
5760 | 'fill': 'currentColor',
|
5761 | },
|
5762 | 'meta': {
|
5763 | 'group': 'fill',
|
5764 | 'order': 1,
|
5765 | },
|
5766 | },
|
5767 | 'stroke-current': {
|
5768 | 'utility': {
|
5769 | 'stroke': 'currentColor',
|
5770 | },
|
5771 | 'meta': {
|
5772 | 'group': 'stroke',
|
5773 | 'order': 1,
|
5774 | },
|
5775 | },
|
5776 |
|
5777 | 'stroke-cap-auto': {
|
5778 | 'utility': {
|
5779 | 'stroke-linecap': 'butt',
|
5780 | },
|
5781 | 'meta': {
|
5782 | 'group': 'stroke',
|
5783 | 'order': 2,
|
5784 | },
|
5785 | },
|
5786 | 'stroke-cap-square': {
|
5787 | 'utility': {
|
5788 | 'stroke-linecap': 'square',
|
5789 | },
|
5790 | 'meta': {
|
5791 | 'group': 'stroke',
|
5792 | 'order': 3,
|
5793 | },
|
5794 | },
|
5795 | 'stroke-cap-round': {
|
5796 | 'utility': {
|
5797 | 'stroke-linecap': 'round',
|
5798 | },
|
5799 | 'meta': {
|
5800 | 'group': 'stroke',
|
5801 | 'order': 4,
|
5802 | },
|
5803 | },
|
5804 |
|
5805 | 'stroke-join-auto': {
|
5806 | 'utility': {
|
5807 | 'stroke-linejoin': 'miter',
|
5808 | },
|
5809 | 'meta': {
|
5810 | 'group': 'stroke',
|
5811 | 'order': 5,
|
5812 | },
|
5813 | },
|
5814 | 'stroke-join-arcs': {
|
5815 | 'utility': {
|
5816 | 'stroke-linejoin': 'arcs',
|
5817 | },
|
5818 | 'meta': {
|
5819 | 'group': 'stroke',
|
5820 | 'order': 6,
|
5821 | },
|
5822 | },
|
5823 | 'stroke-join-bevel': {
|
5824 | 'utility': {
|
5825 | 'stroke-linejoin': 'bevel',
|
5826 | },
|
5827 | 'meta': {
|
5828 | 'group': 'stroke',
|
5829 | 'order': 7,
|
5830 | },
|
5831 | },
|
5832 | 'stroke-join-clip': {
|
5833 | 'utility': {
|
5834 | 'stroke-linejoin': 'miter-clip',
|
5835 | },
|
5836 | 'meta': {
|
5837 | 'group': 'stroke',
|
5838 | 'order': 8,
|
5839 | },
|
5840 | },
|
5841 | 'stroke-join-round': {
|
5842 | 'utility': {
|
5843 | 'stroke-linejoin': 'round',
|
5844 | },
|
5845 | 'meta': {
|
5846 | 'group': 'stroke',
|
5847 | 'order': 9,
|
5848 | },
|
5849 | },
|
5850 |
|
5851 | 'sr-only': {
|
5852 | 'utility': {
|
5853 | 'position': 'absolute',
|
5854 | 'width': '1px',
|
5855 | 'height': '1px',
|
5856 | 'padding': '0',
|
5857 | 'margin': '-1px',
|
5858 | 'overflow': 'hidden',
|
5859 | 'clip': 'rect(0, 0, 0, 0)',
|
5860 | 'white-space': 'nowrap',
|
5861 | 'border-width': '0',
|
5862 | },
|
5863 | 'meta': {
|
5864 | 'group': 'accessibility',
|
5865 | 'order': 1,
|
5866 | },
|
5867 | },
|
5868 | 'not-sr-only': {
|
5869 | 'utility': {
|
5870 | 'position': 'static',
|
5871 | 'width': 'auto',
|
5872 | 'height': 'auto',
|
5873 | 'padding': '0',
|
5874 | 'margin': '0',
|
5875 | 'overflow': 'visible',
|
5876 | 'clip': 'auto',
|
5877 | 'white-space': 'normal',
|
5878 | },
|
5879 | 'meta': {
|
5880 | 'group': 'accessibility',
|
5881 | 'order': 2,
|
5882 | },
|
5883 | },
|
5884 | };
|
5885 |
|
5886 | const variantOrder = [
|
5887 | 'hover',
|
5888 | 'focus',
|
5889 | 'active',
|
5890 | 'visited',
|
5891 | 'link',
|
5892 | 'target',
|
5893 | 'focus-visible',
|
5894 | 'focus-within',
|
5895 | 'checked',
|
5896 | 'not-checked',
|
5897 | 'default',
|
5898 | 'disabled',
|
5899 | 'enabled',
|
5900 | 'indeterminate',
|
5901 | 'invalid',
|
5902 | 'valid',
|
5903 | 'optional',
|
5904 | 'required',
|
5905 | 'placeholder-shown',
|
5906 | 'read-only',
|
5907 | 'read-write',
|
5908 | 'not-disabled',
|
5909 | 'first-of-type',
|
5910 | 'not-first-of-type',
|
5911 | 'last-of-type',
|
5912 | 'not-last-of-type',
|
5913 | 'first',
|
5914 | 'last',
|
5915 | 'not-first',
|
5916 | 'not-last',
|
5917 | 'only-child',
|
5918 | 'not-only-child',
|
5919 | 'only-of-type',
|
5920 | 'not-only-of-type',
|
5921 | 'even',
|
5922 | 'odd',
|
5923 | 'even-of-type',
|
5924 | 'odd-of-type',
|
5925 | 'root',
|
5926 | 'empty',
|
5927 | 'before',
|
5928 | 'after',
|
5929 | 'first-letter',
|
5930 | 'first-line',
|
5931 | 'file-selector-button',
|
5932 | 'selection',
|
5933 | 'svg',
|
5934 | 'all',
|
5935 | 'children',
|
5936 | 'siblings',
|
5937 | 'sibling',
|
5938 | 'ltr',
|
5939 | 'rtl',
|
5940 | 'group-hover',
|
5941 | 'group-focus',
|
5942 | 'group-active',
|
5943 | 'group-visited',
|
5944 | 'motion-safe',
|
5945 | 'motion-reduce',
|
5946 | ];
|
5947 |
|
5948 |
|
5949 |
|
5950 | var layerOrder; (function (layerOrder) {
|
5951 | const base = 10; layerOrder[layerOrder["base"] = base] = "base";
|
5952 | const components = 150; layerOrder[layerOrder["components"] = components] = "components";
|
5953 | const shortcuts = 160; layerOrder[layerOrder["shortcuts"] = shortcuts] = "shortcuts";
|
5954 | const utilities = 20000; layerOrder[layerOrder["utilities"] = utilities] = "utilities";
|
5955 | })(layerOrder || (layerOrder = {}));
|
5956 |
|
5957 | var pluginOrder; (function (pluginOrder) {
|
5958 | const container = 100; pluginOrder[pluginOrder['container'] = container] = 'container';
|
5959 | const space = 200; pluginOrder[pluginOrder['space'] = space] = 'space';
|
5960 | const divideWidth = 300; pluginOrder[pluginOrder['divideWidth'] = divideWidth] = 'divideWidth';
|
5961 | const divideColor = 400; pluginOrder[pluginOrder['divideColor'] = divideColor] = 'divideColor';
|
5962 | const divideStyle = 500; pluginOrder[pluginOrder['divideStyle'] = divideStyle] = 'divideStyle';
|
5963 | const divideOpacity = 600; pluginOrder[pluginOrder['divideOpacity'] = divideOpacity] = 'divideOpacity';
|
5964 | const accessibility = 700; pluginOrder[pluginOrder['accessibility'] = accessibility] = 'accessibility';
|
5965 | const appearance = 800; pluginOrder[pluginOrder['appearance'] = appearance] = 'appearance';
|
5966 | const backgroundAttachment = 900; pluginOrder[pluginOrder['backgroundAttachment'] = backgroundAttachment] = 'backgroundAttachment';
|
5967 | const backgroundClip = 1000; pluginOrder[pluginOrder['backgroundClip'] = backgroundClip] = 'backgroundClip';
|
5968 | const backgroundColor = 1100; pluginOrder[pluginOrder['backgroundColor'] = backgroundColor] = 'backgroundColor';
|
5969 | const backgroundImage = 1200; pluginOrder[pluginOrder['backgroundImage'] = backgroundImage] = 'backgroundImage';
|
5970 | const gradientColorStops = 1300; pluginOrder[pluginOrder['gradientColorStops'] = gradientColorStops] = 'gradientColorStops';
|
5971 | const backgroundOpacity = 1400; pluginOrder[pluginOrder['backgroundOpacity'] = backgroundOpacity] = 'backgroundOpacity';
|
5972 | const backgroundPosition = 1500; pluginOrder[pluginOrder['backgroundPosition'] = backgroundPosition] = 'backgroundPosition';
|
5973 | const backgroundRepeat = 1600; pluginOrder[pluginOrder['backgroundRepeat'] = backgroundRepeat] = 'backgroundRepeat';
|
5974 | const backgroundSize = 1700; pluginOrder[pluginOrder['backgroundSize'] = backgroundSize] = 'backgroundSize';
|
5975 | const backgroundOrigin = 1750; pluginOrder[pluginOrder['backgroundOrigin'] = backgroundOrigin] = 'backgroundOrigin';
|
5976 | const borderCollapse = 1800; pluginOrder[pluginOrder['borderCollapse'] = borderCollapse] = 'borderCollapse';
|
5977 | const borderColor = 1900; pluginOrder[pluginOrder['borderColor'] = borderColor] = 'borderColor';
|
5978 | const borderOpacity = 2000; pluginOrder[pluginOrder['borderOpacity'] = borderOpacity] = 'borderOpacity';
|
5979 | const borderRadius = 2100; pluginOrder[pluginOrder['borderRadius'] = borderRadius] = 'borderRadius';
|
5980 | const borderStyle = 2200; pluginOrder[pluginOrder['borderStyle'] = borderStyle] = 'borderStyle';
|
5981 | const borderWidth = 2300; pluginOrder[pluginOrder['borderWidth'] = borderWidth] = 'borderWidth';
|
5982 | const boxDecorationBreak = 2350; pluginOrder[pluginOrder['boxDecorationBreak'] = boxDecorationBreak] = 'boxDecorationBreak';
|
5983 | const boxSizing = 2400; pluginOrder[pluginOrder['boxSizing'] = boxSizing] = 'boxSizing';
|
5984 | const cursor = 2500; pluginOrder[pluginOrder['cursor'] = cursor] = 'cursor';
|
5985 | const captionSide = 2550; pluginOrder[pluginOrder['captionSide'] = captionSide] = 'captionSide';
|
5986 | const emptyCells = 2560; pluginOrder[pluginOrder['emptyCells'] = emptyCells] = 'emptyCells';
|
5987 | const display = 2600; pluginOrder[pluginOrder['display'] = display] = 'display';
|
5988 | const flexDirection = 2700; pluginOrder[pluginOrder['flexDirection'] = flexDirection] = 'flexDirection';
|
5989 | const flexWrap = 2800; pluginOrder[pluginOrder['flexWrap'] = flexWrap] = 'flexWrap';
|
5990 | const placeItems = 2900; pluginOrder[pluginOrder['placeItems'] = placeItems] = 'placeItems';
|
5991 | const placeContent = 3000; pluginOrder[pluginOrder['placeContent'] = placeContent] = 'placeContent';
|
5992 | const placeSelf = 3100; pluginOrder[pluginOrder['placeSelf'] = placeSelf] = 'placeSelf';
|
5993 | const alignItems = 3200; pluginOrder[pluginOrder['alignItems'] = alignItems] = 'alignItems';
|
5994 | const alignContent = 3300; pluginOrder[pluginOrder['alignContent'] = alignContent] = 'alignContent';
|
5995 | const alignSelf = 3400; pluginOrder[pluginOrder['alignSelf'] = alignSelf] = 'alignSelf';
|
5996 | const justifyItems = 3500; pluginOrder[pluginOrder['justifyItems'] = justifyItems] = 'justifyItems';
|
5997 | const justifyContent = 3600; pluginOrder[pluginOrder['justifyContent'] = justifyContent] = 'justifyContent';
|
5998 | const justifySelf = 3700; pluginOrder[pluginOrder['justifySelf'] = justifySelf] = 'justifySelf';
|
5999 | const flex = 3800; pluginOrder[pluginOrder['flex'] = flex] = 'flex';
|
6000 | const flexGrow = 3900; pluginOrder[pluginOrder['flexGrow'] = flexGrow] = 'flexGrow';
|
6001 | const flexShrink = 4000; pluginOrder[pluginOrder['flexShrink'] = flexShrink] = 'flexShrink';
|
6002 | const order = 4100; pluginOrder[pluginOrder['order'] = order] = 'order';
|
6003 | const float = 4200; pluginOrder[pluginOrder['float'] = float] = 'float';
|
6004 | const clear = 4300; pluginOrder[pluginOrder['clear'] = clear] = 'clear';
|
6005 | const fontFamily = 4400; pluginOrder[pluginOrder['fontFamily'] = fontFamily] = 'fontFamily';
|
6006 | const fontWeight = 4500; pluginOrder[pluginOrder['fontWeight'] = fontWeight] = 'fontWeight';
|
6007 | const height = 4600; pluginOrder[pluginOrder['height'] = height] = 'height';
|
6008 | const fontSize = 4700; pluginOrder[pluginOrder['fontSize'] = fontSize] = 'fontSize';
|
6009 | const lineHeight = 4800; pluginOrder[pluginOrder['lineHeight'] = lineHeight] = 'lineHeight';
|
6010 | const listStylePosition = 4900; pluginOrder[pluginOrder['listStylePosition'] = listStylePosition] = 'listStylePosition';
|
6011 | const listStyleType = 5000; pluginOrder[pluginOrder['listStyleType'] = listStyleType] = 'listStyleType';
|
6012 | const margin = 5100; pluginOrder[pluginOrder['margin'] = margin] = 'margin';
|
6013 | const maxHeight = 5200; pluginOrder[pluginOrder['maxHeight'] = maxHeight] = 'maxHeight';
|
6014 | const maxWidth = 5300; pluginOrder[pluginOrder['maxWidth'] = maxWidth] = 'maxWidth';
|
6015 | const minHeight = 5400; pluginOrder[pluginOrder['minHeight'] = minHeight] = 'minHeight';
|
6016 | const minWidth = 5500; pluginOrder[pluginOrder['minWidth'] = minWidth] = 'minWidth';
|
6017 | const objectFit = 5600; pluginOrder[pluginOrder['objectFit'] = objectFit] = 'objectFit';
|
6018 | const objectPosition = 5700; pluginOrder[pluginOrder['objectPosition'] = objectPosition] = 'objectPosition';
|
6019 | const opacity = 5800; pluginOrder[pluginOrder['opacity'] = opacity] = 'opacity';
|
6020 | const outline = 5900; pluginOrder[pluginOrder['outline'] = outline] = 'outline';
|
6021 | const overflow = 6000; pluginOrder[pluginOrder['overflow'] = overflow] = 'overflow';
|
6022 | const overscrollBehavior = 6100; pluginOrder[pluginOrder['overscrollBehavior'] = overscrollBehavior] = 'overscrollBehavior';
|
6023 | const padding = 6200; pluginOrder[pluginOrder['padding'] = padding] = 'padding';
|
6024 | const placeholderColor = 6300; pluginOrder[pluginOrder['placeholderColor'] = placeholderColor] = 'placeholderColor';
|
6025 | const placeholderOpacity = 6400; pluginOrder[pluginOrder['placeholderOpacity'] = placeholderOpacity] = 'placeholderOpacity';
|
6026 | const caretColor = 6450; pluginOrder[pluginOrder['caretColor'] = caretColor] = 'caretColor';
|
6027 | const caretOpacity = 6460; pluginOrder[pluginOrder['caretOpacity'] = caretOpacity] = 'caretOpacity';
|
6028 | const tabSize = 6470; pluginOrder[pluginOrder['tabSize'] = tabSize] = 'tabSize';
|
6029 | const pointerEvents = 6500; pluginOrder[pluginOrder['pointerEvents'] = pointerEvents] = 'pointerEvents';
|
6030 | const position = 6600; pluginOrder[pluginOrder['position'] = position] = 'position';
|
6031 | const inset = 6700; pluginOrder[pluginOrder['inset'] = inset] = 'inset';
|
6032 | const resize = 6800; pluginOrder[pluginOrder['resize'] = resize] = 'resize';
|
6033 | const boxShadow = 6900; pluginOrder[pluginOrder['boxShadow'] = boxShadow] = 'boxShadow';
|
6034 | const boxShadowColor = 6950; pluginOrder[pluginOrder['boxShadowColor'] = boxShadowColor] = 'boxShadowColor';
|
6035 | const ringWidth = 7000; pluginOrder[pluginOrder['ringWidth'] = ringWidth] = 'ringWidth';
|
6036 | const ringOffsetColor = 7100; pluginOrder[pluginOrder['ringOffsetColor'] = ringOffsetColor] = 'ringOffsetColor';
|
6037 | const ringOffsetWidth = 7200; pluginOrder[pluginOrder['ringOffsetWidth'] = ringOffsetWidth] = 'ringOffsetWidth';
|
6038 | const ringColor = 7300; pluginOrder[pluginOrder['ringColor'] = ringColor] = 'ringColor';
|
6039 | const ringOpacity = 7400; pluginOrder[pluginOrder['ringOpacity'] = ringOpacity] = 'ringOpacity';
|
6040 | const fill = 7500; pluginOrder[pluginOrder['fill'] = fill] = 'fill';
|
6041 | const stroke = 7600; pluginOrder[pluginOrder['stroke'] = stroke] = 'stroke';
|
6042 | const strokeWidth = 7700; pluginOrder[pluginOrder['strokeWidth'] = strokeWidth] = 'strokeWidth';
|
6043 | const strokeDashArray = 7750; pluginOrder[pluginOrder['strokeDashArray'] = strokeDashArray] = 'strokeDashArray';
|
6044 | const strokeDashOffset = 7760; pluginOrder[pluginOrder['strokeDashOffset'] = strokeDashOffset] = 'strokeDashOffset';
|
6045 | const tableLayout = 7800; pluginOrder[pluginOrder['tableLayout'] = tableLayout] = 'tableLayout';
|
6046 | const textAlign = 7900; pluginOrder[pluginOrder['textAlign'] = textAlign] = 'textAlign';
|
6047 | const textColor = 8000; pluginOrder[pluginOrder['textColor'] = textColor] = 'textColor';
|
6048 | const textOpacity = 8100; pluginOrder[pluginOrder['textOpacity'] = textOpacity] = 'textOpacity';
|
6049 | const textOverflow = 8200; pluginOrder[pluginOrder['textOverflow'] = textOverflow] = 'textOverflow';
|
6050 | const textShadow = 8250; pluginOrder[pluginOrder['textShadow'] = textShadow] = 'textShadow';
|
6051 | const fontStyle = 8300; pluginOrder[pluginOrder['fontStyle'] = fontStyle] = 'fontStyle';
|
6052 | const textTransform = 8400; pluginOrder[pluginOrder['textTransform'] = textTransform] = 'textTransform';
|
6053 | const textDecorationStyle = 8450; pluginOrder[pluginOrder['textDecorationStyle'] = textDecorationStyle] = 'textDecorationStyle';
|
6054 | const textDecorationLength = 8455; pluginOrder[pluginOrder['textDecorationLength'] = textDecorationLength] = 'textDecorationLength';
|
6055 | const textDecorationColor = 8460; pluginOrder[pluginOrder['textDecorationColor'] = textDecorationColor] = 'textDecorationColor';
|
6056 | const textDecorationOpacity = 8470; pluginOrder[pluginOrder['textDecorationOpacity'] = textDecorationOpacity] = 'textDecorationOpacity';
|
6057 | const textDecorationOffset = 8480; pluginOrder[pluginOrder['textDecorationOffset'] = textDecorationOffset] = 'textDecorationOffset';
|
6058 | const textDecoration = 8500; pluginOrder[pluginOrder['textDecoration'] = textDecoration] = 'textDecoration';
|
6059 | const textIndent = 8550; pluginOrder[pluginOrder['textIndent'] = textIndent] = 'textIndent';
|
6060 | const textStrokeColor = 8560; pluginOrder[pluginOrder['textStrokeColor'] = textStrokeColor] = 'textStrokeColor';
|
6061 | const textStrokeWidth = 8570; pluginOrder[pluginOrder['textStrokeWidth'] = textStrokeWidth] = 'textStrokeWidth';
|
6062 | const content = 8580; pluginOrder[pluginOrder['content'] = content] = 'content';
|
6063 | const fontSmoothing = 8600; pluginOrder[pluginOrder['fontSmoothing'] = fontSmoothing] = 'fontSmoothing';
|
6064 | const fontVariantNumeric = 8700; pluginOrder[pluginOrder['fontVariantNumeric'] = fontVariantNumeric] = 'fontVariantNumeric';
|
6065 | const letterSpacing = 8800; pluginOrder[pluginOrder['letterSpacing'] = letterSpacing] = 'letterSpacing';
|
6066 | const userSelect = 8900; pluginOrder[pluginOrder['userSelect'] = userSelect] = 'userSelect';
|
6067 | const verticalAlign = 9000; pluginOrder[pluginOrder['verticalAlign'] = verticalAlign] = 'verticalAlign';
|
6068 | const visibility = 9100; pluginOrder[pluginOrder['visibility'] = visibility] = 'visibility';
|
6069 | const backfaceVisibility = 9150; pluginOrder[pluginOrder['backfaceVisibility'] = backfaceVisibility] = 'backfaceVisibility';
|
6070 | const whitespace = 9200; pluginOrder[pluginOrder['whitespace'] = whitespace] = 'whitespace';
|
6071 | const wordBreak = 9300; pluginOrder[pluginOrder['wordBreak'] = wordBreak] = 'wordBreak';
|
6072 | const writingMode = 9340; pluginOrder[pluginOrder['writingMode'] = writingMode] = 'writingMode';
|
6073 | const hyphens = 9350; pluginOrder[pluginOrder['hyphens'] = hyphens] = 'hyphens';
|
6074 | const width = 9400; pluginOrder[pluginOrder['width'] = width] = 'width';
|
6075 | const zIndex = 9500; pluginOrder[pluginOrder['zIndex'] = zIndex] = 'zIndex';
|
6076 | const isolation = 9550; pluginOrder[pluginOrder['isolation'] = isolation] = 'isolation';
|
6077 | const gap = 9600; pluginOrder[pluginOrder['gap'] = gap] = 'gap';
|
6078 | const gridAutoFlow = 9700; pluginOrder[pluginOrder['gridAutoFlow'] = gridAutoFlow] = 'gridAutoFlow';
|
6079 | const gridTemplateColumns = 9800; pluginOrder[pluginOrder['gridTemplateColumns'] = gridTemplateColumns] = 'gridTemplateColumns';
|
6080 | const gridAutoColumns = 9900; pluginOrder[pluginOrder['gridAutoColumns'] = gridAutoColumns] = 'gridAutoColumns';
|
6081 | const gridColumn = 10000; pluginOrder[pluginOrder['gridColumn'] = gridColumn] = 'gridColumn';
|
6082 | const gridColumnStart = 10100; pluginOrder[pluginOrder['gridColumnStart'] = gridColumnStart] = 'gridColumnStart';
|
6083 | const gridColumnEnd = 10200; pluginOrder[pluginOrder['gridColumnEnd'] = gridColumnEnd] = 'gridColumnEnd';
|
6084 | const gridTemplateRows = 10300; pluginOrder[pluginOrder['gridTemplateRows'] = gridTemplateRows] = 'gridTemplateRows';
|
6085 | const gridAutoRows = 10400; pluginOrder[pluginOrder['gridAutoRows'] = gridAutoRows] = 'gridAutoRows';
|
6086 | const gridRow = 10500; pluginOrder[pluginOrder['gridRow'] = gridRow] = 'gridRow';
|
6087 | const gridRowStart = 10600; pluginOrder[pluginOrder['gridRowStart'] = gridRowStart] = 'gridRowStart';
|
6088 | const gridRowEnd = 10700; pluginOrder[pluginOrder['gridRowEnd'] = gridRowEnd] = 'gridRowEnd';
|
6089 | const transform = 10800; pluginOrder[pluginOrder['transform'] = transform] = 'transform';
|
6090 | const transformOrigin = 10900; pluginOrder[pluginOrder['transformOrigin'] = transformOrigin] = 'transformOrigin';
|
6091 | const scale = 11000; pluginOrder[pluginOrder['scale'] = scale] = 'scale';
|
6092 | const rotate = 11100; pluginOrder[pluginOrder['rotate'] = rotate] = 'rotate';
|
6093 | const translate = 11200; pluginOrder[pluginOrder['translate'] = translate] = 'translate';
|
6094 | const skew = 11300; pluginOrder[pluginOrder['skew'] = skew] = 'skew';
|
6095 | const perspective = 11350; pluginOrder[pluginOrder['perspective'] = perspective] = 'perspective';
|
6096 | const perspectiveOrigin = 11360; pluginOrder[pluginOrder['perspectiveOrigin'] = perspectiveOrigin] = 'perspectiveOrigin';
|
6097 | const transitionProperty = 11400; pluginOrder[pluginOrder['transitionProperty'] = transitionProperty] = 'transitionProperty';
|
6098 | const transitionTimingFunction = 11500; pluginOrder[pluginOrder['transitionTimingFunction'] = transitionTimingFunction] = 'transitionTimingFunction';
|
6099 | const transitionDuration = 11600; pluginOrder[pluginOrder['transitionDuration'] = transitionDuration] = 'transitionDuration';
|
6100 | const transitionDelay = 11700; pluginOrder[pluginOrder['transitionDelay'] = transitionDelay] = 'transitionDelay';
|
6101 | const keyframes = 11800; pluginOrder[pluginOrder['keyframes'] = keyframes] = 'keyframes';
|
6102 | const animation = 11900; pluginOrder[pluginOrder['animation'] = animation] = 'animation';
|
6103 | const imageRendering = 11950; pluginOrder[pluginOrder['imageRendering'] = imageRendering] = 'imageRendering';
|
6104 | const mixBlendMode = 12000; pluginOrder[pluginOrder['mixBlendMode'] = mixBlendMode] = 'mixBlendMode';
|
6105 | const backgroundBlendMode = 12100; pluginOrder[pluginOrder['backgroundBlendMode'] = backgroundBlendMode] = 'backgroundBlendMode';
|
6106 | const filter = 12200; pluginOrder[pluginOrder['filter'] = filter] = 'filter';
|
6107 | const blur = 12300; pluginOrder[pluginOrder['blur'] = blur] = 'blur';
|
6108 | const brightness = 12400; pluginOrder[pluginOrder['brightness'] = brightness] = 'brightness';
|
6109 | const contrast = 12500; pluginOrder[pluginOrder['contrast'] = contrast] = 'contrast';
|
6110 | const dropShadow = 12600; pluginOrder[pluginOrder['dropShadow'] = dropShadow] = 'dropShadow';
|
6111 | const grayscale = 12700; pluginOrder[pluginOrder['grayscale'] = grayscale] = 'grayscale';
|
6112 | const hueRotate = 12800; pluginOrder[pluginOrder['hueRotate'] = hueRotate] = 'hueRotate';
|
6113 | const invert = 12900; pluginOrder[pluginOrder['invert'] = invert] = 'invert';
|
6114 | const saturate = 13000; pluginOrder[pluginOrder['saturate'] = saturate] = 'saturate';
|
6115 | const sepia = 13100; pluginOrder[pluginOrder['sepia'] = sepia] = 'sepia';
|
6116 | const backdropFilter = 13200; pluginOrder[pluginOrder['backdropFilter'] = backdropFilter] = 'backdropFilter';
|
6117 | const backdropBlur = 13300; pluginOrder[pluginOrder['backdropBlur'] = backdropBlur] = 'backdropBlur';
|
6118 | const backdropBrightness = 13400; pluginOrder[pluginOrder['backdropBrightness'] = backdropBrightness] = 'backdropBrightness';
|
6119 | const backdropContrast = 13500; pluginOrder[pluginOrder['backdropContrast'] = backdropContrast] = 'backdropContrast';
|
6120 | const backdropGrayscale = 13600; pluginOrder[pluginOrder['backdropGrayscale'] = backdropGrayscale] = 'backdropGrayscale';
|
6121 | const backdropHueRotate = 13700; pluginOrder[pluginOrder['backdropHueRotate'] = backdropHueRotate] = 'backdropHueRotate';
|
6122 | const backdropInvert = 13800; pluginOrder[pluginOrder['backdropInvert'] = backdropInvert] = 'backdropInvert';
|
6123 | const backdropOpacity = 13900; pluginOrder[pluginOrder['backdropOpacity'] = backdropOpacity] = 'backdropOpacity';
|
6124 | const backdropSaturate = 14000; pluginOrder[pluginOrder['backdropSaturate'] = backdropSaturate] = 'backdropSaturate';
|
6125 | const backdropSepia = 14100; pluginOrder[pluginOrder['backdropSepia'] = backdropSepia] = 'backdropSepia';
|
6126 | })(pluginOrder || (pluginOrder = {}));
|
6127 |
|
6128 | function _nullishCoalesce$2(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
6129 |
|
6130 |
|
6131 |
|
6132 | function isNumberLead(i) {
|
6133 | return /^\d/.test(i) ? i : undefined;
|
6134 | }
|
6135 |
|
6136 | function notNumberLead(i) {
|
6137 | return /^\d/.test(i) ? undefined : i;
|
6138 | }
|
6139 |
|
6140 |
|
6141 | function container(utility, { theme }) {
|
6142 | if (utility.raw === 'container') {
|
6143 | const className = utility.class;
|
6144 | const baseStyle = new Container(utility.class, new Property('width', '100%'));
|
6145 | const paddingDefault = toType(theme('container.padding'), 'string') ? toType(theme('container.padding'), 'string') : toType(theme('container.padding.DEFAULT'), 'string');
|
6146 |
|
6147 | if (paddingDefault) {
|
6148 | baseStyle.add(new Property('padding-left', paddingDefault));
|
6149 | baseStyle.add(new Property('padding-right', paddingDefault));
|
6150 | }
|
6151 |
|
6152 | const center = theme('container.center');
|
6153 |
|
6154 | if (center && typeof center === 'boolean'){
|
6155 | baseStyle.add(new Property(['margin-left', 'margin-right'], 'auto'));
|
6156 | }
|
6157 |
|
6158 | const output = [baseStyle];
|
6159 | const screens = toType(theme('container.screens', theme('screens')), 'object');
|
6160 |
|
6161 | for (const [screen, size] of Object.entries(screens)) {
|
6162 | if (!isString(size)) continue;
|
6163 | const props = [new Property('max-width', `${size}`)];
|
6164 | const padding = theme(`container.padding.${screen}`);
|
6165 | if (padding && typeof padding === 'string') {
|
6166 | props.push(new Property('padding-left', padding));
|
6167 | props.push(new Property('padding-right', padding));
|
6168 | }
|
6169 | output.push(new Container(className, props).atRule(`@media (min-width: ${size})`));
|
6170 | }
|
6171 |
|
6172 | output.forEach(style => style.updateMeta('utilities', 'container', pluginOrder.container, 0, true));
|
6173 |
|
6174 | return output;
|
6175 | }
|
6176 | }
|
6177 |
|
6178 |
|
6179 | function objectPosition(utility, { theme }) {
|
6180 | return _optionalChain$1([utility, 'access', _ => _.handler
|
6181 | , 'access', _2 => _2.handleBody, 'call', _3 => _3(theme('objectPosition'))
|
6182 | , 'access', _4 => _4.createProperty, 'call', _5 => _5(['-o-object-position', 'object-position'])
|
6183 | , 'optionalAccess', _6 => _6.updateMeta, 'call', _7 => _7('utilities', 'objectPosition', pluginOrder.objectPosition, 0, true)]);
|
6184 | }
|
6185 |
|
6186 |
|
6187 | function inset(utility, { theme }) {
|
6188 | return utility.handler
|
6189 | .handleStatic(theme('inset'))
|
6190 | .handleSquareBrackets()
|
6191 | .handleSpacing()
|
6192 | .handleFraction()
|
6193 | .handleSize()
|
6194 | .handleNegative()
|
6195 | .handleVariable()
|
6196 | .callback(value => {
|
6197 | switch (utility.identifier) {
|
6198 | case 'top':
|
6199 | case 'right':
|
6200 | case 'bottom':
|
6201 | case 'left':
|
6202 | return new Property(utility.identifier, value).updateMeta('utilities', 'inset', pluginOrder.inset, 4, true);
|
6203 | case 'inset':
|
6204 | if (utility.raw.match(/^-?inset-x/)) return new Property(['right', 'left'], value).updateMeta('utilities', 'inset', pluginOrder.inset, 3, true);
|
6205 | if (utility.raw.match(/^-?inset-y/)) return new Property(['top', 'bottom'], value).updateMeta('utilities', 'inset', pluginOrder.inset, 2, true);
|
6206 | return new Property(['top', 'right', 'bottom', 'left'], value).updateMeta('utilities', 'inset', pluginOrder.inset, 1, true);
|
6207 | }
|
6208 | });
|
6209 | }
|
6210 |
|
6211 |
|
6212 | function zIndex(utility, { theme }) {
|
6213 | return _optionalChain$1([utility, 'access', _8 => _8.handler
|
6214 | , 'access', _9 => _9.handleStatic, 'call', _10 => _10(theme('zIndex'))
|
6215 | , 'access', _11 => _11.handleNumber, 'call', _12 => _12(0, 99999, 'int')
|
6216 | , 'access', _13 => _13.handleNegative, 'call', _14 => _14()
|
6217 | , 'access', _15 => _15.handleVariable, 'call', _16 => _16()
|
6218 | , 'access', _17 => _17.createProperty, 'call', _18 => _18('z-index')
|
6219 | , 'optionalAccess', _19 => _19.updateMeta, 'call', _20 => _20('utilities', 'zIndex', pluginOrder.zIndex, 0, true)]);
|
6220 | }
|
6221 |
|
6222 |
|
6223 |
|
6224 |
|
6225 | function flex(utility, { theme }) {
|
6226 | const className = utility.raw;
|
6227 | if (className.startsWith('flex-grow')) {
|
6228 | const map = toType(theme('flexGrow'), 'object') ;
|
6229 | const amount = className.replace(/flex-grow-?/, '') || 'DEFAULT';
|
6230 | if (Object.keys(map).includes(amount)) return new Property(['-webkit-box-flex', '-ms-flex-positive', '-webkit-flex-grow', 'flex-grow'], map[amount]).toStyle(utility.class).updateMeta('utilities', 'flexGrow', pluginOrder.flexGrow, 0, true);
|
6231 | return _optionalChain$1([utility, 'access', _21 => _21.handler, 'access', _22 => _22.handleSquareBrackets, 'call', _23 => _23(), 'access', _24 => _24.createProperty, 'call', _25 => _25(['-webkit-box-flex', '-ms-flex-positive', '-webkit-flex-grow', 'flex-grow']), 'optionalAccess', _26 => _26.updateMeta, 'call', _27 => _27('utilities', 'flexGrow', pluginOrder.flexGrow, 1, true)]);
|
6232 | } else if (className.startsWith('flex-shrink')) {
|
6233 | const map = toType(theme('flexShrink'), 'object') ;
|
6234 | const amount = className.replace(/flex-shrink-?/, '') || 'DEFAULT';
|
6235 | if (Object.keys(map).includes(amount)) return new Property(['-ms-flex-negative', '-webkit-flex-shrink', 'flex-shrink'], map[amount]).toStyle(utility.class).updateMeta('utilities', 'flexShrink', pluginOrder.flexShrink, 0, true);
|
6236 | return _optionalChain$1([utility, 'access', _28 => _28.handler, 'access', _29 => _29.handleSquareBrackets, 'call', _30 => _30(), 'access', _31 => _31.createProperty, 'call', _32 => _32(['-ms-flex-negative', '-webkit-flex-shrink', 'flex-shrink']), 'optionalAccess', _33 => _33.updateMeta, 'call', _34 => _34('utilities', 'flexShrink', pluginOrder.flexShrink, 1, true)]);
|
6237 | } else {
|
6238 | return _optionalChain$1([utility, 'access', _35 => _35.handler, 'access', _36 => _36.handleStatic, 'call', _37 => _37(theme('flex')), 'access', _38 => _38.handleSquareBrackets, 'call', _39 => _39(), 'access', _40 => _40.createStyle, 'call', _41 => _41(utility.class, value => {
|
6239 | value = value.trim();
|
6240 | return [
|
6241 | new Property('-webkit-box-flex', value.startsWith('0') || value === 'none' ? '0' : '1'),
|
6242 | new Property(['-ms-flex', '-webkit-flex', 'flex'], value),
|
6243 | ];
|
6244 | }), 'optionalAccess', _42 => _42.updateMeta, 'call', _43 => _43('utilities', 'flex', pluginOrder.flex, 0, true)]);
|
6245 | }
|
6246 | }
|
6247 |
|
6248 |
|
6249 | function order(utility, { theme }) {
|
6250 | return _optionalChain$1([utility, 'access', _44 => _44.handler
|
6251 | , 'access', _45 => _45.handleStatic, 'call', _46 => _46(theme('order'))
|
6252 | , 'access', _47 => _47.handleNumber, 'call', _48 => _48(1, 9999, 'int')
|
6253 | , 'access', _49 => _49.handleNegative, 'call', _50 => _50()
|
6254 | , 'access', _51 => _51.handleVariable, 'call', _52 => _52()
|
6255 | , 'access', _53 => _53.createStyle, 'call', _54 => _54(utility.class, (value) => [
|
6256 | new Property('-webkit-box-ordinal-group', value.includes('var') ? `calc(${value}+1)` : (parseInt(value) + 1).toString()),
|
6257 | new Property(['-webkit-order', '-ms-flex-order', 'order'], value),
|
6258 | ])
|
6259 | , 'optionalAccess', _55 => _55.updateMeta, 'call', _56 => _56('utilities', 'order', pluginOrder.order, utility.raw.charAt(0) === '-' ? 2 : 1, true)]);
|
6260 | }
|
6261 |
|
6262 |
|
6263 |
|
6264 | function gridTemplate(utility, { theme }) {
|
6265 | const type = utility.raw.match(/^grid-rows-/) ? 'rows' : utility.raw.match(/^grid-cols-/) ? 'columns' : undefined;
|
6266 | if (!type) return;
|
6267 | const group = type === 'rows'? 'gridTemplateRows' : 'gridTemplateColumns';
|
6268 | return _optionalChain$1([utility, 'access', _57 => _57.handler
|
6269 | , 'access', _58 => _58.handleStatic, 'call', _59 => _59(theme(group))
|
6270 | , 'access', _60 => _60.handleSquareBrackets, 'call', _61 => _61(i => i.replace(/\(.*?\)|,/g, (r) => r === ',' ? ' ' : r ))
|
6271 | , 'access', _62 => _62.createProperty, 'call', _63 => _63(`grid-template-${type}`, (value) => value === 'none' ? 'none' : value)
|
6272 | , 'optionalAccess', _64 => _64.updateMeta, 'call', _65 => _65('utilities', group, pluginOrder[group], 1, true)])
|
6273 | || _optionalChain$1([utility, 'access', _66 => _66.handler
|
6274 | , 'access', _67 => _67.handleNumber, 'call', _68 => _68(1, undefined, 'int')
|
6275 | , 'access', _69 => _69.handleVariable, 'call', _70 => _70()
|
6276 | , 'access', _71 => _71.createProperty, 'call', _72 => _72(`grid-template-${type}`, (value) => `repeat(${value}, minmax(0, 1fr))`)
|
6277 | , 'optionalAccess', _73 => _73.updateMeta, 'call', _74 => _74('utilities', group, pluginOrder[group], 2, true)]);
|
6278 | }
|
6279 |
|
6280 |
|
6281 |
|
6282 |
|
6283 | function gridColumn(utility, { theme }) {
|
6284 | const body = utility.body;
|
6285 |
|
6286 | const spans = toType(theme('gridColumn'), 'object') ;
|
6287 | if (Object.keys(spans).includes(body)) return new Property(['-ms-grid-column-span', 'grid-column'], spans[body]).updateMeta('utilities', 'gridColumn', pluginOrder.gridColumn, 1, true);
|
6288 | if (utility.raw.startsWith('col-span')) {
|
6289 | return _optionalChain$1([utility, 'access', _75 => _75.handler
|
6290 | , 'access', _76 => _76.handleNumber, 'call', _77 => _77(1, undefined, 'int')
|
6291 | , 'access', _78 => _78.handleVariable, 'call', _79 => _79()
|
6292 | , 'access', _80 => _80.createProperty, 'call', _81 => _81(['-ms-grid-column-span', 'grid-column'], (value) => `span ${value} / span ${value}`)
|
6293 | , 'optionalAccess', _82 => _82.updateMeta, 'call', _83 => _83('utilities', 'gridColumn', pluginOrder.gridColumn, 1, true)]);
|
6294 | }
|
6295 |
|
6296 | if (utility.raw.startsWith('col-end')) {
|
6297 | return _optionalChain$1([utility, 'access', _84 => _84.handler
|
6298 | , 'access', _85 => _85.handleStatic, 'call', _86 => _86(theme('gridColumnEnd'))
|
6299 | , 'access', _87 => _87.handleSquareBrackets, 'call', _88 => _88()
|
6300 | , 'access', _89 => _89.handleNumber, 'call', _90 => _90(1, undefined, 'int')
|
6301 | , 'access', _91 => _91.handleVariable, 'call', _92 => _92()
|
6302 | , 'access', _93 => _93.createProperty, 'call', _94 => _94('grid-column-end')
|
6303 | , 'optionalAccess', _95 => _95.updateMeta, 'call', _96 => _96('utilities', 'gridColumnEnd', pluginOrder.gridColumnEnd, 1, true)]);
|
6304 | }
|
6305 |
|
6306 | if (utility.raw.startsWith('col-start')) {
|
6307 | return _optionalChain$1([utility, 'access', _97 => _97.handler
|
6308 | , 'access', _98 => _98.handleStatic, 'call', _99 => _99(theme('gridColumnStart'))
|
6309 | , 'access', _100 => _100.handleSquareBrackets, 'call', _101 => _101()
|
6310 | , 'access', _102 => _102.handleNumber, 'call', _103 => _103(1, undefined, 'int')
|
6311 | , 'access', _104 => _104.handleVariable, 'call', _105 => _105()
|
6312 | , 'access', _106 => _106.createProperty, 'call', _107 => _107('grid-column-start')
|
6313 | , 'optionalAccess', _108 => _108.updateMeta, 'call', _109 => _109('utilities', 'gridColumnStart', pluginOrder.gridColumnStart, 1, true)]);
|
6314 | }
|
6315 | return _optionalChain$1([utility, 'access', _110 => _110.handler
|
6316 | , 'access', _111 => _111.handleSquareBrackets, 'call', _112 => _112()
|
6317 | , 'access', _113 => _113.createProperty, 'call', _114 => _114(['-ms-grid-column-span', 'grid-column'], (value) => `span ${value} / span ${value}`)
|
6318 | , 'optionalAccess', _115 => _115.updateMeta, 'call', _116 => _116('utilities', 'gridColumn', pluginOrder.gridColumn, 1, true)]);
|
6319 | }
|
6320 |
|
6321 |
|
6322 |
|
6323 |
|
6324 | function gridRow(utility, { theme }) {
|
6325 | const body = utility.body;
|
6326 |
|
6327 | const spans = toType(theme('gridRow'), 'object') ;
|
6328 | if (Object.keys(spans).includes(body)) return new Property(['-ms-grid-row-span', 'grid-row'], spans[body]).updateMeta('utilities', 'gridRow', pluginOrder.gridRow, 1, true);
|
6329 | if (utility.raw.startsWith('row-span')) {
|
6330 | return _optionalChain$1([utility, 'access', _117 => _117.handler
|
6331 | , 'access', _118 => _118.handleNumber, 'call', _119 => _119(1, undefined, 'int')
|
6332 | , 'access', _120 => _120.handleVariable, 'call', _121 => _121()
|
6333 | , 'access', _122 => _122.createProperty, 'call', _123 => _123(['-ms-grid-row-span', 'grid-row'], (value) => `span ${value} / span ${value}`)
|
6334 | , 'optionalAccess', _124 => _124.updateMeta, 'call', _125 => _125('utilities', 'gridRow', pluginOrder.gridRow, 2, true)]);
|
6335 | }
|
6336 |
|
6337 | if (utility.raw.startsWith('row-end')) {
|
6338 | return _optionalChain$1([utility, 'access', _126 => _126.handler
|
6339 | , 'access', _127 => _127.handleStatic, 'call', _128 => _128(theme('gridRowEnd'))
|
6340 | , 'access', _129 => _129.handleSquareBrackets, 'call', _130 => _130()
|
6341 | , 'access', _131 => _131.handleNumber, 'call', _132 => _132(1, undefined, 'int')
|
6342 | , 'access', _133 => _133.handleVariable, 'call', _134 => _134()
|
6343 | , 'access', _135 => _135.createProperty, 'call', _136 => _136('grid-row-end')
|
6344 | , 'optionalAccess', _137 => _137.updateMeta, 'call', _138 => _138('utilities', 'gridRowEnd', pluginOrder.gridRowEnd, 1, true)]);
|
6345 | }
|
6346 |
|
6347 | if (utility.raw.startsWith('row-start')) {
|
6348 | return _optionalChain$1([utility, 'access', _139 => _139.handler
|
6349 | , 'access', _140 => _140.handleStatic, 'call', _141 => _141(theme('gridRowStart'))
|
6350 | , 'access', _142 => _142.handleSquareBrackets, 'call', _143 => _143()
|
6351 | , 'access', _144 => _144.handleNumber, 'call', _145 => _145(1, undefined, 'int')
|
6352 | , 'access', _146 => _146.handleVariable, 'call', _147 => _147()
|
6353 | , 'access', _148 => _148.createProperty, 'call', _149 => _149('grid-row-start')
|
6354 | , 'optionalAccess', _150 => _150.updateMeta, 'call', _151 => _151('utilities', 'gridRowStart', pluginOrder.gridRowStart, 1, true)]);
|
6355 | }
|
6356 | return _optionalChain$1([utility, 'access', _152 => _152.handler
|
6357 | , 'access', _153 => _153.handleSquareBrackets, 'call', _154 => _154()
|
6358 | , 'access', _155 => _155.createProperty, 'call', _156 => _156(['-ms-grid-row-span', 'grid-row'], (value) => `span ${value} / span ${value}`)
|
6359 | , 'optionalAccess', _157 => _157.updateMeta, 'call', _158 => _158('utilities', 'gridRow', pluginOrder.gridRow, 2, true)]);
|
6360 | }
|
6361 |
|
6362 |
|
6363 |
|
6364 | function gridAuto(utility, { theme }) {
|
6365 | const type = utility.raw.startsWith('auto-cols') ? 'columns' : utility.raw.startsWith('auto-rows') ? 'rows' : undefined;
|
6366 | if (!type) return;
|
6367 | const group = type === 'columns' ? 'gridAutoColumns' : 'gridAutoRows';
|
6368 | const value = utility.handler.handleStatic(theme(group)).value;
|
6369 | if (value) {
|
6370 | const prefixer = minMaxContent(value);
|
6371 | if (typeof prefixer === 'string') return new Property(`grid-auto-${type}`, prefixer).updateMeta('utilities', group, pluginOrder[group], 1, true);
|
6372 | return new Style(utility.class, prefixer.map((i) => new Property(`grid-auto-${type}`, i))).updateMeta('utilities', group, pluginOrder[group], 2, true);
|
6373 | }
|
6374 | }
|
6375 |
|
6376 |
|
6377 | function gap(utility, { theme, config }) {
|
6378 | return utility.handler
|
6379 | .handleStatic(theme('gap'))
|
6380 | .handleSquareBrackets()
|
6381 | .handleSpacing()
|
6382 | .handleSize()
|
6383 | .handleVariable()
|
6384 | .callback(value => {
|
6385 | if (utility.raw.match(/^gap-x-/)) return new Property(config('prefixer') ? ['-webkit-column-gap', '-moz-column-gap', 'grid-column-gap', 'column-gap'] : 'column-gap', value).updateMeta('utilities', 'gap', pluginOrder.gap, 2, true);
|
6386 | if (utility.raw.match(/^gap-y-/)) return new Property(config('prefixer') ? ['-webkit-row-gap', '-moz-row-gap', 'grid-row-gap', 'row-gap'] : 'row-gap', value).updateMeta('utilities', 'gap', pluginOrder.gap, 3, true);
|
6387 | return new Property(config('prefixer') ? ['grid-gap', 'gap'] : 'gap', value).updateMeta('utilities', 'gap', pluginOrder.gap, 1, true);
|
6388 | });
|
6389 | }
|
6390 |
|
6391 |
|
6392 | function padding(utility, { theme }) {
|
6393 | return utility.handler
|
6394 | .handleStatic(theme('padding'))
|
6395 | .handleSquareBrackets()
|
6396 | .handleSpacing()
|
6397 | .handleFraction()
|
6398 | .handleSize()
|
6399 | .handleVariable()
|
6400 | .callback(value => {
|
6401 | const directions = expandDirection(utility.identifier.substring(1), false);
|
6402 | if (directions) {
|
6403 | if (directions[0] === '*') return new Property('padding', value).updateMeta('utilities', 'padding', pluginOrder.padding, -4, true);
|
6404 | return new Property(directions.map((i) => `padding-${i}`), value).updateMeta('utilities', 'padding', pluginOrder.padding, -directions.length, true);
|
6405 | }
|
6406 | });
|
6407 | }
|
6408 |
|
6409 |
|
6410 | function margin(utility, { theme }) {
|
6411 | return utility.handler
|
6412 | .handleStatic(theme('margin'))
|
6413 | .handleSquareBrackets()
|
6414 | .handleSpacing()
|
6415 | .handleFraction()
|
6416 | .handleSize()
|
6417 | .handleNegative()
|
6418 | .handleVariable()
|
6419 | .callback(value => {
|
6420 | const directions = expandDirection(utility.identifier.substring(1), false);
|
6421 | if (directions) {
|
6422 | if (directions[0] === '*') return new Property('margin', value).updateMeta('utilities', 'margin', pluginOrder.margin, -4, true);
|
6423 | return new Property(directions.map((i) => `margin-${i}`), value).updateMeta('utilities', 'margin', pluginOrder.margin, -directions.length, true);
|
6424 | }
|
6425 | });
|
6426 | }
|
6427 |
|
6428 |
|
6429 | function space(utility, { theme }) {
|
6430 | if (utility.raw === 'space-x-reverse') {
|
6431 | return new Style(utility.class, [
|
6432 | new Property('--tw-space-x-reverse', '1'),
|
6433 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'space', pluginOrder.space, 6, true);
|
6434 | }
|
6435 | if (utility.raw === 'space-y-reverse') {
|
6436 | return new Style(utility.class, [
|
6437 | new Property('--tw-space-y-reverse', '1'),
|
6438 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'space', pluginOrder.space, 5, true);
|
6439 | }
|
6440 | return utility.handler
|
6441 | .handleStatic(theme('space'))
|
6442 | .handleSquareBrackets()
|
6443 | .handleSpacing()
|
6444 | .handleSize()
|
6445 | .handleNegative()
|
6446 | .handleVariable()
|
6447 | .callback(value => {
|
6448 | if (utility.raw.match(/^-?space-x-/)) {
|
6449 | return new Style(utility.class, [
|
6450 | new Property('--tw-space-x-reverse', '0'),
|
6451 | new Property('margin-right', `calc(${value} * var(--tw-space-x-reverse))`),
|
6452 | new Property('margin-left', `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`),
|
6453 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'space', pluginOrder.space, (utility.raw.charAt(0) === '-' ? 4 : 2), true);
|
6454 | }
|
6455 | if (utility.raw.match(/^-?space-y-/)) {
|
6456 | return new Style(utility.class, [
|
6457 | new Property('--tw-space-y-reverse', '0'),
|
6458 | new Property('margin-top', `calc(${value} * calc(1 - var(--tw-space-y-reverse)))`),
|
6459 | new Property('margin-bottom', `calc(${value} * var(--tw-space-y-reverse))`),
|
6460 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'space', pluginOrder.space, (utility.raw.charAt(0) === '-' ? 3 : 1), true);
|
6461 | }
|
6462 | });
|
6463 | }
|
6464 |
|
6465 |
|
6466 |
|
6467 | function size(utility, { theme }) {
|
6468 | const name = utility.identifier === 'w' ? 'width' : 'height';
|
6469 | const body = utility.body;
|
6470 | const sizes = toType(theme(name), 'object') ;
|
6471 |
|
6472 | if (Object.keys(sizes).includes(body)) {
|
6473 | const value = sizes[body];
|
6474 | if (value === 'min-content') {
|
6475 | return new Style(utility.class, [
|
6476 | new Property(name, '-webkit-min-content'),
|
6477 | new Property(name, '-moz-min-content'),
|
6478 | new Property(name, 'min-content'),
|
6479 | ]).updateMeta('utilities', name, pluginOrder[name], 2, true);
|
6480 | }
|
6481 | if (value === 'max-content') {
|
6482 | return new Style(utility.class, [
|
6483 | new Property(name, '-webkit-max-content'),
|
6484 | new Property(name, '-moz-max-content'),
|
6485 | new Property(name, 'max-content'),
|
6486 | ]).updateMeta('utilities', name, pluginOrder[name], 3, true);
|
6487 | }
|
6488 | return new Style(utility.class, new Property(name, value)).updateMeta('utilities', name, pluginOrder[name], 1, true);
|
6489 | }
|
6490 | return _optionalChain$1([utility, 'access', _159 => _159.handler
|
6491 | , 'access', _160 => _160.handleSquareBrackets, 'call', _161 => _161()
|
6492 | , 'access', _162 => _162.handleSpacing, 'call', _163 => _163()
|
6493 | , 'access', _164 => _164.handleFraction, 'call', _165 => _165()
|
6494 | , 'access', _166 => _166.handleSize, 'call', _167 => _167()
|
6495 | , 'access', _168 => _168.handleNxl, 'call', _169 => _169((number) => `${(number - 3) * 8 + 48}rem`)
|
6496 | , 'access', _170 => _170.handleVariable, 'call', _171 => _171()
|
6497 | , 'access', _172 => _172.createProperty, 'call', _173 => _173(name)
|
6498 | , 'optionalAccess', _174 => _174.updateMeta, 'call', _175 => _175('utilities', name, pluginOrder[name], 4, true)]);
|
6499 | }
|
6500 |
|
6501 |
|
6502 |
|
6503 |
|
6504 |
|
6505 | function minMaxSize(utility, { theme }) {
|
6506 | if (!utility.raw.match(/^(min|max)-[w|h]-/))
|
6507 | return;
|
6508 | const body = utility.raw.replace(/^(min|max)-[w|h]-/, '');
|
6509 | const prop = utility.raw.substring(0, 5).replace('h', 'height').replace('w', 'width');
|
6510 | const group = dashToCamel(prop) ;
|
6511 | const sizes = toType(theme(group), 'object') ;
|
6512 |
|
6513 | if (Object.keys(sizes).includes(body)) {
|
6514 | const value = sizes[body];
|
6515 | if (value === 'min-content') {
|
6516 | return new Style(utility.class, [
|
6517 | new Property(prop, '-webkit-min-content'),
|
6518 | new Property(prop, '-moz-min-content'),
|
6519 | new Property(prop, 'min-content'),
|
6520 | ]).updateMeta('utilities', group, pluginOrder[group], 2, true);
|
6521 | }
|
6522 | if (value === 'max-content') {
|
6523 | return new Style(utility.class, [
|
6524 | new Property(prop, '-webkit-max-content'),
|
6525 | new Property(prop, '-moz-max-content'),
|
6526 | new Property(prop, 'max-content'),
|
6527 | ]).updateMeta('utilities', group, pluginOrder[group], 3, true);
|
6528 | }
|
6529 | return new Style(utility.class, new Property(prop, value)).updateMeta('utilities', group, pluginOrder[group], 1, true);
|
6530 | }
|
6531 |
|
6532 | return _optionalChain$1([utility, 'access', _176 => _176.handler
|
6533 | , 'access', _177 => _177.handleSquareBrackets, 'call', _178 => _178()
|
6534 | , 'access', _179 => _179.handleSpacing, 'call', _180 => _180()
|
6535 | , 'access', _181 => _181.handleFraction, 'call', _182 => _182()
|
6536 | , 'access', _183 => _183.handleSize, 'call', _184 => _184()
|
6537 | , 'access', _185 => _185.handleNxl, 'call', _186 => _186((number) => `${(number - 3) * 8 + 48}rem`)
|
6538 | , 'access', _187 => _187.handleVariable, 'call', _188 => _188()
|
6539 | , 'access', _189 => _189.createProperty, 'call', _190 => _190(prop)
|
6540 | , 'optionalAccess', _191 => _191.updateMeta, 'call', _192 => _192('utilities', group, pluginOrder[group], 4, true)]);
|
6541 | }
|
6542 |
|
6543 |
|
6544 |
|
6545 |
|
6546 |
|
6547 |
|
6548 | function text(utility, { theme }) {
|
6549 |
|
6550 | if (utility.raw.startsWith('text-opacity')) {
|
6551 | return _optionalChain$1([utility, 'access', _193 => _193.handler
|
6552 | , 'access', _194 => _194.handleStatic, 'call', _195 => _195(theme('textOpacity'))
|
6553 | , 'access', _196 => _196.handleNumber, 'call', _197 => _197(0, 100, 'int', (number) => (number / 100).toString())
|
6554 | , 'access', _198 => _198.handleVariable, 'call', _199 => _199()
|
6555 | , 'access', _200 => _200.createProperty, 'call', _201 => _201('--tw-text-opacity')
|
6556 | , 'optionalAccess', _202 => _202.updateMeta, 'call', _203 => _203('utilities', 'textOpacity', pluginOrder.textOpacity, 1, true)]);
|
6557 | }
|
6558 | if (utility.raw.startsWith('text-shadow')) {
|
6559 | return _optionalChain$1([(utility.raw === 'text-shadow'
|
6560 | ? new Property('text-shadow', theme('textShadow.DEFAULT', '0px 0px 1px rgb(0 0 0 / 20%), 0px 0px 1px rgb(1 0 5 / 10%)') )
|
6561 | : utility.handler
|
6562 | .handleStatic(theme('textShadow'))
|
6563 | .createProperty('text-shadow')
|
6564 | ), 'optionalAccess', _204 => _204.updateMeta, 'call', _205 => _205('utilities', 'textShadow', pluginOrder.textShadow, 1, true)]);
|
6565 | }
|
6566 | if (utility.raw.startsWith('text-stroke')) {
|
6567 | if (utility.raw === 'text-stroke') return new Style('text-stroke', [
|
6568 | new Property('-webkit-text-stroke-color', theme('textStrokeColor.DEFAULT', '#e4e4e7') ),
|
6569 | new Property('-webkit-text-stroke-width', theme('textStrokeWidth.DEFAULT', 'medium') ),
|
6570 | ]).updateMeta('utilities', 'textStrokeColor', pluginOrder.textStrokeColor, 1, true);
|
6571 |
|
6572 | if (utility.raw.startsWith('text-stroke-opacity')) {
|
6573 | return _optionalChain$1([utility, 'access', _206 => _206.handler
|
6574 | , 'access', _207 => _207.handleStatic, 'call', _208 => _208(theme('opacity'))
|
6575 | , 'access', _209 => _209.handleNumber, 'call', _210 => _210(0, 100, 'int', (number) => (number / 100).toString())
|
6576 | , 'access', _211 => _211.handleVariable, 'call', _212 => _212()
|
6577 | , 'access', _213 => _213.createProperty, 'call', _214 => _214('--tw-ring-offset-opacity')
|
6578 | , 'optionalAccess', _215 => _215.updateMeta, 'call', _216 => _216('utilities', 'textStrokeColor', pluginOrder.textStrokeColor, 3, true)]);
|
6579 | }
|
6580 |
|
6581 | return _optionalChain$1([utility, 'access', _217 => _217.clone, 'call', _218 => _218('textStroke' + utility.raw.slice(11)), 'access', _219 => _219.handler
|
6582 | , 'access', _220 => _220.handleColor, 'call', _221 => _221(theme('textStrokeColor'))
|
6583 | , 'access', _222 => _222.handleOpacity, 'call', _223 => _223(theme('opacity'))
|
6584 | , 'access', _224 => _224.handleVariable, 'call', _225 => _225()
|
6585 | , 'access', _226 => _226.createColorStyle, 'call', _227 => _227(utility.class, '-webkit-text-stroke-color', '--tw-text-stroke-opacity')
|
6586 | , 'optionalAccess', _228 => _228.updateMeta, 'call', _229 => _229('utilities', 'textStrokeColor', pluginOrder.textStrokeColor, 2, true)])
|
6587 | || _optionalChain$1([utility, 'access', _230 => _230.handler
|
6588 | , 'access', _231 => _231.handleStatic, 'call', _232 => _232(theme('textStrokeWidth'))
|
6589 | , 'access', _233 => _233.handleNumber, 'call', _234 => _234(0, undefined, 'int', (number) => `${number}px`)
|
6590 | , 'access', _235 => _235.handleSize, 'call', _236 => _236()
|
6591 | , 'access', _237 => _237.createProperty, 'call', _238 => _238('-webkit-text-stroke-width')
|
6592 | , 'optionalAccess', _239 => _239.updateMeta, 'call', _240 => _240('utilities', 'textStrokeWidth', pluginOrder.textStrokeWidth, 1, true)]);
|
6593 | }
|
6594 |
|
6595 | const textColor = _optionalChain$1([utility, 'access', _241 => _241.handler
|
6596 | , 'access', _242 => _242.handleColor, 'call', _243 => _243(theme('textColor'))
|
6597 | , 'access', _244 => _244.handleOpacity, 'call', _245 => _245(theme('textOpacity'))
|
6598 | , 'access', _246 => _246.handleSquareBrackets, 'call', _247 => _247(notNumberLead)
|
6599 | , 'access', _248 => _248.handleVariable, 'call', _249 => _249()
|
6600 | , 'access', _250 => _250.createColorStyle, 'call', _251 => _251(utility.class, 'color', '--tw-text-opacity')
|
6601 | , 'optionalAccess', _252 => _252.updateMeta, 'call', _253 => _253('utilities', 'textColor', pluginOrder.textColor, 0, true)]);
|
6602 | if (textColor) return textColor;
|
6603 |
|
6604 |
|
6605 | const amount = utility.amount;
|
6606 | const fontSizes = toType(theme('fontSize'), 'object') ;
|
6607 | if (Object.keys(fontSizes).includes(amount)) return new Style(utility.class, generateFontSize(fontSizes[amount])).updateMeta('utilities', 'fontSize', pluginOrder.fontSize, 1, true);
|
6608 | let value = utility.handler
|
6609 | .handleSquareBrackets(isNumberLead)
|
6610 | .handleNxl((number) => `${number}rem`)
|
6611 | .handleSize()
|
6612 | .value;
|
6613 | if (utility.raw.startsWith('text-size-$')) value = utility.handler.handleVariable().value;
|
6614 | if (value) return new Style(utility.class, [ new Property('font-size', value), new Property('line-height', '1') ]).updateMeta('utilities', 'fontSize', pluginOrder.fontSize, 2, true);
|
6615 | }
|
6616 |
|
6617 |
|
6618 |
|
6619 | function font(utility, { theme }) {
|
6620 | const fonts = theme('fontFamily') ;
|
6621 | const map = {};
|
6622 | for (const [key, value] of Object.entries(fonts)) {
|
6623 | map[key] = Array.isArray(value)? value.join(',') : value;
|
6624 | }
|
6625 | return (
|
6626 | _optionalChain$1([utility, 'access', _254 => _254.handler
|
6627 | , 'access', _255 => _255.handleStatic, 'call', _256 => _256(map)
|
6628 | , 'access', _257 => _257.createProperty, 'call', _258 => _258('font-family')
|
6629 | , 'optionalAccess', _259 => _259.updateMeta, 'call', _260 => _260('utilities', 'fontFamily', pluginOrder.fontFamily, 1, true)])
|
6630 | || _optionalChain$1([utility, 'access', _261 => _261.handler
|
6631 | , 'access', _262 => _262.handleStatic, 'call', _263 => _263(theme('fontWeight'))
|
6632 | , 'access', _264 => _264.handleNumber, 'call', _265 => _265(0, 900, 'int')
|
6633 | , 'access', _266 => _266.handleVariable, 'call', _267 => _267()
|
6634 | , 'access', _268 => _268.createProperty, 'call', _269 => _269('font-weight')
|
6635 | , 'optionalAccess', _270 => _270.updateMeta, 'call', _271 => _271('utilities', 'fontWeight', pluginOrder.fontWeight, 1, true)])
|
6636 | );
|
6637 | }
|
6638 |
|
6639 |
|
6640 | function letterSpacing(utility, { theme }) {
|
6641 | return _optionalChain$1([utility, 'access', _272 => _272.handler
|
6642 | , 'access', _273 => _273.handleStatic, 'call', _274 => _274(theme('letterSpacing'))
|
6643 | , 'access', _275 => _275.handleSquareBrackets, 'call', _276 => _276()
|
6644 | , 'access', _277 => _277.handleSize, 'call', _278 => _278()
|
6645 | , 'access', _279 => _279.handleNegative, 'call', _280 => _280()
|
6646 | , 'access', _281 => _281.handleVariable, 'call', _282 => _282()
|
6647 | , 'access', _283 => _283.createProperty, 'call', _284 => _284('letter-spacing')
|
6648 | , 'optionalAccess', _285 => _285.updateMeta, 'call', _286 => _286('utilities', 'letterSpacing', pluginOrder.letterSpacing, 1, true)]);
|
6649 | }
|
6650 |
|
6651 |
|
6652 | function textDecoration(utility, { theme }) {
|
6653 |
|
6654 | if (utility.raw.startsWith('underline-opacity')) {
|
6655 | return _optionalChain$1([utility, 'access', _287 => _287.handler
|
6656 | , 'access', _288 => _288.handleStatic, 'call', _289 => _289(theme('textDecorationOpacity'))
|
6657 | , 'access', _290 => _290.handleNumber, 'call', _291 => _291(0, 100, 'int', (number) => (number / 100).toString())
|
6658 | , 'access', _292 => _292.handleVariable, 'call', _293 => _293()
|
6659 | , 'access', _294 => _294.createProperty, 'call', _295 => _295('--tw-line-opacity')
|
6660 | , 'optionalAccess', _296 => _296.updateMeta, 'call', _297 => _297('utilities', 'textDecorationOpacity', pluginOrder.textDecorationOpacity, 1, true)]);
|
6661 | }
|
6662 |
|
6663 | if (utility.raw.startsWith('underline-offset')) {
|
6664 | return _optionalChain$1([utility, 'access', _298 => _298.handler
|
6665 | , 'access', _299 => _299.handleStatic, 'call', _300 => _300(theme('textDecorationOffset'))
|
6666 | , 'access', _301 => _301.handleNumber, 'call', _302 => _302(0, undefined, 'int', number => `${number}px`)
|
6667 | , 'access', _303 => _303.handleSize, 'call', _304 => _304()
|
6668 | , 'access', _305 => _305.createProperty, 'call', _306 => _306('text-underline-offset')
|
6669 | , 'optionalAccess', _307 => _307.updateMeta, 'call', _308 => _308('utilities', 'textDecorationOffset', pluginOrder.textDecorationOffset, 1, true)]);
|
6670 | }
|
6671 |
|
6672 | return _optionalChain$1([utility, 'access', _309 => _309.handler
|
6673 | , 'access', _310 => _310.handleColor, 'call', _311 => _311(theme('textDecorationColor'))
|
6674 | , 'access', _312 => _312.handleOpacity, 'call', _313 => _313(theme('opacity'))
|
6675 | , 'access', _314 => _314.handleVariable, 'call', _315 => _315()
|
6676 | , 'access', _316 => _316.createColorStyle, 'call', _317 => _317(utility.class, ['-webkit-text-decoration-color', 'text-decoration-color'], '--tw-line-opacity')
|
6677 | , 'optionalAccess', _318 => _318.updateMeta, 'call', _319 => _319('utilities', 'textDecorationColor', pluginOrder.textDecorationColor, 0, true)])
|
6678 | || _optionalChain$1([utility, 'access', _320 => _320.handler
|
6679 | , 'access', _321 => _321.handleStatic, 'call', _322 => _322(theme('textDecorationLength'))
|
6680 | , 'access', _323 => _323.handleNumber, 'call', _324 => _324(0, undefined, 'int', (number) => `${number}px`)
|
6681 | , 'access', _325 => _325.handleSize, 'call', _326 => _326()
|
6682 | , 'access', _327 => _327.createProperty, 'call', _328 => _328('text-decoration-thickness')
|
6683 | , 'optionalAccess', _329 => _329.updateMeta, 'call', _330 => _330('utilities', 'textDecorationLength', pluginOrder.textDecorationLength, 1, true)]);
|
6684 | }
|
6685 |
|
6686 |
|
6687 | function lineHeight(utility, { theme }) {
|
6688 | return _optionalChain$1([utility, 'access', _331 => _331.handler
|
6689 | , 'access', _332 => _332.handleStatic, 'call', _333 => _333(theme('lineHeight'))
|
6690 | , 'access', _334 => _334.handleNumber, 'call', _335 => _335(0, undefined, 'int', (number) => `${number * 0.25}rem`)
|
6691 | , 'access', _336 => _336.handleSquareBrackets, 'call', _337 => _337()
|
6692 | , 'access', _338 => _338.handleSize, 'call', _339 => _339()
|
6693 | , 'access', _340 => _340.handleVariable, 'call', _341 => _341()
|
6694 | , 'access', _342 => _342.createProperty, 'call', _343 => _343('line-height')
|
6695 | , 'optionalAccess', _344 => _344.updateMeta, 'call', _345 => _345('utilities', 'lineHeight', pluginOrder.lineHeight, 1, true)]);
|
6696 | }
|
6697 |
|
6698 |
|
6699 | function listStyleType(utility, { theme }) {
|
6700 | return _optionalChain$1([utility, 'access', _346 => _346.handler
|
6701 | , 'access', _347 => _347.handleBody, 'call', _348 => _348(theme('listStyleType'))
|
6702 | , 'access', _349 => _349.createProperty, 'call', _350 => _350('list-style-type')
|
6703 | , 'optionalAccess', _351 => _351.updateMeta, 'call', _352 => _352('utilities', 'listStyleType', pluginOrder.listStyleType, 1, true)]);
|
6704 | }
|
6705 |
|
6706 |
|
6707 |
|
6708 | function placeholder(utility, { theme, config }) {
|
6709 |
|
6710 | if (utility.raw.startsWith('placeholder-opacity')) {
|
6711 | return utility.handler
|
6712 | .handleStatic(theme('placeholderOpacity'))
|
6713 | .handleSquareBrackets()
|
6714 | .handleNumber(0, 100, 'int', (number) => (number / 100).toString())
|
6715 | .handleVariable()
|
6716 | .callback(value => generatePlaceholder(utility.class, new Property('--tw-placeholder-opacity', value), config('prefixer') )
|
6717 | .map(style => style.updateMeta('utilities', 'placeholderOpacity', pluginOrder.placeholderOpacity, 1, true)));
|
6718 | }
|
6719 | const color = utility.handler
|
6720 | .handleColor(theme('placeholderColor'))
|
6721 | .handleOpacity(theme('placeholderOpacity'))
|
6722 | .handleSquareBrackets()
|
6723 | .handleVariable()
|
6724 | .createColorStyle(utility.class, 'color', '--tw-placeholder-opacity');
|
6725 | if (color) return generatePlaceholder(color.selector || '', color.property, config('prefixer') ).map(i => i.updateMeta('utilities', 'placeholderColor', pluginOrder.placeholderColor, 2, true));
|
6726 | }
|
6727 |
|
6728 |
|
6729 |
|
6730 | function caret(utility, { theme }) {
|
6731 |
|
6732 | if (utility.raw.startsWith('caret-opacity')) {
|
6733 | return _optionalChain$1([utility, 'access', _353 => _353.handler
|
6734 | , 'access', _354 => _354.handleStatic, 'call', _355 => _355(theme('caretOpacity'))
|
6735 | , 'access', _356 => _356.handleNumber, 'call', _357 => _357(0, 100, 'int', (number) => (number / 100).toString())
|
6736 | , 'access', _358 => _358.handleVariable, 'call', _359 => _359()
|
6737 | , 'access', _360 => _360.createProperty, 'call', _361 => _361('--tw-caret-opacity')
|
6738 | , 'optionalAccess', _362 => _362.updateMeta, 'call', _363 => _363('utilities', 'caretOpacity', pluginOrder.caretOpacity, 1, true)]);
|
6739 | }
|
6740 | return _optionalChain$1([utility, 'access', _364 => _364.handler
|
6741 | , 'access', _365 => _365.handleColor, 'call', _366 => _366(theme('caretColor'))
|
6742 | , 'access', _367 => _367.handleOpacity, 'call', _368 => _368(theme('caretOpacity'))
|
6743 | , 'access', _369 => _369.handleVariable, 'call', _370 => _370()
|
6744 | , 'access', _371 => _371.createColorStyle, 'call', _372 => _372(utility.class, 'caret-color', '--tw-caret-opacity')
|
6745 | , 'optionalAccess', _373 => _373.updateMeta, 'call', _374 => _374('utilities', 'caretColor', pluginOrder.caretColor, 0, true)]);
|
6746 | }
|
6747 |
|
6748 |
|
6749 | function tabSize(utility, { theme }) {
|
6750 | return _optionalChain$1([utility, 'access', _375 => _375.handler
|
6751 | , 'access', _376 => _376.handleStatic, 'call', _377 => _377(theme('tabSize'))
|
6752 | , 'access', _378 => _378.handleNumber, 'call', _379 => _379(0, undefined, 'int')
|
6753 | , 'access', _380 => _380.handleSize, 'call', _381 => _381()
|
6754 | , 'access', _382 => _382.createProperty, 'call', _383 => _383(['-moz-tab-size', '-o-tab-size', 'tab-size'])
|
6755 | , 'optionalAccess', _384 => _384.updateMeta, 'call', _385 => _385('utilities', 'tabSize', pluginOrder.tabSize, 1, true)]);
|
6756 | }
|
6757 |
|
6758 |
|
6759 | function textIndent(utility, { theme }) {
|
6760 | return _optionalChain$1([utility, 'access', _386 => _386.handler
|
6761 | , 'access', _387 => _387.handleStatic, 'call', _388 => _388(theme('textIndent'))
|
6762 | , 'access', _389 => _389.handleSize, 'call', _390 => _390()
|
6763 | , 'access', _391 => _391.handleFraction, 'call', _392 => _392()
|
6764 | , 'access', _393 => _393.handleNegative, 'call', _394 => _394()
|
6765 | , 'access', _395 => _395.createProperty, 'call', _396 => _396('text-indent')
|
6766 | , 'optionalAccess', _397 => _397.updateMeta, 'call', _398 => _398('utilities', 'textIndent', pluginOrder.textIndent, 1, true)]);
|
6767 | }
|
6768 |
|
6769 |
|
6770 |
|
6771 |
|
6772 |
|
6773 |
|
6774 | function background(utility, { theme }) {
|
6775 | const body = utility.body;
|
6776 |
|
6777 | const positions = toType(theme('backgroundPosition'), 'object') ;
|
6778 | if (Object.keys(positions).includes(body)) return new Property('background-position', positions[body]).updateMeta('utilities', 'backgroundPosition', pluginOrder.backgroundPosition, 1, true);
|
6779 |
|
6780 | const sizes = toType(theme('backgroundSize'), 'object') ;
|
6781 | if (Object.keys(sizes).includes(body)) return new Property('background-size', sizes[body]).updateMeta('utilities', 'backgroundSize', pluginOrder.backgroundSize, 1, true);
|
6782 |
|
6783 | const images = toType(theme('backgroundImage'), 'object') ;
|
6784 | if (Object.keys(images).includes(body)) {
|
6785 | const prefixer = linearGradient(images[body]);
|
6786 | if (Array.isArray(prefixer)) return new Style(utility.class, prefixer.map((i) => new Property('background-image', i))).updateMeta('utilities', 'backgroundImage', pluginOrder.backgroundImage, 2, true);
|
6787 | return new Property('background-image', prefixer).updateMeta('utilities', 'backgroundImage', pluginOrder.backgroundImage, 1, true);
|
6788 | }
|
6789 |
|
6790 | if (utility.raw.startsWith('bg-opacity'))
|
6791 | return _optionalChain$1([utility, 'access', _399 => _399.handler
|
6792 | , 'access', _400 => _400.handleStatic, 'call', _401 => _401(theme('backgroundOpacity'))
|
6793 | , 'access', _402 => _402.handleSquareBrackets, 'call', _403 => _403()
|
6794 | , 'access', _404 => _404.handleNumber, 'call', _405 => _405(0, 100, 'int', (number) => (number / 100).toString())
|
6795 | , 'access', _406 => _406.handleVariable, 'call', _407 => _407()
|
6796 | , 'access', _408 => _408.createProperty, 'call', _409 => _409('--tw-bg-opacity')
|
6797 | , 'optionalAccess', _410 => _410.updateMeta, 'call', _411 => _411('utilities', 'backgroundOpacity', pluginOrder.backgroundOpacity, 1, true)]);
|
6798 |
|
6799 |
|
6800 | return _optionalChain$1([utility, 'access', _412 => _412.handler
|
6801 | , 'access', _413 => _413.handleColor, 'call', _414 => _414(theme('backgroundColor'))
|
6802 | , 'access', _415 => _415.handleOpacity, 'call', _416 => _416(theme('backgroundOpacity'))
|
6803 | , 'access', _417 => _417.handleSquareBrackets, 'call', _418 => _418(notNumberLead)
|
6804 | , 'access', _419 => _419.handleVariable, 'call', _420 => _420()
|
6805 | , 'access', _421 => _421.createColorStyle, 'call', _422 => _422(utility.class, 'background-color', '--tw-bg-opacity')
|
6806 | , 'optionalAccess', _423 => _423.updateMeta, 'call', _424 => _424('utilities', 'backgroundColor', pluginOrder.backgroundColor, 0, true)]);
|
6807 | }
|
6808 |
|
6809 |
|
6810 | function gradientColorFrom(utility, { theme }) {
|
6811 | if (utility.raw.startsWith('from-opacity')) {
|
6812 | return _optionalChain$1([utility, 'access', _425 => _425.handler
|
6813 | , 'access', _426 => _426.handleStatic, 'call', _427 => _427(theme('opacity'))
|
6814 | , 'access', _428 => _428.handleNumber, 'call', _429 => _429(0, 100, 'int', (number) => (number / 100).toString())
|
6815 | , 'access', _430 => _430.handleVariable, 'call', _431 => _431()
|
6816 | , 'access', _432 => _432.createProperty, 'call', _433 => _433('--tw-from-opacity')
|
6817 | , 'optionalAccess', _434 => _434.updateMeta, 'call', _435 => _435('utilities', 'gradientColorStops', pluginOrder.gradientColorStops, 2, true)]);
|
6818 | }
|
6819 | const handler = utility.handler.handleColor(theme('gradientColorStops')).handleOpacity(theme('opacity')).handleVariable().handleSquareBrackets();
|
6820 | if (handler.color || handler.value) {
|
6821 | return new Style(utility.class, [
|
6822 | new Property('--tw-gradient-from', handler.createColorValue('var(--tw-from-opacity, 1)')),
|
6823 | new Property('--tw-gradient-stops', 'var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0))'),
|
6824 | ]).updateMeta('utilities', 'gradientColorStops', pluginOrder.gradientColorStops, 1, true);
|
6825 | }
|
6826 | }
|
6827 |
|
6828 |
|
6829 | function gradientColorVia(utility, { theme }) {
|
6830 | if (utility.raw.startsWith('via-opacity')) {
|
6831 | return _optionalChain$1([utility, 'access', _436 => _436.handler
|
6832 | , 'access', _437 => _437.handleStatic, 'call', _438 => _438(theme('opacity'))
|
6833 | , 'access', _439 => _439.handleNumber, 'call', _440 => _440(0, 100, 'int', (number) => (number / 100).toString())
|
6834 | , 'access', _441 => _441.handleVariable, 'call', _442 => _442()
|
6835 | , 'access', _443 => _443.createProperty, 'call', _444 => _444('--tw-via-opacity')
|
6836 | , 'optionalAccess', _445 => _445.updateMeta, 'call', _446 => _446('utilities', 'gradientColorStops', pluginOrder.gradientColorStops, 4, true)]);
|
6837 | }
|
6838 | const handler = utility.handler.handleColor(theme('gradientColorStops')).handleOpacity(theme('opacity')).handleVariable().handleSquareBrackets();
|
6839 | if (handler.color || handler.value) {
|
6840 | return _optionalChain$1([new Style(utility.class,
|
6841 | new Property('--tw-gradient-stops', `var(--tw-gradient-from), ${handler.createColorValue('var(--tw-via-opacity, 1)')}, var(--tw-gradient-to, rgba(255, 255, 255, 0))`)
|
6842 | ), 'optionalAccess', _447 => _447.updateMeta, 'call', _448 => _448('utilities', 'gradientColorStops', pluginOrder.gradientColorStops, 3, true)]);
|
6843 | }
|
6844 | }
|
6845 |
|
6846 |
|
6847 | function gradientColorTo(utility, { theme }) {
|
6848 | if (utility.raw.startsWith('to-opacity')) {
|
6849 | return _optionalChain$1([utility, 'access', _449 => _449.handler
|
6850 | , 'access', _450 => _450.handleStatic, 'call', _451 => _451(theme('opacity'))
|
6851 | , 'access', _452 => _452.handleNumber, 'call', _453 => _453(0, 100, 'int', (number) => (number / 100).toString())
|
6852 | , 'access', _454 => _454.handleVariable, 'call', _455 => _455()
|
6853 | , 'access', _456 => _456.createProperty, 'call', _457 => _457('--tw-to-opacity')
|
6854 | , 'optionalAccess', _458 => _458.updateMeta, 'call', _459 => _459('utilities', 'gradientColorStops', pluginOrder.gradientColorStops, 6, true)]);
|
6855 | }
|
6856 | const handler = utility.handler.handleColor(theme('gradientColorStops')).handleOpacity(theme('opacity')).handleVariable().handleSquareBrackets();
|
6857 | if (handler.color || handler.value) {
|
6858 | return _optionalChain$1([new Style(utility.class,
|
6859 | new Property('--tw-gradient-to', handler.createColorValue('var(--tw-to-opacity, 1)'))
|
6860 | ), 'optionalAccess', _460 => _460.updateMeta, 'call', _461 => _461('utilities', 'gradientColorStops', pluginOrder.gradientColorStops, 5, true)]);
|
6861 | }
|
6862 | }
|
6863 |
|
6864 |
|
6865 | function borderRadius(utility, { theme }) {
|
6866 | const raw = [ 'rounded', 'rounded-t', 'rounded-l', 'rounded-r', 'rounded-b', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl' ].includes(utility.raw) ? utility.raw + '-DEFAULT' : utility.raw;
|
6867 | utility = utility.clone(raw);
|
6868 | const directions = expandDirection(_optionalChain$1([raw, 'access', _462 => _462.match, 'call', _463 => _463(/rounded-[trbl][trbl]?-/), 'optionalAccess', _464 => _464[0], 'access', _465 => _465.slice, 'call', _466 => _466(8, -1)]) || '', true);
|
6869 | if (!directions) return;
|
6870 | return _optionalChain$1([utility, 'access', _467 => _467.handler
|
6871 | , 'access', _468 => _468.handleStatic, 'call', _469 => _469(theme('borderRadius'))
|
6872 | , 'access', _470 => _470.handleSquareBrackets, 'call', _471 => _471()
|
6873 | , 'access', _472 => _472.handleFraction, 'call', _473 => _473()
|
6874 | , 'access', _474 => _474.handleNxl, 'call', _475 => _475((number) => `${number * 0.5}rem`)
|
6875 | , 'access', _476 => _476.handleSize, 'call', _477 => _477()
|
6876 | , 'access', _478 => _478.handleVariable, 'call', _479 => _479()
|
6877 | , 'access', _480 => _480.createProperty, 'call', _481 => _481(directions[0] === '*' ? 'border-radius' : directions.map((i) => `border-${i}-radius`))
|
6878 | , 'optionalAccess', _482 => _482.updateMeta, 'call', _483 => _483('utilities', 'borderRadius', pluginOrder.borderRadius, -(directions[0] === '*' ? 3 : directions.length), true)]);
|
6879 | }
|
6880 |
|
6881 |
|
6882 |
|
6883 |
|
6884 | function border(utility, { theme }) {
|
6885 |
|
6886 | if (utility.raw.startsWith('border-opacity')) {
|
6887 | return _optionalChain$1([utility, 'access', _484 => _484.handler
|
6888 | , 'access', _485 => _485.handleStatic, 'call', _486 => _486(theme('borderOpacity'))
|
6889 | , 'access', _487 => _487.handleNumber, 'call', _488 => _488(0, 100, 'int', (number) => (number / 100).toString())
|
6890 | , 'access', _489 => _489.handleVariable, 'call', _490 => _490()
|
6891 | , 'access', _491 => _491.createProperty, 'call', _492 => _492('--tw-border-opacity')
|
6892 | , 'optionalAccess', _493 => _493.updateMeta, 'call', _494 => _494('utilities', 'borderOpacity', pluginOrder.borderOpacity, 1, true)]);
|
6893 | }
|
6894 |
|
6895 |
|
6896 | const borderColor = _optionalChain$1([utility, 'access', _495 => _495.handler
|
6897 | , 'access', _496 => _496.handleColor, 'call', _497 => _497(theme('borderColor'))
|
6898 | , 'access', _498 => _498.handleOpacity, 'call', _499 => _499(theme('borderOpacity'))
|
6899 | , 'access', _500 => _500.handleSquareBrackets, 'call', _501 => _501(notNumberLead)
|
6900 | , 'access', _502 => _502.handleVariable, 'call', _503 => _503((variable) => utility.raw.startsWith('border-$') ? `var(--${variable})` : undefined)
|
6901 | , 'access', _504 => _504.createColorStyle, 'call', _505 => _505(utility.class, 'border-color', '--tw-border-opacity')
|
6902 | , 'optionalAccess', _506 => _506.updateMeta, 'call', _507 => _507('utilities', 'borderColor', pluginOrder.borderColor, 2, true)]);
|
6903 | if (borderColor) return borderColor;
|
6904 |
|
6905 |
|
6906 | const directions = _nullishCoalesce$2(expandDirection(utility.raw.substring(7, 8), false), () => ( [ '*' ]));
|
6907 | const borders = toType(theme('borderWidth'), 'object') ;
|
6908 | const raw = [ 'border', 'border-t', 'border-r', 'border-b', 'border-l' ].includes(utility.raw) ? `${utility.raw}-${_nullishCoalesce$2(borders.DEFAULT, () => ( '1px'))}` : utility.raw;
|
6909 |
|
6910 |
|
6911 | const borderSide = utility.clone(raw.slice(7)).handler
|
6912 | .handleColor(theme('borderColor'))
|
6913 | .handleOpacity(theme('borderOpacity'));
|
6914 |
|
6915 | if (borderSide.value || borderSide.color) {
|
6916 | if (borderSide.opacity) {
|
6917 | return new Property(`border-${directions[0]}-color`, borderSide.createColorValue(borderSide.opacity)).updateMeta('utilities', 'borderColor', pluginOrder.borderColor, 4, true);
|
6918 | }
|
6919 | return _optionalChain$1([borderSide, 'access', _508 => _508.createColorStyle, 'call', _509 => _509(utility.class, `border-${directions[0]}-color`, '--tw-border-opacity'), 'optionalAccess', _510 => _510.updateMeta, 'call', _511 => _511('utilities', 'borderColor', pluginOrder.borderColor, 3, true)]);
|
6920 | }
|
6921 |
|
6922 | utility = utility.clone(raw);
|
6923 | return _optionalChain$1([utility, 'access', _512 => _512.handler
|
6924 | , 'access', _513 => _513.handleStatic, 'call', _514 => _514(borders)
|
6925 | , 'access', _515 => _515.handleSquareBrackets, 'call', _516 => _516()
|
6926 | , 'access', _517 => _517.handleNumber, 'call', _518 => _518(0, undefined, 'int', (number) => /^border(-[tlbr])?$/.test(utility.key)? `${number}px`: undefined)
|
6927 | , 'access', _519 => _519.handleSize, 'call', _520 => _520()
|
6928 | , 'access', _521 => _521.handleVariable, 'call', _522 => _522()
|
6929 | , 'access', _523 => _523.createProperty, 'call', _524 => _524(directions[0] === '*' ? 'border-width' : directions.map((i) => `border-${i}-width`))
|
6930 | , 'optionalAccess', _525 => _525.updateMeta, 'call', _526 => _526('utilities', 'borderWidth', pluginOrder.borderWidth, (directions[0] === '*' ? 1 : (directions.length + 1)), true)]);
|
6931 | }
|
6932 |
|
6933 |
|
6934 |
|
6935 |
|
6936 |
|
6937 | function divide(utility, { theme }) {
|
6938 |
|
6939 | if (['solid', 'dashed', 'dotted', 'double', 'none'].includes(utility.amount)) return new Property('border-style', utility.amount).toStyle(utility.class).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'divideStyle', pluginOrder.divideStyle, 1, true);
|
6940 |
|
6941 | if (utility.raw.startsWith('divide-opacity'))
|
6942 | return _optionalChain$1([utility, 'access', _527 => _527.handler
|
6943 | , 'access', _528 => _528.handleStatic, 'call', _529 => _529(theme('divideOpacity'))
|
6944 | , 'access', _530 => _530.handleNumber, 'call', _531 => _531(0, 100, 'int', (number) => (number / 100).toString())
|
6945 | , 'access', _532 => _532.handleVariable, 'call', _533 => _533()
|
6946 | , 'access', _534 => _534.createProperty, 'call', _535 => _535('--tw-divide-opacity')
|
6947 | , 'optionalAccess', _536 => _536.toStyle, 'call', _537 => _537(utility.class)
|
6948 | , 'access', _538 => _538.child, 'call', _539 => _539('> :not([hidden]) ~ :not([hidden])')
|
6949 | , 'access', _540 => _540.updateMeta, 'call', _541 => _541('utilities', 'divideOpacity', pluginOrder.divideOpacity, 1, true)]);
|
6950 |
|
6951 | const divideColor = _optionalChain$1([utility, 'access', _542 => _542.handler
|
6952 | , 'access', _543 => _543.handleColor, 'call', _544 => _544(theme('divideColor'))
|
6953 | , 'access', _545 => _545.handleOpacity, 'call', _546 => _546(theme('divideOpacity'))
|
6954 | , 'access', _547 => _547.handleVariable, 'call', _548 => _548((variable) => utility.raw.startsWith('divide-$') ? `var(--${variable})` : undefined)
|
6955 | , 'access', _549 => _549.createColorStyle, 'call', _550 => _550(utility.class, 'border-color', '--tw-divide-opacity')
|
6956 | , 'optionalAccess', _551 => _551.child, 'call', _552 => _552('> :not([hidden]) ~ :not([hidden])')
|
6957 | , 'access', _553 => _553.updateMeta, 'call', _554 => _554('utilities', 'divideColor', pluginOrder.divideColor, 0, true)]);
|
6958 | if (divideColor) return divideColor;
|
6959 |
|
6960 | switch (utility.raw) {
|
6961 | case 'divide-x-reverse':
|
6962 | return new Style(utility.class, new Property('--tw-divide-x-reverse', '1')).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'divideWidth', pluginOrder.divideWidth, 6, true);
|
6963 | case 'divide-y-reverse':
|
6964 | return new Style(utility.class, new Property('--tw-divide-y-reverse', '1')).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'divideWidth', pluginOrder.divideWidth, 5, true);
|
6965 | case 'divide-y':
|
6966 | return new Style(utility.class, [
|
6967 | new Property('--tw-divide-y-reverse', '0'),
|
6968 | new Property('border-top-width', 'calc(1px * calc(1 - var(--tw-divide-y-reverse)))'),
|
6969 | new Property('border-bottom-width', 'calc(1px * var(--tw-divide-y-reverse))'),
|
6970 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'divideWidth', pluginOrder.divideWidth, 3, true);
|
6971 | case 'divide-x':
|
6972 | return new Style(utility.class, [
|
6973 | new Property('--tw-divide-x-reverse', '0'),
|
6974 | new Property('border-right-width', 'calc(1px * var(--tw-divide-x-reverse))'),
|
6975 | new Property('border-left-width', 'calc(1px * calc(1 - var(--tw-divide-x-reverse)))'),
|
6976 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'divideWidth', pluginOrder.divideWidth, 4, true);
|
6977 | }
|
6978 | return utility.handler
|
6979 | .handleSquareBrackets()
|
6980 | .handleNumber(0, undefined, 'float', (number) => `${number}px`)
|
6981 | .handleSize()
|
6982 | .handleVariable()
|
6983 | .callback(value => {
|
6984 | const centerMatch = utility.raw.match(/^-?divide-[x|y]/);
|
6985 | if (centerMatch) {
|
6986 | const center = centerMatch[0].replace(/^-?divide-/, '');
|
6987 | switch (center) {
|
6988 | case 'x':
|
6989 | return new Style(utility.class, [
|
6990 | new Property('--tw-divide-x-reverse', '0'),
|
6991 | new Property('border-right-width', `calc(${value} * var(--tw-divide-x-reverse))`),
|
6992 | new Property('border-left-width', `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`),
|
6993 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'divideWidth', pluginOrder.divideWidth, 2, true);
|
6994 | case 'y':
|
6995 | return new Style(utility.class, [
|
6996 | new Property('--tw-divide-y-reverse', '0'),
|
6997 | new Property('border-top-width', `calc(${value} * calc(1 - var(--tw-divide-y-reverse)))`),
|
6998 | new Property('border-bottom-width', `calc(${value} * var(--tw-divide-y-reverse))`),
|
6999 | ]).child('> :not([hidden]) ~ :not([hidden])').updateMeta('utilities', 'divideWidth', pluginOrder.divideWidth, 1, true);
|
7000 | }
|
7001 | }
|
7002 | });
|
7003 | }
|
7004 |
|
7005 |
|
7006 |
|
7007 | function ringOffset(utility, { theme }) {
|
7008 | let value;
|
7009 |
|
7010 | if (utility.raw.startsWith('ringOffset-width-$')) {
|
7011 | value = utility.handler.handleVariable().value;
|
7012 | if (value) return new Property('--tw-ring-offset-width', value).toStyle(utility.class.replace('ringOffset', 'ring-offset')).updateMeta('utilities', 'ringOffsetWidth', pluginOrder.ringOffsetWidth, 2, true);
|
7013 | }
|
7014 |
|
7015 | if (utility.raw.startsWith('ringOffset-opacity')) {
|
7016 | return _optionalChain$1([utility, 'access', _555 => _555.handler
|
7017 | , 'access', _556 => _556.handleStatic, 'call', _557 => _557(theme('opacity'))
|
7018 | , 'access', _558 => _558.handleNumber, 'call', _559 => _559(0, 100, 'int', (number) => (number / 100).toString())
|
7019 | , 'access', _560 => _560.handleVariable, 'call', _561 => _561()
|
7020 | , 'access', _562 => _562.createProperty, 'call', _563 => _563('--tw-ring-offset-opacity')
|
7021 | , 'optionalAccess', _564 => _564.updateMeta, 'call', _565 => _565('utilities', 'ringOffsetColor', pluginOrder.ringOffsetColor, 2, true)]);
|
7022 | }
|
7023 |
|
7024 |
|
7025 | return _optionalChain$1([utility, 'access', _566 => _566.handler
|
7026 | , 'access', _567 => _567.handleColor, 'call', _568 => _568(theme('ringOffsetColor'))
|
7027 | , 'access', _569 => _569.handleOpacity, 'call', _570 => _570('ringOpacity')
|
7028 | , 'access', _571 => _571.handleVariable, 'call', _572 => _572()
|
7029 | , 'access', _573 => _573.handleSquareBrackets, 'call', _574 => _574()
|
7030 | , 'access', _575 => _575.createColorStyle, 'call', _576 => _576(utility.class.replace('ringOffset', 'ring-offset'), '--tw-ring-offset-color', '--tw-ring-offset-opacity')
|
7031 | , 'optionalAccess', _577 => _577.updateMeta, 'call', _578 => _578('utilities', 'ringOffsetColor', pluginOrder.ringOffsetColor, 1, true)])
|
7032 | || _optionalChain$1([utility, 'access', _579 => _579.handler
|
7033 | , 'access', _580 => _580.handleStatic, 'call', _581 => _581(theme('ringOffsetWidth'))
|
7034 | , 'access', _582 => _582.handleSquareBrackets, 'call', _583 => _583(isNumberLead)
|
7035 | , 'access', _584 => _584.handleNumber, 'call', _585 => _585(0, undefined, 'float', (number) => `${number}px`)
|
7036 | , 'access', _586 => _586.handleSize, 'call', _587 => _587()
|
7037 | , 'access', _588 => _588.createStyle, 'call', _589 => _589(utility.class.replace('ringOffset', 'ring-offset'), value => new Property('--tw-ring-offset-width', value))
|
7038 | , 'optionalAccess', _590 => _590.updateMeta, 'call', _591 => _591('utilities', 'ringOffsetWidth', pluginOrder.ringOffsetWidth, 1, true)]);
|
7039 | }
|
7040 |
|
7041 |
|
7042 |
|
7043 |
|
7044 | function ring(utility, utils) {
|
7045 |
|
7046 | if (utility.raw.startsWith('ring-offset')) return ringOffset(utility.clone(utility.raw.replace('ring-offset', 'ringOffset')), utils);
|
7047 |
|
7048 | if (utility.raw.startsWith('ring-opacity'))
|
7049 | return _optionalChain$1([utility, 'access', _592 => _592.handler
|
7050 | , 'access', _593 => _593.handleStatic, 'call', _594 => _594(utils.theme('ringOpacity'))
|
7051 | , 'access', _595 => _595.handleSquareBrackets, 'call', _596 => _596()
|
7052 | , 'access', _597 => _597.handleNumber, 'call', _598 => _598(0, 100, 'int', (number) => (number / 100).toString())
|
7053 | , 'access', _599 => _599.handleVariable, 'call', _600 => _600()
|
7054 | , 'access', _601 => _601.createProperty, 'call', _602 => _602('--tw-ring-opacity')
|
7055 | , 'optionalAccess', _603 => _603.updateMeta, 'call', _604 => _604('utilities', 'ringOpacity', pluginOrder.ringOpacity, 1, true)]);
|
7056 |
|
7057 | const ringColor = _optionalChain$1([utility, 'access', _605 => _605.handler
|
7058 | , 'access', _606 => _606.handleColor, 'call', _607 => _607(utils.theme('ringColor'))
|
7059 | , 'access', _608 => _608.handleOpacity, 'call', _609 => _609(utils.theme('ringOpacity'))
|
7060 | , 'access', _610 => _610.handleSquareBrackets, 'call', _611 => _611(notNumberLead)
|
7061 | , 'access', _612 => _612.handleVariable, 'call', _613 => _613((variable) => utility.raw.startsWith('ring-$') ? `var(--${variable})` : undefined)
|
7062 | , 'access', _614 => _614.createColorStyle, 'call', _615 => _615(utility.class, '--tw-ring-color', '--tw-ring-opacity')
|
7063 | , 'optionalAccess', _616 => _616.updateMeta, 'call', _617 => _617('utilities', 'ringColor', pluginOrder.ringColor, 0, true)]);
|
7064 |
|
7065 | if (ringColor) return ringColor;
|
7066 |
|
7067 | if (utility.raw === 'ring-inset') return new Property('--tw-ring-inset', 'inset').updateMeta('utilities', 'ringWidth', pluginOrder.ringWidth, 3, true);
|
7068 | const value = utility.raw === 'ring'
|
7069 | ? (_nullishCoalesce$2(toType(utils.theme('ringWidth.DEFAULT'), 'string'), () => ( '3px')))
|
7070 | : utility.handler
|
7071 | .handleStatic(utils.theme('ringWidth'))
|
7072 | .handleSquareBrackets()
|
7073 | .handleNumber(0, undefined, 'float', (number) => `${number}px`)
|
7074 | .handleSize()
|
7075 | .handleVariable()
|
7076 | .value;
|
7077 | if (!value) return;
|
7078 | return new Style(utility.class, [
|
7079 | new Property('--tw-ring-offset-shadow', 'var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)'),
|
7080 | new Property('--tw-ring-shadow', `var(--tw-ring-inset) 0 0 0 calc(${value} + var(--tw-ring-offset-width)) var(--tw-ring-color)`),
|
7081 | new Property(['-webkit-box-shadow', 'box-shadow'], 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)'),
|
7082 | ]).updateMeta('utilities', 'ringWidth', pluginOrder.ringWidth, (utility.raw === 'ring' ? 1 : 2), true);
|
7083 | }
|
7084 |
|
7085 |
|
7086 | function blur(utility, { theme }) {
|
7087 | if (utility.raw === 'blur') utility.raw = 'blur-DEFAULT';
|
7088 | return _optionalChain$1([utility, 'access', _618 => _618.handler
|
7089 | , 'access', _619 => _619.handleBody, 'call', _620 => _620(theme('blur'))
|
7090 | , 'access', _621 => _621.handleSquareBrackets, 'call', _622 => _622()
|
7091 | , 'access', _623 => _623.handleNumber, 'call', _624 => _624(0, undefined, 'int', (number) => `${number}px`)
|
7092 | , 'access', _625 => _625.handleSize, 'call', _626 => _626()
|
7093 | , 'access', _627 => _627.createProperty, 'call', _628 => _628('--tw-blur', value => `blur(${value})`)
|
7094 | , 'optionalAccess', _629 => _629.updateMeta, 'call', _630 => _630('utilities', 'blur', pluginOrder.blur, 1, true)]);
|
7095 | }
|
7096 |
|
7097 |
|
7098 | function brightness(utility, { theme }) {
|
7099 | return _optionalChain$1([utility, 'access', _631 => _631.handler
|
7100 | , 'access', _632 => _632.handleBody, 'call', _633 => _633(theme('brightness'))
|
7101 | , 'access', _634 => _634.handleSquareBrackets, 'call', _635 => _635()
|
7102 | , 'access', _636 => _636.handleNumber, 'call', _637 => _637(0, undefined, 'int', (number) => `${number/100}`)
|
7103 | , 'access', _638 => _638.createProperty, 'call', _639 => _639('--tw-brightness', value => `brightness(${value})`)
|
7104 | , 'optionalAccess', _640 => _640.updateMeta, 'call', _641 => _641('utilities', 'brightness', pluginOrder.brightness, 1, true)]);
|
7105 | }
|
7106 |
|
7107 |
|
7108 | function contrast(utility, { theme }) {
|
7109 | return _optionalChain$1([utility, 'access', _642 => _642.handler
|
7110 | , 'access', _643 => _643.handleBody, 'call', _644 => _644(theme('contrast'))
|
7111 | , 'access', _645 => _645.handleSquareBrackets, 'call', _646 => _646()
|
7112 | , 'access', _647 => _647.handleNumber, 'call', _648 => _648(0, undefined, 'int', (number) => `${number/100}`)
|
7113 | , 'access', _649 => _649.createProperty, 'call', _650 => _650('--tw-contrast', value => `contrast(${value})`)
|
7114 | , 'optionalAccess', _651 => _651.updateMeta, 'call', _652 => _652('utilities', 'contrast', pluginOrder.contrast, 1, true)]);
|
7115 | }
|
7116 |
|
7117 |
|
7118 | function dropShadow(utility, { theme }) {
|
7119 | let value;
|
7120 | if (utility.raw === 'drop-shadow') {
|
7121 | value = theme('dropShadow.DEFAULT', ['0 1px 2px rgba(0, 0, 0, 0.1)', '0 1px 1px rgba(0, 0, 0, 0.06)']) ;
|
7122 | } else {
|
7123 | const dropShadows = theme('dropShadow') ;
|
7124 | const amount = utility.amount;
|
7125 | if (utility.raw.startsWith('drop-shadow') && amount in dropShadows) value = dropShadows[amount];
|
7126 | }
|
7127 | if (value) return new Property('--tw-drop-shadow', Array.isArray(value)? value.map(i => `drop-shadow(${i})`).join(' '): `drop-shadow(${value})`).updateMeta('utilities', 'dropShadow', pluginOrder.dropShadow, 1, true);
|
7128 | }
|
7129 |
|
7130 |
|
7131 | function grayscale(utility, { theme }) {
|
7132 | if (utility.raw === 'grayscale') utility.raw = 'grayscale-DEFAULT';
|
7133 | return _optionalChain$1([utility, 'access', _653 => _653.handler
|
7134 | , 'access', _654 => _654.handleBody, 'call', _655 => _655(theme('grayscale'))
|
7135 | , 'access', _656 => _656.handleSquareBrackets, 'call', _657 => _657()
|
7136 | , 'access', _658 => _658.handleNumber, 'call', _659 => _659(0, 100, 'int', (number) => `${number/100}`)
|
7137 | , 'access', _660 => _660.createProperty, 'call', _661 => _661('--tw-grayscale', value => `grayscale(${value})`)
|
7138 | , 'optionalAccess', _662 => _662.updateMeta, 'call', _663 => _663('utilities', 'grayscale', pluginOrder.grayscale, 1, true)]);
|
7139 | }
|
7140 |
|
7141 |
|
7142 | function hueRotate(utility, { theme }) {
|
7143 | return _optionalChain$1([utility, 'access', _664 => _664.handler
|
7144 | , 'access', _665 => _665.handleBody, 'call', _666 => _666(theme('hueRotate'))
|
7145 | , 'access', _667 => _667.handleSquareBrackets, 'call', _668 => _668()
|
7146 | , 'access', _669 => _669.handleNumber, 'call', _670 => _670(0, undefined, 'float', (number) => `${number}deg`)
|
7147 | , 'access', _671 => _671.handleNegative, 'call', _672 => _672()
|
7148 | , 'access', _673 => _673.createProperty, 'call', _674 => _674('--tw-hue-rotate', value => `hue-rotate(${value})`)
|
7149 | , 'optionalAccess', _675 => _675.updateMeta, 'call', _676 => _676('utilities', 'hueRotate', pluginOrder.hueRotate, 1, true)]);
|
7150 | }
|
7151 |
|
7152 |
|
7153 | function invert(utility, { theme }) {
|
7154 | if (utility.raw === 'invert') utility.raw = 'invert-DEFAULT';
|
7155 | return _optionalChain$1([utility, 'access', _677 => _677.handler
|
7156 | , 'access', _678 => _678.handleBody, 'call', _679 => _679(theme('invert'))
|
7157 | , 'access', _680 => _680.handleSquareBrackets, 'call', _681 => _681()
|
7158 | , 'access', _682 => _682.handleNumber, 'call', _683 => _683(0, 100, 'int', (number) => `${number/100}`)
|
7159 | , 'access', _684 => _684.createProperty, 'call', _685 => _685('--tw-invert', value => `invert(${value})`)
|
7160 | , 'optionalAccess', _686 => _686.updateMeta, 'call', _687 => _687('utilities', 'invert', pluginOrder.invert, 1, true)]);
|
7161 | }
|
7162 |
|
7163 |
|
7164 | function saturate(utility, { theme }) {
|
7165 | return _optionalChain$1([utility, 'access', _688 => _688.handler
|
7166 | , 'access', _689 => _689.handleBody, 'call', _690 => _690(theme('saturate'))
|
7167 | , 'access', _691 => _691.handleSquareBrackets, 'call', _692 => _692()
|
7168 | , 'access', _693 => _693.handleNumber, 'call', _694 => _694(0, undefined, 'int', (number) => `${number/100}`)
|
7169 | , 'access', _695 => _695.createProperty, 'call', _696 => _696('--tw-saturate', value => `saturate(${value})`)
|
7170 | , 'optionalAccess', _697 => _697.updateMeta, 'call', _698 => _698('utilities', 'saturate', pluginOrder.saturate, 1, true)]);
|
7171 | }
|
7172 |
|
7173 |
|
7174 | function sepia(utility, { theme }) {
|
7175 | if (utility.raw === 'sepia') utility.raw = 'sepia-DEFAULT';
|
7176 | return _optionalChain$1([utility, 'access', _699 => _699.handler
|
7177 | , 'access', _700 => _700.handleBody, 'call', _701 => _701(theme('sepia'))
|
7178 | , 'access', _702 => _702.handleSquareBrackets, 'call', _703 => _703()
|
7179 | , 'access', _704 => _704.handleNumber, 'call', _705 => _705(0, 100, 'int', (number) => `${number/100}`)
|
7180 | , 'access', _706 => _706.createProperty, 'call', _707 => _707('--tw-sepia', value => `sepia(${value})`)
|
7181 | , 'optionalAccess', _708 => _708.updateMeta, 'call', _709 => _709('utilities', 'sepia', pluginOrder.sepia, 1, true)]);
|
7182 | }
|
7183 |
|
7184 |
|
7185 |
|
7186 |
|
7187 |
|
7188 |
|
7189 |
|
7190 |
|
7191 |
|
7192 |
|
7193 |
|
7194 | function backdrop(utility, { theme }) {
|
7195 | utility = utility.clone(utility.raw.slice(9));
|
7196 | switch (utility.match(/[^-]+/)) {
|
7197 | case 'blur':
|
7198 | if (utility.raw === 'blur') utility.raw = 'blur-DEFAULT';
|
7199 | return _optionalChain$1([utility, 'access', _710 => _710.handler
|
7200 | , 'access', _711 => _711.handleBody, 'call', _712 => _712(theme('backdropBlur'))
|
7201 | , 'access', _713 => _713.handleSquareBrackets, 'call', _714 => _714()
|
7202 | , 'access', _715 => _715.handleNumber, 'call', _716 => _716(0, undefined, 'int', (number) => `${number}px`)
|
7203 | , 'access', _717 => _717.handleSize, 'call', _718 => _718()
|
7204 | , 'access', _719 => _719.createProperty, 'call', _720 => _720('--tw-backdrop-blur', value => `blur(${value})`)
|
7205 | , 'optionalAccess', _721 => _721.updateMeta, 'call', _722 => _722('utilities', 'backdropBlur', pluginOrder.backdropBlur, 1, true)]);
|
7206 | case 'brightness':
|
7207 | return _optionalChain$1([utility, 'access', _723 => _723.handler
|
7208 | , 'access', _724 => _724.handleBody, 'call', _725 => _725(theme('backdropBrightness'))
|
7209 | , 'access', _726 => _726.handleSquareBrackets, 'call', _727 => _727()
|
7210 | , 'access', _728 => _728.handleNumber, 'call', _729 => _729(0, undefined, 'int', (number) => `${number/100}`)
|
7211 | , 'access', _730 => _730.createProperty, 'call', _731 => _731('--tw-backdrop-brightness', value => `brightness(${value})`)
|
7212 | , 'optionalAccess', _732 => _732.updateMeta, 'call', _733 => _733('utilities', 'backdropBrightness', pluginOrder.backdropBrightness, 1, true)]);
|
7213 | case 'contrast':
|
7214 | return _optionalChain$1([utility, 'access', _734 => _734.handler
|
7215 | , 'access', _735 => _735.handleBody, 'call', _736 => _736(theme('backdropContrast'))
|
7216 | , 'access', _737 => _737.handleSquareBrackets, 'call', _738 => _738()
|
7217 | , 'access', _739 => _739.handleNumber, 'call', _740 => _740(0, undefined, 'int', (number) => `${number/100}`)
|
7218 | , 'access', _741 => _741.createProperty, 'call', _742 => _742('--tw-backdrop-contrast', value => `contrast(${value})`)
|
7219 | , 'optionalAccess', _743 => _743.updateMeta, 'call', _744 => _744('utilities', 'backdropContrast', pluginOrder.backdropContrast, 1, true)]);
|
7220 | case 'grayscale':
|
7221 | if (utility.raw === 'grayscale') utility.raw = 'grayscale-DEFAULT';
|
7222 | return _optionalChain$1([utility, 'access', _745 => _745.handler
|
7223 | , 'access', _746 => _746.handleBody, 'call', _747 => _747(theme('backdropGrayscale'))
|
7224 | , 'access', _748 => _748.handleSquareBrackets, 'call', _749 => _749()
|
7225 | , 'access', _750 => _750.handleNumber, 'call', _751 => _751(0, 100, 'int', (number) => `${number/100}`)
|
7226 | , 'access', _752 => _752.createProperty, 'call', _753 => _753('--tw-backdrop-grayscale', value => `grayscale(${value})`)
|
7227 | , 'optionalAccess', _754 => _754.updateMeta, 'call', _755 => _755('utilities', 'backdropGrayscale', pluginOrder.backdropGrayscale, 1, true)]);
|
7228 | case 'hue':
|
7229 | return _optionalChain$1([utility, 'access', _756 => _756.handler
|
7230 | , 'access', _757 => _757.handleBody, 'call', _758 => _758(theme('backdropHueRotate'))
|
7231 | , 'access', _759 => _759.handleSquareBrackets, 'call', _760 => _760()
|
7232 | , 'access', _761 => _761.handleNumber, 'call', _762 => _762(0, undefined, 'float', (number) => `${number}deg`)
|
7233 | , 'access', _763 => _763.handleNegative, 'call', _764 => _764()
|
7234 | , 'access', _765 => _765.createProperty, 'call', _766 => _766('--tw-backdrop-hue-rotate', value => `hue-rotate(${value})`)
|
7235 | , 'optionalAccess', _767 => _767.updateMeta, 'call', _768 => _768('utilities', 'backdropHueRotate', pluginOrder.backdropHueRotate, 1, true)]);
|
7236 | case 'invert':
|
7237 | if (utility.raw === 'invert') utility.raw = 'invert-DEFAULT';
|
7238 | return _optionalChain$1([utility, 'access', _769 => _769.handler
|
7239 | , 'access', _770 => _770.handleBody, 'call', _771 => _771(theme('backdropInvert'))
|
7240 | , 'access', _772 => _772.handleSquareBrackets, 'call', _773 => _773()
|
7241 | , 'access', _774 => _774.handleNumber, 'call', _775 => _775(0, 100, 'int', (number) => `${number/100}`)
|
7242 | , 'access', _776 => _776.createProperty, 'call', _777 => _777('--tw-backdrop-invert', value => `invert(${value})`)
|
7243 | , 'optionalAccess', _778 => _778.updateMeta, 'call', _779 => _779('utilities', 'backdropInvert', pluginOrder.backdropInvert, 1, true)]);
|
7244 | case 'opacity':
|
7245 | return _optionalChain$1([utility, 'access', _780 => _780.handler
|
7246 | , 'access', _781 => _781.handleBody, 'call', _782 => _782(theme('backdropOpacity'))
|
7247 | , 'access', _783 => _783.handleSquareBrackets, 'call', _784 => _784()
|
7248 | , 'access', _785 => _785.handleNumber, 'call', _786 => _786(0, 100, 'int', (number) => `${number/100}`)
|
7249 | , 'access', _787 => _787.createProperty, 'call', _788 => _788('--tw-backdrop-opacity', value => `opacity(${value})`)
|
7250 | , 'optionalAccess', _789 => _789.updateMeta, 'call', _790 => _790('utilities', 'backdropOpacity', pluginOrder.backdropOpacity, 1, true)]);
|
7251 | case 'saturate':
|
7252 | return _optionalChain$1([utility, 'access', _791 => _791.handler
|
7253 | , 'access', _792 => _792.handleBody, 'call', _793 => _793(theme('backdropSaturate'))
|
7254 | , 'access', _794 => _794.handleSquareBrackets, 'call', _795 => _795()
|
7255 | , 'access', _796 => _796.handleNumber, 'call', _797 => _797(0, undefined, 'int', (number) => `${number/100}`)
|
7256 | , 'access', _798 => _798.createProperty, 'call', _799 => _799('--tw-backdrop-saturate', value => `saturate(${value})`)
|
7257 | , 'optionalAccess', _800 => _800.updateMeta, 'call', _801 => _801('utilities', 'backdropSaturate', pluginOrder.backdropSaturate, 1, true)]);
|
7258 | case 'sepia':
|
7259 | if (utility.raw === 'sepia') utility.raw = 'sepia-DEFAULT';
|
7260 | return _optionalChain$1([utility, 'access', _802 => _802.handler
|
7261 | , 'access', _803 => _803.handleBody, 'call', _804 => _804(theme('backdropSepia'))
|
7262 | , 'access', _805 => _805.handleSquareBrackets, 'call', _806 => _806()
|
7263 | , 'access', _807 => _807.handleNumber, 'call', _808 => _808(0, 100, 'int', (number) => `${number/100}`)
|
7264 | , 'access', _809 => _809.createProperty, 'call', _810 => _810('--tw-backdrop-sepia', value => `sepia(${value})`)
|
7265 | , 'optionalAccess', _811 => _811.updateMeta, 'call', _812 => _812('utilities', 'backdropSepia', pluginOrder.backdropSepia, 1, true)]);
|
7266 | }
|
7267 | }
|
7268 |
|
7269 |
|
7270 | function boxShadow(utility, { theme }) {
|
7271 | const body = utility.body || 'DEFAULT';
|
7272 | const shadows = toType(theme('boxShadow'), 'object') ;
|
7273 | if (Object.keys(shadows).includes(body)) {
|
7274 | const shadow = shadows[body].replace(/rgba\s*\(\s*0\s*,\s*0\s*,\s*0/g, 'rgba(var(--tw-shadow-color)');
|
7275 | return new Style(utility.class, [
|
7276 | new Property('--tw-shadow-color', '0, 0, 0'),
|
7277 | new Property('--tw-shadow', shadow),
|
7278 | new Property(['-webkit-box-shadow', 'box-shadow'], 'var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)'),
|
7279 | ]).updateMeta('utilities', 'boxShadow', pluginOrder.boxShadow, 0, true);
|
7280 | }
|
7281 |
|
7282 | return _optionalChain$1([utility, 'access', _813 => _813.handler
|
7283 | , 'access', _814 => _814.handleColor, 'call', _815 => _815(theme('boxShadowColor'))
|
7284 | , 'access', _816 => _816.handleOpacity, 'call', _817 => _817(theme('opacity'))
|
7285 | , 'access', _818 => _818.handleSquareBrackets, 'call', _819 => _819()
|
7286 | , 'access', _820 => _820.handleVariable, 'call', _821 => _821()
|
7287 | , 'access', _822 => _822.createColorStyle, 'call', _823 => _823(utility.class, '--tw-shadow-color', undefined, false)
|
7288 | , 'optionalAccess', _824 => _824.updateMeta, 'call', _825 => _825('utilities', 'boxShadowColor', pluginOrder.boxShadowColor, 0, true)]);
|
7289 | }
|
7290 |
|
7291 |
|
7292 | function opacity(utility, { theme }) {
|
7293 | return _optionalChain$1([utility, 'access', _826 => _826.handler
|
7294 | , 'access', _827 => _827.handleStatic, 'call', _828 => _828(theme('opacity'))
|
7295 | , 'access', _829 => _829.handleSquareBrackets, 'call', _830 => _830()
|
7296 | , 'access', _831 => _831.handleNumber, 'call', _832 => _832(0, 100, 'int', (number) => (number / 100).toString())
|
7297 | , 'access', _833 => _833.handleVariable, 'call', _834 => _834()
|
7298 | , 'access', _835 => _835.createProperty, 'call', _836 => _836('opacity')
|
7299 | , 'optionalAccess', _837 => _837.updateMeta, 'call', _838 => _838('utilities', 'opacity', pluginOrder.opacity, 0, true)]);
|
7300 | }
|
7301 |
|
7302 |
|
7303 | function transition(utility, { theme }) {
|
7304 | const body = utility.body;
|
7305 | const props = toType(theme('transitionProperty'), 'object') ;
|
7306 | for (const [key, value] of Object.entries(props)) {
|
7307 | if (body === key || (body === '' && key === 'DEFAULT')) {
|
7308 | if (value === 'none') return new Property(['-webkit-transition-property', '-o-transition-property', 'transition-property'], 'none').updateMeta('utilities', 'transitionProperty', pluginOrder.transitionProperty, 1, true);
|
7309 | return new Style(utility.class, [
|
7310 | new Property('-webkit-transition-property', value.replace(/(?=(transform|box-shadow))/g, '-webkit-')),
|
7311 | new Property('-o-transition-property', value),
|
7312 | new Property('transition-property', value.replace(/transform/g, 'transform, -webkit-transform').replace(/box-shadow/g, 'box-shadow, -webkit-box-shadow')),
|
7313 | new Property(['-webkit-transition-timing-function', '-o-transition-timing-function', 'transition-timing-function'], _nullishCoalesce$2(toType(theme('transitionTimingFunction.DEFAULT'), 'string'), () => ( 'cubic-bezier(0.4, 0, 0.2, 1)'))),
|
7314 | new Property(['-webkit-transition-duration', '-o-transition-duration', 'transition-duration' ], _nullishCoalesce$2(toType(theme('transitionDuration.DEFAULT'), 'string'), () => ( '150ms'))),
|
7315 | ]).updateMeta('utilities', 'transitionProperty', pluginOrder.transitionProperty, 2, true);
|
7316 | }
|
7317 | }
|
7318 | }
|
7319 |
|
7320 |
|
7321 | function duration(utility, { theme }) {
|
7322 | return _optionalChain$1([utility, 'access', _839 => _839.handler
|
7323 | , 'access', _840 => _840.handleStatic, 'call', _841 => _841(theme('transitionDuration'))
|
7324 | , 'access', _842 => _842.handleSquareBrackets, 'call', _843 => _843()
|
7325 | , 'access', _844 => _844.handleTime, 'call', _845 => _845(0, undefined, 'float')
|
7326 | , 'access', _846 => _846.handleNumber, 'call', _847 => _847(0, undefined, 'int', (number) => `${number}ms`)
|
7327 | , 'access', _848 => _848.handleVariable, 'call', _849 => _849()
|
7328 | , 'access', _850 => _850.createProperty, 'call', _851 => _851(['-webkit-transition-duration', '-o-transition-duration', 'transition-duration'])
|
7329 | , 'optionalAccess', _852 => _852.updateMeta, 'call', _853 => _853('utilities', 'transitionDuration', pluginOrder.transitionDuration, 1, true)]);
|
7330 | }
|
7331 |
|
7332 |
|
7333 | function transitionTimingFunction(utility, { theme }) {
|
7334 | return _optionalChain$1([utility, 'access', _854 => _854.handler
|
7335 | , 'access', _855 => _855.handleBody, 'call', _856 => _856(theme('transitionTimingFunction'))
|
7336 | , 'access', _857 => _857.createProperty, 'call', _858 => _858(['-webkit-transition-timing-function', '-o-transition-timing-function', 'transition-timing-function'])
|
7337 | , 'optionalAccess', _859 => _859.updateMeta, 'call', _860 => _860('utilities', 'transitionTimingFunction', pluginOrder.transitionTimingFunction, 1, true)]);
|
7338 | }
|
7339 |
|
7340 |
|
7341 | function delay(utility, { theme }) {
|
7342 | return _optionalChain$1([utility, 'access', _861 => _861.handler
|
7343 | , 'access', _862 => _862.handleStatic, 'call', _863 => _863(theme('transitionDelay'))
|
7344 | , 'access', _864 => _864.handleSquareBrackets, 'call', _865 => _865()
|
7345 | , 'access', _866 => _866.handleTime, 'call', _867 => _867(0, undefined, 'float')
|
7346 | , 'access', _868 => _868.handleNumber, 'call', _869 => _869(0, undefined, 'int', (number) => `${number}ms`)
|
7347 | , 'access', _870 => _870.handleVariable, 'call', _871 => _871()
|
7348 | , 'access', _872 => _872.createProperty, 'call', _873 => _873(['-webkit-transition-delay', '-o-transition-delay', 'transition-delay'])
|
7349 | , 'optionalAccess', _874 => _874.updateMeta, 'call', _875 => _875('utilities', 'transitionDelay', pluginOrder.transitionDelay, 0, true)]);
|
7350 | }
|
7351 |
|
7352 |
|
7353 | function animation(utility, { theme, config }) {
|
7354 | const body = utility.body;
|
7355 | if (utility.raw.startsWith('animate-ease')) {
|
7356 | return _optionalChain$1([utility, 'access', _876 => _876.clone, 'call', _877 => _877(utility.raw.slice(8)), 'access', _878 => _878.handler
|
7357 | , 'access', _879 => _879.handleBody, 'call', _880 => _880(theme('animationTimingFunction'))
|
7358 | , 'access', _881 => _881.handleSquareBrackets, 'call', _882 => _882()
|
7359 | , 'access', _883 => _883.createProperty, 'call', _884 => _884(['-webkit-animation-timing-function', 'animation-timing-function'])
|
7360 | , 'optionalAccess', _885 => _885.updateMeta, 'call', _886 => _886('utilities', 'animation', pluginOrder.animation, 20, true)]);
|
7361 | }
|
7362 | if (utility.raw.startsWith('animate-duration')) {
|
7363 | return _optionalChain$1([utility, 'access', _887 => _887.clone, 'call', _888 => _888(utility.raw.slice(8)), 'access', _889 => _889.handler
|
7364 | , 'access', _890 => _890.handleStatic, 'call', _891 => _891(theme('animationDuration'))
|
7365 | , 'access', _892 => _892.handleSquareBrackets, 'call', _893 => _893()
|
7366 | , 'access', _894 => _894.handleTime, 'call', _895 => _895(0, undefined, 'float')
|
7367 | , 'access', _896 => _896.handleNumber, 'call', _897 => _897(0, undefined, 'int', (number) => `${number}ms`)
|
7368 | , 'access', _898 => _898.handleVariable, 'call', _899 => _899()
|
7369 | , 'access', _900 => _900.createProperty, 'call', _901 => _901(['-webkit-animation-duration', 'animation-duration'])
|
7370 | , 'optionalAccess', _902 => _902.updateMeta, 'call', _903 => _903('utilities', 'animation', pluginOrder.animation, 21, true)]);
|
7371 | }
|
7372 | if (utility.raw.startsWith('animate-delay')) {
|
7373 | return _optionalChain$1([utility, 'access', _904 => _904.clone, 'call', _905 => _905(utility.raw.slice(8)), 'access', _906 => _906.handler
|
7374 | , 'access', _907 => _907.handleStatic, 'call', _908 => _908(theme('animationDelay'))
|
7375 | , 'access', _909 => _909.handleSquareBrackets, 'call', _910 => _910()
|
7376 | , 'access', _911 => _911.handleTime, 'call', _912 => _912(0, undefined, 'float')
|
7377 | , 'access', _913 => _913.handleNumber, 'call', _914 => _914(0, undefined, 'int', (number) => `${number}ms`)
|
7378 | , 'access', _915 => _915.handleVariable, 'call', _916 => _916()
|
7379 | , 'access', _917 => _917.createProperty, 'call', _918 => _918(['-webkit-animation-delay', 'animation-delay'])
|
7380 | , 'optionalAccess', _919 => _919.updateMeta, 'call', _920 => _920('utilities', 'animation', pluginOrder.animation, 22, true)]);
|
7381 | }
|
7382 | const animateIterationCount = utility.handler.handleBody(theme('animationIterationCount')).handleNumber(0, undefined, 'int').handleSquareBrackets().value;
|
7383 | if (animateIterationCount) return new Property(['-webkit-animation-iteration-count', 'animation-iteration-count'], animateIterationCount).updateMeta('utilities', 'animation', pluginOrder.animation, 23, true);
|
7384 | const animations = toType(theme('animation'), 'object') ;
|
7385 | if (Object.keys(animations).includes(body)) {
|
7386 | let value = animations[body];
|
7387 | const prop = config('prefixer') ? ['-webkit-animation', 'animation'] : 'animation';
|
7388 | if (value === 'none') return new Property(prop, 'none').updateMeta('utilities', 'animation', pluginOrder.animation, 1, true);
|
7389 | let styles, keyframe;
|
7390 | if (typeof value === 'string') {
|
7391 | keyframe = _optionalChain$1([value, 'access', _921 => _921.match, 'call', _922 => _922(/^\w+/), 'optionalAccess', _923 => _923[0]]);
|
7392 | styles = [ new Style(utility.class, new Property(prop, value)) ];
|
7393 | } else {
|
7394 | keyframe = value['animation'] || value['animationName'] || value['animation-name'];
|
7395 | if (config('prefixer')) {
|
7396 | const props = {};
|
7397 | for (const [k, v] of Object.entries(value)) {
|
7398 | if (k.startsWith('animation') || k.startsWith('backface')) {
|
7399 | props['-webkit-' + k] = v;
|
7400 | } else if (k.startsWith('transform')) {
|
7401 | props['-webkit-' + k] = v;
|
7402 | props['-ms-' + k] = v;
|
7403 | }
|
7404 | props[k] = v;
|
7405 | }
|
7406 | value = props;
|
7407 | }
|
7408 | styles = Style.generate(utility.class, value).map(i => i.updateMeta('utilities', 'animation', pluginOrder.animation, 2, true));
|
7409 | }
|
7410 |
|
7411 | if (styles) {
|
7412 | return [
|
7413 | ...styles.map(i => i.updateMeta('utilities', 'animation', pluginOrder.animation, 2, true)),
|
7414 | ... keyframe ? Keyframes.generate(
|
7415 | keyframe,
|
7416 | (_nullishCoalesce$2(theme(`keyframes.${keyframe}`), () => ( {}))) ,
|
7417 | undefined,
|
7418 | config('prefixer', false)
|
7419 | ).map(i => i.updateMeta('utilities', 'keyframes', pluginOrder.keyframes, 1, true)) : [],
|
7420 | ];
|
7421 | }
|
7422 | }
|
7423 | }
|
7424 |
|
7425 |
|
7426 | function transformOrigin(utility, { theme }) {
|
7427 | const body = utility.body;
|
7428 | const origins = toType(theme('transformOrigin'), 'object') ;
|
7429 | if (Object.keys(origins).includes(body)) return new Property(['-webkit-transform-origin', '-ms-transform-origin', 'transform-origin'], origins[body]).updateMeta('utilities', 'transformOrigin', pluginOrder.transformOrigin, 0, true);
|
7430 | }
|
7431 |
|
7432 |
|
7433 | function scale(utility, { theme }) {
|
7434 | return utility.handler
|
7435 | .handleStatic(theme('scale'))
|
7436 | .handleNumber(0, undefined, 'int', (number) => (number / 100).toString())
|
7437 | .handleVariable()
|
7438 | .callback(value => {
|
7439 | if (utility.raw.startsWith('scale-x')) return new Property('--tw-scale-x', value).updateMeta('utilities', 'scale', pluginOrder.scale, 2, true);
|
7440 | if (utility.raw.startsWith('scale-y')) return new Property('--tw-scale-y', value).updateMeta('utilities', 'scale', pluginOrder.scale, 3, true);
|
7441 | if (utility.raw.startsWith('scale-z')) return new Property('--tw-scale-z', value).updateMeta('utilities', 'scale', pluginOrder.scale, 4, true);
|
7442 | return new Property(['--tw-scale-x', '--tw-scale-y', '--tw-scale-z'], value).updateMeta('utilities', 'scale', pluginOrder.scale, 1, true);
|
7443 | });
|
7444 | }
|
7445 |
|
7446 |
|
7447 | function rotate(utility, { theme }) {
|
7448 | return utility.handler
|
7449 | .handleStatic(theme('rotate'))
|
7450 | .handleSquareBrackets()
|
7451 | .handleNumber(0, undefined, 'float', (number) => `${number}deg`)
|
7452 | .handleNegative()
|
7453 | .handleVariable()
|
7454 | .callback(value => {
|
7455 | const abs = utility.absolute;
|
7456 | if (abs.startsWith('rotate-x')) return new Property('--tw-rotate-x', value).updateMeta('utilities', 'rotate', pluginOrder.rotate, 2, true);
|
7457 | if (abs.startsWith('rotate-y')) return new Property('--tw-rotate-y', value).updateMeta('utilities', 'rotate', pluginOrder.rotate, 3, true);
|
7458 | if (abs.startsWith('rotate-z')) return new Property('--tw-rotate-z', value).updateMeta('utilities', 'rotate', pluginOrder.rotate, 4, true);
|
7459 | return new Property('--tw-rotate', value).updateMeta('utilities', 'rotate', pluginOrder.rotate, 1, true);
|
7460 | });
|
7461 | }
|
7462 |
|
7463 |
|
7464 | function translate(utility, { theme }) {
|
7465 | const centerMatch = utility.raw.match(/^-?translate-[x|y|z]/);
|
7466 | if (centerMatch) {
|
7467 | const center = centerMatch[0].replace(/^-?translate-/, '');
|
7468 | return _optionalChain$1([utility, 'access', _924 => _924.handler
|
7469 | , 'access', _925 => _925.handleStatic, 'call', _926 => _926(theme('translate'))
|
7470 | , 'access', _927 => _927.handleSquareBrackets, 'call', _928 => _928()
|
7471 | , 'access', _929 => _929.handleSpacing, 'call', _930 => _930()
|
7472 | , 'access', _931 => _931.handleFraction, 'call', _932 => _932()
|
7473 | , 'access', _933 => _933.handleSize, 'call', _934 => _934()
|
7474 | , 'access', _935 => _935.handleNegative, 'call', _936 => _936()
|
7475 | , 'access', _937 => _937.handleVariable, 'call', _938 => _938()
|
7476 | , 'access', _939 => _939.createProperty, 'call', _940 => _940(`--tw-translate-${center}`)
|
7477 | , 'optionalAccess', _941 => _941.updateMeta, 'call', _942 => _942('utilities', 'translate', pluginOrder.translate, utility.raw.charAt(0) === '-' ? 2 : 1, true)]);
|
7478 | }
|
7479 | }
|
7480 |
|
7481 |
|
7482 | function skew(utility, { theme }) {
|
7483 | const centerMatch = utility.raw.match(/^-?skew-[x|y]/);
|
7484 | if (centerMatch) {
|
7485 | const center = centerMatch[0].replace(/^-?skew-/, '');
|
7486 | return _optionalChain$1([utility, 'access', _943 => _943.handler
|
7487 | , 'access', _944 => _944.handleStatic, 'call', _945 => _945(theme('skew'))
|
7488 | , 'access', _946 => _946.handleSquareBrackets, 'call', _947 => _947()
|
7489 | , 'access', _948 => _948.handleNumber, 'call', _949 => _949(0, undefined, 'float', (number) => `${number}deg`)
|
7490 | , 'access', _950 => _950.handleNegative, 'call', _951 => _951()
|
7491 | , 'access', _952 => _952.handleVariable, 'call', _953 => _953()
|
7492 | , 'access', _954 => _954.createProperty, 'call', _955 => _955(`--tw-skew-${center}`)
|
7493 | , 'optionalAccess', _956 => _956.updateMeta, 'call', _957 => _957('utilities', 'skew', pluginOrder.skew, utility.raw.charAt(0) === '-' ? 2 : 1, true)]);
|
7494 | }
|
7495 | }
|
7496 |
|
7497 |
|
7498 | function perspective(utility, { theme }) {
|
7499 | if (utility.raw.startsWith('perspect-origin')) {
|
7500 | const origin = _optionalChain$1([utility, 'access', _958 => _958.clone, 'call', _959 => _959('perspectOrigin' + utility.raw.slice(15)), 'access', _960 => _960.handler
|
7501 | , 'access', _961 => _961.handleBody, 'call', _962 => _962(theme('perspectiveOrigin'))
|
7502 | , 'access', _963 => _963.handleSquareBrackets, 'call', _964 => _964()
|
7503 | , 'access', _965 => _965.createProperty, 'call', _966 => _966(['-webkit-perspective-origin', 'perspective-origin'])
|
7504 | , 'optionalAccess', _967 => _967.updateMeta, 'call', _968 => _968('utilities', 'perspectiveOrigin', pluginOrder.perspectiveOrigin, 0, true)]);
|
7505 | if (origin) return origin;
|
7506 | }
|
7507 | return _optionalChain$1([utility, 'access', _969 => _969.handler
|
7508 | , 'access', _970 => _970.handleStatic, 'call', _971 => _971(theme('perspective'))
|
7509 | , 'access', _972 => _972.handleNumber, 'call', _973 => _973(0, undefined, 'int', number => `${number}px`)
|
7510 | , 'access', _974 => _974.handleSize, 'call', _975 => _975()
|
7511 | , 'access', _976 => _976.handleSquareBrackets, 'call', _977 => _977()
|
7512 | , 'access', _978 => _978.createProperty, 'call', _979 => _979(['-webkit-perspective', 'perspective'])
|
7513 | , 'optionalAccess', _980 => _980.updateMeta, 'call', _981 => _981('utilities', 'perspective', pluginOrder.perspective, 0, true)]);
|
7514 | }
|
7515 |
|
7516 |
|
7517 | function cursor(utility, { theme }) {
|
7518 | const body = utility.body;
|
7519 | const cursors = toType(theme('cursor'), 'object') ;
|
7520 | if (Object.keys(cursors).includes(body)) return new Property('cursor', cursors[body]).updateMeta('utilities', 'cursor', pluginOrder.cursor, 1, true);
|
7521 | }
|
7522 |
|
7523 |
|
7524 | function outline(utility, { theme }) {
|
7525 | const amount = utility.amount;
|
7526 | const staticMap = toType(theme('outline'), 'object') ;
|
7527 | if (Object.keys(staticMap).includes(amount))
|
7528 | return new Style(utility.class, [ new Property('outline', staticMap[amount][0]), new Property('outline-offset', staticMap[amount][1]) ]).updateMeta('utilities', 'outline', pluginOrder.outline, 1, true);
|
7529 |
|
7530 | if (utility.raw.startsWith('outline-opacity')) {
|
7531 | return _optionalChain$1([utility, 'access', _982 => _982.handler
|
7532 | , 'access', _983 => _983.handleStatic, 'call', _984 => _984(theme('opacity'))
|
7533 | , 'access', _985 => _985.handleNumber, 'call', _986 => _986(0, 100, 'int', (number) => (number / 100).toString())
|
7534 | , 'access', _987 => _987.handleVariable, 'call', _988 => _988()
|
7535 | , 'access', _989 => _989.createProperty, 'call', _990 => _990('--tw-outline-opacity')
|
7536 | , 'optionalAccess', _991 => _991.updateMeta, 'call', _992 => _992('utilities', 'outline', pluginOrder.outline, 4, true)]);
|
7537 | }
|
7538 |
|
7539 | if (utility.raw.match(/^outline-(solid|dotted)/)) {
|
7540 | const newUtility = utility.clone(utility.raw.replace('outline-', ''));
|
7541 | const outlineColor = newUtility.handler
|
7542 | .handleStatic({ none: 'transparent', white: 'white', black: 'black' })
|
7543 | .handleColor()
|
7544 | .handleOpacity(theme('opacity'))
|
7545 | .handleVariable()
|
7546 | .createColorValue('var(--tw-outline-opacity, 1)');
|
7547 |
|
7548 | if (outlineColor) return new Style(utility.class, [
|
7549 | new Property('outline', `2px ${newUtility.identifier} ${outlineColor}`),
|
7550 | new Property('outline-offset', '2px') ]
|
7551 | ).updateMeta('utilities', 'outline', pluginOrder.outline, 3, true);
|
7552 | }
|
7553 |
|
7554 | const handler = utility.handler.handleColor().handleOpacity(theme('opacity')).handleSquareBrackets().handleVariable((variable) => utility.raw.startsWith('outline-$') ? `var(--${variable})` : undefined);
|
7555 | const color = handler.createColorValue();
|
7556 | if (color) return _optionalChain$1([new Style(utility.class, [
|
7557 | new Property('outline', `2px ${ handler.value === 'transparent' ? 'solid' : 'dotted'} ${color}`),
|
7558 | new Property('outline-offset', '2px'),
|
7559 | ]), 'optionalAccess', _993 => _993.updateMeta, 'call', _994 => _994('utilities', 'outline', pluginOrder.outline, 2, true)]);
|
7560 | }
|
7561 |
|
7562 |
|
7563 | function fill(utility, { theme }) {
|
7564 | if (utility.raw.startsWith('fill-opacity')) {
|
7565 | return _optionalChain$1([utility, 'access', _995 => _995.handler
|
7566 | , 'access', _996 => _996.handleStatic, 'call', _997 => _997(theme('opacity'))
|
7567 | , 'access', _998 => _998.handleNumber, 'call', _999 => _999(0, 100, 'int', (number) => (number / 100).toString())
|
7568 | , 'access', _1000 => _1000.handleVariable, 'call', _1001 => _1001()
|
7569 | , 'access', _1002 => _1002.createProperty, 'call', _1003 => _1003('--tw-fill-opacity')
|
7570 | , 'optionalAccess', _1004 => _1004.updateMeta, 'call', _1005 => _1005('utilities', 'fill', pluginOrder.ringOffsetColor, 2, true)]);
|
7571 | }
|
7572 | return _optionalChain$1([utility, 'access', _1006 => _1006.handler
|
7573 | , 'access', _1007 => _1007.handleColor, 'call', _1008 => _1008(theme('fill'))
|
7574 | , 'access', _1009 => _1009.handleOpacity, 'call', _1010 => _1010(theme('opacity'))
|
7575 | , 'access', _1011 => _1011.handleSquareBrackets, 'call', _1012 => _1012()
|
7576 | , 'access', _1013 => _1013.handleVariable, 'call', _1014 => _1014()
|
7577 | , 'access', _1015 => _1015.createColorStyle, 'call', _1016 => _1016(utility.class, 'fill', '--tw-fill-opacity')
|
7578 | , 'optionalAccess', _1017 => _1017.updateMeta, 'call', _1018 => _1018('utilities', 'fill', pluginOrder.fill, 1, true)]);
|
7579 | }
|
7580 |
|
7581 |
|
7582 |
|
7583 | function stroke(utility, { theme }) {
|
7584 | if (utility.raw.startsWith('stroke-dash')) {
|
7585 | return _optionalChain$1([utility, 'access', _1019 => _1019.handler, 'access', _1020 => _1020.handleNumber, 'call', _1021 => _1021(), 'access', _1022 => _1022.createProperty, 'call', _1023 => _1023('stroke-dasharray'), 'optionalAccess', _1024 => _1024.updateMeta, 'call', _1025 => _1025('utilities', 'strokeDashArray', pluginOrder.strokeDashArray, 0, true)]);
|
7586 | }
|
7587 | if (utility.raw.startsWith('stroke-offset')) {
|
7588 | return _optionalChain$1([utility, 'access', _1026 => _1026.handler, 'access', _1027 => _1027.handleNumber, 'call', _1028 => _1028(), 'access', _1029 => _1029.createProperty, 'call', _1030 => _1030('stroke-dashoffset'), 'optionalAccess', _1031 => _1031.updateMeta, 'call', _1032 => _1032('utilities', 'strokeDashOffset', pluginOrder.strokeDashOffset, 0, true)]);
|
7589 | }
|
7590 |
|
7591 | if (utility.raw.startsWith('stroke-opacity')) {
|
7592 | return _optionalChain$1([utility, 'access', _1033 => _1033.handler
|
7593 | , 'access', _1034 => _1034.handleStatic, 'call', _1035 => _1035(theme('opacity'))
|
7594 | , 'access', _1036 => _1036.handleNumber, 'call', _1037 => _1037(0, 100, 'int', (number) => (number / 100).toString())
|
7595 | , 'access', _1038 => _1038.handleVariable, 'call', _1039 => _1039()
|
7596 | , 'access', _1040 => _1040.createProperty, 'call', _1041 => _1041('--tw-stroke-opacity')
|
7597 | , 'optionalAccess', _1042 => _1042.updateMeta, 'call', _1043 => _1043('utilities', 'stroke', pluginOrder.stroke, 2, true)]);
|
7598 | }
|
7599 | return _optionalChain$1([utility, 'access', _1044 => _1044.handler
|
7600 | , 'access', _1045 => _1045.handleColor, 'call', _1046 => _1046(theme('stroke'))
|
7601 | , 'access', _1047 => _1047.handleOpacity, 'call', _1048 => _1048(theme('opacity'))
|
7602 | , 'access', _1049 => _1049.handleVariable, 'call', _1050 => _1050()
|
7603 | , 'access', _1051 => _1051.handleSquareBrackets, 'call', _1052 => _1052()
|
7604 | , 'access', _1053 => _1053.createColorStyle, 'call', _1054 => _1054(utility.class, 'stroke', '--tw-stroke-opacity')
|
7605 | , 'optionalAccess', _1055 => _1055.updateMeta, 'call', _1056 => _1056('utilities', 'stroke', pluginOrder.stroke, 1, true)])
|
7606 | || (utility.raw.startsWith('stroke-$')
|
7607 | ? _optionalChain$1([utility, 'access', _1057 => _1057.handler
|
7608 | , 'access', _1058 => _1058.handleVariable, 'call', _1059 => _1059()
|
7609 | , 'access', _1060 => _1060.createProperty, 'call', _1061 => _1061('stroke-width')
|
7610 | , 'optionalAccess', _1062 => _1062.updateMeta, 'call', _1063 => _1063('utilities', 'strokeWidth', pluginOrder.strokeWidth, 2, true)])
|
7611 | : _optionalChain$1([utility, 'access', _1064 => _1064.handler
|
7612 | , 'access', _1065 => _1065.handleStatic, 'call', _1066 => _1066(theme('strokeWidth'))
|
7613 | , 'access', _1067 => _1067.handleNumber, 'call', _1068 => _1068(0, undefined, 'int')
|
7614 | , 'access', _1069 => _1069.createProperty, 'call', _1070 => _1070('stroke-width')
|
7615 | , 'optionalAccess', _1071 => _1071.updateMeta, 'call', _1072 => _1072('utilities', 'strokeWidth', pluginOrder.strokeWidth, 1, true)])
|
7616 | );
|
7617 | }
|
7618 |
|
7619 | function content(utility, { theme }) {
|
7620 | if (!utility.raw.startsWith('content-'))
|
7621 | return;
|
7622 | return _optionalChain$1([utility, 'access', _1073 => _1073.handler
|
7623 | , 'access', _1074 => _1074.handleBody, 'call', _1075 => _1075(theme('content'))
|
7624 | , 'access', _1076 => _1076.handleSquareBrackets, 'call', _1077 => _1077()
|
7625 | , 'access', _1078 => _1078.handleVariable, 'call', _1079 => _1079()
|
7626 | , 'access', _1080 => _1080.handleString, 'call', _1081 => _1081((string) => `"${string}"`)
|
7627 | , 'access', _1082 => _1082.createProperty, 'call', _1083 => _1083('content')
|
7628 | , 'optionalAccess', _1084 => _1084.updateMeta, 'call', _1085 => _1085('utilities', 'content', pluginOrder.content, 1, true)]);
|
7629 | }
|
7630 |
|
7631 | const dynamicUtilities = {
|
7632 | container: container,
|
7633 | space: space,
|
7634 | divide: divide,
|
7635 | bg: background,
|
7636 | from: gradientColorFrom,
|
7637 | via: gradientColorVia,
|
7638 | to: gradientColorTo,
|
7639 | border: border,
|
7640 | rounded: borderRadius,
|
7641 | cursor: cursor,
|
7642 | flex: flex,
|
7643 | order: order,
|
7644 | font: font,
|
7645 | h: size,
|
7646 | leading: lineHeight,
|
7647 | list: listStyleType,
|
7648 | m: margin,
|
7649 | my: margin,
|
7650 | mx: margin,
|
7651 | mt: margin,
|
7652 | mr: margin,
|
7653 | mb: margin,
|
7654 | ml: margin,
|
7655 | min: minMaxSize,
|
7656 | max: minMaxSize,
|
7657 | object: objectPosition,
|
7658 | opacity: opacity,
|
7659 | outline: outline,
|
7660 | p: padding,
|
7661 | py: padding,
|
7662 | px: padding,
|
7663 | pt: padding,
|
7664 | pr: padding,
|
7665 | pb: padding,
|
7666 | pl: padding,
|
7667 | placeholder: placeholder,
|
7668 | caret: caret,
|
7669 | tab: tabSize,
|
7670 | indent: textIndent,
|
7671 | inset: inset,
|
7672 | top: inset,
|
7673 | right: inset,
|
7674 | bottom: inset,
|
7675 | left: inset,
|
7676 | shadow: boxShadow,
|
7677 | ring: ring,
|
7678 | blur: blur,
|
7679 | brightness: brightness,
|
7680 | contrast: contrast,
|
7681 | drop: dropShadow,
|
7682 | grayscale: grayscale,
|
7683 | hue: hueRotate,
|
7684 | invert: invert,
|
7685 | saturate: saturate,
|
7686 | sepia: sepia,
|
7687 | backdrop: backdrop,
|
7688 | fill: fill,
|
7689 | stroke: stroke,
|
7690 | text: text,
|
7691 | tracking: letterSpacing,
|
7692 | underline: textDecoration,
|
7693 | w: size,
|
7694 | z: zIndex,
|
7695 | gap: gap,
|
7696 | auto: gridAuto,
|
7697 | grid: gridTemplate,
|
7698 | col: gridColumn,
|
7699 | row: gridRow,
|
7700 | origin: transformOrigin,
|
7701 | scale: scale,
|
7702 | rotate: rotate,
|
7703 | translate: translate,
|
7704 | skew: skew,
|
7705 | perspect: perspective,
|
7706 | transition: transition,
|
7707 | ease: transitionTimingFunction,
|
7708 | duration: duration,
|
7709 | delay: delay,
|
7710 | content: content,
|
7711 | animate: animation,
|
7712 | };
|
7713 |
|
7714 | const colors = {
|
7715 | black: '#000',
|
7716 | white: '#fff',
|
7717 | rose: {
|
7718 | 50: '#fff1f2',
|
7719 | 100: '#ffe4e6',
|
7720 | 200: '#fecdd3',
|
7721 | 300: '#fda4af',
|
7722 | 400: '#fb7185',
|
7723 | 500: '#f43f5e',
|
7724 | 600: '#e11d48',
|
7725 | 700: '#be123c',
|
7726 | 800: '#9f1239',
|
7727 | 900: '#881337',
|
7728 | },
|
7729 | pink: {
|
7730 | 50: '#fdf2f8',
|
7731 | 100: '#fce7f3',
|
7732 | 200: '#fbcfe8',
|
7733 | 300: '#f9a8d4',
|
7734 | 400: '#f472b6',
|
7735 | 500: '#ec4899',
|
7736 | 600: '#db2777',
|
7737 | 700: '#be185d',
|
7738 | 800: '#9d174d',
|
7739 | 900: '#831843',
|
7740 | },
|
7741 | fuchsia: {
|
7742 | 50: '#fdf4ff',
|
7743 | 100: '#fae8ff',
|
7744 | 200: '#f5d0fe',
|
7745 | 300: '#f0abfc',
|
7746 | 400: '#e879f9',
|
7747 | 500: '#d946ef',
|
7748 | 600: '#c026d3',
|
7749 | 700: '#a21caf',
|
7750 | 800: '#86198f',
|
7751 | 900: '#701a75',
|
7752 | },
|
7753 | purple: {
|
7754 | 50: '#faf5ff',
|
7755 | 100: '#f3e8ff',
|
7756 | 200: '#e9d5ff',
|
7757 | 300: '#d8b4fe',
|
7758 | 400: '#c084fc',
|
7759 | 500: '#a855f7',
|
7760 | 600: '#9333ea',
|
7761 | 700: '#7e22ce',
|
7762 | 800: '#6b21a8',
|
7763 | 900: '#581c87',
|
7764 | },
|
7765 | violet: {
|
7766 | 50: '#f5f3ff',
|
7767 | 100: '#ede9fe',
|
7768 | 200: '#ddd6fe',
|
7769 | 300: '#c4b5fd',
|
7770 | 400: '#a78bfa',
|
7771 | 500: '#8b5cf6',
|
7772 | 600: '#7c3aed',
|
7773 | 700: '#6d28d9',
|
7774 | 800: '#5b21b6',
|
7775 | 900: '#4c1d95',
|
7776 | },
|
7777 | indigo: {
|
7778 | 50: '#eef2ff',
|
7779 | 100: '#e0e7ff',
|
7780 | 200: '#c7d2fe',
|
7781 | 300: '#a5b4fc',
|
7782 | 400: '#818cf8',
|
7783 | 500: '#6366f1',
|
7784 | 600: '#4f46e5',
|
7785 | 700: '#4338ca',
|
7786 | 800: '#3730a3',
|
7787 | 900: '#312e81',
|
7788 | },
|
7789 | blue: {
|
7790 | 50: '#eff6ff',
|
7791 | 100: '#dbeafe',
|
7792 | 200: '#bfdbfe',
|
7793 | 300: '#93c5fd',
|
7794 | 400: '#60a5fa',
|
7795 | 500: '#3b82f6',
|
7796 | 600: '#2563eb',
|
7797 | 700: '#1d4ed8',
|
7798 | 800: '#1e40af',
|
7799 | 900: '#1e3a8a',
|
7800 | },
|
7801 | lightBlue: {
|
7802 | 50: '#f0f9ff',
|
7803 | 100: '#e0f2fe',
|
7804 | 200: '#bae6fd',
|
7805 | 300: '#7dd3fc',
|
7806 | 400: '#38bdf8',
|
7807 | 500: '#0ea5e9',
|
7808 | 600: '#0284c7',
|
7809 | 700: '#0369a1',
|
7810 | 800: '#075985',
|
7811 | 900: '#0c4a6e',
|
7812 | },
|
7813 | sky: {
|
7814 | 50: '#f0f9ff',
|
7815 | 100: '#e0f2fe',
|
7816 | 200: '#bae6fd',
|
7817 | 300: '#7dd3fc',
|
7818 | 400: '#38bdf8',
|
7819 | 500: '#0ea5e9',
|
7820 | 600: '#0284c7',
|
7821 | 700: '#0369a1',
|
7822 | 800: '#075985',
|
7823 | 900: '#0c4a6e',
|
7824 | },
|
7825 | cyan: {
|
7826 | 50: '#ecfeff',
|
7827 | 100: '#cffafe',
|
7828 | 200: '#a5f3fc',
|
7829 | 300: '#67e8f9',
|
7830 | 400: '#22d3ee',
|
7831 | 500: '#06b6d4',
|
7832 | 600: '#0891b2',
|
7833 | 700: '#0e7490',
|
7834 | 800: '#155e75',
|
7835 | 900: '#164e63',
|
7836 | },
|
7837 | teal: {
|
7838 | 50: '#f0fdfa',
|
7839 | 100: '#ccfbf1',
|
7840 | 200: '#99f6e4',
|
7841 | 300: '#5eead4',
|
7842 | 400: '#2dd4bf',
|
7843 | 500: '#14b8a6',
|
7844 | 600: '#0d9488',
|
7845 | 700: '#0f766e',
|
7846 | 800: '#115e59',
|
7847 | 900: '#134e4a',
|
7848 | },
|
7849 | emerald: {
|
7850 | 50: '#ecfdf5',
|
7851 | 100: '#d1fae5',
|
7852 | 200: '#a7f3d0',
|
7853 | 300: '#6ee7b7',
|
7854 | 400: '#34d399',
|
7855 | 500: '#10b981',
|
7856 | 600: '#059669',
|
7857 | 700: '#047857',
|
7858 | 800: '#065f46',
|
7859 | 900: '#064e3b',
|
7860 | },
|
7861 | green: {
|
7862 | 50: '#f0fdf4',
|
7863 | 100: '#dcfce7',
|
7864 | 200: '#bbf7d0',
|
7865 | 300: '#86efac',
|
7866 | 400: '#4ade80',
|
7867 | 500: '#22c55e',
|
7868 | 600: '#16a34a',
|
7869 | 700: '#15803d',
|
7870 | 800: '#166534',
|
7871 | 900: '#14532d',
|
7872 | },
|
7873 | lime: {
|
7874 | 50: '#f7fee7',
|
7875 | 100: '#ecfccb',
|
7876 | 200: '#d9f99d',
|
7877 | 300: '#bef264',
|
7878 | 400: '#a3e635',
|
7879 | 500: '#84cc16',
|
7880 | 600: '#65a30d',
|
7881 | 700: '#4d7c0f',
|
7882 | 800: '#3f6212',
|
7883 | 900: '#365314',
|
7884 | },
|
7885 | yellow: {
|
7886 | 50: '#fefce8',
|
7887 | 100: '#fef9c3',
|
7888 | 200: '#fef08a',
|
7889 | 300: '#fde047',
|
7890 | 400: '#facc15',
|
7891 | 500: '#eab308',
|
7892 | 600: '#ca8a04',
|
7893 | 700: '#a16207',
|
7894 | 800: '#854d0e',
|
7895 | 900: '#713f12',
|
7896 | },
|
7897 | amber: {
|
7898 | 50: '#fffbeb',
|
7899 | 100: '#fef3c7',
|
7900 | 200: '#fde68a',
|
7901 | 300: '#fcd34d',
|
7902 | 400: '#fbbf24',
|
7903 | 500: '#f59e0b',
|
7904 | 600: '#d97706',
|
7905 | 700: '#b45309',
|
7906 | 800: '#92400e',
|
7907 | 900: '#78350f',
|
7908 | },
|
7909 | orange: {
|
7910 | 50: '#fff7ed',
|
7911 | 100: '#ffedd5',
|
7912 | 200: '#fed7aa',
|
7913 | 300: '#fdba74',
|
7914 | 400: '#fb923c',
|
7915 | 500: '#f97316',
|
7916 | 600: '#ea580c',
|
7917 | 700: '#c2410c',
|
7918 | 800: '#9a3412',
|
7919 | 900: '#7c2d12',
|
7920 | },
|
7921 | red: {
|
7922 | 50: '#fef2f2',
|
7923 | 100: '#fee2e2',
|
7924 | 200: '#fecaca',
|
7925 | 300: '#fca5a5',
|
7926 | 400: '#f87171',
|
7927 | 500: '#ef4444',
|
7928 | 600: '#dc2626',
|
7929 | 700: '#b91c1c',
|
7930 | 800: '#991b1b',
|
7931 | 900: '#7f1d1d',
|
7932 | },
|
7933 | warmGray: {
|
7934 | 50: '#fafaf9',
|
7935 | 100: '#f5f5f4',
|
7936 | 200: '#e7e5e4',
|
7937 | 300: '#d6d3d1',
|
7938 | 400: '#a8a29e',
|
7939 | 500: '#78716c',
|
7940 | 600: '#57534e',
|
7941 | 700: '#44403c',
|
7942 | 800: '#292524',
|
7943 | 900: '#1c1917',
|
7944 | },
|
7945 | trueGray: {
|
7946 | 50: '#fafafa',
|
7947 | 100: '#f5f5f5',
|
7948 | 200: '#e5e5e5',
|
7949 | 300: '#d4d4d4',
|
7950 | 400: '#a3a3a3',
|
7951 | 500: '#737373',
|
7952 | 600: '#525252',
|
7953 | 700: '#404040',
|
7954 | 800: '#262626',
|
7955 | 900: '#171717',
|
7956 | },
|
7957 | gray: {
|
7958 | 50: '#fafafa',
|
7959 | 100: '#f4f4f5',
|
7960 | 200: '#e4e4e7',
|
7961 | 300: '#d4d4d8',
|
7962 | 400: '#a1a1aa',
|
7963 | 500: '#71717a',
|
7964 | 600: '#52525b',
|
7965 | 700: '#3f3f46',
|
7966 | 800: '#27272a',
|
7967 | 900: '#18181b',
|
7968 | },
|
7969 | coolGray: {
|
7970 | 50: '#f9fafb',
|
7971 | 100: '#f3f4f6',
|
7972 | 200: '#e5e7eb',
|
7973 | 300: '#d1d5db',
|
7974 | 400: '#9ca3af',
|
7975 | 500: '#6b7280',
|
7976 | 600: '#4b5563',
|
7977 | 700: '#374151',
|
7978 | 800: '#1f2937',
|
7979 | 900: '#111827',
|
7980 | },
|
7981 | blueGray: {
|
7982 | 50: '#f8fafc',
|
7983 | 100: '#f1f5f9',
|
7984 | 200: '#e2e8f0',
|
7985 | 300: '#cbd5e1',
|
7986 | 400: '#94a3b8',
|
7987 | 500: '#64748b',
|
7988 | 600: '#475569',
|
7989 | 700: '#334155',
|
7990 | 800: '#1e293b',
|
7991 | 900: '#0f172a',
|
7992 | },
|
7993 | light: {
|
7994 | 50: '#fdfdfd',
|
7995 | 100: '#fcfcfc',
|
7996 | 200: '#fafafa',
|
7997 | 300: '#f8f9fa',
|
7998 | 400: '#f6f6f6',
|
7999 | 500: '#f2f2f2',
|
8000 | 600: '#f1f3f5',
|
8001 | 700: '#e9ecef',
|
8002 | 800: '#dee2e6',
|
8003 | 900: '#dde1e3',
|
8004 | },
|
8005 | dark: {
|
8006 | 50: '#4a4a4a',
|
8007 | 100: '#3c3c3c',
|
8008 | 200: '#323232',
|
8009 | 300: '#2d2d2d',
|
8010 | 400: '#222222',
|
8011 | 500: '#1f1f1f',
|
8012 | 600: '#1c1c1e',
|
8013 | 700: '#1b1b1b',
|
8014 | 800: '#181818',
|
8015 | 900: '#0f0f0f',
|
8016 | },
|
8017 | };
|
8018 |
|
8019 | const keyframes = {
|
8020 | spin: {
|
8021 | from: {
|
8022 | transform: 'rotate(0deg)',
|
8023 | },
|
8024 | to: {
|
8025 | transform: 'rotate(360deg)',
|
8026 | },
|
8027 | },
|
8028 | ping: {
|
8029 | '0%': {
|
8030 | transform: 'scale(1)',
|
8031 | opacity: '1',
|
8032 | },
|
8033 | '75%, 100%': {
|
8034 | transform: 'scale(2)',
|
8035 | opacity: '0',
|
8036 | },
|
8037 | },
|
8038 | pulse: {
|
8039 | '0%, 100%': {
|
8040 | opacity: '1',
|
8041 | },
|
8042 | '50%': {
|
8043 | opacity: '.5',
|
8044 | },
|
8045 | },
|
8046 | bounce: {
|
8047 | '0%, 100%': {
|
8048 | transform: 'translateY(-25%)',
|
8049 | animationTimingFunction: 'cubic-bezier(0.8,0,1,1)',
|
8050 | },
|
8051 | '50%': {
|
8052 | transform: 'translateY(0)',
|
8053 | animationTimingFunction: 'cubic-bezier(0,0,0.2,1)',
|
8054 | },
|
8055 | },
|
8056 | shock: {
|
8057 | 'from, 20%, 53%, 80%, to': {
|
8058 | animationTimingFunction: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
8059 | transform: 'translate3d(0, 0, 0)',
|
8060 | },
|
8061 | '40%, 43%': {
|
8062 | animationTimingFunction: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',
|
8063 | transform: 'translate3d(0, -30px, 0)',
|
8064 | },
|
8065 | '70%': {
|
8066 | animationTimingFunction: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',
|
8067 | transform: 'translate3d(0, -15px, 0)',
|
8068 | },
|
8069 | '90%': {
|
8070 | transform: 'translate3d(0, -4px, 0)',
|
8071 | },
|
8072 | },
|
8073 | flash: {
|
8074 | 'from, 50%, to': {
|
8075 | opacity: '1',
|
8076 | },
|
8077 | '25%, 75%': {
|
8078 | opacity: '0',
|
8079 | },
|
8080 | },
|
8081 | bubble: {
|
8082 | 'from': {
|
8083 | transform: 'scale3d(1, 1, 1)',
|
8084 | },
|
8085 | '50%': {
|
8086 | transform: 'scale3d(1.05, 1.05, 1.05)',
|
8087 | },
|
8088 | 'to': {
|
8089 | transform: 'scale3d(1, 1, 1)',
|
8090 | },
|
8091 | },
|
8092 | rubberBand: {
|
8093 | 'from': {
|
8094 | transform: 'scale3d(1, 1, 1)',
|
8095 | },
|
8096 | '30%': {
|
8097 | transform: 'scale3d(1.25, 0.75, 1)',
|
8098 | },
|
8099 | '40%': {
|
8100 | transform: 'scale3d(0.75, 1.25, 1)',
|
8101 | },
|
8102 | '50%': {
|
8103 | transform: 'scale3d(1.15, 0.85, 1)',
|
8104 | },
|
8105 | '65%': {
|
8106 | transform: 'scale3d(0.95, 1.05, 1)',
|
8107 | },
|
8108 | '75%': {
|
8109 | transform: 'scale3d(1.05, 0.95, 1)',
|
8110 | },
|
8111 | 'to': {
|
8112 | transform: 'scale3d(1, 1, 1)',
|
8113 | },
|
8114 | },
|
8115 | shakeX: {
|
8116 | 'from, to': {
|
8117 | transform: 'translate3d(0, 0, 0)',
|
8118 | },
|
8119 | '10%, 30%, 50%, 70%, 90%': {
|
8120 | transform: 'translate3d(-10px, 0, 0)',
|
8121 | },
|
8122 | '20%, 40%, 60%, 80%': {
|
8123 | transform: 'translate3d(10px, 0, 0)',
|
8124 | },
|
8125 | },
|
8126 | shakeY: {
|
8127 | 'from, to': {
|
8128 | transform: 'translate3d(0, 0, 0)',
|
8129 | },
|
8130 | '10%, 30%, 50%, 70%, 90%': {
|
8131 | transform: 'translate3d(0, -10px, 0)',
|
8132 | },
|
8133 | '20%, 40%, 60%, 80%': {
|
8134 | transform: 'translate3d(0, 10px, 0)',
|
8135 | },
|
8136 | },
|
8137 | headShake: {
|
8138 | '0%': {
|
8139 | transform: 'translateX(0)',
|
8140 | },
|
8141 | '6.5%': {
|
8142 | transform: 'translateX(-6px) rotateY(-9deg)',
|
8143 | },
|
8144 | '18.5%': {
|
8145 | transform: 'translateX(5px) rotateY(7deg)',
|
8146 | },
|
8147 | '31.5%': {
|
8148 | transform: 'translateX(-3px) rotateY(-5deg)',
|
8149 | },
|
8150 | '43.5%': {
|
8151 | transform: 'translateX(2px) rotateY(3deg)',
|
8152 | },
|
8153 | '50%': {
|
8154 | transform: 'translateX(0)',
|
8155 | },
|
8156 | },
|
8157 | swing: {
|
8158 | '20%': {
|
8159 | transform: 'rotate3d(0, 0, 1, 15deg)',
|
8160 | },
|
8161 | '40%': {
|
8162 | transform: 'rotate3d(0, 0, 1, -10deg)',
|
8163 | },
|
8164 | '60%': {
|
8165 | transform: 'rotate3d(0, 0, 1, 5deg)',
|
8166 | },
|
8167 | '80%': {
|
8168 | transform: 'rotate3d(0, 0, 1, -5deg)',
|
8169 | },
|
8170 | 'to': {
|
8171 | transform: 'rotate3d(0, 0, 1, 0deg)',
|
8172 | },
|
8173 | },
|
8174 | tada: {
|
8175 | 'from': {
|
8176 | transform: 'scale3d(1, 1, 1)',
|
8177 | },
|
8178 | '10%, 20%': {
|
8179 | transform: 'scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)',
|
8180 | },
|
8181 | '30%, 50%, 70%, 90%': {
|
8182 | transform: 'scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)',
|
8183 | },
|
8184 | '40%, 60%, 80%': {
|
8185 | transform: 'scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)',
|
8186 | },
|
8187 | 'to': {
|
8188 | transform: 'scale3d(1, 1, 1)',
|
8189 | },
|
8190 | },
|
8191 | wobble: {
|
8192 | 'from': {
|
8193 | transform: 'translate3d(0, 0, 0)',
|
8194 | },
|
8195 | '15%': {
|
8196 | transform: 'translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg)',
|
8197 | },
|
8198 | '30%': {
|
8199 |
|
8200 | transform: 'translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)',
|
8201 | },
|
8202 | '45%': {
|
8203 | transform: 'translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)',
|
8204 | },
|
8205 | '60%': {
|
8206 | transform: 'translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)',
|
8207 | },
|
8208 | '75%': {
|
8209 | transform: 'translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)',
|
8210 | },
|
8211 | 'to': {
|
8212 | transform: 'translate3d(0, 0, 0)',
|
8213 | },
|
8214 | },
|
8215 | jello: {
|
8216 | 'from, 11.1% to': {
|
8217 | transform: 'translate3d(0, 0, 0)',
|
8218 | },
|
8219 | '22.2%': {
|
8220 | transform: 'skewX(-12.5deg) skewY(-12.5deg)',
|
8221 | },
|
8222 | '33.3%': {
|
8223 |
|
8224 | transform: 'skewX(6.25deg) skewY(6.25deg)',
|
8225 | },
|
8226 | '44.4%': {
|
8227 | transform: 'skewX(-3.125deg) skewY(-3.125deg)',
|
8228 | },
|
8229 | '55.5%': {
|
8230 | transform: 'skewX(1.5625deg) skewY(1.5625deg)',
|
8231 | },
|
8232 | '66.6%': {
|
8233 | transform: 'skewX(-0.78125deg) skewY(-0.78125deg)',
|
8234 | },
|
8235 | '77.7%': {
|
8236 | transform: 'skewX(0.390625deg) skewY(0.390625deg)',
|
8237 | },
|
8238 | '88.8%': {
|
8239 | transform: 'skewX(-0.1953125deg) skewY(-0.1953125deg)',
|
8240 | },
|
8241 | },
|
8242 | heartBeat: {
|
8243 | '0%': {
|
8244 | transform: 'scale(1)',
|
8245 | },
|
8246 | '14%': {
|
8247 | transform: 'scale(1.3)',
|
8248 | },
|
8249 | '28%': {
|
8250 | transform: 'scale(1)',
|
8251 | },
|
8252 | '42%': {
|
8253 | transform: 'scale(1.3)',
|
8254 | },
|
8255 | '70%': {
|
8256 | transform: 'scale(1)',
|
8257 | },
|
8258 | },
|
8259 | hinge: {
|
8260 | '0%': {
|
8261 | transformOrigin: 'top left',
|
8262 | animationTimingFunction: 'ease-in-out',
|
8263 | },
|
8264 | '20%, 60%': {
|
8265 | transform: 'rotate3d(0, 0, 1, 80deg)',
|
8266 | transformOrigin: 'top left',
|
8267 | animationTimingFunction: 'ease-in-out',
|
8268 | },
|
8269 | '40%, 80%': {
|
8270 | transform: 'rotate3d(0, 0, 1, 60deg)',
|
8271 | transformOrigin: 'top left',
|
8272 | animationTimingFunction: 'ease-in-out',
|
8273 | },
|
8274 | 'to': {
|
8275 | transform: 'translate3d(0, 700px, 0)',
|
8276 | opacity: '0',
|
8277 | },
|
8278 | },
|
8279 | jackInTheBox: {
|
8280 | 'from': {
|
8281 | opacity: '0',
|
8282 | transformOrigin: 'center bottom',
|
8283 | transform: 'scale(0.1) rotate(30deg)',
|
8284 | },
|
8285 | '50%': {
|
8286 | transform: 'rotate(-10deg)',
|
8287 | },
|
8288 | '70%': {
|
8289 | transform: 'rotate(3deg)',
|
8290 | },
|
8291 | 'to': {
|
8292 | transform: 'scale(1)',
|
8293 | },
|
8294 | },
|
8295 |
|
8296 |
|
8297 | lightSpeedInRight: {
|
8298 | 'from': {
|
8299 | opacity: '0',
|
8300 | transform: 'translate3d(100%, 0, 0) skewX(-30deg)',
|
8301 | },
|
8302 | '60%': {
|
8303 | opacity: '1',
|
8304 | transform: 'skewX(20deg)',
|
8305 | },
|
8306 | '80%': {
|
8307 | transform: 'skewX(-5deg)',
|
8308 | },
|
8309 | 'to': {
|
8310 | transform: 'translate3d(0, 0, 0)',
|
8311 | },
|
8312 | },
|
8313 | lightSpeedInLeft: {
|
8314 | 'from': {
|
8315 | opacity: '0',
|
8316 | transform: 'translate3d(100%, 0, 0) skewX(-30deg)',
|
8317 | },
|
8318 | '60%': {
|
8319 | opacity: '1',
|
8320 | transform: 'skewX(20deg)',
|
8321 | },
|
8322 | '80%': {
|
8323 | transform: 'skewX(-5deg)',
|
8324 | },
|
8325 | 'to': {
|
8326 | transform: 'translate3d(0, 0, 0)',
|
8327 | },
|
8328 | },
|
8329 | lightSpeedOutLeft: {
|
8330 | 'from': {
|
8331 | opacity: '1',
|
8332 | },
|
8333 | 'to': {
|
8334 | opacity: '0',
|
8335 | transform: 'translate3d(100%, 0, 0) skewX(30deg)',
|
8336 | },
|
8337 | },
|
8338 | lightSpeedOutRight: {
|
8339 | 'from': {
|
8340 | opacity: '1',
|
8341 | },
|
8342 | 'to': {
|
8343 | opacity: '0',
|
8344 | transform: 'translate3d(100%, 0, 0) skewX(30deg)',
|
8345 | },
|
8346 | },
|
8347 |
|
8348 | flip: {
|
8349 | 'from': {
|
8350 | transform: 'perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg)',
|
8351 | animationTimingFunction: 'ease-out',
|
8352 | },
|
8353 | '40%': {
|
8354 | transform: 'perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg)',
|
8355 | animationTimingFunction: 'ease-out',
|
8356 | },
|
8357 | '50%': {
|
8358 | transform: 'perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg)',
|
8359 | animationTimingFunction: 'ease-in',
|
8360 | },
|
8361 | '80%': {
|
8362 | transform: 'perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg)',
|
8363 | animationTimingFunction: 'ease-in',
|
8364 | },
|
8365 | 'to': {
|
8366 | transform: 'perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg)',
|
8367 | animationTimingFunction: 'ease-in',
|
8368 | },
|
8369 | },
|
8370 | flipInX: {
|
8371 | 'from': {
|
8372 | transform: 'perspective(400px) rotate3d(1, 0, 0, 90deg)',
|
8373 | animationTimingFunction: 'ease-in',
|
8374 | opacity: '0',
|
8375 | },
|
8376 | '40%': {
|
8377 | transform: 'perspective(400px) rotate3d(1, 0, 0, -20deg)',
|
8378 | animationTimingFunction: 'ease-in',
|
8379 | },
|
8380 | '60%': {
|
8381 | transform: 'perspective(400px) rotate3d(1, 0, 0, 10deg)',
|
8382 | opacity: '1',
|
8383 | },
|
8384 | '80%': {
|
8385 | transform: 'perspective(400px) rotate3d(1, 0, 0, -5deg)',
|
8386 | },
|
8387 | 'to': {
|
8388 | transform: 'perspective(400px)',
|
8389 | },
|
8390 | },
|
8391 | flipInY: {
|
8392 | 'from': {
|
8393 | transform: 'perspective(400px) rotate3d(0, 1, 0, 90deg)',
|
8394 | animationTimingFunction: 'ease-in',
|
8395 | opacity: '0',
|
8396 | },
|
8397 | '40%': {
|
8398 | transform: 'perspective(400px) rotate3d(0, 1, 0, -20deg)',
|
8399 | animationTimingFunction: 'ease-in',
|
8400 | },
|
8401 | '60%': {
|
8402 | transform: 'perspective(400px) rotate3d(0, 1, 0, 10deg)',
|
8403 | opacity: '1',
|
8404 | },
|
8405 | '80%': {
|
8406 | transform: 'perspective(400px) rotate3d(0, 1, 0, -5deg)',
|
8407 | },
|
8408 | 'to': {
|
8409 | transform: 'perspective(400px)',
|
8410 | },
|
8411 | },
|
8412 | flipOutX: {
|
8413 | 'from': {
|
8414 | transform: 'perspective(400px)',
|
8415 | },
|
8416 | '30%': {
|
8417 | transform: 'perspective(400px) rotate3d(1, 0, 0, -20deg)',
|
8418 | opacity: '1',
|
8419 | },
|
8420 | 'to': {
|
8421 | transform: 'perspective(400px) rotate3d(1, 0, 0, 90deg)',
|
8422 | opacity: '0',
|
8423 | },
|
8424 | },
|
8425 | flipOutY: {
|
8426 | 'from': {
|
8427 | transform: 'perspective(400px)',
|
8428 | },
|
8429 | '30%': {
|
8430 | transform: 'perspective(400px) rotate3d(0, 1, 0, -15deg)',
|
8431 | opacity: '1',
|
8432 | },
|
8433 | 'to': {
|
8434 | transform: 'perspective(400px) rotate3d(0, 1, 0, 90deg)',
|
8435 | opacity: '0',
|
8436 | },
|
8437 | },
|
8438 |
|
8439 | rotateIn: {
|
8440 | 'from': {
|
8441 | transformOrigin: 'center',
|
8442 | transform: 'rotate3d(0, 0, 1, -200deg)',
|
8443 | opacity: '0',
|
8444 | },
|
8445 | 'to': {
|
8446 | transformOrigin: 'center',
|
8447 | transform: 'translate3d(0, 0, 0)',
|
8448 | opacity: '1',
|
8449 | },
|
8450 | },
|
8451 | rotateInDownLeft: {
|
8452 | 'from': {
|
8453 | transformOrigin: 'left bottom',
|
8454 | transform: 'rotate3d(0, 0, 1, -45deg)',
|
8455 | opacity: '0',
|
8456 | },
|
8457 | 'to': {
|
8458 | transformOrigin: 'left bottom',
|
8459 | transform: 'translate3d(0, 0, 0)',
|
8460 | opacity: '1',
|
8461 | },
|
8462 | },
|
8463 | rotateInDownRight: {
|
8464 | 'from': {
|
8465 | transformOrigin: 'right bottom',
|
8466 | transform: 'rotate3d(0, 0, 1, 45deg)',
|
8467 | opacity: '0',
|
8468 | },
|
8469 | 'to': {
|
8470 | transformOrigin: 'right bottom',
|
8471 | transform: 'translate3d(0, 0, 0)',
|
8472 | opacity: '1',
|
8473 | },
|
8474 | },
|
8475 | rotateInUpLeft: {
|
8476 | 'from': {
|
8477 | transformOrigin: 'left top',
|
8478 | transform: 'rotate3d(0, 0, 1, 45deg)',
|
8479 | opacity: '0',
|
8480 | },
|
8481 | 'to': {
|
8482 | transformOrigin: 'left top',
|
8483 | transform: 'translate3d(0, 0, 0)',
|
8484 | opacity: '1',
|
8485 | },
|
8486 | },
|
8487 | rotateInUpRight: {
|
8488 | 'from': {
|
8489 | transformOrigin: 'right bottom',
|
8490 | transform: 'rotate3d(0, 0, 1, -90deg)',
|
8491 | opacity: '0',
|
8492 | },
|
8493 | 'to': {
|
8494 | transformOrigin: 'right bottom',
|
8495 | transform: 'translate3d(0, 0, 0)',
|
8496 | opacity: '1',
|
8497 | },
|
8498 | },
|
8499 | rotateOut: {
|
8500 | 'from': {
|
8501 | transformOrigin: 'center',
|
8502 | opacity: '1',
|
8503 | },
|
8504 | 'to': {
|
8505 | transformOrigin: 'center',
|
8506 | transform: 'rotate3d(0, 0, 1, 200deg)',
|
8507 | opacity: '0',
|
8508 | },
|
8509 | },
|
8510 | rotateOutDownLeft: {
|
8511 | 'from': {
|
8512 | transformOrigin: 'left bottom',
|
8513 | opacity: '1',
|
8514 | },
|
8515 | 'to': {
|
8516 | transformOrigin: 'left bottom',
|
8517 | transform: 'rotate3d(0, 0, 1, 45deg)',
|
8518 | opacity: '0',
|
8519 | },
|
8520 | },
|
8521 | rotateOutDownRight: {
|
8522 | 'from': {
|
8523 | transformOrigin: 'right bottom',
|
8524 | opacity: '1',
|
8525 | },
|
8526 | 'to': {
|
8527 | transformOrigin: 'right bottom',
|
8528 | transform: 'rotate3d(0, 0, 1, -45deg)',
|
8529 | opacity: '0',
|
8530 | },
|
8531 | },
|
8532 | rotateOutUpLeft: {
|
8533 | 'from': {
|
8534 | transformOrigin: 'left bottom',
|
8535 | opacity: '1',
|
8536 | },
|
8537 | 'to': {
|
8538 | transformOrigin: 'left bottom',
|
8539 | transform: 'rotate3d(0, 0, 1, -45deg)',
|
8540 | opacity: '0',
|
8541 | },
|
8542 | },
|
8543 | rotateOutUpRight: {
|
8544 | 'from': {
|
8545 | transformOrigin: 'right bottom',
|
8546 | opacity: '1',
|
8547 | },
|
8548 | 'to': {
|
8549 | transformOrigin: 'left bottom',
|
8550 | transform: 'rotate3d(0, 0, 1, 90deg)',
|
8551 | opacity: '0',
|
8552 | },
|
8553 | },
|
8554 |
|
8555 | rollIn: {
|
8556 | 'from': {
|
8557 | opacity: '0',
|
8558 | transform: 'translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg)',
|
8559 | },
|
8560 | 'to': {
|
8561 | opacity: '1',
|
8562 | transform: 'translate3d(0, 0, 0)',
|
8563 | },
|
8564 | },
|
8565 | rollOut: {
|
8566 | 'from': {
|
8567 | opacity: '1',
|
8568 | },
|
8569 | 'to': {
|
8570 | opacity: '0',
|
8571 | transform: 'translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg)',
|
8572 | },
|
8573 | },
|
8574 |
|
8575 | zoomIn: {
|
8576 | 'from': {
|
8577 | opacity: '0',
|
8578 | transform: 'scale3d(0.3, 0.3, 0.3)',
|
8579 | },
|
8580 | '50%': {
|
8581 | opacity: '1',
|
8582 | },
|
8583 | },
|
8584 | zoomInDown: {
|
8585 | 'from': {
|
8586 | opacity: '0',
|
8587 | transform: 'scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0)',
|
8588 | animationTimingFunction: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',
|
8589 | },
|
8590 | '60%': {
|
8591 | opacity: '1',
|
8592 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)',
|
8593 | animationTimingFunction: 'cubic-bezier(0.175, 0.885, 0.32, 1)',
|
8594 | },
|
8595 | },
|
8596 | zoomInLeft: {
|
8597 | 'from': {
|
8598 | opacity: '0',
|
8599 | transform: 'scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0)',
|
8600 | animationTimingFunction: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',
|
8601 | },
|
8602 | '60%': {
|
8603 | opacity: '1',
|
8604 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0)',
|
8605 | animationTimingFunction: 'cubic-bezier(0.175, 0.885, 0.32, 1)',
|
8606 | },
|
8607 | },
|
8608 | zoomInRight: {
|
8609 | 'from': {
|
8610 | opacity: '0',
|
8611 | transform: 'scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0)',
|
8612 | animationTimingFunction: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',
|
8613 | },
|
8614 | '60%': {
|
8615 | opacity: '1',
|
8616 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0)',
|
8617 | animationTimingFunction: 'cubic-bezier(0.175, 0.885, 0.32, 1)',
|
8618 | },
|
8619 | },
|
8620 | zoomInUp: {
|
8621 | 'from': {
|
8622 | opacity: '0',
|
8623 | transform: 'scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0)',
|
8624 | animationTimingFunction: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',
|
8625 | },
|
8626 | '60%': {
|
8627 | opacity: '1',
|
8628 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)',
|
8629 | animationTimingFunction: 'cubic-bezier(0.175, 0.885, 0.32, 1)',
|
8630 | },
|
8631 | },
|
8632 |
|
8633 | bounceIn: {
|
8634 | 'from, 20%, 40%, 60%, 80%, to': {
|
8635 | animationTimingFunction: 'ease-in-out',
|
8636 | },
|
8637 | '0%': {
|
8638 | opacity: '0',
|
8639 | transform: 'scale3d(0.3, 0.3, 0.3)',
|
8640 | },
|
8641 | '20%': {
|
8642 | transform: 'scale3d(1.1, 1.1, 1.1)',
|
8643 | },
|
8644 | '40%': {
|
8645 | transform: 'scale3d(0.9, 0.9, 0.9)',
|
8646 | },
|
8647 | '60%': {
|
8648 | transform: 'scale3d(1.03, 1.03, 1.03)',
|
8649 | opacity: '1',
|
8650 | },
|
8651 | '80%': {
|
8652 | transform: 'scale3d(0.97, 0.97, 0.97)',
|
8653 | },
|
8654 | 'to': {
|
8655 | opacity: '1',
|
8656 | transform: 'scale3d(1, 1, 1)',
|
8657 | },
|
8658 | },
|
8659 | bounceInDown: {
|
8660 | 'from, 60%, 75%, 90%, to': {
|
8661 | animationTimingFunction: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
8662 | },
|
8663 | '0%': {
|
8664 | opacity: '0',
|
8665 | transform: 'translate3d(0, -3000px, 0)',
|
8666 | },
|
8667 | '60%': {
|
8668 | opacity: '1',
|
8669 | transform: 'translate3d(0, 25px, 0)',
|
8670 | },
|
8671 | '75%': {
|
8672 | transform: 'translate3d(0, -10px, 0)',
|
8673 | },
|
8674 | '90%': {
|
8675 | transform: 'translate3d(0, 5px, 0)',
|
8676 | },
|
8677 | 'to': {
|
8678 | transform: 'translate3d(0, 0, 0)',
|
8679 | },
|
8680 | },
|
8681 | bounceInLeft: {
|
8682 | 'from, 60%, 75%, 90%, to': {
|
8683 | animationTimingFunction: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
8684 | },
|
8685 | '0%': {
|
8686 | opacity: '0',
|
8687 | transform: 'translate3d(-3000px, 0, 0)',
|
8688 | },
|
8689 | '60%': {
|
8690 | opacity: '1',
|
8691 | transform: 'translate3d(25px, 0, 0)',
|
8692 | },
|
8693 | '75%': {
|
8694 | transform: 'translate3d(-10px, 0, 0)',
|
8695 | },
|
8696 | '90%': {
|
8697 | transform: 'translate3d(5px, 0, 0)',
|
8698 | },
|
8699 | 'to': {
|
8700 | transform: 'translate3d(0, 0, 0)',
|
8701 | },
|
8702 | },
|
8703 | bounceInRight: {
|
8704 | 'from, 60%, 75%, 90%, to': {
|
8705 | animationTimingFunction: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
8706 | },
|
8707 | '0%': {
|
8708 | opacity: '0',
|
8709 | transform: 'translate3d(3000px, 0, 0)',
|
8710 | },
|
8711 | '60%': {
|
8712 | opacity: '1',
|
8713 | transform: 'translate3d(-25px, 0, 0)',
|
8714 | },
|
8715 | '75%': {
|
8716 | transform: 'translate3d(10px, 0, 0)',
|
8717 | },
|
8718 | '90%': {
|
8719 | transform: 'translate3d(-5px, 0, 0)',
|
8720 | },
|
8721 | 'to': {
|
8722 | transform: 'translate3d(0, 0, 0)',
|
8723 | },
|
8724 | },
|
8725 | bounceInUp: {
|
8726 | 'from, 60%, 75%, 90%, to': {
|
8727 | animationTimingFunction: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
8728 | },
|
8729 | '0%': {
|
8730 | opacity: '0',
|
8731 | transform: 'translate3d(0, 3000px, 0)',
|
8732 | },
|
8733 | '60%': {
|
8734 | opacity: '1',
|
8735 | transform: 'translate3d(0, -20px, 0)',
|
8736 | },
|
8737 | '75%': {
|
8738 | transform: 'translate3d(0, 10px, 0)',
|
8739 | },
|
8740 | '90%': {
|
8741 | transform: 'translate3d(0, -5px, 0)',
|
8742 | },
|
8743 | 'to': {
|
8744 | transform: 'translate3d(0, 0, 0)',
|
8745 | },
|
8746 | },
|
8747 |
|
8748 | bounceOut: {
|
8749 | '20%': {
|
8750 | transform: 'scale3d(0.9, 0.9, 0.9)',
|
8751 | },
|
8752 | '50%, 55%': {
|
8753 | opacity: '1',
|
8754 | transform: 'scale3d(1.1, 1.1, 1.1)',
|
8755 | },
|
8756 | 'to': {
|
8757 | opacity: '0',
|
8758 | transform: 'scale3d(0.3, 0.3, 0.3)',
|
8759 | },
|
8760 | },
|
8761 | bounceOutDown: {
|
8762 | '20%': {
|
8763 | transform: 'translate3d(0, 10px, 0)',
|
8764 | },
|
8765 | '40%, 45%': {
|
8766 | opacity: '1',
|
8767 | transform: 'translate3d(0, -20px, 0)',
|
8768 | },
|
8769 | 'to': {
|
8770 | opacity: '0',
|
8771 | transform: 'translate3d(0, 2000px, 0)',
|
8772 | },
|
8773 | },
|
8774 | bounceOutLeft: {
|
8775 | '20%': {
|
8776 | opacity: '1',
|
8777 | transform: 'translate3d(20px, 0, 0)',
|
8778 | },
|
8779 | 'to': {
|
8780 | opacity: '0',
|
8781 | transform: 'translate3d(-2000px, 0, 0)',
|
8782 | },
|
8783 | },
|
8784 | bounceOutRight: {
|
8785 | '20%': {
|
8786 | opacity: '1',
|
8787 | transform: 'translate3d(-20px, 0, 0)',
|
8788 | },
|
8789 | 'to': {
|
8790 | opacity: '0',
|
8791 | transform: 'translate3d(2000px, 0, 0)',
|
8792 | },
|
8793 | },
|
8794 | bounceOutUp: {
|
8795 | '20%': {
|
8796 | transform: 'translate3d(0, -10px, 0)',
|
8797 | },
|
8798 | '40%, 45%': {
|
8799 | opacity: '1',
|
8800 | transform: 'translate3d(0, 20px, 0)',
|
8801 | },
|
8802 | 'to': {
|
8803 | opacity: '0',
|
8804 | transform: 'translate3d(0, -2000px, 0)',
|
8805 | },
|
8806 | },
|
8807 |
|
8808 | zoomOut: {
|
8809 | 'from': {
|
8810 | opacity: '1',
|
8811 | },
|
8812 | '50%': {
|
8813 | opacity: '0',
|
8814 | transform: 'scale3d(0.3, 0.3, 0.3)',
|
8815 | },
|
8816 | 'to': {
|
8817 | opacity: '0',
|
8818 | },
|
8819 | },
|
8820 | zoomOutDown: {
|
8821 | '40%': {
|
8822 | opacity: '1',
|
8823 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)',
|
8824 | animationTimingFunction: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',
|
8825 | },
|
8826 | 'to': {
|
8827 | opacity: '0',
|
8828 | transform: 'scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0)',
|
8829 | transformOrigin: 'center bottom',
|
8830 | animationTimingFunction: 'cubic-bezier(0.175, 0.885, 0.32, 1)',
|
8831 | },
|
8832 | },
|
8833 | zoomOutLeft: {
|
8834 | '40%': {
|
8835 | opacity: '1',
|
8836 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0)',
|
8837 | },
|
8838 | 'to': {
|
8839 | opacity: '0',
|
8840 | transform: 'scale(0.1) translate3d(-2000px, 0, 0)',
|
8841 | transformOrigin: 'left center',
|
8842 | },
|
8843 | },
|
8844 | zoomOutRight: {
|
8845 | '40%': {
|
8846 | opacity: '1',
|
8847 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0)',
|
8848 | },
|
8849 | 'to': {
|
8850 | opacity: '0',
|
8851 | transform: 'scale(0.1) translate3d(2000px, 0, 0)',
|
8852 | transformOrigin: 'right center',
|
8853 | },
|
8854 | },
|
8855 | zoomOutUp: {
|
8856 | '40%': {
|
8857 | opacity: '1',
|
8858 | transform: 'scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)',
|
8859 | animationTimingFunction: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',
|
8860 | },
|
8861 | 'to': {
|
8862 | opacity: '0',
|
8863 | transform: 'scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0)',
|
8864 | transformOrigin: 'center bottom',
|
8865 | animationTimingFunction: 'cubic-bezier(0.175, 0.885, 0.32, 1)',
|
8866 | },
|
8867 | },
|
8868 |
|
8869 | slideInDown: {
|
8870 | 'from': {
|
8871 | transform: 'translate3d(0, -100%, 0)',
|
8872 | visibility: 'visible',
|
8873 | },
|
8874 | 'to': {
|
8875 | transform: 'translate3d(0, 0, 0)',
|
8876 | },
|
8877 | },
|
8878 | slideInLeft: {
|
8879 | 'from': {
|
8880 | transform: 'translate3d(-100%, 0, 0)',
|
8881 | visibility: 'visible',
|
8882 | },
|
8883 | 'to': {
|
8884 | transform: 'translate3d(0, 0, 0)',
|
8885 | },
|
8886 | },
|
8887 | slideInRight: {
|
8888 | 'from': {
|
8889 | transform: 'translate3d(100%, 0, 0)',
|
8890 | visibility: 'visible',
|
8891 | },
|
8892 | 'to': {
|
8893 | transform: 'translate3d(0, 0, 0)',
|
8894 | },
|
8895 | },
|
8896 | slideInUp: {
|
8897 | 'from': {
|
8898 | transform: 'translate3d(0, 100%, 0)',
|
8899 | visibility: 'visible',
|
8900 | },
|
8901 | 'to': {
|
8902 | transform: 'translate3d(0, 0, 0)',
|
8903 | },
|
8904 | },
|
8905 |
|
8906 | slideOutDown: {
|
8907 | 'from': {
|
8908 | transform: 'translate3d(0, 0, 0)',
|
8909 | },
|
8910 | 'to': {
|
8911 | visibility: 'hidden',
|
8912 | transform: 'translate3d(0, 100%, 0)',
|
8913 | },
|
8914 | },
|
8915 | slideOutLeft: {
|
8916 | 'from': {
|
8917 | transform: 'translate3d(0, 0, 0)',
|
8918 | },
|
8919 | 'to': {
|
8920 | visibility: 'hidden',
|
8921 | transform: 'translate3d(-100%, 0, 0)',
|
8922 | },
|
8923 | },
|
8924 | slideOutRight: {
|
8925 | 'from': {
|
8926 | transform: 'translate3d(0, 0, 0)',
|
8927 | },
|
8928 | 'to': {
|
8929 | visibility: 'hidden',
|
8930 | transform: 'translate3d(100%, 0, 0)',
|
8931 | },
|
8932 | },
|
8933 | slideOutUp: {
|
8934 | 'from': {
|
8935 | transform: 'translate3d(0, 0, 0)',
|
8936 | },
|
8937 | 'to': {
|
8938 | visibility: 'hidden',
|
8939 | transform: 'translate3d(0, -100%, 0)',
|
8940 | },
|
8941 | },
|
8942 |
|
8943 | fadeIn: {
|
8944 | 'from': {
|
8945 | opacity: '0',
|
8946 | },
|
8947 | 'to': {
|
8948 | opacity: '1',
|
8949 | },
|
8950 | },
|
8951 | fadeInDown: {
|
8952 | 'from': {
|
8953 | opacity: '0',
|
8954 | transform: 'translate3d(0, -100%, 0)',
|
8955 | },
|
8956 | 'to': {
|
8957 | opacity: '1',
|
8958 | transform: 'translate3d(0, 0, 0)',
|
8959 | },
|
8960 | },
|
8961 | fadeInDownBig: {
|
8962 | 'from': {
|
8963 | opacity: '0',
|
8964 | transform: 'translate3d(0, -2000px, 0)',
|
8965 | },
|
8966 | 'to': {
|
8967 | opacity: '1',
|
8968 | transform: 'translate3d(0, 0, 0)',
|
8969 | },
|
8970 | },
|
8971 | fadeInLeft: {
|
8972 | 'from': {
|
8973 | opacity: '0',
|
8974 | transform: 'translate3d(-100%, 0, 0)',
|
8975 | },
|
8976 | 'to': {
|
8977 | opacity: '1',
|
8978 | transform: 'translate3d(0, 0, 0)',
|
8979 | },
|
8980 | },
|
8981 | fadeInLeftBig: {
|
8982 | 'from': {
|
8983 | opacity: '0',
|
8984 | transform: 'translate3d(-2000px, 0, 0)',
|
8985 | },
|
8986 | 'to': {
|
8987 | opacity: '1',
|
8988 | transform: 'translate3d(0, 0, 0)',
|
8989 | },
|
8990 | },
|
8991 | fadeInRight: {
|
8992 | 'from': {
|
8993 | opacity: '0',
|
8994 | transform: 'translate3d(100%, 0, 0)',
|
8995 | },
|
8996 | 'to': {
|
8997 | opacity: '1',
|
8998 | transform: 'translate3d(0, 0, 0)',
|
8999 | },
|
9000 | },
|
9001 | fadeInRightBig: {
|
9002 | 'from': {
|
9003 | opacity: '0',
|
9004 | transform: 'translate3d(2000px, 0, 0)',
|
9005 | },
|
9006 | 'to': {
|
9007 | opacity: '1',
|
9008 | transform: 'translate3d(0, 0, 0)',
|
9009 | },
|
9010 | },
|
9011 | fadeInUp: {
|
9012 | 'from': {
|
9013 | opacity: '0',
|
9014 | transform: 'translate3d(0, 100%, 0)',
|
9015 | },
|
9016 | 'to': {
|
9017 | opacity: '1',
|
9018 | transform: 'translate3d(0, 0, 0)',
|
9019 | },
|
9020 | },
|
9021 | fadeInUpBig: {
|
9022 | 'from': {
|
9023 | opacity: '0',
|
9024 | transform: 'translate3d(0, 2000px, 0)',
|
9025 | },
|
9026 | 'to': {
|
9027 | opacity: '1',
|
9028 | transform: 'translate3d(0, 0, 0)',
|
9029 | },
|
9030 | },
|
9031 | fadeInTopLeft: {
|
9032 | 'from': {
|
9033 | opacity: '0',
|
9034 | transform: 'translate3d(-100%, -100%, 0)',
|
9035 | },
|
9036 | 'to': {
|
9037 | opacity: '1',
|
9038 | transform: 'translate3d(0, 0, 0)',
|
9039 | },
|
9040 | },
|
9041 | fadeInTopRight: {
|
9042 | 'from': {
|
9043 | opacity: '0',
|
9044 | transform: 'translate3d(100%, -100%, 0)',
|
9045 | },
|
9046 | 'to': {
|
9047 | opacity: '1',
|
9048 | transform: 'translate3d(0, 0, 0)',
|
9049 | },
|
9050 | },
|
9051 | fadeInBottomLeft: {
|
9052 | 'from': {
|
9053 | opacity: '0',
|
9054 | transform: 'translate3d(-100%, 100%, 0)',
|
9055 | },
|
9056 | 'to': {
|
9057 | opacity: '1',
|
9058 | transform: 'translate3d(0, 0, 0)',
|
9059 | },
|
9060 | },
|
9061 | fadeInBottomRight: {
|
9062 | 'from': {
|
9063 | opacity: '0',
|
9064 | transform: 'translate3d(100%, 100%, 0)',
|
9065 | },
|
9066 | 'to': {
|
9067 | opacity: '1',
|
9068 | transform: 'translate3d(0, 0, 0)',
|
9069 | },
|
9070 | },
|
9071 |
|
9072 | fadeOut: {
|
9073 | 'from': {
|
9074 | opacity: '1',
|
9075 | },
|
9076 | 'to': {
|
9077 | opacity: '0',
|
9078 | },
|
9079 | },
|
9080 | fadeOutDown: {
|
9081 | 'from': {
|
9082 | opacity: '1',
|
9083 | },
|
9084 | 'to': {
|
9085 | opacity: '0',
|
9086 | transform: 'translate3d(0, 100%, 0)',
|
9087 | },
|
9088 | },
|
9089 | fadeOutDownBig: {
|
9090 | 'from': {
|
9091 | opacity: '1',
|
9092 | },
|
9093 | 'to': {
|
9094 | opacity: '0',
|
9095 | transform: 'translate3d(0, 2000px, 0)',
|
9096 | },
|
9097 | },
|
9098 | fadeOutLeft: {
|
9099 | 'from': {
|
9100 | opacity: '1',
|
9101 | },
|
9102 | 'to': {
|
9103 | opacity: '0',
|
9104 | transform: 'translate3d(-100%, 0, 0)',
|
9105 | },
|
9106 | },
|
9107 | fadeOutLeftBig: {
|
9108 | 'from': {
|
9109 | opacity: '1',
|
9110 | },
|
9111 | 'to': {
|
9112 | opacity: '0',
|
9113 | transform: 'translate3d(-2000px, 0, 0)',
|
9114 | },
|
9115 | },
|
9116 | fadeOutRight: {
|
9117 | 'from': {
|
9118 | opacity: '1',
|
9119 | },
|
9120 | 'to': {
|
9121 | opacity: '0',
|
9122 | transform: 'translate3d(100%, 0, 0)',
|
9123 | },
|
9124 | },
|
9125 | fadeOutRightBig: {
|
9126 | 'from': {
|
9127 | opacity: '1',
|
9128 |
|
9129 | },
|
9130 | 'to': {
|
9131 | opacity: '0',
|
9132 | transform: 'translate3d(2000px, 0, 0)',
|
9133 | },
|
9134 | },
|
9135 | fadeOutUp: {
|
9136 | 'from': {
|
9137 | opacity: '1',
|
9138 | },
|
9139 | 'to': {
|
9140 | opacity: '0',
|
9141 | transform: 'translate3d(0, -100%, 0)',
|
9142 | },
|
9143 | },
|
9144 | fadeOutUpBig: {
|
9145 | 'from': {
|
9146 | opacity: '1',
|
9147 |
|
9148 | },
|
9149 | 'to': {
|
9150 | opacity: '0',
|
9151 | transform: 'translate3d(0, -2000px, 0)',
|
9152 | },
|
9153 | },
|
9154 | fadeOutTopLeft: {
|
9155 | 'from': {
|
9156 | opacity: '1',
|
9157 | transform: 'translate3d(0, 0, 0)',
|
9158 |
|
9159 | },
|
9160 | 'to': {
|
9161 | opacity: '0',
|
9162 | transform: 'translate3d(-100%, -100%, 0)',
|
9163 | },
|
9164 | },
|
9165 | fadeOutTopRight: {
|
9166 | 'from': {
|
9167 | opacity: '1',
|
9168 | transform: 'translate3d(0, 0, 0)',
|
9169 |
|
9170 | },
|
9171 | 'to': {
|
9172 | opacity: '0',
|
9173 | transform: 'translate3d(100%, -100%, 0)',
|
9174 | },
|
9175 | },
|
9176 | fadeOutBottomLeft: {
|
9177 | 'from': {
|
9178 | opacity: '1',
|
9179 | transform: 'translate3d(0, 0, 0)',
|
9180 |
|
9181 | },
|
9182 | 'to': {
|
9183 | opacity: '0',
|
9184 | transform: 'translate3d(-100%, 100%, 0)',
|
9185 | },
|
9186 | },
|
9187 | fadeOutBottomRight: {
|
9188 | 'from': {
|
9189 | opacity: '1',
|
9190 | transform: 'translate3d(0, 0, 0)',
|
9191 |
|
9192 | },
|
9193 | 'to': {
|
9194 | opacity: '0',
|
9195 | transform: 'translate3d(100%, 100%, 0)',
|
9196 | },
|
9197 | },
|
9198 |
|
9199 | backInUp: {
|
9200 | '0%': {
|
9201 | opacity: '0.7',
|
9202 | transform: 'translateY(1200px) scale(0.7)',
|
9203 | },
|
9204 | '80%': {
|
9205 | opacity: '0.7',
|
9206 | transform: 'translateY(0px) scale(0.7)',
|
9207 | },
|
9208 | '100%': {
|
9209 | opacity: '1',
|
9210 | transform: 'scale(1)',
|
9211 | },
|
9212 | },
|
9213 | backInDown: {
|
9214 | '0%': {
|
9215 | opacity: '0.7',
|
9216 | transform: 'translateY(-1200px) scale(0.7)',
|
9217 | },
|
9218 | '80%': {
|
9219 | opacity: '0.7',
|
9220 | transform: 'translateY(0px) scale(0.7)',
|
9221 | },
|
9222 | '100%': {
|
9223 | opacity: '1',
|
9224 | transform: 'scale(1)',
|
9225 | },
|
9226 | },
|
9227 | backInLeft: {
|
9228 | '0%': {
|
9229 | opacity: '0.7',
|
9230 | transform: 'translateX(-2000px) scale(0.7)',
|
9231 | },
|
9232 | '80%': {
|
9233 | opacity: '0.7',
|
9234 | transform: 'translateX(0px) scale(0.7)',
|
9235 | },
|
9236 | '100%': {
|
9237 | opacity: '1',
|
9238 | transform: 'scale(1)',
|
9239 | },
|
9240 | },
|
9241 | backInRight: {
|
9242 | '0%': {
|
9243 | opacity: '0.7',
|
9244 | transform: 'translateX(2000px) scale(0.7)',
|
9245 | },
|
9246 | '80%': {
|
9247 | opacity: '0.7',
|
9248 | transform: 'translateY(0px) scale(0.7)',
|
9249 | },
|
9250 | '100%': {
|
9251 | opacity: '1',
|
9252 | transform: 'scale(1)',
|
9253 | },
|
9254 | },
|
9255 |
|
9256 | backOutUp: {
|
9257 | '0%': {
|
9258 | opacity: '1',
|
9259 | transform: 'scale(1)',
|
9260 | },
|
9261 | '80%': {
|
9262 | opacity: '0.7',
|
9263 | transform: 'translateY(0px) scale(0.7)',
|
9264 | },
|
9265 | '100%': {
|
9266 | opacity: '0.7',
|
9267 | transform: 'translateY(-700px) scale(0.7)',
|
9268 | },
|
9269 | },
|
9270 | backOutDown: {
|
9271 | '0%': {
|
9272 | opacity: '1',
|
9273 | transform: 'scale(1)',
|
9274 | },
|
9275 | '80%': {
|
9276 | opacity: '0.7',
|
9277 | transform: 'translateY(0px) scale(0.7)',
|
9278 | },
|
9279 | '100%': {
|
9280 | opacity: '0.7',
|
9281 | transform: 'translateY(700px) scale(0.7)',
|
9282 | },
|
9283 | },
|
9284 | backOutLeft: {
|
9285 | '0%': {
|
9286 | opacity: '1',
|
9287 | transform: 'scale(1)',
|
9288 | },
|
9289 | '80%': {
|
9290 | opacity: '0.7',
|
9291 | transform: 'translateX(-2000px) scale(0.7)',
|
9292 | },
|
9293 | '100%': {
|
9294 | opacity: '0.7',
|
9295 | transform: 'translateY(-700px) scale(0.7)',
|
9296 | },
|
9297 | },
|
9298 | backOutRight: {
|
9299 | '0%': {
|
9300 | opacity: '1',
|
9301 | transform: 'scale(1)',
|
9302 | },
|
9303 | '80%': {
|
9304 | opacity: '0.7',
|
9305 | transform: 'translateY(0px) scale(0.7)',
|
9306 | },
|
9307 | '100%': {
|
9308 | opacity: '0.7',
|
9309 | transform: 'translateX(2000px) scale(0.7)',
|
9310 | },
|
9311 | },
|
9312 | };
|
9313 |
|
9314 | function _nullishCoalesce$1(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
9315 |
|
9316 | const defaultColors = {
|
9317 | transparent: 'transparent',
|
9318 | current: 'currentColor',
|
9319 | light: colors.light,
|
9320 | dark: colors.dark,
|
9321 | black: colors.black,
|
9322 | white: colors.white,
|
9323 | gray: colors.coolGray,
|
9324 | red: colors.red,
|
9325 | yellow: colors.amber,
|
9326 | green: colors.emerald,
|
9327 | blue: colors.blue,
|
9328 | indigo: colors.indigo,
|
9329 | purple: colors.violet,
|
9330 | pink: colors.pink,
|
9331 | rose: colors.rose,
|
9332 | fuchsia: colors.fuchsia,
|
9333 | violet: colors.violet,
|
9334 | cyan: colors.cyan,
|
9335 | teal: colors.teal,
|
9336 | emerald: colors.emerald,
|
9337 | lime: colors.lime,
|
9338 | amber: colors.amber,
|
9339 | orange: colors.orange,
|
9340 | 'light-blue': colors.lightBlue,
|
9341 | 'warm-gray': colors.warmGray,
|
9342 | 'true-gray': colors.trueGray,
|
9343 | 'cool-gray': colors.coolGray,
|
9344 | 'blue-gray': colors.blueGray,
|
9345 | };
|
9346 |
|
9347 | const baseConfig = {
|
9348 |
|
9349 | presets: [],
|
9350 | prefixer: true,
|
9351 | attributify: false,
|
9352 | darkMode: 'class',
|
9353 | theme: {
|
9354 | screens: {
|
9355 | sm: '640px',
|
9356 | md: '768px',
|
9357 | lg: '1024px',
|
9358 | xl: '1280px',
|
9359 | '2xl': '1536px',
|
9360 | },
|
9361 | colors: defaultColors,
|
9362 | spacing: {
|
9363 | px: '1px',
|
9364 | 0: '0px',
|
9365 | 0.5: '0.125rem',
|
9366 | 1: '0.25rem',
|
9367 | 1.5: '0.375rem',
|
9368 | 2: '0.5rem',
|
9369 | 2.5: '0.625rem',
|
9370 | 3: '0.75rem',
|
9371 | 3.5: '0.875rem',
|
9372 | 4: '1rem',
|
9373 | 5: '1.25rem',
|
9374 | 6: '1.5rem',
|
9375 | 7: '1.75rem',
|
9376 | 8: '2rem',
|
9377 | 9: '2.25rem',
|
9378 | 10: '2.5rem',
|
9379 | 11: '2.75rem',
|
9380 | 12: '3rem',
|
9381 | 14: '3.5rem',
|
9382 | 16: '4rem',
|
9383 | 20: '5rem',
|
9384 | 24: '6rem',
|
9385 | 28: '7rem',
|
9386 | 32: '8rem',
|
9387 | 36: '9rem',
|
9388 | 40: '10rem',
|
9389 | 44: '11rem',
|
9390 | 48: '12rem',
|
9391 | 52: '13rem',
|
9392 | 56: '14rem',
|
9393 | 60: '15rem',
|
9394 | 64: '16rem',
|
9395 | 72: '18rem',
|
9396 | 80: '20rem',
|
9397 | 96: '24rem',
|
9398 |
|
9399 | },
|
9400 | animation: {
|
9401 | none: 'none',
|
9402 | spin: 'spin 1s linear infinite',
|
9403 | ping: 'ping 1s cubic-bezier(0, 0, 0.2, 1) infinite',
|
9404 | pulse: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
9405 | bounce: 'bounce 1s infinite',
|
9406 | 'shock': {
|
9407 | animation: 'shock',
|
9408 | transformOrigin: 'center bottom',
|
9409 | },
|
9410 | 'flash': 'flash',
|
9411 | 'bubble': 'bubble',
|
9412 | 'rubber-band': 'rubberBand',
|
9413 | 'shake-x': 'shakeX',
|
9414 | 'shake-y': 'shakeY',
|
9415 | 'head-shake': 'headShake 1s ease-in-out',
|
9416 | 'swing': {
|
9417 | animation: 'swing',
|
9418 | transformOrigin: 'top center',
|
9419 | },
|
9420 | 'tada': 'tada',
|
9421 | 'wobble': 'wobble',
|
9422 | 'jello': 'jello',
|
9423 | 'heart-beat': 'heartBeat 1s ease-in-out',
|
9424 | 'hinge': 'hinge 2s',
|
9425 | 'jack-in': 'jackInTheBox',
|
9426 | 'light-speed-in-left': 'lightSpeedInLeft',
|
9427 | 'light-speed-in-right': 'lightSpeedInRight',
|
9428 | 'light-speed-out-left': 'lightSpeedOutLeft',
|
9429 | 'light-speed-out-right': 'lightSpeedOutRight',
|
9430 | 'flip': {
|
9431 | animation: 'flip',
|
9432 | backfaceVisibility: 'visible',
|
9433 | },
|
9434 | 'flip-in-x': {
|
9435 | animation: 'flipInX',
|
9436 | backfaceVisibility: 'visible',
|
9437 | },
|
9438 | 'flip-in-y': {
|
9439 | animation: 'flipInY',
|
9440 | backfaceVisibility: 'visible',
|
9441 | },
|
9442 | 'flip-out-x': {
|
9443 | animation: 'flipOutX',
|
9444 | backfaceVisibility: 'visible',
|
9445 | },
|
9446 | 'flip-out-y': {
|
9447 | animation: 'flipOutY',
|
9448 | backfaceVisibility: 'visible',
|
9449 | },
|
9450 | 'rotate-in': 'rotateIn',
|
9451 | 'rotate-in-down-left': 'rotateInDownLeft',
|
9452 | 'rotate-in-down-right': 'rotateInDownRight',
|
9453 | 'rotate-in-up-left': 'rotateInUpLeft',
|
9454 | 'rotate-in-up-right': 'rotateInUpRight',
|
9455 | 'rotate-out': 'rotateOut',
|
9456 | 'rotate-out-down-left': 'rotateOutDownLeft',
|
9457 | 'rotate-out-down-right': 'rotateOutDownRight',
|
9458 | 'rotate-out-up-left': 'rotateOutUpLeft',
|
9459 | 'rotate-out-up-right': 'rotateOutUpRight',
|
9460 | 'roll-in': 'rollIn',
|
9461 | 'roll-out': 'rollOut',
|
9462 | 'zoom-in': 'zoomIn',
|
9463 | 'zoom-in-down': 'zoomInDown',
|
9464 | 'zoom-in-left': 'zoomInLeft',
|
9465 | 'zoom-in-right': 'zoomInRight',
|
9466 | 'zoom-in-up': 'zoomInUp',
|
9467 | 'bounce-in': 'bounceIn 750ms',
|
9468 | 'bounce-in-down': 'bounceInDown',
|
9469 | 'bounce-in-left': 'bounceInLeft',
|
9470 | 'bounce-in-right': 'bounceInRight',
|
9471 | 'bounce-in-up': 'bounceInUp',
|
9472 | 'bounce-out': 'bounceOut 750ms',
|
9473 | 'bounce-out-down': 'bounceOutDown',
|
9474 | 'bounce-out-left': 'bounceOutLeft',
|
9475 | 'bounce-out-right': 'bounceOutRight',
|
9476 | 'bounce-out-up': 'bounceOutUp',
|
9477 | 'zoom-out': 'zoomOut',
|
9478 | 'zoom-out-down': 'zoomOutDown',
|
9479 | 'zoom-out-left': 'zoomOutLeft',
|
9480 | 'zoom-out-right': 'zoomOutRight',
|
9481 | 'zoom-out-up': 'zoomOutUp',
|
9482 | 'slide-in-down': 'slideInDown',
|
9483 | 'slide-in-left': 'slideInLeft',
|
9484 | 'slide-in-right': 'slideInRight',
|
9485 | 'slide-in-up': 'slideInUp',
|
9486 | 'slide-out-down': 'slideOutDown',
|
9487 | 'slide-out-left': 'slideOutLeft',
|
9488 | 'slide-out-right': 'slideOutRight',
|
9489 | 'slide-out-up': 'slideOutUp',
|
9490 | 'fade-in': 'fadeIn',
|
9491 | 'fade-in-down': 'fadeInDown',
|
9492 | 'fade-in-down-big': 'fadeInDownBig',
|
9493 | 'fade-in-left': 'fadeInLeft',
|
9494 | 'fade-in-left-big': 'fadeInLeftBig',
|
9495 | 'fade-in-right': 'fadeInRight',
|
9496 | 'fade-in-right-big': 'fadeInRightBig',
|
9497 | 'fade-in-up': 'fadeInUp',
|
9498 | 'fade-in-up-big': 'fadeInUpBig',
|
9499 | 'fade-in-top-left': 'fadeInTopLeft',
|
9500 | 'fade-in-top-right': 'fadeInTopRight',
|
9501 | 'fade-in-bottom-left': 'fadeInBottomLeft',
|
9502 | 'fade-in-bottom-right': 'fadeInBottomRight',
|
9503 | 'fade-out': 'fadeOut',
|
9504 | 'fade-out-down': 'fadeOutDown',
|
9505 | 'fade-out-down-big': 'fadeOutDownBig',
|
9506 | 'fade-out-left': 'fadeOutLeft',
|
9507 | 'fade-out-left-big': 'fadeOutLeftBig',
|
9508 | 'fade-out-right': 'fadeOutRight',
|
9509 | 'fade-out-right-big': 'fadeOutRightBig',
|
9510 | 'fade-out-up': 'fadeOutUp',
|
9511 | 'fade-out-up-big': 'fadeOutUpBig',
|
9512 | 'back-in-up': 'backInUp',
|
9513 | 'back-in-down': 'backInDown',
|
9514 | 'back-in-left': 'backInLeft',
|
9515 | 'back-in-right': 'backInRight',
|
9516 | 'back-out-up': 'backOutUp',
|
9517 | 'back-out-down': 'backOutDown',
|
9518 | 'back-out-left': 'backOutLeft',
|
9519 | 'back-out-right': 'backOutRight',
|
9520 | },
|
9521 | animationDuration: {
|
9522 | DEFAULT: '1000ms',
|
9523 | 75: '75ms',
|
9524 | 100: '100ms',
|
9525 | 150: '150ms',
|
9526 | 200: '200ms',
|
9527 | 300: '300ms',
|
9528 | 500: '500ms',
|
9529 | 700: '700ms',
|
9530 | 1000: '1000ms',
|
9531 | 1500: '1500ms',
|
9532 | 2000: '2000ms',
|
9533 | 2500: '2500ms',
|
9534 | 3000: '3000ms',
|
9535 |
|
9536 | },
|
9537 | animationDelay: {
|
9538 | DEFAULT: '500ms',
|
9539 | 75: '75ms',
|
9540 | 100: '100ms',
|
9541 | 150: '150ms',
|
9542 | 200: '200ms',
|
9543 | 300: '300ms',
|
9544 | 500: '500ms',
|
9545 | 700: '700ms',
|
9546 | 1000: '1000ms',
|
9547 | 1500: '1500ms',
|
9548 | 2000: '2000ms',
|
9549 | 2500: '2500ms',
|
9550 | 3000: '3000ms',
|
9551 |
|
9552 | },
|
9553 | animationIterationCount: {
|
9554 | DEFAULT: '1',
|
9555 | loop: 'infinite',
|
9556 | 'repeat-1': '1',
|
9557 | 'repeat-2': '2',
|
9558 | 'repeat-3': '3',
|
9559 | 'repeat-4': '4',
|
9560 | 'repeat-5': '5',
|
9561 | 'repeat-6': '6',
|
9562 | 'repeat-7': '7',
|
9563 | 'repeat-8': '8',
|
9564 | 'repeat-9': '9',
|
9565 | 'repeat-10': '10',
|
9566 | 'repeat-11': '11',
|
9567 | 'repeat-12': '12',
|
9568 | },
|
9569 | animationTimingFunction: {
|
9570 | DEFAULT: 'ease',
|
9571 | linear: 'linear',
|
9572 | in: 'ease-in',
|
9573 | out: 'ease-out',
|
9574 | 'in-out': 'ease-in-out',
|
9575 | },
|
9576 | backdropBlur: (theme) => theme('blur'),
|
9577 | backdropBrightness: (theme) => theme('brightness'),
|
9578 | backdropContrast: (theme) => theme('contrast'),
|
9579 | backdropGrayscale: (theme) => theme('grayscale'),
|
9580 | backdropHueRotate: (theme) => theme('hueRotate'),
|
9581 | backdropInvert: (theme) => theme('invert'),
|
9582 | backdropOpacity: (theme) => theme('opacity'),
|
9583 | backdropSaturate: (theme) => theme('saturate'),
|
9584 | backdropSepia: (theme) => theme('sepia'),
|
9585 | backgroundColor: (theme) => theme('colors'),
|
9586 | backgroundImage: {
|
9587 | none: 'none',
|
9588 | 'gradient-1': 'linear-gradient(135deg, #FDEB71 10%, #F8D800 100%)',
|
9589 | 'gradient-2': 'linear-gradient(135deg, #ABDCFF 10%, #0396FF 100%)',
|
9590 | 'gradient-3': 'linear-gradient(135deg, #FEB692 10%, #EA5455 100%)',
|
9591 | 'gradient-4': 'linear-gradient(135deg, #CE9FFC 10%, #7367F0 100%)',
|
9592 | 'gradient-5': 'linear-gradient(135deg, #90F7EC 10%, #32CCBC 100%)',
|
9593 | 'gradient-6': 'linear-gradient(135deg, #FFF6B7 10%, #F6416C 100%)',
|
9594 | 'gradient-7': 'linear-gradient(135deg, #81FBB8 10%, #28C76F 100%)',
|
9595 | 'gradient-8': 'linear-gradient(135deg, #E2B0FF 10%, #9F44D3 100%)',
|
9596 | 'gradient-9': 'linear-gradient(135deg, #F97794 10%, #623AA2 100%)',
|
9597 | 'gradient-10': 'linear-gradient(135deg, #FCCF31 10%, #F55555 100%)',
|
9598 | 'gradient-11': 'linear-gradient(135deg, #F761A1 10%, #8C1BAB 100%)',
|
9599 | 'gradient-12': 'linear-gradient(135deg, #43CBFF 10%, #9708CC 100%)',
|
9600 | 'gradient-13': 'linear-gradient(135deg, #5EFCE8 10%, #736EFE 100%)',
|
9601 | 'gradient-14': 'linear-gradient(135deg, #FAD7A1 10%, #E96D71 100%)',
|
9602 | 'gradient-15': 'linear-gradient(135deg, #FFD26F 10%, #3677FF 100%)',
|
9603 | 'gradient-16': 'linear-gradient(135deg, #A0FE65 10%, #FA016D 100%)',
|
9604 | 'gradient-17': 'linear-gradient(135deg, #FFDB01 10%, #0E197D 100%)',
|
9605 | 'gradient-18': 'linear-gradient(135deg, #FEC163 10%, #DE4313 100%)',
|
9606 | 'gradient-19': 'linear-gradient(135deg, #92FFC0 10%, #002661 100%)',
|
9607 | 'gradient-20': 'linear-gradient(135deg, #EEAD92 10%, #6018DC 100%)',
|
9608 | 'gradient-21': 'linear-gradient(135deg, #F6CEEC 10%, #D939CD 100%)',
|
9609 | 'gradient-22': 'linear-gradient(135deg, #52E5E7 10%, #130CB7 100%)',
|
9610 | 'gradient-23': 'linear-gradient(135deg, #F1CA74 10%, #A64DB6 100%)',
|
9611 | 'gradient-24': 'linear-gradient(135deg, #E8D07A 10%, #5312D6 100%)',
|
9612 | 'gradient-25': 'linear-gradient(135deg, #EECE13 10%, #B210FF 100%)',
|
9613 | 'gradient-26': 'linear-gradient(135deg, #79F1A4 10%, #0E5CAD 100%)',
|
9614 | 'gradient-27': 'linear-gradient(135deg, #FDD819 10%, #E80505 100%)',
|
9615 | 'gradient-28': 'linear-gradient(135deg, #FFF3B0 10%, #CA26FF 100%)',
|
9616 | 'gradient-29': 'linear-gradient(135deg, #FFF5C3 10%, #9452A5 100%)',
|
9617 | 'gradient-30': 'linear-gradient(135deg, #F05F57 10%, #360940 100%)',
|
9618 | 'gradient-31': 'linear-gradient(135deg, #2AFADF 10%, #4C83FF 100%)',
|
9619 | 'gradient-32': 'linear-gradient(135deg, #FFF886 10%, #F072B6 100%)',
|
9620 | 'gradient-33': 'linear-gradient(135deg, #97ABFF 10%, #123597 100%)',
|
9621 | 'gradient-34': 'linear-gradient(135deg, #F5CBFF 10%, #C346C2 100%)',
|
9622 | 'gradient-35': 'linear-gradient(135deg, #FFF720 10%, #3CD500 100%)',
|
9623 | 'gradient-36': 'linear-gradient(135deg, #FF6FD8 10%, #3813C2 100%)',
|
9624 | 'gradient-37': 'linear-gradient(135deg, #EE9AE5 10%, #5961F9 100%)',
|
9625 | 'gradient-38': 'linear-gradient(135deg, #FFD3A5 10%, #FD6585 100%)',
|
9626 | 'gradient-39': 'linear-gradient(135deg, #C2FFD8 10%, #465EFB 100%)',
|
9627 | 'gradient-40': 'linear-gradient(135deg, #FD6585 10%, #0D25B9 100%)',
|
9628 | 'gradient-41': 'linear-gradient(135deg, #FD6E6A 10%, #FFC600 100%)',
|
9629 | 'gradient-42': 'linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%)',
|
9630 | 'gradient-43': 'linear-gradient(135deg, #6B73FF 10%, #000DFF 100%)',
|
9631 | 'gradient-44': 'linear-gradient(135deg, #FF7AF5 10%, #513162 100%)',
|
9632 | 'gradient-45': 'linear-gradient(135deg, #F0FF00 10%, #58CFFB 100%)',
|
9633 | 'gradient-46': 'linear-gradient(135deg, #FFE985 10%, #FA742B 100%)',
|
9634 | 'gradient-47': 'linear-gradient(135deg, #FFA6B7 10%, #1E2AD2 100%)',
|
9635 | 'gradient-48': 'linear-gradient(135deg, #FFAA85 10%, #B3315F 100%)',
|
9636 | 'gradient-49': 'linear-gradient(135deg, #72EDF2 10%, #5151E5 100%)',
|
9637 | 'gradient-50': 'linear-gradient(135deg, #FF9D6C 10%, #BB4E75 100%)',
|
9638 | 'gradient-51': 'linear-gradient(135deg, #F6D242 10%, #FF52E5 100%)',
|
9639 | 'gradient-52': 'linear-gradient(135deg, #69FF97 10%, #00E4FF 100%)',
|
9640 | 'gradient-53': 'linear-gradient(135deg, #3B2667 10%, #BC78EC 100%)',
|
9641 | 'gradient-54': 'linear-gradient(135deg, #70F570 10%, #49C628 100%)',
|
9642 | 'gradient-55': 'linear-gradient(135deg, #3C8CE7 10%, #00EAFF 100%)',
|
9643 | 'gradient-56': 'linear-gradient(135deg, #FAB2FF 10%, #1904E5 100%)',
|
9644 | 'gradient-57': 'linear-gradient(135deg, #81FFEF 10%, #F067B4 100%)',
|
9645 | 'gradient-58': 'linear-gradient(135deg, #FFA8A8 10%, #FCFF00 100%)',
|
9646 | 'gradient-59': 'linear-gradient(135deg, #FFCF71 10%, #2376DD 100%)',
|
9647 | 'gradient-60': 'linear-gradient(135deg, #FF96F9 10%, #C32BAC 100%)',
|
9648 |
|
9649 | 'gradient-to-t': 'linear-gradient(to top, var(--tw-gradient-stops))',
|
9650 | 'gradient-to-tr': 'linear-gradient(to top right, var(--tw-gradient-stops))',
|
9651 | 'gradient-to-r': 'linear-gradient(to right, var(--tw-gradient-stops))',
|
9652 | 'gradient-to-br': 'linear-gradient(to bottom right, var(--tw-gradient-stops))',
|
9653 | 'gradient-to-b': 'linear-gradient(to bottom, var(--tw-gradient-stops))',
|
9654 | 'gradient-to-bl': 'linear-gradient(to bottom left, var(--tw-gradient-stops))',
|
9655 | 'gradient-to-l': 'linear-gradient(to left, var(--tw-gradient-stops))',
|
9656 | 'gradient-to-tl': 'linear-gradient(to top left, var(--tw-gradient-stops))',
|
9657 | },
|
9658 | backgroundOpacity: (theme) => theme('opacity'),
|
9659 | backgroundPosition: {
|
9660 | bottom: 'bottom',
|
9661 | center: 'center',
|
9662 | left: 'left',
|
9663 | 'left-bottom': 'left bottom',
|
9664 | 'left-top': 'left top',
|
9665 | right: 'right',
|
9666 | 'right-bottom': 'right bottom',
|
9667 | 'right-top': 'right top',
|
9668 | top: 'top',
|
9669 | },
|
9670 | backgroundSize: {
|
9671 | auto: 'auto',
|
9672 | cover: 'cover',
|
9673 | contain: 'contain',
|
9674 | },
|
9675 | blur: {
|
9676 | DEFAULT: '8px',
|
9677 | 0: '0',
|
9678 | sm: '4px',
|
9679 | md: '12px',
|
9680 | lg: '16px',
|
9681 | xl: '24px',
|
9682 | '2xl': '40px',
|
9683 | '3xl': '64px',
|
9684 | },
|
9685 | borderColor: (theme) => ({
|
9686 | DEFAULT: theme('colors.gray.200', 'currentColor'),
|
9687 | ...(_nullishCoalesce$1(theme('colors'), () => ( {}))),
|
9688 | }),
|
9689 | borderOpacity: (theme) => theme('opacity'),
|
9690 | borderRadius: {
|
9691 | DEFAULT: '0.25rem',
|
9692 | none: '0px',
|
9693 | sm: '0.125rem',
|
9694 | md: '0.375rem',
|
9695 | lg: '0.5rem',
|
9696 | xl: '0.75rem',
|
9697 | '2xl': '1rem',
|
9698 | '3xl': '1.5rem',
|
9699 |
|
9700 | '1': '100%',
|
9701 | full: '9999px',
|
9702 | },
|
9703 | borderWidth: {
|
9704 | DEFAULT: '1px',
|
9705 | 0: '0px',
|
9706 | 2: '2px',
|
9707 | 4: '4px',
|
9708 | 8: '8px',
|
9709 |
|
9710 | },
|
9711 | boxShadow: {
|
9712 | DEFAULT: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
|
9713 | sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
9714 | md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
|
9715 | lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
9716 | xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
|
9717 | '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
|
9718 | inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)',
|
9719 | none: 'none',
|
9720 | },
|
9721 | boxShadowColor: (theme) => theme('colors'),
|
9722 | brightness: {
|
9723 | 0: '0',
|
9724 | 50: '.5',
|
9725 | 75: '.75',
|
9726 | 90: '.9',
|
9727 | 95: '.95',
|
9728 | 100: '1',
|
9729 | 105: '1.05',
|
9730 | 110: '1.1',
|
9731 | 125: '1.25',
|
9732 | 150: '1.5',
|
9733 | 200: '2',
|
9734 | },
|
9735 | caretColor: (theme) => ({
|
9736 | auto: 'auto',
|
9737 | ...(_nullishCoalesce$1(theme('colors'), () => ( {}))),
|
9738 | }),
|
9739 | caretOpacity: (theme) => theme('opacity'),
|
9740 | container: {},
|
9741 | content: {
|
9742 | DEFAULT: '""',
|
9743 | 'open-quote': 'open-quote',
|
9744 | 'close-quote': 'close-quote',
|
9745 | 'open-square': '"["',
|
9746 | 'close-square': '"]"',
|
9747 | 'open-curly': '"{"',
|
9748 | 'close-curly': '"}"',
|
9749 | 'open-bracket': '"("',
|
9750 | 'close-bracket': '")"',
|
9751 | },
|
9752 | contrast: {
|
9753 | 0: '0',
|
9754 | 50: '.5',
|
9755 | 75: '.75',
|
9756 | 100: '1',
|
9757 | 125: '1.25',
|
9758 | 150: '1.5',
|
9759 | 200: '2',
|
9760 | },
|
9761 | cursor: {
|
9762 | auto: 'auto',
|
9763 | default: 'default',
|
9764 | pointer: 'pointer',
|
9765 | wait: 'wait',
|
9766 | text: 'text',
|
9767 | move: 'move',
|
9768 | help: 'help',
|
9769 | 'not-allowed': 'not-allowed',
|
9770 | },
|
9771 | divideColor: (theme) => theme('borderColor'),
|
9772 | divideOpacity: (theme) => theme('borderOpacity'),
|
9773 | divideWidth: (theme) => theme('borderWidth'),
|
9774 | dropShadow: {
|
9775 | DEFAULT: ['0 1px 2px rgba(0, 0, 0, 0.1)', '0 1px 1px rgba(0, 0, 0, 0.06)'],
|
9776 | sm: '0 1px 1px rgba(0,0,0,0.05)',
|
9777 | md: ['0 4px 3px rgba(0, 0, 0, 0.07)', '0 2px 2px rgba(0, 0, 0, 0.06)'],
|
9778 | lg: ['0 10px 8px rgba(0, 0, 0, 0.04)', '0 4px 3px rgba(0, 0, 0, 0.1)'],
|
9779 | xl: ['0 20px 13px rgba(0, 0, 0, 0.03)', '0 8px 5px rgba(0, 0, 0, 0.08)'],
|
9780 | '2xl': '0 25px 25px rgba(0, 0, 0, 0.15)',
|
9781 | none: '0 0 #0000',
|
9782 | },
|
9783 | fill: (theme) => ({
|
9784 | ...(_nullishCoalesce$1(theme('colors'), () => ( {}))),
|
9785 | none: 'none',
|
9786 | }),
|
9787 | flex: {
|
9788 | 1: '1 1 0%',
|
9789 | auto: '1 1 auto',
|
9790 | initial: '0 1 auto',
|
9791 | none: 'none',
|
9792 | },
|
9793 | flexGrow: {
|
9794 | DEFAULT: '1',
|
9795 | 0: '0',
|
9796 | },
|
9797 | flexShrink: {
|
9798 | DEFAULT: '1',
|
9799 | 0: '0',
|
9800 | },
|
9801 | fontFamily: {
|
9802 | sans: [
|
9803 | 'ui-sans-serif',
|
9804 | 'system-ui',
|
9805 | '-apple-system',
|
9806 | 'BlinkMacSystemFont',
|
9807 | '"Segoe UI"',
|
9808 | 'Roboto',
|
9809 | '"Helvetica Neue"',
|
9810 | 'Arial',
|
9811 | '"Noto Sans"',
|
9812 | 'sans-serif',
|
9813 | '"Apple Color Emoji"',
|
9814 | '"Segoe UI Emoji"',
|
9815 | '"Segoe UI Symbol"',
|
9816 | '"Noto Color Emoji"',
|
9817 | ],
|
9818 | serif: [
|
9819 | 'ui-serif',
|
9820 | 'Georgia',
|
9821 | 'Cambria',
|
9822 | '"Times New Roman"',
|
9823 | 'Times',
|
9824 | 'serif',
|
9825 | ],
|
9826 | mono: [
|
9827 | 'ui-monospace',
|
9828 | 'SFMono-Regular',
|
9829 | 'Menlo',
|
9830 | 'Monaco',
|
9831 | 'Consolas',
|
9832 | '"Liberation Mono"',
|
9833 | '"Courier New"',
|
9834 | 'monospace',
|
9835 | ],
|
9836 | },
|
9837 | fontSize: {
|
9838 | xs: ['0.75rem', { lineHeight: '1rem' }],
|
9839 | sm: ['0.875rem', { lineHeight: '1.25rem' }],
|
9840 | base: ['1rem', { lineHeight: '1.5rem' }],
|
9841 | lg: ['1.125rem', { lineHeight: '1.75rem' }],
|
9842 | xl: ['1.25rem', { lineHeight: '1.75rem' }],
|
9843 | '2xl': ['1.5rem', { lineHeight: '2rem' }],
|
9844 | '3xl': ['1.875rem', { lineHeight: '2.25rem' }],
|
9845 | '4xl': ['2.25rem', { lineHeight: '2.5rem' }],
|
9846 | '5xl': ['3rem', { lineHeight: '1' }],
|
9847 | '6xl': ['3.75rem', { lineHeight: '1' }],
|
9848 | '7xl': ['4.5rem', { lineHeight: '1' }],
|
9849 | '8xl': ['6rem', { lineHeight: '1' }],
|
9850 | '9xl': ['8rem', { lineHeight: '1' }],
|
9851 |
|
9852 | },
|
9853 | fontWeight: {
|
9854 | thin: '100',
|
9855 | extralight: '200',
|
9856 | light: '300',
|
9857 | normal: '400',
|
9858 | medium: '500',
|
9859 | semibold: '600',
|
9860 | bold: '700',
|
9861 | extrabold: '800',
|
9862 | black: '900',
|
9863 |
|
9864 | },
|
9865 | gap: (theme) => theme('spacing'),
|
9866 | gradientColorStops: (theme) => theme('colors'),
|
9867 | grayscale: {
|
9868 | DEFAULT: '100%',
|
9869 | 0: '0',
|
9870 | },
|
9871 | gridAutoColumns: {
|
9872 | auto: 'auto',
|
9873 | min: 'min-content',
|
9874 | max: 'max-content',
|
9875 | fr: 'minmax(0, 1fr)',
|
9876 | },
|
9877 | gridAutoRows: {
|
9878 | auto: 'auto',
|
9879 | min: 'min-content',
|
9880 | max: 'max-content',
|
9881 | fr: 'minmax(0, 1fr)',
|
9882 | },
|
9883 | gridColumn: {
|
9884 | auto: 'auto',
|
9885 | 'span-1': 'span 1 / span 1',
|
9886 | 'span-2': 'span 2 / span 2',
|
9887 | 'span-3': 'span 3 / span 3',
|
9888 | 'span-4': 'span 4 / span 4',
|
9889 | 'span-5': 'span 5 / span 5',
|
9890 | 'span-6': 'span 6 / span 6',
|
9891 | 'span-7': 'span 7 / span 7',
|
9892 | 'span-8': 'span 8 / span 8',
|
9893 | 'span-9': 'span 9 / span 9',
|
9894 | 'span-10': 'span 10 / span 10',
|
9895 | 'span-11': 'span 11 / span 11',
|
9896 | 'span-12': 'span 12 / span 12',
|
9897 |
|
9898 | 'span-full': '1 / -1',
|
9899 | },
|
9900 | gridColumnEnd: {
|
9901 | auto: 'auto',
|
9902 | 1: '1',
|
9903 | 2: '2',
|
9904 | 3: '3',
|
9905 | 4: '4',
|
9906 | 5: '5',
|
9907 | 6: '6',
|
9908 | 7: '7',
|
9909 | 8: '8',
|
9910 | 9: '9',
|
9911 | 10: '10',
|
9912 | 11: '11',
|
9913 | 12: '12',
|
9914 | 13: '13',
|
9915 |
|
9916 | },
|
9917 | gridColumnStart: {
|
9918 | auto: 'auto',
|
9919 | 1: '1',
|
9920 | 2: '2',
|
9921 | 3: '3',
|
9922 | 4: '4',
|
9923 | 5: '5',
|
9924 | 6: '6',
|
9925 | 7: '7',
|
9926 | 8: '8',
|
9927 | 9: '9',
|
9928 | 10: '10',
|
9929 | 11: '11',
|
9930 | 12: '12',
|
9931 | 13: '13',
|
9932 |
|
9933 | },
|
9934 | gridRow: {
|
9935 | auto: 'auto',
|
9936 | 'span-1': 'span 1 / span 1',
|
9937 | 'span-2': 'span 2 / span 2',
|
9938 | 'span-3': 'span 3 / span 3',
|
9939 | 'span-4': 'span 4 / span 4',
|
9940 | 'span-5': 'span 5 / span 5',
|
9941 | 'span-6': 'span 6 / span 6',
|
9942 |
|
9943 | 'span-full': '1 / -1',
|
9944 | },
|
9945 | gridRowStart: {
|
9946 | auto: 'auto',
|
9947 | 1: '1',
|
9948 | 2: '2',
|
9949 | 3: '3',
|
9950 | 4: '4',
|
9951 | 5: '5',
|
9952 | 6: '6',
|
9953 | 7: '7',
|
9954 |
|
9955 | },
|
9956 | gridRowEnd: {
|
9957 | auto: 'auto',
|
9958 | 1: '1',
|
9959 | 2: '2',
|
9960 | 3: '3',
|
9961 | 4: '4',
|
9962 | 5: '5',
|
9963 | 6: '6',
|
9964 | 7: '7',
|
9965 |
|
9966 | },
|
9967 | gridTemplateColumns: {
|
9968 | none: 'none',
|
9969 | 1: 'repeat(1, minmax(0, 1fr))',
|
9970 | 2: 'repeat(2, minmax(0, 1fr))',
|
9971 | 3: 'repeat(3, minmax(0, 1fr))',
|
9972 | 4: 'repeat(4, minmax(0, 1fr))',
|
9973 | 5: 'repeat(5, minmax(0, 1fr))',
|
9974 | 6: 'repeat(6, minmax(0, 1fr))',
|
9975 | 7: 'repeat(7, minmax(0, 1fr))',
|
9976 | 8: 'repeat(8, minmax(0, 1fr))',
|
9977 | 9: 'repeat(9, minmax(0, 1fr))',
|
9978 | 10: 'repeat(10, minmax(0, 1fr))',
|
9979 | 11: 'repeat(11, minmax(0, 1fr))',
|
9980 | 12: 'repeat(12, minmax(0, 1fr))',
|
9981 |
|
9982 | },
|
9983 | gridTemplateRows: {
|
9984 | none: 'none',
|
9985 | 1: 'repeat(1, minmax(0, 1fr))',
|
9986 | 2: 'repeat(2, minmax(0, 1fr))',
|
9987 | 3: 'repeat(3, minmax(0, 1fr))',
|
9988 | 4: 'repeat(4, minmax(0, 1fr))',
|
9989 | 5: 'repeat(5, minmax(0, 1fr))',
|
9990 | 6: 'repeat(6, minmax(0, 1fr))',
|
9991 |
|
9992 | },
|
9993 | height: (theme, { breakpoints }) => ({
|
9994 | auto: 'auto',
|
9995 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
9996 | '1/2': '50%',
|
9997 | '1/3': '33.333333%',
|
9998 | '2/3': '66.666667%',
|
9999 | '1/4': '25%',
|
10000 | '2/4': '50%',
|
10001 | '3/4': '75%',
|
10002 | '1/5': '20%',
|
10003 | '2/5': '40%',
|
10004 | '3/5': '60%',
|
10005 | '4/5': '80%',
|
10006 | '1/6': '16.666667%',
|
10007 | '2/6': '33.333333%',
|
10008 | '3/6': '50%',
|
10009 | '4/6': '66.666667%',
|
10010 | '5/6': '83.333333%',
|
10011 |
|
10012 | xs: '20rem',
|
10013 | sm: '24rem',
|
10014 | md: '28rem',
|
10015 | lg: '32rem',
|
10016 | xl: '36rem',
|
10017 | '2xl': '42rem',
|
10018 | '3xl': '48rem',
|
10019 | '4xl': '56rem',
|
10020 | '5xl': '64rem',
|
10021 | '6xl': '72rem',
|
10022 | '7xl': '80rem',
|
10023 |
|
10024 | full: '100%',
|
10025 | min: 'min-content',
|
10026 | max: 'max-content',
|
10027 | prose: '65ch',
|
10028 | screen: '100vh',
|
10029 | ...breakpoints(_nullishCoalesce$1(theme('screens'), () => ( {}))),
|
10030 | }),
|
10031 | hueRotate: {
|
10032 | '-180': '-180deg',
|
10033 | '-90': '-90deg',
|
10034 | '-60': '-60deg',
|
10035 | '-30': '-30deg',
|
10036 | '-15': '-15deg',
|
10037 | 0: '0deg',
|
10038 | 15: '15deg',
|
10039 | 30: '30deg',
|
10040 | 60: '60deg',
|
10041 | 90: '90deg',
|
10042 | 180: '180deg',
|
10043 | },
|
10044 | inset: (theme, { negative }) => ({
|
10045 | auto: 'auto',
|
10046 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
10047 | ...negative(theme('spacing')),
|
10048 | '1/2': '50%',
|
10049 | '1/3': '33.333333%',
|
10050 | '2/3': '66.666667%',
|
10051 | '1/4': '25%',
|
10052 | '2/4': '50%',
|
10053 | '3/4': '75%',
|
10054 | full: '100%',
|
10055 | '-1/2': '-50%',
|
10056 | '-1/3': '-33.333333%',
|
10057 | '-2/3': '-66.666667%',
|
10058 | '-1/4': '-25%',
|
10059 | '-2/4': '-50%',
|
10060 | '-3/4': '-75%',
|
10061 | '-full': '-100%',
|
10062 |
|
10063 |
|
10064 | }),
|
10065 | invert: {
|
10066 | DEFAULT: '100%',
|
10067 | 0: '0',
|
10068 | },
|
10069 | keyframes,
|
10070 | letterSpacing: {
|
10071 | tighter: '-0.05em',
|
10072 | tight: '-0.025em',
|
10073 | normal: '0em',
|
10074 | wide: '0.025em',
|
10075 | wider: '0.05em',
|
10076 | widest: '0.1em',
|
10077 | },
|
10078 | lineHeight: {
|
10079 | none: '1',
|
10080 | tight: '1.25',
|
10081 | snug: '1.375',
|
10082 | normal: '1.5',
|
10083 | relaxed: '1.625',
|
10084 | loose: '2',
|
10085 | 3: '.75rem',
|
10086 | 4: '1rem',
|
10087 | 5: '1.25rem',
|
10088 | 6: '1.5rem',
|
10089 | 7: '1.75rem',
|
10090 | 8: '2rem',
|
10091 | 9: '2.25rem',
|
10092 | 10: '2.5rem',
|
10093 |
|
10094 | },
|
10095 | listStyleType: {
|
10096 | none: 'none',
|
10097 | circle: 'circle',
|
10098 | square: 'square',
|
10099 | disc: 'disc',
|
10100 | decimal: 'decimal',
|
10101 | 'zero-decimal': 'decimal-leading-zero',
|
10102 | greek: 'lower-greek',
|
10103 | roman: 'lower-roman',
|
10104 | alpha: 'lower-alpha',
|
10105 | 'upper-roman': 'upper-roman',
|
10106 | 'upper-alpha': 'upper-alpha',
|
10107 | },
|
10108 | margin: (theme, { negative }) => ({
|
10109 | auto: 'auto',
|
10110 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
10111 | ...negative(theme('spacing')),
|
10112 |
|
10113 | }),
|
10114 | maxHeight: (theme, { breakpoints }) => ({
|
10115 | none: 'none',
|
10116 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
10117 | xs: '20rem',
|
10118 | sm: '24rem',
|
10119 | md: '28rem',
|
10120 | lg: '32rem',
|
10121 | xl: '36rem',
|
10122 | '2xl': '42rem',
|
10123 | '3xl': '48rem',
|
10124 | '4xl': '56rem',
|
10125 | '5xl': '64rem',
|
10126 | '6xl': '72rem',
|
10127 | '7xl': '80rem',
|
10128 |
|
10129 | full: '100%',
|
10130 | min: 'min-content',
|
10131 | max: 'max-content',
|
10132 | prose: '65ch',
|
10133 | screen: '100vh',
|
10134 | ...breakpoints(_nullishCoalesce$1(theme('screens'), () => ( {}))),
|
10135 | }),
|
10136 | maxWidth: (theme, { breakpoints }) => ({
|
10137 | none: 'none',
|
10138 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
10139 | xs: '20rem',
|
10140 | sm: '24rem',
|
10141 | md: '28rem',
|
10142 | lg: '32rem',
|
10143 | xl: '36rem',
|
10144 | '2xl': '42rem',
|
10145 | '3xl': '48rem',
|
10146 | '4xl': '56rem',
|
10147 | '5xl': '64rem',
|
10148 | '6xl': '72rem',
|
10149 | '7xl': '80rem',
|
10150 |
|
10151 | full: '100%',
|
10152 | min: 'min-content',
|
10153 | max: 'max-content',
|
10154 | prose: '65ch',
|
10155 | screen: '100vw',
|
10156 | ...breakpoints(_nullishCoalesce$1(theme('screens'), () => ( {}))),
|
10157 | }),
|
10158 | minHeight: (theme) => theme('maxHeight'),
|
10159 | minWidth: (theme) => theme('maxWidth'),
|
10160 | objectPosition: {
|
10161 | bottom: 'bottom',
|
10162 | center: 'center',
|
10163 | left: 'left',
|
10164 | 'left-bottom': 'left bottom',
|
10165 | 'left-top': 'left top',
|
10166 | right: 'right',
|
10167 | 'right-bottom': 'right bottom',
|
10168 | 'right-top': 'right top',
|
10169 | top: 'top',
|
10170 | },
|
10171 | opacity: {
|
10172 | 0: '0',
|
10173 | 5: '0.05',
|
10174 | 10: '0.1',
|
10175 | 20: '0.2',
|
10176 | 25: '0.25',
|
10177 | 30: '0.3',
|
10178 | 40: '0.4',
|
10179 | 50: '0.5',
|
10180 | 60: '0.6',
|
10181 | 70: '0.7',
|
10182 | 75: '0.75',
|
10183 | 80: '0.8',
|
10184 | 90: '0.9',
|
10185 | 95: '0.95',
|
10186 | 100: '1',
|
10187 |
|
10188 | },
|
10189 | order: {
|
10190 | first: '-9999',
|
10191 | last: '9999',
|
10192 | none: '0',
|
10193 | 1: '1',
|
10194 | 2: '2',
|
10195 | 3: '3',
|
10196 | 4: '4',
|
10197 | 5: '5',
|
10198 | 6: '6',
|
10199 | 7: '7',
|
10200 | 8: '8',
|
10201 | 9: '9',
|
10202 | 10: '10',
|
10203 | 11: '11',
|
10204 | 12: '12',
|
10205 |
|
10206 | },
|
10207 | outline: {
|
10208 | none: ['2px solid transparent', '2px'],
|
10209 |
|
10210 |
|
10211 | },
|
10212 | outlineColor: (theme) => theme('colors'),
|
10213 | padding: (theme) => theme('spacing'),
|
10214 | perspective: (theme) => ({
|
10215 | none: 'none',
|
10216 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
10217 | xs: '20rem',
|
10218 | sm: '24rem',
|
10219 | md: '28rem',
|
10220 | lg: '32rem',
|
10221 | xl: '36rem',
|
10222 | '2xl': '42rem',
|
10223 | '3xl': '48rem',
|
10224 | '4xl': '56rem',
|
10225 | '5xl': '64rem',
|
10226 | '6xl': '72rem',
|
10227 | '7xl': '80rem',
|
10228 | }),
|
10229 | perspectiveOrigin: {
|
10230 | center: 'center',
|
10231 | top: 'top',
|
10232 | 'top-right': 'top right',
|
10233 | right: 'right',
|
10234 | 'bottom-right': 'bottom right',
|
10235 | bottom: 'bottom',
|
10236 | 'bottom-left': 'bottom left',
|
10237 | left: 'left',
|
10238 | 'top-left': 'top left',
|
10239 | },
|
10240 | placeholderColor: (theme) => theme('colors'),
|
10241 | placeholderOpacity: (theme) => theme('opacity'),
|
10242 | ringColor: (theme) => ({
|
10243 | DEFAULT: theme('colors.blue.500', '#3b82f6'),
|
10244 | ...(_nullishCoalesce$1(theme('colors'), () => ( {}))),
|
10245 | }),
|
10246 | ringOffsetColor: (theme) => theme('colors'),
|
10247 | ringOffsetWidth: {
|
10248 | 0: '0px',
|
10249 | 1: '1px',
|
10250 | 2: '2px',
|
10251 | 4: '4px',
|
10252 | 8: '8px',
|
10253 |
|
10254 | },
|
10255 | ringOpacity: (theme) => ({
|
10256 | DEFAULT: '0.5',
|
10257 | ...(_nullishCoalesce$1(theme('opacity'), () => ( {}))),
|
10258 | }),
|
10259 | ringWidth: {
|
10260 | DEFAULT: '3px',
|
10261 | 0: '0px',
|
10262 | 1: '1px',
|
10263 | 2: '2px',
|
10264 | 4: '4px',
|
10265 | 8: '8px',
|
10266 |
|
10267 | },
|
10268 | rotate: {
|
10269 | '-180': '-180deg',
|
10270 | '-90': '-90deg',
|
10271 | '-45': '-45deg',
|
10272 | '-12': '-12deg',
|
10273 | '-6': '-6deg',
|
10274 | '-3': '-3deg',
|
10275 | '-2': '-2deg',
|
10276 | '-1': '-1deg',
|
10277 | 0: '0deg',
|
10278 | 1: '1deg',
|
10279 | 2: '2deg',
|
10280 | 3: '3deg',
|
10281 | 6: '6deg',
|
10282 | 12: '12deg',
|
10283 | 45: '45deg',
|
10284 | 90: '90deg',
|
10285 | 180: '180deg',
|
10286 |
|
10287 |
|
10288 | },
|
10289 | saturate: {
|
10290 | DEFAULT: '0',
|
10291 | 0: '0',
|
10292 | 50: '.5',
|
10293 | 100: '1',
|
10294 | 150: '1.5',
|
10295 | 200: '2',
|
10296 | },
|
10297 | scale: {
|
10298 | 0: '0',
|
10299 | 50: '.5',
|
10300 | 75: '.75',
|
10301 | 90: '.9',
|
10302 | 95: '.95',
|
10303 | 100: '1',
|
10304 | 105: '1.05',
|
10305 | 110: '1.1',
|
10306 | 125: '1.25',
|
10307 | 150: '1.5',
|
10308 |
|
10309 | },
|
10310 | sepia: {
|
10311 | DEFAULT: '100%',
|
10312 | 0: '0',
|
10313 | },
|
10314 | skew: {
|
10315 | '-12': '-12deg',
|
10316 | '-6': '-6deg',
|
10317 | '-3': '-3deg',
|
10318 | '-2': '-2deg',
|
10319 | '-1': '-1deg',
|
10320 | 0: '0deg',
|
10321 | 1: '1deg',
|
10322 | 2: '2deg',
|
10323 | 3: '3deg',
|
10324 | 6: '6deg',
|
10325 | 12: '12deg',
|
10326 |
|
10327 |
|
10328 | },
|
10329 | space: (theme, { negative }) => ({
|
10330 | ...theme('spacing'),
|
10331 | ...negative(theme('spacing')),
|
10332 | }),
|
10333 | stroke: (theme) => ({
|
10334 | ...(_nullishCoalesce$1(theme('colors'), () => ( {}))),
|
10335 | none: 'none',
|
10336 | }),
|
10337 | strokeWidth: {
|
10338 | 0: '0',
|
10339 | 1: '1',
|
10340 | 2: '2',
|
10341 | },
|
10342 | strokeDashArray: {
|
10343 | 0: '0',
|
10344 | 1: '1',
|
10345 | 2: '2',
|
10346 | },
|
10347 | strokeDashOffset: {
|
10348 | 0: '0',
|
10349 | 1: '1',
|
10350 | 2: '2',
|
10351 | },
|
10352 | tabSize: {
|
10353 | DEFAULT: '4',
|
10354 | 0: '0',
|
10355 | 2: '2',
|
10356 | 4: '4',
|
10357 | 8: '8',
|
10358 |
|
10359 | },
|
10360 | textColor: (theme) => theme('colors'),
|
10361 | textOpacity: (theme) => theme('opacity'),
|
10362 | textShadow: {
|
10363 | DEFAULT: '0px 0px 1px rgb(0 0 0 / 20%), 0px 0px 1px rgb(1 0 5 / 10%)',
|
10364 | sm: '1px 1px 3px rgb(36 37 47 / 25%)',
|
10365 | md: '0px 1px 2px rgb(30 29 39 / 19%), 1px 2px 4px rgb(54 64 147 / 18%)',
|
10366 | lg: '3px 3px 6px rgb(0 0 0 / 26%), 0 0 5px rgb(15 3 86 / 22%)',
|
10367 | xl: '1px 1px 3px rgb(0 0 0 / 29%), 2px 4px 7px rgb(73 64 125 / 35%)',
|
10368 | none: 'none',
|
10369 | },
|
10370 | textDecorationColor: (theme) => theme('colors'),
|
10371 | textDecorationOpacity: (theme) => theme('opacity'),
|
10372 | textDecorationLength: {
|
10373 | 'auto': 'auto',
|
10374 | 0: '0px',
|
10375 | 2: '2px',
|
10376 | 4: '4px',
|
10377 | 8: '8px',
|
10378 | },
|
10379 | textDecorationOffset: {
|
10380 | 'auto': 'auto',
|
10381 | 0: '0px',
|
10382 | 1: '1px',
|
10383 | 2: '2px',
|
10384 | 4: '4px',
|
10385 | 8: '8px',
|
10386 | },
|
10387 | textIndent: {
|
10388 | DEFAULT: '1.5rem',
|
10389 | xs: '0.5rem',
|
10390 | sm: '1rem',
|
10391 | md: '1.5rem',
|
10392 | lg: '2rem',
|
10393 | xl: '2.5rem',
|
10394 | '2xl': '3rem',
|
10395 | '3xl': '4rem',
|
10396 | },
|
10397 | textStrokeColor: (theme) => ({
|
10398 | DEFAULT: theme('colors.gray.200', 'currentColor'),
|
10399 | ...(_nullishCoalesce$1(theme('colors'), () => ( {}))),
|
10400 | }),
|
10401 | textStrokeWidth: {
|
10402 | DEFAULT: 'medium',
|
10403 | 'none': '0',
|
10404 | 'sm': 'thin',
|
10405 | 'md': 'medium',
|
10406 | 'lg': 'thick',
|
10407 | },
|
10408 | transformOrigin: {
|
10409 | center: 'center',
|
10410 | top: 'top',
|
10411 | 'top-right': 'top right',
|
10412 | right: 'right',
|
10413 | 'bottom-right': 'bottom right',
|
10414 | bottom: 'bottom',
|
10415 | 'bottom-left': 'bottom left',
|
10416 | left: 'left',
|
10417 | 'top-left': 'top left',
|
10418 | },
|
10419 | transitionDuration: {
|
10420 | DEFAULT: '150ms',
|
10421 | 75: '75ms',
|
10422 | 100: '100ms',
|
10423 | 150: '150ms',
|
10424 | 200: '200ms',
|
10425 | 300: '300ms',
|
10426 | 500: '500ms',
|
10427 | 700: '700ms',
|
10428 | 1000: '1000ms',
|
10429 |
|
10430 | },
|
10431 | transitionDelay: {
|
10432 | 75: '75ms',
|
10433 | 100: '100ms',
|
10434 | 150: '150ms',
|
10435 | 200: '200ms',
|
10436 | 300: '300ms',
|
10437 | 500: '500ms',
|
10438 | 700: '700ms',
|
10439 | 1000: '1000ms',
|
10440 |
|
10441 | },
|
10442 | transitionProperty: {
|
10443 | DEFAULT: 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
|
10444 | none: 'none',
|
10445 | all: 'all',
|
10446 | colors: 'background-color, border-color, color, fill, stroke',
|
10447 | opacity: 'opacity',
|
10448 | shadow: 'box-shadow',
|
10449 | transform: 'transform',
|
10450 | },
|
10451 | transitionTimingFunction: {
|
10452 | DEFAULT: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
10453 | linear: 'linear',
|
10454 | in: 'cubic-bezier(0.4, 0, 1, 1)',
|
10455 | out: 'cubic-bezier(0, 0, 0.2, 1)',
|
10456 | 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',
|
10457 | },
|
10458 | translate: (theme, { negative }) => ({
|
10459 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
10460 | ...negative(theme('spacing')),
|
10461 | '1/2': '50%',
|
10462 | '1/3': '33.333333%',
|
10463 | '2/3': '66.666667%',
|
10464 | '1/4': '25%',
|
10465 | '2/4': '50%',
|
10466 | '3/4': '75%',
|
10467 | full: '100%',
|
10468 | '-1/2': '-50%',
|
10469 | '-1/3': '-33.333333%',
|
10470 | '-2/3': '-66.666667%',
|
10471 | '-1/4': '-25%',
|
10472 | '-2/4': '-50%',
|
10473 | '-3/4': '-75%',
|
10474 | '-full': '-100%',
|
10475 |
|
10476 |
|
10477 | }),
|
10478 | width: (theme, { breakpoints }) => ({
|
10479 | auto: 'auto',
|
10480 | ...(_nullishCoalesce$1(theme('spacing'), () => ( {}))),
|
10481 |
|
10482 | '1/2': '50%',
|
10483 | '1/3': '33.333333%',
|
10484 | '2/3': '66.666667%',
|
10485 | '1/4': '25%',
|
10486 | '2/4': '50%',
|
10487 | '3/4': '75%',
|
10488 | '1/5': '20%',
|
10489 | '2/5': '40%',
|
10490 | '3/5': '60%',
|
10491 | '4/5': '80%',
|
10492 | '1/6': '16.666667%',
|
10493 | '2/6': '33.333333%',
|
10494 | '3/6': '50%',
|
10495 | '4/6': '66.666667%',
|
10496 | '5/6': '83.333333%',
|
10497 | '1/12': '8.333333%',
|
10498 | '2/12': '16.666667%',
|
10499 | '3/12': '25%',
|
10500 | '4/12': '33.333333%',
|
10501 | '5/12': '41.666667%',
|
10502 | '6/12': '50%',
|
10503 | '7/12': '58.333333%',
|
10504 | '8/12': '66.666667%',
|
10505 | '9/12': '75%',
|
10506 | '10/12': '83.333333%',
|
10507 | '11/12': '91.666667%',
|
10508 | xs: '20rem',
|
10509 | sm: '24rem',
|
10510 | md: '28rem',
|
10511 | lg: '32rem',
|
10512 | xl: '36rem',
|
10513 | '2xl': '42rem',
|
10514 | '3xl': '48rem',
|
10515 | '4xl': '56rem',
|
10516 | '5xl': '64rem',
|
10517 | '6xl': '72rem',
|
10518 | '7xl': '80rem',
|
10519 |
|
10520 | full: '100%',
|
10521 | min: 'min-content',
|
10522 | max: 'max-content',
|
10523 | prose: '65ch',
|
10524 | screen: '100vw',
|
10525 | ...breakpoints(_nullishCoalesce$1(theme('screens'), () => ( {}))),
|
10526 | }),
|
10527 | zIndex: {
|
10528 | auto: 'auto',
|
10529 | 0: '0',
|
10530 | 10: '10',
|
10531 | 20: '20',
|
10532 | 30: '30',
|
10533 | 40: '40',
|
10534 | 50: '50',
|
10535 |
|
10536 |
|
10537 | },
|
10538 | },
|
10539 | variantOrder: variantOrder,
|
10540 | plugins: [],
|
10541 | handlers: {
|
10542 | static : true,
|
10543 | time: true,
|
10544 | color: true,
|
10545 | opacity: true,
|
10546 | number : true,
|
10547 | string: true,
|
10548 | bracket: true,
|
10549 | hex: true,
|
10550 | nxl: true,
|
10551 | fraction: true,
|
10552 | size: true,
|
10553 | variable: true,
|
10554 | negative: true,
|
10555 | },
|
10556 | };
|
10557 |
|
10558 |
|
10559 |
|
10560 | function cssEscape(str) {
|
10561 | const length = str.length;
|
10562 | let index = -1;
|
10563 | let codeUnit;
|
10564 | let result = '';
|
10565 | const firstCodeUnit = str.charCodeAt(0);
|
10566 | while (++index < length) {
|
10567 | codeUnit = str.charCodeAt(index);
|
10568 |
|
10569 |
|
10570 |
|
10571 |
|
10572 |
|
10573 | if (codeUnit === 0x0000) {
|
10574 | result += '\uFFFD';
|
10575 | continue;
|
10576 | }
|
10577 |
|
10578 |
|
10579 | if (codeUnit === 44){
|
10580 | result += '\\2c ';
|
10581 | continue;
|
10582 | }
|
10583 |
|
10584 | if (
|
10585 |
|
10586 |
|
10587 | (codeUnit >= 0x0001 && codeUnit <= 0x001f) ||
|
10588 | codeUnit === 0x007f ||
|
10589 |
|
10590 |
|
10591 | (index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
10592 |
|
10593 |
|
10594 | (index === 1 &&
|
10595 | codeUnit >= 0x0030 &&
|
10596 | codeUnit <= 0x0039 &&
|
10597 | firstCodeUnit === 0x002d)
|
10598 | ) {
|
10599 |
|
10600 | result += '\\' + codeUnit.toString(16) + ' ';
|
10601 | continue;
|
10602 | }
|
10603 |
|
10604 | if (
|
10605 |
|
10606 |
|
10607 | index === 0 &&
|
10608 | length === 1 &&
|
10609 | codeUnit === 0x002d
|
10610 | ) {
|
10611 | result += '\\' + str.charAt(index);
|
10612 | continue;
|
10613 | }
|
10614 |
|
10615 |
|
10616 |
|
10617 |
|
10618 |
|
10619 | if (
|
10620 | codeUnit >= 0x0080 ||
|
10621 | codeUnit === 0x002d ||
|
10622 | codeUnit === 0x005f ||
|
10623 | (codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
10624 | (codeUnit >= 0x0041 && codeUnit <= 0x005a) ||
|
10625 | (codeUnit >= 0x0061 && codeUnit <= 0x007a)
|
10626 | ) {
|
10627 |
|
10628 | result += str.charAt(index);
|
10629 | continue;
|
10630 | }
|
10631 |
|
10632 |
|
10633 |
|
10634 | result += '\\' + str.charAt(index);
|
10635 | }
|
10636 | return result;
|
10637 | }
|
10638 |
|
10639 | function combineConfig(
|
10640 | a,
|
10641 | b,
|
10642 | arrayMergeDepth = Infinity,
|
10643 | ) {
|
10644 | const output = { ...a };
|
10645 | for (const [key_of_b, value_of_b] of Object.entries(b)) {
|
10646 | if (key_of_b in a) {
|
10647 | const value_of_a = a[key_of_b];
|
10648 | if (value_of_a !== value_of_b) {
|
10649 | if (value_of_b !== null && (value_of_b ).constructor !== Object) {
|
10650 | if (arrayMergeDepth > 0 && Array.isArray(value_of_a) && Array.isArray(value_of_b)) {
|
10651 | output[key_of_b] = [...value_of_a, ...value_of_b];
|
10652 | } else {
|
10653 | output[key_of_b] = value_of_b;
|
10654 | }
|
10655 | } else if (value_of_a !== null && (value_of_a ).constructor === Object) {
|
10656 | output[key_of_b] = combineConfig(
|
10657 | value_of_a ,
|
10658 | value_of_b ,
|
10659 | arrayMergeDepth - 1
|
10660 | );
|
10661 | } else if (Array.isArray(value_of_a)){
|
10662 | output[key_of_b] = [
|
10663 | ...value_of_a,
|
10664 | ...Array.isArray(value_of_b) ? value_of_b : [value_of_b],
|
10665 | ];
|
10666 | } else {
|
10667 | output[key_of_b] = {
|
10668 | DEFAULT: value_of_a,
|
10669 | ...value_of_b ,
|
10670 | };
|
10671 | }
|
10672 | }
|
10673 | } else {
|
10674 | output[key_of_b] = value_of_b;
|
10675 | }
|
10676 | }
|
10677 | return output;
|
10678 | }
|
10679 |
|
10680 | function diffConfig(
|
10681 | a,
|
10682 | b,
|
10683 | ) {
|
10684 | if (typeof a !== typeof b) return b;
|
10685 | if (Array.isArray(a) && Array.isArray(b)) {
|
10686 | if (JSON.stringify(a) !== JSON.stringify(b)) return b;
|
10687 | return;
|
10688 | }
|
10689 | if (a && b && typeof a === 'object' && typeof b === 'object') {
|
10690 | const output = {};
|
10691 | for (const [key, value] of Object.entries(b)) {
|
10692 | if (key in a) {
|
10693 | const diff = diffConfig((a )[key], (b )[key]);
|
10694 | if (diff) output[key] = diff;
|
10695 | } else {
|
10696 | output[key] = value;
|
10697 | }
|
10698 | }
|
10699 | if (Object.keys(output).length === 0) return;
|
10700 | return output;
|
10701 | }
|
10702 | if (a !== b) return b;
|
10703 | }
|
10704 |
|
10705 | function createHandler(handlers = { static: true }) {
|
10706 | return (utility, value, color) => {
|
10707 | const handler = {
|
10708 | utility,
|
10709 | value,
|
10710 | color,
|
10711 | _amount: utility.amount,
|
10712 |
|
10713 | handleStatic: handlers.static ? (map, callback) => {
|
10714 | if (handler.value) return handler;
|
10715 | if (map && typeof map === 'object') {
|
10716 | const knownMap = map ;
|
10717 | if (knownMap.DEFAULT) knownMap[handler.utility.raw] = knownMap.DEFAULT;
|
10718 | if (handler._amount in knownMap)
|
10719 | handler.value = callback
|
10720 | ? callback(handler._amount)
|
10721 | : `${knownMap[handler._amount]}`;
|
10722 | }
|
10723 | return handler;
|
10724 | } : () => handler,
|
10725 |
|
10726 | handleBody: handlers.static ? (map, callback) => {
|
10727 | if (handler.value) return handler;
|
10728 | if (map && typeof map === 'object') {
|
10729 | const knownMap = map ;
|
10730 | if (knownMap.DEFAULT) knownMap[''] = knownMap.DEFAULT;
|
10731 | const body = handler.utility.body;
|
10732 | if (body in knownMap)
|
10733 | handler.value = callback ? callback(body) : `${knownMap[body]}`;
|
10734 | }
|
10735 | return handler;
|
10736 | } : () => handler,
|
10737 |
|
10738 | handleNumber: handlers.number ? (start = -Infinity, end = Infinity, type = 'int', callback) => {
|
10739 | if (handler.value) return handler;
|
10740 | if (isNumber(handler._amount, start, end, type))
|
10741 | handler.value = callback ? callback(+handler._amount) : handler._amount;
|
10742 | return handler;
|
10743 | } : () => handler,
|
10744 |
|
10745 | handleTime: handlers.time ? (start = -Infinity, end = Infinity, type = 'int', callback) => {
|
10746 | if (handler.value) return handler;
|
10747 | let unit = 'ms';
|
10748 | let amount = handler._amount;
|
10749 | if (amount.endsWith('ms')) {
|
10750 | amount = amount.slice(0, -2);
|
10751 | } else if (amount.endsWith('s')) {
|
10752 | unit = 's';
|
10753 | amount = amount.slice(0, -1);
|
10754 | } else {
|
10755 | return handler;
|
10756 | }
|
10757 | if (isNumber(amount, start, end, type))
|
10758 | handler.value = callback ? callback(unit === 's' ? +amount * 1000 : +amount) : handler._amount;
|
10759 | return handler;
|
10760 | } : () => handler,
|
10761 |
|
10762 | handleString: handlers.string ? (callback) => {
|
10763 | if (handler.value) return handler;
|
10764 | handler.value = callback(handler.utility.body);
|
10765 | return handler;
|
10766 | } : () => handler,
|
10767 |
|
10768 | handleSquareBrackets: handlers.bracket ? (callback) => {
|
10769 | if (handler.value) return handler;
|
10770 | if (handler._amount[0] === '[' && handler._amount[handler._amount.length-1] === ']') {
|
10771 | let value = handler._amount.slice(1, -1).replace(/_/g, ' ');
|
10772 | if (value.indexOf('calc(') > -1) {
|
10773 | value = value.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, '$1 $2 ');
|
10774 | }
|
10775 | handler.value = callback
|
10776 | ? callback(value)
|
10777 | : value;
|
10778 | }
|
10779 | return handler;
|
10780 | } : () => handler,
|
10781 |
|
10782 | handleSpacing: handlers.number ? () => {
|
10783 |
|
10784 | return handler.handleNumber(0, undefined, 'float', (number) =>
|
10785 | number === 0 ? '0px' : `${roundUp(number / 4, 6)}rem`
|
10786 | );
|
10787 | }: () => handler,
|
10788 |
|
10789 | handleNxl: handlers.nxl ? (callback) => {
|
10790 | if (handler.value) return handler;
|
10791 | if (/^\d*xl$/.test(handler._amount))
|
10792 | handler.value = callback
|
10793 | ? callback(handler._amount === 'xl' ? 1 : parseInt(handler._amount))
|
10794 | : parseInt(handler._amount).toString();
|
10795 | return handler;
|
10796 | }: () => handler,
|
10797 |
|
10798 | handleFraction: handlers.fraction ? (callback) => {
|
10799 | if (handler.value) return handler;
|
10800 | if (isFraction(handler._amount))
|
10801 | handler.value = callback
|
10802 | ? callback(handler._amount)
|
10803 | : fracToPercent(handler._amount);
|
10804 | return handler;
|
10805 | } : () => handler,
|
10806 |
|
10807 | handleSize: handlers.size ? (callback) => {
|
10808 | if (handler.value) return handler;
|
10809 | if (isSize(handler._amount))
|
10810 | handler.value = callback ? callback(handler._amount) : handler._amount;
|
10811 | return handler;
|
10812 | } : () => handler,
|
10813 |
|
10814 | handleVariable: handlers.variable ? (callback) => {
|
10815 | if (handler.value) return handler;
|
10816 | const matchVariable = handler.utility.raw.match(/-\$[\w-]+/);
|
10817 | if (matchVariable) {
|
10818 | const variableName = matchVariable[0].substring(2);
|
10819 | handler.value = callback ? callback(variableName) : `var(--${variableName})`;
|
10820 | }
|
10821 | return handler;
|
10822 | } : () => handler,
|
10823 |
|
10824 | handleColor: handlers.color ? (map = defaultColors) => {
|
10825 | if (handler.value) return handler;
|
10826 | let color;
|
10827 | if (map && typeof map === 'object') {
|
10828 | const colors = flatColors(map );
|
10829 | const body = handler.utility.raw.replace(/^ring-offset|outline-solid|outline-dotted/, 'head').replace(/^\w+-/, '');
|
10830 | const [ key, opacity ] = splitColorGroup(body);
|
10831 | handler.opacity = opacity;
|
10832 | if (key in colors) {
|
10833 | color = colors[key];
|
10834 | } else if (handlers.hex && key.startsWith('hex-')) {
|
10835 | const hex = key.slice(4);
|
10836 | if(hex2RGB(hex)) color = '#' + hex;
|
10837 | }
|
10838 | if (typeof color === 'string') {
|
10839 | handler.value = color;
|
10840 | } else if (typeof color === 'function') {
|
10841 | handler.color = color;
|
10842 | }
|
10843 | }
|
10844 | return handler;
|
10845 | }: () => handler,
|
10846 |
|
10847 | handleOpacity: handlers.opacity ? (map) => {
|
10848 | if (handler.opacity && typeof map === 'object') {
|
10849 | const _map = map ;
|
10850 | if (handlers.static && handler.opacity in _map) {
|
10851 | handler.opacity = _map[handler.opacity];
|
10852 | } else if (handlers.number && isNumber(handler.opacity, 0, 100, 'int')) {
|
10853 | handler.opacity = (+handler.opacity / 100).toString();
|
10854 | } else if (handlers.variable && handler.opacity.charAt(0) === '$') {
|
10855 | handler.opacity = `var(--${handler.opacity.slice(1)})`;
|
10856 | } else if (handlers.bracket && handler.opacity.charAt(0) === '[' && handler.opacity.charAt(handler.opacity.length - 1) === ']') {
|
10857 | handler.opacity = handler.opacity.slice(1, -1).replace(/_/g, ' ');
|
10858 | } else {
|
10859 | handler.opacity = undefined;
|
10860 | }
|
10861 | }
|
10862 | return handler;
|
10863 | }: () => handler,
|
10864 |
|
10865 | handleNegative: handlers.negative ? (callback = negateValue) => {
|
10866 | if (!handler.value) return handler;
|
10867 | handler.value = handler.utility.isNegative ? callback(handler.value) : handler.value;
|
10868 | return handler;
|
10869 | }: () => handler,
|
10870 |
|
10871 | createProperty: (name, callback) => {
|
10872 | if (!handler.value) return;
|
10873 | const value = callback ? callback(handler.value) : handler.value;
|
10874 | return new Property(name, value);
|
10875 | },
|
10876 |
|
10877 | createStyle: (selector, callback) => {
|
10878 | if (!handler.value) return;
|
10879 | const value = callback ? callback(handler.value) : undefined;
|
10880 | return new Style(selector, value);
|
10881 | },
|
10882 |
|
10883 | createColorValue: (opacityValue) => {
|
10884 | if (handler.color) return handler.color({ opacityValue });
|
10885 | if (handler.value) {
|
10886 | if (['transparent', 'currentColor', 'auto', 'none'].includes(handler.value)) return handler.value;
|
10887 | if (handler.value.includes('var') && opacityValue) return `rgba(${handler.value}, ${handler.opacity || opacityValue})`;
|
10888 | return opacityValue ? `rgba(${toColor(handler.value).color}, ${handler.opacity || opacityValue})` : `rgb(${toColor(handler.value).color})`;
|
10889 | }
|
10890 | },
|
10891 |
|
10892 | createColorStyle: (selector, property, opacityVariable, wrapRGB = true) => {
|
10893 | if (handler.color) {
|
10894 | const value = handler.color({ opacityVariable, opacityValue: opacityVariable ? `var(${opacityVariable})`: undefined });
|
10895 | if (opacityVariable) {
|
10896 | return new Style(selector, [
|
10897 | new Property(opacityVariable, handler.opacity || '1'),
|
10898 | new Property(property, value),
|
10899 | ]);
|
10900 | }
|
10901 | return new Style(selector, new Property(property, value));
|
10902 | }
|
10903 | const color = handler.value;
|
10904 | if (!color) return;
|
10905 | if (['transparent', 'currentColor', 'auto', 'none'].includes(color) || color.includes('var')) return new Style(selector, new Property(property, color));
|
10906 | const rgb = toColor(color);
|
10907 | if (opacityVariable) {
|
10908 | return new Style(selector, [
|
10909 | new Property(opacityVariable, handler.opacity || rgb.opacity),
|
10910 | new Property(property, `rgba(${rgb.color}, var(${opacityVariable}))`),
|
10911 | ]);
|
10912 | }
|
10913 | return new Style(selector, new Property(property, wrapRGB ? `rgb(${rgb.color})` : rgb.color));
|
10914 | },
|
10915 |
|
10916 | callback: (func) => {
|
10917 | if (!handler.value) return;
|
10918 | return func(handler.value);
|
10919 | },
|
10920 | };
|
10921 | return handler;
|
10922 | };
|
10923 | }
|
10924 |
|
10925 | class Utility {
|
10926 |
|
10927 |
|
10928 | constructor(raw, _h) {
|
10929 | this.raw = raw;
|
10930 | this._h = _h;
|
10931 | }
|
10932 | match(expression) {
|
10933 | const match = this.absolute.match(expression);
|
10934 | return match ? match[0] : '';
|
10935 | }
|
10936 | clone(raw) {
|
10937 | return new Utility(raw || this.raw, this._h);
|
10938 | }
|
10939 | get class() {
|
10940 | return '.' + cssEscape(this.raw);
|
10941 | }
|
10942 | get isNegative() {
|
10943 | return this.raw[0] === '-';
|
10944 | }
|
10945 | get absolute() {
|
10946 | return this.isNegative ? this.raw.substring(1) : this.raw;
|
10947 | }
|
10948 | get identifier() {
|
10949 | return this.match(/[^-]+/);
|
10950 | }
|
10951 | get key() {
|
10952 | return this.match(/^\w[-\w]+(?=-)/);
|
10953 | }
|
10954 | get center() {
|
10955 | return this.match(/-.+(?=-)/).substring(1);
|
10956 | }
|
10957 | get amount() {
|
10958 | return this.match(/(?:[^-]+|\[[\s\S]*?\])$/);
|
10959 | }
|
10960 | get body() {
|
10961 | return this.match(/-.+/).substring(1);
|
10962 | }
|
10963 | get handler() {
|
10964 | return this._h(this);
|
10965 | }
|
10966 | }
|
10967 |
|
10968 | function generateStaticStyle(processor, className, addComment = false) {
|
10969 |
|
10970 | if (!staticUtilities.hasOwnProperty(className))
|
10971 | return;
|
10972 |
|
10973 | const style = new Style('.' + className);
|
10974 | const comment = addComment ? className : undefined;
|
10975 | const { utility, meta } = staticUtilities[className];
|
10976 | for (const [key, value] of Object.entries(utility)) {
|
10977 | style.add(
|
10978 | Array.isArray(value)
|
10979 | ? value.map((i) => new Property(key, i, comment))
|
10980 | : new Property(key, value, comment)
|
10981 | );
|
10982 | }
|
10983 | if (processor._plugin.core && !processor._plugin.core[meta.group]) return;
|
10984 | return style.updateMeta('utilities', meta.group, pluginOrder[meta.group ], meta.order, true);
|
10985 | }
|
10986 |
|
10987 | function extract(
|
10988 | processor,
|
10989 | className,
|
10990 | addComment = false,
|
10991 | prefix,
|
10992 | ) {
|
10993 |
|
10994 |
|
10995 | if (!prefix && className in staticUtilities) return generateStaticStyle(processor, className, addComment);
|
10996 | if (prefix && className.startsWith(prefix)) {
|
10997 | className = className.replace(new RegExp(`^${prefix}`), '');
|
10998 | if (className in staticUtilities) return generateStaticStyle(processor, className, addComment);
|
10999 | }
|
11000 |
|
11001 | const staticPlugins = { ...processor._plugin.utilities, ...processor._plugin.components, ...processor._plugin.shortcuts };
|
11002 | if (className in staticPlugins) return deepCopy(staticPlugins[className]);
|
11003 |
|
11004 | const utility = new Utility(className, processor._handler);
|
11005 |
|
11006 |
|
11007 |
|
11008 | for (const [key, generator] of Object.entries(processor._plugin.dynamic)) {
|
11009 | if (className.match(new RegExp(`^-?${key}`))) {
|
11010 | let style = generator(utility);
|
11011 | if (style instanceof Property) style = style.toStyle(utility.class);
|
11012 | if (style && addComment)
|
11013 | Array.isArray(style)
|
11014 | ? style.map((i) => i.property.forEach((p) => (p.comment = className)))
|
11015 | : style.property.forEach((p) => (p.comment = className));
|
11016 | if (style) return style;
|
11017 | }
|
11018 | }
|
11019 |
|
11020 |
|
11021 | const matches = className.match(/\w+/);
|
11022 | const key = matches ? matches[0] : undefined;
|
11023 |
|
11024 | if (key && dynamicUtilities.hasOwnProperty(key)) {
|
11025 | let style = dynamicUtilities[key](utility, processor.pluginUtils);
|
11026 | if (!style) return;
|
11027 | if (processor._plugin.core && !processor._plugin.core[Array.isArray(style) ? style[0].meta.group : style.meta.group]) return;
|
11028 | if (style instanceof Property) style = style.toStyle(utility.class);
|
11029 | if (addComment) Array.isArray(style)? style.map((i) => i.property.forEach((p) => (p.comment = className))): style.property.forEach((p) => (p.comment = className));
|
11030 | return style;
|
11031 | }
|
11032 | }
|
11033 |
|
11034 | function testStatic(processor, className) {
|
11035 |
|
11036 | if (!staticUtilities.hasOwnProperty(className)) return false;
|
11037 | const { meta } = staticUtilities[className];
|
11038 | if (processor._plugin.core && !processor._plugin.core[meta.group]) return false;
|
11039 | return true;
|
11040 | }
|
11041 |
|
11042 | function test(
|
11043 | processor,
|
11044 | className,
|
11045 | prefix,
|
11046 | ) {
|
11047 |
|
11048 |
|
11049 | if (!prefix && className in staticUtilities) return testStatic(processor, className);
|
11050 | if (prefix && className.startsWith(prefix)) {
|
11051 | className = className.replace(new RegExp(`^${prefix}`), '');
|
11052 | if (className in staticUtilities) return testStatic(processor, className);
|
11053 | }
|
11054 |
|
11055 | const staticPlugins = { ...processor._plugin.utilities, ...processor._plugin.components, ...processor._plugin.shortcuts };
|
11056 | if (className in staticPlugins) return true;
|
11057 |
|
11058 | const utility = new Utility(className, processor._handler);
|
11059 |
|
11060 |
|
11061 |
|
11062 | for (const [key, generator] of Object.entries(processor._plugin.dynamic)) {
|
11063 | if (className.match(new RegExp(`^-?${key}`))) {
|
11064 | if (generator(utility)) return true;
|
11065 | }
|
11066 | }
|
11067 |
|
11068 |
|
11069 | const matches = className.match(/\w+/);
|
11070 | const key = matches ? matches[0] : undefined;
|
11071 |
|
11072 | if (key && dynamicUtilities.hasOwnProperty(key)) {
|
11073 | const style = dynamicUtilities[key](utility, processor.pluginUtils);
|
11074 | if (!style) return false;
|
11075 | if (processor._plugin.core && !processor._plugin.core[Array.isArray(style) ? style[0].meta.group : style.meta.group]) return false;
|
11076 | return true;
|
11077 | }
|
11078 | return false;
|
11079 | }
|
11080 |
|
11081 | function preflight(
|
11082 | processor,
|
11083 | html,
|
11084 | includeBase = true,
|
11085 | includeGlobal = true,
|
11086 | includePlugins = true,
|
11087 | ) {
|
11088 |
|
11089 | const globalSheet = new StyleSheet();
|
11090 | const styleSheet = new StyleSheet();
|
11091 |
|
11092 | const createStyle = (
|
11093 | selector,
|
11094 | properties
|
11095 |
|
11096 | ,
|
11097 | isGlobal = false
|
11098 | ) => {
|
11099 | const style = new Style(selector, undefined, false);
|
11100 | for (const [key, value] of Object.entries(properties)) {
|
11101 | style.add(
|
11102 | Array.isArray(value)
|
11103 | ? value.map((v) => new Property(key, v))
|
11104 | : new Property(key, typeof value === 'function' ? value((path, defaultValue) => processor.theme(path, defaultValue)) : value)
|
11105 | );
|
11106 | }
|
11107 | style.updateMeta('base', 'preflight', 0, isGlobal? 1 : 2, true);
|
11108 | return style;
|
11109 | };
|
11110 |
|
11111 | const tags = html ? Array.from(new Set(html.match(/<\w+/g))).map((i) => i.substring(1)) : undefined;
|
11112 |
|
11113 |
|
11114 | includeBase && (processor.config('prefixer') ? preflights : preflights.filter(i => !i.selector || !/::?(webkit-input|-moz|-ms-input)-placeholder$/.test(i.selector))).forEach(p => {
|
11115 | if (includeGlobal && p.global) {
|
11116 |
|
11117 | globalSheet.add(createStyle(p.selector, p.properties, true));
|
11118 | } else if (tags !== undefined) {
|
11119 |
|
11120 | const includeTags = tags.filter((i) => p.keys.includes(i));
|
11121 | if (includeTags.length > 0) styleSheet.add(createStyle(p.selector ? p.selector : includeTags.join(', '), p.properties));
|
11122 | } else {
|
11123 |
|
11124 | styleSheet.add(createStyle(p.selector ? p.selector : p.keys.join(', '), p.properties));
|
11125 | }
|
11126 | });
|
11127 |
|
11128 |
|
11129 | if (includePlugins) {
|
11130 |
|
11131 | let preflightList = [];
|
11132 | Object.values(processor._plugin.preflights).forEach((styles) => {
|
11133 | preflightList = preflightList.concat(styles);
|
11134 | });
|
11135 | styleSheet.add(preflightList);
|
11136 |
|
11137 |
|
11138 | let staticList = [];
|
11139 | Object.values(processor._plugin.static).forEach((styles) => {
|
11140 | staticList = staticList.concat(styles);
|
11141 | });
|
11142 | styleSheet.add(staticList);
|
11143 | }
|
11144 |
|
11145 | const result = styleSheet.combine().sort();
|
11146 | return includeGlobal ? result.extend(globalSheet.combine().sort(), false) : result;
|
11147 | }
|
11148 |
|
11149 | const createPlugin = (
|
11150 | plugin,
|
11151 | config
|
11152 | ) => {
|
11153 | return {
|
11154 | handler: plugin,
|
11155 | config,
|
11156 | };
|
11157 | };
|
11158 |
|
11159 | createPlugin.withOptions = function(
|
11160 | pluginFunction,
|
11161 | configFunction = () => ({}),
|
11162 | ) {
|
11163 | const optionsFunction = function (options= {} ) {
|
11164 | return {
|
11165 | __options: options,
|
11166 | handler: pluginFunction(options),
|
11167 | config: configFunction(options),
|
11168 | };
|
11169 | };
|
11170 |
|
11171 | optionsFunction.__isOptionsFunction = true ;
|
11172 |
|
11173 |
|
11174 |
|
11175 | optionsFunction.__pluginFunction = pluginFunction;
|
11176 | optionsFunction.__configFunction = configFunction;
|
11177 |
|
11178 | return optionsFunction;
|
11179 | };
|
11180 |
|
11181 | class ClassParser {
|
11182 |
|
11183 |
|
11184 |
|
11185 |
|
11186 |
|
11187 | constructor(classNames, separator = ':', variants) {
|
11188 | this.classNames = classNames;
|
11189 | this.separator = separator;
|
11190 | this.variants = variants || [];
|
11191 | this.index = 0;
|
11192 | }
|
11193 |
|
11194 | _handle_group(removeDuplicated = true) {
|
11195 | if (!this.classNames) return [];
|
11196 | let preChar;
|
11197 | let char;
|
11198 | let group;
|
11199 | let func;
|
11200 | let variant;
|
11201 | let variants = [];
|
11202 | let variantStart = this.index + 1;
|
11203 | let classStart = this.index + 1;
|
11204 | let groupStart = this.index + 1;
|
11205 | let important = false;
|
11206 | let ignoreSpace = false;
|
11207 | let ignoreBracket = false;
|
11208 | let insideSquareBracket = false;
|
11209 | const sepLength = this.separator.length;
|
11210 | const parts = [];
|
11211 | const length = this.classNames.length;
|
11212 |
|
11213 | while (this.index < length) {
|
11214 | this.index++;
|
11215 | char = this.classNames.charAt(this.index);
|
11216 |
|
11217 | if (insideSquareBracket) {
|
11218 | if(' \n\t\r'.includes(char)) {
|
11219 | insideSquareBracket = false;
|
11220 | } else {
|
11221 | if (char === ']')
|
11222 | insideSquareBracket = false;
|
11223 | continue;
|
11224 | }
|
11225 | }
|
11226 |
|
11227 | switch (char) {
|
11228 | case '!':
|
11229 | important = true;
|
11230 | break;
|
11231 | case this.separator[0]:
|
11232 | if (this.classNames.slice(this.index, this.index + sepLength) === this.separator) {
|
11233 | variant = this.classNames.slice(variantStart, this.index);
|
11234 | if (variant.charAt(0) === '!') variant = variant.slice(1,);
|
11235 | if (this.variants.includes(variant)) {
|
11236 | variants.push(variant);
|
11237 | this.index += sepLength - 1;
|
11238 | variantStart = this.index + 1;
|
11239 | ignoreSpace = true;
|
11240 | }
|
11241 | }
|
11242 | break;
|
11243 | case '[':
|
11244 | insideSquareBracket = true;
|
11245 | break;
|
11246 | case '(':
|
11247 | preChar = this.classNames.charAt(this.index - 1);
|
11248 | if (preChar === '-' || (!ignoreSpace && preChar === ' ')) {
|
11249 | ignoreBracket = true;
|
11250 | } else if (ignoreSpace) {
|
11251 | group = this._handle_group();
|
11252 | } else {
|
11253 | func = this.classNames.slice(groupStart, this.index);
|
11254 | while (!isSpace(this.classNames.charAt(this.index))) {
|
11255 | this.index++;
|
11256 | }
|
11257 | this.index--;
|
11258 | }
|
11259 | ignoreSpace = false;
|
11260 | break;
|
11261 | case '"':
|
11262 | case '`':
|
11263 | case '\'':
|
11264 | case ')':
|
11265 | case ' ':
|
11266 | case '\n':
|
11267 | case '\t':
|
11268 | case '\r':
|
11269 | if (!ignoreSpace) {
|
11270 | if (groupStart !== this.index) {
|
11271 | const raw = this.classNames.slice(classStart, this.index);
|
11272 | const start = classStart - 1;
|
11273 | const end = this.index - 1;
|
11274 | if (Array.isArray(group)) {
|
11275 | parts.push({ raw, start, end, variants, content: group, type: 'group', important });
|
11276 | group = undefined;
|
11277 | } else if (func) {
|
11278 | const utility = this.classNames.slice(variantStart, this.index);
|
11279 | parts.push({ raw: raw, start, end, variants, content: utility, type: 'utility', important });
|
11280 | func = undefined;
|
11281 | } else if (ignoreBracket && char === ')') {
|
11282 |
|
11283 | const utility = this.classNames.slice(variantStart, this.index + 1);
|
11284 | parts.push({ raw: raw + ')', start, end: this.index, variants, content: important ? utility.slice(1,): utility, type: 'utility', important });
|
11285 | } else {
|
11286 | const utility = this.classNames.slice(variantStart, this.index);
|
11287 | if (utility.charAt(0) === '*') {
|
11288 | parts.push({ raw, start, end, variants, content: utility.slice(1,), type: 'alias', important });
|
11289 | } else {
|
11290 | parts.push({ raw, start, end, variants, content: utility.charAt(0) === '!' ? utility.slice(1,): utility, type: 'utility', important });
|
11291 | }
|
11292 | }
|
11293 | variants = [];
|
11294 | important = false;
|
11295 | }
|
11296 | groupStart = this.index + 1;
|
11297 | classStart = this.index + 1;
|
11298 | }
|
11299 | variantStart = this.index + 1;
|
11300 | break;
|
11301 | default:
|
11302 | ignoreSpace = false;
|
11303 | }
|
11304 | if (char === ')') {
|
11305 | if (!ignoreBracket) break;
|
11306 | ignoreBracket = false;
|
11307 | }
|
11308 | }
|
11309 |
|
11310 | if (removeDuplicated) {
|
11311 | const newParts = [];
|
11312 | const cache = [];
|
11313 | parts.forEach((item) => {
|
11314 | if (!cache.includes(item.raw)) {
|
11315 | cache.push(item.raw);
|
11316 | newParts.push(item);
|
11317 | }
|
11318 | });
|
11319 | return newParts;
|
11320 | }
|
11321 | return parts;
|
11322 | }
|
11323 |
|
11324 | parse(removeDuplicated = true) {
|
11325 | if (!this.classNames) return [];
|
11326 |
|
11327 | this.classNames = '(' + this.classNames + ')';
|
11328 | const elements = this._handle_group(removeDuplicated);
|
11329 |
|
11330 | this.index = 0;
|
11331 | this.classNames = this.classNames.slice(1, -1);
|
11332 | return elements;
|
11333 | }
|
11334 | }
|
11335 |
|
11336 |
|
11337 | function toSource(object, replacer, indent = ' ', startingIndent = '') {
|
11338 | const seen = [];
|
11339 | return walk(object, replacer, indent === false ? '' : indent, startingIndent, seen);
|
11340 | function walk(object, replacer, indent, currentIndent, seen) {
|
11341 | const nextIndent = currentIndent + indent;
|
11342 | object = replacer ? replacer(object) : object;
|
11343 | switch (typeof object) {
|
11344 | case 'string':
|
11345 | return JSON.stringify(object);
|
11346 | case 'number':
|
11347 | if (Object.is(object, -0)) {
|
11348 | return '-0';
|
11349 | }
|
11350 | return String(object);
|
11351 | case 'boolean':
|
11352 | case 'undefined':
|
11353 | return String(object);
|
11354 | case 'function':
|
11355 | return object.toString();
|
11356 | }
|
11357 | if (object === null) {
|
11358 | return 'null';
|
11359 | }
|
11360 | if (object instanceof RegExp) {
|
11361 | return object.toString();
|
11362 | }
|
11363 | if (object instanceof Date) {
|
11364 | return `new Date(${object.getTime()})`;
|
11365 | }
|
11366 | if (object instanceof Set) {
|
11367 | return `new Set(${walk(Array.from(object.values()), replacer, indent, nextIndent, seen)})`;
|
11368 | }
|
11369 | if (object instanceof Map) {
|
11370 | return `new Map(${walk(Array.from(object.entries()), replacer, indent, nextIndent, seen)})`;
|
11371 | }
|
11372 | if (seen.indexOf(object) >= 0) {
|
11373 | return '{$circularReference:1}';
|
11374 | }
|
11375 | seen.push(object);
|
11376 | function join(elements) {
|
11377 | return (indent.slice(1) +
|
11378 | elements.join(',' + (indent && '\n') + nextIndent) +
|
11379 | (indent ? ' ' : ''));
|
11380 | }
|
11381 | if (Array.isArray(object)) {
|
11382 | return `[${join(object.map((element) => walk(element, replacer, indent, nextIndent, seen.slice())))}]`;
|
11383 | }
|
11384 | const keys = Object.keys(object);
|
11385 | if (keys.length) {
|
11386 | return `{${join(keys.map((key) => (legalKey(key) ? key : JSON.stringify(key)) +
|
11387 | ':' +
|
11388 | walk(object[key], replacer, indent, nextIndent, seen.slice())))}}`;
|
11389 | }
|
11390 | return '{}';
|
11391 | }
|
11392 | }
|
11393 | const KEYWORD_REGEXP = /^(abstract|boolean|break|byte|case|catch|char|class|const|continue|debugger|default|delete|do|double|else|enum|export|extends|false|final|finally|float|for|function|goto|if|implements|import|in|instanceof|int|interface|long|native|new|null|package|private|protected|public|return|short|static|super|switch|synchronized|this|throw|throws|transient|true|try|typeof|undefined|var|void|volatile|while|with)$/;
|
11394 | function legalKey(key) {
|
11395 | return (/^([a-z_$][0-9a-z_$]*|[0-9]+)$/gi.test(key) && !KEYWORD_REGEXP.test(key));
|
11396 | }
|
11397 |
|
11398 | function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
11399 |
|
11400 |
|
11401 |
|
11402 |
|
11403 |
|
11404 |
|
11405 |
|
11406 |
|
11407 |
|
11408 |
|
11409 |
|
11410 |
|
11411 |
|
11412 |
|
11413 |
|
11414 |
|
11415 |
|
11416 |
|
11417 |
|
11418 |
|
11419 |
|
11420 |
|
11421 |
|
11422 |
|
11423 |
|
11424 |
|
11425 |
|
11426 |
|
11427 |
|
11428 |
|
11429 |
|
11430 | class Processor {
|
11431 |
|
11432 |
|
11433 | __init() {this._variants = {};}
|
11434 | __init2() {this._cache = {
|
11435 | count: 0,
|
11436 | html: [],
|
11437 | attrs: [],
|
11438 | classes: [],
|
11439 | utilities: [],
|
11440 | variants: [],
|
11441 | };}
|
11442 |
|
11443 | __init3() {this._plugin = {
|
11444 | static: {},
|
11445 | dynamic: {},
|
11446 | utilities: {},
|
11447 | components: {},
|
11448 | preflights: {},
|
11449 | shortcuts: {},
|
11450 | alias: {},
|
11451 | completions: {},
|
11452 | };}
|
11453 |
|
11454 | __init4() {this.pluginUtils = {
|
11455 | addDynamic: (...args) => this.addDynamic(...args),
|
11456 | addUtilities: (...args) => this.addUtilities(...args),
|
11457 | addComponents: (...args) => this.addComponents(...args),
|
11458 | addBase: (...args) => this.addBase(...args),
|
11459 | addVariant: (...args) => this.addVariant(...args),
|
11460 | e: (...args) => this.e(...args),
|
11461 | prefix: (...args) => this.prefix(...args),
|
11462 | config: (...args) => this.config(...args),
|
11463 | theme: (...args) => this.theme(...args),
|
11464 | variants: (...args) => this.variants(...args),
|
11465 | };}
|
11466 |
|
11467 | __init5() {this.variantUtils = {
|
11468 | modifySelectors: (modifier) =>
|
11469 | new Style().wrapSelector((selector) =>
|
11470 | modifier({
|
11471 | className: /^[.#]/.test(selector) ? selector.substring(1) : selector,
|
11472 | })),
|
11473 | atRule: (name) => new Style().atRule(name),
|
11474 | pseudoClass: (name) => new Style().pseudoClass(name),
|
11475 | pseudoElement: (name) => new Style().pseudoElement(name),
|
11476 | parent: (name) => new Style().parent(name),
|
11477 | child: (name) => new Style().child(name),
|
11478 | };}
|
11479 |
|
11480 | constructor(config) {Processor.prototype.__init.call(this);Processor.prototype.__init2.call(this);Processor.prototype.__init3.call(this);Processor.prototype.__init4.call(this);Processor.prototype.__init5.call(this);
|
11481 | this._config = this.resolveConfig(config, baseConfig);
|
11482 | this._theme = this._config.theme;
|
11483 | this._handler = createHandler(this._config.handlers);
|
11484 | this._config.shortcuts && this.loadShortcuts(this._config.shortcuts);
|
11485 | this._config.alias && this.loadAlias(this._config.alias);
|
11486 | }
|
11487 |
|
11488 | _resolveConfig(userConfig, presets = {}) {
|
11489 | if (userConfig.presets) {
|
11490 | const resolved = this._resolvePresets(userConfig.presets);
|
11491 | presets = this._resolveConfig(resolved, presets);
|
11492 | delete userConfig.presets;
|
11493 | }
|
11494 | const userTheme = userConfig.theme;
|
11495 | if (userTheme) delete userConfig.theme;
|
11496 | const extendTheme = userTheme && 'extend' in userTheme ? _nullishCoalesce(userTheme.extend, () => ( {})) : {};
|
11497 | const theme = (presets.theme || {}) ;
|
11498 | if (userTheme) {
|
11499 | if ('extend' in userTheme) delete userTheme.extend;
|
11500 | for (const [key, value] of Object.entries(userTheme)) {
|
11501 | theme[key] = typeof value === 'function' ? value : { ...value };
|
11502 | }
|
11503 | }
|
11504 | if (extendTheme && typeof extendTheme === 'object') this._reduceFunction(theme, extendTheme);
|
11505 | return { ...presets, ...userConfig, theme };
|
11506 | }
|
11507 |
|
11508 | _reduceFunction(theme, extendTheme) {
|
11509 | for (const [key, value] of Object.entries(extendTheme)) {
|
11510 | const themeValue = theme[key];
|
11511 | switch (typeof themeValue) {
|
11512 | case 'function':
|
11513 | theme[key] = (theme, { negative, breakpoints }) => combineConfig(
|
11514 | (themeValue )(theme, { negative, breakpoints }),
|
11515 | (typeof value === 'function' ? value(theme, { negative, breakpoints }) : _nullishCoalesce(value, () => ( {}))),
|
11516 | );
|
11517 | break;
|
11518 | case 'object':
|
11519 | theme[key] = (theme, { negative, breakpoints }) => combineConfig(themeValue, (typeof value === 'function' ? value(theme, { negative, breakpoints }) : _nullishCoalesce(value, () => ( {}))), 0 );
|
11520 | break;
|
11521 | default:
|
11522 | theme[key] = value;
|
11523 | }
|
11524 | }
|
11525 | }
|
11526 |
|
11527 | _resolvePresets(presets) {
|
11528 | let config = {};
|
11529 | const extend = {};
|
11530 | presets.forEach(p => {
|
11531 | if (p.theme && 'extend' in p.theme && p.theme.extend) {
|
11532 | this._reduceFunction(extend, p.theme.extend);
|
11533 | delete p.theme.extend;
|
11534 | }
|
11535 | config = this._resolveConfig(p, config);
|
11536 | });
|
11537 | if (config.theme) {
|
11538 | (config.theme ).extend = extend;
|
11539 | } else {
|
11540 | config.theme = { extend };
|
11541 | }
|
11542 | return config;
|
11543 | }
|
11544 |
|
11545 | _resolveFunction(config) {
|
11546 | if (!config.theme) return config;
|
11547 | const theme = (path, defaultValue) => this.theme(path, defaultValue);
|
11548 | for (const dict of [config.theme, 'extend' in config.theme ? _nullishCoalesce(config.theme.extend, () => ( {})) : {}]) {
|
11549 | for (const [key, value] of Object.entries(dict)) {
|
11550 | if (typeof value === 'function') {
|
11551 | (dict )[key] = value(theme, {
|
11552 | negative,
|
11553 | breakpoints,
|
11554 | }) ;
|
11555 | }
|
11556 | }
|
11557 | }
|
11558 | return config;
|
11559 | }
|
11560 |
|
11561 | _replaceStyleVariants(styles) {
|
11562 |
|
11563 | styles.forEach(style => {
|
11564 | style.atRules = _optionalChain([style, 'access', _ => _.atRules, 'optionalAccess', _2 => _2.map, 'call', _3 => _3(i => {
|
11565 | if (i.match(/@screen/)) {
|
11566 | const variant = i.replace(/\s*@screen\s*/, '');
|
11567 | const atRule = _optionalChain([this, 'access', _4 => _4._variants, 'access', _5 => _5[variant], 'call', _6 => _6(), 'access', _7 => _7.atRules, 'optionalAccess', _8 => _8[0]]);
|
11568 | return _nullishCoalesce(atRule, () => ( i));
|
11569 | }
|
11570 | return i;
|
11571 | })]);
|
11572 | });
|
11573 | }
|
11574 |
|
11575 | _addPluginProcessorCache(type, key, styles) {
|
11576 | styles = toArray(styles);
|
11577 | this._plugin[type][key] = key in this._plugin[type]
|
11578 | ? [...this._plugin[type][key], ...styles]
|
11579 | : styles;
|
11580 | }
|
11581 |
|
11582 | _loadVariables() {
|
11583 | const config = this.theme('vars') ;
|
11584 | if (!config) return;
|
11585 | this.addBase({ ':root': Object.assign({}, ...Object.keys(config).map(i => ({ [`--${i}`]: config[i] }))) });
|
11586 | }
|
11587 |
|
11588 | loadConfig(config) {
|
11589 | this._config = this.resolveConfig(config, baseConfig);
|
11590 | this._theme = this._config.theme;
|
11591 | this._handler = createHandler(this._config.handlers);
|
11592 | this._config.shortcuts && this.loadShortcuts(this._config.shortcuts);
|
11593 | this._config.alias && this.loadAlias(this._config.alias);
|
11594 | return this._config;
|
11595 | }
|
11596 |
|
11597 | resolveConfig(config, presets) {
|
11598 | this._config = this._resolveConfig({ ...deepCopy(config ? config : {}), exclude: _optionalChain([config, 'optionalAccess', _9 => _9.exclude]) }, deepCopy(presets));
|
11599 | this._theme = this._config.theme;
|
11600 | _optionalChain([this, 'access', _10 => _10._config, 'access', _11 => _11.plugins, 'optionalAccess', _12 => _12.map, 'call', _13 => _13(i => typeof i === 'function' ? ('__isOptionsFunction' in i ? this.loadPluginWithOptions(i): this.loadPlugin(createPlugin(i))) : this.loadPlugin(i))]);
|
11601 | this._config = this._resolveFunction(this._config);
|
11602 | this._variants = { ...this._variants, ... this.resolveVariants() };
|
11603 | this._cache.variants = Object.keys(this._variants);
|
11604 | this._loadVariables();
|
11605 | if (this._config.corePlugins) this._plugin.core = Array.isArray(this._config.corePlugins) ? Object.assign({}, ...(this._config.corePlugins ).map(i => ({ [i]: true }))) : { ...Object.assign({}, ...Object.keys(pluginOrder).slice(Object.keys(pluginOrder).length/2).map(i => ({ [i]: true }))), ...this._config.corePlugins };
|
11606 | return this._config;
|
11607 | }
|
11608 |
|
11609 | resolveVariants(
|
11610 | type
|
11611 | ) {
|
11612 | const variants = resolveVariants(this._config);
|
11613 | if (type) {
|
11614 | return variants[type];
|
11615 | }
|
11616 | return { ...variants.screen, ...variants.theme, ...variants.state };
|
11617 | }
|
11618 |
|
11619 | resolveStaticUtilities(includePlugins = false) {
|
11620 | const staticStyles = {};
|
11621 | for (const key in staticUtilities) {
|
11622 | const style = generateStaticStyle(this, key, true);
|
11623 | if (style) staticStyles[key] = [ style ];
|
11624 | }
|
11625 | if (!includePlugins) return staticStyles;
|
11626 | return { ...staticStyles, ...this._plugin.utilities, ...this._plugin.components };
|
11627 | }
|
11628 |
|
11629 | resolveDynamicUtilities(includePlugins = false) {
|
11630 | if (!includePlugins) return dynamicUtilities;
|
11631 | return { ...dynamicUtilities, ...this._plugin.dynamic };
|
11632 | }
|
11633 |
|
11634 | get allConfig() {
|
11635 | return this._config ;
|
11636 | }
|
11637 |
|
11638 | get allTheme() {
|
11639 | return (_nullishCoalesce(this._theme, () => ( {}))) ;
|
11640 | }
|
11641 |
|
11642 | get allVariant() {
|
11643 | return this._cache.variants;
|
11644 | }
|
11645 |
|
11646 | wrapWithVariants(variants, styles) {
|
11647 |
|
11648 | if (!Array.isArray(styles)) styles = [styles];
|
11649 | if (variants.length === 0) return styles;
|
11650 |
|
11651 | return styles.map(style => {
|
11652 | if (style instanceof Keyframes) return style;
|
11653 | const atrules = [];
|
11654 | let wrapped = variants
|
11655 | .filter(i => _optionalChain([this, 'access', _14 => _14._variants, 'optionalAccess', _15 => _15[i]]))
|
11656 | .map(i => this._variants[i]())
|
11657 | .reduce((previousValue, currentValue) => {
|
11658 | const output = previousValue.extend(currentValue);
|
11659 | if (previousValue.isAtrule) atrules.push((previousValue.atRules )[0]);
|
11660 | return output;
|
11661 | }, new Style())
|
11662 | .extend(style);
|
11663 | if (style instanceof Container) wrapped = new Container().extend(wrapped);
|
11664 | if (atrules.length > 0) wrapped.meta.variants = atrules;
|
11665 | return wrapped;
|
11666 | });
|
11667 | }
|
11668 |
|
11669 | removePrefix(className) {
|
11670 | const prefix = this.config('prefix') ;
|
11671 | return prefix ? className.replace(new RegExp(`^${prefix}`), '') : className;
|
11672 | }
|
11673 |
|
11674 | markAsImportant(style, force = false) {
|
11675 | const _important = force ? force : this.config('important', false);
|
11676 | const important = typeof _important === 'string' ? (_important ) : (_important );
|
11677 | if (important) {
|
11678 | if (typeof important === 'string') {
|
11679 | style.parent(important);
|
11680 | } else {
|
11681 | style.important = true;
|
11682 | style.property.forEach(i => i.important = true);
|
11683 | }
|
11684 | }
|
11685 | return style;
|
11686 | }
|
11687 |
|
11688 | extract(className, addComment = false, prefix) {
|
11689 | return extract(this, className, addComment, prefix);
|
11690 | }
|
11691 |
|
11692 | test(className, prefix) {
|
11693 | return test(this, className, prefix);
|
11694 | }
|
11695 |
|
11696 | preflight(
|
11697 | html,
|
11698 | includeBase = true,
|
11699 | includeGlobal = true,
|
11700 | includePlugins = true,
|
11701 | ignoreProcessed = false
|
11702 | ) {
|
11703 | let id;
|
11704 | if (html) {
|
11705 | id = hash(html);
|
11706 | if (ignoreProcessed && this._cache.html.includes(id)) return new StyleSheet();
|
11707 | }
|
11708 | id && ignoreProcessed && this._cache.html.push(id);
|
11709 | return preflight(this, html, includeBase, includeGlobal, includePlugins);
|
11710 | }
|
11711 |
|
11712 | interpret(
|
11713 | classNames,
|
11714 | ignoreProcessed = false,
|
11715 | handleIgnored
|
11716 | ) {
|
11717 | const ast = new ClassParser(classNames, this.config('separator', ':') , this._cache.variants).parse();
|
11718 | const success = [];
|
11719 | const ignored = [];
|
11720 | const styleSheet = new StyleSheet();
|
11721 |
|
11722 | const _hIgnored = (className) => {
|
11723 | if (handleIgnored) {
|
11724 | const style = handleIgnored(className);
|
11725 | if (style) {
|
11726 | styleSheet.add(style);
|
11727 | success.push(className);
|
11728 | } else {
|
11729 | ignored.push(className);
|
11730 | }
|
11731 | }
|
11732 | ignored.push(className);
|
11733 | };
|
11734 |
|
11735 | const _gStyle = (
|
11736 | baseClass,
|
11737 | variants,
|
11738 | selector,
|
11739 | important = false,
|
11740 | prefix,
|
11741 | ) => {
|
11742 | if (this._config.exclude && testRegexr(selector, this._config.exclude)) {
|
11743 |
|
11744 | ignored.push(selector);
|
11745 | return;
|
11746 | }
|
11747 | if (variants[0] && selector in { ...this._plugin.utilities, ...this._plugin.components }) {
|
11748 |
|
11749 | success.push(selector);
|
11750 | styleSheet.add(deepCopy(this._plugin.utilities[selector]));
|
11751 | return;
|
11752 | }
|
11753 | let result = this.extract(baseClass, false, prefix);
|
11754 | if (result) {
|
11755 | const escapedSelector = '.' + cssEscape(selector);
|
11756 | if (result instanceof Style) {
|
11757 | if(!result.meta.respectSelector) result.selector = escapedSelector;
|
11758 | this.markAsImportant(result, important);
|
11759 | } else if (Array.isArray(result)) {
|
11760 | result = result.map(i => {
|
11761 | if (i instanceof Keyframes) return i;
|
11762 | if(!i.meta.respectSelector) i.selector = escapedSelector;
|
11763 | this.markAsImportant(i, important);
|
11764 | return i;
|
11765 | });
|
11766 | }
|
11767 | const wrapped = this.wrapWithVariants(variants, result);
|
11768 | if (wrapped) {
|
11769 | success.push(selector);
|
11770 | styleSheet.add(wrapped);
|
11771 | } else {
|
11772 | _hIgnored(selector);
|
11773 | }
|
11774 | } else {
|
11775 | _hIgnored(selector);
|
11776 | }
|
11777 | };
|
11778 |
|
11779 | const _hGroup = (obj, parentVariants = []) => {
|
11780 | const _eval = (u) => {
|
11781 | if (u.type === 'group') {
|
11782 | _hGroup(u, obj.variants);
|
11783 | } else if (u.type === 'alias' && (u.content ) in this._plugin.alias) {
|
11784 | this._plugin.alias[u.content ].forEach(i => _eval(i));
|
11785 | } else {
|
11786 |
|
11787 | const variants = [
|
11788 | ...parentVariants,
|
11789 | ...obj.variants,
|
11790 | ...u.variants,
|
11791 | ];
|
11792 | const important = obj.important || u.important;
|
11793 | const selector = (important ? '!' : '') + [...variants, u.content].join(':');
|
11794 | typeof u.content === 'string' &&
|
11795 | _gStyle(u.content, variants, selector, important, this.config('prefix') );
|
11796 | }
|
11797 | };
|
11798 | Array.isArray(obj.content) && obj.content.forEach(u => _eval(u));
|
11799 | };
|
11800 |
|
11801 | const _gAst = (ast) => {
|
11802 | ast.forEach(obj => {
|
11803 | if (!(ignoreProcessed && this._cache.utilities.includes(obj.raw))) {
|
11804 | if (ignoreProcessed) this._cache.utilities.push(obj.raw);
|
11805 | if (obj.type === 'utility') {
|
11806 | if (Array.isArray(obj.content)) ; else if (obj.content) {
|
11807 | _gStyle(obj.content, obj.variants, obj.raw, obj.important, this.config('prefix') );
|
11808 | }
|
11809 | } else if (obj.type === 'group') {
|
11810 | _hGroup(obj);
|
11811 | } else if (obj.type === 'alias' && (obj.content ) in this._plugin.alias) {
|
11812 | _gAst(this._plugin.alias[obj.content ]);
|
11813 | } else {
|
11814 | _hIgnored(obj.raw);
|
11815 | }
|
11816 | }
|
11817 | });
|
11818 | };
|
11819 |
|
11820 | _gAst(ast);
|
11821 |
|
11822 | if (!this.config('prefixer')) styleSheet.prefixer = false;
|
11823 |
|
11824 | return {
|
11825 | success,
|
11826 | ignored,
|
11827 | styleSheet: styleSheet.sort(),
|
11828 | };
|
11829 | }
|
11830 |
|
11831 | validate(classNames) {
|
11832 | const ast = new ClassParser(classNames, this.config('separator', ':') , this._cache.variants).parse();
|
11833 | const success = [];
|
11834 | const ignored = [];
|
11835 |
|
11836 | const _hSuccess = (className, self, parent) => {
|
11837 | success.push({
|
11838 | className,
|
11839 | ...self,
|
11840 | parent,
|
11841 | });
|
11842 | };
|
11843 |
|
11844 | const _hIgnored = (className, self, parent) => {
|
11845 | ignored.push({
|
11846 | className,
|
11847 | ...self,
|
11848 | parent,
|
11849 | });
|
11850 | };
|
11851 |
|
11852 | const _gStyle = (
|
11853 | baseClass,
|
11854 | variants,
|
11855 | selector,
|
11856 | self,
|
11857 | parent,
|
11858 | prefix,
|
11859 | ) => {
|
11860 | if (this._config.exclude && testRegexr(selector, this._config.exclude)) {
|
11861 |
|
11862 | _hIgnored(selector, self, parent);
|
11863 | return;
|
11864 | }
|
11865 | if (variants[0] && selector in { ...this._plugin.utilities, ...this._plugin.components }) {
|
11866 |
|
11867 | _hSuccess(selector, self, parent);
|
11868 | return;
|
11869 | }
|
11870 | if (this.test(baseClass, prefix) && variants.filter(i => !(i in this._variants)).length === 0) {
|
11871 | _hSuccess(selector, self, parent);
|
11872 | } else {
|
11873 | _hIgnored(selector, self, parent);
|
11874 | }
|
11875 | };
|
11876 |
|
11877 | const _hGroup = (obj, parentVariants = []) => {
|
11878 | const _eval = (u, parent) => {
|
11879 | if (u.type === 'group') {
|
11880 | _hGroup(u, obj.variants);
|
11881 | } else if (u.type === 'alias' && (u.content ) in this._plugin.alias) {
|
11882 | this._plugin.alias[u.content ].forEach(i => _eval(i, u));
|
11883 | } else {
|
11884 |
|
11885 | const variants = [
|
11886 | ...parentVariants,
|
11887 | ...obj.variants,
|
11888 | ...u.variants,
|
11889 | ];
|
11890 | const important = obj.important || u.important;
|
11891 | const selector = (important ? '!' : '') + [...variants, u.content].join(':');
|
11892 | typeof u.content === 'string' &&
|
11893 | _gStyle(u.content, variants, selector, u, parent, this.config('prefix') );
|
11894 | }
|
11895 | };
|
11896 | Array.isArray(obj.content) && obj.content.forEach(u => _eval(u, obj));
|
11897 | };
|
11898 |
|
11899 | const _gAst = (ast) => {
|
11900 | ast.forEach(obj => {
|
11901 | if (obj.type === 'utility') {
|
11902 | if (Array.isArray(obj.content)) ; else if (obj.content) {
|
11903 | _gStyle(obj.content, obj.variants, obj.raw, obj, undefined, this.config('prefix') );
|
11904 | }
|
11905 | } else if (obj.type === 'group') {
|
11906 | _hGroup(obj);
|
11907 | } else if (obj.type === 'alias' && (obj.content ) in this._plugin.alias) {
|
11908 | _gAst(this._plugin.alias[obj.content ]);
|
11909 | } else {
|
11910 | _hIgnored(obj.raw, obj);
|
11911 | }
|
11912 | });
|
11913 | };
|
11914 |
|
11915 | _gAst(ast);
|
11916 |
|
11917 | return {
|
11918 | success,
|
11919 | ignored,
|
11920 | };
|
11921 | }
|
11922 |
|
11923 | compile(
|
11924 | classNames,
|
11925 | prefix = 'windi-',
|
11926 | showComment = false,
|
11927 | ignoreGenerated = false,
|
11928 | handleIgnored,
|
11929 | outputClassName
|
11930 | )
|
11931 |
|
11932 |
|
11933 |
|
11934 |
|
11935 | {
|
11936 | const ast = new ClassParser(classNames, this.config('separator', ':') , this._cache.variants).parse();
|
11937 | const success = [];
|
11938 | const ignored = [];
|
11939 | const styleSheet = new StyleSheet();
|
11940 | let className = _nullishCoalesce(outputClassName, () => ( prefix + hash(classNames.trim().split(/\s+/g).join(' '))));
|
11941 | if (ignoreGenerated && this._cache.classes.includes(className)) return { success, ignored, styleSheet, className };
|
11942 | const buildSelector = '.' + className;
|
11943 |
|
11944 | const _hIgnored = (className) => {
|
11945 | if (handleIgnored) {
|
11946 | const style = handleIgnored(className);
|
11947 | if (style) {
|
11948 | styleSheet.add(style);
|
11949 | success.push(className);
|
11950 | } else {
|
11951 | ignored.push(className);
|
11952 | }
|
11953 | }
|
11954 | ignored.push(className);
|
11955 | };
|
11956 |
|
11957 | const _gStyle = (
|
11958 | baseClass,
|
11959 | variants,
|
11960 | selector,
|
11961 | important = false
|
11962 | ) => {
|
11963 | if (this._config.exclude && testRegexr(selector, this._config.exclude)) {
|
11964 |
|
11965 | ignored.push(selector);
|
11966 | return;
|
11967 | }
|
11968 | if (variants[0] && selector in { ...this._plugin.utilities, ...this._plugin.components }) {
|
11969 |
|
11970 | success.push(selector);
|
11971 | styleSheet.add(deepCopy(this._plugin.utilities[selector]));
|
11972 | return;
|
11973 | }
|
11974 | const result = this.extract(baseClass, showComment);
|
11975 | if (result) {
|
11976 | if (Array.isArray(result)) {
|
11977 | result.forEach(i => {
|
11978 | if (i instanceof Keyframes) {
|
11979 | i.meta.order = 20;
|
11980 | return i;
|
11981 | }
|
11982 | i.selector = buildSelector;
|
11983 | this.markAsImportant(i, important);
|
11984 | });
|
11985 | } else {
|
11986 | result.selector = buildSelector;
|
11987 | this.markAsImportant(result, important);
|
11988 | }
|
11989 | const wrapped = this.wrapWithVariants(variants, result);
|
11990 | if (wrapped) {
|
11991 | success.push(selector);
|
11992 | styleSheet.add(wrapped);
|
11993 | } else {
|
11994 | _hIgnored(selector);
|
11995 | }
|
11996 | } else {
|
11997 | _hIgnored(selector);
|
11998 | }
|
11999 | };
|
12000 |
|
12001 | const _hGroup = (obj, parentVariants = []) => {
|
12002 | Array.isArray(obj.content) &&
|
12003 | obj.content.forEach((u) => {
|
12004 | if (u.type === 'group') {
|
12005 | _hGroup(u, obj.variants);
|
12006 | } else {
|
12007 |
|
12008 | const variants = [
|
12009 | ...parentVariants,
|
12010 | ...obj.variants,
|
12011 | ...u.variants,
|
12012 | ];
|
12013 | const selector = [...variants, u.content].join(':');
|
12014 | typeof u.content === 'string' &&
|
12015 | _gStyle(this.removePrefix(u.content), variants, selector, obj.important || u.important);
|
12016 | }
|
12017 | });
|
12018 | };
|
12019 |
|
12020 | ast.forEach((obj) => {
|
12021 | if (obj.type === 'utility') {
|
12022 | if (Array.isArray(obj.content)) ; else if (obj.content) {
|
12023 | _gStyle(this.removePrefix(obj.content), obj.variants, obj.raw, obj.important);
|
12024 | }
|
12025 | } else if (obj.type === 'group') {
|
12026 | _hGroup(obj);
|
12027 | } else {
|
12028 | _hIgnored(obj.raw);
|
12029 | }
|
12030 | });
|
12031 |
|
12032 | className = success.length > 0 ? className : undefined;
|
12033 | if (ignoreGenerated && className) this._cache.classes.push(className);
|
12034 | if (!this.config('prefixer')) styleSheet.prefixer = false;
|
12035 | return {
|
12036 | success,
|
12037 | ignored,
|
12038 | className,
|
12039 | styleSheet: styleSheet.sortby(sortGroup).combine(),
|
12040 | };
|
12041 | }
|
12042 |
|
12043 | attributify(attrs, ignoreProcessed = false) {
|
12044 | const success = [];
|
12045 | const ignored = [];
|
12046 | const styleSheet = new StyleSheet();
|
12047 | const { prefix, separator, disable } = (this._config.attributify && typeof this._config.attributify === 'boolean') ? {} : this._config.attributify || {};
|
12048 |
|
12049 | const _gStyle = (
|
12050 | key,
|
12051 | value,
|
12052 | equal = false,
|
12053 | notAllow = false,
|
12054 | ignoreProcessed = false,
|
12055 | ) => {
|
12056 | const buildSelector = `[${this.e((prefix || '') + key)}${equal?'=':'~='}"${value}"]`;
|
12057 | if (notAllow || (ignoreProcessed && this._cache.attrs.includes(buildSelector))) {
|
12058 | ignored.push(buildSelector);
|
12059 | return;
|
12060 | }
|
12061 | const importantValue = value.startsWith('!');
|
12062 | if (importantValue) value = value.slice(1);
|
12063 | const importantKey = key.startsWith('!');
|
12064 | if (importantKey) key = key.slice(1);
|
12065 | const id = _nullishCoalesce(_optionalChain([key, 'access', _16 => _16.match, 'call', _17 => _17(/\w+$/), 'optionalAccess', _18 => _18[0]]), () => ( ''));
|
12066 | const splits = value.split(separator || ':');
|
12067 | let variants = splits.slice(0, -1);
|
12068 | let utility = splits.slice(-1)[0];
|
12069 | let keys = key.split(separator || ':');
|
12070 | const lastKey = keys.slice(-1)[0];
|
12071 |
|
12072 | if (lastKey in this._variants && lastKey !== 'svg') {
|
12073 | variants = [...keys, ...variants];
|
12074 | } else if (id in this._variants && id !== 'svg') {
|
12075 |
|
12076 | const matches = key.match(/[@<\w]+/g);
|
12077 | if (!matches) {
|
12078 | ignored.push(buildSelector);
|
12079 | return;
|
12080 | }
|
12081 | variants = [...matches, ...variants];
|
12082 | } else {
|
12083 |
|
12084 | if (!keys) {
|
12085 | ignored.push(buildSelector);
|
12086 | return;
|
12087 | }
|
12088 | if (keys.length === 1) keys = key.split('-');
|
12089 | let last;
|
12090 |
|
12091 | if (['min', 'max'].includes(keys.slice(-2, -1)[0])) {
|
12092 | variants = [...keys.slice(0, -2), ...variants];
|
12093 | last = keys.slice(-2,).join('-');
|
12094 | } else {
|
12095 | variants = [...keys.slice(0, -1), ...variants];
|
12096 | last = keys[keys.length - 1];
|
12097 | }
|
12098 |
|
12099 | const negative = utility.charAt(0) === '-';
|
12100 | if (negative) utility = utility.slice(1,);
|
12101 | utility = ['m', 'p'].includes(last) && ['t', 'l', 'b', 'r', 'x', 'y'].includes(utility.charAt(0)) ? last + utility : last + '-' + utility;
|
12102 | if (negative) utility = '-' + utility;
|
12103 | utility !== 'cursor-default' && (utility = utility.replace(/-(~|default)$/, ''));
|
12104 |
|
12105 | switch(last) {
|
12106 | case 'w':
|
12107 | if (['w-min', 'w-max', 'w-min-content', 'w-max-content'].includes(utility)) {
|
12108 | utility = utility.slice(0, 5);
|
12109 | } else if (utility.startsWith('w-min')) {
|
12110 | utility = 'min-w' + utility.slice(5);
|
12111 | } else if (utility.startsWith('w-max')) {
|
12112 | utility = 'max-w' + utility.slice(5);
|
12113 | }
|
12114 | break;
|
12115 | case 'h':
|
12116 | if (['h-min', 'h-max', 'h-min-content', 'h-max-content'].includes(utility)) {
|
12117 | utility = utility.slice(0, 5);
|
12118 | } else if (utility.startsWith('h-min')) {
|
12119 | utility = 'min-h' + utility.slice(5);
|
12120 | } else if (utility.startsWith('h-max')) {
|
12121 | utility = 'max-h' + utility.slice(5);
|
12122 | }
|
12123 | break;
|
12124 | case 'flex':
|
12125 | switch (utility) {
|
12126 | case 'flex-default':
|
12127 | utility = 'flex';
|
12128 | break;
|
12129 | case 'flex-inline':
|
12130 | utility = 'inline-flex';
|
12131 | break;
|
12132 | }
|
12133 | break;
|
12134 | case 'grid':
|
12135 | switch(utility) {
|
12136 | case 'grid-default':
|
12137 | utility = 'grid';
|
12138 | break;
|
12139 | case 'grid-inline':
|
12140 | utility = 'inline-grid';
|
12141 | break;
|
12142 | default:
|
12143 | if (/^grid-(auto|gap|col|row)-/.test(utility)) utility = utility.slice(5);
|
12144 | }
|
12145 | break;
|
12146 | case 'justify':
|
12147 | if (utility.startsWith('justify-content-')) {
|
12148 | utility = 'justify-' + utility.slice(16);
|
12149 | }
|
12150 | break;
|
12151 | case 'align':
|
12152 | if (/^align-(items|self|content)-/.test(utility)) {
|
12153 | utility = utility.slice(6);
|
12154 | } else {
|
12155 | utility = 'content-' + utility.slice(6);
|
12156 | }
|
12157 | break;
|
12158 | case 'place':
|
12159 | if (!/^place-(items|self|content)-/.test(utility)) {
|
12160 | utility = 'place-content-' + utility.slice(6);
|
12161 | }
|
12162 | break;
|
12163 | case 'font':
|
12164 | if (/^font-(tracking|leading)-/.test(utility) || ['font-italic', 'font-not-italic', 'font-antialiased', 'font-subpixel-antialiased', 'font-normal-nums', 'font-ordinal', 'font-slashed-zero', 'font-lining-nums', 'font-oldstyle-nums', 'font-proportional-nums', 'font-tabular-nums', 'font-diagonal-fractions', 'font-stacked-fractions'].includes(utility))
|
12165 | utility = utility.slice(5);
|
12166 | break;
|
12167 | case 'text':
|
12168 | if (['text-baseline', 'text-top', 'text-middle', 'text-bottom', 'text-text-top', 'text-text-bottom'].includes(utility)) {
|
12169 | utility = 'align-' + utility.slice(5);
|
12170 | } else if (utility.startsWith('text-placeholder') || utility.startsWith('text-underline') || utility.startsWith('text-tab') || utility.startsWith('text-indent') || utility.startsWith('text-hyphens') || utility.startsWith('text-write')) {
|
12171 | utility = utility.slice(5);
|
12172 | } else if (['text-underline', 'text-line-through', 'text-no-underline', 'text-uppercase', 'text-lowercase', 'text-capitalize', 'text-normal-case', 'text-truncate', 'text-overflow-ellipsis', 'text-overflow-clip', 'text-break-normal', 'text-break-words', 'text-break-all'].includes(utility)) {
|
12173 | utility = utility.slice(5);
|
12174 | } else if (utility.startsWith('text-space')) {
|
12175 | utility = 'white' + utility.slice(5);
|
12176 | }
|
12177 | break;
|
12178 | case 'underline':
|
12179 | if (utility === 'underline-none') {
|
12180 | utility = 'no-underline';
|
12181 | } else if (utility === 'underline-line-through') {
|
12182 | utility = 'line-through';
|
12183 | }
|
12184 | break;
|
12185 | case 'svg':
|
12186 | if (utility.startsWith('svg-fill') || utility.startsWith('svg-stroke')) utility = utility.slice(4);
|
12187 | break;
|
12188 | case 'border':
|
12189 | if (utility.startsWith('border-rounded')) {
|
12190 | utility = utility.slice(7);
|
12191 | }
|
12192 | break;
|
12193 | case 'gradient':
|
12194 | if (utility === 'gradient-none') {
|
12195 | utility = 'bg-none';
|
12196 | } else if (/^gradient-to-[trbl]{1,2}$/.test(utility)) {
|
12197 | utility = 'bg-' + utility;
|
12198 | } else if (/^gradient-(from|via|to)-/.test(utility)) {
|
12199 | utility = utility.slice(9);
|
12200 | }
|
12201 | break;
|
12202 | case 'display':
|
12203 | utility = utility.slice(8);
|
12204 | break;
|
12205 | case 'pos':
|
12206 | utility = utility.slice(4);
|
12207 | break;
|
12208 | case 'position':
|
12209 | utility = utility.slice(9);
|
12210 | break;
|
12211 | case 'box':
|
12212 | if (/^box-(decoration|shadow)/.test(utility)) {
|
12213 | utility = utility.slice(4,);
|
12214 | }
|
12215 | break;
|
12216 | case 'filter':
|
12217 | if (utility !== 'filter-none' && utility !== 'filter') {
|
12218 | utility = utility.slice(7);
|
12219 | }
|
12220 | break;
|
12221 | case 'backdrop':
|
12222 | if (utility === 'backdrop') {
|
12223 | utility = 'backdrop-filter';
|
12224 | } else if (utility === 'backdrop-none') {
|
12225 | utility = 'backdrop-filter-none';
|
12226 | }
|
12227 | break;
|
12228 | case 'transition':
|
12229 | if (/transition-(duration|ease|delay)-/.test(utility)) {
|
12230 | utility = utility.slice(11);
|
12231 | }
|
12232 | break;
|
12233 | case 'transform':
|
12234 | if (!['transform-gpu', 'transform-none', 'transform'].includes(utility)) {
|
12235 | utility = utility.slice(10);
|
12236 | }
|
12237 | break;
|
12238 | case 'isolation':
|
12239 | if (utility === 'isolation-isolate') utility = 'isolate';
|
12240 | break;
|
12241 | case 'table':
|
12242 | if (utility === 'table-inline') {
|
12243 | utility = 'inline-table';
|
12244 | } else if (utility.startsWith('table-caption-') || utility.startsWith('table-empty-cells')) {
|
12245 | utility = utility.slice(6);
|
12246 | }
|
12247 | break;
|
12248 | case 'pointer':
|
12249 | utility = 'pointer-events' + utility.slice(7);
|
12250 | break;
|
12251 | case 'resize':
|
12252 | if (utility === 'resize-both') utility = 'resize';
|
12253 | break;
|
12254 | case 'ring':
|
12255 | break;
|
12256 | case 'blend':
|
12257 | utility = 'mix-' + utility;
|
12258 | break;
|
12259 | case 'sr':
|
12260 | if (utility === 'sr-not-only') utility = 'not-sr-only';
|
12261 | break;
|
12262 | }
|
12263 | }
|
12264 | const style = this.extract(utility, false);
|
12265 | if (style) {
|
12266 | const important = importantKey || importantValue;
|
12267 | if (Array.isArray(style)) {
|
12268 | style.forEach(i => {
|
12269 | if (i instanceof Keyframes) return i;
|
12270 | i.selector = buildSelector;
|
12271 | this.markAsImportant(i, important);
|
12272 | });
|
12273 | } else {
|
12274 | style.selector = buildSelector;
|
12275 | this.markAsImportant(style, important);
|
12276 | }
|
12277 | if (variants.find(i => !(i in this._variants))) {
|
12278 | ignored.push(buildSelector);
|
12279 | } else {
|
12280 | const wrapped = this.wrapWithVariants(variants, style);
|
12281 | if (wrapped) {
|
12282 | ignoreProcessed && this._cache.attrs.push(buildSelector);
|
12283 | success.push(buildSelector);
|
12284 | styleSheet.add(wrapped);
|
12285 | } else {
|
12286 | ignored.push(buildSelector);
|
12287 | }
|
12288 | }
|
12289 | } else {
|
12290 | ignored.push(buildSelector);
|
12291 | }
|
12292 | };
|
12293 |
|
12294 |
|
12295 | for (let [key, value] of Object.entries(attrs)) {
|
12296 | let notAllow = false;
|
12297 | if (prefix) {
|
12298 | if (key.startsWith(prefix)) {
|
12299 | key = key.slice(prefix.length);
|
12300 | } else {
|
12301 | notAllow = true;
|
12302 | }
|
12303 | }
|
12304 | if (_optionalChain([disable, 'optionalAccess', _19 => _19.includes, 'call', _20 => _20(key)])) notAllow = true;
|
12305 | if (Array.isArray(value)) {
|
12306 | value.forEach(i => _gStyle(key, i, false, notAllow, ignoreProcessed));
|
12307 | } else {
|
12308 | _gStyle(key, value, true, notAllow, ignoreProcessed);
|
12309 | }
|
12310 | }
|
12311 |
|
12312 | return {
|
12313 | success,
|
12314 | ignored,
|
12315 | styleSheet: styleSheet.sort().combine(),
|
12316 | };
|
12317 | }
|
12318 |
|
12319 | loadPlugin({
|
12320 | handler,
|
12321 | config,
|
12322 | }) {
|
12323 | if (config) {
|
12324 | config = this._resolveFunction(config);
|
12325 | config = combineConfig(
|
12326 | config ,
|
12327 | this._config
|
12328 | );
|
12329 | const pluginTheme = config.theme ;
|
12330 | const extendTheme = _optionalChain([pluginTheme, 'optionalAccess', _21 => _21.extend]) ;
|
12331 | if (pluginTheme && extendTheme && typeof extendTheme === 'object') {
|
12332 | for (const [key, value] of Object.entries(extendTheme)) {
|
12333 | const themeValue = pluginTheme[key];
|
12334 | if (themeValue && typeof themeValue === 'object') {
|
12335 | pluginTheme[key] = { ...(_nullishCoalesce(themeValue, () => ( {}))), ...value };
|
12336 | } else if (value && typeof value === 'object' ){
|
12337 | pluginTheme[key] = value ;
|
12338 | }
|
12339 | }
|
12340 | }
|
12341 | this._config = { ...config, theme: pluginTheme };
|
12342 | this._theme = pluginTheme;
|
12343 | }
|
12344 | this._config = this._resolveFunction(this._config);
|
12345 | this._theme = this._config.theme;
|
12346 | this._variants = { ...this._variants, ...this.resolveVariants() };
|
12347 | handler(this.pluginUtils);
|
12348 | }
|
12349 |
|
12350 | loadPluginWithOptions(optionsFunction, userOptions) {
|
12351 | const plugin = optionsFunction(_nullishCoalesce(userOptions, () => ( {})));
|
12352 | this.loadPlugin(plugin);
|
12353 | }
|
12354 |
|
12355 | loadShortcuts(shortcuts) {
|
12356 | for (const [key, value] of Object.entries(shortcuts)) {
|
12357 | const prefix = this.config('prefix', '');
|
12358 | if (typeof value === 'string') {
|
12359 | this._plugin.shortcuts[key] = this.compile(value, undefined, undefined, false, undefined, cssEscape(prefix + key)).styleSheet.children.map(i => i.updateMeta('components', 'shortcuts', layerOrder['shortcuts'], ++this._cache.count));
|
12360 | } else {
|
12361 | let styles = [];
|
12362 | Style.generate('.' + cssEscape(key), value).forEach(style => {
|
12363 | for (const prop of style.property) {
|
12364 | if (!prop.value) continue;
|
12365 | if (prop.name === '@apply') {
|
12366 | styles = styles.concat(this.compile(Array.isArray(prop.value)? prop.value.join(' ') : prop.value).styleSheet.children.map(i => {
|
12367 | const newStyle = deepCopy(style);
|
12368 | newStyle.property = [];
|
12369 | return newStyle.extend(i);
|
12370 | }));
|
12371 | } else {
|
12372 | const newStyle = deepCopy(style);
|
12373 | newStyle.property = [ prop ];
|
12374 | styles.push(newStyle);
|
12375 | }
|
12376 | }
|
12377 | });
|
12378 | this._plugin.shortcuts[key] = styles.map(i => i.updateMeta('components', 'shortcuts', layerOrder['shortcuts'], ++this._cache.count));
|
12379 | }
|
12380 | }
|
12381 | }
|
12382 |
|
12383 | loadAlias(alias) {
|
12384 | for (const [key, value] of Object.entries(alias)) {
|
12385 | this._plugin.alias[key] = new ClassParser(value, undefined, this._cache.variants).parse();
|
12386 | }
|
12387 | }
|
12388 |
|
12389 | config(path, defaultValue) {
|
12390 | if (path === 'corePlugins') return this._plugin.core ? Object.keys(this._plugin.core).filter(i => _optionalChain([this, 'access', _22 => _22._plugin, 'access', _23 => _23.core, 'optionalAccess', _24 => _24[i]])) : Object.keys(pluginOrder).slice(Object.keys(pluginOrder).length/2);
|
12391 | return _nullishCoalesce(getNestedValue(this._config, path), () => ( defaultValue));
|
12392 | }
|
12393 |
|
12394 | theme(path, defaultValue) {
|
12395 | return this._theme ? _nullishCoalesce(getNestedValue(this._theme, path), () => ( defaultValue)) : undefined;
|
12396 | }
|
12397 |
|
12398 | corePlugins(path) {
|
12399 | if (Array.isArray(this._config.corePlugins)) {
|
12400 | return (this._config.corePlugins ).includes(path);
|
12401 | }
|
12402 | return _nullishCoalesce((this.config(`corePlugins.${path}`, true) ), () => ( false));
|
12403 | }
|
12404 |
|
12405 | variants(path, defaultValue = []) {
|
12406 | if (Array.isArray(this._config.variants)) {
|
12407 | return this._config.variants;
|
12408 | }
|
12409 | return this.config(`variants.${path}`, defaultValue) ;
|
12410 | }
|
12411 |
|
12412 | e(selector) {
|
12413 | return cssEscape(selector);
|
12414 | }
|
12415 |
|
12416 | prefix(selector) {
|
12417 | return selector.replace(/(?=[\w])/, _nullishCoalesce(this._config.prefix, () => ( '')));
|
12418 | }
|
12419 |
|
12420 | addUtilities(
|
12421 | utilities,
|
12422 | options = {
|
12423 | layer: 'utilities',
|
12424 | variants: [],
|
12425 | respectPrefix: true,
|
12426 | respectImportant: true,
|
12427 | }
|
12428 | ) {
|
12429 | if (Array.isArray(options)) options = { variants: options };
|
12430 | if (Array.isArray(utilities)) utilities = utilities.reduce((previous, current) => combineConfig(previous, current), {}) ;
|
12431 | let output = [];
|
12432 | const layer = _nullishCoalesce(options.layer, () => ( 'utilities'));
|
12433 | const order = layerOrder[layer] + 1;
|
12434 | for (const [key, value] of Object.entries(utilities)) {
|
12435 | const styles = Style.generate(key.startsWith('.') && options.respectPrefix ? this.prefix(key) : key, value);
|
12436 | if (options.layer) styles.forEach(style => style.updateMeta(layer, 'plugin', order, ++this._cache.count));
|
12437 | if (options.respectImportant && this._config.important) styles.forEach(style => style.important = true);
|
12438 | let className = guessClassName(key);
|
12439 | if (key.charAt(0) === '@') {
|
12440 | styles.forEach(style => {
|
12441 | if (style.selector) className = guessClassName(style.selector);
|
12442 | if (Array.isArray(className)) {
|
12443 | className.filter(i => i.isClass).forEach(({ selector, pseudo }) => this._addPluginProcessorCache('utilities', selector, pseudo? style.clone('.' + cssEscape(selector)).wrapSelector(selector => selector + pseudo) : style.clone()));
|
12444 | const base = className.filter(i => !i.isClass).map(i => i.selector).join(', ');
|
12445 | if (base) this._addPluginProcessorCache('static', base, style.clone(base));
|
12446 | } else {
|
12447 | this._addPluginProcessorCache(className.isClass? 'utilities' : 'static', className.selector, className.pseudo? style.clone('.' + cssEscape(className.selector)).wrapSelector(selector => selector + (className ).pseudo) : style.clone());
|
12448 | }
|
12449 | });
|
12450 | } else if (Array.isArray(className)) {
|
12451 | className.filter(i => i.isClass).forEach(({ selector, pseudo }) => this._addPluginProcessorCache('utilities', selector, pseudo ? styles.map(i => i.clone('.' + cssEscape(selector)).wrapSelector(selector => selector + pseudo)): deepCopy(styles)));
|
12452 | const base = className.filter(i => !i.isClass).map(i => i.selector).join(', ');
|
12453 | if (base) this._addPluginProcessorCache('static', base, styles.map(i => i.clone(base)));
|
12454 | } else {
|
12455 | this._addPluginProcessorCache(className.isClass? 'utilities': 'static', className.selector, className.pseudo ? styles.map(style => style.clone('.' + cssEscape((className ).selector)).wrapSelector(selector => selector + (className ).pseudo)) : styles);
|
12456 | }
|
12457 | output = [...output, ...styles];
|
12458 | }
|
12459 | return output;
|
12460 | }
|
12461 |
|
12462 | addDynamic(
|
12463 | key,
|
12464 | generator,
|
12465 | options = {
|
12466 | layer: 'utilities',
|
12467 | group: 'plugin',
|
12468 | variants: [],
|
12469 | completions: [],
|
12470 | respectPrefix: true,
|
12471 | respectImportant: true,
|
12472 | respectSelector: false,
|
12473 | }
|
12474 | ) {
|
12475 | const uOptions = Array.isArray(options)? { variants:options } : options;
|
12476 | const layer = uOptions.layer || 'utilities';
|
12477 | const group = uOptions.group || 'plugin';
|
12478 | const order = uOptions.order || layerOrder[layer] + 1;
|
12479 | if (uOptions.completions) this._plugin.completions[group] = group in this._plugin.completions ? [...this._plugin.completions[group], ...uOptions.completions] : uOptions.completions;
|
12480 | const style = (selector, property, important = uOptions.respectImportant && this._config.important ? true : false) => new Style(selector, property, important);
|
12481 | const prop = (name, value, comment, important = uOptions.respectImportant && this._config.important ? true : false) => new Property(name, value, comment, important);
|
12482 | const keyframes = (selector, property, important = uOptions.respectImportant && this._config.important ? true : false) => new Keyframes(selector, property, important);
|
12483 | keyframes.generate = Keyframes.generate;
|
12484 | style.generate = Style.generate;
|
12485 | prop.parse = Property.parse;
|
12486 | this._plugin.dynamic[key] = (key in this._plugin.dynamic)
|
12487 | ? (Utility) => deepCopy(this._plugin.dynamic[key])(Utility) || generator({ Utility, Style: style, Property: prop, Keyframes: keyframes })
|
12488 | : (Utility) => {
|
12489 | const output = generator({ Utility, Style: style, Property: prop, Keyframes: keyframes });
|
12490 | if (!output) return;
|
12491 | if (Array.isArray(output)) return output.map(i => i.updateMeta(layer, group, order, ++this._cache.count, false, i.meta.respectSelector || uOptions.respectSelector));
|
12492 | return output.updateMeta(layer, group, order, ++this._cache.count, false, output.meta.respectSelector || uOptions.respectSelector);
|
12493 | };
|
12494 | return generator;
|
12495 | }
|
12496 |
|
12497 | addComponents(
|
12498 | components,
|
12499 | options = { layer: 'components', variants: [], respectPrefix: false }
|
12500 | ) {
|
12501 | if (Array.isArray(options)) options = { variants: options };
|
12502 | if (Array.isArray(components)) components = components.reduce((previous, current) => combineConfig(previous, current), {}) ;
|
12503 | let output = [];
|
12504 | const layer = _nullishCoalesce(options.layer, () => ( 'components'));
|
12505 | const order = layerOrder[layer] + 1;
|
12506 | for (const [key, value] of Object.entries(components)) {
|
12507 | const styles = Style.generate(key.startsWith('.') && options.respectPrefix ? this.prefix(key): key, value);
|
12508 | styles.forEach(style => style.updateMeta(layer, 'plugin', order, ++this._cache.count));
|
12509 | if (options.respectImportant && this._config.important) styles.forEach(style => style.important = true);
|
12510 | let className = guessClassName(key);
|
12511 | if (key.charAt(0) === '@') {
|
12512 | styles.forEach(style => {
|
12513 | if (style.selector) className = guessClassName(style.selector);
|
12514 | if (Array.isArray(className)) {
|
12515 | className.filter(i => i.isClass).forEach(({ selector, pseudo }) => this._addPluginProcessorCache('components', selector, pseudo? style.clone('.' + cssEscape(selector)).wrapSelector(selector => selector + pseudo) : style.clone()));
|
12516 | const base = className.filter(i => !i.isClass).map(i => i.selector).join(', ');
|
12517 | if (base) this._addPluginProcessorCache('static', base, style.clone(base));
|
12518 | } else {
|
12519 | this._addPluginProcessorCache(className.isClass? 'components' : 'static', className.selector, className.pseudo? style.clone('.' + cssEscape(className.selector)).wrapSelector(selector => selector + (className ).pseudo) : style.clone());
|
12520 | }
|
12521 | });
|
12522 | } else if (Array.isArray(className)) {
|
12523 |
|
12524 | if (className.some(i => !i.isClass)) {
|
12525 | const base = className.map(i => i.selector).join(', ');
|
12526 | if (base) this._addPluginProcessorCache('static', base, styles.map(i => i.clone(base)));
|
12527 | }
|
12528 |
|
12529 | else {
|
12530 | className.forEach(({ selector, pseudo }) => this._addPluginProcessorCache('components', selector, pseudo ? styles.map(i => i.clone('.' + cssEscape(selector)).wrapSelector(selector => selector + pseudo)): deepCopy(styles)));
|
12531 | }
|
12532 | } else {
|
12533 | this._addPluginProcessorCache(className.isClass? 'components': 'static', className.selector, className.pseudo ? styles.map(style => style.clone('.' + cssEscape((className ).selector)).wrapSelector(selector => selector + (className ).pseudo)) : styles);
|
12534 | }
|
12535 | output = [...output, ...styles];
|
12536 | }
|
12537 | return output;
|
12538 | }
|
12539 |
|
12540 | addBase(baseStyles) {
|
12541 | let output = [];
|
12542 | for (const [key, value] of Object.entries(baseStyles)) {
|
12543 | const styles = Style.generate(key, value).map(i => i.updateMeta('base', 'plugin', 10, ++this._cache.count));
|
12544 | this._replaceStyleVariants(styles);
|
12545 | this._addPluginProcessorCache('preflights', key, styles);
|
12546 | output = [...output, ...styles];
|
12547 | }
|
12548 | return output;
|
12549 | }
|
12550 |
|
12551 | addVariant(
|
12552 | name,
|
12553 | generator,
|
12554 | ) {
|
12555 |
|
12556 | const style = generator({
|
12557 | ...this.variantUtils,
|
12558 | separator: this.config('separator', ':') ,
|
12559 | style: new Style(),
|
12560 | });
|
12561 | this._variants[name] = () => style;
|
12562 | this._cache.variants.push(name);
|
12563 | return style;
|
12564 | }
|
12565 |
|
12566 | dumpConfig() {
|
12567 | const processor = new Processor();
|
12568 | const diff = diffConfig(processor._config, this._config) ;
|
12569 | let output = { theme: { extend: {} }, plugins: [] } ;
|
12570 | if (diff.theme) {
|
12571 | for (const [key, value] of Object.entries(diff.theme)) {
|
12572 | if (key !== 'extend') {
|
12573 | (output.theme.extend )[key] = value;
|
12574 | }
|
12575 | }
|
12576 | delete diff.theme;
|
12577 | }
|
12578 | if (diff.plugins) {
|
12579 | for (const plugin of diff.plugins) {
|
12580 | if ('config' in plugin) {
|
12581 | delete plugin.config;
|
12582 | }
|
12583 | output.plugins.push(plugin);
|
12584 | }
|
12585 | delete diff.plugins;
|
12586 | }
|
12587 | output = { ...diff, ...output };
|
12588 |
|
12589 | return `module.exports = ${toSource(output)}`;
|
12590 | }
|
12591 | }
|
12592 |
|
12593 | export { Processor };
|