@apptegy/nuxt-navigation 0.1.1

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.
Files changed (37) hide show
  1. package/README.md +84 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.mts +7 -0
  4. package/dist/module.d.ts +7 -0
  5. package/dist/module.json +9 -0
  6. package/dist/module.mjs +22 -0
  7. package/dist/runtime/assets/edurooms-logo-white.svg +1 -0
  8. package/dist/runtime/assets/edurooms-logo.svg +1 -0
  9. package/dist/runtime/assets/icons/24/Minus.svg +5 -0
  10. package/dist/runtime/assets/icons/24/Plus.svg +5 -0
  11. package/dist/runtime/assets/icons/32/logout.svg +4 -0
  12. package/dist/runtime/assets/img/help-toggle.svg +13 -0
  13. package/dist/runtime/assets/img/help.svg +5 -0
  14. package/dist/runtime/assets/img/impersonate-user.svg +3 -0
  15. package/dist/runtime/assets/img/navbar-minus.svg +3 -0
  16. package/dist/runtime/assets/img/navbar-plus.svg +3 -0
  17. package/dist/runtime/assets/img/navbar-up.svg +3 -0
  18. package/dist/runtime/assets/img/user.svg +8 -0
  19. package/dist/runtime/assets/logo.svg +56 -0
  20. package/dist/runtime/assets/thrillshare-icon-white.svg +1 -0
  21. package/dist/runtime/assets/thrillshare-logo-white.svg +1 -0
  22. package/dist/runtime/components/Nav/Avatar.vue +61 -0
  23. package/dist/runtime/components/Nav/Breadcrumb.vue +23 -0
  24. package/dist/runtime/components/Nav/Header.vue +200 -0
  25. package/dist/runtime/components/Nav/HelpArticles.vue +154 -0
  26. package/dist/runtime/components/Nav/ImpersonateInfoPanel.vue +135 -0
  27. package/dist/runtime/components/Nav/OrgSelect.vue +198 -0
  28. package/dist/runtime/components/Nav/Sidebar.vue +187 -0
  29. package/dist/runtime/components/Nav/SidebarItem.vue +40 -0
  30. package/dist/runtime/components/Nav/SidebarSection.vue +73 -0
  31. package/dist/runtime/components/Nav/SubMenu.vue +37 -0
  32. package/dist/runtime/components/Nav/SubMenuItem.vue +66 -0
  33. package/dist/runtime/composables/accessibleActions.d.ts +33 -0
  34. package/dist/runtime/composables/accessibleActions.js +195 -0
  35. package/dist/types.d.mts +1 -0
  36. package/dist/types.d.ts +1 -0
  37. package/package.json +49 -0
