@coderabbitai/carrot-ui 0.1.19
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 +86 -0
- package/dist/index.d.ts +1821 -0
- package/dist/index.js +2731 -0
- package/package.json +83 -0
- package/src/scales.css +198 -0
- package/src/styles.css +13 -0
- package/src/theme.css +433 -0
package/src/theme.css
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ═══════════════════════════════════════════════════════════════
|
|
3
|
+
* Semantic Color Tokens
|
|
4
|
+
*
|
|
5
|
+
* Maps raw scale steps (from scales.css) to meaningful names.
|
|
6
|
+
* All tokens are explicitly scoped to their Tailwind namespace:
|
|
7
|
+
* --background-color-* → generates bg-* only
|
|
8
|
+
* --text-color-* → generates text-* only
|
|
9
|
+
* --border-color-* → generates border-* only
|
|
10
|
+
* --ring-color-* → generates ring-* only
|
|
11
|
+
*
|
|
12
|
+
* Raw scales (--color-cui-taupe-*, --color-cui-red-*, etc.)
|
|
13
|
+
* remain in the --color-* namespace for direct use in gradients
|
|
14
|
+
* and other edge cases at the component level.
|
|
15
|
+
*
|
|
16
|
+
* All tokens are prefixed with `cui-` to avoid collisions
|
|
17
|
+
* when imported alongside other design systems.
|
|
18
|
+
* ═══════════════════════════════════════════════════════════════
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
:root {
|
|
22
|
+
/* ── Shadow border tint: black in light, white in dark ── */
|
|
23
|
+
--cui-border-tint: 0 0 0;
|
|
24
|
+
/* ── Button top highlight opacity ── */
|
|
25
|
+
--cui-button-highlight-alpha: 0.4;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-theme="dark"] {
|
|
29
|
+
color-scheme: dark;
|
|
30
|
+
--cui-border-tint: 1 0 0;
|
|
31
|
+
--cui-button-highlight-alpha: 0.12;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@theme {
|
|
35
|
+
/*
|
|
36
|
+
* ═══════════════════════════════════════
|
|
37
|
+
* BACKGROUNDS — 3 spatial layers
|
|
38
|
+
*
|
|
39
|
+
* cui-base-0: page shell / surround (deepest)
|
|
40
|
+
* cui-base-1: main content area
|
|
41
|
+
* cui-base-2: elevated cards, panels, popovers
|
|
42
|
+
* ═══════════════════════════════════════
|
|
43
|
+
*/
|
|
44
|
+
--background-color-cui-base-0: var(--color-cui-taupe-4);
|
|
45
|
+
--background-color-cui-base-1: var(--color-cui-taupe-2);
|
|
46
|
+
--background-color-cui-base-2: var(--color-cui-taupe-1);
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* ═══════════════════════════════════════
|
|
50
|
+
* INTERACTIVE — Alpha-based hover/highlight
|
|
51
|
+
*
|
|
52
|
+
* Works on any background layer because it's
|
|
53
|
+
* a semi-transparent overlay, not a fixed color.
|
|
54
|
+
* ═══════════════════════════════════════
|
|
55
|
+
*/
|
|
56
|
+
--background-color-cui-subtle: oklch(var(--cui-border-tint) / 0.06);
|
|
57
|
+
|
|
58
|
+
/*
|
|
59
|
+
* ═══════════════════════════════════════
|
|
60
|
+
* TEXT — 3 hierarchy levels
|
|
61
|
+
* ═══════════════════════════════════════
|
|
62
|
+
*/
|
|
63
|
+
--text-color-cui-primary: var(--color-cui-taupe-12);
|
|
64
|
+
--text-color-cui-secondary: var(--color-cui-taupe-11);
|
|
65
|
+
--text-color-cui-tertiary: var(--color-cui-taupe-9);
|
|
66
|
+
|
|
67
|
+
/*
|
|
68
|
+
* ═══════════════════════════════════════
|
|
69
|
+
* BORDERS — 2 levels
|
|
70
|
+
* ═══════════════════════════════════════
|
|
71
|
+
*/
|
|
72
|
+
--border-color-cui-neutral: var(--color-cui-taupe-5);
|
|
73
|
+
--border-color-cui-neutral-strong: var(--color-cui-taupe-7);
|
|
74
|
+
|
|
75
|
+
--ring-color-cui-neutral: var(--color-cui-taupe-5);
|
|
76
|
+
--ring-color-cui-focus: var(--color-cui-cr-orange-9);
|
|
77
|
+
|
|
78
|
+
/*
|
|
79
|
+
* ═══════════════════════════════════════
|
|
80
|
+
* ACCENT — CodeRabbit brand orange
|
|
81
|
+
* ═══════════════════════════════════════
|
|
82
|
+
*/
|
|
83
|
+
--background-color-cui-accent: var(--color-cui-cr-orange-9);
|
|
84
|
+
--background-color-cui-accent-subtle: var(--color-cui-cr-orange-3);
|
|
85
|
+
--background-color-cui-accent-strong: var(--color-cui-cr-orange-10);
|
|
86
|
+
--background-color-cui-accent-on: oklch(0.99 0 0);
|
|
87
|
+
--text-color-cui-accent: var(--color-cui-cr-orange-11);
|
|
88
|
+
--text-color-cui-accent-on: oklch(0.99 0 0);
|
|
89
|
+
--border-color-cui-accent: var(--color-cui-cr-orange-8);
|
|
90
|
+
|
|
91
|
+
/*
|
|
92
|
+
* ═══════════════════════════════════════
|
|
93
|
+
* DANGER — Radix red scale
|
|
94
|
+
* ═══════════════════════════════════════
|
|
95
|
+
*/
|
|
96
|
+
--background-color-cui-danger: var(--color-cui-red-10);
|
|
97
|
+
--background-color-cui-danger-subtle: var(--color-cui-red-3);
|
|
98
|
+
--background-color-cui-danger-strong: var(--color-cui-red-11);
|
|
99
|
+
--background-color-cui-danger-on: oklch(0.99 0 0);
|
|
100
|
+
--text-color-cui-danger: var(--color-cui-red-11);
|
|
101
|
+
--text-color-cui-danger-on: oklch(0.99 0 0);
|
|
102
|
+
--border-color-cui-danger: var(--color-cui-red-11);
|
|
103
|
+
|
|
104
|
+
/*
|
|
105
|
+
* ═══════════════════════════════════════
|
|
106
|
+
* WARN — Radix amber scale
|
|
107
|
+
* ═══════════════════════════════════════
|
|
108
|
+
*/
|
|
109
|
+
--background-color-cui-warn: var(--color-cui-amber-9);
|
|
110
|
+
--background-color-cui-warn-subtle: var(--color-cui-amber-3);
|
|
111
|
+
--background-color-cui-warn-strong: var(--color-cui-amber-10);
|
|
112
|
+
--background-color-cui-warn-on: oklch(0.15 0 0);
|
|
113
|
+
--text-color-cui-warn: var(--color-cui-amber-11);
|
|
114
|
+
--text-color-cui-warn-on: oklch(0.15 0 0);
|
|
115
|
+
--border-color-cui-warn: var(--color-cui-amber-8);
|
|
116
|
+
|
|
117
|
+
/*
|
|
118
|
+
* ═══════════════════════════════════════
|
|
119
|
+
* SUCCESS — Radix green scale
|
|
120
|
+
* ═══════════════════════════════════════
|
|
121
|
+
*/
|
|
122
|
+
--background-color-cui-success: var(--color-cui-green-9);
|
|
123
|
+
--background-color-cui-success-subtle: var(--color-cui-green-3);
|
|
124
|
+
--background-color-cui-success-strong: var(--color-cui-green-10);
|
|
125
|
+
--background-color-cui-success-on: oklch(0.99 0 0);
|
|
126
|
+
--text-color-cui-success: var(--color-cui-green-11);
|
|
127
|
+
--text-color-cui-success-on: oklch(0.99 0 0);
|
|
128
|
+
--border-color-cui-success: var(--color-cui-green-8);
|
|
129
|
+
|
|
130
|
+
/*
|
|
131
|
+
* ═══════════════════════════════════════
|
|
132
|
+
* SHADOWS
|
|
133
|
+
* ═══════════════════════════════════════
|
|
134
|
+
*/
|
|
135
|
+
--inset-shadow-cui-border: inset 0 0 0 1px
|
|
136
|
+
oklch(var(--cui-border-tint) / 0.06);
|
|
137
|
+
--inset-shadow-cui-button: inset 0 1px 0 0
|
|
138
|
+
oklch(1 0 0 / var(--cui-button-highlight-alpha));
|
|
139
|
+
--inset-shadow-cui-primary:
|
|
140
|
+
inset 0 1px 0 0 oklch(1 0 0 / 0.15), inset 0 -1px 0 0 oklch(0 0 0 / 0.15);
|
|
141
|
+
|
|
142
|
+
/*
|
|
143
|
+
* ═══════════════════════════════════════
|
|
144
|
+
* INVERSE — Flipped contrast pair
|
|
145
|
+
*
|
|
146
|
+
* bg-cui-inverse: near-black in light, near-white in dark
|
|
147
|
+
* text-cui-inverse: near-white in light, near-black in dark
|
|
148
|
+
*
|
|
149
|
+
* Pulled slightly from the extremes so the inset-shadow-cui-primary
|
|
150
|
+
* top highlight and bottom shadow are both visible.
|
|
151
|
+
* ═══════════════════════════════════════
|
|
152
|
+
*/
|
|
153
|
+
--background-color-cui-inverse: oklch(0.28 0.005 55);
|
|
154
|
+
--text-color-cui-inverse: var(--color-cui-taupe-1);
|
|
155
|
+
|
|
156
|
+
/*
|
|
157
|
+
* ═══════════════════════════════════════
|
|
158
|
+
* SPECIAL
|
|
159
|
+
* ═══════════════════════════════════════
|
|
160
|
+
*/
|
|
161
|
+
--background-color-cui-overlay: oklch(0 0 0 / 0.4);
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Easing Functions
|
|
165
|
+
*/
|
|
166
|
+
--ease-cui-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
|
|
167
|
+
--ease-cui-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
168
|
+
--ease-cui-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
|
|
169
|
+
--ease-cui-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
|
|
170
|
+
--ease-cui-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
|
|
171
|
+
--ease-cui-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335);
|
|
172
|
+
|
|
173
|
+
--ease-cui-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
174
|
+
--ease-cui-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
175
|
+
--ease-cui-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
176
|
+
--ease-cui-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
|
|
177
|
+
--ease-cui-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
|
|
178
|
+
--ease-cui-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
179
|
+
|
|
180
|
+
--ease-cui-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
181
|
+
--ease-cui-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
182
|
+
--ease-cui-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
|
|
183
|
+
--ease-cui-in-out-quint: cubic-bezier(0.86, 0, 0.07, 1);
|
|
184
|
+
--ease-cui-in-out-expo: cubic-bezier(1, 0, 0, 1);
|
|
185
|
+
--ease-cui-in-out-circ: cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Animations
|
|
189
|
+
*/
|
|
190
|
+
--animate-cui-dot-cycle: cui-dot-cycle 1.2s steps(1) infinite;
|
|
191
|
+
--animate-cui-select-in: cui-select-in 200ms var(--ease-cui-out-expo);
|
|
192
|
+
--animate-cui-select-out: cui-select-out 150ms var(--ease-cui-in-quad);
|
|
193
|
+
--animate-cui-shimmer: cui-shimmer 2s infinite linear;
|
|
194
|
+
--animate-cui-shake: cui-shake 400ms var(--ease-cui-out-cubic);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/*
|
|
198
|
+
* ═══════════════════════════════════════════════════════════════
|
|
199
|
+
* DARK MODE SEMANTIC OVERRIDES
|
|
200
|
+
* ═══════════════════════════════════════════════════════════════
|
|
201
|
+
*/
|
|
202
|
+
[data-theme="dark"] {
|
|
203
|
+
/* Backgrounds: lighter = more elevated in dark mode too */
|
|
204
|
+
--background-color-cui-base-0: var(--color-cui-taupe-1);
|
|
205
|
+
--background-color-cui-base-1: var(--color-cui-taupe-2);
|
|
206
|
+
--background-color-cui-base-2: var(--color-cui-taupe-3);
|
|
207
|
+
|
|
208
|
+
/* Neutral strong: darker than button fill in dark mode */
|
|
209
|
+
--border-color-cui-neutral-strong: var(--color-cui-taupe-1);
|
|
210
|
+
|
|
211
|
+
/* Accent */
|
|
212
|
+
--background-color-cui-accent: var(--color-cui-cr-orange-9);
|
|
213
|
+
--background-color-cui-accent-strong: var(--color-cui-cr-orange-8);
|
|
214
|
+
--ring-color-cui-focus: var(--color-cui-cr-orange-9);
|
|
215
|
+
|
|
216
|
+
/* Danger */
|
|
217
|
+
--background-color-cui-danger: var(--color-cui-red-9);
|
|
218
|
+
--background-color-cui-danger-strong: var(--color-cui-red-8);
|
|
219
|
+
--border-color-cui-danger: var(--color-cui-red-7);
|
|
220
|
+
|
|
221
|
+
/* Warning */
|
|
222
|
+
--background-color-cui-warn: var(--color-cui-amber-9);
|
|
223
|
+
--background-color-cui-warn-strong: var(--color-cui-amber-10);
|
|
224
|
+
|
|
225
|
+
/* Inverse: pulled back from pure white so highlights/shadows are visible */
|
|
226
|
+
--background-color-cui-inverse: oklch(0.9 0.005 55);
|
|
227
|
+
|
|
228
|
+
/* Success */
|
|
229
|
+
--background-color-cui-success: var(--color-cui-green-9);
|
|
230
|
+
--background-color-cui-success-strong: var(--color-cui-green-10);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/*
|
|
234
|
+
* ═══════════════════════════════════════════════════════════════
|
|
235
|
+
* KEYFRAMES
|
|
236
|
+
* ═══════════════════════════════════════════════════════════════
|
|
237
|
+
*/
|
|
238
|
+
@keyframes braille-snake {
|
|
239
|
+
0% {
|
|
240
|
+
content: "⣾";
|
|
241
|
+
}
|
|
242
|
+
6.25% {
|
|
243
|
+
content: "⣽";
|
|
244
|
+
}
|
|
245
|
+
12.5% {
|
|
246
|
+
content: "⣻";
|
|
247
|
+
}
|
|
248
|
+
18.75% {
|
|
249
|
+
content: "⢿";
|
|
250
|
+
}
|
|
251
|
+
25% {
|
|
252
|
+
content: "⡿";
|
|
253
|
+
}
|
|
254
|
+
31.25% {
|
|
255
|
+
content: "⣟";
|
|
256
|
+
}
|
|
257
|
+
37.5% {
|
|
258
|
+
content: "⣯";
|
|
259
|
+
}
|
|
260
|
+
43.75% {
|
|
261
|
+
content: "⣷";
|
|
262
|
+
}
|
|
263
|
+
50% {
|
|
264
|
+
content: "⣾";
|
|
265
|
+
}
|
|
266
|
+
56.25% {
|
|
267
|
+
content: "⣽";
|
|
268
|
+
}
|
|
269
|
+
62.5% {
|
|
270
|
+
content: "⣻";
|
|
271
|
+
}
|
|
272
|
+
68.75% {
|
|
273
|
+
content: "⢿";
|
|
274
|
+
}
|
|
275
|
+
75% {
|
|
276
|
+
content: "⡿";
|
|
277
|
+
}
|
|
278
|
+
81.25% {
|
|
279
|
+
content: "⣟";
|
|
280
|
+
}
|
|
281
|
+
87.5% {
|
|
282
|
+
content: "⣯";
|
|
283
|
+
}
|
|
284
|
+
93.75% {
|
|
285
|
+
content: "⣷";
|
|
286
|
+
}
|
|
287
|
+
100% {
|
|
288
|
+
content: "⣾";
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@keyframes cui-dot-cycle {
|
|
293
|
+
0% {
|
|
294
|
+
content: ".";
|
|
295
|
+
}
|
|
296
|
+
33% {
|
|
297
|
+
content: "..";
|
|
298
|
+
}
|
|
299
|
+
66% {
|
|
300
|
+
content: "...";
|
|
301
|
+
}
|
|
302
|
+
100% {
|
|
303
|
+
content: ".";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
@keyframes cui-select-in {
|
|
308
|
+
from {
|
|
309
|
+
opacity: 0;
|
|
310
|
+
transform: scale(0.7);
|
|
311
|
+
}
|
|
312
|
+
to {
|
|
313
|
+
opacity: 1;
|
|
314
|
+
transform: scale(1);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@keyframes cui-select-out {
|
|
319
|
+
from {
|
|
320
|
+
opacity: 1;
|
|
321
|
+
transform: scale(1);
|
|
322
|
+
}
|
|
323
|
+
to {
|
|
324
|
+
opacity: 0;
|
|
325
|
+
transform: scale(0.7);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@keyframes cui-shimmer {
|
|
330
|
+
0% {
|
|
331
|
+
background-position: 200% 0;
|
|
332
|
+
}
|
|
333
|
+
100% {
|
|
334
|
+
background-position: -200% 0;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@keyframes slide-in-from-right {
|
|
339
|
+
from {
|
|
340
|
+
opacity: 0;
|
|
341
|
+
transform: translateX(6px);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
@keyframes slide-in-from-left {
|
|
346
|
+
from {
|
|
347
|
+
opacity: 0;
|
|
348
|
+
transform: translateX(-6px);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@keyframes slide-in-from-bottom {
|
|
353
|
+
from {
|
|
354
|
+
opacity: 0;
|
|
355
|
+
transform: translateY(6px);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@keyframes slide-in-from-top {
|
|
360
|
+
from {
|
|
361
|
+
opacity: 0;
|
|
362
|
+
transform: translateY(-6px);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
@keyframes slide-out-to-right {
|
|
367
|
+
to {
|
|
368
|
+
opacity: 0;
|
|
369
|
+
transform: translateX(6px);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
@keyframes slide-out-to-left {
|
|
374
|
+
to {
|
|
375
|
+
opacity: 0;
|
|
376
|
+
transform: translateX(-6px);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
@keyframes slide-out-to-bottom {
|
|
381
|
+
to {
|
|
382
|
+
opacity: 0;
|
|
383
|
+
transform: translateY(6px);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
@keyframes slide-out-to-top {
|
|
388
|
+
to {
|
|
389
|
+
opacity: 0;
|
|
390
|
+
transform: translateY(-6px);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
@keyframes check-pop {
|
|
395
|
+
from {
|
|
396
|
+
opacity: 0;
|
|
397
|
+
transform: scale(0.8);
|
|
398
|
+
}
|
|
399
|
+
to {
|
|
400
|
+
opacity: 1;
|
|
401
|
+
transform: scale(1);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
@keyframes cui-shake {
|
|
406
|
+
0%,
|
|
407
|
+
100% {
|
|
408
|
+
transform: translateX(0);
|
|
409
|
+
}
|
|
410
|
+
20% {
|
|
411
|
+
transform: translateX(-6px);
|
|
412
|
+
}
|
|
413
|
+
40% {
|
|
414
|
+
transform: translateX(5px);
|
|
415
|
+
}
|
|
416
|
+
60% {
|
|
417
|
+
transform: translateX(-3px);
|
|
418
|
+
}
|
|
419
|
+
80% {
|
|
420
|
+
transform: translateX(2px);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
@keyframes check-out {
|
|
425
|
+
from {
|
|
426
|
+
opacity: 1;
|
|
427
|
+
transform: scale(1);
|
|
428
|
+
}
|
|
429
|
+
to {
|
|
430
|
+
opacity: 0;
|
|
431
|
+
transform: scale(0.8);
|
|
432
|
+
}
|
|
433
|
+
}
|