-
Notifications
You must be signed in to change notification settings - Fork 0
/
shared.tailwind.config.ts
75 lines (73 loc) · 2.6 KB
/
shared.tailwind.config.ts
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
import type { Config } from 'tailwindcss';
import { opacity, spacing, lineHeight } from 'tailwindcss/defaultTheme';
import colors from 'tailwindcss/colors';
import plugin from 'tailwindcss/plugin';
import { parseColor } from 'tailwindcss/lib/util/color';
// Converts HEX color to RGB values
const toRGB = (value) => parseColor(value).color.join(' ');
export default {
content: ['./src/**/*.{ts,tsx}'],
plugins: [
require('@tailwindcss/typography'),
require('tailwindcss-react-aria-components'),
plugin(function ({ addUtilities }) {
addUtilities({
'.tap-highlight-primary': {
'-webkit-tap-highlight-color': `rgb(var(--primary-500, ${toRGB(colors.zinc[500])}) / 0.2)`,
},
});
}),
],
theme: {
extend: {
colors: {
gray: colors.zinc,
primary: {
50: `rgb(var(--primary-50, ${toRGB(colors.gray[50])}) / <alpha-value>)`,
100: `rgb(var(--primary-100, ${toRGB(colors.gray[100])}) / <alpha-value>)`,
200: `rgb(var(--primary-200, ${toRGB(colors.gray[200])}) / <alpha-value>)`,
300: `rgb(var(--primary-300, ${toRGB(colors.gray[300])}) / <alpha-value>)`,
400: `rgb(var(--primary-400, ${toRGB(colors.gray[400])}) / <alpha-value>)`,
500: `rgb(var(--primary-500, ${toRGB(colors.gray[500])}) / <alpha-value>)`,
600: `rgb(var(--primary-600, ${toRGB(colors.gray[600])}) / <alpha-value>)`,
700: `rgb(var(--primary-700, ${toRGB(colors.gray[700])}) / <alpha-value>)`,
800: `rgb(var(--primary-800, ${toRGB(colors.gray[800])}) / <alpha-value>)`,
900: `rgb(var(--primary-900, ${toRGB(colors.gray[900])}) / <alpha-value>)`,
950: `rgb(var(--primary-950, ${toRGB(colors.gray[950])}) / <alpha-value>)`,
},
},
spacing: {
icon: spacing[4],
input: spacing[9],
initial: 'initial',
},
lineHeight: {
th: lineHeight[9],
'th-input': lineHeight[7],
},
strokeWidth: {
3: '3px',
},
opacity: {
disabled: opacity[40],
},
keyframes: {
'modal-grow': {
'0%': { transform: 'scale(0)' },
'100%': { transform: 'scale(1)' },
},
'modal-shrink': {
'0%': { transform: 'scale(1)', opacity: '1' },
'100%': { transform: 'scale(0)', opacity: '0' },
},
},
animation: {
'modal-grow': 'modal-grow 150ms cubic-bezier(0.4, 0, 0.2, 1)',
'modal-shrink': 'modal-shrink 150ms cubic-bezier(0.4, 0, 0.2, 1)',
},
data: {
selected: 'selected',
},
},
},
} satisfies Config;