@x-tech-laboratories/halon 0.1.0 → 0.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.
Files changed (2) hide show
  1. package/halon.css +101 -1
  2. package/package.json +1 -1
package/halon.css CHANGED
@@ -283,6 +283,8 @@ input[type="checkbox"][role="switch"]:disabled { opacity: 0.5; cursor: not-allow
283
283
  /* A place you are, not a row you picked: elevation, not fill. */
284
284
  .sidebar a.active { background-color: var(--surface-default); color: var(--text-heading); box-shadow: var(--shadow-item); font-weight: 500; }
285
285
  .scrim { position: fixed; inset: 0; z-index: calc(var(--layer-sticky) + 1); background-color: var(--surface-overlay); }
286
+ /* The sidebar's grab bar runs down its right edge, and the width it sets reaches the grid through --sidebar-width. */
287
+ .sidebar > .sidebar-resize { position: absolute; top: 0; right: 0; bottom: 0; }
286
288
 
287
289
  /* The content pane: the one raised surface, inset in the frame. */
288
290
  main {
@@ -502,6 +504,8 @@ button.card { width: 100%; height: auto; font-weight: 400; line-height: var(--li
502
504
 
503
505
  /* ── Trees ────────────────────────────────────────────────────────────────── */
504
506
 
507
+ /* A long path breaks anywhere rather than widening its column. */
508
+ .path { overflow-wrap: anywhere; }
505
509
  .change-summary { display: flex; gap: var(--space-4); flex-wrap: wrap; }
506
510
  .tree { display: grid; gap: var(--space-1); font-size: var(--text-control); }
507
511
  .tree-folder > summary { cursor: pointer; padding: var(--space-1) 0; }
@@ -509,6 +513,52 @@ button.card { width: 100%; height: auto; font-weight: 400; line-height: var(--li
509
513
  .tree-file { display: flex; gap: var(--space-4); align-items: baseline; padding: var(--space-1) 0 var(--space-1) var(--space-6); flex-wrap: wrap; }
510
514
  .tree-name { font-family: var(--font-family-monospace); font-size: var(--text-caption); overflow-wrap: anywhere; }
511
515
 
516
+ /* The tree widget is a list of rows that fold, take a selection and accept dropped rows. */
517
+ ul.tree, ul.tree-children { display: block; margin: 0; padding: 0; list-style: none; }
518
+ ul.tree-children { margin-left: var(--space-5); padding-left: var(--space-2); }
519
+ .tree-item { outline: none; }
520
+ .tree-row {
521
+ display: flex;
522
+ align-items: center;
523
+ gap: var(--space-2);
524
+ min-height: var(--row-height);
525
+ padding: 0 var(--space-2);
526
+ border-radius: var(--radius-small);
527
+ color: var(--text-body);
528
+ cursor: default;
529
+ transition: background-color var(--duration-fast), color var(--duration-fast);
530
+ }
531
+ .tree-row:hover { background-color: var(--surface-navigation-hover); color: var(--text-heading); }
532
+ .tree-item:focus-visible > .tree-row { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: -1px; }
533
+ /* A picked row is a solid accent fill, faded while the tree does not have focus. */
534
+ .tree-item[aria-selected="true"] > .tree-row { background-color: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--text-heading); }
535
+ .tree:focus-within .tree-item[aria-selected="true"] > .tree-row { background-color: var(--accent); color: var(--text-on-fill); }
536
+ .tree-item[aria-selected="true"] > .tree-row .tree-toggle { color: inherit; }
537
+ .tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
538
+ .tree-extra { display: flex; flex: none; align-items: center; gap: var(--space-2); color: var(--text-tertiary); font-size: var(--text-caption); }
539
+ .tree-item[aria-selected="true"] > .tree-row .tree-extra { color: inherit; }
540
+ .tree-new { padding: var(--space-1) var(--space-2) var(--space-1) var(--space-7); }
541
+ .tree-new input:not([type="checkbox"]):not([type="radio"]) { width: 100%; }
542
+
543
+ /* A fold arrow, and the empty space of the same width on a row with nothing to fold. */
544
+ .tree-toggle, .tree-spacer {
545
+ display: inline-flex;
546
+ flex: none;
547
+ align-items: center;
548
+ justify-content: center;
549
+ width: var(--space-6);
550
+ height: var(--space-6);
551
+ vertical-align: middle;
552
+ }
553
+ button.tree-toggle { width: var(--space-6); height: var(--space-6); padding: 0; border: none; background: none; color: var(--text-secondary); font-size: var(--text-caption); }
554
+ button.tree-toggle:hover:not(:disabled) { color: var(--text-heading); }
555
+
556
+ /* A dragged row fades, and a line or fill shows where it will land. */
557
+ .tree-row.dragging { opacity: 0.5; }
558
+ .tree-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
559
+ .tree-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
560
+ .tree-row.drop-inside { background-color: color-mix(in srgb, var(--accent) 15%, transparent); outline: var(--border-width) solid var(--accent); outline-offset: -1px; }
561
+
512
562
  /* ── Forms and settings ───────────────────────────────────────────────────── */
513
563
 
514
564
  .form-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--space-4); }
@@ -631,6 +681,48 @@ th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--text-headin
631
681
  .actions-cell { text-align: right; }
632
682
  .row-actions { display: inline-flex; gap: var(--space-1); justify-content: flex-end; flex-wrap: wrap; }
633
683
  .pager { display: flex; gap: var(--space-5); align-items: center; justify-content: center; margin-top: var(--space-5); font-size: var(--text-control); }
684
+ .table-tools { display: flex; gap: var(--space-4); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
685
+
686
+ /* A header cell holds its sort button, a filter button and a grab bar on its right edge. */
687
+ th { position: relative; }
688
+ th[draggable="true"] { cursor: grab; }
689
+ th > .column-resize { position: absolute; top: 0; right: 0; bottom: 0; }
690
+ th.filtered { color: var(--text-heading); }
691
+ .sort-marker { white-space: nowrap; }
692
+ .sort-rank { margin-left: 1px; font-size: 0.8em; line-height: 0; }
693
+ th .filter-button {
694
+ width: auto;
695
+ height: auto;
696
+ margin-left: var(--space-2);
697
+ padding: var(--space-1);
698
+ border-color: transparent;
699
+ color: var(--text-tertiary);
700
+ vertical-align: middle;
701
+ }
702
+ th .filter-button:hover:not(:disabled) { border-color: var(--border-default); color: var(--text-heading); }
703
+ th .filter-button.active { color: var(--accent); }
704
+ th .filter-button.active:hover:not(:disabled) { border-color: var(--accent); }
705
+
706
+ /* A dragged column fades, and a line on the near edge of another shows where it will land. */
707
+ th.dragged { opacity: 0.5; }
708
+ th.drop-before { box-shadow: inset 2px 0 0 var(--accent); }
709
+ th.drop-after { box-shadow: inset -2px 0 0 var(--accent); }
710
+
711
+ /* A tree table indents its first cell by the row's depth. */
712
+ td.tree-cell { padding-inline-start: calc(var(--space-5) + var(--tree-depth, 0) * var(--space-6)); white-space: nowrap; }
713
+ td.tree-cell > .tree-toggle { margin-right: var(--space-2); }
714
+ td.tree-cell > .tree-spacer { margin-right: var(--space-2); }
715
+ .tree-count {
716
+ display: inline-flex;
717
+ margin-left: var(--space-3);
718
+ padding: 0 var(--space-3);
719
+ border-radius: var(--radius-small);
720
+ background-color: var(--surface-secondary);
721
+ color: var(--text-secondary);
722
+ font-size: var(--text-label);
723
+ font-weight: 600;
724
+ vertical-align: middle;
725
+ }
634
726
 
635
727
 
636
728
 
@@ -723,6 +815,10 @@ th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--text-headin
723
815
  font-size: var(--text-control);
724
816
  }
725
817
  .menu { min-width: 180px; margin: 0; list-style: none; outline: none; }
818
+ /* A native popover is centred by default, so a menu or popover opened at a point drops that and takes its own place. */
819
+ .menu[popover], .popover[popover] { inset: auto; margin: 0; color: var(--text-body); }
820
+ /* An anchored popover hangs below its anchor, flipping above or across where there is no room. */
821
+ .popover.anchored { top: anchor(bottom); left: anchor(left); margin-top: var(--space-2); position-try-fallbacks: flip-block, flip-inline; }
726
822
  .popover { padding: var(--space-4); }
727
823
  .menu-item {
728
824
  display: flex;
@@ -737,9 +833,10 @@ th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--text-headin
737
833
  font-weight: 400;
738
834
  text-align: left;
739
835
  }
740
- .menu-item:hover:not(:disabled), .menu-item:focus-visible { background-color: var(--surface-navigation-hover); color: var(--text-heading); }
836
+ .menu-item:hover:not(:disabled):not([aria-disabled="true"]), .menu-item:focus-visible { background-color: var(--surface-navigation-hover); color: var(--text-heading); }
741
837
  .menu-item.danger { color: var(--status-danger); }
742
838
  .menu-item[aria-checked="true"] { color: var(--accent); font-weight: 600; }
839
+ .menu-item[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
743
840
  .menu-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
744
841
  .menu-hint { flex: none; color: var(--text-tertiary); font-size: var(--text-label); }
745
842
  .menu-separator { height: var(--border-width); margin: var(--space-1) var(--space-2); background-color: var(--border-default); }
@@ -795,6 +892,7 @@ body.resizing.vertical { cursor: row-resize; }
795
892
  visibility: hidden;
796
893
  }
797
894
  body.menu-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-floating); }
895
+ .sidebar > .sidebar-resize { display: none; }
798
896
  .account-link { display: none; }
799
897
  main { margin-left: var(--space-2); padding: var(--space-6) var(--space-6) var(--space-8); }
800
898
  .topbar { height: auto; min-height: var(--frame-height); gap: var(--space-2); padding: var(--space-1) var(--space-2) var(--space-2); flex-wrap: wrap; }
@@ -814,6 +912,8 @@ body.resizing.vertical { cursor: row-resize; }
814
912
  table.responsive td::before { content: attr(data-label); color: var(--text-secondary); text-align: left; }
815
913
  table.responsive td[data-label=""]::before { content: none; }
816
914
  table.responsive td.actions-cell { justify-content: flex-end; }
915
+ table.responsive td.tree-cell { justify-content: flex-start; gap: var(--space-2); padding-inline-start: 0; white-space: normal; }
916
+ table.responsive td.tree-cell::before { margin-right: auto; }
817
917
  .form-row { grid-template-columns: 1fr; }
818
918
  .form-row label { padding-top: 0; }
819
919
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-tech-laboratories/halon",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Halon for the web: the token sheet and the component styles the X-apps' pages are drawn with",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {