@nexxtmove/ui 1.2.1 → 1.2.2
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/components/Avatar/Avatar.vue.d.ts +1 -0
- package/dist/index.js +468 -428
- package/dist/nuxt.js +993 -922
- package/package.json +31 -31
- package/src/components/Avatar/Avatar.vue +29 -3
- package/src/components/Combobox/Combobox.vue +2 -2
- package/src/components/DropdownButton/DropdownButton.vue +2 -2
- package/src/components/EnergyLabel/EnergyLabel.vue +1 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexxtmove/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"tailwind"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@floating-ui/vue": "^
|
|
24
|
-
"@number-flow/vue": "^0.5.
|
|
25
|
-
"@vueuse/core": "^14.
|
|
26
|
-
"date-fns": "^4.
|
|
23
|
+
"@floating-ui/vue": "^2.0.1",
|
|
24
|
+
"@number-flow/vue": "^0.5.2",
|
|
25
|
+
"@vueuse/core": "^14.4.0",
|
|
26
|
+
"date-fns": "^4.4.0",
|
|
27
27
|
"date-fns-tz": "^3.2.0",
|
|
28
|
-
"reka-ui": "^2.
|
|
28
|
+
"reka-ui": "^2.10.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"tailwindcss": "^4.0.0",
|
|
@@ -34,43 +34,43 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@awesome.me/kit-37b149f3ef": "^1.0.8",
|
|
36
36
|
"@eslint/js": "^10.0.1",
|
|
37
|
-
"@nuxt/kit": "^4.
|
|
38
|
-
"@nuxt/schema": "^4.
|
|
39
|
-
"@storybook/addon-a11y": "^10.5.
|
|
37
|
+
"@nuxt/kit": "^4.5.2",
|
|
38
|
+
"@nuxt/schema": "^4.5.2",
|
|
39
|
+
"@storybook/addon-a11y": "^10.5.7",
|
|
40
40
|
"@storybook/addon-designs": "^11.1.4",
|
|
41
|
-
"@storybook/addon-docs": "^10.5.
|
|
42
|
-
"@storybook/addon-vitest": "^10.5.
|
|
43
|
-
"@storybook/builder-vite": "^10.5.
|
|
44
|
-
"@storybook/vue3-vite": "^10.5.
|
|
45
|
-
"@tailwindcss/vite": "^4.3.
|
|
46
|
-
"@types/node": "^26.0
|
|
47
|
-
"@types/react": "^19.2.
|
|
48
|
-
"@types/react-dom": "^19.2.
|
|
49
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
50
|
-
"@vitest/coverage-v8": "^4.1.
|
|
41
|
+
"@storybook/addon-docs": "^10.5.7",
|
|
42
|
+
"@storybook/addon-vitest": "^10.5.7",
|
|
43
|
+
"@storybook/builder-vite": "^10.5.7",
|
|
44
|
+
"@storybook/vue3-vite": "^10.5.7",
|
|
45
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
46
|
+
"@types/node": "^26.2.0",
|
|
47
|
+
"@types/react": "^19.2.18",
|
|
48
|
+
"@types/react-dom": "^19.2.4",
|
|
49
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
50
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
51
51
|
"@vue/eslint-config-typescript": "^14.9.0",
|
|
52
52
|
"@vue/test-utils": "^2.4.11",
|
|
53
53
|
"@vue/tsconfig": "^0.9.1",
|
|
54
54
|
"consola": "^3.4.2",
|
|
55
|
-
"eslint": "^10.
|
|
55
|
+
"eslint": "^10.8.1",
|
|
56
56
|
"eslint-config-prettier": "^10.1.8",
|
|
57
57
|
"eslint-plugin-prettier": "^5.5.6",
|
|
58
|
-
"eslint-plugin-storybook": "10.5.
|
|
59
|
-
"eslint-plugin-vue": "^10.
|
|
58
|
+
"eslint-plugin-storybook": "10.5.7",
|
|
59
|
+
"eslint-plugin-vue": "^10.10.0",
|
|
60
60
|
"flag-icons": "^7.5.0",
|
|
61
|
-
"globals": "^17.
|
|
61
|
+
"globals": "^17.11.0",
|
|
62
62
|
"jsdom": "^29.1.1",
|
|
63
|
-
"prettier": "^3.
|
|
64
|
-
"prettier-plugin-tailwindcss": "^0.8.
|
|
65
|
-
"react": "^19.2.
|
|
66
|
-
"react-dom": "^19.2.
|
|
63
|
+
"prettier": "^3.9.6",
|
|
64
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
65
|
+
"react": "^19.2.8",
|
|
66
|
+
"react-dom": "^19.2.8",
|
|
67
67
|
"remark-frontmatter": "^5.0.0",
|
|
68
|
-
"storybook": "^10.5.
|
|
69
|
-
"typescript-eslint": "^8.
|
|
70
|
-
"vite": "^8.1
|
|
68
|
+
"storybook": "^10.5.7",
|
|
69
|
+
"typescript-eslint": "^8.67.0",
|
|
70
|
+
"vite": "^8.2.1",
|
|
71
71
|
"vite-plugin-dts": "^5.0.3",
|
|
72
72
|
"vite-svg-loader": "^5.1.1",
|
|
73
|
-
"vitest": "^4.1.
|
|
73
|
+
"vitest": "^4.1.10"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": ">=22.18.0"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
2
|
+
import { computed, ref, watch } from 'vue'
|
|
3
3
|
import NexxtSquircle from '../Squircle/Squircle.vue'
|
|
4
4
|
|
|
5
5
|
interface NexxtAvatarProps {
|
|
6
6
|
name: string
|
|
7
|
+
src?: string
|
|
7
8
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
8
9
|
squircle?: boolean
|
|
9
10
|
}
|
|
@@ -17,6 +18,17 @@ const props = withDefaults(defineProps<NexxtAvatarProps>(), {
|
|
|
17
18
|
squircle: false,
|
|
18
19
|
})
|
|
19
20
|
|
|
21
|
+
const imageFailed = ref(false)
|
|
22
|
+
|
|
23
|
+
watch(
|
|
24
|
+
() => props.src,
|
|
25
|
+
() => {
|
|
26
|
+
imageFailed.value = false
|
|
27
|
+
},
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
const showImage = computed(() => Boolean(props.src) && !imageFailed.value)
|
|
31
|
+
|
|
20
32
|
const computedInitials = computed(() => {
|
|
21
33
|
const cleanName = props.name?.replace(/[^\p{L}\p{N}\s]/gu, '').trim()
|
|
22
34
|
if (!cleanName) return ''
|
|
@@ -54,7 +66,14 @@ const fontSizeClasses = {
|
|
|
54
66
|
class="flex h-full w-full items-center justify-center bg-cornflower-blue-50 font-semibold text-cornflower-blue-500"
|
|
55
67
|
:class="[fontSizeClasses[size]]"
|
|
56
68
|
>
|
|
57
|
-
|
|
69
|
+
<img
|
|
70
|
+
v-if="showImage"
|
|
71
|
+
:src="src"
|
|
72
|
+
:alt="name"
|
|
73
|
+
class="h-full w-full object-cover"
|
|
74
|
+
@error="imageFailed = true"
|
|
75
|
+
/>
|
|
76
|
+
<template v-else>{{ computedInitials }}</template>
|
|
58
77
|
</div>
|
|
59
78
|
</NexxtSquircle>
|
|
60
79
|
<div
|
|
@@ -65,6 +84,13 @@ const fontSizeClasses = {
|
|
|
65
84
|
fontSizeClasses[size],
|
|
66
85
|
]"
|
|
67
86
|
>
|
|
68
|
-
|
|
87
|
+
<img
|
|
88
|
+
v-if="showImage"
|
|
89
|
+
:src="src"
|
|
90
|
+
:alt="name"
|
|
91
|
+
class="h-full w-full object-cover"
|
|
92
|
+
@error="imageFailed = true"
|
|
93
|
+
/>
|
|
94
|
+
<template v-else>{{ computedInitials }}</template>
|
|
69
95
|
</div>
|
|
70
96
|
</template>
|
|
@@ -36,8 +36,8 @@ const selected = defineModel<(string | number)[]>({ default: [] })
|
|
|
36
36
|
|
|
37
37
|
const panelRef = ref<InstanceType<typeof ComboboxPanel> | null>(null)
|
|
38
38
|
|
|
39
|
-
const floatingPlacement = computed(
|
|
40
|
-
|
|
39
|
+
const floatingPlacement = computed((): Placement =>
|
|
40
|
+
placement === 'right' ? 'bottom-end' : 'bottom-start',
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
// showChips defaults to true (via withDefaults); singleSelect being true overrides to false
|
|
@@ -48,8 +48,8 @@ const emit = defineEmits<{
|
|
|
48
48
|
|
|
49
49
|
const panelRef = ref<InstanceType<typeof NexxtFloatingPanel> | null>(null)
|
|
50
50
|
|
|
51
|
-
const floatingPlacement = computed(
|
|
52
|
-
|
|
51
|
+
const floatingPlacement = computed((): Placement =>
|
|
52
|
+
placement === 'right' ? 'bottom-end' : 'bottom-start',
|
|
53
53
|
)
|
|
54
54
|
|
|
55
55
|
const flatItems = computed<NexxtDropdownButton[]>(() =>
|
|
@@ -2,17 +2,7 @@
|
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
|
|
4
4
|
export type EnergyLabelLetter =
|
|
5
|
-
| 'A
|
|
6
|
-
| 'A+++'
|
|
7
|
-
| 'A++'
|
|
8
|
-
| 'A+'
|
|
9
|
-
| 'A'
|
|
10
|
-
| 'B'
|
|
11
|
-
| 'C'
|
|
12
|
-
| 'D'
|
|
13
|
-
| 'E'
|
|
14
|
-
| 'F'
|
|
15
|
-
| 'G'
|
|
5
|
+
'A++++' | 'A+++' | 'A++' | 'A+' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G'
|
|
16
6
|
|
|
17
7
|
interface NexxtEnergyLabelProps {
|
|
18
8
|
label: EnergyLabelLetter | Lowercase<EnergyLabelLetter>
|