@@ -20,11 +20,15 @@ export const COLORS = [
2020 "purple" ,
2121 "fuchsia" ,
2222 "pink" ,
23- "rose"
23+ "rose" ,
24+ "primary" ,
25+ "secondary"
2426] ;
2527
2628export const DEFAULT_COLOR = "blue" ;
2729
30+ // Beware, these maps of colors cannot be replaced with functions using string interpolation such as `bg-${color}-100`
31+ // as described in Tailwind documentation https://tailwindcss.com/docs/content-configuration#dynamic-class-names
2832export const BG_COLOR = {
2933 100 : {
3034 blue : "bg-blue-100" ,
@@ -43,7 +47,9 @@ export const BG_COLOR = {
4347 violet : "bg-violet-100" ,
4448 fuchsia : "bg-fuchsia-100" ,
4549 pink : "bg-pink-100" ,
46- rose : "bg-rose-100"
50+ rose : "bg-rose-100" ,
51+ primary : "bg-primary-100" ,
52+ secondary : "bg-secondary-100"
4753 } ,
4854 200 : {
4955 blue : "bg-blue-200" ,
@@ -62,7 +68,9 @@ export const BG_COLOR = {
6268 violet : "bg-violet-200" ,
6369 fuchsia : "bg-fuchsia-200" ,
6470 pink : "bg-pink-200" ,
65- rose : "bg-rose-200"
71+ rose : "bg-rose-200" ,
72+ primary : "bg-primary-200" ,
73+ secondary : "bg-secondary-200"
6674 } ,
6775 500 : {
6876 blue : "bg-blue-500" ,
@@ -81,7 +89,9 @@ export const BG_COLOR = {
8189 violet : "bg-violet-500" ,
8290 fuchsia : "bg-fuchsia-500" ,
8391 pink : "bg-pink-500" ,
84- rose : "bg-rose-500"
92+ rose : "bg-rose-500" ,
93+ primary : "bg-primary-500" ,
94+ secondary : "bg-secondary-500"
8595 } ,
8696 hover : {
8797 blue : "hover:bg-blue-600" ,
@@ -100,11 +110,34 @@ export const BG_COLOR = {
100110 violet : "hover:bg-violet-600" ,
101111 fuchsia : "hover:bg-fuchsia-600" ,
102112 pink : "hover:bg-pink-600" ,
103- rose : "hover:bg-rose-600"
113+ rose : "hover:bg-rose-600" ,
114+ primary : "hover:bg-primary-600" ,
115+ secondary : "hover:bg-secondary-600"
104116 }
105117} ;
106118
107119export const TEXT_COLOR = {
120+ 500 : {
121+ blue : "text-blue-500" ,
122+ orange : "text-orange-500" ,
123+ yellow : "text-yellow-500" ,
124+ red : "text-red-500" ,
125+ purple : "text-purple-500" ,
126+ amber : "text-amber-500" ,
127+ lime : "text-lime-500" ,
128+ green : "text-green-500" ,
129+ emerald : "text-emerald-500" ,
130+ teal : "text-teal-500" ,
131+ cyan : "text-cyan-500" ,
132+ sky : "text-sky-500" ,
133+ indigo : "text-indigo-500" ,
134+ violet : "text-violet-500" ,
135+ fuchsia : "text-fuchsia-500" ,
136+ pink : "text-pink-500" ,
137+ rose : "text-rose-500" ,
138+ primary : "text-primary-500" ,
139+ secondary : "text-secondary-500"
140+ } ,
108141 600 : {
109142 blue : "text-blue-600 dark:text-blue-400 dark:hover:text-blue-400" ,
110143 orange : "text-orange-600 dark:text-orange-400 dark:hover:text-orange-400" ,
@@ -122,7 +155,9 @@ export const TEXT_COLOR = {
122155 violet : "text-violet-600 dark:text-violet-400 dark:hover:text-violet-400" ,
123156 fuchsia : "text-fuchsia-600 dark:text-fuchsia-400 dark:hover:text-fuchsia-400" ,
124157 pink : "text-pink-600 dark:text-pink-400 dark:hover:text-pink-400" ,
125- rose : "text-rose-600 dark:text-rose-400 dark:hover:text-rose-400"
158+ rose : "text-rose-600 dark:text-rose-400 dark:hover:text-rose-400" ,
159+ primary : "text-primary-600 dark:text-primary-400 dark:hover:text-primary-400" ,
160+ secondary : "text-secondary-600 dark:text-secondary-400 dark:hover:text-secondary-400"
126161 } ,
127162 hover : {
128163 blue : "hover:text-blue-700" ,
@@ -141,7 +176,9 @@ export const TEXT_COLOR = {
141176 violet : "hover:text-violet-700" ,
142177 fuchsia : "hover:text-fuchsia-700" ,
143178 pink : "hover:text-pink-700" ,
144- rose : "hover:text-rose-700"
179+ rose : "hover:text-rose-700" ,
180+ primary : "hover:text-primary-700" ,
181+ secondary : "hover:text-secondary-700"
145182 }
146183} ;
147184
@@ -163,7 +200,9 @@ export const BORDER_COLOR = {
163200 violet : "border-violet-500" ,
164201 fuchsia : "border-fuchsia-500" ,
165202 pink : "border-pink-500" ,
166- rose : "border-rose-500"
203+ rose : "border-rose-500" ,
204+ primary : "border-primary-500" ,
205+ secondary : "border-secondary-500"
167206 } ,
168207 focus : {
169208 blue : "focus:border-blue-500" ,
@@ -182,7 +221,9 @@ export const BORDER_COLOR = {
182221 violet : "focus:border-violet-500" ,
183222 fuchsia : "focus:border-fuchsia-500" ,
184223 pink : "focus:border-pink-500" ,
185- rose : "focus:border-rose-500"
224+ rose : "focus:border-rose-500" ,
225+ primary : "focus:border-primary-500" ,
226+ secondary : "focus:border-secondary-500"
186227 }
187228} ;
188229
@@ -204,7 +245,9 @@ export const RING_COLOR = {
204245 violet : "focus:ring-violet-500" ,
205246 fuchsia : "focus:ring-fuchsia-500" ,
206247 pink : "focus:ring-pink-500" ,
207- rose : "focus:ring-rose-500"
248+ rose : "focus:ring-rose-500" ,
249+ primary : "focus:ring-primary-500" ,
250+ secondary : "focus:ring-secondary-500"
208251 } ,
209252 "second-focus" : {
210253 blue : "focus:ring-blue-500/20" ,
@@ -223,7 +266,33 @@ export const RING_COLOR = {
223266 violet : "focus:ring-violet-500/20" ,
224267 fuchsia : "focus:ring-fuchsia-500/20" ,
225268 pink : "focus:ring-pink-500/20" ,
226- rose : "focus:ring-rose-500/20"
269+ rose : "focus:ring-rose-500/20" ,
270+ primary : "focus:ring-primary-500/20" ,
271+ secondary : "focus:ring-secondary-500/20"
272+ }
273+ } ;
274+
275+ export const BUTTON_COLOR = {
276+ focus : {
277+ blue : "focus:ring-blue-500/50 focus:bg-blue-100/50" ,
278+ orange : "focus:ring-orange-500/50 focus:bg-orange-100/50" ,
279+ yellow : "focus:ring-yellow-500/50 focus:bg-yellow-100/50" ,
280+ red : "focus:ring-red-500/50 focus:bg-red-100/50" ,
281+ purple : "focus:ring-purple-500/50 focus:bg-purple-100/50" ,
282+ amber : "focus:ring-amber-500/50 focus:bg-amber-100/50" ,
283+ lime : "focus:ring-lime-500/50 focus:bg-lime-100/50" ,
284+ green : "focus:ring-green-500/50 focus:bg-green-100/50" ,
285+ emerald : "focus:ring-emerald-500/50 focus:bg-emerald-100/50" ,
286+ teal : "focus:ring-teal-500/50 focus:bg-teal-100/50" ,
287+ cyan : "focus:ring-cyan-500/50 focus:bg-cyan-100/50" ,
288+ sky : "focus:ring-sky-500/50 focus:bg-sky-100/50" ,
289+ indigo : "focus:ring-indigo-500/50 focus:bg-indigo-100/50" ,
290+ violet : "focus:ring-violet-500/50 focus:bg-violet-100/50" ,
291+ fuchsia : "focus:ring-fuchsia-500/50 focus:bg-fuchsia-100/50" ,
292+ pink : "focus:ring-pink-500/50 focus:bg-pink-100/50" ,
293+ rose : "focus:ring-rose-500/50 focus:bg-rose-100/50" ,
294+ primary : "focus:ring-primary-500/50 focus:bg-primary-100/50" ,
295+ secondary : "focus:ring-secondary-500/50 focus:bg-secondary-100/50"
227296 }
228297} ;
229298
0 commit comments