@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/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@coderabbitai/carrot-ui",
|
|
3
|
+
"version": "0.1.19",
|
|
4
|
+
"description": "CodeRabbit design system. React components built on Base UI, styled with Tailwind CSS v4.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"coderabbit",
|
|
7
|
+
"design-system",
|
|
8
|
+
"react",
|
|
9
|
+
"tailwindcss",
|
|
10
|
+
"ui"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/coderabbitai/carrot-ui",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/coderabbitai/carrot-ui/issues"
|
|
15
|
+
},
|
|
16
|
+
"license": "UNLICENSED",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "CodeRabbit",
|
|
19
|
+
"email": "support@coderabbit.ai",
|
|
20
|
+
"url": "https://coderabbit.ai"
|
|
21
|
+
},
|
|
22
|
+
"repository": "github:coderabbitai/carrot-ui",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"src/styles.css",
|
|
26
|
+
"src/theme.css",
|
|
27
|
+
"src/scales.css"
|
|
28
|
+
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"import": "./dist/index.js",
|
|
35
|
+
"types": "./dist/index.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./css": "./src/styles.css",
|
|
38
|
+
"./theme": "./src/theme.css",
|
|
39
|
+
"./scales": "./src/scales.css"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@base-ui/react": "^1.3.0",
|
|
43
|
+
"@heroicons/react": "^2.2.0",
|
|
44
|
+
"@tanstack/react-table": "^8.21.3",
|
|
45
|
+
"clsx": "^2.1.1",
|
|
46
|
+
"cmdk": "^1.1.1",
|
|
47
|
+
"shiki": "^4.0.2",
|
|
48
|
+
"tailwind-merge": "^3.5.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@mdx-js/rollup": "^3.1.1",
|
|
52
|
+
"@tailwindcss/vite": "4.1.15",
|
|
53
|
+
"@tanstack/react-router": "^1.168.18",
|
|
54
|
+
"@types/mdast": "^4.0.4",
|
|
55
|
+
"@types/mdx": "^2.0.13",
|
|
56
|
+
"@types/node": "^22.15.32",
|
|
57
|
+
"@types/react": "^19.2.14",
|
|
58
|
+
"@types/react-dom": "^19.2.3",
|
|
59
|
+
"@vitejs/plugin-react": "6.0.0",
|
|
60
|
+
"mdast-util-to-string": "^4.0.0",
|
|
61
|
+
"oxfmt": "^0.49.0",
|
|
62
|
+
"oxlint": "^1.64.0",
|
|
63
|
+
"tailwindcss": "^4.1.15",
|
|
64
|
+
"typescript": "5.8.3",
|
|
65
|
+
"unist-util-visit": "^5.1.0",
|
|
66
|
+
"vite": "8.0.7",
|
|
67
|
+
"vite-plugin-dts": "^4.5.4"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"react": "^18.3.1 || ^19.0.0",
|
|
71
|
+
"react-dom": "^18.3.1 || ^19.0.0"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "vite build --config vite.config.lib.ts",
|
|
75
|
+
"build:playground": "vite build",
|
|
76
|
+
"dev": "vite",
|
|
77
|
+
"format": "oxfmt --config .oxfmtrc.json .",
|
|
78
|
+
"format:check": "oxfmt --config .oxfmtrc.json --check .",
|
|
79
|
+
"lint": "oxlint --config .oxlintrc.json . && pnpm run format:check",
|
|
80
|
+
"lint:fix": "oxlint --config .oxlintrc.json --fix . --quiet && pnpm run format",
|
|
81
|
+
"typecheck": "tsc --noEmit"
|
|
82
|
+
}
|
|
83
|
+
}
|
package/src/scales.css
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ═══════════════════════════════════════════════════════════════
|
|
3
|
+
* Color Scales
|
|
4
|
+
*
|
|
5
|
+
* All custom 12-step scales using Radix-style 1-12 numbering.
|
|
6
|
+
* Each scale provides light and dark mode values.
|
|
7
|
+
*
|
|
8
|
+
* Radix semantic step conventions:
|
|
9
|
+
* 1-2: Backgrounds
|
|
10
|
+
* 3-5: Component backgrounds (default, hover, active)
|
|
11
|
+
* 6-8: Borders (subtle, default, strong)
|
|
12
|
+
* 9-10: Solid fills (default, hover)
|
|
13
|
+
* 11: Low-contrast text
|
|
14
|
+
* 12: High-contrast text
|
|
15
|
+
*
|
|
16
|
+
* The taupe scale is custom OKLCH and inverts between modes.
|
|
17
|
+
* Red, amber, and green are based on Radix Colors.
|
|
18
|
+
* CR Orange is the CodeRabbit brand palette.
|
|
19
|
+
*
|
|
20
|
+
* All scales are prefixed with `cui-` to avoid collisions
|
|
21
|
+
* when imported alongside other design systems.
|
|
22
|
+
*
|
|
23
|
+
* Scales use --color-cui-* namespace so Tailwind v4
|
|
24
|
+
* auto-generates utilities (bg-cui-taupe-6, text-cui-red-12,
|
|
25
|
+
* etc.). Prefer semantic tokens (bg-cui-base-1, text-cui-primary)
|
|
26
|
+
* in components.
|
|
27
|
+
* ═══════════════════════════════════════════════════════════════
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/* ── Taupe ──
|
|
31
|
+
* Custom neutral in OKLCH (hue 55, chroma 0.005).
|
|
32
|
+
* Inverts between modes. Steps cluster tighter near backgrounds.
|
|
33
|
+
*/
|
|
34
|
+
:root {
|
|
35
|
+
--color-cui-taupe-1: oklch(0.994 0.005 55);
|
|
36
|
+
--color-cui-taupe-2: oklch(0.982 0.005 55);
|
|
37
|
+
--color-cui-taupe-3: oklch(0.956 0.005 55);
|
|
38
|
+
--color-cui-taupe-4: oklch(0.931 0.005 55);
|
|
39
|
+
--color-cui-taupe-5: oklch(0.91 0.005 55);
|
|
40
|
+
--color-cui-taupe-6: oklch(0.885 0.005 55);
|
|
41
|
+
--color-cui-taupe-7: oklch(0.851 0.005 55);
|
|
42
|
+
--color-cui-taupe-8: oklch(0.791 0.005 55);
|
|
43
|
+
--color-cui-taupe-9: oklch(0.641 0.005 55);
|
|
44
|
+
--color-cui-taupe-10: oklch(0.605 0.005 55);
|
|
45
|
+
--color-cui-taupe-11: oklch(0.498 0.005 55);
|
|
46
|
+
--color-cui-taupe-12: oklch(0.243 0.005 55);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-theme="dark"] {
|
|
50
|
+
--color-cui-taupe-1: oklch(0.177 0.005 55);
|
|
51
|
+
--color-cui-taupe-2: oklch(0.213 0.005 55);
|
|
52
|
+
--color-cui-taupe-3: oklch(0.252 0.005 55);
|
|
53
|
+
--color-cui-taupe-4: oklch(0.284 0.005 55);
|
|
54
|
+
--color-cui-taupe-5: oklch(0.312 0.005 55);
|
|
55
|
+
--color-cui-taupe-6: oklch(0.348 0.005 55);
|
|
56
|
+
--color-cui-taupe-7: oklch(0.401 0.005 55);
|
|
57
|
+
--color-cui-taupe-8: oklch(0.489 0.005 55);
|
|
58
|
+
--color-cui-taupe-9: oklch(0.534 0.005 55);
|
|
59
|
+
--color-cui-taupe-10: oklch(0.582 0.005 55);
|
|
60
|
+
--color-cui-taupe-11: oklch(0.767 0.005 55);
|
|
61
|
+
--color-cui-taupe-12: oklch(0.949 0.005 55);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ── CodeRabbit Orange ──
|
|
65
|
+
* Custom brand palette. Inverts between modes following
|
|
66
|
+
* the same pattern as Radix scales.
|
|
67
|
+
*/
|
|
68
|
+
:root {
|
|
69
|
+
--color-cui-cr-orange-1: #fefcfb;
|
|
70
|
+
--color-cui-cr-orange-2: #fff7ed;
|
|
71
|
+
--color-cui-cr-orange-3: #ffead5;
|
|
72
|
+
--color-cui-cr-orange-4: #ffdcc3;
|
|
73
|
+
--color-cui-cr-orange-5: #ffc4a0;
|
|
74
|
+
--color-cui-cr-orange-6: #ffab7a;
|
|
75
|
+
--color-cui-cr-orange-7: #f48e5a;
|
|
76
|
+
--color-cui-cr-orange-8: #e57340;
|
|
77
|
+
--color-cui-cr-orange-9: #ff570a;
|
|
78
|
+
--color-cui-cr-orange-10: #ef4f00;
|
|
79
|
+
--color-cui-cr-orange-11: #cc4e00;
|
|
80
|
+
--color-cui-cr-orange-12: #582d1d;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-theme="dark"] {
|
|
84
|
+
--color-cui-cr-orange-1: #17120e;
|
|
85
|
+
--color-cui-cr-orange-2: #1e150f;
|
|
86
|
+
--color-cui-cr-orange-3: #331e0b;
|
|
87
|
+
--color-cui-cr-orange-4: #462100;
|
|
88
|
+
--color-cui-cr-orange-5: #562800;
|
|
89
|
+
--color-cui-cr-orange-6: #66350c;
|
|
90
|
+
--color-cui-cr-orange-7: #7e451d;
|
|
91
|
+
--color-cui-cr-orange-8: #a35829;
|
|
92
|
+
--color-cui-cr-orange-9: #ff570a;
|
|
93
|
+
--color-cui-cr-orange-10: #ff801f;
|
|
94
|
+
--color-cui-cr-orange-11: #ffa057;
|
|
95
|
+
--color-cui-cr-orange-12: #ffe0c2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* ── Red ──
|
|
99
|
+
* Based on Radix Colors tomato scale.
|
|
100
|
+
* Used for danger and error states.
|
|
101
|
+
*/
|
|
102
|
+
:root {
|
|
103
|
+
--color-cui-red-1: #fffcfc;
|
|
104
|
+
--color-cui-red-2: #fff8f7;
|
|
105
|
+
--color-cui-red-3: #feebe7;
|
|
106
|
+
--color-cui-red-4: #ffdcd3;
|
|
107
|
+
--color-cui-red-5: #ffcdc2;
|
|
108
|
+
--color-cui-red-6: #fdbdaf;
|
|
109
|
+
--color-cui-red-7: #f5a898;
|
|
110
|
+
--color-cui-red-8: #ec8e7b;
|
|
111
|
+
--color-cui-red-9: #e54d2e;
|
|
112
|
+
--color-cui-red-10: #dd4425;
|
|
113
|
+
--color-cui-red-11: #d13415;
|
|
114
|
+
--color-cui-red-12: #5c271f;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-theme="dark"] {
|
|
118
|
+
--color-cui-red-1: #181111;
|
|
119
|
+
--color-cui-red-2: #1f1513;
|
|
120
|
+
--color-cui-red-3: #391714;
|
|
121
|
+
--color-cui-red-4: #4e1511;
|
|
122
|
+
--color-cui-red-5: #5e1c16;
|
|
123
|
+
--color-cui-red-6: #6e2920;
|
|
124
|
+
--color-cui-red-7: #853a2d;
|
|
125
|
+
--color-cui-red-8: #ac4d39;
|
|
126
|
+
--color-cui-red-9: #e54d2e;
|
|
127
|
+
--color-cui-red-10: #ec6142;
|
|
128
|
+
--color-cui-red-11: #ff977d;
|
|
129
|
+
--color-cui-red-12: #fbd3cb;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ── Amber ──
|
|
133
|
+
* Based on Radix Colors amber scale.
|
|
134
|
+
* Used for warning and caution states.
|
|
135
|
+
*/
|
|
136
|
+
:root {
|
|
137
|
+
--color-cui-amber-1: #fefdfb;
|
|
138
|
+
--color-cui-amber-2: #fefbe9;
|
|
139
|
+
--color-cui-amber-3: #fff7c2;
|
|
140
|
+
--color-cui-amber-4: #ffee9c;
|
|
141
|
+
--color-cui-amber-5: #fbe577;
|
|
142
|
+
--color-cui-amber-6: #f3d673;
|
|
143
|
+
--color-cui-amber-7: #e9c162;
|
|
144
|
+
--color-cui-amber-8: #e2a336;
|
|
145
|
+
--color-cui-amber-9: #ffc53d;
|
|
146
|
+
--color-cui-amber-10: #ffba18;
|
|
147
|
+
--color-cui-amber-11: #ab6400;
|
|
148
|
+
--color-cui-amber-12: #4f3422;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
[data-theme="dark"] {
|
|
152
|
+
--color-cui-amber-1: #16120c;
|
|
153
|
+
--color-cui-amber-2: #1d180f;
|
|
154
|
+
--color-cui-amber-3: #302008;
|
|
155
|
+
--color-cui-amber-4: #3f2700;
|
|
156
|
+
--color-cui-amber-5: #4d3000;
|
|
157
|
+
--color-cui-amber-6: #5c3d05;
|
|
158
|
+
--color-cui-amber-7: #714f19;
|
|
159
|
+
--color-cui-amber-8: #8f6424;
|
|
160
|
+
--color-cui-amber-9: #ffc53d;
|
|
161
|
+
--color-cui-amber-10: #ffd60a;
|
|
162
|
+
--color-cui-amber-11: #ffca16;
|
|
163
|
+
--color-cui-amber-12: #ffe7b3;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ── Green ──
|
|
167
|
+
* Based on Radix Colors green scale.
|
|
168
|
+
* Used for success and positive states.
|
|
169
|
+
*/
|
|
170
|
+
:root {
|
|
171
|
+
--color-cui-green-1: #fbfefc;
|
|
172
|
+
--color-cui-green-2: #f4fbf6;
|
|
173
|
+
--color-cui-green-3: #e6f6eb;
|
|
174
|
+
--color-cui-green-4: #d6f1df;
|
|
175
|
+
--color-cui-green-5: #c4e8d1;
|
|
176
|
+
--color-cui-green-6: #adddc0;
|
|
177
|
+
--color-cui-green-7: #8eceaa;
|
|
178
|
+
--color-cui-green-8: #5bb98b;
|
|
179
|
+
--color-cui-green-9: #30a46c;
|
|
180
|
+
--color-cui-green-10: #2b9a66;
|
|
181
|
+
--color-cui-green-11: #218358;
|
|
182
|
+
--color-cui-green-12: #193b2d;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
[data-theme="dark"] {
|
|
186
|
+
--color-cui-green-1: #0e1512;
|
|
187
|
+
--color-cui-green-2: #121b17;
|
|
188
|
+
--color-cui-green-3: #132d21;
|
|
189
|
+
--color-cui-green-4: #113b29;
|
|
190
|
+
--color-cui-green-5: #174933;
|
|
191
|
+
--color-cui-green-6: #20573e;
|
|
192
|
+
--color-cui-green-7: #28684a;
|
|
193
|
+
--color-cui-green-8: #2f7c57;
|
|
194
|
+
--color-cui-green-9: #30a46c;
|
|
195
|
+
--color-cui-green-10: #33b074;
|
|
196
|
+
--color-cui-green-11: #3dd68c;
|
|
197
|
+
--color-cui-green-12: #b1f1cb;
|
|
198
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@import "./theme.css";
|
|
2
|
+
@import "./scales.css";
|
|
3
|
+
|
|
4
|
+
@source "../dist/index.js";
|
|
5
|
+
|
|
6
|
+
* {
|
|
7
|
+
--tw-ring-offset-color: var(--background-color-cui-base-1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
::selection {
|
|
11
|
+
background-color: var(--background-color-cui-inverse);
|
|
12
|
+
color: var(--text-color-cui-inverse);
|
|
13
|
+
}
|