bundle-cjs.js 97 KB

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