No Description

corePlugins.js 126KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. function _export(target, all) {
  6. for(var name in all)Object.defineProperty(target, name, {
  7. enumerable: true,
  8. get: all[name]
  9. });
  10. }
  11. _export(exports, {
  12. variantPlugins: function() {
  13. return variantPlugins;
  14. },
  15. corePlugins: function() {
  16. return corePlugins;
  17. }
  18. });
  19. const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
  20. const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
  21. const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
  22. const _createUtilityPlugin = /*#__PURE__*/ _interop_require_default(require("./util/createUtilityPlugin"));
  23. const _buildMediaQuery = /*#__PURE__*/ _interop_require_default(require("./util/buildMediaQuery"));
  24. const _escapeClassName = /*#__PURE__*/ _interop_require_default(require("./util/escapeClassName"));
  25. const _parseAnimationValue = /*#__PURE__*/ _interop_require_default(require("./util/parseAnimationValue"));
  26. const _flattenColorPalette = /*#__PURE__*/ _interop_require_default(require("./util/flattenColorPalette"));
  27. const _withAlphaVariable = /*#__PURE__*/ _interop_require_wildcard(require("./util/withAlphaVariable"));
  28. const _toColorValue = /*#__PURE__*/ _interop_require_default(require("./util/toColorValue"));
  29. const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("./util/isPlainObject"));
  30. const _transformThemeValue = /*#__PURE__*/ _interop_require_default(require("./util/transformThemeValue"));
  31. const _packagejson = require("../package.json");
  32. const _log = /*#__PURE__*/ _interop_require_default(require("./util/log"));
  33. const _normalizeScreens = require("./util/normalizeScreens");
  34. const _parseBoxShadowValue = require("./util/parseBoxShadowValue");
  35. const _removeAlphaVariables = require("./util/removeAlphaVariables");
  36. const _featureFlags = require("./featureFlags");
  37. const _dataTypes = require("./util/dataTypes");
  38. function _interop_require_default(obj) {
  39. return obj && obj.__esModule ? obj : {
  40. default: obj
  41. };
  42. }
  43. function _getRequireWildcardCache(nodeInterop) {
  44. if (typeof WeakMap !== "function") return null;
  45. var cacheBabelInterop = new WeakMap();
  46. var cacheNodeInterop = new WeakMap();
  47. return (_getRequireWildcardCache = function(nodeInterop) {
  48. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  49. })(nodeInterop);
  50. }
  51. function _interop_require_wildcard(obj, nodeInterop) {
  52. if (!nodeInterop && obj && obj.__esModule) {
  53. return obj;
  54. }
  55. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  56. return {
  57. default: obj
  58. };
  59. }
  60. var cache = _getRequireWildcardCache(nodeInterop);
  61. if (cache && cache.has(obj)) {
  62. return cache.get(obj);
  63. }
  64. var newObj = {};
  65. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  66. for(var key in obj){
  67. if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  68. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  69. if (desc && (desc.get || desc.set)) {
  70. Object.defineProperty(newObj, key, desc);
  71. } else {
  72. newObj[key] = obj[key];
  73. }
  74. }
  75. }
  76. newObj.default = obj;
  77. if (cache) {
  78. cache.set(obj, newObj);
  79. }
  80. return newObj;
  81. }
  82. let variantPlugins = {
  83. pseudoElementVariants: ({ addVariant })=>{
  84. addVariant("first-letter", "&::first-letter");
  85. addVariant("first-line", "&::first-line");
  86. addVariant("marker", [
  87. ({ container })=>{
  88. (0, _removeAlphaVariables.removeAlphaVariables)(container, [
  89. "--tw-text-opacity"
  90. ]);
  91. return "& *::marker";
  92. },
  93. ({ container })=>{
  94. (0, _removeAlphaVariables.removeAlphaVariables)(container, [
  95. "--tw-text-opacity"
  96. ]);
  97. return "&::marker";
  98. }
  99. ]);
  100. addVariant("selection", [
  101. "& *::selection",
  102. "&::selection"
  103. ]);
  104. addVariant("file", "&::file-selector-button");
  105. addVariant("placeholder", "&::placeholder");
  106. addVariant("backdrop", "&::backdrop");
  107. addVariant("before", ({ container })=>{
  108. container.walkRules((rule)=>{
  109. let foundContent = false;
  110. rule.walkDecls("content", ()=>{
  111. foundContent = true;
  112. });
  113. if (!foundContent) {
  114. rule.prepend(_postcss.default.decl({
  115. prop: "content",
  116. value: "var(--tw-content)"
  117. }));
  118. }
  119. });
  120. return "&::before";
  121. });
  122. addVariant("after", ({ container })=>{
  123. container.walkRules((rule)=>{
  124. let foundContent = false;
  125. rule.walkDecls("content", ()=>{
  126. foundContent = true;
  127. });
  128. if (!foundContent) {
  129. rule.prepend(_postcss.default.decl({
  130. prop: "content",
  131. value: "var(--tw-content)"
  132. }));
  133. }
  134. });
  135. return "&::after";
  136. });
  137. },
  138. pseudoClassVariants: ({ addVariant , matchVariant , config })=>{
  139. let pseudoVariants = [
  140. // Positional
  141. [
  142. "first",
  143. "&:first-child"
  144. ],
  145. [
  146. "last",
  147. "&:last-child"
  148. ],
  149. [
  150. "only",
  151. "&:only-child"
  152. ],
  153. [
  154. "odd",
  155. "&:nth-child(odd)"
  156. ],
  157. [
  158. "even",
  159. "&:nth-child(even)"
  160. ],
  161. "first-of-type",
  162. "last-of-type",
  163. "only-of-type",
  164. // State
  165. [
  166. "visited",
  167. ({ container })=>{
  168. (0, _removeAlphaVariables.removeAlphaVariables)(container, [
  169. "--tw-text-opacity",
  170. "--tw-border-opacity",
  171. "--tw-bg-opacity"
  172. ]);
  173. return "&:visited";
  174. }
  175. ],
  176. "target",
  177. [
  178. "open",
  179. "&[open]"
  180. ],
  181. // Forms
  182. "default",
  183. "checked",
  184. "indeterminate",
  185. "placeholder-shown",
  186. "autofill",
  187. "optional",
  188. "required",
  189. "valid",
  190. "invalid",
  191. "in-range",
  192. "out-of-range",
  193. "read-only",
  194. // Content
  195. "empty",
  196. // Interactive
  197. "focus-within",
  198. [
  199. "hover",
  200. !(0, _featureFlags.flagEnabled)(config(), "hoverOnlyWhenSupported") ? "&:hover" : "@media (hover: hover) and (pointer: fine) { &:hover }"
  201. ],
  202. "focus",
  203. "focus-visible",
  204. "active",
  205. "enabled",
  206. "disabled"
  207. ].map((variant)=>Array.isArray(variant) ? variant : [
  208. variant,
  209. `&:${variant}`
  210. ]);
  211. for (let [variantName, state] of pseudoVariants){
  212. addVariant(variantName, (ctx)=>{
  213. let result = typeof state === "function" ? state(ctx) : state;
  214. return result;
  215. });
  216. }
  217. let variants = {
  218. group: (_, { modifier })=>modifier ? [
  219. `:merge(.group\\/${(0, _escapeClassName.default)(modifier)})`,
  220. " &"
  221. ] : [
  222. `:merge(.group)`,
  223. " &"
  224. ],
  225. peer: (_, { modifier })=>modifier ? [
  226. `:merge(.peer\\/${(0, _escapeClassName.default)(modifier)})`,
  227. " ~ &"
  228. ] : [
  229. `:merge(.peer)`,
  230. " ~ &"
  231. ]
  232. };
  233. for (let [name, fn] of Object.entries(variants)){
  234. matchVariant(name, (value = "", extra)=>{
  235. let result = (0, _dataTypes.normalize)(typeof value === "function" ? value(extra) : value);
  236. if (!result.includes("&")) result = "&" + result;
  237. let [a, b] = fn("", extra);
  238. let start = null;
  239. let end = null;
  240. let quotes = 0;
  241. for(let i = 0; i < result.length; ++i){
  242. let c = result[i];
  243. if (c === "&") {
  244. start = i;
  245. } else if (c === "'" || c === '"') {
  246. quotes += 1;
  247. } else if (start !== null && c === " " && !quotes) {
  248. end = i;
  249. }
  250. }
  251. if (start !== null && end === null) {
  252. end = result.length;
  253. }
  254. // Basically this but can handle quotes:
  255. // result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
  256. return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end);
  257. }, {
  258. values: Object.fromEntries(pseudoVariants)
  259. });
  260. }
  261. },
  262. directionVariants: ({ addVariant })=>{
  263. addVariant("ltr", ':is([dir="ltr"] &)');
  264. addVariant("rtl", ':is([dir="rtl"] &)');
  265. },
  266. reducedMotionVariants: ({ addVariant })=>{
  267. addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)");
  268. addVariant("motion-reduce", "@media (prefers-reduced-motion: reduce)");
  269. },
  270. darkVariants: ({ config , addVariant })=>{
  271. let [mode, className = ".dark"] = [].concat(config("darkMode", "media"));
  272. if (mode === false) {
  273. mode = "media";
  274. _log.default.warn("darkmode-false", [
  275. "The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.",
  276. "Change `darkMode` to `media` or remove it entirely.",
  277. "https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration"
  278. ]);
  279. }
  280. if (mode === "class") {
  281. addVariant("dark", `:is(${className} &)`);
  282. } else if (mode === "media") {
  283. addVariant("dark", "@media (prefers-color-scheme: dark)");
  284. }
  285. },
  286. printVariant: ({ addVariant })=>{
  287. addVariant("print", "@media print");
  288. },
  289. screenVariants: ({ theme , addVariant , matchVariant })=>{
  290. var _theme;
  291. let rawScreens = (_theme = theme("screens")) !== null && _theme !== void 0 ? _theme : {};
  292. let areSimpleScreens = Object.values(rawScreens).every((v)=>typeof v === "string");
  293. let screens = (0, _normalizeScreens.normalizeScreens)(theme("screens"));
  294. /** @type {Set<string>} */ let unitCache = new Set([]);
  295. /** @param {string} value */ function units(value) {
  296. var _value_match;
  297. var _value_match_;
  298. return (_value_match_ = (_value_match = value.match(/(\D+)$/)) === null || _value_match === void 0 ? void 0 : _value_match[1]) !== null && _value_match_ !== void 0 ? _value_match_ : "(none)";
  299. }
  300. /** @param {string} value */ function recordUnits(value) {
  301. if (value !== undefined) {
  302. unitCache.add(units(value));
  303. }
  304. }
  305. /** @param {string} value */ function canUseUnits(value) {
  306. recordUnits(value);
  307. // If the cache was empty it'll become 1 because we've just added the current unit
  308. // If the cache was not empty and the units are the same the size doesn't change
  309. // Otherwise, if the units are different from what is already known the size will always be > 1
  310. return unitCache.size === 1;
  311. }
  312. for (const screen of screens){
  313. for (const value of screen.values){
  314. recordUnits(value.min);
  315. recordUnits(value.max);
  316. }
  317. }
  318. let screensUseConsistentUnits = unitCache.size <= 1;
  319. /**
  320. * @typedef {import('./util/normalizeScreens').Screen} Screen
  321. */ /**
  322. * @param {'min' | 'max'} type
  323. * @returns {Record<string, Screen>}
  324. */ function buildScreenValues(type) {
  325. return Object.fromEntries(screens.filter((screen)=>(0, _normalizeScreens.isScreenSortable)(screen).result).map((screen)=>{
  326. let { min , max } = screen.values[0];
  327. if (type === "min" && min !== undefined) {
  328. return screen;
  329. } else if (type === "min" && max !== undefined) {
  330. return {
  331. ...screen,
  332. not: !screen.not
  333. };
  334. } else if (type === "max" && max !== undefined) {
  335. return screen;
  336. } else if (type === "max" && min !== undefined) {
  337. return {
  338. ...screen,
  339. not: !screen.not
  340. };
  341. }
  342. }).map((screen)=>[
  343. screen.name,
  344. screen
  345. ]));
  346. }
  347. /**
  348. * @param {'min' | 'max'} type
  349. * @returns {(a: { value: string | Screen }, z: { value: string | Screen }) => number}
  350. */ function buildSort(type) {
  351. return (a, z)=>(0, _normalizeScreens.compareScreens)(type, a.value, z.value);
  352. }
  353. let maxSort = buildSort("max");
  354. let minSort = buildSort("min");
  355. /** @param {'min'|'max'} type */ function buildScreenVariant(type) {
  356. return (value)=>{
  357. if (!areSimpleScreens) {
  358. _log.default.warn("complex-screen-config", [
  359. "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing objects."
  360. ]);
  361. return [];
  362. } else if (!screensUseConsistentUnits) {
  363. _log.default.warn("mixed-screen-units", [
  364. "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units."
  365. ]);
  366. return [];
  367. } else if (typeof value === "string" && !canUseUnits(value)) {
  368. _log.default.warn("minmax-have-mixed-units", [
  369. "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units."
  370. ]);
  371. return [];
  372. }
  373. return [
  374. `@media ${(0, _buildMediaQuery.default)((0, _normalizeScreens.toScreen)(value, type))}`
  375. ];
  376. };
  377. }
  378. matchVariant("max", buildScreenVariant("max"), {
  379. sort: maxSort,
  380. values: areSimpleScreens ? buildScreenValues("max") : {}
  381. });
  382. // screens and min-* are sorted together when they can be
  383. let id = "min-screens";
  384. for (let screen of screens){
  385. addVariant(screen.name, `@media ${(0, _buildMediaQuery.default)(screen)}`, {
  386. id,
  387. sort: areSimpleScreens && screensUseConsistentUnits ? minSort : undefined,
  388. value: screen
  389. });
  390. }
  391. matchVariant("min", buildScreenVariant("min"), {
  392. id,
  393. sort: minSort
  394. });
  395. },
  396. supportsVariants: ({ matchVariant , theme })=>{
  397. var _theme;
  398. matchVariant("supports", (value = "")=>{
  399. let check = (0, _dataTypes.normalize)(value);
  400. let isRaw = /^\w*\s*\(/.test(check);
  401. // Chrome has a bug where `(condtion1)or(condition2)` is not valid
  402. // But `(condition1) or (condition2)` is supported.
  403. check = isRaw ? check.replace(/\b(and|or|not)\b/g, " $1 ") : check;
  404. if (isRaw) {
  405. return `@supports ${check}`;
  406. }
  407. if (!check.includes(":")) {
  408. check = `${check}: var(--tw)`;
  409. }
  410. if (!(check.startsWith("(") && check.endsWith(")"))) {
  411. check = `(${check})`;
  412. }
  413. return `@supports ${check}`;
  414. }, {
  415. values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
  416. });
  417. },
  418. ariaVariants: ({ matchVariant , theme })=>{
  419. var _theme;
  420. matchVariant("aria", (value)=>`&[aria-${(0, _dataTypes.normalize)(value)}]`, {
  421. values: (_theme = theme("aria")) !== null && _theme !== void 0 ? _theme : {}
  422. });
  423. var _theme1;
  424. matchVariant("group-aria", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier})[aria-${(0, _dataTypes.normalize)(value)}] &` : `:merge(.group)[aria-${(0, _dataTypes.normalize)(value)}] &`, {
  425. values: (_theme1 = theme("aria")) !== null && _theme1 !== void 0 ? _theme1 : {}
  426. });
  427. var _theme2;
  428. matchVariant("peer-aria", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier})[aria-${(0, _dataTypes.normalize)(value)}] ~ &` : `:merge(.peer)[aria-${(0, _dataTypes.normalize)(value)}] ~ &`, {
  429. values: (_theme2 = theme("aria")) !== null && _theme2 !== void 0 ? _theme2 : {}
  430. });
  431. },
  432. dataVariants: ({ matchVariant , theme })=>{
  433. var _theme;
  434. matchVariant("data", (value)=>`&[data-${(0, _dataTypes.normalize)(value)}]`, {
  435. values: (_theme = theme("data")) !== null && _theme !== void 0 ? _theme : {}
  436. });
  437. var _theme1;
  438. matchVariant("group-data", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier})[data-${(0, _dataTypes.normalize)(value)}] &` : `:merge(.group)[data-${(0, _dataTypes.normalize)(value)}] &`, {
  439. values: (_theme1 = theme("data")) !== null && _theme1 !== void 0 ? _theme1 : {}
  440. });
  441. var _theme2;
  442. matchVariant("peer-data", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier})[data-${(0, _dataTypes.normalize)(value)}] ~ &` : `:merge(.peer)[data-${(0, _dataTypes.normalize)(value)}] ~ &`, {
  443. values: (_theme2 = theme("data")) !== null && _theme2 !== void 0 ? _theme2 : {}
  444. });
  445. },
  446. orientationVariants: ({ addVariant })=>{
  447. addVariant("portrait", "@media (orientation: portrait)");
  448. addVariant("landscape", "@media (orientation: landscape)");
  449. },
  450. prefersContrastVariants: ({ addVariant })=>{
  451. addVariant("contrast-more", "@media (prefers-contrast: more)");
  452. addVariant("contrast-less", "@media (prefers-contrast: less)");
  453. }
  454. };
  455. let cssTransformValue = [
  456. "translate(var(--tw-translate-x), var(--tw-translate-y))",
  457. "rotate(var(--tw-rotate))",
  458. "skewX(var(--tw-skew-x))",
  459. "skewY(var(--tw-skew-y))",
  460. "scaleX(var(--tw-scale-x))",
  461. "scaleY(var(--tw-scale-y))"
  462. ].join(" ");
  463. let cssFilterValue = [
  464. "var(--tw-blur)",
  465. "var(--tw-brightness)",
  466. "var(--tw-contrast)",
  467. "var(--tw-grayscale)",
  468. "var(--tw-hue-rotate)",
  469. "var(--tw-invert)",
  470. "var(--tw-saturate)",
  471. "var(--tw-sepia)",
  472. "var(--tw-drop-shadow)"
  473. ].join(" ");
  474. let cssBackdropFilterValue = [
  475. "var(--tw-backdrop-blur)",
  476. "var(--tw-backdrop-brightness)",
  477. "var(--tw-backdrop-contrast)",
  478. "var(--tw-backdrop-grayscale)",
  479. "var(--tw-backdrop-hue-rotate)",
  480. "var(--tw-backdrop-invert)",
  481. "var(--tw-backdrop-opacity)",
  482. "var(--tw-backdrop-saturate)",
  483. "var(--tw-backdrop-sepia)"
  484. ].join(" ");
  485. let corePlugins = {
  486. preflight: ({ addBase })=>{
  487. let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(_path.join(__dirname, "./css/preflight.css"), "utf8"));
  488. addBase([
  489. _postcss.default.comment({
  490. text: `! tailwindcss v${_packagejson.version} | MIT License | https://tailwindcss.com`
  491. }),
  492. ...preflightStyles.nodes
  493. ]);
  494. },
  495. container: (()=>{
  496. function extractMinWidths(breakpoints = []) {
  497. return breakpoints.flatMap((breakpoint)=>breakpoint.values.map((breakpoint)=>breakpoint.min)).filter((v)=>v !== undefined);
  498. }
  499. function mapMinWidthsToPadding(minWidths, screens, paddings) {
  500. if (typeof paddings === "undefined") {
  501. return [];
  502. }
  503. if (!(typeof paddings === "object" && paddings !== null)) {
  504. return [
  505. {
  506. screen: "DEFAULT",
  507. minWidth: 0,
  508. padding: paddings
  509. }
  510. ];
  511. }
  512. let mapping = [];
  513. if (paddings.DEFAULT) {
  514. mapping.push({
  515. screen: "DEFAULT",
  516. minWidth: 0,
  517. padding: paddings.DEFAULT
  518. });
  519. }
  520. for (let minWidth of minWidths){
  521. for (let screen of screens){
  522. for (let { min } of screen.values){
  523. if (min === minWidth) {
  524. mapping.push({
  525. minWidth,
  526. padding: paddings[screen.name]
  527. });
  528. }
  529. }
  530. }
  531. }
  532. return mapping;
  533. }
  534. return function({ addComponents , theme }) {
  535. let screens = (0, _normalizeScreens.normalizeScreens)(theme("container.screens", theme("screens")));
  536. let minWidths = extractMinWidths(screens);
  537. let paddings = mapMinWidthsToPadding(minWidths, screens, theme("container.padding"));
  538. let generatePaddingFor = (minWidth)=>{
  539. let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth);
  540. if (!paddingConfig) {
  541. return {};
  542. }
  543. return {
  544. paddingRight: paddingConfig.padding,
  545. paddingLeft: paddingConfig.padding
  546. };
  547. };
  548. let atRules = Array.from(new Set(minWidths.slice().sort((a, z)=>parseInt(a) - parseInt(z)))).map((minWidth)=>({
  549. [`@media (min-width: ${minWidth})`]: {
  550. ".container": {
  551. "max-width": minWidth,
  552. ...generatePaddingFor(minWidth)
  553. }
  554. }
  555. }));
  556. addComponents([
  557. {
  558. ".container": Object.assign({
  559. width: "100%"
  560. }, theme("container.center", false) ? {
  561. marginRight: "auto",
  562. marginLeft: "auto"
  563. } : {}, generatePaddingFor(0))
  564. },
  565. ...atRules
  566. ]);
  567. };
  568. })(),
  569. accessibility: ({ addUtilities })=>{
  570. addUtilities({
  571. ".sr-only": {
  572. position: "absolute",
  573. width: "1px",
  574. height: "1px",
  575. padding: "0",
  576. margin: "-1px",
  577. overflow: "hidden",
  578. clip: "rect(0, 0, 0, 0)",
  579. whiteSpace: "nowrap",
  580. borderWidth: "0"
  581. },
  582. ".not-sr-only": {
  583. position: "static",
  584. width: "auto",
  585. height: "auto",
  586. padding: "0",
  587. margin: "0",
  588. overflow: "visible",
  589. clip: "auto",
  590. whiteSpace: "normal"
  591. }
  592. });
  593. },
  594. pointerEvents: ({ addUtilities })=>{
  595. addUtilities({
  596. ".pointer-events-none": {
  597. "pointer-events": "none"
  598. },
  599. ".pointer-events-auto": {
  600. "pointer-events": "auto"
  601. }
  602. });
  603. },
  604. visibility: ({ addUtilities })=>{
  605. addUtilities({
  606. ".visible": {
  607. visibility: "visible"
  608. },
  609. ".invisible": {
  610. visibility: "hidden"
  611. },
  612. ".collapse": {
  613. visibility: "collapse"
  614. }
  615. });
  616. },
  617. position: ({ addUtilities })=>{
  618. addUtilities({
  619. ".static": {
  620. position: "static"
  621. },
  622. ".fixed": {
  623. position: "fixed"
  624. },
  625. ".absolute": {
  626. position: "absolute"
  627. },
  628. ".relative": {
  629. position: "relative"
  630. },
  631. ".sticky": {
  632. position: "sticky"
  633. }
  634. });
  635. },
  636. inset: (0, _createUtilityPlugin.default)("inset", [
  637. [
  638. "inset",
  639. [
  640. "inset"
  641. ]
  642. ],
  643. [
  644. [
  645. "inset-x",
  646. [
  647. "left",
  648. "right"
  649. ]
  650. ],
  651. [
  652. "inset-y",
  653. [
  654. "top",
  655. "bottom"
  656. ]
  657. ]
  658. ],
  659. [
  660. [
  661. "start",
  662. [
  663. "inset-inline-start"
  664. ]
  665. ],
  666. [
  667. "end",
  668. [
  669. "inset-inline-end"
  670. ]
  671. ],
  672. [
  673. "top",
  674. [
  675. "top"
  676. ]
  677. ],
  678. [
  679. "right",
  680. [
  681. "right"
  682. ]
  683. ],
  684. [
  685. "bottom",
  686. [
  687. "bottom"
  688. ]
  689. ],
  690. [
  691. "left",
  692. [
  693. "left"
  694. ]
  695. ]
  696. ]
  697. ], {
  698. supportsNegativeValues: true
  699. }),
  700. isolation: ({ addUtilities })=>{
  701. addUtilities({
  702. ".isolate": {
  703. isolation: "isolate"
  704. },
  705. ".isolation-auto": {
  706. isolation: "auto"
  707. }
  708. });
  709. },
  710. zIndex: (0, _createUtilityPlugin.default)("zIndex", [
  711. [
  712. "z",
  713. [
  714. "zIndex"
  715. ]
  716. ]
  717. ], {
  718. supportsNegativeValues: true
  719. }),
  720. order: (0, _createUtilityPlugin.default)("order", undefined, {
  721. supportsNegativeValues: true
  722. }),
  723. gridColumn: (0, _createUtilityPlugin.default)("gridColumn", [
  724. [
  725. "col",
  726. [
  727. "gridColumn"
  728. ]
  729. ]
  730. ]),
  731. gridColumnStart: (0, _createUtilityPlugin.default)("gridColumnStart", [
  732. [
  733. "col-start",
  734. [
  735. "gridColumnStart"
  736. ]
  737. ]
  738. ]),
  739. gridColumnEnd: (0, _createUtilityPlugin.default)("gridColumnEnd", [
  740. [
  741. "col-end",
  742. [
  743. "gridColumnEnd"
  744. ]
  745. ]
  746. ]),
  747. gridRow: (0, _createUtilityPlugin.default)("gridRow", [
  748. [
  749. "row",
  750. [
  751. "gridRow"
  752. ]
  753. ]
  754. ]),
  755. gridRowStart: (0, _createUtilityPlugin.default)("gridRowStart", [
  756. [
  757. "row-start",
  758. [
  759. "gridRowStart"
  760. ]
  761. ]
  762. ]),
  763. gridRowEnd: (0, _createUtilityPlugin.default)("gridRowEnd", [
  764. [
  765. "row-end",
  766. [
  767. "gridRowEnd"
  768. ]
  769. ]
  770. ]),
  771. float: ({ addUtilities })=>{
  772. addUtilities({
  773. ".float-right": {
  774. float: "right"
  775. },
  776. ".float-left": {
  777. float: "left"
  778. },
  779. ".float-none": {
  780. float: "none"
  781. }
  782. });
  783. },
  784. clear: ({ addUtilities })=>{
  785. addUtilities({
  786. ".clear-left": {
  787. clear: "left"
  788. },
  789. ".clear-right": {
  790. clear: "right"
  791. },
  792. ".clear-both": {
  793. clear: "both"
  794. },
  795. ".clear-none": {
  796. clear: "none"
  797. }
  798. });
  799. },
  800. margin: (0, _createUtilityPlugin.default)("margin", [
  801. [
  802. "m",
  803. [
  804. "margin"
  805. ]
  806. ],
  807. [
  808. [
  809. "mx",
  810. [
  811. "margin-left",
  812. "margin-right"
  813. ]
  814. ],
  815. [
  816. "my",
  817. [
  818. "margin-top",
  819. "margin-bottom"
  820. ]
  821. ]
  822. ],
  823. [
  824. [
  825. "ms",
  826. [
  827. "margin-inline-start"
  828. ]
  829. ],
  830. [
  831. "me",
  832. [
  833. "margin-inline-end"
  834. ]
  835. ],
  836. [
  837. "mt",
  838. [
  839. "margin-top"
  840. ]
  841. ],
  842. [
  843. "mr",
  844. [
  845. "margin-right"
  846. ]
  847. ],
  848. [
  849. "mb",
  850. [
  851. "margin-bottom"
  852. ]
  853. ],
  854. [
  855. "ml",
  856. [
  857. "margin-left"
  858. ]
  859. ]
  860. ]
  861. ], {
  862. supportsNegativeValues: true
  863. }),
  864. boxSizing: ({ addUtilities })=>{
  865. addUtilities({
  866. ".box-border": {
  867. "box-sizing": "border-box"
  868. },
  869. ".box-content": {
  870. "box-sizing": "content-box"
  871. }
  872. });
  873. },
  874. lineClamp: ({ matchUtilities , addUtilities , theme })=>{
  875. matchUtilities({
  876. "line-clamp": (value)=>({
  877. overflow: "hidden",
  878. display: "-webkit-box",
  879. "-webkit-box-orient": "vertical",
  880. "-webkit-line-clamp": `${value}`
  881. })
  882. }, {
  883. values: theme("lineClamp")
  884. });
  885. addUtilities({
  886. ".line-clamp-none": {
  887. overflow: "visible",
  888. display: "block",
  889. "-webkit-box-orient": "horizontal",
  890. "-webkit-line-clamp": "none"
  891. }
  892. });
  893. },
  894. display: ({ addUtilities })=>{
  895. addUtilities({
  896. ".block": {
  897. display: "block"
  898. },
  899. ".inline-block": {
  900. display: "inline-block"
  901. },
  902. ".inline": {
  903. display: "inline"
  904. },
  905. ".flex": {
  906. display: "flex"
  907. },
  908. ".inline-flex": {
  909. display: "inline-flex"
  910. },
  911. ".table": {
  912. display: "table"
  913. },
  914. ".inline-table": {
  915. display: "inline-table"
  916. },
  917. ".table-caption": {
  918. display: "table-caption"
  919. },
  920. ".table-cell": {
  921. display: "table-cell"
  922. },
  923. ".table-column": {
  924. display: "table-column"
  925. },
  926. ".table-column-group": {
  927. display: "table-column-group"
  928. },
  929. ".table-footer-group": {
  930. display: "table-footer-group"
  931. },
  932. ".table-header-group": {
  933. display: "table-header-group"
  934. },
  935. ".table-row-group": {
  936. display: "table-row-group"
  937. },
  938. ".table-row": {
  939. display: "table-row"
  940. },
  941. ".flow-root": {
  942. display: "flow-root"
  943. },
  944. ".grid": {
  945. display: "grid"
  946. },
  947. ".inline-grid": {
  948. display: "inline-grid"
  949. },
  950. ".contents": {
  951. display: "contents"
  952. },
  953. ".list-item": {
  954. display: "list-item"
  955. },
  956. ".hidden": {
  957. display: "none"
  958. }
  959. });
  960. },
  961. aspectRatio: (0, _createUtilityPlugin.default)("aspectRatio", [
  962. [
  963. "aspect",
  964. [
  965. "aspect-ratio"
  966. ]
  967. ]
  968. ]),
  969. height: (0, _createUtilityPlugin.default)("height", [
  970. [
  971. "h",
  972. [
  973. "height"
  974. ]
  975. ]
  976. ]),
  977. maxHeight: (0, _createUtilityPlugin.default)("maxHeight", [
  978. [
  979. "max-h",
  980. [
  981. "maxHeight"
  982. ]
  983. ]
  984. ]),
  985. minHeight: (0, _createUtilityPlugin.default)("minHeight", [
  986. [
  987. "min-h",
  988. [
  989. "minHeight"
  990. ]
  991. ]
  992. ]),
  993. width: (0, _createUtilityPlugin.default)("width", [
  994. [
  995. "w",
  996. [
  997. "width"
  998. ]
  999. ]
  1000. ]),
  1001. minWidth: (0, _createUtilityPlugin.default)("minWidth", [
  1002. [
  1003. "min-w",
  1004. [
  1005. "minWidth"
  1006. ]
  1007. ]
  1008. ]),
  1009. maxWidth: (0, _createUtilityPlugin.default)("maxWidth", [
  1010. [
  1011. "max-w",
  1012. [
  1013. "maxWidth"
  1014. ]
  1015. ]
  1016. ]),
  1017. flex: (0, _createUtilityPlugin.default)("flex"),
  1018. flexShrink: (0, _createUtilityPlugin.default)("flexShrink", [
  1019. [
  1020. "flex-shrink",
  1021. [
  1022. "flex-shrink"
  1023. ]
  1024. ],
  1025. [
  1026. "shrink",
  1027. [
  1028. "flex-shrink"
  1029. ]
  1030. ]
  1031. ]),
  1032. flexGrow: (0, _createUtilityPlugin.default)("flexGrow", [
  1033. [
  1034. "flex-grow",
  1035. [
  1036. "flex-grow"
  1037. ]
  1038. ],
  1039. [
  1040. "grow",
  1041. [
  1042. "flex-grow"
  1043. ]
  1044. ]
  1045. ]),
  1046. flexBasis: (0, _createUtilityPlugin.default)("flexBasis", [
  1047. [
  1048. "basis",
  1049. [
  1050. "flex-basis"
  1051. ]
  1052. ]
  1053. ]),
  1054. tableLayout: ({ addUtilities })=>{
  1055. addUtilities({
  1056. ".table-auto": {
  1057. "table-layout": "auto"
  1058. },
  1059. ".table-fixed": {
  1060. "table-layout": "fixed"
  1061. }
  1062. });
  1063. },
  1064. captionSide: ({ addUtilities })=>{
  1065. addUtilities({
  1066. ".caption-top": {
  1067. "caption-side": "top"
  1068. },
  1069. ".caption-bottom": {
  1070. "caption-side": "bottom"
  1071. }
  1072. });
  1073. },
  1074. borderCollapse: ({ addUtilities })=>{
  1075. addUtilities({
  1076. ".border-collapse": {
  1077. "border-collapse": "collapse"
  1078. },
  1079. ".border-separate": {
  1080. "border-collapse": "separate"
  1081. }
  1082. });
  1083. },
  1084. borderSpacing: ({ addDefaults , matchUtilities , theme })=>{
  1085. addDefaults("border-spacing", {
  1086. "--tw-border-spacing-x": 0,
  1087. "--tw-border-spacing-y": 0
  1088. });
  1089. matchUtilities({
  1090. "border-spacing": (value)=>{
  1091. return {
  1092. "--tw-border-spacing-x": value,
  1093. "--tw-border-spacing-y": value,
  1094. "@defaults border-spacing": {},
  1095. "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)"
  1096. };
  1097. },
  1098. "border-spacing-x": (value)=>{
  1099. return {
  1100. "--tw-border-spacing-x": value,
  1101. "@defaults border-spacing": {},
  1102. "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)"
  1103. };
  1104. },
  1105. "border-spacing-y": (value)=>{
  1106. return {
  1107. "--tw-border-spacing-y": value,
  1108. "@defaults border-spacing": {},
  1109. "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)"
  1110. };
  1111. }
  1112. }, {
  1113. values: theme("borderSpacing")
  1114. });
  1115. },
  1116. transformOrigin: (0, _createUtilityPlugin.default)("transformOrigin", [
  1117. [
  1118. "origin",
  1119. [
  1120. "transformOrigin"
  1121. ]
  1122. ]
  1123. ]),
  1124. translate: (0, _createUtilityPlugin.default)("translate", [
  1125. [
  1126. [
  1127. "translate-x",
  1128. [
  1129. [
  1130. "@defaults transform",
  1131. {}
  1132. ],
  1133. "--tw-translate-x",
  1134. [
  1135. "transform",
  1136. cssTransformValue
  1137. ]
  1138. ]
  1139. ],
  1140. [
  1141. "translate-y",
  1142. [
  1143. [
  1144. "@defaults transform",
  1145. {}
  1146. ],
  1147. "--tw-translate-y",
  1148. [
  1149. "transform",
  1150. cssTransformValue
  1151. ]
  1152. ]
  1153. ]
  1154. ]
  1155. ], {
  1156. supportsNegativeValues: true
  1157. }),
  1158. rotate: (0, _createUtilityPlugin.default)("rotate", [
  1159. [
  1160. "rotate",
  1161. [
  1162. [
  1163. "@defaults transform",
  1164. {}
  1165. ],
  1166. "--tw-rotate",
  1167. [
  1168. "transform",
  1169. cssTransformValue
  1170. ]
  1171. ]
  1172. ]
  1173. ], {
  1174. supportsNegativeValues: true
  1175. }),
  1176. skew: (0, _createUtilityPlugin.default)("skew", [
  1177. [
  1178. [
  1179. "skew-x",
  1180. [
  1181. [
  1182. "@defaults transform",
  1183. {}
  1184. ],
  1185. "--tw-skew-x",
  1186. [
  1187. "transform",
  1188. cssTransformValue
  1189. ]
  1190. ]
  1191. ],
  1192. [
  1193. "skew-y",
  1194. [
  1195. [
  1196. "@defaults transform",
  1197. {}
  1198. ],
  1199. "--tw-skew-y",
  1200. [
  1201. "transform",
  1202. cssTransformValue
  1203. ]
  1204. ]
  1205. ]
  1206. ]
  1207. ], {
  1208. supportsNegativeValues: true
  1209. }),
  1210. scale: (0, _createUtilityPlugin.default)("scale", [
  1211. [
  1212. "scale",
  1213. [
  1214. [
  1215. "@defaults transform",
  1216. {}
  1217. ],
  1218. "--tw-scale-x",
  1219. "--tw-scale-y",
  1220. [
  1221. "transform",
  1222. cssTransformValue
  1223. ]
  1224. ]
  1225. ],
  1226. [
  1227. [
  1228. "scale-x",
  1229. [
  1230. [
  1231. "@defaults transform",
  1232. {}
  1233. ],
  1234. "--tw-scale-x",
  1235. [
  1236. "transform",
  1237. cssTransformValue
  1238. ]
  1239. ]
  1240. ],
  1241. [
  1242. "scale-y",
  1243. [
  1244. [
  1245. "@defaults transform",
  1246. {}
  1247. ],
  1248. "--tw-scale-y",
  1249. [
  1250. "transform",
  1251. cssTransformValue
  1252. ]
  1253. ]
  1254. ]
  1255. ]
  1256. ], {
  1257. supportsNegativeValues: true
  1258. }),
  1259. transform: ({ addDefaults , addUtilities })=>{
  1260. addDefaults("transform", {
  1261. "--tw-translate-x": "0",
  1262. "--tw-translate-y": "0",
  1263. "--tw-rotate": "0",
  1264. "--tw-skew-x": "0",
  1265. "--tw-skew-y": "0",
  1266. "--tw-scale-x": "1",
  1267. "--tw-scale-y": "1"
  1268. });
  1269. addUtilities({
  1270. ".transform": {
  1271. "@defaults transform": {},
  1272. transform: cssTransformValue
  1273. },
  1274. ".transform-cpu": {
  1275. transform: cssTransformValue
  1276. },
  1277. ".transform-gpu": {
  1278. transform: cssTransformValue.replace("translate(var(--tw-translate-x), var(--tw-translate-y))", "translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)")
  1279. },
  1280. ".transform-none": {
  1281. transform: "none"
  1282. }
  1283. });
  1284. },
  1285. animation: ({ matchUtilities , theme , config })=>{
  1286. let prefixName = (name)=>`${config("prefix")}${(0, _escapeClassName.default)(name)}`;
  1287. var _theme;
  1288. let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
  1289. return [
  1290. key,
  1291. {
  1292. [`@keyframes ${prefixName(key)}`]: value
  1293. }
  1294. ];
  1295. }));
  1296. matchUtilities({
  1297. animate: (value)=>{
  1298. let animations = (0, _parseAnimationValue.default)(value);
  1299. return [
  1300. ...animations.flatMap((animation)=>keyframes[animation.name]),
  1301. {
  1302. animation: animations.map(({ name , value })=>{
  1303. if (name === undefined || keyframes[name] === undefined) {
  1304. return value;
  1305. }
  1306. return value.replace(name, prefixName(name));
  1307. }).join(", ")
  1308. }
  1309. ];
  1310. }
  1311. }, {
  1312. values: theme("animation")
  1313. });
  1314. },
  1315. cursor: (0, _createUtilityPlugin.default)("cursor"),
  1316. touchAction: ({ addDefaults , addUtilities })=>{
  1317. addDefaults("touch-action", {
  1318. "--tw-pan-x": " ",
  1319. "--tw-pan-y": " ",
  1320. "--tw-pinch-zoom": " "
  1321. });
  1322. let cssTouchActionValue = "var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)";
  1323. addUtilities({
  1324. ".touch-auto": {
  1325. "touch-action": "auto"
  1326. },
  1327. ".touch-none": {
  1328. "touch-action": "none"
  1329. },
  1330. ".touch-pan-x": {
  1331. "@defaults touch-action": {},
  1332. "--tw-pan-x": "pan-x",
  1333. "touch-action": cssTouchActionValue
  1334. },
  1335. ".touch-pan-left": {
  1336. "@defaults touch-action": {},
  1337. "--tw-pan-x": "pan-left",
  1338. "touch-action": cssTouchActionValue
  1339. },
  1340. ".touch-pan-right": {
  1341. "@defaults touch-action": {},
  1342. "--tw-pan-x": "pan-right",
  1343. "touch-action": cssTouchActionValue
  1344. },
  1345. ".touch-pan-y": {
  1346. "@defaults touch-action": {},
  1347. "--tw-pan-y": "pan-y",
  1348. "touch-action": cssTouchActionValue
  1349. },
  1350. ".touch-pan-up": {
  1351. "@defaults touch-action": {},
  1352. "--tw-pan-y": "pan-up",
  1353. "touch-action": cssTouchActionValue
  1354. },
  1355. ".touch-pan-down": {
  1356. "@defaults touch-action": {},
  1357. "--tw-pan-y": "pan-down",
  1358. "touch-action": cssTouchActionValue
  1359. },
  1360. ".touch-pinch-zoom": {
  1361. "@defaults touch-action": {},
  1362. "--tw-pinch-zoom": "pinch-zoom",
  1363. "touch-action": cssTouchActionValue
  1364. },
  1365. ".touch-manipulation": {
  1366. "touch-action": "manipulation"
  1367. }
  1368. });
  1369. },
  1370. userSelect: ({ addUtilities })=>{
  1371. addUtilities({
  1372. ".select-none": {
  1373. "user-select": "none"
  1374. },
  1375. ".select-text": {
  1376. "user-select": "text"
  1377. },
  1378. ".select-all": {
  1379. "user-select": "all"
  1380. },
  1381. ".select-auto": {
  1382. "user-select": "auto"
  1383. }
  1384. });
  1385. },
  1386. resize: ({ addUtilities })=>{
  1387. addUtilities({
  1388. ".resize-none": {
  1389. resize: "none"
  1390. },
  1391. ".resize-y": {
  1392. resize: "vertical"
  1393. },
  1394. ".resize-x": {
  1395. resize: "horizontal"
  1396. },
  1397. ".resize": {
  1398. resize: "both"
  1399. }
  1400. });
  1401. },
  1402. scrollSnapType: ({ addDefaults , addUtilities })=>{
  1403. addDefaults("scroll-snap-type", {
  1404. "--tw-scroll-snap-strictness": "proximity"
  1405. });
  1406. addUtilities({
  1407. ".snap-none": {
  1408. "scroll-snap-type": "none"
  1409. },
  1410. ".snap-x": {
  1411. "@defaults scroll-snap-type": {},
  1412. "scroll-snap-type": "x var(--tw-scroll-snap-strictness)"
  1413. },
  1414. ".snap-y": {
  1415. "@defaults scroll-snap-type": {},
  1416. "scroll-snap-type": "y var(--tw-scroll-snap-strictness)"
  1417. },
  1418. ".snap-both": {
  1419. "@defaults scroll-snap-type": {},
  1420. "scroll-snap-type": "both var(--tw-scroll-snap-strictness)"
  1421. },
  1422. ".snap-mandatory": {
  1423. "--tw-scroll-snap-strictness": "mandatory"
  1424. },
  1425. ".snap-proximity": {
  1426. "--tw-scroll-snap-strictness": "proximity"
  1427. }
  1428. });
  1429. },
  1430. scrollSnapAlign: ({ addUtilities })=>{
  1431. addUtilities({
  1432. ".snap-start": {
  1433. "scroll-snap-align": "start"
  1434. },
  1435. ".snap-end": {
  1436. "scroll-snap-align": "end"
  1437. },
  1438. ".snap-center": {
  1439. "scroll-snap-align": "center"
  1440. },
  1441. ".snap-align-none": {
  1442. "scroll-snap-align": "none"
  1443. }
  1444. });
  1445. },
  1446. scrollSnapStop: ({ addUtilities })=>{
  1447. addUtilities({
  1448. ".snap-normal": {
  1449. "scroll-snap-stop": "normal"
  1450. },
  1451. ".snap-always": {
  1452. "scroll-snap-stop": "always"
  1453. }
  1454. });
  1455. },
  1456. scrollMargin: (0, _createUtilityPlugin.default)("scrollMargin", [
  1457. [
  1458. "scroll-m",
  1459. [
  1460. "scroll-margin"
  1461. ]
  1462. ],
  1463. [
  1464. [
  1465. "scroll-mx",
  1466. [
  1467. "scroll-margin-left",
  1468. "scroll-margin-right"
  1469. ]
  1470. ],
  1471. [
  1472. "scroll-my",
  1473. [
  1474. "scroll-margin-top",
  1475. "scroll-margin-bottom"
  1476. ]
  1477. ]
  1478. ],
  1479. [
  1480. [
  1481. "scroll-ms",
  1482. [
  1483. "scroll-margin-inline-start"
  1484. ]
  1485. ],
  1486. [
  1487. "scroll-me",
  1488. [
  1489. "scroll-margin-inline-end"
  1490. ]
  1491. ],
  1492. [
  1493. "scroll-mt",
  1494. [
  1495. "scroll-margin-top"
  1496. ]
  1497. ],
  1498. [
  1499. "scroll-mr",
  1500. [
  1501. "scroll-margin-right"
  1502. ]
  1503. ],
  1504. [
  1505. "scroll-mb",
  1506. [
  1507. "scroll-margin-bottom"
  1508. ]
  1509. ],
  1510. [
  1511. "scroll-ml",
  1512. [
  1513. "scroll-margin-left"
  1514. ]
  1515. ]
  1516. ]
  1517. ], {
  1518. supportsNegativeValues: true
  1519. }),
  1520. scrollPadding: (0, _createUtilityPlugin.default)("scrollPadding", [
  1521. [
  1522. "scroll-p",
  1523. [
  1524. "scroll-padding"
  1525. ]
  1526. ],
  1527. [
  1528. [
  1529. "scroll-px",
  1530. [
  1531. "scroll-padding-left",
  1532. "scroll-padding-right"
  1533. ]
  1534. ],
  1535. [
  1536. "scroll-py",
  1537. [
  1538. "scroll-padding-top",
  1539. "scroll-padding-bottom"
  1540. ]
  1541. ]
  1542. ],
  1543. [
  1544. [
  1545. "scroll-ps",
  1546. [
  1547. "scroll-padding-inline-start"
  1548. ]
  1549. ],
  1550. [
  1551. "scroll-pe",
  1552. [
  1553. "scroll-padding-inline-end"
  1554. ]
  1555. ],
  1556. [
  1557. "scroll-pt",
  1558. [
  1559. "scroll-padding-top"
  1560. ]
  1561. ],
  1562. [
  1563. "scroll-pr",
  1564. [
  1565. "scroll-padding-right"
  1566. ]
  1567. ],
  1568. [
  1569. "scroll-pb",
  1570. [
  1571. "scroll-padding-bottom"
  1572. ]
  1573. ],
  1574. [
  1575. "scroll-pl",
  1576. [
  1577. "scroll-padding-left"
  1578. ]
  1579. ]
  1580. ]
  1581. ]),
  1582. listStylePosition: ({ addUtilities })=>{
  1583. addUtilities({
  1584. ".list-inside": {
  1585. "list-style-position": "inside"
  1586. },
  1587. ".list-outside": {
  1588. "list-style-position": "outside"
  1589. }
  1590. });
  1591. },
  1592. listStyleType: (0, _createUtilityPlugin.default)("listStyleType", [
  1593. [
  1594. "list",
  1595. [
  1596. "listStyleType"
  1597. ]
  1598. ]
  1599. ]),
  1600. listStyleImage: (0, _createUtilityPlugin.default)("listStyleImage", [
  1601. [
  1602. "list-image",
  1603. [
  1604. "listStyleImage"
  1605. ]
  1606. ]
  1607. ]),
  1608. appearance: ({ addUtilities })=>{
  1609. addUtilities({
  1610. ".appearance-none": {
  1611. appearance: "none"
  1612. }
  1613. });
  1614. },
  1615. columns: (0, _createUtilityPlugin.default)("columns", [
  1616. [
  1617. "columns",
  1618. [
  1619. "columns"
  1620. ]
  1621. ]
  1622. ]),
  1623. breakBefore: ({ addUtilities })=>{
  1624. addUtilities({
  1625. ".break-before-auto": {
  1626. "break-before": "auto"
  1627. },
  1628. ".break-before-avoid": {
  1629. "break-before": "avoid"
  1630. },
  1631. ".break-before-all": {
  1632. "break-before": "all"
  1633. },
  1634. ".break-before-avoid-page": {
  1635. "break-before": "avoid-page"
  1636. },
  1637. ".break-before-page": {
  1638. "break-before": "page"
  1639. },
  1640. ".break-before-left": {
  1641. "break-before": "left"
  1642. },
  1643. ".break-before-right": {
  1644. "break-before": "right"
  1645. },
  1646. ".break-before-column": {
  1647. "break-before": "column"
  1648. }
  1649. });
  1650. },
  1651. breakInside: ({ addUtilities })=>{
  1652. addUtilities({
  1653. ".break-inside-auto": {
  1654. "break-inside": "auto"
  1655. },
  1656. ".break-inside-avoid": {
  1657. "break-inside": "avoid"
  1658. },
  1659. ".break-inside-avoid-page": {
  1660. "break-inside": "avoid-page"
  1661. },
  1662. ".break-inside-avoid-column": {
  1663. "break-inside": "avoid-column"
  1664. }
  1665. });
  1666. },
  1667. breakAfter: ({ addUtilities })=>{
  1668. addUtilities({
  1669. ".break-after-auto": {
  1670. "break-after": "auto"
  1671. },
  1672. ".break-after-avoid": {
  1673. "break-after": "avoid"
  1674. },
  1675. ".break-after-all": {
  1676. "break-after": "all"
  1677. },
  1678. ".break-after-avoid-page": {
  1679. "break-after": "avoid-page"
  1680. },
  1681. ".break-after-page": {
  1682. "break-after": "page"
  1683. },
  1684. ".break-after-left": {
  1685. "break-after": "left"
  1686. },
  1687. ".break-after-right": {
  1688. "break-after": "right"
  1689. },
  1690. ".break-after-column": {
  1691. "break-after": "column"
  1692. }
  1693. });
  1694. },
  1695. gridAutoColumns: (0, _createUtilityPlugin.default)("gridAutoColumns", [
  1696. [
  1697. "auto-cols",
  1698. [
  1699. "gridAutoColumns"
  1700. ]
  1701. ]
  1702. ]),
  1703. gridAutoFlow: ({ addUtilities })=>{
  1704. addUtilities({
  1705. ".grid-flow-row": {
  1706. gridAutoFlow: "row"
  1707. },
  1708. ".grid-flow-col": {
  1709. gridAutoFlow: "column"
  1710. },
  1711. ".grid-flow-dense": {
  1712. gridAutoFlow: "dense"
  1713. },
  1714. ".grid-flow-row-dense": {
  1715. gridAutoFlow: "row dense"
  1716. },
  1717. ".grid-flow-col-dense": {
  1718. gridAutoFlow: "column dense"
  1719. }
  1720. });
  1721. },
  1722. gridAutoRows: (0, _createUtilityPlugin.default)("gridAutoRows", [
  1723. [
  1724. "auto-rows",
  1725. [
  1726. "gridAutoRows"
  1727. ]
  1728. ]
  1729. ]),
  1730. gridTemplateColumns: (0, _createUtilityPlugin.default)("gridTemplateColumns", [
  1731. [
  1732. "grid-cols",
  1733. [
  1734. "gridTemplateColumns"
  1735. ]
  1736. ]
  1737. ]),
  1738. gridTemplateRows: (0, _createUtilityPlugin.default)("gridTemplateRows", [
  1739. [
  1740. "grid-rows",
  1741. [
  1742. "gridTemplateRows"
  1743. ]
  1744. ]
  1745. ]),
  1746. flexDirection: ({ addUtilities })=>{
  1747. addUtilities({
  1748. ".flex-row": {
  1749. "flex-direction": "row"
  1750. },
  1751. ".flex-row-reverse": {
  1752. "flex-direction": "row-reverse"
  1753. },
  1754. ".flex-col": {
  1755. "flex-direction": "column"
  1756. },
  1757. ".flex-col-reverse": {
  1758. "flex-direction": "column-reverse"
  1759. }
  1760. });
  1761. },
  1762. flexWrap: ({ addUtilities })=>{
  1763. addUtilities({
  1764. ".flex-wrap": {
  1765. "flex-wrap": "wrap"
  1766. },
  1767. ".flex-wrap-reverse": {
  1768. "flex-wrap": "wrap-reverse"
  1769. },
  1770. ".flex-nowrap": {
  1771. "flex-wrap": "nowrap"
  1772. }
  1773. });
  1774. },
  1775. placeContent: ({ addUtilities })=>{
  1776. addUtilities({
  1777. ".place-content-center": {
  1778. "place-content": "center"
  1779. },
  1780. ".place-content-start": {
  1781. "place-content": "start"
  1782. },
  1783. ".place-content-end": {
  1784. "place-content": "end"
  1785. },
  1786. ".place-content-between": {
  1787. "place-content": "space-between"
  1788. },
  1789. ".place-content-around": {
  1790. "place-content": "space-around"
  1791. },
  1792. ".place-content-evenly": {
  1793. "place-content": "space-evenly"
  1794. },
  1795. ".place-content-baseline": {
  1796. "place-content": "baseline"
  1797. },
  1798. ".place-content-stretch": {
  1799. "place-content": "stretch"
  1800. }
  1801. });
  1802. },
  1803. placeItems: ({ addUtilities })=>{
  1804. addUtilities({
  1805. ".place-items-start": {
  1806. "place-items": "start"
  1807. },
  1808. ".place-items-end": {
  1809. "place-items": "end"
  1810. },
  1811. ".place-items-center": {
  1812. "place-items": "center"
  1813. },
  1814. ".place-items-baseline": {
  1815. "place-items": "baseline"
  1816. },
  1817. ".place-items-stretch": {
  1818. "place-items": "stretch"
  1819. }
  1820. });
  1821. },
  1822. alignContent: ({ addUtilities })=>{
  1823. addUtilities({
  1824. ".content-normal": {
  1825. "align-content": "normal"
  1826. },
  1827. ".content-center": {
  1828. "align-content": "center"
  1829. },
  1830. ".content-start": {
  1831. "align-content": "flex-start"
  1832. },
  1833. ".content-end": {
  1834. "align-content": "flex-end"
  1835. },
  1836. ".content-between": {
  1837. "align-content": "space-between"
  1838. },
  1839. ".content-around": {
  1840. "align-content": "space-around"
  1841. },
  1842. ".content-evenly": {
  1843. "align-content": "space-evenly"
  1844. },
  1845. ".content-baseline": {
  1846. "align-content": "baseline"
  1847. },
  1848. ".content-stretch": {
  1849. "align-content": "stretch"
  1850. }
  1851. });
  1852. },
  1853. alignItems: ({ addUtilities })=>{
  1854. addUtilities({
  1855. ".items-start": {
  1856. "align-items": "flex-start"
  1857. },
  1858. ".items-end": {
  1859. "align-items": "flex-end"
  1860. },
  1861. ".items-center": {
  1862. "align-items": "center"
  1863. },
  1864. ".items-baseline": {
  1865. "align-items": "baseline"
  1866. },
  1867. ".items-stretch": {
  1868. "align-items": "stretch"
  1869. }
  1870. });
  1871. },
  1872. justifyContent: ({ addUtilities })=>{
  1873. addUtilities({
  1874. ".justify-normal": {
  1875. "justify-content": "normal"
  1876. },
  1877. ".justify-start": {
  1878. "justify-content": "flex-start"
  1879. },
  1880. ".justify-end": {
  1881. "justify-content": "flex-end"
  1882. },
  1883. ".justify-center": {
  1884. "justify-content": "center"
  1885. },
  1886. ".justify-between": {
  1887. "justify-content": "space-between"
  1888. },
  1889. ".justify-around": {
  1890. "justify-content": "space-around"
  1891. },
  1892. ".justify-evenly": {
  1893. "justify-content": "space-evenly"
  1894. },
  1895. ".justify-stretch": {
  1896. "justify-content": "stretch"
  1897. }
  1898. });
  1899. },
  1900. justifyItems: ({ addUtilities })=>{
  1901. addUtilities({
  1902. ".justify-items-start": {
  1903. "justify-items": "start"
  1904. },
  1905. ".justify-items-end": {
  1906. "justify-items": "end"
  1907. },
  1908. ".justify-items-center": {
  1909. "justify-items": "center"
  1910. },
  1911. ".justify-items-stretch": {
  1912. "justify-items": "stretch"
  1913. }
  1914. });
  1915. },
  1916. gap: (0, _createUtilityPlugin.default)("gap", [
  1917. [
  1918. "gap",
  1919. [
  1920. "gap"
  1921. ]
  1922. ],
  1923. [
  1924. [
  1925. "gap-x",
  1926. [
  1927. "columnGap"
  1928. ]
  1929. ],
  1930. [
  1931. "gap-y",
  1932. [
  1933. "rowGap"
  1934. ]
  1935. ]
  1936. ]
  1937. ]),
  1938. space: ({ matchUtilities , addUtilities , theme })=>{
  1939. matchUtilities({
  1940. "space-x": (value)=>{
  1941. value = value === "0" ? "0px" : value;
  1942. if (false) {
  1943. return {
  1944. "& > :not([hidden]) ~ :not([hidden])": {
  1945. "--tw-space-x-reverse": "0",
  1946. "margin-inline-end": `calc(${value} * var(--tw-space-x-reverse))`,
  1947. "margin-inline-start": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
  1948. }
  1949. };
  1950. }
  1951. return {
  1952. "& > :not([hidden]) ~ :not([hidden])": {
  1953. "--tw-space-x-reverse": "0",
  1954. "margin-right": `calc(${value} * var(--tw-space-x-reverse))`,
  1955. "margin-left": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
  1956. }
  1957. };
  1958. },
  1959. "space-y": (value)=>{
  1960. value = value === "0" ? "0px" : value;
  1961. return {
  1962. "& > :not([hidden]) ~ :not([hidden])": {
  1963. "--tw-space-y-reverse": "0",
  1964. "margin-top": `calc(${value} * calc(1 - var(--tw-space-y-reverse)))`,
  1965. "margin-bottom": `calc(${value} * var(--tw-space-y-reverse))`
  1966. }
  1967. };
  1968. }
  1969. }, {
  1970. values: theme("space"),
  1971. supportsNegativeValues: true
  1972. });
  1973. addUtilities({
  1974. ".space-y-reverse > :not([hidden]) ~ :not([hidden])": {
  1975. "--tw-space-y-reverse": "1"
  1976. },
  1977. ".space-x-reverse > :not([hidden]) ~ :not([hidden])": {
  1978. "--tw-space-x-reverse": "1"
  1979. }
  1980. });
  1981. },
  1982. divideWidth: ({ matchUtilities , addUtilities , theme })=>{
  1983. matchUtilities({
  1984. "divide-x": (value)=>{
  1985. value = value === "0" ? "0px" : value;
  1986. if (false) {
  1987. return {
  1988. "& > :not([hidden]) ~ :not([hidden])": {
  1989. "@defaults border-width": {},
  1990. "--tw-divide-x-reverse": "0",
  1991. "border-inline-end-width": `calc(${value} * var(--tw-divide-x-reverse))`,
  1992. "border-inline-start-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
  1993. }
  1994. };
  1995. }
  1996. return {
  1997. "& > :not([hidden]) ~ :not([hidden])": {
  1998. "@defaults border-width": {},
  1999. "--tw-divide-x-reverse": "0",
  2000. "border-right-width": `calc(${value} * var(--tw-divide-x-reverse))`,
  2001. "border-left-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
  2002. }
  2003. };
  2004. },
  2005. "divide-y": (value)=>{
  2006. value = value === "0" ? "0px" : value;
  2007. return {
  2008. "& > :not([hidden]) ~ :not([hidden])": {
  2009. "@defaults border-width": {},
  2010. "--tw-divide-y-reverse": "0",
  2011. "border-top-width": `calc(${value} * calc(1 - var(--tw-divide-y-reverse)))`,
  2012. "border-bottom-width": `calc(${value} * var(--tw-divide-y-reverse))`
  2013. }
  2014. };
  2015. }
  2016. }, {
  2017. values: theme("divideWidth"),
  2018. type: [
  2019. "line-width",
  2020. "length",
  2021. "any"
  2022. ]
  2023. });
  2024. addUtilities({
  2025. ".divide-y-reverse > :not([hidden]) ~ :not([hidden])": {
  2026. "@defaults border-width": {},
  2027. "--tw-divide-y-reverse": "1"
  2028. },
  2029. ".divide-x-reverse > :not([hidden]) ~ :not([hidden])": {
  2030. "@defaults border-width": {},
  2031. "--tw-divide-x-reverse": "1"
  2032. }
  2033. });
  2034. },
  2035. divideStyle: ({ addUtilities })=>{
  2036. addUtilities({
  2037. ".divide-solid > :not([hidden]) ~ :not([hidden])": {
  2038. "border-style": "solid"
  2039. },
  2040. ".divide-dashed > :not([hidden]) ~ :not([hidden])": {
  2041. "border-style": "dashed"
  2042. },
  2043. ".divide-dotted > :not([hidden]) ~ :not([hidden])": {
  2044. "border-style": "dotted"
  2045. },
  2046. ".divide-double > :not([hidden]) ~ :not([hidden])": {
  2047. "border-style": "double"
  2048. },
  2049. ".divide-none > :not([hidden]) ~ :not([hidden])": {
  2050. "border-style": "none"
  2051. }
  2052. });
  2053. },
  2054. divideColor: ({ matchUtilities , theme , corePlugins })=>{
  2055. matchUtilities({
  2056. divide: (value)=>{
  2057. if (!corePlugins("divideOpacity")) {
  2058. return {
  2059. ["& > :not([hidden]) ~ :not([hidden])"]: {
  2060. "border-color": (0, _toColorValue.default)(value)
  2061. }
  2062. };
  2063. }
  2064. return {
  2065. ["& > :not([hidden]) ~ :not([hidden])"]: (0, _withAlphaVariable.default)({
  2066. color: value,
  2067. property: "border-color",
  2068. variable: "--tw-divide-opacity"
  2069. })
  2070. };
  2071. }
  2072. }, {
  2073. values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("divideColor"))),
  2074. type: [
  2075. "color",
  2076. "any"
  2077. ]
  2078. });
  2079. },
  2080. divideOpacity: ({ matchUtilities , theme })=>{
  2081. matchUtilities({
  2082. "divide-opacity": (value)=>{
  2083. return {
  2084. [`& > :not([hidden]) ~ :not([hidden])`]: {
  2085. "--tw-divide-opacity": value
  2086. }
  2087. };
  2088. }
  2089. }, {
  2090. values: theme("divideOpacity")
  2091. });
  2092. },
  2093. placeSelf: ({ addUtilities })=>{
  2094. addUtilities({
  2095. ".place-self-auto": {
  2096. "place-self": "auto"
  2097. },
  2098. ".place-self-start": {
  2099. "place-self": "start"
  2100. },
  2101. ".place-self-end": {
  2102. "place-self": "end"
  2103. },
  2104. ".place-self-center": {
  2105. "place-self": "center"
  2106. },
  2107. ".place-self-stretch": {
  2108. "place-self": "stretch"
  2109. }
  2110. });
  2111. },
  2112. alignSelf: ({ addUtilities })=>{
  2113. addUtilities({
  2114. ".self-auto": {
  2115. "align-self": "auto"
  2116. },
  2117. ".self-start": {
  2118. "align-self": "flex-start"
  2119. },
  2120. ".self-end": {
  2121. "align-self": "flex-end"
  2122. },
  2123. ".self-center": {
  2124. "align-self": "center"
  2125. },
  2126. ".self-stretch": {
  2127. "align-self": "stretch"
  2128. },
  2129. ".self-baseline": {
  2130. "align-self": "baseline"
  2131. }
  2132. });
  2133. },
  2134. justifySelf: ({ addUtilities })=>{
  2135. addUtilities({
  2136. ".justify-self-auto": {
  2137. "justify-self": "auto"
  2138. },
  2139. ".justify-self-start": {
  2140. "justify-self": "start"
  2141. },
  2142. ".justify-self-end": {
  2143. "justify-self": "end"
  2144. },
  2145. ".justify-self-center": {
  2146. "justify-self": "center"
  2147. },
  2148. ".justify-self-stretch": {
  2149. "justify-self": "stretch"
  2150. }
  2151. });
  2152. },
  2153. overflow: ({ addUtilities })=>{
  2154. addUtilities({
  2155. ".overflow-auto": {
  2156. overflow: "auto"
  2157. },
  2158. ".overflow-hidden": {
  2159. overflow: "hidden"
  2160. },
  2161. ".overflow-clip": {
  2162. overflow: "clip"
  2163. },
  2164. ".overflow-visible": {
  2165. overflow: "visible"
  2166. },
  2167. ".overflow-scroll": {
  2168. overflow: "scroll"
  2169. },
  2170. ".overflow-x-auto": {
  2171. "overflow-x": "auto"
  2172. },
  2173. ".overflow-y-auto": {
  2174. "overflow-y": "auto"
  2175. },
  2176. ".overflow-x-hidden": {
  2177. "overflow-x": "hidden"
  2178. },
  2179. ".overflow-y-hidden": {
  2180. "overflow-y": "hidden"
  2181. },
  2182. ".overflow-x-clip": {
  2183. "overflow-x": "clip"
  2184. },
  2185. ".overflow-y-clip": {
  2186. "overflow-y": "clip"
  2187. },
  2188. ".overflow-x-visible": {
  2189. "overflow-x": "visible"
  2190. },
  2191. ".overflow-y-visible": {
  2192. "overflow-y": "visible"
  2193. },
  2194. ".overflow-x-scroll": {
  2195. "overflow-x": "scroll"
  2196. },
  2197. ".overflow-y-scroll": {
  2198. "overflow-y": "scroll"
  2199. }
  2200. });
  2201. },
  2202. overscrollBehavior: ({ addUtilities })=>{
  2203. addUtilities({
  2204. ".overscroll-auto": {
  2205. "overscroll-behavior": "auto"
  2206. },
  2207. ".overscroll-contain": {
  2208. "overscroll-behavior": "contain"
  2209. },
  2210. ".overscroll-none": {
  2211. "overscroll-behavior": "none"
  2212. },
  2213. ".overscroll-y-auto": {
  2214. "overscroll-behavior-y": "auto"
  2215. },
  2216. ".overscroll-y-contain": {
  2217. "overscroll-behavior-y": "contain"
  2218. },
  2219. ".overscroll-y-none": {
  2220. "overscroll-behavior-y": "none"
  2221. },
  2222. ".overscroll-x-auto": {
  2223. "overscroll-behavior-x": "auto"
  2224. },
  2225. ".overscroll-x-contain": {
  2226. "overscroll-behavior-x": "contain"
  2227. },
  2228. ".overscroll-x-none": {
  2229. "overscroll-behavior-x": "none"
  2230. }
  2231. });
  2232. },
  2233. scrollBehavior: ({ addUtilities })=>{
  2234. addUtilities({
  2235. ".scroll-auto": {
  2236. "scroll-behavior": "auto"
  2237. },
  2238. ".scroll-smooth": {
  2239. "scroll-behavior": "smooth"
  2240. }
  2241. });
  2242. },
  2243. textOverflow: ({ addUtilities })=>{
  2244. addUtilities({
  2245. ".truncate": {
  2246. overflow: "hidden",
  2247. "text-overflow": "ellipsis",
  2248. "white-space": "nowrap"
  2249. },
  2250. ".overflow-ellipsis": {
  2251. "text-overflow": "ellipsis"
  2252. },
  2253. ".text-ellipsis": {
  2254. "text-overflow": "ellipsis"
  2255. },
  2256. ".text-clip": {
  2257. "text-overflow": "clip"
  2258. }
  2259. });
  2260. },
  2261. hyphens: ({ addUtilities })=>{
  2262. addUtilities({
  2263. ".hyphens-none": {
  2264. hyphens: "none"
  2265. },
  2266. ".hyphens-manual": {
  2267. hyphens: "manual"
  2268. },
  2269. ".hyphens-auto": {
  2270. hyphens: "auto"
  2271. }
  2272. });
  2273. },
  2274. whitespace: ({ addUtilities })=>{
  2275. addUtilities({
  2276. ".whitespace-normal": {
  2277. "white-space": "normal"
  2278. },
  2279. ".whitespace-nowrap": {
  2280. "white-space": "nowrap"
  2281. },
  2282. ".whitespace-pre": {
  2283. "white-space": "pre"
  2284. },
  2285. ".whitespace-pre-line": {
  2286. "white-space": "pre-line"
  2287. },
  2288. ".whitespace-pre-wrap": {
  2289. "white-space": "pre-wrap"
  2290. },
  2291. ".whitespace-break-spaces": {
  2292. "white-space": "break-spaces"
  2293. }
  2294. });
  2295. },
  2296. wordBreak: ({ addUtilities })=>{
  2297. addUtilities({
  2298. ".break-normal": {
  2299. "overflow-wrap": "normal",
  2300. "word-break": "normal"
  2301. },
  2302. ".break-words": {
  2303. "overflow-wrap": "break-word"
  2304. },
  2305. ".break-all": {
  2306. "word-break": "break-all"
  2307. },
  2308. ".break-keep": {
  2309. "word-break": "keep-all"
  2310. }
  2311. });
  2312. },
  2313. borderRadius: (0, _createUtilityPlugin.default)("borderRadius", [
  2314. [
  2315. "rounded",
  2316. [
  2317. "border-radius"
  2318. ]
  2319. ],
  2320. [
  2321. [
  2322. "rounded-s",
  2323. [
  2324. "border-start-start-radius",
  2325. "border-end-start-radius"
  2326. ]
  2327. ],
  2328. [
  2329. "rounded-e",
  2330. [
  2331. "border-start-end-radius",
  2332. "border-end-end-radius"
  2333. ]
  2334. ],
  2335. [
  2336. "rounded-t",
  2337. [
  2338. "border-top-left-radius",
  2339. "border-top-right-radius"
  2340. ]
  2341. ],
  2342. [
  2343. "rounded-r",
  2344. [
  2345. "border-top-right-radius",
  2346. "border-bottom-right-radius"
  2347. ]
  2348. ],
  2349. [
  2350. "rounded-b",
  2351. [
  2352. "border-bottom-right-radius",
  2353. "border-bottom-left-radius"
  2354. ]
  2355. ],
  2356. [
  2357. "rounded-l",
  2358. [
  2359. "border-top-left-radius",
  2360. "border-bottom-left-radius"
  2361. ]
  2362. ]
  2363. ],
  2364. [
  2365. [
  2366. "rounded-ss",
  2367. [
  2368. "border-start-start-radius"
  2369. ]
  2370. ],
  2371. [
  2372. "rounded-se",
  2373. [
  2374. "border-start-end-radius"
  2375. ]
  2376. ],
  2377. [
  2378. "rounded-ee",
  2379. [
  2380. "border-end-end-radius"
  2381. ]
  2382. ],
  2383. [
  2384. "rounded-es",
  2385. [
  2386. "border-end-start-radius"
  2387. ]
  2388. ],
  2389. [
  2390. "rounded-tl",
  2391. [
  2392. "border-top-left-radius"
  2393. ]
  2394. ],
  2395. [
  2396. "rounded-tr",
  2397. [
  2398. "border-top-right-radius"
  2399. ]
  2400. ],
  2401. [
  2402. "rounded-br",
  2403. [
  2404. "border-bottom-right-radius"
  2405. ]
  2406. ],
  2407. [
  2408. "rounded-bl",
  2409. [
  2410. "border-bottom-left-radius"
  2411. ]
  2412. ]
  2413. ]
  2414. ]),
  2415. borderWidth: (0, _createUtilityPlugin.default)("borderWidth", [
  2416. [
  2417. "border",
  2418. [
  2419. [
  2420. "@defaults border-width",
  2421. {}
  2422. ],
  2423. "border-width"
  2424. ]
  2425. ],
  2426. [
  2427. [
  2428. "border-x",
  2429. [
  2430. [
  2431. "@defaults border-width",
  2432. {}
  2433. ],
  2434. "border-left-width",
  2435. "border-right-width"
  2436. ]
  2437. ],
  2438. [
  2439. "border-y",
  2440. [
  2441. [
  2442. "@defaults border-width",
  2443. {}
  2444. ],
  2445. "border-top-width",
  2446. "border-bottom-width"
  2447. ]
  2448. ]
  2449. ],
  2450. [
  2451. [
  2452. "border-s",
  2453. [
  2454. [
  2455. "@defaults border-width",
  2456. {}
  2457. ],
  2458. "border-inline-start-width"
  2459. ]
  2460. ],
  2461. [
  2462. "border-e",
  2463. [
  2464. [
  2465. "@defaults border-width",
  2466. {}
  2467. ],
  2468. "border-inline-end-width"
  2469. ]
  2470. ],
  2471. [
  2472. "border-t",
  2473. [
  2474. [
  2475. "@defaults border-width",
  2476. {}
  2477. ],
  2478. "border-top-width"
  2479. ]
  2480. ],
  2481. [
  2482. "border-r",
  2483. [
  2484. [
  2485. "@defaults border-width",
  2486. {}
  2487. ],
  2488. "border-right-width"
  2489. ]
  2490. ],
  2491. [
  2492. "border-b",
  2493. [
  2494. [
  2495. "@defaults border-width",
  2496. {}
  2497. ],
  2498. "border-bottom-width"
  2499. ]
  2500. ],
  2501. [
  2502. "border-l",
  2503. [
  2504. [
  2505. "@defaults border-width",
  2506. {}
  2507. ],
  2508. "border-left-width"
  2509. ]
  2510. ]
  2511. ]
  2512. ], {
  2513. type: [
  2514. "line-width",
  2515. "length"
  2516. ]
  2517. }),
  2518. borderStyle: ({ addUtilities })=>{
  2519. addUtilities({
  2520. ".border-solid": {
  2521. "border-style": "solid"
  2522. },
  2523. ".border-dashed": {
  2524. "border-style": "dashed"
  2525. },
  2526. ".border-dotted": {
  2527. "border-style": "dotted"
  2528. },
  2529. ".border-double": {
  2530. "border-style": "double"
  2531. },
  2532. ".border-hidden": {
  2533. "border-style": "hidden"
  2534. },
  2535. ".border-none": {
  2536. "border-style": "none"
  2537. }
  2538. });
  2539. },
  2540. borderColor: ({ matchUtilities , theme , corePlugins })=>{
  2541. matchUtilities({
  2542. border: (value)=>{
  2543. if (!corePlugins("borderOpacity")) {
  2544. return {
  2545. "border-color": (0, _toColorValue.default)(value)
  2546. };
  2547. }
  2548. return (0, _withAlphaVariable.default)({
  2549. color: value,
  2550. property: "border-color",
  2551. variable: "--tw-border-opacity"
  2552. });
  2553. }
  2554. }, {
  2555. values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))),
  2556. type: [
  2557. "color",
  2558. "any"
  2559. ]
  2560. });
  2561. matchUtilities({
  2562. "border-x": (value)=>{
  2563. if (!corePlugins("borderOpacity")) {
  2564. return {
  2565. "border-left-color": (0, _toColorValue.default)(value),
  2566. "border-right-color": (0, _toColorValue.default)(value)
  2567. };
  2568. }
  2569. return (0, _withAlphaVariable.default)({
  2570. color: value,
  2571. property: [
  2572. "border-left-color",
  2573. "border-right-color"
  2574. ],
  2575. variable: "--tw-border-opacity"
  2576. });
  2577. },
  2578. "border-y": (value)=>{
  2579. if (!corePlugins("borderOpacity")) {
  2580. return {
  2581. "border-top-color": (0, _toColorValue.default)(value),
  2582. "border-bottom-color": (0, _toColorValue.default)(value)
  2583. };
  2584. }
  2585. return (0, _withAlphaVariable.default)({
  2586. color: value,
  2587. property: [
  2588. "border-top-color",
  2589. "border-bottom-color"
  2590. ],
  2591. variable: "--tw-border-opacity"
  2592. });
  2593. }
  2594. }, {
  2595. values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))),
  2596. type: [
  2597. "color",
  2598. "any"
  2599. ]
  2600. });
  2601. matchUtilities({
  2602. "border-s": (value)=>{
  2603. if (!corePlugins("borderOpacity")) {
  2604. return {
  2605. "border-inline-start-color": (0, _toColorValue.default)(value)
  2606. };
  2607. }
  2608. return (0, _withAlphaVariable.default)({
  2609. color: value,
  2610. property: "border-inline-start-color",
  2611. variable: "--tw-border-opacity"
  2612. });
  2613. },
  2614. "border-e": (value)=>{
  2615. if (!corePlugins("borderOpacity")) {
  2616. return {
  2617. "border-inline-end-color": (0, _toColorValue.default)(value)
  2618. };
  2619. }
  2620. return (0, _withAlphaVariable.default)({
  2621. color: value,
  2622. property: "border-inline-end-color",
  2623. variable: "--tw-border-opacity"
  2624. });
  2625. },
  2626. "border-t": (value)=>{
  2627. if (!corePlugins("borderOpacity")) {
  2628. return {
  2629. "border-top-color": (0, _toColorValue.default)(value)
  2630. };
  2631. }
  2632. return (0, _withAlphaVariable.default)({
  2633. color: value,
  2634. property: "border-top-color",
  2635. variable: "--tw-border-opacity"
  2636. });
  2637. },
  2638. "border-r": (value)=>{
  2639. if (!corePlugins("borderOpacity")) {
  2640. return {
  2641. "border-right-color": (0, _toColorValue.default)(value)
  2642. };
  2643. }
  2644. return (0, _withAlphaVariable.default)({
  2645. color: value,
  2646. property: "border-right-color",
  2647. variable: "--tw-border-opacity"
  2648. });
  2649. },
  2650. "border-b": (value)=>{
  2651. if (!corePlugins("borderOpacity")) {
  2652. return {
  2653. "border-bottom-color": (0, _toColorValue.default)(value)
  2654. };
  2655. }
  2656. return (0, _withAlphaVariable.default)({
  2657. color: value,
  2658. property: "border-bottom-color",
  2659. variable: "--tw-border-opacity"
  2660. });
  2661. },
  2662. "border-l": (value)=>{
  2663. if (!corePlugins("borderOpacity")) {
  2664. return {
  2665. "border-left-color": (0, _toColorValue.default)(value)
  2666. };
  2667. }
  2668. return (0, _withAlphaVariable.default)({
  2669. color: value,
  2670. property: "border-left-color",
  2671. variable: "--tw-border-opacity"
  2672. });
  2673. }
  2674. }, {
  2675. values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))),
  2676. type: [
  2677. "color",
  2678. "any"
  2679. ]
  2680. });
  2681. },
  2682. borderOpacity: (0, _createUtilityPlugin.default)("borderOpacity", [
  2683. [
  2684. "border-opacity",
  2685. [
  2686. "--tw-border-opacity"
  2687. ]
  2688. ]
  2689. ]),
  2690. backgroundColor: ({ matchUtilities , theme , corePlugins })=>{
  2691. matchUtilities({
  2692. bg: (value)=>{
  2693. if (!corePlugins("backgroundOpacity")) {
  2694. return {
  2695. "background-color": (0, _toColorValue.default)(value)
  2696. };
  2697. }
  2698. return (0, _withAlphaVariable.default)({
  2699. color: value,
  2700. property: "background-color",
  2701. variable: "--tw-bg-opacity"
  2702. });
  2703. }
  2704. }, {
  2705. values: (0, _flattenColorPalette.default)(theme("backgroundColor")),
  2706. type: [
  2707. "color",
  2708. "any"
  2709. ]
  2710. });
  2711. },
  2712. backgroundOpacity: (0, _createUtilityPlugin.default)("backgroundOpacity", [
  2713. [
  2714. "bg-opacity",
  2715. [
  2716. "--tw-bg-opacity"
  2717. ]
  2718. ]
  2719. ]),
  2720. backgroundImage: (0, _createUtilityPlugin.default)("backgroundImage", [
  2721. [
  2722. "bg",
  2723. [
  2724. "background-image"
  2725. ]
  2726. ]
  2727. ], {
  2728. type: [
  2729. "lookup",
  2730. "image",
  2731. "url"
  2732. ]
  2733. }),
  2734. gradientColorStops: (()=>{
  2735. function transparentTo(value) {
  2736. return (0, _withAlphaVariable.withAlphaValue)(value, 0, "rgb(255 255 255 / 0)");
  2737. }
  2738. return function({ matchUtilities , theme , addDefaults }) {
  2739. addDefaults("gradient-color-stops", {
  2740. "--tw-gradient-from-position": " ",
  2741. "--tw-gradient-via-position": " ",
  2742. "--tw-gradient-to-position": " "
  2743. });
  2744. let options = {
  2745. values: (0, _flattenColorPalette.default)(theme("gradientColorStops")),
  2746. type: [
  2747. "color",
  2748. "any"
  2749. ]
  2750. };
  2751. let positionOptions = {
  2752. values: theme("gradientColorStopPositions"),
  2753. type: [
  2754. "length",
  2755. "percentage"
  2756. ]
  2757. };
  2758. matchUtilities({
  2759. from: (value)=>{
  2760. let transparentToValue = transparentTo(value);
  2761. return {
  2762. "@defaults gradient-color-stops": {},
  2763. "--tw-gradient-from": `${(0, _toColorValue.default)(value)} var(--tw-gradient-from-position)`,
  2764. "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
  2765. "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)`
  2766. };
  2767. }
  2768. }, options);
  2769. matchUtilities({
  2770. from: (value)=>{
  2771. return {
  2772. "--tw-gradient-from-position": value
  2773. };
  2774. }
  2775. }, positionOptions);
  2776. matchUtilities({
  2777. via: (value)=>{
  2778. let transparentToValue = transparentTo(value);
  2779. return {
  2780. "@defaults gradient-color-stops": {},
  2781. "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
  2782. "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value)} var(--tw-gradient-via-position), var(--tw-gradient-to)`
  2783. };
  2784. }
  2785. }, options);
  2786. matchUtilities({
  2787. via: (value)=>{
  2788. return {
  2789. "--tw-gradient-via-position": value
  2790. };
  2791. }
  2792. }, positionOptions);
  2793. matchUtilities({
  2794. to: (value)=>({
  2795. "@defaults gradient-color-stops": {},
  2796. "--tw-gradient-to": `${(0, _toColorValue.default)(value)} var(--tw-gradient-to-position)`
  2797. })
  2798. }, options);
  2799. matchUtilities({
  2800. to: (value)=>{
  2801. return {
  2802. "--tw-gradient-to-position": value
  2803. };
  2804. }
  2805. }, positionOptions);
  2806. };
  2807. })(),
  2808. boxDecorationBreak: ({ addUtilities })=>{
  2809. addUtilities({
  2810. ".decoration-slice": {
  2811. "box-decoration-break": "slice"
  2812. },
  2813. ".decoration-clone": {
  2814. "box-decoration-break": "clone"
  2815. },
  2816. ".box-decoration-slice": {
  2817. "box-decoration-break": "slice"
  2818. },
  2819. ".box-decoration-clone": {
  2820. "box-decoration-break": "clone"
  2821. }
  2822. });
  2823. },
  2824. backgroundSize: (0, _createUtilityPlugin.default)("backgroundSize", [
  2825. [
  2826. "bg",
  2827. [
  2828. "background-size"
  2829. ]
  2830. ]
  2831. ], {
  2832. type: [
  2833. "lookup",
  2834. "length",
  2835. "percentage",
  2836. "size"
  2837. ]
  2838. }),
  2839. backgroundAttachment: ({ addUtilities })=>{
  2840. addUtilities({
  2841. ".bg-fixed": {
  2842. "background-attachment": "fixed"
  2843. },
  2844. ".bg-local": {
  2845. "background-attachment": "local"
  2846. },
  2847. ".bg-scroll": {
  2848. "background-attachment": "scroll"
  2849. }
  2850. });
  2851. },
  2852. backgroundClip: ({ addUtilities })=>{
  2853. addUtilities({
  2854. ".bg-clip-border": {
  2855. "background-clip": "border-box"
  2856. },
  2857. ".bg-clip-padding": {
  2858. "background-clip": "padding-box"
  2859. },
  2860. ".bg-clip-content": {
  2861. "background-clip": "content-box"
  2862. },
  2863. ".bg-clip-text": {
  2864. "background-clip": "text"
  2865. }
  2866. });
  2867. },
  2868. backgroundPosition: (0, _createUtilityPlugin.default)("backgroundPosition", [
  2869. [
  2870. "bg",
  2871. [
  2872. "background-position"
  2873. ]
  2874. ]
  2875. ], {
  2876. type: [
  2877. "lookup",
  2878. [
  2879. "position",
  2880. {
  2881. preferOnConflict: true
  2882. }
  2883. ]
  2884. ]
  2885. }),
  2886. backgroundRepeat: ({ addUtilities })=>{
  2887. addUtilities({
  2888. ".bg-repeat": {
  2889. "background-repeat": "repeat"
  2890. },
  2891. ".bg-no-repeat": {
  2892. "background-repeat": "no-repeat"
  2893. },
  2894. ".bg-repeat-x": {
  2895. "background-repeat": "repeat-x"
  2896. },
  2897. ".bg-repeat-y": {
  2898. "background-repeat": "repeat-y"
  2899. },
  2900. ".bg-repeat-round": {
  2901. "background-repeat": "round"
  2902. },
  2903. ".bg-repeat-space": {
  2904. "background-repeat": "space"
  2905. }
  2906. });
  2907. },
  2908. backgroundOrigin: ({ addUtilities })=>{
  2909. addUtilities({
  2910. ".bg-origin-border": {
  2911. "background-origin": "border-box"
  2912. },
  2913. ".bg-origin-padding": {
  2914. "background-origin": "padding-box"
  2915. },
  2916. ".bg-origin-content": {
  2917. "background-origin": "content-box"
  2918. }
  2919. });
  2920. },
  2921. fill: ({ matchUtilities , theme })=>{
  2922. matchUtilities({
  2923. fill: (value)=>{
  2924. return {
  2925. fill: (0, _toColorValue.default)(value)
  2926. };
  2927. }
  2928. }, {
  2929. values: (0, _flattenColorPalette.default)(theme("fill")),
  2930. type: [
  2931. "color",
  2932. "any"
  2933. ]
  2934. });
  2935. },
  2936. stroke: ({ matchUtilities , theme })=>{
  2937. matchUtilities({
  2938. stroke: (value)=>{
  2939. return {
  2940. stroke: (0, _toColorValue.default)(value)
  2941. };
  2942. }
  2943. }, {
  2944. values: (0, _flattenColorPalette.default)(theme("stroke")),
  2945. type: [
  2946. "color",
  2947. "url",
  2948. "any"
  2949. ]
  2950. });
  2951. },
  2952. strokeWidth: (0, _createUtilityPlugin.default)("strokeWidth", [
  2953. [
  2954. "stroke",
  2955. [
  2956. "stroke-width"
  2957. ]
  2958. ]
  2959. ], {
  2960. type: [
  2961. "length",
  2962. "number",
  2963. "percentage"
  2964. ]
  2965. }),
  2966. objectFit: ({ addUtilities })=>{
  2967. addUtilities({
  2968. ".object-contain": {
  2969. "object-fit": "contain"
  2970. },
  2971. ".object-cover": {
  2972. "object-fit": "cover"
  2973. },
  2974. ".object-fill": {
  2975. "object-fit": "fill"
  2976. },
  2977. ".object-none": {
  2978. "object-fit": "none"
  2979. },
  2980. ".object-scale-down": {
  2981. "object-fit": "scale-down"
  2982. }
  2983. });
  2984. },
  2985. objectPosition: (0, _createUtilityPlugin.default)("objectPosition", [
  2986. [
  2987. "object",
  2988. [
  2989. "object-position"
  2990. ]
  2991. ]
  2992. ]),
  2993. padding: (0, _createUtilityPlugin.default)("padding", [
  2994. [
  2995. "p",
  2996. [
  2997. "padding"
  2998. ]
  2999. ],
  3000. [
  3001. [
  3002. "px",
  3003. [
  3004. "padding-left",
  3005. "padding-right"
  3006. ]
  3007. ],
  3008. [
  3009. "py",
  3010. [
  3011. "padding-top",
  3012. "padding-bottom"
  3013. ]
  3014. ]
  3015. ],
  3016. [
  3017. [
  3018. "ps",
  3019. [
  3020. "padding-inline-start"
  3021. ]
  3022. ],
  3023. [
  3024. "pe",
  3025. [
  3026. "padding-inline-end"
  3027. ]
  3028. ],
  3029. [
  3030. "pt",
  3031. [
  3032. "padding-top"
  3033. ]
  3034. ],
  3035. [
  3036. "pr",
  3037. [
  3038. "padding-right"
  3039. ]
  3040. ],
  3041. [
  3042. "pb",
  3043. [
  3044. "padding-bottom"
  3045. ]
  3046. ],
  3047. [
  3048. "pl",
  3049. [
  3050. "padding-left"
  3051. ]
  3052. ]
  3053. ]
  3054. ]),
  3055. textAlign: ({ addUtilities })=>{
  3056. addUtilities({
  3057. ".text-left": {
  3058. "text-align": "left"
  3059. },
  3060. ".text-center": {
  3061. "text-align": "center"
  3062. },
  3063. ".text-right": {
  3064. "text-align": "right"
  3065. },
  3066. ".text-justify": {
  3067. "text-align": "justify"
  3068. },
  3069. ".text-start": {
  3070. "text-align": "start"
  3071. },
  3072. ".text-end": {
  3073. "text-align": "end"
  3074. }
  3075. });
  3076. },
  3077. textIndent: (0, _createUtilityPlugin.default)("textIndent", [
  3078. [
  3079. "indent",
  3080. [
  3081. "text-indent"
  3082. ]
  3083. ]
  3084. ], {
  3085. supportsNegativeValues: true
  3086. }),
  3087. verticalAlign: ({ addUtilities , matchUtilities })=>{
  3088. addUtilities({
  3089. ".align-baseline": {
  3090. "vertical-align": "baseline"
  3091. },
  3092. ".align-top": {
  3093. "vertical-align": "top"
  3094. },
  3095. ".align-middle": {
  3096. "vertical-align": "middle"
  3097. },
  3098. ".align-bottom": {
  3099. "vertical-align": "bottom"
  3100. },
  3101. ".align-text-top": {
  3102. "vertical-align": "text-top"
  3103. },
  3104. ".align-text-bottom": {
  3105. "vertical-align": "text-bottom"
  3106. },
  3107. ".align-sub": {
  3108. "vertical-align": "sub"
  3109. },
  3110. ".align-super": {
  3111. "vertical-align": "super"
  3112. }
  3113. });
  3114. matchUtilities({
  3115. align: (value)=>({
  3116. "vertical-align": value
  3117. })
  3118. });
  3119. },
  3120. fontFamily: ({ matchUtilities , theme })=>{
  3121. matchUtilities({
  3122. font: (value)=>{
  3123. let [families, options = {}] = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value : [
  3124. value
  3125. ];
  3126. let { fontFeatureSettings , fontVariationSettings } = options;
  3127. return {
  3128. "font-family": Array.isArray(families) ? families.join(", ") : families,
  3129. ...fontFeatureSettings === undefined ? {} : {
  3130. "font-feature-settings": fontFeatureSettings
  3131. },
  3132. ...fontVariationSettings === undefined ? {} : {
  3133. "font-variation-settings": fontVariationSettings
  3134. }
  3135. };
  3136. }
  3137. }, {
  3138. values: theme("fontFamily"),
  3139. type: [
  3140. "lookup",
  3141. "generic-name",
  3142. "family-name"
  3143. ]
  3144. });
  3145. },
  3146. fontSize: ({ matchUtilities , theme })=>{
  3147. matchUtilities({
  3148. text: (value, { modifier })=>{
  3149. let [fontSize, options] = Array.isArray(value) ? value : [
  3150. value
  3151. ];
  3152. if (modifier) {
  3153. return {
  3154. "font-size": fontSize,
  3155. "line-height": modifier
  3156. };
  3157. }
  3158. let { lineHeight , letterSpacing , fontWeight } = (0, _isPlainObject.default)(options) ? options : {
  3159. lineHeight: options
  3160. };
  3161. return {
  3162. "font-size": fontSize,
  3163. ...lineHeight === undefined ? {} : {
  3164. "line-height": lineHeight
  3165. },
  3166. ...letterSpacing === undefined ? {} : {
  3167. "letter-spacing": letterSpacing
  3168. },
  3169. ...fontWeight === undefined ? {} : {
  3170. "font-weight": fontWeight
  3171. }
  3172. };
  3173. }
  3174. }, {
  3175. values: theme("fontSize"),
  3176. modifiers: theme("lineHeight"),
  3177. type: [
  3178. "absolute-size",
  3179. "relative-size",
  3180. "length",
  3181. "percentage"
  3182. ]
  3183. });
  3184. },
  3185. fontWeight: (0, _createUtilityPlugin.default)("fontWeight", [
  3186. [
  3187. "font",
  3188. [
  3189. "fontWeight"
  3190. ]
  3191. ]
  3192. ], {
  3193. type: [
  3194. "lookup",
  3195. "number",
  3196. "any"
  3197. ]
  3198. }),
  3199. textTransform: ({ addUtilities })=>{
  3200. addUtilities({
  3201. ".uppercase": {
  3202. "text-transform": "uppercase"
  3203. },
  3204. ".lowercase": {
  3205. "text-transform": "lowercase"
  3206. },
  3207. ".capitalize": {
  3208. "text-transform": "capitalize"
  3209. },
  3210. ".normal-case": {
  3211. "text-transform": "none"
  3212. }
  3213. });
  3214. },
  3215. fontStyle: ({ addUtilities })=>{
  3216. addUtilities({
  3217. ".italic": {
  3218. "font-style": "italic"
  3219. },
  3220. ".not-italic": {
  3221. "font-style": "normal"
  3222. }
  3223. });
  3224. },
  3225. fontVariantNumeric: ({ addDefaults , addUtilities })=>{
  3226. let cssFontVariantNumericValue = "var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)";
  3227. addDefaults("font-variant-numeric", {
  3228. "--tw-ordinal": " ",
  3229. "--tw-slashed-zero": " ",
  3230. "--tw-numeric-figure": " ",
  3231. "--tw-numeric-spacing": " ",
  3232. "--tw-numeric-fraction": " "
  3233. });
  3234. addUtilities({
  3235. ".normal-nums": {
  3236. "font-variant-numeric": "normal"
  3237. },
  3238. ".ordinal": {
  3239. "@defaults font-variant-numeric": {},
  3240. "--tw-ordinal": "ordinal",
  3241. "font-variant-numeric": cssFontVariantNumericValue
  3242. },
  3243. ".slashed-zero": {
  3244. "@defaults font-variant-numeric": {},
  3245. "--tw-slashed-zero": "slashed-zero",
  3246. "font-variant-numeric": cssFontVariantNumericValue
  3247. },
  3248. ".lining-nums": {
  3249. "@defaults font-variant-numeric": {},
  3250. "--tw-numeric-figure": "lining-nums",
  3251. "font-variant-numeric": cssFontVariantNumericValue
  3252. },
  3253. ".oldstyle-nums": {
  3254. "@defaults font-variant-numeric": {},
  3255. "--tw-numeric-figure": "oldstyle-nums",
  3256. "font-variant-numeric": cssFontVariantNumericValue
  3257. },
  3258. ".proportional-nums": {
  3259. "@defaults font-variant-numeric": {},
  3260. "--tw-numeric-spacing": "proportional-nums",
  3261. "font-variant-numeric": cssFontVariantNumericValue
  3262. },
  3263. ".tabular-nums": {
  3264. "@defaults font-variant-numeric": {},
  3265. "--tw-numeric-spacing": "tabular-nums",
  3266. "font-variant-numeric": cssFontVariantNumericValue
  3267. },
  3268. ".diagonal-fractions": {
  3269. "@defaults font-variant-numeric": {},
  3270. "--tw-numeric-fraction": "diagonal-fractions",
  3271. "font-variant-numeric": cssFontVariantNumericValue
  3272. },
  3273. ".stacked-fractions": {
  3274. "@defaults font-variant-numeric": {},
  3275. "--tw-numeric-fraction": "stacked-fractions",
  3276. "font-variant-numeric": cssFontVariantNumericValue
  3277. }
  3278. });
  3279. },
  3280. lineHeight: (0, _createUtilityPlugin.default)("lineHeight", [
  3281. [
  3282. "leading",
  3283. [
  3284. "lineHeight"
  3285. ]
  3286. ]
  3287. ]),
  3288. letterSpacing: (0, _createUtilityPlugin.default)("letterSpacing", [
  3289. [
  3290. "tracking",
  3291. [
  3292. "letterSpacing"
  3293. ]
  3294. ]
  3295. ], {
  3296. supportsNegativeValues: true
  3297. }),
  3298. textColor: ({ matchUtilities , theme , corePlugins })=>{
  3299. matchUtilities({
  3300. text: (value)=>{
  3301. if (!corePlugins("textOpacity")) {
  3302. return {
  3303. color: (0, _toColorValue.default)(value)
  3304. };
  3305. }
  3306. return (0, _withAlphaVariable.default)({
  3307. color: value,
  3308. property: "color",
  3309. variable: "--tw-text-opacity"
  3310. });
  3311. }
  3312. }, {
  3313. values: (0, _flattenColorPalette.default)(theme("textColor")),
  3314. type: [
  3315. "color",
  3316. "any"
  3317. ]
  3318. });
  3319. },
  3320. textOpacity: (0, _createUtilityPlugin.default)("textOpacity", [
  3321. [
  3322. "text-opacity",
  3323. [
  3324. "--tw-text-opacity"
  3325. ]
  3326. ]
  3327. ]),
  3328. textDecoration: ({ addUtilities })=>{
  3329. addUtilities({
  3330. ".underline": {
  3331. "text-decoration-line": "underline"
  3332. },
  3333. ".overline": {
  3334. "text-decoration-line": "overline"
  3335. },
  3336. ".line-through": {
  3337. "text-decoration-line": "line-through"
  3338. },
  3339. ".no-underline": {
  3340. "text-decoration-line": "none"
  3341. }
  3342. });
  3343. },
  3344. textDecorationColor: ({ matchUtilities , theme })=>{
  3345. matchUtilities({
  3346. decoration: (value)=>{
  3347. return {
  3348. "text-decoration-color": (0, _toColorValue.default)(value)
  3349. };
  3350. }
  3351. }, {
  3352. values: (0, _flattenColorPalette.default)(theme("textDecorationColor")),
  3353. type: [
  3354. "color",
  3355. "any"
  3356. ]
  3357. });
  3358. },
  3359. textDecorationStyle: ({ addUtilities })=>{
  3360. addUtilities({
  3361. ".decoration-solid": {
  3362. "text-decoration-style": "solid"
  3363. },
  3364. ".decoration-double": {
  3365. "text-decoration-style": "double"
  3366. },
  3367. ".decoration-dotted": {
  3368. "text-decoration-style": "dotted"
  3369. },
  3370. ".decoration-dashed": {
  3371. "text-decoration-style": "dashed"
  3372. },
  3373. ".decoration-wavy": {
  3374. "text-decoration-style": "wavy"
  3375. }
  3376. });
  3377. },
  3378. textDecorationThickness: (0, _createUtilityPlugin.default)("textDecorationThickness", [
  3379. [
  3380. "decoration",
  3381. [
  3382. "text-decoration-thickness"
  3383. ]
  3384. ]
  3385. ], {
  3386. type: [
  3387. "length",
  3388. "percentage"
  3389. ]
  3390. }),
  3391. textUnderlineOffset: (0, _createUtilityPlugin.default)("textUnderlineOffset", [
  3392. [
  3393. "underline-offset",
  3394. [
  3395. "text-underline-offset"
  3396. ]
  3397. ]
  3398. ], {
  3399. type: [
  3400. "length",
  3401. "percentage",
  3402. "any"
  3403. ]
  3404. }),
  3405. fontSmoothing: ({ addUtilities })=>{
  3406. addUtilities({
  3407. ".antialiased": {
  3408. "-webkit-font-smoothing": "antialiased",
  3409. "-moz-osx-font-smoothing": "grayscale"
  3410. },
  3411. ".subpixel-antialiased": {
  3412. "-webkit-font-smoothing": "auto",
  3413. "-moz-osx-font-smoothing": "auto"
  3414. }
  3415. });
  3416. },
  3417. placeholderColor: ({ matchUtilities , theme , corePlugins })=>{
  3418. matchUtilities({
  3419. placeholder: (value)=>{
  3420. if (!corePlugins("placeholderOpacity")) {
  3421. return {
  3422. "&::placeholder": {
  3423. color: (0, _toColorValue.default)(value)
  3424. }
  3425. };
  3426. }
  3427. return {
  3428. "&::placeholder": (0, _withAlphaVariable.default)({
  3429. color: value,
  3430. property: "color",
  3431. variable: "--tw-placeholder-opacity"
  3432. })
  3433. };
  3434. }
  3435. }, {
  3436. values: (0, _flattenColorPalette.default)(theme("placeholderColor")),
  3437. type: [
  3438. "color",
  3439. "any"
  3440. ]
  3441. });
  3442. },
  3443. placeholderOpacity: ({ matchUtilities , theme })=>{
  3444. matchUtilities({
  3445. "placeholder-opacity": (value)=>{
  3446. return {
  3447. ["&::placeholder"]: {
  3448. "--tw-placeholder-opacity": value
  3449. }
  3450. };
  3451. }
  3452. }, {
  3453. values: theme("placeholderOpacity")
  3454. });
  3455. },
  3456. caretColor: ({ matchUtilities , theme })=>{
  3457. matchUtilities({
  3458. caret: (value)=>{
  3459. return {
  3460. "caret-color": (0, _toColorValue.default)(value)
  3461. };
  3462. }
  3463. }, {
  3464. values: (0, _flattenColorPalette.default)(theme("caretColor")),
  3465. type: [
  3466. "color",
  3467. "any"
  3468. ]
  3469. });
  3470. },
  3471. accentColor: ({ matchUtilities , theme })=>{
  3472. matchUtilities({
  3473. accent: (value)=>{
  3474. return {
  3475. "accent-color": (0, _toColorValue.default)(value)
  3476. };
  3477. }
  3478. }, {
  3479. values: (0, _flattenColorPalette.default)(theme("accentColor")),
  3480. type: [
  3481. "color",
  3482. "any"
  3483. ]
  3484. });
  3485. },
  3486. opacity: (0, _createUtilityPlugin.default)("opacity", [
  3487. [
  3488. "opacity",
  3489. [
  3490. "opacity"
  3491. ]
  3492. ]
  3493. ]),
  3494. backgroundBlendMode: ({ addUtilities })=>{
  3495. addUtilities({
  3496. ".bg-blend-normal": {
  3497. "background-blend-mode": "normal"
  3498. },
  3499. ".bg-blend-multiply": {
  3500. "background-blend-mode": "multiply"
  3501. },
  3502. ".bg-blend-screen": {
  3503. "background-blend-mode": "screen"
  3504. },
  3505. ".bg-blend-overlay": {
  3506. "background-blend-mode": "overlay"
  3507. },
  3508. ".bg-blend-darken": {
  3509. "background-blend-mode": "darken"
  3510. },
  3511. ".bg-blend-lighten": {
  3512. "background-blend-mode": "lighten"
  3513. },
  3514. ".bg-blend-color-dodge": {
  3515. "background-blend-mode": "color-dodge"
  3516. },
  3517. ".bg-blend-color-burn": {
  3518. "background-blend-mode": "color-burn"
  3519. },
  3520. ".bg-blend-hard-light": {
  3521. "background-blend-mode": "hard-light"
  3522. },
  3523. ".bg-blend-soft-light": {
  3524. "background-blend-mode": "soft-light"
  3525. },
  3526. ".bg-blend-difference": {
  3527. "background-blend-mode": "difference"
  3528. },
  3529. ".bg-blend-exclusion": {
  3530. "background-blend-mode": "exclusion"
  3531. },
  3532. ".bg-blend-hue": {
  3533. "background-blend-mode": "hue"
  3534. },
  3535. ".bg-blend-saturation": {
  3536. "background-blend-mode": "saturation"
  3537. },
  3538. ".bg-blend-color": {
  3539. "background-blend-mode": "color"
  3540. },
  3541. ".bg-blend-luminosity": {
  3542. "background-blend-mode": "luminosity"
  3543. }
  3544. });
  3545. },
  3546. mixBlendMode: ({ addUtilities })=>{
  3547. addUtilities({
  3548. ".mix-blend-normal": {
  3549. "mix-blend-mode": "normal"
  3550. },
  3551. ".mix-blend-multiply": {
  3552. "mix-blend-mode": "multiply"
  3553. },
  3554. ".mix-blend-screen": {
  3555. "mix-blend-mode": "screen"
  3556. },
  3557. ".mix-blend-overlay": {
  3558. "mix-blend-mode": "overlay"
  3559. },
  3560. ".mix-blend-darken": {
  3561. "mix-blend-mode": "darken"
  3562. },
  3563. ".mix-blend-lighten": {
  3564. "mix-blend-mode": "lighten"
  3565. },
  3566. ".mix-blend-color-dodge": {
  3567. "mix-blend-mode": "color-dodge"
  3568. },
  3569. ".mix-blend-color-burn": {
  3570. "mix-blend-mode": "color-burn"
  3571. },
  3572. ".mix-blend-hard-light": {
  3573. "mix-blend-mode": "hard-light"
  3574. },
  3575. ".mix-blend-soft-light": {
  3576. "mix-blend-mode": "soft-light"
  3577. },
  3578. ".mix-blend-difference": {
  3579. "mix-blend-mode": "difference"
  3580. },
  3581. ".mix-blend-exclusion": {
  3582. "mix-blend-mode": "exclusion"
  3583. },
  3584. ".mix-blend-hue": {
  3585. "mix-blend-mode": "hue"
  3586. },
  3587. ".mix-blend-saturation": {
  3588. "mix-blend-mode": "saturation"
  3589. },
  3590. ".mix-blend-color": {
  3591. "mix-blend-mode": "color"
  3592. },
  3593. ".mix-blend-luminosity": {
  3594. "mix-blend-mode": "luminosity"
  3595. },
  3596. ".mix-blend-plus-lighter": {
  3597. "mix-blend-mode": "plus-lighter"
  3598. }
  3599. });
  3600. },
  3601. boxShadow: (()=>{
  3602. let transformValue = (0, _transformThemeValue.default)("boxShadow");
  3603. let defaultBoxShadow = [
  3604. `var(--tw-ring-offset-shadow, 0 0 #0000)`,
  3605. `var(--tw-ring-shadow, 0 0 #0000)`,
  3606. `var(--tw-shadow)`
  3607. ].join(", ");
  3608. return function({ matchUtilities , addDefaults , theme }) {
  3609. addDefaults(" box-shadow", {
  3610. "--tw-ring-offset-shadow": "0 0 #0000",
  3611. "--tw-ring-shadow": "0 0 #0000",
  3612. "--tw-shadow": "0 0 #0000",
  3613. "--tw-shadow-colored": "0 0 #0000"
  3614. });
  3615. matchUtilities({
  3616. shadow: (value)=>{
  3617. value = transformValue(value);
  3618. let ast = (0, _parseBoxShadowValue.parseBoxShadowValue)(value);
  3619. for (let shadow of ast){
  3620. // Don't override color if the whole shadow is a variable
  3621. if (!shadow.valid) {
  3622. continue;
  3623. }
  3624. shadow.color = "var(--tw-shadow-color)";
  3625. }
  3626. return {
  3627. "@defaults box-shadow": {},
  3628. "--tw-shadow": value === "none" ? "0 0 #0000" : value,
  3629. "--tw-shadow-colored": value === "none" ? "0 0 #0000" : (0, _parseBoxShadowValue.formatBoxShadowValue)(ast),
  3630. "box-shadow": defaultBoxShadow
  3631. };
  3632. }
  3633. }, {
  3634. values: theme("boxShadow"),
  3635. type: [
  3636. "shadow"
  3637. ]
  3638. });
  3639. };
  3640. })(),
  3641. boxShadowColor: ({ matchUtilities , theme })=>{
  3642. matchUtilities({
  3643. shadow: (value)=>{
  3644. return {
  3645. "--tw-shadow-color": (0, _toColorValue.default)(value),
  3646. "--tw-shadow": "var(--tw-shadow-colored)"
  3647. };
  3648. }
  3649. }, {
  3650. values: (0, _flattenColorPalette.default)(theme("boxShadowColor")),
  3651. type: [
  3652. "color",
  3653. "any"
  3654. ]
  3655. });
  3656. },
  3657. outlineStyle: ({ addUtilities })=>{
  3658. addUtilities({
  3659. ".outline-none": {
  3660. outline: "2px solid transparent",
  3661. "outline-offset": "2px"
  3662. },
  3663. ".outline": {
  3664. "outline-style": "solid"
  3665. },
  3666. ".outline-dashed": {
  3667. "outline-style": "dashed"
  3668. },
  3669. ".outline-dotted": {
  3670. "outline-style": "dotted"
  3671. },
  3672. ".outline-double": {
  3673. "outline-style": "double"
  3674. }
  3675. });
  3676. },
  3677. outlineWidth: (0, _createUtilityPlugin.default)("outlineWidth", [
  3678. [
  3679. "outline",
  3680. [
  3681. "outline-width"
  3682. ]
  3683. ]
  3684. ], {
  3685. type: [
  3686. "length",
  3687. "number",
  3688. "percentage"
  3689. ]
  3690. }),
  3691. outlineOffset: (0, _createUtilityPlugin.default)("outlineOffset", [
  3692. [
  3693. "outline-offset",
  3694. [
  3695. "outline-offset"
  3696. ]
  3697. ]
  3698. ], {
  3699. type: [
  3700. "length",
  3701. "number",
  3702. "percentage",
  3703. "any"
  3704. ],
  3705. supportsNegativeValues: true
  3706. }),
  3707. outlineColor: ({ matchUtilities , theme })=>{
  3708. matchUtilities({
  3709. outline: (value)=>{
  3710. return {
  3711. "outline-color": (0, _toColorValue.default)(value)
  3712. };
  3713. }
  3714. }, {
  3715. values: (0, _flattenColorPalette.default)(theme("outlineColor")),
  3716. type: [
  3717. "color",
  3718. "any"
  3719. ]
  3720. });
  3721. },
  3722. ringWidth: ({ matchUtilities , addDefaults , addUtilities , theme , config })=>{
  3723. let ringColorDefault = (()=>{
  3724. var _theme, _theme1;
  3725. if ((0, _featureFlags.flagEnabled)(config(), "respectDefaultRingColorOpacity")) {
  3726. return theme("ringColor.DEFAULT");
  3727. }
  3728. let ringOpacityDefault = theme("ringOpacity.DEFAULT", "0.5");
  3729. if (!((_theme = theme("ringColor")) === null || _theme === void 0 ? void 0 : _theme.DEFAULT)) {
  3730. return `rgb(147 197 253 / ${ringOpacityDefault})`;
  3731. }
  3732. return (0, _withAlphaVariable.withAlphaValue)((_theme1 = theme("ringColor")) === null || _theme1 === void 0 ? void 0 : _theme1.DEFAULT, ringOpacityDefault, `rgb(147 197 253 / ${ringOpacityDefault})`);
  3733. })();
  3734. addDefaults("ring-width", {
  3735. "--tw-ring-inset": " ",
  3736. "--tw-ring-offset-width": theme("ringOffsetWidth.DEFAULT", "0px"),
  3737. "--tw-ring-offset-color": theme("ringOffsetColor.DEFAULT", "#fff"),
  3738. "--tw-ring-color": ringColorDefault,
  3739. "--tw-ring-offset-shadow": "0 0 #0000",
  3740. "--tw-ring-shadow": "0 0 #0000",
  3741. "--tw-shadow": "0 0 #0000",
  3742. "--tw-shadow-colored": "0 0 #0000"
  3743. });
  3744. matchUtilities({
  3745. ring: (value)=>{
  3746. return {
  3747. "@defaults ring-width": {},
  3748. "--tw-ring-offset-shadow": `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`,
  3749. "--tw-ring-shadow": `var(--tw-ring-inset) 0 0 0 calc(${value} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,
  3750. "box-shadow": [
  3751. `var(--tw-ring-offset-shadow)`,
  3752. `var(--tw-ring-shadow)`,
  3753. `var(--tw-shadow, 0 0 #0000)`
  3754. ].join(", ")
  3755. };
  3756. }
  3757. }, {
  3758. values: theme("ringWidth"),
  3759. type: "length"
  3760. });
  3761. addUtilities({
  3762. ".ring-inset": {
  3763. "@defaults ring-width": {},
  3764. "--tw-ring-inset": "inset"
  3765. }
  3766. });
  3767. },
  3768. ringColor: ({ matchUtilities , theme , corePlugins })=>{
  3769. matchUtilities({
  3770. ring: (value)=>{
  3771. if (!corePlugins("ringOpacity")) {
  3772. return {
  3773. "--tw-ring-color": (0, _toColorValue.default)(value)
  3774. };
  3775. }
  3776. return (0, _withAlphaVariable.default)({
  3777. color: value,
  3778. property: "--tw-ring-color",
  3779. variable: "--tw-ring-opacity"
  3780. });
  3781. }
  3782. }, {
  3783. values: Object.fromEntries(Object.entries((0, _flattenColorPalette.default)(theme("ringColor"))).filter(([modifier])=>modifier !== "DEFAULT")),
  3784. type: [
  3785. "color",
  3786. "any"
  3787. ]
  3788. });
  3789. },
  3790. ringOpacity: (helpers)=>{
  3791. let { config } = helpers;
  3792. return (0, _createUtilityPlugin.default)("ringOpacity", [
  3793. [
  3794. "ring-opacity",
  3795. [
  3796. "--tw-ring-opacity"
  3797. ]
  3798. ]
  3799. ], {
  3800. filterDefault: !(0, _featureFlags.flagEnabled)(config(), "respectDefaultRingColorOpacity")
  3801. })(helpers);
  3802. },
  3803. ringOffsetWidth: (0, _createUtilityPlugin.default)("ringOffsetWidth", [
  3804. [
  3805. "ring-offset",
  3806. [
  3807. "--tw-ring-offset-width"
  3808. ]
  3809. ]
  3810. ], {
  3811. type: "length"
  3812. }),
  3813. ringOffsetColor: ({ matchUtilities , theme })=>{
  3814. matchUtilities({
  3815. "ring-offset": (value)=>{
  3816. return {
  3817. "--tw-ring-offset-color": (0, _toColorValue.default)(value)
  3818. };
  3819. }
  3820. }, {
  3821. values: (0, _flattenColorPalette.default)(theme("ringOffsetColor")),
  3822. type: [
  3823. "color",
  3824. "any"
  3825. ]
  3826. });
  3827. },
  3828. blur: ({ matchUtilities , theme })=>{
  3829. matchUtilities({
  3830. blur: (value)=>{
  3831. return {
  3832. "--tw-blur": `blur(${value})`,
  3833. "@defaults filter": {},
  3834. filter: cssFilterValue
  3835. };
  3836. }
  3837. }, {
  3838. values: theme("blur")
  3839. });
  3840. },
  3841. brightness: ({ matchUtilities , theme })=>{
  3842. matchUtilities({
  3843. brightness: (value)=>{
  3844. return {
  3845. "--tw-brightness": `brightness(${value})`,
  3846. "@defaults filter": {},
  3847. filter: cssFilterValue
  3848. };
  3849. }
  3850. }, {
  3851. values: theme("brightness")
  3852. });
  3853. },
  3854. contrast: ({ matchUtilities , theme })=>{
  3855. matchUtilities({
  3856. contrast: (value)=>{
  3857. return {
  3858. "--tw-contrast": `contrast(${value})`,
  3859. "@defaults filter": {},
  3860. filter: cssFilterValue
  3861. };
  3862. }
  3863. }, {
  3864. values: theme("contrast")
  3865. });
  3866. },
  3867. dropShadow: ({ matchUtilities , theme })=>{
  3868. matchUtilities({
  3869. "drop-shadow": (value)=>{
  3870. return {
  3871. "--tw-drop-shadow": Array.isArray(value) ? value.map((v)=>`drop-shadow(${v})`).join(" ") : `drop-shadow(${value})`,
  3872. "@defaults filter": {},
  3873. filter: cssFilterValue
  3874. };
  3875. }
  3876. }, {
  3877. values: theme("dropShadow")
  3878. });
  3879. },
  3880. grayscale: ({ matchUtilities , theme })=>{
  3881. matchUtilities({
  3882. grayscale: (value)=>{
  3883. return {
  3884. "--tw-grayscale": `grayscale(${value})`,
  3885. "@defaults filter": {},
  3886. filter: cssFilterValue
  3887. };
  3888. }
  3889. }, {
  3890. values: theme("grayscale")
  3891. });
  3892. },
  3893. hueRotate: ({ matchUtilities , theme })=>{
  3894. matchUtilities({
  3895. "hue-rotate": (value)=>{
  3896. return {
  3897. "--tw-hue-rotate": `hue-rotate(${value})`,
  3898. "@defaults filter": {},
  3899. filter: cssFilterValue
  3900. };
  3901. }
  3902. }, {
  3903. values: theme("hueRotate"),
  3904. supportsNegativeValues: true
  3905. });
  3906. },
  3907. invert: ({ matchUtilities , theme })=>{
  3908. matchUtilities({
  3909. invert: (value)=>{
  3910. return {
  3911. "--tw-invert": `invert(${value})`,
  3912. "@defaults filter": {},
  3913. filter: cssFilterValue
  3914. };
  3915. }
  3916. }, {
  3917. values: theme("invert")
  3918. });
  3919. },
  3920. saturate: ({ matchUtilities , theme })=>{
  3921. matchUtilities({
  3922. saturate: (value)=>{
  3923. return {
  3924. "--tw-saturate": `saturate(${value})`,
  3925. "@defaults filter": {},
  3926. filter: cssFilterValue
  3927. };
  3928. }
  3929. }, {
  3930. values: theme("saturate")
  3931. });
  3932. },
  3933. sepia: ({ matchUtilities , theme })=>{
  3934. matchUtilities({
  3935. sepia: (value)=>{
  3936. return {
  3937. "--tw-sepia": `sepia(${value})`,
  3938. "@defaults filter": {},
  3939. filter: cssFilterValue
  3940. };
  3941. }
  3942. }, {
  3943. values: theme("sepia")
  3944. });
  3945. },
  3946. filter: ({ addDefaults , addUtilities })=>{
  3947. addDefaults("filter", {
  3948. "--tw-blur": " ",
  3949. "--tw-brightness": " ",
  3950. "--tw-contrast": " ",
  3951. "--tw-grayscale": " ",
  3952. "--tw-hue-rotate": " ",
  3953. "--tw-invert": " ",
  3954. "--tw-saturate": " ",
  3955. "--tw-sepia": " ",
  3956. "--tw-drop-shadow": " "
  3957. });
  3958. addUtilities({
  3959. ".filter": {
  3960. "@defaults filter": {},
  3961. filter: cssFilterValue
  3962. },
  3963. ".filter-none": {
  3964. filter: "none"
  3965. }
  3966. });
  3967. },
  3968. backdropBlur: ({ matchUtilities , theme })=>{
  3969. matchUtilities({
  3970. "backdrop-blur": (value)=>{
  3971. return {
  3972. "--tw-backdrop-blur": `blur(${value})`,
  3973. "@defaults backdrop-filter": {},
  3974. "backdrop-filter": cssBackdropFilterValue
  3975. };
  3976. }
  3977. }, {
  3978. values: theme("backdropBlur")
  3979. });
  3980. },
  3981. backdropBrightness: ({ matchUtilities , theme })=>{
  3982. matchUtilities({
  3983. "backdrop-brightness": (value)=>{
  3984. return {
  3985. "--tw-backdrop-brightness": `brightness(${value})`,
  3986. "@defaults backdrop-filter": {},
  3987. "backdrop-filter": cssBackdropFilterValue
  3988. };
  3989. }
  3990. }, {
  3991. values: theme("backdropBrightness")
  3992. });
  3993. },
  3994. backdropContrast: ({ matchUtilities , theme })=>{
  3995. matchUtilities({
  3996. "backdrop-contrast": (value)=>{
  3997. return {
  3998. "--tw-backdrop-contrast": `contrast(${value})`,
  3999. "@defaults backdrop-filter": {},
  4000. "backdrop-filter": cssBackdropFilterValue
  4001. };
  4002. }
  4003. }, {
  4004. values: theme("backdropContrast")
  4005. });
  4006. },
  4007. backdropGrayscale: ({ matchUtilities , theme })=>{
  4008. matchUtilities({
  4009. "backdrop-grayscale": (value)=>{
  4010. return {
  4011. "--tw-backdrop-grayscale": `grayscale(${value})`,
  4012. "@defaults backdrop-filter": {},
  4013. "backdrop-filter": cssBackdropFilterValue
  4014. };
  4015. }
  4016. }, {
  4017. values: theme("backdropGrayscale")
  4018. });
  4019. },
  4020. backdropHueRotate: ({ matchUtilities , theme })=>{
  4021. matchUtilities({
  4022. "backdrop-hue-rotate": (value)=>{
  4023. return {
  4024. "--tw-backdrop-hue-rotate": `hue-rotate(${value})`,
  4025. "@defaults backdrop-filter": {},
  4026. "backdrop-filter": cssBackdropFilterValue
  4027. };
  4028. }
  4029. }, {
  4030. values: theme("backdropHueRotate"),
  4031. supportsNegativeValues: true
  4032. });
  4033. },
  4034. backdropInvert: ({ matchUtilities , theme })=>{
  4035. matchUtilities({
  4036. "backdrop-invert": (value)=>{
  4037. return {
  4038. "--tw-backdrop-invert": `invert(${value})`,
  4039. "@defaults backdrop-filter": {},
  4040. "backdrop-filter": cssBackdropFilterValue
  4041. };
  4042. }
  4043. }, {
  4044. values: theme("backdropInvert")
  4045. });
  4046. },
  4047. backdropOpacity: ({ matchUtilities , theme })=>{
  4048. matchUtilities({
  4049. "backdrop-opacity": (value)=>{
  4050. return {
  4051. "--tw-backdrop-opacity": `opacity(${value})`,
  4052. "@defaults backdrop-filter": {},
  4053. "backdrop-filter": cssBackdropFilterValue
  4054. };
  4055. }
  4056. }, {
  4057. values: theme("backdropOpacity")
  4058. });
  4059. },
  4060. backdropSaturate: ({ matchUtilities , theme })=>{
  4061. matchUtilities({
  4062. "backdrop-saturate": (value)=>{
  4063. return {
  4064. "--tw-backdrop-saturate": `saturate(${value})`,
  4065. "@defaults backdrop-filter": {},
  4066. "backdrop-filter": cssBackdropFilterValue
  4067. };
  4068. }
  4069. }, {
  4070. values: theme("backdropSaturate")
  4071. });
  4072. },
  4073. backdropSepia: ({ matchUtilities , theme })=>{
  4074. matchUtilities({
  4075. "backdrop-sepia": (value)=>{
  4076. return {
  4077. "--tw-backdrop-sepia": `sepia(${value})`,
  4078. "@defaults backdrop-filter": {},
  4079. "backdrop-filter": cssBackdropFilterValue
  4080. };
  4081. }
  4082. }, {
  4083. values: theme("backdropSepia")
  4084. });
  4085. },
  4086. backdropFilter: ({ addDefaults , addUtilities })=>{
  4087. addDefaults("backdrop-filter", {
  4088. "--tw-backdrop-blur": " ",
  4089. "--tw-backdrop-brightness": " ",
  4090. "--tw-backdrop-contrast": " ",
  4091. "--tw-backdrop-grayscale": " ",
  4092. "--tw-backdrop-hue-rotate": " ",
  4093. "--tw-backdrop-invert": " ",
  4094. "--tw-backdrop-opacity": " ",
  4095. "--tw-backdrop-saturate": " ",
  4096. "--tw-backdrop-sepia": " "
  4097. });
  4098. addUtilities({
  4099. ".backdrop-filter": {
  4100. "@defaults backdrop-filter": {},
  4101. "backdrop-filter": cssBackdropFilterValue
  4102. },
  4103. ".backdrop-filter-none": {
  4104. "backdrop-filter": "none"
  4105. }
  4106. });
  4107. },
  4108. transitionProperty: ({ matchUtilities , theme })=>{
  4109. let defaultTimingFunction = theme("transitionTimingFunction.DEFAULT");
  4110. let defaultDuration = theme("transitionDuration.DEFAULT");
  4111. matchUtilities({
  4112. transition: (value)=>{
  4113. return {
  4114. "transition-property": value,
  4115. ...value === "none" ? {} : {
  4116. "transition-timing-function": defaultTimingFunction,
  4117. "transition-duration": defaultDuration
  4118. }
  4119. };
  4120. }
  4121. }, {
  4122. values: theme("transitionProperty")
  4123. });
  4124. },
  4125. transitionDelay: (0, _createUtilityPlugin.default)("transitionDelay", [
  4126. [
  4127. "delay",
  4128. [
  4129. "transitionDelay"
  4130. ]
  4131. ]
  4132. ]),
  4133. transitionDuration: (0, _createUtilityPlugin.default)("transitionDuration", [
  4134. [
  4135. "duration",
  4136. [
  4137. "transitionDuration"
  4138. ]
  4139. ]
  4140. ], {
  4141. filterDefault: true
  4142. }),
  4143. transitionTimingFunction: (0, _createUtilityPlugin.default)("transitionTimingFunction", [
  4144. [
  4145. "ease",
  4146. [
  4147. "transitionTimingFunction"
  4148. ]
  4149. ]
  4150. ], {
  4151. filterDefault: true
  4152. }),
  4153. willChange: (0, _createUtilityPlugin.default)("willChange", [
  4154. [
  4155. "will-change",
  4156. [
  4157. "will-change"
  4158. ]
  4159. ]
  4160. ]),
  4161. content: (0, _createUtilityPlugin.default)("content", [
  4162. [
  4163. "content",
  4164. [
  4165. "--tw-content",
  4166. [
  4167. "content",
  4168. "var(--tw-content)"
  4169. ]
  4170. ]
  4171. ]
  4172. ])
  4173. };