@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and TailwindCSS
2 lines • 5.15 kB
JavaScript
import e from"clsx";import{extendTailwindMerge as t,fromTheme as n,twJoin as r,validators as i}from"tailwind-merge";const a=e=>{let t=Number(e);return!Number.isNaN(t)&&t>=1&&t<=20},o=/^\d+\/\d+$/,s=e=>o.test(e),c=/^h-(x+s|sm|md|lg|x+l)$/,l=e=>c.test(e),u=/^h-(x+s|sm|md|lg|x+l)$/,d=e=>u.test(e),f=t({extend:{theme:{borderRadius:[`browser`,`unset`,`0`,`md`,`rounded`,`sm`,`square`,`xs`]}},override:{classGroups:{content:[{content:[`none`,`empty`,`required`,`space`,i.isArbitraryValue]}],delay:[{delay:[`0`,`1`,i.isNumber,i.isArbitraryValue]}],duration:[{delay:[`0`,`1`,i.isNumber,i.isArbitraryValue]}],"font-size":[{text:[`size`,`size-browser`,`size-unset`,`display-1-xxs`,`display-1-md`,`display-2-xxs`,`display-2-md`,`display-wide-xxs`,`display-wide-md`,`heading-1-xxs`,`heading-1-md`,`heading-2-xxs`,`heading-2-md`,`heading-3`,`heading-4`,`body-1`,`body-2`,`caption`]}],"font-weight":[{font:`weight.weight-browser.weight-unset.weight-bold.weight-median.weight-medium.weight-normal.weight-standard.weight-display-1.weight-display-2.weight-display-wide.weight-heading-1.weight-heading-2.weight-heading-3.weight-heading-4.weight-body-1.weight-body-1-bold.weight-body-1-median.weight-body-1-link.weight-body-2.weight-body-2-bold.weight-body-2-median.weight-body-2-link.weight-caption-bold.weight-caption-median.weight-caption-link`.split(`.`)}],h:[{h:[i.isArbitraryValue,n(`spacing`),s,d,`auto`,`dvh`,`fit`,`full`,`lvh`,`max`,`min`,`screen`,`svh`,`unset`]}],leading:[{leading:[``,`none`,`browser`,`unset`,`display-1-xxs`,`display-1-md`,`display-2-xxs`,`display-2-md`,`display-wide-xxs`,`display-wide-md`,`heading-1-xxs`,`heading-1-md`,`heading-2-xxs`,`heading-2-md`,`heading-3`,`heading-4`,`body-1`,`body-2`,`caption`,i.isArbitraryValue]}],"max-h":[{"max-h":[i.isArbitraryValue,n(`spacing`),s,d,`dvh`,`fit`,`full`,`lvh`,`max`,`min`,`none`,`screen`,`svh`,`unset`]}],"max-w":[{"max-w":[i.isArbitraryValue,n(`spacing`),s,l,`fit`,`full`,`max`,`min`,`none`,`prose`,`unset`]}],"min-h":[{"min-h":[i.isArbitraryValue,n(`spacing`),s,d,`dvh`,`fit`,`full`,`lvh`,`max`,`min`,`none`,`screen`,`svh`,`unset`]}],"min-w":[{"min-w":[i.isArbitraryValue,n(`spacing`),s,l,`fit`,`full`,`max`,`min`,`none`,`prose`,`screen`,`unset`]}],shadow:[``,`unset`,`1`,`brutal-1`,`2`,`brutal-2`,`brutal`,`disabled`,`error`,`hover`,`none`,`primary`,`subtle`,`success`,`warning`],stroke:[{stroke:[``,`none`,`separator`,n(`colors`)]}],transition:[{transition:[``,`all`,`background-color`,`border-color`,`colors`,`margin`,`margin-bottom`,`margin-left`,`margin-top`,`margin-right`,`max-height`,`max-width`,`none`,`opacity`,`shadow`,`transform`,`unset`,i.isArbitraryValue]}],w:[{w:[i.isArbitraryValue,n(`spacing`),s,l,`auto`,`fit`,`full`,`max`,`min`,`none`,`prose`,`screen`,`unset`]}]},theme:{borderWidth:[``,`browser`,`unset`,`0`,`half`,`1`,`2`],spacing:[`browser`,`unset`,`0`,`px`,`quarter`,`half`,`one-and-half`,a]}}}),p=r;function m(...t){return f(e(t))}const h=p(`[&_.alternatee:nth-child(1):hover]:bg-decorative-pink-90`,`[&_.alternatee:nth-child(5n+1):hover]:bg-decorative-pink-90`,`[&_.alternatee:nth-child(1):focus]:bg-decorative-pink-90`,`[&_.alternatee:nth-child(5n+1):focus]:bg-decorative-pink-90`,`[&_.alternatee:nth-child(1)[data-highlighted]]:bg-decorative-pink-90`,`[&_.alternatee:nth-child(5n+1)[data-highlighted]]:bg-decorative-pink-90`,`[&_.alternatee:nth-child(2):hover]:bg-decorative-yellow-90`,`[&_.alternatee:nth-child(5n+2):hover]:bg-decorative-yellow-90`,`[&_.alternatee:nth-child(2):focus]:bg-decorative-yellow-90`,`[&_.alternatee:nth-child(5n+2):focus]:bg-decorative-yellow-90`,`[&_.alternatee:nth-child(2)[data-highlighted]]:bg-decorative-yellow-90`,`[&_.alternatee:nth-child(5n+2)[data-highlighted]]:bg-decorative-yellow-90`,`[&_.alternatee:nth-child(3):hover]:bg-decorative-green-90`,`[&_.alternatee:nth-child(5n+3):hover]:bg-decorative-green-90`,`[&_.alternatee:nth-child(3):focus]:bg-decorative-green-90`,`[&_.alternatee:nth-child(5n+3):focus]:bg-decorative-green-90`,`[&_.alternatee:nth-child(3)[data-highlighted]]:bg-decorative-green-90`,`[&_.alternatee:nth-child(5n+3)[data-highlighted]]:bg-decorative-green-90`,`[&_.alternatee:nth-child(4):hover]:bg-decorative-blue-90`,`[&_.alternatee:nth-child(5n+4):hover]:bg-decorative-blue-90`,`[&_.alternatee:nth-child(4):focus]:bg-decorative-blue-90`,`[&_.alternatee:nth-child(5n+4):focus]:bg-decorative-blue-90`,`[&_.alternatee:nth-child(4)[data-highlighted]]:bg-decorative-blue-90`,`[&_.alternatee:nth-child(5n+4)[data-highlighted]]:bg-decorative-blue-90`,`[&_.alternatee:nth-child(5):hover]:bg-decorative-purple-90`,`[&_.alternatee:nth-child(5n+5):hover]:bg-decorative-purple-90`,`[&_.alternatee:nth-child(5):focus]:bg-decorative-purple-90`,`[&_.alternatee:nth-child(5n+5):focus]:bg-decorative-purple-90`,`[&_.alternatee:nth-child(5)[data-highlighted]]:bg-decorative-purple-90`,`[&_.alternatee:nth-child(5n+5)[data-highlighted]]:bg-decorative-purple-90`);export{h as alternatingBgColorLightClassNames,p as cj,m as cn,f as customTwMerge,o as fractionRegex,u as heightTshirtUnitRegex,s as isFraction,d as isHeightTshirtSize,l as isTshirtSize,a as isValidSpacing,c as tshirtUnitRegex};
//# sourceMappingURL=helpers.js.map