corePlugins.js 126 KB

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