@umituz/web-dashboard 7.8.0 → 7.10.0

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 (27) hide show
  1. package/README.md +28 -3
  2. package/package.json +3 -1
  3. package/src/domains/notifications/NotificationsContext.test.tsx +90 -0
  4. package/src/domains/notifications/NotificationsContext.tsx +92 -0
  5. package/src/domains/notifications/components/NotificationCenter.test.tsx +81 -0
  6. package/src/domains/notifications/components/NotificationCenter.tsx +154 -0
  7. package/src/domains/notifications/components/NotificationItem.test.tsx +108 -0
  8. package/src/domains/notifications/components/NotificationItem.tsx +100 -0
  9. package/src/domains/notifications/components/NotificationList.tsx +75 -0
  10. package/src/domains/notifications/components/NotificationsPage.test.tsx +100 -0
  11. package/src/domains/notifications/components/NotificationsPage.tsx +126 -0
  12. package/src/domains/notifications/components/index.ts +8 -0
  13. package/src/domains/notifications/index.ts +16 -0
  14. package/src/domains/notifications/time.test.ts +42 -0
  15. package/src/domains/notifications/time.ts +55 -0
  16. package/src/domains/notifications/types.ts +42 -0
  17. package/src/domains/organization/components/OrganizationMembersPanel.test.tsx +84 -5
  18. package/src/domains/organization/components/OrganizationMembersPanel.tsx +138 -12
  19. package/src/domains/organization/components/OrganizationSwitcher.test.tsx +30 -1
  20. package/src/domains/organization/components/OrganizationSwitcher.tsx +21 -8
  21. package/src/domains/organization/components/index.ts +1 -1
  22. package/src/domains/organization/index.ts +4 -2
  23. package/src/domains/organization/types.ts +27 -5
  24. package/src/domains/organization/vocab.test.ts +18 -1
  25. package/src/domains/organization/vocab.ts +32 -1
  26. package/src/domains/settings/components/UserManagementTable.tsx +25 -14
  27. package/src/styles/chrome.css +296 -0
@@ -1388,12 +1388,79 @@
1388
1388
  color: var(--color-muted-foreground);
1389
1389
  font-weight: var(--font-weight-normal);
1390
1390
  }
1391
+ .udb-members__head-actions {
1392
+ display: flex;
1393
+ align-items: center;
1394
+ gap: var(--udb-space-2);
1395
+ }
1396
+ .udb-members__seats {
1397
+ font-size: var(--udb-font-size-sm);
1398
+ color: var(--color-muted-foreground);
1399
+ white-space: nowrap;
1400
+ }
1391
1401
  .udb-members__invite {
1392
1402
  padding: var(--udb-space-4);
1393
1403
  border: 1px solid var(--color-border);
1394
1404
  border-radius: var(--radius-md);
1395
1405
  background: var(--color-muted);
1396
1406
  }
