@loidolt/theme-styles 0.9.1 → 0.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.
- package/package.json +2 -2
- package/src/components/overlays.css +146 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loidolt/theme-styles",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Base styles, fonts, accessibility helpers, and utilities for Loidolt applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "node -e \"console.log('theme-styles: source CSS is publish-ready')\""
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@loidolt/theme-tokens": "^0.
|
|
34
|
+
"@loidolt/theme-tokens": "^0.10.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public",
|
|
@@ -397,7 +397,153 @@
|
|
|
397
397
|
.ldt-tabs__content[data-orientation='vertical'] {
|
|
398
398
|
padding-block: var(--loidolt-space-4);
|
|
399
399
|
}
|
|
400
|
+
/* A rail left vertical on a phone lays its tabs out as one row above the panels. */
|
|
401
|
+
.ldt-tabs--rail[data-orientation='vertical'] {
|
|
402
|
+
height: auto;
|
|
403
|
+
}
|
|
404
|
+
.ldt-tabs--rail .ldt-tabs__list[data-orientation='vertical'] {
|
|
405
|
+
min-width: 0;
|
|
406
|
+
flex-direction: row;
|
|
407
|
+
gap: 0;
|
|
408
|
+
padding: var(--loidolt-space-1);
|
|
409
|
+
border-inline-end: 0;
|
|
410
|
+
}
|
|
411
|
+
.ldt-tabs--rail .ldt-tabs__trigger[data-orientation='vertical'] {
|
|
412
|
+
flex: 1 1 0;
|
|
413
|
+
padding-inline: 0;
|
|
414
|
+
}
|
|
415
|
+
.ldt-tabs--rail .ldt-tabs__trigger[data-state='active'][data-orientation='vertical'] {
|
|
416
|
+
box-shadow: inset 0 calc(-1 * var(--loidolt-stroke-indicator)) 0 var(--loidolt-accent);
|
|
417
|
+
}
|
|
418
|
+
.ldt-tabs--rail[data-orientation='vertical'] .ldt-tabs__panels {
|
|
419
|
+
overflow: visible;
|
|
420
|
+
}
|
|
421
|
+
.ldt-tabs--rail[data-orientation='vertical'] .ldt-tabs__panel-header {
|
|
422
|
+
position: static;
|
|
423
|
+
}
|
|
424
|
+
.ldt-tabs--rail .ldt-tabs__content[data-orientation='vertical'] {
|
|
425
|
+
padding-block: 0;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
/* A tab's leading icon, beside its label. */
|
|
429
|
+
.ldt-tabs__trigger:has(.ldt-tabs__icon) {
|
|
430
|
+
display: inline-flex;
|
|
431
|
+
align-items: center;
|
|
432
|
+
gap: var(--loidolt-space-2);
|
|
433
|
+
}
|
|
434
|
+
.ldt-tabs__icon {
|
|
435
|
+
display: inline-flex;
|
|
436
|
+
flex: none;
|
|
437
|
+
}
|
|
438
|
+
.ldt-tabs__icon :where(svg) {
|
|
439
|
+
width: 1.15em; /* @literal icon box follows the label size */
|
|
440
|
+
height: 1.15em; /* @literal icon box follows the label size */
|
|
441
|
+
}
|
|
442
|
+
/* Panels wrapped for a shared header: the header sits above whichever panel shows. */
|
|
443
|
+
.ldt-tabs__panels {
|
|
444
|
+
min-width: 0;
|
|
445
|
+
min-height: 0;
|
|
400
446
|
}
|
|
447
|
+
|
|
448
|
+
/*
|
|
449
|
+
* Rail: a settings sidebar's icon tabs. Vertically it is a narrow column whose panels scroll
|
|
450
|
+
* beside it while the header stays pinned; horizontally it is one row of equal tabs above the
|
|
451
|
+
* panels, which never scrolls sideways. Give the root a height for the vertical panels to scroll.
|
|
452
|
+
*/
|
|
453
|
+
.ldt-tabs--rail {
|
|
454
|
+
/* Room for an icon over a label of about nine characters; override per app. */
|
|
455
|
+
--ldt-rail-width: 3.75rem;
|
|
456
|
+
min-height: 0;
|
|
457
|
+
}
|
|
458
|
+
.ldt-tabs--rail[data-orientation='vertical'] {
|
|
459
|
+
display: grid;
|
|
460
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
461
|
+
grid-template-rows: minmax(0, 1fr);
|
|
462
|
+
gap: 0;
|
|
463
|
+
height: 100%;
|
|
464
|
+
}
|
|
465
|
+
.ldt-tabs--rail .ldt-tabs__list {
|
|
466
|
+
/* The rail's width is its own (a fixed column, or the row it shares); long labels end in an
|
|
467
|
+
ellipsis rather than widening whatever holds the rail. */
|
|
468
|
+
contain: inline-size;
|
|
469
|
+
gap: var(--loidolt-space-1);
|
|
470
|
+
padding: var(--loidolt-space-2);
|
|
471
|
+
overflow: hidden;
|
|
472
|
+
}
|
|
473
|
+
.ldt-tabs--rail .ldt-tabs__list[data-orientation='vertical'] {
|
|
474
|
+
min-width: calc(var(--ldt-rail-width) + 2 * var(--loidolt-space-2));
|
|
475
|
+
overflow-y: auto;
|
|
476
|
+
border-right: 0;
|
|
477
|
+
border-inline-end: var(--loidolt-border-width) solid var(--loidolt-border);
|
|
478
|
+
scrollbar-width: none;
|
|
479
|
+
}
|
|
480
|
+
.ldt-tabs--rail .ldt-tabs__trigger {
|
|
481
|
+
min-width: 0;
|
|
482
|
+
min-height: calc(var(--loidolt-size-control) * 1.5);
|
|
483
|
+
display: flex;
|
|
484
|
+
flex-direction: column;
|
|
485
|
+
align-items: center;
|
|
486
|
+
justify-content: center;
|
|
487
|
+
gap: var(--loidolt-space-1);
|
|
488
|
+
padding: var(--loidolt-space-2) var(--loidolt-space-1);
|
|
489
|
+
border: 0;
|
|
490
|
+
border-radius: var(--loidolt-radius-control);
|
|
491
|
+
font-size: var(--loidolt-font-size-xs);
|
|
492
|
+
letter-spacing: 0; /* tracking would push short labels into ellipses */
|
|
493
|
+
text-align: center;
|
|
494
|
+
cursor: pointer;
|
|
495
|
+
}
|
|
496
|
+
.ldt-tabs--rail .ldt-tabs__trigger[data-orientation='horizontal'] {
|
|
497
|
+
flex: 1 1 0;
|
|
498
|
+
padding-inline: 0;
|
|
499
|
+
}
|
|
500
|
+
/* A row of rail tabs shares one line edge to edge, down to a 320px phone. */
|
|
501
|
+
.ldt-tabs--rail .ldt-tabs__list[data-orientation='horizontal'] {
|
|
502
|
+
gap: 0;
|
|
503
|
+
padding: var(--loidolt-space-1);
|
|
504
|
+
}
|
|
505
|
+
.ldt-tabs--rail .ldt-tabs__icon :where(svg) {
|
|
506
|
+
width: 1.25rem; /* @literal rail icons are sized for the eye, not the label */
|
|
507
|
+
height: 1.25rem; /* @literal rail icons are sized for the eye, not the label */
|
|
508
|
+
}
|
|
509
|
+
.ldt-tabs--rail .ldt-tabs__label {
|
|
510
|
+
max-width: 100%;
|
|
511
|
+
overflow: hidden;
|
|
512
|
+
text-overflow: ellipsis;
|
|
513
|
+
white-space: nowrap;
|
|
514
|
+
}
|
|
515
|
+
.ldt-tabs--rail .ldt-tabs__trigger:hover:not([data-disabled]) {
|
|
516
|
+
color: var(--loidolt-text);
|
|
517
|
+
background: var(--loidolt-surface-alt);
|
|
518
|
+
}
|
|
519
|
+
.ldt-tabs--rail .ldt-tabs__trigger[data-state='active'] {
|
|
520
|
+
color: var(--loidolt-text-accent);
|
|
521
|
+
background: var(--loidolt-surface-alt);
|
|
522
|
+
}
|
|
523
|
+
.ldt-tabs--rail .ldt-tabs__trigger[data-state='active'][data-orientation='vertical'] {
|
|
524
|
+
box-shadow: inset calc(-1 * var(--loidolt-stroke-indicator)) 0 0 var(--loidolt-accent);
|
|
525
|
+
}
|
|
526
|
+
.ldt-tabs--rail .ldt-tabs__trigger[data-state='active'][data-orientation='horizontal'] {
|
|
527
|
+
box-shadow: inset 0 calc(-1 * var(--loidolt-stroke-indicator)) 0 var(--loidolt-accent);
|
|
528
|
+
}
|
|
529
|
+
.ldt-tabs--rail .ldt-tabs__list[data-orientation='horizontal'] {
|
|
530
|
+
border-bottom: var(--loidolt-border-width) solid var(--loidolt-border);
|
|
531
|
+
}
|
|
532
|
+
.ldt-tabs--rail[data-orientation='vertical'] .ldt-tabs__panels {
|
|
533
|
+
overflow-y: auto;
|
|
534
|
+
overscroll-behavior: contain;
|
|
535
|
+
scrollbar-width: thin;
|
|
536
|
+
}
|
|
537
|
+
.ldt-tabs--rail[data-orientation='vertical'] .ldt-tabs__panel-header {
|
|
538
|
+
position: sticky;
|
|
539
|
+
top: 0;
|
|
540
|
+
z-index: var(--loidolt-z-sticky);
|
|
541
|
+
background: var(--loidolt-surface);
|
|
542
|
+
}
|
|
543
|
+
.ldt-tabs--rail .ldt-tabs__content {
|
|
544
|
+
padding-block: 0;
|
|
545
|
+
}
|
|
546
|
+
|
|
401
547
|
/* The option list of Combobox and MultiSelect: the menu surface, sized to its field. */
|
|
402
548
|
.ldt-listbox {
|
|
403
549
|
z-index: var(--loidolt-z-menu);
|