@apptegy/nuxt-navigation 0.1.12 → 0.1.14

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
3
  "configKey": "@apptegy/nuxt-navigation",
4
- "version": "0.1.12",
4
+ "version": "0.1.14",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.3",
7
7
  "unbuild": "unknown"
@@ -4,20 +4,24 @@
4
4
  <div class="a-nav-section-title-wrapper">
5
5
  <div class="user-grid">
6
6
  <img src="../../assets/img/impersonate-user.svg" alt="" class="user-icon" >
7
- <p class="info">{{ impersonatedUser.client }}</p>
8
- <p class="info email">{{ impersonatedUser.email }}</p>
9
- <img v-if="!expanded " class="panel-icon" src="../../assets/icons/24/Plus.svg" alt="" >
10
- <img v-else class="panel-icon" src="../../assets/icons/24/Minus.svg" alt="" >
7
+ <template v-if="sidebarExpanded">
8
+ <p class="info">{{ impersonatedUser.client }}</p>
9
+ <p class="info email">{{ impersonatedUser.email }}</p>
10
+ <img v-if="!expanded " class="panel-icon" src="../../assets/icons/24/Plus.svg" alt="" >
11
+ <img v-else class="panel-icon" src="../../assets/icons/24/Minus.svg" alt="" >
12
+ </template>
11
13
  </div>
12
14
  <div
13
15
  ref="dropdownWrapper"
14
- :style="{ 'max-height': `${expanded ? dropdownScrollHeight : 0}px` }"
16
+ :style="{ 'max-height': `${expanded && sidebarExpanded ? dropdownScrollHeight : 0}px` }"
15
17
  class="a-nav-section-title-dropdown-wrapper"
16
18
  >
17
19
  <div class="user-grid">
18
20
  <img src="../../assets/img/user.svg" alt="" class="user-icon" >
19
- <p class="info">{{ impersonatedUser.client }}</p>
20
- <p class="info email">{{ impersonatedUser.admin_email }}</p>
21
+ <template v-if="sidebarExpanded">
22
+ <p class="info">{{ impersonatedUser.client }}</p>
23
+ <p class="info email">{{ impersonatedUser.admin_email }}</p>
24
+ </template>
21
25
  </div>
22
26
  </div>
23
27
  </div>
@@ -26,7 +30,7 @@
26
30
  </template>
27
31
 
28
32
  <script setup lang="ts">
29
- import { ref, onMounted } from '#imports';
33
+ import { ref, onMounted, useSidebar } from '#imports';
30
34
 
31
35
  interface IPanelProps {
32
36
  impersonatedUser: {
@@ -39,6 +43,7 @@ interface IPanelProps {
39
43
 
40
44
  defineProps<IPanelProps>();
41
45
 
46
+ const { state: sidebarExpanded } = useSidebar();
42
47
  const expanded = ref(false);
43
48
  const dropdownScrollHeight = ref(0);
44
49
  const dropdownWrapper = ref();
@@ -2,14 +2,17 @@
2
2
  import { useSidebar } from "#imports";
3
3
 
4
4
  defineProps<{
5
- icon: string;
5
+ icon?: string;
6
+ active?: boolean;
6
7
  }>();
7
8
  const { state: expanded } = useSidebar();
8
9
  </script>
9
10
 
10
11
  <template>
11
- <NuxtLink class="a-navbar-item" :class="{expanded}">
12
- <a-icon :icon="icon" font-size="32px"/>
12
+ <NuxtLink class="a-navbar-item" :class="{expanded, active}">
13
+ <slot name="icon">
14
+ <a-icon :icon="icon" font-size="32px"/>
15
+ </slot>
13
16
  <slot v-if="expanded" />
14
17
  </NuxtLink>
15
18
  </template>
@@ -31,12 +34,12 @@ const { state: expanded } = useSidebar();
31
34
  outline-offset: 0px;
32
35
  box-shadow: inset 0 0 0px 4px var(--primary-white);
33
36
  }
34
- .a-navbar-item.nuxt-link-exact-active, .a-navbar-item.router-link-exact-active {
37
+ .a-navbar-item.active, .a-navbar-item.nuxt-link-exact-active, .a-navbar-item.router-link-exact-active {
35
38
  background-color: var(--dscl-nav-active-background-color, #463e59);
36
39
  font-weight: 500;
37
40
  /* box-shadow: inset -4px 0px 0px 0px var(--orange-40); */
38
41
  }
39
- .a-navbar-item.nuxt-link-exact-active svg path, .a-navbar-item.router-link-exact-active svg path {
42
+ .a-navbar-item.active svg path, .a-navbar-item.nuxt-link-exact-active svg path, .a-navbar-item.router-link-exact-active svg path {
40
43
  stroke-width: 1.5px;
41
44
  }
42
45
  .a-navbar-item:hover {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {