omnira-ui 0.2.0 → 0.3.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.
Files changed (29) hide show
  1. package/cli/omnira-init.mjs +197 -16
  2. package/components/ui/ActivityGauge/ActivityGauge.module.css +109 -0
  3. package/components/ui/ActivityGauge/ActivityGauge.tsx +87 -0
  4. package/components/ui/ActivityGauge/index.ts +2 -0
  5. package/components/ui/Calendar/Calendar.module.css +492 -0
  6. package/components/ui/Calendar/Calendar.tsx +445 -0
  7. package/components/ui/Calendar/config.ts +130 -0
  8. package/components/ui/Calendar/index.ts +4 -0
  9. package/components/ui/CardHeader/CardHeader.module.css +79 -0
  10. package/components/ui/CardHeader/CardHeader.tsx +45 -0
  11. package/components/ui/CardHeader/index.ts +2 -0
  12. package/components/ui/EmptyState/EmptyState.module.css +65 -0
  13. package/components/ui/EmptyState/EmptyState.tsx +37 -0
  14. package/components/ui/EmptyState/index.ts +2 -0
  15. package/components/ui/Metric/Metric.module.css +140 -0
  16. package/components/ui/Metric/Metric.tsx +78 -0
  17. package/components/ui/Metric/index.ts +2 -0
  18. package/components/ui/PageHeader/PageHeader.module.css +128 -0
  19. package/components/ui/PageHeader/PageHeader.tsx +61 -0
  20. package/components/ui/PageHeader/index.ts +2 -0
  21. package/components/ui/Table/Table.module.css +444 -0
  22. package/components/ui/Table/Table.tsx +547 -0
  23. package/components/ui/Table/customers.json +74 -0
  24. package/components/ui/Table/index.ts +14 -0
  25. package/components/ui/Table/invoices.json +92 -0
  26. package/components/ui/Table/orders.json +108 -0
  27. package/components/ui/Table/team-members.json +130 -0
  28. package/components/ui/Table/uploaded-files.json +53 -0
  29. package/package.json +1 -1
