@recastui/themes
Version:
Recastui Design System component themes with Tailwindcss and CVA
9 lines (5 loc) • 7.28 kB
JavaScript
'use strict';
var classVarianceAuthority = require('class-variance-authority');
var n=["main","tomato","red","crimson","pink","plum","purple","violet","indigo","blue","cyan","teal","green","grass","orange","brown","sky","mint","lime","yellow","amber","gold","bronze","error","info","success","warning"];var i=(e=>(e.solid="solid",e.outline="outline",e.ghost="ghost",e.link="link",e))(i||{}),b={solid:{main:"bg-main-9 hover:bg-main-10 text-main-1",tomato:"bg-tomato-9 hover:bg-tomato-10 text-white",red:"bg-red-9 hover:bg-red-10 text-white",crimson:"bg-crimson-9 hover:bg-crimson-10 text-white",pink:"bg-pink-9 hover:bg-pink-10 text-white",plum:"bg-plum-9 hover:bg-plum-10 text-white",purple:"bg-purple-9 hover:bg-purple-10 text-white",violet:"bg-violet-9 hover:bg-violet-10 text-white",indigo:"bg-indigo-9 hover:bg-indigo-10 text-white",blue:"bg-blue-9 hover:bg-blue-10 text-white",cyan:"bg-cyan-9 hover:bg-cyan-10 text-white",teal:"bg-teal-9 hover:bg-teal-10 text-white",green:"bg-green-9 hover:bg-green-10 text-white",grass:"bg-grass-9 hover:bg-grass-10 text-white",orange:"bg-orange-9 hover:bg-orange-10 text-white",brown:"bg-brown-9 hover:bg-brown-10 text-white",sky:"bg-sky-9 hover:bg-sky-10 text-black",mint:"bg-mint-9 hover:bg-mint-10 text-black",lime:"bg-lime-9 hover:bg-lime-10 text-black",yellow:"bg-yellow-9 hover:bg-yellow-10 text-black",amber:"bg-amber-9 hover:bg-amber-10 text-black",gold:"bg-gold-9 hover:bg-gold-10 text-white",bronze:"bg-bronze-9 hover:bg-bronze-10 text-white",error:"bg-error-9 hover:bg-error-10 text-white",info:"bg-info-9 hover:bg-info-10 text-black",success:"bg-success-9 hover:bg-success-10 text-white",warning:"bg-warning-9 hover:bg-warning-10 text-black"},outline:{main:"bg-main-3 hover:bg-main-4 text-main-9 border-main-9",tomato:"bg-tomato-3 hover:bg-tomato-4 text-tomato-9 border-tomato-9",red:"bg-red-3 hover:bg-red-4 text-red-9 border-red-9",crimson:"bg-crimson-3 hover:bg-crimson-4 text-crimson-9 border-crimson-9",pink:"bg-pink-3 hover:bg-pink-4 text-pink-9 border-pink-9",plum:"bg-plum-3 hover:bg-plum-4 text-plum-9 border-plum-9",purple:"bg-purple-3 hover:bg-purple-4 text-purple-9 border-purple-9",violet:"bg-violet-3 hover:bg-violet-4 text-violet-9 border-violet-9",indigo:"bg-indigo-3 hover:bg-indigo-4 text-indigo-9 border-indigo-9",blue:"bg-blue-3 hover:bg-blue-4 text-blue-9 border-blue-9",cyan:"bg-cyan-3 hover:bg-cyan-4 text-cyan-9 border-cyan-9",teal:"bg-teal-3 hover:bg-teal-4 text-teal-9 border-teal-9",green:"bg-green-3 hover:bg-green-4 text-green-9 border-green-9",grass:"bg-grass-3 hover:bg-grass-4 text-grass-9 border-grass-9",orange:"bg-orange-3 hover:bg-orange-4 text-orange-9 border-orange-9",brown:"bg-brown-3 hover:bg-brown-4 text-brown-9 border-brown-9",sky:"bg-sky-3 hover:bg-sky-4 text-sky-9 border-sky-9",mint:"bg-mint-3 hover:bg-mint-4 text-mint-9 border-mint-9",lime:"bg-lime-3 hover:bg-lime-4 text-lime-9 border-lime-9",yellow:"bg-yellow-3 hover:bg-yellow-4 text-yellow-9 border-yellow-9",amber:"bg-amber-3 hover:bg-amber-4 text-amber-9 border-amber-9",gold:"bg-gold-3 hover:bg-gold-4 text-gold-9 border-gold-9",bronze:"bg-bronze-3 hover:bg-bronze-4 text-bronze-9 border-bronze-9",error:"bg-error-3 hover:bg-error-4 text-error-9 border-error-9",info:"bg-info-3 hover:bg-info-4 text-info-9 border-info-9",success:"bg-success-3 hover:bg-success-4 text-success-9 border-success-9",warning:"bg-warning-3 hover:bg-warning-4 text-warning-9 border-warning-9"},ghost:{main:"hover:bg-main-3 text-main-9",tomato:"hover:bg-tomato-3 text-tomato-9",red:"hover:bg-red-3 text-red-9",crimson:"hover:bg-crimson-3 text-crimson-9",pink:"hover:bg-pink-3 text-pink-9",plum:"hover:bg-plum-3 text-plum-9",purple:"hover:bg-purple-3 text-purple-9",violet:"hover:bg-violet-3 text-violet-9",indigo:"hover:bg-indigo-3 text-indigo-9",blue:"hover:bg-blue-3 text-blue-9",cyan:"hover:bg-cyan-3 text-cyan-9",teal:"hover:bg-teal-3 text-teal-9",green:"hover:bg-green-3 text-green-9",grass:"hover:bg-grass-3 text-grass-9",orange:"hover:bg-orange-3 text-orange-9",brown:"hover:bg-brown-3 text-brown-9",sky:"hover:bg-sky-3 text-sky-9",mint:"hover:bg-mint-3 text-mint-9",lime:"hover:bg-lime-3 text-lime-9",yellow:"hover:bg-yellow-3 text-yellow-9",amber:"hover:bg-amber-3 text-amber-9",gold:"hover:bg-gold-3 text-gold-9",bronze:"hover:bg-bronze-3 text-bronze-9",error:"hover:bg-error-3 text-error-9",info:"hover:bg-info-3 text-info-9",success:"hover:bg-success-3 text-success-9",warning:"hover:bg-warning-3 text-warning-9"},link:{main:"underline hover:no-underline text-main-9 p-0",tomato:"underline hover:no-underline text-tomato-9 p-0",red:"underline hover:no-underline text-red-9 p-0",crimson:"underline hover:no-underline text-crimson-9 p-0",pink:"underline hover:no-underline text-pink-9 p-0",plum:"underline hover:no-underline text-plum-9 p-0",purple:"underline hover:no-underline text-purple-9 p-0",violet:"underline hover:no-underline text-violet-9 p-0",indigo:"underline hover:no-underline text-indigo-9 p-0",blue:"underline hover:no-underline text-blue-9 p-0",cyan:"underline hover:no-underline text-cyan-9 p-0",teal:"underline hover:no-underline text-teal-9 p-0",green:"underline hover:no-underline text-green-9 p-0",grass:"underline hover:no-underline text-grass-9 p-0",orange:"underline hover:no-underline text-orange-9 p-0",brown:"underline hover:no-underline text-brown-9 p-0",sky:"underline hover:no-underline text-sky-9 p-0",mint:"underline hover:no-underline text-mint-9 p-0",lime:"underline hover:no-underline text-lime-9 p-0",yellow:"underline hover:no-underline text-yellow-9 p-0",amber:"underline hover:no-underline text-amber-9 p-0",gold:"underline hover:no-underline text-gold-9 p-0",bronze:"underline hover:no-underline text-bronze-9 p-0",error:"underline hover:no-underline text-error-9 p-0",info:"underline hover:no-underline text-info-9 p-0",success:"underline hover:no-underline text-success-9 p-0",warning:"underline hover:no-underline text-warning-9 p-0"}},r=o=>n.map(t=>({variant:i[o],color:t,class:b[o][t]})),g=[...r("solid"),...r("outline"),...r("ghost"),...r("link")],u=classVarianceAuthority.cva(["inline-flex","leading-normal","items-center","justify-center","text-center","transition-all","font-semibold","border","border-transparent","overflow-hidden","focus:outline-none","focus-visible:ring-2","ring-gray-10","outline-none","border"],{variants:{variant:{solid:"",outline:"",ghost:"",link:"",unstyled:"ring-0 ring-offset-0 border-0"},color:{main:"",tomato:"",red:"",crimson:"",pink:"",plum:"",purple:"",violet:"",indigo:"",blue:"",cyan:"",teal:"",green:"",grass:"",orange:"",brown:"",sky:"",mint:"",lime:"",yellow:"",amber:"",gold:"",bronze:"",error:"",info:"",success:"",warning:""},fullWidth:{true:"w-full"},disabled:{true:"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-inherit"},pill:{true:"rounded-full"},rounded:{true:"rounded"},square:{xs:"text-xs w-9 h-9 !p-0",sm:"text-sm w-10 h-10 !p-0",base:"text-base w-11 h-11 !p-0",lg:"text-base w-12 h-12 !p-0",xl:"text-lg w-14 h-14 !p-0"},size:{xs:"text-xs px-3.5 py-1",sm:"text-sm px-4 py-1.5",base:"text-base px-4.5 py-2",lg:"text-lg px-5 py-2",xl:"text-xl px-7 py-2.5"}},compoundVariants:g,defaultVariants:{variant:"solid",color:"main",size:"base"}});
exports.ButtonVariantTypes = i;
exports.button = u;