@recastui/themes
Version:
Recastui Design System component themes with Tailwindcss and CVA
9 lines (5 loc) • 5.06 kB
JavaScript
'use strict';
var classVarianceAuthority = require('class-variance-authority');
var o=["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 l=(r=>(r.solid="solid",r.outline="outline",r.subtle="subtle",r))(l||{}),a={solid:{main:"bg-main-9 text-main-1",tomato:"bg-tomato-9 text-white",red:"bg-red-9 text-white",crimson:"bg-crimson-9 text-white",pink:"bg-pink-9 text-white",plum:"bg-plum-9 text-white",purple:"bg-purple-9 text-white",violet:"bg-violet-9 text-white",indigo:"bg-indigo-9 text-white",blue:"bg-blue-9 text-white",cyan:"bg-cyan-9 text-white",teal:"bg-teal-9 text-white",green:"bg-green-9 text-white",grass:"bg-grass-9 text-white",orange:"bg-orange-9 text-white",brown:"bg-brown-9 text-white",sky:"bg-sky-9 text-black",mint:"bg-mint-9 text-black",lime:"bg-lime-9 text-black",yellow:"bg-yellow-9 text-black",amber:"bg-amber-9 text-black",gold:"bg-gold-9 text-white",bronze:"bg-bronze-9 text-white",error:"bg-error-9 text-white",info:"bg-info-9 text-black",success:"bg-success-9 text-white",warning:"bg-warning-9 text-black"},subtle:{main:"bg-main-3 text-main-9",tomato:"bg-tomato-3 text-tomato-9",red:"bg-red-3 text-red-9",crimson:"bg-crimson-3 text-crimson-9",pink:"bg-pink-3 text-pink-9",plum:"bg-plum-3 text-plum-9",purple:"bg-purple-3 text-purple-9",violet:"bg-violet-3 text-violet-9",indigo:"bg-indigo-3 text-indigo-9",blue:"bg-blue-3 text-blue-9",cyan:"bg-cyan-3 text-cyan-9",teal:"bg-teal-3 text-teal-9",green:"bg-green-3 text-green-9",grass:"bg-grass-3 text-grass-9",orange:"bg-orange-3 text-orange-9",brown:"bg-brown-3 text-brown-9",sky:"bg-sky-3 text-sky-9",mint:"bg-mint-3 text-mint-9",lime:"bg-lime-3 text-lime-9",yellow:"bg-yellow-3 text-yellow-9",amber:"bg-amber-3 text-amber-9",gold:"bg-gold-3 text-gold-9",bronze:"bg-bronze-3 text-bronze-9",error:"bg-error-3 text-error-9",info:"bg-info-3 text-info-9",success:"bg-success-3 text-success-9",warning:"bg-warning-3 text-warning-9"},outline:{main:"bg-main-3 text-main-9 border-main-9",tomato:"bg-tomato-3 text-tomato-9 border-tomato-9",red:"bg-red-3 text-red-9 border-red-9",crimson:"bg-crimson-3 text-crimson-9 border-crimson-9",pink:"bg-pink-3 text-pink-9 border-pink-9",plum:"bg-plum-3 text-plum-9 border-plum-9",purple:"bg-purple-3 text-purple-9 border-purple-9",violet:"bg-violet-3 text-violet-9 border-violet-9",indigo:"bg-indigo-3 text-indigo-9 border-indigo-9",blue:"bg-blue-3 text-blue-9 border-blue-9",cyan:"bg-cyan-3 text-cyan-9 border-cyan-9",teal:"bg-teal-3 text-teal-9 border-teal-9",green:"bg-green-3 text-green-9 border-green-9",grass:"bg-grass-3 text-grass-9 border-grass-9",orange:"bg-orange-3 text-orange-9 border-orange-9",brown:"bg-brown-3 text-brown-9 border-brown-9",sky:"bg-sky-3 text-sky-9 border-sky-9",mint:"bg-mint-3 text-mint-9 border-mint-9",lime:"bg-lime-3 text-lime-9 border-lime-9",yellow:"bg-yellow-3 text-yellow-9 border-yellow-9",amber:"bg-amber-3 text-amber-9 border-amber-9",gold:"bg-gold-3 text-gold-9 border-gold-9",bronze:"bg-bronze-3 text-bronze-9 border-bronze-9",error:"bg-red-3 text-error-9 border-error-9",info:"bg-sky-3 text-info-9 border-info-9",success:"bg-green-3 text-success-9 border-success-9",warning:"bg-amber-3 text-warning-9 border-warning-9"}},b={main:"text-white",tomato:"text-white",red:"text-white",crimson:"text-white",pink:"text-white",plum:"text-white",purple:"text-white",violet:"text-white",indigo:"text-white",blue:"text-white",cyan:"text-white",teal:"text-white",green:"text-white",grass:"text-white",orange:"text-white",brown:"text-white",sky:"text-black",mint:"text-black",lime:"text-black",yellow:"text-black",amber:"text-black",gold:"text-white",bronze:"text-white",error:"text-white",info:"text-black",success:"text-white",warning:"text-black"},i=e=>o.map(n=>({variant:l[e],color:n,class:a[e][n]})),s=()=>o.map(e=>({variant:"solid",color:e,class:b[e]})),g=[...i("solid"),...i("outline"),...i("subtle")],d={base:classVarianceAuthority.cva("p-4 flex relative",{variants:{variant:{subtle:"",solid:"",outline:"border-2"},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:""}},compoundVariants:g,defaultVariants:{color:"info",variant:"subtle"}}),body:classVarianceAuthority.cva("flex-1"),icon:classVarianceAuthority.cva("mr-2 w-5 h-5"),title:classVarianceAuthority.cva("flex text-base font-semibold justify-between items-center mb-2"),description:classVarianceAuthority.cva("text-sm",{variants:{variant:{subtle:"",solid:"",outline:""},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:""}},compoundVariants:s()})};
exports.AlertVariantTypes = l;
exports.alert = d;