@@ -0,0 +1,444 @@
1
+ /* ============================================
2
+ Omnira UI — Table Component
3
+ ============================================ */
4
+
5
+ /* ── TableCard Root ── */
6
+ .cardRoot {
7
+ border-radius: var(--radius-lg);
8
+ background: var(--color-bg-card);
9
+ border: 1.5px solid var(--color-border-standard);
10
+ box-shadow: var(--shadow-card-light);
11
+ backdrop-filter: var(--blur-standard);
12
+ overflow: hidden;
13
+ transition: box-shadow 0.3s ease;
14
+ }
15
+
16
+ .cardRootSm {
17
+ border-radius: var(--radius-md);
18
+ }
19
+
20
+ /* ── TableCard Header ── */
21
+ .cardHeader {
22
+ position: relative;
23
+ display: flex;
24
+ align-items: center;
25
+ gap: 12px;
26
+ padding: 20px 24px;
27
+ border-bottom: 1px solid var(--color-border-subtle);
28
+ }
29
+
30
+ .cardHeaderSm .cardHeader {
31
+ padding: 16px 20px;
32
+ }
33
+
34
+ .cardTitle {
35
+ font-family: var(--font-display);
36
+ font-size: 16px;
37
+ font-weight: 700;
38
+ color: var(--color-text-primary);
39
+ line-height: 1.3;
40
+ }
41
+
42
+ .cardDescription {
43
+ font-size: 14px;
44
+ color: var(--color-text-tertiary);
45
+ margin-top: 2px;
46
+ line-height: 1.4;
47
+ }
48
+
49
+ .cardBadge {
50
+ display: inline-flex;
51
+ align-items: center;
52
+ padding: 2px 10px;
53
+ border-radius: var(--radius-full);
54
+ background: var(--color-bg-lime-subtle);
55
+ border: 1px solid var(--color-border-lime-subtle);
56
+ font-size: 12px;
57
+ font-weight: 600;
58
+ color: var(--color-lime);
59
+ }
60
+
61
+ /* ── Table ── */
62
+ .table {
63
+ width: 100%;
64
+ border-collapse: collapse;
65
+ table-layout: auto;
66
+ }
67
+
68
+ /* ── Table Header ── */
69
+ .thead {
70
+ border-bottom: 1px solid var(--color-border-standard);
71
+ }
72
+
73
+ .thead th {
74
+ padding: 12px 16px;
75
+ text-align: left;
76
+ font-size: 12px;
77
+ font-weight: 600;
78
+ color: var(--color-text-tertiary);
79
+ text-transform: uppercase;
80
+ letter-spacing: 0.04em;
81
+ white-space: nowrap;
82
+ user-select: none;
83
+ position: relative;
84
+ background: var(--color-bg-hover);
85
+ }
86
+
87
+ .thead th:first-child {
88
+ padding-left: 24px;
89
+ }
90
+
91
+ .thead th:last-child {
92
+ padding-right: 24px;
93
+ }
94
+
95
+ /* ── Sortable Header ── */
96
+ .sortableHead {
97
+ cursor: pointer;
98
+ transition: color 0.2s;
99
+ }
100
+
101
+ .sortableHead:hover {
102
+ color: var(--color-text-primary);
103
+ }
104
+
105
+ .headInner {
106
+ display: inline-flex;
107
+ align-items: center;
108
+ gap: 6px;
109
+ }
110
+
111
+ .sortIcon {
112
+ display: inline-flex;
113
+ align-items: center;
114
+ opacity: 0.4;
115
+ transition: opacity 0.2s, transform 0.2s;
116
+ font-size: 12px;
117
+ line-height: 0;
118
+ }
119
+
120
+ .sortableHead:hover .sortIcon {
121
+ opacity: 0.7;
122
+ }
123
+
124
+ .sortIconActive {
125
+ opacity: 1;
126
+ color: var(--color-lime);
127
+ }
128
+
129
+ .sortIconDesc {
130
+ transform: rotate(180deg);
131
+ }
132
+
133
+ /* ── Tooltip on header ── */
134
+ .headTooltipWrap {
135
+ position: relative;
136
+ display: inline-flex;
137
+ align-items: center;
138
+ }
139
+
140
+ .headTooltipIcon {
141
+ display: inline-flex;
142
+ align-items: center;
143
+ color: var(--color-text-tertiary);
144
+ opacity: 0.5;
145
+ cursor: help;
146
+ transition: opacity 0.2s;
147
+ line-height: 0;
148
+ }
149
+
150
+ .headTooltipIcon:hover {
151
+ opacity: 1;
152
+ }
153
+
154
+ .headTooltipBubble {
155
+ position: absolute;
156
+ bottom: calc(100% + 8px);
157
+ left: 50%;
158
+ transform: translateX(-50%);
159
+ background: var(--color-bg-elevated);
160
+ color: var(--color-text-primary);
161
+ border: 1px solid var(--color-border-standard);
162
+ border-radius: var(--radius-sm);
163
+ padding: 6px 12px;
164
+ font-size: 12px;
165
+ font-weight: 500;
166
+ white-space: nowrap;
167
+ pointer-events: none;
168
+ z-index: 50;
169
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
170
+ animation: tooltipFadeIn 0.15s ease-out;
171
+ text-transform: none;
172
+ letter-spacing: 0;
173
+ }
174
+
175
+ @keyframes tooltipFadeIn {
176
+ from {
177
+ opacity: 0;
178
+ transform: translateX(-50%) translateY(4px);
179
+ }
180
+ to {
181
+ opacity: 1;
182
+ transform: translateX(-50%) translateY(0);
183
+ }
184
+ }
185
+
186
+ /* ── Table Body ── */
187
+ .tbody tr {
188
+ border-bottom: 1px solid var(--color-border-subtle);
189
+ transition: background 0.2s ease, box-shadow 0.2s ease;
190
+ }
191
+
192
+ .tbody tr:last-child {
193
+ border-bottom: none;
194
+ }
195
+
196
+ .tbody tr:hover {
197
+ background: var(--color-bg-hover);
198
+ }
199
+
200
+ .tbody tr:hover td:first-child {
201
+ box-shadow: inset 3px 0 0 0 var(--color-lime);
202
+ }
203
+
204
+ /* ── Selected row ── */
205
+ .rowSelected {
206
+ background: var(--color-bg-lime-subtle) !important;
207
+ }
208
+
209
+ .rowSelected td:first-child {
210
+ box-shadow: inset 3px 0 0 0 var(--color-lime) !important;
211
+ }
212
+
213
+ /* ── Table Cell ── */
214
+ .td {
215
+ padding: 14px 16px;
216
+ font-size: 14px;
217
+ color: var(--color-text-secondary);
218
+ vertical-align: middle;
219
+ transition: box-shadow 0.2s ease;
220
+ }
221
+
222
+ .td:first-child {
223
+ padding-left: 24px;
224
+ }
225
+
226
+ .td:last-child {
227
+ padding-right: 24px;
228
+ }
229
+
230
+ /* ── Checkbox column ── */
231
+ .checkboxCell {
232
+ width: 44px;
233
+ padding-right: 0 !important;
234
+ }
235
+
236
+ .rowCheckbox {
237
+ flex-shrink: 0;
238
+ display: flex;
239
+ align-items: center;
240
+ justify-content: center;
241
+ width: 18px;
242
+ height: 18px;
243
+ border-radius: 5px;
244
+ background: var(--color-bg-input);
245
+ border: 1.5px solid var(--color-border-standard);
246
+ cursor: pointer;
247
+ transition: all 0.2s;
248
+ padding: 0;
249
+ color: var(--color-bg-primary);
250
+ appearance: none;
251
+ -webkit-appearance: none;
252
+ }
253
+
254
+ .rowCheckbox:hover {
255
+ border-color: var(--color-border-lime-strong);
256
+ }
257
+
258
+ .rowCheckbox:checked {
259
+ background: var(--color-lime);
260
+ border-color: var(--color-lime);
261
+ }
262
+
263
+ /* ── Header checkbox (select all) ── */
264
+ .headerCheckbox {
265
+ flex-shrink: 0;
266
+ display: flex;
267
+ align-items: center;
268
+ justify-content: center;
269
+ width: 18px;
270
+ height: 18px;
271
+ border-radius: 5px;
272
+ background: var(--color-bg-input);
273
+ border: 1.5px solid var(--color-border-standard);
274
+ cursor: pointer;
275
+ transition: all 0.2s;
276
+ padding: 0;
277
+ color: var(--color-bg-primary);
278
+ appearance: none;
279
+ -webkit-appearance: none;
280
+ }
281
+
282
+ .headerCheckboxIndeterminate {
283
+ background: var(--color-lime);
284
+ border-color: var(--color-lime);
285
+ }
286
+
287
+ /* ── Pagination footer ── */
288
+ .paginationFooter {
289
+ display: flex;
290
+ align-items: center;
291
+ justify-content: space-between;
292
+ padding: 12px 24px 16px;
293
+ border-top: 1px solid var(--color-border-subtle);
294
+ }
295
+
296
+ .paginationFooterRight {
297
+ justify-content: flex-end;
298
+ }
299
+
300
+ .paginationInfo {
301
+ font-size: 13px;
302
+ color: var(--color-text-tertiary);
303
+ }
304
+
305
+ .paginationActions {
306
+ display: flex;
307
+ align-items: center;
308
+ gap: 8px;
309
+ }
310
+
311
+ .paginationBtn {
312
+ display: inline-flex;
313
+ align-items: center;
314
+ justify-content: center;
315
+ width: 32px;
316
+ height: 32px;
317
+ border-radius: var(--radius-sm);
318
+ background: var(--color-bg-card);
319
+ border: 1px solid var(--color-border-standard);
320
+ color: var(--color-text-secondary);
321
+ cursor: pointer;
322
+ transition: all 0.2s;
323
+ padding: 0;
324
+ line-height: 0;
325
+ }
326
+
327
+ .paginationBtn:hover:not(:disabled) {
328
+ background: var(--color-bg-elevated);
329
+ color: var(--color-text-primary);
330
+ border-color: var(--color-border-medium);
331
+ }
332
+
333
+ .paginationBtn:disabled {
334
+ opacity: 0.35;
335
+ cursor: not-allowed;
336
+ }
337
+
338
+ /* ── Row actions dropdown ── */
339
+ .rowActionsWrap {
340
+ position: relative;
341
+ display: inline-flex;
342
+ }
343
+
344
+ .rowActionsBtn {
345
+ display: inline-flex;
346
+ align-items: center;
347
+ justify-content: center;
348
+ width: 32px;
349
+ height: 32px;
350
+ border-radius: var(--radius-sm);
351
+ background: transparent;
352
+ border: 1.5px solid transparent;
353
+ color: var(--color-text-tertiary);
354
+ cursor: pointer;
355
+ transition: all 0.2s;
356
+ padding: 0;
357
+ line-height: 0;
358
+ }
359
+
360
+ .rowActionsBtn:hover {
361
+ background: var(--color-bg-hover);
362
+ color: var(--color-text-primary);
363
+ }
364
+
365
+ .rowActionsMenu {
366
+ position: absolute;
367
+ top: calc(100% + 4px);
368
+ right: 0;
369
+ min-width: 160px;
370
+ background: var(--color-bg-overlay);
371
+ border: 1px solid var(--color-border-standard);
372
+ border-radius: var(--radius-sm);
373
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
374
+ backdrop-filter: var(--blur-standard);
375
+ padding: 4px;
376
+ z-index: 50;
377
+ animation: menuSlideIn 0.15s ease-out;
378
+ }
379
+
380
+ @keyframes menuSlideIn {
381
+ from {
382
+ opacity: 0;
383
+ transform: translateY(-4px);
384
+ }
385
+ to {
386
+ opacity: 1;
387
+ transform: translateY(0);
388
+ }
389
+ }
390
+
391
+ .rowActionsMenuItem {
392
+ display: flex;
393
+ align-items: center;
394
+ gap: 8px;
395
+ width: 100%;
396
+ padding: 8px 12px;
397
+ border-radius: 6px;
398
+ background: transparent;
399
+ border: none;
400
+ color: var(--color-text-secondary);
401
+ font-size: 13px;
402
+ font-weight: 500;
403
+ cursor: pointer;
404
+ transition: all 0.15s;
405
+ text-align: left;
406
+ font-family: inherit;
407
+ }
408
+
409
+ .rowActionsMenuItem:hover {
410
+ background: var(--color-bg-hover);
411
+ color: var(--color-text-primary);
412
+ }
413
+
414
+ .rowActionsMenuItemDestructive:hover {
415
+ background: rgba(239, 68, 68, 0.1);
416
+ color: #ef4444;
417
+ }
418
+
419
+ .rowActionsMenuItemIcon {
420
+ display: inline-flex;
421
+ align-items: center;
422
+ line-height: 0;
423
+ flex-shrink: 0;
424
+ }
425
+
426
+ .rowActionsSeparator {
427
+ height: 1px;
428
+ background: var(--color-border-subtle);
429
+ margin: 4px 0;
430
+ }
431
+
432
+ /* ── Responsive: scroll wrapper ── */
433
+ .scrollWrap {
434
+ overflow-x: auto;
435
+ -webkit-overflow-scrolling: touch;
436
+ }
437
+
438
+ /* ── Empty state ── */
439
+ .emptyState {
440
+ padding: 48px 24px;
441
+ text-align: center;
442
+ color: var(--color-text-tertiary);
443
+ font-size: 14px;
444
+ }