@threadlabs/looma 0.15.1 → 0.15.2

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.
@@ -11,7 +11,10 @@
11
11
  adds no visual marker; show one in the label if the form needs it.</prop>
12
12
  </defs>
13
13
  <div>
14
- <div class="label"><slot name="label"></slot></div>
14
+ <div class="label">
15
+ <slot name="label"></slot>
16
+ <span class="label-action"><slot name="label-action"></slot></span>
17
+ </div>
15
18
  <slot></slot>
16
19
  <div class="help"><slot name="help"></slot></div>
17
20
  <div class="error"><slot name="error"></slot></div>
@@ -52,6 +55,25 @@
52
55
  font-size: var(--ui-font-size-sm);
53
56
  }
54
57
 
58
+ /* A label action, such as a small help button, sits after the label text in a box one line
59
+ tall, centred on the first line and overflowing it. A button taller than a line of label
60
+ text then never makes this field's label row taller than its neighbours' in a grid row. */
61
+ .label:has(> .label-action > *) {
62
+ display: flex;
63
+ align-items: start;
64
+ gap: var(--ui-space-1);
65
+ }
66
+
67
+ .label-action {
68
+ display: flex;
69
+ align-items: unsafe center;
70
+ block-size: 1lh;
71
+ }
72
+
73
+ .label-action:not(:has(> *)) {
74
+ display: none;
75
+ }
76
+
55
77
  .help {
56
78
  color: var(--ui-text-muted);
57
79
  font-size: var(--ui-font-size-sm);