@threadlabs/looma 0.23.4 → 0.23.6
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/shared/icons.js +1 -0
- package/components/ui-badge/ui-badge.html +37 -3
- package/components/ui-icon/ui-icon.html +1 -0
- package/components/ui-list-item/ui-list-item.html +16 -1
- package/dist/index.js +1 -1
- package/editor/icons.d.ts +1 -0
- package/editor/index.js +2 -1
- package/package.json +1 -1
- package/styles/ui-badge.css +35 -0
- package/styles/ui-list-item.css +11 -1
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +5 -2
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiListItem.d.ts +2 -0
- package/vanilla/UiListItem.js +5 -1
- package/vue/UiBadge.d.ts +3 -3
- package/vue/UiBadge.vue +39 -6
- package/vue/UiIcon.vue +4 -0
- package/vue/UiListItem.d.ts +18 -0
- package/vue/UiListItem.vue +53 -2
- package/vue/chunks/UiBadge.js +10 -5
- package/vue/chunks/UiIcon.js +8 -1
- package/vue/chunks/UiListItem.js +48 -4
- package/vue/components.css +94 -55
package/vanilla/UiListItem.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export interface UiListItemElement extends HTMLLIElement {
|
|
|
7
7
|
}
|
|
8
8
|
export interface UiListItemProps {
|
|
9
9
|
current?: boolean | null;
|
|
10
|
+
highlighted?: boolean | null;
|
|
10
11
|
variant?: "row" | "card" | null;
|
|
12
|
+
wrap?: boolean | null;
|
|
11
13
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
12
14
|
children?: readonly (string | Node)[];
|
|
13
15
|
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
package/vanilla/UiListItem.js
CHANGED
|
@@ -6,7 +6,9 @@ export function createUiListItem(options = {}) {
|
|
|
6
6
|
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
7
7
|
const projected = [];
|
|
8
8
|
const prop0 = componentProps["current"] === undefined ? false : componentProps["current"];
|
|
9
|
-
const prop1 = componentProps["
|
|
9
|
+
const prop1 = componentProps["highlighted"] === undefined ? false : componentProps["highlighted"];
|
|
10
|
+
const prop2 = componentProps["variant"] === undefined ? "row" : componentProps["variant"];
|
|
11
|
+
const prop3 = componentProps["wrap"] === undefined ? false : componentProps["wrap"];
|
|
10
12
|
const element = document.createElement("li");
|
|
11
13
|
for (const [name, value] of Object.entries(attributes)) {
|
|
12
14
|
if (value === null || value === undefined || value === false) continue;
|
|
@@ -69,7 +71,9 @@ export function createUiListItem(options = {}) {
|
|
|
69
71
|
element.append(element4);
|
|
70
72
|
manageGeneratedProps(element, [
|
|
71
73
|
{ name: "current", attribute: "data-current", value: componentProps["current"], default: false, type: "boolean", required: false },
|
|
74
|
+
{ name: "highlighted", attribute: "data-highlighted", value: componentProps["highlighted"], default: false, type: "boolean", required: false },
|
|
72
75
|
{ name: "variant", attribute: "data-variant", value: componentProps["variant"], default: "row", type: ["row","card"], required: false },
|
|
76
|
+
{ name: "wrap", attribute: "data-wrap", value: componentProps["wrap"], default: false, type: "boolean", required: false },
|
|
73
77
|
], (name, value) => {
|
|
74
78
|
if (name === "current") {
|
|
75
79
|
if (value === null || value === undefined) element.removeAttribute("aria-current");
|
package/vue/UiBadge.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
7
|
shape: {
|
|
8
|
-
type: PropType<"pill" | "tag" | null>;
|
|
8
|
+
type: PropType<"pill" | "tag" | "dot" | null>;
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
11
|
size: {
|
|
@@ -22,7 +22,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
22
22
|
};
|
|
23
23
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
24
|
shape: {
|
|
25
|
-
type: PropType<"pill" | "tag" | null>;
|
|
25
|
+
type: PropType<"pill" | "tag" | "dot" | null>;
|
|
26
26
|
default: string;
|
|
27
27
|
};
|
|
28
28
|
size: {
|
|
@@ -38,7 +38,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
38
38
|
default: string;
|
|
39
39
|
};
|
|
40
40
|
}>> & Readonly<{}>, {
|
|
41
|
-
shape: "tag" | "pill" | null;
|
|
41
|
+
shape: "dot" | "tag" | "pill" | null;
|
|
42
42
|
size: "xs" | "md" | null;
|
|
43
43
|
tone: "info" | "neutral" | "accent" | "success" | "warning" | "danger" | null;
|
|
44
44
|
variant: "solid" | "subtle" | "outline" | null;
|
package/vue/UiBadge.vue
CHANGED
|
@@ -13,8 +13,8 @@ const propValidityContract = {
|
|
|
13
13
|
required: false,
|
|
14
14
|
target: { attribute: 'shape' },
|
|
15
15
|
description:
|
|
16
|
-
'Silhouette. pill is rounded at both ends; tag is a label
|
|
17
|
-
values: ['pill', 'tag'],
|
|
16
|
+
'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.',
|
|
17
|
+
values: ['pill', 'tag', 'dot'],
|
|
18
18
|
default: 'pill',
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
@@ -47,7 +47,7 @@ const propValidityContract = {
|
|
|
47
47
|
},
|
|
48
48
|
} as const
|
|
49
49
|
const props = defineProps({
|
|
50
|
-
shape: { type: null as unknown as PropType<'pill' | 'tag' | null>, default: 'pill' },
|
|
50
|
+
shape: { type: null as unknown as PropType<'pill' | 'tag' | 'dot' | null>, default: 'pill' },
|
|
51
51
|
size: { type: null as unknown as PropType<'xs' | 'md' | null>, default: 'md' },
|
|
52
52
|
tone: {
|
|
53
53
|
type: null as unknown as PropType<
|
|
@@ -67,13 +67,13 @@ const acceptedProps: Record<string, unknown> = {
|
|
|
67
67
|
variant: 'subtle',
|
|
68
68
|
}
|
|
69
69
|
const checkedProps = computed(() => ({
|
|
70
|
-
shape: checkedProp<'pill' | 'tag'>(
|
|
70
|
+
shape: checkedProp<'pill' | 'tag' | 'dot'>(
|
|
71
71
|
props['shape'],
|
|
72
72
|
{ kind: 'terminal', name: 'keyword' },
|
|
73
73
|
false,
|
|
74
74
|
'shape',
|
|
75
75
|
acceptedProps,
|
|
76
|
-
) as 'pill' | 'tag',
|
|
76
|
+
) as 'pill' | 'tag' | 'dot',
|
|
77
77
|
size: checkedProp<'xs' | 'md'>(
|
|
78
78
|
props['size'],
|
|
79
79
|
{ kind: 'terminal', name: 'keyword' },
|
|
@@ -174,7 +174,7 @@ const hostState = computed(() =>
|
|
|
174
174
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
175
175
|
:data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
|
|
176
176
|
:data-ui-badge-state="hostState || undefined"
|
|
177
|
-
><slot /></span>
|
|
177
|
+
><span class="label"><slot /></span></span>
|
|
178
178
|
</template>
|
|
179
179
|
|
|
180
180
|
<style scoped>
|
|
@@ -183,6 +183,10 @@ const hostState = computed(() =>
|
|
|
183
183
|
syntax: "*";
|
|
184
184
|
inherits: false;
|
|
185
185
|
}
|
|
186
|
+
@property --ui-badge-dot-size {
|
|
187
|
+
syntax: "*";
|
|
188
|
+
inherits: false;
|
|
189
|
+
}
|
|
186
190
|
@property --ui-badge-color {
|
|
187
191
|
syntax: "*";
|
|
188
192
|
inherits: false;
|
|
@@ -390,6 +394,29 @@ const hostState = computed(() =>
|
|
|
390
394
|
--_badge-text: var(--ui-info-subtle-text, var(--ui-info-solid));
|
|
391
395
|
}
|
|
392
396
|
|
|
397
|
+
/* A dot uses the badge's tone recipe; only its silhouette and visible label change. */
|
|
398
|
+
[data-component~="ui-badge"][data-ui-badge-state~="shape=dot"] {
|
|
399
|
+
position: relative;
|
|
400
|
+
box-sizing: border-box;
|
|
401
|
+
flex: none;
|
|
402
|
+
inline-size: var(--ui-badge-dot-size, var(--ui-space-2));
|
|
403
|
+
block-size: var(--ui-badge-dot-size, var(--ui-space-2));
|
|
404
|
+
min-inline-size: var(--ui-badge-dot-size, var(--ui-space-2));
|
|
405
|
+
min-block-size: var(--ui-badge-dot-size, var(--ui-space-2));
|
|
406
|
+
padding: 0;
|
|
407
|
+
border-radius: var(--ui-radius-round);
|
|
408
|
+
text-box-trim: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
[data-component~="ui-badge"][data-ui-badge-state~="shape=dot"] .label {
|
|
412
|
+
position: absolute;
|
|
413
|
+
inline-size: 1px;
|
|
414
|
+
block-size: 1px;
|
|
415
|
+
overflow: hidden;
|
|
416
|
+
clip-path: inset(50%);
|
|
417
|
+
white-space: nowrap;
|
|
418
|
+
}
|
|
419
|
+
|
|
393
420
|
/* The clipped point needs an inset surface over an outer border-colour shape: a native border
|
|
394
421
|
has no diagonal edge to follow. Keep this edge for every tag variant. */
|
|
395
422
|
[data-component~="ui-badge"][data-ui-badge-state~="shape=tag"] {
|
|
@@ -439,6 +466,12 @@ const hostState = computed(() =>
|
|
|
439
466
|
}
|
|
440
467
|
|
|
441
468
|
@media (forced-colors: active) {
|
|
469
|
+
[data-component~="ui-badge"][data-ui-badge-state~="shape=dot"] {
|
|
470
|
+
forced-color-adjust: none;
|
|
471
|
+
border-color: CanvasText;
|
|
472
|
+
background: CanvasText;
|
|
473
|
+
}
|
|
474
|
+
|
|
442
475
|
[data-component~="ui-badge"][data-ui-badge-state~="shape=tag"] {
|
|
443
476
|
forced-color-adjust: none;
|
|
444
477
|
background: CanvasText;
|
package/vue/UiIcon.vue
CHANGED
|
@@ -107,6 +107,10 @@ const shapes = cycleCheckedComputed(() =>
|
|
|
107
107
|
d: 'M21 19H7',
|
|
108
108
|
}],
|
|
109
109
|
'arrow-left': [{ tag: 'path', d: 'm12 19-7-7 7-7' }, { tag: 'path', d: 'M19 12H5' }],
|
|
110
|
+
bell: [{ tag: 'path', d: 'M10.268 21a2 2 0 0 0 3.464 0' }, {
|
|
111
|
+
tag: 'path',
|
|
112
|
+
d: 'M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326',
|
|
113
|
+
}],
|
|
110
114
|
bold: [{
|
|
111
115
|
tag: 'path',
|
|
112
116
|
d: 'M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8',
|
package/vue/UiListItem.d.ts
CHANGED
|
@@ -14,22 +14,40 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
14
14
|
type: PropType<boolean | null>;
|
|
15
15
|
default: boolean;
|
|
16
16
|
};
|
|
17
|
+
highlighted: {
|
|
18
|
+
type: PropType<boolean | null>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
17
21
|
variant: {
|
|
18
22
|
type: PropType<"row" | "card" | null>;
|
|
19
23
|
default: string;
|
|
20
24
|
};
|
|
25
|
+
wrap: {
|
|
26
|
+
type: PropType<boolean | null>;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
21
29
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
30
|
current: {
|
|
23
31
|
type: PropType<boolean | null>;
|
|
24
32
|
default: boolean;
|
|
25
33
|
};
|
|
34
|
+
highlighted: {
|
|
35
|
+
type: PropType<boolean | null>;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
26
38
|
variant: {
|
|
27
39
|
type: PropType<"row" | "card" | null>;
|
|
28
40
|
default: string;
|
|
29
41
|
};
|
|
42
|
+
wrap: {
|
|
43
|
+
type: PropType<boolean | null>;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
30
46
|
}>> & Readonly<{}>, {
|
|
31
47
|
variant: "row" | "card" | null;
|
|
32
48
|
current: boolean | null;
|
|
49
|
+
wrap: boolean | null;
|
|
50
|
+
highlighted: boolean | null;
|
|
33
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
34
52
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
53
|
declare const _default: typeof __VLS_export;
|
package/vue/UiListItem.vue
CHANGED
|
@@ -16,6 +16,14 @@ const propValidityContract = {
|
|
|
16
16
|
'Marks the item as the current one, such as the site you are in: it takes the selected surface and aria-current="true", which assistive technology\n announces. Set it on one item at a time.',
|
|
17
17
|
default: false,
|
|
18
18
|
},
|
|
19
|
+
highlighted: {
|
|
20
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
21
|
+
required: false,
|
|
22
|
+
target: { attribute: 'highlighted' },
|
|
23
|
+
description:
|
|
24
|
+
'Gives an item a quiet accent wash without changing its text or announcing selection. Several items may be highlighted, such as new messages. Describe the\n reason in the item\'s text; use current only for the current destination.',
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
19
27
|
variant: {
|
|
20
28
|
type: { kind: 'terminal', name: 'keyword' },
|
|
21
29
|
required: false,
|
|
@@ -25,13 +33,28 @@ const propValidityContract = {
|
|
|
25
33
|
values: ['row', 'card'],
|
|
26
34
|
default: 'row',
|
|
27
35
|
},
|
|
36
|
+
wrap: {
|
|
37
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
38
|
+
required: false,
|
|
39
|
+
target: { attribute: 'wrap' },
|
|
40
|
+
description:
|
|
41
|
+
'Lets the title and description wrap so explanatory text stays readable on narrow screens. Omit it for the default equal-height, one-line rows.',
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
28
44
|
},
|
|
29
45
|
} as const
|
|
30
46
|
const props = defineProps({
|
|
31
47
|
current: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
48
|
+
highlighted: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
32
49
|
variant: { type: null as unknown as PropType<'row' | 'card' | null>, default: 'row' },
|
|
50
|
+
wrap: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
33
51
|
})
|
|
34
|
-
const acceptedProps: Record<string, unknown> = {
|
|
52
|
+
const acceptedProps: Record<string, unknown> = {
|
|
53
|
+
current: false,
|
|
54
|
+
highlighted: false,
|
|
55
|
+
variant: 'row',
|
|
56
|
+
wrap: false,
|
|
57
|
+
}
|
|
35
58
|
const checkedProps = computed(() => ({
|
|
36
59
|
current: checkedProp<boolean>(
|
|
37
60
|
props['current'],
|
|
@@ -40,6 +63,13 @@ const checkedProps = computed(() => ({
|
|
|
40
63
|
'current',
|
|
41
64
|
acceptedProps,
|
|
42
65
|
) as boolean,
|
|
66
|
+
highlighted: checkedProp<boolean>(
|
|
67
|
+
props['highlighted'],
|
|
68
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
69
|
+
false,
|
|
70
|
+
'highlighted',
|
|
71
|
+
acceptedProps,
|
|
72
|
+
) as boolean,
|
|
43
73
|
variant: checkedProp<'row' | 'card'>(
|
|
44
74
|
props['variant'],
|
|
45
75
|
{ kind: 'terminal', name: 'keyword' },
|
|
@@ -47,6 +77,13 @@ const checkedProps = computed(() => ({
|
|
|
47
77
|
'variant',
|
|
48
78
|
acceptedProps,
|
|
49
79
|
) as 'row' | 'card',
|
|
80
|
+
wrap: checkedProp<boolean>(
|
|
81
|
+
props['wrap'],
|
|
82
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
83
|
+
false,
|
|
84
|
+
'wrap',
|
|
85
|
+
acceptedProps,
|
|
86
|
+
) as boolean,
|
|
50
87
|
}))
|
|
51
88
|
void checkedProps.value
|
|
52
89
|
watchSyncEffect(() => {
|
|
@@ -109,7 +146,9 @@ const hostState = computed(() =>
|
|
|
109
146
|
checkedProps.value.variant && 'variant',
|
|
110
147
|
checkedProps.value.variant != null
|
|
111
148
|
&& `variant=${encodeURIComponent(checkedProps.value.variant)}`,
|
|
149
|
+
checkedProps.value.highlighted && 'highlighted',
|
|
112
150
|
checkedProps.value.current && 'current',
|
|
151
|
+
checkedProps.value.wrap && 'wrap',
|
|
113
152
|
].filter(Boolean).join(' ')
|
|
114
153
|
)
|
|
115
154
|
</script>
|
|
@@ -121,7 +160,9 @@ const hostState = computed(() =>
|
|
|
121
160
|
:aria-current="checkedProps.current ?? undefined"
|
|
122
161
|
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
123
162
|
:data-current="reflectedProp('current', 'current', checkedProps.current, undefined, false)"
|
|
163
|
+
:data-highlighted="reflectedProp('highlighted', 'highlighted', checkedProps.highlighted, undefined, false)"
|
|
124
164
|
:data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
|
|
165
|
+
:data-wrap="reflectedProp('wrap', 'wrap', checkedProps.wrap, undefined, false)"
|
|
125
166
|
:data-ui-list-item-state="hostState || undefined"
|
|
126
167
|
>
|
|
127
168
|
<span class="leading"><slot name="leading" /></span>
|
|
@@ -202,6 +243,10 @@ const hostState = computed(() =>
|
|
|
202
243
|
border-color: var(--ui-border-strong);
|
|
203
244
|
}
|
|
204
245
|
|
|
246
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="highlighted"] {
|
|
247
|
+
background: var(--ui-selection-surface);
|
|
248
|
+
}
|
|
249
|
+
|
|
205
250
|
[data-component~="ui-list-item"][data-ui-list-item-state~="current"] {
|
|
206
251
|
background: var(--ui-selection-surface);
|
|
207
252
|
color: var(--ui-selection-text);
|
|
@@ -253,6 +298,12 @@ const hostState = computed(() =>
|
|
|
253
298
|
white-space: nowrap;
|
|
254
299
|
}
|
|
255
300
|
|
|
301
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="wrap"] .title,
|
|
302
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="wrap"] .description {
|
|
303
|
+
white-space: normal;
|
|
304
|
+
overflow-wrap: anywhere;
|
|
305
|
+
}
|
|
306
|
+
|
|
256
307
|
.title {
|
|
257
308
|
font-size: var(--ui-font-size-md);
|
|
258
309
|
font-weight: var(--_ui-list-item-title-weight, var(--ui-font-medium));
|
|
@@ -294,7 +345,7 @@ const hostState = computed(() =>
|
|
|
294
345
|
outline: var(--ui-focus-width) solid Highlight;
|
|
295
346
|
outline-offset: calc(-1 * var(--ui-focus-width));
|
|
296
347
|
}
|
|
297
|
-
[data-component~="ui-list-item"][data-ui-list-item-state~="current"]:not(:has(a:focus-visible)) {
|
|
348
|
+
:is([data-component~="ui-list-item"][data-ui-list-item-state~="current"], [data-component~="ui-list-item"][data-ui-list-item-state~="highlighted"]):not(:has(a:focus-visible)) {
|
|
298
349
|
outline: var(--ui-border-width) solid Highlight;
|
|
299
350
|
outline-offset: calc(-1 * var(--ui-border-width));
|
|
300
351
|
}
|
package/vue/chunks/UiBadge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
2
|
import { i as vPropValidity, t as checkedProp } from "./props.js";
|
|
3
|
-
import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
3
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiBadge.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
|
6
6
|
"data-shape",
|
|
@@ -9,6 +9,7 @@ var _hoisted_1 = [
|
|
|
9
9
|
"data-variant",
|
|
10
10
|
"data-ui-badge-state"
|
|
11
11
|
];
|
|
12
|
+
var _hoisted_2 = { class: "label" };
|
|
12
13
|
//#endregion
|
|
13
14
|
//#region .build/vue/UiBadge.vue
|
|
14
15
|
var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -41,8 +42,12 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
41
42
|
},
|
|
42
43
|
required: false,
|
|
43
44
|
target: { attribute: "shape" },
|
|
44
|
-
description: "Silhouette. pill is rounded at both ends; tag is a label
|
|
45
|
-
values: [
|
|
45
|
+
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.",
|
|
46
|
+
values: [
|
|
47
|
+
"pill",
|
|
48
|
+
"tag",
|
|
49
|
+
"dot"
|
|
50
|
+
],
|
|
46
51
|
default: "pill"
|
|
47
52
|
},
|
|
48
53
|
size: {
|
|
@@ -157,12 +162,12 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
157
162
|
"data-tone": reflectedProp("tone", "tone", checkedProps.value.tone, void 0, false),
|
|
158
163
|
"data-variant": reflectedProp("variant", "variant", checkedProps.value.variant, void 0, false),
|
|
159
164
|
"data-ui-badge-state": hostState.value || void 0
|
|
160
|
-
}), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
165
|
+
}), [createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
161
166
|
contract: propValidityContract,
|
|
162
167
|
values: { ...props }
|
|
163
168
|
}]]);
|
|
164
169
|
};
|
|
165
170
|
}
|
|
166
|
-
}), [["__scopeId", "data-v-
|
|
171
|
+
}), [["__scopeId", "data-v-84736a7c"]]);
|
|
167
172
|
//#endregion
|
|
168
173
|
export { UiBadge_default as t };
|
package/vue/chunks/UiIcon.js
CHANGED
|
@@ -148,6 +148,13 @@ var UiIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
148
148
|
tag: "path",
|
|
149
149
|
d: "M19 12H5"
|
|
150
150
|
}],
|
|
151
|
+
bell: [{
|
|
152
|
+
tag: "path",
|
|
153
|
+
d: "M10.268 21a2 2 0 0 0 3.464 0"
|
|
154
|
+
}, {
|
|
155
|
+
tag: "path",
|
|
156
|
+
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"
|
|
157
|
+
}],
|
|
151
158
|
bold: [{
|
|
152
159
|
tag: "path",
|
|
153
160
|
d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"
|
|
@@ -1214,6 +1221,6 @@ var UiIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1214
1221
|
}]]);
|
|
1215
1222
|
};
|
|
1216
1223
|
}
|
|
1217
|
-
}), [["__scopeId", "data-v-
|
|
1224
|
+
}), [["__scopeId", "data-v-47b12d9e"]]);
|
|
1218
1225
|
//#endregion
|
|
1219
1226
|
export { UiIcon_default as t };
|
package/vue/chunks/UiListItem.js
CHANGED
|
@@ -5,7 +5,9 @@ import { computed, createElementBlock, createElementVNode, defineComponent, getC
|
|
|
5
5
|
var _hoisted_1 = [
|
|
6
6
|
"aria-current",
|
|
7
7
|
"data-current",
|
|
8
|
+
"data-highlighted",
|
|
8
9
|
"data-variant",
|
|
10
|
+
"data-wrap",
|
|
9
11
|
"data-ui-list-item-state"
|
|
10
12
|
];
|
|
11
13
|
var _hoisted_2 = { class: "leading" };
|
|
@@ -23,9 +25,17 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
23
25
|
type: null,
|
|
24
26
|
default: false
|
|
25
27
|
},
|
|
28
|
+
highlighted: {
|
|
29
|
+
type: null,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
26
32
|
variant: {
|
|
27
33
|
type: null,
|
|
28
34
|
default: "row"
|
|
35
|
+
},
|
|
36
|
+
wrap: {
|
|
37
|
+
type: null,
|
|
38
|
+
default: false
|
|
29
39
|
}
|
|
30
40
|
},
|
|
31
41
|
setup(__props) {
|
|
@@ -40,6 +50,16 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
40
50
|
description: "Marks the item as the current one, such as the site you are in: it takes the selected surface and aria-current=\"true\", which assistive technology\n announces. Set it on one item at a time.",
|
|
41
51
|
default: false
|
|
42
52
|
},
|
|
53
|
+
highlighted: {
|
|
54
|
+
type: {
|
|
55
|
+
kind: "terminal",
|
|
56
|
+
name: "boolean"
|
|
57
|
+
},
|
|
58
|
+
required: false,
|
|
59
|
+
target: { attribute: "highlighted" },
|
|
60
|
+
description: "Gives an item a quiet accent wash without changing its text or announcing selection. Several items may be highlighted, such as new messages. Describe the\n reason in the item's text; use current only for the current destination.",
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
43
63
|
variant: {
|
|
44
64
|
type: {
|
|
45
65
|
kind: "terminal",
|
|
@@ -50,22 +70,42 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
50
70
|
description: "How the item is drawn. A row is flat and takes a hover surface when it is a link, for items read down a list. A card sits on a raised, bordered surface,\n for items set in a grid (a List with layout=\"grid\"). Both have the same parts: leading, title, description, and trailing.",
|
|
51
71
|
values: ["row", "card"],
|
|
52
72
|
default: "row"
|
|
73
|
+
},
|
|
74
|
+
wrap: {
|
|
75
|
+
type: {
|
|
76
|
+
kind: "terminal",
|
|
77
|
+
name: "boolean"
|
|
78
|
+
},
|
|
79
|
+
required: false,
|
|
80
|
+
target: { attribute: "wrap" },
|
|
81
|
+
description: "Lets the title and description wrap so explanatory text stays readable on narrow screens. Omit it for the default equal-height, one-line rows.",
|
|
82
|
+
default: false
|
|
53
83
|
}
|
|
54
84
|
} };
|
|
55
85
|
const props = __props;
|
|
56
86
|
const acceptedProps = {
|
|
57
87
|
current: false,
|
|
58
|
-
|
|
88
|
+
highlighted: false,
|
|
89
|
+
variant: "row",
|
|
90
|
+
wrap: false
|
|
59
91
|
};
|
|
60
92
|
const checkedProps = computed(() => ({
|
|
61
93
|
current: checkedProp(props["current"], {
|
|
62
94
|
kind: "terminal",
|
|
63
95
|
name: "boolean"
|
|
64
96
|
}, false, "current", acceptedProps),
|
|
97
|
+
highlighted: checkedProp(props["highlighted"], {
|
|
98
|
+
kind: "terminal",
|
|
99
|
+
name: "boolean"
|
|
100
|
+
}, false, "highlighted", acceptedProps),
|
|
65
101
|
variant: checkedProp(props["variant"], {
|
|
66
102
|
kind: "terminal",
|
|
67
103
|
name: "keyword"
|
|
68
|
-
}, false, "variant", acceptedProps)
|
|
104
|
+
}, false, "variant", acceptedProps),
|
|
105
|
+
wrap: checkedProp(props["wrap"], {
|
|
106
|
+
kind: "terminal",
|
|
107
|
+
name: "boolean"
|
|
108
|
+
}, false, "wrap", acceptedProps)
|
|
69
109
|
}));
|
|
70
110
|
checkedProps.value;
|
|
71
111
|
watchSyncEffect(() => {
|
|
@@ -95,13 +135,17 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
95
135
|
const hostState = computed(() => [
|
|
96
136
|
checkedProps.value.variant && "variant",
|
|
97
137
|
checkedProps.value.variant != null && `variant=${encodeURIComponent(checkedProps.value.variant)}`,
|
|
98
|
-
checkedProps.value.
|
|
138
|
+
checkedProps.value.highlighted && "highlighted",
|
|
139
|
+
checkedProps.value.current && "current",
|
|
140
|
+
checkedProps.value.wrap && "wrap"
|
|
99
141
|
].filter(Boolean).join(" "));
|
|
100
142
|
return (_ctx, _cache) => {
|
|
101
143
|
return withDirectives((openBlock(), createElementBlock("li", mergeProps({ "data-component": "ui-list-item" }, nativeAttrs(_ctx.$attrs), {
|
|
102
144
|
"aria-current": checkedProps.value.current ?? void 0,
|
|
103
145
|
"data-current": reflectedProp("current", "current", checkedProps.value.current, void 0, false),
|
|
146
|
+
"data-highlighted": reflectedProp("highlighted", "highlighted", checkedProps.value.highlighted, void 0, false),
|
|
104
147
|
"data-variant": reflectedProp("variant", "variant", checkedProps.value.variant, void 0, false),
|
|
148
|
+
"data-wrap": reflectedProp("wrap", "wrap", checkedProps.value.wrap, void 0, false),
|
|
105
149
|
"data-ui-list-item-state": hostState.value || void 0
|
|
106
150
|
}), [
|
|
107
151
|
createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "leading")]),
|
|
@@ -113,6 +157,6 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
113
157
|
}]]);
|
|
114
158
|
};
|
|
115
159
|
}
|
|
116
|
-
}), [["__scopeId", "data-v-
|
|
160
|
+
}), [["__scopeId", "data-v-b8e3f0cd"]]);
|
|
117
161
|
//#endregion
|
|
118
162
|
export { UiListItem_default as t };
|