denwa-web-shared 1.0.60 → 1.0.62

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.
Files changed (61) hide show
  1. package/dist/client/index.cjs.js +198 -3337
  2. package/dist/client/index.es.js +198 -3348
  3. package/dist/denwa-web-shared.cjs.js +1 -1
  4. package/dist/denwa-web-shared.es.js +0 -1
  5. package/dist/server/denwa-web-shared.css +1 -0
  6. package/dist/server/index.cjs.js +1219 -7089
  7. package/dist/server/index.es.js +1195 -7130
  8. package/dist/server/lib/index.d.ts +1 -0
  9. package/dist/server/lib/openapi-axios/const/defaultOptions.d.ts +5 -0
  10. package/dist/server/lib/openapi-axios/const/methods.d.ts +18 -0
  11. package/dist/server/lib/openapi-axios/index.d.ts +80 -0
  12. package/dist/server/lib/openapi-axios/interpolate-params.d.ts +11 -0
  13. package/dist/server/lib/openapi-axios/types/options.d.ts +27 -0
  14. package/dist/server/lib/openapi-axios/types/requestParameters.d.ts +22 -0
  15. package/dist/server/lib/openapi-axios/types/response.d.ts +100 -0
  16. package/dist/server/lib/openapi-axios/types/schemeTypes.d.ts +69 -0
  17. package/dist/server/lib/openapi-axios/types/serializer.d.ts +21 -0
  18. package/dist/server/lib/openapi-axios/types/utils.d.ts +44 -0
  19. package/dist/server/lib/openapi-axios/utils/querySerializer.d.ts +3 -0
  20. package/dist/server/lib/openapi-axios/utils/response-converters/convertToAll.d.ts +5 -0
  21. package/dist/server/lib/openapi-axios/utils/response-converters/convertToAxios.d.ts +5 -0
  22. package/dist/server/lib/openapi-axios/utils/response-converters/convertToFetch.d.ts +5 -0
  23. package/dist/src/client/hooks/index.d.ts +4 -0
  24. package/dist/src/client/hooks/use-appear-animation.d.ts +17 -0
  25. package/dist/src/client/hooks/use-disable-scroll.d.ts +1 -0
  26. package/dist/src/client/hooks/use-is-client.d.ts +1 -0
  27. package/dist/src/client/hooks/use-view-port.d.ts +24 -0
  28. package/dist/src/client/index.d.ts +2 -0
  29. package/dist/src/client/ui/animated-div.d.ts +8 -0
  30. package/dist/src/client/ui/header-wrapper.d.ts +10 -0
  31. package/dist/src/client/ui/index.d.ts +2 -0
  32. package/dist/src/client/ui/infinity-list.d.ts +10 -0
  33. package/dist/src/server/constants/index.d.ts +45 -0
  34. package/dist/src/server/index.d.ts +5 -0
  35. package/dist/src/server/lib/css.d.ts +2 -0
  36. package/dist/src/server/lib/files.d.ts +82 -0
  37. package/dist/src/server/lib/index.d.ts +4 -0
  38. package/dist/src/server/lib/openapi-axios/const/defaultOptions.d.ts +5 -0
  39. package/dist/src/server/lib/openapi-axios/const/methods.d.ts +18 -0
  40. package/dist/src/server/lib/openapi-axios/index.d.ts +80 -0
  41. package/dist/src/server/lib/openapi-axios/interpolate-params.d.ts +11 -0
  42. package/dist/src/server/lib/openapi-axios/types/options.d.ts +27 -0
  43. package/dist/src/server/lib/openapi-axios/types/requestParameters.d.ts +22 -0
  44. package/dist/src/server/lib/openapi-axios/types/response.d.ts +100 -0
  45. package/dist/src/server/lib/openapi-axios/types/schemeTypes.d.ts +69 -0
  46. package/dist/src/server/lib/openapi-axios/types/serializer.d.ts +21 -0
  47. package/dist/src/server/lib/openapi-axios/types/utils.d.ts +44 -0
  48. package/dist/src/server/lib/openapi-axios/utils/querySerializer.d.ts +3 -0
  49. package/dist/src/server/lib/openapi-axios/utils/response-converters/convertToAll.d.ts +5 -0
  50. package/dist/src/server/lib/openapi-axios/utils/response-converters/convertToAxios.d.ts +5 -0
  51. package/dist/src/server/lib/openapi-axios/utils/response-converters/convertToFetch.d.ts +5 -0
  52. package/dist/src/server/lib/utils.d.ts +253 -0
  53. package/dist/src/server/schemas/index.d.ts +31 -0
  54. package/dist/src/server/types/index.d.ts +70 -0
  55. package/dist/src/server/types/picture-data.d.ts +14 -0
  56. package/dist/src/server/ui/container.d.ts +5 -0
  57. package/dist/src/server/ui/image.d.ts +25 -0
  58. package/dist/src/server/ui/index.d.ts +3 -0
  59. package/dist/src/server/ui/video.d.ts +2 -0
  60. package/package.json +31 -28
  61. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
@@ -1,3351 +1,201 @@
1
- import { useEffect, useState, useRef, useCallback } from "react";
1
+ import { useEffect, useRef, useState } from "react";
2
+ import { useIntersection, useMedia, useWindowScroll } from "react-use";
3
+ import { useInView } from "motion/react";
4
+ import { clsx } from "clsx";
5
+ import { twMerge } from "tailwind-merge";
2
6
  import { jsx, jsxs } from "react/jsx-runtime";
