@apptegy/nuxt-navigation 0.1.91 → 0.1.92-alpha.0
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,36 +1,63 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="a-nav-section"
|
|
4
|
+
:class="{ active }"
|
|
5
|
+
>
|
|
6
|
+
<NuxtLink
|
|
7
|
+
v-if="!collapsed"
|
|
8
|
+
class="a-nav-section--link"
|
|
9
|
+
:to="active ? '' : application.url"
|
|
10
|
+
:aria-label="appText"
|
|
11
|
+
>
|
|
4
12
|
<span v-if="expanded">{{ appText }}</span>
|
|
5
|
-
<a-icon
|
|
6
|
-
|
|
13
|
+
<a-icon
|
|
14
|
+
v-if="expanded && active"
|
|
15
|
+
:class="['caret-icon', { collapse: !isOpen }]"
|
|
16
|
+
icon="16:carret-up"
|
|
17
|
+
@click="isOpen = !isOpen"
|
|
18
|
+
/>
|
|
19
|
+
<a-icon
|
|
20
|
+
v-if="expanded && !active"
|
|
21
|
+
:class="['caret-icon', { collapse: !isOpen }]"
|
|
22
|
+
icon="16:carret-down"
|
|
23
|
+
@click="isOpen = !isOpen"
|
|
24
|
+
/>
|
|
7
25
|
</NuxtLink>
|
|
8
|
-
<div :class="['a-nav-section--content', {
|
|
26
|
+
<div :class="['a-nav-section--content', { collapse: !isOpen }]">
|
|
9
27
|
<slot />
|
|
10
28
|
</div>
|
|
11
29
|
</div>
|
|
12
30
|
</template>
|
|
13
31
|
|
|
14
32
|
<script setup>
|
|
15
|
-
import { useSidebar, computed, ref } from "#imports";
|
|
16
|
-
import icons from "../../assets/iconPaths.json";
|
|
33
|
+
import { useSidebar, computed, ref, useNuxtApp } from "#imports";
|
|
17
34
|
const props = defineProps({
|
|
18
35
|
application: { type: Object, required: true },
|
|
19
36
|
active: { type: Boolean, required: true },
|
|
20
37
|
collapsed: { type: Boolean, required: true }
|
|
21
38
|
});
|
|
22
|
-
const
|
|
39
|
+
const { $ld } = useNuxtApp();
|
|
40
|
+
const isEngageRenameEnabled = computed(() => {
|
|
41
|
+
return Boolean($ld?.flags?.engageToNewslettersNameChange);
|
|
42
|
+
});
|
|
43
|
+
const appText = computed(() => {
|
|
44
|
+
const appName = props.application.text;
|
|
45
|
+
if (appName.toLowerCase() === "engage" && isEngageRenameEnabled.value) {
|
|
46
|
+
return "Newsletters";
|
|
47
|
+
}
|
|
48
|
+
return props.application.text.replace("_", " ");
|
|
49
|
+
});
|
|
23
50
|
const { state: expanded } = useSidebar();
|
|
24
51
|
const isOpen = ref(true);
|
|
25
52
|
</script>
|
|
26
53
|
|
|
27
54
|
<style scoped>
|
|
28
55
|
.a-nav-section {
|
|
29
|
-
box-shadow: inset 0px -1px 0px 0px var(--nav-icon-background, #
|
|
56
|
+
box-shadow: inset 0px -1px 0px 0px var(--nav-icon-background, #dfdfdf);
|
|
30
57
|
min-height: 48px;
|
|
31
58
|
}
|
|
32
59
|
.a-nav-section.active {
|
|
33
|
-
box-shadow: inset 0px -1px 0px 0px var(--nav-icon-background, #
|
|
60
|
+
box-shadow: inset 0px -1px 0px 0px var(--nav-icon-background, #dfdfdf);
|
|
34
61
|
}
|
|
35
62
|
.a-nav-section--content {
|
|
36
63
|
display: flex;
|
|
@@ -56,7 +83,7 @@ const isOpen = ref(true);
|
|
|
56
83
|
user-select: none;
|
|
57
84
|
}
|
|
58
85
|
.a-nav-section--link svg:first-child {
|
|
59
|
-
background: var(--nav-icon-background, #
|
|
86
|
+
background: var(--nav-icon-background, #dfdfdf);
|
|
60
87
|
color: var(--nav-icon-color, var(--eggplant-30));
|
|
61
88
|
border-radius: 4px;
|
|
62
89
|
min-width: 32px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apptegy/nuxt-navigation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.92-alpha.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,24 +27,23 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@apptegy/nuxt-intl": "^2.4.3",
|
|
30
|
-
"@nuxt/kit": "
|
|
31
|
-
"@vueuse/components": "
|
|
32
|
-
"@vueuse/core": "
|
|
30
|
+
"@nuxt/kit": "catalog:",
|
|
31
|
+
"@vueuse/components": "catalog:shared",
|
|
32
|
+
"@vueuse/core": "catalog:shared"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@nuxt/devtools": "
|
|
36
|
-
"@nuxt/eslint-config": "
|
|
37
|
-
"@nuxt/module-builder": "
|
|
38
|
-
"@nuxt/schema": "
|
|
39
|
-
"@nuxt/test-utils": "
|
|
40
|
-
"@types/node": "
|
|
41
|
-
"eslint": "
|
|
42
|
-
"nuxt": "
|
|
43
|
-
"sass": "
|
|
44
|
-
"typescript": "
|
|
45
|
-
"vitest": "
|
|
46
|
-
"vue": "
|
|
47
|
-
"vue-tsc": "
|
|
48
|
-
}
|
|
49
|
-
"gitHead": "f1b5eaabfb157ee74e5d3491e652467780d25e17"
|
|
35
|
+
"@nuxt/devtools": "catalog:",
|
|
36
|
+
"@nuxt/eslint-config": "catalog:",
|
|
37
|
+
"@nuxt/module-builder": "catalog:",
|
|
38
|
+
"@nuxt/schema": "catalog:",
|
|
39
|
+
"@nuxt/test-utils": "catalog:",
|
|
40
|
+
"@types/node": "catalog:",
|
|
41
|
+
"eslint": "catalog:",
|
|
42
|
+
"nuxt": "catalog:",
|
|
43
|
+
"sass": "catalog:",
|
|
44
|
+
"typescript": "catalog:",
|
|
45
|
+
"vitest": "catalog:",
|
|
46
|
+
"vue": "catalog:",
|
|
47
|
+
"vue-tsc": "catalog:"
|
|
48
|
+
}
|
|
50
49
|
}
|