@apptegy/nuxt-navigation 1.0.0-alpha.0 → 1.0.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/README.md +70 -5
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +2 -3
- package/dist/module.d.ts +7 -0
- package/dist/module.json +2 -5
- package/dist/module.mjs +3 -7
- package/dist/runtime/assets/icons/24/Minus.svg +5 -0
- package/dist/runtime/assets/icons/24/Plus.svg +5 -0
- package/dist/runtime/assets/thrillshare-logo-white.svg +1 -22
- package/dist/runtime/components/Nav/Avatar.vue +23 -46
- package/dist/runtime/components/Nav/Header.vue +159 -161
- package/dist/runtime/components/Nav/HelpArticles.vue +61 -119
- package/dist/runtime/components/Nav/ImpersonateInfoPanel.vue +32 -45
- package/dist/runtime/components/Nav/OrgSelect.vue +117 -162
- package/dist/runtime/components/Nav/Sidebar.vue +109 -216
- package/dist/runtime/components/Nav/SidebarItem.vue +17 -44
- package/dist/runtime/components/Nav/SidebarSection.vue +38 -88
- package/dist/runtime/components/Nav/SubMenu.vue +4 -0
- package/dist/runtime/components/Nav/SubMenuItem.vue +7 -6
- package/dist/runtime/composables/accessibleActions.d.ts +33 -0
- package/dist/runtime/composables/accessibleActions.js +195 -0
- package/dist/types.d.mts +1 -3
- package/dist/types.d.ts +1 -0
- package/package.json +27 -26
- package/dist/runtime/api/brand.d.ts +0 -3
- package/dist/runtime/api/brand.js +0 -8
- package/dist/runtime/assets/checkmark.svg +0 -3
- package/dist/runtime/assets/hamburger.svg +0 -3
- package/dist/runtime/assets/iconPaths.json +0 -13
- package/dist/runtime/assets/icons/24/Metadata.svg +0 -4
- package/dist/runtime/assets/impersonation.svg +0 -6
- package/dist/runtime/assets/poweredby-icon.svg +0 -3
- package/dist/runtime/assets/poweredby.svg +0 -19
- package/dist/runtime/components/Nav/Avatar.vue.d.ts +0 -16
- package/dist/runtime/components/Nav/Breadcrumb.vue.d.ts +0 -12
- package/dist/runtime/components/Nav/Header.vue.d.ts +0 -39
- package/dist/runtime/components/Nav/HelpArticles.vue.d.ts +0 -14
- package/dist/runtime/components/Nav/Icons/ApptegyLogo.vue +0 -30
- package/dist/runtime/components/Nav/Icons/ApptegyLogo.vue.d.ts +0 -14
- package/dist/runtime/components/Nav/Icons/Pinned.vue +0 -9
- package/dist/runtime/components/Nav/Icons/Pinned.vue.d.ts +0 -2
- package/dist/runtime/components/Nav/Icons/SidebarToggle.vue +0 -15
- package/dist/runtime/components/Nav/Icons/SidebarToggle.vue.d.ts +0 -2
- package/dist/runtime/components/Nav/Icons/ThrillshareLogo.vue +0 -25
- package/dist/runtime/components/Nav/Icons/ThrillshareLogo.vue.d.ts +0 -2
- package/dist/runtime/components/Nav/Icons/Unpinned.vue +0 -9
- package/dist/runtime/components/Nav/Icons/Unpinned.vue.d.ts +0 -2
- package/dist/runtime/components/Nav/Icons/UserDropdownMenu.vue +0 -5
- package/dist/runtime/components/Nav/Icons/UserDropdownMenu.vue.d.ts +0 -2
- package/dist/runtime/components/Nav/ImpersonateInfoPanel.vue.d.ts +0 -12
- package/dist/runtime/components/Nav/OrgSelect.vue.d.ts +0 -16
- package/dist/runtime/components/Nav/Sidebar.vue.d.ts +0 -53
- package/dist/runtime/components/Nav/SidebarItem.vue.d.ts +0 -20
- package/dist/runtime/components/Nav/SidebarSection.vue.d.ts +0 -18
- package/dist/runtime/components/Nav/SidebarToggle.vue +0 -28
- package/dist/runtime/components/Nav/SidebarToggle.vue.d.ts +0 -2
- package/dist/runtime/components/Nav/SubMenu.vue.d.ts +0 -12
- package/dist/runtime/components/Nav/SubMenuItem.vue.d.ts +0 -22
- package/dist/runtime/components/Nav/UserDropdown.vue +0 -178
- package/dist/runtime/components/Nav/UserDropdown.vue.d.ts +0 -19
- package/dist/runtime/composables/useBranding.d.ts +0 -22
- package/dist/runtime/composables/useBranding.js +0 -35
- package/dist/runtime/composables/useDropdown.d.ts +0 -19
- package/dist/runtime/composables/useDropdown.js +0 -236
- package/dist/runtime/composables/useSidebar.d.ts +0 -5
- package/dist/runtime/composables/useSidebar.js +0 -13
- package/dist/runtime/types/index.d.ts +0 -13
- package/dist/runtime/types/index.js +0 -0
- package/locale/en.json +0 -20
- package/locale/index.js +0 -7
- /package/dist/runtime/assets/{icon.svg → thrillshare-icon-white.svg} +0 -0
|
@@ -4,250 +4,162 @@
|
|
|
4
4
|
role="navigation"
|
|
5
5
|
aria-label="Main"
|
|
6
6
|
:class="{ expanded }"
|
|
7
|
-
:style="getBrandingStyles"
|
|
8
7
|
>
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
<a
|
|
9
|
+
ref="skip-to-content"
|
|
10
|
+
href="#main-content-section"
|
|
11
11
|
class="skip-to-content"
|
|
12
12
|
data-testid="skip-to-content"
|
|
13
13
|
>
|
|
14
|
-
{{ $t(
|
|
14
|
+
{{ $t('navigation.skipToContent') }}
|
|
15
15
|
</a>
|
|
16
|
-
<div
|
|
17
|
-
<
|
|
18
|
-
v-
|
|
19
|
-
|
|
20
|
-
>
|
|
21
|
-
<slot name="switcher" />
|
|
22
|
-
</div>
|
|
23
|
-
<div class="navbar--content">
|
|
24
|
-
<ul class="navbar-applications">
|
|
25
|
-
<li
|
|
26
|
-
v-for="application of applications"
|
|
27
|
-
:key="application.id"
|
|
28
|
-
>
|
|
29
|
-
<NavSidebarSection
|
|
30
|
-
v-if="expanded || currentApplication === application.text || isMobile"
|
|
16
|
+
<div class="navbar--content">
|
|
17
|
+
<ul class="navbar-applications">
|
|
18
|
+
<li v-for="application of applications" :key="application.id">
|
|
19
|
+
<NavSidebarSection
|
|
31
20
|
:application="application"
|
|
32
21
|
:active="currentApplication === application.text"
|
|
33
|
-
:
|
|
22
|
+
:navbar-expanded="expanded"
|
|
34
23
|
>
|
|
35
24
|
<slot v-if="currentApplication === application.text" />
|
|
36
25
|
</NavSidebarSection>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
:collapsed="!expanded && !isMobile"
|
|
47
|
-
/>
|
|
48
|
-
<NavImpersonateInfoPanel
|
|
49
|
-
v-if="impersonatedUser.show"
|
|
50
|
-
:impersonated-user="impersonatedUser"
|
|
51
|
-
/>
|
|
26
|
+
</li>
|
|
27
|
+
<li>
|
|
28
|
+
<NavHelpArticles
|
|
29
|
+
v-if="showHelpArticles"
|
|
30
|
+
:navbar-expanded="expanded"
|
|
31
|
+
:help-article-options="helpArticleOptions"
|
|
32
|
+
/>
|
|
33
|
+
</li>
|
|
34
|
+
</ul>
|
|
52
35
|
|
|
53
|
-
<slot name="logo">
|
|
54
|
-
<template v-if="brand">
|
|
55
|
-
<NuxtLink
|
|
56
|
-
v-if="expanded ? logo.src : logo.iconSrc"
|
|
57
|
-
:to="homepageUrl"
|
|
58
|
-
>
|
|
59
|
-
<div
|
|
60
|
-
v-if="!isMobile && expanded"
|
|
61
|
-
class="navbar--footer-logo"
|
|
62
|
-
>
|
|
63
|
-
<img
|
|
64
|
-
:src="expanded ? logo.src : logo.iconSrc"
|
|
65
|
-
:alt="logo.alt || $t('navigation.logoAlt')"
|
|
66
|
-
/>
|
|
67
|
-
</div>
|
|
68
|
-
</NuxtLink>
|
|
69
|
-
</template>
|
|
70
|
-
</slot>
|
|
71
|
-
</div>
|
|
72
36
|
</div>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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>
|
|
81
53
|
</nav>
|
|
82
54
|
</template>
|
|
83
55
|
|
|
84
|
-
<script setup>
|
|
85
|
-
import { useSidebar, useBranding, useNuxtApp, computed, watch } from "#imports";
|
|
86
|
-
import { useWindowSize } from "@vueuse/core";
|
|
56
|
+
<script setup lang="ts">
|
|
87
57
|
const { $t } = useNuxtApp();
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
58
|
+
|
|
59
|
+
interface IApplications {
|
|
60
|
+
id: number;
|
|
61
|
+
text: string;
|
|
62
|
+
url: string;
|
|
63
|
+
img_src: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface IUser {
|
|
67
|
+
show: boolean;
|
|
68
|
+
email: string;
|
|
69
|
+
phone_number: string;
|
|
70
|
+
client: string;
|
|
71
|
+
admin_email: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface ILogo {
|
|
75
|
+
alt: string;
|
|
76
|
+
src: string;
|
|
77
|
+
iconSrc: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface ISidebarProps {
|
|
81
|
+
applications: Array<IApplications>;
|
|
82
|
+
currentApplication?: IApplications['text'];
|
|
83
|
+
expanded?: boolean;
|
|
84
|
+
homepageUrl?: string;
|
|
85
|
+
showHelpArticles?: boolean;
|
|
86
|
+
helpArticleOptions?: Array<any>;
|
|
87
|
+
impersonatedUser?: IUser;
|
|
88
|
+
logo: ILogo;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
withDefaults(defineProps<ISidebarProps>(), {
|
|
92
|
+
applications: () => [],
|
|
93
|
+
currentApplication: 'media',
|
|
94
|
+
homepageUrl: '/',
|
|
95
|
+
showHelpArticles: true,
|
|
96
|
+
helpArticleOptions: () => [],
|
|
97
|
+
impersonatedUser: {
|
|
96
98
|
show: false,
|
|
97
99
|
email: "staff3@lms.com",
|
|
98
|
-
phone_number:
|
|
100
|
+
phone_number :null,
|
|
99
101
|
client: "Sales Demo",
|
|
100
|
-
admin_email:
|
|
101
|
-
}) },
|
|
102
|
-
logo: { type: Object, required: false, default: () => ({
|
|
103
|
-
alt: "",
|
|
104
|
-
src: "poweredby.svg",
|
|
105
|
-
iconSrc: "poweredby-icon.svg"
|
|
106
|
-
}) },
|
|
107
|
-
skipToContent: { type: String, required: true, default: "#main-content-section" },
|
|
108
|
-
fixed: { type: Boolean, required: false, default: false },
|
|
109
|
-
settingsRoute: { type: String, required: true, default: "" },
|
|
110
|
-
schoolWebsite: { type: String, required: true, default: "" }
|
|
111
|
-
});
|
|
112
|
-
const emit = defineEmits(["toggle-expand"]);
|
|
113
|
-
const { state: expanded } = useSidebar();
|
|
114
|
-
const { brand, getBrandingStyles } = await useBranding(props.clientId);
|
|
115
|
-
const { width: windowWidth } = useWindowSize();
|
|
116
|
-
const isMobile = computed(() => windowWidth.value < 600);
|
|
117
|
-
watch(expanded, (value) => {
|
|
118
|
-
emit("toggle-expand", value ? 240 : 64);
|
|
119
|
-
});
|
|
120
|
-
watch(
|
|
121
|
-
isMobile,
|
|
122
|
-
(value) => {
|
|
123
|
-
if (value) expanded.value = true;
|
|
102
|
+
admin_email: null
|
|
124
103
|
},
|
|
125
|
-
|
|
126
|
-
|
|
104
|
+
logo: {
|
|
105
|
+
alt: 'Thrillshare',
|
|
106
|
+
src: 'logo.svg',
|
|
107
|
+
iconSrc: 'logo.svg',
|
|
108
|
+
}
|
|
109
|
+
})
|
|
127
110
|
</script>
|
|
128
111
|
|
|
129
112
|
<style scoped>
|
|
113
|
+
/* * {
|
|
114
|
+
outline: 2px solid red;
|
|
115
|
+
} */
|
|
130
116
|
.navbar {
|
|
131
117
|
grid-area: navsidebar;
|
|
118
|
+
display: grid;
|
|
119
|
+
grid-template-rows: 1fr auto auto;
|
|
132
120
|
font: var(--font-regular);
|
|
133
|
-
color: var(--nav-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
overflow:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
position: relative;
|
|
141
|
-
}
|
|
142
|
-
.navbar::-webkit-scrollbar {
|
|
143
|
-
display: none;
|
|
121
|
+
background-color: var(--dscl-nav-background-color, var(--purple-70));
|
|
122
|
+
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|
|
123
|
+
transition: min-width 0.3s ease-in-out, translate 0.2s ease-in-out;
|
|
124
|
+
height: 100vh;
|
|
125
|
+
overflow-y: auto;
|
|
126
|
+
min-width: 0px;
|
|
127
|
+
translate: -256px;
|
|
144
128
|
}
|
|
145
129
|
.navbar a:focus-visible {
|
|
146
130
|
outline: var(--orange) auto 2px;
|
|
147
131
|
outline-offset: 0px;
|
|
148
132
|
box-shadow: inset 0 0 0px 4px var(--primary-white);
|
|
149
133
|
}
|
|
150
|
-
.navbar
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
height: 100%;
|
|
155
|
-
overflow-y: auto;
|
|
156
|
-
overflow-x: hidden;
|
|
157
|
-
}
|
|
158
|
-
.navbar--wrapper.fixed {
|
|
159
|
-
position: fixed;
|
|
160
|
-
top: 0;
|
|
161
|
-
left: 0;
|
|
162
|
-
bottom: 0;
|
|
163
|
-
height: unset;
|
|
164
|
-
overflow-y: unset;
|
|
165
|
-
z-index: 10;
|
|
166
|
-
}
|
|
167
|
-
.navbar--header {
|
|
168
|
-
border-bottom: 1px solid var(--nav-border-colors, #dfdfdf);
|
|
169
|
-
}
|
|
170
|
-
.navbar--header .header-actions {
|
|
171
|
-
padding: 12px 16px;
|
|
172
|
-
display: inline-flex;
|
|
173
|
-
align-items: center;
|
|
174
|
-
width: 64px;
|
|
175
|
-
min-height: 64px;
|
|
176
|
-
justify-content: space-between;
|
|
177
|
-
box-sizing: border-box;
|
|
134
|
+
.navbar.expanded {
|
|
135
|
+
transition: min-width 0.3s ease-in-out, translate 0.2s ease-in-out;
|
|
136
|
+
min-width: 256px;
|
|
137
|
+
translate: 0px;
|
|
178
138
|
}
|
|
179
|
-
.navbar--
|
|
180
|
-
|
|
139
|
+
.navbar--logo {
|
|
140
|
+
padding: 16px;
|
|
141
|
+
background-color: var(--dscl-nav-background-color, var(--purple-70));
|
|
181
142
|
}
|
|
182
143
|
.navbar--content {
|
|
183
144
|
display: flex;
|
|
184
145
|
flex-direction: column;
|
|
146
|
+
flex-basis: auto;
|
|
147
|
+
margin-top: 24px;
|
|
148
|
+
background-color: var(--dscl-nav-background-color, var(--purple-70));
|
|
185
149
|
}
|
|
186
150
|
.navbar--content ul {
|
|
187
151
|
list-style: none;
|
|
188
|
-
padding:
|
|
152
|
+
padding: 0;
|
|
189
153
|
margin: 0;
|
|
190
|
-
width:
|
|
191
|
-
}
|
|
192
|
-
.navbar--collapse-btn {
|
|
193
|
-
/* Fallback: fixed 32px from bottom, at the sidebar's right edge */
|
|
194
|
-
position: absolute;
|
|
195
|
-
bottom: 32px;
|
|
196
|
-
right: 0;
|
|
197
|
-
transform: translateX(50%);
|
|
198
|
-
/* Anchor API: pin exactly to the content/footer seam */
|
|
199
|
-
width: 32px;
|
|
200
|
-
height: 32px;
|
|
201
|
-
border-radius: 50%;
|
|
202
|
-
background-color: var(--primary-white, #fff);
|
|
203
|
-
border: 1px solid #e0e0e0;
|
|
204
|
-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
205
|
-
cursor: pointer;
|
|
206
|
-
display: flex;
|
|
207
|
-
align-items: center;
|
|
208
|
-
justify-content: center;
|
|
209
|
-
font-size: 16px;
|
|
210
|
-
color: #555;
|
|
211
|
-
z-index: 10;
|
|
212
|
-
}
|
|
213
|
-
@supports (anchor-name: --test) {
|
|
214
|
-
.navbar--collapse-btn {
|
|
215
|
-
position: fixed;
|
|
216
|
-
position-anchor: --nav-footer;
|
|
217
|
-
top: anchor(top);
|
|
218
|
-
left: anchor(right);
|
|
219
|
-
bottom: unset;
|
|
220
|
-
right: unset;
|
|
221
|
-
transform: translate(-50%, -50%);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
.navbar--collapse-btn:hover {
|
|
225
|
-
background-color: #f5f5f5;
|
|
154
|
+
max-width: 256px;
|
|
226
155
|
}
|
|
227
156
|
.navbar--footer {
|
|
228
|
-
anchor-name: --nav-footer;
|
|
229
157
|
display: flex;
|
|
230
158
|
flex-direction: column;
|
|
231
159
|
}
|
|
232
|
-
.navbar--footer-logo {
|
|
233
|
-
padding: 8px 16px 16px 16px;
|
|
234
|
-
display: flex;
|
|
235
|
-
justify-content: center;
|
|
236
|
-
}
|
|
237
|
-
.navbar--footer-logo img {
|
|
238
|
-
height: 32px;
|
|
239
|
-
width: clamp(0px, 100%, 180px);
|
|
240
|
-
}
|
|
241
|
-
.navbar.expanded {
|
|
242
|
-
transition: width 0.3s ease;
|
|
243
|
-
width: 240px;
|
|
244
|
-
}
|
|
245
|
-
.navbar.expanded .navbar--content ul {
|
|
246
|
-
width: 240px;
|
|
247
|
-
}
|
|
248
160
|
.navbar .skip-to-content {
|
|
249
161
|
overflow: hidden;
|
|
250
|
-
padding:
|
|
162
|
+
padding: 15px 23px 14px;
|
|
251
163
|
position: absolute;
|
|
252
164
|
left: 5px;
|
|
253
165
|
top: 5px;
|
|
@@ -264,30 +176,11 @@ watch(
|
|
|
264
176
|
pointer-events: none;
|
|
265
177
|
}
|
|
266
178
|
.navbar .skip-to-content:focus-visible {
|
|
267
|
-
--native-outline-blue: #
|
|
179
|
+
--native-outline-blue: #0000FF;
|
|
268
180
|
opacity: 1;
|
|
269
181
|
pointer-events: auto;
|
|
270
182
|
outline: var(--native-outline-blue) auto 2px;
|
|
271
183
|
outline-offset: 0px;
|
|
272
184
|
box-shadow: inset 0 0 0px 4px var(--primary-white);
|
|
273
185
|
}
|
|
274
|
-
.navbar .no-link-style {
|
|
275
|
-
text-decoration: none;
|
|
276
|
-
color: inherit;
|
|
277
|
-
max-width: 200px;
|
|
278
|
-
}
|
|
279
|
-
.navbar .hamburger-button {
|
|
280
|
-
background: none;
|
|
281
|
-
border: none;
|
|
282
|
-
cursor: pointer;
|
|
283
|
-
padding: 0;
|
|
284
|
-
margin: 0;
|
|
285
|
-
display: flex;
|
|
286
|
-
align-items: center;
|
|
287
|
-
}
|
|
288
|
-
.navbar .hamburger-button svg {
|
|
289
|
-
cursor: pointer;
|
|
290
|
-
height: 24px;
|
|
291
|
-
width: 24px;
|
|
292
|
-
}
|
|
293
186
|
</style>
|
|
@@ -1,67 +1,40 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useSidebar, computed, resolveComponent } from "#imports";
|
|
3
|
-
const props = defineProps({
|
|
4
|
-
icon: { type: String, required: false },
|
|
5
|
-
active: { type: Boolean, required: false },
|
|
6
|
-
as: { type: String, required: false },
|
|
7
|
-
name: { type: String, required: false }
|
|
8
|
-
});
|
|
9
|
-
const { state: expanded } = useSidebar();
|
|
10
|
-
const component = computed(() => props.as || resolveComponent("NuxtLink"));
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
1
|
<template>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
:class="{ expanded, active, collapsed: !expanded }"
|
|
18
|
-
>
|
|
19
|
-
<slot name="icon">
|
|
20
|
-
<Icon
|
|
21
|
-
class="icon"
|
|
22
|
-
:name="`lucide:${icon}`"
|
|
23
|
-
size="24"
|
|
24
|
-
/>
|
|
25
|
-
</slot>
|
|
26
|
-
<slot v-if="expanded" />
|
|
27
|
-
</component>
|
|
2
|
+
<NuxtLink class="a-navbar-item">
|
|
3
|
+
<slot />
|
|
4
|
+
</NuxtLink>
|
|
28
5
|
</template>
|
|
29
6
|
|
|
30
7
|
<style scoped>
|
|
31
8
|
.a-navbar-item {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
margin: 2px 8px;
|
|
9
|
+
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|
|
10
|
+
margin: 4px 16px;
|
|
35
11
|
display: flex;
|
|
36
12
|
align-items: center;
|
|
37
13
|
text-decoration: none;
|
|
38
14
|
text-transform: capitalize;
|
|
39
|
-
padding:
|
|
40
|
-
border: none;
|
|
15
|
+
padding: 4px;
|
|
41
16
|
border-radius: 8px;
|
|
42
|
-
gap: 8px;
|
|
43
|
-
width: calc(100% - 16px);
|
|
44
|
-
box-sizing: border-box;
|
|
45
|
-
user-select: none;
|
|
46
|
-
}
|
|
47
|
-
.a-navbar-item.collapsed {
|
|
48
|
-
justify-content: center;
|
|
49
|
-
font-size: 16px;
|
|
50
17
|
}
|
|
51
18
|
.a-navbar-item:focus-visible {
|
|
52
19
|
outline: var(--orange) auto 2px;
|
|
53
20
|
outline-offset: 0px;
|
|
54
21
|
box-shadow: inset 0 0 0px 4px var(--primary-white);
|
|
55
22
|
}
|
|
56
|
-
.a-navbar-item.
|
|
57
|
-
background-color: var(--nav-
|
|
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);
|
|
58
25
|
font-weight: 500;
|
|
59
|
-
|
|
26
|
+
/* box-shadow: inset -4px 0px 0px 0px var(--orange-40); */
|
|
60
27
|
}
|
|
61
|
-
.a-navbar-item.
|
|
28
|
+
.a-navbar-item.nuxt-link-exact-active svg path, .a-navbar-item.router-link-exact-active svg path {
|
|
62
29
|
stroke-width: 1.5px;
|
|
63
30
|
}
|
|
64
31
|
.a-navbar-item:hover {
|
|
65
|
-
background-color: var(--nav-
|
|
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);
|
|
66
39
|
}
|
|
67
40
|
</style>
|
|
@@ -1,104 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="a-nav-section"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
v-if="!collapsed"
|
|
8
|
-
class="a-nav-section--link"
|
|
9
|
-
:to="applicationUrl"
|
|
10
|
-
:aria-label="appText"
|
|
11
|
-
>
|
|
12
|
-
<span v-if="expanded">{{ appText }}</span>
|
|
13
|
-
<Icon
|
|
14
|
-
v-if="expanded"
|
|
15
|
-
name="lucide:chevron-up"
|
|
16
|
-
size="16"
|
|
17
|
-
:class="['caret-icon', { collapse: !isOpen }]"
|
|
18
|
-
@click.prevent="isOpen = !isOpen"
|
|
19
|
-
/>
|
|
2
|
+
<div class="a-nav-section" :class="{ active }">
|
|
3
|
+
<NuxtLink class="a-nav-section--link" :to="application.url">
|
|
4
|
+
<img v-if="application.img_src" :src="iconUrl" alt="icon">
|
|
5
|
+
<span>{{ application.text.replace("_", " ") }}</span>
|
|
6
|
+
<a-icon v-if="active" class="caret-icon" icon="16:carret-up" />
|
|
20
7
|
</NuxtLink>
|
|
21
|
-
<div
|
|
8
|
+
<div class="a-nav-section--content">
|
|
22
9
|
<slot />
|
|
23
10
|
</div>
|
|
24
11
|
</div>
|
|
25
12
|
</template>
|
|
26
13
|
|
|
27
|
-
<script setup>
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
const props = defineProps
|
|
31
|
-
application:
|
|
32
|
-
active:
|
|
33
|
-
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const isNewslettersUrlEnabled = computed(() => {
|
|
42
|
-
return Boolean($ld?.flags?.engageToNewslettersUrlChange);
|
|
43
|
-
});
|
|
44
|
-
const appText = computed(() => {
|
|
45
|
-
const { text } = props.application || {};
|
|
46
|
-
if (text.toLowerCase() === ENGAGE_APP_TEXT && isEngageRenameEnabled.value) {
|
|
47
|
-
return "Newsletters";
|
|
48
|
-
}
|
|
49
|
-
return text.replace("_", " ");
|
|
50
|
-
});
|
|
51
|
-
const applicationUrl = computed(() => {
|
|
52
|
-
const { text, url } = props.application || {};
|
|
53
|
-
if (props.active) return "";
|
|
54
|
-
if (text.toLowerCase() === ENGAGE_APP_TEXT && isNewslettersUrlEnabled.value) {
|
|
55
|
-
return url.replace("engage", "newsletters");
|
|
56
|
-
}
|
|
57
|
-
return url;
|
|
58
|
-
});
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { computed } from 'vue';
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
application: IApplication;
|
|
19
|
+
active: boolean;
|
|
20
|
+
navbarExpanded: boolean;
|
|
21
|
+
}>();
|
|
22
|
+
|
|
23
|
+
const iconUrl = computed(() =>
|
|
24
|
+
props.active
|
|
25
|
+
? props.application.img_src?.replace(".svg", "_active.svg")
|
|
26
|
+
: props.application.img_src,
|
|
27
|
+
);
|
|
59
28
|
</script>
|
|
60
29
|
|
|
61
30
|
<style scoped>
|
|
62
31
|
.a-nav-section {
|
|
63
|
-
|
|
32
|
+
box-shadow: inset 0px -1px 0px 0px var(--dscl-nav-section-border-bottom-color, var(--purple-65));
|
|
33
|
+
cursor: pointer;
|
|
64
34
|
min-height: 48px;
|
|
35
|
+
/* &--content {
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
} */
|
|
65
38
|
}
|
|
66
|
-
.a-nav-section
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
position: absolute;
|
|
70
|
-
bottom: 0;
|
|
71
|
-
left: 12px;
|
|
72
|
-
right: 12px;
|
|
73
|
-
height: 1px;
|
|
74
|
-
background-color: var(--nav-border-colors, #dfdfdf);
|
|
75
|
-
}
|
|
76
|
-
.a-nav-section--content {
|
|
77
|
-
display: flex;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
max-height: 100vh;
|
|
80
|
-
overflow: auto;
|
|
81
|
-
transition: max-height 0.3s ease;
|
|
82
|
-
}
|
|
83
|
-
.a-nav-section--content.collapse {
|
|
84
|
-
max-height: 0;
|
|
39
|
+
.a-nav-section.active {
|
|
40
|
+
box-shadow: inset 0px -1px 0px 0px var(--dscl-nav-section-border-bottom-color, var(--purple-65));
|
|
41
|
+
padding-bottom: 4px;
|
|
85
42
|
}
|
|
86
43
|
.a-nav-section--link {
|
|
87
44
|
display: flex;
|
|
88
|
-
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
width: 100%;
|
|
91
|
-
min-height: 48px;
|
|
92
|
-
padding: 0 16px;
|
|
93
|
-
color: inherit;
|
|
45
|
+
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|
|
94
46
|
text-decoration: none;
|
|
47
|
+
min-height: 48px;
|
|
48
|
+
align-items: center;
|
|
95
49
|
font-size: 12px;
|
|
96
50
|
letter-spacing: 1.4px;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
.a-nav-section--link:not([href]) {
|
|
101
|
-
cursor: default;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
padding: 0px 16px;
|
|
53
|
+
width: 100%;
|
|
102
54
|
}
|
|
103
55
|
.a-nav-section--link:focus-visible {
|
|
104
56
|
outline: var(--orange) auto 2px;
|
|
@@ -106,15 +58,13 @@ const applicationUrl = computed(() => {
|
|
|
106
58
|
box-shadow: inset 0 0 0px 4px var(--primary-white);
|
|
107
59
|
}
|
|
108
60
|
.a-nav-section--link span {
|
|
109
|
-
|
|
61
|
+
margin: 0 8px;
|
|
110
62
|
white-space: nowrap;
|
|
111
|
-
|
|
112
|
-
|
|
63
|
+
text-transform: uppercase;
|
|
64
|
+
width: inherit;
|
|
113
65
|
}
|
|
114
66
|
.a-nav-section--link .caret-icon {
|
|
115
|
-
|
|
116
|
-
flex-shrink: 0;
|
|
117
|
-
margin-left: auto;
|
|
67
|
+
font-size: 24px;
|
|
118
68
|
transition: transform 0.2s ease-in-out;
|
|
119
69
|
}
|
|
120
70
|
.a-nav-section--link .caret-icon.collapse {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
defineProps({
|
|
3
3
|
icon: {
|
|
4
4
|
type: String,
|
|
5
5
|
required: true
|
|
6
|
-
}
|
|
7
|
-
})
|
|
6
|
+
},
|
|
7
|
+
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
<template>
|
|
11
12
|
<NuxtLink class="menu-item">
|
|
12
13
|
<div class="menu-item__icon">
|
|
13
|
-
<
|
|
14
|
+
<a-icon :icon />
|
|
14
15
|
</div>
|
|
15
16
|
<span class="menu-item__text">
|
|
16
17
|
<slot />
|
|
@@ -47,13 +48,13 @@ defineProps({
|
|
|
47
48
|
border-top: 2px solid transparent;
|
|
48
49
|
border-radius: 4px;
|
|
49
50
|
}
|
|
50
|
-
.menu-item:hover, .menu-item:focus
|
|
51
|
+
.menu-item:hover, .menu-item:focus, .menu-item.nuxt-link-exact-active, .menu-item.router-link-exact-active {
|
|
51
52
|
background-color: var(--purple-10);
|
|
52
53
|
border-radius: 4px 4px 0px 0px;
|
|
53
54
|
color: var(--purple);
|
|
54
55
|
outline: none;
|
|
55
56
|
}
|
|
56
|
-
.menu-item:hover:after, .menu-item:focus
|
|
57
|
+
.menu-item:hover:after, .menu-item:focus:after, .menu-item.nuxt-link-exact-active:after, .menu-item.router-link-exact-active:after {
|
|
57
58
|
border-top: 2px solid var(--purple);
|
|
58
59
|
}
|
|
59
60
|
.menu-item.nuxt-link-exact-active, .menu-item.router-link-exact-active {
|