@apptegy/nuxt-navigation 0.1.43 → 0.1.44

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.43",
4
+ "version": "0.1.44",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "unknown"
@@ -121,7 +121,7 @@ onMounted(() => {
121
121
  grid-column: 2;
122
122
  font-size: 12px;
123
123
  font-style: normal;
124
- font-weight: 450;
124
+ font-weight: 400;
125
125
  line-height: 16px;
126
126
  letter-spacing: 0.4px;
127
127
  max-width: 165px;
@@ -135,9 +135,12 @@ onMounted(() => {
135
135
  color: var(--nav-text-color, var(--primary-white));
136
136
  font-size: 11px;
137
137
  font-style: normal;
138
- font-weight: 450;
138
+ font-weight: 400;
139
139
  line-height: 12px;
140
140
  letter-spacing: 0.4px;
141
+ max-width: 165px;
142
+ overflow: hidden;
143
+ text-overflow: ellipsis;
141
144
  }
142
145
  .a-nav-section--title .a-nav-section-title-wrapper .user-grid .panel-icon {
143
146
  transition: transform 0.2s ease-in-out;
@@ -169,9 +169,14 @@ function onHoverLeave() {
169
169
  transition: width 0.3s ease;
170
170
  height: 100%;
171
171
  overflow-y: auto;
172
+ overflow-x: hidden;
173
+ scrollbar-width: none;
172
174
  width: 64px;
173
175
  position: relative;
174
176
  }
177
+ .navbar::-webkit-scrollbar {
178
+ display: none;
179
+ }
175
180
  .navbar a:focus-visible {
176
181
  outline: var(--orange) auto 2px;
177
182
  outline-offset: 0px;
@@ -32,6 +32,7 @@ const component = computed(()=> props.as || resolveComponent("NuxtLink"));
32
32
  padding: 4px;
33
33
  border: none;
34
34
  border-radius: 8px;
35
+ user-select: none;
35
36
  }
36
37
  .a-navbar-item:focus-visible {
37
38
  outline: var(--orange) auto 2px;
@@ -53,4 +54,7 @@ const component = computed(()=> props.as || resolveComponent("NuxtLink"));
53
54
  outline-offset: 0px;
54
55
  box-shadow: inset 0 0 0px 4px var(--primary-white);
55
56
  }
57
+ .a-navbar-item:last-child {
58
+ margin-bottom: 8px;
59
+ }
56
60
  </style>
@@ -4,16 +4,16 @@
4
4
  <NuxtLink class="a-nav-section--link" :to="active ? '' : application.url" :aria-label="appText">
5
5
  <svg :class="{ active }" width="32" height="32" viewBox="0 0 32 32" aria-hidden="true" v-html="icons[application.text as keyof typeof icons]"/>
6
6
  <span v-if="expanded">{{ appText }}</span>
7
- <a-icon v-if="expanded && active" class="caret-icon" icon="16:carret-up" />
7
+ <a-icon v-if="expanded && active" :class="['caret-icon', { 'collapse': !isOpen }]" icon="16:carret-up" @click="isOpen = !isOpen" />
8
8
  </NuxtLink>
9
- <div class="a-nav-section--content">
9
+ <div :class="['a-nav-section--content', { 'collapse': !isOpen }]">
10
10
  <slot />
11
11
  </div>
12
12
  </div>
13
13
  </template>
14
14
 
15
15
  <script setup lang="ts">
16
- import { useSidebar, computed } from "#imports";
16
+ import { useSidebar, computed, ref } from "#imports";
17
17
  import type { IApplication } from "../../types";
18
18
  import icons from "../../assets/iconPaths.json";
19
19
 
@@ -26,6 +26,9 @@ const appText = computed(() => props.application.text.replace("_", " "))
26
26
 
27
27
  const { state: expanded } = useSidebar();
28
28
 
29
+ const isOpen = ref(true);
30
+
31
+
29
32
  </script>
30
33
 
31
34
  <style scoped>
@@ -35,11 +38,16 @@ const { state: expanded } = useSidebar();
35
38
  }
36
39
  .a-nav-section.active {
37
40
  box-shadow: inset 0px -1px 0px 0px var(--nav-icon-background, rgb(80, 71, 100));
38
- padding-bottom: 4px;
39
41
  }
40
42
  .a-nav-section--content {
41
43
  display: flex;
42
44
  flex-direction: column;
45
+ max-height: 100vh;
46
+ overflow: hidden;
47
+ transition: max-height 0.3s ease;
48
+ }
49
+ .a-nav-section--content.collapse {
50
+ max-height: 0;
43
51
  }
44
52
  .a-nav-section--link {
45
53
  display: flex;
@@ -52,6 +60,7 @@ const { state: expanded } = useSidebar();
52
60
  overflow: hidden;
53
61
  padding: 0px 16px;
54
62
  width: 100%;
63
+ user-select: none;
55
64
  }
56
65
  .a-nav-section--link svg:first-child {
57
66
  background: var(--nav-icon-background, rgb(80, 71, 100));
@@ -1,4 +1,22 @@
1
1
  export declare function useBranding(clientId?: number): Promise<{
2
- brand: any;
3
- getBrandingStyles: any;
2
+ brand: import("vue").Ref<null, null>;
3
+ getBrandingStyles: import("vue").ComputedRef<{
4
+ '--brand-color'?: undefined;
5
+ '--nav-background-color'?: undefined;
6
+ '--nav-text-color'?: undefined;
7
+ '--nav-border-colors'?: undefined;
8
+ '--nav-icon-background'?: undefined;
9
+ '--nav-icon-color'?: undefined;
10
+ '--nav-active-icon-background'?: undefined;
11
+ '--nav-active-icon-color'?: undefined;
12
+ } | {
13
+ '--brand-color': any;
14
+ '--nav-background-color': string;
15
+ '--nav-text-color': string;
16
+ '--nav-border-colors': string;
17
+ '--nav-icon-background': string;
18
+ '--nav-icon-color': string;
19
+ '--nav-active-icon-background': string;
20
+ '--nav-active-icon-color': string;
21
+ }>;
4
22
  }>;
@@ -3,8 +3,8 @@ export declare function useDropdown(options: Array<unknown>, dropdownOptionsRef:
3
3
  searchable: boolean;
4
4
  trackBy?: string;
5
5
  }): {
6
- active: any;
7
- searchQuery: any;
6
+ active: Ref<boolean, boolean>;
7
+ searchQuery: Ref<string, string>;
8
8
  toggleDropdown: ($event: KeyboardEvent | MouseEvent) => Promise<void>;
9
9
  openDropdown: () => void;
10
10
  closeDropdown: () => void;
@@ -18,20 +18,17 @@ export function useDropdown(options, dropdownOptionsRef, dropdownTriggerRef, con
18
18
  active.value = false;
19
19
  }
20
20
  function onClickOutsideHandler() {
21
- if (!active.value)
22
- return;
21
+ if (!active.value) return;
23
22
  closeDropdown();
24
23
  }
25
24
  function keydownActionsOnTrigger(event) {
26
- if (event.ctrlKey || event.metaKey || event.shiftKey)
27
- return;
25
+ if (event.ctrlKey || event.metaKey || event.shiftKey) return;
28
26
  if (event.key !== "Tab") {
29
27
  event.preventDefault();
30
28
  }
31
29
  switch (event.key) {
32
30
  case "Tab":
33
- if (!active.value)
34
- return;
31
+ if (!active.value) return;
35
32
  closeDropdown();
36
33
  break;
37
34
  case "ArrowDown":
@@ -96,8 +93,7 @@ export function useDropdown(options, dropdownOptionsRef, dropdownTriggerRef, con
96
93
  }
97
94
  }
98
95
  function handleKeydown(event, index) {
99
- if (event.ctrlKey || event.metaKey || event.shiftKey)
100
- return;
96
+ if (event.ctrlKey || event.metaKey || event.shiftKey) return;
101
97
  if (event.altKey && event.key === "ArrowUp") {
102
98
  closeDropdown();
103
99
  dropdownTriggerRef.value.focus();
@@ -131,15 +127,13 @@ export function useDropdown(options, dropdownOptionsRef, dropdownTriggerRef, con
131
127
  });
132
128
  break;
133
129
  case "ArrowDown":
134
- if (index === options.length - 1)
135
- break;
130
+ if (index === options.length - 1) break;
136
131
  nextTick(() => {
137
132
  dropdownOptionsRef.value[index + 1].focus();
138
133
  });
139
134
  return index;
140
135
  case "ArrowUp":
141
- if (index === 0)
142
- break;
136
+ if (index === 0) break;
143
137
  nextTick(() => {
144
138
  dropdownOptionsRef.value[index - 1].focus();
145
139
  });
@@ -176,8 +170,7 @@ export function useDropdown(options, dropdownOptionsRef, dropdownTriggerRef, con
176
170
  dropdownOptionsRef.value[idx].focus();
177
171
  }, 500);
178
172
  function handleDropdownSearch(inputValue) {
179
- if (!config.searchable)
180
- return;
173
+ if (!config.searchable) return;
181
174
  if (inputValue.key == "Backspace") {
182
175
  searchQuery.value = searchQuery.value.slice(0, -1);
183
176
  return;
@@ -1,5 +1,5 @@
1
1
  export declare function useSidebar(): {
2
- state: any;
2
+ state: import("vue").Ref<boolean, boolean>;
3
3
  toggleSidebar: () => void;
4
- sidebarWidth: any;
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.43",
3
+ "version": "0.1.44",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -47,5 +47,5 @@
47
47
  "vue": "^3.5.13",
48
48
  "vue-tsc": "^2.2.8"
49
49
  },
50
- "gitHead": "7638a218c13631df2b5511ef55e5ab7c437244d3"
50
+ "gitHead": "875f0f01ddc64d6eaad53d38b9313f3a69ec3227"
51
51
  }