@threadlabs/looma 0.26.2 → 0.26.3
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 +6 -1
- package/components/ui-badge/ui-badge.html +62 -12
- package/components/ui-list-item/ui-list-item.html +13 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-avatar.css +4 -0
- package/styles/ui-badge.css +67 -8
- package/styles/ui-list-item.css +12 -0
- package/vanilla/UiBadge.d.ts +2 -2
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiListItem.d.ts +1 -0
- package/vanilla/UiListItem.js +6 -6
- package/vue/UiAvatar.vue +6 -1
- package/vue/UiBadge.d.ts +6 -6
- package/vue/UiBadge.vue +81 -17
- package/vue/UiCard.d.ts +1 -1
- package/vue/UiListItem.d.ts +9 -0
- package/vue/UiListItem.vue +31 -0
- package/vue/UiPopover.d.ts +1 -1
- package/vue/UiScrollArea.d.ts +1 -1
- package/vue/UiTooltip.d.ts +1 -1
- package/vue/chunks/UiAvatar.js +2 -2
- package/vue/chunks/UiBadge.js +11 -6
- package/vue/chunks/UiListItem.js +26 -2
- package/vue/components.css +167 -95
package/vue/UiListItem.vue
CHANGED
|
@@ -8,6 +8,15 @@ defineOptions({ inheritAttrs: false })
|
|
|
8
8
|
|
|
9
9
|
const propValidityContract = {
|
|
10
10
|
props: {
|
|
11
|
+
align: {
|
|
12
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'align' },
|
|
15
|
+
description:
|
|
16
|
+
'Where the leading and trailing regions sit vertically. center aligns them with the whole row. title aligns them with the first title line, keeping an\n identifying icon beside its name when the title or description wraps. Taller controls retain their natural height.',
|
|
17
|
+
values: ['center', 'title'],
|
|
18
|
+
default: 'center',
|
|
19
|
+
},
|
|
11
20
|
current: {
|
|
12
21
|
type: { kind: 'terminal', name: 'boolean' },
|
|
13
22
|
required: false,
|
|
@@ -52,6 +61,7 @@ const propValidityContract = {
|
|
|
52
61
|
},
|
|
53
62
|
} as const
|
|
54
63
|
const props = defineProps({
|
|
64
|
+
align: { type: null as unknown as PropType<'center' | 'title' | null>, default: 'center' },
|
|
55
65
|
current: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
56
66
|
highlighted: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
57
67
|
leadingInteractive: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
@@ -59,6 +69,7 @@ const props = defineProps({
|
|
|
59
69
|
wrap: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
60
70
|
})
|
|
61
71
|
const acceptedProps: Record<string, unknown> = {
|
|
72
|
+
align: 'center',
|
|
62
73
|
current: false,
|
|
63
74
|
highlighted: false,
|
|
64
75
|
leadingInteractive: false,
|
|
@@ -66,6 +77,13 @@ const acceptedProps: Record<string, unknown> = {
|
|
|
66
77
|
wrap: false,
|
|
67
78
|
}
|
|
68
79
|
const checkedProps = computed(() => ({
|
|
80
|
+
align: checkedProp<'center' | 'title'>(
|
|
81
|
+
props['align'],
|
|
82
|
+
{ kind: 'terminal', name: 'keyword' },
|
|
83
|
+
false,
|
|
84
|
+
'align',
|
|
85
|
+
acceptedProps,
|
|
86
|
+
) as 'center' | 'title',
|
|
69
87
|
current: checkedProp<boolean>(
|
|
70
88
|
props['current'],
|
|
71
89
|
{ kind: 'terminal', name: 'boolean' },
|
|
@@ -167,6 +185,8 @@ const hostState = computed(() =>
|
|
|
167
185
|
checkedProps.value.current && 'current',
|
|
168
186
|
checkedProps.value.leadingInteractive && 'leadingInteractive',
|
|
169
187
|
checkedProps.value.wrap && 'wrap',
|
|
188
|
+
checkedProps.value.align && 'align',
|
|
189
|
+
checkedProps.value.align != null && `align=${encodeURIComponent(checkedProps.value.align)}`,
|
|
170
190
|
].filter(Boolean).join(' ')
|
|
171
191
|
)
|
|
172
192
|
</script>
|
|
@@ -177,6 +197,7 @@ const hostState = computed(() =>
|
|
|
177
197
|
v-bind="nativeAttrs($attrs)"
|
|
178
198
|
:aria-current="checkedProps.current ?? undefined"
|
|
179
199
|
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
200
|
+
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
180
201
|
:data-current="reflectedProp('current', 'current', checkedProps.current, undefined, false)"
|
|
181
202
|
:data-highlighted="reflectedProp('highlighted', 'highlighted', checkedProps.highlighted, undefined, false)"
|
|
182
203
|
:data-leading-interactive="reflectedProp(
|
|
@@ -341,6 +362,16 @@ const hostState = computed(() =>
|
|
|
341
362
|
line-height: var(--ui-line-height-tight);
|
|
342
363
|
}
|
|
343
364
|
|
|
365
|
+
/* Keep identity and disclosure marks beside the first line, even with a long description. */
|
|
366
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="align=title"] {
|
|
367
|
+
align-items: flex-start;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="align=title"] .leading,
|
|
371
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="align=title"] .trailing {
|
|
372
|
+
min-block-size: calc(var(--ui-font-size-md) * var(--ui-line-height-tight));
|
|
373
|
+
}
|
|
374
|
+
|
|
344
375
|
.description {
|
|
345
376
|
color: var(--ui-text-muted);
|
|
346
377
|
font-size: var(--ui-font-size-sm);
|
package/vue/UiPopover.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
63
63
|
}>) => any) | undefined;
|
|
64
64
|
}>, {
|
|
65
65
|
open: boolean | null;
|
|
66
|
-
size: "sm" | "md" | "
|
|
66
|
+
size: "sm" | "md" | "lg" | "content" | null;
|
|
67
67
|
for: string | null;
|
|
68
68
|
placement: "left" | "right" | "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end" | null;
|
|
69
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/vue/UiScrollArea.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
39
39
|
};
|
|
40
40
|
}>> & Readonly<{}>, {
|
|
41
41
|
fill: boolean | null;
|
|
42
|
-
size: "sm" | "md" | "
|
|
42
|
+
size: "sm" | "md" | "lg" | "content" | null;
|
|
43
43
|
trim: boolean | null;
|
|
44
44
|
orientation: "vertical" | "horizontal" | null;
|
|
45
45
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/vue/UiTooltip.d.ts
CHANGED
|
@@ -87,10 +87,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
|
|
|
87
87
|
}>) => any) | undefined;
|
|
88
88
|
}>, {
|
|
89
89
|
open: boolean | null;
|
|
90
|
+
inverse: boolean | null;
|
|
90
91
|
trigger: "hover" | "click" | "focus" | null;
|
|
91
92
|
for: string | null;
|
|
92
93
|
hideDelay: number | null;
|
|
93
|
-
inverse: boolean | null;
|
|
94
94
|
placement: "left" | "right" | "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end" | null;
|
|
95
95
|
showDelay: number | null;
|
|
96
96
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
package/vue/chunks/UiAvatar.js
CHANGED
|
@@ -125,7 +125,7 @@ var UiAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
125
125
|
},
|
|
126
126
|
required: false,
|
|
127
127
|
target: { attribute: "shape" },
|
|
128
|
-
description: "Circle by default; square uses the theme's medium radius.",
|
|
128
|
+
description: "Circle by default, with a shallow shadow; square uses the theme's medium radius.",
|
|
129
129
|
values: ["circle", "square"],
|
|
130
130
|
default: "circle"
|
|
131
131
|
},
|
|
@@ -362,6 +362,6 @@ var UiAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
362
362
|
}]]);
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
|
-
}), [["__scopeId", "data-v-
|
|
365
|
+
}), [["__scopeId", "data-v-03720dc1"]]);
|
|
366
366
|
//#endregion
|
|
367
367
|
export { UiAvatar_default as t };
|
package/vue/chunks/UiBadge.js
CHANGED
|
@@ -46,7 +46,7 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
46
46
|
},
|
|
47
47
|
required: false,
|
|
48
48
|
target: { attribute: "shape" },
|
|
49
|
-
description: "Silhouette. pill is rounded at both ends; tag is a pointed label. dot is a compact circular signal with visually hidden text: include a state label, or set\n aria-hidden when the surrounding control already names that state. square is a fixed rounded square for an icon or single glyph beside a heading; hide a\n decorative icon when adjacent words name it. circle frames a visible
|
|
49
|
+
description: "Silhouette. pill is rounded at both ends; tag is a pointed label. dot is a compact circular signal with visually hidden text: include a state label, or set\n aria-hidden when the surrounding control already names that state. square is a fixed rounded square for an icon or single glyph beside a heading; hide a\n decorative icon when adjacent words name it. circle frames a visible glyph, icon or short bounded count in a fixed circle, centered in both\n directions.",
|
|
50
50
|
values: [
|
|
51
51
|
"pill",
|
|
52
52
|
"tag",
|
|
@@ -63,8 +63,12 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
63
63
|
},
|
|
64
64
|
required: false,
|
|
65
65
|
target: { attribute: "size" },
|
|
66
|
-
description: "Scale. xs is
|
|
67
|
-
values: [
|
|
66
|
+
description: "Scale. xs is compact; md is the usual text badge; lg adds room to fixed marks while retaining the usual text size. A square is 24px at xs, 32px at md and\n 40px at lg. A circle is 16px at xs, 24px at md and 32px at lg; use lg for short counts such as 30 or 99+.",
|
|
67
|
+
values: [
|
|
68
|
+
"xs",
|
|
69
|
+
"md",
|
|
70
|
+
"lg"
|
|
71
|
+
],
|
|
68
72
|
default: "md"
|
|
69
73
|
},
|
|
70
74
|
tone: {
|
|
@@ -92,11 +96,12 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
92
96
|
},
|
|
93
97
|
required: false,
|
|
94
98
|
target: { attribute: "variant" },
|
|
95
|
-
description: "Emphasis. subtle sets toned text over a soft wash; solid fills with the tone and uses contrasting text; outline keeps the surface with a toned edge.\n Neutral looks the same in solid and
|
|
99
|
+
description: "Emphasis. subtle sets toned text over a soft wash; solid fills with the tone and uses contrasting text; outline keeps the surface with a toned edge.\n inverse uses a translucent contrasting surface and toned ink for a count or label on a filled control of that tone. Neutral looks the same in solid and\n subtle. When space is constrained, the label truncates with an ellipsis while its full text remains available.",
|
|
96
100
|
values: [
|
|
97
101
|
"solid",
|
|
98
102
|
"subtle",
|
|
99
|
-
"outline"
|
|
103
|
+
"outline",
|
|
104
|
+
"inverse"
|
|
100
105
|
],
|
|
101
106
|
default: "subtle"
|
|
102
107
|
}
|
|
@@ -174,6 +179,6 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
174
179
|
}]]);
|
|
175
180
|
};
|
|
176
181
|
}
|
|
177
|
-
}), [["__scopeId", "data-v-
|
|
182
|
+
}), [["__scopeId", "data-v-4d2f1396"]]);
|
|
178
183
|
//#endregion
|
|
179
184
|
export { UiBadge_default as t };
|
package/vue/chunks/UiListItem.js
CHANGED
|
@@ -4,6 +4,7 @@ import { computed, createElementBlock, createElementVNode, defineComponent, getC
|
|
|
4
4
|
//#region .build/vue/UiListItem.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
|
6
6
|
"aria-current",
|
|
7
|
+
"data-align",
|
|
7
8
|
"data-current",
|
|
8
9
|
"data-highlighted",
|
|
9
10
|
"data-leading-interactive",
|
|
@@ -22,6 +23,10 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
22
23
|
inheritAttrs: false,
|
|
23
24
|
__name: "UiListItem",
|
|
24
25
|
props: {
|
|
26
|
+
align: {
|
|
27
|
+
type: null,
|
|
28
|
+
default: "center"
|
|
29
|
+
},
|
|
25
30
|
current: {
|
|
26
31
|
type: null,
|
|
27
32
|
default: false
|
|
@@ -45,6 +50,17 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
45
50
|
},
|
|
46
51
|
setup(__props) {
|
|
47
52
|
const propValidityContract = { props: {
|
|
53
|
+
align: {
|
|
54
|
+
type: {
|
|
55
|
+
kind: "terminal",
|
|
56
|
+
name: "keyword"
|
|
57
|
+
},
|
|
58
|
+
required: false,
|
|
59
|
+
target: { attribute: "align" },
|
|
60
|
+
description: "Where the leading and trailing regions sit vertically. center aligns them with the whole row. title aligns them with the first title line, keeping an\n identifying icon beside its name when the title or description wraps. Taller controls retain their natural height.",
|
|
61
|
+
values: ["center", "title"],
|
|
62
|
+
default: "center"
|
|
63
|
+
},
|
|
48
64
|
current: {
|
|
49
65
|
type: {
|
|
50
66
|
kind: "terminal",
|
|
@@ -99,6 +115,7 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
99
115
|
} };
|
|
100
116
|
const props = __props;
|
|
101
117
|
const acceptedProps = {
|
|
118
|
+
align: "center",
|
|
102
119
|
current: false,
|
|
103
120
|
highlighted: false,
|
|
104
121
|
leadingInteractive: false,
|
|
@@ -106,6 +123,10 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
106
123
|
wrap: false
|
|
107
124
|
};
|
|
108
125
|
const checkedProps = computed(() => ({
|
|
126
|
+
align: checkedProp(props["align"], {
|
|
127
|
+
kind: "terminal",
|
|
128
|
+
name: "keyword"
|
|
129
|
+
}, false, "align", acceptedProps),
|
|
109
130
|
current: checkedProp(props["current"], {
|
|
110
131
|
kind: "terminal",
|
|
111
132
|
name: "boolean"
|
|
@@ -158,11 +179,14 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
158
179
|
checkedProps.value.highlighted && "highlighted",
|
|
159
180
|
checkedProps.value.current && "current",
|
|
160
181
|
checkedProps.value.leadingInteractive && "leadingInteractive",
|
|
161
|
-
checkedProps.value.wrap && "wrap"
|
|
182
|
+
checkedProps.value.wrap && "wrap",
|
|
183
|
+
checkedProps.value.align && "align",
|
|
184
|
+
checkedProps.value.align != null && `align=${encodeURIComponent(checkedProps.value.align)}`
|
|
162
185
|
].filter(Boolean).join(" "));
|
|
163
186
|
return (_ctx, _cache) => {
|
|
164
187
|
return withDirectives((openBlock(), createElementBlock("li", mergeProps({ "data-component": "ui-list-item" }, nativeAttrs(_ctx.$attrs), {
|
|
165
188
|
"aria-current": checkedProps.value.current ?? void 0,
|
|
189
|
+
"data-align": reflectedProp("align", "align", checkedProps.value.align, void 0, false),
|
|
166
190
|
"data-current": reflectedProp("current", "current", checkedProps.value.current, void 0, false),
|
|
167
191
|
"data-highlighted": reflectedProp("highlighted", "highlighted", checkedProps.value.highlighted, void 0, false),
|
|
168
192
|
"data-leading-interactive": reflectedProp("leadingInteractive", "leading-interactive", checkedProps.value.leadingInteractive, void 0, false),
|
|
@@ -179,6 +203,6 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
179
203
|
}]]);
|
|
180
204
|
};
|
|
181
205
|
}
|
|
182
|
-
}), [["__scopeId", "data-v-
|
|
206
|
+
}), [["__scopeId", "data-v-6c3bc8f3"]]);
|
|
183
207
|
//#endregion
|
|
184
208
|
export { UiListItem_default as t };
|