3
- const useDisableScroll = (isDisableScroll) => {
4
- useEffect(() => {
5
- if (!isDisableScroll) return;
6
- const scrollPosition = window.scrollY;
7
- return () => {
8
- window.scrollTo(0, scrollPosition);
9
- };
10
- }, []);
11
- };
12
- const useIsClient = () => {
13
- const [isClient, setIsClient] = useState(false);
14
- useEffect(() => {
15
- setIsClient(true);
16
- }, []);
17
- return isClient;
18
- };
19
- function on(obj) {
20
- var args = [];
21
- for (var _i = 1; _i < arguments.length; _i++) {
22
- args[_i - 1] = arguments[_i];
23
- }
24
- if (obj && obj.addEventListener) {
25
- obj.addEventListener.apply(obj, args);
26
- }
27
- }
28
- function off(obj) {
29
- var args = [];
30
- for (var _i = 1; _i < arguments.length; _i++) {
31
- args[_i - 1] = arguments[_i];
32
- }
33
- if (obj && obj.removeEventListener) {
34
- obj.removeEventListener.apply(obj, args);
35
- }
36
- }
37
- var isBrowser = typeof window !== "undefined";
38
- var useEffectOnce = function(effect) {
39
- useEffect(effect, []);
40
- };
41
- var useIntersection = function(ref, options) {
42
- var _a = useState(null), intersectionObserverEntry = _a[0], setIntersectionObserverEntry = _a[1];
43
- useEffect(function() {
44
- if (ref.current && typeof IntersectionObserver === "function") {
45
- var handler = function(entries) {
46
- setIntersectionObserverEntry(entries[0]);
47
- };
48
- var observer_1 = new IntersectionObserver(handler, options);
49
- observer_1.observe(ref.current);
50
- return function() {
51
- setIntersectionObserverEntry(null);
52
- observer_1.disconnect();
53
- };
54
- }
55
- return function() {
56
- };
57
- }, [ref.current, options.threshold, options.root, options.rootMargin]);
58
- return intersectionObserverEntry;
59
- };
60
- var getInitialState = function(query, defaultState) {
61
- if (isBrowser) {
62
- return window.matchMedia(query).matches;
63
- }
64
- if (process.env.NODE_ENV !== "production") {
65
- console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches.");
66
- }
67
- return false;
68
- };
69
- var useMedia = function(query, defaultState) {
70
- var _a = useState(getInitialState(query)), state = _a[0], setState = _a[1];
71
- useEffect(function() {
72
- var mounted = true;
73
- var mql = window.matchMedia(query);
74
- var onChange = function() {
75
- if (!mounted) {
76
- return;
77
- }
78
- setState(!!mql.matches);
79
- };
80
- mql.addEventListener("change", onChange);
81
- setState(mql.matches);
82
- return function() {
83
- mounted = false;
84
- mql.removeEventListener("change", onChange);
85
- };
86
- }, [query]);
87
- return state;
88
- };
89
- var useUnmount = function(fn) {
90
- var fnRef = useRef(fn);
91
- fnRef.current = fn;
92
- useEffectOnce(function() {
93
- return function() {
94
- return fnRef.current();
95
- };
96
- });
97
- };
98
- var useRafState = function(initialState) {
99
- var frame = useRef(0);
100
- var _a = useState(initialState), state = _a[0], setState = _a[1];
101
- var setRafState = useCallback(function(value) {
102
- cancelAnimationFrame(frame.current);
103
- frame.current = requestAnimationFrame(function() {
104
- setState(value);
105
- });
106
- }, []);
107
- useUnmount(function() {
108
- cancelAnimationFrame(frame.current);
109
- });
110
- return [state, setRafState];
111
- };
112
- var useWindowScroll = function() {
113
- var _a = useRafState(function() {
114
- return {
115
- x: isBrowser ? window.pageXOffset : 0,
116
- y: isBrowser ? window.pageYOffset : 0
117
- };
118
- }), state = _a[0], setState = _a[1];
119
- useEffect(function() {
120
- var handler = function() {
121
- setState(function(state2) {
122
- var pageXOffset = window.pageXOffset, pageYOffset = window.pageYOffset;
123
- return state2.x !== pageXOffset || state2.y !== pageYOffset ? {
124
- x: pageXOffset,
125
- y: pageYOffset
126
- } : state2;
127
- });
128
- };
129
- handler();
130
- on(window, "scroll", handler, {
131
- capture: false,
132
- passive: true
133
- });
134
- return function() {
135
- off(window, "scroll", handler);
136
- };
137
- }, []);
138
- return state;
139
- };
140
- const THEME = {
141
- VIEW_PORT: {
142
- SMALL: 320,
143
- MOBILE: 450,
144
- EXTRA_MEDIUM: 600,
145
- TABLET: 768,
146
- LAPTOP: 1024,
147
- LAPTOP_BIG: 1200
148
- }
149
- };
150
- const useLaptopBigViewPort = () => {
151
- const isLaptopBigMinWidth = useMedia(`(min-width: ${THEME.VIEW_PORT.LAPTOP_BIG}px)`);
152
- const isLaptopBigMaxWidth = useMedia(`(max-width: ${THEME.VIEW_PORT.LAPTOP_BIG}px)`);
153
- return {
154
- isLaptopBigMinWidth,
155
- isLaptopBigMaxWidth
156
- };
157
- };
158
- const useLaptopViewPort = () => {
159
- const isLaptopMinWidth = useMedia(`(min-width: ${THEME.VIEW_PORT.LAPTOP}px)`);
160
- const isLaptopMaxWidth = useMedia(`(max-width: ${THEME.VIEW_PORT.LAPTOP}px)`);
161
- return {
162
- isLaptopMinWidth,
163
- isLaptopMaxWidth
164
- };
165
- };
166
- const useTabletViewPort = () => {
167
- const isTabletMinWidth = useMedia(`(min-width: ${THEME.VIEW_PORT.TABLET}px)`);
168
- const isTabletMaxWidth = useMedia(`(max-width: ${THEME.VIEW_PORT.TABLET}px)`);
169
- return {
170
- isTabletMinWidth,
171
- isTabletMaxWidth
172
- };
173
- };
174
- const useExtraMediumViewPort = () => {
175
- const isExtraMediumMinWidth = useMedia(`(min-width: ${THEME.VIEW_PORT.EXTRA_MEDIUM}px)`);
176
- const isExtraMediumMaxWidth = useMedia(`(max-width: ${THEME.VIEW_PORT.EXTRA_MEDIUM}px)`);
177
- return {
178
- isExtraMediumMinWidth,
179
- isExtraMediumMaxWidth
180
- };
181
- };
182
- const useMobileViewPort = () => {
183
- const isMobileMinWidth = useMedia(`(min-width: ${THEME.VIEW_PORT.MOBILE}px)`);
184
- const isMobileMaxWidth = useMedia(`(max-width: ${THEME.VIEW_PORT.MOBILE}px)`);
185
- return {
186
- isMobileMinWidth,
187
- isMobileMaxWidth
188
- };
189
- };
190
- const useSmallViewPort = () => {
191
- const isSmallMinWidth = useMedia(`(min-width: ${THEME.VIEW_PORT.SMALL}px)`);
192
- const isSmallMaxWidth = useMedia(`(max-width: ${THEME.VIEW_PORT.SMALL}px)`);
193
- return {
194
- isSmallMinWidth,
195
- isSmallMaxWidth
196
- };
197
- };
198
- function resolveElements(elementOrSelector, scope, selectorCache) {
199
- if (elementOrSelector == null) {
200
- return [];
201
- }
202
- if (elementOrSelector instanceof EventTarget) {
203
- return [elementOrSelector];
204
- } else if (typeof elementOrSelector === "string") {
205
- let root = document;
206
- const elements = root.querySelectorAll(elementOrSelector);
207
- return elements ? Array.from(elements) : [];
208
- }
209
- return Array.from(elementOrSelector).filter((element) => element != null);
210
- }
211
- const thresholds = {
212
- some: 0,
213
- all: 1
214
- };
215
- function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = "some" } = {}) {
216
- const elements = resolveElements(elementOrSelector);
217
- const activeIntersections = /* @__PURE__ */ new WeakMap();
218
- const onIntersectionChange = (entries) => {
219
- entries.forEach((entry) => {
220
- const onEnd = activeIntersections.get(entry.target);
221
- if (entry.isIntersecting === Boolean(onEnd))
222
- return;
223
- if (entry.isIntersecting) {
224
- const newOnEnd = onStart(entry.target, entry);
225
- if (typeof newOnEnd === "function") {
226
- activeIntersections.set(entry.target, newOnEnd);
227
- } else {
228
- observer.unobserve(entry.target);
229
- }
230
- } else if (typeof onEnd === "function") {
231
- onEnd(entry);
232
- activeIntersections.delete(entry.target);
233
- }
234
- });
235
- };
236
- const observer = new IntersectionObserver(onIntersectionChange, {
237
- root,
238
- rootMargin,
239
- threshold: typeof amount === "number" ? amount : thresholds[amount]
240
- });
241
- elements.forEach((element) => observer.observe(element));
242
- return () => observer.disconnect();
243
- }
244
- function useInView(ref, { root, margin, amount, once = false, initial = false } = {}) {
245
- const [isInView, setInView] = useState(initial);
246
- useEffect(() => {
247
- if (!ref.current || once && isInView)
248
- return;
249
- const onEnter = () => {
250
- setInView(true);
251
- return once ? void 0 : () => setInView(false);
252
- };
253
- const options = {
254
- root: root && root.current || void 0,
255
- margin,
256
- amount
257
- };
258
- return inView(ref.current, onEnter, options);
259
- }, [root, ref, margin, once, amount]);
260
- return isInView;
261
- }
262
- const useAppearAnimation = ({
263
- once = true,
264
- margin = "-100px",
265
- delay = 0.1,
266
- direction = "up",
267
- animationDistance = 50,
268
- duration = 0.8,
269
- ease = "easeOut"
270
- } = {}) => {
271
- const ref = useRef(null);
272
- const isInView = useInView(ref, { once, margin });
273
- const getInitialState2 = () => {
274
- switch (direction) {
275
- case "up":
276
- return { opacity: 0, y: animationDistance };
277
- case "down":
278
- return { opacity: 0, y: -animationDistance };
279
- case "left":
280
- return { opacity: 0, x: animationDistance };
281
- case "right":
282
- return { opacity: 0, x: -animationDistance };
283
- case "scale":
284
- return { opacity: 0, scale: 0.8 };
285
- case "fade":
286
- return { opacity: 0 };
287
- default:
288
- return { opacity: 0, y: animationDistance };
289
- }
290
- };
291
- const getAnimateState = () => {
292
- switch (direction) {
293
- case "up":
294
- case "down":
295
- return { opacity: 1, y: 0 };
296
- case "left":
297
- case "right":
298
- return { opacity: 1, x: 0 };
299
- case "scale":
300
- return { opacity: 1, scale: 1 };
301
- case "fade":
302
- return { opacity: 1 };
303
- default:
304
- return { opacity: 1, y: 0 };
305
- }
306
- };
307
- const motionProps = {
308
- initial: getInitialState2(),
309
- animate: isInView ? getAnimateState() : void 0,
310
- transition: {
311
- duration,
312
- ease,
313
- delay
314
- }
315
- };
316
- return { ref, isInView, motionProps };
317
- };
318
- function r(e) {
319
- var t, f, n = "";
320
- if ("string" == typeof e || "number" == typeof e) n += e;
321
- else if ("object" == typeof e) if (Array.isArray(e)) {
322
- var o = e.length;
323
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
324
- } else for (f in e) e[f] && (n && (n += " "), n += f);
325
- return n;
326
- }
327
- function clsx() {
328
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
329
- return n;
330
- }
331
- const CLASS_PART_SEPARATOR = "-";
332
- const createClassGroupUtils = (config) => {
333
- const classMap = createClassMap(config);
334
- const {
335
- conflictingClassGroups,
336
- conflictingClassGroupModifiers
337
- } = config;
338
- const getClassGroupId = (className) => {
339
- const classParts = className.split(CLASS_PART_SEPARATOR);
340
- if (classParts[0] === "" && classParts.length !== 1) {
341
- classParts.shift();
342
- }
343
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
344
- };
345
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
346
- const conflicts = conflictingClassGroups[classGroupId] || [];
347
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
348
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
349
- }
350
- return conflicts;
351
- };
352
- return {
353
- getClassGroupId,
354
- getConflictingClassGroupIds
355
- };
356
- };
357
- const getGroupRecursive = (classParts, classPartObject) => {
358
- var _a;
359
- if (classParts.length === 0) {
360
- return classPartObject.classGroupId;
361
- }
362
- const currentClassPart = classParts[0];
363
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
364
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
365
- if (classGroupFromNextClassPart) {
366
- return classGroupFromNextClassPart;
367
- }
368
- if (classPartObject.validators.length === 0) {
369
- return void 0;
370
- }
371
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
372
- return (_a = classPartObject.validators.find(({
373
- validator
374
- }) => validator(classRest))) == null ? void 0 : _a.classGroupId;
375
- };
376
- const arbitraryPropertyRegex = /^\[(.+)\]$/;
377
- const getGroupIdForArbitraryProperty = (className) => {
378
- if (arbitraryPropertyRegex.test(className)) {
379
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
380
- const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
381
- if (property) {
382
- return "arbitrary.." + property;
383
- }
384
- }
385
- };
386
- const createClassMap = (config) => {
387
- const {
388
- theme,
389
- classGroups
390
- } = config;
391
- const classMap = {
392
- nextPart: /* @__PURE__ */ new Map(),
393
- validators: []
394
- };
395
- for (const classGroupId in classGroups) {
396
- processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
397
- }
398
- return classMap;
399
- };
400
- const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
401
- classGroup.forEach((classDefinition) => {
402
- if (typeof classDefinition === "string") {
403
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
404
- classPartObjectToEdit.classGroupId = classGroupId;
405
- return;
406
- }
407
- if (typeof classDefinition === "function") {
408
- if (isThemeGetter(classDefinition)) {
409
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
410
- return;
411
- }
412
- classPartObject.validators.push({
413
- validator: classDefinition,
414
- classGroupId
415
- });
416
- return;
417
- }
418
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
419
- processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
420
- });
421
- });
422
- };
423
- const getPart = (classPartObject, path) => {
424
- let currentClassPartObject = classPartObject;
425
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
426
- if (!currentClassPartObject.nextPart.has(pathPart)) {
427
- currentClassPartObject.nextPart.set(pathPart, {
428
- nextPart: /* @__PURE__ */ new Map(),
429
- validators: []
430
- });
431
- }
432
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
433
- });
434
- return currentClassPartObject;
435
- };
436
- const isThemeGetter = (func) => func.isThemeGetter;
437
- const createLruCache = (maxCacheSize) => {
438
- if (maxCacheSize < 1) {
439
- return {
440
- get: () => void 0,
441
- set: () => {
442
- }
443
- };
444
- }
445
- let cacheSize = 0;
446
- let cache = /* @__PURE__ */ new Map();
447
- let previousCache = /* @__PURE__ */ new Map();
448
- const update = (key, value) => {
449
- cache.set(key, value);
450
- cacheSize++;
451
- if (cacheSize > maxCacheSize) {
452
- cacheSize = 0;
453
- previousCache = cache;
454
- cache = /* @__PURE__ */ new Map();
455
- }
456
- };
457
- return {
458
- get(key) {
459
- let value = cache.get(key);
460
- if (value !== void 0) {
461
- return value;
462
- }
463
- if ((value = previousCache.get(key)) !== void 0) {
464
- update(key, value);
465
- return value;
466
- }
467
- },
468
- set(key, value) {
469
- if (cache.has(key)) {
470
- cache.set(key, value);
471
- } else {
472
- update(key, value);
473
- }
474
- }
475
- };
476
- };
477
- const IMPORTANT_MODIFIER = "!";
478
- const MODIFIER_SEPARATOR = ":";
479
- const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
480
- const createParseClassName = (config) => {
481
- const {
482
- prefix,
483
- experimentalParseClassName
484
- } = config;
485
- let parseClassName = (className) => {
486
- const modifiers = [];
487
- let bracketDepth = 0;
488
- let parenDepth = 0;
489
- let modifierStart = 0;
490
- let postfixModifierPosition;
491
- for (let index = 0; index < className.length; index++) {
492
- let currentCharacter = className[index];
493
- if (bracketDepth === 0 && parenDepth === 0) {
494
- if (currentCharacter === MODIFIER_SEPARATOR) {
495
- modifiers.push(className.slice(modifierStart, index));
496
- modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
497
- continue;
498
- }
499
- if (currentCharacter === "/") {
500
- postfixModifierPosition = index;
501
- continue;
502
- }
503
- }
504
- if (currentCharacter === "[") {
505
- bracketDepth++;
506
- } else if (currentCharacter === "]") {
507
- bracketDepth--;
508
- } else if (currentCharacter === "(") {
509
- parenDepth++;
510
- } else if (currentCharacter === ")") {
511
- parenDepth--;
512
- }
513
- }
514
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
515
- const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
516
- const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
517
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
518
- return {
519
- modifiers,
520
- hasImportantModifier,
521
- baseClassName,
522
- maybePostfixModifierPosition
523
- };
524
- };
525
- if (prefix) {
526
- const fullPrefix = prefix + MODIFIER_SEPARATOR;
527
- const parseClassNameOriginal = parseClassName;
528
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
529
- isExternal: true,
530
- modifiers: [],
531
- hasImportantModifier: false,
532
- baseClassName: className,
533
- maybePostfixModifierPosition: void 0
534
- };
535
- }
536
- if (experimentalParseClassName) {
537
- const parseClassNameOriginal = parseClassName;
538
- parseClassName = (className) => experimentalParseClassName({
539
- className,
540
- parseClassName: parseClassNameOriginal
541
- });
542
- }
543
- return parseClassName;
544
- };
545
- const stripImportantModifier = (baseClassName) => {
546
- if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
547
- return baseClassName.substring(0, baseClassName.length - 1);
548
- }
549
- if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
550
- return baseClassName.substring(1);
551
- }
552
- return baseClassName;
553
- };
554
- const createSortModifiers = (config) => {
555
- const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map((modifier) => [modifier, true]));
556
- const sortModifiers = (modifiers) => {
557
- if (modifiers.length <= 1) {
558
- return modifiers;
559
- }
560
- const sortedModifiers = [];
561
- let unsortedModifiers = [];
562
- modifiers.forEach((modifier) => {
563
- const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
564
- if (isPositionSensitive) {
565
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
566
- unsortedModifiers = [];
567
- } else {
568
- unsortedModifiers.push(modifier);
569
- }
570
- });
571
- sortedModifiers.push(...unsortedModifiers.sort());
572
- return sortedModifiers;
573
- };
574
- return sortModifiers;
575
- };
576
- const createConfigUtils = (config) => ({
577
- cache: createLruCache(config.cacheSize),
578
- parseClassName: createParseClassName(config),
579
- sortModifiers: createSortModifiers(config),
580
- ...createClassGroupUtils(config)
581
- });
582
- const SPLIT_CLASSES_REGEX = /\s+/;
583
- const mergeClassList = (classList, configUtils) => {
584
- const {
585
- parseClassName,
586
- getClassGroupId,
587
- getConflictingClassGroupIds,
588
- sortModifiers
589
- } = configUtils;
590
- const classGroupsInConflict = [];
591
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
592
- let result = "";
593
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
594
- const originalClassName = classNames[index];
595
- const {
596
- isExternal,
597
- modifiers,
598
- hasImportantModifier,
599
- baseClassName,
600
- maybePostfixModifierPosition
601
- } = parseClassName(originalClassName);
602
- if (isExternal) {
603
- result = originalClassName + (result.length > 0 ? " " + result : result);
604
- continue;
605
- }
606
- let hasPostfixModifier = !!maybePostfixModifierPosition;
607
- let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
608
- if (!classGroupId) {
609
- if (!hasPostfixModifier) {
610
- result = originalClassName + (result.length > 0 ? " " + result : result);
611
- continue;
612
- }
613
- classGroupId = getClassGroupId(baseClassName);
614
- if (!classGroupId) {
615
- result = originalClassName + (result.length > 0 ? " " + result : result);
616
- continue;
617
- }
618
- hasPostfixModifier = false;
619
- }
620
- const variantModifier = sortModifiers(modifiers).join(":");
621
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
622
- const classId = modifierId + classGroupId;
623
- if (classGroupsInConflict.includes(classId)) {
624
- continue;
625
- }
626
- classGroupsInConflict.push(classId);
627
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
628
- for (let i = 0; i < conflictGroups.length; ++i) {
629
- const group = conflictGroups[i];
630
- classGroupsInConflict.push(modifierId + group);
631
- }
632
- result = originalClassName + (result.length > 0 ? " " + result : result);
633
- }
634
- return result;
635
- };
636
- function twJoin() {
637
- let index = 0;
638
- let argument;
639
- let resolvedValue;
640
- let string = "";
641
- while (index < arguments.length) {
642
- if (argument = arguments[index++]) {
643
- if (resolvedValue = toValue(argument)) {
644
- string && (string += " ");
645
- string += resolvedValue;
646
- }
647
- }
648
- }
649
- return string;
650
- }
651
- const toValue = (mix) => {
652
- if (typeof mix === "string") {
653
- return mix;
654
- }
655
- let resolvedValue;
656
- let string = "";
657
- for (let k = 0; k < mix.length; k++) {
658
- if (mix[k]) {
659
- if (resolvedValue = toValue(mix[k])) {
660
- string && (string += " ");
661
- string += resolvedValue;
662
- }
663
- }
664
- }
665
- return string;
666
- };
667
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
668
- let configUtils;
669
- let cacheGet;
670
- let cacheSet;
671
- let functionToCall = initTailwindMerge;
672
- function initTailwindMerge(classList) {
673
- const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
674
- configUtils = createConfigUtils(config);
675
- cacheGet = configUtils.cache.get;
676
- cacheSet = configUtils.cache.set;
677
- functionToCall = tailwindMerge;
678
- return tailwindMerge(classList);
679
- }
680
- function tailwindMerge(classList) {
681
- const cachedResult = cacheGet(classList);
682
- if (cachedResult) {
683
- return cachedResult;
684
- }
685
- const result = mergeClassList(classList, configUtils);
686
- cacheSet(classList, result);
687
- return result;
688
- }
689
- return function callTailwindMerge() {
690
- return functionToCall(twJoin.apply(null, arguments));
691
- };
692
- }
693
- const fromTheme = (key) => {
694
- const themeGetter = (theme) => theme[key] || [];
695
- themeGetter.isThemeGetter = true;
696
- return themeGetter;
697
- };
698
- const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
699
- const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
700
- const fractionRegex = /^\d+\/\d+$/;
701
- const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
702
- 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$/;
703
- const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
704
- const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
705
- const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
706
- const isFraction = (value) => fractionRegex.test(value);
707
- const isNumber = (value) => !!value && !Number.isNaN(Number(value));
708
- const isInteger = (value) => !!value && Number.isInteger(Number(value));
709
- const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
710
- const isTshirtSize = (value) => tshirtUnitRegex.test(value);
711
- const isAny = () => true;
712
- const isLengthOnly = (value) => (
713
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
714
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
715
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
716
- lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
717
- );
718
- const isNever = () => false;
719
- const isShadow = (value) => shadowRegex.test(value);
720
- const isImage = (value) => imageRegex.test(value);
721
- const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
722
- const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
723
- const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
724
- const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
725
- const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
726
- const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
727
- const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
728
- const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
729
- const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
730
- const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
731
- const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
732
- const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
733
- const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
734
- const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
735
- const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
736
- const getIsArbitraryValue = (value, testLabel, testValue) => {
737
- const result = arbitraryValueRegex.exec(value);
738
- if (result) {
739
- if (result[1]) {
740
- return testLabel(result[1]);
741
- }
742
- return testValue(result[2]);
743
- }
744
- return false;
745
- };
746
- const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
747
- const result = arbitraryVariableRegex.exec(value);
748
- if (result) {
749
- if (result[1]) {
750
- return testLabel(result[1]);
751
- }
752
- return shouldMatchNoLabel;
753
- }
754
- return false;
755
- };
756
- const isLabelPosition = (label) => label === "position" || label === "percentage";
757
- const isLabelImage = (label) => label === "image" || label === "url";
758
- const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
759
- const isLabelLength = (label) => label === "length";
760
- const isLabelNumber = (label) => label === "number";
761
- const isLabelFamilyName = (label) => label === "family-name";
762
- const isLabelShadow = (label) => label === "shadow";
763
- const getDefaultConfig = () => {
764
- const themeColor = fromTheme("color");
765
- const themeFont = fromTheme("font");
766
- const themeText = fromTheme("text");
767
- const themeFontWeight = fromTheme("font-weight");
768
- const themeTracking = fromTheme("tracking");
769
- const themeLeading = fromTheme("leading");
770
- const themeBreakpoint = fromTheme("breakpoint");
771
- const themeContainer = fromTheme("container");
772
- const themeSpacing = fromTheme("spacing");
773
- const themeRadius = fromTheme("radius");
774
- const themeShadow = fromTheme("shadow");
775
- const themeInsetShadow = fromTheme("inset-shadow");
776
- const themeTextShadow = fromTheme("text-shadow");
777
- const themeDropShadow = fromTheme("drop-shadow");
778
- const themeBlur = fromTheme("blur");
779
- const themePerspective = fromTheme("perspective");
780
- const themeAspect = fromTheme("aspect");
781
- const themeEase = fromTheme("ease");
782
- const themeAnimate = fromTheme("animate");
783
- const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
784
- const scalePosition = () => [
785
- "center",
786
- "top",
787
- "bottom",
788
- "left",
789
- "right",
790
- "top-left",
791
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
792
- "left-top",
793
- "top-right",
794
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
795
- "right-top",
796
- "bottom-right",
797
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
798
- "right-bottom",
799
- "bottom-left",
800
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
801
- "left-bottom"
802
- ];
803
- const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
804
- const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
805
- const scaleOverscroll = () => ["auto", "contain", "none"];
806
- const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
807
- const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
808
- const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
809
- const scaleGridColRowStartAndEnd = () => ["auto", {
810
- span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
811
- }, isInteger, isArbitraryVariable, isArbitraryValue];
812
- const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
813
- const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
814
- const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
815
- const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
816
- const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
817
- const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
818
- const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
819
- const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
820
- position: [isArbitraryVariable, isArbitraryValue]
821
- }];
822
- const scaleBgRepeat = () => ["no-repeat", {
823
- repeat: ["", "x", "y", "space", "round"]
824
- }];
825
- const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
826
- size: [isArbitraryVariable, isArbitraryValue]
827
- }];
828
- const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
829
- const scaleRadius = () => [
830
- // Deprecated since Tailwind CSS v4.0.0
831
- "",
832
- "none",
833
- "full",
834
- themeRadius,
835
- isArbitraryVariable,
836
- isArbitraryValue
837
- ];
838
- const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
839
- const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
840
- const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
841
- const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
842
- const scaleBlur = () => [
843
- // Deprecated since Tailwind CSS v4.0.0
844
- "",
845
- "none",
846
- themeBlur,
847
- isArbitraryVariable,
848
- isArbitraryValue
849
- ];
850
- const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
851
- const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
852
- const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
853
- const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
854
- return {
855
- cacheSize: 500,
856
- theme: {
857
- animate: ["spin", "ping", "pulse", "bounce"],
858
- aspect: ["video"],
859
- blur: [isTshirtSize],
860
- breakpoint: [isTshirtSize],
861
- color: [isAny],
862
- container: [isTshirtSize],
863
- "drop-shadow": [isTshirtSize],
864
- ease: ["in", "out", "in-out"],
865
- font: [isAnyNonArbitrary],
866
- "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
867
- "inset-shadow": [isTshirtSize],
868
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
869
- perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
870
- radius: [isTshirtSize],
871
- shadow: [isTshirtSize],
872
- spacing: ["px", isNumber],
873
- text: [isTshirtSize],
874
- "text-shadow": [isTshirtSize],
875
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
876
- },
877
- classGroups: {
878
- // --------------
879
- // --- Layout ---
880
- // --------------
881
- /**
882
- * Aspect Ratio
883
- * @see https://tailwindcss.com/docs/aspect-ratio
884
- */
885
- aspect: [{
886
- aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
887
- }],
888
- /**
889
- * Container
890
- * @see https://tailwindcss.com/docs/container
891
- * @deprecated since Tailwind CSS v4.0.0
892
- */
893
- container: ["container"],
894
- /**
895
- * Columns
896
- * @see https://tailwindcss.com/docs/columns
897
- */
898
- columns: [{
899
- columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
900
- }],
901
- /**
902
- * Break After
903
- * @see https://tailwindcss.com/docs/break-after
904
- */
905
- "break-after": [{
906
- "break-after": scaleBreak()
907
- }],
908
- /**
909
- * Break Before
910
- * @see https://tailwindcss.com/docs/break-before
911
- */
912
- "break-before": [{
913
- "break-before": scaleBreak()
914
- }],
915
- /**
916
- * Break Inside
917
- * @see https://tailwindcss.com/docs/break-inside
918
- */
919
- "break-inside": [{
920
- "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
921
- }],
922
- /**
923
- * Box Decoration Break
924
- * @see https://tailwindcss.com/docs/box-decoration-break
925
- */
926
- "box-decoration": [{
927
- "box-decoration": ["slice", "clone"]
928
- }],
929
- /**
930
- * Box Sizing
931
- * @see https://tailwindcss.com/docs/box-sizing
932
- */
933
- box: [{
934
- box: ["border", "content"]
935
- }],
936
- /**
937
- * Display
938
- * @see https://tailwindcss.com/docs/display
939
- */
940
- 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"],
941
- /**
942
- * Screen Reader Only
943
- * @see https://tailwindcss.com/docs/display#screen-reader-only
944
- */
945
- sr: ["sr-only", "not-sr-only"],
946
- /**
947
- * Floats
948
- * @see https://tailwindcss.com/docs/float
949
- */
950
- float: [{
951
- float: ["right", "left", "none", "start", "end"]
952
- }],
953
- /**
954
- * Clear
955
- * @see https://tailwindcss.com/docs/clear
956
- */
957
- clear: [{
958
- clear: ["left", "right", "both", "none", "start", "end"]
959
- }],
960
- /**
961
- * Isolation
962
- * @see https://tailwindcss.com/docs/isolation
963
- */
964
- isolation: ["isolate", "isolation-auto"],
965
- /**
966
- * Object Fit
967
- * @see https://tailwindcss.com/docs/object-fit
968
- */
969
- "object-fit": [{
970
- object: ["contain", "cover", "fill", "none", "scale-down"]
971
- }],
972
- /**
973
- * Object Position
974
- * @see https://tailwindcss.com/docs/object-position
975
- */
976
- "object-position": [{
977
- object: scalePositionWithArbitrary()
978
- }],
979
- /**
980
- * Overflow
981
- * @see https://tailwindcss.com/docs/overflow
982
- */
983
- overflow: [{
984
- overflow: scaleOverflow()
985
- }],
986
- /**
987
- * Overflow X
988
- * @see https://tailwindcss.com/docs/overflow
989
- */
990
- "overflow-x": [{
991
- "overflow-x": scaleOverflow()
992
- }],
993
- /**
994
- * Overflow Y
995
- * @see https://tailwindcss.com/docs/overflow
996
- */
997
- "overflow-y": [{
998
- "overflow-y": scaleOverflow()
999
- }],
1000
- /**
1001
- * Overscroll Behavior
1002
- * @see https://tailwindcss.com/docs/overscroll-behavior
1003
- */
1004
- overscroll: [{
1005
- overscroll: scaleOverscroll()
1006
- }],
1007
- /**
1008
- * Overscroll Behavior X
1009
- * @see https://tailwindcss.com/docs/overscroll-behavior
1010
- */
1011
- "overscroll-x": [{
1012
- "overscroll-x": scaleOverscroll()
1013
- }],
1014
- /**
1015
- * Overscroll Behavior Y
1016
- * @see https://tailwindcss.com/docs/overscroll-behavior
1017
- */
1018
- "overscroll-y": [{
1019
- "overscroll-y": scaleOverscroll()
1020
- }],
1021
- /**
1022
- * Position
1023
- * @see https://tailwindcss.com/docs/position
1024
- */
1025
- position: ["static", "fixed", "absolute", "relative", "sticky"],
1026
- /**
1027
- * Top / Right / Bottom / Left
1028
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1029
- */
1030
- inset: [{
1031
- inset: scaleInset()
1032
- }],
1033
- /**
1034
- * Right / Left
1035
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1036
- */
1037
- "inset-x": [{
1038
- "inset-x": scaleInset()
1039
- }],
1040
- /**
1041
- * Top / Bottom
1042
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1043
- */
1044
- "inset-y": [{
1045
- "inset-y": scaleInset()
1046
- }],
1047
- /**
1048
- * Start
1049
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1050
- */
1051
- start: [{
1052
- start: scaleInset()
1053
- }],
1054
- /**
1055
- * End
1056
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1057
- */
1058
- end: [{
1059
- end: scaleInset()
1060
- }],
1061
- /**
1062
- * Top
1063
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1064
- */
1065
- top: [{
1066
- top: scaleInset()
1067
- }],
1068
- /**
1069
- * Right
1070
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1071
- */
1072
- right: [{
1073
- right: scaleInset()
1074
- }],
1075
- /**
1076
- * Bottom
1077
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1078
- */
1079
- bottom: [{
1080
- bottom: scaleInset()
1081
- }],
1082
- /**
1083
- * Left
1084
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1085
- */
1086
- left: [{
1087
- left: scaleInset()
1088
- }],
1089
- /**
1090
- * Visibility
1091
- * @see https://tailwindcss.com/docs/visibility
1092
- */
1093
- visibility: ["visible", "invisible", "collapse"],
1094
- /**
1095
- * Z-Index
1096
- * @see https://tailwindcss.com/docs/z-index
1097
- */
1098
- z: [{
1099
- z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
1100
- }],
1101
- // ------------------------
1102
- // --- Flexbox and Grid ---
1103
- // ------------------------
1104
- /**
1105
- * Flex Basis
1106
- * @see https://tailwindcss.com/docs/flex-basis
1107
- */
1108
- basis: [{
1109
- basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
1110
- }],
1111
- /**
1112
- * Flex Direction
1113
- * @see https://tailwindcss.com/docs/flex-direction
1114
- */
1115
- "flex-direction": [{
1116
- flex: ["row", "row-reverse", "col", "col-reverse"]
1117
- }],
1118
- /**
1119
- * Flex Wrap
1120
- * @see https://tailwindcss.com/docs/flex-wrap
1121
- */
1122
- "flex-wrap": [{
1123
- flex: ["nowrap", "wrap", "wrap-reverse"]
1124
- }],
1125
- /**
1126
- * Flex
1127
- * @see https://tailwindcss.com/docs/flex
1128
- */
1129
- flex: [{
1130
- flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
1131
- }],
1132
- /**
1133
- * Flex Grow
1134
- * @see https://tailwindcss.com/docs/flex-grow
1135
- */
1136
- grow: [{
1137
- grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1138
- }],
1139
- /**
1140
- * Flex Shrink
1141
- * @see https://tailwindcss.com/docs/flex-shrink
1142
- */
1143
- shrink: [{
1144
- shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1145
- }],
1146
- /**
1147
- * Order
1148
- * @see https://tailwindcss.com/docs/order
1149
- */
1150
- order: [{
1151
- order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
1152
- }],
1153
- /**
1154
- * Grid Template Columns
1155
- * @see https://tailwindcss.com/docs/grid-template-columns
1156
- */
1157
- "grid-cols": [{
1158
- "grid-cols": scaleGridTemplateColsRows()
1159
- }],
1160
- /**
1161
- * Grid Column Start / End
1162
- * @see https://tailwindcss.com/docs/grid-column
1163
- */
1164
- "col-start-end": [{
1165
- col: scaleGridColRowStartAndEnd()
1166
- }],
1167
- /**
1168
- * Grid Column Start
1169
- * @see https://tailwindcss.com/docs/grid-column
1170
- */
1171
- "col-start": [{
1172
- "col-start": scaleGridColRowStartOrEnd()
1173
- }],
1174
- /**
1175
- * Grid Column End
1176
- * @see https://tailwindcss.com/docs/grid-column
1177
- */
1178
- "col-end": [{
1179
- "col-end": scaleGridColRowStartOrEnd()
1180
- }],
1181
- /**
1182
- * Grid Template Rows
1183
- * @see https://tailwindcss.com/docs/grid-template-rows
1184
- */
1185
- "grid-rows": [{
1186
- "grid-rows": scaleGridTemplateColsRows()
1187
- }],
1188
- /**
1189
- * Grid Row Start / End
1190
- * @see https://tailwindcss.com/docs/grid-row
1191
- */
1192
- "row-start-end": [{
1193
- row: scaleGridColRowStartAndEnd()
1194
- }],
1195
- /**
1196
- * Grid Row Start
1197
- * @see https://tailwindcss.com/docs/grid-row
1198
- */
1199
- "row-start": [{
1200
- "row-start": scaleGridColRowStartOrEnd()
1201
- }],
1202
- /**
1203
- * Grid Row End
1204
- * @see https://tailwindcss.com/docs/grid-row
1205
- */
1206
- "row-end": [{
1207
- "row-end": scaleGridColRowStartOrEnd()
1208
- }],
1209
- /**
1210
- * Grid Auto Flow
1211
- * @see https://tailwindcss.com/docs/grid-auto-flow
1212
- */
1213
- "grid-flow": [{
1214
- "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
1215
- }],
1216
- /**
1217
- * Grid Auto Columns
1218
- * @see https://tailwindcss.com/docs/grid-auto-columns
1219
- */
1220
- "auto-cols": [{
1221
- "auto-cols": scaleGridAutoColsRows()
1222
- }],
1223
- /**
1224
- * Grid Auto Rows
1225
- * @see https://tailwindcss.com/docs/grid-auto-rows
1226
- */
1227
- "auto-rows": [{
1228
- "auto-rows": scaleGridAutoColsRows()
1229
- }],
1230
- /**
1231
- * Gap
1232
- * @see https://tailwindcss.com/docs/gap
1233
- */
1234
- gap: [{
1235
- gap: scaleUnambiguousSpacing()
1236
- }],
1237
- /**
1238
- * Gap X
1239
- * @see https://tailwindcss.com/docs/gap
1240
- */
1241
- "gap-x": [{
1242
- "gap-x": scaleUnambiguousSpacing()
1243
- }],
1244
- /**
1245
- * Gap Y
1246
- * @see https://tailwindcss.com/docs/gap
1247
- */
1248
- "gap-y": [{
1249
- "gap-y": scaleUnambiguousSpacing()
1250
- }],
1251
- /**
1252
- * Justify Content
1253
- * @see https://tailwindcss.com/docs/justify-content
1254
- */
1255
- "justify-content": [{
1256
- justify: [...scaleAlignPrimaryAxis(), "normal"]
1257
- }],
1258
- /**
1259
- * Justify Items
1260
- * @see https://tailwindcss.com/docs/justify-items
1261
- */
1262
- "justify-items": [{
1263
- "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
1264
- }],
1265
- /**
1266
- * Justify Self
1267
- * @see https://tailwindcss.com/docs/justify-self
1268
- */
1269
- "justify-self": [{
1270
- "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
1271
- }],
1272
- /**
1273
- * Align Content
1274
- * @see https://tailwindcss.com/docs/align-content
1275
- */
1276
- "align-content": [{
1277
- content: ["normal", ...scaleAlignPrimaryAxis()]
1278
- }],
1279
- /**
1280
- * Align Items
1281
- * @see https://tailwindcss.com/docs/align-items
1282
- */
1283
- "align-items": [{
1284
- items: [...scaleAlignSecondaryAxis(), {
1285
- baseline: ["", "last"]
1286
- }]
1287
- }],
1288
- /**
1289
- * Align Self
1290
- * @see https://tailwindcss.com/docs/align-self
1291
- */
1292
- "align-self": [{
1293
- self: ["auto", ...scaleAlignSecondaryAxis(), {
1294
- baseline: ["", "last"]
1295
- }]
1296
- }],
1297
- /**
1298
- * Place Content
1299
- * @see https://tailwindcss.com/docs/place-content
1300
- */
1301
- "place-content": [{
1302
- "place-content": scaleAlignPrimaryAxis()
1303
- }],
1304
- /**
1305
- * Place Items
1306
- * @see https://tailwindcss.com/docs/place-items
1307
- */
1308
- "place-items": [{
1309
- "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
1310
- }],
1311
- /**
1312
- * Place Self
1313
- * @see https://tailwindcss.com/docs/place-self
1314
- */
1315
- "place-self": [{
1316
- "place-self": ["auto", ...scaleAlignSecondaryAxis()]
1317
- }],
1318
- // Spacing
1319
- /**
1320
- * Padding
1321
- * @see https://tailwindcss.com/docs/padding
1322
- */
1323
- p: [{
1324
- p: scaleUnambiguousSpacing()
1325
- }],
1326
- /**
1327
- * Padding X
1328
- * @see https://tailwindcss.com/docs/padding
1329
- */
1330
- px: [{
1331
- px: scaleUnambiguousSpacing()
1332
- }],
1333
- /**
1334
- * Padding Y
1335
- * @see https://tailwindcss.com/docs/padding
1336
- */
1337
- py: [{
1338
- py: scaleUnambiguousSpacing()
1339
- }],
1340
- /**
1341
- * Padding Start
1342
- * @see https://tailwindcss.com/docs/padding
1343
- */
1344
- ps: [{
1345
- ps: scaleUnambiguousSpacing()
1346
- }],
1347
- /**
1348
- * Padding End
1349
- * @see https://tailwindcss.com/docs/padding
1350
- */
1351
- pe: [{
1352
- pe: scaleUnambiguousSpacing()
1353
- }],
1354
- /**
1355
- * Padding Top
1356
- * @see https://tailwindcss.com/docs/padding
1357
- */
1358
- pt: [{
1359
- pt: scaleUnambiguousSpacing()
1360
- }],
1361
- /**
1362
- * Padding Right
1363
- * @see https://tailwindcss.com/docs/padding
1364
- */
1365
- pr: [{
1366
- pr: scaleUnambiguousSpacing()
1367
- }],
1368
- /**
1369
- * Padding Bottom
1370
- * @see https://tailwindcss.com/docs/padding
1371
- */
1372
- pb: [{
1373
- pb: scaleUnambiguousSpacing()
1374
- }],
1375
- /**
1376
- * Padding Left
1377
- * @see https://tailwindcss.com/docs/padding
1378
- */
1379
- pl: [{
1380
- pl: scaleUnambiguousSpacing()
1381
- }],
1382
- /**
1383
- * Margin
1384
- * @see https://tailwindcss.com/docs/margin
1385
- */
1386
- m: [{
1387
- m: scaleMargin()
1388
- }],
1389
- /**
1390
- * Margin X
1391
- * @see https://tailwindcss.com/docs/margin
1392
- */
1393
- mx: [{
1394
- mx: scaleMargin()
1395
- }],
1396
- /**
1397
- * Margin Y
1398
- * @see https://tailwindcss.com/docs/margin
1399
- */
1400
- my: [{
1401
- my: scaleMargin()
1402
- }],
1403
- /**
1404
- * Margin Start
1405
- * @see https://tailwindcss.com/docs/margin
1406
- */
1407
- ms: [{
1408
- ms: scaleMargin()
1409
- }],
1410
- /**
1411
- * Margin End
1412
- * @see https://tailwindcss.com/docs/margin
1413
- */
1414
- me: [{
1415
- me: scaleMargin()
1416
- }],
1417
- /**
1418
- * Margin Top
1419
- * @see https://tailwindcss.com/docs/margin
1420
- */
1421
- mt: [{
1422
- mt: scaleMargin()
1423
- }],
1424
- /**
1425
- * Margin Right
1426
- * @see https://tailwindcss.com/docs/margin
1427
- */
1428
- mr: [{
1429
- mr: scaleMargin()
1430
- }],
1431
- /**
1432
- * Margin Bottom
1433
- * @see https://tailwindcss.com/docs/margin
1434
- */
1435
- mb: [{
1436
- mb: scaleMargin()
1437
- }],
1438
- /**
1439
- * Margin Left
1440
- * @see https://tailwindcss.com/docs/margin
1441
- */
1442
- ml: [{
1443
- ml: scaleMargin()
1444
- }],
1445
- /**
1446
- * Space Between X
1447
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1448
- */
1449
- "space-x": [{
1450
- "space-x": scaleUnambiguousSpacing()
1451
- }],
1452
- /**
1453
- * Space Between X Reverse
1454
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1455
- */
1456
- "space-x-reverse": ["space-x-reverse"],
1457
- /**
1458
- * Space Between Y
1459
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1460
- */
1461
- "space-y": [{
1462
- "space-y": scaleUnambiguousSpacing()
1463
- }],
1464
- /**
1465
- * Space Between Y Reverse
1466
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1467
- */
1468
- "space-y-reverse": ["space-y-reverse"],
1469
- // --------------
1470
- // --- Sizing ---
1471
- // --------------
1472
- /**
1473
- * Size
1474
- * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1475
- */
1476
- size: [{
1477
- size: scaleSizing()
1478
- }],
1479
- /**
1480
- * Width
1481
- * @see https://tailwindcss.com/docs/width
1482
- */
1483
- w: [{
1484
- w: [themeContainer, "screen", ...scaleSizing()]
1485
- }],
1486
- /**
1487
- * Min-Width
1488
- * @see https://tailwindcss.com/docs/min-width
1489
- */
1490
- "min-w": [{
1491
- "min-w": [
1492
- themeContainer,
1493
- "screen",
1494
- /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1495
- "none",
1496
- ...scaleSizing()
1497
- ]
1498
- }],
1499
- /**
1500
- * Max-Width
1501
- * @see https://tailwindcss.com/docs/max-width
1502
- */
1503
- "max-w": [{
1504
- "max-w": [
1505
- themeContainer,
1506
- "screen",
1507
- "none",
1508
- /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1509
- "prose",
1510
- /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1511
- {
1512
- screen: [themeBreakpoint]
1513
- },
1514
- ...scaleSizing()
1515
- ]
1516
- }],
1517
- /**
1518
- * Height
1519
- * @see https://tailwindcss.com/docs/height
1520
- */
1521
- h: [{
1522
- h: ["screen", "lh", ...scaleSizing()]
1523
- }],
1524
- /**
1525
- * Min-Height
1526
- * @see https://tailwindcss.com/docs/min-height
1527
- */
1528
- "min-h": [{
1529
- "min-h": ["screen", "lh", "none", ...scaleSizing()]
1530
- }],
1531
- /**
1532
- * Max-Height
1533
- * @see https://tailwindcss.com/docs/max-height
1534
- */
1535
- "max-h": [{
1536
- "max-h": ["screen", "lh", ...scaleSizing()]
1537
- }],
1538
- // ------------------
1539
- // --- Typography ---
1540
- // ------------------
1541
- /**
1542
- * Font Size
1543
- * @see https://tailwindcss.com/docs/font-size
1544
- */
1545
- "font-size": [{
1546
- text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
1547
- }],
1548
- /**
1549
- * Font Smoothing
1550
- * @see https://tailwindcss.com/docs/font-smoothing
1551
- */
1552
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1553
- /**
1554
- * Font Style
1555
- * @see https://tailwindcss.com/docs/font-style
1556
- */
1557
- "font-style": ["italic", "not-italic"],
1558
- /**
1559
- * Font Weight
1560
- * @see https://tailwindcss.com/docs/font-weight
1561
- */
1562
- "font-weight": [{
1563
- font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
1564
- }],
1565
- /**
1566
- * Font Stretch
1567
- * @see https://tailwindcss.com/docs/font-stretch
1568
- */
1569
- "font-stretch": [{
1570
- "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
1571
- }],
1572
- /**
1573
- * Font Family
1574
- * @see https://tailwindcss.com/docs/font-family
1575
- */
1576
- "font-family": [{
1577
- font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
1578
- }],
1579
- /**
1580
- * Font Variant Numeric
1581
- * @see https://tailwindcss.com/docs/font-variant-numeric
1582
- */
1583
- "fvn-normal": ["normal-nums"],
1584
- /**
1585
- * Font Variant Numeric
1586
- * @see https://tailwindcss.com/docs/font-variant-numeric
1587
- */
1588
- "fvn-ordinal": ["ordinal"],
1589
- /**
1590
- * Font Variant Numeric
1591
- * @see https://tailwindcss.com/docs/font-variant-numeric
1592
- */
1593
- "fvn-slashed-zero": ["slashed-zero"],
1594
- /**
1595
- * Font Variant Numeric
1596
- * @see https://tailwindcss.com/docs/font-variant-numeric
1597
- */
1598
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1599
- /**
1600
- * Font Variant Numeric
1601
- * @see https://tailwindcss.com/docs/font-variant-numeric
1602
- */
1603
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1604
- /**
1605
- * Font Variant Numeric
1606
- * @see https://tailwindcss.com/docs/font-variant-numeric
1607
- */
1608
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1609
- /**
1610
- * Letter Spacing
1611
- * @see https://tailwindcss.com/docs/letter-spacing
1612
- */
1613
- tracking: [{
1614
- tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1615
- }],
1616
- /**
1617
- * Line Clamp
1618
- * @see https://tailwindcss.com/docs/line-clamp
1619
- */
1620
- "line-clamp": [{
1621
- "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
1622
- }],
1623
- /**
1624
- * Line Height
1625
- * @see https://tailwindcss.com/docs/line-height
1626
- */
1627
- leading: [{
1628
- leading: [
1629
- /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1630
- themeLeading,
1631
- ...scaleUnambiguousSpacing()
1632
- ]
1633
- }],
1634
- /**
1635
- * List Style Image
1636
- * @see https://tailwindcss.com/docs/list-style-image
1637
- */
1638
- "list-image": [{
1639
- "list-image": ["none", isArbitraryVariable, isArbitraryValue]
1640
- }],
1641
- /**
1642
- * List Style Position
1643
- * @see https://tailwindcss.com/docs/list-style-position
1644
- */
1645
- "list-style-position": [{
1646
- list: ["inside", "outside"]
1647
- }],
1648
- /**
1649
- * List Style Type
1650
- * @see https://tailwindcss.com/docs/list-style-type
1651
- */
1652
- "list-style-type": [{
1653
- list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1654
- }],
1655
- /**
1656
- * Text Alignment
1657
- * @see https://tailwindcss.com/docs/text-align
1658
- */
1659
- "text-alignment": [{
1660
- text: ["left", "center", "right", "justify", "start", "end"]
1661
- }],
1662
- /**
1663
- * Placeholder Color
1664
- * @deprecated since Tailwind CSS v3.0.0
1665
- * @see https://v3.tailwindcss.com/docs/placeholder-color
1666
- */
1667
- "placeholder-color": [{
1668
- placeholder: scaleColor()
1669
- }],
1670
- /**
1671
- * Text Color
1672
- * @see https://tailwindcss.com/docs/text-color
1673
- */
1674
- "text-color": [{
1675
- text: scaleColor()
1676
- }],
1677
- /**
1678
- * Text Decoration
1679
- * @see https://tailwindcss.com/docs/text-decoration
1680
- */
1681
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1682
- /**
1683
- * Text Decoration Style
1684
- * @see https://tailwindcss.com/docs/text-decoration-style
1685
- */
1686
- "text-decoration-style": [{
1687
- decoration: [...scaleLineStyle(), "wavy"]
1688
- }],
1689
- /**
1690
- * Text Decoration Thickness
1691
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1692
- */
1693
- "text-decoration-thickness": [{
1694
- decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1695
- }],
1696
- /**
1697
- * Text Decoration Color
1698
- * @see https://tailwindcss.com/docs/text-decoration-color
1699
- */
1700
- "text-decoration-color": [{
1701
- decoration: scaleColor()
1702
- }],
1703
- /**
1704
- * Text Underline Offset
1705
- * @see https://tailwindcss.com/docs/text-underline-offset
1706
- */
1707
- "underline-offset": [{
1708
- "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1709
- }],
1710
- /**
1711
- * Text Transform
1712
- * @see https://tailwindcss.com/docs/text-transform
1713
- */
1714
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1715
- /**
1716
- * Text Overflow
1717
- * @see https://tailwindcss.com/docs/text-overflow
1718
- */
1719
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1720
- /**
1721
- * Text Wrap
1722
- * @see https://tailwindcss.com/docs/text-wrap
1723
- */
1724
- "text-wrap": [{
1725
- text: ["wrap", "nowrap", "balance", "pretty"]
1726
- }],
1727
- /**
1728
- * Text Indent
1729
- * @see https://tailwindcss.com/docs/text-indent
1730
- */
1731
- indent: [{
1732
- indent: scaleUnambiguousSpacing()
1733
- }],
1734
- /**
1735
- * Vertical Alignment
1736
- * @see https://tailwindcss.com/docs/vertical-align
1737
- */
1738
- "vertical-align": [{
1739
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1740
- }],
1741
- /**
1742
- * Whitespace
1743
- * @see https://tailwindcss.com/docs/whitespace
1744
- */
1745
- whitespace: [{
1746
- whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1747
- }],
1748
- /**
1749
- * Word Break
1750
- * @see https://tailwindcss.com/docs/word-break
1751
- */
1752
- break: [{
1753
- break: ["normal", "words", "all", "keep"]
1754
- }],
1755
- /**
1756
- * Overflow Wrap
1757
- * @see https://tailwindcss.com/docs/overflow-wrap
1758
- */
1759
- wrap: [{
1760
- wrap: ["break-word", "anywhere", "normal"]
1761
- }],
1762
- /**
1763
- * Hyphens
1764
- * @see https://tailwindcss.com/docs/hyphens
1765
- */
1766
- hyphens: [{
1767
- hyphens: ["none", "manual", "auto"]
1768
- }],
1769
- /**
1770
- * Content
1771
- * @see https://tailwindcss.com/docs/content
1772
- */
1773
- content: [{
1774
- content: ["none", isArbitraryVariable, isArbitraryValue]
1775
- }],
1776
- // -------------------
1777
- // --- Backgrounds ---
1778
- // -------------------
1779
- /**
1780
- * Background Attachment
1781
- * @see https://tailwindcss.com/docs/background-attachment
1782
- */
1783
- "bg-attachment": [{
1784
- bg: ["fixed", "local", "scroll"]
1785
- }],
1786
- /**
1787
- * Background Clip
1788
- * @see https://tailwindcss.com/docs/background-clip
1789
- */
1790
- "bg-clip": [{
1791
- "bg-clip": ["border", "padding", "content", "text"]
1792
- }],
1793
- /**
1794
- * Background Origin
1795
- * @see https://tailwindcss.com/docs/background-origin
1796
- */
1797
- "bg-origin": [{
1798
- "bg-origin": ["border", "padding", "content"]
1799
- }],
1800
- /**
1801
- * Background Position
1802
- * @see https://tailwindcss.com/docs/background-position
1803
- */
1804
- "bg-position": [{
1805
- bg: scaleBgPosition()
1806
- }],
1807
- /**
1808
- * Background Repeat
1809
- * @see https://tailwindcss.com/docs/background-repeat
1810
- */
1811
- "bg-repeat": [{
1812
- bg: scaleBgRepeat()
1813
- }],
1814
- /**
1815
- * Background Size
1816
- * @see https://tailwindcss.com/docs/background-size
1817
- */
1818
- "bg-size": [{
1819
- bg: scaleBgSize()
1820
- }],
1821
- /**
1822
- * Background Image
1823
- * @see https://tailwindcss.com/docs/background-image
1824
- */
1825
- "bg-image": [{
1826
- bg: ["none", {
1827
- linear: [{
1828
- to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1829
- }, isInteger, isArbitraryVariable, isArbitraryValue],
1830
- radial: ["", isArbitraryVariable, isArbitraryValue],
1831
- conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1832
- }, isArbitraryVariableImage, isArbitraryImage]
1833
- }],
1834
- /**
1835
- * Background Color
1836
- * @see https://tailwindcss.com/docs/background-color
1837
- */
1838
- "bg-color": [{
1839
- bg: scaleColor()
1840
- }],
1841
- /**
1842
- * Gradient Color Stops From Position
1843
- * @see https://tailwindcss.com/docs/gradient-color-stops
1844
- */
1845
- "gradient-from-pos": [{
1846
- from: scaleGradientStopPosition()
1847
- }],
1848
- /**
1849
- * Gradient Color Stops Via Position
1850
- * @see https://tailwindcss.com/docs/gradient-color-stops
1851
- */
1852
- "gradient-via-pos": [{
1853
- via: scaleGradientStopPosition()
1854
- }],
1855
- /**
1856
- * Gradient Color Stops To Position
1857
- * @see https://tailwindcss.com/docs/gradient-color-stops
1858
- */
1859
- "gradient-to-pos": [{
1860
- to: scaleGradientStopPosition()
1861
- }],
1862
- /**
1863
- * Gradient Color Stops From
1864
- * @see https://tailwindcss.com/docs/gradient-color-stops
1865
- */
1866
- "gradient-from": [{
1867
- from: scaleColor()
1868
- }],
1869
- /**
1870
- * Gradient Color Stops Via
1871
- * @see https://tailwindcss.com/docs/gradient-color-stops
1872
- */
1873
- "gradient-via": [{
1874
- via: scaleColor()
1875
- }],
1876
- /**
1877
- * Gradient Color Stops To
1878
- * @see https://tailwindcss.com/docs/gradient-color-stops
1879
- */
1880
- "gradient-to": [{
1881
- to: scaleColor()
1882
- }],
1883
- // ---------------
1884
- // --- Borders ---
1885
- // ---------------
1886
- /**
1887
- * Border Radius
1888
- * @see https://tailwindcss.com/docs/border-radius
1889
- */
1890
- rounded: [{
1891
- rounded: scaleRadius()
1892
- }],
1893
- /**
1894
- * Border Radius Start
1895
- * @see https://tailwindcss.com/docs/border-radius
1896
- */
1897
- "rounded-s": [{
1898
- "rounded-s": scaleRadius()
1899
- }],
1900
- /**
1901
- * Border Radius End
1902
- * @see https://tailwindcss.com/docs/border-radius
1903
- */
1904
- "rounded-e": [{
1905
- "rounded-e": scaleRadius()
1906
- }],
1907
- /**
1908
- * Border Radius Top
1909
- * @see https://tailwindcss.com/docs/border-radius
1910
- */
1911
- "rounded-t": [{
1912
- "rounded-t": scaleRadius()
1913
- }],
1914
- /**
1915
- * Border Radius Right
1916
- * @see https://tailwindcss.com/docs/border-radius
1917
- */
1918
- "rounded-r": [{
1919
- "rounded-r": scaleRadius()
1920
- }],
1921
- /**
1922
- * Border Radius Bottom
1923
- * @see https://tailwindcss.com/docs/border-radius
1924
- */
1925
- "rounded-b": [{
1926
- "rounded-b": scaleRadius()
1927
- }],
1928
- /**
1929
- * Border Radius Left
1930
- * @see https://tailwindcss.com/docs/border-radius
1931
- */
1932
- "rounded-l": [{
1933
- "rounded-l": scaleRadius()
1934
- }],
1935
- /**
1936
- * Border Radius Start Start
1937
- * @see https://tailwindcss.com/docs/border-radius
1938
- */
1939
- "rounded-ss": [{
1940
- "rounded-ss": scaleRadius()
1941
- }],
1942
- /**
1943
- * Border Radius Start End
1944
- * @see https://tailwindcss.com/docs/border-radius
1945
- */
1946
- "rounded-se": [{
1947
- "rounded-se": scaleRadius()
1948
- }],
1949
- /**
1950
- * Border Radius End End
1951
- * @see https://tailwindcss.com/docs/border-radius
1952
- */
1953
- "rounded-ee": [{
1954
- "rounded-ee": scaleRadius()
1955
- }],
1956
- /**
1957
- * Border Radius End Start
1958
- * @see https://tailwindcss.com/docs/border-radius
1959
- */
1960
- "rounded-es": [{
1961
- "rounded-es": scaleRadius()
1962
- }],
1963
- /**
1964
- * Border Radius Top Left
1965
- * @see https://tailwindcss.com/docs/border-radius
1966
- */
1967
- "rounded-tl": [{
1968
- "rounded-tl": scaleRadius()
1969
- }],
1970
- /**
1971
- * Border Radius Top Right
1972
- * @see https://tailwindcss.com/docs/border-radius
1973
- */
1974
- "rounded-tr": [{
1975
- "rounded-tr": scaleRadius()
1976
- }],
1977
- /**
1978
- * Border Radius Bottom Right
1979
- * @see https://tailwindcss.com/docs/border-radius
1980
- */
1981
- "rounded-br": [{
1982
- "rounded-br": scaleRadius()
1983
- }],
1984
- /**
1985
- * Border Radius Bottom Left
1986
- * @see https://tailwindcss.com/docs/border-radius
1987
- */
1988
- "rounded-bl": [{
1989
- "rounded-bl": scaleRadius()
1990
- }],
1991
- /**
1992
- * Border Width
1993
- * @see https://tailwindcss.com/docs/border-width
1994
- */
1995
- "border-w": [{
1996
- border: scaleBorderWidth()
1997
- }],
1998
- /**
1999
- * Border Width X
2000
- * @see https://tailwindcss.com/docs/border-width
2001
- */
2002
- "border-w-x": [{
2003
- "border-x": scaleBorderWidth()
2004
- }],
2005
- /**
2006
- * Border Width Y
2007
- * @see https://tailwindcss.com/docs/border-width
2008
- */
2009
- "border-w-y": [{
2010
- "border-y": scaleBorderWidth()
2011
- }],
2012
- /**
2013
- * Border Width Start
2014
- * @see https://tailwindcss.com/docs/border-width
2015
- */
2016
- "border-w-s": [{
2017
- "border-s": scaleBorderWidth()
2018
- }],
2019
- /**
2020
- * Border Width End
2021
- * @see https://tailwindcss.com/docs/border-width
2022
- */
2023
- "border-w-e": [{
2024
- "border-e": scaleBorderWidth()
2025
- }],
2026
- /**
2027
- * Border Width Top
2028
- * @see https://tailwindcss.com/docs/border-width
2029
- */
2030
- "border-w-t": [{
2031
- "border-t": scaleBorderWidth()
2032
- }],
2033
- /**
2034
- * Border Width Right
2035
- * @see https://tailwindcss.com/docs/border-width
2036
- */
2037
- "border-w-r": [{
2038
- "border-r": scaleBorderWidth()
2039
- }],
2040
- /**
2041
- * Border Width Bottom
2042
- * @see https://tailwindcss.com/docs/border-width
2043
- */
2044
- "border-w-b": [{
2045
- "border-b": scaleBorderWidth()
2046
- }],
2047
- /**
2048
- * Border Width Left
2049
- * @see https://tailwindcss.com/docs/border-width
2050
- */
2051
- "border-w-l": [{
2052
- "border-l": scaleBorderWidth()
2053
- }],
2054
- /**
2055
- * Divide Width X
2056
- * @see https://tailwindcss.com/docs/border-width#between-children
2057
- */
2058
- "divide-x": [{
2059
- "divide-x": scaleBorderWidth()
2060
- }],
2061
- /**
2062
- * Divide Width X Reverse
2063
- * @see https://tailwindcss.com/docs/border-width#between-children
2064
- */
2065
- "divide-x-reverse": ["divide-x-reverse"],
2066
- /**
2067
- * Divide Width Y
2068
- * @see https://tailwindcss.com/docs/border-width#between-children
2069
- */
2070
- "divide-y": [{
2071
- "divide-y": scaleBorderWidth()
2072
- }],
2073
- /**
2074
- * Divide Width Y Reverse
2075
- * @see https://tailwindcss.com/docs/border-width#between-children
2076
- */
2077
- "divide-y-reverse": ["divide-y-reverse"],
2078
- /**
2079
- * Border Style
2080
- * @see https://tailwindcss.com/docs/border-style
2081
- */
2082
- "border-style": [{
2083
- border: [...scaleLineStyle(), "hidden", "none"]
2084
- }],
2085
- /**
2086
- * Divide Style
2087
- * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
2088
- */
2089
- "divide-style": [{
2090
- divide: [...scaleLineStyle(), "hidden", "none"]
2091
- }],
2092
- /**
2093
- * Border Color
2094
- * @see https://tailwindcss.com/docs/border-color
2095
- */
2096
- "border-color": [{
2097
- border: scaleColor()
2098
- }],
2099
- /**
2100
- * Border Color X
2101
- * @see https://tailwindcss.com/docs/border-color
2102
- */
2103
- "border-color-x": [{
2104
- "border-x": scaleColor()
2105
- }],
2106
- /**
2107
- * Border Color Y
2108
- * @see https://tailwindcss.com/docs/border-color
2109
- */
2110
- "border-color-y": [{
2111
- "border-y": scaleColor()
2112
- }],
2113
- /**
2114
- * Border Color S
2115
- * @see https://tailwindcss.com/docs/border-color
2116
- */
2117
- "border-color-s": [{
2118
- "border-s": scaleColor()
2119
- }],
2120
- /**
2121
- * Border Color E
2122
- * @see https://tailwindcss.com/docs/border-color
2123
- */
2124
- "border-color-e": [{
2125
- "border-e": scaleColor()
2126
- }],
2127
- /**
2128
- * Border Color Top
2129
- * @see https://tailwindcss.com/docs/border-color
2130
- */
2131
- "border-color-t": [{
2132
- "border-t": scaleColor()
2133
- }],
2134
- /**
2135
- * Border Color Right
2136
- * @see https://tailwindcss.com/docs/border-color
2137
- */
2138
- "border-color-r": [{
2139
- "border-r": scaleColor()
2140
- }],
2141
- /**
2142
- * Border Color Bottom
2143
- * @see https://tailwindcss.com/docs/border-color
2144
- */
2145
- "border-color-b": [{
2146
- "border-b": scaleColor()
2147
- }],
2148
- /**
2149
- * Border Color Left
2150
- * @see https://tailwindcss.com/docs/border-color
2151
- */
2152
- "border-color-l": [{
2153
- "border-l": scaleColor()
2154
- }],
2155
- /**
2156
- * Divide Color
2157
- * @see https://tailwindcss.com/docs/divide-color
2158
- */
2159
- "divide-color": [{
2160
- divide: scaleColor()
2161
- }],
2162
- /**
2163
- * Outline Style
2164
- * @see https://tailwindcss.com/docs/outline-style
2165
- */
2166
- "outline-style": [{
2167
- outline: [...scaleLineStyle(), "none", "hidden"]
2168
- }],
2169
- /**
2170
- * Outline Offset
2171
- * @see https://tailwindcss.com/docs/outline-offset
2172
- */
2173
- "outline-offset": [{
2174
- "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
2175
- }],
2176
- /**
2177
- * Outline Width
2178
- * @see https://tailwindcss.com/docs/outline-width
2179
- */
2180
- "outline-w": [{
2181
- outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
2182
- }],
2183
- /**
2184
- * Outline Color
2185
- * @see https://tailwindcss.com/docs/outline-color
2186
- */
2187
- "outline-color": [{
2188
- outline: scaleColor()
2189
- }],
2190
- // ---------------
2191
- // --- Effects ---
2192
- // ---------------
2193
- /**
2194
- * Box Shadow
2195
- * @see https://tailwindcss.com/docs/box-shadow
2196
- */
2197
- shadow: [{
2198
- shadow: [
2199
- // Deprecated since Tailwind CSS v4.0.0
2200
- "",
2201
- "none",
2202
- themeShadow,
2203
- isArbitraryVariableShadow,
2204
- isArbitraryShadow
2205
- ]
2206
- }],
2207
- /**
2208
- * Box Shadow Color
2209
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
2210
- */
2211
- "shadow-color": [{
2212
- shadow: scaleColor()
2213
- }],
2214
- /**
2215
- * Inset Box Shadow
2216
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
2217
- */
2218
- "inset-shadow": [{
2219
- "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
2220
- }],
2221
- /**
2222
- * Inset Box Shadow Color
2223
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
2224
- */
2225
- "inset-shadow-color": [{
2226
- "inset-shadow": scaleColor()
2227
- }],
2228
- /**
2229
- * Ring Width
2230
- * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
2231
- */
2232
- "ring-w": [{
2233
- ring: scaleBorderWidth()
2234
- }],
2235
- /**
2236
- * Ring Width Inset
2237
- * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
2238
- * @deprecated since Tailwind CSS v4.0.0
2239
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2240
- */
2241
- "ring-w-inset": ["ring-inset"],
2242
- /**
2243
- * Ring Color
2244
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
2245
- */
2246
- "ring-color": [{
2247
- ring: scaleColor()
2248
- }],
2249
- /**
2250
- * Ring Offset Width
2251
- * @see https://v3.tailwindcss.com/docs/ring-offset-width
2252
- * @deprecated since Tailwind CSS v4.0.0
2253
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2254
- */
2255
- "ring-offset-w": [{
2256
- "ring-offset": [isNumber, isArbitraryLength]
2257
- }],
2258
- /**
2259
- * Ring Offset Color
2260
- * @see https://v3.tailwindcss.com/docs/ring-offset-color
2261
- * @deprecated since Tailwind CSS v4.0.0
2262
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2263
- */
2264
- "ring-offset-color": [{
2265
- "ring-offset": scaleColor()
2266
- }],
2267
- /**
2268
- * Inset Ring Width
2269
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
2270
- */
2271
- "inset-ring-w": [{
2272
- "inset-ring": scaleBorderWidth()
2273
- }],
2274
- /**
2275
- * Inset Ring Color
2276
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
2277
- */
2278
- "inset-ring-color": [{
2279
- "inset-ring": scaleColor()
2280
- }],
2281
- /**
2282
- * Text Shadow
2283
- * @see https://tailwindcss.com/docs/text-shadow
2284
- */
2285
- "text-shadow": [{
2286
- "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
2287
- }],
2288
- /**
2289
- * Text Shadow Color
2290
- * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
2291
- */
2292
- "text-shadow-color": [{
2293
- "text-shadow": scaleColor()
2294
- }],
2295
- /**
2296
- * Opacity
2297
- * @see https://tailwindcss.com/docs/opacity
2298
- */
2299
- opacity: [{
2300
- opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
2301
- }],
2302
- /**
2303
- * Mix Blend Mode
2304
- * @see https://tailwindcss.com/docs/mix-blend-mode
2305
- */
2306
- "mix-blend": [{
2307
- "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
2308
- }],
2309
- /**
2310
- * Background Blend Mode
2311
- * @see https://tailwindcss.com/docs/background-blend-mode
2312
- */
2313
- "bg-blend": [{
2314
- "bg-blend": scaleBlendMode()
2315
- }],
2316
- /**
2317
- * Mask Clip
2318
- * @see https://tailwindcss.com/docs/mask-clip
2319
- */
2320
- "mask-clip": [{
2321
- "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2322
- }, "mask-no-clip"],
2323
- /**
2324
- * Mask Composite
2325
- * @see https://tailwindcss.com/docs/mask-composite
2326
- */
2327
- "mask-composite": [{
2328
- mask: ["add", "subtract", "intersect", "exclude"]
2329
- }],
2330
- /**
2331
- * Mask Image
2332
- * @see https://tailwindcss.com/docs/mask-image
2333
- */
2334
- "mask-image-linear-pos": [{
2335
- "mask-linear": [isNumber]
2336
- }],
2337
- "mask-image-linear-from-pos": [{
2338
- "mask-linear-from": scaleMaskImagePosition()
2339
- }],
2340
- "mask-image-linear-to-pos": [{
2341
- "mask-linear-to": scaleMaskImagePosition()
2342
- }],
2343
- "mask-image-linear-from-color": [{
2344
- "mask-linear-from": scaleColor()
2345
- }],
2346
- "mask-image-linear-to-color": [{
2347
- "mask-linear-to": scaleColor()
2348
- }],
2349
- "mask-image-t-from-pos": [{
2350
- "mask-t-from": scaleMaskImagePosition()
2351
- }],
2352
- "mask-image-t-to-pos": [{
2353
- "mask-t-to": scaleMaskImagePosition()
2354
- }],
2355
- "mask-image-t-from-color": [{
2356
- "mask-t-from": scaleColor()
2357
- }],
2358
- "mask-image-t-to-color": [{
2359
- "mask-t-to": scaleColor()
2360
- }],
2361
- "mask-image-r-from-pos": [{
2362
- "mask-r-from": scaleMaskImagePosition()
2363
- }],
2364
- "mask-image-r-to-pos": [{
2365
- "mask-r-to": scaleMaskImagePosition()
2366
- }],
2367
- "mask-image-r-from-color": [{
2368
- "mask-r-from": scaleColor()
2369
- }],
2370
- "mask-image-r-to-color": [{
2371
- "mask-r-to": scaleColor()
2372
- }],
2373
- "mask-image-b-from-pos": [{
2374
- "mask-b-from": scaleMaskImagePosition()
2375
- }],
2376
- "mask-image-b-to-pos": [{
2377
- "mask-b-to": scaleMaskImagePosition()
2378
- }],
2379
- "mask-image-b-from-color": [{
2380
- "mask-b-from": scaleColor()
2381
- }],
2382
- "mask-image-b-to-color": [{
2383
- "mask-b-to": scaleColor()
2384
- }],
2385
- "mask-image-l-from-pos": [{
2386
- "mask-l-from": scaleMaskImagePosition()
2387
- }],
2388
- "mask-image-l-to-pos": [{
2389
- "mask-l-to": scaleMaskImagePosition()
2390
- }],
2391
- "mask-image-l-from-color": [{
2392
- "mask-l-from": scaleColor()
2393
- }],
2394
- "mask-image-l-to-color": [{
2395
- "mask-l-to": scaleColor()
2396
- }],
2397
- "mask-image-x-from-pos": [{
2398
- "mask-x-from": scaleMaskImagePosition()
2399
- }],
2400
- "mask-image-x-to-pos": [{
2401
- "mask-x-to": scaleMaskImagePosition()
2402
- }],
2403
- "mask-image-x-from-color": [{
2404
- "mask-x-from": scaleColor()
2405
- }],
2406
- "mask-image-x-to-color": [{
2407
- "mask-x-to": scaleColor()
2408
- }],
2409
- "mask-image-y-from-pos": [{
2410
- "mask-y-from": scaleMaskImagePosition()
2411
- }],
2412
- "mask-image-y-to-pos": [{
2413
- "mask-y-to": scaleMaskImagePosition()
2414
- }],
2415
- "mask-image-y-from-color": [{
2416
- "mask-y-from": scaleColor()
2417
- }],
2418
- "mask-image-y-to-color": [{
2419
- "mask-y-to": scaleColor()
2420
- }],
2421
- "mask-image-radial": [{
2422
- "mask-radial": [isArbitraryVariable, isArbitraryValue]
2423
- }],
2424
- "mask-image-radial-from-pos": [{
2425
- "mask-radial-from": scaleMaskImagePosition()
2426
- }],
2427
- "mask-image-radial-to-pos": [{
2428
- "mask-radial-to": scaleMaskImagePosition()
2429
- }],
2430
- "mask-image-radial-from-color": [{
2431
- "mask-radial-from": scaleColor()
2432
- }],
2433
- "mask-image-radial-to-color": [{
2434
- "mask-radial-to": scaleColor()
2435
- }],
2436
- "mask-image-radial-shape": [{
2437
- "mask-radial": ["circle", "ellipse"]
2438
- }],
2439
- "mask-image-radial-size": [{
2440
- "mask-radial": [{
2441
- closest: ["side", "corner"],
2442
- farthest: ["side", "corner"]
2443
- }]
2444
- }],
2445
- "mask-image-radial-pos": [{
2446
- "mask-radial-at": scalePosition()
2447
- }],
2448
- "mask-image-conic-pos": [{
2449
- "mask-conic": [isNumber]
2450
- }],
2451
- "mask-image-conic-from-pos": [{
2452
- "mask-conic-from": scaleMaskImagePosition()
2453
- }],
2454
- "mask-image-conic-to-pos": [{
2455
- "mask-conic-to": scaleMaskImagePosition()
2456
- }],
2457
- "mask-image-conic-from-color": [{
2458
- "mask-conic-from": scaleColor()
2459
- }],
2460
- "mask-image-conic-to-color": [{
2461
- "mask-conic-to": scaleColor()
2462
- }],
2463
- /**
2464
- * Mask Mode
2465
- * @see https://tailwindcss.com/docs/mask-mode
2466
- */
2467
- "mask-mode": [{
2468
- mask: ["alpha", "luminance", "match"]
2469
- }],
2470
- /**
2471
- * Mask Origin
2472
- * @see https://tailwindcss.com/docs/mask-origin
2473
- */
2474
- "mask-origin": [{
2475
- "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2476
- }],
2477
- /**
2478
- * Mask Position
2479
- * @see https://tailwindcss.com/docs/mask-position
2480
- */
2481
- "mask-position": [{
2482
- mask: scaleBgPosition()
2483
- }],
2484
- /**
2485
- * Mask Repeat
2486
- * @see https://tailwindcss.com/docs/mask-repeat
2487
- */
2488
- "mask-repeat": [{
2489
- mask: scaleBgRepeat()
2490
- }],
2491
- /**
2492
- * Mask Size
2493
- * @see https://tailwindcss.com/docs/mask-size
2494
- */
2495
- "mask-size": [{
2496
- mask: scaleBgSize()
2497
- }],
2498
- /**
2499
- * Mask Type
2500
- * @see https://tailwindcss.com/docs/mask-type
2501
- */
2502
- "mask-type": [{
2503
- "mask-type": ["alpha", "luminance"]
2504
- }],
2505
- /**
2506
- * Mask Image
2507
- * @see https://tailwindcss.com/docs/mask-image
2508
- */
2509
- "mask-image": [{
2510
- mask: ["none", isArbitraryVariable, isArbitraryValue]
2511
- }],
2512
- // ---------------
2513
- // --- Filters ---
2514
- // ---------------
2515
- /**
2516
- * Filter
2517
- * @see https://tailwindcss.com/docs/filter
2518
- */
2519
- filter: [{
2520
- filter: [
2521
- // Deprecated since Tailwind CSS v3.0.0
2522
- "",
2523
- "none",
2524
- isArbitraryVariable,
2525
- isArbitraryValue
2526
- ]
2527
- }],
2528
- /**
2529
- * Blur
2530
- * @see https://tailwindcss.com/docs/blur
2531
- */
2532
- blur: [{
2533
- blur: scaleBlur()
2534
- }],
2535
- /**
2536
- * Brightness
2537
- * @see https://tailwindcss.com/docs/brightness
2538
- */
2539
- brightness: [{
2540
- brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
2541
- }],
2542
- /**
2543
- * Contrast
2544
- * @see https://tailwindcss.com/docs/contrast
2545
- */
2546
- contrast: [{
2547
- contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
2548
- }],
2549
- /**
2550
- * Drop Shadow
2551
- * @see https://tailwindcss.com/docs/drop-shadow
2552
- */
2553
- "drop-shadow": [{
2554
- "drop-shadow": [
2555
- // Deprecated since Tailwind CSS v4.0.0
2556
- "",
2557
- "none",
2558
- themeDropShadow,
2559
- isArbitraryVariableShadow,
2560
- isArbitraryShadow
2561
- ]
2562
- }],
2563
- /**
2564
- * Drop Shadow Color
2565
- * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2566
- */
2567
- "drop-shadow-color": [{
2568
- "drop-shadow": scaleColor()
2569
- }],
2570
- /**
2571
- * Grayscale
2572
- * @see https://tailwindcss.com/docs/grayscale
2573
- */
2574
- grayscale: [{
2575
- grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2576
- }],
2577
- /**
2578
- * Hue Rotate
2579
- * @see https://tailwindcss.com/docs/hue-rotate
2580
- */
2581
- "hue-rotate": [{
2582
- "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2583
- }],
2584
- /**
2585
- * Invert
2586
- * @see https://tailwindcss.com/docs/invert
2587
- */
2588
- invert: [{
2589
- invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2590
- }],
2591
- /**
2592
- * Saturate
2593
- * @see https://tailwindcss.com/docs/saturate
2594
- */
2595
- saturate: [{
2596
- saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
2597
- }],
2598
- /**
2599
- * Sepia
2600
- * @see https://tailwindcss.com/docs/sepia
2601
- */
2602
- sepia: [{
2603
- sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2604
- }],
2605
- /**
2606
- * Backdrop Filter
2607
- * @see https://tailwindcss.com/docs/backdrop-filter
2608
- */
2609
- "backdrop-filter": [{
2610
- "backdrop-filter": [
2611
- // Deprecated since Tailwind CSS v3.0.0
2612
- "",
2613
- "none",
2614
- isArbitraryVariable,
2615
- isArbitraryValue
2616
- ]
2617
- }],
2618
- /**
2619
- * Backdrop Blur
2620
- * @see https://tailwindcss.com/docs/backdrop-blur
2621
- */
2622
- "backdrop-blur": [{
2623
- "backdrop-blur": scaleBlur()
2624
- }],
2625
- /**
2626
- * Backdrop Brightness
2627
- * @see https://tailwindcss.com/docs/backdrop-brightness
2628
- */
2629
- "backdrop-brightness": [{
2630
- "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
2631
- }],
2632
- /**
2633
- * Backdrop Contrast
2634
- * @see https://tailwindcss.com/docs/backdrop-contrast
2635
- */
2636
- "backdrop-contrast": [{
2637
- "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
2638
- }],
2639
- /**
2640
- * Backdrop Grayscale
2641
- * @see https://tailwindcss.com/docs/backdrop-grayscale
2642
- */
2643
- "backdrop-grayscale": [{
2644
- "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2645
- }],
2646
- /**
2647
- * Backdrop Hue Rotate
2648
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2649
- */
2650
- "backdrop-hue-rotate": [{
2651
- "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2652
- }],
2653
- /**
2654
- * Backdrop Invert
2655
- * @see https://tailwindcss.com/docs/backdrop-invert
2656
- */
2657
- "backdrop-invert": [{
2658
- "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2659
- }],
2660
- /**
2661
- * Backdrop Opacity
2662
- * @see https://tailwindcss.com/docs/backdrop-opacity
2663
- */
2664
- "backdrop-opacity": [{
2665
- "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
2666
- }],
2667
- /**
2668
- * Backdrop Saturate
2669
- * @see https://tailwindcss.com/docs/backdrop-saturate
2670
- */
2671
- "backdrop-saturate": [{
2672
- "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
2673
- }],
2674
- /**
2675
- * Backdrop Sepia
2676
- * @see https://tailwindcss.com/docs/backdrop-sepia
2677
- */
2678
- "backdrop-sepia": [{
2679
- "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2680
- }],
2681
- // --------------
2682
- // --- Tables ---
2683
- // --------------
2684
- /**
2685
- * Border Collapse
2686
- * @see https://tailwindcss.com/docs/border-collapse
2687
- */
2688
- "border-collapse": [{
2689
- border: ["collapse", "separate"]
2690
- }],
2691
- /**
2692
- * Border Spacing
2693
- * @see https://tailwindcss.com/docs/border-spacing
2694
- */
2695
- "border-spacing": [{
2696
- "border-spacing": scaleUnambiguousSpacing()
2697
- }],
2698
- /**
2699
- * Border Spacing X
2700
- * @see https://tailwindcss.com/docs/border-spacing
2701
- */
2702
- "border-spacing-x": [{
2703
- "border-spacing-x": scaleUnambiguousSpacing()
2704
- }],
2705
- /**
2706
- * Border Spacing Y
2707
- * @see https://tailwindcss.com/docs/border-spacing
2708
- */
2709
- "border-spacing-y": [{
2710
- "border-spacing-y": scaleUnambiguousSpacing()
2711
- }],
2712
- /**
2713
- * Table Layout
2714
- * @see https://tailwindcss.com/docs/table-layout
2715
- */
2716
- "table-layout": [{
2717
- table: ["auto", "fixed"]
2718
- }],
2719
- /**
2720
- * Caption Side
2721
- * @see https://tailwindcss.com/docs/caption-side
2722
- */
2723
- caption: [{
2724
- caption: ["top", "bottom"]
2725
- }],
2726
- // ---------------------------------
2727
- // --- Transitions and Animation ---
2728
- // ---------------------------------
2729
- /**
2730
- * Transition Property
2731
- * @see https://tailwindcss.com/docs/transition-property
2732
- */
2733
- transition: [{
2734
- transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
2735
- }],
2736
- /**
2737
- * Transition Behavior
2738
- * @see https://tailwindcss.com/docs/transition-behavior
2739
- */
2740
- "transition-behavior": [{
2741
- transition: ["normal", "discrete"]
2742
- }],
2743
- /**
2744
- * Transition Duration
2745
- * @see https://tailwindcss.com/docs/transition-duration
2746
- */
2747
- duration: [{
2748
- duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
2749
- }],
2750
- /**
2751
- * Transition Timing Function
2752
- * @see https://tailwindcss.com/docs/transition-timing-function
2753
- */
2754
- ease: [{
2755
- ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
2756
- }],
2757
- /**
2758
- * Transition Delay
2759
- * @see https://tailwindcss.com/docs/transition-delay
2760
- */
2761
- delay: [{
2762
- delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2763
- }],
2764
- /**
2765
- * Animation
2766
- * @see https://tailwindcss.com/docs/animation
2767
- */
2768
- animate: [{
2769
- animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
2770
- }],
2771
- // ------------------
2772
- // --- Transforms ---
2773
- // ------------------
2774
- /**
2775
- * Backface Visibility
2776
- * @see https://tailwindcss.com/docs/backface-visibility
2777
- */
2778
- backface: [{
2779
- backface: ["hidden", "visible"]
2780
- }],
2781
- /**
2782
- * Perspective
2783
- * @see https://tailwindcss.com/docs/perspective
2784
- */
2785
- perspective: [{
2786
- perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2787
- }],
2788
- /**
2789
- * Perspective Origin
2790
- * @see https://tailwindcss.com/docs/perspective-origin
2791
- */
2792
- "perspective-origin": [{
2793
- "perspective-origin": scalePositionWithArbitrary()
2794
- }],
2795
- /**
2796
- * Rotate
2797
- * @see https://tailwindcss.com/docs/rotate
2798
- */
2799
- rotate: [{
2800
- rotate: scaleRotate()
2801
- }],
2802
- /**
2803
- * Rotate X
2804
- * @see https://tailwindcss.com/docs/rotate
2805
- */
2806
- "rotate-x": [{
2807
- "rotate-x": scaleRotate()
2808
- }],
2809
- /**
2810
- * Rotate Y
2811
- * @see https://tailwindcss.com/docs/rotate
2812
- */
2813
- "rotate-y": [{
2814
- "rotate-y": scaleRotate()
2815
- }],
2816
- /**
2817
- * Rotate Z
2818
- * @see https://tailwindcss.com/docs/rotate
2819
- */
2820
- "rotate-z": [{
2821
- "rotate-z": scaleRotate()
2822
- }],
2823
- /**
2824
- * Scale
2825
- * @see https://tailwindcss.com/docs/scale
2826
- */
2827
- scale: [{
2828
- scale: scaleScale()
2829
- }],
2830
- /**
2831
- * Scale X
2832
- * @see https://tailwindcss.com/docs/scale
2833
- */
2834
- "scale-x": [{
2835
- "scale-x": scaleScale()
2836
- }],
2837
- /**
2838
- * Scale Y
2839
- * @see https://tailwindcss.com/docs/scale
2840
- */
2841
- "scale-y": [{
2842
- "scale-y": scaleScale()
2843
- }],
2844
- /**
2845
- * Scale Z
2846
- * @see https://tailwindcss.com/docs/scale
2847
- */
2848
- "scale-z": [{
2849
- "scale-z": scaleScale()
2850
- }],
2851
- /**
2852
- * Scale 3D
2853
- * @see https://tailwindcss.com/docs/scale
2854
- */
2855
- "scale-3d": ["scale-3d"],
2856
- /**
2857
- * Skew
2858
- * @see https://tailwindcss.com/docs/skew
2859
- */
2860
- skew: [{
2861
- skew: scaleSkew()
2862
- }],
2863
- /**
2864
- * Skew X
2865
- * @see https://tailwindcss.com/docs/skew
2866
- */
2867
- "skew-x": [{
2868
- "skew-x": scaleSkew()
2869
- }],
2870
- /**
2871
- * Skew Y
2872
- * @see https://tailwindcss.com/docs/skew
2873
- */
2874
- "skew-y": [{
2875
- "skew-y": scaleSkew()
2876
- }],
2877
- /**
2878
- * Transform
2879
- * @see https://tailwindcss.com/docs/transform
2880
- */
2881
- transform: [{
2882
- transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
2883
- }],
2884
- /**
2885
- * Transform Origin
2886
- * @see https://tailwindcss.com/docs/transform-origin
2887
- */
2888
- "transform-origin": [{
2889
- origin: scalePositionWithArbitrary()
2890
- }],
2891
- /**
2892
- * Transform Style
2893
- * @see https://tailwindcss.com/docs/transform-style
2894
- */
2895
- "transform-style": [{
2896
- transform: ["3d", "flat"]
2897
- }],
2898
- /**
2899
- * Translate
2900
- * @see https://tailwindcss.com/docs/translate
2901
- */
2902
- translate: [{
2903
- translate: scaleTranslate()
2904
- }],
2905
- /**
2906
- * Translate X
2907
- * @see https://tailwindcss.com/docs/translate
2908
- */
2909
- "translate-x": [{
2910
- "translate-x": scaleTranslate()
2911
- }],
2912
- /**
2913
- * Translate Y
2914
- * @see https://tailwindcss.com/docs/translate
2915
- */
2916
- "translate-y": [{
2917
- "translate-y": scaleTranslate()
2918
- }],
2919
- /**
2920
- * Translate Z
2921
- * @see https://tailwindcss.com/docs/translate
2922
- */
2923
- "translate-z": [{
2924
- "translate-z": scaleTranslate()
2925
- }],
2926
- /**
2927
- * Translate None
2928
- * @see https://tailwindcss.com/docs/translate
2929
- */
2930
- "translate-none": ["translate-none"],
2931
- // ---------------------
2932
- // --- Interactivity ---
2933
- // ---------------------
2934
- /**
2935
- * Accent Color
2936
- * @see https://tailwindcss.com/docs/accent-color
2937
- */
2938
- accent: [{
2939
- accent: scaleColor()
2940
- }],
2941
- /**
2942
- * Appearance
2943
- * @see https://tailwindcss.com/docs/appearance
2944
- */
2945
- appearance: [{
2946
- appearance: ["none", "auto"]
2947
- }],
2948
- /**
2949
- * Caret Color
2950
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2951
- */
2952
- "caret-color": [{
2953
- caret: scaleColor()
2954
- }],
2955
- /**
2956
- * Color Scheme
2957
- * @see https://tailwindcss.com/docs/color-scheme
2958
- */
2959
- "color-scheme": [{
2960
- scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
2961
- }],
2962
- /**
2963
- * Cursor
2964
- * @see https://tailwindcss.com/docs/cursor
2965
- */
2966
- cursor: [{
2967
- 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]
2968
- }],
2969
- /**
2970
- * Field Sizing
2971
- * @see https://tailwindcss.com/docs/field-sizing
2972
- */
2973
- "field-sizing": [{
2974
- "field-sizing": ["fixed", "content"]
2975
- }],
2976
- /**
2977
- * Pointer Events
2978
- * @see https://tailwindcss.com/docs/pointer-events
2979
- */
2980
- "pointer-events": [{
2981
- "pointer-events": ["auto", "none"]
2982
- }],
2983
- /**
2984
- * Resize
2985
- * @see https://tailwindcss.com/docs/resize
2986
- */
2987
- resize: [{
2988
- resize: ["none", "", "y", "x"]
2989
- }],
2990
- /**
2991
- * Scroll Behavior
2992
- * @see https://tailwindcss.com/docs/scroll-behavior
2993
- */
2994
- "scroll-behavior": [{
2995
- scroll: ["auto", "smooth"]
2996
- }],
2997
- /**
2998
- * Scroll Margin
2999
- * @see https://tailwindcss.com/docs/scroll-margin
3000
- */
3001
- "scroll-m": [{
3002
- "scroll-m": scaleUnambiguousSpacing()
3003
- }],
3004
- /**
3005
- * Scroll Margin X
3006
- * @see https://tailwindcss.com/docs/scroll-margin
3007
- */
3008
- "scroll-mx": [{
3009
- "scroll-mx": scaleUnambiguousSpacing()
3010
- }],
3011
- /**
3012
- * Scroll Margin Y
3013
- * @see https://tailwindcss.com/docs/scroll-margin
3014
- */
3015
- "scroll-my": [{
3016
- "scroll-my": scaleUnambiguousSpacing()
3017
- }],
3018
- /**
3019
- * Scroll Margin Start
3020
- * @see https://tailwindcss.com/docs/scroll-margin
3021
- */
3022
- "scroll-ms": [{
3023
- "scroll-ms": scaleUnambiguousSpacing()
3024
- }],
3025
- /**
3026
- * Scroll Margin End
3027
- * @see https://tailwindcss.com/docs/scroll-margin
3028
- */
3029
- "scroll-me": [{
3030
- "scroll-me": scaleUnambiguousSpacing()
3031
- }],
3032
- /**
3033
- * Scroll Margin Top
3034
- * @see https://tailwindcss.com/docs/scroll-margin
3035
- */
3036
- "scroll-mt": [{
3037
- "scroll-mt": scaleUnambiguousSpacing()
3038
- }],
3039
- /**
3040
- * Scroll Margin Right
3041
- * @see https://tailwindcss.com/docs/scroll-margin
3042
- */
3043
- "scroll-mr": [{
3044
- "scroll-mr": scaleUnambiguousSpacing()
3045
- }],
3046
- /**
3047
- * Scroll Margin Bottom
3048
- * @see https://tailwindcss.com/docs/scroll-margin
3049
- */
3050
- "scroll-mb": [{
3051
- "scroll-mb": scaleUnambiguousSpacing()
3052
- }],
3053
- /**
3054
- * Scroll Margin Left
3055
- * @see https://tailwindcss.com/docs/scroll-margin
3056
- */
3057
- "scroll-ml": [{
3058
- "scroll-ml": scaleUnambiguousSpacing()
3059
- }],
3060
- /**
3061
- * Scroll Padding
3062
- * @see https://tailwindcss.com/docs/scroll-padding
3063
- */
3064
- "scroll-p": [{
3065
- "scroll-p": scaleUnambiguousSpacing()
3066
- }],
3067
- /**
3068
- * Scroll Padding X
3069
- * @see https://tailwindcss.com/docs/scroll-padding
3070
- */
3071
- "scroll-px": [{
3072
- "scroll-px": scaleUnambiguousSpacing()
3073
- }],
3074
- /**
3075
- * Scroll Padding Y
3076
- * @see https://tailwindcss.com/docs/scroll-padding
3077
- */
3078
- "scroll-py": [{
3079
- "scroll-py": scaleUnambiguousSpacing()
3080
- }],
3081
- /**
3082
- * Scroll Padding Start
3083
- * @see https://tailwindcss.com/docs/scroll-padding
3084
- */
3085
- "scroll-ps": [{
3086
- "scroll-ps": scaleUnambiguousSpacing()
3087
- }],
3088
- /**
3089
- * Scroll Padding End
3090
- * @see https://tailwindcss.com/docs/scroll-padding
3091
- */
3092
- "scroll-pe": [{
3093
- "scroll-pe": scaleUnambiguousSpacing()
3094
- }],
3095
- /**
3096
- * Scroll Padding Top
3097
- * @see https://tailwindcss.com/docs/scroll-padding
3098
- */
3099
- "scroll-pt": [{
3100
- "scroll-pt": scaleUnambiguousSpacing()
3101
- }],
3102
- /**
3103
- * Scroll Padding Right
3104
- * @see https://tailwindcss.com/docs/scroll-padding
3105
- */
3106
- "scroll-pr": [{
3107
- "scroll-pr": scaleUnambiguousSpacing()
3108
- }],
3109
- /**
3110
- * Scroll Padding Bottom
3111
- * @see https://tailwindcss.com/docs/scroll-padding
3112
- */
3113
- "scroll-pb": [{
3114
- "scroll-pb": scaleUnambiguousSpacing()
3115
- }],
3116
- /**
3117
- * Scroll Padding Left
3118
- * @see https://tailwindcss.com/docs/scroll-padding
3119
- */
3120
- "scroll-pl": [{
3121
- "scroll-pl": scaleUnambiguousSpacing()
3122
- }],
3123
- /**
3124
- * Scroll Snap Align
3125
- * @see https://tailwindcss.com/docs/scroll-snap-align
3126
- */
3127
- "snap-align": [{
3128
- snap: ["start", "end", "center", "align-none"]
3129
- }],
3130
- /**
3131
- * Scroll Snap Stop
3132
- * @see https://tailwindcss.com/docs/scroll-snap-stop
3133
- */
3134
- "snap-stop": [{
3135
- snap: ["normal", "always"]
3136
- }],
3137
- /**
3138
- * Scroll Snap Type
3139
- * @see https://tailwindcss.com/docs/scroll-snap-type
3140
- */
3141
- "snap-type": [{
3142
- snap: ["none", "x", "y", "both"]
3143
- }],
3144
- /**
3145
- * Scroll Snap Type Strictness
3146
- * @see https://tailwindcss.com/docs/scroll-snap-type
3147
- */
3148
- "snap-strictness": [{
3149
- snap: ["mandatory", "proximity"]
3150
- }],
3151
- /**
3152
- * Touch Action
3153
- * @see https://tailwindcss.com/docs/touch-action
3154
- */
3155
- touch: [{
3156
- touch: ["auto", "none", "manipulation"]
3157
- }],
3158
- /**
3159
- * Touch Action X
3160
- * @see https://tailwindcss.com/docs/touch-action
3161
- */
3162
- "touch-x": [{
3163
- "touch-pan": ["x", "left", "right"]
3164
- }],
3165
- /**
3166
- * Touch Action Y
3167
- * @see https://tailwindcss.com/docs/touch-action
3168
- */
3169
- "touch-y": [{
3170
- "touch-pan": ["y", "up", "down"]
3171
- }],
3172
- /**
3173
- * Touch Action Pinch Zoom
3174
- * @see https://tailwindcss.com/docs/touch-action
3175
- */
3176
- "touch-pz": ["touch-pinch-zoom"],
3177
- /**
3178
- * User Select
3179
- * @see https://tailwindcss.com/docs/user-select
3180
- */
3181
- select: [{
3182
- select: ["none", "text", "all", "auto"]
3183
- }],
3184
- /**
3185
- * Will Change
3186
- * @see https://tailwindcss.com/docs/will-change
3187
- */
3188
- "will-change": [{
3189
- "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
3190
- }],
3191
- // -----------
3192
- // --- SVG ---
3193
- // -----------
3194
- /**
3195
- * Fill
3196
- * @see https://tailwindcss.com/docs/fill
3197
- */
3198
- fill: [{
3199
- fill: ["none", ...scaleColor()]
3200
- }],
3201
- /**
3202
- * Stroke Width
3203
- * @see https://tailwindcss.com/docs/stroke-width
3204
- */
3205
- "stroke-w": [{
3206
- stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
3207
- }],
3208
- /**
3209
- * Stroke
3210
- * @see https://tailwindcss.com/docs/stroke
3211
- */
3212
- stroke: [{
3213
- stroke: ["none", ...scaleColor()]
3214
- }],
3215
- // ---------------------
3216
- // --- Accessibility ---
3217
- // ---------------------
3218
- /**
3219
- * Forced Color Adjust
3220
- * @see https://tailwindcss.com/docs/forced-color-adjust
3221
- */
3222
- "forced-color-adjust": [{
3223
- "forced-color-adjust": ["auto", "none"]
3224
- }]
3225
- },
3226
- conflictingClassGroups: {
3227
- overflow: ["overflow-x", "overflow-y"],
3228
- overscroll: ["overscroll-x", "overscroll-y"],
3229
- inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
3230
- "inset-x": ["right", "left"],
3231
- "inset-y": ["top", "bottom"],
3232
- flex: ["basis", "grow", "shrink"],
3233
- gap: ["gap-x", "gap-y"],
3234
- p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
3235
- px: ["pr", "pl"],
3236
- py: ["pt", "pb"],
3237
- m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
3238
- mx: ["mr", "ml"],
3239
- my: ["mt", "mb"],
3240
- size: ["w", "h"],
3241
- "font-size": ["leading"],
3242
- "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
3243
- "fvn-ordinal": ["fvn-normal"],
3244
- "fvn-slashed-zero": ["fvn-normal"],
3245
- "fvn-figure": ["fvn-normal"],
3246
- "fvn-spacing": ["fvn-normal"],
3247
- "fvn-fraction": ["fvn-normal"],
3248
- "line-clamp": ["display", "overflow"],
3249
- 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"],
3250
- "rounded-s": ["rounded-ss", "rounded-es"],
3251
- "rounded-e": ["rounded-se", "rounded-ee"],
3252
- "rounded-t": ["rounded-tl", "rounded-tr"],
3253
- "rounded-r": ["rounded-tr", "rounded-br"],
3254
- "rounded-b": ["rounded-br", "rounded-bl"],
3255
- "rounded-l": ["rounded-tl", "rounded-bl"],
3256
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
3257
- "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"],
3258
- "border-w-x": ["border-w-r", "border-w-l"],
3259
- "border-w-y": ["border-w-t", "border-w-b"],
3260
- "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"],
3261
- "border-color-x": ["border-color-r", "border-color-l"],
3262
- "border-color-y": ["border-color-t", "border-color-b"],
3263
- translate: ["translate-x", "translate-y", "translate-none"],
3264
- "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
3265
- "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
3266
- "scroll-mx": ["scroll-mr", "scroll-ml"],
3267
- "scroll-my": ["scroll-mt", "scroll-mb"],
3268
- "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
3269
- "scroll-px": ["scroll-pr", "scroll-pl"],
3270
- "scroll-py": ["scroll-pt", "scroll-pb"],
3271
- touch: ["touch-x", "touch-y", "touch-pz"],
3272
- "touch-x": ["touch"],
3273
- "touch-y": ["touch"],
3274
- "touch-pz": ["touch"]
3275
- },
3276
- conflictingClassGroupModifiers: {
3277
- "font-size": ["leading"]
3278
- },
3279
- orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3280
- };
3281
- };
3282
- const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
7
+ //#region src/client/hooks/use-disable-scroll.ts
8
+ var useDisableScroll = (isDisableScroll) => {
9
+ useEffect(() => {
10
+ if (!isDisableScroll) return;
11
+ const scrollPosition = window.scrollY;
12
+ return () => {
13
+ window.scrollTo(0, scrollPosition);
14
+ };
15
+ }, []);
16
+ };
17
+ //#endregion
18
+ //#region src/client/hooks/use-is-client.ts
19
+ var useIsClient = () => {
20
+ const [isClient, setIsClient] = useState(false);
21
+ useEffect(() => {
22
+ setIsClient(true);
23
+ }, []);
24
+ return isClient;
25
+ };
26
+ //#endregion
27
+ //#region src/server/constants/index.ts
28
+ var THEME = {
29
+ VIEW_PORT: {
30
+ EXTRA_SMALL: 280,
31
+ SMALL: 320,
32
+ SMALL_MOBILE: 380,
33
+ MOBILE: 450,
34
+ MEDIUM: 500,
35
+ EXTRA_MEDIUM: 600,
36
+ TABLET: 768,
37
+ LAPTOP: 1024,
38
+ LAPTOP_BIG: 1200,
39
+ BIG: 1440,
40
+ VERY_BIG: 1920
41
+ },
42
+ OFFSET: {
43
+ 1: 8,
44
+ 2: 16,
45
+ 3: 24,
46
+ 4: 32,
47
+ 5: 40,
48
+ 6: 48,
49
+ 7: 56,
50
+ 8: 64
51
+ }
52
+ };
53
+ //#endregion
54
+ //#region src/client/hooks/use-view-port.ts
55
+ var useLaptopBigViewPort = () => {
56
+ return {
57
+ isLaptopBigMinWidth: useMedia(`(min-width: ${THEME.VIEW_PORT.LAPTOP_BIG}px)`),
58
+ isLaptopBigMaxWidth: useMedia(`(max-width: ${THEME.VIEW_PORT.LAPTOP_BIG}px)`)
59
+ };
60
+ };
61
+ var useLaptopViewPort = () => {
62
+ return {
63
+ isLaptopMinWidth: useMedia(`(min-width: ${THEME.VIEW_PORT.LAPTOP}px)`),
64
+ isLaptopMaxWidth: useMedia(`(max-width: ${THEME.VIEW_PORT.LAPTOP}px)`)
65
+ };
66
+ };
67
+ var useTabletViewPort = () => {
68
+ return {
69
+ isTabletMinWidth: useMedia(`(min-width: ${THEME.VIEW_PORT.TABLET}px)`),
70
+ isTabletMaxWidth: useMedia(`(max-width: ${THEME.VIEW_PORT.TABLET}px)`)
71
+ };
72
+ };
73
+ var useExtraMediumViewPort = () => {
74
+ return {
75
+ isExtraMediumMinWidth: useMedia(`(min-width: ${THEME.VIEW_PORT.EXTRA_MEDIUM}px)`),
76
+ isExtraMediumMaxWidth: useMedia(`(max-width: ${THEME.VIEW_PORT.EXTRA_MEDIUM}px)`)
77
+ };
78
+ };
79
+ var useMobileViewPort = () => {
80
+ return {
81
+ isMobileMinWidth: useMedia(`(min-width: ${THEME.VIEW_PORT.MOBILE}px)`),
82
+ isMobileMaxWidth: useMedia(`(max-width: ${THEME.VIEW_PORT.MOBILE}px)`)
83
+ };
84
+ };
85
+ var useSmallViewPort = () => {
86
+ return {
87
+ isSmallMinWidth: useMedia(`(min-width: ${THEME.VIEW_PORT.SMALL}px)`),
88
+ isSmallMaxWidth: useMedia(`(max-width: ${THEME.VIEW_PORT.SMALL}px)`)
89
+ };
90
+ };
91
+ //#endregion
92
+ //#region src/client/hooks/use-appear-animation.ts
93
+ var useAppearAnimation = ({ once = true, margin = "-100px", delay = .1, direction = "up", animationDistance = 50, duration = .8, ease = "easeOut" } = {}) => {
94
+ const ref = useRef(null);
95
+ const isInView = useInView(ref, {
96
+ once,
97
+ margin
98
+ });
99
+ const getInitialState = () => {
100
+ switch (direction) {
101
+ case "up": return {
102
+ opacity: 0,
103
+ y: animationDistance
104
+ };
105
+ case "down": return {
106
+ opacity: 0,
107
+ y: -animationDistance
108
+ };
109
+ case "left": return {
110
+ opacity: 0,
111
+ x: animationDistance
112
+ };
113
+ case "right": return {
114
+ opacity: 0,
115
+ x: -animationDistance
116
+ };
117
+ case "scale": return {
118
+ opacity: 0,
119
+ scale: .8
120
+ };
121
+ case "fade": return { opacity: 0 };
122
+ default: return {
123
+ opacity: 0,
124
+ y: animationDistance
125
+ };
126
+ }
127
+ };
128
+ const getAnimateState = () => {
129
+ switch (direction) {
130
+ case "up":
131
+ case "down": return {
132
+ opacity: 1,
133
+ y: 0
134
+ };
135
+ case "left":
136
+ case "right": return {
137
+ opacity: 1,
138
+ x: 0
139
+ };
140
+ case "scale": return {
141
+ opacity: 1,
142
+ scale: 1
143
+ };
144
+ case "fade": return { opacity: 1 };
145
+ default: return {
146
+ opacity: 1,
147
+ y: 0
148
+ };
149
+ }
150
+ };
151
+ return {
152
+ ref,
153
+ isInView,
154
+ motionProps: {
155
+ initial: getInitialState(),
156
+ animate: isInView ? getAnimateState() : void 0,
157
+ transition: {
158
+ duration,
159
+ ease,
160
+ delay
161
+ }
162
+ }
163
+ };
164
+ };
165
+ //#endregion
166
+ //#region src/server/lib/css.ts
3283
167
  function cn(...inputs) {
3284
- return twMerge(clsx(inputs));
168
+ return twMerge(clsx(inputs));
3285
169
  }
