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