@onesaz/tailwind-config 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -5
- package/dist/v4.css +290 -0
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @onesaz/tailwind-config
|
|
2
2
|
|
|
3
|
-
Shared Tailwind CSS
|
|
3
|
+
Shared Tailwind CSS configuration for Onesaz applications. Supports both Tailwind v3 and v4.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,7 +10,20 @@ npm install @onesaz/tailwind-config tailwindcss
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Tailwind v4 (CSS-first)
|
|
14
|
+
|
|
15
|
+
In your main CSS file:
|
|
16
|
+
|
|
17
|
+
```css
|
|
18
|
+
@import "tailwindcss";
|
|
19
|
+
@import "@onesaz/tailwind-config/v4.css";
|
|
20
|
+
|
|
21
|
+
/* Your custom styles */
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Tailwind v3 (JS preset)
|
|
25
|
+
|
|
26
|
+
In your `tailwind.config.js`:
|
|
14
27
|
|
|
15
28
|
```javascript
|
|
16
29
|
/** @type {import('tailwindcss').Config} */
|
|
@@ -25,14 +38,41 @@ module.exports = {
|
|
|
25
38
|
|
|
26
39
|
## Features
|
|
27
40
|
|
|
28
|
-
- Pre-configured color palette
|
|
41
|
+
- Pre-configured color palette (purple, blue, cyan, teal, green, orange, red, pink)
|
|
42
|
+
- Gray scales (slate, neutral)
|
|
43
|
+
- Semantic colors (success, warning, error, info)
|
|
29
44
|
- CSS variable-based colors for dynamic theming
|
|
30
|
-
-
|
|
45
|
+
- Typography scale
|
|
46
|
+
- Border radius scale
|
|
47
|
+
- Shadow scale
|
|
48
|
+
- Animation keyframes
|
|
31
49
|
- Dark mode support
|
|
32
50
|
|
|
51
|
+
## Included Colors
|
|
52
|
+
|
|
53
|
+
### Accent Colors
|
|
54
|
+
- `purple-1` to `purple-12`
|
|
55
|
+
- `blue-1` to `blue-12`
|
|
56
|
+
- `cyan-1` to `cyan-12`
|
|
57
|
+
- `teal-1` to `teal-12`
|
|
58
|
+
- `green-1` to `green-12`
|
|
59
|
+
- `orange-1` to `orange-12`
|
|
60
|
+
- `red-1` to `red-12`
|
|
61
|
+
- `pink-1` to `pink-12`
|
|
62
|
+
|
|
63
|
+
### Gray Colors
|
|
64
|
+
- `slate-1` to `slate-12`
|
|
65
|
+
- `neutral-1` to `neutral-12`
|
|
66
|
+
|
|
67
|
+
### Semantic Colors
|
|
68
|
+
- `success`, `success-light`, `success-dark`
|
|
69
|
+
- `warning`, `warning-light`, `warning-dark`
|
|
70
|
+
- `error`, `error-light`, `error-dark`
|
|
71
|
+
- `info`, `info-light`, `info-dark`
|
|
72
|
+
|
|
33
73
|
## Peer Dependencies
|
|
34
74
|
|
|
35
|
-
- `tailwindcss` ^3.4.0
|
|
75
|
+
- `tailwindcss` ^3.4.0 or ^4.0.0
|
|
36
76
|
|
|
37
77
|
## License
|
|
38
78
|
|
package/dist/v4.css
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Onesaz Tailwind v4 Theme
|
|
3
|
+
* Import this file in your Tailwind v4 project:
|
|
4
|
+
* @import "@onesaz/tailwind-config/v4.css";
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@theme {
|
|
8
|
+
/* ========================================
|
|
9
|
+
* ACCENT COLORS - Purple
|
|
10
|
+
* ======================================== */
|
|
11
|
+
--color-purple-1: #faf5ff;
|
|
12
|
+
--color-purple-2: #f3e8ff;
|
|
13
|
+
--color-purple-3: #e9d5ff;
|
|
14
|
+
--color-purple-4: #d8b4fe;
|
|
15
|
+
--color-purple-5: #c084fc;
|
|
16
|
+
--color-purple-6: #a855f7;
|
|
17
|
+
--color-purple-7: #9333ea;
|
|
18
|
+
--color-purple-8: #7c3aed;
|
|
19
|
+
--color-purple-9: #6d28d9;
|
|
20
|
+
--color-purple-10: #5b21b6;
|
|
21
|
+
--color-purple-11: #4c1d95;
|
|
22
|
+
--color-purple-12: #2e1065;
|
|
23
|
+
|
|
24
|
+
/* Blue */
|
|
25
|
+
--color-blue-1: #eff6ff;
|
|
26
|
+
--color-blue-2: #dbeafe;
|
|
27
|
+
--color-blue-3: #bfdbfe;
|
|
28
|
+
--color-blue-4: #93c5fd;
|
|
29
|
+
--color-blue-5: #60a5fa;
|
|
30
|
+
--color-blue-6: #3b82f6;
|
|
31
|
+
--color-blue-7: #2563eb;
|
|
32
|
+
--color-blue-8: #1d4ed8;
|
|
33
|
+
--color-blue-9: #1e40af;
|
|
34
|
+
--color-blue-10: #1e3a8a;
|
|
35
|
+
--color-blue-11: #172554;
|
|
36
|
+
--color-blue-12: #0c1a3d;
|
|
37
|
+
|
|
38
|
+
/* Cyan */
|
|
39
|
+
--color-cyan-1: #ecfeff;
|
|
40
|
+
--color-cyan-2: #cffafe;
|
|
41
|
+
--color-cyan-3: #a5f3fc;
|
|
42
|
+
--color-cyan-4: #67e8f9;
|
|
43
|
+
--color-cyan-5: #22d3ee;
|
|
44
|
+
--color-cyan-6: #06b6d4;
|
|
45
|
+
--color-cyan-7: #0891b2;
|
|
46
|
+
--color-cyan-8: #0e7490;
|
|
47
|
+
--color-cyan-9: #155e75;
|
|
48
|
+
--color-cyan-10: #164e63;
|
|
49
|
+
--color-cyan-11: #083344;
|
|
50
|
+
--color-cyan-12: #042f2e;
|
|
51
|
+
|
|
52
|
+
/* Teal */
|
|
53
|
+
--color-teal-1: #f0fdfa;
|
|
54
|
+
--color-teal-2: #ccfbf1;
|
|
55
|
+
--color-teal-3: #99f6e4;
|
|
56
|
+
--color-teal-4: #5eead4;
|
|
57
|
+
--color-teal-5: #2dd4bf;
|
|
58
|
+
--color-teal-6: #14b8a6;
|
|
59
|
+
--color-teal-7: #0d9488;
|
|
60
|
+
--color-teal-8: #0f766e;
|
|
61
|
+
--color-teal-9: #115e59;
|
|
62
|
+
--color-teal-10: #134e4a;
|
|
63
|
+
--color-teal-11: #042f2e;
|
|
64
|
+
--color-teal-12: #022322;
|
|
65
|
+
|
|
66
|
+
/* Green */
|
|
67
|
+
--color-green-1: #f0fdf4;
|
|
68
|
+
--color-green-2: #dcfce7;
|
|
69
|
+
--color-green-3: #bbf7d0;
|
|
70
|
+
--color-green-4: #86efac;
|
|
71
|
+
--color-green-5: #4ade80;
|
|
72
|
+
--color-green-6: #22c55e;
|
|
73
|
+
--color-green-7: #16a34a;
|
|
74
|
+
--color-green-8: #15803d;
|
|
75
|
+
--color-green-9: #166534;
|
|
76
|
+
--color-green-10: #14532d;
|
|
77
|
+
--color-green-11: #052e16;
|
|
78
|
+
--color-green-12: #022c0d;
|
|
79
|
+
|
|
80
|
+
/* Orange */
|
|
81
|
+
--color-orange-1: #fff7ed;
|
|
82
|
+
--color-orange-2: #ffedd5;
|
|
83
|
+
--color-orange-3: #fed7aa;
|
|
84
|
+
--color-orange-4: #fdba74;
|
|
85
|
+
--color-orange-5: #fb923c;
|
|
86
|
+
--color-orange-6: #f97316;
|
|
87
|
+
--color-orange-7: #ea580c;
|
|
88
|
+
--color-orange-8: #c2410c;
|
|
89
|
+
--color-orange-9: #9a3412;
|
|
90
|
+
--color-orange-10: #7c2d12;
|
|
91
|
+
--color-orange-11: #431407;
|
|
92
|
+
--color-orange-12: #27130a;
|
|
93
|
+
|
|
94
|
+
/* Red */
|
|
95
|
+
--color-red-1: #fef2f2;
|
|
96
|
+
--color-red-2: #fee2e2;
|
|
97
|
+
--color-red-3: #fecaca;
|
|
98
|
+
--color-red-4: #fca5a5;
|
|
99
|
+
--color-red-5: #f87171;
|
|
100
|
+
--color-red-6: #ef4444;
|
|
101
|
+
--color-red-7: #dc2626;
|
|
102
|
+
--color-red-8: #b91c1c;
|
|
103
|
+
--color-red-9: #991b1b;
|
|
104
|
+
--color-red-10: #7f1d1d;
|
|
105
|
+
--color-red-11: #450a0a;
|
|
106
|
+
--color-red-12: #2a0808;
|
|
107
|
+
|
|
108
|
+
/* Pink */
|
|
109
|
+
--color-pink-1: #fdf2f8;
|
|
110
|
+
--color-pink-2: #fce7f3;
|
|
111
|
+
--color-pink-3: #fbcfe8;
|
|
112
|
+
--color-pink-4: #f9a8d4;
|
|
113
|
+
--color-pink-5: #f472b6;
|
|
114
|
+
--color-pink-6: #ec4899;
|
|
115
|
+
--color-pink-7: #db2777;
|
|
116
|
+
--color-pink-8: #be185d;
|
|
117
|
+
--color-pink-9: #9d174d;
|
|
118
|
+
--color-pink-10: #831843;
|
|
119
|
+
--color-pink-11: #500724;
|
|
120
|
+
--color-pink-12: #2e0515;
|
|
121
|
+
|
|
122
|
+
/* ========================================
|
|
123
|
+
* GRAY COLORS - Slate
|
|
124
|
+
* ======================================== */
|
|
125
|
+
--color-slate-1: #f8fafc;
|
|
126
|
+
--color-slate-2: #f1f5f9;
|
|
127
|
+
--color-slate-3: #e2e8f0;
|
|
128
|
+
--color-slate-4: #cbd5e1;
|
|
129
|
+
--color-slate-5: #94a3b8;
|
|
130
|
+
--color-slate-6: #64748b;
|
|
131
|
+
--color-slate-7: #475569;
|
|
132
|
+
--color-slate-8: #334155;
|
|
133
|
+
--color-slate-9: #1e293b;
|
|
134
|
+
--color-slate-10: #0f172a;
|
|
135
|
+
--color-slate-11: #020617;
|
|
136
|
+
--color-slate-12: #010409;
|
|
137
|
+
|
|
138
|
+
/* Neutral */
|
|
139
|
+
--color-neutral-1: #fafafa;
|
|
140
|
+
--color-neutral-2: #f5f5f5;
|
|
141
|
+
--color-neutral-3: #e5e5e5;
|
|
142
|
+
--color-neutral-4: #d4d4d4;
|
|
143
|
+
--color-neutral-5: #a3a3a3;
|
|
144
|
+
--color-neutral-6: #737373;
|
|
145
|
+
--color-neutral-7: #525252;
|
|
146
|
+
--color-neutral-8: #404040;
|
|
147
|
+
--color-neutral-9: #262626;
|
|
148
|
+
--color-neutral-10: #171717;
|
|
149
|
+
--color-neutral-11: #0a0a0a;
|
|
150
|
+
--color-neutral-12: #050505;
|
|
151
|
+
|
|
152
|
+
/* ========================================
|
|
153
|
+
* SEMANTIC COLORS
|
|
154
|
+
* ======================================== */
|
|
155
|
+
--color-success: #22c55e;
|
|
156
|
+
--color-success-light: #dcfce7;
|
|
157
|
+
--color-success-dark: #16a34a;
|
|
158
|
+
|
|
159
|
+
--color-warning: #f59e0b;
|
|
160
|
+
--color-warning-light: #fef3c7;
|
|
161
|
+
--color-warning-dark: #d97706;
|
|
162
|
+
|
|
163
|
+
--color-error: #ef4444;
|
|
164
|
+
--color-error-light: #fee2e2;
|
|
165
|
+
--color-error-dark: #dc2626;
|
|
166
|
+
|
|
167
|
+
--color-info: #3b82f6;
|
|
168
|
+
--color-info-light: #dbeafe;
|
|
169
|
+
--color-info-dark: #2563eb;
|
|
170
|
+
|
|
171
|
+
/* ========================================
|
|
172
|
+
* CSS VARIABLE BASED COLORS (for dynamic theming)
|
|
173
|
+
* ======================================== */
|
|
174
|
+
--color-background: var(--background);
|
|
175
|
+
--color-foreground: var(--foreground);
|
|
176
|
+
--color-card: var(--card);
|
|
177
|
+
--color-card-foreground: var(--card-foreground);
|
|
178
|
+
--color-popover: var(--popover);
|
|
179
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
180
|
+
--color-muted: var(--muted);
|
|
181
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
182
|
+
--color-accent: var(--accent);
|
|
183
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
184
|
+
--color-border: var(--border);
|
|
185
|
+
--color-input: var(--input);
|
|
186
|
+
--color-ring: var(--ring);
|
|
187
|
+
--color-destructive: var(--destructive);
|
|
188
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
189
|
+
|
|
190
|
+
/* ========================================
|
|
191
|
+
* TYPOGRAPHY
|
|
192
|
+
* ======================================== */
|
|
193
|
+
--font-family-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
194
|
+
--font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
195
|
+
|
|
196
|
+
--font-size-xs: 0.75rem;
|
|
197
|
+
--font-size-sm: 0.875rem;
|
|
198
|
+
--font-size-base: 1rem;
|
|
199
|
+
--font-size-lg: 1.125rem;
|
|
200
|
+
--font-size-xl: 1.25rem;
|
|
201
|
+
--font-size-2xl: 1.5rem;
|
|
202
|
+
--font-size-3xl: 1.875rem;
|
|
203
|
+
--font-size-4xl: 2.25rem;
|
|
204
|
+
--font-size-5xl: 3rem;
|
|
205
|
+
|
|
206
|
+
/* ========================================
|
|
207
|
+
* BORDER RADIUS
|
|
208
|
+
* ======================================== */
|
|
209
|
+
--radius-none: 0;
|
|
210
|
+
--radius-sm: 0.125rem;
|
|
211
|
+
--radius-default: 0.25rem;
|
|
212
|
+
--radius-md: 0.375rem;
|
|
213
|
+
--radius-lg: 0.5rem;
|
|
214
|
+
--radius-xl: 0.75rem;
|
|
215
|
+
--radius-2xl: 1rem;
|
|
216
|
+
--radius-3xl: 1.5rem;
|
|
217
|
+
--radius-full: 9999px;
|
|
218
|
+
|
|
219
|
+
/* ========================================
|
|
220
|
+
* SHADOWS
|
|
221
|
+
* ======================================== */
|
|
222
|
+
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
223
|
+
--shadow-default: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
224
|
+
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
225
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
226
|
+
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
227
|
+
--shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
228
|
+
|
|
229
|
+
/* ========================================
|
|
230
|
+
* Z-INDEX (high values for modals)
|
|
231
|
+
* ======================================== */
|
|
232
|
+
--z-modal: 99999;
|
|
233
|
+
--z-tooltip: 99998;
|
|
234
|
+
--z-dropdown: 99997;
|
|
235
|
+
--z-overlay: 99996;
|
|
236
|
+
|
|
237
|
+
/* ========================================
|
|
238
|
+
* ANIMATIONS
|
|
239
|
+
* ======================================== */
|
|
240
|
+
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
241
|
+
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
242
|
+
--animate-fade-in: fade-in 0.2s ease-out;
|
|
243
|
+
--animate-fade-out: fade-out 0.2s ease-out;
|
|
244
|
+
--animate-zoom-in: zoom-in 0.2s ease-out;
|
|
245
|
+
--animate-zoom-out: zoom-out 0.2s ease-out;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* Keyframes */
|
|
249
|
+
@keyframes accordion-down {
|
|
250
|
+
from { height: 0; }
|
|
251
|
+
to { height: var(--radix-accordion-content-height); }
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
@keyframes accordion-up {
|
|
255
|
+
from { height: var(--radix-accordion-content-height); }
|
|
256
|
+
to { height: 0; }
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@keyframes fade-in {
|
|
260
|
+
from { opacity: 0; }
|
|
261
|
+
to { opacity: 1; }
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@keyframes fade-out {
|
|
265
|
+
from { opacity: 1; }
|
|
266
|
+
to { opacity: 0; }
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@keyframes zoom-in {
|
|
270
|
+
from { transform: scale(0.95); opacity: 0; }
|
|
271
|
+
to { transform: scale(1); opacity: 1; }
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
@keyframes zoom-out {
|
|
275
|
+
from { transform: scale(1); opacity: 1; }
|
|
276
|
+
to { transform: scale(0.95); opacity: 0; }
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@keyframes slide-in-from-top {
|
|
280
|
+
from { transform: translateY(-100%); }
|
|
281
|
+
to { transform: translateY(0); }
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@keyframes slide-in-from-bottom {
|
|
285
|
+
from { transform: translateY(100%); }
|
|
286
|
+
to { transform: translateY(0); }
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Scan @onesaz/ui for class generation */
|
|
290
|
+
@source "../../node_modules/@onesaz/ui/dist/**/*.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onesaz/tailwind-config",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Tailwind CSS preset for Onesaz UI - shared configuration with design tokens",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Tailwind CSS preset for Onesaz UI - shared configuration with design tokens (supports v3 and v4)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Onesaz <engineering@onesaz.com>",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"tailwindcss",
|
|
19
19
|
"tailwind-preset",
|
|
20
20
|
"design-system",
|
|
21
|
+
"tailwindcss-v4",
|
|
21
22
|
"onesaz"
|
|
22
23
|
],
|
|
23
24
|
"publishConfig": {
|
|
@@ -31,11 +32,13 @@
|
|
|
31
32
|
"types": "./dist/index.d.ts",
|
|
32
33
|
"import": "./dist/index.js",
|
|
33
34
|
"require": "./dist/index.cjs"
|
|
34
|
-
}
|
|
35
|
+
},
|
|
36
|
+
"./v4": "./dist/v4.css",
|
|
37
|
+
"./v4.css": "./dist/v4.css"
|
|
35
38
|
},
|
|
36
39
|
"files": ["dist"],
|
|
37
40
|
"scripts": {
|
|
38
|
-
"build": "tsup",
|
|
41
|
+
"build": "tsup && cp src/v4.css dist/v4.css",
|
|
39
42
|
"dev": "tsup --watch",
|
|
40
43
|
"clean": "rm -rf dist"
|
|
41
44
|
},
|
|
@@ -48,6 +51,6 @@
|
|
|
48
51
|
"typescript": "^5.5.4"
|
|
49
52
|
},
|
|
50
53
|
"peerDependencies": {
|
|
51
|
-
"tailwindcss": "^3.4.0"
|
|
54
|
+
"tailwindcss": "^3.4.0 || ^4.0.0"
|
|
52
55
|
}
|
|
53
56
|
}
|