forked from nimbalyst/nimbalyst
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
129 lines (126 loc) · 4.17 KB
/
Copy pathtailwind.config.ts
File metadata and controls
129 lines (126 loc) · 4.17 KB
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
/**
* Nimbalyst Monorepo Tailwind Configuration
*
* This is the shared Tailwind configuration for all packages in the monorepo.
* Individual packages can extend this configuration as needed.
*
* Theme colors use CSS variables (--nim-*) which are defined in:
* - /packages/runtime/src/editor/themes/NimbalystTheme.css (unified theme)
*/
import type { Config } from 'tailwindcss';
const config: Config = {
content: [
'./packages/*/src/**/*.{ts,tsx,js,jsx}',
'./packages/extension-sdk-docs/examples/*/src/**/*.{ts,tsx,js,jsx}',
],
darkMode: ['variant', '&:is([data-theme="dark"] *, [data-theme="crystal-dark"] *)'],
theme: {
extend: {
colors: {
// Nimbalyst theme colors - conventional naming that matches CSS/Tailwind mental models
nim: {
// Backgrounds (use: bg-nim, bg-nim-secondary, etc.)
DEFAULT: 'var(--nim-bg)',
secondary: 'var(--nim-bg-secondary)',
tertiary: 'var(--nim-bg-tertiary)',
hover: 'var(--nim-bg-hover)',
selected: 'var(--nim-bg-selected)',
active: 'var(--nim-bg-active)',
},
'nim-text': {
// Text (use: text-nim-text, text-nim-text-muted, etc.)
DEFAULT: 'var(--nim-text)',
muted: 'var(--nim-text-muted)',
faint: 'var(--nim-text-faint)',
disabled: 'var(--nim-text-disabled)',
},
'nim-border': {
// Borders (use: border-nim-border, border-nim-border-focus)
DEFAULT: 'var(--nim-border)',
focus: 'var(--nim-border-focus)',
},
'nim-primary': {
// Primary action color (use: bg-nim-primary, text-nim-primary)
DEFAULT: 'var(--nim-primary)',
hover: 'var(--nim-primary-hover)',
},
'nim-link': {
// Links (use: text-nim-link)
DEFAULT: 'var(--nim-link)',
hover: 'var(--nim-link-hover)',
},
// Status colors
'nim-success': 'var(--nim-success)',
'nim-warning': 'var(--nim-warning)',
'nim-error': 'var(--nim-error)',
'nim-info': 'var(--nim-info)',
},
backgroundColor: {
// Shorthand background colors for common patterns
nim: 'var(--nim-bg)',
'nim-secondary': 'var(--nim-bg-secondary)',
'nim-tertiary': 'var(--nim-bg-tertiary)',
'nim-hover': 'var(--nim-bg-hover)',
'nim-selected': 'var(--nim-bg-selected)',
'nim-active': 'var(--nim-bg-active)',
'nim-primary': 'var(--nim-primary)',
'nim-primary-hover': 'var(--nim-primary-hover)',
},
textColor: {
// Shorthand text colors for common patterns
nim: 'var(--nim-text)',
'nim-muted': 'var(--nim-text-muted)',
'nim-faint': 'var(--nim-text-faint)',
'nim-disabled': 'var(--nim-text-disabled)',
'nim-link': 'var(--nim-link)',
'nim-link-hover': 'var(--nim-link-hover)',
'nim-primary': 'var(--nim-primary)',
'nim-success': 'var(--nim-success)',
'nim-warning': 'var(--nim-warning)',
'nim-error': 'var(--nim-error)',
'nim-info': 'var(--nim-info)',
},
borderColor: {
// Shorthand border colors
nim: 'var(--nim-border)',
'nim-focus': 'var(--nim-border-focus)',
'nim-primary': 'var(--nim-primary)',
},
keyframes: {
'bash-dot-pulse': {
'0%, 60%, 100%': {
transform: 'scale(1)',
opacity: '0.4',
},
'30%': {
transform: 'scale(1.2)',
opacity: '1',
},
},
'mockup-spin': {
to: {
transform: 'rotate(360deg)',
},
},
'focus-flash': {
'0%': {
backgroundColor: 'var(--nim-bg)',
},
'50%': {
backgroundColor: 'var(--nim-bg-hover)',
},
'100%': {
backgroundColor: 'var(--nim-bg)',
},
},
},
animation: {
'bash-dot-pulse': 'bash-dot-pulse 1.4s ease-in-out infinite',
'mockup-spin': 'mockup-spin 0.8s linear infinite',
'focus-flash': 'focus-flash 0.4s ease-out',
},
},
},
plugins: [],
};
export default config;