@threadlabs/looma 0.25.5 → 0.25.7

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.
@@ -1,5 +1,6 @@
1
1
  <template component="ui-checkbox" controller="./ui-checkbox.js">
2
2
  <defs>
3
+ <prop name="label" type="string" default="">An accessible name for a checkbox without a visible label slot. It names the native input.</prop>
3
4
  <prop name="checked" type="boolean" default="false"
4
5
  >Whether the checkbox is checked initially or when set externally. A form reset returns it to this.</prop>
5
6
  <prop name="disabled" type="boolean" default="false">Disables the native checkbox, so it cannot be toggled or focused.</prop>
@@ -29,6 +30,7 @@
29
30
  <label>
30
31
  <input
31
32
  type="checkbox"
33
+ from:aria-label="label"
32
34
  $ref="input"
33
35
  .checked="internalChecked"
34
36
  .indeterminate="indeterminate"
@@ -8,9 +8,9 @@
8
8
  <prop name="gap" type="keyword" values="xs, s, m, l, xl"
9
9
  >Space between items, on the spacing scale: xs is 0.5rem, s 0.75rem (also the default), m 1rem, l 1.5rem, and xl 2rem. The --ui-cluster-gap custom property,
10
10
  set on the cluster itself, overrides it; set on an ancestor, it does nothing.</prop>
11
- <prop name="align" type="keyword" values="start, center, end, stretch"
11
+ <prop name="align" type="keyword" values="start, center, end, stretch, baseline"
12
12
  >How items line up within each row: center (the default) aligns their middles, start their tops, end their bottoms, and stretch makes every item as tall as
13
- its row.</prop>
13
+ its row. baseline aligns the first text baselines, including multiline columns.</prop>
14
14
  <prop name="justify" type="keyword" values="start, center, end, between"
15
15
  >Where items sit along each row: start (the default), center, end, or between, which pushes the first and last items to the ends of the row and spreads the
16
16
  spare space between them, as for a title with its actions.</prop>
@@ -84,6 +84,9 @@
84
84
  :host([align="end"]) {
85
85
  align-items: flex-end;
86
86
  }
87
+ :host([align="baseline"]) {
88
+ align-items: baseline;
89
+ }
87
90
  :host([align="stretch"]) {
88
91
  align-items: stretch;
89
92
  }
@@ -3,6 +3,9 @@
3
3
  <prop name="variant" type="keyword" values="row, card" default="row"
4
4
  >How the item is drawn. A row is flat and takes a hover surface when it is a link, for items read down a list. A card sits on a raised, bordered surface,
5
5
  for items set in a grid (a List with layout="grid"). Both have the same parts: leading, title, description, and trailing.</prop>
6
+ <prop name="leadingInteractive" type="boolean" default="false"
7
+ >Makes the leading region an independent control above the row link. Use it for a checkbox or button; keep noninteractive row icons in the title link when
8
+ combining them with a leading control.</prop>
6
9
  <prop name="wrap" type="boolean" default="false"
7
10
  >Lets the title and description wrap so explanatory text stays readable on narrow screens. Omit it for the default equal-height, one-line rows.</prop>
8
11
  <prop name="current" type="boolean" default="false"
@@ -74,11 +77,11 @@
74
77
  background: var(--ui-surface-raised);
75
78
  }
76
79
 
77
- :host:has(.title a[href]:hover) {
78
- background: var(--ui-surface-hover);
80
+ :host:where(:has(.title a[href])):hover {
81
+ background: var(--ui-selection-surface);
79
82
  }
80
83
 
81
- :host([variant="card"]):has(.title a[href]:hover) {
84
+ :host([variant="card"]):where(:has(.title a[href])):hover {
82
85
  border-color: var(--ui-border-strong);
83
86
  }
84
87
 
@@ -112,6 +115,12 @@
112
115
  color: var(--ui-selection-text);
113
116
  }
114
117
 
118
+ /* An explicitly independent leading control sits above the stretched row link. */
119
+ :host([leadingInteractive]) .leading {
120
+ position: relative;
121
+ z-index: 1;
122
+ }
123
+
115
124
  /* Trailing controls take their own clicks, above the title link's stretched hit area. */
116
125
  .trailing {
117
126
  position: relative;
@@ -35,6 +35,9 @@
35
35
  <prop name="selected" type="boolean" default="false"
36
36
  >Marks the item selected: it sets aria-selected and highlights the row. This is controlled state; respond to the parent Tree's select request by updating
37
37
  it.</prop>
38
+ <prop name="actionsVisible" type="boolean" default="false"
39
+ >Keeps the actions slot visible before hover or focus, for persistent status or controls. The label fades beneath its measured width on pointer devices;
40
+ touch rows retain a separate actions column with a short end fade. Does not change keyboard navigation or start the marquee.</prop>
38
41
  <prop name="marquee" type="boolean" default="false"
39
42
  >Scrolls a name too long for its row while a pointer hovers the row or keyboard focus is in it, rests at the end, then scrolls it again from the start. A
40
43
  touch does not start it. Off by default: a tree of short names should not move, and a product decides whether reading the whole name matters more than a
@@ -371,6 +374,7 @@
371
374
  the truncation mark while it shows: an ellipsis under it would read as a second one. */
372
375
  .row:hover > .label,
373
376
  .row:focus-within > .label,
377
+ :host([actionsVisible]) > .row > .label,
374
378
  :host[data-move-source] > .row > .label {
375
379
  text-overflow: clip;
376
380
  mask-image: linear-gradient(
@@ -382,6 +386,7 @@
382
386
 
383
387
  .row:hover > .label:dir(rtl),
384
388
  .row:focus-within > .label:dir(rtl),
389
+ :host([actionsVisible]) > .row > .label:dir(rtl),
385
390
  :host[data-move-source] > .row > .label:dir(rtl) {
386
391
  mask-image: linear-gradient(
387
392
  to left,
@@ -464,6 +469,7 @@
464
469
 
465
470
  .row:hover > .actions,
466
471
  .row:focus-within > .actions,
472
+ :host([actionsVisible]) > .row > .actions,
467
473
  :host[data-move-source] > .row > .actions {
468
474
  opacity: 1;
469
475
  pointer-events: auto;
@@ -500,6 +506,14 @@
500
506
  );
501
507
  }
502
508
 
509
+ /* Persistent content has its own column on touch. Fade only the label's end. */
510
+ :host([actionsVisible]) > .row > .label {
511
+ mask-image: linear-gradient(to right, #000 calc(100% - var(--ui-space-1)), transparent 100%);
512
+ }
513
+ :host([actionsVisible]) > .row > .label:dir(rtl) {
514
+ mask-image: linear-gradient(to left, #000 calc(100% - var(--ui-space-1)), transparent 100%);
515
+ }
516
+
503
517
  .row[data-ui-marquee] > .label:dir(rtl) {
504
518
  mask-image: linear-gradient(
505
519
  to left,