indas-ui 0.0.1

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.
@@ -0,0 +1,46 @@
1
+ /* Styled scrollbar for sidebar */
2
+ .custom-scrollbar {
3
+ scrollbar-width: thin;
4
+ scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
5
+ }
6
+
7
+ .custom-scrollbar::-webkit-scrollbar {
8
+ width: 6px;
9
+ }
10
+
11
+ .custom-scrollbar::-webkit-scrollbar-track {
12
+ background: transparent;
13
+ }
14
+
15
+ .custom-scrollbar::-webkit-scrollbar-thumb {
16
+ background-color: rgba(255, 255, 255, 0.2);
17
+ border-radius: 3px;
18
+ }
19
+
20
+ .custom-scrollbar::-webkit-scrollbar-thumb:hover {
21
+ background-color: rgba(255, 255, 255, 0.3);
22
+ }
23
+
24
+ /* Hide scrollbar arrow buttons at top and bottom */
25
+ .custom-scrollbar::-webkit-scrollbar-button {
26
+ display: none;
27
+ height: 0;
28
+ width: 0;
29
+ }
30
+
31
+ /* Sidebar hover overlay - ensure it appears above all content */
32
+ .sidebar-hover-overlay {
33
+ z-index: 99999 !important;
34
+ isolation: isolate;
35
+ transform: translateZ(0);
36
+ }
37
+
38
+ .sidebar-hover-overlay::before {
39
+ content: '';
40
+ position: absolute;
41
+ top: 0;
42
+ left: 0;
43
+ right: 0;
44
+ bottom: 0;
45
+ z-index: -1;
46
+ }
package/package.json ADDED
@@ -0,0 +1,119 @@
1
+ {
2
+ "name": "indas-ui",
3
+ "version": "0.0.1",
4
+ "description": "Reusable React component library extracted from Indas Estimo (ERP). Tailwind + Radix + Lucide + DataGrid.",
5
+ "license": "MIT",
6
+ "author": "Indas Analytics Pvt Ltd",
7
+ "contributors": [
8
+ "Shreyansh Patidar",
9
+ "Abhinav"
10
+ ],
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/ShreyanshPatidar/indas-ui.git",
14
+ "directory": "packages/indas-ui"
15
+ },
16
+ "homepage": "https://shreyanshpatidar.github.io/indas-ui",
17
+ "type": "module",
18
+ "main": "./dist/index.cjs",
19
+ "module": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/index.js",
25
+ "require": "./dist/index.cjs"
26
+ },
27
+ "./tokens.css": "./src/styles/tokens.css"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "src/styles"
32
+ ],
33
+ "sideEffects": [
34
+ "*.css"
35
+ ],
36
+ "scripts": {
37
+ "build": "tsup",
38
+ "dev": "tsup --watch",
39
+ "type-check": "tsc --noEmit",
40
+ "prepublishOnly": "npm run build"
41
+ },
42
+ "peerDependencies": {
43
+ "react": ">=18.0.0",
44
+ "react-dom": ">=18.0.0"
45
+ },
46
+ "dependencies": {
47
+ "@dicebear/collection": "^9.4.2",
48
+ "@dicebear/core": "^9.4.2",
49
+ "@dnd-kit/core": "^6.3.1",
50
+ "@dnd-kit/modifiers": "^9.0.0",
51
+ "@dnd-kit/sortable": "^10.0.0",
52
+ "@dnd-kit/utilities": "^3.2.2",
53
+ "@headlessui/react": "^2.2.10",
54
+ "@heroicons/react": "^2.2.0",
55
+ "@microsoft/signalr": "^10.0.0",
56
+ "@radix-ui/react-collapsible": "^1.1.12",
57
+ "@radix-ui/react-dialog": "^1.1.15",
58
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
59
+ "@radix-ui/react-icons": "^1.3.2",
60
+ "@radix-ui/react-popover": "^1.1.15",
61
+ "@radix-ui/react-progress": "^1.1.7",
62
+ "@radix-ui/react-select": "^2.2.6",
63
+ "@radix-ui/react-separator": "^1.1.7",
64
+ "@radix-ui/react-tabs": "^1.1.13",
65
+ "@radix-ui/react-tooltip": "^1.2.8",
66
+ "@react-pdf/renderer": "^4.5.1",
67
+ "@tanstack/react-query": "^5.90.10",
68
+ "@tanstack/react-query-devtools": "^5.90.2",
69
+ "@tanstack/react-table": "^8.21.3",
70
+ "@tanstack/react-virtual": "^3.13.12",
71
+ "@types/react-window": "^1.8.8",
72
+ "@types/three": "^0.182.0",
73
+ "class-variance-authority": "^0.7.1",
74
+ "clsx": "^2.1.1",
75
+ "date-fns": "^4.3.0",
76
+ "echarts": "^6.0.0",
77
+ "echarts-for-react": "^3.0.5",
78
+ "emoji-picker-react": "^4.19.1",
79
+ "exceljs": "^4.4.0",
80
+ "file-saver": "^2.0.5",
81
+ "framer-motion": "^12.23.12",
82
+ "jspdf": "^3.0.2",
83
+ "jspdf-autotable": "^5.0.2",
84
+ "ldrs": "^1.1.9",
85
+ "lucide-react": "^0.562.0",
86
+ "next-auth": "^4.24.7",
87
+ "papaparse": "^5.5.3",
88
+ "react-hook-form": "^7.76.1",
89
+ "react-image-crop": "^11.0.10",
90
+ "react-is": "^19.2.6",
91
+ "react-markdown": "^10.1.0",
92
+ "react-window": "^2.2.7",
93
+ "react-window-infinite-loader": "^2.0.1",
94
+ "rehype-highlight": "^7.0.2",
95
+ "rehype-raw": "^7.0.0",
96
+ "remark-gfm": "^4.0.1",
97
+ "svg2pdf.js": "^2.7.0",
98
+ "tailwind-merge": "^3.3.1",
99
+ "three": "^0.182.0",
100
+ "xlsx": "^0.18.5"
101
+ },
102
+ "devDependencies": {
103
+ "@types/react": "^19.0.0",
104
+ "@types/react-dom": "^19.0.0",
105
+ "next": "^16.2.1",
106
+ "tsup": "^8.3.5",
107
+ "typescript": "^5.7.2"
108
+ },
109
+ "keywords": [
110
+ "react",
111
+ "components",
112
+ "ui",
113
+ "tailwind",
114
+ "design-system",
115
+ "datagrid",
116
+ "indas",
117
+ "erp"
118
+ ]
119
+ }
@@ -0,0 +1,346 @@
1
+ /* Advanced Data Grid Theme System */
2
+
3
+ /* Light Theme (Default) */
4
+ :root,
5
+ [data-theme="light"] {
6
+ /* Background Colors */
7
+ --grid-bg-primary: #ffffff;
8
+ --grid-bg-secondary: #f8fafc;
9
+ --grid-bg-tertiary: #f1f5f9;
10
+ --grid-bg-hover: #f8fafc;
11
+ --grid-bg-selected: #eff6ff;
12
+ --grid-bg-focused: #dbeafe;
13
+
14
+ /* Border Colors */
15
+ --grid-border-primary: #e2e8f0;
16
+ --grid-border-secondary: #cbd5e1;
17
+ --grid-border-focused: #3b82f6;
18
+ --grid-border-error: #ef4444;
19
+ --grid-border-success: #22c55e;
20
+
21
+ /* Text Colors */
22
+ --grid-text-primary: #1e293b;
23
+ --grid-text-secondary: #64748b;
24
+ --grid-text-muted: #94a3b8;
25
+ --grid-text-inverse: #ffffff;
26
+ --grid-text-error: #dc2626;
27
+ --grid-text-success: #16a34a;
28
+ --grid-text-warning: #d97706;
29
+
30
+ /* Header Colors */
31
+ --grid-header-bg: #f1f5f9;
32
+ --grid-header-text: #374151;
33
+ --grid-header-border: #d1d5db;
34
+ --grid-header-hover: #e5e7eb;
35
+ --grid-header-sort: #3b82f6;
36
+
37
+ /* Footer Colors */
38
+ --grid-footer-bg: linear-gradient(to right, #f9fafb, #f3f4f6);
39
+ --grid-footer-text: #374151;
40
+ --grid-footer-border: #d1d5db;
41
+
42
+ /* Interactive Colors */
43
+ --grid-accent-primary: #3b82f6;
44
+ --grid-accent-secondary: #8b5cf6;
45
+ --grid-accent-success: #10b981;
46
+ --grid-accent-warning: #f59e0b;
47
+ --grid-accent-error: #ef4444;
48
+
49
+ /* Shadow Values */
50
+ --grid-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
51
+ --grid-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
52
+ --grid-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
53
+
54
+ /* Transition Values */
55
+ --grid-transition-fast: 150ms ease-in-out;
56
+ --grid-transition-normal: 200ms ease-in-out;
57
+ --grid-transition-slow: 300ms ease-in-out;
58
+
59
+ /* Spacing Values */
60
+ --grid-spacing-xs: 0.25rem;
61
+ --grid-spacing-sm: 0.5rem;
62
+ --grid-spacing-md: 0.75rem;
63
+ --grid-spacing-lg: 1rem;
64
+ --grid-spacing-xl: 1.5rem;
65
+
66
+ /* Typography */
67
+ --grid-font-size-xs: 0.75rem;
68
+ --grid-font-size-sm: 0.875rem;
69
+ --grid-font-size-base: 1rem;
70
+ --grid-font-size-lg: 1.125rem;
71
+ --grid-line-height-tight: 1.25;
72
+ --grid-line-height-normal: 1.5;
73
+
74
+ /* Border Radius */
75
+ --grid-radius-sm: 0.25rem;
76
+ --grid-radius-md: 0.375rem;
77
+ --grid-radius-lg: 0.5rem;
78
+
79
+ /* Z-Index - Keep below sidebar (z-30) to prevent overlap issues */
80
+ --grid-z-sticky: 10;
81
+ --grid-z-sticky-header: 10;
82
+ --grid-z-frozen: 11;
83
+ --grid-z-pinned-right: 12;
84
+ --grid-z-cell-frozen: 20;
85
+ --grid-z-dropdown: 25;
86
+ --grid-z-modal: 50;
87
+ --grid-z-tooltip: 50;
88
+ }
89
+
90
+ /* Dark Theme */
91
+ [data-theme="dark"] {
92
+ /* Background Colors */
93
+ --grid-bg-primary: #0f172a;
94
+ --grid-bg-secondary: #1e293b;
95
+ --grid-bg-tertiary: #334155;
96
+ --grid-bg-hover: #1e293b;
97
+ --grid-bg-selected: #1e3a8a;
98
+ --grid-bg-focused: #1d4ed8;
99
+
100
+ /* Border Colors */
101
+ --grid-border-primary: #334155;
102
+ --grid-border-secondary: #475569;
103
+ --grid-border-focused: #3b82f6;
104
+ --grid-border-error: #ef4444;
105
+ --grid-border-success: #22c55e;
106
+
107
+ /* Text Colors */
108
+ --grid-text-primary: #f1f5f9;
109
+ --grid-text-secondary: #cbd5e1;
110
+ --grid-text-muted: #64748b;
111
+ --grid-text-inverse: #0f172a;
112
+ --grid-text-error: #fca5a5;
113
+ --grid-text-success: #86efac;
114
+ --grid-text-warning: #fcd34d;
115
+
116
+ /* Header Colors */
117
+ --grid-header-bg: #1e293b;
118
+ --grid-header-text: #e2e8f0;
119
+ --grid-header-border: #475569;
120
+ --grid-header-hover: #334155;
121
+ --grid-header-sort: #60a5fa;
122
+
123
+ /* Footer Colors */
124
+ --grid-footer-bg: linear-gradient(to right, #1e293b, #334155);
125
+ --grid-footer-text: #e2e8f0;
126
+ --grid-footer-border: #475569;
127
+
128
+ /* Interactive Colors */
129
+ --grid-accent-primary: #60a5fa;
130
+ --grid-accent-secondary: #a78bfa;
131
+ --grid-accent-success: #34d399;
132
+ --grid-accent-warning: #fbbf24;
133
+ --grid-accent-error: #f87171;
134
+
135
+ /* Shadow Values (darker for dark theme) */
136
+ --grid-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
137
+ --grid-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
138
+ --grid-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
139
+ }
140
+
141
+ /* High Contrast Theme */
142
+ [data-theme="high-contrast"] {
143
+ /* Background Colors */
144
+ --grid-bg-primary: #ffffff;
145
+ --grid-bg-secondary: #f0f0f0;
146
+ --grid-bg-tertiary: #e0e0e0;
147
+ --grid-bg-hover: #ffffcc;
148
+ --grid-bg-selected: #0066cc;
149
+ --grid-bg-focused: #ff6600;
150
+
151
+ /* Border Colors */
152
+ --grid-border-primary: #000000;
153
+ --grid-border-secondary: #333333;
154
+ --grid-border-focused: #ff6600;
155
+ --grid-border-error: #cc0000;
156
+ --grid-border-success: #009900;
157
+
158
+ /* Text Colors */
159
+ --grid-text-primary: #000000;
160
+ --grid-text-secondary: #333333;
161
+ --grid-text-muted: #666666;
162
+ --grid-text-inverse: #ffffff;
163
+ --grid-text-error: #cc0000;
164
+ --grid-text-success: #009900;
165
+ --grid-text-warning: #cc6600;
166
+
167
+ /* Header Colors */
168
+ --grid-header-bg: #e0e0e0;
169
+ --grid-header-text: #000000;
170
+ --grid-header-border: #000000;
171
+ --grid-header-hover: #cccccc;
172
+ --grid-header-sort: #0066cc;
173
+
174
+ /* Footer Colors */
175
+ --grid-footer-bg: #f0f0f0;
176
+ --grid-footer-text: #000000;
177
+ --grid-footer-border: #000000;
178
+
179
+ /* Interactive Colors */
180
+ --grid-accent-primary: #0066cc;
181
+ --grid-accent-secondary: #6600cc;
182
+ --grid-accent-success: #009900;
183
+ --grid-accent-warning: #cc6600;
184
+ --grid-accent-error: #cc0000;
185
+ }
186
+
187
+ /* Grid Component Styles Using CSS Variables */
188
+ .advanced-data-grid {
189
+ background-color: var(--grid-bg-primary);
190
+ color: var(--grid-text-primary);
191
+ border: 1px solid var(--grid-border-primary);
192
+ border-radius: var(--grid-radius-md);
193
+ font-size: var(--grid-font-size-sm);
194
+ line-height: var(--grid-line-height-normal);
195
+ }
196
+
197
+ .grid-header {
198
+ background-color: var(--grid-header-bg);
199
+ color: var(--grid-header-text);
200
+ border-bottom: 1px solid var(--grid-header-border);
201
+ font-weight: 500;
202
+ }
203
+
204
+ .grid-header:hover {
205
+ background-color: var(--grid-header-hover);
206
+ }
207
+
208
+ .grid-header.sortable {
209
+ color: var(--grid-header-sort);
210
+ }
211
+
212
+ .grid-cell {
213
+ background-color: var(--grid-bg-primary);
214
+ color: var(--grid-text-primary);
215
+ border-bottom: 1px solid var(--grid-border-primary);
216
+ border-right: 1px solid var(--grid-border-primary);
217
+ padding: var(--grid-spacing-sm) var(--grid-spacing-md);
218
+ transition: background-color var(--grid-transition-fast);
219
+ }
220
+
221
+ .grid-cell:hover {
222
+ background-color: var(--grid-bg-hover);
223
+ }
224
+
225
+ .grid-cell.selected {
226
+ background-color: var(--grid-bg-selected);
227
+ }
228
+
229
+ .grid-cell.focused {
230
+ background-color: var(--grid-bg-focused);
231
+ outline: 2px solid var(--grid-border-focused);
232
+ outline-offset: -2px;
233
+ }
234
+
235
+ .grid-footer {
236
+ background: var(--grid-footer-bg);
237
+ color: var(--grid-footer-text);
238
+ border-top: 1px solid var(--grid-footer-border);
239
+ padding: var(--grid-spacing-md);
240
+ box-shadow: var(--grid-shadow-md);
241
+ }
242
+
243
+ .grid-button {
244
+ background-color: var(--grid-accent-primary);
245
+ color: var(--grid-text-inverse);
246
+ border: 1px solid var(--grid-accent-primary);
247
+ border-radius: var(--grid-radius-sm);
248
+ padding: var(--grid-spacing-xs) var(--grid-spacing-sm);
249
+ font-size: var(--grid-font-size-xs);
250
+ transition: all var(--grid-transition-fast);
251
+ }
252
+
253
+ .grid-button:hover {
254
+ opacity: 0.9;
255
+ transform: translateY(-1px);
256
+ box-shadow: var(--grid-shadow-sm);
257
+ }
258
+
259
+ .grid-button.secondary {
260
+ background-color: var(--grid-bg-secondary);
261
+ color: var(--grid-text-secondary);
262
+ border-color: var(--grid-border-secondary);
263
+ }
264
+
265
+ .grid-input {
266
+ background-color: var(--grid-bg-primary);
267
+ color: var(--grid-text-primary);
268
+ border: 1px solid var(--grid-border-secondary);
269
+ border-radius: var(--grid-radius-sm);
270
+ padding: var(--grid-spacing-xs) var(--grid-spacing-sm);
271
+ font-size: var(--grid-font-size-xs);
272
+ transition: border-color var(--grid-transition-fast);
273
+ }
274
+
275
+ .grid-input:focus {
276
+ border-color: var(--grid-border-focused);
277
+ outline: 2px solid var(--grid-border-focused);
278
+ outline-offset: -1px;
279
+ }
280
+
281
+ .grid-input.error {
282
+ border-color: var(--grid-border-error);
283
+ }
284
+
285
+ .grid-input.success {
286
+ border-color: var(--grid-border-success);
287
+ }
288
+
289
+ /* Status Colors */
290
+ .status-success {
291
+ background-color: var(--grid-accent-success);
292
+ color: var(--grid-text-inverse);
293
+ }
294
+
295
+ .status-warning {
296
+ background-color: var(--grid-accent-warning);
297
+ color: var(--grid-text-inverse);
298
+ }
299
+
300
+ .status-error {
301
+ background-color: var(--grid-accent-error);
302
+ color: var(--grid-text-inverse);
303
+ }
304
+
305
+ /* Accessibility Improvements */
306
+ @media (prefers-reduced-motion: reduce) {
307
+ .advanced-data-grid,
308
+ .grid-cell,
309
+ .grid-button,
310
+ .grid-input {
311
+ transition: none;
312
+ }
313
+ }
314
+
315
+ @media (prefers-color-scheme: dark) {
316
+ :root:not([data-theme]) {
317
+ /* Auto dark mode when no theme is explicitly set */
318
+ --grid-bg-primary: #0f172a;
319
+ --grid-bg-secondary: #1e293b;
320
+ --grid-text-primary: #f1f5f9;
321
+ --grid-text-secondary: #cbd5e1;
322
+ --grid-border-primary: #334155;
323
+ /* Add other dark theme variables as needed */
324
+ }
325
+ }
326
+
327
+ /* Print Styles */
328
+ @media print {
329
+ .advanced-data-grid {
330
+ background: white !important;
331
+ color: black !important;
332
+ border: 1px solid #000 !important;
333
+ }
334
+
335
+ .grid-cell,
336
+ .grid-header {
337
+ background: white !important;
338
+ color: black !important;
339
+ border: 1px solid #000 !important;
340
+ }
341
+
342
+ .grid-button,
343
+ .grid-footer {
344
+ display: none !important;
345
+ }
346
+ }
@@ -0,0 +1,5 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @import './tokens.css';
@@ -0,0 +1,46 @@
1
+ /* Styled scrollbar for sidebar */
2
+ .custom-scrollbar {
3
+ scrollbar-width: thin;
4
+ scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
5
+ }
6
+
7
+ .custom-scrollbar::-webkit-scrollbar {
8
+ width: 6px;
9
+ }
10
+
11
+ .custom-scrollbar::-webkit-scrollbar-track {
12
+ background: transparent;
13
+ }
14
+
15
+ .custom-scrollbar::-webkit-scrollbar-thumb {
16
+ background-color: rgba(255, 255, 255, 0.2);
17
+ border-radius: 3px;
18
+ }
19
+
20
+ .custom-scrollbar::-webkit-scrollbar-thumb:hover {
21
+ background-color: rgba(255, 255, 255, 0.3);
22
+ }
23
+
24
+ /* Hide scrollbar arrow buttons at top and bottom */
25
+ .custom-scrollbar::-webkit-scrollbar-button {
26
+ display: none;
27
+ height: 0;
28
+ width: 0;
29
+ }
30
+
31
+ /* Sidebar hover overlay - ensure it appears above all content */
32
+ .sidebar-hover-overlay {
33
+ z-index: 99999 !important;
34
+ isolation: isolate;
35
+ transform: translateZ(0);
36
+ }
37
+
38
+ .sidebar-hover-overlay::before {
39
+ content: '';
40
+ position: absolute;
41
+ top: 0;
42
+ left: 0;
43
+ right: 0;
44
+ bottom: 0;
45
+ z-index: -1;
46
+ }