nuance-ui 0.1.30 → 0.1.32
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/dist/module.json
CHANGED
|
@@ -23,7 +23,7 @@ export interface BreadcrumbsProps extends BoxProps {
|
|
|
23
23
|
declare var __VLS_16: string, __VLS_17: {
|
|
24
24
|
item: BreadcrumbsItem;
|
|
25
25
|
ix: number;
|
|
26
|
-
active:
|
|
26
|
+
active: boolean;
|
|
27
27
|
}, __VLS_32: {};
|
|
28
28
|
type __VLS_Slots = {} & {
|
|
29
29
|
[K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any;
|
|
@@ -25,11 +25,12 @@ const {
|
|
|
25
25
|
const style = computed(() => ({
|
|
26
26
|
"--bc-spacing": getSpacing(spacing)
|
|
27
27
|
}));
|
|
28
|
+
const breadcrumbs = computed(() => unref(items) ?? []);
|
|
28
29
|
</script>
|
|
29
30
|
|
|
30
31
|
<template>
|
|
31
32
|
<Box :is :mod :style :class='$style.root' aria-label='breadcrumb'>
|
|
32
|
-
<template v-for='(item, ix) in
|
|
33
|
+
<template v-for='(item, ix) in breadcrumbs' :key='item.to'>
|
|
33
34
|
<Text
|
|
34
35
|
is='li'
|
|
35
36
|
:c='color'
|
|
@@ -38,18 +39,18 @@ const style = computed(() => ({
|
|
|
38
39
|
role='presentation'
|
|
39
40
|
aria-hidden='true'
|
|
40
41
|
>
|
|
41
|
-
<NuxtLink v-
|
|
42
|
+
<NuxtLink v-bind='pickLinkProps(item).link' custom>
|
|
42
43
|
<slot
|
|
43
44
|
:name='item.slot ?? "item"'
|
|
44
45
|
:item='item'
|
|
45
46
|
:ix='ix'
|
|
46
|
-
:active='item
|
|
47
|
+
:active='item.active ?? ix === breadcrumbs.length - 1'
|
|
47
48
|
>
|
|
48
49
|
<Link
|
|
49
50
|
v-bind='pickLinkProps(item).link'
|
|
50
51
|
inherit
|
|
51
52
|
:class='$style.item'
|
|
52
|
-
:mod='{ active: item
|
|
53
|
+
:mod='{ active: item.active ?? ix === breadcrumbs.length - 1 }'
|
|
53
54
|
>
|
|
54
55
|
<Icon v-if='item?.icon' :name='item.icon' :class='$style.icon' />
|
|
55
56
|
<Text is='span' inherit truncate>
|
|
@@ -59,7 +60,7 @@ const style = computed(() => ({
|
|
|
59
60
|
</slot>
|
|
60
61
|
</NuxtLink>
|
|
61
62
|
</Text>
|
|
62
|
-
<li v-if='ix <
|
|
63
|
+
<li v-if='ix < breadcrumbs.length - 1' role='presentation' aria-hidden='true' :class='$style.separator'>
|
|
63
64
|
<slot name='separator'>
|
|
64
65
|
<Icon :name='separator' />
|
|
65
66
|
</slot>
|
|
@@ -23,7 +23,7 @@ export interface BreadcrumbsProps extends BoxProps {
|
|
|
23
23
|
declare var __VLS_16: string, __VLS_17: {
|
|
24
24
|
item: BreadcrumbsItem;
|
|
25
25
|
ix: number;
|
|
26
|
-
active:
|
|
26
|
+
active: boolean;
|
|
27
27
|
}, __VLS_32: {};
|
|
28
28
|
type __VLS_Slots = {} & {
|
|
29
29
|
[K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any;
|