@moneymap/ui 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/README.md +101 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +4409 -0
- package/dist/src/components/alert/index.d.ts +10 -0
- package/dist/src/components/alert/index.d.ts.map +1 -0
- package/dist/src/components/button/index.d.ts +11 -0
- package/dist/src/components/button/index.d.ts.map +1 -0
- package/dist/src/components/input/index.d.ts +4 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/textarea/index.d.ts +4 -0
- package/dist/src/components/textarea/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/cn.d.ts +3 -0
- package/dist/src/lib/cn.d.ts.map +1 -0
- package/package.json +26 -0
|
@@ -0,0 +1,4409 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
5
|
+
if (null == r) return {};
|
|
6
|
+
var t = {};
|
|
7
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
8
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
9
|
+
t[n] = r[n];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
15
|
+
|
|
16
|
+
var check = function (it) {
|
|
17
|
+
return it && it.Math === Math && it;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
21
|
+
var globalThis_1 =
|
|
22
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
23
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
24
|
+
check(typeof window == 'object' && window) ||
|
|
25
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
26
|
+
check(typeof self == 'object' && self) ||
|
|
27
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
28
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
29
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
30
|
+
(function () { return this; })() || Function('return this')();
|
|
31
|
+
|
|
32
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
33
|
+
|
|
34
|
+
var fails$9 = function (exec) {
|
|
35
|
+
try {
|
|
36
|
+
return !!exec();
|
|
37
|
+
} catch (error) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var fails$8 = fails$9;
|
|
43
|
+
|
|
44
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
45
|
+
var descriptors = !fails$8(function () {
|
|
46
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
47
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
var fails$7 = fails$9;
|
|
51
|
+
|
|
52
|
+
var functionBindNative = !fails$7(function () {
|
|
53
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
54
|
+
var test = (function () { /* empty */ }).bind();
|
|
55
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
56
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
60
|
+
|
|
61
|
+
var call$5 = Function.prototype.call;
|
|
62
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
63
|
+
var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
|
|
64
|
+
return call$5.apply(call$5, arguments);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var objectPropertyIsEnumerable = {};
|
|
68
|
+
|
|
69
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
70
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
71
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
72
|
+
|
|
73
|
+
// Nashorn ~ JDK8 bug
|
|
74
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
75
|
+
|
|
76
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
77
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
78
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
79
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
80
|
+
return !!descriptor && descriptor.enumerable;
|
|
81
|
+
} : $propertyIsEnumerable;
|
|
82
|
+
|
|
83
|
+
var createPropertyDescriptor$2 = function (bitmap, value) {
|
|
84
|
+
return {
|
|
85
|
+
enumerable: !(bitmap & 1),
|
|
86
|
+
configurable: !(bitmap & 2),
|
|
87
|
+
writable: !(bitmap & 4),
|
|
88
|
+
value: value
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
var NATIVE_BIND = functionBindNative;
|
|
93
|
+
|
|
94
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
95
|
+
var call$4 = FunctionPrototype$1.call;
|
|
96
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
97
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
|
|
98
|
+
|
|
99
|
+
var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
100
|
+
return function () {
|
|
101
|
+
return call$4.apply(fn, arguments);
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
106
|
+
|
|
107
|
+
var toString$1 = uncurryThis$9({}.toString);
|
|
108
|
+
var stringSlice$1 = uncurryThis$9(''.slice);
|
|
109
|
+
|
|
110
|
+
var classofRaw = function (it) {
|
|
111
|
+
return stringSlice$1(toString$1(it), 8, -1);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
115
|
+
var fails$6 = fails$9;
|
|
116
|
+
var classof = classofRaw;
|
|
117
|
+
|
|
118
|
+
var $Object$2 = Object;
|
|
119
|
+
var split = uncurryThis$8(''.split);
|
|
120
|
+
|
|
121
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
122
|
+
var indexedObject = fails$6(function () {
|
|
123
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
124
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
125
|
+
return !$Object$2('z').propertyIsEnumerable(0);
|
|
126
|
+
}) ? function (it) {
|
|
127
|
+
return classof(it) === 'String' ? split(it, '') : $Object$2(it);
|
|
128
|
+
} : $Object$2;
|
|
129
|
+
|
|
130
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
131
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
132
|
+
var isNullOrUndefined$2 = function (it) {
|
|
133
|
+
return it === null || it === undefined;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
var isNullOrUndefined$1 = isNullOrUndefined$2;
|
|
137
|
+
|
|
138
|
+
var $TypeError$5 = TypeError;
|
|
139
|
+
|
|
140
|
+
// `RequireObjectCoercible` abstract operation
|
|
141
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
142
|
+
var requireObjectCoercible$2 = function (it) {
|
|
143
|
+
if (isNullOrUndefined$1(it)) throw new $TypeError$5("Can't call method on " + it);
|
|
144
|
+
return it;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
148
|
+
var IndexedObject$1 = indexedObject;
|
|
149
|
+
var requireObjectCoercible$1 = requireObjectCoercible$2;
|
|
150
|
+
|
|
151
|
+
var toIndexedObject$3 = function (it) {
|
|
152
|
+
return IndexedObject$1(requireObjectCoercible$1(it));
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
156
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
157
|
+
|
|
158
|
+
// `IsCallable` abstract operation
|
|
159
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
160
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
161
|
+
var isCallable$a = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
162
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
163
|
+
} : function (argument) {
|
|
164
|
+
return typeof argument == 'function';
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
var isCallable$9 = isCallable$a;
|
|
168
|
+
|
|
169
|
+
var isObject$4 = function (it) {
|
|
170
|
+
return typeof it == 'object' ? it !== null : isCallable$9(it);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
var globalThis$b = globalThis_1;
|
|
174
|
+
var isCallable$8 = isCallable$a;
|
|
175
|
+
|
|
176
|
+
var aFunction = function (argument) {
|
|
177
|
+
return isCallable$8(argument) ? argument : undefined;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
var getBuiltIn$2 = function (namespace, method) {
|
|
181
|
+
return arguments.length < 2 ? aFunction(globalThis$b[namespace]) : globalThis$b[namespace] && globalThis$b[namespace][method];
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
185
|
+
|
|
186
|
+
var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
|
|
187
|
+
|
|
188
|
+
var globalThis$a = globalThis_1;
|
|
189
|
+
|
|
190
|
+
var navigator = globalThis$a.navigator;
|
|
191
|
+
var userAgent$1 = navigator && navigator.userAgent;
|
|
192
|
+
|
|
193
|
+
var environmentUserAgent = userAgent$1 ? String(userAgent$1) : '';
|
|
194
|
+
|
|
195
|
+
var globalThis$9 = globalThis_1;
|
|
196
|
+
var userAgent = environmentUserAgent;
|
|
197
|
+
|
|
198
|
+
var process = globalThis$9.process;
|
|
199
|
+
var Deno = globalThis$9.Deno;
|
|
200
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
201
|
+
var v8 = versions && versions.v8;
|
|
202
|
+
var match, version;
|
|
203
|
+
|
|
204
|
+
if (v8) {
|
|
205
|
+
match = v8.split('.');
|
|
206
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
207
|
+
// but their correct versions are not interesting for us
|
|
208
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
212
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
213
|
+
if (!version && userAgent) {
|
|
214
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
215
|
+
if (!match || match[1] >= 74) {
|
|
216
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
217
|
+
if (match) version = +match[1];
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
var environmentV8Version = version;
|
|
222
|
+
|
|
223
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
224
|
+
var V8_VERSION = environmentV8Version;
|
|
225
|
+
var fails$5 = fails$9;
|
|
226
|
+
var globalThis$8 = globalThis_1;
|
|
227
|
+
|
|
228
|
+
var $String$3 = globalThis$8.String;
|
|
229
|
+
|
|
230
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
231
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
|
|
232
|
+
var symbol = Symbol('symbol detection');
|
|
233
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
234
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
235
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
236
|
+
// of course, fail.
|
|
237
|
+
return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
238
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
239
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
243
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
244
|
+
|
|
245
|
+
var useSymbolAsUid = NATIVE_SYMBOL$1 &&
|
|
246
|
+
!Symbol.sham &&
|
|
247
|
+
typeof Symbol.iterator == 'symbol';
|
|
248
|
+
|
|
249
|
+
var getBuiltIn$1 = getBuiltIn$2;
|
|
250
|
+
var isCallable$7 = isCallable$a;
|
|
251
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
252
|
+
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
253
|
+
|
|
254
|
+
var $Object$1 = Object;
|
|
255
|
+
|
|
256
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
257
|
+
return typeof it == 'symbol';
|
|
258
|
+
} : function (it) {
|
|
259
|
+
var $Symbol = getBuiltIn$1('Symbol');
|
|
260
|
+
return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
var $String$2 = String;
|
|
264
|
+
|
|
265
|
+
var tryToString$1 = function (argument) {
|
|
266
|
+
try {
|
|
267
|
+
return $String$2(argument);
|
|
268
|
+
} catch (error) {
|
|
269
|
+
return 'Object';
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
var isCallable$6 = isCallable$a;
|
|
274
|
+
var tryToString = tryToString$1;
|
|
275
|
+
|
|
276
|
+
var $TypeError$4 = TypeError;
|
|
277
|
+
|
|
278
|
+
// `Assert: IsCallable(argument) is true`
|
|
279
|
+
var aCallable$1 = function (argument) {
|
|
280
|
+
if (isCallable$6(argument)) return argument;
|
|
281
|
+
throw new $TypeError$4(tryToString(argument) + ' is not a function');
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
var aCallable = aCallable$1;
|
|
285
|
+
var isNullOrUndefined = isNullOrUndefined$2;
|
|
286
|
+
|
|
287
|
+
// `GetMethod` abstract operation
|
|
288
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
289
|
+
var getMethod$1 = function (V, P) {
|
|
290
|
+
var func = V[P];
|
|
291
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
var call$3 = functionCall;
|
|
295
|
+
var isCallable$5 = isCallable$a;
|
|
296
|
+
var isObject$3 = isObject$4;
|
|
297
|
+
|
|
298
|
+
var $TypeError$3 = TypeError;
|
|
299
|
+
|
|
300
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
301
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
302
|
+
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
303
|
+
var fn, val;
|
|
304
|
+
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
|
|
305
|
+
if (isCallable$5(fn = input.valueOf) && !isObject$3(val = call$3(fn, input))) return val;
|
|
306
|
+
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
|
|
307
|
+
throw new $TypeError$3("Can't convert object to primitive value");
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
var sharedStore = {exports: {}};
|
|
311
|
+
|
|
312
|
+
var globalThis$7 = globalThis_1;
|
|
313
|
+
|
|
314
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
315
|
+
var defineProperty$2 = Object.defineProperty;
|
|
316
|
+
|
|
317
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
318
|
+
try {
|
|
319
|
+
defineProperty$2(globalThis$7, key, { value: value, configurable: true, writable: true });
|
|
320
|
+
} catch (error) {
|
|
321
|
+
globalThis$7[key] = value;
|
|
322
|
+
} return value;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
var globalThis$6 = globalThis_1;
|
|
326
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
327
|
+
|
|
328
|
+
var SHARED = '__core-js_shared__';
|
|
329
|
+
var store$3 = sharedStore.exports = globalThis$6[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
330
|
+
|
|
331
|
+
(store$3.versions || (store$3.versions = [])).push({
|
|
332
|
+
version: '3.47.0',
|
|
333
|
+
mode: 'global',
|
|
334
|
+
copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)',
|
|
335
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE',
|
|
336
|
+
source: 'https://github.com/zloirock/core-js'
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
var sharedStoreExports = sharedStore.exports;
|
|
340
|
+
|
|
341
|
+
var store$2 = sharedStoreExports;
|
|
342
|
+
|
|
343
|
+
var shared$3 = function (key, value) {
|
|
344
|
+
return store$2[key] || (store$2[key] = value || {});
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
var requireObjectCoercible = requireObjectCoercible$2;
|
|
348
|
+
|
|
349
|
+
var $Object = Object;
|
|
350
|
+
|
|
351
|
+
// `ToObject` abstract operation
|
|
352
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
353
|
+
var toObject$2 = function (argument) {
|
|
354
|
+
return $Object(requireObjectCoercible(argument));
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
358
|
+
var toObject$1 = toObject$2;
|
|
359
|
+
|
|
360
|
+
var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
|
|
361
|
+
|
|
362
|
+
// `HasOwnProperty` abstract operation
|
|
363
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
364
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
365
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
366
|
+
return hasOwnProperty(toObject$1(it), key);
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
370
|
+
|
|
371
|
+
var id = 0;
|
|
372
|
+
var postfix = Math.random();
|
|
373
|
+
var toString = uncurryThis$5(1.1.toString);
|
|
374
|
+
|
|
375
|
+
var uid$2 = function (key) {
|
|
376
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
var globalThis$5 = globalThis_1;
|
|
380
|
+
var shared$2 = shared$3;
|
|
381
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
382
|
+
var uid$1 = uid$2;
|
|
383
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
384
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
385
|
+
|
|
386
|
+
var Symbol$1 = globalThis$5.Symbol;
|
|
387
|
+
var WellKnownSymbolsStore = shared$2('wks');
|
|
388
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
389
|
+
|
|
390
|
+
var wellKnownSymbol$1 = function (name) {
|
|
391
|
+
if (!hasOwn$6(WellKnownSymbolsStore, name)) {
|
|
392
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)
|
|
393
|
+
? Symbol$1[name]
|
|
394
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
395
|
+
} return WellKnownSymbolsStore[name];
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
var call$2 = functionCall;
|
|
399
|
+
var isObject$2 = isObject$4;
|
|
400
|
+
var isSymbol$1 = isSymbol$2;
|
|
401
|
+
var getMethod = getMethod$1;
|
|
402
|
+
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
403
|
+
var wellKnownSymbol = wellKnownSymbol$1;
|
|
404
|
+
|
|
405
|
+
var $TypeError$2 = TypeError;
|
|
406
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
407
|
+
|
|
408
|
+
// `ToPrimitive` abstract operation
|
|
409
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
410
|
+
var toPrimitive$1 = function (input, pref) {
|
|
411
|
+
if (!isObject$2(input) || isSymbol$1(input)) return input;
|
|
412
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
413
|
+
var result;
|
|
414
|
+
if (exoticToPrim) {
|
|
415
|
+
if (pref === undefined) pref = 'default';
|
|
416
|
+
result = call$2(exoticToPrim, input, pref);
|
|
417
|
+
if (!isObject$2(result) || isSymbol$1(result)) return result;
|
|
418
|
+
throw new $TypeError$2("Can't convert object to primitive value");
|
|
419
|
+
}
|
|
420
|
+
if (pref === undefined) pref = 'number';
|
|
421
|
+
return ordinaryToPrimitive(input, pref);
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
var toPrimitive = toPrimitive$1;
|
|
425
|
+
var isSymbol = isSymbol$2;
|
|
426
|
+
|
|
427
|
+
// `ToPropertyKey` abstract operation
|
|
428
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
429
|
+
var toPropertyKey$2 = function (argument) {
|
|
430
|
+
var key = toPrimitive(argument, 'string');
|
|
431
|
+
return isSymbol(key) ? key : key + '';
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
var globalThis$4 = globalThis_1;
|
|
435
|
+
var isObject$1 = isObject$4;
|
|
436
|
+
|
|
437
|
+
var document$1 = globalThis$4.document;
|
|
438
|
+
// typeof document.createElement is 'object' in old IE
|
|
439
|
+
var EXISTS$1 = isObject$1(document$1) && isObject$1(document$1.createElement);
|
|
440
|
+
|
|
441
|
+
var documentCreateElement = function (it) {
|
|
442
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
var DESCRIPTORS$7 = descriptors;
|
|
446
|
+
var fails$4 = fails$9;
|
|
447
|
+
var createElement = documentCreateElement;
|
|
448
|
+
|
|
449
|
+
// Thanks to IE8 for its funny defineProperty
|
|
450
|
+
var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
|
|
451
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
452
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
453
|
+
get: function () { return 7; }
|
|
454
|
+
}).a !== 7;
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
var DESCRIPTORS$6 = descriptors;
|
|
458
|
+
var call$1 = functionCall;
|
|
459
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
460
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$2;
|
|
461
|
+
var toIndexedObject$2 = toIndexedObject$3;
|
|
462
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
463
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
464
|
+
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
465
|
+
|
|
466
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
467
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
468
|
+
|
|
469
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
470
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
471
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
472
|
+
O = toIndexedObject$2(O);
|
|
473
|
+
P = toPropertyKey$1(P);
|
|
474
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
475
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
476
|
+
} catch (error) { /* empty */ }
|
|
477
|
+
if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
var objectDefineProperty = {};
|
|
481
|
+
|
|
482
|
+
var DESCRIPTORS$5 = descriptors;
|
|
483
|
+
var fails$3 = fails$9;
|
|
484
|
+
|
|
485
|
+
// V8 ~ Chrome 36-
|
|
486
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
487
|
+
var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
|
|
488
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
489
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
490
|
+
value: 42,
|
|
491
|
+
writable: false
|
|
492
|
+
}).prototype !== 42;
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
var isObject = isObject$4;
|
|
496
|
+
|
|
497
|
+
var $String$1 = String;
|
|
498
|
+
var $TypeError$1 = TypeError;
|
|
499
|
+
|
|
500
|
+
// `Assert: Type(argument) is Object`
|
|
501
|
+
var anObject$2 = function (argument) {
|
|
502
|
+
if (isObject(argument)) return argument;
|
|
503
|
+
throw new $TypeError$1($String$1(argument) + ' is not an object');
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
var DESCRIPTORS$4 = descriptors;
|
|
507
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
508
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
509
|
+
var anObject$1 = anObject$2;
|
|
510
|
+
var toPropertyKey = toPropertyKey$2;
|
|
511
|
+
|
|
512
|
+
var $TypeError = TypeError;
|
|
513
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
514
|
+
var $defineProperty = Object.defineProperty;
|
|
515
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
516
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
517
|
+
var ENUMERABLE = 'enumerable';
|
|
518
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
519
|
+
var WRITABLE = 'writable';
|
|
520
|
+
|
|
521
|
+
// `Object.defineProperty` method
|
|
522
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
523
|
+
objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
524
|
+
anObject$1(O);
|
|
525
|
+
P = toPropertyKey(P);
|
|
526
|
+
anObject$1(Attributes);
|
|
527
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
528
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
529
|
+
if (current && current[WRITABLE]) {
|
|
530
|
+
O[P] = Attributes.value;
|
|
531
|
+
Attributes = {
|
|
532
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
533
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
534
|
+
writable: false
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
} return $defineProperty(O, P, Attributes);
|
|
538
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
539
|
+
anObject$1(O);
|
|
540
|
+
P = toPropertyKey(P);
|
|
541
|
+
anObject$1(Attributes);
|
|
542
|
+
if (IE8_DOM_DEFINE) try {
|
|
543
|
+
return $defineProperty(O, P, Attributes);
|
|
544
|
+
} catch (error) { /* empty */ }
|
|
545
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
|
|
546
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
547
|
+
return O;
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
var DESCRIPTORS$3 = descriptors;
|
|
551
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
552
|
+
var createPropertyDescriptor = createPropertyDescriptor$2;
|
|
553
|
+
|
|
554
|
+
var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
|
|
555
|
+
return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
|
|
556
|
+
} : function (object, key, value) {
|
|
557
|
+
object[key] = value;
|
|
558
|
+
return object;
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
var makeBuiltIn$2 = {exports: {}};
|
|
562
|
+
|
|
563
|
+
var DESCRIPTORS$2 = descriptors;
|
|
564
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
565
|
+
|
|
566
|
+
var FunctionPrototype = Function.prototype;
|
|
567
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
568
|
+
var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
|
|
569
|
+
|
|
570
|
+
var EXISTS = hasOwn$4(FunctionPrototype, 'name');
|
|
571
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
572
|
+
|
|
573
|
+
var functionName = {
|
|
574
|
+
CONFIGURABLE: CONFIGURABLE
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
578
|
+
var isCallable$4 = isCallable$a;
|
|
579
|
+
var store$1 = sharedStoreExports;
|
|
580
|
+
|
|
581
|
+
var functionToString = uncurryThis$4(Function.toString);
|
|
582
|
+
|
|
583
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
584
|
+
if (!isCallable$4(store$1.inspectSource)) {
|
|
585
|
+
store$1.inspectSource = function (it) {
|
|
586
|
+
return functionToString(it);
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
var inspectSource$1 = store$1.inspectSource;
|
|
591
|
+
|
|
592
|
+
var globalThis$3 = globalThis_1;
|
|
593
|
+
var isCallable$3 = isCallable$a;
|
|
594
|
+
|
|
595
|
+
var WeakMap$1 = globalThis$3.WeakMap;
|
|
596
|
+
|
|
597
|
+
var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
598
|
+
|
|
599
|
+
var shared$1 = shared$3;
|
|
600
|
+
var uid = uid$2;
|
|
601
|
+
|
|
602
|
+
var keys = shared$1('keys');
|
|
603
|
+
|
|
604
|
+
var sharedKey$1 = function (key) {
|
|
605
|
+
return keys[key] || (keys[key] = uid(key));
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
var hiddenKeys$3 = {};
|
|
609
|
+
|
|
610
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
611
|
+
var globalThis$2 = globalThis_1;
|
|
612
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
|
|
613
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
614
|
+
var shared = sharedStoreExports;
|
|
615
|
+
var sharedKey = sharedKey$1;
|
|
616
|
+
var hiddenKeys$2 = hiddenKeys$3;
|
|
617
|
+
|
|
618
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
619
|
+
var TypeError$1 = globalThis$2.TypeError;
|
|
620
|
+
var WeakMap = globalThis$2.WeakMap;
|
|
621
|
+
var set, get, has;
|
|
622
|
+
|
|
623
|
+
var enforce = function (it) {
|
|
624
|
+
return has(it) ? get(it) : set(it, {});
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
if (NATIVE_WEAK_MAP || shared.state) {
|
|
628
|
+
var store = shared.state || (shared.state = new WeakMap());
|
|
629
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
630
|
+
store.get = store.get;
|
|
631
|
+
store.has = store.has;
|
|
632
|
+
store.set = store.set;
|
|
633
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
634
|
+
set = function (it, metadata) {
|
|
635
|
+
if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
636
|
+
metadata.facade = it;
|
|
637
|
+
store.set(it, metadata);
|
|
638
|
+
return metadata;
|
|
639
|
+
};
|
|
640
|
+
get = function (it) {
|
|
641
|
+
return store.get(it) || {};
|
|
642
|
+
};
|
|
643
|
+
has = function (it) {
|
|
644
|
+
return store.has(it);
|
|
645
|
+
};
|
|
646
|
+
} else {
|
|
647
|
+
var STATE = sharedKey('state');
|
|
648
|
+
hiddenKeys$2[STATE] = true;
|
|
649
|
+
set = function (it, metadata) {
|
|
650
|
+
if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
651
|
+
metadata.facade = it;
|
|
652
|
+
createNonEnumerableProperty$1(it, STATE, metadata);
|
|
653
|
+
return metadata;
|
|
654
|
+
};
|
|
655
|
+
get = function (it) {
|
|
656
|
+
return hasOwn$3(it, STATE) ? it[STATE] : {};
|
|
657
|
+
};
|
|
658
|
+
has = function (it) {
|
|
659
|
+
return hasOwn$3(it, STATE);
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
var internalState = {
|
|
664
|
+
get: get,
|
|
665
|
+
enforce: enforce};
|
|
666
|
+
|
|
667
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
668
|
+
var fails$2 = fails$9;
|
|
669
|
+
var isCallable$2 = isCallable$a;
|
|
670
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
671
|
+
var DESCRIPTORS$1 = descriptors;
|
|
672
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
673
|
+
var inspectSource = inspectSource$1;
|
|
674
|
+
var InternalStateModule = internalState;
|
|
675
|
+
|
|
676
|
+
var enforceInternalState = InternalStateModule.enforce;
|
|
677
|
+
var getInternalState = InternalStateModule.get;
|
|
678
|
+
var $String = String;
|
|
679
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
680
|
+
var defineProperty$1 = Object.defineProperty;
|
|
681
|
+
var stringSlice = uncurryThis$3(''.slice);
|
|
682
|
+
var replace = uncurryThis$3(''.replace);
|
|
683
|
+
var join = uncurryThis$3([].join);
|
|
684
|
+
|
|
685
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
|
|
686
|
+
return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
var TEMPLATE = String(String).split('String');
|
|
690
|
+
|
|
691
|
+
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
692
|
+
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
693
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
694
|
+
}
|
|
695
|
+
if (options && options.getter) name = 'get ' + name;
|
|
696
|
+
if (options && options.setter) name = 'set ' + name;
|
|
697
|
+
if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
698
|
+
if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
|
|
699
|
+
else value.name = name;
|
|
700
|
+
}
|
|
701
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
|
|
702
|
+
defineProperty$1(value, 'length', { value: options.arity });
|
|
703
|
+
}
|
|
704
|
+
try {
|
|
705
|
+
if (options && hasOwn$2(options, 'constructor') && options.constructor) {
|
|
706
|
+
if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
|
|
707
|
+
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
708
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
709
|
+
} catch (error) { /* empty */ }
|
|
710
|
+
var state = enforceInternalState(value);
|
|
711
|
+
if (!hasOwn$2(state, 'source')) {
|
|
712
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
713
|
+
} return value;
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
717
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
718
|
+
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
719
|
+
return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
|
|
720
|
+
}, 'toString');
|
|
721
|
+
|
|
722
|
+
var makeBuiltInExports = makeBuiltIn$2.exports;
|
|
723
|
+
|
|
724
|
+
var isCallable$1 = isCallable$a;
|
|
725
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
726
|
+
var makeBuiltIn = makeBuiltInExports;
|
|
727
|
+
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
728
|
+
|
|
729
|
+
var defineBuiltIn$1 = function (O, key, value, options) {
|
|
730
|
+
if (!options) options = {};
|
|
731
|
+
var simple = options.enumerable;
|
|
732
|
+
var name = options.name !== undefined ? options.name : key;
|
|
733
|
+
if (isCallable$1(value)) makeBuiltIn(value, name, options);
|
|
734
|
+
if (options.global) {
|
|
735
|
+
if (simple) O[key] = value;
|
|
736
|
+
else defineGlobalProperty$1(key, value);
|
|
737
|
+
} else {
|
|
738
|
+
try {
|
|
739
|
+
if (!options.unsafe) delete O[key];
|
|
740
|
+
else if (O[key]) simple = true;
|
|
741
|
+
} catch (error) { /* empty */ }
|
|
742
|
+
if (simple) O[key] = value;
|
|
743
|
+
else definePropertyModule$1.f(O, key, {
|
|
744
|
+
value: value,
|
|
745
|
+
enumerable: false,
|
|
746
|
+
configurable: !options.nonConfigurable,
|
|
747
|
+
writable: !options.nonWritable
|
|
748
|
+
});
|
|
749
|
+
} return O;
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
var objectGetOwnPropertyNames = {};
|
|
753
|
+
|
|
754
|
+
var ceil = Math.ceil;
|
|
755
|
+
var floor = Math.floor;
|
|
756
|
+
|
|
757
|
+
// `Math.trunc` method
|
|
758
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
759
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
760
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
761
|
+
var n = +x;
|
|
762
|
+
return (n > 0 ? floor : ceil)(n);
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
var trunc = mathTrunc;
|
|
766
|
+
|
|
767
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
768
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
769
|
+
var toIntegerOrInfinity$2 = function (argument) {
|
|
770
|
+
var number = +argument;
|
|
771
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
772
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
776
|
+
|
|
777
|
+
var max = Math.max;
|
|
778
|
+
var min$1 = Math.min;
|
|
779
|
+
|
|
780
|
+
// Helper for a popular repeating case of the spec:
|
|
781
|
+
// Let integer be ? ToInteger(index).
|
|
782
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
783
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
784
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
785
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
789
|
+
|
|
790
|
+
var min = Math.min;
|
|
791
|
+
|
|
792
|
+
// `ToLength` abstract operation
|
|
793
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
794
|
+
var toLength$1 = function (argument) {
|
|
795
|
+
var len = toIntegerOrInfinity(argument);
|
|
796
|
+
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
var toLength = toLength$1;
|
|
800
|
+
|
|
801
|
+
// `LengthOfArrayLike` abstract operation
|
|
802
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
803
|
+
var lengthOfArrayLike$1 = function (obj) {
|
|
804
|
+
return toLength(obj.length);
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
var toIndexedObject$1 = toIndexedObject$3;
|
|
808
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
809
|
+
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
810
|
+
|
|
811
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
812
|
+
var createMethod = function (IS_INCLUDES) {
|
|
813
|
+
return function ($this, el, fromIndex) {
|
|
814
|
+
var O = toIndexedObject$1($this);
|
|
815
|
+
var length = lengthOfArrayLike(O);
|
|
816
|
+
if (length === 0) return !IS_INCLUDES && -1;
|
|
817
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
818
|
+
var value;
|
|
819
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
820
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
821
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
822
|
+
value = O[index++];
|
|
823
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
824
|
+
if (value !== value) return true;
|
|
825
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
826
|
+
} else for (;length > index; index++) {
|
|
827
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
828
|
+
} return !IS_INCLUDES && -1;
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
var arrayIncludes = {
|
|
833
|
+
// `Array.prototype.indexOf` method
|
|
834
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
835
|
+
indexOf: createMethod(false)
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
839
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
840
|
+
var toIndexedObject = toIndexedObject$3;
|
|
841
|
+
var indexOf = arrayIncludes.indexOf;
|
|
842
|
+
var hiddenKeys$1 = hiddenKeys$3;
|
|
843
|
+
|
|
844
|
+
var push = uncurryThis$2([].push);
|
|
845
|
+
|
|
846
|
+
var objectKeysInternal = function (object, names) {
|
|
847
|
+
var O = toIndexedObject(object);
|
|
848
|
+
var i = 0;
|
|
849
|
+
var result = [];
|
|
850
|
+
var key;
|
|
851
|
+
for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
|
|
852
|
+
// Don't enum bug & hidden keys
|
|
853
|
+
while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
|
|
854
|
+
~indexOf(result, key) || push(result, key);
|
|
855
|
+
}
|
|
856
|
+
return result;
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
// IE8- don't enum bug keys
|
|
860
|
+
var enumBugKeys$2 = [
|
|
861
|
+
'constructor',
|
|
862
|
+
'hasOwnProperty',
|
|
863
|
+
'isPrototypeOf',
|
|
864
|
+
'propertyIsEnumerable',
|
|
865
|
+
'toLocaleString',
|
|
866
|
+
'toString',
|
|
867
|
+
'valueOf'
|
|
868
|
+
];
|
|
869
|
+
|
|
870
|
+
var internalObjectKeys$1 = objectKeysInternal;
|
|
871
|
+
var enumBugKeys$1 = enumBugKeys$2;
|
|
872
|
+
|
|
873
|
+
var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
|
|
874
|
+
|
|
875
|
+
// `Object.getOwnPropertyNames` method
|
|
876
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
877
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
878
|
+
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
879
|
+
return internalObjectKeys$1(O, hiddenKeys);
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
var objectGetOwnPropertySymbols = {};
|
|
883
|
+
|
|
884
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
885
|
+
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
886
|
+
|
|
887
|
+
var getBuiltIn = getBuiltIn$2;
|
|
888
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
889
|
+
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
890
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
891
|
+
var anObject = anObject$2;
|
|
892
|
+
|
|
893
|
+
var concat$1 = uncurryThis$1([].concat);
|
|
894
|
+
|
|
895
|
+
// all object keys, includes non-enumerable and symbols
|
|
896
|
+
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
897
|
+
var keys = getOwnPropertyNamesModule.f(anObject(it));
|
|
898
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
899
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
var hasOwn = hasOwnProperty_1;
|
|
903
|
+
var ownKeys = ownKeys$1;
|
|
904
|
+
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
905
|
+
var definePropertyModule = objectDefineProperty;
|
|
906
|
+
|
|
907
|
+
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
908
|
+
var keys = ownKeys(source);
|
|
909
|
+
var defineProperty = definePropertyModule.f;
|
|
910
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
911
|
+
for (var i = 0; i < keys.length; i++) {
|
|
912
|
+
var key = keys[i];
|
|
913
|
+
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
|
914
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
var fails$1 = fails$9;
|
|
920
|
+
var isCallable = isCallable$a;
|
|
921
|
+
|
|
922
|
+
var replacement = /#|\.prototype\./;
|
|
923
|
+
|
|
924
|
+
var isForced$1 = function (feature, detection) {
|
|
925
|
+
var value = data[normalize(feature)];
|
|
926
|
+
return value === POLYFILL ? true
|
|
927
|
+
: value === NATIVE ? false
|
|
928
|
+
: isCallable(detection) ? fails$1(detection)
|
|
929
|
+
: !!detection;
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
var normalize = isForced$1.normalize = function (string) {
|
|
933
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
var data = isForced$1.data = {};
|
|
937
|
+
var NATIVE = isForced$1.NATIVE = 'N';
|
|
938
|
+
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
939
|
+
|
|
940
|
+
var isForced_1 = isForced$1;
|
|
941
|
+
|
|
942
|
+
var globalThis$1 = globalThis_1;
|
|
943
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
944
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$2;
|
|
945
|
+
var defineBuiltIn = defineBuiltIn$1;
|
|
946
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
947
|
+
var copyConstructorProperties = copyConstructorProperties$1;
|
|
948
|
+
var isForced = isForced_1;
|
|
949
|
+
|
|
950
|
+
/*
|
|
951
|
+
options.target - name of the target object
|
|
952
|
+
options.global - target is the global object
|
|
953
|
+
options.stat - export as static methods of target
|
|
954
|
+
options.proto - export as prototype methods of target
|
|
955
|
+
options.real - real prototype method for the `pure` version
|
|
956
|
+
options.forced - export even if the native feature is available
|
|
957
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
958
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
959
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
960
|
+
options.sham - add a flag to not completely full polyfills
|
|
961
|
+
options.enumerable - export as enumerable property
|
|
962
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
963
|
+
options.name - the .name of the function if it does not match the key
|
|
964
|
+
*/
|
|
965
|
+
var _export = function (options, source) {
|
|
966
|
+
var TARGET = options.target;
|
|
967
|
+
var GLOBAL = options.global;
|
|
968
|
+
var STATIC = options.stat;
|
|
969
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
970
|
+
if (GLOBAL) {
|
|
971
|
+
target = globalThis$1;
|
|
972
|
+
} else if (STATIC) {
|
|
973
|
+
target = globalThis$1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
974
|
+
} else {
|
|
975
|
+
target = globalThis$1[TARGET] && globalThis$1[TARGET].prototype;
|
|
976
|
+
}
|
|
977
|
+
if (target) for (key in source) {
|
|
978
|
+
sourceProperty = source[key];
|
|
979
|
+
if (options.dontCallGetSet) {
|
|
980
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
981
|
+
targetProperty = descriptor && descriptor.value;
|
|
982
|
+
} else targetProperty = target[key];
|
|
983
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
984
|
+
// contained in target
|
|
985
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
986
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
987
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
988
|
+
}
|
|
989
|
+
// add a flag to not completely full polyfills
|
|
990
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
991
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
992
|
+
}
|
|
993
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
var internalObjectKeys = objectKeysInternal;
|
|
998
|
+
var enumBugKeys = enumBugKeys$2;
|
|
999
|
+
|
|
1000
|
+
// `Object.keys` method
|
|
1001
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1002
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1003
|
+
var objectKeys$1 = Object.keys || function keys(O) {
|
|
1004
|
+
return internalObjectKeys(O, enumBugKeys);
|
|
1005
|
+
};
|
|
1006
|
+
|
|
1007
|
+
var DESCRIPTORS = descriptors;
|
|
1008
|
+
var uncurryThis = functionUncurryThis;
|
|
1009
|
+
var call = functionCall;
|
|
1010
|
+
var fails = fails$9;
|
|
1011
|
+
var objectKeys = objectKeys$1;
|
|
1012
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1013
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1014
|
+
var toObject = toObject$2;
|
|
1015
|
+
var IndexedObject = indexedObject;
|
|
1016
|
+
|
|
1017
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1018
|
+
var $assign = Object.assign;
|
|
1019
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1020
|
+
var defineProperty = Object.defineProperty;
|
|
1021
|
+
var concat = uncurryThis([].concat);
|
|
1022
|
+
|
|
1023
|
+
// `Object.assign` method
|
|
1024
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1025
|
+
var objectAssign = !$assign || fails(function () {
|
|
1026
|
+
// should have correct order of operations (Edge bug)
|
|
1027
|
+
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1028
|
+
enumerable: true,
|
|
1029
|
+
get: function () {
|
|
1030
|
+
defineProperty(this, 'b', {
|
|
1031
|
+
value: 3,
|
|
1032
|
+
enumerable: false
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1036
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1037
|
+
var A = {};
|
|
1038
|
+
var B = {};
|
|
1039
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1040
|
+
var symbol = Symbol('assign detection');
|
|
1041
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1042
|
+
A[symbol] = 7;
|
|
1043
|
+
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
1044
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1045
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1046
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1047
|
+
var T = toObject(target);
|
|
1048
|
+
var argumentsLength = arguments.length;
|
|
1049
|
+
var index = 1;
|
|
1050
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1051
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1052
|
+
while (argumentsLength > index) {
|
|
1053
|
+
var S = IndexedObject(arguments[index++]);
|
|
1054
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1055
|
+
var length = keys.length;
|
|
1056
|
+
var j = 0;
|
|
1057
|
+
var key;
|
|
1058
|
+
while (length > j) {
|
|
1059
|
+
key = keys[j++];
|
|
1060
|
+
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1061
|
+
}
|
|
1062
|
+
} return T;
|
|
1063
|
+
} : $assign;
|
|
1064
|
+
|
|
1065
|
+
var $ = _export;
|
|
1066
|
+
var assign = objectAssign;
|
|
1067
|
+
|
|
1068
|
+
// `Object.assign` method
|
|
1069
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1070
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1071
|
+
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1072
|
+
assign: assign
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
1076
|
+
|
|
1077
|
+
const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
1078
|
+
const cx = clsx;
|
|
1079
|
+
const cva = (base, config)=>(props)=>{
|
|
1080
|
+
var _config_compoundVariants;
|
|
1081
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
1082
|
+
const { variants, defaultVariants } = config;
|
|
1083
|
+
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
1084
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
1085
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
1086
|
+
if (variantProp === null) return null;
|
|
1087
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
1088
|
+
return variants[variant][variantKey];
|
|
1089
|
+
});
|
|
1090
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
1091
|
+
let [key, value] = param;
|
|
1092
|
+
if (value === undefined) {
|
|
1093
|
+
return acc;
|
|
1094
|
+
}
|
|
1095
|
+
acc[key] = value;
|
|
1096
|
+
return acc;
|
|
1097
|
+
}, {});
|
|
1098
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
|
|
1099
|
+
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
1100
|
+
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
1101
|
+
let [key, value] = param;
|
|
1102
|
+
return Array.isArray(value) ? value.includes({
|
|
1103
|
+
...defaultVariants,
|
|
1104
|
+
...propsWithoutUndefined
|
|
1105
|
+
}[key]) : ({
|
|
1106
|
+
...defaultVariants,
|
|
1107
|
+
...propsWithoutUndefined
|
|
1108
|
+
})[key] === value;
|
|
1109
|
+
}) ? [
|
|
1110
|
+
...acc,
|
|
1111
|
+
cvClass,
|
|
1112
|
+
cvClassName
|
|
1113
|
+
] : acc;
|
|
1114
|
+
}, []);
|
|
1115
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Concatenates two arrays faster than the array spread operator.
|
|
1120
|
+
*/
|
|
1121
|
+
const concatArrays = (array1, array2) => {
|
|
1122
|
+
// Pre-allocate for better V8 optimization
|
|
1123
|
+
const combinedArray = new Array(array1.length + array2.length);
|
|
1124
|
+
for (let i = 0; i < array1.length; i++) {
|
|
1125
|
+
combinedArray[i] = array1[i];
|
|
1126
|
+
}
|
|
1127
|
+
for (let i = 0; i < array2.length; i++) {
|
|
1128
|
+
combinedArray[array1.length + i] = array2[i];
|
|
1129
|
+
}
|
|
1130
|
+
return combinedArray;
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
// Factory function ensures consistent object shapes
|
|
1134
|
+
const createClassValidatorObject = (classGroupId, validator) => ({
|
|
1135
|
+
classGroupId,
|
|
1136
|
+
validator
|
|
1137
|
+
});
|
|
1138
|
+
// Factory ensures consistent ClassPartObject shape
|
|
1139
|
+
const createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({
|
|
1140
|
+
nextPart,
|
|
1141
|
+
validators,
|
|
1142
|
+
classGroupId
|
|
1143
|
+
});
|
|
1144
|
+
const CLASS_PART_SEPARATOR = '-';
|
|
1145
|
+
const EMPTY_CONFLICTS = [];
|
|
1146
|
+
// I use two dots here because one dot is used as prefix for class groups in plugins
|
|
1147
|
+
const ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';
|
|
1148
|
+
const createClassGroupUtils = config => {
|
|
1149
|
+
const classMap = createClassMap(config);
|
|
1150
|
+
const {
|
|
1151
|
+
conflictingClassGroups,
|
|
1152
|
+
conflictingClassGroupModifiers
|
|
1153
|
+
} = config;
|
|
1154
|
+
const getClassGroupId = className => {
|
|
1155
|
+
if (className.startsWith('[') && className.endsWith(']')) {
|
|
1156
|
+
return getGroupIdForArbitraryProperty(className);
|
|
1157
|
+
}
|
|
1158
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
1159
|
+
// Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.
|
|
1160
|
+
const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;
|
|
1161
|
+
return getGroupRecursive(classParts, startIndex, classMap);
|
|
1162
|
+
};
|
|
1163
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
1164
|
+
if (hasPostfixModifier) {
|
|
1165
|
+
const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
|
|
1166
|
+
const baseConflicts = conflictingClassGroups[classGroupId];
|
|
1167
|
+
if (modifierConflicts) {
|
|
1168
|
+
if (baseConflicts) {
|
|
1169
|
+
// Merge base conflicts with modifier conflicts
|
|
1170
|
+
return concatArrays(baseConflicts, modifierConflicts);
|
|
1171
|
+
}
|
|
1172
|
+
// Only modifier conflicts
|
|
1173
|
+
return modifierConflicts;
|
|
1174
|
+
}
|
|
1175
|
+
// Fall back to without postfix if no modifier conflicts
|
|
1176
|
+
return baseConflicts || EMPTY_CONFLICTS;
|
|
1177
|
+
}
|
|
1178
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
1179
|
+
};
|
|
1180
|
+
return {
|
|
1181
|
+
getClassGroupId,
|
|
1182
|
+
getConflictingClassGroupIds
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1185
|
+
const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
1186
|
+
const classPathsLength = classParts.length - startIndex;
|
|
1187
|
+
if (classPathsLength === 0) {
|
|
1188
|
+
return classPartObject.classGroupId;
|
|
1189
|
+
}
|
|
1190
|
+
const currentClassPart = classParts[startIndex];
|
|
1191
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
1192
|
+
if (nextClassPartObject) {
|
|
1193
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
1194
|
+
if (result) return result;
|
|
1195
|
+
}
|
|
1196
|
+
const validators = classPartObject.validators;
|
|
1197
|
+
if (validators === null) {
|
|
1198
|
+
return undefined;
|
|
1199
|
+
}
|
|
1200
|
+
// Build classRest string efficiently by joining from startIndex onwards
|
|
1201
|
+
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
1202
|
+
const validatorsLength = validators.length;
|
|
1203
|
+
for (let i = 0; i < validatorsLength; i++) {
|
|
1204
|
+
const validatorObj = validators[i];
|
|
1205
|
+
if (validatorObj.validator(classRest)) {
|
|
1206
|
+
return validatorObj.classGroupId;
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
return undefined;
|
|
1210
|
+
};
|
|
1211
|
+
/**
|
|
1212
|
+
* Get the class group ID for an arbitrary property.
|
|
1213
|
+
*
|
|
1214
|
+
* @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
|
|
1215
|
+
*/
|
|
1216
|
+
const getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {
|
|
1217
|
+
const content = className.slice(1, -1);
|
|
1218
|
+
const colonIndex = content.indexOf(':');
|
|
1219
|
+
const property = content.slice(0, colonIndex);
|
|
1220
|
+
return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;
|
|
1221
|
+
})();
|
|
1222
|
+
/**
|
|
1223
|
+
* Exported for testing only
|
|
1224
|
+
*/
|
|
1225
|
+
const createClassMap = config => {
|
|
1226
|
+
const {
|
|
1227
|
+
theme,
|
|
1228
|
+
classGroups
|
|
1229
|
+
} = config;
|
|
1230
|
+
return processClassGroups(classGroups, theme);
|
|
1231
|
+
};
|
|
1232
|
+
// Split into separate functions to maintain monomorphic call sites
|
|
1233
|
+
const processClassGroups = (classGroups, theme) => {
|
|
1234
|
+
const classMap = createClassPartObject();
|
|
1235
|
+
for (const classGroupId in classGroups) {
|
|
1236
|
+
const group = classGroups[classGroupId];
|
|
1237
|
+
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
1238
|
+
}
|
|
1239
|
+
return classMap;
|
|
1240
|
+
};
|
|
1241
|
+
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
1242
|
+
const len = classGroup.length;
|
|
1243
|
+
for (let i = 0; i < len; i++) {
|
|
1244
|
+
const classDefinition = classGroup[i];
|
|
1245
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
// Split into separate functions for each type to maintain monomorphic call sites
|
|
1249
|
+
const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1250
|
+
if (typeof classDefinition === 'string') {
|
|
1251
|
+
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
1254
|
+
if (typeof classDefinition === 'function') {
|
|
1255
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1256
|
+
return;
|
|
1257
|
+
}
|
|
1258
|
+
processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1259
|
+
};
|
|
1260
|
+
const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
1261
|
+
const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
|
|
1262
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
1263
|
+
};
|
|
1264
|
+
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1265
|
+
if (isThemeGetter(classDefinition)) {
|
|
1266
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
1267
|
+
return;
|
|
1268
|
+
}
|
|
1269
|
+
if (classPartObject.validators === null) {
|
|
1270
|
+
classPartObject.validators = [];
|
|
1271
|
+
}
|
|
1272
|
+
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
1273
|
+
};
|
|
1274
|
+
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1275
|
+
const entries = Object.entries(classDefinition);
|
|
1276
|
+
const len = entries.length;
|
|
1277
|
+
for (let i = 0; i < len; i++) {
|
|
1278
|
+
const [key, value] = entries[i];
|
|
1279
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
const getPart = (classPartObject, path) => {
|
|
1283
|
+
let current = classPartObject;
|
|
1284
|
+
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
1285
|
+
const len = parts.length;
|
|
1286
|
+
for (let i = 0; i < len; i++) {
|
|
1287
|
+
const part = parts[i];
|
|
1288
|
+
let next = current.nextPart.get(part);
|
|
1289
|
+
if (!next) {
|
|
1290
|
+
next = createClassPartObject();
|
|
1291
|
+
current.nextPart.set(part, next);
|
|
1292
|
+
}
|
|
1293
|
+
current = next;
|
|
1294
|
+
}
|
|
1295
|
+
return current;
|
|
1296
|
+
};
|
|
1297
|
+
// Type guard maintains monomorphic check
|
|
1298
|
+
const isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;
|
|
1299
|
+
|
|
1300
|
+
// LRU cache implementation using plain objects for simplicity
|
|
1301
|
+
const createLruCache = maxCacheSize => {
|
|
1302
|
+
if (maxCacheSize < 1) {
|
|
1303
|
+
return {
|
|
1304
|
+
get: () => undefined,
|
|
1305
|
+
set: () => {}
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
let cacheSize = 0;
|
|
1309
|
+
let cache = Object.create(null);
|
|
1310
|
+
let previousCache = Object.create(null);
|
|
1311
|
+
const update = (key, value) => {
|
|
1312
|
+
cache[key] = value;
|
|
1313
|
+
cacheSize++;
|
|
1314
|
+
if (cacheSize > maxCacheSize) {
|
|
1315
|
+
cacheSize = 0;
|
|
1316
|
+
previousCache = cache;
|
|
1317
|
+
cache = Object.create(null);
|
|
1318
|
+
}
|
|
1319
|
+
};
|
|
1320
|
+
return {
|
|
1321
|
+
get(key) {
|
|
1322
|
+
let value = cache[key];
|
|
1323
|
+
if (value !== undefined) {
|
|
1324
|
+
return value;
|
|
1325
|
+
}
|
|
1326
|
+
if ((value = previousCache[key]) !== undefined) {
|
|
1327
|
+
update(key, value);
|
|
1328
|
+
return value;
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
set(key, value) {
|
|
1332
|
+
if (key in cache) {
|
|
1333
|
+
cache[key] = value;
|
|
1334
|
+
} else {
|
|
1335
|
+
update(key, value);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
const IMPORTANT_MODIFIER = '!';
|
|
1341
|
+
const MODIFIER_SEPARATOR = ':';
|
|
1342
|
+
const EMPTY_MODIFIERS = [];
|
|
1343
|
+
// Pre-allocated result object shape for consistency
|
|
1344
|
+
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
1345
|
+
modifiers,
|
|
1346
|
+
hasImportantModifier,
|
|
1347
|
+
baseClassName,
|
|
1348
|
+
maybePostfixModifierPosition,
|
|
1349
|
+
isExternal
|
|
1350
|
+
});
|
|
1351
|
+
const createParseClassName = config => {
|
|
1352
|
+
const {
|
|
1353
|
+
prefix,
|
|
1354
|
+
experimentalParseClassName
|
|
1355
|
+
} = config;
|
|
1356
|
+
/**
|
|
1357
|
+
* Parse class name into parts.
|
|
1358
|
+
*
|
|
1359
|
+
* Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
|
|
1360
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
|
|
1361
|
+
*/
|
|
1362
|
+
let parseClassName = className => {
|
|
1363
|
+
// Use simple array with push for better performance
|
|
1364
|
+
const modifiers = [];
|
|
1365
|
+
let bracketDepth = 0;
|
|
1366
|
+
let parenDepth = 0;
|
|
1367
|
+
let modifierStart = 0;
|
|
1368
|
+
let postfixModifierPosition;
|
|
1369
|
+
const len = className.length;
|
|
1370
|
+
for (let index = 0; index < len; index++) {
|
|
1371
|
+
const currentCharacter = className[index];
|
|
1372
|
+
if (bracketDepth === 0 && parenDepth === 0) {
|
|
1373
|
+
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
1374
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
1375
|
+
modifierStart = index + 1;
|
|
1376
|
+
continue;
|
|
1377
|
+
}
|
|
1378
|
+
if (currentCharacter === '/') {
|
|
1379
|
+
postfixModifierPosition = index;
|
|
1380
|
+
continue;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;
|
|
1384
|
+
}
|
|
1385
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
|
|
1386
|
+
// Inline important modifier check
|
|
1387
|
+
let baseClassName = baseClassNameWithImportantModifier;
|
|
1388
|
+
let hasImportantModifier = false;
|
|
1389
|
+
if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
|
|
1390
|
+
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
1391
|
+
hasImportantModifier = true;
|
|
1392
|
+
} else if (
|
|
1393
|
+
/**
|
|
1394
|
+
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
1395
|
+
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
1396
|
+
*/
|
|
1397
|
+
baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
|
|
1398
|
+
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
1399
|
+
hasImportantModifier = true;
|
|
1400
|
+
}
|
|
1401
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
|
|
1402
|
+
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
1403
|
+
};
|
|
1404
|
+
if (prefix) {
|
|
1405
|
+
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
1406
|
+
const parseClassNameOriginal = parseClassName;
|
|
1407
|
+
parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);
|
|
1408
|
+
}
|
|
1409
|
+
if (experimentalParseClassName) {
|
|
1410
|
+
const parseClassNameOriginal = parseClassName;
|
|
1411
|
+
parseClassName = className => experimentalParseClassName({
|
|
1412
|
+
className,
|
|
1413
|
+
parseClassName: parseClassNameOriginal
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
return parseClassName;
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* Sorts modifiers according to following schema:
|
|
1421
|
+
* - Predefined modifiers are sorted alphabetically
|
|
1422
|
+
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
|
|
1423
|
+
*/
|
|
1424
|
+
const createSortModifiers = config => {
|
|
1425
|
+
// Pre-compute weights for all known modifiers for O(1) comparison
|
|
1426
|
+
const modifierWeights = new Map();
|
|
1427
|
+
// Assign weights to sensitive modifiers (highest priority, but preserve order)
|
|
1428
|
+
config.orderSensitiveModifiers.forEach((mod, index) => {
|
|
1429
|
+
modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods
|
|
1430
|
+
});
|
|
1431
|
+
return modifiers => {
|
|
1432
|
+
const result = [];
|
|
1433
|
+
let currentSegment = [];
|
|
1434
|
+
// Process modifiers in one pass
|
|
1435
|
+
for (let i = 0; i < modifiers.length; i++) {
|
|
1436
|
+
const modifier = modifiers[i];
|
|
1437
|
+
// Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)
|
|
1438
|
+
const isArbitrary = modifier[0] === '[';
|
|
1439
|
+
const isOrderSensitive = modifierWeights.has(modifier);
|
|
1440
|
+
if (isArbitrary || isOrderSensitive) {
|
|
1441
|
+
// Sort and flush current segment alphabetically
|
|
1442
|
+
if (currentSegment.length > 0) {
|
|
1443
|
+
currentSegment.sort();
|
|
1444
|
+
result.push(...currentSegment);
|
|
1445
|
+
currentSegment = [];
|
|
1446
|
+
}
|
|
1447
|
+
result.push(modifier);
|
|
1448
|
+
} else {
|
|
1449
|
+
// Regular modifier - add to current segment for batch sorting
|
|
1450
|
+
currentSegment.push(modifier);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
// Sort and add any remaining segment items
|
|
1454
|
+
if (currentSegment.length > 0) {
|
|
1455
|
+
currentSegment.sort();
|
|
1456
|
+
result.push(...currentSegment);
|
|
1457
|
+
}
|
|
1458
|
+
return result;
|
|
1459
|
+
};
|
|
1460
|
+
};
|
|
1461
|
+
const createConfigUtils = config => ({
|
|
1462
|
+
cache: createLruCache(config.cacheSize),
|
|
1463
|
+
parseClassName: createParseClassName(config),
|
|
1464
|
+
sortModifiers: createSortModifiers(config),
|
|
1465
|
+
...createClassGroupUtils(config)
|
|
1466
|
+
});
|
|
1467
|
+
const SPLIT_CLASSES_REGEX = /\s+/;
|
|
1468
|
+
const mergeClassList = (classList, configUtils) => {
|
|
1469
|
+
const {
|
|
1470
|
+
parseClassName,
|
|
1471
|
+
getClassGroupId,
|
|
1472
|
+
getConflictingClassGroupIds,
|
|
1473
|
+
sortModifiers
|
|
1474
|
+
} = configUtils;
|
|
1475
|
+
/**
|
|
1476
|
+
* Set of classGroupIds in following format:
|
|
1477
|
+
* `{importantModifier}{variantModifiers}{classGroupId}`
|
|
1478
|
+
* @example 'float'
|
|
1479
|
+
* @example 'hover:focus:bg-color'
|
|
1480
|
+
* @example 'md:!pr'
|
|
1481
|
+
*/
|
|
1482
|
+
const classGroupsInConflict = [];
|
|
1483
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
1484
|
+
let result = '';
|
|
1485
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
1486
|
+
const originalClassName = classNames[index];
|
|
1487
|
+
const {
|
|
1488
|
+
isExternal,
|
|
1489
|
+
modifiers,
|
|
1490
|
+
hasImportantModifier,
|
|
1491
|
+
baseClassName,
|
|
1492
|
+
maybePostfixModifierPosition
|
|
1493
|
+
} = parseClassName(originalClassName);
|
|
1494
|
+
if (isExternal) {
|
|
1495
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
|
1499
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
1500
|
+
if (!classGroupId) {
|
|
1501
|
+
if (!hasPostfixModifier) {
|
|
1502
|
+
// Not a Tailwind class
|
|
1503
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
1504
|
+
continue;
|
|
1505
|
+
}
|
|
1506
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
1507
|
+
if (!classGroupId) {
|
|
1508
|
+
// Not a Tailwind class
|
|
1509
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
1510
|
+
continue;
|
|
1511
|
+
}
|
|
1512
|
+
hasPostfixModifier = false;
|
|
1513
|
+
}
|
|
1514
|
+
// Fast path: skip sorting for empty or single modifier
|
|
1515
|
+
const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');
|
|
1516
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
1517
|
+
const classId = modifierId + classGroupId;
|
|
1518
|
+
if (classGroupsInConflict.indexOf(classId) > -1) {
|
|
1519
|
+
// Tailwind class omitted due to conflict
|
|
1520
|
+
continue;
|
|
1521
|
+
}
|
|
1522
|
+
classGroupsInConflict.push(classId);
|
|
1523
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
1524
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
1525
|
+
const group = conflictGroups[i];
|
|
1526
|
+
classGroupsInConflict.push(modifierId + group);
|
|
1527
|
+
}
|
|
1528
|
+
// Tailwind class not in conflict
|
|
1529
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
1530
|
+
}
|
|
1531
|
+
return result;
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
|
|
1536
|
+
*
|
|
1537
|
+
* Specifically:
|
|
1538
|
+
* - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
|
|
1539
|
+
* - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
|
|
1540
|
+
*
|
|
1541
|
+
* Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
1542
|
+
*/
|
|
1543
|
+
const twJoin = (...classLists) => {
|
|
1544
|
+
let index = 0;
|
|
1545
|
+
let argument;
|
|
1546
|
+
let resolvedValue;
|
|
1547
|
+
let string = '';
|
|
1548
|
+
while (index < classLists.length) {
|
|
1549
|
+
if (argument = classLists[index++]) {
|
|
1550
|
+
if (resolvedValue = toValue(argument)) {
|
|
1551
|
+
string && (string += ' ');
|
|
1552
|
+
string += resolvedValue;
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
return string;
|
|
1557
|
+
};
|
|
1558
|
+
const toValue = mix => {
|
|
1559
|
+
// Fast path for strings
|
|
1560
|
+
if (typeof mix === 'string') {
|
|
1561
|
+
return mix;
|
|
1562
|
+
}
|
|
1563
|
+
let resolvedValue;
|
|
1564
|
+
let string = '';
|
|
1565
|
+
for (let k = 0; k < mix.length; k++) {
|
|
1566
|
+
if (mix[k]) {
|
|
1567
|
+
if (resolvedValue = toValue(mix[k])) {
|
|
1568
|
+
string && (string += ' ');
|
|
1569
|
+
string += resolvedValue;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
return string;
|
|
1574
|
+
};
|
|
1575
|
+
const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
1576
|
+
let configUtils;
|
|
1577
|
+
let cacheGet;
|
|
1578
|
+
let cacheSet;
|
|
1579
|
+
let functionToCall;
|
|
1580
|
+
const initTailwindMerge = classList => {
|
|
1581
|
+
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
1582
|
+
configUtils = createConfigUtils(config);
|
|
1583
|
+
cacheGet = configUtils.cache.get;
|
|
1584
|
+
cacheSet = configUtils.cache.set;
|
|
1585
|
+
functionToCall = tailwindMerge;
|
|
1586
|
+
return tailwindMerge(classList);
|
|
1587
|
+
};
|
|
1588
|
+
const tailwindMerge = classList => {
|
|
1589
|
+
const cachedResult = cacheGet(classList);
|
|
1590
|
+
if (cachedResult) {
|
|
1591
|
+
return cachedResult;
|
|
1592
|
+
}
|
|
1593
|
+
const result = mergeClassList(classList, configUtils);
|
|
1594
|
+
cacheSet(classList, result);
|
|
1595
|
+
return result;
|
|
1596
|
+
};
|
|
1597
|
+
functionToCall = initTailwindMerge;
|
|
1598
|
+
return (...args) => functionToCall(twJoin(...args));
|
|
1599
|
+
};
|
|
1600
|
+
const fallbackThemeArr = [];
|
|
1601
|
+
const fromTheme = key => {
|
|
1602
|
+
const themeGetter = theme => theme[key] || fallbackThemeArr;
|
|
1603
|
+
themeGetter.isThemeGetter = true;
|
|
1604
|
+
return themeGetter;
|
|
1605
|
+
};
|
|
1606
|
+
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
1607
|
+
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
1608
|
+
const fractionRegex = /^\d+\/\d+$/;
|
|
1609
|
+
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
1610
|
+
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
1611
|
+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
1612
|
+
// Shadow always begins with x and y offset separated by underscore optionally prepended by inset
|
|
1613
|
+
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
1614
|
+
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
1615
|
+
const isFraction = value => fractionRegex.test(value);
|
|
1616
|
+
const isNumber = value => !!value && !Number.isNaN(Number(value));
|
|
1617
|
+
const isInteger = value => !!value && Number.isInteger(Number(value));
|
|
1618
|
+
const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
|
|
1619
|
+
const isTshirtSize = value => tshirtUnitRegex.test(value);
|
|
1620
|
+
const isAny = () => true;
|
|
1621
|
+
const isLengthOnly = value =>
|
|
1622
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
1623
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
1624
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1625
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
|
|
1626
|
+
const isNever = () => false;
|
|
1627
|
+
const isShadow = value => shadowRegex.test(value);
|
|
1628
|
+
const isImage = value => imageRegex.test(value);
|
|
1629
|
+
const isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
|
1630
|
+
const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
1631
|
+
const isArbitraryValue = value => arbitraryValueRegex.test(value);
|
|
1632
|
+
const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
1633
|
+
const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
1634
|
+
const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
1635
|
+
const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
1636
|
+
const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
1637
|
+
const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
|
|
1638
|
+
const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
|
|
1639
|
+
const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
1640
|
+
const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);
|
|
1641
|
+
const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
|
|
1642
|
+
const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
|
|
1643
|
+
const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
|
|
1644
|
+
// Helpers
|
|
1645
|
+
const getIsArbitraryValue = (value, testLabel, testValue) => {
|
|
1646
|
+
const result = arbitraryValueRegex.exec(value);
|
|
1647
|
+
if (result) {
|
|
1648
|
+
if (result[1]) {
|
|
1649
|
+
return testLabel(result[1]);
|
|
1650
|
+
}
|
|
1651
|
+
return testValue(result[2]);
|
|
1652
|
+
}
|
|
1653
|
+
return false;
|
|
1654
|
+
};
|
|
1655
|
+
const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
|
|
1656
|
+
const result = arbitraryVariableRegex.exec(value);
|
|
1657
|
+
if (result) {
|
|
1658
|
+
if (result[1]) {
|
|
1659
|
+
return testLabel(result[1]);
|
|
1660
|
+
}
|
|
1661
|
+
return shouldMatchNoLabel;
|
|
1662
|
+
}
|
|
1663
|
+
return false;
|
|
1664
|
+
};
|
|
1665
|
+
// Labels
|
|
1666
|
+
const isLabelPosition = label => label === 'position' || label === 'percentage';
|
|
1667
|
+
const isLabelImage = label => label === 'image' || label === 'url';
|
|
1668
|
+
const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';
|
|
1669
|
+
const isLabelLength = label => label === 'length';
|
|
1670
|
+
const isLabelNumber = label => label === 'number';
|
|
1671
|
+
const isLabelFamilyName = label => label === 'family-name';
|
|
1672
|
+
const isLabelShadow = label => label === 'shadow';
|
|
1673
|
+
const getDefaultConfig = () => {
|
|
1674
|
+
/**
|
|
1675
|
+
* Theme getters for theme variable namespaces
|
|
1676
|
+
* @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
|
|
1677
|
+
*/
|
|
1678
|
+
/***/
|
|
1679
|
+
const themeColor = fromTheme('color');
|
|
1680
|
+
const themeFont = fromTheme('font');
|
|
1681
|
+
const themeText = fromTheme('text');
|
|
1682
|
+
const themeFontWeight = fromTheme('font-weight');
|
|
1683
|
+
const themeTracking = fromTheme('tracking');
|
|
1684
|
+
const themeLeading = fromTheme('leading');
|
|
1685
|
+
const themeBreakpoint = fromTheme('breakpoint');
|
|
1686
|
+
const themeContainer = fromTheme('container');
|
|
1687
|
+
const themeSpacing = fromTheme('spacing');
|
|
1688
|
+
const themeRadius = fromTheme('radius');
|
|
1689
|
+
const themeShadow = fromTheme('shadow');
|
|
1690
|
+
const themeInsetShadow = fromTheme('inset-shadow');
|
|
1691
|
+
const themeTextShadow = fromTheme('text-shadow');
|
|
1692
|
+
const themeDropShadow = fromTheme('drop-shadow');
|
|
1693
|
+
const themeBlur = fromTheme('blur');
|
|
1694
|
+
const themePerspective = fromTheme('perspective');
|
|
1695
|
+
const themeAspect = fromTheme('aspect');
|
|
1696
|
+
const themeEase = fromTheme('ease');
|
|
1697
|
+
const themeAnimate = fromTheme('animate');
|
|
1698
|
+
/**
|
|
1699
|
+
* Helpers to avoid repeating the same scales
|
|
1700
|
+
*
|
|
1701
|
+
* We use functions that create a new array every time they're called instead of static arrays.
|
|
1702
|
+
* This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
|
|
1703
|
+
*/
|
|
1704
|
+
/***/
|
|
1705
|
+
const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
|
|
1706
|
+
const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',
|
|
1707
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1708
|
+
'left-top', 'top-right',
|
|
1709
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1710
|
+
'right-top', 'bottom-right',
|
|
1711
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1712
|
+
'right-bottom', 'bottom-left',
|
|
1713
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1714
|
+
'left-bottom'];
|
|
1715
|
+
const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
|
|
1716
|
+
const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
|
|
1717
|
+
const scaleOverscroll = () => ['auto', 'contain', 'none'];
|
|
1718
|
+
const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
|
|
1719
|
+
const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];
|
|
1720
|
+
const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];
|
|
1721
|
+
const scaleGridColRowStartAndEnd = () => ['auto', {
|
|
1722
|
+
span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]
|
|
1723
|
+
}, isInteger, isArbitraryVariable, isArbitraryValue];
|
|
1724
|
+
const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
|
|
1725
|
+
const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
|
|
1726
|
+
const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];
|
|
1727
|
+
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
|
|
1728
|
+
const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
|
|
1729
|
+
const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
|
1730
|
+
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
|
|
1731
|
+
const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
|
|
1732
|
+
position: [isArbitraryVariable, isArbitraryValue]
|
|
1733
|
+
}];
|
|
1734
|
+
const scaleBgRepeat = () => ['no-repeat', {
|
|
1735
|
+
repeat: ['', 'x', 'y', 'space', 'round']
|
|
1736
|
+
}];
|
|
1737
|
+
const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {
|
|
1738
|
+
size: [isArbitraryVariable, isArbitraryValue]
|
|
1739
|
+
}];
|
|
1740
|
+
const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
|
|
1741
|
+
const scaleRadius = () => [
|
|
1742
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
1743
|
+
'', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];
|
|
1744
|
+
const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
|
|
1745
|
+
const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
|
|
1746
|
+
const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
|
|
1747
|
+
const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
|
|
1748
|
+
const scaleBlur = () => [
|
|
1749
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
1750
|
+
'', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
|
|
1751
|
+
const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
1752
|
+
const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
1753
|
+
const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
|
|
1754
|
+
const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];
|
|
1755
|
+
return {
|
|
1756
|
+
cacheSize: 500,
|
|
1757
|
+
theme: {
|
|
1758
|
+
animate: ['spin', 'ping', 'pulse', 'bounce'],
|
|
1759
|
+
aspect: ['video'],
|
|
1760
|
+
blur: [isTshirtSize],
|
|
1761
|
+
breakpoint: [isTshirtSize],
|
|
1762
|
+
color: [isAny],
|
|
1763
|
+
container: [isTshirtSize],
|
|
1764
|
+
'drop-shadow': [isTshirtSize],
|
|
1765
|
+
ease: ['in', 'out', 'in-out'],
|
|
1766
|
+
font: [isAnyNonArbitrary],
|
|
1767
|
+
'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],
|
|
1768
|
+
'inset-shadow': [isTshirtSize],
|
|
1769
|
+
leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],
|
|
1770
|
+
perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],
|
|
1771
|
+
radius: [isTshirtSize],
|
|
1772
|
+
shadow: [isTshirtSize],
|
|
1773
|
+
spacing: ['px', isNumber],
|
|
1774
|
+
text: [isTshirtSize],
|
|
1775
|
+
'text-shadow': [isTshirtSize],
|
|
1776
|
+
tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
|
|
1777
|
+
},
|
|
1778
|
+
classGroups: {
|
|
1779
|
+
// --------------
|
|
1780
|
+
// --- Layout ---
|
|
1781
|
+
// --------------
|
|
1782
|
+
/**
|
|
1783
|
+
* Aspect Ratio
|
|
1784
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
1785
|
+
*/
|
|
1786
|
+
aspect: [{
|
|
1787
|
+
aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
|
|
1788
|
+
}],
|
|
1789
|
+
/**
|
|
1790
|
+
* Container
|
|
1791
|
+
* @see https://tailwindcss.com/docs/container
|
|
1792
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
1793
|
+
*/
|
|
1794
|
+
container: ['container'],
|
|
1795
|
+
/**
|
|
1796
|
+
* Columns
|
|
1797
|
+
* @see https://tailwindcss.com/docs/columns
|
|
1798
|
+
*/
|
|
1799
|
+
columns: [{
|
|
1800
|
+
columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
|
|
1801
|
+
}],
|
|
1802
|
+
/**
|
|
1803
|
+
* Break After
|
|
1804
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
1805
|
+
*/
|
|
1806
|
+
'break-after': [{
|
|
1807
|
+
'break-after': scaleBreak()
|
|
1808
|
+
}],
|
|
1809
|
+
/**
|
|
1810
|
+
* Break Before
|
|
1811
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
1812
|
+
*/
|
|
1813
|
+
'break-before': [{
|
|
1814
|
+
'break-before': scaleBreak()
|
|
1815
|
+
}],
|
|
1816
|
+
/**
|
|
1817
|
+
* Break Inside
|
|
1818
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
1819
|
+
*/
|
|
1820
|
+
'break-inside': [{
|
|
1821
|
+
'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']
|
|
1822
|
+
}],
|
|
1823
|
+
/**
|
|
1824
|
+
* Box Decoration Break
|
|
1825
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
1826
|
+
*/
|
|
1827
|
+
'box-decoration': [{
|
|
1828
|
+
'box-decoration': ['slice', 'clone']
|
|
1829
|
+
}],
|
|
1830
|
+
/**
|
|
1831
|
+
* Box Sizing
|
|
1832
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
1833
|
+
*/
|
|
1834
|
+
box: [{
|
|
1835
|
+
box: ['border', 'content']
|
|
1836
|
+
}],
|
|
1837
|
+
/**
|
|
1838
|
+
* Display
|
|
1839
|
+
* @see https://tailwindcss.com/docs/display
|
|
1840
|
+
*/
|
|
1841
|
+
display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],
|
|
1842
|
+
/**
|
|
1843
|
+
* Screen Reader Only
|
|
1844
|
+
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
1845
|
+
*/
|
|
1846
|
+
sr: ['sr-only', 'not-sr-only'],
|
|
1847
|
+
/**
|
|
1848
|
+
* Floats
|
|
1849
|
+
* @see https://tailwindcss.com/docs/float
|
|
1850
|
+
*/
|
|
1851
|
+
float: [{
|
|
1852
|
+
float: ['right', 'left', 'none', 'start', 'end']
|
|
1853
|
+
}],
|
|
1854
|
+
/**
|
|
1855
|
+
* Clear
|
|
1856
|
+
* @see https://tailwindcss.com/docs/clear
|
|
1857
|
+
*/
|
|
1858
|
+
clear: [{
|
|
1859
|
+
clear: ['left', 'right', 'both', 'none', 'start', 'end']
|
|
1860
|
+
}],
|
|
1861
|
+
/**
|
|
1862
|
+
* Isolation
|
|
1863
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
1864
|
+
*/
|
|
1865
|
+
isolation: ['isolate', 'isolation-auto'],
|
|
1866
|
+
/**
|
|
1867
|
+
* Object Fit
|
|
1868
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
1869
|
+
*/
|
|
1870
|
+
'object-fit': [{
|
|
1871
|
+
object: ['contain', 'cover', 'fill', 'none', 'scale-down']
|
|
1872
|
+
}],
|
|
1873
|
+
/**
|
|
1874
|
+
* Object Position
|
|
1875
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
1876
|
+
*/
|
|
1877
|
+
'object-position': [{
|
|
1878
|
+
object: scalePositionWithArbitrary()
|
|
1879
|
+
}],
|
|
1880
|
+
/**
|
|
1881
|
+
* Overflow
|
|
1882
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1883
|
+
*/
|
|
1884
|
+
overflow: [{
|
|
1885
|
+
overflow: scaleOverflow()
|
|
1886
|
+
}],
|
|
1887
|
+
/**
|
|
1888
|
+
* Overflow X
|
|
1889
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1890
|
+
*/
|
|
1891
|
+
'overflow-x': [{
|
|
1892
|
+
'overflow-x': scaleOverflow()
|
|
1893
|
+
}],
|
|
1894
|
+
/**
|
|
1895
|
+
* Overflow Y
|
|
1896
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1897
|
+
*/
|
|
1898
|
+
'overflow-y': [{
|
|
1899
|
+
'overflow-y': scaleOverflow()
|
|
1900
|
+
}],
|
|
1901
|
+
/**
|
|
1902
|
+
* Overscroll Behavior
|
|
1903
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1904
|
+
*/
|
|
1905
|
+
overscroll: [{
|
|
1906
|
+
overscroll: scaleOverscroll()
|
|
1907
|
+
}],
|
|
1908
|
+
/**
|
|
1909
|
+
* Overscroll Behavior X
|
|
1910
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1911
|
+
*/
|
|
1912
|
+
'overscroll-x': [{
|
|
1913
|
+
'overscroll-x': scaleOverscroll()
|
|
1914
|
+
}],
|
|
1915
|
+
/**
|
|
1916
|
+
* Overscroll Behavior Y
|
|
1917
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1918
|
+
*/
|
|
1919
|
+
'overscroll-y': [{
|
|
1920
|
+
'overscroll-y': scaleOverscroll()
|
|
1921
|
+
}],
|
|
1922
|
+
/**
|
|
1923
|
+
* Position
|
|
1924
|
+
* @see https://tailwindcss.com/docs/position
|
|
1925
|
+
*/
|
|
1926
|
+
position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
|
|
1927
|
+
/**
|
|
1928
|
+
* Top / Right / Bottom / Left
|
|
1929
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1930
|
+
*/
|
|
1931
|
+
inset: [{
|
|
1932
|
+
inset: scaleInset()
|
|
1933
|
+
}],
|
|
1934
|
+
/**
|
|
1935
|
+
* Right / Left
|
|
1936
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1937
|
+
*/
|
|
1938
|
+
'inset-x': [{
|
|
1939
|
+
'inset-x': scaleInset()
|
|
1940
|
+
}],
|
|
1941
|
+
/**
|
|
1942
|
+
* Top / Bottom
|
|
1943
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1944
|
+
*/
|
|
1945
|
+
'inset-y': [{
|
|
1946
|
+
'inset-y': scaleInset()
|
|
1947
|
+
}],
|
|
1948
|
+
/**
|
|
1949
|
+
* Start
|
|
1950
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1951
|
+
*/
|
|
1952
|
+
start: [{
|
|
1953
|
+
start: scaleInset()
|
|
1954
|
+
}],
|
|
1955
|
+
/**
|
|
1956
|
+
* End
|
|
1957
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1958
|
+
*/
|
|
1959
|
+
end: [{
|
|
1960
|
+
end: scaleInset()
|
|
1961
|
+
}],
|
|
1962
|
+
/**
|
|
1963
|
+
* Top
|
|
1964
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1965
|
+
*/
|
|
1966
|
+
top: [{
|
|
1967
|
+
top: scaleInset()
|
|
1968
|
+
}],
|
|
1969
|
+
/**
|
|
1970
|
+
* Right
|
|
1971
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1972
|
+
*/
|
|
1973
|
+
right: [{
|
|
1974
|
+
right: scaleInset()
|
|
1975
|
+
}],
|
|
1976
|
+
/**
|
|
1977
|
+
* Bottom
|
|
1978
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1979
|
+
*/
|
|
1980
|
+
bottom: [{
|
|
1981
|
+
bottom: scaleInset()
|
|
1982
|
+
}],
|
|
1983
|
+
/**
|
|
1984
|
+
* Left
|
|
1985
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1986
|
+
*/
|
|
1987
|
+
left: [{
|
|
1988
|
+
left: scaleInset()
|
|
1989
|
+
}],
|
|
1990
|
+
/**
|
|
1991
|
+
* Visibility
|
|
1992
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
1993
|
+
*/
|
|
1994
|
+
visibility: ['visible', 'invisible', 'collapse'],
|
|
1995
|
+
/**
|
|
1996
|
+
* Z-Index
|
|
1997
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
1998
|
+
*/
|
|
1999
|
+
z: [{
|
|
2000
|
+
z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]
|
|
2001
|
+
}],
|
|
2002
|
+
// ------------------------
|
|
2003
|
+
// --- Flexbox and Grid ---
|
|
2004
|
+
// ------------------------
|
|
2005
|
+
/**
|
|
2006
|
+
* Flex Basis
|
|
2007
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
2008
|
+
*/
|
|
2009
|
+
basis: [{
|
|
2010
|
+
basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]
|
|
2011
|
+
}],
|
|
2012
|
+
/**
|
|
2013
|
+
* Flex Direction
|
|
2014
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
2015
|
+
*/
|
|
2016
|
+
'flex-direction': [{
|
|
2017
|
+
flex: ['row', 'row-reverse', 'col', 'col-reverse']
|
|
2018
|
+
}],
|
|
2019
|
+
/**
|
|
2020
|
+
* Flex Wrap
|
|
2021
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
2022
|
+
*/
|
|
2023
|
+
'flex-wrap': [{
|
|
2024
|
+
flex: ['nowrap', 'wrap', 'wrap-reverse']
|
|
2025
|
+
}],
|
|
2026
|
+
/**
|
|
2027
|
+
* Flex
|
|
2028
|
+
* @see https://tailwindcss.com/docs/flex
|
|
2029
|
+
*/
|
|
2030
|
+
flex: [{
|
|
2031
|
+
flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]
|
|
2032
|
+
}],
|
|
2033
|
+
/**
|
|
2034
|
+
* Flex Grow
|
|
2035
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
2036
|
+
*/
|
|
2037
|
+
grow: [{
|
|
2038
|
+
grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2039
|
+
}],
|
|
2040
|
+
/**
|
|
2041
|
+
* Flex Shrink
|
|
2042
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2043
|
+
*/
|
|
2044
|
+
shrink: [{
|
|
2045
|
+
shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2046
|
+
}],
|
|
2047
|
+
/**
|
|
2048
|
+
* Order
|
|
2049
|
+
* @see https://tailwindcss.com/docs/order
|
|
2050
|
+
*/
|
|
2051
|
+
order: [{
|
|
2052
|
+
order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]
|
|
2053
|
+
}],
|
|
2054
|
+
/**
|
|
2055
|
+
* Grid Template Columns
|
|
2056
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
2057
|
+
*/
|
|
2058
|
+
'grid-cols': [{
|
|
2059
|
+
'grid-cols': scaleGridTemplateColsRows()
|
|
2060
|
+
}],
|
|
2061
|
+
/**
|
|
2062
|
+
* Grid Column Start / End
|
|
2063
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2064
|
+
*/
|
|
2065
|
+
'col-start-end': [{
|
|
2066
|
+
col: scaleGridColRowStartAndEnd()
|
|
2067
|
+
}],
|
|
2068
|
+
/**
|
|
2069
|
+
* Grid Column Start
|
|
2070
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2071
|
+
*/
|
|
2072
|
+
'col-start': [{
|
|
2073
|
+
'col-start': scaleGridColRowStartOrEnd()
|
|
2074
|
+
}],
|
|
2075
|
+
/**
|
|
2076
|
+
* Grid Column End
|
|
2077
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2078
|
+
*/
|
|
2079
|
+
'col-end': [{
|
|
2080
|
+
'col-end': scaleGridColRowStartOrEnd()
|
|
2081
|
+
}],
|
|
2082
|
+
/**
|
|
2083
|
+
* Grid Template Rows
|
|
2084
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
2085
|
+
*/
|
|
2086
|
+
'grid-rows': [{
|
|
2087
|
+
'grid-rows': scaleGridTemplateColsRows()
|
|
2088
|
+
}],
|
|
2089
|
+
/**
|
|
2090
|
+
* Grid Row Start / End
|
|
2091
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2092
|
+
*/
|
|
2093
|
+
'row-start-end': [{
|
|
2094
|
+
row: scaleGridColRowStartAndEnd()
|
|
2095
|
+
}],
|
|
2096
|
+
/**
|
|
2097
|
+
* Grid Row Start
|
|
2098
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2099
|
+
*/
|
|
2100
|
+
'row-start': [{
|
|
2101
|
+
'row-start': scaleGridColRowStartOrEnd()
|
|
2102
|
+
}],
|
|
2103
|
+
/**
|
|
2104
|
+
* Grid Row End
|
|
2105
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2106
|
+
*/
|
|
2107
|
+
'row-end': [{
|
|
2108
|
+
'row-end': scaleGridColRowStartOrEnd()
|
|
2109
|
+
}],
|
|
2110
|
+
/**
|
|
2111
|
+
* Grid Auto Flow
|
|
2112
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
2113
|
+
*/
|
|
2114
|
+
'grid-flow': [{
|
|
2115
|
+
'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']
|
|
2116
|
+
}],
|
|
2117
|
+
/**
|
|
2118
|
+
* Grid Auto Columns
|
|
2119
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2120
|
+
*/
|
|
2121
|
+
'auto-cols': [{
|
|
2122
|
+
'auto-cols': scaleGridAutoColsRows()
|
|
2123
|
+
}],
|
|
2124
|
+
/**
|
|
2125
|
+
* Grid Auto Rows
|
|
2126
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2127
|
+
*/
|
|
2128
|
+
'auto-rows': [{
|
|
2129
|
+
'auto-rows': scaleGridAutoColsRows()
|
|
2130
|
+
}],
|
|
2131
|
+
/**
|
|
2132
|
+
* Gap
|
|
2133
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2134
|
+
*/
|
|
2135
|
+
gap: [{
|
|
2136
|
+
gap: scaleUnambiguousSpacing()
|
|
2137
|
+
}],
|
|
2138
|
+
/**
|
|
2139
|
+
* Gap X
|
|
2140
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2141
|
+
*/
|
|
2142
|
+
'gap-x': [{
|
|
2143
|
+
'gap-x': scaleUnambiguousSpacing()
|
|
2144
|
+
}],
|
|
2145
|
+
/**
|
|
2146
|
+
* Gap Y
|
|
2147
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2148
|
+
*/
|
|
2149
|
+
'gap-y': [{
|
|
2150
|
+
'gap-y': scaleUnambiguousSpacing()
|
|
2151
|
+
}],
|
|
2152
|
+
/**
|
|
2153
|
+
* Justify Content
|
|
2154
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
2155
|
+
*/
|
|
2156
|
+
'justify-content': [{
|
|
2157
|
+
justify: [...scaleAlignPrimaryAxis(), 'normal']
|
|
2158
|
+
}],
|
|
2159
|
+
/**
|
|
2160
|
+
* Justify Items
|
|
2161
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
2162
|
+
*/
|
|
2163
|
+
'justify-items': [{
|
|
2164
|
+
'justify-items': [...scaleAlignSecondaryAxis(), 'normal']
|
|
2165
|
+
}],
|
|
2166
|
+
/**
|
|
2167
|
+
* Justify Self
|
|
2168
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
2169
|
+
*/
|
|
2170
|
+
'justify-self': [{
|
|
2171
|
+
'justify-self': ['auto', ...scaleAlignSecondaryAxis()]
|
|
2172
|
+
}],
|
|
2173
|
+
/**
|
|
2174
|
+
* Align Content
|
|
2175
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
2176
|
+
*/
|
|
2177
|
+
'align-content': [{
|
|
2178
|
+
content: ['normal', ...scaleAlignPrimaryAxis()]
|
|
2179
|
+
}],
|
|
2180
|
+
/**
|
|
2181
|
+
* Align Items
|
|
2182
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
2183
|
+
*/
|
|
2184
|
+
'align-items': [{
|
|
2185
|
+
items: [...scaleAlignSecondaryAxis(), {
|
|
2186
|
+
baseline: ['', 'last']
|
|
2187
|
+
}]
|
|
2188
|
+
}],
|
|
2189
|
+
/**
|
|
2190
|
+
* Align Self
|
|
2191
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
2192
|
+
*/
|
|
2193
|
+
'align-self': [{
|
|
2194
|
+
self: ['auto', ...scaleAlignSecondaryAxis(), {
|
|
2195
|
+
baseline: ['', 'last']
|
|
2196
|
+
}]
|
|
2197
|
+
}],
|
|
2198
|
+
/**
|
|
2199
|
+
* Place Content
|
|
2200
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
2201
|
+
*/
|
|
2202
|
+
'place-content': [{
|
|
2203
|
+
'place-content': scaleAlignPrimaryAxis()
|
|
2204
|
+
}],
|
|
2205
|
+
/**
|
|
2206
|
+
* Place Items
|
|
2207
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
2208
|
+
*/
|
|
2209
|
+
'place-items': [{
|
|
2210
|
+
'place-items': [...scaleAlignSecondaryAxis(), 'baseline']
|
|
2211
|
+
}],
|
|
2212
|
+
/**
|
|
2213
|
+
* Place Self
|
|
2214
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
2215
|
+
*/
|
|
2216
|
+
'place-self': [{
|
|
2217
|
+
'place-self': ['auto', ...scaleAlignSecondaryAxis()]
|
|
2218
|
+
}],
|
|
2219
|
+
// Spacing
|
|
2220
|
+
/**
|
|
2221
|
+
* Padding
|
|
2222
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2223
|
+
*/
|
|
2224
|
+
p: [{
|
|
2225
|
+
p: scaleUnambiguousSpacing()
|
|
2226
|
+
}],
|
|
2227
|
+
/**
|
|
2228
|
+
* Padding X
|
|
2229
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2230
|
+
*/
|
|
2231
|
+
px: [{
|
|
2232
|
+
px: scaleUnambiguousSpacing()
|
|
2233
|
+
}],
|
|
2234
|
+
/**
|
|
2235
|
+
* Padding Y
|
|
2236
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2237
|
+
*/
|
|
2238
|
+
py: [{
|
|
2239
|
+
py: scaleUnambiguousSpacing()
|
|
2240
|
+
}],
|
|
2241
|
+
/**
|
|
2242
|
+
* Padding Start
|
|
2243
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2244
|
+
*/
|
|
2245
|
+
ps: [{
|
|
2246
|
+
ps: scaleUnambiguousSpacing()
|
|
2247
|
+
}],
|
|
2248
|
+
/**
|
|
2249
|
+
* Padding End
|
|
2250
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2251
|
+
*/
|
|
2252
|
+
pe: [{
|
|
2253
|
+
pe: scaleUnambiguousSpacing()
|
|
2254
|
+
}],
|
|
2255
|
+
/**
|
|
2256
|
+
* Padding Top
|
|
2257
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2258
|
+
*/
|
|
2259
|
+
pt: [{
|
|
2260
|
+
pt: scaleUnambiguousSpacing()
|
|
2261
|
+
}],
|
|
2262
|
+
/**
|
|
2263
|
+
* Padding Right
|
|
2264
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2265
|
+
*/
|
|
2266
|
+
pr: [{
|
|
2267
|
+
pr: scaleUnambiguousSpacing()
|
|
2268
|
+
}],
|
|
2269
|
+
/**
|
|
2270
|
+
* Padding Bottom
|
|
2271
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2272
|
+
*/
|
|
2273
|
+
pb: [{
|
|
2274
|
+
pb: scaleUnambiguousSpacing()
|
|
2275
|
+
}],
|
|
2276
|
+
/**
|
|
2277
|
+
* Padding Left
|
|
2278
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2279
|
+
*/
|
|
2280
|
+
pl: [{
|
|
2281
|
+
pl: scaleUnambiguousSpacing()
|
|
2282
|
+
}],
|
|
2283
|
+
/**
|
|
2284
|
+
* Margin
|
|
2285
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2286
|
+
*/
|
|
2287
|
+
m: [{
|
|
2288
|
+
m: scaleMargin()
|
|
2289
|
+
}],
|
|
2290
|
+
/**
|
|
2291
|
+
* Margin X
|
|
2292
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2293
|
+
*/
|
|
2294
|
+
mx: [{
|
|
2295
|
+
mx: scaleMargin()
|
|
2296
|
+
}],
|
|
2297
|
+
/**
|
|
2298
|
+
* Margin Y
|
|
2299
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2300
|
+
*/
|
|
2301
|
+
my: [{
|
|
2302
|
+
my: scaleMargin()
|
|
2303
|
+
}],
|
|
2304
|
+
/**
|
|
2305
|
+
* Margin Start
|
|
2306
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2307
|
+
*/
|
|
2308
|
+
ms: [{
|
|
2309
|
+
ms: scaleMargin()
|
|
2310
|
+
}],
|
|
2311
|
+
/**
|
|
2312
|
+
* Margin End
|
|
2313
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2314
|
+
*/
|
|
2315
|
+
me: [{
|
|
2316
|
+
me: scaleMargin()
|
|
2317
|
+
}],
|
|
2318
|
+
/**
|
|
2319
|
+
* Margin Top
|
|
2320
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2321
|
+
*/
|
|
2322
|
+
mt: [{
|
|
2323
|
+
mt: scaleMargin()
|
|
2324
|
+
}],
|
|
2325
|
+
/**
|
|
2326
|
+
* Margin Right
|
|
2327
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2328
|
+
*/
|
|
2329
|
+
mr: [{
|
|
2330
|
+
mr: scaleMargin()
|
|
2331
|
+
}],
|
|
2332
|
+
/**
|
|
2333
|
+
* Margin Bottom
|
|
2334
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2335
|
+
*/
|
|
2336
|
+
mb: [{
|
|
2337
|
+
mb: scaleMargin()
|
|
2338
|
+
}],
|
|
2339
|
+
/**
|
|
2340
|
+
* Margin Left
|
|
2341
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2342
|
+
*/
|
|
2343
|
+
ml: [{
|
|
2344
|
+
ml: scaleMargin()
|
|
2345
|
+
}],
|
|
2346
|
+
/**
|
|
2347
|
+
* Space Between X
|
|
2348
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2349
|
+
*/
|
|
2350
|
+
'space-x': [{
|
|
2351
|
+
'space-x': scaleUnambiguousSpacing()
|
|
2352
|
+
}],
|
|
2353
|
+
/**
|
|
2354
|
+
* Space Between X Reverse
|
|
2355
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2356
|
+
*/
|
|
2357
|
+
'space-x-reverse': ['space-x-reverse'],
|
|
2358
|
+
/**
|
|
2359
|
+
* Space Between Y
|
|
2360
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2361
|
+
*/
|
|
2362
|
+
'space-y': [{
|
|
2363
|
+
'space-y': scaleUnambiguousSpacing()
|
|
2364
|
+
}],
|
|
2365
|
+
/**
|
|
2366
|
+
* Space Between Y Reverse
|
|
2367
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2368
|
+
*/
|
|
2369
|
+
'space-y-reverse': ['space-y-reverse'],
|
|
2370
|
+
// --------------
|
|
2371
|
+
// --- Sizing ---
|
|
2372
|
+
// --------------
|
|
2373
|
+
/**
|
|
2374
|
+
* Size
|
|
2375
|
+
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
2376
|
+
*/
|
|
2377
|
+
size: [{
|
|
2378
|
+
size: scaleSizing()
|
|
2379
|
+
}],
|
|
2380
|
+
/**
|
|
2381
|
+
* Width
|
|
2382
|
+
* @see https://tailwindcss.com/docs/width
|
|
2383
|
+
*/
|
|
2384
|
+
w: [{
|
|
2385
|
+
w: [themeContainer, 'screen', ...scaleSizing()]
|
|
2386
|
+
}],
|
|
2387
|
+
/**
|
|
2388
|
+
* Min-Width
|
|
2389
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
2390
|
+
*/
|
|
2391
|
+
'min-w': [{
|
|
2392
|
+
'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
2393
|
+
'none', ...scaleSizing()]
|
|
2394
|
+
}],
|
|
2395
|
+
/**
|
|
2396
|
+
* Max-Width
|
|
2397
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
2398
|
+
*/
|
|
2399
|
+
'max-w': [{
|
|
2400
|
+
'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
2401
|
+
'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
2402
|
+
{
|
|
2403
|
+
screen: [themeBreakpoint]
|
|
2404
|
+
}, ...scaleSizing()]
|
|
2405
|
+
}],
|
|
2406
|
+
/**
|
|
2407
|
+
* Height
|
|
2408
|
+
* @see https://tailwindcss.com/docs/height
|
|
2409
|
+
*/
|
|
2410
|
+
h: [{
|
|
2411
|
+
h: ['screen', 'lh', ...scaleSizing()]
|
|
2412
|
+
}],
|
|
2413
|
+
/**
|
|
2414
|
+
* Min-Height
|
|
2415
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
2416
|
+
*/
|
|
2417
|
+
'min-h': [{
|
|
2418
|
+
'min-h': ['screen', 'lh', 'none', ...scaleSizing()]
|
|
2419
|
+
}],
|
|
2420
|
+
/**
|
|
2421
|
+
* Max-Height
|
|
2422
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
2423
|
+
*/
|
|
2424
|
+
'max-h': [{
|
|
2425
|
+
'max-h': ['screen', 'lh', ...scaleSizing()]
|
|
2426
|
+
}],
|
|
2427
|
+
// ------------------
|
|
2428
|
+
// --- Typography ---
|
|
2429
|
+
// ------------------
|
|
2430
|
+
/**
|
|
2431
|
+
* Font Size
|
|
2432
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
2433
|
+
*/
|
|
2434
|
+
'font-size': [{
|
|
2435
|
+
text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]
|
|
2436
|
+
}],
|
|
2437
|
+
/**
|
|
2438
|
+
* Font Smoothing
|
|
2439
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
2440
|
+
*/
|
|
2441
|
+
'font-smoothing': ['antialiased', 'subpixel-antialiased'],
|
|
2442
|
+
/**
|
|
2443
|
+
* Font Style
|
|
2444
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
2445
|
+
*/
|
|
2446
|
+
'font-style': ['italic', 'not-italic'],
|
|
2447
|
+
/**
|
|
2448
|
+
* Font Weight
|
|
2449
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
2450
|
+
*/
|
|
2451
|
+
'font-weight': [{
|
|
2452
|
+
font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
|
|
2453
|
+
}],
|
|
2454
|
+
/**
|
|
2455
|
+
* Font Stretch
|
|
2456
|
+
* @see https://tailwindcss.com/docs/font-stretch
|
|
2457
|
+
*/
|
|
2458
|
+
'font-stretch': [{
|
|
2459
|
+
'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]
|
|
2460
|
+
}],
|
|
2461
|
+
/**
|
|
2462
|
+
* Font Family
|
|
2463
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
2464
|
+
*/
|
|
2465
|
+
'font-family': [{
|
|
2466
|
+
font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
|
|
2467
|
+
}],
|
|
2468
|
+
/**
|
|
2469
|
+
* Font Variant Numeric
|
|
2470
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2471
|
+
*/
|
|
2472
|
+
'fvn-normal': ['normal-nums'],
|
|
2473
|
+
/**
|
|
2474
|
+
* Font Variant Numeric
|
|
2475
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2476
|
+
*/
|
|
2477
|
+
'fvn-ordinal': ['ordinal'],
|
|
2478
|
+
/**
|
|
2479
|
+
* Font Variant Numeric
|
|
2480
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2481
|
+
*/
|
|
2482
|
+
'fvn-slashed-zero': ['slashed-zero'],
|
|
2483
|
+
/**
|
|
2484
|
+
* Font Variant Numeric
|
|
2485
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2486
|
+
*/
|
|
2487
|
+
'fvn-figure': ['lining-nums', 'oldstyle-nums'],
|
|
2488
|
+
/**
|
|
2489
|
+
* Font Variant Numeric
|
|
2490
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2491
|
+
*/
|
|
2492
|
+
'fvn-spacing': ['proportional-nums', 'tabular-nums'],
|
|
2493
|
+
/**
|
|
2494
|
+
* Font Variant Numeric
|
|
2495
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2496
|
+
*/
|
|
2497
|
+
'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],
|
|
2498
|
+
/**
|
|
2499
|
+
* Letter Spacing
|
|
2500
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
2501
|
+
*/
|
|
2502
|
+
tracking: [{
|
|
2503
|
+
tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
|
|
2504
|
+
}],
|
|
2505
|
+
/**
|
|
2506
|
+
* Line Clamp
|
|
2507
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
2508
|
+
*/
|
|
2509
|
+
'line-clamp': [{
|
|
2510
|
+
'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]
|
|
2511
|
+
}],
|
|
2512
|
+
/**
|
|
2513
|
+
* Line Height
|
|
2514
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
2515
|
+
*/
|
|
2516
|
+
leading: [{
|
|
2517
|
+
leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
2518
|
+
themeLeading, ...scaleUnambiguousSpacing()]
|
|
2519
|
+
}],
|
|
2520
|
+
/**
|
|
2521
|
+
* List Style Image
|
|
2522
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
2523
|
+
*/
|
|
2524
|
+
'list-image': [{
|
|
2525
|
+
'list-image': ['none', isArbitraryVariable, isArbitraryValue]
|
|
2526
|
+
}],
|
|
2527
|
+
/**
|
|
2528
|
+
* List Style Position
|
|
2529
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
2530
|
+
*/
|
|
2531
|
+
'list-style-position': [{
|
|
2532
|
+
list: ['inside', 'outside']
|
|
2533
|
+
}],
|
|
2534
|
+
/**
|
|
2535
|
+
* List Style Type
|
|
2536
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
2537
|
+
*/
|
|
2538
|
+
'list-style-type': [{
|
|
2539
|
+
list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]
|
|
2540
|
+
}],
|
|
2541
|
+
/**
|
|
2542
|
+
* Text Alignment
|
|
2543
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
2544
|
+
*/
|
|
2545
|
+
'text-alignment': [{
|
|
2546
|
+
text: ['left', 'center', 'right', 'justify', 'start', 'end']
|
|
2547
|
+
}],
|
|
2548
|
+
/**
|
|
2549
|
+
* Placeholder Color
|
|
2550
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
2551
|
+
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
2552
|
+
*/
|
|
2553
|
+
'placeholder-color': [{
|
|
2554
|
+
placeholder: scaleColor()
|
|
2555
|
+
}],
|
|
2556
|
+
/**
|
|
2557
|
+
* Text Color
|
|
2558
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
2559
|
+
*/
|
|
2560
|
+
'text-color': [{
|
|
2561
|
+
text: scaleColor()
|
|
2562
|
+
}],
|
|
2563
|
+
/**
|
|
2564
|
+
* Text Decoration
|
|
2565
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
2566
|
+
*/
|
|
2567
|
+
'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],
|
|
2568
|
+
/**
|
|
2569
|
+
* Text Decoration Style
|
|
2570
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
2571
|
+
*/
|
|
2572
|
+
'text-decoration-style': [{
|
|
2573
|
+
decoration: [...scaleLineStyle(), 'wavy']
|
|
2574
|
+
}],
|
|
2575
|
+
/**
|
|
2576
|
+
* Text Decoration Thickness
|
|
2577
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
2578
|
+
*/
|
|
2579
|
+
'text-decoration-thickness': [{
|
|
2580
|
+
decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]
|
|
2581
|
+
}],
|
|
2582
|
+
/**
|
|
2583
|
+
* Text Decoration Color
|
|
2584
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
2585
|
+
*/
|
|
2586
|
+
'text-decoration-color': [{
|
|
2587
|
+
decoration: scaleColor()
|
|
2588
|
+
}],
|
|
2589
|
+
/**
|
|
2590
|
+
* Text Underline Offset
|
|
2591
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
2592
|
+
*/
|
|
2593
|
+
'underline-offset': [{
|
|
2594
|
+
'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]
|
|
2595
|
+
}],
|
|
2596
|
+
/**
|
|
2597
|
+
* Text Transform
|
|
2598
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
2599
|
+
*/
|
|
2600
|
+
'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
|
|
2601
|
+
/**
|
|
2602
|
+
* Text Overflow
|
|
2603
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
2604
|
+
*/
|
|
2605
|
+
'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
|
|
2606
|
+
/**
|
|
2607
|
+
* Text Wrap
|
|
2608
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
2609
|
+
*/
|
|
2610
|
+
'text-wrap': [{
|
|
2611
|
+
text: ['wrap', 'nowrap', 'balance', 'pretty']
|
|
2612
|
+
}],
|
|
2613
|
+
/**
|
|
2614
|
+
* Text Indent
|
|
2615
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
2616
|
+
*/
|
|
2617
|
+
indent: [{
|
|
2618
|
+
indent: scaleUnambiguousSpacing()
|
|
2619
|
+
}],
|
|
2620
|
+
/**
|
|
2621
|
+
* Vertical Alignment
|
|
2622
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
2623
|
+
*/
|
|
2624
|
+
'vertical-align': [{
|
|
2625
|
+
align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]
|
|
2626
|
+
}],
|
|
2627
|
+
/**
|
|
2628
|
+
* Whitespace
|
|
2629
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
2630
|
+
*/
|
|
2631
|
+
whitespace: [{
|
|
2632
|
+
whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']
|
|
2633
|
+
}],
|
|
2634
|
+
/**
|
|
2635
|
+
* Word Break
|
|
2636
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
2637
|
+
*/
|
|
2638
|
+
break: [{
|
|
2639
|
+
break: ['normal', 'words', 'all', 'keep']
|
|
2640
|
+
}],
|
|
2641
|
+
/**
|
|
2642
|
+
* Overflow Wrap
|
|
2643
|
+
* @see https://tailwindcss.com/docs/overflow-wrap
|
|
2644
|
+
*/
|
|
2645
|
+
wrap: [{
|
|
2646
|
+
wrap: ['break-word', 'anywhere', 'normal']
|
|
2647
|
+
}],
|
|
2648
|
+
/**
|
|
2649
|
+
* Hyphens
|
|
2650
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
2651
|
+
*/
|
|
2652
|
+
hyphens: [{
|
|
2653
|
+
hyphens: ['none', 'manual', 'auto']
|
|
2654
|
+
}],
|
|
2655
|
+
/**
|
|
2656
|
+
* Content
|
|
2657
|
+
* @see https://tailwindcss.com/docs/content
|
|
2658
|
+
*/
|
|
2659
|
+
content: [{
|
|
2660
|
+
content: ['none', isArbitraryVariable, isArbitraryValue]
|
|
2661
|
+
}],
|
|
2662
|
+
// -------------------
|
|
2663
|
+
// --- Backgrounds ---
|
|
2664
|
+
// -------------------
|
|
2665
|
+
/**
|
|
2666
|
+
* Background Attachment
|
|
2667
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
2668
|
+
*/
|
|
2669
|
+
'bg-attachment': [{
|
|
2670
|
+
bg: ['fixed', 'local', 'scroll']
|
|
2671
|
+
}],
|
|
2672
|
+
/**
|
|
2673
|
+
* Background Clip
|
|
2674
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
2675
|
+
*/
|
|
2676
|
+
'bg-clip': [{
|
|
2677
|
+
'bg-clip': ['border', 'padding', 'content', 'text']
|
|
2678
|
+
}],
|
|
2679
|
+
/**
|
|
2680
|
+
* Background Origin
|
|
2681
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
2682
|
+
*/
|
|
2683
|
+
'bg-origin': [{
|
|
2684
|
+
'bg-origin': ['border', 'padding', 'content']
|
|
2685
|
+
}],
|
|
2686
|
+
/**
|
|
2687
|
+
* Background Position
|
|
2688
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
2689
|
+
*/
|
|
2690
|
+
'bg-position': [{
|
|
2691
|
+
bg: scaleBgPosition()
|
|
2692
|
+
}],
|
|
2693
|
+
/**
|
|
2694
|
+
* Background Repeat
|
|
2695
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
2696
|
+
*/
|
|
2697
|
+
'bg-repeat': [{
|
|
2698
|
+
bg: scaleBgRepeat()
|
|
2699
|
+
}],
|
|
2700
|
+
/**
|
|
2701
|
+
* Background Size
|
|
2702
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
2703
|
+
*/
|
|
2704
|
+
'bg-size': [{
|
|
2705
|
+
bg: scaleBgSize()
|
|
2706
|
+
}],
|
|
2707
|
+
/**
|
|
2708
|
+
* Background Image
|
|
2709
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
2710
|
+
*/
|
|
2711
|
+
'bg-image': [{
|
|
2712
|
+
bg: ['none', {
|
|
2713
|
+
linear: [{
|
|
2714
|
+
to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
|
|
2715
|
+
}, isInteger, isArbitraryVariable, isArbitraryValue],
|
|
2716
|
+
radial: ['', isArbitraryVariable, isArbitraryValue],
|
|
2717
|
+
conic: [isInteger, isArbitraryVariable, isArbitraryValue]
|
|
2718
|
+
}, isArbitraryVariableImage, isArbitraryImage]
|
|
2719
|
+
}],
|
|
2720
|
+
/**
|
|
2721
|
+
* Background Color
|
|
2722
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
2723
|
+
*/
|
|
2724
|
+
'bg-color': [{
|
|
2725
|
+
bg: scaleColor()
|
|
2726
|
+
}],
|
|
2727
|
+
/**
|
|
2728
|
+
* Gradient Color Stops From Position
|
|
2729
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2730
|
+
*/
|
|
2731
|
+
'gradient-from-pos': [{
|
|
2732
|
+
from: scaleGradientStopPosition()
|
|
2733
|
+
}],
|
|
2734
|
+
/**
|
|
2735
|
+
* Gradient Color Stops Via Position
|
|
2736
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2737
|
+
*/
|
|
2738
|
+
'gradient-via-pos': [{
|
|
2739
|
+
via: scaleGradientStopPosition()
|
|
2740
|
+
}],
|
|
2741
|
+
/**
|
|
2742
|
+
* Gradient Color Stops To Position
|
|
2743
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2744
|
+
*/
|
|
2745
|
+
'gradient-to-pos': [{
|
|
2746
|
+
to: scaleGradientStopPosition()
|
|
2747
|
+
}],
|
|
2748
|
+
/**
|
|
2749
|
+
* Gradient Color Stops From
|
|
2750
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2751
|
+
*/
|
|
2752
|
+
'gradient-from': [{
|
|
2753
|
+
from: scaleColor()
|
|
2754
|
+
}],
|
|
2755
|
+
/**
|
|
2756
|
+
* Gradient Color Stops Via
|
|
2757
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2758
|
+
*/
|
|
2759
|
+
'gradient-via': [{
|
|
2760
|
+
via: scaleColor()
|
|
2761
|
+
}],
|
|
2762
|
+
/**
|
|
2763
|
+
* Gradient Color Stops To
|
|
2764
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2765
|
+
*/
|
|
2766
|
+
'gradient-to': [{
|
|
2767
|
+
to: scaleColor()
|
|
2768
|
+
}],
|
|
2769
|
+
// ---------------
|
|
2770
|
+
// --- Borders ---
|
|
2771
|
+
// ---------------
|
|
2772
|
+
/**
|
|
2773
|
+
* Border Radius
|
|
2774
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2775
|
+
*/
|
|
2776
|
+
rounded: [{
|
|
2777
|
+
rounded: scaleRadius()
|
|
2778
|
+
}],
|
|
2779
|
+
/**
|
|
2780
|
+
* Border Radius Start
|
|
2781
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2782
|
+
*/
|
|
2783
|
+
'rounded-s': [{
|
|
2784
|
+
'rounded-s': scaleRadius()
|
|
2785
|
+
}],
|
|
2786
|
+
/**
|
|
2787
|
+
* Border Radius End
|
|
2788
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2789
|
+
*/
|
|
2790
|
+
'rounded-e': [{
|
|
2791
|
+
'rounded-e': scaleRadius()
|
|
2792
|
+
}],
|
|
2793
|
+
/**
|
|
2794
|
+
* Border Radius Top
|
|
2795
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2796
|
+
*/
|
|
2797
|
+
'rounded-t': [{
|
|
2798
|
+
'rounded-t': scaleRadius()
|
|
2799
|
+
}],
|
|
2800
|
+
/**
|
|
2801
|
+
* Border Radius Right
|
|
2802
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2803
|
+
*/
|
|
2804
|
+
'rounded-r': [{
|
|
2805
|
+
'rounded-r': scaleRadius()
|
|
2806
|
+
}],
|
|
2807
|
+
/**
|
|
2808
|
+
* Border Radius Bottom
|
|
2809
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2810
|
+
*/
|
|
2811
|
+
'rounded-b': [{
|
|
2812
|
+
'rounded-b': scaleRadius()
|
|
2813
|
+
}],
|
|
2814
|
+
/**
|
|
2815
|
+
* Border Radius Left
|
|
2816
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2817
|
+
*/
|
|
2818
|
+
'rounded-l': [{
|
|
2819
|
+
'rounded-l': scaleRadius()
|
|
2820
|
+
}],
|
|
2821
|
+
/**
|
|
2822
|
+
* Border Radius Start Start
|
|
2823
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2824
|
+
*/
|
|
2825
|
+
'rounded-ss': [{
|
|
2826
|
+
'rounded-ss': scaleRadius()
|
|
2827
|
+
}],
|
|
2828
|
+
/**
|
|
2829
|
+
* Border Radius Start End
|
|
2830
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2831
|
+
*/
|
|
2832
|
+
'rounded-se': [{
|
|
2833
|
+
'rounded-se': scaleRadius()
|
|
2834
|
+
}],
|
|
2835
|
+
/**
|
|
2836
|
+
* Border Radius End End
|
|
2837
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2838
|
+
*/
|
|
2839
|
+
'rounded-ee': [{
|
|
2840
|
+
'rounded-ee': scaleRadius()
|
|
2841
|
+
}],
|
|
2842
|
+
/**
|
|
2843
|
+
* Border Radius End Start
|
|
2844
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2845
|
+
*/
|
|
2846
|
+
'rounded-es': [{
|
|
2847
|
+
'rounded-es': scaleRadius()
|
|
2848
|
+
}],
|
|
2849
|
+
/**
|
|
2850
|
+
* Border Radius Top Left
|
|
2851
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2852
|
+
*/
|
|
2853
|
+
'rounded-tl': [{
|
|
2854
|
+
'rounded-tl': scaleRadius()
|
|
2855
|
+
}],
|
|
2856
|
+
/**
|
|
2857
|
+
* Border Radius Top Right
|
|
2858
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2859
|
+
*/
|
|
2860
|
+
'rounded-tr': [{
|
|
2861
|
+
'rounded-tr': scaleRadius()
|
|
2862
|
+
}],
|
|
2863
|
+
/**
|
|
2864
|
+
* Border Radius Bottom Right
|
|
2865
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2866
|
+
*/
|
|
2867
|
+
'rounded-br': [{
|
|
2868
|
+
'rounded-br': scaleRadius()
|
|
2869
|
+
}],
|
|
2870
|
+
/**
|
|
2871
|
+
* Border Radius Bottom Left
|
|
2872
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2873
|
+
*/
|
|
2874
|
+
'rounded-bl': [{
|
|
2875
|
+
'rounded-bl': scaleRadius()
|
|
2876
|
+
}],
|
|
2877
|
+
/**
|
|
2878
|
+
* Border Width
|
|
2879
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2880
|
+
*/
|
|
2881
|
+
'border-w': [{
|
|
2882
|
+
border: scaleBorderWidth()
|
|
2883
|
+
}],
|
|
2884
|
+
/**
|
|
2885
|
+
* Border Width X
|
|
2886
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2887
|
+
*/
|
|
2888
|
+
'border-w-x': [{
|
|
2889
|
+
'border-x': scaleBorderWidth()
|
|
2890
|
+
}],
|
|
2891
|
+
/**
|
|
2892
|
+
* Border Width Y
|
|
2893
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2894
|
+
*/
|
|
2895
|
+
'border-w-y': [{
|
|
2896
|
+
'border-y': scaleBorderWidth()
|
|
2897
|
+
}],
|
|
2898
|
+
/**
|
|
2899
|
+
* Border Width Start
|
|
2900
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2901
|
+
*/
|
|
2902
|
+
'border-w-s': [{
|
|
2903
|
+
'border-s': scaleBorderWidth()
|
|
2904
|
+
}],
|
|
2905
|
+
/**
|
|
2906
|
+
* Border Width End
|
|
2907
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2908
|
+
*/
|
|
2909
|
+
'border-w-e': [{
|
|
2910
|
+
'border-e': scaleBorderWidth()
|
|
2911
|
+
}],
|
|
2912
|
+
/**
|
|
2913
|
+
* Border Width Top
|
|
2914
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2915
|
+
*/
|
|
2916
|
+
'border-w-t': [{
|
|
2917
|
+
'border-t': scaleBorderWidth()
|
|
2918
|
+
}],
|
|
2919
|
+
/**
|
|
2920
|
+
* Border Width Right
|
|
2921
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2922
|
+
*/
|
|
2923
|
+
'border-w-r': [{
|
|
2924
|
+
'border-r': scaleBorderWidth()
|
|
2925
|
+
}],
|
|
2926
|
+
/**
|
|
2927
|
+
* Border Width Bottom
|
|
2928
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2929
|
+
*/
|
|
2930
|
+
'border-w-b': [{
|
|
2931
|
+
'border-b': scaleBorderWidth()
|
|
2932
|
+
}],
|
|
2933
|
+
/**
|
|
2934
|
+
* Border Width Left
|
|
2935
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2936
|
+
*/
|
|
2937
|
+
'border-w-l': [{
|
|
2938
|
+
'border-l': scaleBorderWidth()
|
|
2939
|
+
}],
|
|
2940
|
+
/**
|
|
2941
|
+
* Divide Width X
|
|
2942
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2943
|
+
*/
|
|
2944
|
+
'divide-x': [{
|
|
2945
|
+
'divide-x': scaleBorderWidth()
|
|
2946
|
+
}],
|
|
2947
|
+
/**
|
|
2948
|
+
* Divide Width X Reverse
|
|
2949
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2950
|
+
*/
|
|
2951
|
+
'divide-x-reverse': ['divide-x-reverse'],
|
|
2952
|
+
/**
|
|
2953
|
+
* Divide Width Y
|
|
2954
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2955
|
+
*/
|
|
2956
|
+
'divide-y': [{
|
|
2957
|
+
'divide-y': scaleBorderWidth()
|
|
2958
|
+
}],
|
|
2959
|
+
/**
|
|
2960
|
+
* Divide Width Y Reverse
|
|
2961
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2962
|
+
*/
|
|
2963
|
+
'divide-y-reverse': ['divide-y-reverse'],
|
|
2964
|
+
/**
|
|
2965
|
+
* Border Style
|
|
2966
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
2967
|
+
*/
|
|
2968
|
+
'border-style': [{
|
|
2969
|
+
border: [...scaleLineStyle(), 'hidden', 'none']
|
|
2970
|
+
}],
|
|
2971
|
+
/**
|
|
2972
|
+
* Divide Style
|
|
2973
|
+
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
2974
|
+
*/
|
|
2975
|
+
'divide-style': [{
|
|
2976
|
+
divide: [...scaleLineStyle(), 'hidden', 'none']
|
|
2977
|
+
}],
|
|
2978
|
+
/**
|
|
2979
|
+
* Border Color
|
|
2980
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2981
|
+
*/
|
|
2982
|
+
'border-color': [{
|
|
2983
|
+
border: scaleColor()
|
|
2984
|
+
}],
|
|
2985
|
+
/**
|
|
2986
|
+
* Border Color X
|
|
2987
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2988
|
+
*/
|
|
2989
|
+
'border-color-x': [{
|
|
2990
|
+
'border-x': scaleColor()
|
|
2991
|
+
}],
|
|
2992
|
+
/**
|
|
2993
|
+
* Border Color Y
|
|
2994
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2995
|
+
*/
|
|
2996
|
+
'border-color-y': [{
|
|
2997
|
+
'border-y': scaleColor()
|
|
2998
|
+
}],
|
|
2999
|
+
/**
|
|
3000
|
+
* Border Color S
|
|
3001
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3002
|
+
*/
|
|
3003
|
+
'border-color-s': [{
|
|
3004
|
+
'border-s': scaleColor()
|
|
3005
|
+
}],
|
|
3006
|
+
/**
|
|
3007
|
+
* Border Color E
|
|
3008
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3009
|
+
*/
|
|
3010
|
+
'border-color-e': [{
|
|
3011
|
+
'border-e': scaleColor()
|
|
3012
|
+
}],
|
|
3013
|
+
/**
|
|
3014
|
+
* Border Color Top
|
|
3015
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3016
|
+
*/
|
|
3017
|
+
'border-color-t': [{
|
|
3018
|
+
'border-t': scaleColor()
|
|
3019
|
+
}],
|
|
3020
|
+
/**
|
|
3021
|
+
* Border Color Right
|
|
3022
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3023
|
+
*/
|
|
3024
|
+
'border-color-r': [{
|
|
3025
|
+
'border-r': scaleColor()
|
|
3026
|
+
}],
|
|
3027
|
+
/**
|
|
3028
|
+
* Border Color Bottom
|
|
3029
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3030
|
+
*/
|
|
3031
|
+
'border-color-b': [{
|
|
3032
|
+
'border-b': scaleColor()
|
|
3033
|
+
}],
|
|
3034
|
+
/**
|
|
3035
|
+
* Border Color Left
|
|
3036
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3037
|
+
*/
|
|
3038
|
+
'border-color-l': [{
|
|
3039
|
+
'border-l': scaleColor()
|
|
3040
|
+
}],
|
|
3041
|
+
/**
|
|
3042
|
+
* Divide Color
|
|
3043
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
3044
|
+
*/
|
|
3045
|
+
'divide-color': [{
|
|
3046
|
+
divide: scaleColor()
|
|
3047
|
+
}],
|
|
3048
|
+
/**
|
|
3049
|
+
* Outline Style
|
|
3050
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
3051
|
+
*/
|
|
3052
|
+
'outline-style': [{
|
|
3053
|
+
outline: [...scaleLineStyle(), 'none', 'hidden']
|
|
3054
|
+
}],
|
|
3055
|
+
/**
|
|
3056
|
+
* Outline Offset
|
|
3057
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
3058
|
+
*/
|
|
3059
|
+
'outline-offset': [{
|
|
3060
|
+
'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3061
|
+
}],
|
|
3062
|
+
/**
|
|
3063
|
+
* Outline Width
|
|
3064
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
3065
|
+
*/
|
|
3066
|
+
'outline-w': [{
|
|
3067
|
+
outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]
|
|
3068
|
+
}],
|
|
3069
|
+
/**
|
|
3070
|
+
* Outline Color
|
|
3071
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
3072
|
+
*/
|
|
3073
|
+
'outline-color': [{
|
|
3074
|
+
outline: scaleColor()
|
|
3075
|
+
}],
|
|
3076
|
+
// ---------------
|
|
3077
|
+
// --- Effects ---
|
|
3078
|
+
// ---------------
|
|
3079
|
+
/**
|
|
3080
|
+
* Box Shadow
|
|
3081
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
3082
|
+
*/
|
|
3083
|
+
shadow: [{
|
|
3084
|
+
shadow: [
|
|
3085
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
3086
|
+
'', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
3087
|
+
}],
|
|
3088
|
+
/**
|
|
3089
|
+
* Box Shadow Color
|
|
3090
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
3091
|
+
*/
|
|
3092
|
+
'shadow-color': [{
|
|
3093
|
+
shadow: scaleColor()
|
|
3094
|
+
}],
|
|
3095
|
+
/**
|
|
3096
|
+
* Inset Box Shadow
|
|
3097
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
3098
|
+
*/
|
|
3099
|
+
'inset-shadow': [{
|
|
3100
|
+
'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
3101
|
+
}],
|
|
3102
|
+
/**
|
|
3103
|
+
* Inset Box Shadow Color
|
|
3104
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
3105
|
+
*/
|
|
3106
|
+
'inset-shadow-color': [{
|
|
3107
|
+
'inset-shadow': scaleColor()
|
|
3108
|
+
}],
|
|
3109
|
+
/**
|
|
3110
|
+
* Ring Width
|
|
3111
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
3112
|
+
*/
|
|
3113
|
+
'ring-w': [{
|
|
3114
|
+
ring: scaleBorderWidth()
|
|
3115
|
+
}],
|
|
3116
|
+
/**
|
|
3117
|
+
* Ring Width Inset
|
|
3118
|
+
* @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
|
|
3119
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
3120
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
3121
|
+
*/
|
|
3122
|
+
'ring-w-inset': ['ring-inset'],
|
|
3123
|
+
/**
|
|
3124
|
+
* Ring Color
|
|
3125
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
3126
|
+
*/
|
|
3127
|
+
'ring-color': [{
|
|
3128
|
+
ring: scaleColor()
|
|
3129
|
+
}],
|
|
3130
|
+
/**
|
|
3131
|
+
* Ring Offset Width
|
|
3132
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-width
|
|
3133
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
3134
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
3135
|
+
*/
|
|
3136
|
+
'ring-offset-w': [{
|
|
3137
|
+
'ring-offset': [isNumber, isArbitraryLength]
|
|
3138
|
+
}],
|
|
3139
|
+
/**
|
|
3140
|
+
* Ring Offset Color
|
|
3141
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-color
|
|
3142
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
3143
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
3144
|
+
*/
|
|
3145
|
+
'ring-offset-color': [{
|
|
3146
|
+
'ring-offset': scaleColor()
|
|
3147
|
+
}],
|
|
3148
|
+
/**
|
|
3149
|
+
* Inset Ring Width
|
|
3150
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
3151
|
+
*/
|
|
3152
|
+
'inset-ring-w': [{
|
|
3153
|
+
'inset-ring': scaleBorderWidth()
|
|
3154
|
+
}],
|
|
3155
|
+
/**
|
|
3156
|
+
* Inset Ring Color
|
|
3157
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
3158
|
+
*/
|
|
3159
|
+
'inset-ring-color': [{
|
|
3160
|
+
'inset-ring': scaleColor()
|
|
3161
|
+
}],
|
|
3162
|
+
/**
|
|
3163
|
+
* Text Shadow
|
|
3164
|
+
* @see https://tailwindcss.com/docs/text-shadow
|
|
3165
|
+
*/
|
|
3166
|
+
'text-shadow': [{
|
|
3167
|
+
'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
3168
|
+
}],
|
|
3169
|
+
/**
|
|
3170
|
+
* Text Shadow Color
|
|
3171
|
+
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
3172
|
+
*/
|
|
3173
|
+
'text-shadow-color': [{
|
|
3174
|
+
'text-shadow': scaleColor()
|
|
3175
|
+
}],
|
|
3176
|
+
/**
|
|
3177
|
+
* Opacity
|
|
3178
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
3179
|
+
*/
|
|
3180
|
+
opacity: [{
|
|
3181
|
+
opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3182
|
+
}],
|
|
3183
|
+
/**
|
|
3184
|
+
* Mix Blend Mode
|
|
3185
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3186
|
+
*/
|
|
3187
|
+
'mix-blend': [{
|
|
3188
|
+
'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']
|
|
3189
|
+
}],
|
|
3190
|
+
/**
|
|
3191
|
+
* Background Blend Mode
|
|
3192
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3193
|
+
*/
|
|
3194
|
+
'bg-blend': [{
|
|
3195
|
+
'bg-blend': scaleBlendMode()
|
|
3196
|
+
}],
|
|
3197
|
+
/**
|
|
3198
|
+
* Mask Clip
|
|
3199
|
+
* @see https://tailwindcss.com/docs/mask-clip
|
|
3200
|
+
*/
|
|
3201
|
+
'mask-clip': [{
|
|
3202
|
+
'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
|
|
3203
|
+
}, 'mask-no-clip'],
|
|
3204
|
+
/**
|
|
3205
|
+
* Mask Composite
|
|
3206
|
+
* @see https://tailwindcss.com/docs/mask-composite
|
|
3207
|
+
*/
|
|
3208
|
+
'mask-composite': [{
|
|
3209
|
+
mask: ['add', 'subtract', 'intersect', 'exclude']
|
|
3210
|
+
}],
|
|
3211
|
+
/**
|
|
3212
|
+
* Mask Image
|
|
3213
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
3214
|
+
*/
|
|
3215
|
+
'mask-image-linear-pos': [{
|
|
3216
|
+
'mask-linear': [isNumber]
|
|
3217
|
+
}],
|
|
3218
|
+
'mask-image-linear-from-pos': [{
|
|
3219
|
+
'mask-linear-from': scaleMaskImagePosition()
|
|
3220
|
+
}],
|
|
3221
|
+
'mask-image-linear-to-pos': [{
|
|
3222
|
+
'mask-linear-to': scaleMaskImagePosition()
|
|
3223
|
+
}],
|
|
3224
|
+
'mask-image-linear-from-color': [{
|
|
3225
|
+
'mask-linear-from': scaleColor()
|
|
3226
|
+
}],
|
|
3227
|
+
'mask-image-linear-to-color': [{
|
|
3228
|
+
'mask-linear-to': scaleColor()
|
|
3229
|
+
}],
|
|
3230
|
+
'mask-image-t-from-pos': [{
|
|
3231
|
+
'mask-t-from': scaleMaskImagePosition()
|
|
3232
|
+
}],
|
|
3233
|
+
'mask-image-t-to-pos': [{
|
|
3234
|
+
'mask-t-to': scaleMaskImagePosition()
|
|
3235
|
+
}],
|
|
3236
|
+
'mask-image-t-from-color': [{
|
|
3237
|
+
'mask-t-from': scaleColor()
|
|
3238
|
+
}],
|
|
3239
|
+
'mask-image-t-to-color': [{
|
|
3240
|
+
'mask-t-to': scaleColor()
|
|
3241
|
+
}],
|
|
3242
|
+
'mask-image-r-from-pos': [{
|
|
3243
|
+
'mask-r-from': scaleMaskImagePosition()
|
|
3244
|
+
}],
|
|
3245
|
+
'mask-image-r-to-pos': [{
|
|
3246
|
+
'mask-r-to': scaleMaskImagePosition()
|
|
3247
|
+
}],
|
|
3248
|
+
'mask-image-r-from-color': [{
|
|
3249
|
+
'mask-r-from': scaleColor()
|
|
3250
|
+
}],
|
|
3251
|
+
'mask-image-r-to-color': [{
|
|
3252
|
+
'mask-r-to': scaleColor()
|
|
3253
|
+
}],
|
|
3254
|
+
'mask-image-b-from-pos': [{
|
|
3255
|
+
'mask-b-from': scaleMaskImagePosition()
|
|
3256
|
+
}],
|
|
3257
|
+
'mask-image-b-to-pos': [{
|
|
3258
|
+
'mask-b-to': scaleMaskImagePosition()
|
|
3259
|
+
}],
|
|
3260
|
+
'mask-image-b-from-color': [{
|
|
3261
|
+
'mask-b-from': scaleColor()
|
|
3262
|
+
}],
|
|
3263
|
+
'mask-image-b-to-color': [{
|
|
3264
|
+
'mask-b-to': scaleColor()
|
|
3265
|
+
}],
|
|
3266
|
+
'mask-image-l-from-pos': [{
|
|
3267
|
+
'mask-l-from': scaleMaskImagePosition()
|
|
3268
|
+
}],
|
|
3269
|
+
'mask-image-l-to-pos': [{
|
|
3270
|
+
'mask-l-to': scaleMaskImagePosition()
|
|
3271
|
+
}],
|
|
3272
|
+
'mask-image-l-from-color': [{
|
|
3273
|
+
'mask-l-from': scaleColor()
|
|
3274
|
+
}],
|
|
3275
|
+
'mask-image-l-to-color': [{
|
|
3276
|
+
'mask-l-to': scaleColor()
|
|
3277
|
+
}],
|
|
3278
|
+
'mask-image-x-from-pos': [{
|
|
3279
|
+
'mask-x-from': scaleMaskImagePosition()
|
|
3280
|
+
}],
|
|
3281
|
+
'mask-image-x-to-pos': [{
|
|
3282
|
+
'mask-x-to': scaleMaskImagePosition()
|
|
3283
|
+
}],
|
|
3284
|
+
'mask-image-x-from-color': [{
|
|
3285
|
+
'mask-x-from': scaleColor()
|
|
3286
|
+
}],
|
|
3287
|
+
'mask-image-x-to-color': [{
|
|
3288
|
+
'mask-x-to': scaleColor()
|
|
3289
|
+
}],
|
|
3290
|
+
'mask-image-y-from-pos': [{
|
|
3291
|
+
'mask-y-from': scaleMaskImagePosition()
|
|
3292
|
+
}],
|
|
3293
|
+
'mask-image-y-to-pos': [{
|
|
3294
|
+
'mask-y-to': scaleMaskImagePosition()
|
|
3295
|
+
}],
|
|
3296
|
+
'mask-image-y-from-color': [{
|
|
3297
|
+
'mask-y-from': scaleColor()
|
|
3298
|
+
}],
|
|
3299
|
+
'mask-image-y-to-color': [{
|
|
3300
|
+
'mask-y-to': scaleColor()
|
|
3301
|
+
}],
|
|
3302
|
+
'mask-image-radial': [{
|
|
3303
|
+
'mask-radial': [isArbitraryVariable, isArbitraryValue]
|
|
3304
|
+
}],
|
|
3305
|
+
'mask-image-radial-from-pos': [{
|
|
3306
|
+
'mask-radial-from': scaleMaskImagePosition()
|
|
3307
|
+
}],
|
|
3308
|
+
'mask-image-radial-to-pos': [{
|
|
3309
|
+
'mask-radial-to': scaleMaskImagePosition()
|
|
3310
|
+
}],
|
|
3311
|
+
'mask-image-radial-from-color': [{
|
|
3312
|
+
'mask-radial-from': scaleColor()
|
|
3313
|
+
}],
|
|
3314
|
+
'mask-image-radial-to-color': [{
|
|
3315
|
+
'mask-radial-to': scaleColor()
|
|
3316
|
+
}],
|
|
3317
|
+
'mask-image-radial-shape': [{
|
|
3318
|
+
'mask-radial': ['circle', 'ellipse']
|
|
3319
|
+
}],
|
|
3320
|
+
'mask-image-radial-size': [{
|
|
3321
|
+
'mask-radial': [{
|
|
3322
|
+
closest: ['side', 'corner'],
|
|
3323
|
+
farthest: ['side', 'corner']
|
|
3324
|
+
}]
|
|
3325
|
+
}],
|
|
3326
|
+
'mask-image-radial-pos': [{
|
|
3327
|
+
'mask-radial-at': scalePosition()
|
|
3328
|
+
}],
|
|
3329
|
+
'mask-image-conic-pos': [{
|
|
3330
|
+
'mask-conic': [isNumber]
|
|
3331
|
+
}],
|
|
3332
|
+
'mask-image-conic-from-pos': [{
|
|
3333
|
+
'mask-conic-from': scaleMaskImagePosition()
|
|
3334
|
+
}],
|
|
3335
|
+
'mask-image-conic-to-pos': [{
|
|
3336
|
+
'mask-conic-to': scaleMaskImagePosition()
|
|
3337
|
+
}],
|
|
3338
|
+
'mask-image-conic-from-color': [{
|
|
3339
|
+
'mask-conic-from': scaleColor()
|
|
3340
|
+
}],
|
|
3341
|
+
'mask-image-conic-to-color': [{
|
|
3342
|
+
'mask-conic-to': scaleColor()
|
|
3343
|
+
}],
|
|
3344
|
+
/**
|
|
3345
|
+
* Mask Mode
|
|
3346
|
+
* @see https://tailwindcss.com/docs/mask-mode
|
|
3347
|
+
*/
|
|
3348
|
+
'mask-mode': [{
|
|
3349
|
+
mask: ['alpha', 'luminance', 'match']
|
|
3350
|
+
}],
|
|
3351
|
+
/**
|
|
3352
|
+
* Mask Origin
|
|
3353
|
+
* @see https://tailwindcss.com/docs/mask-origin
|
|
3354
|
+
*/
|
|
3355
|
+
'mask-origin': [{
|
|
3356
|
+
'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
|
|
3357
|
+
}],
|
|
3358
|
+
/**
|
|
3359
|
+
* Mask Position
|
|
3360
|
+
* @see https://tailwindcss.com/docs/mask-position
|
|
3361
|
+
*/
|
|
3362
|
+
'mask-position': [{
|
|
3363
|
+
mask: scaleBgPosition()
|
|
3364
|
+
}],
|
|
3365
|
+
/**
|
|
3366
|
+
* Mask Repeat
|
|
3367
|
+
* @see https://tailwindcss.com/docs/mask-repeat
|
|
3368
|
+
*/
|
|
3369
|
+
'mask-repeat': [{
|
|
3370
|
+
mask: scaleBgRepeat()
|
|
3371
|
+
}],
|
|
3372
|
+
/**
|
|
3373
|
+
* Mask Size
|
|
3374
|
+
* @see https://tailwindcss.com/docs/mask-size
|
|
3375
|
+
*/
|
|
3376
|
+
'mask-size': [{
|
|
3377
|
+
mask: scaleBgSize()
|
|
3378
|
+
}],
|
|
3379
|
+
/**
|
|
3380
|
+
* Mask Type
|
|
3381
|
+
* @see https://tailwindcss.com/docs/mask-type
|
|
3382
|
+
*/
|
|
3383
|
+
'mask-type': [{
|
|
3384
|
+
'mask-type': ['alpha', 'luminance']
|
|
3385
|
+
}],
|
|
3386
|
+
/**
|
|
3387
|
+
* Mask Image
|
|
3388
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
3389
|
+
*/
|
|
3390
|
+
'mask-image': [{
|
|
3391
|
+
mask: ['none', isArbitraryVariable, isArbitraryValue]
|
|
3392
|
+
}],
|
|
3393
|
+
// ---------------
|
|
3394
|
+
// --- Filters ---
|
|
3395
|
+
// ---------------
|
|
3396
|
+
/**
|
|
3397
|
+
* Filter
|
|
3398
|
+
* @see https://tailwindcss.com/docs/filter
|
|
3399
|
+
*/
|
|
3400
|
+
filter: [{
|
|
3401
|
+
filter: [
|
|
3402
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
3403
|
+
'', 'none', isArbitraryVariable, isArbitraryValue]
|
|
3404
|
+
}],
|
|
3405
|
+
/**
|
|
3406
|
+
* Blur
|
|
3407
|
+
* @see https://tailwindcss.com/docs/blur
|
|
3408
|
+
*/
|
|
3409
|
+
blur: [{
|
|
3410
|
+
blur: scaleBlur()
|
|
3411
|
+
}],
|
|
3412
|
+
/**
|
|
3413
|
+
* Brightness
|
|
3414
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
3415
|
+
*/
|
|
3416
|
+
brightness: [{
|
|
3417
|
+
brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3418
|
+
}],
|
|
3419
|
+
/**
|
|
3420
|
+
* Contrast
|
|
3421
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
3422
|
+
*/
|
|
3423
|
+
contrast: [{
|
|
3424
|
+
contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3425
|
+
}],
|
|
3426
|
+
/**
|
|
3427
|
+
* Drop Shadow
|
|
3428
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3429
|
+
*/
|
|
3430
|
+
'drop-shadow': [{
|
|
3431
|
+
'drop-shadow': [
|
|
3432
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
3433
|
+
'', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
3434
|
+
}],
|
|
3435
|
+
/**
|
|
3436
|
+
* Drop Shadow Color
|
|
3437
|
+
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
3438
|
+
*/
|
|
3439
|
+
'drop-shadow-color': [{
|
|
3440
|
+
'drop-shadow': scaleColor()
|
|
3441
|
+
}],
|
|
3442
|
+
/**
|
|
3443
|
+
* Grayscale
|
|
3444
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
3445
|
+
*/
|
|
3446
|
+
grayscale: [{
|
|
3447
|
+
grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3448
|
+
}],
|
|
3449
|
+
/**
|
|
3450
|
+
* Hue Rotate
|
|
3451
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
3452
|
+
*/
|
|
3453
|
+
'hue-rotate': [{
|
|
3454
|
+
'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3455
|
+
}],
|
|
3456
|
+
/**
|
|
3457
|
+
* Invert
|
|
3458
|
+
* @see https://tailwindcss.com/docs/invert
|
|
3459
|
+
*/
|
|
3460
|
+
invert: [{
|
|
3461
|
+
invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3462
|
+
}],
|
|
3463
|
+
/**
|
|
3464
|
+
* Saturate
|
|
3465
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
3466
|
+
*/
|
|
3467
|
+
saturate: [{
|
|
3468
|
+
saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3469
|
+
}],
|
|
3470
|
+
/**
|
|
3471
|
+
* Sepia
|
|
3472
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
3473
|
+
*/
|
|
3474
|
+
sepia: [{
|
|
3475
|
+
sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3476
|
+
}],
|
|
3477
|
+
/**
|
|
3478
|
+
* Backdrop Filter
|
|
3479
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
3480
|
+
*/
|
|
3481
|
+
'backdrop-filter': [{
|
|
3482
|
+
'backdrop-filter': [
|
|
3483
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
3484
|
+
'', 'none', isArbitraryVariable, isArbitraryValue]
|
|
3485
|
+
}],
|
|
3486
|
+
/**
|
|
3487
|
+
* Backdrop Blur
|
|
3488
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
3489
|
+
*/
|
|
3490
|
+
'backdrop-blur': [{
|
|
3491
|
+
'backdrop-blur': scaleBlur()
|
|
3492
|
+
}],
|
|
3493
|
+
/**
|
|
3494
|
+
* Backdrop Brightness
|
|
3495
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
3496
|
+
*/
|
|
3497
|
+
'backdrop-brightness': [{
|
|
3498
|
+
'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3499
|
+
}],
|
|
3500
|
+
/**
|
|
3501
|
+
* Backdrop Contrast
|
|
3502
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
3503
|
+
*/
|
|
3504
|
+
'backdrop-contrast': [{
|
|
3505
|
+
'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3506
|
+
}],
|
|
3507
|
+
/**
|
|
3508
|
+
* Backdrop Grayscale
|
|
3509
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
3510
|
+
*/
|
|
3511
|
+
'backdrop-grayscale': [{
|
|
3512
|
+
'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3513
|
+
}],
|
|
3514
|
+
/**
|
|
3515
|
+
* Backdrop Hue Rotate
|
|
3516
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
3517
|
+
*/
|
|
3518
|
+
'backdrop-hue-rotate': [{
|
|
3519
|
+
'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3520
|
+
}],
|
|
3521
|
+
/**
|
|
3522
|
+
* Backdrop Invert
|
|
3523
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3524
|
+
*/
|
|
3525
|
+
'backdrop-invert': [{
|
|
3526
|
+
'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3527
|
+
}],
|
|
3528
|
+
/**
|
|
3529
|
+
* Backdrop Opacity
|
|
3530
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3531
|
+
*/
|
|
3532
|
+
'backdrop-opacity': [{
|
|
3533
|
+
'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3534
|
+
}],
|
|
3535
|
+
/**
|
|
3536
|
+
* Backdrop Saturate
|
|
3537
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
3538
|
+
*/
|
|
3539
|
+
'backdrop-saturate': [{
|
|
3540
|
+
'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3541
|
+
}],
|
|
3542
|
+
/**
|
|
3543
|
+
* Backdrop Sepia
|
|
3544
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3545
|
+
*/
|
|
3546
|
+
'backdrop-sepia': [{
|
|
3547
|
+
'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3548
|
+
}],
|
|
3549
|
+
// --------------
|
|
3550
|
+
// --- Tables ---
|
|
3551
|
+
// --------------
|
|
3552
|
+
/**
|
|
3553
|
+
* Border Collapse
|
|
3554
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
3555
|
+
*/
|
|
3556
|
+
'border-collapse': [{
|
|
3557
|
+
border: ['collapse', 'separate']
|
|
3558
|
+
}],
|
|
3559
|
+
/**
|
|
3560
|
+
* Border Spacing
|
|
3561
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3562
|
+
*/
|
|
3563
|
+
'border-spacing': [{
|
|
3564
|
+
'border-spacing': scaleUnambiguousSpacing()
|
|
3565
|
+
}],
|
|
3566
|
+
/**
|
|
3567
|
+
* Border Spacing X
|
|
3568
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3569
|
+
*/
|
|
3570
|
+
'border-spacing-x': [{
|
|
3571
|
+
'border-spacing-x': scaleUnambiguousSpacing()
|
|
3572
|
+
}],
|
|
3573
|
+
/**
|
|
3574
|
+
* Border Spacing Y
|
|
3575
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3576
|
+
*/
|
|
3577
|
+
'border-spacing-y': [{
|
|
3578
|
+
'border-spacing-y': scaleUnambiguousSpacing()
|
|
3579
|
+
}],
|
|
3580
|
+
/**
|
|
3581
|
+
* Table Layout
|
|
3582
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
3583
|
+
*/
|
|
3584
|
+
'table-layout': [{
|
|
3585
|
+
table: ['auto', 'fixed']
|
|
3586
|
+
}],
|
|
3587
|
+
/**
|
|
3588
|
+
* Caption Side
|
|
3589
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
3590
|
+
*/
|
|
3591
|
+
caption: [{
|
|
3592
|
+
caption: ['top', 'bottom']
|
|
3593
|
+
}],
|
|
3594
|
+
// ---------------------------------
|
|
3595
|
+
// --- Transitions and Animation ---
|
|
3596
|
+
// ---------------------------------
|
|
3597
|
+
/**
|
|
3598
|
+
* Transition Property
|
|
3599
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
3600
|
+
*/
|
|
3601
|
+
transition: [{
|
|
3602
|
+
transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]
|
|
3603
|
+
}],
|
|
3604
|
+
/**
|
|
3605
|
+
* Transition Behavior
|
|
3606
|
+
* @see https://tailwindcss.com/docs/transition-behavior
|
|
3607
|
+
*/
|
|
3608
|
+
'transition-behavior': [{
|
|
3609
|
+
transition: ['normal', 'discrete']
|
|
3610
|
+
}],
|
|
3611
|
+
/**
|
|
3612
|
+
* Transition Duration
|
|
3613
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
3614
|
+
*/
|
|
3615
|
+
duration: [{
|
|
3616
|
+
duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]
|
|
3617
|
+
}],
|
|
3618
|
+
/**
|
|
3619
|
+
* Transition Timing Function
|
|
3620
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
3621
|
+
*/
|
|
3622
|
+
ease: [{
|
|
3623
|
+
ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]
|
|
3624
|
+
}],
|
|
3625
|
+
/**
|
|
3626
|
+
* Transition Delay
|
|
3627
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
3628
|
+
*/
|
|
3629
|
+
delay: [{
|
|
3630
|
+
delay: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
3631
|
+
}],
|
|
3632
|
+
/**
|
|
3633
|
+
* Animation
|
|
3634
|
+
* @see https://tailwindcss.com/docs/animation
|
|
3635
|
+
*/
|
|
3636
|
+
animate: [{
|
|
3637
|
+
animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]
|
|
3638
|
+
}],
|
|
3639
|
+
// ------------------
|
|
3640
|
+
// --- Transforms ---
|
|
3641
|
+
// ------------------
|
|
3642
|
+
/**
|
|
3643
|
+
* Backface Visibility
|
|
3644
|
+
* @see https://tailwindcss.com/docs/backface-visibility
|
|
3645
|
+
*/
|
|
3646
|
+
backface: [{
|
|
3647
|
+
backface: ['hidden', 'visible']
|
|
3648
|
+
}],
|
|
3649
|
+
/**
|
|
3650
|
+
* Perspective
|
|
3651
|
+
* @see https://tailwindcss.com/docs/perspective
|
|
3652
|
+
*/
|
|
3653
|
+
perspective: [{
|
|
3654
|
+
perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
|
|
3655
|
+
}],
|
|
3656
|
+
/**
|
|
3657
|
+
* Perspective Origin
|
|
3658
|
+
* @see https://tailwindcss.com/docs/perspective-origin
|
|
3659
|
+
*/
|
|
3660
|
+
'perspective-origin': [{
|
|
3661
|
+
'perspective-origin': scalePositionWithArbitrary()
|
|
3662
|
+
}],
|
|
3663
|
+
/**
|
|
3664
|
+
* Rotate
|
|
3665
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3666
|
+
*/
|
|
3667
|
+
rotate: [{
|
|
3668
|
+
rotate: scaleRotate()
|
|
3669
|
+
}],
|
|
3670
|
+
/**
|
|
3671
|
+
* Rotate X
|
|
3672
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3673
|
+
*/
|
|
3674
|
+
'rotate-x': [{
|
|
3675
|
+
'rotate-x': scaleRotate()
|
|
3676
|
+
}],
|
|
3677
|
+
/**
|
|
3678
|
+
* Rotate Y
|
|
3679
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3680
|
+
*/
|
|
3681
|
+
'rotate-y': [{
|
|
3682
|
+
'rotate-y': scaleRotate()
|
|
3683
|
+
}],
|
|
3684
|
+
/**
|
|
3685
|
+
* Rotate Z
|
|
3686
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3687
|
+
*/
|
|
3688
|
+
'rotate-z': [{
|
|
3689
|
+
'rotate-z': scaleRotate()
|
|
3690
|
+
}],
|
|
3691
|
+
/**
|
|
3692
|
+
* Scale
|
|
3693
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3694
|
+
*/
|
|
3695
|
+
scale: [{
|
|
3696
|
+
scale: scaleScale()
|
|
3697
|
+
}],
|
|
3698
|
+
/**
|
|
3699
|
+
* Scale X
|
|
3700
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3701
|
+
*/
|
|
3702
|
+
'scale-x': [{
|
|
3703
|
+
'scale-x': scaleScale()
|
|
3704
|
+
}],
|
|
3705
|
+
/**
|
|
3706
|
+
* Scale Y
|
|
3707
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3708
|
+
*/
|
|
3709
|
+
'scale-y': [{
|
|
3710
|
+
'scale-y': scaleScale()
|
|
3711
|
+
}],
|
|
3712
|
+
/**
|
|
3713
|
+
* Scale Z
|
|
3714
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3715
|
+
*/
|
|
3716
|
+
'scale-z': [{
|
|
3717
|
+
'scale-z': scaleScale()
|
|
3718
|
+
}],
|
|
3719
|
+
/**
|
|
3720
|
+
* Scale 3D
|
|
3721
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3722
|
+
*/
|
|
3723
|
+
'scale-3d': ['scale-3d'],
|
|
3724
|
+
/**
|
|
3725
|
+
* Skew
|
|
3726
|
+
* @see https://tailwindcss.com/docs/skew
|
|
3727
|
+
*/
|
|
3728
|
+
skew: [{
|
|
3729
|
+
skew: scaleSkew()
|
|
3730
|
+
}],
|
|
3731
|
+
/**
|
|
3732
|
+
* Skew X
|
|
3733
|
+
* @see https://tailwindcss.com/docs/skew
|
|
3734
|
+
*/
|
|
3735
|
+
'skew-x': [{
|
|
3736
|
+
'skew-x': scaleSkew()
|
|
3737
|
+
}],
|
|
3738
|
+
/**
|
|
3739
|
+
* Skew Y
|
|
3740
|
+
* @see https://tailwindcss.com/docs/skew
|
|
3741
|
+
*/
|
|
3742
|
+
'skew-y': [{
|
|
3743
|
+
'skew-y': scaleSkew()
|
|
3744
|
+
}],
|
|
3745
|
+
/**
|
|
3746
|
+
* Transform
|
|
3747
|
+
* @see https://tailwindcss.com/docs/transform
|
|
3748
|
+
*/
|
|
3749
|
+
transform: [{
|
|
3750
|
+
transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']
|
|
3751
|
+
}],
|
|
3752
|
+
/**
|
|
3753
|
+
* Transform Origin
|
|
3754
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
3755
|
+
*/
|
|
3756
|
+
'transform-origin': [{
|
|
3757
|
+
origin: scalePositionWithArbitrary()
|
|
3758
|
+
}],
|
|
3759
|
+
/**
|
|
3760
|
+
* Transform Style
|
|
3761
|
+
* @see https://tailwindcss.com/docs/transform-style
|
|
3762
|
+
*/
|
|
3763
|
+
'transform-style': [{
|
|
3764
|
+
transform: ['3d', 'flat']
|
|
3765
|
+
}],
|
|
3766
|
+
/**
|
|
3767
|
+
* Translate
|
|
3768
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3769
|
+
*/
|
|
3770
|
+
translate: [{
|
|
3771
|
+
translate: scaleTranslate()
|
|
3772
|
+
}],
|
|
3773
|
+
/**
|
|
3774
|
+
* Translate X
|
|
3775
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3776
|
+
*/
|
|
3777
|
+
'translate-x': [{
|
|
3778
|
+
'translate-x': scaleTranslate()
|
|
3779
|
+
}],
|
|
3780
|
+
/**
|
|
3781
|
+
* Translate Y
|
|
3782
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3783
|
+
*/
|
|
3784
|
+
'translate-y': [{
|
|
3785
|
+
'translate-y': scaleTranslate()
|
|
3786
|
+
}],
|
|
3787
|
+
/**
|
|
3788
|
+
* Translate Z
|
|
3789
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3790
|
+
*/
|
|
3791
|
+
'translate-z': [{
|
|
3792
|
+
'translate-z': scaleTranslate()
|
|
3793
|
+
}],
|
|
3794
|
+
/**
|
|
3795
|
+
* Translate None
|
|
3796
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3797
|
+
*/
|
|
3798
|
+
'translate-none': ['translate-none'],
|
|
3799
|
+
// ---------------------
|
|
3800
|
+
// --- Interactivity ---
|
|
3801
|
+
// ---------------------
|
|
3802
|
+
/**
|
|
3803
|
+
* Accent Color
|
|
3804
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
3805
|
+
*/
|
|
3806
|
+
accent: [{
|
|
3807
|
+
accent: scaleColor()
|
|
3808
|
+
}],
|
|
3809
|
+
/**
|
|
3810
|
+
* Appearance
|
|
3811
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
3812
|
+
*/
|
|
3813
|
+
appearance: [{
|
|
3814
|
+
appearance: ['none', 'auto']
|
|
3815
|
+
}],
|
|
3816
|
+
/**
|
|
3817
|
+
* Caret Color
|
|
3818
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
3819
|
+
*/
|
|
3820
|
+
'caret-color': [{
|
|
3821
|
+
caret: scaleColor()
|
|
3822
|
+
}],
|
|
3823
|
+
/**
|
|
3824
|
+
* Color Scheme
|
|
3825
|
+
* @see https://tailwindcss.com/docs/color-scheme
|
|
3826
|
+
*/
|
|
3827
|
+
'color-scheme': [{
|
|
3828
|
+
scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']
|
|
3829
|
+
}],
|
|
3830
|
+
/**
|
|
3831
|
+
* Cursor
|
|
3832
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
3833
|
+
*/
|
|
3834
|
+
cursor: [{
|
|
3835
|
+
cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]
|
|
3836
|
+
}],
|
|
3837
|
+
/**
|
|
3838
|
+
* Field Sizing
|
|
3839
|
+
* @see https://tailwindcss.com/docs/field-sizing
|
|
3840
|
+
*/
|
|
3841
|
+
'field-sizing': [{
|
|
3842
|
+
'field-sizing': ['fixed', 'content']
|
|
3843
|
+
}],
|
|
3844
|
+
/**
|
|
3845
|
+
* Pointer Events
|
|
3846
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
3847
|
+
*/
|
|
3848
|
+
'pointer-events': [{
|
|
3849
|
+
'pointer-events': ['auto', 'none']
|
|
3850
|
+
}],
|
|
3851
|
+
/**
|
|
3852
|
+
* Resize
|
|
3853
|
+
* @see https://tailwindcss.com/docs/resize
|
|
3854
|
+
*/
|
|
3855
|
+
resize: [{
|
|
3856
|
+
resize: ['none', '', 'y', 'x']
|
|
3857
|
+
}],
|
|
3858
|
+
/**
|
|
3859
|
+
* Scroll Behavior
|
|
3860
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
3861
|
+
*/
|
|
3862
|
+
'scroll-behavior': [{
|
|
3863
|
+
scroll: ['auto', 'smooth']
|
|
3864
|
+
}],
|
|
3865
|
+
/**
|
|
3866
|
+
* Scroll Margin
|
|
3867
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3868
|
+
*/
|
|
3869
|
+
'scroll-m': [{
|
|
3870
|
+
'scroll-m': scaleUnambiguousSpacing()
|
|
3871
|
+
}],
|
|
3872
|
+
/**
|
|
3873
|
+
* Scroll Margin X
|
|
3874
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3875
|
+
*/
|
|
3876
|
+
'scroll-mx': [{
|
|
3877
|
+
'scroll-mx': scaleUnambiguousSpacing()
|
|
3878
|
+
}],
|
|
3879
|
+
/**
|
|
3880
|
+
* Scroll Margin Y
|
|
3881
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3882
|
+
*/
|
|
3883
|
+
'scroll-my': [{
|
|
3884
|
+
'scroll-my': scaleUnambiguousSpacing()
|
|
3885
|
+
}],
|
|
3886
|
+
/**
|
|
3887
|
+
* Scroll Margin Start
|
|
3888
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3889
|
+
*/
|
|
3890
|
+
'scroll-ms': [{
|
|
3891
|
+
'scroll-ms': scaleUnambiguousSpacing()
|
|
3892
|
+
}],
|
|
3893
|
+
/**
|
|
3894
|
+
* Scroll Margin End
|
|
3895
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3896
|
+
*/
|
|
3897
|
+
'scroll-me': [{
|
|
3898
|
+
'scroll-me': scaleUnambiguousSpacing()
|
|
3899
|
+
}],
|
|
3900
|
+
/**
|
|
3901
|
+
* Scroll Margin Top
|
|
3902
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3903
|
+
*/
|
|
3904
|
+
'scroll-mt': [{
|
|
3905
|
+
'scroll-mt': scaleUnambiguousSpacing()
|
|
3906
|
+
}],
|
|
3907
|
+
/**
|
|
3908
|
+
* Scroll Margin Right
|
|
3909
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3910
|
+
*/
|
|
3911
|
+
'scroll-mr': [{
|
|
3912
|
+
'scroll-mr': scaleUnambiguousSpacing()
|
|
3913
|
+
}],
|
|
3914
|
+
/**
|
|
3915
|
+
* Scroll Margin Bottom
|
|
3916
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3917
|
+
*/
|
|
3918
|
+
'scroll-mb': [{
|
|
3919
|
+
'scroll-mb': scaleUnambiguousSpacing()
|
|
3920
|
+
}],
|
|
3921
|
+
/**
|
|
3922
|
+
* Scroll Margin Left
|
|
3923
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3924
|
+
*/
|
|
3925
|
+
'scroll-ml': [{
|
|
3926
|
+
'scroll-ml': scaleUnambiguousSpacing()
|
|
3927
|
+
}],
|
|
3928
|
+
/**
|
|
3929
|
+
* Scroll Padding
|
|
3930
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3931
|
+
*/
|
|
3932
|
+
'scroll-p': [{
|
|
3933
|
+
'scroll-p': scaleUnambiguousSpacing()
|
|
3934
|
+
}],
|
|
3935
|
+
/**
|
|
3936
|
+
* Scroll Padding X
|
|
3937
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3938
|
+
*/
|
|
3939
|
+
'scroll-px': [{
|
|
3940
|
+
'scroll-px': scaleUnambiguousSpacing()
|
|
3941
|
+
}],
|
|
3942
|
+
/**
|
|
3943
|
+
* Scroll Padding Y
|
|
3944
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3945
|
+
*/
|
|
3946
|
+
'scroll-py': [{
|
|
3947
|
+
'scroll-py': scaleUnambiguousSpacing()
|
|
3948
|
+
}],
|
|
3949
|
+
/**
|
|
3950
|
+
* Scroll Padding Start
|
|
3951
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3952
|
+
*/
|
|
3953
|
+
'scroll-ps': [{
|
|
3954
|
+
'scroll-ps': scaleUnambiguousSpacing()
|
|
3955
|
+
}],
|
|
3956
|
+
/**
|
|
3957
|
+
* Scroll Padding End
|
|
3958
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3959
|
+
*/
|
|
3960
|
+
'scroll-pe': [{
|
|
3961
|
+
'scroll-pe': scaleUnambiguousSpacing()
|
|
3962
|
+
}],
|
|
3963
|
+
/**
|
|
3964
|
+
* Scroll Padding Top
|
|
3965
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3966
|
+
*/
|
|
3967
|
+
'scroll-pt': [{
|
|
3968
|
+
'scroll-pt': scaleUnambiguousSpacing()
|
|
3969
|
+
}],
|
|
3970
|
+
/**
|
|
3971
|
+
* Scroll Padding Right
|
|
3972
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3973
|
+
*/
|
|
3974
|
+
'scroll-pr': [{
|
|
3975
|
+
'scroll-pr': scaleUnambiguousSpacing()
|
|
3976
|
+
}],
|
|
3977
|
+
/**
|
|
3978
|
+
* Scroll Padding Bottom
|
|
3979
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3980
|
+
*/
|
|
3981
|
+
'scroll-pb': [{
|
|
3982
|
+
'scroll-pb': scaleUnambiguousSpacing()
|
|
3983
|
+
}],
|
|
3984
|
+
/**
|
|
3985
|
+
* Scroll Padding Left
|
|
3986
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3987
|
+
*/
|
|
3988
|
+
'scroll-pl': [{
|
|
3989
|
+
'scroll-pl': scaleUnambiguousSpacing()
|
|
3990
|
+
}],
|
|
3991
|
+
/**
|
|
3992
|
+
* Scroll Snap Align
|
|
3993
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
3994
|
+
*/
|
|
3995
|
+
'snap-align': [{
|
|
3996
|
+
snap: ['start', 'end', 'center', 'align-none']
|
|
3997
|
+
}],
|
|
3998
|
+
/**
|
|
3999
|
+
* Scroll Snap Stop
|
|
4000
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
4001
|
+
*/
|
|
4002
|
+
'snap-stop': [{
|
|
4003
|
+
snap: ['normal', 'always']
|
|
4004
|
+
}],
|
|
4005
|
+
/**
|
|
4006
|
+
* Scroll Snap Type
|
|
4007
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
4008
|
+
*/
|
|
4009
|
+
'snap-type': [{
|
|
4010
|
+
snap: ['none', 'x', 'y', 'both']
|
|
4011
|
+
}],
|
|
4012
|
+
/**
|
|
4013
|
+
* Scroll Snap Type Strictness
|
|
4014
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
4015
|
+
*/
|
|
4016
|
+
'snap-strictness': [{
|
|
4017
|
+
snap: ['mandatory', 'proximity']
|
|
4018
|
+
}],
|
|
4019
|
+
/**
|
|
4020
|
+
* Touch Action
|
|
4021
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4022
|
+
*/
|
|
4023
|
+
touch: [{
|
|
4024
|
+
touch: ['auto', 'none', 'manipulation']
|
|
4025
|
+
}],
|
|
4026
|
+
/**
|
|
4027
|
+
* Touch Action X
|
|
4028
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4029
|
+
*/
|
|
4030
|
+
'touch-x': [{
|
|
4031
|
+
'touch-pan': ['x', 'left', 'right']
|
|
4032
|
+
}],
|
|
4033
|
+
/**
|
|
4034
|
+
* Touch Action Y
|
|
4035
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4036
|
+
*/
|
|
4037
|
+
'touch-y': [{
|
|
4038
|
+
'touch-pan': ['y', 'up', 'down']
|
|
4039
|
+
}],
|
|
4040
|
+
/**
|
|
4041
|
+
* Touch Action Pinch Zoom
|
|
4042
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4043
|
+
*/
|
|
4044
|
+
'touch-pz': ['touch-pinch-zoom'],
|
|
4045
|
+
/**
|
|
4046
|
+
* User Select
|
|
4047
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
4048
|
+
*/
|
|
4049
|
+
select: [{
|
|
4050
|
+
select: ['none', 'text', 'all', 'auto']
|
|
4051
|
+
}],
|
|
4052
|
+
/**
|
|
4053
|
+
* Will Change
|
|
4054
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
4055
|
+
*/
|
|
4056
|
+
'will-change': [{
|
|
4057
|
+
'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]
|
|
4058
|
+
}],
|
|
4059
|
+
// -----------
|
|
4060
|
+
// --- SVG ---
|
|
4061
|
+
// -----------
|
|
4062
|
+
/**
|
|
4063
|
+
* Fill
|
|
4064
|
+
* @see https://tailwindcss.com/docs/fill
|
|
4065
|
+
*/
|
|
4066
|
+
fill: [{
|
|
4067
|
+
fill: ['none', ...scaleColor()]
|
|
4068
|
+
}],
|
|
4069
|
+
/**
|
|
4070
|
+
* Stroke Width
|
|
4071
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
4072
|
+
*/
|
|
4073
|
+
'stroke-w': [{
|
|
4074
|
+
stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
|
|
4075
|
+
}],
|
|
4076
|
+
/**
|
|
4077
|
+
* Stroke
|
|
4078
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
4079
|
+
*/
|
|
4080
|
+
stroke: [{
|
|
4081
|
+
stroke: ['none', ...scaleColor()]
|
|
4082
|
+
}],
|
|
4083
|
+
// ---------------------
|
|
4084
|
+
// --- Accessibility ---
|
|
4085
|
+
// ---------------------
|
|
4086
|
+
/**
|
|
4087
|
+
* Forced Color Adjust
|
|
4088
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
4089
|
+
*/
|
|
4090
|
+
'forced-color-adjust': [{
|
|
4091
|
+
'forced-color-adjust': ['auto', 'none']
|
|
4092
|
+
}]
|
|
4093
|
+
},
|
|
4094
|
+
conflictingClassGroups: {
|
|
4095
|
+
overflow: ['overflow-x', 'overflow-y'],
|
|
4096
|
+
overscroll: ['overscroll-x', 'overscroll-y'],
|
|
4097
|
+
inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
|
|
4098
|
+
'inset-x': ['right', 'left'],
|
|
4099
|
+
'inset-y': ['top', 'bottom'],
|
|
4100
|
+
flex: ['basis', 'grow', 'shrink'],
|
|
4101
|
+
gap: ['gap-x', 'gap-y'],
|
|
4102
|
+
p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
|
|
4103
|
+
px: ['pr', 'pl'],
|
|
4104
|
+
py: ['pt', 'pb'],
|
|
4105
|
+
m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
|
|
4106
|
+
mx: ['mr', 'ml'],
|
|
4107
|
+
my: ['mt', 'mb'],
|
|
4108
|
+
size: ['w', 'h'],
|
|
4109
|
+
'font-size': ['leading'],
|
|
4110
|
+
'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
|
|
4111
|
+
'fvn-ordinal': ['fvn-normal'],
|
|
4112
|
+
'fvn-slashed-zero': ['fvn-normal'],
|
|
4113
|
+
'fvn-figure': ['fvn-normal'],
|
|
4114
|
+
'fvn-spacing': ['fvn-normal'],
|
|
4115
|
+
'fvn-fraction': ['fvn-normal'],
|
|
4116
|
+
'line-clamp': ['display', 'overflow'],
|
|
4117
|
+
rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],
|
|
4118
|
+
'rounded-s': ['rounded-ss', 'rounded-es'],
|
|
4119
|
+
'rounded-e': ['rounded-se', 'rounded-ee'],
|
|
4120
|
+
'rounded-t': ['rounded-tl', 'rounded-tr'],
|
|
4121
|
+
'rounded-r': ['rounded-tr', 'rounded-br'],
|
|
4122
|
+
'rounded-b': ['rounded-br', 'rounded-bl'],
|
|
4123
|
+
'rounded-l': ['rounded-tl', 'rounded-bl'],
|
|
4124
|
+
'border-spacing': ['border-spacing-x', 'border-spacing-y'],
|
|
4125
|
+
'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
|
4126
|
+
'border-w-x': ['border-w-r', 'border-w-l'],
|
|
4127
|
+
'border-w-y': ['border-w-t', 'border-w-b'],
|
|
4128
|
+
'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
|
4129
|
+
'border-color-x': ['border-color-r', 'border-color-l'],
|
|
4130
|
+
'border-color-y': ['border-color-t', 'border-color-b'],
|
|
4131
|
+
translate: ['translate-x', 'translate-y', 'translate-none'],
|
|
4132
|
+
'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
|
|
4133
|
+
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
|
|
4134
|
+
'scroll-mx': ['scroll-mr', 'scroll-ml'],
|
|
4135
|
+
'scroll-my': ['scroll-mt', 'scroll-mb'],
|
|
4136
|
+
'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
|
|
4137
|
+
'scroll-px': ['scroll-pr', 'scroll-pl'],
|
|
4138
|
+
'scroll-py': ['scroll-pt', 'scroll-pb'],
|
|
4139
|
+
touch: ['touch-x', 'touch-y', 'touch-pz'],
|
|
4140
|
+
'touch-x': ['touch'],
|
|
4141
|
+
'touch-y': ['touch'],
|
|
4142
|
+
'touch-pz': ['touch']
|
|
4143
|
+
},
|
|
4144
|
+
conflictingClassGroupModifiers: {
|
|
4145
|
+
'font-size': ['leading']
|
|
4146
|
+
},
|
|
4147
|
+
orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']
|
|
4148
|
+
};
|
|
4149
|
+
};
|
|
4150
|
+
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
|
|
4151
|
+
|
|
4152
|
+
function cn(...inputs) {
|
|
4153
|
+
return twMerge(clsx(inputs));
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
const _excluded$3 = ["className", "variant"],
|
|
4157
|
+
_excluded2 = ["className"],
|
|
4158
|
+
_excluded3 = ["className"];
|
|
4159
|
+
const alertVariants = cva('relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current', {
|
|
4160
|
+
variants: {
|
|
4161
|
+
variant: {
|
|
4162
|
+
default: 'bg-card text-card-foreground',
|
|
4163
|
+
destructive: 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90'
|
|
4164
|
+
}
|
|
4165
|
+
},
|
|
4166
|
+
defaultVariants: {
|
|
4167
|
+
variant: 'default'
|
|
4168
|
+
}
|
|
4169
|
+
});
|
|
4170
|
+
function Alert(_ref) {
|
|
4171
|
+
let {
|
|
4172
|
+
className,
|
|
4173
|
+
variant
|
|
4174
|
+
} = _ref,
|
|
4175
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
4176
|
+
return jsx("div", Object.assign({
|
|
4177
|
+
"data-slot": "alert",
|
|
4178
|
+
role: "alert",
|
|
4179
|
+
className: cn(alertVariants({
|
|
4180
|
+
variant
|
|
4181
|
+
}), className)
|
|
4182
|
+
}, props));
|
|
4183
|
+
}
|
|
4184
|
+
function AlertTitle(_ref2) {
|
|
4185
|
+
let {
|
|
4186
|
+
className
|
|
4187
|
+
} = _ref2,
|
|
4188
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
4189
|
+
return jsx("div", Object.assign({
|
|
4190
|
+
"data-slot": "alert-title",
|
|
4191
|
+
className: cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)
|
|
4192
|
+
}, props));
|
|
4193
|
+
}
|
|
4194
|
+
function AlertDescription(_ref3) {
|
|
4195
|
+
let {
|
|
4196
|
+
className
|
|
4197
|
+
} = _ref3,
|
|
4198
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
4199
|
+
return jsx("div", Object.assign({
|
|
4200
|
+
"data-slot": "alert-description",
|
|
4201
|
+
className: cn('text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', className)
|
|
4202
|
+
}, props));
|
|
4203
|
+
}
|
|
4204
|
+
|
|
4205
|
+
// packages/react/compose-refs/src/compose-refs.tsx
|
|
4206
|
+
function setRef(ref, value) {
|
|
4207
|
+
if (typeof ref === "function") {
|
|
4208
|
+
return ref(value);
|
|
4209
|
+
} else if (ref !== null && ref !== void 0) {
|
|
4210
|
+
ref.current = value;
|
|
4211
|
+
}
|
|
4212
|
+
}
|
|
4213
|
+
function composeRefs(...refs) {
|
|
4214
|
+
return (node) => {
|
|
4215
|
+
let hasCleanup = false;
|
|
4216
|
+
const cleanups = refs.map((ref) => {
|
|
4217
|
+
const cleanup = setRef(ref, node);
|
|
4218
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
4219
|
+
hasCleanup = true;
|
|
4220
|
+
}
|
|
4221
|
+
return cleanup;
|
|
4222
|
+
});
|
|
4223
|
+
if (hasCleanup) {
|
|
4224
|
+
return () => {
|
|
4225
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
4226
|
+
const cleanup = cleanups[i];
|
|
4227
|
+
if (typeof cleanup == "function") {
|
|
4228
|
+
cleanup();
|
|
4229
|
+
} else {
|
|
4230
|
+
setRef(refs[i], null);
|
|
4231
|
+
}
|
|
4232
|
+
}
|
|
4233
|
+
};
|
|
4234
|
+
}
|
|
4235
|
+
};
|
|
4236
|
+
}
|
|
4237
|
+
|
|
4238
|
+
// src/slot.tsx
|
|
4239
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
4240
|
+
var use = React[" use ".trim().toString()];
|
|
4241
|
+
function isPromiseLike(value) {
|
|
4242
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
4243
|
+
}
|
|
4244
|
+
function isLazyComponent(element) {
|
|
4245
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
4246
|
+
}
|
|
4247
|
+
// @__NO_SIDE_EFFECTS__
|
|
4248
|
+
function createSlot(ownerName) {
|
|
4249
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
4250
|
+
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
4251
|
+
let { children, ...slotProps } = props;
|
|
4252
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
4253
|
+
children = use(children._payload);
|
|
4254
|
+
}
|
|
4255
|
+
const childrenArray = React.Children.toArray(children);
|
|
4256
|
+
const slottable = childrenArray.find(isSlottable);
|
|
4257
|
+
if (slottable) {
|
|
4258
|
+
const newElement = slottable.props.children;
|
|
4259
|
+
const newChildren = childrenArray.map((child) => {
|
|
4260
|
+
if (child === slottable) {
|
|
4261
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
4262
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
4263
|
+
} else {
|
|
4264
|
+
return child;
|
|
4265
|
+
}
|
|
4266
|
+
});
|
|
4267
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
4268
|
+
}
|
|
4269
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
4270
|
+
});
|
|
4271
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
4272
|
+
return Slot2;
|
|
4273
|
+
}
|
|
4274
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
4275
|
+
// @__NO_SIDE_EFFECTS__
|
|
4276
|
+
function createSlotClone(ownerName) {
|
|
4277
|
+
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
4278
|
+
let { children, ...slotProps } = props;
|
|
4279
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
4280
|
+
children = use(children._payload);
|
|
4281
|
+
}
|
|
4282
|
+
if (React.isValidElement(children)) {
|
|
4283
|
+
const childrenRef = getElementRef(children);
|
|
4284
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
4285
|
+
if (children.type !== React.Fragment) {
|
|
4286
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
4287
|
+
}
|
|
4288
|
+
return React.cloneElement(children, props2);
|
|
4289
|
+
}
|
|
4290
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
4291
|
+
});
|
|
4292
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
4293
|
+
return SlotClone;
|
|
4294
|
+
}
|
|
4295
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
4296
|
+
function isSlottable(child) {
|
|
4297
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
4298
|
+
}
|
|
4299
|
+
function mergeProps(slotProps, childProps) {
|
|
4300
|
+
const overrideProps = { ...childProps };
|
|
4301
|
+
for (const propName in childProps) {
|
|
4302
|
+
const slotPropValue = slotProps[propName];
|
|
4303
|
+
const childPropValue = childProps[propName];
|
|
4304
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
4305
|
+
if (isHandler) {
|
|
4306
|
+
if (slotPropValue && childPropValue) {
|
|
4307
|
+
overrideProps[propName] = (...args) => {
|
|
4308
|
+
const result = childPropValue(...args);
|
|
4309
|
+
slotPropValue(...args);
|
|
4310
|
+
return result;
|
|
4311
|
+
};
|
|
4312
|
+
} else if (slotPropValue) {
|
|
4313
|
+
overrideProps[propName] = slotPropValue;
|
|
4314
|
+
}
|
|
4315
|
+
} else if (propName === "style") {
|
|
4316
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
4317
|
+
} else if (propName === "className") {
|
|
4318
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
return { ...slotProps, ...overrideProps };
|
|
4322
|
+
}
|
|
4323
|
+
function getElementRef(element) {
|
|
4324
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
4325
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
4326
|
+
if (mayWarn) {
|
|
4327
|
+
return element.ref;
|
|
4328
|
+
}
|
|
4329
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
4330
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
4331
|
+
if (mayWarn) {
|
|
4332
|
+
return element.props.ref;
|
|
4333
|
+
}
|
|
4334
|
+
return element.props.ref || element.ref;
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
const _excluded$2 = ["className", "variant", "size", "asChild"];
|
|
4338
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
4339
|
+
variants: {
|
|
4340
|
+
variant: {
|
|
4341
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
4342
|
+
destructive: 'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
4343
|
+
outline: 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
4344
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
4345
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
4346
|
+
link: 'text-primary underline-offset-4 hover:underline'
|
|
4347
|
+
},
|
|
4348
|
+
size: {
|
|
4349
|
+
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
4350
|
+
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
4351
|
+
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
4352
|
+
icon: 'size-9',
|
|
4353
|
+
'icon-sm': 'size-8',
|
|
4354
|
+
'icon-lg': 'size-10'
|
|
4355
|
+
}
|
|
4356
|
+
},
|
|
4357
|
+
defaultVariants: {
|
|
4358
|
+
variant: 'default',
|
|
4359
|
+
size: 'default'
|
|
4360
|
+
}
|
|
4361
|
+
});
|
|
4362
|
+
function Button(_ref) {
|
|
4363
|
+
let {
|
|
4364
|
+
className,
|
|
4365
|
+
variant = 'default',
|
|
4366
|
+
size = 'default',
|
|
4367
|
+
asChild = false
|
|
4368
|
+
} = _ref,
|
|
4369
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
4370
|
+
const Comp = asChild ? Slot : 'button';
|
|
4371
|
+
return jsx(Comp, Object.assign({
|
|
4372
|
+
"data-slot": "button",
|
|
4373
|
+
"data-variant": variant,
|
|
4374
|
+
"data-size": size,
|
|
4375
|
+
className: cn(buttonVariants({
|
|
4376
|
+
variant,
|
|
4377
|
+
size,
|
|
4378
|
+
className
|
|
4379
|
+
}))
|
|
4380
|
+
}, props));
|
|
4381
|
+
}
|
|
4382
|
+
|
|
4383
|
+
const _excluded$1 = ["className", "type"];
|
|
4384
|
+
function Input(_ref) {
|
|
4385
|
+
let {
|
|
4386
|
+
className,
|
|
4387
|
+
type
|
|
4388
|
+
} = _ref,
|
|
4389
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
4390
|
+
return jsx("input", Object.assign({
|
|
4391
|
+
type: type,
|
|
4392
|
+
"data-slot": "input",
|
|
4393
|
+
className: cn('file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', className)
|
|
4394
|
+
}, props));
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
const _excluded = ["className"];
|
|
4398
|
+
function Textarea(_ref) {
|
|
4399
|
+
let {
|
|
4400
|
+
className
|
|
4401
|
+
} = _ref,
|
|
4402
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
4403
|
+
return jsx("textarea", Object.assign({
|
|
4404
|
+
"data-slot": "textarea",
|
|
4405
|
+
className: cn('border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', className)
|
|
4406
|
+
}, props));
|
|
4407
|
+
}
|
|
4408
|
+
|
|
4409
|
+
export { Alert, AlertDescription, AlertTitle, Button, Input, Textarea, buttonVariants };
|