forked from ariakit/ariakit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.cjs
211 lines (184 loc) · 6.92 KB
/
tailwind.config.cjs
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
// @ts-nocheck
const path = require("path");
const black = "hsl(204 10% 10%)";
const white = "hsl(204 20% 100%)";
/** @type {import('tailwindcss/tailwind-config').TailwindConfig} */
module.exports = {
content: [
path.join(__dirname, "guide/**/site-icon.tsx"),
path.join(__dirname, "components/**/site-icon.tsx"),
path.join(__dirname, "examples/**/site-icon.tsx"),
path.join(__dirname, "blog/**/site-icon.tsx"),
path.join(__dirname, "guide/**/*.md"),
path.join(__dirname, "blog/**/*.md"),
path.join(__dirname, "components/**/*.md"),
path.join(__dirname, "examples/**/*.md"),
path.join(__dirname, "website/app/**/*.{ts,tsx}"),
path.join(__dirname, "website/components/**/*.{ts,tsx}"),
path.join(__dirname, "website/icons/**/*.{ts,tsx}"),
],
darkMode: "class",
theme: {
extend: {
colors: {
inherit: "inherit",
black,
white,
gray: {
50: "hsl(204 20% 99%)",
100: "hsl(204 20% 96%)",
150: "hsl(204 20% 94%)",
200: "hsl(204 20% 91%)",
250: "hsl(204 20% 88%)",
300: "hsl(204 20% 82%)",
350: "hsl(204 10% 70%)",
400: "hsl(204 10% 50%)",
450: "hsl(204 3% 34%)",
500: "hsl(204 3% 30%)",
550: "hsl(204 3% 28%)",
600: "hsl(204 3% 26%)",
650: "hsl(204 3% 22%)",
700: "hsl(204 3% 18%)",
750: "hsl(204 3% 16%)",
800: "hsl(204 3% 14%)",
850: "hsl(204 3% 12%)",
900: "hsl(204 3% 10%)",
},
blue: {
50: "hsl(204 100% 90%)",
100: "hsl(204 100% 86%)",
200: "hsl(204 100% 80%)",
300: "hsl(204 100% 72%)",
400: "hsl(204 100% 64%)",
500: "hsl(204 100% 58%)",
600: "hsl(204 100% 40%)",
700: "hsl(204 100% 35%)",
800: "hsl(204 100% 32%)",
900: "hsl(204 100% 30%)",
},
red: {
50: "hsl(357 100% 90%)",
100: "hsl(357 56% 90%)",
200: "hsl(357 56% 86%)",
300: "hsl(357 56% 80%)",
400: "hsl(357 56% 72%)",
500: "hsl(357 56% 64%)",
600: "hsl(357 56% 50%)",
700: "hsl(357 56% 42%)",
800: "hsl(357 100% 30%)",
900: "hsl(357 56% 30%)",
},
},
},
dropShadow: {
sm: "drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",
"sm-dark": "drop-shadow(0 1px 1px rgb(0 0 0 / 0.15))",
DEFAULT:
"drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))",
dark: "drop-shadow(0 1px 2px rgb(0 0 0 / 0.3)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))",
md: "drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",
"md-dark":
"drop-shadow(0 4px 3px rgb(0 0 0 / 0.21)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",
lg: "drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",
"lg-dark":
"drop-shadow(0 10px 8px rgb(0 0 0 / 0.12)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",
xl: "drop-shadow(0 18px 10px rgb(0 0 0 / 0.04)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.1))",
"xl-dark":
"drop-shadow(0 18px 10px rgb(0 0 0 / 0.12)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.1))",
"2xl": "drop-shadow(0 25px 20px rgb(0 0 0 / 0.15))",
"2xl-dark": "drop-shadow(0 25px 20px rgb(0 0 0 / 0.34))",
none: "drop-shadow(0 0 #0000)",
},
boxShadow: {
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
"sm-dark": "0 1px 2px 0 rgb(0 0 0 / 0.15)",
DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
dark: "0 1px 3px 0 rgb(0 0 0 / 0.25), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
"md-dark":
"0 4px 6px -1px rgb(0 0 0 / 0.25), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
"lg-dark":
"0 10px 15px -3px rgb(0 0 0 / 0.25), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08)",
"xl-dark":
"0 20px 25px -5px rgb(0 0 0 / 0.25), 0 8px 10px -6px rgb(0 0 0 / 0.08)",
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
"2xl-dark": "0 25px 50px -12px rgb(0 0 0 / 0.75)",
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
"inner-dark": "inset 0 2px 4px 0 rgb(0 0 0 / 0.15)",
button: "inset 0 -1px 2px 0 rgb(0 0 0 / 0.05)",
"button-dark":
"0 1px 2px 0 rgb(0 0 0 / 0.15), inset 0 1px 0 0 rgb(255 255 255 / 0.05)",
input:
"inset 0 0 0 1px rgba(0 0 0 / 0.1), inset 0 2px 5px 0 rgba(0 0 0 / 0.05)",
"input-dark":
"inset 0 0 0 1px rgba(255 255 255 / 0.12), inset 0 -1px 0 0 rgba(255 255 255 / 0.05), inset 0 2px 5px 0 rgba(0 0 0 / 0.15)",
none: "0 0 #0000",
},
fontFamily: {
mono: ["Menlo", "Consolas", "Courier New", "monospace"],
},
},
corePlugins: {
backgroundOpacity: false,
borderOpacity: false,
textOpacity: false,
dropShadow: false,
boxShadow: false,
},
plugins: [
require("tailwindcss-animate"),
{
handler: ({ addUtilities, matchUtilities, addVariant, theme }) => {
const dropShadow = theme("dropShadow");
const dropShadowUtils = Object.entries(dropShadow).reduce(
(acc, [key, shadow]) => {
acc[`.drop-shadow${key === "DEFAULT" ? "" : `-${key}`}`] = {
filter: shadow,
};
return acc;
},
{},
);
addUtilities(dropShadowUtils);
const boxShadow = theme("boxShadow");
const boxShadowUtils = Object.entries(boxShadow).reduce(
(acc, [key, shadow]) => {
acc[`.shadow${key === "DEFAULT" ? "" : `-${key}`}`] = {
"box-shadow": `${shadow}`,
};
return acc;
},
{},
);
addUtilities(boxShadowUtils);
addUtilities({
".ariakit-outline": {
outline: `2px solid ${theme("colors.blue.600")}`,
outlineOffset: "2px",
},
".ariakit-outline-input": {
outline: `2px solid ${theme("colors.blue.600")}`,
outlineOffset: "-1px",
},
});
addVariant(
"supports-backdrop-blur",
"@supports (backdrop-filter: blur(0)) or (-webkit-backdrop-filter: blur(0))",
);
addVariant("enter", "&[data-enter]");
addVariant("leave", "&[data-leave]");
addVariant("active-item", "&[data-active-item]");
addVariant("group-active-item", ":merge(.group)[data-active-item] &");
addVariant("active", ["&:active", "&[data-active]"]);
addVariant("ariakit-focus-visible", "&[data-focus-visible]");
addVariant("focus-visible", [
"&:focus-visible",
"&[data-focus-visible]",
]);
addVariant("aria-invalid", '&[aria-invalid="true"]');
},
},
],
};