@threadlabs/looma 0.6.1 → 0.6.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-avatar/ui-avatar.html +13 -0
- package/components/ui-avatar-group/ui-avatar-group.html +7 -2
- package/components/ui-avatar-group/ui-avatar-group.js +3 -3
- package/components/ui-badge/ui-badge.html +14 -0
- package/components/ui-combobox/ui-combobox.html +112 -46
- package/components/ui-combobox/ui-combobox.js +14 -2
- package/components/ui-menu-item/ui-menu-item.html +13 -0
- package/components/ui-tabs/ui-tabs.html +13 -0
- package/components/ui-tooltip/ui-tooltip.html +3 -0
- package/components/ui-tooltip/ui-tooltip.js +24 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-avatar-group.css +7 -2
- package/styles/ui-avatar.css +19 -0
- package/styles/ui-badge.css +21 -1
- package/styles/ui-combobox.css +52 -1
- package/styles/ui-menu-item.css +20 -1
- package/styles/ui-tabs.css +19 -0
- package/vanilla/UiCombobox.js +141 -119
- package/vanilla/UiTooltip.d.ts +1 -0
- package/vanilla/UiTooltip.js +1 -1
- package/vue/UiAvatar.vue +13 -0
- package/vue/UiAvatarGroup.vue +7 -2
- package/vue/UiBadge.vue +14 -0
- package/vue/UiCombobox.vue +135 -53
- package/vue/UiMenuItem.vue +13 -0
- package/vue/UiTabs.vue +13 -0
- package/vue/UiTooltip.d.ts +4 -0
- package/vue/UiTooltip.vue +6 -0
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiCombobox.js +66 -41
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiTooltip.js +5 -2
- package/vue/components.css +191 -89
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
|
|
2
2
|
@scope ([data-component~="ui-avatar-group"]) to ([data-component], [data-slotted]) {
|
|
3
3
|
:scope {
|
|
4
|
+
/* Avatars separate with a tight, crisp edge, matching Looma's 1px borders rather than the
|
|
5
|
+
* diffuse elevation overlays use. */
|
|
6
|
+
--_overlap-shadow: -2px 0 2px -1px rgba(0, 0, 0, 0.22);
|
|
7
|
+
--_edge-ring: 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
8
|
+
|
|
4
9
|
display: flex;
|
|
5
10
|
align-items: center;
|
|
6
11
|
flex-direction: row;
|
|
@@ -22,8 +27,8 @@
|
|
|
22
27
|
background: var(--ui-surface-elevated);
|
|
23
28
|
color: var(--ui-text-primary);
|
|
24
29
|
box-shadow:
|
|
25
|
-
var(--ui-avatar-group-overlap-shadow, -
|
|
26
|
-
|
|
30
|
+
var(--ui-avatar-group-overlap-shadow, var(--_overlap-shadow)),
|
|
31
|
+
var(--ui-avatar-group-edge-ring, var(--_edge-ring));
|
|
27
32
|
font: inherit;
|
|
28
33
|
font-size: 0.75rem;
|
|
29
34
|
font-weight: 600;
|
package/styles/ui-avatar.css
CHANGED
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
block-size: 100%;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
29
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
30
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
31
|
+
@supports (text-box-trim: trim-both) {
|
|
32
|
+
.fallback {
|
|
33
|
+
display: block;
|
|
34
|
+
text-align: center;
|
|
35
|
+
align-content: center;
|
|
36
|
+
text-box-trim: trim-both;
|
|
37
|
+
text-box-edge: cap alphabetic;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
28
41
|
[hidden] {
|
|
29
42
|
display: none;
|
|
30
43
|
}
|
|
@@ -43,5 +56,11 @@
|
|
|
43
56
|
object-fit: cover;
|
|
44
57
|
}
|
|
45
58
|
|
|
59
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
60
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
61
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
62
|
+
@supports (text-box-trim: trim-both) {
|
|
63
|
+
}
|
|
64
|
+
|
|
46
65
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
47
66
|
}
|
package/styles/ui-badge.css
CHANGED
|
@@ -21,6 +21,20 @@
|
|
|
21
21
|
white-space: nowrap;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
25
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
26
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
27
|
+
@supports (text-box-trim: trim-both) {
|
|
28
|
+
:scope {
|
|
29
|
+
display: block;
|
|
30
|
+
min-block-size: var(--ui-badge-min-block-size, 1.5rem);
|
|
31
|
+
text-align: center;
|
|
32
|
+
align-content: center;
|
|
33
|
+
text-box-trim: trim-both;
|
|
34
|
+
text-box-edge: cap alphabetic;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
24
38
|
:scope[data-ui-badge-state~="tone=accent"] {
|
|
25
39
|
--_badge-surface: var(--ui-accent-strong-surface, var(--ui-accent-solid));
|
|
26
40
|
--_badge-border: var(--ui-accent-strong-surface, var(--ui-accent-solid));
|
|
@@ -87,5 +101,11 @@
|
|
|
87
101
|
}
|
|
88
102
|
}
|
|
89
103
|
@scope ([data-component~="ui-badge"]) to ([data-component]) {
|
|
90
|
-
/*
|
|
104
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
105
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
106
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
107
|
+
@supports (text-box-trim: trim-both) {
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
91
111
|
}
|
package/styles/ui-combobox.css
CHANGED
|
@@ -12,7 +12,17 @@
|
|
|
12
12
|
font-size: var(--ui-combobox-label-font-size, 0.875rem);
|
|
13
13
|
font-weight: 500;
|
|
14
14
|
}
|
|
15
|
+
/* The field and anything that annotates it sit on one row; the help button is beside the box,
|
|
16
|
+
not inside it, because a control's box holds its value. */
|
|
17
|
+
.control {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--ui-space-2);
|
|
21
|
+
min-inline-size: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
.field {
|
|
25
|
+
flex: 1 1 auto;
|
|
16
26
|
display: flex;
|
|
17
27
|
min-inline-size: 0;
|
|
18
28
|
border: 1px solid var(--ui-control-border, var(--ui-border-default));
|
|
@@ -27,6 +37,44 @@
|
|
|
27
37
|
var(--ui-control-inset),
|
|
28
38
|
var(--ui-control-focus-halo-shadow);
|
|
29
39
|
}
|
|
40
|
+
/* A ghost icon button: the affordance is the mark, not a box around it. */
|
|
41
|
+
.help {
|
|
42
|
+
flex: none;
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
inline-size: var(--ui-control-size-sm);
|
|
47
|
+
block-size: var(--ui-control-size-sm);
|
|
48
|
+
padding: 0;
|
|
49
|
+
border: 0;
|
|
50
|
+
border-radius: var(--ui-radius-round);
|
|
51
|
+
background: transparent;
|
|
52
|
+
color: var(--ui-text-secondary);
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
transition: background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.help:hover:enabled,
|
|
58
|
+
.help[aria-expanded="true"] {
|
|
59
|
+
background: color-mix(in srgb, currentColor 8%, transparent);
|
|
60
|
+
color: var(--ui-text-primary);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.help:focus-visible {
|
|
64
|
+
outline: none;
|
|
65
|
+
box-shadow: var(--ui-focus-halo);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.help:disabled {
|
|
69
|
+
color: var(--ui-disabled-text);
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.help-icon {
|
|
74
|
+
inline-size: var(--ui-icon-size-sm);
|
|
75
|
+
block-size: var(--ui-icon-size-sm);
|
|
76
|
+
}
|
|
77
|
+
|
|
30
78
|
input::selection {
|
|
31
79
|
background: color-mix(in srgb, var(--ui-accent-solid) 20%, transparent);
|
|
32
80
|
color: inherit;
|
|
@@ -202,7 +250,10 @@
|
|
|
202
250
|
}
|
|
203
251
|
}
|
|
204
252
|
@scope ([data-component~="ui-combobox"]) to ([data-component]) {
|
|
205
|
-
|
|
253
|
+
/* The field and anything that annotates it sit on one row; the help button is beside the box,
|
|
254
|
+
not inside it, because a control's box holds its value. */
|
|
255
|
+
/* A ghost icon button: the affordance is the mark, not a box around it. */
|
|
256
|
+
@media (pointer: coarse) {
|
|
206
257
|
}
|
|
207
258
|
@media (forced-colors: active) {
|
|
208
259
|
}
|
package/styles/ui-menu-item.css
CHANGED
|
@@ -15,6 +15,19 @@
|
|
|
15
15
|
transition: background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
19
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
20
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
21
|
+
@supports (text-box-trim: trim-both) {
|
|
22
|
+
:scope {
|
|
23
|
+
display: block;
|
|
24
|
+
min-block-size: var(--ui-menu-item-min-block-size, var(--ui-control-size-md, 2.5rem));
|
|
25
|
+
align-content: center;
|
|
26
|
+
text-box-trim: trim-both;
|
|
27
|
+
text-box-edge: cap alphabetic;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
18
31
|
:scope:is(:hover, :focus-visible):not([aria-disabled="true"]) {
|
|
19
32
|
background: var(--ui-menu-item-hover-surface, var(--ui-surface-subtle));
|
|
20
33
|
}
|
|
@@ -30,5 +43,11 @@
|
|
|
30
43
|
}
|
|
31
44
|
}
|
|
32
45
|
@scope ([data-component~="ui-menu-item"]) to ([data-component]) {
|
|
33
|
-
/*
|
|
46
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
47
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
48
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
49
|
+
@supports (text-box-trim: trim-both) {
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
34
53
|
}
|
package/styles/ui-tabs.css
CHANGED
|
@@ -54,6 +54,19 @@
|
|
|
54
54
|
border-color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
58
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
59
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
60
|
+
@supports (text-box-trim: trim-both) {
|
|
61
|
+
.list button {
|
|
62
|
+
display: block;
|
|
63
|
+
text-align: center;
|
|
64
|
+
align-content: center;
|
|
65
|
+
text-box-trim: trim-both;
|
|
66
|
+
text-box-edge: cap alphabetic;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
57
70
|
:scope[data-ui-tabs-state~="stretch"] .list {
|
|
58
71
|
grid-auto-columns: minmax(max-content, 1fr);
|
|
59
72
|
}
|
|
@@ -117,6 +130,12 @@
|
|
|
117
130
|
}
|
|
118
131
|
@scope ([data-component~="ui-tabs"]) to ([data-component]) {
|
|
119
132
|
/* Density resolves into the tab row's own values; the public tokens still override them. */
|
|
133
|
+
|
|
134
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
135
|
+
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
136
|
+
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
137
|
+
@supports (text-box-trim: trim-both) {
|
|
138
|
+
}
|
|
120
139
|
:where([data-slotted], [data-slotted] *):is(*) {
|
|
121
140
|
padding: var(--ui-space-4);
|
|
122
141
|
}
|