3286
- const HeaderWrapper = ({
3287
- children,
3288
- className,
3289
- hideClassName,
3290
- scrollPosition = 100,
3291
- hideBackgroundOnScroll = true
3292
- }) => {
3293
- const { y } = useWindowScroll();
3294
- const isClient = useIsClient();
3295
- const isHiddenBackground = hideBackgroundOnScroll && y > scrollPosition && isClient;
3296
- const headerClass = cn(
3297
- "fixed z-30 w-full transition bg-background",
3298
- className,
3299
- {
3300
- "bg-transparent": isHiddenBackground
3301
- },
3302
- {
3303
- hideClassName: isHiddenBackground && hideClassName
3304
- }
3305
- );
3306
- return /* @__PURE__ */ jsx("header", { className: headerClass, children });
3307
- };
3308
- const InfinityList = ({
3309
- children,
3310
- intersectionElementClassName,
3311
- isNext,
3312
- intersectionElement,
3313
- onIntersection
3314
- }) => {
3315
- const intersectionRef = useRef({});
3316
- const intersection = useIntersection(intersectionRef, {
3317
- root: null,
3318
- rootMargin: "0px",
3319
- threshold: 1
3320
- });
3321
- useEffect(() => {
3322
- if (!(intersection == null ? void 0 : intersection.isIntersecting)) return;
3323
- onIntersection();
3324
- }, [intersection == null ? void 0 : intersection.isIntersecting]);
3325
- return /* @__PURE__ */ jsxs("div", { children: [
3326
- /* @__PURE__ */ jsx("div", { children }),
3327
- /* @__PURE__ */ jsx(
3328
- "div",
3329
- {
3330
- className: cn(intersectionElementClassName, {
3331
- hidden: !isNext
3332
- }),
3333
- ref: intersectionRef,
3334
- children: intersectionElement()
3335
- }
3336
- )
3337
- ] });
3338
- };
3339
- export {
3340
- HeaderWrapper,
3341
- InfinityList,
3342
- useAppearAnimation,
3343
- useDisableScroll,
3344
- useExtraMediumViewPort,
3345
- useIsClient,
3346
- useLaptopBigViewPort,
3347
- useLaptopViewPort,
3348
- useMobileViewPort,
3349
- useSmallViewPort,
3350
- useTabletViewPort
3351
- };
170
+ //#endregion
171
+ //#region src/client/ui/header-wrapper.tsx
172
+ var HeaderWrapper = ({ children, className, hideClassName, scrollPosition = 100, hideBackgroundOnScroll = true }) => {
173
+ const { y } = useWindowScroll();
174
+ const isClient = useIsClient();
175
+ const isHiddenBackground = hideBackgroundOnScroll && y > scrollPosition && isClient;
176
+ return /* @__PURE__ */ jsx("header", {
177
+ className: cn("fixed z-30 w-full transition bg-background", className, { "bg-transparent": isHiddenBackground }, { hideClassName: isHiddenBackground && hideClassName }),
178
+ children
179
+ });
180
+ };
181
+ //#endregion
182
+ //#region src/client/ui/infinity-list.tsx
183
+ var InfinityList = ({ children, intersectionElementClassName, isNext, intersectionElement, onIntersection }) => {
184
+ const intersectionRef = useRef({});
185
+ const intersection = useIntersection(intersectionRef, {
186
+ root: null,
187
+ rootMargin: "0px",
188
+ threshold: 1
189
+ });
190
+ useEffect(() => {
191
+ if (!intersection?.isIntersecting) return;
192
+ onIntersection();
193
+ }, [intersection?.isIntersecting]);
194
+ return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", { children }), /* @__PURE__ */ jsx("div", {
195
+ className: cn(intersectionElementClassName, { hidden: !isNext }),
196
+ ref: intersectionRef,
197
+ children: intersectionElement()
198
+ })] });
199
+ };
200
+ //#endregion
201
+ export { HeaderWrapper, InfinityList, useAppearAnimation, useDisableScroll, useExtraMediumViewPort, useIsClient, useLaptopBigViewPort, useLaptopViewPort, useMobileViewPort, useSmallViewPort, useTabletViewPort };