@superdangerous/app-framework 4.16.37 → 4.17.2
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 +2 -1
- package/package.json +7 -9
- package/ui/dist/data-table.js +1 -1
- package/ui/dist/data-table.js.map +1 -1
- package/ui/dist/data-table.mjs +1 -1
- package/ui/dist/data-table.mjs.map +1 -1
- package/ui/dist/index.js +37 -48
- package/ui/dist/index.js.map +1 -1
- package/ui/dist/index.mjs +37 -48
- package/ui/dist/index.mjs.map +1 -1
- package/ui/src/styles/app.css +12 -0
- package/ui/src/styles/globals.css +350 -0
- package/ui/src/styles/index.ts +45 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal app CSS that imports framework styles
|
|
3
|
+
* Apps should import this instead of duplicating CSS
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* Import framework global styles */
|
|
7
|
+
@import '@episensor/ui-framework/styles/globals.css';
|
|
8
|
+
|
|
9
|
+
/* Tailwind directives */
|
|
10
|
+
@tailwind base;
|
|
11
|
+
@tailwind components;
|
|
12
|
+
@tailwind utilities;
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/* Import fonts */
|
|
2
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
|
|
3
|
+
|
|
4
|
+
/* Tailwind directives */
|
|
5
|
+
@tailwind base;
|
|
6
|
+
@tailwind components;
|
|
7
|
+
@tailwind utilities;
|
|
8
|
+
|
|
9
|
+
@layer base {
|
|
10
|
+
:root {
|
|
11
|
+
/* Light theme - clean and modern */
|
|
12
|
+
--background: 0 0% 100%;
|
|
13
|
+
--foreground: 0 0% 3.9%;
|
|
14
|
+
--card: 0 0% 100%;
|
|
15
|
+
--card-foreground: 0 0% 3.9%;
|
|
16
|
+
--popover: 0 0% 100%;
|
|
17
|
+
--popover-foreground: 0 0% 3.9%;
|
|
18
|
+
--primary: 217 91% 60%; /* Neutral blue */
|
|
19
|
+
--primary-foreground: 0 0% 100%;
|
|
20
|
+
--secondary: 0 0% 96.1%;
|
|
21
|
+
--secondary-foreground: 0 0% 9%;
|
|
22
|
+
--muted: 0 0% 96.1%;
|
|
23
|
+
--muted-foreground: 0 0% 45.1%;
|
|
24
|
+
--accent: 0 0% 96.1%;
|
|
25
|
+
--accent-foreground: 0 0% 9%;
|
|
26
|
+
--destructive: 0 84.2% 60.2%;
|
|
27
|
+
--destructive-foreground: 0 0% 98%;
|
|
28
|
+
--border: 0 0% 89.8%;
|
|
29
|
+
--input: 0 0% 89.8%;
|
|
30
|
+
--ring: 217 91% 60%;
|
|
31
|
+
--radius: 0.5rem;
|
|
32
|
+
|
|
33
|
+
/* Custom theme colors */
|
|
34
|
+
--color-intelligent: 271 50% 60%; /* Purple for intelligent templates */
|
|
35
|
+
--color-activity-read: 142 71% 45%; /* Green */
|
|
36
|
+
--color-activity-write: 217 91% 60%; /* Blue */
|
|
37
|
+
--color-activity-inactive: 0 0% 45%;
|
|
38
|
+
--color-success: 142 71% 45%;
|
|
39
|
+
--color-warning: 38 92% 50%;
|
|
40
|
+
--color-error: 0 84% 60%;
|
|
41
|
+
--color-info: 217 91% 60%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dark {
|
|
45
|
+
/* Dark theme - oxide-inspired */
|
|
46
|
+
--background: 0 0% 3.9%;
|
|
47
|
+
--foreground: 0 0% 98%;
|
|
48
|
+
--card: 0 0% 8%;
|
|
49
|
+
--card-foreground: 0 0% 98%;
|
|
50
|
+
--popover: 0 0% 8%;
|
|
51
|
+
--popover-foreground: 0 0% 98%;
|
|
52
|
+
--primary: 217 91% 60%;
|
|
53
|
+
--primary-foreground: 0 0% 100%;
|
|
54
|
+
--secondary: 0 0% 14.9%;
|
|
55
|
+
--secondary-foreground: 0 0% 98%;
|
|
56
|
+
--muted: 0 0% 14.9%;
|
|
57
|
+
--muted-foreground: 0 0% 63.9%;
|
|
58
|
+
--accent: 0 0% 14.9%;
|
|
59
|
+
--accent-foreground: 0 0% 98%;
|
|
60
|
+
--destructive: 0 62.8% 30.6%;
|
|
61
|
+
--destructive-foreground: 0 0% 98%;
|
|
62
|
+
--border: 0 0% 14.9%;
|
|
63
|
+
--input: 0 0% 14.9%;
|
|
64
|
+
--ring: 217 91% 60%;
|
|
65
|
+
|
|
66
|
+
/* Custom dark theme colors */
|
|
67
|
+
--color-intelligent: 271 50% 70%;
|
|
68
|
+
--color-activity-read: 142 71% 55%;
|
|
69
|
+
--color-activity-write: 217 91% 70%;
|
|
70
|
+
--color-activity-inactive: 0 0% 55%;
|
|
71
|
+
--color-success: 142 71% 55%;
|
|
72
|
+
--color-warning: 38 92% 60%;
|
|
73
|
+
--color-error: 0 84% 70%;
|
|
74
|
+
--color-info: 217 91% 70%;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@layer base {
|
|
79
|
+
* {
|
|
80
|
+
@apply border-border;
|
|
81
|
+
}
|
|
82
|
+
body {
|
|
83
|
+
@apply bg-background text-foreground;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Custom utility classes */
|
|
88
|
+
@layer utilities {
|
|
89
|
+
/* Animations */
|
|
90
|
+
@keyframes in {
|
|
91
|
+
from {
|
|
92
|
+
opacity: 0;
|
|
93
|
+
transform: translateY(4px);
|
|
94
|
+
}
|
|
95
|
+
to {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
transform: translateY(0);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@keyframes spin {
|
|
102
|
+
to {
|
|
103
|
+
transform: rotate(360deg);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.animate-in {
|
|
108
|
+
animation: in 0.2s ease-out;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.animate-spin {
|
|
112
|
+
animation: spin 1s linear infinite;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Scrollbar styling */
|
|
116
|
+
.scrollbar-thin {
|
|
117
|
+
scrollbar-width: thin;
|
|
118
|
+
scrollbar-color: hsl(var(--muted-foreground)) transparent;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.scrollbar-thin::-webkit-scrollbar {
|
|
122
|
+
width: 6px;
|
|
123
|
+
height: 6px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.scrollbar-thin::-webkit-scrollbar-track {
|
|
127
|
+
background: transparent;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.scrollbar-thin::-webkit-scrollbar-thumb {
|
|
131
|
+
background-color: hsl(var(--muted-foreground));
|
|
132
|
+
border-radius: 3px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
|
|
136
|
+
background-color: hsl(var(--foreground) / 0.5);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Component-specific styles */
|
|
141
|
+
@layer components {
|
|
142
|
+
/* Card styles */
|
|
143
|
+
.card-gradient {
|
|
144
|
+
@apply bg-gradient-to-br from-card to-muted/50;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Button styles */
|
|
148
|
+
.btn-gradient {
|
|
149
|
+
@apply bg-gradient-to-r from-primary to-primary/80 hover:from-primary/90 hover:to-primary/70;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Status indicators */
|
|
153
|
+
.status-online {
|
|
154
|
+
@apply bg-green-500 animate-pulse;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.status-offline {
|
|
158
|
+
@apply bg-red-500;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.status-warning {
|
|
162
|
+
@apply bg-yellow-500 animate-pulse;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ============================================================================
|
|
167
|
+
DataTable Styles - Outside @layer for proper CSS specificity
|
|
168
|
+
These styles ensure DataTable components work correctly without users
|
|
169
|
+
needing to battle Tailwind specificity issues.
|
|
170
|
+
============================================================================ */
|
|
171
|
+
|
|
172
|
+
/* DataTablePage: Search bar should not be full width */
|
|
173
|
+
.data-table-page-header .w-full.sm\:w-auto {
|
|
174
|
+
width: auto !important;
|
|
175
|
+
min-width: 200px !important;
|
|
176
|
+
max-width: 320px !important;
|
|
177
|
+
flex-shrink: 0 !important;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* DataTablePage: Header padding */
|
|
181
|
+
.data-table-page-header {
|
|
182
|
+
padding-left: 1.5rem !important;
|
|
183
|
+
padding-right: 1.5rem !important;
|
|
184
|
+
padding-top: 1rem !important;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Sticky checkbox column (left side) */
|
|
188
|
+
.sticky-actions-table thead tr th:first-child:has(input[type="checkbox"]),
|
|
189
|
+
.sticky-actions-table thead tr th.sticky-select-header {
|
|
190
|
+
position: sticky !important;
|
|
191
|
+
left: 0 !important;
|
|
192
|
+
z-index: 32 !important;
|
|
193
|
+
background-color: hsl(var(--muted)) !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.sticky-actions-table tbody tr td:first-child:has(input[type="checkbox"]),
|
|
197
|
+
.sticky-actions-table tbody tr td.sticky-select-cell {
|
|
198
|
+
position: sticky !important;
|
|
199
|
+
left: 0 !important;
|
|
200
|
+
z-index: 6 !important;
|
|
201
|
+
background-color: white !important;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Right border on checkbox column */
|
|
205
|
+
.sticky-actions-table thead tr th:first-child:has(input[type="checkbox"])::after,
|
|
206
|
+
.sticky-actions-table thead tr th.sticky-select-header::after,
|
|
207
|
+
.sticky-actions-table tbody tr td:first-child:has(input[type="checkbox"])::after,
|
|
208
|
+
.sticky-actions-table tbody tr td.sticky-select-cell::after {
|
|
209
|
+
content: '';
|
|
210
|
+
position: absolute;
|
|
211
|
+
right: 0;
|
|
212
|
+
top: 0;
|
|
213
|
+
bottom: 0;
|
|
214
|
+
width: 1px;
|
|
215
|
+
background-color: hsl(var(--border));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Sticky actions column (right side) */
|
|
219
|
+
.sticky-actions-table thead tr th:last-child {
|
|
220
|
+
position: sticky !important;
|
|
221
|
+
right: 0 !important;
|
|
222
|
+
z-index: 20 !important;
|
|
223
|
+
background-color: hsl(var(--muted)) !important;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.sticky-actions-table tbody tr td:last-child:not([colspan]) {
|
|
227
|
+
position: sticky !important;
|
|
228
|
+
right: 0 !important;
|
|
229
|
+
z-index: 10 !important;
|
|
230
|
+
background-color: white !important;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Left border on actions column */
|
|
234
|
+
.sticky-actions-table thead tr th:last-child::before,
|
|
235
|
+
.sticky-actions-table tbody tr td:last-child:not([colspan])::before {
|
|
236
|
+
content: '';
|
|
237
|
+
position: absolute;
|
|
238
|
+
left: 0;
|
|
239
|
+
top: 0;
|
|
240
|
+
bottom: 0;
|
|
241
|
+
width: 1px;
|
|
242
|
+
background-color: hsl(var(--border));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* Column resize handles */
|
|
246
|
+
.resizable-table th {
|
|
247
|
+
position: relative !important;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.resize-handle {
|
|
251
|
+
position: absolute !important;
|
|
252
|
+
top: 0 !important;
|
|
253
|
+
bottom: 0 !important;
|
|
254
|
+
right: -6px !important;
|
|
255
|
+
width: 12px !important;
|
|
256
|
+
z-index: 50 !important;
|
|
257
|
+
cursor: col-resize !important;
|
|
258
|
+
touch-action: none;
|
|
259
|
+
transition: background-color 0.15s;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.resize-handle:hover,
|
|
263
|
+
.resize-handle[data-resizing="true"] {
|
|
264
|
+
background-color: hsl(var(--border) / 0.3) !important;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.resize-handle::after {
|
|
268
|
+
content: '';
|
|
269
|
+
position: absolute;
|
|
270
|
+
left: 50%;
|
|
271
|
+
transform: translateX(-50%);
|
|
272
|
+
top: 8px;
|
|
273
|
+
bottom: 8px;
|
|
274
|
+
width: 1px;
|
|
275
|
+
background-color: hsl(var(--border) / 0.5);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* DataTable scroll container */
|
|
279
|
+
.data-table-scroll-container {
|
|
280
|
+
flex: 1 1 0% !important;
|
|
281
|
+
min-height: 0 !important;
|
|
282
|
+
overflow-x: auto !important;
|
|
283
|
+
overflow-y: auto !important;
|
|
284
|
+
scrollbar-width: thin;
|
|
285
|
+
scrollbar-color: hsl(var(--border)) transparent;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.data-table-scroll-container::-webkit-scrollbar {
|
|
289
|
+
width: 8px;
|
|
290
|
+
height: 8px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.data-table-scroll-container::-webkit-scrollbar-track {
|
|
294
|
+
background: transparent;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.data-table-scroll-container::-webkit-scrollbar-thumb {
|
|
298
|
+
background-color: hsl(var(--border));
|
|
299
|
+
border-radius: 4px;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.data-table-scroll-container::-webkit-scrollbar-thumb:hover {
|
|
303
|
+
background-color: hsl(var(--muted-foreground) / 0.5);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Sticky header */
|
|
307
|
+
.data-table-scroll-container thead {
|
|
308
|
+
position: sticky !important;
|
|
309
|
+
top: 0 !important;
|
|
310
|
+
z-index: 30 !important;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.data-table-scroll-container thead tr,
|
|
314
|
+
.data-table-scroll-container thead th {
|
|
315
|
+
background-color: hsl(var(--muted)) !important;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Header bottom border - cohesive border instead of individual cell borders */
|
|
319
|
+
.data-table-scroll-container thead {
|
|
320
|
+
border-bottom: 1px solid hsl(var(--border)) !important;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.data-table-scroll-container thead th {
|
|
324
|
+
border: none !important;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* Remove top border from first body row to prevent double border with header */
|
|
328
|
+
.data-table-scroll-container tbody tr:first-child,
|
|
329
|
+
.data-table-scroll-container tbody tr:first-child td {
|
|
330
|
+
border-top: none !important;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* Empty state: container fills remaining space below table header */
|
|
334
|
+
.data-table-scroll-container:has(.empty-state-container) {
|
|
335
|
+
display: flex;
|
|
336
|
+
flex-direction: column;
|
|
337
|
+
background-color: white;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.data-table-scroll-container:has(.empty-state-container) table {
|
|
341
|
+
flex-shrink: 0;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.data-table-scroll-container .empty-state-container {
|
|
345
|
+
flex: 1;
|
|
346
|
+
display: flex;
|
|
347
|
+
align-items: center;
|
|
348
|
+
justify-content: center;
|
|
349
|
+
min-height: 200px;
|
|
350
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuperDangerous UI Framework - Shared Style Constants
|
|
3
|
+
* Reusable Tailwind class combinations for consistency
|
|
4
|
+
*
|
|
5
|
+
* @module @superdangerous/ui-framework/styles
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const cardStyles = {
|
|
9
|
+
base: "transition-all duration-200",
|
|
10
|
+
interactive: "hover:shadow-md hover:border-gray-300 dark:hover:border-gray-700 cursor-pointer",
|
|
11
|
+
elevation: "shadow-sm",
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export const buttonStyles = {
|
|
15
|
+
primary: "gap-2",
|
|
16
|
+
icon: "h-4 w-4",
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export const emptyStateStyles = {
|
|
20
|
+
container: "flex flex-col items-center justify-center py-12 text-center",
|
|
21
|
+
icon: "h-12 w-12 text-muted-foreground mb-4",
|
|
22
|
+
title: "text-lg font-medium mb-2",
|
|
23
|
+
description: "text-sm text-muted-foreground max-w-sm",
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
export const activityStyles = {
|
|
27
|
+
led: "w-2 h-2 rounded-full transition-all duration-200",
|
|
28
|
+
pulse: "animate-pulse",
|
|
29
|
+
colors: {
|
|
30
|
+
read: "bg-green-500",
|
|
31
|
+
write: "bg-blue-500",
|
|
32
|
+
inactive: "bg-gray-400",
|
|
33
|
+
error: "bg-red-500",
|
|
34
|
+
}
|
|
35
|
+
} as const;
|
|
36
|
+
|
|
37
|
+
export const statusStyles = {
|
|
38
|
+
badge: {
|
|
39
|
+
success: "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",
|
|
40
|
+
warning: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",
|
|
41
|
+
error: "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",
|
|
42
|
+
info: "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",
|
|
43
|
+
default: "bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200",
|
|
44
|
+
}
|
|
45
|
+
} as const;
|