@apptegy/nuxt-navigation 0.1.14 → 0.1.16
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
|
@@ -135,7 +135,7 @@ function onHoverLeave() {
|
|
|
135
135
|
background-color: var(--dscl-nav-background-color, var(--purple-70));
|
|
136
136
|
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|
|
137
137
|
transition: width 0.3s ease-in-out, translate 0.2s ease-in-out;
|
|
138
|
-
height:
|
|
138
|
+
height: 100%;
|
|
139
139
|
overflow-y: auto;
|
|
140
140
|
width: 64px;
|
|
141
141
|
}
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useSidebar } from "#imports";
|
|
2
|
+
import { useSidebar, computed, resolveComponent } from "#imports";
|
|
3
3
|
|
|
4
|
-
defineProps<{
|
|
4
|
+
const props = defineProps<{
|
|
5
5
|
icon?: string;
|
|
6
6
|
active?: boolean;
|
|
7
|
-
|
|
7
|
+
as?: string;
|
|
8
|
+
}>()
|
|
8
9
|
const { state: expanded } = useSidebar();
|
|
10
|
+
const component = computed(()=> props.as || resolveComponent("NuxtLink"));
|
|
9
11
|
</script>
|
|
10
12
|
|
|
11
13
|
<template>
|
|
12
|
-
<
|
|
14
|
+
<component :is="component" class="a-navbar-item" :class="{expanded, active}">
|
|
13
15
|
<slot name="icon">
|
|
14
16
|
<a-icon :icon="icon" font-size="32px"/>
|
|
15
17
|
</slot>
|
|
16
18
|
<slot v-if="expanded" />
|
|
17
|
-
</
|
|
19
|
+
</component>
|
|
18
20
|
</template>
|
|
19
21
|
|
|
20
22
|
<style scoped>
|
|
21
23
|
.a-navbar-item {
|
|
24
|
+
background-color: transparent;
|
|
22
25
|
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|
|
23
|
-
margin:
|
|
26
|
+
margin: 2px 12px;
|
|
24
27
|
display: flex;
|
|
25
28
|
align-items: center;
|
|
26
29
|
gap: 4px;
|
|
27
30
|
text-decoration: none;
|
|
28
31
|
text-transform: capitalize;
|
|
29
32
|
padding: 4px;
|
|
33
|
+
border: none;
|
|
30
34
|
border-radius: 8px;
|
|
31
35
|
}
|
|
32
36
|
.a-navbar-item:focus-visible {
|
|
@@ -36,6 +36,10 @@ function getActiveIcon(src){
|
|
|
36
36
|
box-shadow: inset 0px -1px 0px 0px var(--dscl-nav-section-border-bottom-color, var(--purple-65));
|
|
37
37
|
padding-bottom: 4px;
|
|
38
38
|
}
|
|
39
|
+
.a-nav-section--content {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
}
|
|
39
43
|
.a-nav-section--link {
|
|
40
44
|
display: flex;
|
|
41
45
|
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|