| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197 |
- 'use strict';
- 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); }
- Object.defineProperty(exports, Symbol.toStringTag, {
- value: 'Module'
- });
- var CLASS_PART_SEPARATOR = '-';
- var createClassGroupUtils = function createClassGroupUtils(config) {
- var classMap = createClassMap(config);
- var conflictingClassGroups = config.conflictingClassGroups,
- conflictingClassGroupModifiers = config.conflictingClassGroupModifiers;
- var getClassGroupId = function getClassGroupId(className) {
- var classParts = className.split(CLASS_PART_SEPARATOR);
- // 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.
- if (classParts[0] === '' && classParts.length !== 1) {
- classParts.shift();
- }
- return _getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
- };
- var getConflictingClassGroupIds = function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {
- var conflicts = conflictingClassGroups[classGroupId] || [];
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
- return [].concat(conflicts, conflictingClassGroupModifiers[classGroupId]);
- }
- return conflicts;
- };
- return {
- getClassGroupId: getClassGroupId,
- getConflictingClassGroupIds: getConflictingClassGroupIds
- };
- };
- var _getGroupRecursive = function getGroupRecursive(classParts, classPartObject) {
- var _classPartObject$vali;
- if (classParts.length === 0) {
- return classPartObject.classGroupId;
- }
- var currentClassPart = classParts[0];
- var nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
- var classGroupFromNextClassPart = nextClassPartObject ? _getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
- if (classGroupFromNextClassPart) {
- return classGroupFromNextClassPart;
- }
- if (classPartObject.validators.length === 0) {
- return undefined;
- }
- var classRest = classParts.join(CLASS_PART_SEPARATOR);
- return (_classPartObject$vali = classPartObject.validators.find(function (_ref) {
- var validator = _ref.validator;
- return validator(classRest);
- })) == null ? void 0 : _classPartObject$vali.classGroupId;
- };
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
- var getGroupIdForArbitraryProperty = function getGroupIdForArbitraryProperty(className) {
- if (arbitraryPropertyRegex.test(className)) {
- var arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
- var property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(':'));
- if (property) {
- // I use two dots here because one dot is used as prefix for class groups in plugins
- return 'arbitrary..' + property;
- }
- }
- };
- /**
- * Exported for testing only
- */
- var createClassMap = function createClassMap(config) {
- var theme = config.theme,
- classGroups = config.classGroups;
- var classMap = {
- nextPart: new Map(),
- validators: []
- };
- for (var classGroupId in classGroups) {
- _processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
- }
- return classMap;
- };
- var _processClassesRecursively = function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
- classGroup.forEach(function (classDefinition) {
- if (typeof classDefinition === 'string') {
- var classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
- classPartObjectToEdit.classGroupId = classGroupId;
- return;
- }
- if (typeof classDefinition === 'function') {
- if (isThemeGetter(classDefinition)) {
- _processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
- return;
- }
- classPartObject.validators.push({
- validator: classDefinition,
- classGroupId: classGroupId
- });
- return;
- }
- Object.entries(classDefinition).forEach(function (_ref2) {
- var key = _ref2[0],
- classGroup = _ref2[1];
- _processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
- });
- });
- };
- var getPart = function getPart(classPartObject, path) {
- var currentClassPartObject = classPartObject;
- path.split(CLASS_PART_SEPARATOR).forEach(function (pathPart) {
- if (!currentClassPartObject.nextPart.has(pathPart)) {
- currentClassPartObject.nextPart.set(pathPart, {
- nextPart: new Map(),
- validators: []
- });
- }
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
- });
- return currentClassPartObject;
- };
- var isThemeGetter = function isThemeGetter(func) {
- return func.isThemeGetter;
- };
- // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
- var createLruCache = function createLruCache(maxCacheSize) {
- if (maxCacheSize < 1) {
- return {
- get: function get() {
- return undefined;
- },
- set: function set() {}
- };
- }
- var cacheSize = 0;
- var cache = new Map();
- var previousCache = new Map();
- var update = function update(key, value) {
- cache.set(key, value);
- cacheSize++;
- if (cacheSize > maxCacheSize) {
- cacheSize = 0;
- previousCache = cache;
- cache = new Map();
- }
- };
- return {
- get: function get(key) {
- var value = cache.get(key);
- if (value !== undefined) {
- return value;
- }
- if ((value = previousCache.get(key)) !== undefined) {
- update(key, value);
- return value;
- }
- },
- set: function set(key, value) {
- if (cache.has(key)) {
- cache.set(key, value);
- } else {
- update(key, value);
- }
- }
- };
- };
- var IMPORTANT_MODIFIER = '!';
- var MODIFIER_SEPARATOR = ':';
- var MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
- var createParseClassName = function createParseClassName(config) {
- var prefix = config.prefix,
- experimentalParseClassName = config.experimentalParseClassName;
- /**
- * Parse class name into parts.
- *
- * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
- */
- var parseClassName = function parseClassName(className) {
- var modifiers = [];
- var bracketDepth = 0;
- var parenDepth = 0;
- var modifierStart = 0;
- var postfixModifierPosition;
- for (var index = 0; index < className.length; index++) {
- var currentCharacter = className[index];
- if (bracketDepth === 0 && parenDepth === 0) {
- if (currentCharacter === MODIFIER_SEPARATOR) {
- modifiers.push(className.slice(modifierStart, index));
- modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
- continue;
- }
- if (currentCharacter === '/') {
- postfixModifierPosition = index;
- continue;
- }
- }
- if (currentCharacter === '[') {
- bracketDepth++;
- } else if (currentCharacter === ']') {
- bracketDepth--;
- } else if (currentCharacter === '(') {
- parenDepth++;
- } else if (currentCharacter === ')') {
- parenDepth--;
- }
- }
- var baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
- var baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
- var hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
- var maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
- return {
- modifiers: modifiers,
- hasImportantModifier: hasImportantModifier,
- baseClassName: baseClassName,
- maybePostfixModifierPosition: maybePostfixModifierPosition
- };
- };
- if (prefix) {
- var fullPrefix = prefix + MODIFIER_SEPARATOR;
- var parseClassNameOriginal = parseClassName;
- parseClassName = function parseClassName(className) {
- return className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
- isExternal: true,
- modifiers: [],
- hasImportantModifier: false,
- baseClassName: className,
- maybePostfixModifierPosition: undefined
- };
- };
- }
- if (experimentalParseClassName) {
- var _parseClassNameOriginal = parseClassName;
- parseClassName = function parseClassName(className) {
- return experimentalParseClassName({
- className: className,
- parseClassName: _parseClassNameOriginal
- });
- };
- }
- return parseClassName;
- };
- var stripImportantModifier = function stripImportantModifier(baseClassName) {
- if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
- return baseClassName.substring(0, baseClassName.length - 1);
- }
- /**
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
- */
- if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
- return baseClassName.substring(1);
- }
- return baseClassName;
- };
- /**
- * Sorts modifiers according to following schema:
- * - Predefined modifiers are sorted alphabetically
- * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
- */
- var createSortModifiers = function createSortModifiers(config) {
- var orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(function (modifier) {
- return [modifier, true];
- }));
- var sortModifiers = function sortModifiers(modifiers) {
- if (modifiers.length <= 1) {
- return modifiers;
- }
- var sortedModifiers = [];
- var unsortedModifiers = [];
- modifiers.forEach(function (modifier) {
- var isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];
- if (isPositionSensitive) {
- sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort().concat([modifier]));
- unsortedModifiers = [];
- } else {
- unsortedModifiers.push(modifier);
- }
- });
- sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort());
- return sortedModifiers;
- };
- return sortModifiers;
- };
- var createConfigUtils = function createConfigUtils(config) {
- return _extends({
- cache: createLruCache(config.cacheSize),
- parseClassName: createParseClassName(config),
- sortModifiers: createSortModifiers(config)
- }, createClassGroupUtils(config));
- };
- var SPLIT_CLASSES_REGEX = /\s+/;
- var mergeClassList = function mergeClassList(classList, configUtils) {
- var parseClassName = configUtils.parseClassName,
- getClassGroupId = configUtils.getClassGroupId,
- getConflictingClassGroupIds = configUtils.getConflictingClassGroupIds,
- sortModifiers = configUtils.sortModifiers;
- /**
- * Set of classGroupIds in following format:
- * `{importantModifier}{variantModifiers}{classGroupId}`
- * @example 'float'
- * @example 'hover:focus:bg-color'
- * @example 'md:!pr'
- */
- var classGroupsInConflict = [];
- var classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
- var result = '';
- for (var index = classNames.length - 1; index >= 0; index -= 1) {
- var originalClassName = classNames[index];
- var _parseClassName = parseClassName(originalClassName),
- isExternal = _parseClassName.isExternal,
- modifiers = _parseClassName.modifiers,
- hasImportantModifier = _parseClassName.hasImportantModifier,
- baseClassName = _parseClassName.baseClassName,
- maybePostfixModifierPosition = _parseClassName.maybePostfixModifierPosition;
- if (isExternal) {
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
- continue;
- }
- var hasPostfixModifier = !!maybePostfixModifierPosition;
- var classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
- if (!classGroupId) {
- if (!hasPostfixModifier) {
- // Not a Tailwind class
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
- continue;
- }
- classGroupId = getClassGroupId(baseClassName);
- if (!classGroupId) {
- // Not a Tailwind class
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
- continue;
- }
- hasPostfixModifier = false;
- }
- var variantModifier = sortModifiers(modifiers).join(':');
- var modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
- var classId = modifierId + classGroupId;
- if (classGroupsInConflict.includes(classId)) {
- // Tailwind class omitted due to conflict
- continue;
- }
- classGroupsInConflict.push(classId);
- var conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
- for (var i = 0; i < conflictGroups.length; ++i) {
- var group = conflictGroups[i];
- classGroupsInConflict.push(modifierId + group);
- }
- // Tailwind class not in conflict
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
- }
- return result;
- };
- /**
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
- *
- * Specifically:
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
- *
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
- */
- function twJoin() {
- var index = 0;
- var argument;
- var resolvedValue;
- var string = '';
- while (index < arguments.length) {
- if (argument = arguments[index++]) {
- if (resolvedValue = _toValue(argument)) {
- string && (string += ' ');
- string += resolvedValue;
- }
- }
- }
- return string;
- }
- var _toValue = function toValue(mix) {
- if (typeof mix === 'string') {
- return mix;
- }
- var resolvedValue;
- var string = '';
- for (var k = 0; k < mix.length; k++) {
- if (mix[k]) {
- if (resolvedValue = _toValue(mix[k])) {
- string && (string += ' ');
- string += resolvedValue;
- }
- }
- }
- return string;
- };
- function createTailwindMerge(createConfigFirst) {
- for (var _len = arguments.length, createConfigRest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- createConfigRest[_key - 1] = arguments[_key];
- }
- var configUtils;
- var cacheGet;
- var cacheSet;
- var functionToCall = initTailwindMerge;
- function initTailwindMerge(classList) {
- var config = createConfigRest.reduce(function (previousConfig, createConfigCurrent) {
- return createConfigCurrent(previousConfig);
- }, createConfigFirst());
- configUtils = createConfigUtils(config);
- cacheGet = configUtils.cache.get;
- cacheSet = configUtils.cache.set;
- functionToCall = tailwindMerge;
- return tailwindMerge(classList);
- }
- function tailwindMerge(classList) {
- var cachedResult = cacheGet(classList);
- if (cachedResult) {
- return cachedResult;
- }
- var result = mergeClassList(classList, configUtils);
- cacheSet(classList, result);
- return result;
- }
- return function callTailwindMerge() {
- return functionToCall(twJoin.apply(null, arguments));
- };
- }
- var fromTheme = function fromTheme(key) {
- var themeGetter = function themeGetter(theme) {
- return theme[key] || [];
- };
- themeGetter.isThemeGetter = true;
- return themeGetter;
- };
- var arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
- var arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
- var fractionRegex = /^\d+\/\d+$/;
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
- 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$/;
- var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
- // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
- var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
- var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
- var isFraction = function isFraction(value) {
- return fractionRegex.test(value);
- };
- var isNumber = function isNumber(value) {
- return !!value && !Number.isNaN(Number(value));
- };
- var isInteger = function isInteger(value) {
- return !!value && Number.isInteger(Number(value));
- };
- var isPercent = function isPercent(value) {
- return value.endsWith('%') && isNumber(value.slice(0, -1));
- };
- var isTshirtSize = function isTshirtSize(value) {
- return tshirtUnitRegex.test(value);
- };
- var isAny = function isAny() {
- return true;
- };
- var isLengthOnly = function isLengthOnly(value) {
- return (
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
- lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
- );
- };
- var isNever = function isNever() {
- return false;
- };
- var isShadow = function isShadow(value) {
- return shadowRegex.test(value);
- };
- var isImage = function isImage(value) {
- return imageRegex.test(value);
- };
- var isAnyNonArbitrary = function isAnyNonArbitrary(value) {
- return !isArbitraryValue(value) && !isArbitraryVariable(value);
- };
- var isArbitrarySize = function isArbitrarySize(value) {
- return getIsArbitraryValue(value, isLabelSize, isNever);
- };
- var isArbitraryValue = function isArbitraryValue(value) {
- return arbitraryValueRegex.test(value);
- };
- var isArbitraryLength = function isArbitraryLength(value) {
- return getIsArbitraryValue(value, isLabelLength, isLengthOnly);
- };
- var isArbitraryNumber = function isArbitraryNumber(value) {
- return getIsArbitraryValue(value, isLabelNumber, isNumber);
- };
- var isArbitraryPosition = function isArbitraryPosition(value) {
- return getIsArbitraryValue(value, isLabelPosition, isNever);
- };
- var isArbitraryImage = function isArbitraryImage(value) {
- return getIsArbitraryValue(value, isLabelImage, isImage);
- };
- var isArbitraryShadow = function isArbitraryShadow(value) {
- return getIsArbitraryValue(value, isLabelShadow, isShadow);
- };
- var isArbitraryVariable = function isArbitraryVariable(value) {
- return arbitraryVariableRegex.test(value);
- };
- var isArbitraryVariableLength = function isArbitraryVariableLength(value) {
- return getIsArbitraryVariable(value, isLabelLength);
- };
- var isArbitraryVariableFamilyName = function isArbitraryVariableFamilyName(value) {
- return getIsArbitraryVariable(value, isLabelFamilyName);
- };
- var isArbitraryVariablePosition = function isArbitraryVariablePosition(value) {
- return getIsArbitraryVariable(value, isLabelPosition);
- };
- var isArbitraryVariableSize = function isArbitraryVariableSize(value) {
- return getIsArbitraryVariable(value, isLabelSize);
- };
- var isArbitraryVariableImage = function isArbitraryVariableImage(value) {
- return getIsArbitraryVariable(value, isLabelImage);
- };
- var isArbitraryVariableShadow = function isArbitraryVariableShadow(value) {
- return getIsArbitraryVariable(value, isLabelShadow, true);
- };
- // Helpers
- var getIsArbitraryValue = function getIsArbitraryValue(value, testLabel, testValue) {
- var result = arbitraryValueRegex.exec(value);
- if (result) {
- if (result[1]) {
- return testLabel(result[1]);
- }
- return testValue(result[2]);
- }
- return false;
- };
- var getIsArbitraryVariable = function getIsArbitraryVariable(value, testLabel, shouldMatchNoLabel) {
- if (shouldMatchNoLabel === void 0) {
- shouldMatchNoLabel = false;
- }
- var result = arbitraryVariableRegex.exec(value);
- if (result) {
- if (result[1]) {
- return testLabel(result[1]);
- }
- return shouldMatchNoLabel;
- }
- return false;
- };
- // Labels
- var isLabelPosition = function isLabelPosition(label) {
- return label === 'position' || label === 'percentage';
- };
- var isLabelImage = function isLabelImage(label) {
- return label === 'image' || label === 'url';
- };
- var isLabelSize = function isLabelSize(label) {
- return label === 'length' || label === 'size' || label === 'bg-size';
- };
- var isLabelLength = function isLabelLength(label) {
- return label === 'length';
- };
- var isLabelNumber = function isLabelNumber(label) {
- return label === 'number';
- };
- var isLabelFamilyName = function isLabelFamilyName(label) {
- return label === 'family-name';
- };
- var isLabelShadow = function isLabelShadow(label) {
- return label === 'shadow';
- };
- var validators = /*#__PURE__*/Object.defineProperty({
- __proto__: null,
- isAny: isAny,
- isAnyNonArbitrary: isAnyNonArbitrary,
- isArbitraryImage: isArbitraryImage,
- isArbitraryLength: isArbitraryLength,
- isArbitraryNumber: isArbitraryNumber,
- isArbitraryPosition: isArbitraryPosition,
- isArbitraryShadow: isArbitraryShadow,
- isArbitrarySize: isArbitrarySize,
- isArbitraryValue: isArbitraryValue,
- isArbitraryVariable: isArbitraryVariable,
- isArbitraryVariableFamilyName: isArbitraryVariableFamilyName,
- isArbitraryVariableImage: isArbitraryVariableImage,
- isArbitraryVariableLength: isArbitraryVariableLength,
- isArbitraryVariablePosition: isArbitraryVariablePosition,
- isArbitraryVariableShadow: isArbitraryVariableShadow,
- isArbitraryVariableSize: isArbitraryVariableSize,
- isFraction: isFraction,
- isInteger: isInteger,
- isNumber: isNumber,
- isPercent: isPercent,
- isTshirtSize: isTshirtSize
- }, Symbol.toStringTag, {
- value: 'Module'
- });
- var getDefaultConfig = function getDefaultConfig() {
- /**
- * Theme getters for theme variable namespaces
- * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
- */
- /***/
- var themeColor = fromTheme('color');
- var themeFont = fromTheme('font');
- var themeText = fromTheme('text');
- var themeFontWeight = fromTheme('font-weight');
- var themeTracking = fromTheme('tracking');
- var themeLeading = fromTheme('leading');
- var themeBreakpoint = fromTheme('breakpoint');
- var themeContainer = fromTheme('container');
- var themeSpacing = fromTheme('spacing');
- var themeRadius = fromTheme('radius');
- var themeShadow = fromTheme('shadow');
- var themeInsetShadow = fromTheme('inset-shadow');
- var themeTextShadow = fromTheme('text-shadow');
- var themeDropShadow = fromTheme('drop-shadow');
- var themeBlur = fromTheme('blur');
- var themePerspective = fromTheme('perspective');
- var themeAspect = fromTheme('aspect');
- var themeEase = fromTheme('ease');
- var themeAnimate = fromTheme('animate');
- /**
- * Helpers to avoid repeating the same scales
- *
- * We use functions that create a new array every time they're called instead of static arrays.
- * 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.
- */
- /***/
- var scaleBreak = function scaleBreak() {
- return ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
- };
- var scalePosition = function scalePosition() {
- return ['center', 'top', 'bottom', 'left', 'right', 'top-left',
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
- 'left-top', 'top-right',
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
- 'right-top', 'bottom-right',
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
- 'right-bottom', 'bottom-left',
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
- 'left-bottom'];
- };
- var scalePositionWithArbitrary = function scalePositionWithArbitrary() {
- return [].concat(scalePosition(), [isArbitraryVariable, isArbitraryValue]);
- };
- var scaleOverflow = function scaleOverflow() {
- return ['auto', 'hidden', 'clip', 'visible', 'scroll'];
- };
- var scaleOverscroll = function scaleOverscroll() {
- return ['auto', 'contain', 'none'];
- };
- var scaleUnambiguousSpacing = function scaleUnambiguousSpacing() {
- return [isArbitraryVariable, isArbitraryValue, themeSpacing];
- };
- var scaleInset = function scaleInset() {
- return [isFraction, 'full', 'auto'].concat(scaleUnambiguousSpacing());
- };
- var scaleGridTemplateColsRows = function scaleGridTemplateColsRows() {
- return [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];
- };
- var scaleGridColRowStartAndEnd = function scaleGridColRowStartAndEnd() {
- return ['auto', {
- span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]
- }, isInteger, isArbitraryVariable, isArbitraryValue];
- };
- var scaleGridColRowStartOrEnd = function scaleGridColRowStartOrEnd() {
- return [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
- };
- var scaleGridAutoColsRows = function scaleGridAutoColsRows() {
- return ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
- };
- var scaleAlignPrimaryAxis = function scaleAlignPrimaryAxis() {
- return ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];
- };
- var scaleAlignSecondaryAxis = function scaleAlignSecondaryAxis() {
- return ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
- };
- var scaleMargin = function scaleMargin() {
- return ['auto'].concat(scaleUnambiguousSpacing());
- };
- var scaleSizing = function scaleSizing() {
- return [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit'].concat(scaleUnambiguousSpacing());
- };
- var scaleColor = function scaleColor() {
- return [themeColor, isArbitraryVariable, isArbitraryValue];
- };
- var scaleBgPosition = function scaleBgPosition() {
- return [].concat(scalePosition(), [isArbitraryVariablePosition, isArbitraryPosition, {
- position: [isArbitraryVariable, isArbitraryValue]
- }]);
- };
- var scaleBgRepeat = function scaleBgRepeat() {
- return ['no-repeat', {
- repeat: ['', 'x', 'y', 'space', 'round']
- }];
- };
- var scaleBgSize = function scaleBgSize() {
- return ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {
- size: [isArbitraryVariable, isArbitraryValue]
- }];
- };
- var scaleGradientStopPosition = function scaleGradientStopPosition() {
- return [isPercent, isArbitraryVariableLength, isArbitraryLength];
- };
- var scaleRadius = function scaleRadius() {
- return [
- // Deprecated since Tailwind CSS v4.0.0
- '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];
- };
- var scaleBorderWidth = function scaleBorderWidth() {
- return ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
- };
- var scaleLineStyle = function scaleLineStyle() {
- return ['solid', 'dashed', 'dotted', 'double'];
- };
- var scaleBlendMode = function scaleBlendMode() {
- return ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
- };
- var scaleMaskImagePosition = function scaleMaskImagePosition() {
- return [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
- };
- var scaleBlur = function scaleBlur() {
- return [
- // Deprecated since Tailwind CSS v4.0.0
- '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
- };
- var scaleRotate = function scaleRotate() {
- return ['none', isNumber, isArbitraryVariable, isArbitraryValue];
- };
- var scaleScale = function scaleScale() {
- return ['none', isNumber, isArbitraryVariable, isArbitraryValue];
- };
- var scaleSkew = function scaleSkew() {
- return [isNumber, isArbitraryVariable, isArbitraryValue];
- };
- var scaleTranslate = function scaleTranslate() {
- return [isFraction, 'full'].concat(scaleUnambiguousSpacing());
- };
- return {
- cacheSize: 500,
- theme: {
- animate: ['spin', 'ping', 'pulse', 'bounce'],
- aspect: ['video'],
- blur: [isTshirtSize],
- breakpoint: [isTshirtSize],
- color: [isAny],
- container: [isTshirtSize],
- 'drop-shadow': [isTshirtSize],
- ease: ['in', 'out', 'in-out'],
- font: [isAnyNonArbitrary],
- 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],
- 'inset-shadow': [isTshirtSize],
- leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],
- perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],
- radius: [isTshirtSize],
- shadow: [isTshirtSize],
- spacing: ['px', isNumber],
- text: [isTshirtSize],
- 'text-shadow': [isTshirtSize],
- tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
- },
- classGroups: {
- // --------------
- // --- Layout ---
- // --------------
- /**
- * Aspect Ratio
- * @see https://tailwindcss.com/docs/aspect-ratio
- */
- aspect: [{
- aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
- }],
- /**
- * Container
- * @see https://tailwindcss.com/docs/container
- * @deprecated since Tailwind CSS v4.0.0
- */
- container: ['container'],
- /**
- * Columns
- * @see https://tailwindcss.com/docs/columns
- */
- columns: [{
- columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
- }],
- /**
- * Break After
- * @see https://tailwindcss.com/docs/break-after
- */
- 'break-after': [{
- 'break-after': scaleBreak()
- }],
- /**
- * Break Before
- * @see https://tailwindcss.com/docs/break-before
- */
- 'break-before': [{
- 'break-before': scaleBreak()
- }],
- /**
- * Break Inside
- * @see https://tailwindcss.com/docs/break-inside
- */
- 'break-inside': [{
- 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']
- }],
- /**
- * Box Decoration Break
- * @see https://tailwindcss.com/docs/box-decoration-break
- */
- 'box-decoration': [{
- 'box-decoration': ['slice', 'clone']
- }],
- /**
- * Box Sizing
- * @see https://tailwindcss.com/docs/box-sizing
- */
- box: [{
- box: ['border', 'content']
- }],
- /**
- * Display
- * @see https://tailwindcss.com/docs/display
- */
- 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'],
- /**
- * Screen Reader Only
- * @see https://tailwindcss.com/docs/display#screen-reader-only
- */
- sr: ['sr-only', 'not-sr-only'],
- /**
- * Floats
- * @see https://tailwindcss.com/docs/float
- */
- "float": [{
- "float": ['right', 'left', 'none', 'start', 'end']
- }],
- /**
- * Clear
- * @see https://tailwindcss.com/docs/clear
- */
- clear: [{
- clear: ['left', 'right', 'both', 'none', 'start', 'end']
- }],
- /**
- * Isolation
- * @see https://tailwindcss.com/docs/isolation
- */
- isolation: ['isolate', 'isolation-auto'],
- /**
- * Object Fit
- * @see https://tailwindcss.com/docs/object-fit
- */
- 'object-fit': [{
- object: ['contain', 'cover', 'fill', 'none', 'scale-down']
- }],
- /**
- * Object Position
- * @see https://tailwindcss.com/docs/object-position
- */
- 'object-position': [{
- object: scalePositionWithArbitrary()
- }],
- /**
- * Overflow
- * @see https://tailwindcss.com/docs/overflow
- */
- overflow: [{
- overflow: scaleOverflow()
- }],
- /**
- * Overflow X
- * @see https://tailwindcss.com/docs/overflow
- */
- 'overflow-x': [{
- 'overflow-x': scaleOverflow()
- }],
- /**
- * Overflow Y
- * @see https://tailwindcss.com/docs/overflow
- */
- 'overflow-y': [{
- 'overflow-y': scaleOverflow()
- }],
- /**
- * Overscroll Behavior
- * @see https://tailwindcss.com/docs/overscroll-behavior
- */
- overscroll: [{
- overscroll: scaleOverscroll()
- }],
- /**
- * Overscroll Behavior X
- * @see https://tailwindcss.com/docs/overscroll-behavior
- */
- 'overscroll-x': [{
- 'overscroll-x': scaleOverscroll()
- }],
- /**
- * Overscroll Behavior Y
- * @see https://tailwindcss.com/docs/overscroll-behavior
- */
- 'overscroll-y': [{
- 'overscroll-y': scaleOverscroll()
- }],
- /**
- * Position
- * @see https://tailwindcss.com/docs/position
- */
- position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
- /**
- * Top / Right / Bottom / Left
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- inset: [{
- inset: scaleInset()
- }],
- /**
- * Right / Left
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- 'inset-x': [{
- 'inset-x': scaleInset()
- }],
- /**
- * Top / Bottom
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- 'inset-y': [{
- 'inset-y': scaleInset()
- }],
- /**
- * Start
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- start: [{
- start: scaleInset()
- }],
- /**
- * End
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- end: [{
- end: scaleInset()
- }],
- /**
- * Top
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- top: [{
- top: scaleInset()
- }],
- /**
- * Right
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- right: [{
- right: scaleInset()
- }],
- /**
- * Bottom
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- bottom: [{
- bottom: scaleInset()
- }],
- /**
- * Left
- * @see https://tailwindcss.com/docs/top-right-bottom-left
- */
- left: [{
- left: scaleInset()
- }],
- /**
- * Visibility
- * @see https://tailwindcss.com/docs/visibility
- */
- visibility: ['visible', 'invisible', 'collapse'],
- /**
- * Z-Index
- * @see https://tailwindcss.com/docs/z-index
- */
- z: [{
- z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]
- }],
- // ------------------------
- // --- Flexbox and Grid ---
- // ------------------------
- /**
- * Flex Basis
- * @see https://tailwindcss.com/docs/flex-basis
- */
- basis: [{
- basis: [isFraction, 'full', 'auto', themeContainer].concat(scaleUnambiguousSpacing())
- }],
- /**
- * Flex Direction
- * @see https://tailwindcss.com/docs/flex-direction
- */
- 'flex-direction': [{
- flex: ['row', 'row-reverse', 'col', 'col-reverse']
- }],
- /**
- * Flex Wrap
- * @see https://tailwindcss.com/docs/flex-wrap
- */
- 'flex-wrap': [{
- flex: ['nowrap', 'wrap', 'wrap-reverse']
- }],
- /**
- * Flex
- * @see https://tailwindcss.com/docs/flex
- */
- flex: [{
- flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]
- }],
- /**
- * Flex Grow
- * @see https://tailwindcss.com/docs/flex-grow
- */
- grow: [{
- grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Flex Shrink
- * @see https://tailwindcss.com/docs/flex-shrink
- */
- shrink: [{
- shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Order
- * @see https://tailwindcss.com/docs/order
- */
- order: [{
- order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Grid Template Columns
- * @see https://tailwindcss.com/docs/grid-template-columns
- */
- 'grid-cols': [{
- 'grid-cols': scaleGridTemplateColsRows()
- }],
- /**
- * Grid Column Start / End
- * @see https://tailwindcss.com/docs/grid-column
- */
- 'col-start-end': [{
- col: scaleGridColRowStartAndEnd()
- }],
- /**
- * Grid Column Start
- * @see https://tailwindcss.com/docs/grid-column
- */
- 'col-start': [{
- 'col-start': scaleGridColRowStartOrEnd()
- }],
- /**
- * Grid Column End
- * @see https://tailwindcss.com/docs/grid-column
- */
- 'col-end': [{
- 'col-end': scaleGridColRowStartOrEnd()
- }],
- /**
- * Grid Template Rows
- * @see https://tailwindcss.com/docs/grid-template-rows
- */
- 'grid-rows': [{
- 'grid-rows': scaleGridTemplateColsRows()
- }],
- /**
- * Grid Row Start / End
- * @see https://tailwindcss.com/docs/grid-row
- */
- 'row-start-end': [{
- row: scaleGridColRowStartAndEnd()
- }],
- /**
- * Grid Row Start
- * @see https://tailwindcss.com/docs/grid-row
- */
- 'row-start': [{
- 'row-start': scaleGridColRowStartOrEnd()
- }],
- /**
- * Grid Row End
- * @see https://tailwindcss.com/docs/grid-row
- */
- 'row-end': [{
- 'row-end': scaleGridColRowStartOrEnd()
- }],
- /**
- * Grid Auto Flow
- * @see https://tailwindcss.com/docs/grid-auto-flow
- */
- 'grid-flow': [{
- 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']
- }],
- /**
- * Grid Auto Columns
- * @see https://tailwindcss.com/docs/grid-auto-columns
- */
- 'auto-cols': [{
- 'auto-cols': scaleGridAutoColsRows()
- }],
- /**
- * Grid Auto Rows
- * @see https://tailwindcss.com/docs/grid-auto-rows
- */
- 'auto-rows': [{
- 'auto-rows': scaleGridAutoColsRows()
- }],
- /**
- * Gap
- * @see https://tailwindcss.com/docs/gap
- */
- gap: [{
- gap: scaleUnambiguousSpacing()
- }],
- /**
- * Gap X
- * @see https://tailwindcss.com/docs/gap
- */
- 'gap-x': [{
- 'gap-x': scaleUnambiguousSpacing()
- }],
- /**
- * Gap Y
- * @see https://tailwindcss.com/docs/gap
- */
- 'gap-y': [{
- 'gap-y': scaleUnambiguousSpacing()
- }],
- /**
- * Justify Content
- * @see https://tailwindcss.com/docs/justify-content
- */
- 'justify-content': [{
- justify: [].concat(scaleAlignPrimaryAxis(), ['normal'])
- }],
- /**
- * Justify Items
- * @see https://tailwindcss.com/docs/justify-items
- */
- 'justify-items': [{
- 'justify-items': [].concat(scaleAlignSecondaryAxis(), ['normal'])
- }],
- /**
- * Justify Self
- * @see https://tailwindcss.com/docs/justify-self
- */
- 'justify-self': [{
- 'justify-self': ['auto'].concat(scaleAlignSecondaryAxis())
- }],
- /**
- * Align Content
- * @see https://tailwindcss.com/docs/align-content
- */
- 'align-content': [{
- content: ['normal'].concat(scaleAlignPrimaryAxis())
- }],
- /**
- * Align Items
- * @see https://tailwindcss.com/docs/align-items
- */
- 'align-items': [{
- items: [].concat(scaleAlignSecondaryAxis(), [{
- baseline: ['', 'last']
- }])
- }],
- /**
- * Align Self
- * @see https://tailwindcss.com/docs/align-self
- */
- 'align-self': [{
- self: ['auto'].concat(scaleAlignSecondaryAxis(), [{
- baseline: ['', 'last']
- }])
- }],
- /**
- * Place Content
- * @see https://tailwindcss.com/docs/place-content
- */
- 'place-content': [{
- 'place-content': scaleAlignPrimaryAxis()
- }],
- /**
- * Place Items
- * @see https://tailwindcss.com/docs/place-items
- */
- 'place-items': [{
- 'place-items': [].concat(scaleAlignSecondaryAxis(), ['baseline'])
- }],
- /**
- * Place Self
- * @see https://tailwindcss.com/docs/place-self
- */
- 'place-self': [{
- 'place-self': ['auto'].concat(scaleAlignSecondaryAxis())
- }],
- // Spacing
- /**
- * Padding
- * @see https://tailwindcss.com/docs/padding
- */
- p: [{
- p: scaleUnambiguousSpacing()
- }],
- /**
- * Padding X
- * @see https://tailwindcss.com/docs/padding
- */
- px: [{
- px: scaleUnambiguousSpacing()
- }],
- /**
- * Padding Y
- * @see https://tailwindcss.com/docs/padding
- */
- py: [{
- py: scaleUnambiguousSpacing()
- }],
- /**
- * Padding Start
- * @see https://tailwindcss.com/docs/padding
- */
- ps: [{
- ps: scaleUnambiguousSpacing()
- }],
- /**
- * Padding End
- * @see https://tailwindcss.com/docs/padding
- */
- pe: [{
- pe: scaleUnambiguousSpacing()
- }],
- /**
- * Padding Top
- * @see https://tailwindcss.com/docs/padding
- */
- pt: [{
- pt: scaleUnambiguousSpacing()
- }],
- /**
- * Padding Right
- * @see https://tailwindcss.com/docs/padding
- */
- pr: [{
- pr: scaleUnambiguousSpacing()
- }],
- /**
- * Padding Bottom
- * @see https://tailwindcss.com/docs/padding
- */
- pb: [{
- pb: scaleUnambiguousSpacing()
- }],
- /**
- * Padding Left
- * @see https://tailwindcss.com/docs/padding
- */
- pl: [{
- pl: scaleUnambiguousSpacing()
- }],
- /**
- * Margin
- * @see https://tailwindcss.com/docs/margin
- */
- m: [{
- m: scaleMargin()
- }],
- /**
- * Margin X
- * @see https://tailwindcss.com/docs/margin
- */
- mx: [{
- mx: scaleMargin()
- }],
- /**
- * Margin Y
- * @see https://tailwindcss.com/docs/margin
- */
- my: [{
- my: scaleMargin()
- }],
- /**
- * Margin Start
- * @see https://tailwindcss.com/docs/margin
- */
- ms: [{
- ms: scaleMargin()
- }],
- /**
- * Margin End
- * @see https://tailwindcss.com/docs/margin
- */
- me: [{
- me: scaleMargin()
- }],
- /**
- * Margin Top
- * @see https://tailwindcss.com/docs/margin
- */
- mt: [{
- mt: scaleMargin()
- }],
- /**
- * Margin Right
- * @see https://tailwindcss.com/docs/margin
- */
- mr: [{
- mr: scaleMargin()
- }],
- /**
- * Margin Bottom
- * @see https://tailwindcss.com/docs/margin
- */
- mb: [{
- mb: scaleMargin()
- }],
- /**
- * Margin Left
- * @see https://tailwindcss.com/docs/margin
- */
- ml: [{
- ml: scaleMargin()
- }],
- /**
- * Space Between X
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
- */
- 'space-x': [{
- 'space-x': scaleUnambiguousSpacing()
- }],
- /**
- * Space Between X Reverse
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
- */
- 'space-x-reverse': ['space-x-reverse'],
- /**
- * Space Between Y
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
- */
- 'space-y': [{
- 'space-y': scaleUnambiguousSpacing()
- }],
- /**
- * Space Between Y Reverse
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
- */
- 'space-y-reverse': ['space-y-reverse'],
- // --------------
- // --- Sizing ---
- // --------------
- /**
- * Size
- * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
- */
- size: [{
- size: scaleSizing()
- }],
- /**
- * Width
- * @see https://tailwindcss.com/docs/width
- */
- w: [{
- w: [themeContainer, 'screen'].concat(scaleSizing())
- }],
- /**
- * Min-Width
- * @see https://tailwindcss.com/docs/min-width
- */
- 'min-w': [{
- 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
- 'none'].concat(scaleSizing())
- }],
- /**
- * Max-Width
- * @see https://tailwindcss.com/docs/max-width
- */
- 'max-w': [{
- 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
- 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
- {
- screen: [themeBreakpoint]
- }].concat(scaleSizing())
- }],
- /**
- * Height
- * @see https://tailwindcss.com/docs/height
- */
- h: [{
- h: ['screen'].concat(scaleSizing())
- }],
- /**
- * Min-Height
- * @see https://tailwindcss.com/docs/min-height
- */
- 'min-h': [{
- 'min-h': ['screen', 'none'].concat(scaleSizing())
- }],
- /**
- * Max-Height
- * @see https://tailwindcss.com/docs/max-height
- */
- 'max-h': [{
- 'max-h': ['screen'].concat(scaleSizing())
- }],
- // ------------------
- // --- Typography ---
- // ------------------
- /**
- * Font Size
- * @see https://tailwindcss.com/docs/font-size
- */
- 'font-size': [{
- text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]
- }],
- /**
- * Font Smoothing
- * @see https://tailwindcss.com/docs/font-smoothing
- */
- 'font-smoothing': ['antialiased', 'subpixel-antialiased'],
- /**
- * Font Style
- * @see https://tailwindcss.com/docs/font-style
- */
- 'font-style': ['italic', 'not-italic'],
- /**
- * Font Weight
- * @see https://tailwindcss.com/docs/font-weight
- */
- 'font-weight': [{
- font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
- }],
- /**
- * Font Stretch
- * @see https://tailwindcss.com/docs/font-stretch
- */
- 'font-stretch': [{
- 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]
- }],
- /**
- * Font Family
- * @see https://tailwindcss.com/docs/font-family
- */
- 'font-family': [{
- font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
- }],
- /**
- * Font Variant Numeric
- * @see https://tailwindcss.com/docs/font-variant-numeric
- */
- 'fvn-normal': ['normal-nums'],
- /**
- * Font Variant Numeric
- * @see https://tailwindcss.com/docs/font-variant-numeric
- */
- 'fvn-ordinal': ['ordinal'],
- /**
- * Font Variant Numeric
- * @see https://tailwindcss.com/docs/font-variant-numeric
- */
- 'fvn-slashed-zero': ['slashed-zero'],
- /**
- * Font Variant Numeric
- * @see https://tailwindcss.com/docs/font-variant-numeric
- */
- 'fvn-figure': ['lining-nums', 'oldstyle-nums'],
- /**
- * Font Variant Numeric
- * @see https://tailwindcss.com/docs/font-variant-numeric
- */
- 'fvn-spacing': ['proportional-nums', 'tabular-nums'],
- /**
- * Font Variant Numeric
- * @see https://tailwindcss.com/docs/font-variant-numeric
- */
- 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],
- /**
- * Letter Spacing
- * @see https://tailwindcss.com/docs/letter-spacing
- */
- tracking: [{
- tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Line Clamp
- * @see https://tailwindcss.com/docs/line-clamp
- */
- 'line-clamp': [{
- 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]
- }],
- /**
- * Line Height
- * @see https://tailwindcss.com/docs/line-height
- */
- leading: [{
- leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
- themeLeading].concat(scaleUnambiguousSpacing())
- }],
- /**
- * List Style Image
- * @see https://tailwindcss.com/docs/list-style-image
- */
- 'list-image': [{
- 'list-image': ['none', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * List Style Position
- * @see https://tailwindcss.com/docs/list-style-position
- */
- 'list-style-position': [{
- list: ['inside', 'outside']
- }],
- /**
- * List Style Type
- * @see https://tailwindcss.com/docs/list-style-type
- */
- 'list-style-type': [{
- list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Text Alignment
- * @see https://tailwindcss.com/docs/text-align
- */
- 'text-alignment': [{
- text: ['left', 'center', 'right', 'justify', 'start', 'end']
- }],
- /**
- * Placeholder Color
- * @deprecated since Tailwind CSS v3.0.0
- * @see https://v3.tailwindcss.com/docs/placeholder-color
- */
- 'placeholder-color': [{
- placeholder: scaleColor()
- }],
- /**
- * Text Color
- * @see https://tailwindcss.com/docs/text-color
- */
- 'text-color': [{
- text: scaleColor()
- }],
- /**
- * Text Decoration
- * @see https://tailwindcss.com/docs/text-decoration
- */
- 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],
- /**
- * Text Decoration Style
- * @see https://tailwindcss.com/docs/text-decoration-style
- */
- 'text-decoration-style': [{
- decoration: [].concat(scaleLineStyle(), ['wavy'])
- }],
- /**
- * Text Decoration Thickness
- * @see https://tailwindcss.com/docs/text-decoration-thickness
- */
- 'text-decoration-thickness': [{
- decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]
- }],
- /**
- * Text Decoration Color
- * @see https://tailwindcss.com/docs/text-decoration-color
- */
- 'text-decoration-color': [{
- decoration: scaleColor()
- }],
- /**
- * Text Underline Offset
- * @see https://tailwindcss.com/docs/text-underline-offset
- */
- 'underline-offset': [{
- 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Text Transform
- * @see https://tailwindcss.com/docs/text-transform
- */
- 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
- /**
- * Text Overflow
- * @see https://tailwindcss.com/docs/text-overflow
- */
- 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
- /**
- * Text Wrap
- * @see https://tailwindcss.com/docs/text-wrap
- */
- 'text-wrap': [{
- text: ['wrap', 'nowrap', 'balance', 'pretty']
- }],
- /**
- * Text Indent
- * @see https://tailwindcss.com/docs/text-indent
- */
- indent: [{
- indent: scaleUnambiguousSpacing()
- }],
- /**
- * Vertical Alignment
- * @see https://tailwindcss.com/docs/vertical-align
- */
- 'vertical-align': [{
- align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Whitespace
- * @see https://tailwindcss.com/docs/whitespace
- */
- whitespace: [{
- whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']
- }],
- /**
- * Word Break
- * @see https://tailwindcss.com/docs/word-break
- */
- "break": [{
- "break": ['normal', 'words', 'all', 'keep']
- }],
- /**
- * Overflow Wrap
- * @see https://tailwindcss.com/docs/overflow-wrap
- */
- wrap: [{
- wrap: ['break-word', 'anywhere', 'normal']
- }],
- /**
- * Hyphens
- * @see https://tailwindcss.com/docs/hyphens
- */
- hyphens: [{
- hyphens: ['none', 'manual', 'auto']
- }],
- /**
- * Content
- * @see https://tailwindcss.com/docs/content
- */
- content: [{
- content: ['none', isArbitraryVariable, isArbitraryValue]
- }],
- // -------------------
- // --- Backgrounds ---
- // -------------------
- /**
- * Background Attachment
- * @see https://tailwindcss.com/docs/background-attachment
- */
- 'bg-attachment': [{
- bg: ['fixed', 'local', 'scroll']
- }],
- /**
- * Background Clip
- * @see https://tailwindcss.com/docs/background-clip
- */
- 'bg-clip': [{
- 'bg-clip': ['border', 'padding', 'content', 'text']
- }],
- /**
- * Background Origin
- * @see https://tailwindcss.com/docs/background-origin
- */
- 'bg-origin': [{
- 'bg-origin': ['border', 'padding', 'content']
- }],
- /**
- * Background Position
- * @see https://tailwindcss.com/docs/background-position
- */
- 'bg-position': [{
- bg: scaleBgPosition()
- }],
- /**
- * Background Repeat
- * @see https://tailwindcss.com/docs/background-repeat
- */
- 'bg-repeat': [{
- bg: scaleBgRepeat()
- }],
- /**
- * Background Size
- * @see https://tailwindcss.com/docs/background-size
- */
- 'bg-size': [{
- bg: scaleBgSize()
- }],
- /**
- * Background Image
- * @see https://tailwindcss.com/docs/background-image
- */
- 'bg-image': [{
- bg: ['none', {
- linear: [{
- to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
- }, isInteger, isArbitraryVariable, isArbitraryValue],
- radial: ['', isArbitraryVariable, isArbitraryValue],
- conic: [isInteger, isArbitraryVariable, isArbitraryValue]
- }, isArbitraryVariableImage, isArbitraryImage]
- }],
- /**
- * Background Color
- * @see https://tailwindcss.com/docs/background-color
- */
- 'bg-color': [{
- bg: scaleColor()
- }],
- /**
- * Gradient Color Stops From Position
- * @see https://tailwindcss.com/docs/gradient-color-stops
- */
- 'gradient-from-pos': [{
- from: scaleGradientStopPosition()
- }],
- /**
- * Gradient Color Stops Via Position
- * @see https://tailwindcss.com/docs/gradient-color-stops
- */
- 'gradient-via-pos': [{
- via: scaleGradientStopPosition()
- }],
- /**
- * Gradient Color Stops To Position
- * @see https://tailwindcss.com/docs/gradient-color-stops
- */
- 'gradient-to-pos': [{
- to: scaleGradientStopPosition()
- }],
- /**
- * Gradient Color Stops From
- * @see https://tailwindcss.com/docs/gradient-color-stops
- */
- 'gradient-from': [{
- from: scaleColor()
- }],
- /**
- * Gradient Color Stops Via
- * @see https://tailwindcss.com/docs/gradient-color-stops
- */
- 'gradient-via': [{
- via: scaleColor()
- }],
- /**
- * Gradient Color Stops To
- * @see https://tailwindcss.com/docs/gradient-color-stops
- */
- 'gradient-to': [{
- to: scaleColor()
- }],
- // ---------------
- // --- Borders ---
- // ---------------
- /**
- * Border Radius
- * @see https://tailwindcss.com/docs/border-radius
- */
- rounded: [{
- rounded: scaleRadius()
- }],
- /**
- * Border Radius Start
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-s': [{
- 'rounded-s': scaleRadius()
- }],
- /**
- * Border Radius End
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-e': [{
- 'rounded-e': scaleRadius()
- }],
- /**
- * Border Radius Top
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-t': [{
- 'rounded-t': scaleRadius()
- }],
- /**
- * Border Radius Right
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-r': [{
- 'rounded-r': scaleRadius()
- }],
- /**
- * Border Radius Bottom
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-b': [{
- 'rounded-b': scaleRadius()
- }],
- /**
- * Border Radius Left
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-l': [{
- 'rounded-l': scaleRadius()
- }],
- /**
- * Border Radius Start Start
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-ss': [{
- 'rounded-ss': scaleRadius()
- }],
- /**
- * Border Radius Start End
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-se': [{
- 'rounded-se': scaleRadius()
- }],
- /**
- * Border Radius End End
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-ee': [{
- 'rounded-ee': scaleRadius()
- }],
- /**
- * Border Radius End Start
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-es': [{
- 'rounded-es': scaleRadius()
- }],
- /**
- * Border Radius Top Left
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-tl': [{
- 'rounded-tl': scaleRadius()
- }],
- /**
- * Border Radius Top Right
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-tr': [{
- 'rounded-tr': scaleRadius()
- }],
- /**
- * Border Radius Bottom Right
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-br': [{
- 'rounded-br': scaleRadius()
- }],
- /**
- * Border Radius Bottom Left
- * @see https://tailwindcss.com/docs/border-radius
- */
- 'rounded-bl': [{
- 'rounded-bl': scaleRadius()
- }],
- /**
- * Border Width
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w': [{
- border: scaleBorderWidth()
- }],
- /**
- * Border Width X
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-x': [{
- 'border-x': scaleBorderWidth()
- }],
- /**
- * Border Width Y
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-y': [{
- 'border-y': scaleBorderWidth()
- }],
- /**
- * Border Width Start
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-s': [{
- 'border-s': scaleBorderWidth()
- }],
- /**
- * Border Width End
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-e': [{
- 'border-e': scaleBorderWidth()
- }],
- /**
- * Border Width Top
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-t': [{
- 'border-t': scaleBorderWidth()
- }],
- /**
- * Border Width Right
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-r': [{
- 'border-r': scaleBorderWidth()
- }],
- /**
- * Border Width Bottom
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-b': [{
- 'border-b': scaleBorderWidth()
- }],
- /**
- * Border Width Left
- * @see https://tailwindcss.com/docs/border-width
- */
- 'border-w-l': [{
- 'border-l': scaleBorderWidth()
- }],
- /**
- * Divide Width X
- * @see https://tailwindcss.com/docs/border-width#between-children
- */
- 'divide-x': [{
- 'divide-x': scaleBorderWidth()
- }],
- /**
- * Divide Width X Reverse
- * @see https://tailwindcss.com/docs/border-width#between-children
- */
- 'divide-x-reverse': ['divide-x-reverse'],
- /**
- * Divide Width Y
- * @see https://tailwindcss.com/docs/border-width#between-children
- */
- 'divide-y': [{
- 'divide-y': scaleBorderWidth()
- }],
- /**
- * Divide Width Y Reverse
- * @see https://tailwindcss.com/docs/border-width#between-children
- */
- 'divide-y-reverse': ['divide-y-reverse'],
- /**
- * Border Style
- * @see https://tailwindcss.com/docs/border-style
- */
- 'border-style': [{
- border: [].concat(scaleLineStyle(), ['hidden', 'none'])
- }],
- /**
- * Divide Style
- * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
- */
- 'divide-style': [{
- divide: [].concat(scaleLineStyle(), ['hidden', 'none'])
- }],
- /**
- * Border Color
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color': [{
- border: scaleColor()
- }],
- /**
- * Border Color X
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-x': [{
- 'border-x': scaleColor()
- }],
- /**
- * Border Color Y
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-y': [{
- 'border-y': scaleColor()
- }],
- /**
- * Border Color S
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-s': [{
- 'border-s': scaleColor()
- }],
- /**
- * Border Color E
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-e': [{
- 'border-e': scaleColor()
- }],
- /**
- * Border Color Top
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-t': [{
- 'border-t': scaleColor()
- }],
- /**
- * Border Color Right
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-r': [{
- 'border-r': scaleColor()
- }],
- /**
- * Border Color Bottom
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-b': [{
- 'border-b': scaleColor()
- }],
- /**
- * Border Color Left
- * @see https://tailwindcss.com/docs/border-color
- */
- 'border-color-l': [{
- 'border-l': scaleColor()
- }],
- /**
- * Divide Color
- * @see https://tailwindcss.com/docs/divide-color
- */
- 'divide-color': [{
- divide: scaleColor()
- }],
- /**
- * Outline Style
- * @see https://tailwindcss.com/docs/outline-style
- */
- 'outline-style': [{
- outline: [].concat(scaleLineStyle(), ['none', 'hidden'])
- }],
- /**
- * Outline Offset
- * @see https://tailwindcss.com/docs/outline-offset
- */
- 'outline-offset': [{
- 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Outline Width
- * @see https://tailwindcss.com/docs/outline-width
- */
- 'outline-w': [{
- outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]
- }],
- /**
- * Outline Color
- * @see https://tailwindcss.com/docs/outline-color
- */
- 'outline-color': [{
- outline: scaleColor()
- }],
- // ---------------
- // --- Effects ---
- // ---------------
- /**
- * Box Shadow
- * @see https://tailwindcss.com/docs/box-shadow
- */
- shadow: [{
- shadow: [
- // Deprecated since Tailwind CSS v4.0.0
- '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]
- }],
- /**
- * Box Shadow Color
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
- */
- 'shadow-color': [{
- shadow: scaleColor()
- }],
- /**
- * Inset Box Shadow
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
- */
- 'inset-shadow': [{
- 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
- }],
- /**
- * Inset Box Shadow Color
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
- */
- 'inset-shadow-color': [{
- 'inset-shadow': scaleColor()
- }],
- /**
- * Ring Width
- * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
- */
- 'ring-w': [{
- ring: scaleBorderWidth()
- }],
- /**
- * Ring Width Inset
- * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
- * @deprecated since Tailwind CSS v4.0.0
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
- */
- 'ring-w-inset': ['ring-inset'],
- /**
- * Ring Color
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
- */
- 'ring-color': [{
- ring: scaleColor()
- }],
- /**
- * Ring Offset Width
- * @see https://v3.tailwindcss.com/docs/ring-offset-width
- * @deprecated since Tailwind CSS v4.0.0
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
- */
- 'ring-offset-w': [{
- 'ring-offset': [isNumber, isArbitraryLength]
- }],
- /**
- * Ring Offset Color
- * @see https://v3.tailwindcss.com/docs/ring-offset-color
- * @deprecated since Tailwind CSS v4.0.0
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
- */
- 'ring-offset-color': [{
- 'ring-offset': scaleColor()
- }],
- /**
- * Inset Ring Width
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
- */
- 'inset-ring-w': [{
- 'inset-ring': scaleBorderWidth()
- }],
- /**
- * Inset Ring Color
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
- */
- 'inset-ring-color': [{
- 'inset-ring': scaleColor()
- }],
- /**
- * Text Shadow
- * @see https://tailwindcss.com/docs/text-shadow
- */
- 'text-shadow': [{
- 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
- }],
- /**
- * Text Shadow Color
- * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
- */
- 'text-shadow-color': [{
- 'text-shadow': scaleColor()
- }],
- /**
- * Opacity
- * @see https://tailwindcss.com/docs/opacity
- */
- opacity: [{
- opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Mix Blend Mode
- * @see https://tailwindcss.com/docs/mix-blend-mode
- */
- 'mix-blend': [{
- 'mix-blend': [].concat(scaleBlendMode(), ['plus-darker', 'plus-lighter'])
- }],
- /**
- * Background Blend Mode
- * @see https://tailwindcss.com/docs/background-blend-mode
- */
- 'bg-blend': [{
- 'bg-blend': scaleBlendMode()
- }],
- /**
- * Mask Clip
- * @see https://tailwindcss.com/docs/mask-clip
- */
- 'mask-clip': [{
- 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
- }, 'mask-no-clip'],
- /**
- * Mask Composite
- * @see https://tailwindcss.com/docs/mask-composite
- */
- 'mask-composite': [{
- mask: ['add', 'subtract', 'intersect', 'exclude']
- }],
- /**
- * Mask Image
- * @see https://tailwindcss.com/docs/mask-image
- */
- 'mask-image-linear-pos': [{
- 'mask-linear': [isNumber]
- }],
- 'mask-image-linear-from-pos': [{
- 'mask-linear-from': scaleMaskImagePosition()
- }],
- 'mask-image-linear-to-pos': [{
- 'mask-linear-to': scaleMaskImagePosition()
- }],
- 'mask-image-linear-from-color': [{
- 'mask-linear-from': scaleColor()
- }],
- 'mask-image-linear-to-color': [{
- 'mask-linear-to': scaleColor()
- }],
- 'mask-image-t-from-pos': [{
- 'mask-t-from': scaleMaskImagePosition()
- }],
- 'mask-image-t-to-pos': [{
- 'mask-t-to': scaleMaskImagePosition()
- }],
- 'mask-image-t-from-color': [{
- 'mask-t-from': scaleColor()
- }],
- 'mask-image-t-to-color': [{
- 'mask-t-to': scaleColor()
- }],
- 'mask-image-r-from-pos': [{
- 'mask-r-from': scaleMaskImagePosition()
- }],
- 'mask-image-r-to-pos': [{
- 'mask-r-to': scaleMaskImagePosition()
- }],
- 'mask-image-r-from-color': [{
- 'mask-r-from': scaleColor()
- }],
- 'mask-image-r-to-color': [{
- 'mask-r-to': scaleColor()
- }],
- 'mask-image-b-from-pos': [{
- 'mask-b-from': scaleMaskImagePosition()
- }],
- 'mask-image-b-to-pos': [{
- 'mask-b-to': scaleMaskImagePosition()
- }],
- 'mask-image-b-from-color': [{
- 'mask-b-from': scaleColor()
- }],
- 'mask-image-b-to-color': [{
- 'mask-b-to': scaleColor()
- }],
- 'mask-image-l-from-pos': [{
- 'mask-l-from': scaleMaskImagePosition()
- }],
- 'mask-image-l-to-pos': [{
- 'mask-l-to': scaleMaskImagePosition()
- }],
- 'mask-image-l-from-color': [{
- 'mask-l-from': scaleColor()
- }],
- 'mask-image-l-to-color': [{
- 'mask-l-to': scaleColor()
- }],
- 'mask-image-x-from-pos': [{
- 'mask-x-from': scaleMaskImagePosition()
- }],
- 'mask-image-x-to-pos': [{
- 'mask-x-to': scaleMaskImagePosition()
- }],
- 'mask-image-x-from-color': [{
- 'mask-x-from': scaleColor()
- }],
- 'mask-image-x-to-color': [{
- 'mask-x-to': scaleColor()
- }],
- 'mask-image-y-from-pos': [{
- 'mask-y-from': scaleMaskImagePosition()
- }],
- 'mask-image-y-to-pos': [{
- 'mask-y-to': scaleMaskImagePosition()
- }],
- 'mask-image-y-from-color': [{
- 'mask-y-from': scaleColor()
- }],
- 'mask-image-y-to-color': [{
- 'mask-y-to': scaleColor()
- }],
- 'mask-image-radial': [{
- 'mask-radial': [isArbitraryVariable, isArbitraryValue]
- }],
- 'mask-image-radial-from-pos': [{
- 'mask-radial-from': scaleMaskImagePosition()
- }],
- 'mask-image-radial-to-pos': [{
- 'mask-radial-to': scaleMaskImagePosition()
- }],
- 'mask-image-radial-from-color': [{
- 'mask-radial-from': scaleColor()
- }],
- 'mask-image-radial-to-color': [{
- 'mask-radial-to': scaleColor()
- }],
- 'mask-image-radial-shape': [{
- 'mask-radial': ['circle', 'ellipse']
- }],
- 'mask-image-radial-size': [{
- 'mask-radial': [{
- closest: ['side', 'corner'],
- farthest: ['side', 'corner']
- }]
- }],
- 'mask-image-radial-pos': [{
- 'mask-radial-at': scalePosition()
- }],
- 'mask-image-conic-pos': [{
- 'mask-conic': [isNumber]
- }],
- 'mask-image-conic-from-pos': [{
- 'mask-conic-from': scaleMaskImagePosition()
- }],
- 'mask-image-conic-to-pos': [{
- 'mask-conic-to': scaleMaskImagePosition()
- }],
- 'mask-image-conic-from-color': [{
- 'mask-conic-from': scaleColor()
- }],
- 'mask-image-conic-to-color': [{
- 'mask-conic-to': scaleColor()
- }],
- /**
- * Mask Mode
- * @see https://tailwindcss.com/docs/mask-mode
- */
- 'mask-mode': [{
- mask: ['alpha', 'luminance', 'match']
- }],
- /**
- * Mask Origin
- * @see https://tailwindcss.com/docs/mask-origin
- */
- 'mask-origin': [{
- 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
- }],
- /**
- * Mask Position
- * @see https://tailwindcss.com/docs/mask-position
- */
- 'mask-position': [{
- mask: scaleBgPosition()
- }],
- /**
- * Mask Repeat
- * @see https://tailwindcss.com/docs/mask-repeat
- */
- 'mask-repeat': [{
- mask: scaleBgRepeat()
- }],
- /**
- * Mask Size
- * @see https://tailwindcss.com/docs/mask-size
- */
- 'mask-size': [{
- mask: scaleBgSize()
- }],
- /**
- * Mask Type
- * @see https://tailwindcss.com/docs/mask-type
- */
- 'mask-type': [{
- 'mask-type': ['alpha', 'luminance']
- }],
- /**
- * Mask Image
- * @see https://tailwindcss.com/docs/mask-image
- */
- 'mask-image': [{
- mask: ['none', isArbitraryVariable, isArbitraryValue]
- }],
- // ---------------
- // --- Filters ---
- // ---------------
- /**
- * Filter
- * @see https://tailwindcss.com/docs/filter
- */
- filter: [{
- filter: [
- // Deprecated since Tailwind CSS v3.0.0
- '', 'none', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Blur
- * @see https://tailwindcss.com/docs/blur
- */
- blur: [{
- blur: scaleBlur()
- }],
- /**
- * Brightness
- * @see https://tailwindcss.com/docs/brightness
- */
- brightness: [{
- brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Contrast
- * @see https://tailwindcss.com/docs/contrast
- */
- contrast: [{
- contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Drop Shadow
- * @see https://tailwindcss.com/docs/drop-shadow
- */
- 'drop-shadow': [{
- 'drop-shadow': [
- // Deprecated since Tailwind CSS v4.0.0
- '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]
- }],
- /**
- * Drop Shadow Color
- * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
- */
- 'drop-shadow-color': [{
- 'drop-shadow': scaleColor()
- }],
- /**
- * Grayscale
- * @see https://tailwindcss.com/docs/grayscale
- */
- grayscale: [{
- grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Hue Rotate
- * @see https://tailwindcss.com/docs/hue-rotate
- */
- 'hue-rotate': [{
- 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Invert
- * @see https://tailwindcss.com/docs/invert
- */
- invert: [{
- invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Saturate
- * @see https://tailwindcss.com/docs/saturate
- */
- saturate: [{
- saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Sepia
- * @see https://tailwindcss.com/docs/sepia
- */
- sepia: [{
- sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Filter
- * @see https://tailwindcss.com/docs/backdrop-filter
- */
- 'backdrop-filter': [{
- 'backdrop-filter': [
- // Deprecated since Tailwind CSS v3.0.0
- '', 'none', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Blur
- * @see https://tailwindcss.com/docs/backdrop-blur
- */
- 'backdrop-blur': [{
- 'backdrop-blur': scaleBlur()
- }],
- /**
- * Backdrop Brightness
- * @see https://tailwindcss.com/docs/backdrop-brightness
- */
- 'backdrop-brightness': [{
- 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Contrast
- * @see https://tailwindcss.com/docs/backdrop-contrast
- */
- 'backdrop-contrast': [{
- 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Grayscale
- * @see https://tailwindcss.com/docs/backdrop-grayscale
- */
- 'backdrop-grayscale': [{
- 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Hue Rotate
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
- */
- 'backdrop-hue-rotate': [{
- 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Invert
- * @see https://tailwindcss.com/docs/backdrop-invert
- */
- 'backdrop-invert': [{
- 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Opacity
- * @see https://tailwindcss.com/docs/backdrop-opacity
- */
- 'backdrop-opacity': [{
- 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Saturate
- * @see https://tailwindcss.com/docs/backdrop-saturate
- */
- 'backdrop-saturate': [{
- 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Backdrop Sepia
- * @see https://tailwindcss.com/docs/backdrop-sepia
- */
- 'backdrop-sepia': [{
- 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- // --------------
- // --- Tables ---
- // --------------
- /**
- * Border Collapse
- * @see https://tailwindcss.com/docs/border-collapse
- */
- 'border-collapse': [{
- border: ['collapse', 'separate']
- }],
- /**
- * Border Spacing
- * @see https://tailwindcss.com/docs/border-spacing
- */
- 'border-spacing': [{
- 'border-spacing': scaleUnambiguousSpacing()
- }],
- /**
- * Border Spacing X
- * @see https://tailwindcss.com/docs/border-spacing
- */
- 'border-spacing-x': [{
- 'border-spacing-x': scaleUnambiguousSpacing()
- }],
- /**
- * Border Spacing Y
- * @see https://tailwindcss.com/docs/border-spacing
- */
- 'border-spacing-y': [{
- 'border-spacing-y': scaleUnambiguousSpacing()
- }],
- /**
- * Table Layout
- * @see https://tailwindcss.com/docs/table-layout
- */
- 'table-layout': [{
- table: ['auto', 'fixed']
- }],
- /**
- * Caption Side
- * @see https://tailwindcss.com/docs/caption-side
- */
- caption: [{
- caption: ['top', 'bottom']
- }],
- // ---------------------------------
- // --- Transitions and Animation ---
- // ---------------------------------
- /**
- * Transition Property
- * @see https://tailwindcss.com/docs/transition-property
- */
- transition: [{
- transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Transition Behavior
- * @see https://tailwindcss.com/docs/transition-behavior
- */
- 'transition-behavior': [{
- transition: ['normal', 'discrete']
- }],
- /**
- * Transition Duration
- * @see https://tailwindcss.com/docs/transition-duration
- */
- duration: [{
- duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Transition Timing Function
- * @see https://tailwindcss.com/docs/transition-timing-function
- */
- ease: [{
- ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Transition Delay
- * @see https://tailwindcss.com/docs/transition-delay
- */
- delay: [{
- delay: [isNumber, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Animation
- * @see https://tailwindcss.com/docs/animation
- */
- animate: [{
- animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]
- }],
- // ------------------
- // --- Transforms ---
- // ------------------
- /**
- * Backface Visibility
- * @see https://tailwindcss.com/docs/backface-visibility
- */
- backface: [{
- backface: ['hidden', 'visible']
- }],
- /**
- * Perspective
- * @see https://tailwindcss.com/docs/perspective
- */
- perspective: [{
- perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
- }],
- /**
- * Perspective Origin
- * @see https://tailwindcss.com/docs/perspective-origin
- */
- 'perspective-origin': [{
- 'perspective-origin': scalePositionWithArbitrary()
- }],
- /**
- * Rotate
- * @see https://tailwindcss.com/docs/rotate
- */
- rotate: [{
- rotate: scaleRotate()
- }],
- /**
- * Rotate X
- * @see https://tailwindcss.com/docs/rotate
- */
- 'rotate-x': [{
- 'rotate-x': scaleRotate()
- }],
- /**
- * Rotate Y
- * @see https://tailwindcss.com/docs/rotate
- */
- 'rotate-y': [{
- 'rotate-y': scaleRotate()
- }],
- /**
- * Rotate Z
- * @see https://tailwindcss.com/docs/rotate
- */
- 'rotate-z': [{
- 'rotate-z': scaleRotate()
- }],
- /**
- * Scale
- * @see https://tailwindcss.com/docs/scale
- */
- scale: [{
- scale: scaleScale()
- }],
- /**
- * Scale X
- * @see https://tailwindcss.com/docs/scale
- */
- 'scale-x': [{
- 'scale-x': scaleScale()
- }],
- /**
- * Scale Y
- * @see https://tailwindcss.com/docs/scale
- */
- 'scale-y': [{
- 'scale-y': scaleScale()
- }],
- /**
- * Scale Z
- * @see https://tailwindcss.com/docs/scale
- */
- 'scale-z': [{
- 'scale-z': scaleScale()
- }],
- /**
- * Scale 3D
- * @see https://tailwindcss.com/docs/scale
- */
- 'scale-3d': ['scale-3d'],
- /**
- * Skew
- * @see https://tailwindcss.com/docs/skew
- */
- skew: [{
- skew: scaleSkew()
- }],
- /**
- * Skew X
- * @see https://tailwindcss.com/docs/skew
- */
- 'skew-x': [{
- 'skew-x': scaleSkew()
- }],
- /**
- * Skew Y
- * @see https://tailwindcss.com/docs/skew
- */
- 'skew-y': [{
- 'skew-y': scaleSkew()
- }],
- /**
- * Transform
- * @see https://tailwindcss.com/docs/transform
- */
- transform: [{
- transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']
- }],
- /**
- * Transform Origin
- * @see https://tailwindcss.com/docs/transform-origin
- */
- 'transform-origin': [{
- origin: scalePositionWithArbitrary()
- }],
- /**
- * Transform Style
- * @see https://tailwindcss.com/docs/transform-style
- */
- 'transform-style': [{
- transform: ['3d', 'flat']
- }],
- /**
- * Translate
- * @see https://tailwindcss.com/docs/translate
- */
- translate: [{
- translate: scaleTranslate()
- }],
- /**
- * Translate X
- * @see https://tailwindcss.com/docs/translate
- */
- 'translate-x': [{
- 'translate-x': scaleTranslate()
- }],
- /**
- * Translate Y
- * @see https://tailwindcss.com/docs/translate
- */
- 'translate-y': [{
- 'translate-y': scaleTranslate()
- }],
- /**
- * Translate Z
- * @see https://tailwindcss.com/docs/translate
- */
- 'translate-z': [{
- 'translate-z': scaleTranslate()
- }],
- /**
- * Translate None
- * @see https://tailwindcss.com/docs/translate
- */
- 'translate-none': ['translate-none'],
- // ---------------------
- // --- Interactivity ---
- // ---------------------
- /**
- * Accent Color
- * @see https://tailwindcss.com/docs/accent-color
- */
- accent: [{
- accent: scaleColor()
- }],
- /**
- * Appearance
- * @see https://tailwindcss.com/docs/appearance
- */
- appearance: [{
- appearance: ['none', 'auto']
- }],
- /**
- * Caret Color
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
- */
- 'caret-color': [{
- caret: scaleColor()
- }],
- /**
- * Color Scheme
- * @see https://tailwindcss.com/docs/color-scheme
- */
- 'color-scheme': [{
- scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']
- }],
- /**
- * Cursor
- * @see https://tailwindcss.com/docs/cursor
- */
- cursor: [{
- 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]
- }],
- /**
- * Field Sizing
- * @see https://tailwindcss.com/docs/field-sizing
- */
- 'field-sizing': [{
- 'field-sizing': ['fixed', 'content']
- }],
- /**
- * Pointer Events
- * @see https://tailwindcss.com/docs/pointer-events
- */
- 'pointer-events': [{
- 'pointer-events': ['auto', 'none']
- }],
- /**
- * Resize
- * @see https://tailwindcss.com/docs/resize
- */
- resize: [{
- resize: ['none', '', 'y', 'x']
- }],
- /**
- * Scroll Behavior
- * @see https://tailwindcss.com/docs/scroll-behavior
- */
- 'scroll-behavior': [{
- scroll: ['auto', 'smooth']
- }],
- /**
- * Scroll Margin
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-m': [{
- 'scroll-m': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin X
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-mx': [{
- 'scroll-mx': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin Y
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-my': [{
- 'scroll-my': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin Start
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-ms': [{
- 'scroll-ms': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin End
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-me': [{
- 'scroll-me': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin Top
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-mt': [{
- 'scroll-mt': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin Right
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-mr': [{
- 'scroll-mr': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin Bottom
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-mb': [{
- 'scroll-mb': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Margin Left
- * @see https://tailwindcss.com/docs/scroll-margin
- */
- 'scroll-ml': [{
- 'scroll-ml': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-p': [{
- 'scroll-p': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding X
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-px': [{
- 'scroll-px': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding Y
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-py': [{
- 'scroll-py': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding Start
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-ps': [{
- 'scroll-ps': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding End
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-pe': [{
- 'scroll-pe': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding Top
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-pt': [{
- 'scroll-pt': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding Right
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-pr': [{
- 'scroll-pr': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding Bottom
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-pb': [{
- 'scroll-pb': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Padding Left
- * @see https://tailwindcss.com/docs/scroll-padding
- */
- 'scroll-pl': [{
- 'scroll-pl': scaleUnambiguousSpacing()
- }],
- /**
- * Scroll Snap Align
- * @see https://tailwindcss.com/docs/scroll-snap-align
- */
- 'snap-align': [{
- snap: ['start', 'end', 'center', 'align-none']
- }],
- /**
- * Scroll Snap Stop
- * @see https://tailwindcss.com/docs/scroll-snap-stop
- */
- 'snap-stop': [{
- snap: ['normal', 'always']
- }],
- /**
- * Scroll Snap Type
- * @see https://tailwindcss.com/docs/scroll-snap-type
- */
- 'snap-type': [{
- snap: ['none', 'x', 'y', 'both']
- }],
- /**
- * Scroll Snap Type Strictness
- * @see https://tailwindcss.com/docs/scroll-snap-type
- */
- 'snap-strictness': [{
- snap: ['mandatory', 'proximity']
- }],
- /**
- * Touch Action
- * @see https://tailwindcss.com/docs/touch-action
- */
- touch: [{
- touch: ['auto', 'none', 'manipulation']
- }],
- /**
- * Touch Action X
- * @see https://tailwindcss.com/docs/touch-action
- */
- 'touch-x': [{
- 'touch-pan': ['x', 'left', 'right']
- }],
- /**
- * Touch Action Y
- * @see https://tailwindcss.com/docs/touch-action
- */
- 'touch-y': [{
- 'touch-pan': ['y', 'up', 'down']
- }],
- /**
- * Touch Action Pinch Zoom
- * @see https://tailwindcss.com/docs/touch-action
- */
- 'touch-pz': ['touch-pinch-zoom'],
- /**
- * User Select
- * @see https://tailwindcss.com/docs/user-select
- */
- select: [{
- select: ['none', 'text', 'all', 'auto']
- }],
- /**
- * Will Change
- * @see https://tailwindcss.com/docs/will-change
- */
- 'will-change': [{
- 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]
- }],
- // -----------
- // --- SVG ---
- // -----------
- /**
- * Fill
- * @see https://tailwindcss.com/docs/fill
- */
- fill: [{
- fill: ['none'].concat(scaleColor())
- }],
- /**
- * Stroke Width
- * @see https://tailwindcss.com/docs/stroke-width
- */
- 'stroke-w': [{
- stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
- }],
- /**
- * Stroke
- * @see https://tailwindcss.com/docs/stroke
- */
- stroke: [{
- stroke: ['none'].concat(scaleColor())
- }],
- // ---------------------
- // --- Accessibility ---
- // ---------------------
- /**
- * Forced Color Adjust
- * @see https://tailwindcss.com/docs/forced-color-adjust
- */
- 'forced-color-adjust': [{
- 'forced-color-adjust': ['auto', 'none']
- }]
- },
- conflictingClassGroups: {
- overflow: ['overflow-x', 'overflow-y'],
- overscroll: ['overscroll-x', 'overscroll-y'],
- inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
- 'inset-x': ['right', 'left'],
- 'inset-y': ['top', 'bottom'],
- flex: ['basis', 'grow', 'shrink'],
- gap: ['gap-x', 'gap-y'],
- p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
- px: ['pr', 'pl'],
- py: ['pt', 'pb'],
- m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
- mx: ['mr', 'ml'],
- my: ['mt', 'mb'],
- size: ['w', 'h'],
- 'font-size': ['leading'],
- 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
- 'fvn-ordinal': ['fvn-normal'],
- 'fvn-slashed-zero': ['fvn-normal'],
- 'fvn-figure': ['fvn-normal'],
- 'fvn-spacing': ['fvn-normal'],
- 'fvn-fraction': ['fvn-normal'],
- 'line-clamp': ['display', 'overflow'],
- 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'],
- 'rounded-s': ['rounded-ss', 'rounded-es'],
- 'rounded-e': ['rounded-se', 'rounded-ee'],
- 'rounded-t': ['rounded-tl', 'rounded-tr'],
- 'rounded-r': ['rounded-tr', 'rounded-br'],
- 'rounded-b': ['rounded-br', 'rounded-bl'],
- 'rounded-l': ['rounded-tl', 'rounded-bl'],
- 'border-spacing': ['border-spacing-x', 'border-spacing-y'],
- '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'],
- 'border-w-x': ['border-w-r', 'border-w-l'],
- 'border-w-y': ['border-w-t', 'border-w-b'],
- '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'],
- 'border-color-x': ['border-color-r', 'border-color-l'],
- 'border-color-y': ['border-color-t', 'border-color-b'],
- translate: ['translate-x', 'translate-y', 'translate-none'],
- 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
- 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
- 'scroll-mx': ['scroll-mr', 'scroll-ml'],
- 'scroll-my': ['scroll-mt', 'scroll-mb'],
- 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
- 'scroll-px': ['scroll-pr', 'scroll-pl'],
- 'scroll-py': ['scroll-pt', 'scroll-pb'],
- touch: ['touch-x', 'touch-y', 'touch-pz'],
- 'touch-x': ['touch'],
- 'touch-y': ['touch'],
- 'touch-pz': ['touch']
- },
- conflictingClassGroupModifiers: {
- 'font-size': ['leading']
- },
- orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']
- };
- };
- /**
- * @param baseConfig Config where other config will be merged into. This object will be mutated.
- * @param configExtension Partial config to merge into the `baseConfig`.
- */
- var mergeConfigs = function mergeConfigs(baseConfig, _ref3) {
- var cacheSize = _ref3.cacheSize,
- prefix = _ref3.prefix,
- experimentalParseClassName = _ref3.experimentalParseClassName,
- _ref3$extend = _ref3.extend,
- extend = _ref3$extend === void 0 ? {} : _ref3$extend,
- _ref3$override = _ref3.override,
- override = _ref3$override === void 0 ? {} : _ref3$override;
- overrideProperty(baseConfig, 'cacheSize', cacheSize);
- overrideProperty(baseConfig, 'prefix', prefix);
- overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);
- overrideConfigProperties(baseConfig.theme, override.theme);
- overrideConfigProperties(baseConfig.classGroups, override.classGroups);
- overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);
- overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);
- overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);
- mergeConfigProperties(baseConfig.theme, extend.theme);
- mergeConfigProperties(baseConfig.classGroups, extend.classGroups);
- mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);
- mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);
- mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');
- return baseConfig;
- };
- var overrideProperty = function overrideProperty(baseObject, overrideKey, overrideValue) {
- if (overrideValue !== undefined) {
- baseObject[overrideKey] = overrideValue;
- }
- };
- var overrideConfigProperties = function overrideConfigProperties(baseObject, overrideObject) {
- if (overrideObject) {
- for (var key in overrideObject) {
- overrideProperty(baseObject, key, overrideObject[key]);
- }
- }
- };
- var mergeConfigProperties = function mergeConfigProperties(baseObject, mergeObject) {
- if (mergeObject) {
- for (var key in mergeObject) {
- mergeArrayProperties(baseObject, mergeObject, key);
- }
- }
- };
- var mergeArrayProperties = function mergeArrayProperties(baseObject, mergeObject, key) {
- var mergeValue = mergeObject[key];
- if (mergeValue !== undefined) {
- baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;
- }
- };
- var extendTailwindMerge = function extendTailwindMerge(configExtension) {
- for (var _len2 = arguments.length, createConfig = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- createConfig[_key2 - 1] = arguments[_key2];
- }
- return typeof configExtension === 'function' ? createTailwindMerge.apply(void 0, [getDefaultConfig, configExtension].concat(createConfig)) : createTailwindMerge.apply(void 0, [function () {
- return mergeConfigs(getDefaultConfig(), configExtension);
- }].concat(createConfig));
- };
- var twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
- exports.createTailwindMerge = createTailwindMerge;
- exports.extendTailwindMerge = extendTailwindMerge;
- exports.fromTheme = fromTheme;
- exports.getDefaultConfig = getDefaultConfig;
- exports.mergeConfigs = mergeConfigs;
- exports.twJoin = twJoin;
- exports.twMerge = twMerge;
- exports.validators = validators;
- //# sourceMappingURL=bundle-cjs.js.map
|