nuance-ui 0.1.30 → 0.1.31

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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^4.0.0"
6
6
  },
7
- "version": "0.1.30",
7
+ "version": "0.1.31",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -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: any;
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 unref(items)' :key='ix'>
33
+ <template v-for='(item, ix) in breadcrumbs' :key='ix'>
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-slot='{ isActive }' v-bind='pickLinkProps(item).link' custom>
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?.active ?? isActive'
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?.active ?? isActive }'
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 < unref(items).length - 1' role='presentation' aria-hidden='true' :class='$style.separator'>
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: any;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuance-ui",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "A UI Library for Modern Web Apps, powered by Vue.",
5
5
  "repository": {
6
6
  "type": "git",