@una-ui/nuxt 0.49.3 → 0.50.1

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "configKey": "una",
4
- "version": "0.49.3",
4
+ "version": "0.50.1",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -8,7 +8,7 @@ import 'unocss';
8
8
  import 'unocss-preset-animations';
9
9
 
10
10
  const name = "@una-ui/nuxt";
11
- const version = "0.49.3";
11
+ const version = "0.50.1";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -3,11 +3,10 @@ import type { NAvatarGroupProps } from '../../types'
3
3
  import { reactiveOmit } from '@vueuse/core'
4
4
  import { Primitive } from 'reka-ui'
5
5
  import { computed, h } from 'vue'
6
- import { cn } from '../../utils'
6
+ import { cn, omitProps } from '../../utils'
7
7
  import Avatar from './avatar/Avatar.vue'
8
8
 
9
9
  const props = withDefaults(defineProps<NAvatarGroupProps>(), {
10
- max: 3,
11
10
  as: 'div',
12
11
  })
13
12
 
@@ -64,12 +63,12 @@ const displayAvatars = computed(() => {
64
63
 
65
64
  if (hiddenCount.value > 0) {
66
65
  const avatarProps = children.value.length > 0
67
- ? reactiveOmit(children.value[0].props || {}, ['src', 'alt', 'label', 'icon'])
66
+ ? omitProps(children.value[0].props || {}, ['src', 'alt', 'label', 'icon'])
68
67
  : {}
69
68
 
70
69
  result.unshift(
71
70
  h(Avatar, {
72
- label: `+${hiddenCount.value}`,
71
+ label: props.overflowLabel || `+${hiddenCount.value}`,
73
72
  class: cn(
74
73
  props.una?.avatarGroupCount,
75
74
  ),
@@ -89,12 +88,12 @@ const displayAvatars = computed(() => {
89
88
  return result
90
89
  })
91
90
 
92
- const rootProps = reactiveOmit(props, ['max', 'as', 'asChild'])
91
+ const rootProps = reactiveOmit(props, ['max', 'as', 'asChild', 'overflowLabel'])
93
92
  </script>
94
93
 
95
94
  <template>
96
95
  <Primitive
97
- :as="as"
96
+ :as
98
97
  :size
99
98
  :class="cn(
100
99
  'avatar-group',
@@ -9,9 +9,14 @@ export interface NAvatarGroupProps extends Omit<NAvatarProps, 'src' | 'alt' | 'l
9
9
  /**
10
10
  * Set the maximum number of avatars to show.
11
11
  *
12
- * @default 3
13
12
  */
14
- max: number;
13
+ max?: number;
14
+ /**
15
+ * Override the default overflow label.
16
+ *
17
+ * @default +${max}
18
+ */
19
+ overflowLabel?: string;
15
20
  /**
16
21
  * `Una
17
22
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "type": "module",
4
- "version": "0.49.3",
4
+ "version": "0.50.1",
5
5
  "description": "Nuxt module for @una-ui",
6
6
  "author": "Phojie Rengel <phojrengel@gmail.com>",
7
7
  "license": "MIT",
@@ -59,8 +59,8 @@
59
59
  "typescript": "5.6.3",
60
60
  "unocss": "^66.0.0",
61
61
  "unocss-preset-animations": "^1.1.1",
62
- "@una-ui/extractor-vue-script": "^0.49.3",
63
- "@una-ui/preset": "^0.49.3"
62
+ "@una-ui/extractor-vue-script": "^0.50.1",
63
+ "@una-ui/preset": "^0.50.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@iconify-json/lucide": "^1.2.34",