@nexxtmove/ui 1.0.0 → 1.0.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/index.d.ts +121 -58
- package/dist/index.js +1179 -1113
- package/dist/nuxt.js +2 -0
- package/package.json +1 -1
- package/src/components/Announcement/Announcement.vue +32 -0
- package/src/components/Icon/Icon.vue +6 -2
- package/src/components/Icon/brandIconNames.ts +591 -0
- package/src/components/SidebarMenuItem/SidebarMenuItem.vue +57 -0
- package/src/components/SocialIcons/SocialIcons.vue +1 -1
- package/src/components/TimelineEvent/TimelineEvent.vue +1 -5
- package/src/components.json +2 -0
- package/src/index.ts +2 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import NexxtIcon from '../Icon/Icon.vue'
|
|
4
|
+
|
|
5
|
+
interface SidebarMenuItemProps {
|
|
6
|
+
icon: InstanceType<typeof NexxtIcon>['name']
|
|
7
|
+
selected?: boolean
|
|
8
|
+
notificationCount?: number
|
|
9
|
+
isCurentRoute?: boolean
|
|
10
|
+
variant?: 'default' | 'danger'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { variant = 'default' } = defineProps<SidebarMenuItemProps>()
|
|
14
|
+
const emit = defineEmits<{ click: [] }>()
|
|
15
|
+
|
|
16
|
+
const hoverClass = computed(() =>
|
|
17
|
+
variant === 'danger' ? 'hover:bg-brick-500' : 'hover:bg-cornflower-blue-300/40',
|
|
18
|
+
)
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<button
|
|
23
|
+
type="button"
|
|
24
|
+
class="flex h-11 w-full max-w-full cursor-pointer items-center text-white transition-colors duration-300 ease-in-out"
|
|
25
|
+
:class="[
|
|
26
|
+
hoverClass,
|
|
27
|
+
{ 'bg-cornflower-blue-300/40 shadow-[inset_4px_0_0_0_#fff]': isCurentRoute },
|
|
28
|
+
]"
|
|
29
|
+
:aria-current="isCurentRoute ? 'page' : undefined"
|
|
30
|
+
@click="emit('click')"
|
|
31
|
+
>
|
|
32
|
+
<div class="relative flex h-11 w-16 shrink-0 items-center justify-center text-lg">
|
|
33
|
+
<Transition
|
|
34
|
+
enter-active-class="transition duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.275)]"
|
|
35
|
+
enter-from-class="scale-0 opacity-0"
|
|
36
|
+
enter-to-class="scale-100 opacity-100"
|
|
37
|
+
leave-active-class="transition duration-200 ease-[cubic-bezier(0.6,-0.28,0.735,0.045)]"
|
|
38
|
+
leave-from-class="scale-100 opacity-100"
|
|
39
|
+
leave-to-class="scale-0 opacity-0"
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
v-if="notificationCount"
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
class="absolute top-1 left-2 flex h-4 min-w-4 items-center justify-center rounded-2-xl bg-red-500 p-1 text-[0.6rem]"
|
|
45
|
+
>{{ notificationCount }}</span
|
|
46
|
+
>
|
|
47
|
+
</Transition>
|
|
48
|
+
<NexxtIcon :name="icon" aria-hidden="true" />
|
|
49
|
+
</div>
|
|
50
|
+
<span
|
|
51
|
+
class="text-sm whitespace-nowrap opacity-0 transition-opacity duration-300 ease-in-out group-hover:opacity-100"
|
|
52
|
+
>
|
|
53
|
+
<slot />
|
|
54
|
+
</span>
|
|
55
|
+
<span v-if="notificationCount" class="sr-only">, {{ notificationCount }} notifications</span>
|
|
56
|
+
</button>
|
|
57
|
+
</template>
|
|
@@ -52,7 +52,7 @@ const activeIcons = computed(() =>
|
|
|
52
52
|
:class="brandColors[platform.name]"
|
|
53
53
|
:aria-label="platform.label"
|
|
54
54
|
>
|
|
55
|
-
<Icon :name="platform.icon"
|
|
55
|
+
<Icon :name="platform.icon" class="text-[10px] text-white" aria-hidden="true" />
|
|
56
56
|
</li>
|
|
57
57
|
</ul>
|
|
58
58
|
</template>
|
|
@@ -82,11 +82,7 @@ const isContactEvent = computed(() => {
|
|
|
82
82
|
class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full"
|
|
83
83
|
:class="[eventConfig.color]"
|
|
84
84
|
>
|
|
85
|
-
<NexxtIcon
|
|
86
|
-
:name="eventConfig.icon as any"
|
|
87
|
-
:type="eventConfig.icon === 'whatsapp' ? 'brands' : 'light'"
|
|
88
|
-
class="flex h-6 w-6 text-xl text-white"
|
|
89
|
-
/>
|
|
85
|
+
<NexxtIcon :name="eventConfig.icon as any" class="flex h-6 w-6 text-xl text-white" />
|
|
90
86
|
</div>
|
|
91
87
|
<div
|
|
92
88
|
class="flex w-full flex-col gap-2 rounded-xl border border-gray-200 p-8"
|
package/src/components.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"NexxtAnimatedNumber": "components/AnimatedNumber/AnimatedNumber.vue",
|
|
3
|
+
"NexxtAnnouncement": "components/Announcement/Announcement.vue",
|
|
3
4
|
"NexxtAvatar": "components/Avatar/Avatar.vue",
|
|
4
5
|
"NexxtButton": "components/Button/Button.vue",
|
|
5
6
|
"NexxtCalendar": "components/Calendar/Calendar.vue",
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
"NexxtPropertyCard": "components/PropertyCard/PropertyCard.vue",
|
|
27
28
|
"NexxtPropertyListing": "components/PropertyListing/PropertyListing.vue",
|
|
28
29
|
"NexxtSelect": "components/Select/Select.vue",
|
|
30
|
+
"NexxtSidebarMenuItem": "components/SidebarMenuItem/SidebarMenuItem.vue",
|
|
29
31
|
"NexxtSkeleton": "components/Skeleton/Skeleton.vue",
|
|
30
32
|
"NexxtSkeletonPropertyCard": "components/SkeletonPropertyCard/SkeletonPropertyCard.vue",
|
|
31
33
|
"NexxtSocialIcons": "components/SocialIcons/SocialIcons.vue",
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-index.ts
|
|
2
2
|
export { default as NexxtAnimatedNumber } from './components/AnimatedNumber/AnimatedNumber.vue'
|
|
3
|
+
export { default as NexxtAnnouncement } from './components/Announcement/Announcement.vue'
|
|
3
4
|
export { default as NexxtAvatar } from './components/Avatar/Avatar.vue'
|
|
4
5
|
export { default as NexxtButton } from './components/Button/Button.vue'
|
|
5
6
|
export { default as NexxtCalendar } from './components/Calendar/Calendar.vue'
|
|
@@ -26,6 +27,7 @@ export { default as NexxtProgressBar } from './components/ProgressBar/ProgressBa
|
|
|
26
27
|
export { default as NexxtPropertyCard } from './components/PropertyCard/PropertyCard.vue'
|
|
27
28
|
export { default as NexxtPropertyListing } from './components/PropertyListing/PropertyListing.vue'
|
|
28
29
|
export { default as NexxtSelect } from './components/Select/Select.vue'
|
|
30
|
+
export { default as NexxtSidebarMenuItem } from './components/SidebarMenuItem/SidebarMenuItem.vue'
|
|
29
31
|
export { default as NexxtSkeleton } from './components/Skeleton/Skeleton.vue'
|
|
30
32
|
export { default as NexxtSkeletonPropertyCard } from './components/SkeletonPropertyCard/SkeletonPropertyCard.vue'
|
|
31
33
|
export { default as NexxtSocialIcons } from './components/SocialIcons/SocialIcons.vue'
|