@ansiversa/components 0.0.71 → 0.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ansiversa/components",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "description": "Shared UI components and layouts for the Ansiversa ecosystem",
5
5
  "type": "module",
6
6
  "exports": {
@@ -12,6 +12,7 @@ interface User {
12
12
  id: string;
13
13
  email: string;
14
14
  name?: string;
15
+ roleId?: number;
15
16
  }
16
17
 
17
18
  interface Props {
@@ -143,6 +144,12 @@ const userInitial =
143
144
  <div class="av-user-menu-divider"></div>
144
145
 
145
146
  <div class="av-nav-user-menu">
147
+ {user?.roleId === 1 && (
148
+ <a href={`${ROOT_URL}/admin`} class="av-user-menu-item av-dropdown-item" role="menuitem">
149
+ <span>Administration</span>
150
+ </a>
151
+ )}
152
+
146
153
  <a href={`${ROOT_URL}/dashboard`} class="av-user-menu-item av-dropdown-item" role="menuitem">
147
154
  <span>Dashboard</span>
148
155
  </a>
@@ -33,6 +33,12 @@
33
33
  /* Ansiversa highlight (used by a few legacy utilities) */
34
34
  --ans-primary: hsl(260, 100%, 70%);
35
35
  --ans-primary-rgb: 140, 100, 255; /* MUST match --ans-primary */
36
+ --ans-border: var(--av-border-subtle);
37
+ --ans-surface: var(--av-surface);
38
+ --ans-surface-2: var(--av-surface-soft);
39
+ --ans-muted: var(--av-text-muted);
40
+ --ans-text: var(--av-text);
41
+ --ans-radius-lg: var(--av-radius-lg);
36
42
 
37
43
  /* Layout & Radius */
38
44
  --av-radius-xs: 0.375rem;
@@ -280,51 +286,157 @@
280
286
  }
281
287
  }
282
288
 
283
- /* FAQ admin */
284
- .av-faq-admin__header {
289
+ /* Admin list page (generic) ------------------------------------------ */
290
+ .av-admin-header {
285
291
  display: grid;
286
292
  gap: 0.4rem;
287
293
  padding: 0.75rem 0;
288
294
  }
289
295
 
290
- .av-faq-admin__section {
296
+ .av-admin-section {
291
297
  padding-top: 1rem;
292
298
  padding-bottom: 1.25rem;
293
299
  }
294
300
 
295
- .av-faq-admin__title {
301
+ .av-admin-title {
296
302
  font-size: 1.5rem;
297
303
  }
298
304
 
305
+ /* Admin list page (generic) ------------------------------------------ */
306
+ .av-admin-titlewrap {
307
+ display: flex;
308
+ align-items: baseline;
309
+ gap: 0.5rem;
310
+ flex-wrap: wrap;
311
+ }
299
312
 
300
- .av-faq-admin__order {
313
+ .av-admin-count-inline {
314
+ color: var(--av-text-muted);
315
+ font-size: 0.875rem;
316
+ }
317
+
318
+ .av-admin-toolbar-left {
319
+ display: grid;
320
+ gap: 0.5rem;
321
+ }
322
+
323
+ .av-admin-toolbar-top {
324
+ display: flex;
325
+ align-items: center;
326
+ justify-content: space-between;
327
+ gap: 0.75rem;
328
+ }
329
+
330
+ .av-admin-toolbar-top .av-table-toolbar__subtitle {
331
+ display: inline-flex;
332
+ align-items: center;
333
+ gap: 0.5rem;
334
+ }
335
+
336
+ .av-admin-toolbar-actions {
337
+ display: flex;
338
+ align-items: center;
339
+ gap: 0.5rem;
340
+ }
341
+
342
+ .av-admin-icon {
343
+ font-size: 0.95rem;
344
+ line-height: 1;
345
+ display: inline-flex;
346
+ align-items: center;
347
+ justify-content: center;
348
+ }
349
+
350
+ .av-admin-icon--sm {
351
+ font-size: 0.85rem;
352
+ }
353
+
354
+ .av-admin-icon--lg {
355
+ font-size: 1.2rem;
356
+ }
357
+
358
+ .av-admin-filters {
359
+ display: grid;
360
+ gap: 0.5rem;
361
+ }
362
+
363
+ @media (min-width: 1024px) {
364
+ .av-admin-filters {
365
+ display: flex;
366
+ flex-wrap: nowrap;
367
+ align-items: flex-end;
368
+ gap: 0.5rem;
369
+ }
370
+
371
+ .av-admin-filter {
372
+ flex: 1 1 0;
373
+ min-width: 160px;
374
+ }
375
+
376
+ .av-admin-filter--search {
377
+ flex: 2 1 0;
378
+ }
379
+
380
+ .av-admin-filter--sort {
381
+ flex: 0 1 180px;
382
+ }
383
+
384
+ .av-admin-section .av-table-toolbar__row {
385
+ flex-wrap: nowrap;
386
+ align-items: flex-end;
387
+ gap: 0;
388
+ }
389
+
390
+ .av-admin-section .av-table-toolbar__search {
391
+ min-width: 0;
392
+ }
393
+
394
+ .av-admin-section .av-table-toolbar__actions {
395
+ display: none;
396
+ }
397
+
398
+ .av-admin-section .av-table__th-order,
399
+ .av-admin-section .av-table__th-actions {
400
+ text-align: center;
401
+ }
402
+
403
+ .av-admin-section .av-table__td-actions {
404
+ text-align: center;
405
+ }
406
+
407
+ .av-admin-section .av-table__cell-actions {
408
+ justify-content: center;
409
+ }
410
+ }
411
+
412
+ .av-admin-order {
301
413
  display: grid;
302
414
  gap: 0.4rem;
303
415
  }
304
416
 
305
- .av-faq-admin__order-actions {
417
+ .av-admin-order-actions {
306
418
  display: flex;
307
419
  gap: 0.35rem;
308
420
  }
309
421
 
310
- .av-faq-admin__crumbwrap {
422
+ .av-admin-crumbwrap {
311
423
  display: grid;
312
424
  gap: 0.25rem;
313
425
  padding-top: 0;
314
426
  }
315
427
 
316
- .av-faq-admin__count {
317
- color: var(--ans-muted);
428
+ .av-admin-count {
429
+ color: var(--av-text-muted);
318
430
  font-size: 0.875rem;
319
431
  }
320
432
 
321
- .av-faq-admin__section > .av-container {
433
+ .av-admin-section > .av-container {
322
434
  padding-top: 0;
323
435
  padding-bottom: 0;
324
436
  }
325
437
 
326
438
  @media (min-width: 768px) {
327
- .av-faq-admin__header {
439
+ .av-admin-header {
328
440
  padding: 1rem 0;
329
441
  }
330
442
  }
@@ -957,11 +1069,6 @@
957
1069
  padding-top: 1rem;
958
1070
  }
959
1071
 
960
- .av-faq-admin__count {
961
- color: var(--ans-muted);
962
- font-size: 0.875rem;
963
- }
964
-
965
1072
  .av-table-toolbar input,
966
1073
  .av-table-toolbar .av-input {
967
1074
  position: relative;