@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
@@ -4,7 +4,7 @@
4
4
  "nuxt": ">=3.0.0"
5
5
  },
6
6
  "configKey": "@apptegy/nuxt-navigation",
7
- "version": "0.1.91",
7
+ "version": "0.1.92-alpha.0",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.1",
10
10
  "unbuild": "unknown"
@@ -1,36 +1,63 @@
1
1
  <template>
2
- <div class="a-nav-section" :class="{ active }">
3
- <NuxtLink v-if="!collapsed" class="a-nav-section--link" :to="active ? '' : application.url" :aria-label="appText">
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 v-if="expanded && active" :class="['caret-icon', { 'collapse': !isOpen }]" icon="16:carret-up" @click="isOpen = !isOpen" />
6
- <a-icon v-if="expanded && !active" :class="['caret-icon', { 'collapse': !isOpen }]" icon="16:carret-down" @click="isOpen = !isOpen" />
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', { 'collapse': !isOpen }]">
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 appText = computed(() => props.application.text.replace("_", " "));
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, #DFDFDF);
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, #DFDFDF);
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, #DFDFDF);
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;
@@ -1,4 +1,4 @@
1
- import type { IApplication } from "../../types/index.js";
1
+ import type { IApplication } from '../../types/index.js';
2
2
  type __VLS_Props = {
3
3
  application: IApplication;
4
4
  active: boolean;
@@ -1,5 +1,5 @@
1
1
  export declare function useSidebar(): {
2
- state: import("vue").Ref<boolean, boolean>;
2
+ state: any;
3
3
  toggleSidebar: () => void;
4
4
  sidebarWidth: import("vue").ComputedRef<"264px" | "0px">;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.91",
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": "^3.17.0",
31
- "@vueuse/components": "^12.0.0",
32
- "@vueuse/core": "^12.0.0"
30
+ "@nuxt/kit": "catalog:",
31
+ "@vueuse/components": "catalog:shared",
32
+ "@vueuse/core": "catalog:shared"
33
33
  },
34
34
  "devDependencies": {
35
- "@nuxt/devtools": "^2.6.2",
36
- "@nuxt/eslint-config": "^1.6.0",
37
- "@nuxt/module-builder": "^1.0.1",
38
- "@nuxt/schema": "^3.17.0",
39
- "@nuxt/test-utils": "^3.17.0",
40
- "@types/node": "^22.0.0",
41
- "eslint": "^9.31.0",
42
- "nuxt": "^3.17.0",
43
- "sass": "^1.89.2",
44
- "typescript": "~5.8.0",
45
- "vitest": "^3.2.4",
46
- "vue": "^3.5.13",
47
- "vue-tsc": "^3.0.3"
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
  }