@threadlabs/looma 0.15.0 → 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.
- package/components/ui-cluster/ui-cluster.html +7 -0
- package/components/ui-form-field/ui-form-field.html +23 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-cluster.css +3 -0
- package/styles/ui-form-field.css +23 -0
- package/tokens.css +12 -0
- package/vanilla/UiCluster.d.ts +1 -0
- package/vanilla/UiCluster.js +2 -0
- package/vanilla/UiFormField.js +20 -9
- package/vue/UiCluster.d.ts +1 -0
- package/vue/UiCluster.vue +5 -0
- package/vue/UiFormField.d.ts +6 -4
- package/vue/UiFormField.vue +23 -1
- package/vue/chunks/UiCluster.js +5 -3
- package/vue/chunks/UiFormField.js +7 -6
- package/vue/components.css +44 -24
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
<prop name="justify" type="start | center | end | between"
|
|
10
10
|
>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
|
|
11
11
|
spare space between them, as for a title with its actions.</prop>
|
|
12
|
+
<prop name="wrap" type="wrap | nowrap"
|
|
13
|
+
>Whether items move onto a new row when they run out of space: wrap (the default) or nowrap, which keeps them on one row at their own sizes. Use nowrap for
|
|
14
|
+
a small group that must read as one unit, such as a meter and its value in a table cell, so the cell grows to fit it; a whole row of actions should keep
|
|
15
|
+
wrapping so it fits narrow screens.</prop>
|
|
12
16
|
</defs>
|
|
13
17
|
<div><slot></slot></div>
|
|
14
18
|
<style>
|
|
@@ -62,6 +66,9 @@
|
|
|
62
66
|
:host-state([justify="between"]) {
|
|
63
67
|
justify-content: space-between;
|
|
64
68
|
}
|
|
69
|
+
:host-state([wrap="nowrap"]) {
|
|
70
|
+
flex-wrap: nowrap;
|
|
71
|
+
}
|
|
65
72
|
|
|
66
73
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
67
74
|
:host[hidden] {
|
|
@@ -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"
|
|
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);
|