@juv/codego-react-ui 1.0.1 → 1.0.4

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 CHANGED
@@ -8,14 +8,233 @@ A collection of reusable React UI components built with Tailwind CSS, Motion, an
8
8
 
9
9
  ---
10
10
 
11
+ ## Prerequisites
12
+
13
+ Before installing this package, make sure the following are set up in your project:
14
+
15
+ ### 1. React 18+
16
+
17
+ ```bash
18
+ npm install react react-dom
19
+ ```
20
+
21
+ ### 2. Tailwind CSS v4
22
+
23
+ ```bash
24
+ npm install tailwindcss @tailwindcss/vite
25
+ ```
26
+
27
+ Add the plugin to your `vite.config.ts`:
28
+
29
+ ```ts
30
+ import tailwindcss from "@tailwindcss/vite"
31
+ import { defineConfig } from "vite"
32
+
33
+ export default defineConfig({
34
+ plugins: [tailwindcss()],
35
+ })
36
+ ```
37
+
38
+ Then import Tailwind in your main CSS file:
39
+
40
+ ```css
41
+ @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');
42
+ @import "tailwindcss";
43
+ @source "../node_modules/@juv/codego-react-ui/dist/index.js";
44
+
45
+ @theme {
46
+ --font-sans: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
47
+ --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
48
+
49
+ --color-background: var(--background);
50
+ --color-foreground: var(--foreground);
51
+ --color-card: var(--card);
52
+ --color-card-foreground: var(--card-foreground);
53
+ --color-popover: var(--popover);
54
+ --color-popover-foreground: var(--popover-foreground);
55
+ --color-primary: var(--primary);
56
+ --color-primary-hover: var(--primary-hover);
57
+ --color-primary-foreground: var(--primary-foreground);
58
+ --color-secondary: var(--secondary);
59
+ --color-secondary-hover: var(--secondary-hover);
60
+ --color-secondary-foreground: var(--secondary-foreground);
61
+ --color-muted: var(--muted);
62
+ --color-muted-foreground: var(--muted-foreground);
63
+ --color-accent: var(--accent);
64
+ --color-accent-foreground: var(--accent-foreground);
65
+ --color-destructive: var(--destructive);
66
+ --color-destructive-foreground: var(--destructive-foreground);
67
+ --color-border: var(--border);
68
+ --color-input: var(--input);
69
+ --color-ring: var(--ring);
70
+ --color-info: var(--info);
71
+ --color-info-hover: var(--info-hover);
72
+ --color-info-foreground: var(--info-foreground);
73
+ --color-warning: var(--warning);
74
+ --color-warning-hover: var(--warning-hover);
75
+ --color-warning-foreground: var(--warning-foreground);
76
+ --color-danger: var(--danger);
77
+ --color-danger-hover: var(--danger-hover);
78
+ --color-danger-foreground: var(--danger-foreground);
79
+ --color-success: var(--success);
80
+ --color-success-hover: var(--success-hover);
81
+ --color-success-foreground: var(--success-foreground);
82
+ --radius: var(--radius);
83
+ }
84
+
85
+ @layer base {
86
+ :root {
87
+ --background: #ffffff;
88
+ --foreground: #09090b;
89
+ --card: #ffffff;
90
+ --card-foreground: #09090b;
91
+ --popover: #ffffff;
92
+ --popover-foreground: #09090b;
93
+ --primary: #6366f1; /* Indigo 500 */
94
+ --primary-hover: #4f46e5;
95
+ --primary-foreground: #ffffff;
96
+ --secondary: #f4f4f5;
97
+ --secondary-hover: #e4e4e7;
98
+ --secondary-foreground: #18181b;
99
+ --info: #3b82f6; /* Blue 500 */
100
+ --info-hover: #2563eb;
101
+ --info-foreground: #ffffff;
102
+ --warning: #f59e0b; /* Amber 500 */
103
+ --warning-hover: #d97706;
104
+ --warning-foreground: #ffffff;
105
+ --danger: #ef4444; /* Red 500 */
106
+ --danger-hover: #dc2626;
107
+ --danger-foreground: #ffffff;
108
+ --success: #22c55e; /* Green 500 */
109
+ --success-hover: #16a34a;
110
+ --success-foreground: #ffffff;
111
+ --muted: #f4f4f5;
112
+ --muted-foreground: #71717a;
113
+ --accent: #f4f4f5;
114
+ --accent-foreground: #18181b;
115
+ --destructive: #ef4444;
116
+ --destructive-foreground: #ffffff;
117
+ --border: #e4e4e7;
118
+ --input: #e4e4e7;
119
+ --ring: var(--primary);
120
+ --radius: 0.75rem;
121
+ }
122
+
123
+ .dark {
124
+ --background: #030303; /* Deep black */
125
+ --foreground: #ededed;
126
+ --card: #0a0a0a; /* Slightly lighter black */
127
+ --card-foreground: #ededed;
128
+ --popover: #0a0a0a;
129
+ --popover-foreground: #ededed;
130
+ --primary: #8b5cf6; /* Neon Violet */
131
+ --primary-hover: #7c3aed;
132
+ --primary-foreground: #ffffff;
133
+ --secondary: #171717;
134
+ --secondary-hover: #262626;
135
+ --secondary-foreground: #ededed;
136
+ --info: #3b82f6;
137
+ --info-hover: #2563eb;
138
+ --info-foreground: #ffffff;
139
+ --warning: #f59e0b;
140
+ --warning-hover: #d97706;
141
+ --warning-foreground: #ffffff;
142
+ --danger: #ef4444;
143
+ --danger-hover: #dc2626;
144
+ --danger-foreground: #ffffff;
145
+ --success: #22c55e;
146
+ --success-hover: #16a34a;
147
+ --success-foreground: #ffffff;
148
+ --muted: #171717;
149
+ --muted-foreground: #a1a1aa;
150
+ --accent: #1f1f2e; /* Subtle purple tint */
151
+ --accent-foreground: #c4b5fd;
152
+ --destructive: #7f1d1d;
153
+ --destructive-foreground: #ededed;
154
+ --border: #1f1f1f;
155
+ --input: #1f1f1f;
156
+ --ring: var(--primary);
157
+ }
158
+ }
159
+
160
+ @layer base {
161
+ * {
162
+ @apply border-border;
163
+ }
164
+ body {
165
+ @apply bg-background text-foreground;
166
+ font-feature-settings: "rlig" 1, "calt" 1;
167
+ }
168
+ }
169
+
170
+ @layer utilities {
171
+ .glass {
172
+ @apply bg-background/60 backdrop-blur-xl border border-white/10;
173
+ }
174
+ .dark .glass {
175
+ @apply bg-black/40 border-white/5;
176
+ }
177
+ .text-gradient {
178
+ background: linear-gradient(to right, var(--primary), var(--info));
179
+ -webkit-background-clip: text;
180
+ -webkit-text-fill-color: transparent;
181
+ background-clip: text;
182
+ }
183
+ .glow {
184
+ box-shadow: 0 0 20px -5px var(--primary);
185
+ }
186
+ }
187
+ /* Hide calendar icon (Chrome, Edge, Safari) */
188
+ input[type="datetime-local"]::-webkit-calendar-picker-indicator {
189
+ display: none;
190
+ -webkit-appearance: none;
191
+ }
192
+
193
+ /* Optional: remove clear (X) button */
194
+ input[type="datetime-local"]::-webkit-clear-button {
195
+ display: none;
196
+ }
197
+
198
+ /* Optional: remove spin buttons */
199
+ input[type="datetime-local"]::-webkit-inner-spin-button {
200
+ display: none;
201
+ }
202
+ ```
203
+
204
+ ### 3. Lucide React (icons)
205
+
206
+ ```bash
207
+ npm install lucide-react
208
+ ```
209
+
210
+ ### 4. Motion (animations)
211
+
212
+ ```bash
213
+ npm install motion
214
+ ```
215
+
216
+ ### 5. date-fns (date utilities — required by Calendar, Date Picker, Date Range Picker)
217
+
218
+ ```bash
219
+ npm install date-fns
220
+ ```
221
+
222
+ ### 6. tailwind-merge + clsx (utility — used internally)
223
+
224
+ ```bash
225
+ npm install tailwind-merge clsx
226
+ ```
227
+
228
+ ---
229
+
11
230
  ## Installation
12
231
 
232
+ Once all prerequisites are installed:
233
+
13
234
  ```bash
14
235
  npm install @juv/codego-react-ui
15
236
  ```
16
237
 
17
- > Requires React >= 18 and Tailwind CSS configured in your project.
18
-
19
238
  ---
20
239
 
21
240
  ## Usage