@@ -0,0 +1,154 @@
1
+ <template>
2
+ <div class="help-btn-wrapper">
3
+ <div
4
+ class="help-btn-actions"
5
+ ref="helpBtnActions"
6
+ :class="{ expanded: expanded && navbarExpanded }"
7
+ :style="{ 'max-height': `${expanded && navbarExpanded ? dropdownScrollHeight : 0}px` }"
8
+ >
9
+ <button
10
+ v-for="(option, idx) in helpArticleOptions"
11
+ :key="idx"
12
+ :id="`help-btn-${option.id}`"
13
+ class="help-btn-action"
14
+ >
15
+ {{ option.text }}
16
+ </button>
17
+ </div>
18
+ <button
19
+ :id="!isDropdown && 'help-btn'"
20
+ :class="['help-articles-btn', !isDropdown && 'help-btn']"
21
+ @click="expandDropdown"
22
+ >
23
+ <img v-if="isDropdown" src="../../assets/img/help-toggle.svg" alt="" class="help-center-btn-icon" />
24
+ <img v-else src="../../assets/img/help.svg" alt="" class="help-center-btn-icon" />
25
+ <span v-if="navbarExpanded">
26
+ {{ isDropdown ? $t('dscl.navigation.helpCenter') : $t('dscl.navigation.helpArticles') }}
27
+ </span>
28
+ <img
29
+ v-if="isDropdown && navbarExpanded && !hasArticles"
30
+ class="caret-icon"
31
+ :class="{ collapse: !expanded }"
32
+ src="../../assets/img/navbar-up.svg"
33
+ alt=""
34
+ />
35
+ </button>
36
+ </div>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import { ref, computed, onMounted } from 'vue'
41
+
42
+ interface IHelpArticlesProps {
43
+ navbarExpanded: boolean;
44
+ helpArticleOptions: Array<any>;
45
+ };
46
+
47
+ const props = withDefaults(defineProps<IHelpArticlesProps>(), {
48
+ helpArticleOptions: () => [],
49
+ })
50
+
51
+ const expanded = ref(false);
52
+ const helpBtnActions = ref();
53
+ const dropdownScrollHeight = ref(0);
54
+ const isDropdown = ref(false);
55
+
56
+ const hasArticles = computed(() => {
57
+ return !!props.helpArticleOptions?.values?.length
58
+ })
59
+
60
+ onMounted(() => {
61
+ isDropdown.value = !!props.helpArticleOptions?.values?.length;
62
+ dropdownScrollHeight.value = helpBtnActions.value?.scrollHeight + 12;
63
+ });
64
+
65
+ function expandDropdown() {
66
+ if (!isDropdown) {
67
+ return;
68
+ }
69
+ expanded.value = !expanded.value;
70
+ };
71
+
72
+ </script>
73
+
74
+ <style scoped>
75
+ .help-btn-wrapper {
76
+ box-shadow: inset 0px -1px 0px 0px var(--dscl-nav-section-border-bottom-color, var(--purple-65));
77
+ display: flex;
78
+ flex-direction: column;
79
+ align-items: center;
80
+ width: 100%;
81
+ }
82
+ .help-btn-wrapper .help-articles-btn {
83
+ cursor: pointer;
84
+ display: flex;
85
+ width: 100%;
86
+ align-items: center;
87
+ background: none;
88
+ padding: 8px 10px 8px 16px;
89
+ border: none;
90
+ }
91
+ .help-btn-wrapper .help-articles-btn:focus-visible {
92
+ outline: var(--orange) solid 2px;
93
+ outline-offset: 0;
94
+ box-shadow: inset 0 0 0 3px var(--primary-white);
95
+ border-radius: 3px;
96
+ }
97
+ .help-btn-wrapper .help-articles-btn .help-center-btn-icon {
98
+ min-width: 32px;
99
+ width: 32px;
100
+ }
101
+ .help-btn-wrapper .help-btn-actions {
102
+ visibility: hidden;
103
+ width: 100%;
104
+ max-height: 0px;
105
+ overflow-y: hidden;
106
+ transition: all 0.5s ease-in-out;
107
+ }
108
+ .help-btn-wrapper .help-btn-actions.expanded {
109
+ visibility: visible;
110
+ margin-top: -8px;
111
+ padding-bottom: 6px;
112
+ }
113
+ .help-btn-wrapper .help-btn-action {
114
+ border: none;
115
+ padding: 0;
116
+ background: none;
117
+ color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
118
+ cursor: pointer;
119
+ font-size: 14px;
120
+ width: 100%;
121
+ text-align: left;
122
+ position: relative;
123
+ padding: 6px 51px 6px 45px;
124
+ }
125
+ .help-btn-wrapper .help-btn-action:hover:before {
126
+ content: "";
127
+ z-index: -1;
128
+ position: absolute;
129
+ top: 0px;
130
+ bottom: 0px;
131
+ right: 0px;
132
+ left: -45px;
133
+ background-color: var(--dscl-nav-active-background-color, #463e59);
134
+ }
135
+ .help-btn-wrapper .caret-icon {
136
+ margin-left: auto;
137
+ transition: transform 0.2s ease-in-out;
138
+ background: none;
139
+ }
140
+ .help-btn-wrapper .caret-icon.collapse {
141
+ transform: rotate(0.5turn);
142
+ }
143
+ .help-btn-wrapper img {
144
+ background: #504764;
145
+ border-radius: 4px;
146
+ }
147
+ .help-btn-wrapper span {
148
+ color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
149
+ margin-left: 8px;
150
+ font-size: 12px;
151
+ letter-spacing: 0.4px;
152
+ line-height: 16px;
153
+ }
154
+ </style>
@@ -0,0 +1,135 @@
1
+ <template>
2
+ <div class="a-nav-section animated" id="impersonate-info">
3
+ <button v-if="navbarExpanded" class="a-nav-section--title" @click="expanded = !expanded">
4
+ <div class="a-nav-section-title-wrapper">
5
+ <div class="user-grid">
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="" />
11
+ </div>
12
+ <div
13
+ ref="dropdownWrapper"
14
+ :style="{ 'max-height': `${expanded && navbarExpanded ? dropdownScrollHeight : 0}px` }"
15
+ class="a-nav-section-title-dropdown-wrapper"
16
+ >
17
+ <div class="user-grid">
18
+ <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
+ </div>
22
+ </div>
23
+ </div>
24
+ <!-- add plus icon -->
25
+ </button>
26
+ <!-- <img v-else src="../../assets/img/impersonate-user.svg" alt="" class="user-icon" /> -->
27
+ </div>
28
+ </template>
29
+
30
+ <script setup lang="ts">
31
+ import { ref, onMounted } from '#imports';
32
+
33
+ interface IPanelProps {
34
+ navbarExpanded: boolean;
35
+ impersonatedUser: () => {
36
+ show: false,
37
+ name: '',
38
+ email: '',
39
+ client: ''
40
+ }
41
+ }
42
+ const props = defineProps<IPanelProps>();
43
+
44
+ const expanded = ref(false);
45
+ const dropdownScrollHeight = ref(0);
46
+ const dropdownWrapper = ref();
47
+
48
+ onMounted(() => {
49
+ dropdownScrollHeight.value = dropdownWrapper.value?.scrollHeight
50
+ })
51
+
52
+ </script>
53
+
54
+ <style scoped>
55
+ .a-nav-section {
56
+ cursor: pointer;
57
+ height: fit-content;
58
+ overflow: hidden;
59
+ background-color: var(--dscl-nav-background-color, var(--purple-70));
60
+ }
61
+ .a-nav-section.animated {
62
+ transition: overflow 0.5s ease-in-out;
63
+ }
64
+ .a-nav-section--title {
65
+ color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
66
+ display: flex;
67
+ justify-content: space-between;
68
+ background: none;
69
+ border: none;
70
+ border-top: 1px var(--dscl-nav-section-border-bottom-color, var(--purple-65)) solid;
71
+ padding: 0;
72
+ width: 100%;
73
+ cursor: pointer;
74
+ }
75
+ .a-nav-section--title:focus-visible {
76
+ outline: var(--orange) auto 2px;
77
+ outline-offset: 0px;
78
+ box-shadow: inset 0 0 0px 4px var(--primary-white);
79
+ }
80
+ .a-nav-section--title .a-nav-section-title-wrapper {
81
+ font-size: 12px;
82
+ letter-spacing: 0.4px;
83
+ line-height: 16px;
84
+ text-align: left;
85
+ width: 100%;
86
+ }
87
+ .a-nav-section--title .a-nav-section-title-wrapper .user-grid {
88
+ display: grid;
89
+ grid-template-columns: 56px auto 1fr;
90
+ grid-template-rows: 1fr 1fr;
91
+ align-items: center;
92
+ padding: 12px 0;
93
+ }
94
+ .a-nav-section--title .a-nav-section-title-wrapper .user-grid .user-icon {
95
+ grid-row: 1/span 2;
96
+ background: #504764;
97
+ border-radius: 4px;
98
+ padding: 4px;
99
+ margin-right: auto;
100
+ margin-left: 16px;
101
+ }
102
+ .a-nav-section--title .a-nav-section-title-wrapper .user-grid .info {
103
+ color: var(--primary-white);
104
+ margin: 0;
105
+ grid-row: 1;
106
+ grid-column: 2;
107
+ font-size: 12px;
108
+ font-style: normal;
109
+ font-weight: 450;
110
+ line-height: 16px;
111
+ letter-spacing: 0.4px;
112
+ }
113
+ .a-nav-section--title .a-nav-section-title-wrapper .user-grid .email {
114
+ grid-column: 2;
115
+ grid-row: 2;
116
+ margin-top: 4px;
117
+ color: #CAC2D0;
118
+ font-size: 11px;
119
+ font-style: normal;
120
+ font-weight: 450;
121
+ line-height: 12px;
122
+ letter-spacing: 0.4px;
123
+ }
124
+ .a-nav-section--title .a-nav-section-title-wrapper .user-grid .panel-icon {
125
+ transition: transform 0.2s ease-in-out;
126
+ grid-column: 3;
127
+ grid-row: 1/span 2;
128
+ margin-left: auto;
129
+ margin-right: 16px;
130
+ }
131
+ .a-nav-section--title .a-nav-section-title-dropdown-wrapper {
132
+ height: fit-content;
133
+ transition: max-height 0.5s ease-in-out;
134
+ }
135
+ </style>
@@ -0,0 +1,198 @@
1
+ <template>
2
+ <div class="org-selection">
3
+ <label id="org-dropdown-label" class="sr-only">
4
+ {{ orgDropdownLabel }}
5
+ </label>
6
+ <div
7
+ ref="dropdownTriggerRef"
8
+ aria-labelledby="org-dropdown-label"
9
+ aria-controls="organizations-options-list"
10
+ :aria-expanded="active"
11
+ aria-haspopup="listbox"
12
+ role="combobox"
13
+ class="dropdown-trigger"
14
+ >
15
+ <input
16
+ ref="inputRef"
17
+ is="input"
18
+ class="org-title"
19
+ type="text"
20
+ placeholder="Start typing to search"
21
+ :value="active? newQuery : selectedOrg.name"
22
+ @keydown="keydownActionsOnTrigger($event, orgs, optionRef, dropdownTriggerRef, true, inputRef)"
23
+ @click.prevent="toggleDropdown($event, optionRef)"
24
+ @input="handleDropdownSearch($event, sortedOrgs, optionRef)"
25
+ />
26
+ <span v-if="selectedOrg.intranet" class="intranet selected">
27
+ <a-icon icon="16:lock-locked" ></a-icon>
28
+ {{ $t('dscl.navigation.intranet') }}
29
+ </span>
30
+ <!-- <Icon
31
+ style="margin-bottom: 2px"
32
+ :name-or-path="`dropdown${active ? '-up' : ''}`"
33
+ size="tiny"
34
+ reduced
35
+ variant="info"
36
+ /> -->
37
+ </div>
38
+ <div v-show="active" id="organizations-options-list" class="dropdown" role="listbox">
39
+ <div
40
+ v-for="(option, idx) in sortedOrgs"
41
+ v-on-click-outside="onClickOutsideHandler"
42
+ ref="optionRef"
43
+ :key="option.name"
44
+ role="option"
45
+ class="org-option"
46
+ :class="{ selected: option === selectedOrg }"
47
+ :aria-selected="!!String(option === selectedOrg)"
48
+ tabindex="-1"
49
+ @keydown="handleKeydownAction(orgs, idx, $event, optionRef, dropdownTriggerRef)"
50
+ @click="handleSelectedClick(idx)"
51
+ >
52
+ <div class="selected-space">
53
+ <!-- <Icon v-if="option === selectedOrg" name-or-path="success" size="tiny" /> -->
54
+ </div>
55
+ <span :class="{ pinned: option.pinned, 'item-flex': true }">{{ option?.name || option.label }}
56
+ <span v-if="option.intranet" class="intranet selected">
57
+ <a-icon icon="16:lock-locked"></a-icon>
58
+ {{ $t('dscl.navigation.intranet') }}
59
+ </span>
60
+ </span>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </template>
65
+
66
+ <script setup lang="ts">
67
+ import { useDropdown } from '../../composables/accessibleActions.js';
68
+ import { vOnClickOutside } from '@vueuse/components';
69
+ import { ref, computed, useNuxtApp } from '#imports';
70
+ const { $t } = useNuxtApp();
71
+
72
+ const emit = defineEmits(['selected']);
73
+
74
+ const {
75
+ active,
76
+ newQuery,
77
+ toggleDropdown,
78
+ closeDropdown,
79
+ onClickOutsideHandler,
80
+ keydownActionsOnTrigger,
81
+ handleKeydown,
82
+ handleDropdownSearch,
83
+ // focusDropdownItem,
84
+ } = useDropdown();
85
+
86
+ interface IOrgSelectProps {
87
+ orgs: Array<any>;
88
+ selectedOrg: {};
89
+ };
90
+
91
+ const dropdownTriggerRef = ref();
92
+ const optionRef = ref();
93
+
94
+ const props = defineProps<IOrgSelectProps>();
95
+
96
+ const sortedOrgs = computed(() => {
97
+ return [...props.orgs].sort((a, b) => {
98
+ if (a.pinned && !b.pinned) {
99
+ return -1;
100
+ } else if (!a.pinned && b.pinned) {
101
+ return 1;
102
+ } else {
103
+ return 0;
104
+ }
105
+ });
106
+ });
107
+ const orgDropdownLabel = computed(() => {
108
+ return useNuxtApp().$t('navigation.orgDropdown') || 'Select Organization'
109
+ })
110
+
111
+ function handleSelectedClick(index: number) {
112
+ emit('selected', index);
113
+ closeDropdown();
114
+ }
115
+
116
+ function handleKeydownAction(orgs: string | any[], idx: number, $event: { key: string | boolean; }, optionRef: { focus: () => void; }[], dropdownTriggerRef: { focus: () => void; }) {
117
+ emit('selected', idx);
118
+ handleKeydown(orgs, idx, $event, optionRef, dropdownTriggerRef);
119
+ }
120
+ </script>
121
+
122
+ <style scoped>
123
+ #organizations-options-list {
124
+ position: absolute;
125
+ width: 300px;
126
+ max-height: 300px;
127
+ overflow-y: auto;
128
+ background-color: white;
129
+ z-index: 50;
130
+ }
131
+
132
+ .org-selection {
133
+ width: 300px;
134
+ margin-right: 25px;
135
+ }
136
+ .org-selection .dropdown-trigger:focus-visible {
137
+ outline: 2px #000FFF solid;
138
+ }
139
+ .org-selection .dropdown-trigger .org-title {
140
+ line-height: 16px;
141
+ width: 300px;
142
+ padding: 12px;
143
+ letter-spacing: 0.4px;
144
+ touch-action: manipulation;
145
+ color: #333;
146
+ height: 40px;
147
+ display: flex;
148
+ justify-content: space-between;
149
+ align-items: center;
150
+ padding: 8px;
151
+ border-radius: 4px 4px 0 0;
152
+ border: 0;
153
+ border-bottom: 1px solid var(--dscl-forms-underline, #747474);
154
+ background: var(--dscl-forms-bg, #fbfbfb);
155
+ white-space: nowrap;
156
+ cursor: pointer;
157
+ }
158
+ .org-selection .intranet {
159
+ background-color: var(--purple-50);
160
+ }
161
+ .org-selection .dropdown .org-option {
162
+ display: block;
163
+ padding: 12px;
164
+ min-height: 40px;
165
+ line-height: 16px;
166
+ text-decoration: none;
167
+ text-transform: none;
168
+ position: relative;
169
+ cursor: pointer;
170
+ }
171
+ .org-selection .dropdown .org-option:focus-visible, .org-selection .dropdown .org-option:hover {
172
+ background-color: #F8F6FC;
173
+ }
174
+ .org-selection .custom-search {
175
+ margin: 8px 16px;
176
+ }
177
+ .org-selection .item-flex {
178
+ display: flex;
179
+ gap: 10px;
180
+ align-items: center;
181
+ width: 100%;
182
+ justify-content: space-between;
183
+ }
184
+ .org-selection .intranet {
185
+ display: inline-flex;
186
+ align-items: center;
187
+ background-color: var(--purple-50);
188
+ padding: 2px 4px;
189
+ color: white;
190
+ border-radius: 4px;
191
+ }
192
+ .org-selection .intranet svg {
193
+ margin-right: 4px;
194
+ }
195
+ .org-selection .intranet.selected {
196
+ background-color: var(--grey-50);
197
+ }
198
+ </style>
@@ -0,0 +1,187 @@
1
+ <template>
2
+ <nav
3
+ class="navbar"
4
+ role="navigation"
5
+ aria-label="Main"
6
+ :class="{ expanded }"
7
+ >
8
+ <a
9
+ ref="skip-to-content"
10
+ href="#main-content-section"
11
+ class="skip-to-content"
12
+ data-testid="skip-to-content"
13
+ >
14
+ {{ $t('navigation.skipToContent') }}
15
+ </a>
16
+ <div class="navbar--content">
17
+ <ul class="navbar-applications">
18
+ <li v-for="application of applications" :key="application.id">
19
+ <NavSidebarSection
20
+ :application="application"
21
+ :active="currentApplication === application.text"
22
+ :navbar-expanded="expanded"
23
+ >
24
+ <slot v-if="currentApplication === application.text" />
25
+ </NavSidebarSection>
26
+ </li>
27
+ <li>
28
+ <NavHelpArticles
29
+ v-if="showHelpArticles"
30
+ :navbar-expanded="expanded"
31
+ :help-article-options="helpArticleOptions"
32
+ />
33
+ </li>
34
+ </ul>
35
+
36
+ </div>
37
+ <div class="navbar--footer">
38
+ <NavImpersonateInfoPanel
39
+ v-if="true"
40
+ :impersonated-user="impersonatedUser"
41
+ :navbar-expanded="expanded"
42
+ />
43
+ </div>
44
+
45
+ <slot name="logo">
46
+ <NuxtLink :to="homepageUrl">
47
+ <div class="navbar--logo">
48
+ <img v-if="expanded" :src="logo.src" :alt="logo.alt">
49
+ <img v-else :src="logo.iconSrc" :alt="logo.alt">
50
+ </div>
51
+ </NuxtLink>
52
+ </slot>
53
+ </nav>
54
+ </template>
55
+
56
+ <script setup lang="ts">
57
+ import { useNuxtApp } from '#imports';
58
+ const { $t } = useNuxtApp();
59
+
60
+ interface IApplications {
61
+ id: number;
62
+ text: string;
63
+ url: string;
64
+ img_src: string;
65
+ }
66
+
67
+ interface IUser {
68
+ show: boolean;
69
+ email: string;
70
+ phone_number: string;
71
+ client: string;
72
+ admin_email: string;
73
+ }
74
+
75
+ interface ILogo {
76
+ alt: string;
77
+ src: string;
78
+ iconSrc: string;
79
+ }
80
+
81
+ interface ISidebarProps {
82
+ applications: Array<IApplications>;
83
+ currentApplication?: IApplications['text'];
84
+ expanded?: boolean;
85
+ homepageUrl?: string;
86
+ showHelpArticles?: boolean;
87
+ helpArticleOptions?: Array<any>;
88
+ impersonatedUser?: IUser;
89
+ logo: ILogo;
90
+ }
91
+
92
+ withDefaults(defineProps<ISidebarProps>(), {
93
+ applications: () => [],
94
+ currentApplication: 'media',
95
+ homepageUrl: '/',
96
+ showHelpArticles: true,
97
+ helpArticleOptions: () => [],
98
+ impersonatedUser: {
99
+ show: false,
100
+ email: "staff3@lms.com",
101
+ phone_number :null,
102
+ client: "Sales Demo",
103
+ admin_email: null
104
+ },
105
+ logo: {
106
+ alt: 'Thrillshare',
107
+ src: 'logo.svg',
108
+ iconSrc: 'logo.svg',
109
+ }
110
+ })
111
+ </script>
112
+
113
+ <style scoped>
114
+ /* * {
115
+ outline: 2px solid red;
116
+ } */
117
+ .navbar {
118
+ grid-area: navsidebar;
119
+ display: grid;
120
+ grid-template-rows: 1fr auto auto;
121
+ font: var(--font-regular);
122
+ background-color: var(--dscl-nav-background-color, var(--purple-70));
123
+ color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
124
+ transition: min-width 0.3s ease-in-out, translate 0.2s ease-in-out;
125
+ height: 100vh;
126
+ overflow-y: auto;
127
+ min-width: 0px;
128
+ translate: -256px;
129
+ }
130
+ .navbar a:focus-visible {
131
+ outline: var(--orange) auto 2px;
132
+ outline-offset: 0px;
133
+ box-shadow: inset 0 0 0px 4px var(--primary-white);
134
+ }
135
+ .navbar.expanded {
136
+ transition: min-width 0.3s ease-in-out, translate 0.2s ease-in-out;
137
+ min-width: 256px;
138
+ translate: 0px;
139
+ }
140
+ .navbar--logo {
141
+ padding: 16px;
142
+ background-color: var(--dscl-nav-background-color, var(--purple-70));
143
+ }
144
+ .navbar--content {
145
+ display: flex;
146
+ flex-direction: column;
147
+ flex-basis: auto;
148
+ margin-top: 24px;
149
+ background-color: var(--dscl-nav-background-color, var(--purple-70));
150
+ }
151
+ .navbar--content ul {
152
+ list-style: none;
153
+ padding: 0;
154
+ margin: 0;
155
+ max-width: 256px;
156
+ }
157
+ .navbar--footer {
158
+ display: flex;
159
+ flex-direction: column;
160
+ }
161
+ .navbar .skip-to-content {
162
+ overflow: hidden;
163
+ padding: 15px 23px 14px;
164
+ position: absolute;
165
+ left: 5px;
166
+ top: 5px;
167
+ width: auto;
168
+ height: auto;
169
+ background-color: #f1f1f1;
170
+ border-radius: 3px;
171
+ text-decoration: none;
172
+ font-size: 14px;
173
+ font-weight: bold;
174
+ text-align: center;
175
+ z-index: 20;
176
+ opacity: 0;
177
+ pointer-events: none;
178
+ }
179
+ .navbar .skip-to-content:focus-visible {
180
+ --native-outline-blue: #0000FF;
181
+ opacity: 1;
182
+ pointer-events: auto;
183
+ outline: var(--native-outline-blue) auto 2px;
184
+ outline-offset: 0px;
185
+ box-shadow: inset 0 0 0px 4px var(--primary-white);
186
+ }
187
+ </style>
@@ -0,0 +1,40 @@
1
+ <template>
2
+ <NuxtLink class="a-navbar-item">
3
+ <slot />
4
+ </NuxtLink>
5
+ </template>
6
+
7
+ <style scoped>
8
+ .a-navbar-item {
9
+ color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
10
+ margin: 4px 16px;
11
+ display: flex;
12
+ align-items: center;
13
+ text-decoration: none;
14
+ text-transform: capitalize;
15
+ padding: 4px;
16
+ border-radius: 8px;
17
+ }
18
+ .a-navbar-item:focus-visible {
19
+ outline: var(--orange) auto 2px;
20
+ outline-offset: 0px;
21
+ box-shadow: inset 0 0 0px 4px var(--primary-white);
22
+ }
23
+ .a-navbar-item.nuxt-link-exact-active, .a-navbar-item.router-link-exact-active {
24
+ background-color: var(--dscl-nav-active-background-color, #463e59);
25
+ font-weight: 500;
26
+ /* box-shadow: inset -4px 0px 0px 0px var(--orange-40); */
27
+ }
28
+ .a-navbar-item.nuxt-link-exact-active svg path, .a-navbar-item.router-link-exact-active svg path {
29
+ stroke-width: 1.5px;
30
+ }
31
+ .a-navbar-item:hover {
32
+ background-color: var(--dscl-nav-active-background-color, #463e59);
33
+ /* box-shadow: inset -4px 0px 0px 0px var(--orange-40); */
34
+ }
35
+ .a-navbar-item:focus-visible {
36
+ outline: var(--orange) auto 2px;
37
+ outline-offset: 0px;
38
+ box-shadow: inset 0 0 0px 4px var(--primary-white);
39
+ }
40
+ </style>