| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- function _export(target, all) {
- for(var name in all)Object.defineProperty(target, name, {
- enumerable: true,
- get: all[name]
- });
- }
- _export(exports, {
- variantPlugins: ()=>variantPlugins,
- corePlugins: ()=>corePlugins
- });
- const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
- const _path = /*#__PURE__*/ _interopRequireWildcard(require("path"));
- const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
- const _sharedState = require("./lib/sharedState");
- const _createUtilityPlugin = /*#__PURE__*/ _interopRequireDefault(require("./util/createUtilityPlugin"));
- const _buildMediaQuery = /*#__PURE__*/ _interopRequireDefault(require("./util/buildMediaQuery"));
- const _escapeClassName = /*#__PURE__*/ _interopRequireDefault(require("./util/escapeClassName"));
- const _parseAnimationValue = /*#__PURE__*/ _interopRequireDefault(require("./util/parseAnimationValue"));
- const _flattenColorPalette = /*#__PURE__*/ _interopRequireDefault(require("./util/flattenColorPalette"));
- const _withAlphaVariable = /*#__PURE__*/ _interopRequireWildcard(require("./util/withAlphaVariable"));
- const _toColorValue = /*#__PURE__*/ _interopRequireDefault(require("./util/toColorValue"));
- const _isPlainObject = /*#__PURE__*/ _interopRequireDefault(require("./util/isPlainObject"));
- const _transformThemeValue = /*#__PURE__*/ _interopRequireDefault(require("./util/transformThemeValue"));
- const _packageJson = require("../package.json");
- const _log = /*#__PURE__*/ _interopRequireDefault(require("./util/log"));
- const _normalizeScreens = require("./util/normalizeScreens");
- const _parseBoxShadowValue = require("./util/parseBoxShadowValue");
- const _removeAlphaVariables = require("./util/removeAlphaVariables");
- const _featureFlags = require("./featureFlags");
- const _dataTypes = require("./util/dataTypes");
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- function _getRequireWildcardCache(nodeInterop) {
- if (typeof WeakMap !== "function") return null;
- var cacheBabelInterop = new WeakMap();
- var cacheNodeInterop = new WeakMap();
- return (_getRequireWildcardCache = function(nodeInterop) {
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
- })(nodeInterop);
- }
- function _interopRequireWildcard(obj, nodeInterop) {
- if (!nodeInterop && obj && obj.__esModule) {
- return obj;
- }
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
- return {
- default: obj
- };
- }
- var cache = _getRequireWildcardCache(nodeInterop);
- if (cache && cache.has(obj)) {
- return cache.get(obj);
- }
- var newObj = {};
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
- for(var key in obj){
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
- if (desc && (desc.get || desc.set)) {
- Object.defineProperty(newObj, key, desc);
- } else {
- newObj[key] = obj[key];
- }
- }
- }
- newObj.default = obj;
- if (cache) {
- cache.set(obj, newObj);
- }
- return newObj;
- }
- let variantPlugins = {
- pseudoElementVariants: ({ addVariant })=>{
- addVariant("first-letter", "&::first-letter");
- addVariant("first-line", "&::first-line");
- addVariant("marker", [
- ({ container })=>{
- (0, _removeAlphaVariables.removeAlphaVariables)(container, [
- "--tw-text-opacity"
- ]);
- return "& *::marker";
- },
- ({ container })=>{
- (0, _removeAlphaVariables.removeAlphaVariables)(container, [
- "--tw-text-opacity"
- ]);
- return "&::marker";
- }
- ]);
- addVariant("selection", [
- "& *::selection",
- "&::selection"
- ]);
- addVariant("file", "&::file-selector-button");
- addVariant("placeholder", "&::placeholder");
- addVariant("backdrop", "&::backdrop");
- addVariant("before", ({ container })=>{
- container.walkRules((rule)=>{
- let foundContent = false;
- rule.walkDecls("content", ()=>{
- foundContent = true;
- });
- if (!foundContent) {
- rule.prepend(_postcss.default.decl({
- prop: "content",
- value: "var(--tw-content)"
- }));
- }
- });
- return "&::before";
- });
- addVariant("after", ({ container })=>{
- container.walkRules((rule)=>{
- let foundContent = false;
- rule.walkDecls("content", ()=>{
- foundContent = true;
- });
- if (!foundContent) {
- rule.prepend(_postcss.default.decl({
- prop: "content",
- value: "var(--tw-content)"
- }));
- }
- });
- return "&::after";
- });
- },
- pseudoClassVariants: ({ addVariant , matchVariant , config })=>{
- let pseudoVariants = [
- // Positional
- [
- "first",
- "&:first-child"
- ],
- [
- "last",
- "&:last-child"
- ],
- [
- "only",
- "&:only-child"
- ],
- [
- "odd",
- "&:nth-child(odd)"
- ],
- [
- "even",
- "&:nth-child(even)"
- ],
- "first-of-type",
- "last-of-type",
- "only-of-type",
- // State
- [
- "visited",
- ({ container })=>{
- (0, _removeAlphaVariables.removeAlphaVariables)(container, [
- "--tw-text-opacity",
- "--tw-border-opacity",
- "--tw-bg-opacity"
- ]);
- return "&:visited";
- }
- ],
- "target",
- [
- "open",
- "&[open]"
- ],
- // Forms
- "default",
- "checked",
- "indeterminate",
- "placeholder-shown",
- "autofill",
- "optional",
- "required",
- "valid",
- "invalid",
- "in-range",
- "out-of-range",
- "read-only",
- // Content
- "empty",
- // Interactive
- "focus-within",
- [
- "hover",
- !(0, _featureFlags.flagEnabled)(config(), "hoverOnlyWhenSupported") ? "&:hover" : "@media (hover: hover) and (pointer: fine) { &:hover }"
- ],
- "focus",
- "focus-visible",
- "active",
- "enabled",
- "disabled"
- ].map((variant)=>Array.isArray(variant) ? variant : [
- variant,
- `&:${variant}`
- ]);
- for (let [variantName, state] of pseudoVariants){
- addVariant(variantName, (ctx)=>{
- let result = typeof state === "function" ? state(ctx) : state;
- return result;
- });
- }
- let variants = {
- group: (_, { modifier })=>modifier ? [
- `:merge(.group\\/${(0, _escapeClassName.default)(modifier)})`,
- " &"
- ] : [
- `:merge(.group)`,
- " &"
- ],
- peer: (_, { modifier })=>modifier ? [
- `:merge(.peer\\/${(0, _escapeClassName.default)(modifier)})`,
- " ~ &"
- ] : [
- `:merge(.peer)`,
- " ~ &"
- ]
- };
- for (let [name, fn] of Object.entries(variants)){
- matchVariant(name, (value = "", extra)=>{
- let result = (0, _dataTypes.normalize)(typeof value === "function" ? value(extra) : value);
- if (!result.includes("&")) result = "&" + result;
- let [a, b] = fn("", extra);
- let start = null;
- let end = null;
- let quotes = 0;
- for(let i = 0; i < result.length; ++i){
- let c = result[i];
- if (c === "&") {
- start = i;
- } else if (c === "'" || c === '"') {
- quotes += 1;
- } else if (start !== null && c === " " && !quotes) {
- end = i;
- }
- }
- if (start !== null && end === null) {
- end = result.length;
- }
- // Basically this but can handle quotes:
- // result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
- return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end);
- }, {
- values: Object.fromEntries(pseudoVariants)
- });
- }
- },
- directionVariants: ({ addVariant })=>{
- addVariant("ltr", ':is([dir="ltr"] &)');
- addVariant("rtl", ':is([dir="rtl"] &)');
- },
- reducedMotionVariants: ({ addVariant })=>{
- addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)");
- addVariant("motion-reduce", "@media (prefers-reduced-motion: reduce)");
- },
- darkVariants: ({ config , addVariant })=>{
- let [mode, className = ".dark"] = [].concat(config("darkMode", "media"));
- if (mode === false) {
- mode = "media";
- _log.default.warn("darkmode-false", [
- "The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.",
- "Change `darkMode` to `media` or remove it entirely.",
- "https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration"
- ]);
- }
- if (mode === "class") {
- addVariant("dark", `:is(${className} &)`);
- } else if (mode === "media") {
- addVariant("dark", "@media (prefers-color-scheme: dark)");
- }
- },
- printVariant: ({ addVariant })=>{
- addVariant("print", "@media print");
- },
- screenVariants: ({ theme , addVariant , matchVariant })=>{
- var _theme;
- let rawScreens = (_theme = theme("screens")) !== null && _theme !== void 0 ? _theme : {};
- let areSimpleScreens = Object.values(rawScreens).every((v)=>typeof v === "string");
- let screens = (0, _normalizeScreens.normalizeScreens)(theme("screens"));
- /** @type {Set<string>} */ let unitCache = new Set([]);
- /** @param {string} value */ function units(value) {
- var _value_match;
- var _value_match_;
- 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)";
- }
- /** @param {string} value */ function recordUnits(value) {
- if (value !== undefined) {
- unitCache.add(units(value));
- }
- }
- /** @param {string} value */ function canUseUnits(value) {
- recordUnits(value);
- // If the cache was empty it'll become 1 because we've just added the current unit
- // If the cache was not empty and the units are the same the size doesn't change
- // Otherwise, if the units are different from what is already known the size will always be > 1
- return unitCache.size === 1;
- }
- for (const screen of screens){
- for (const value of screen.values){
- recordUnits(value.min);
- recordUnits(value.max);
- }
- }
- let screensUseConsistentUnits = unitCache.size <= 1;
- /**
- * @typedef {import('./util/normalizeScreens').Screen} Screen
- */ /**
- * @param {'min' | 'max'} type
- * @returns {Record<string, Screen>}
- */ function buildScreenValues(type) {
- return Object.fromEntries(screens.filter((screen)=>(0, _normalizeScreens.isScreenSortable)(screen).result).map((screen)=>{
- let { min , max } = screen.values[0];
- if (type === "min" && min !== undefined) {
- return screen;
- } else if (type === "min" && max !== undefined) {
- return {
- ...screen,
- not: !screen.not
- };
- } else if (type === "max" && max !== undefined) {
- return screen;
- } else if (type === "max" && min !== undefined) {
- return {
- ...screen,
- not: !screen.not
- };
- }
- }).map((screen)=>[
- screen.name,
- screen
- ]));
- }
- /**
- * @param {'min' | 'max'} type
- * @returns {(a: { value: string | Screen }, z: { value: string | Screen }) => number}
- */ function buildSort(type) {
- return (a, z)=>(0, _normalizeScreens.compareScreens)(type, a.value, z.value);
- }
- let maxSort = buildSort("max");
- let minSort = buildSort("min");
- /** @param {'min'|'max'} type */ function buildScreenVariant(type) {
- return (value)=>{
- if (!areSimpleScreens) {
- _log.default.warn("complex-screen-config", [
- "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing objects."
- ]);
- return [];
- } else if (!screensUseConsistentUnits) {
- _log.default.warn("mixed-screen-units", [
- "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units."
- ]);
- return [];
- } else if (typeof value === "string" && !canUseUnits(value)) {
- _log.default.warn("minmax-have-mixed-units", [
- "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units."
- ]);
- return [];
- }
- return [
- `@media ${(0, _buildMediaQuery.default)((0, _normalizeScreens.toScreen)(value, type))}`
- ];
- };
- }
- matchVariant("max", buildScreenVariant("max"), {
- sort: maxSort,
- values: areSimpleScreens ? buildScreenValues("max") : {}
- });
- // screens and min-* are sorted together when they can be
- let id = "min-screens";
- for (let screen1 of screens){
- addVariant(screen1.name, `@media ${(0, _buildMediaQuery.default)(screen1)}`, {
- id,
- sort: areSimpleScreens && screensUseConsistentUnits ? minSort : undefined,
- value: screen1
- });
- }
- matchVariant("min", buildScreenVariant("min"), {
- id,
- sort: minSort
- });
- },
- supportsVariants: ({ matchVariant , theme })=>{
- var _theme;
- matchVariant("supports", (value = "")=>{
- let check = (0, _dataTypes.normalize)(value);
- let isRaw = /^\w*\s*\(/.test(check);
- // Chrome has a bug where `(condtion1)or(condition2)` is not valid
- // But `(condition1) or (condition2)` is supported.
- check = isRaw ? check.replace(/\b(and|or|not)\b/g, " $1 ") : check;
- if (isRaw) {
- return `@supports ${check}`;
- }
- if (!check.includes(":")) {
- check = `${check}: var(--tw)`;
- }
- if (!(check.startsWith("(") && check.endsWith(")"))) {
- check = `(${check})`;
- }
- return `@supports ${check}`;
- }, {
- values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
- });
- },
- ariaVariants: ({ matchVariant , theme })=>{
- var _theme;
- matchVariant("aria", (value)=>`&[aria-${(0, _dataTypes.normalize)(value)}]`, {
- values: (_theme = theme("aria")) !== null && _theme !== void 0 ? _theme : {}
- });
- var _theme1;
- matchVariant("group-aria", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier})[aria-${(0, _dataTypes.normalize)(value)}] &` : `:merge(.group)[aria-${(0, _dataTypes.normalize)(value)}] &`, {
- values: (_theme1 = theme("aria")) !== null && _theme1 !== void 0 ? _theme1 : {}
- });
- var _theme2;
- matchVariant("peer-aria", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier})[aria-${(0, _dataTypes.normalize)(value)}] ~ &` : `:merge(.peer)[aria-${(0, _dataTypes.normalize)(value)}] ~ &`, {
- values: (_theme2 = theme("aria")) !== null && _theme2 !== void 0 ? _theme2 : {}
- });
- },
- dataVariants: ({ matchVariant , theme })=>{
- var _theme;
- matchVariant("data", (value)=>`&[data-${(0, _dataTypes.normalize)(value)}]`, {
- values: (_theme = theme("data")) !== null && _theme !== void 0 ? _theme : {}
- });
- var _theme1;
- matchVariant("group-data", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier})[data-${(0, _dataTypes.normalize)(value)}] &` : `:merge(.group)[data-${(0, _dataTypes.normalize)(value)}] &`, {
- values: (_theme1 = theme("data")) !== null && _theme1 !== void 0 ? _theme1 : {}
- });
- var _theme2;
- matchVariant("peer-data", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier})[data-${(0, _dataTypes.normalize)(value)}] ~ &` : `:merge(.peer)[data-${(0, _dataTypes.normalize)(value)}] ~ &`, {
- values: (_theme2 = theme("data")) !== null && _theme2 !== void 0 ? _theme2 : {}
- });
- },
- orientationVariants: ({ addVariant })=>{
- addVariant("portrait", "@media (orientation: portrait)");
- addVariant("landscape", "@media (orientation: landscape)");
- },
- prefersContrastVariants: ({ addVariant })=>{
- addVariant("contrast-more", "@media (prefers-contrast: more)");
- addVariant("contrast-less", "@media (prefers-contrast: less)");
- }
- };
- let cssTransformValue = [
- "translate(var(--tw-translate-x), var(--tw-translate-y))",
- "rotate(var(--tw-rotate))",
- "skewX(var(--tw-skew-x))",
- "skewY(var(--tw-skew-y))",
- "scaleX(var(--tw-scale-x))",
- "scaleY(var(--tw-scale-y))"
- ].join(" ");
- let cssFilterValue = [
- "var(--tw-blur)",
- "var(--tw-brightness)",
- "var(--tw-contrast)",
- "var(--tw-grayscale)",
- "var(--tw-hue-rotate)",
- "var(--tw-invert)",
- "var(--tw-saturate)",
- "var(--tw-sepia)",
- "var(--tw-drop-shadow)"
- ].join(" ");
- let cssBackdropFilterValue = [
- "var(--tw-backdrop-blur)",
- "var(--tw-backdrop-brightness)",
- "var(--tw-backdrop-contrast)",
- "var(--tw-backdrop-grayscale)",
- "var(--tw-backdrop-hue-rotate)",
- "var(--tw-backdrop-invert)",
- "var(--tw-backdrop-opacity)",
- "var(--tw-backdrop-saturate)",
- "var(--tw-backdrop-sepia)"
- ].join(" ");
- let corePlugins = {
- preflight: ({ addBase })=>{
- let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(_path.join(__dirname, "./css/preflight.css"), "utf8"));
- addBase([
- _postcss.default.comment({
- text: `! tailwindcss v${_packageJson.version} | MIT License | https://tailwindcss.com`
- }),
- ...preflightStyles.nodes
- ]);
- },
- container: (()=>{
- function extractMinWidths(breakpoints = []) {
- return breakpoints.flatMap((breakpoint)=>breakpoint.values.map((breakpoint)=>breakpoint.min)).filter((v)=>v !== undefined);
- }
- function mapMinWidthsToPadding(minWidths, screens, paddings) {
- if (typeof paddings === "undefined") {
- return [];
- }
- if (!(typeof paddings === "object" && paddings !== null)) {
- return [
- {
- screen: "DEFAULT",
- minWidth: 0,
- padding: paddings
- }
- ];
- }
- let mapping = [];
- if (paddings.DEFAULT) {
- mapping.push({
- screen: "DEFAULT",
- minWidth: 0,
- padding: paddings.DEFAULT
- });
- }
- for (let minWidth of minWidths){
- for (let screen of screens){
- for (let { min } of screen.values){
- if (min === minWidth) {
- mapping.push({
- minWidth,
- padding: paddings[screen.name]
- });
- }
- }
- }
- }
- return mapping;
- }
- return function({ addComponents , theme }) {
- let screens = (0, _normalizeScreens.normalizeScreens)(theme("container.screens", theme("screens")));
- let minWidths = extractMinWidths(screens);
- let paddings = mapMinWidthsToPadding(minWidths, screens, theme("container.padding"));
- let generatePaddingFor = (minWidth)=>{
- let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth);
- if (!paddingConfig) {
- return {};
- }
- return {
- paddingRight: paddingConfig.padding,
- paddingLeft: paddingConfig.padding
- };
- };
- let atRules = Array.from(new Set(minWidths.slice().sort((a, z)=>parseInt(a) - parseInt(z)))).map((minWidth)=>({
- [`@media (min-width: ${minWidth})`]: {
- ".container": {
- "max-width": minWidth,
- ...generatePaddingFor(minWidth)
- }
- }
- }));
- addComponents([
- {
- ".container": Object.assign({
- width: "100%"
- }, theme("container.center", false) ? {
- marginRight: "auto",
- marginLeft: "auto"
- } : {}, generatePaddingFor(0))
- },
- ...atRules
- ]);
- };
- })(),
- accessibility: ({ addUtilities })=>{
- addUtilities({
- ".sr-only": {
- position: "absolute",
- width: "1px",
- height: "1px",
- padding: "0",
- margin: "-1px",
- overflow: "hidden",
- clip: "rect(0, 0, 0, 0)",
- whiteSpace: "nowrap",
- borderWidth: "0"
- },
- ".not-sr-only": {
- position: "static",
- width: "auto",
- height: "auto",
- padding: "0",
- margin: "0",
- overflow: "visible",
- clip: "auto",
- whiteSpace: "normal"
- }
- });
- },
- pointerEvents: ({ addUtilities })=>{
- addUtilities({
- ".pointer-events-none": {
- "pointer-events": "none"
- },
- ".pointer-events-auto": {
- "pointer-events": "auto"
- }
- });
- },
- visibility: ({ addUtilities })=>{
- addUtilities({
- ".visible": {
- visibility: "visible"
- },
- ".invisible": {
- visibility: "hidden"
- },
- ".collapse": {
- visibility: "collapse"
- }
- });
- },
- position: ({ addUtilities })=>{
- addUtilities({
- ".static": {
- position: "static"
- },
- ".fixed": {
- position: "fixed"
- },
- ".absolute": {
- position: "absolute"
- },
- ".relative": {
- position: "relative"
- },
- ".sticky": {
- position: "sticky"
- }
- });
- },
- inset: (0, _createUtilityPlugin.default)("inset", [
- [
- "inset",
- [
- "inset"
- ]
- ],
- [
- [
- "inset-x",
- [
- "left",
- "right"
- ]
- ],
- [
- "inset-y",
- [
- "top",
- "bottom"
- ]
- ]
- ],
- [
- [
- "start",
- [
- "inset-inline-start"
- ]
- ],
- [
- "end",
- [
- "inset-inline-end"
- ]
- ],
- [
- "top",
- [
- "top"
- ]
- ],
- [
- "right",
- [
- "right"
- ]
- ],
- [
- "bottom",
- [
- "bottom"
- ]
- ],
- [
- "left",
- [
- "left"
- ]
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- isolation: ({ addUtilities })=>{
- addUtilities({
- ".isolate": {
- isolation: "isolate"
- },
- ".isolation-auto": {
- isolation: "auto"
- }
- });
- },
- zIndex: (0, _createUtilityPlugin.default)("zIndex", [
- [
- "z",
- [
- "zIndex"
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- order: (0, _createUtilityPlugin.default)("order", undefined, {
- supportsNegativeValues: true
- }),
- gridColumn: (0, _createUtilityPlugin.default)("gridColumn", [
- [
- "col",
- [
- "gridColumn"
- ]
- ]
- ]),
- gridColumnStart: (0, _createUtilityPlugin.default)("gridColumnStart", [
- [
- "col-start",
- [
- "gridColumnStart"
- ]
- ]
- ]),
- gridColumnEnd: (0, _createUtilityPlugin.default)("gridColumnEnd", [
- [
- "col-end",
- [
- "gridColumnEnd"
- ]
- ]
- ]),
- gridRow: (0, _createUtilityPlugin.default)("gridRow", [
- [
- "row",
- [
- "gridRow"
- ]
- ]
- ]),
- gridRowStart: (0, _createUtilityPlugin.default)("gridRowStart", [
- [
- "row-start",
- [
- "gridRowStart"
- ]
- ]
- ]),
- gridRowEnd: (0, _createUtilityPlugin.default)("gridRowEnd", [
- [
- "row-end",
- [
- "gridRowEnd"
- ]
- ]
- ]),
- float: ({ addUtilities })=>{
- addUtilities({
- ".float-right": {
- float: "right"
- },
- ".float-left": {
- float: "left"
- },
- ".float-none": {
- float: "none"
- }
- });
- },
- clear: ({ addUtilities })=>{
- addUtilities({
- ".clear-left": {
- clear: "left"
- },
- ".clear-right": {
- clear: "right"
- },
- ".clear-both": {
- clear: "both"
- },
- ".clear-none": {
- clear: "none"
- }
- });
- },
- margin: (0, _createUtilityPlugin.default)("margin", [
- [
- "m",
- [
- "margin"
- ]
- ],
- [
- [
- "mx",
- [
- "margin-left",
- "margin-right"
- ]
- ],
- [
- "my",
- [
- "margin-top",
- "margin-bottom"
- ]
- ]
- ],
- [
- [
- "ms",
- [
- "margin-inline-start"
- ]
- ],
- [
- "me",
- [
- "margin-inline-end"
- ]
- ],
- [
- "mt",
- [
- "margin-top"
- ]
- ],
- [
- "mr",
- [
- "margin-right"
- ]
- ],
- [
- "mb",
- [
- "margin-bottom"
- ]
- ],
- [
- "ml",
- [
- "margin-left"
- ]
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- boxSizing: ({ addUtilities })=>{
- addUtilities({
- ".box-border": {
- "box-sizing": "border-box"
- },
- ".box-content": {
- "box-sizing": "content-box"
- }
- });
- },
- lineClamp: ({ matchUtilities , addUtilities , theme })=>{
- matchUtilities({
- "line-clamp": (value)=>({
- overflow: "hidden",
- display: "-webkit-box",
- "-webkit-box-orient": "vertical",
- "-webkit-line-clamp": `${value}`
- })
- }, {
- values: theme("lineClamp")
- });
- addUtilities({
- ".line-clamp-none": {
- overflow: "visible",
- display: "block",
- "-webkit-box-orient": "horizontal",
- "-webkit-line-clamp": "none"
- }
- });
- },
- display: ({ addUtilities })=>{
- addUtilities({
- ".block": {
- display: "block"
- },
- ".inline-block": {
- display: "inline-block"
- },
- ".inline": {
- display: "inline"
- },
- ".flex": {
- display: "flex"
- },
- ".inline-flex": {
- display: "inline-flex"
- },
- ".table": {
- display: "table"
- },
- ".inline-table": {
- display: "inline-table"
- },
- ".table-caption": {
- display: "table-caption"
- },
- ".table-cell": {
- display: "table-cell"
- },
- ".table-column": {
- display: "table-column"
- },
- ".table-column-group": {
- display: "table-column-group"
- },
- ".table-footer-group": {
- display: "table-footer-group"
- },
- ".table-header-group": {
- display: "table-header-group"
- },
- ".table-row-group": {
- display: "table-row-group"
- },
- ".table-row": {
- display: "table-row"
- },
- ".flow-root": {
- display: "flow-root"
- },
- ".grid": {
- display: "grid"
- },
- ".inline-grid": {
- display: "inline-grid"
- },
- ".contents": {
- display: "contents"
- },
- ".list-item": {
- display: "list-item"
- },
- ".hidden": {
- display: "none"
- }
- });
- },
- aspectRatio: (0, _createUtilityPlugin.default)("aspectRatio", [
- [
- "aspect",
- [
- "aspect-ratio"
- ]
- ]
- ]),
- height: (0, _createUtilityPlugin.default)("height", [
- [
- "h",
- [
- "height"
- ]
- ]
- ]),
- maxHeight: (0, _createUtilityPlugin.default)("maxHeight", [
- [
- "max-h",
- [
- "maxHeight"
- ]
- ]
- ]),
- minHeight: (0, _createUtilityPlugin.default)("minHeight", [
- [
- "min-h",
- [
- "minHeight"
- ]
- ]
- ]),
- width: (0, _createUtilityPlugin.default)("width", [
- [
- "w",
- [
- "width"
- ]
- ]
- ]),
- minWidth: (0, _createUtilityPlugin.default)("minWidth", [
- [
- "min-w",
- [
- "minWidth"
- ]
- ]
- ]),
- maxWidth: (0, _createUtilityPlugin.default)("maxWidth", [
- [
- "max-w",
- [
- "maxWidth"
- ]
- ]
- ]),
- flex: (0, _createUtilityPlugin.default)("flex"),
- flexShrink: (0, _createUtilityPlugin.default)("flexShrink", [
- [
- "flex-shrink",
- [
- "flex-shrink"
- ]
- ],
- [
- "shrink",
- [
- "flex-shrink"
- ]
- ]
- ]),
- flexGrow: (0, _createUtilityPlugin.default)("flexGrow", [
- [
- "flex-grow",
- [
- "flex-grow"
- ]
- ],
- [
- "grow",
- [
- "flex-grow"
- ]
- ]
- ]),
- flexBasis: (0, _createUtilityPlugin.default)("flexBasis", [
- [
- "basis",
- [
- "flex-basis"
- ]
- ]
- ]),
- tableLayout: ({ addUtilities })=>{
- addUtilities({
- ".table-auto": {
- "table-layout": "auto"
- },
- ".table-fixed": {
- "table-layout": "fixed"
- }
- });
- },
- captionSide: ({ addUtilities })=>{
- addUtilities({
- ".caption-top": {
- "caption-side": "top"
- },
- ".caption-bottom": {
- "caption-side": "bottom"
- }
- });
- },
- borderCollapse: ({ addUtilities })=>{
- addUtilities({
- ".border-collapse": {
- "border-collapse": "collapse"
- },
- ".border-separate": {
- "border-collapse": "separate"
- }
- });
- },
- borderSpacing: ({ addDefaults , matchUtilities , theme })=>{
- addDefaults("border-spacing", {
- "--tw-border-spacing-x": 0,
- "--tw-border-spacing-y": 0
- });
- matchUtilities({
- "border-spacing": (value)=>{
- return {
- "--tw-border-spacing-x": value,
- "--tw-border-spacing-y": value,
- "@defaults border-spacing": {},
- "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)"
- };
- },
- "border-spacing-x": (value)=>{
- return {
- "--tw-border-spacing-x": value,
- "@defaults border-spacing": {},
- "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)"
- };
- },
- "border-spacing-y": (value)=>{
- return {
- "--tw-border-spacing-y": value,
- "@defaults border-spacing": {},
- "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)"
- };
- }
- }, {
- values: theme("borderSpacing")
- });
- },
- transformOrigin: (0, _createUtilityPlugin.default)("transformOrigin", [
- [
- "origin",
- [
- "transformOrigin"
- ]
- ]
- ]),
- translate: (0, _createUtilityPlugin.default)("translate", [
- [
- [
- "translate-x",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-translate-x",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ],
- [
- "translate-y",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-translate-y",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- rotate: (0, _createUtilityPlugin.default)("rotate", [
- [
- "rotate",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-rotate",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- skew: (0, _createUtilityPlugin.default)("skew", [
- [
- [
- "skew-x",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-skew-x",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ],
- [
- "skew-y",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-skew-y",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- scale: (0, _createUtilityPlugin.default)("scale", [
- [
- "scale",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-scale-x",
- "--tw-scale-y",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ],
- [
- [
- "scale-x",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-scale-x",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ],
- [
- "scale-y",
- [
- [
- "@defaults transform",
- {}
- ],
- "--tw-scale-y",
- [
- "transform",
- cssTransformValue
- ]
- ]
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- transform: ({ addDefaults , addUtilities })=>{
- addDefaults("transform", {
- "--tw-translate-x": "0",
- "--tw-translate-y": "0",
- "--tw-rotate": "0",
- "--tw-skew-x": "0",
- "--tw-skew-y": "0",
- "--tw-scale-x": "1",
- "--tw-scale-y": "1"
- });
- addUtilities({
- ".transform": {
- "@defaults transform": {},
- transform: cssTransformValue
- },
- ".transform-cpu": {
- transform: cssTransformValue
- },
- ".transform-gpu": {
- transform: cssTransformValue.replace("translate(var(--tw-translate-x), var(--tw-translate-y))", "translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)")
- },
- ".transform-none": {
- transform: "none"
- }
- });
- },
- animation: ({ matchUtilities , theme , config })=>{
- let prefixName = (name)=>`${config("prefix")}${(0, _escapeClassName.default)(name)}`;
- var _theme;
- let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
- return [
- key,
- {
- [`@keyframes ${prefixName(key)}`]: value
- }
- ];
- }));
- matchUtilities({
- animate: (value)=>{
- let animations = (0, _parseAnimationValue.default)(value);
- return [
- ...animations.flatMap((animation)=>keyframes[animation.name]),
- {
- animation: animations.map(({ name , value })=>{
- if (name === undefined || keyframes[name] === undefined) {
- return value;
- }
- return value.replace(name, prefixName(name));
- }).join(", ")
- }
- ];
- }
- }, {
- values: theme("animation")
- });
- },
- cursor: (0, _createUtilityPlugin.default)("cursor"),
- touchAction: ({ addDefaults , addUtilities })=>{
- addDefaults("touch-action", {
- "--tw-pan-x": " ",
- "--tw-pan-y": " ",
- "--tw-pinch-zoom": " "
- });
- let cssTouchActionValue = "var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)";
- addUtilities({
- ".touch-auto": {
- "touch-action": "auto"
- },
- ".touch-none": {
- "touch-action": "none"
- },
- ".touch-pan-x": {
- "@defaults touch-action": {},
- "--tw-pan-x": "pan-x",
- "touch-action": cssTouchActionValue
- },
- ".touch-pan-left": {
- "@defaults touch-action": {},
- "--tw-pan-x": "pan-left",
- "touch-action": cssTouchActionValue
- },
- ".touch-pan-right": {
- "@defaults touch-action": {},
- "--tw-pan-x": "pan-right",
- "touch-action": cssTouchActionValue
- },
- ".touch-pan-y": {
- "@defaults touch-action": {},
- "--tw-pan-y": "pan-y",
- "touch-action": cssTouchActionValue
- },
- ".touch-pan-up": {
- "@defaults touch-action": {},
- "--tw-pan-y": "pan-up",
- "touch-action": cssTouchActionValue
- },
- ".touch-pan-down": {
- "@defaults touch-action": {},
- "--tw-pan-y": "pan-down",
- "touch-action": cssTouchActionValue
- },
- ".touch-pinch-zoom": {
- "@defaults touch-action": {},
- "--tw-pinch-zoom": "pinch-zoom",
- "touch-action": cssTouchActionValue
- },
- ".touch-manipulation": {
- "touch-action": "manipulation"
- }
- });
- },
- userSelect: ({ addUtilities })=>{
- addUtilities({
- ".select-none": {
- "user-select": "none"
- },
- ".select-text": {
- "user-select": "text"
- },
- ".select-all": {
- "user-select": "all"
- },
- ".select-auto": {
- "user-select": "auto"
- }
- });
- },
- resize: ({ addUtilities })=>{
- addUtilities({
- ".resize-none": {
- resize: "none"
- },
- ".resize-y": {
- resize: "vertical"
- },
- ".resize-x": {
- resize: "horizontal"
- },
- ".resize": {
- resize: "both"
- }
- });
- },
- scrollSnapType: ({ addDefaults , addUtilities })=>{
- addDefaults("scroll-snap-type", {
- "--tw-scroll-snap-strictness": "proximity"
- });
- addUtilities({
- ".snap-none": {
- "scroll-snap-type": "none"
- },
- ".snap-x": {
- "@defaults scroll-snap-type": {},
- "scroll-snap-type": "x var(--tw-scroll-snap-strictness)"
- },
- ".snap-y": {
- "@defaults scroll-snap-type": {},
- "scroll-snap-type": "y var(--tw-scroll-snap-strictness)"
- },
- ".snap-both": {
- "@defaults scroll-snap-type": {},
- "scroll-snap-type": "both var(--tw-scroll-snap-strictness)"
- },
- ".snap-mandatory": {
- "--tw-scroll-snap-strictness": "mandatory"
- },
- ".snap-proximity": {
- "--tw-scroll-snap-strictness": "proximity"
- }
- });
- },
- scrollSnapAlign: ({ addUtilities })=>{
- addUtilities({
- ".snap-start": {
- "scroll-snap-align": "start"
- },
- ".snap-end": {
- "scroll-snap-align": "end"
- },
- ".snap-center": {
- "scroll-snap-align": "center"
- },
- ".snap-align-none": {
- "scroll-snap-align": "none"
- }
- });
- },
- scrollSnapStop: ({ addUtilities })=>{
- addUtilities({
- ".snap-normal": {
- "scroll-snap-stop": "normal"
- },
- ".snap-always": {
- "scroll-snap-stop": "always"
- }
- });
- },
- scrollMargin: (0, _createUtilityPlugin.default)("scrollMargin", [
- [
- "scroll-m",
- [
- "scroll-margin"
- ]
- ],
- [
- [
- "scroll-mx",
- [
- "scroll-margin-left",
- "scroll-margin-right"
- ]
- ],
- [
- "scroll-my",
- [
- "scroll-margin-top",
- "scroll-margin-bottom"
- ]
- ]
- ],
- [
- [
- "scroll-ms",
- [
- "scroll-margin-inline-start"
- ]
- ],
- [
- "scroll-me",
- [
- "scroll-margin-inline-end"
- ]
- ],
- [
- "scroll-mt",
- [
- "scroll-margin-top"
- ]
- ],
- [
- "scroll-mr",
- [
- "scroll-margin-right"
- ]
- ],
- [
- "scroll-mb",
- [
- "scroll-margin-bottom"
- ]
- ],
- [
- "scroll-ml",
- [
- "scroll-margin-left"
- ]
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- scrollPadding: (0, _createUtilityPlugin.default)("scrollPadding", [
- [
- "scroll-p",
- [
- "scroll-padding"
- ]
- ],
- [
- [
- "scroll-px",
- [
- "scroll-padding-left",
- "scroll-padding-right"
- ]
- ],
- [
- "scroll-py",
- [
- "scroll-padding-top",
- "scroll-padding-bottom"
- ]
- ]
- ],
- [
- [
- "scroll-ps",
- [
- "scroll-padding-inline-start"
- ]
- ],
- [
- "scroll-pe",
- [
- "scroll-padding-inline-end"
- ]
- ],
- [
- "scroll-pt",
- [
- "scroll-padding-top"
- ]
- ],
- [
- "scroll-pr",
- [
- "scroll-padding-right"
- ]
- ],
- [
- "scroll-pb",
- [
- "scroll-padding-bottom"
- ]
- ],
- [
- "scroll-pl",
- [
- "scroll-padding-left"
- ]
- ]
- ]
- ]),
- listStylePosition: ({ addUtilities })=>{
- addUtilities({
- ".list-inside": {
- "list-style-position": "inside"
- },
- ".list-outside": {
- "list-style-position": "outside"
- }
- });
- },
- listStyleType: (0, _createUtilityPlugin.default)("listStyleType", [
- [
- "list",
- [
- "listStyleType"
- ]
- ]
- ]),
- listStyleImage: (0, _createUtilityPlugin.default)("listStyleImage", [
- [
- "list-image",
- [
- "listStyleImage"
- ]
- ]
- ]),
- appearance: ({ addUtilities })=>{
- addUtilities({
- ".appearance-none": {
- appearance: "none"
- }
- });
- },
- columns: (0, _createUtilityPlugin.default)("columns", [
- [
- "columns",
- [
- "columns"
- ]
- ]
- ]),
- breakBefore: ({ addUtilities })=>{
- addUtilities({
- ".break-before-auto": {
- "break-before": "auto"
- },
- ".break-before-avoid": {
- "break-before": "avoid"
- },
- ".break-before-all": {
- "break-before": "all"
- },
- ".break-before-avoid-page": {
- "break-before": "avoid-page"
- },
- ".break-before-page": {
- "break-before": "page"
- },
- ".break-before-left": {
- "break-before": "left"
- },
- ".break-before-right": {
- "break-before": "right"
- },
- ".break-before-column": {
- "break-before": "column"
- }
- });
- },
- breakInside: ({ addUtilities })=>{
- addUtilities({
- ".break-inside-auto": {
- "break-inside": "auto"
- },
- ".break-inside-avoid": {
- "break-inside": "avoid"
- },
- ".break-inside-avoid-page": {
- "break-inside": "avoid-page"
- },
- ".break-inside-avoid-column": {
- "break-inside": "avoid-column"
- }
- });
- },
- breakAfter: ({ addUtilities })=>{
- addUtilities({
- ".break-after-auto": {
- "break-after": "auto"
- },
- ".break-after-avoid": {
- "break-after": "avoid"
- },
- ".break-after-all": {
- "break-after": "all"
- },
- ".break-after-avoid-page": {
- "break-after": "avoid-page"
- },
- ".break-after-page": {
- "break-after": "page"
- },
- ".break-after-left": {
- "break-after": "left"
- },
- ".break-after-right": {
- "break-after": "right"
- },
- ".break-after-column": {
- "break-after": "column"
- }
- });
- },
- gridAutoColumns: (0, _createUtilityPlugin.default)("gridAutoColumns", [
- [
- "auto-cols",
- [
- "gridAutoColumns"
- ]
- ]
- ]),
- gridAutoFlow: ({ addUtilities })=>{
- addUtilities({
- ".grid-flow-row": {
- gridAutoFlow: "row"
- },
- ".grid-flow-col": {
- gridAutoFlow: "column"
- },
- ".grid-flow-dense": {
- gridAutoFlow: "dense"
- },
- ".grid-flow-row-dense": {
- gridAutoFlow: "row dense"
- },
- ".grid-flow-col-dense": {
- gridAutoFlow: "column dense"
- }
- });
- },
- gridAutoRows: (0, _createUtilityPlugin.default)("gridAutoRows", [
- [
- "auto-rows",
- [
- "gridAutoRows"
- ]
- ]
- ]),
- gridTemplateColumns: (0, _createUtilityPlugin.default)("gridTemplateColumns", [
- [
- "grid-cols",
- [
- "gridTemplateColumns"
- ]
- ]
- ]),
- gridTemplateRows: (0, _createUtilityPlugin.default)("gridTemplateRows", [
- [
- "grid-rows",
- [
- "gridTemplateRows"
- ]
- ]
- ]),
- flexDirection: ({ addUtilities })=>{
- addUtilities({
- ".flex-row": {
- "flex-direction": "row"
- },
- ".flex-row-reverse": {
- "flex-direction": "row-reverse"
- },
- ".flex-col": {
- "flex-direction": "column"
- },
- ".flex-col-reverse": {
- "flex-direction": "column-reverse"
- }
- });
- },
- flexWrap: ({ addUtilities })=>{
- addUtilities({
- ".flex-wrap": {
- "flex-wrap": "wrap"
- },
- ".flex-wrap-reverse": {
- "flex-wrap": "wrap-reverse"
- },
- ".flex-nowrap": {
- "flex-wrap": "nowrap"
- }
- });
- },
- placeContent: ({ addUtilities })=>{
- addUtilities({
- ".place-content-center": {
- "place-content": "center"
- },
- ".place-content-start": {
- "place-content": "start"
- },
- ".place-content-end": {
- "place-content": "end"
- },
- ".place-content-between": {
- "place-content": "space-between"
- },
- ".place-content-around": {
- "place-content": "space-around"
- },
- ".place-content-evenly": {
- "place-content": "space-evenly"
- },
- ".place-content-baseline": {
- "place-content": "baseline"
- },
- ".place-content-stretch": {
- "place-content": "stretch"
- }
- });
- },
- placeItems: ({ addUtilities })=>{
- addUtilities({
- ".place-items-start": {
- "place-items": "start"
- },
- ".place-items-end": {
- "place-items": "end"
- },
- ".place-items-center": {
- "place-items": "center"
- },
- ".place-items-baseline": {
- "place-items": "baseline"
- },
- ".place-items-stretch": {
- "place-items": "stretch"
- }
- });
- },
- alignContent: ({ addUtilities })=>{
- addUtilities({
- ".content-normal": {
- "align-content": "normal"
- },
- ".content-center": {
- "align-content": "center"
- },
- ".content-start": {
- "align-content": "flex-start"
- },
- ".content-end": {
- "align-content": "flex-end"
- },
- ".content-between": {
- "align-content": "space-between"
- },
- ".content-around": {
- "align-content": "space-around"
- },
- ".content-evenly": {
- "align-content": "space-evenly"
- },
- ".content-baseline": {
- "align-content": "baseline"
- },
- ".content-stretch": {
- "align-content": "stretch"
- }
- });
- },
- alignItems: ({ addUtilities })=>{
- addUtilities({
- ".items-start": {
- "align-items": "flex-start"
- },
- ".items-end": {
- "align-items": "flex-end"
- },
- ".items-center": {
- "align-items": "center"
- },
- ".items-baseline": {
- "align-items": "baseline"
- },
- ".items-stretch": {
- "align-items": "stretch"
- }
- });
- },
- justifyContent: ({ addUtilities })=>{
- addUtilities({
- ".justify-normal": {
- "justify-content": "normal"
- },
- ".justify-start": {
- "justify-content": "flex-start"
- },
- ".justify-end": {
- "justify-content": "flex-end"
- },
- ".justify-center": {
- "justify-content": "center"
- },
- ".justify-between": {
- "justify-content": "space-between"
- },
- ".justify-around": {
- "justify-content": "space-around"
- },
- ".justify-evenly": {
- "justify-content": "space-evenly"
- },
- ".justify-stretch": {
- "justify-content": "stretch"
- }
- });
- },
- justifyItems: ({ addUtilities })=>{
- addUtilities({
- ".justify-items-start": {
- "justify-items": "start"
- },
- ".justify-items-end": {
- "justify-items": "end"
- },
- ".justify-items-center": {
- "justify-items": "center"
- },
- ".justify-items-stretch": {
- "justify-items": "stretch"
- }
- });
- },
- gap: (0, _createUtilityPlugin.default)("gap", [
- [
- "gap",
- [
- "gap"
- ]
- ],
- [
- [
- "gap-x",
- [
- "columnGap"
- ]
- ],
- [
- "gap-y",
- [
- "rowGap"
- ]
- ]
- ]
- ]),
- space: ({ matchUtilities , addUtilities , theme })=>{
- matchUtilities({
- "space-x": (value)=>{
- value = value === "0" ? "0px" : value;
- if (_sharedState.env.OXIDE) {
- return {
- "& > :not([hidden]) ~ :not([hidden])": {
- "--tw-space-x-reverse": "0",
- "margin-inline-end": `calc(${value} * var(--tw-space-x-reverse))`,
- "margin-inline-start": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
- }
- };
- }
- return {
- "& > :not([hidden]) ~ :not([hidden])": {
- "--tw-space-x-reverse": "0",
- "margin-right": `calc(${value} * var(--tw-space-x-reverse))`,
- "margin-left": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
- }
- };
- },
- "space-y": (value)=>{
- value = value === "0" ? "0px" : value;
- return {
- "& > :not([hidden]) ~ :not([hidden])": {
- "--tw-space-y-reverse": "0",
- "margin-top": `calc(${value} * calc(1 - var(--tw-space-y-reverse)))`,
- "margin-bottom": `calc(${value} * var(--tw-space-y-reverse))`
- }
- };
- }
- }, {
- values: theme("space"),
- supportsNegativeValues: true
- });
- addUtilities({
- ".space-y-reverse > :not([hidden]) ~ :not([hidden])": {
- "--tw-space-y-reverse": "1"
- },
- ".space-x-reverse > :not([hidden]) ~ :not([hidden])": {
- "--tw-space-x-reverse": "1"
- }
- });
- },
- divideWidth: ({ matchUtilities , addUtilities , theme })=>{
- matchUtilities({
- "divide-x": (value)=>{
- value = value === "0" ? "0px" : value;
- if (_sharedState.env.OXIDE) {
- return {
- "& > :not([hidden]) ~ :not([hidden])": {
- "@defaults border-width": {},
- "--tw-divide-x-reverse": "0",
- "border-inline-end-width": `calc(${value} * var(--tw-divide-x-reverse))`,
- "border-inline-start-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
- }
- };
- }
- return {
- "& > :not([hidden]) ~ :not([hidden])": {
- "@defaults border-width": {},
- "--tw-divide-x-reverse": "0",
- "border-right-width": `calc(${value} * var(--tw-divide-x-reverse))`,
- "border-left-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
- }
- };
- },
- "divide-y": (value)=>{
- value = value === "0" ? "0px" : value;
- return {
- "& > :not([hidden]) ~ :not([hidden])": {
- "@defaults border-width": {},
- "--tw-divide-y-reverse": "0",
- "border-top-width": `calc(${value} * calc(1 - var(--tw-divide-y-reverse)))`,
- "border-bottom-width": `calc(${value} * var(--tw-divide-y-reverse))`
- }
- };
- }
- }, {
- values: theme("divideWidth"),
- type: [
- "line-width",
- "length",
- "any"
- ]
- });
- addUtilities({
- ".divide-y-reverse > :not([hidden]) ~ :not([hidden])": {
- "@defaults border-width": {},
- "--tw-divide-y-reverse": "1"
- },
- ".divide-x-reverse > :not([hidden]) ~ :not([hidden])": {
- "@defaults border-width": {},
- "--tw-divide-x-reverse": "1"
- }
- });
- },
- divideStyle: ({ addUtilities })=>{
- addUtilities({
- ".divide-solid > :not([hidden]) ~ :not([hidden])": {
- "border-style": "solid"
- },
- ".divide-dashed > :not([hidden]) ~ :not([hidden])": {
- "border-style": "dashed"
- },
- ".divide-dotted > :not([hidden]) ~ :not([hidden])": {
- "border-style": "dotted"
- },
- ".divide-double > :not([hidden]) ~ :not([hidden])": {
- "border-style": "double"
- },
- ".divide-none > :not([hidden]) ~ :not([hidden])": {
- "border-style": "none"
- }
- });
- },
- divideColor: ({ matchUtilities , theme , corePlugins })=>{
- matchUtilities({
- divide: (value)=>{
- if (!corePlugins("divideOpacity")) {
- return {
- ["& > :not([hidden]) ~ :not([hidden])"]: {
- "border-color": (0, _toColorValue.default)(value)
- }
- };
- }
- return {
- ["& > :not([hidden]) ~ :not([hidden])"]: (0, _withAlphaVariable.default)({
- color: value,
- property: "border-color",
- variable: "--tw-divide-opacity"
- })
- };
- }
- }, {
- values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("divideColor"))),
- type: [
- "color",
- "any"
- ]
- });
- },
- divideOpacity: ({ matchUtilities , theme })=>{
- matchUtilities({
- "divide-opacity": (value)=>{
- return {
- [`& > :not([hidden]) ~ :not([hidden])`]: {
- "--tw-divide-opacity": value
- }
- };
- }
- }, {
- values: theme("divideOpacity")
- });
- },
- placeSelf: ({ addUtilities })=>{
- addUtilities({
- ".place-self-auto": {
- "place-self": "auto"
- },
- ".place-self-start": {
- "place-self": "start"
- },
- ".place-self-end": {
- "place-self": "end"
- },
- ".place-self-center": {
- "place-self": "center"
- },
- ".place-self-stretch": {
- "place-self": "stretch"
- }
- });
- },
- alignSelf: ({ addUtilities })=>{
- addUtilities({
- ".self-auto": {
- "align-self": "auto"
- },
- ".self-start": {
- "align-self": "flex-start"
- },
- ".self-end": {
- "align-self": "flex-end"
- },
- ".self-center": {
- "align-self": "center"
- },
- ".self-stretch": {
- "align-self": "stretch"
- },
- ".self-baseline": {
- "align-self": "baseline"
- }
- });
- },
- justifySelf: ({ addUtilities })=>{
- addUtilities({
- ".justify-self-auto": {
- "justify-self": "auto"
- },
- ".justify-self-start": {
- "justify-self": "start"
- },
- ".justify-self-end": {
- "justify-self": "end"
- },
- ".justify-self-center": {
- "justify-self": "center"
- },
- ".justify-self-stretch": {
- "justify-self": "stretch"
- }
- });
- },
- overflow: ({ addUtilities })=>{
- addUtilities({
- ".overflow-auto": {
- overflow: "auto"
- },
- ".overflow-hidden": {
- overflow: "hidden"
- },
- ".overflow-clip": {
- overflow: "clip"
- },
- ".overflow-visible": {
- overflow: "visible"
- },
- ".overflow-scroll": {
- overflow: "scroll"
- },
- ".overflow-x-auto": {
- "overflow-x": "auto"
- },
- ".overflow-y-auto": {
- "overflow-y": "auto"
- },
- ".overflow-x-hidden": {
- "overflow-x": "hidden"
- },
- ".overflow-y-hidden": {
- "overflow-y": "hidden"
- },
- ".overflow-x-clip": {
- "overflow-x": "clip"
- },
- ".overflow-y-clip": {
- "overflow-y": "clip"
- },
- ".overflow-x-visible": {
- "overflow-x": "visible"
- },
- ".overflow-y-visible": {
- "overflow-y": "visible"
- },
- ".overflow-x-scroll": {
- "overflow-x": "scroll"
- },
- ".overflow-y-scroll": {
- "overflow-y": "scroll"
- }
- });
- },
- overscrollBehavior: ({ addUtilities })=>{
- addUtilities({
- ".overscroll-auto": {
- "overscroll-behavior": "auto"
- },
- ".overscroll-contain": {
- "overscroll-behavior": "contain"
- },
- ".overscroll-none": {
- "overscroll-behavior": "none"
- },
- ".overscroll-y-auto": {
- "overscroll-behavior-y": "auto"
- },
- ".overscroll-y-contain": {
- "overscroll-behavior-y": "contain"
- },
- ".overscroll-y-none": {
- "overscroll-behavior-y": "none"
- },
- ".overscroll-x-auto": {
- "overscroll-behavior-x": "auto"
- },
- ".overscroll-x-contain": {
- "overscroll-behavior-x": "contain"
- },
- ".overscroll-x-none": {
- "overscroll-behavior-x": "none"
- }
- });
- },
- scrollBehavior: ({ addUtilities })=>{
- addUtilities({
- ".scroll-auto": {
- "scroll-behavior": "auto"
- },
- ".scroll-smooth": {
- "scroll-behavior": "smooth"
- }
- });
- },
- textOverflow: ({ addUtilities })=>{
- addUtilities({
- ".truncate": {
- overflow: "hidden",
- "text-overflow": "ellipsis",
- "white-space": "nowrap"
- },
- ".overflow-ellipsis": {
- "text-overflow": "ellipsis"
- },
- ".text-ellipsis": {
- "text-overflow": "ellipsis"
- },
- ".text-clip": {
- "text-overflow": "clip"
- }
- });
- },
- hyphens: ({ addUtilities })=>{
- addUtilities({
- ".hyphens-none": {
- hyphens: "none"
- },
- ".hyphens-manual": {
- hyphens: "manual"
- },
- ".hyphens-auto": {
- hyphens: "auto"
- }
- });
- },
- whitespace: ({ addUtilities })=>{
- addUtilities({
- ".whitespace-normal": {
- "white-space": "normal"
- },
- ".whitespace-nowrap": {
- "white-space": "nowrap"
- },
- ".whitespace-pre": {
- "white-space": "pre"
- },
- ".whitespace-pre-line": {
- "white-space": "pre-line"
- },
- ".whitespace-pre-wrap": {
- "white-space": "pre-wrap"
- },
- ".whitespace-break-spaces": {
- "white-space": "break-spaces"
- }
- });
- },
- wordBreak: ({ addUtilities })=>{
- addUtilities({
- ".break-normal": {
- "overflow-wrap": "normal",
- "word-break": "normal"
- },
- ".break-words": {
- "overflow-wrap": "break-word"
- },
- ".break-all": {
- "word-break": "break-all"
- },
- ".break-keep": {
- "word-break": "keep-all"
- }
- });
- },
- borderRadius: (0, _createUtilityPlugin.default)("borderRadius", [
- [
- "rounded",
- [
- "border-radius"
- ]
- ],
- [
- [
- "rounded-s",
- [
- "border-start-start-radius",
- "border-end-start-radius"
- ]
- ],
- [
- "rounded-e",
- [
- "border-start-end-radius",
- "border-end-end-radius"
- ]
- ],
- [
- "rounded-t",
- [
- "border-top-left-radius",
- "border-top-right-radius"
- ]
- ],
- [
- "rounded-r",
- [
- "border-top-right-radius",
- "border-bottom-right-radius"
- ]
- ],
- [
- "rounded-b",
- [
- "border-bottom-right-radius",
- "border-bottom-left-radius"
- ]
- ],
- [
- "rounded-l",
- [
- "border-top-left-radius",
- "border-bottom-left-radius"
- ]
- ]
- ],
- [
- [
- "rounded-ss",
- [
- "border-start-start-radius"
- ]
- ],
- [
- "rounded-se",
- [
- "border-start-end-radius"
- ]
- ],
- [
- "rounded-ee",
- [
- "border-end-end-radius"
- ]
- ],
- [
- "rounded-es",
- [
- "border-end-start-radius"
- ]
- ],
- [
- "rounded-tl",
- [
- "border-top-left-radius"
- ]
- ],
- [
- "rounded-tr",
- [
- "border-top-right-radius"
- ]
- ],
- [
- "rounded-br",
- [
- "border-bottom-right-radius"
- ]
- ],
- [
- "rounded-bl",
- [
- "border-bottom-left-radius"
- ]
- ]
- ]
- ]),
- borderWidth: (0, _createUtilityPlugin.default)("borderWidth", [
- [
- "border",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-width"
- ]
- ],
- [
- [
- "border-x",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-left-width",
- "border-right-width"
- ]
- ],
- [
- "border-y",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-top-width",
- "border-bottom-width"
- ]
- ]
- ],
- [
- [
- "border-s",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-inline-start-width"
- ]
- ],
- [
- "border-e",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-inline-end-width"
- ]
- ],
- [
- "border-t",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-top-width"
- ]
- ],
- [
- "border-r",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-right-width"
- ]
- ],
- [
- "border-b",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-bottom-width"
- ]
- ],
- [
- "border-l",
- [
- [
- "@defaults border-width",
- {}
- ],
- "border-left-width"
- ]
- ]
- ]
- ], {
- type: [
- "line-width",
- "length"
- ]
- }),
- borderStyle: ({ addUtilities })=>{
- addUtilities({
- ".border-solid": {
- "border-style": "solid"
- },
- ".border-dashed": {
- "border-style": "dashed"
- },
- ".border-dotted": {
- "border-style": "dotted"
- },
- ".border-double": {
- "border-style": "double"
- },
- ".border-hidden": {
- "border-style": "hidden"
- },
- ".border-none": {
- "border-style": "none"
- }
- });
- },
- borderColor: ({ matchUtilities , theme , corePlugins })=>{
- matchUtilities({
- border: (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "border-color",
- variable: "--tw-border-opacity"
- });
- }
- }, {
- values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))),
- type: [
- "color",
- "any"
- ]
- });
- matchUtilities({
- "border-x": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-left-color": (0, _toColorValue.default)(value),
- "border-right-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: [
- "border-left-color",
- "border-right-color"
- ],
- variable: "--tw-border-opacity"
- });
- },
- "border-y": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-top-color": (0, _toColorValue.default)(value),
- "border-bottom-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: [
- "border-top-color",
- "border-bottom-color"
- ],
- variable: "--tw-border-opacity"
- });
- }
- }, {
- values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))),
- type: [
- "color",
- "any"
- ]
- });
- matchUtilities({
- "border-s": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-inline-start-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "border-inline-start-color",
- variable: "--tw-border-opacity"
- });
- },
- "border-e": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-inline-end-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "border-inline-end-color",
- variable: "--tw-border-opacity"
- });
- },
- "border-t": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-top-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "border-top-color",
- variable: "--tw-border-opacity"
- });
- },
- "border-r": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-right-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "border-right-color",
- variable: "--tw-border-opacity"
- });
- },
- "border-b": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-bottom-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "border-bottom-color",
- variable: "--tw-border-opacity"
- });
- },
- "border-l": (value)=>{
- if (!corePlugins("borderOpacity")) {
- return {
- "border-left-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "border-left-color",
- variable: "--tw-border-opacity"
- });
- }
- }, {
- values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))),
- type: [
- "color",
- "any"
- ]
- });
- },
- borderOpacity: (0, _createUtilityPlugin.default)("borderOpacity", [
- [
- "border-opacity",
- [
- "--tw-border-opacity"
- ]
- ]
- ]),
- backgroundColor: ({ matchUtilities , theme , corePlugins })=>{
- matchUtilities({
- bg: (value)=>{
- if (!corePlugins("backgroundOpacity")) {
- return {
- "background-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "background-color",
- variable: "--tw-bg-opacity"
- });
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("backgroundColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- backgroundOpacity: (0, _createUtilityPlugin.default)("backgroundOpacity", [
- [
- "bg-opacity",
- [
- "--tw-bg-opacity"
- ]
- ]
- ]),
- backgroundImage: (0, _createUtilityPlugin.default)("backgroundImage", [
- [
- "bg",
- [
- "background-image"
- ]
- ]
- ], {
- type: [
- "lookup",
- "image",
- "url"
- ]
- }),
- gradientColorStops: (()=>{
- function transparentTo(value) {
- return (0, _withAlphaVariable.withAlphaValue)(value, 0, "rgb(255 255 255 / 0)");
- }
- return function({ matchUtilities , theme }) {
- let options = {
- values: (0, _flattenColorPalette.default)(theme("gradientColorStops")),
- type: [
- "color",
- "any"
- ]
- };
- let positionOptions = {
- values: theme("gradientColorStopPositions"),
- type: [
- "length",
- "percentage"
- ]
- };
- matchUtilities({
- from: (value)=>{
- let transparentToValue = transparentTo(value);
- return {
- "--tw-gradient-from": `${(0, _toColorValue.default)(value, "from")} var(--tw-gradient-from-position)`,
- "--tw-gradient-from-position": " ",
- "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-from-position)`,
- "--tw-gradient-to-position": " ",
- "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)`
- };
- }
- }, options);
- matchUtilities({
- from: (value)=>{
- return {
- "--tw-gradient-from-position": value
- };
- }
- }, positionOptions);
- matchUtilities({
- via: (value)=>{
- let transparentToValue = transparentTo(value);
- return {
- "--tw-gradient-via-position": " ",
- "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
- "--tw-gradient-to-position": " ",
- "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")} var(--tw-gradient-via-position), var(--tw-gradient-to)`
- };
- }
- }, options);
- matchUtilities({
- via: (value)=>{
- return {
- "--tw-gradient-via-position": value
- };
- }
- }, positionOptions);
- matchUtilities({
- to: (value)=>({
- "--tw-gradient-to": `${(0, _toColorValue.default)(value, "to")} var(--tw-gradient-to-position)`,
- "--tw-gradient-to-position": " "
- })
- }, options);
- matchUtilities({
- to: (value)=>{
- return {
- "--tw-gradient-to-position": value
- };
- }
- }, positionOptions);
- };
- })(),
- boxDecorationBreak: ({ addUtilities })=>{
- addUtilities({
- ".decoration-slice": {
- "box-decoration-break": "slice"
- },
- ".decoration-clone": {
- "box-decoration-break": "clone"
- },
- ".box-decoration-slice": {
- "box-decoration-break": "slice"
- },
- ".box-decoration-clone": {
- "box-decoration-break": "clone"
- }
- });
- },
- backgroundSize: (0, _createUtilityPlugin.default)("backgroundSize", [
- [
- "bg",
- [
- "background-size"
- ]
- ]
- ], {
- type: [
- "lookup",
- "length",
- "percentage",
- "size"
- ]
- }),
- backgroundAttachment: ({ addUtilities })=>{
- addUtilities({
- ".bg-fixed": {
- "background-attachment": "fixed"
- },
- ".bg-local": {
- "background-attachment": "local"
- },
- ".bg-scroll": {
- "background-attachment": "scroll"
- }
- });
- },
- backgroundClip: ({ addUtilities })=>{
- addUtilities({
- ".bg-clip-border": {
- "background-clip": "border-box"
- },
- ".bg-clip-padding": {
- "background-clip": "padding-box"
- },
- ".bg-clip-content": {
- "background-clip": "content-box"
- },
- ".bg-clip-text": {
- "background-clip": "text"
- }
- });
- },
- backgroundPosition: (0, _createUtilityPlugin.default)("backgroundPosition", [
- [
- "bg",
- [
- "background-position"
- ]
- ]
- ], {
- type: [
- "lookup",
- [
- "position",
- {
- preferOnConflict: true
- }
- ]
- ]
- }),
- backgroundRepeat: ({ addUtilities })=>{
- addUtilities({
- ".bg-repeat": {
- "background-repeat": "repeat"
- },
- ".bg-no-repeat": {
- "background-repeat": "no-repeat"
- },
- ".bg-repeat-x": {
- "background-repeat": "repeat-x"
- },
- ".bg-repeat-y": {
- "background-repeat": "repeat-y"
- },
- ".bg-repeat-round": {
- "background-repeat": "round"
- },
- ".bg-repeat-space": {
- "background-repeat": "space"
- }
- });
- },
- backgroundOrigin: ({ addUtilities })=>{
- addUtilities({
- ".bg-origin-border": {
- "background-origin": "border-box"
- },
- ".bg-origin-padding": {
- "background-origin": "padding-box"
- },
- ".bg-origin-content": {
- "background-origin": "content-box"
- }
- });
- },
- fill: ({ matchUtilities , theme })=>{
- matchUtilities({
- fill: (value)=>{
- return {
- fill: (0, _toColorValue.default)(value)
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("fill")),
- type: [
- "color",
- "any"
- ]
- });
- },
- stroke: ({ matchUtilities , theme })=>{
- matchUtilities({
- stroke: (value)=>{
- return {
- stroke: (0, _toColorValue.default)(value)
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("stroke")),
- type: [
- "color",
- "url",
- "any"
- ]
- });
- },
- strokeWidth: (0, _createUtilityPlugin.default)("strokeWidth", [
- [
- "stroke",
- [
- "stroke-width"
- ]
- ]
- ], {
- type: [
- "length",
- "number",
- "percentage"
- ]
- }),
- objectFit: ({ addUtilities })=>{
- addUtilities({
- ".object-contain": {
- "object-fit": "contain"
- },
- ".object-cover": {
- "object-fit": "cover"
- },
- ".object-fill": {
- "object-fit": "fill"
- },
- ".object-none": {
- "object-fit": "none"
- },
- ".object-scale-down": {
- "object-fit": "scale-down"
- }
- });
- },
- objectPosition: (0, _createUtilityPlugin.default)("objectPosition", [
- [
- "object",
- [
- "object-position"
- ]
- ]
- ]),
- padding: (0, _createUtilityPlugin.default)("padding", [
- [
- "p",
- [
- "padding"
- ]
- ],
- [
- [
- "px",
- [
- "padding-left",
- "padding-right"
- ]
- ],
- [
- "py",
- [
- "padding-top",
- "padding-bottom"
- ]
- ]
- ],
- [
- [
- "ps",
- [
- "padding-inline-start"
- ]
- ],
- [
- "pe",
- [
- "padding-inline-end"
- ]
- ],
- [
- "pt",
- [
- "padding-top"
- ]
- ],
- [
- "pr",
- [
- "padding-right"
- ]
- ],
- [
- "pb",
- [
- "padding-bottom"
- ]
- ],
- [
- "pl",
- [
- "padding-left"
- ]
- ]
- ]
- ]),
- textAlign: ({ addUtilities })=>{
- addUtilities({
- ".text-left": {
- "text-align": "left"
- },
- ".text-center": {
- "text-align": "center"
- },
- ".text-right": {
- "text-align": "right"
- },
- ".text-justify": {
- "text-align": "justify"
- },
- ".text-start": {
- "text-align": "start"
- },
- ".text-end": {
- "text-align": "end"
- }
- });
- },
- textIndent: (0, _createUtilityPlugin.default)("textIndent", [
- [
- "indent",
- [
- "text-indent"
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- verticalAlign: ({ addUtilities , matchUtilities })=>{
- addUtilities({
- ".align-baseline": {
- "vertical-align": "baseline"
- },
- ".align-top": {
- "vertical-align": "top"
- },
- ".align-middle": {
- "vertical-align": "middle"
- },
- ".align-bottom": {
- "vertical-align": "bottom"
- },
- ".align-text-top": {
- "vertical-align": "text-top"
- },
- ".align-text-bottom": {
- "vertical-align": "text-bottom"
- },
- ".align-sub": {
- "vertical-align": "sub"
- },
- ".align-super": {
- "vertical-align": "super"
- }
- });
- matchUtilities({
- align: (value)=>({
- "vertical-align": value
- })
- });
- },
- fontFamily: ({ matchUtilities , theme })=>{
- matchUtilities({
- font: (value)=>{
- let [families, options = {}] = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value : [
- value
- ];
- let { fontFeatureSettings , fontVariationSettings } = options;
- return {
- "font-family": Array.isArray(families) ? families.join(", ") : families,
- ...fontFeatureSettings === undefined ? {} : {
- "font-feature-settings": fontFeatureSettings
- },
- ...fontVariationSettings === undefined ? {} : {
- "font-variation-settings": fontVariationSettings
- }
- };
- }
- }, {
- values: theme("fontFamily"),
- type: [
- "lookup",
- "generic-name",
- "family-name"
- ]
- });
- },
- fontSize: ({ matchUtilities , theme })=>{
- matchUtilities({
- text: (value, { modifier })=>{
- let [fontSize, options] = Array.isArray(value) ? value : [
- value
- ];
- if (modifier) {
- return {
- "font-size": fontSize,
- "line-height": modifier
- };
- }
- let { lineHeight , letterSpacing , fontWeight } = (0, _isPlainObject.default)(options) ? options : {
- lineHeight: options
- };
- return {
- "font-size": fontSize,
- ...lineHeight === undefined ? {} : {
- "line-height": lineHeight
- },
- ...letterSpacing === undefined ? {} : {
- "letter-spacing": letterSpacing
- },
- ...fontWeight === undefined ? {} : {
- "font-weight": fontWeight
- }
- };
- }
- }, {
- values: theme("fontSize"),
- modifiers: theme("lineHeight"),
- type: [
- "absolute-size",
- "relative-size",
- "length",
- "percentage"
- ]
- });
- },
- fontWeight: (0, _createUtilityPlugin.default)("fontWeight", [
- [
- "font",
- [
- "fontWeight"
- ]
- ]
- ], {
- type: [
- "lookup",
- "number",
- "any"
- ]
- }),
- textTransform: ({ addUtilities })=>{
- addUtilities({
- ".uppercase": {
- "text-transform": "uppercase"
- },
- ".lowercase": {
- "text-transform": "lowercase"
- },
- ".capitalize": {
- "text-transform": "capitalize"
- },
- ".normal-case": {
- "text-transform": "none"
- }
- });
- },
- fontStyle: ({ addUtilities })=>{
- addUtilities({
- ".italic": {
- "font-style": "italic"
- },
- ".not-italic": {
- "font-style": "normal"
- }
- });
- },
- fontVariantNumeric: ({ addDefaults , addUtilities })=>{
- let cssFontVariantNumericValue = "var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)";
- addDefaults("font-variant-numeric", {
- "--tw-ordinal": " ",
- "--tw-slashed-zero": " ",
- "--tw-numeric-figure": " ",
- "--tw-numeric-spacing": " ",
- "--tw-numeric-fraction": " "
- });
- addUtilities({
- ".normal-nums": {
- "font-variant-numeric": "normal"
- },
- ".ordinal": {
- "@defaults font-variant-numeric": {},
- "--tw-ordinal": "ordinal",
- "font-variant-numeric": cssFontVariantNumericValue
- },
- ".slashed-zero": {
- "@defaults font-variant-numeric": {},
- "--tw-slashed-zero": "slashed-zero",
- "font-variant-numeric": cssFontVariantNumericValue
- },
- ".lining-nums": {
- "@defaults font-variant-numeric": {},
- "--tw-numeric-figure": "lining-nums",
- "font-variant-numeric": cssFontVariantNumericValue
- },
- ".oldstyle-nums": {
- "@defaults font-variant-numeric": {},
- "--tw-numeric-figure": "oldstyle-nums",
- "font-variant-numeric": cssFontVariantNumericValue
- },
- ".proportional-nums": {
- "@defaults font-variant-numeric": {},
- "--tw-numeric-spacing": "proportional-nums",
- "font-variant-numeric": cssFontVariantNumericValue
- },
- ".tabular-nums": {
- "@defaults font-variant-numeric": {},
- "--tw-numeric-spacing": "tabular-nums",
- "font-variant-numeric": cssFontVariantNumericValue
- },
- ".diagonal-fractions": {
- "@defaults font-variant-numeric": {},
- "--tw-numeric-fraction": "diagonal-fractions",
- "font-variant-numeric": cssFontVariantNumericValue
- },
- ".stacked-fractions": {
- "@defaults font-variant-numeric": {},
- "--tw-numeric-fraction": "stacked-fractions",
- "font-variant-numeric": cssFontVariantNumericValue
- }
- });
- },
- lineHeight: (0, _createUtilityPlugin.default)("lineHeight", [
- [
- "leading",
- [
- "lineHeight"
- ]
- ]
- ]),
- letterSpacing: (0, _createUtilityPlugin.default)("letterSpacing", [
- [
- "tracking",
- [
- "letterSpacing"
- ]
- ]
- ], {
- supportsNegativeValues: true
- }),
- textColor: ({ matchUtilities , theme , corePlugins })=>{
- matchUtilities({
- text: (value)=>{
- if (!corePlugins("textOpacity")) {
- return {
- color: (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "color",
- variable: "--tw-text-opacity"
- });
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("textColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- textOpacity: (0, _createUtilityPlugin.default)("textOpacity", [
- [
- "text-opacity",
- [
- "--tw-text-opacity"
- ]
- ]
- ]),
- textDecoration: ({ addUtilities })=>{
- addUtilities({
- ".underline": {
- "text-decoration-line": "underline"
- },
- ".overline": {
- "text-decoration-line": "overline"
- },
- ".line-through": {
- "text-decoration-line": "line-through"
- },
- ".no-underline": {
- "text-decoration-line": "none"
- }
- });
- },
- textDecorationColor: ({ matchUtilities , theme })=>{
- matchUtilities({
- decoration: (value)=>{
- return {
- "text-decoration-color": (0, _toColorValue.default)(value)
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("textDecorationColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- textDecorationStyle: ({ addUtilities })=>{
- addUtilities({
- ".decoration-solid": {
- "text-decoration-style": "solid"
- },
- ".decoration-double": {
- "text-decoration-style": "double"
- },
- ".decoration-dotted": {
- "text-decoration-style": "dotted"
- },
- ".decoration-dashed": {
- "text-decoration-style": "dashed"
- },
- ".decoration-wavy": {
- "text-decoration-style": "wavy"
- }
- });
- },
- textDecorationThickness: (0, _createUtilityPlugin.default)("textDecorationThickness", [
- [
- "decoration",
- [
- "text-decoration-thickness"
- ]
- ]
- ], {
- type: [
- "length",
- "percentage"
- ]
- }),
- textUnderlineOffset: (0, _createUtilityPlugin.default)("textUnderlineOffset", [
- [
- "underline-offset",
- [
- "text-underline-offset"
- ]
- ]
- ], {
- type: [
- "length",
- "percentage",
- "any"
- ]
- }),
- fontSmoothing: ({ addUtilities })=>{
- addUtilities({
- ".antialiased": {
- "-webkit-font-smoothing": "antialiased",
- "-moz-osx-font-smoothing": "grayscale"
- },
- ".subpixel-antialiased": {
- "-webkit-font-smoothing": "auto",
- "-moz-osx-font-smoothing": "auto"
- }
- });
- },
- placeholderColor: ({ matchUtilities , theme , corePlugins })=>{
- matchUtilities({
- placeholder: (value)=>{
- if (!corePlugins("placeholderOpacity")) {
- return {
- "&::placeholder": {
- color: (0, _toColorValue.default)(value)
- }
- };
- }
- return {
- "&::placeholder": (0, _withAlphaVariable.default)({
- color: value,
- property: "color",
- variable: "--tw-placeholder-opacity"
- })
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("placeholderColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- placeholderOpacity: ({ matchUtilities , theme })=>{
- matchUtilities({
- "placeholder-opacity": (value)=>{
- return {
- ["&::placeholder"]: {
- "--tw-placeholder-opacity": value
- }
- };
- }
- }, {
- values: theme("placeholderOpacity")
- });
- },
- caretColor: ({ matchUtilities , theme })=>{
- matchUtilities({
- caret: (value)=>{
- return {
- "caret-color": (0, _toColorValue.default)(value)
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("caretColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- accentColor: ({ matchUtilities , theme })=>{
- matchUtilities({
- accent: (value)=>{
- return {
- "accent-color": (0, _toColorValue.default)(value)
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("accentColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- opacity: (0, _createUtilityPlugin.default)("opacity", [
- [
- "opacity",
- [
- "opacity"
- ]
- ]
- ]),
- backgroundBlendMode: ({ addUtilities })=>{
- addUtilities({
- ".bg-blend-normal": {
- "background-blend-mode": "normal"
- },
- ".bg-blend-multiply": {
- "background-blend-mode": "multiply"
- },
- ".bg-blend-screen": {
- "background-blend-mode": "screen"
- },
- ".bg-blend-overlay": {
- "background-blend-mode": "overlay"
- },
- ".bg-blend-darken": {
- "background-blend-mode": "darken"
- },
- ".bg-blend-lighten": {
- "background-blend-mode": "lighten"
- },
- ".bg-blend-color-dodge": {
- "background-blend-mode": "color-dodge"
- },
- ".bg-blend-color-burn": {
- "background-blend-mode": "color-burn"
- },
- ".bg-blend-hard-light": {
- "background-blend-mode": "hard-light"
- },
- ".bg-blend-soft-light": {
- "background-blend-mode": "soft-light"
- },
- ".bg-blend-difference": {
- "background-blend-mode": "difference"
- },
- ".bg-blend-exclusion": {
- "background-blend-mode": "exclusion"
- },
- ".bg-blend-hue": {
- "background-blend-mode": "hue"
- },
- ".bg-blend-saturation": {
- "background-blend-mode": "saturation"
- },
- ".bg-blend-color": {
- "background-blend-mode": "color"
- },
- ".bg-blend-luminosity": {
- "background-blend-mode": "luminosity"
- }
- });
- },
- mixBlendMode: ({ addUtilities })=>{
- addUtilities({
- ".mix-blend-normal": {
- "mix-blend-mode": "normal"
- },
- ".mix-blend-multiply": {
- "mix-blend-mode": "multiply"
- },
- ".mix-blend-screen": {
- "mix-blend-mode": "screen"
- },
- ".mix-blend-overlay": {
- "mix-blend-mode": "overlay"
- },
- ".mix-blend-darken": {
- "mix-blend-mode": "darken"
- },
- ".mix-blend-lighten": {
- "mix-blend-mode": "lighten"
- },
- ".mix-blend-color-dodge": {
- "mix-blend-mode": "color-dodge"
- },
- ".mix-blend-color-burn": {
- "mix-blend-mode": "color-burn"
- },
- ".mix-blend-hard-light": {
- "mix-blend-mode": "hard-light"
- },
- ".mix-blend-soft-light": {
- "mix-blend-mode": "soft-light"
- },
- ".mix-blend-difference": {
- "mix-blend-mode": "difference"
- },
- ".mix-blend-exclusion": {
- "mix-blend-mode": "exclusion"
- },
- ".mix-blend-hue": {
- "mix-blend-mode": "hue"
- },
- ".mix-blend-saturation": {
- "mix-blend-mode": "saturation"
- },
- ".mix-blend-color": {
- "mix-blend-mode": "color"
- },
- ".mix-blend-luminosity": {
- "mix-blend-mode": "luminosity"
- },
- ".mix-blend-plus-lighter": {
- "mix-blend-mode": "plus-lighter"
- }
- });
- },
- boxShadow: (()=>{
- let transformValue = (0, _transformThemeValue.default)("boxShadow");
- let defaultBoxShadow = [
- `var(--tw-ring-offset-shadow, 0 0 #0000)`,
- `var(--tw-ring-shadow, 0 0 #0000)`,
- `var(--tw-shadow)`
- ].join(", ");
- return function({ matchUtilities , addDefaults , theme }) {
- addDefaults(" box-shadow", {
- "--tw-ring-offset-shadow": "0 0 #0000",
- "--tw-ring-shadow": "0 0 #0000",
- "--tw-shadow": "0 0 #0000",
- "--tw-shadow-colored": "0 0 #0000"
- });
- matchUtilities({
- shadow: (value)=>{
- value = transformValue(value);
- let ast = (0, _parseBoxShadowValue.parseBoxShadowValue)(value);
- for (let shadow of ast){
- // Don't override color if the whole shadow is a variable
- if (!shadow.valid) {
- continue;
- }
- shadow.color = "var(--tw-shadow-color)";
- }
- return {
- "@defaults box-shadow": {},
- "--tw-shadow": value === "none" ? "0 0 #0000" : value,
- "--tw-shadow-colored": value === "none" ? "0 0 #0000" : (0, _parseBoxShadowValue.formatBoxShadowValue)(ast),
- "box-shadow": defaultBoxShadow
- };
- }
- }, {
- values: theme("boxShadow"),
- type: [
- "shadow"
- ]
- });
- };
- })(),
- boxShadowColor: ({ matchUtilities , theme })=>{
- matchUtilities({
- shadow: (value)=>{
- return {
- "--tw-shadow-color": (0, _toColorValue.default)(value),
- "--tw-shadow": "var(--tw-shadow-colored)"
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("boxShadowColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- outlineStyle: ({ addUtilities })=>{
- addUtilities({
- ".outline-none": {
- outline: "2px solid transparent",
- "outline-offset": "2px"
- },
- ".outline": {
- "outline-style": "solid"
- },
- ".outline-dashed": {
- "outline-style": "dashed"
- },
- ".outline-dotted": {
- "outline-style": "dotted"
- },
- ".outline-double": {
- "outline-style": "double"
- }
- });
- },
- outlineWidth: (0, _createUtilityPlugin.default)("outlineWidth", [
- [
- "outline",
- [
- "outline-width"
- ]
- ]
- ], {
- type: [
- "length",
- "number",
- "percentage"
- ]
- }),
- outlineOffset: (0, _createUtilityPlugin.default)("outlineOffset", [
- [
- "outline-offset",
- [
- "outline-offset"
- ]
- ]
- ], {
- type: [
- "length",
- "number",
- "percentage",
- "any"
- ],
- supportsNegativeValues: true
- }),
- outlineColor: ({ matchUtilities , theme })=>{
- matchUtilities({
- outline: (value)=>{
- return {
- "outline-color": (0, _toColorValue.default)(value)
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("outlineColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- ringWidth: ({ matchUtilities , addDefaults , addUtilities , theme , config })=>{
- let ringColorDefault = (()=>{
- var _theme, _theme1;
- if ((0, _featureFlags.flagEnabled)(config(), "respectDefaultRingColorOpacity")) {
- return theme("ringColor.DEFAULT");
- }
- let ringOpacityDefault = theme("ringOpacity.DEFAULT", "0.5");
- if (!((_theme = theme("ringColor")) === null || _theme === void 0 ? void 0 : _theme.DEFAULT)) {
- return `rgb(147 197 253 / ${ringOpacityDefault})`;
- }
- return (0, _withAlphaVariable.withAlphaValue)((_theme1 = theme("ringColor")) === null || _theme1 === void 0 ? void 0 : _theme1.DEFAULT, ringOpacityDefault, `rgb(147 197 253 / ${ringOpacityDefault})`);
- })();
- addDefaults("ring-width", {
- "--tw-ring-inset": " ",
- "--tw-ring-offset-width": theme("ringOffsetWidth.DEFAULT", "0px"),
- "--tw-ring-offset-color": theme("ringOffsetColor.DEFAULT", "#fff"),
- "--tw-ring-color": ringColorDefault,
- "--tw-ring-offset-shadow": "0 0 #0000",
- "--tw-ring-shadow": "0 0 #0000",
- "--tw-shadow": "0 0 #0000",
- "--tw-shadow-colored": "0 0 #0000"
- });
- matchUtilities({
- ring: (value)=>{
- return {
- "@defaults ring-width": {},
- "--tw-ring-offset-shadow": `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`,
- "--tw-ring-shadow": `var(--tw-ring-inset) 0 0 0 calc(${value} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,
- "box-shadow": [
- `var(--tw-ring-offset-shadow)`,
- `var(--tw-ring-shadow)`,
- `var(--tw-shadow, 0 0 #0000)`
- ].join(", ")
- };
- }
- }, {
- values: theme("ringWidth"),
- type: "length"
- });
- addUtilities({
- ".ring-inset": {
- "@defaults ring-width": {},
- "--tw-ring-inset": "inset"
- }
- });
- },
- ringColor: ({ matchUtilities , theme , corePlugins })=>{
- matchUtilities({
- ring: (value)=>{
- if (!corePlugins("ringOpacity")) {
- return {
- "--tw-ring-color": (0, _toColorValue.default)(value)
- };
- }
- return (0, _withAlphaVariable.default)({
- color: value,
- property: "--tw-ring-color",
- variable: "--tw-ring-opacity"
- });
- }
- }, {
- values: Object.fromEntries(Object.entries((0, _flattenColorPalette.default)(theme("ringColor"))).filter(([modifier])=>modifier !== "DEFAULT")),
- type: [
- "color",
- "any"
- ]
- });
- },
- ringOpacity: (helpers)=>{
- let { config } = helpers;
- return (0, _createUtilityPlugin.default)("ringOpacity", [
- [
- "ring-opacity",
- [
- "--tw-ring-opacity"
- ]
- ]
- ], {
- filterDefault: !(0, _featureFlags.flagEnabled)(config(), "respectDefaultRingColorOpacity")
- })(helpers);
- },
- ringOffsetWidth: (0, _createUtilityPlugin.default)("ringOffsetWidth", [
- [
- "ring-offset",
- [
- "--tw-ring-offset-width"
- ]
- ]
- ], {
- type: "length"
- }),
- ringOffsetColor: ({ matchUtilities , theme })=>{
- matchUtilities({
- "ring-offset": (value)=>{
- return {
- "--tw-ring-offset-color": (0, _toColorValue.default)(value)
- };
- }
- }, {
- values: (0, _flattenColorPalette.default)(theme("ringOffsetColor")),
- type: [
- "color",
- "any"
- ]
- });
- },
- blur: ({ matchUtilities , theme })=>{
- matchUtilities({
- blur: (value)=>{
- return {
- "--tw-blur": `blur(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("blur")
- });
- },
- brightness: ({ matchUtilities , theme })=>{
- matchUtilities({
- brightness: (value)=>{
- return {
- "--tw-brightness": `brightness(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("brightness")
- });
- },
- contrast: ({ matchUtilities , theme })=>{
- matchUtilities({
- contrast: (value)=>{
- return {
- "--tw-contrast": `contrast(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("contrast")
- });
- },
- dropShadow: ({ matchUtilities , theme })=>{
- matchUtilities({
- "drop-shadow": (value)=>{
- return {
- "--tw-drop-shadow": Array.isArray(value) ? value.map((v)=>`drop-shadow(${v})`).join(" ") : `drop-shadow(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("dropShadow")
- });
- },
- grayscale: ({ matchUtilities , theme })=>{
- matchUtilities({
- grayscale: (value)=>{
- return {
- "--tw-grayscale": `grayscale(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("grayscale")
- });
- },
- hueRotate: ({ matchUtilities , theme })=>{
- matchUtilities({
- "hue-rotate": (value)=>{
- return {
- "--tw-hue-rotate": `hue-rotate(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("hueRotate"),
- supportsNegativeValues: true
- });
- },
- invert: ({ matchUtilities , theme })=>{
- matchUtilities({
- invert: (value)=>{
- return {
- "--tw-invert": `invert(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("invert")
- });
- },
- saturate: ({ matchUtilities , theme })=>{
- matchUtilities({
- saturate: (value)=>{
- return {
- "--tw-saturate": `saturate(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("saturate")
- });
- },
- sepia: ({ matchUtilities , theme })=>{
- matchUtilities({
- sepia: (value)=>{
- return {
- "--tw-sepia": `sepia(${value})`,
- "@defaults filter": {},
- filter: cssFilterValue
- };
- }
- }, {
- values: theme("sepia")
- });
- },
- filter: ({ addDefaults , addUtilities })=>{
- addDefaults("filter", {
- "--tw-blur": " ",
- "--tw-brightness": " ",
- "--tw-contrast": " ",
- "--tw-grayscale": " ",
- "--tw-hue-rotate": " ",
- "--tw-invert": " ",
- "--tw-saturate": " ",
- "--tw-sepia": " ",
- "--tw-drop-shadow": " "
- });
- addUtilities({
- ".filter": {
- "@defaults filter": {},
- filter: cssFilterValue
- },
- ".filter-none": {
- filter: "none"
- }
- });
- },
- backdropBlur: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-blur": (value)=>{
- return {
- "--tw-backdrop-blur": `blur(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropBlur")
- });
- },
- backdropBrightness: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-brightness": (value)=>{
- return {
- "--tw-backdrop-brightness": `brightness(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropBrightness")
- });
- },
- backdropContrast: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-contrast": (value)=>{
- return {
- "--tw-backdrop-contrast": `contrast(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropContrast")
- });
- },
- backdropGrayscale: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-grayscale": (value)=>{
- return {
- "--tw-backdrop-grayscale": `grayscale(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropGrayscale")
- });
- },
- backdropHueRotate: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-hue-rotate": (value)=>{
- return {
- "--tw-backdrop-hue-rotate": `hue-rotate(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropHueRotate"),
- supportsNegativeValues: true
- });
- },
- backdropInvert: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-invert": (value)=>{
- return {
- "--tw-backdrop-invert": `invert(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropInvert")
- });
- },
- backdropOpacity: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-opacity": (value)=>{
- return {
- "--tw-backdrop-opacity": `opacity(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropOpacity")
- });
- },
- backdropSaturate: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-saturate": (value)=>{
- return {
- "--tw-backdrop-saturate": `saturate(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropSaturate")
- });
- },
- backdropSepia: ({ matchUtilities , theme })=>{
- matchUtilities({
- "backdrop-sepia": (value)=>{
- return {
- "--tw-backdrop-sepia": `sepia(${value})`,
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- };
- }
- }, {
- values: theme("backdropSepia")
- });
- },
- backdropFilter: ({ addDefaults , addUtilities })=>{
- addDefaults("backdrop-filter", {
- "--tw-backdrop-blur": " ",
- "--tw-backdrop-brightness": " ",
- "--tw-backdrop-contrast": " ",
- "--tw-backdrop-grayscale": " ",
- "--tw-backdrop-hue-rotate": " ",
- "--tw-backdrop-invert": " ",
- "--tw-backdrop-opacity": " ",
- "--tw-backdrop-saturate": " ",
- "--tw-backdrop-sepia": " "
- });
- addUtilities({
- ".backdrop-filter": {
- "@defaults backdrop-filter": {},
- "backdrop-filter": cssBackdropFilterValue
- },
- ".backdrop-filter-none": {
- "backdrop-filter": "none"
- }
- });
- },
- transitionProperty: ({ matchUtilities , theme })=>{
- let defaultTimingFunction = theme("transitionTimingFunction.DEFAULT");
- let defaultDuration = theme("transitionDuration.DEFAULT");
- matchUtilities({
- transition: (value)=>{
- return {
- "transition-property": value,
- ...value === "none" ? {} : {
- "transition-timing-function": defaultTimingFunction,
- "transition-duration": defaultDuration
- }
- };
- }
- }, {
- values: theme("transitionProperty")
- });
- },
- transitionDelay: (0, _createUtilityPlugin.default)("transitionDelay", [
- [
- "delay",
- [
- "transitionDelay"
- ]
- ]
- ]),
- transitionDuration: (0, _createUtilityPlugin.default)("transitionDuration", [
- [
- "duration",
- [
- "transitionDuration"
- ]
- ]
- ], {
- filterDefault: true
- }),
- transitionTimingFunction: (0, _createUtilityPlugin.default)("transitionTimingFunction", [
- [
- "ease",
- [
- "transitionTimingFunction"
- ]
- ]
- ], {
- filterDefault: true
- }),
- willChange: (0, _createUtilityPlugin.default)("willChange", [
- [
- "will-change",
- [
- "will-change"
- ]
- ]
- ]),
- content: (0, _createUtilityPlugin.default)("content", [
- [
- "content",
- [
- "--tw-content",
- [
- "content",
- "var(--tw-content)"
- ]
- ]
- ]
- ])
- };
|