@threadlabs/looma 0.12.0 → 0.12.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.
@@ -6,6 +6,7 @@
6
6
  <span class="affix"><slot name="prefix"></slot></span>
7
7
  <span class="field"><slot></slot></span>
8
8
  <span class="affix"><slot name="suffix"></slot></span>
9
+ <span class="action"><slot name="action"></slot></span>
9
10
  </div>
10
11
  <style>
11
12
  /* An input with fixed text before or after it, such as a domain after a site's name
@@ -13,7 +14,9 @@
13
14
  focus ring around the input and its affixes together; the input inside drops its own through
14
15
  its custom properties, so it is still the one ui-input, with its form behaviour intact. The
15
16
  affixes are plain text beside the input, so name the input with a label that says what the
16
- whole value is. */
17
+ whole value is. The action slot takes one button at the end, inside the border, for the one
18
+ thing the field is for ("Continue" after a site's address), so it reads as the field's action
19
+ and not the form's. */
17
20
  :host {
18
21
  --ui-input-border: transparent;
19
22
  --ui-input-border-hover: transparent;
@@ -43,7 +46,8 @@
43
46
  border-color: var(--ui-text-secondary);
44
47
  }
45
48
 
46
- :host:focus-within {
49
+ /* The field's focus, not the action's: a focused button draws its own ring. */
50
+ :host:has(.field :focus) {
47
51
  border-color: var(--ui-accent-solid);
48
52
  box-shadow:
49
53
  var(--ui-control-inset),
@@ -76,7 +80,15 @@
76
80
  white-space: nowrap;
77
81
  }
78
82
 
79
- .affix:empty {
83
+ .action {
84
+ display: flex;
85
+ flex: none;
86
+ align-items: stretch;
87
+ padding: var(--ui-space-1);
88
+ }
89
+
90
+ .affix:empty,
91
+ .action:empty {
80
92
  display: none;
81
93
  }
82
94