@nubitio/admin 1.1.1 → 1.2.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.
- package/README.md +34 -0
- package/dist/index.cjs +272 -152
- package/dist/index.d.cts +69 -144
- package/dist/index.d.mts +70 -145
- package/dist/index.mjs +272 -153
- package/dist/style.css +167 -4
- package/package.json +8 -5
package/dist/style.css
CHANGED
|
@@ -314,6 +314,169 @@ html[data-density=comfortable] {
|
|
|
314
314
|
.nb-feature-hub--compact .nb-feature-hub__content {
|
|
315
315
|
padding-top: var(--space-3);
|
|
316
316
|
}
|
|
317
|
+
.nb-admin-header-content {
|
|
318
|
+
flex: 0 1 320px;
|
|
319
|
+
min-width: 0;
|
|
320
|
+
}
|
|
321
|
+
.nb-admin-header-content > * {
|
|
322
|
+
max-width: 100%;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.nb-admin-menu__brand {
|
|
326
|
+
align-items: center;
|
|
327
|
+
display: flex;
|
|
328
|
+
flex: 0 0 auto;
|
|
329
|
+
min-height: var(--admin-header-height, 64px);
|
|
330
|
+
padding: var(--space-3) var(--space-6);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.nb-admin-menu__context {
|
|
334
|
+
flex: 0 0 auto;
|
|
335
|
+
padding: var(--space-3);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.nb-admin-shell--workspace .nb-admin-menu-container {
|
|
339
|
+
padding-bottom: 0;
|
|
340
|
+
}
|
|
341
|
+
.nb-admin-shell--workspace .nb-admin-footer {
|
|
342
|
+
flex: 0 0 auto;
|
|
343
|
+
position: static;
|
|
344
|
+
}
|
|
345
|
+
.nb-admin-shell--workspace .nb-admin-shell__content {
|
|
346
|
+
min-width: 0;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.nb-admin-shell.is-workspace-desktop {
|
|
350
|
+
display: grid;
|
|
351
|
+
grid-template-columns: var(--admin-sidebar-width, 248px) minmax(0, 1fr);
|
|
352
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
353
|
+
}
|
|
354
|
+
.nb-admin-shell.is-workspace-desktop > .nb-admin-layout-header {
|
|
355
|
+
grid-column: 2;
|
|
356
|
+
grid-row: 1;
|
|
357
|
+
}
|
|
358
|
+
.nb-admin-shell.is-workspace-desktop > .nb-admin-shell__body {
|
|
359
|
+
display: contents;
|
|
360
|
+
}
|
|
361
|
+
.nb-admin-shell.is-workspace-desktop > .nb-admin-shell__body > .nb-admin-shell__panel {
|
|
362
|
+
grid-column: 1;
|
|
363
|
+
grid-row: 1/-1;
|
|
364
|
+
height: auto;
|
|
365
|
+
width: 100%;
|
|
366
|
+
}
|
|
367
|
+
.nb-admin-shell.is-workspace-desktop > .nb-admin-shell__body > .nb-admin-shell__content {
|
|
368
|
+
grid-column: 2;
|
|
369
|
+
grid-row: 2;
|
|
370
|
+
}
|
|
371
|
+
.nb-admin-shell.is-workspace-desktop.is-workspace-compact {
|
|
372
|
+
grid-template-columns: var(--side-panel-min-width) minmax(0, 1fr);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.nb-admin-shell__bottom-navigation {
|
|
376
|
+
background: var(--surface-1);
|
|
377
|
+
flex: 0 0 auto;
|
|
378
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
379
|
+
z-index: var(--z-shell-panel);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.nb-admin-bottom-nav {
|
|
383
|
+
background: var(--surface-1);
|
|
384
|
+
border-top: 1px solid var(--border-color);
|
|
385
|
+
display: flex;
|
|
386
|
+
padding: var(--space-2);
|
|
387
|
+
}
|
|
388
|
+
.nb-admin-bottom-nav__item {
|
|
389
|
+
align-items: center;
|
|
390
|
+
border-radius: var(--radius-sm);
|
|
391
|
+
color: var(--text-secondary);
|
|
392
|
+
display: flex;
|
|
393
|
+
flex: 1 1 0;
|
|
394
|
+
flex-direction: column;
|
|
395
|
+
gap: var(--space-1);
|
|
396
|
+
justify-content: center;
|
|
397
|
+
min-height: 64px;
|
|
398
|
+
min-width: 0;
|
|
399
|
+
padding: var(--space-2) var(--space-1);
|
|
400
|
+
position: relative;
|
|
401
|
+
text-align: center;
|
|
402
|
+
text-decoration: none;
|
|
403
|
+
}
|
|
404
|
+
.nb-admin-bottom-nav__item[aria-current=page] {
|
|
405
|
+
background: var(--accent-subtle);
|
|
406
|
+
color: var(--accent-on-subtle);
|
|
407
|
+
}
|
|
408
|
+
.nb-admin-bottom-nav__item:hover {
|
|
409
|
+
background: var(--surface-2);
|
|
410
|
+
}
|
|
411
|
+
.nb-admin-bottom-nav__item:focus-visible {
|
|
412
|
+
outline: 2px solid var(--focus-ring-color);
|
|
413
|
+
outline-offset: -2px;
|
|
414
|
+
}
|
|
415
|
+
.nb-admin-bottom-nav__icon {
|
|
416
|
+
font-size: 24px;
|
|
417
|
+
}
|
|
418
|
+
.nb-admin-bottom-nav__label {
|
|
419
|
+
font-size: var(--font-size-xs);
|
|
420
|
+
overflow-wrap: anywhere;
|
|
421
|
+
}
|
|
422
|
+
.nb-admin-bottom-nav__badge {
|
|
423
|
+
background: var(--accent-color);
|
|
424
|
+
border-radius: var(--radius-pill);
|
|
425
|
+
color: var(--on-accent-color);
|
|
426
|
+
font-size: var(--font-size-xxs);
|
|
427
|
+
padding: 0 var(--space-1);
|
|
428
|
+
position: absolute;
|
|
429
|
+
right: var(--space-1);
|
|
430
|
+
top: 0;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
html[data-visual-style=nubit] .nb-admin-header-toolbar {
|
|
434
|
+
gap: var(--space-4);
|
|
435
|
+
min-height: calc(var(--admin-header-height) - 1px);
|
|
436
|
+
padding-right: var(--space-7);
|
|
437
|
+
}
|
|
438
|
+
html[data-visual-style=nubit] .nb-admin-header-title {
|
|
439
|
+
font-size: var(--font-size-xl);
|
|
440
|
+
font-weight: var(--font-weight-semibold);
|
|
441
|
+
}
|
|
442
|
+
html[data-visual-style=nubit] .nb-admin-menu__nav {
|
|
443
|
+
gap: var(--space-1);
|
|
444
|
+
padding: var(--space-3);
|
|
445
|
+
}
|
|
446
|
+
html[data-visual-style=nubit] .nb-admin-menu__section {
|
|
447
|
+
border: 0;
|
|
448
|
+
}
|
|
449
|
+
html[data-visual-style=nubit] .nb-admin-menu__item {
|
|
450
|
+
border-left: 0;
|
|
451
|
+
border-radius: var(--radius-sm);
|
|
452
|
+
min-height: 40px;
|
|
453
|
+
}
|
|
454
|
+
html[data-visual-style=nubit] .nb-admin-menu__item.is-selected {
|
|
455
|
+
background: var(--accent-subtle);
|
|
456
|
+
color: var(--accent-on-subtle);
|
|
457
|
+
}
|
|
458
|
+
html[data-visual-style=nubit] .nb-admin-menu__item--parent {
|
|
459
|
+
color: var(--text-secondary);
|
|
460
|
+
}
|
|
461
|
+
html[data-visual-style=nubit] .nb-admin-menu.compact .nb-admin-menu__nav {
|
|
462
|
+
padding-inline: 0;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
@media (max-width: 575.98px) {
|
|
466
|
+
.nb-admin-header-toolbar:has(.nb-admin-header-content) .nb-admin-header-title {
|
|
467
|
+
display: none;
|
|
468
|
+
}
|
|
469
|
+
.nb-admin-header-toolbar:has(.nb-admin-header-content) .nb-admin-header-toolbar__before {
|
|
470
|
+
flex: 0 0 auto;
|
|
471
|
+
}
|
|
472
|
+
.nb-admin-header-content {
|
|
473
|
+
flex: 1 1 0;
|
|
474
|
+
}
|
|
475
|
+
html[data-visual-style=nubit] .nb-admin-header-toolbar {
|
|
476
|
+
gap: var(--space-1);
|
|
477
|
+
padding-right: var(--space-2);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
317
480
|
.nb-admin-shell {
|
|
318
481
|
display: flex;
|
|
319
482
|
flex-direction: column;
|
|
@@ -340,12 +503,12 @@ html[data-density=comfortable] {
|
|
|
340
503
|
.nb-admin-shell__panel {
|
|
341
504
|
background-color: var(--side-panel-background);
|
|
342
505
|
border-right: 1px solid var(--border-color);
|
|
343
|
-
flex: 0 0 240px;
|
|
506
|
+
flex: 0 0 var(--admin-sidebar-width, 240px);
|
|
344
507
|
height: 100%;
|
|
345
508
|
overflow: hidden;
|
|
346
509
|
position: relative;
|
|
347
510
|
transition: flex-basis var(--transition-slow), transform var(--transition-slow), width var(--transition-slow);
|
|
348
|
-
width: 240px;
|
|
511
|
+
width: var(--admin-sidebar-width, 240px);
|
|
349
512
|
z-index: var(--z-shell-panel);
|
|
350
513
|
}
|
|
351
514
|
|
|
@@ -399,7 +562,7 @@ html[data-density=comfortable] {
|
|
|
399
562
|
align-items: center;
|
|
400
563
|
display: flex;
|
|
401
564
|
gap: var(--space-2);
|
|
402
|
-
min-height: var(--toolbar-height);
|
|
565
|
+
min-height: var(--admin-header-height, var(--toolbar-height));
|
|
403
566
|
padding: 0 var(--space-4) 0 0;
|
|
404
567
|
}
|
|
405
568
|
|
|
@@ -480,7 +643,7 @@ html[data-density=comfortable] {
|
|
|
480
643
|
flex-direction: column;
|
|
481
644
|
height: 100%;
|
|
482
645
|
min-height: 100%;
|
|
483
|
-
width: 240px !important;
|
|
646
|
+
width: var(--admin-sidebar-width, 240px) !important;
|
|
484
647
|
}
|
|
485
648
|
.nb-admin-menu .nb-admin-menu-container {
|
|
486
649
|
background-color: var(--side-panel-background);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nubitio/admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Admin shell layout components: responsive sidebar, header, and screen size utilities for Nubit apps.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,9 +53,12 @@
|
|
|
53
53
|
"react": "^18.2.0 || ^19.0.0",
|
|
54
54
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
55
55
|
"react-router-dom": "^6.0.0 || ^7.0.0",
|
|
56
|
-
"@nubitio/core": "^1.
|
|
57
|
-
"@nubitio/
|
|
58
|
-
"@nubitio/
|
|
59
|
-
"@nubitio/
|
|
56
|
+
"@nubitio/core": "^1.2.0",
|
|
57
|
+
"@nubitio/hydra": "^1.2.0",
|
|
58
|
+
"@nubitio/crud": "^1.2.0",
|
|
59
|
+
"@nubitio/ui": "^1.2.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"react-router-dom": "^6.30.6"
|
|
60
63
|
}
|
|
61
64
|
}
|