bundle-mjs.mjs 97 KB

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