1407
+ .udb-members__invitations {
1408
+ display: flex;
1409
+ flex-direction: column;
1410
+ gap: var(--udb-space-2);
1411
+ }
1412
+ .udb-members__invitations-title {
1413
+ margin: 0;
1414
+ font-size: var(--udb-font-size-sm);
1415
+ font-weight: var(--font-weight-semibold);
1416
+ color: var(--color-muted-foreground);
1417
+ }
1418
+ .udb-members__invitation-list {
1419
+ display: flex;
1420
+ flex-direction: column;
1421
+ gap: var(--udb-space-2);
1422
+ margin: 0;
1423
+ padding: 0;
1424
+ list-style: none;
1425
+ }
1426
+ .udb-members__invitation {
1427
+ display: flex;
1428
+ align-items: center;
1429
+ justify-content: space-between;
1430
+ gap: var(--udb-space-3);
1431
+ padding: var(--udb-space-2) var(--udb-space-3);
1432
+ border: 1px solid var(--color-border);
1433
+ border-radius: var(--radius-md);
1434
+ }
1435
+ .udb-members__invitation-info {
1436
+ display: flex;
1437
+ flex-direction: column;
1438
+ gap: var(--udb-space-1);
1439
+ }
1440
+ .udb-members__invitation-email {
1441
+ font-size: var(--udb-font-size-sm);
1442
+ font-weight: var(--font-weight-medium);
1443
+ }
1444
+ .udb-members__invitation-role {
1445
+ font-size: var(--udb-font-size-xs);
1446
+ color: var(--color-muted-foreground);
1447
+ }
1448
+ .udb-members__invitation-side {
1449
+ display: flex;
1450
+ align-items: center;
1451
+ gap: var(--udb-space-3);
1452
+ }
1453
+ .udb-members__invitation-actions {
1454
+ display: flex;
1455
+ align-items: center;
1456
+ gap: var(--udb-space-2);
1457
+ }
1458
+ .udb-row-actions {
1459
+ display: inline-flex;
1460
+ align-items: center;
1461
+ justify-content: flex-end;
1462
+ gap: var(--udb-space-2);
1463
+ }
1397
1464
  .udb-invite {
1398
1465
  display: flex;
1399
1466
  flex-direction: column;
@@ -1425,6 +1492,9 @@
1425
1492
  .udb-link-button:hover {
1426
1493
  text-decoration: underline;
1427
1494
  }
1495
+ .udb-link-button--muted {
1496
+ color: var(--color-muted-foreground);
1497
+ }
1428
1498
  .udb-matrix__group-row th {
1429
1499
  font-size: var(--udb-font-size-xs);
1430
1500
  font-weight: var(--font-weight-bold);
@@ -3021,3 +3091,229 @@
3021
3091
  font-size: var(--udb-font-size-xs);
3022
3092
  color: var(--color-muted-foreground);
3023
3093
  }
3094
+
3095
+ /* ------------------------------------------------------------------ */
3096
+ /* Notifications (udb-notif-*) */
3097
+ /* ------------------------------------------------------------------ */
3098
+ .udb-notif-list {
3099
+ list-style: none;
3100
+ margin: 0;
3101
+ padding: 0;
3102
+ }
3103
+ .udb-notif-list li + li {
3104
+ border-top: 1px solid var(--color-border);
3105
+ }
3106
+ .udb-notif-list__empty {
3107
+ padding: var(--udb-space-6) var(--udb-space-4);
3108
+ }
3109
+ .udb-notif-item {
3110
+ display: flex;
3111
+ align-items: flex-start;
3112
+ gap: var(--udb-space-3);
3113
+ padding: var(--udb-space-3) var(--udb-space-4);
3114
+ text-decoration: none;
3115
+ color: inherit;
3116
+ }
3117
+ .udb-notif-item:hover {
3118
+ background: var(--color-muted);
3119
+ }
3120
+ .udb-notif-item--unread {
3121
+ background: var(--color-accent, var(--color-muted));
3122
+ }
3123
+ .udb-notif-item--unread:hover {
3124
+ background: var(--color-muted);
3125
+ }
3126
+ .udb-notif-item__icon {
3127
+ display: inline-flex;
3128
+ align-items: center;
3129
+ justify-content: center;
3130
+ width: 30px;
3131
+ height: 30px;
3132
+ border-radius: 999px;
3133
+ flex: none;
3134
+ margin-top: 2px;
3135
+ }
3136
+ .udb-notif-item__icon--info {
3137
+ background: color-mix(in srgb, var(--color-primary) 12%, transparent);
3138
+ color: var(--color-primary);
3139
+ }
3140
+ .udb-notif-item__icon--success {
3141
+ background: color-mix(in srgb, var(--color-success, var(--color-primary)) 12%, transparent);
3142
+ color: var(--color-success, var(--color-primary));
3143
+ }
3144
+ .udb-notif-item__icon--warning {
3145
+ background: color-mix(in srgb, var(--color-warning, var(--color-primary)) 14%, transparent);
3146
+ color: var(--color-warning, var(--color-primary));
3147
+ }
3148
+ .udb-notif-item__icon--danger {
3149
+ background: color-mix(in srgb, var(--color-destructive) 12%, transparent);
3150
+ color: var(--color-destructive);
3151
+ }
3152
+ .udb-notif-item__body {
3153
+ display: flex;
3154
+ flex-direction: column;
3155
+ gap: 2px;
3156
+ min-width: 0;
3157
+ flex: 1;
3158
+ }
3159
+ .udb-notif-item__title {
3160
+ font-size: var(--udb-font-size-sm);
3161
+ font-weight: 600;
3162
+ color: var(--color-foreground);
3163
+ overflow: hidden;
3164
+ text-overflow: ellipsis;
3165
+ }
3166
+ .udb-notif-item--unread .udb-notif-item__title {
3167
+ color: var(--color-foreground);
3168
+ }
3169
+ .udb-notif-item__text {
3170
+ font-size: var(--udb-font-size-sm);
3171
+ color: var(--color-muted-foreground);
3172
+ line-height: 1.45;
3173
+ }
3174
+ .udb-notif-item__when {
3175
+ font-size: var(--udb-font-size-xs);
3176
+ color: var(--color-muted-foreground);
3177
+ font-variant-numeric: tabular-nums;
3178
+ }
3179
+ .udb-notif-item__side {
3180
+ display: flex;
3181
+ align-items: center;
3182
+ gap: var(--udb-space-2);
3183
+ flex: none;
3184
+ }
3185
+ .udb-notif-item__dot {
3186
+ width: 7px;
3187
+ height: 7px;
3188
+ border-radius: 999px;
3189
+ background: var(--color-primary);
3190
+ flex: none;
3191
+ }
3192
+
3193
+ /* Bell + popover */
3194
+ .udb-notif-center {
3195
+ position: relative;
3196
+ }
3197
+ .udb-notif-bell {
3198
+ appearance: none;
3199
+ position: relative;
3200
+ display: inline-flex;
3201
+ align-items: center;
3202
+ justify-content: center;
3203
+ width: 34px;
3204
+ height: 34px;
3205
+ border: 1px solid var(--color-border);
3206
+ border-radius: var(--udb-radius-pill, 999px);
3207
+ background: var(--color-background);
3208
+ color: var(--color-foreground);
3209
+ cursor: pointer;
3210
+ }
3211
+ .udb-notif-bell:hover {
3212
+ background: var(--color-muted);
3213
+ }
3214
+ .udb-notif-bell__badge {
3215
+ position: absolute;
3216
+ top: -4px;
3217
+ right: -4px;
3218
+ min-width: 17px;
3219
+ height: 17px;
3220
+ padding: 0 4px;
3221
+ border-radius: 999px;
3222
+ background: var(--color-destructive);
3223
+ color: var(--color-destructive-foreground, #fff);
3224
+ font-size: 10px;
3225
+ font-weight: 700;
3226
+ line-height: 17px;
3227
+ text-align: center;
3228
+ font-variant-numeric: tabular-nums;
3229
+ }
3230
+ .udb-notif-center__panel {
3231
+ position: absolute;
3232
+ top: calc(100% + var(--udb-space-2));
3233
+ right: 0;
3234
+ z-index: 40;
3235
+ width: min(360px, calc(100vw - 32px));
3236
+ border: 1px solid var(--color-border);
3237
+ border-radius: var(--udb-radius, 10px);
3238
+ background: var(--color-card);
3239
+ box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
3240
+ overflow: hidden;
3241
+ }
3242
+ .udb-notif-center__head {
3243
+ display: flex;
3244
+ align-items: center;
3245
+ justify-content: space-between;
3246
+ gap: var(--udb-space-2);
3247
+ padding: var(--udb-space-3) var(--udb-space-4);
3248
+ border-bottom: 1px solid var(--color-border);
3249
+ }
3250
+ .udb-notif-center__title {
3251
+ margin: 0;
3252
+ font-size: var(--udb-font-size-md);
3253
+ font-weight: 600;
3254
+ color: var(--color-foreground);
3255
+ }
3256
+ .udb-notif-center__list {
3257
+ max-height: 420px;
3258
+ overflow-y: auto;
3259
+ }
3260
+ .udb-notif-center__more {
3261
+ margin: 0;
3262
+ padding: var(--udb-space-2) var(--udb-space-4);
3263
+ border-top: 1px solid var(--color-border);
3264
+ font-size: var(--udb-font-size-xs);
3265
+ color: var(--color-muted-foreground);
3266
+ }
3267
+ .udb-notif-center__foot {
3268
+ padding: var(--udb-space-2) var(--udb-space-4);
3269
+ border-top: 1px solid var(--color-border);
3270
+ text-align: center;
3271
+ }
3272
+ .udb-notif-center__foot a {
3273
+ font-size: var(--udb-font-size-sm);
3274
+ font-weight: 600;
3275
+ color: var(--color-primary);
3276
+ text-decoration: none;
3277
+ }
3278
+ .udb-notif-center__foot a:hover {
3279
+ text-decoration: underline;
3280
+ }
3281
+
3282
+ /* Page skeleton */
3283
+ .udb-notif-page {
3284
+ display: flex;
3285
+ flex-direction: column;
3286
+ gap: var(--udb-space-4);
3287
+ }
3288
+ .udb-notif-page__filters {
3289
+ display: flex;
3290
+ flex-wrap: wrap;
3291
+ gap: var(--udb-space-2);
3292
+ }
3293
+ .udb-notif-page__body {
3294
+ border: 1px solid var(--color-border);
3295
+ border-radius: var(--udb-radius, 10px);
3296
+ background: var(--color-card);
3297
+ overflow: hidden;
3298
+ }
3299
+ .udb-notif-page__loading {
3300
+ display: flex;
3301
+ flex-direction: column;
3302
+ gap: var(--udb-space-2);
3303
+ padding: var(--udb-space-4);
3304
+ }
3305
+ .udb-notif-page__skeleton {
3306
+ height: 54px;
3307
+ border-radius: var(--udb-radius, 10px);
3308
+ background: var(--color-muted);
3309
+ animation: udb-notif-pulse 1.4s ease-in-out infinite;
3310
+ }
3311
+ @keyframes udb-notif-pulse {
3312
+ 0%,
3313
+ 100% {
3314
+ opacity: 1;
3315
+ }
3316
+ 50% {
3317
+ opacity: 0.55;
3318
+ }
3319
+ }