This repository has been archived by the owner on Apr 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
tailwind.config.js
185 lines (184 loc) · 6.23 KB
/
tailwind.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
const colors = require("tailwindcss/colors");
const plugin = require("tailwindcss/plugin");
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./app/**/*.tsx", "./node_modules/@vechaiui/**/*.{js,jsx,ts,tsx}"],
darkMode: "class",
theme: {
screens: {
xs: "425px",
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
"2xl": "1536px",
"3xl": "1600px",
"4xl": "2100px",
"5xl": "4200px",
},
letterSpacing: {
tightest: "-.1em",
tighter: "-.05em",
tight: "-.025em",
normal: "0",
wide: ".025em",
wider: ".05em",
widest: ".1em",
widest: ".25em",
},
extend: {
screens: {
xs: "425px",
},
colors: {
info: colors.blue,
success: colors.green,
warning: colors.yellow,
error: colors.red,
},
boxShadow: {
slider: "0 0 0 5px rgba(0, 0, 0, 0.3)",
},
textShadow: {
sm: "0 1px 2px var(--tw-shadow-color)",
DEFAULT: "0 2px 4px var(--tw-shadow-color)",
lg: "0 8px 16px var(--tw-shadow-color)",
},
keyframes: {
// Text shimmer
"text-shimmer": {
from: { backgroundPosition: "0 0" },
to: { backgroundPosition: "-200% 0" },
},
// Dropdown menu
"scale-in": {
"0%": { opacity: 0, transform: "scale(0)" },
"100%": { opacity: 1, transform: "scale(1)" },
},
"slide-down": {
"0%": { opacity: 0, transform: "translateY(-10px)" },
"100%": { opacity: 1, transform: "translateY(0)" },
},
"slide-up": {
"0%": { opacity: 0, transform: "translateY(10px)" },
"100%": { opacity: 1, transform: "translateY(0)" },
},
// Tooltip
"slide-up-fade": {
"0%": { opacity: 0, transform: "translateY(2px)" },
"100%": { opacity: 1, transform: "translateY(0)" },
},
"slide-right-fade": {
"0%": { opacity: 0, transform: "translateX(-2px)" },
"100%": { opacity: 1, transform: "translateX(0)" },
},
"slide-down-fade": {
"0%": { opacity: 0, transform: "translateY(-2px)" },
"100%": { opacity: 1, transform: "translateY(0)" },
},
"slide-left-fade": {
"0%": { opacity: 0, transform: "translateX(2px)" },
"100%": { opacity: 1, transform: "translateX(0)" },
},
// Navigation menu
"enter-from-right": {
"0%": { transform: "translateX(200px)", opacity: 0 },
"100%": { transform: "translateX(0)", opacity: 1 },
},
"enter-from-left": {
"0%": { transform: "translateX(-200px)", opacity: 0 },
"100%": { transform: "translateX(0)", opacity: 1 },
},
"exit-to-right": {
"0%": { transform: "translateX(0)", opacity: 1 },
"100%": { transform: "translateX(200px)", opacity: 0 },
},
"exit-to-left": {
"0%": { transform: "translateX(0)", opacity: 1 },
"100%": { transform: "translateX(-200px)", opacity: 0 },
},
"scale-in-content": {
"0%": { transform: "rotateX(-30deg) scale(0.9)", opacity: 0 },
"100%": { transform: "rotateX(0deg) scale(1)", opacity: 1 },
},
"scale-out-content": {
"0%": { transform: "rotateX(0deg) scale(1)", opacity: 1 },
"100%": { transform: "rotateX(-10deg) scale(0.95)", opacity: 0 },
},
"fade-in": {
"0%": { opacity: 0 },
"100%": { opacity: 1 },
},
"fade-out": {
"0%": { opacity: 1 },
"100%": { opacity: 0 },
},
// Toast
"toast-hide": {
"0%": { opacity: 1 },
"100%": { opacity: 0 },
},
"toast-slide-in-right": {
"0%": { transform: `translateX(calc(100% + 1rem))` },
"100%": { transform: "translateX(0)" },
},
"toast-slide-in-bottom": {
"0%": { transform: `translateY(calc(100% + 1rem))` },
"100%": { transform: "translateY(0)" },
},
"toast-swipe-out": {
"0%": { transform: "translateX(var(--radix-toast-swipe-end-x))" },
"100%": {
transform: `translateX(calc(100% + 1rem))`,
},
},
},
animation: {
// Text shimmer
"text-shimmer": "text-shimmer 5s ease-in-out infinite alternate",
// Dropdown menu
"scale-in": "scale-in 0.2s ease-in-out",
"slide-down": "slide-down 0.6s cubic-bezier(0.16, 1, 0.3, 1)",
"slide-up": "slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1)",
// Tooltip
"slide-up-fade": "slide-up-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
"slide-right-fade":
"slide-right-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
"slide-down-fade": "slide-down-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
"slide-left-fade": "slide-left-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
// Navigation menu
"enter-from-right": "enter-from-right 0.25s ease",
"enter-from-left": "enter-from-left 0.25s ease",
"exit-to-right": "exit-to-right 0.25s ease",
"exit-to-left": "exit-to-left 0.25s ease",
"scale-in-content": "scale-in-content 0.2s ease",
"scale-out-content": "scale-out-content 0.2s ease",
"fade-in": "fade-in 0.2s ease",
"fade-out": "fade-out 0.2s ease",
// Toast
"toast-hide": "toast-hide 100ms ease-in forwards",
"toast-slide-in-right":
"toast-slide-in-right 150ms cubic-bezier(0.16, 1, 0.3, 1)",
"toast-slide-in-bottom":
"toast-slide-in-bottom 150ms cubic-bezier(0.16, 1, 0.3, 1)",
"toast-swipe-out": "toast-swipe-out 100ms ease-out forwards",
},
},
},
plugins: [
require("tailwindcss-radix")(),
require("@tailwindcss/typography"),
require("@tailwindcss/forms"),
require("@tailwindcss/line-clamp"),
plugin(function ({ matchUtilities, theme }) {
matchUtilities(
{ "text-shadow": (value) => ({ textShadow: value }) },
{ values: theme("textShadow") },
);
}),
require("@vechaiui/core")({
cssBase: true,
colors: ["info", "success", "warning", "error"],
}),
],
};