@coderabbitai/carrot-ui 0.1.20 → 0.1.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderabbitai/carrot-ui",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "CodeRabbit design system. React components built on Base UI, styled with Tailwind CSS v4.",
5
5
  "keywords": [
6
6
  "coderabbit",
@@ -40,10 +40,12 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@base-ui/react": "^1.3.0",
43
+ "@fontsource-variable/geist": "^5.2.8",
43
44
  "@heroicons/react": "^2.2.0",
44
45
  "@tanstack/react-table": "^8.21.3",
45
46
  "clsx": "^2.1.1",
46
47
  "cmdk": "^1.1.1",
48
+ "hack-font": "^3.3.0",
47
49
  "shiki": "^4.0.2",
48
50
  "tailwind-merge": "^3.5.0"
49
51
  },
package/src/scales.css CHANGED
@@ -163,6 +163,76 @@
163
163
  --color-cui-amber-12: #ffe7b3;
164
164
  }
165
165
 
166
+ /* ── Secondary ──
167
+ * Mint / aquamarine scale anchored at step 9 = #25E2A8.
168
+ * OKLCH-based for smooth perceptual interpolation.
169
+ * Hue 163, anchor lightness 0.815, chroma 0.155.
170
+ */
171
+ :root {
172
+ --color-cui-secondary-1: oklch(0.992 0.005 163);
173
+ --color-cui-secondary-2: oklch(0.975 0.015 163);
174
+ --color-cui-secondary-3: oklch(0.95 0.035 163);
175
+ --color-cui-secondary-4: oklch(0.92 0.055 163);
176
+ --color-cui-secondary-5: oklch(0.89 0.075 163);
177
+ --color-cui-secondary-6: oklch(0.87 0.095 163);
178
+ --color-cui-secondary-7: oklch(0.85 0.115 163);
179
+ --color-cui-secondary-8: oklch(0.84 0.135 163);
180
+ --color-cui-secondary-9: oklch(0.815 0.155 163); /* #25E2A8 */
181
+ --color-cui-secondary-10: oklch(0.78 0.155 163);
182
+ --color-cui-secondary-11: oklch(0.55 0.13 163);
183
+ --color-cui-secondary-12: oklch(0.28 0.06 163);
184
+ }
185
+
186
+ [data-theme="dark"] {
187
+ --color-cui-secondary-1: oklch(0.17 0.015 163);
188
+ --color-cui-secondary-2: oklch(0.2 0.025 163);
189
+ --color-cui-secondary-3: oklch(0.24 0.045 163);
190
+ --color-cui-secondary-4: oklch(0.28 0.06 163);
191
+ --color-cui-secondary-5: oklch(0.32 0.075 163);
192
+ --color-cui-secondary-6: oklch(0.38 0.09 163);
193
+ --color-cui-secondary-7: oklch(0.46 0.105 163);
194
+ --color-cui-secondary-8: oklch(0.58 0.125 163);
195
+ --color-cui-secondary-9: oklch(0.815 0.155 163); /* #25E2A8 */
196
+ --color-cui-secondary-10: oklch(0.85 0.145 163);
197
+ --color-cui-secondary-11: oklch(0.9 0.13 163);
198
+ --color-cui-secondary-12: oklch(0.95 0.04 163);
199
+ }
200
+
201
+ /* ── Tertiary ──
202
+ * Periwinkle / indigo scale anchored at step 9 = #838BFF.
203
+ * OKLCH-based for smooth perceptual interpolation.
204
+ * Hue 272, anchor lightness 0.638, chroma 0.177.
205
+ */
206
+ :root {
207
+ --color-cui-tertiary-1: oklch(0.992 0.005 272);
208
+ --color-cui-tertiary-2: oklch(0.978 0.015 272);
209
+ --color-cui-tertiary-3: oklch(0.955 0.035 272);
210
+ --color-cui-tertiary-4: oklch(0.93 0.055 272);
211
+ --color-cui-tertiary-5: oklch(0.9 0.085 272);
212
+ --color-cui-tertiary-6: oklch(0.86 0.115 272);
213
+ --color-cui-tertiary-7: oklch(0.81 0.145 272);
214
+ --color-cui-tertiary-8: oklch(0.74 0.17 272);
215
+ --color-cui-tertiary-9: oklch(0.638 0.177 272); /* #838BFF */
216
+ --color-cui-tertiary-10: oklch(0.6 0.18 272);
217
+ --color-cui-tertiary-11: oklch(0.5 0.18 272);
218
+ --color-cui-tertiary-12: oklch(0.26 0.08 272);
219
+ }
220
+
221
+ [data-theme="dark"] {
222
+ --color-cui-tertiary-1: oklch(0.17 0.015 272);
223
+ --color-cui-tertiary-2: oklch(0.2 0.025 272);
224
+ --color-cui-tertiary-3: oklch(0.24 0.05 272);
225
+ --color-cui-tertiary-4: oklch(0.28 0.075 272);
226
+ --color-cui-tertiary-5: oklch(0.32 0.09 272);
227
+ --color-cui-tertiary-6: oklch(0.37 0.11 272);
228
+ --color-cui-tertiary-7: oklch(0.44 0.135 272);
229
+ --color-cui-tertiary-8: oklch(0.53 0.16 272);
230
+ --color-cui-tertiary-9: oklch(0.638 0.177 272); /* #838BFF */
231
+ --color-cui-tertiary-10: oklch(0.685 0.175 272);
232
+ --color-cui-tertiary-11: oklch(0.78 0.155 272);
233
+ --color-cui-tertiary-12: oklch(0.93 0.045 272);
234
+ }
235
+
166
236
  /* ── Green ──
167
237
  * Based on Radix Colors green scale.
168
238
  * Used for success and positive states.
package/src/styles.css CHANGED
@@ -1,3 +1,5 @@
1
+ @import "@fontsource-variable/geist";
2
+ @import "hack-font/build/web/hack-subset.css";
1
3
  @import "./theme.css";
2
4
  @import "./scales.css";
3
5
 
package/src/theme.css CHANGED
@@ -32,6 +32,48 @@
32
32
  }
33
33
 
34
34
  @theme {
35
+ /*
36
+ * ═══════════════════════════════════════
37
+ * TYPOGRAPHY — Geist (sans) + Hack (mono)
38
+ *
39
+ * Font families resolve through Tailwind's
40
+ * font-cui-sans / font-cui-mono utilities.
41
+ *
42
+ * Size scale starts at 11px micro and 14px
43
+ * body, then ramps in roughly 1.2-step
44
+ * increments. Each size pairs with a fixed
45
+ * line-height via the --text-{name}--line-height
46
+ * convention Tailwind v4 reads automatically.
47
+ *
48
+ * All tokens are prefixed with `cui-` to avoid
49
+ * colliding with Tailwind's built-in font-sans,
50
+ * font-mono, text-sm, text-base, etc. when
51
+ * imported alongside other design systems.
52
+ * ═══════════════════════════════════════
53
+ */
54
+ --font-cui-sans:
55
+ "Geist Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
56
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
57
+ --font-cui-mono:
58
+ "Hack", ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas",
59
+ "Liberation Mono", "Courier New", monospace;
60
+
61
+ /* Size scale — 11 (xs) / 12 / 14 (base / body) / 16 / 18 / 20 / 24 (max) */
62
+ --text-cui-xs: 0.6875rem; /* 11px */
63
+ --text-cui-xs--line-height: 1rem; /* 16px */
64
+ --text-cui-sm: 0.75rem; /* 12px */
65
+ --text-cui-sm--line-height: 1rem; /* 16px */
66
+ --text-cui-base: 0.875rem; /* 14px — body default */
67
+ --text-cui-base--line-height: 1.25rem; /* 20px */
68
+ --text-cui-lg: 1rem; /* 16px */
69
+ --text-cui-lg--line-height: 1.5rem; /* 24px */
70
+ --text-cui-xl: 1.125rem; /* 18px */
71
+ --text-cui-xl--line-height: 1.75rem; /* 28px */
72
+ --text-cui-2xl: 1.25rem; /* 20px */
73
+ --text-cui-2xl--line-height: 1.75rem; /* 28px */
74
+ --text-cui-3xl: 1.5rem; /* 24px */
75
+ --text-cui-3xl--line-height: 2rem; /* 32px */
76
+
35
77
  /*
36
78
  * ═══════════════════════════════════════
37
79
  * BACKGROUNDS — 3 spatial layers
@@ -64,6 +106,15 @@
64
106
  --text-color-cui-secondary: var(--color-cui-taupe-11);
65
107
  --text-color-cui-tertiary: var(--color-cui-taupe-9);
66
108
 
109
+ /*
110
+ * ═══════════════════════════════════════
111
+ * FILL — matching bg tokens for use with
112
+ * SVG fill/stroke and divider backgrounds
113
+ * ═══════════════════════════════════════
114
+ */
115
+ --background-color-cui-neutral: var(--color-cui-taupe-5);
116
+ --background-color-cui-tertiary: var(--color-cui-taupe-9);
117
+
67
118
  /*
68
119
  * ═══════════════════════════════════════
69
120
  * BORDERS — 2 levels
@@ -116,16 +167,16 @@
116
167
 
117
168
  /*
118
169
  * ═══════════════════════════════════════
119
- * SUCCESS — Radix green scale
170
+ * SUCCESS — secondary (mint) scale
120
171
  * ═══════════════════════════════════════
121
172
  */
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);
173
+ --background-color-cui-success: var(--color-cui-secondary-9);
174
+ --background-color-cui-success-subtle: var(--color-cui-secondary-3);
175
+ --background-color-cui-success-strong: var(--color-cui-secondary-10);
125
176
  --background-color-cui-success-on: oklch(0.99 0 0);
126
- --text-color-cui-success: var(--color-cui-green-11);
177
+ --text-color-cui-success: var(--color-cui-secondary-11);
127
178
  --text-color-cui-success-on: oklch(0.99 0 0);
128
- --border-color-cui-success: var(--color-cui-green-8);
179
+ --border-color-cui-success: var(--color-cui-secondary-8);
129
180
 
130
181
  /*
131
182
  * ═══════════════════════════════════════
@@ -226,8 +277,8 @@
226
277
  --background-color-cui-inverse: oklch(0.9 0.005 55);
227
278
 
228
279
  /* Success */
229
- --background-color-cui-success: var(--color-cui-green-9);
230
- --background-color-cui-success-strong: var(--color-cui-green-10);
280
+ --background-color-cui-success: var(--color-cui-secondary-9);
281
+ --background-color-cui-success-strong: var(--color-cui-secondary-10);
231
282
  }
232
283
 
233
284
  /*