@apptegy/nuxt-navigation 0.1.18 → 0.1.20

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.18",
4
+ "version": "0.1.20",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "unknown"
@@ -34,6 +34,7 @@ defineEmits(['selected-option']);
34
34
 
35
35
  <style scoped>
36
36
  header.header {
37
+ position: relative;
37
38
  grid-area: navheader;
38
39
  display: grid;
39
40
  grid-auto-flow: column;
@@ -45,7 +46,7 @@ header.header {
45
46
  background-color: var(--primary-white);
46
47
  font: var(--font-regular);
47
48
  }
48
- @media only screen and (max-width: 960px) {
49
+ @media only screen and (width <= 960px) {
49
50
  header.header {
50
51
  padding-left: 32px;
51
52
  padding-right: 32px;
@@ -7,13 +7,13 @@
7
7
  @mouseenter="onHover"
8
8
  @mouseleave="onHoverLeave"
9
9
  >
10
- <a
11
- href="#main-content-section"
10
+ <!-- <a
11
+ :href="skipToContent"
12
12
  class="skip-to-content"
13
13
  data-testid="skip-to-content"
14
14
  >
15
15
  {{ $t('navigation.skipToContent') }}
16
- </a>
16
+ </a> -->
17
17
  <div class="navbar--header">
18
18
  <slot name="switcher" />
19
19
  </div>
@@ -41,10 +41,10 @@
41
41
  :impersonated-user="impersonatedUser"
42
42
  />
43
43
 
44
- <slot name="logo" v-bind="expanded">
44
+ <slot name="logo">
45
45
  <NuxtLink v-if="expanded ? logo.src : logo.iconSrc" :to="homepageUrl">
46
46
  <div class="navbar--logo">
47
- <img :src="expanded ? logo.src : logo.iconSrc" :alt="logo.alt">
47
+ <img :src="expanded ? logo.src : logo.iconSrc" :alt="logo.alt || $t('navigation.logoAlt')">
48
48
  </div>
49
49
  </NuxtLink>
50
50
  </slot>
@@ -53,24 +53,10 @@
53
53
  </template>
54
54
 
55
55
  <script setup lang="ts">
56
- import { useNuxtApp, useSidebar } from '#imports';
57
- const { $t } = useNuxtApp();
58
- const { state: expanded } = useSidebar();
59
-
60
- interface IApplications {
61
- id: number;
62
- text: string;
63
- url: string;
64
- img_src: string;
65
- }
56
+ import { useSidebar } from '#imports';
57
+ import type { IApplication, IUser } from "../../types";
66
58
 
67
- interface IUser {
68
- show: boolean;
69
- email: string;
70
- phone_number: string;
71
- client: string;
72
- admin_email: string;
73
- }
59
+ const { state: expanded } = useSidebar();
74
60
 
75
61
  interface ILogo {
76
62
  alt: string;
@@ -79,8 +65,8 @@ interface ILogo {
79
65
  }
80
66
 
81
67
  interface ISidebarProps {
82
- applications: Array<IApplications>;
83
- currentApplication?: IApplications['text'];
68
+ applications: Array<IApplication>;
69
+ currentApplication?: IApplication['text'];
84
70
  homepageUrl?: string;
85
71
  showHelpArticles?: boolean;
86
72
  helpArticleOptions?: Array<unknown>;
@@ -103,7 +89,7 @@ withDefaults(defineProps<ISidebarProps>(), {
103
89
  admin_email: '',
104
90
  }),
105
91
  logo: () => ({
106
- alt: 'Thrillshare',
92
+ alt: '',
107
93
  src: 'logo.svg',
108
94
  iconSrc: 'icon.svg',
109
95
  }),
@@ -111,7 +97,7 @@ withDefaults(defineProps<ISidebarProps>(), {
111
97
  })
112
98
 
113
99
  // Debounced Expand on Hover
114
- let expandedTimer;
100
+ let expandedTimer = null;
115
101
  function onHover() {
116
102
  if(!expanded.value) {
117
103
  expandedTimer = setTimeout(() => {
@@ -13,6 +13,7 @@
13
13
 
14
14
  <script setup lang="ts">
15
15
  import { useSidebar } from "#imports";
16
+ import type { IApplication } from "../../types";
16
17
 
17
18
  defineProps<{
18
19
  application: IApplication;
@@ -21,7 +22,7 @@ defineProps<{
21
22
 
22
23
  const { state: expanded } = useSidebar();
23
24
 
24
- function getActiveIcon(src){
25
+ function getActiveIcon(src: string){
25
26
  return src.replace(".svg", "_active.svg");
26
27
  };
27
28
  </script>
@@ -29,7 +30,6 @@ function getActiveIcon(src){
29
30
  <style scoped>
30
31
  .a-nav-section {
31
32
  box-shadow: inset 0px -1px 0px 0px var(--dscl-nav-section-border-bottom-color, var(--purple-65));
32
- cursor: pointer;
33
33
  min-height: 48px;
34
34
  }
35
35
  .a-nav-section.active {
@@ -52,6 +52,9 @@ function getActiveIcon(src){
52
52
  padding: 0px 16px;
53
53
  width: 100%;
54
54
  }
55
+ .a-nav-section--link:not([href]) {
56
+ cursor: default;
57
+ }
55
58
  .a-nav-section--link:focus-visible {
56
59
  outline: var(--orange) auto 2px;
57
60
  outline-offset: 0px;
@@ -44,9 +44,9 @@ function handleSelectedClick(index: number) {
44
44
  function handleKeydownAction($event: KeyboardEvent, index: number) {
45
45
  if ($event.key === "Enter" || $event.key === " ") {
46
46
  emit("select-option", index);
47
- } else {
48
- handleKeydown($event, index);
47
+ $event?.target?.children[0]?.click();
49
48
  }
49
+ handleKeydown($event, index);
50
50
  }
51
51
  </script>
52
52
 
@@ -0,0 +1,13 @@
1
+ export interface IApplication {
2
+ id: number;
3
+ text: string;
4
+ url: string;
5
+ img_src: string;
6
+ }
7
+ export interface IUser {
8
+ show: boolean;
9
+ email: string;
10
+ phone_number: string;
11
+ client: string;
12
+ admin_email: string;
13
+ }
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {