@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
|
@@ -1,202 +1,200 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<header
|
|
3
|
-
class="header"
|
|
4
3
|
:class="{ sticky }"
|
|
5
4
|
role="banner"
|
|
6
5
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
>
|
|
17
|
-
<img
|
|
18
|
-
v-if="brandLogo"
|
|
19
|
-
ref="brandLogoRef"
|
|
20
|
-
:src="brandLogo"
|
|
21
|
-
:alt="$t('navigation.brandLogoAlt')"
|
|
22
|
-
/>
|
|
23
|
-
<component
|
|
24
|
-
:is="ApptegyLogo"
|
|
25
|
-
v-else
|
|
26
|
-
:alt="$t('navigation.brandLogoAlt')"
|
|
27
|
-
:use-light-logo="isAdmin || Object.values(getBrandingStyles).length === 0"
|
|
28
|
-
/>
|
|
29
|
-
<div v-if="!brand?.hide_school_name">
|
|
30
|
-
<div class="school-name">{{ brand?.school_name }}</div>
|
|
31
|
-
<div
|
|
32
|
-
v-if="brand?.school_tag_line"
|
|
33
|
-
class="school-tag"
|
|
34
|
-
>
|
|
35
|
-
{{ brand.school_tag_line }}
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</NuxtLink>
|
|
40
|
-
</slot>
|
|
41
|
-
</div>
|
|
6
|
+
<button
|
|
7
|
+
class="sidebar-toggle"
|
|
8
|
+
@click="toggleSidebar">
|
|
9
|
+
<a-icon
|
|
10
|
+
class="icon"
|
|
11
|
+
icon="16:apptegy"
|
|
12
|
+
/>
|
|
13
|
+
<span>Menu</span>
|
|
14
|
+
</button >
|
|
42
15
|
<div class="header__breadcrumbs">
|
|
43
16
|
<slot name="breadcrumbs" />
|
|
44
17
|
</div>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
18
|
+
<slot name="org-select" />
|
|
19
|
+
<slot name="user-controls" />
|
|
20
|
+
<div
|
|
21
|
+
ref="settingsTriggerRef"
|
|
22
|
+
aria-controls="settings-dropdown"
|
|
23
|
+
:aria-expanded="active"
|
|
24
|
+
aria-haspopup="listbox"
|
|
25
|
+
role="combobox"
|
|
26
|
+
tabindex="0"
|
|
27
|
+
class="header__dropdown"
|
|
28
|
+
@keydown="keydownActionsOnTrigger($event, userSettingsOptions, settingsOptionsRef, settingsTriggerRef, false, '')"
|
|
29
|
+
@click.prevent="toggleDropdown($event, settingsOptionsRef)">
|
|
30
|
+
<NavAvatar
|
|
31
|
+
:name="user.name"
|
|
32
|
+
:src="user.avatar"
|
|
53
33
|
/>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
34
|
+
<a-icon
|
|
35
|
+
class="icon"
|
|
36
|
+
icon="24:hamburger"
|
|
37
|
+
/>
|
|
38
|
+
<span class="sr-only">Account Settings</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div
|
|
41
|
+
v-show="active"
|
|
42
|
+
id="settings-dropdown"
|
|
43
|
+
class="options-dropdown"
|
|
44
|
+
role="listbox"
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
v-for ="(option, idx) in userSettingsOptions"
|
|
48
|
+
v-on-click-outside="onClickOutsideHandler"
|
|
49
|
+
ref="settingsOptionsRef"
|
|
50
|
+
:key="option.label"
|
|
51
|
+
role="option"
|
|
52
|
+
class="option"
|
|
53
|
+
tabindex="-1"
|
|
54
|
+
@keydown="handleKeydownAction(userSettingsOptions, idx, $event, settingsOptionsRef, settingsTriggerRef)"
|
|
55
|
+
@click="handleSelectedClick(idx)"
|
|
56
|
+
>
|
|
57
|
+
<NuxtLink :to="option.url">
|
|
58
|
+
{{ option.label }}
|
|
59
|
+
<a-icon
|
|
60
|
+
:icon="option.icon"
|
|
61
|
+
color="black"
|
|
62
|
+
font-size="32px"
|
|
76
63
|
/>
|
|
77
64
|
</NuxtLink>
|
|
78
|
-
</
|
|
65
|
+
</div>
|
|
79
66
|
</div>
|
|
80
67
|
</header>
|
|
81
68
|
</template>
|
|
82
69
|
|
|
83
|
-
<script setup>
|
|
84
|
-
import {
|
|
85
|
-
import
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
});
|
|
70
|
+
<script setup lang="ts">
|
|
71
|
+
import { ref } from 'vue';
|
|
72
|
+
import { useDropdown } from '../../composables/accessibleActions.js';
|
|
73
|
+
import { vOnClickOutside } from '@vueuse/components';
|
|
74
|
+
|
|
75
|
+
const {
|
|
76
|
+
active,
|
|
77
|
+
toggleDropdown,
|
|
78
|
+
closeDropdown,
|
|
79
|
+
keydownActionsOnTrigger,
|
|
80
|
+
handleKeydown,
|
|
81
|
+
onClickOutsideHandler,
|
|
82
|
+
} = useDropdown();
|
|
83
|
+
|
|
84
|
+
interface IHeaderProps {
|
|
85
|
+
user: {
|
|
86
|
+
name: string;
|
|
87
|
+
avatar?: string;
|
|
88
|
+
};
|
|
89
|
+
sticky?: boolean;
|
|
90
|
+
userSettingsOptions: Array<any>;
|
|
91
|
+
selectedSetting?: {}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const props = defineProps<IHeaderProps>();
|
|
95
|
+
|
|
96
|
+
const settingsTriggerRef = ref();
|
|
97
|
+
const settingsOptionsRef = ref();
|
|
98
|
+
|
|
99
|
+
const emit = defineEmits(['toggle-sidebar', 'select-setting']);
|
|
100
|
+
|
|
101
|
+
function handleSelectedClick(index: number) {
|
|
102
|
+
emit('select-setting', index);
|
|
103
|
+
closeDropdown();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function handleKeydownAction(userSettingsOptions: any[], idx: number, $event: { key: string | boolean; }, optionRef: { focus: () => void; }[], dropdownTriggerRef: { focus: () => void; }) {
|
|
107
|
+
emit('select-setting', idx);
|
|
108
|
+
handleKeydown(userSettingsOptions, idx, $event, optionRef, dropdownTriggerRef);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function toggleSidebar() {
|
|
112
|
+
emit('toggle-sidebar');
|
|
113
|
+
}
|
|
120
114
|
</script>
|
|
121
115
|
|
|
122
116
|
<style scoped>
|
|
123
|
-
header
|
|
124
|
-
position: relative;
|
|
117
|
+
header {
|
|
125
118
|
grid-area: navheader;
|
|
126
119
|
display: grid;
|
|
120
|
+
grid-auto-flow: column;
|
|
127
121
|
grid-template-columns: auto 1fr auto;
|
|
128
122
|
gap: 16px;
|
|
129
123
|
align-items: center;
|
|
130
|
-
padding:
|
|
124
|
+
padding: 24px 64px 24px 36px;
|
|
131
125
|
width: 100%;
|
|
132
126
|
background-color: var(--primary-white);
|
|
133
127
|
font: var(--font-regular);
|
|
134
128
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
@media only screen and (max-width: 960px) {
|
|
130
|
+
header {
|
|
131
|
+
padding-left: 32px;
|
|
132
|
+
padding-right: 32px;
|
|
133
|
+
}
|
|
138
134
|
}
|
|
139
|
-
header.
|
|
140
|
-
|
|
141
|
-
color: inherit;
|
|
135
|
+
header.sticky {
|
|
136
|
+
position: sticky;
|
|
142
137
|
}
|
|
143
|
-
header
|
|
138
|
+
header .sidebar-toggle {
|
|
144
139
|
display: flex;
|
|
145
140
|
align-items: center;
|
|
146
|
-
gap:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
display: inline;
|
|
154
|
-
max-height: 36px;
|
|
155
|
-
max-width: 180px;
|
|
156
|
-
}
|
|
157
|
-
header.header .header__logo .header__logo-content .school-name {
|
|
158
|
-
font-size: 16px;
|
|
159
|
-
font-weight: 700;
|
|
160
|
-
overflow-wrap: break-word;
|
|
161
|
-
word-break: break-word;
|
|
162
|
-
white-space: nowrap;
|
|
163
|
-
}
|
|
164
|
-
header.header .header__logo .header__logo-content .school-tag {
|
|
165
|
-
font-size: 14px;
|
|
166
|
-
font-weight: 400;
|
|
167
|
-
overflow-wrap: break-word;
|
|
168
|
-
word-break: break-word;
|
|
169
|
-
}
|
|
170
|
-
header.header .header__breadcrumbs {
|
|
171
|
-
grid-column: 2;
|
|
172
|
-
}
|
|
173
|
-
header.header .user-control-actions {
|
|
174
|
-
grid-column: 3;
|
|
175
|
-
display: flex;
|
|
176
|
-
justify-content: end;
|
|
177
|
-
gap: 8px;
|
|
141
|
+
gap: 4px;
|
|
142
|
+
background: var(--purple-20);
|
|
143
|
+
border: none;
|
|
144
|
+
border-radius: 4px;
|
|
145
|
+
padding: 8px 16px;
|
|
146
|
+
color: var(--purple);
|
|
147
|
+
cursor: pointer;
|
|
178
148
|
}
|
|
179
|
-
header
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
149
|
+
header .sidebar-toggle:focus {
|
|
150
|
+
outline: none;
|
|
151
|
+
box-shadow: 0 0 0 2px var(--primary-white), 0 0 0 3px var(--purple);
|
|
152
|
+
}
|
|
153
|
+
header .header__dropdown {
|
|
154
|
+
font-size: 24px;
|
|
155
|
+
min-width: 64px;
|
|
156
|
+
width: 64px;
|
|
157
|
+
max-width: 64px;
|
|
158
|
+
border: none;
|
|
159
|
+
padding: 0;
|
|
160
|
+
outline: none;
|
|
161
|
+
color: var(--purple);
|
|
183
162
|
background: var(--purple-20);
|
|
163
|
+
border-radius: 16px;
|
|
164
|
+
overflow: hidden;
|
|
165
|
+
text-align: left;
|
|
166
|
+
position: relative;
|
|
184
167
|
display: flex;
|
|
185
168
|
align-items: center;
|
|
186
|
-
justify-content: center;
|
|
187
|
-
border: none;
|
|
188
169
|
cursor: pointer;
|
|
189
170
|
}
|
|
190
|
-
header
|
|
191
|
-
|
|
171
|
+
header .header__dropdown:focus {
|
|
172
|
+
box-shadow: 0 0 0 2px var(--primary-white), 0 0 0 3px var(--purple);
|
|
192
173
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
padding-left: 24px;
|
|
196
|
-
padding-right: 24px;
|
|
197
|
-
}
|
|
174
|
+
header .header__dropdown .avatar-container:focus {
|
|
175
|
+
outline: none;
|
|
198
176
|
}
|
|
199
|
-
header.
|
|
200
|
-
|
|
177
|
+
header .options-dropdown {
|
|
178
|
+
min-height: 100px;
|
|
179
|
+
position: absolute;
|
|
180
|
+
width: 198px;
|
|
181
|
+
right: 65px;
|
|
182
|
+
top: 80px;
|
|
183
|
+
background-color: #FFFFFF;
|
|
184
|
+
border-radius: 4px;
|
|
185
|
+
box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.06);
|
|
186
|
+
padding: 12px 0;
|
|
187
|
+
z-index: 10;
|
|
188
|
+
}
|
|
189
|
+
header .options-dropdown .option {
|
|
190
|
+
padding: 12px 16px;
|
|
191
|
+
cursor: pointer;
|
|
192
|
+
}
|
|
193
|
+
header .options-dropdown .option a {
|
|
194
|
+
color: #333;
|
|
195
|
+
text-decoration: none;
|
|
196
|
+
}
|
|
197
|
+
header .options-dropdown .option:focus-visible, header .options-dropdown .option:hover {
|
|
198
|
+
background-color: #F8F6FC;
|
|
201
199
|
}
|
|
202
200
|
</style>
|
|
@@ -1,149 +1,92 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:id="'school-website'"
|
|
9
|
-
class="help-articles-btn"
|
|
10
|
-
:class="{ collapsed }"
|
|
11
|
-
:aria-label="$t('navigation.website')"
|
|
12
|
-
@click="goToWebsite"
|
|
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` }"
|
|
13
8
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
fill="none"
|
|
9
|
+
<button
|
|
10
|
+
v-for="(option, idx) in helpArticleOptions"
|
|
11
|
+
:key="idx"
|
|
12
|
+
:id="`help-btn-${option.id}`"
|
|
13
|
+
class="help-btn-action"
|
|
20
14
|
>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
stroke-linecap="round"
|
|
25
|
-
stroke-linejoin="round"
|
|
26
|
-
/>
|
|
27
|
-
</svg>
|
|
28
|
-
</button>
|
|
15
|
+
{{ option.text }}
|
|
16
|
+
</button>
|
|
17
|
+
</div>
|
|
29
18
|
<button
|
|
30
|
-
v-if="showHelpArticles"
|
|
31
19
|
:id="!isDropdown && 'help-btn'"
|
|
32
|
-
:class="[
|
|
33
|
-
'help-articles-btn',
|
|
34
|
-
!isDropdown && 'help-btn',
|
|
35
|
-
isRoomsUser && `help-btn-${userRoomsRole}`,
|
|
36
|
-
collapsed && 'collapsed'
|
|
37
|
-
]"
|
|
38
|
-
:aria-label="isDropdown ? $t('navigation.helpCenter') : $t('navigation.helpArticles')"
|
|
20
|
+
:class="['help-articles-btn', !isDropdown && 'help-btn']"
|
|
39
21
|
@click="expandDropdown"
|
|
40
22
|
>
|
|
41
|
-
<svg
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/>
|
|
54
|
-
</svg>
|
|
55
|
-
</button>
|
|
56
|
-
<button
|
|
57
|
-
v-if="settingsRoute"
|
|
58
|
-
:id="!isDropdown && 'help-btn'"
|
|
59
|
-
:class="['help-articles-btn', !isDropdown && 'help-btn', collapsed && 'collapsed']"
|
|
60
|
-
:aria-label="$t('navigation.accountSettings')"
|
|
61
|
-
@click="goToSettings"
|
|
62
|
-
>
|
|
63
|
-
<svg
|
|
64
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
65
|
-
width="24"
|
|
66
|
-
height="24"
|
|
67
|
-
viewBox="0 0 24 24"
|
|
68
|
-
fill="none"
|
|
69
|
-
>
|
|
70
|
-
<path
|
|
71
|
-
d="M17 18.3153L18.3487 16.958C18.5827 16.7213 18.6067 16.3487 18.4047 16.0833L17.4807 14.8713C17.6547 14.5393 17.798 14.1933 17.9087 13.8367L19.42 13.6387C19.752 13.5953 20 13.3127 20 12.978V11.022C20 10.6873 19.752 10.404 19.42 10.3613L17.9 10.162C17.784 9.796 17.6347 9.44133 17.4533 9.10267L18.3773 7.874C18.578 7.608 18.5513 7.23533 18.3153 7.00067L16.958 5.652C16.72 5.41667 16.3473 5.39333 16.084 5.59333L14.8473 6.536C14.5187 6.36533 14.178 6.22467 13.8267 6.116L13.6393 4.586C13.5987 4.25133 13.3153 4 12.978 4H11.022C10.6867 4 10.404 4.24867 10.3613 4.58067L10.1613 6.11733C9.79533 6.23067 9.442 6.37733 9.10333 6.55667L7.87733 5.624C7.612 5.422 7.23667 5.448 7.00067 5.68533L5.65267 7.042C5.416 7.28133 5.39333 7.658 5.6 7.92333L6.53267 9.11533C6.35133 9.45333 6.204 9.80533 6.08933 10.1693L4.58267 10.3607C4.24933 10.4033 4 10.686 4 11.022V12.978C4 13.3147 4.25067 13.5973 4.584 13.6393L6.07867 13.8253C6.192 14.1933 6.34067 14.55 6.52267 14.8933L5.61667 16.134C5.42267 16.4 5.45133 16.768 5.68533 17.0007L7.04333 18.348C7.27933 18.582 7.65 18.6073 7.91467 18.4073L9.13533 17.486C9.466 17.6593 9.81133 17.8007 10.166 17.9107L10.3607 19.4187C10.4033 19.7513 10.6867 20 11.022 20H12.978C13.312 20 13.5947 19.7527 13.6387 19.4213L13.84 17.9053C14.2027 17.7933 14.5533 17.6473 14.89 17.4687L16.1313 18.382C16.3987 18.5773 16.7667 18.5493 17 18.3153Z"
|
|
72
|
-
stroke="currentColor"
|
|
73
|
-
/>
|
|
74
|
-
<circle
|
|
75
|
-
cx="12"
|
|
76
|
-
cy="12"
|
|
77
|
-
r="3"
|
|
78
|
-
stroke="currentColor"
|
|
79
|
-
/>
|
|
80
|
-
</svg>
|
|
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
|
+
/>
|
|
81
35
|
</button>
|
|
82
36
|
</div>
|
|
83
37
|
</template>
|
|
84
38
|
|
|
85
|
-
<script setup>
|
|
86
|
-
import {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
helpArticleOptions:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})
|
|
96
|
-
|
|
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
|
+
|
|
97
51
|
const expanded = ref(false);
|
|
98
52
|
const helpBtnActions = ref();
|
|
99
53
|
const dropdownScrollHeight = ref(0);
|
|
100
54
|
const isDropdown = ref(false);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
});
|
|
107
|
-
const hasArticles = computed(() => !!props.helpArticleOptions?.values?.length);
|
|
55
|
+
|
|
56
|
+
const hasArticles = computed(() => {
|
|
57
|
+
return !!props.helpArticleOptions?.values?.length
|
|
58
|
+
})
|
|
59
|
+
|
|
108
60
|
onMounted(() => {
|
|
109
61
|
isDropdown.value = !!props.helpArticleOptions?.values?.length;
|
|
110
62
|
dropdownScrollHeight.value = helpBtnActions.value?.scrollHeight + 12;
|
|
111
63
|
});
|
|
64
|
+
|
|
112
65
|
function expandDropdown() {
|
|
113
|
-
if (!isDropdown
|
|
66
|
+
if (!isDropdown) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
114
69
|
expanded.value = !expanded.value;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
await navigateTo(`${props.settingsRoute}`, { external: true });
|
|
118
|
-
}
|
|
119
|
-
async function goToWebsite() {
|
|
120
|
-
await navigateTo(`${props.schoolWebsite}`, { external: true });
|
|
121
|
-
}
|
|
70
|
+
};
|
|
71
|
+
|
|
122
72
|
</script>
|
|
123
73
|
|
|
124
74
|
<style scoped>
|
|
125
75
|
.help-btn-wrapper {
|
|
76
|
+
box-shadow: inset 0px -1px 0px 0px var(--dscl-nav-section-border-bottom-color, var(--purple-65));
|
|
126
77
|
display: flex;
|
|
127
|
-
flex-direction:
|
|
78
|
+
flex-direction: column;
|
|
128
79
|
align-items: center;
|
|
129
|
-
justify-content: flex-start;
|
|
130
80
|
width: 100%;
|
|
131
|
-
text-transform: uppercase;
|
|
132
|
-
padding-left: 8px;
|
|
133
|
-
}
|
|
134
|
-
.help-btn-wrapper.collapsed {
|
|
135
|
-
justify-content: center;
|
|
136
|
-
flex-direction: column;
|
|
137
|
-
padding-left: 0;
|
|
138
81
|
}
|
|
139
82
|
.help-btn-wrapper .help-articles-btn {
|
|
140
83
|
cursor: pointer;
|
|
141
84
|
display: flex;
|
|
85
|
+
width: 100%;
|
|
142
86
|
align-items: center;
|
|
143
87
|
background: none;
|
|
144
|
-
padding:
|
|
88
|
+
padding: 8px 10px 8px 16px;
|
|
145
89
|
border: none;
|
|
146
|
-
text-transform: inherit;
|
|
147
90
|
}
|
|
148
91
|
.help-btn-wrapper .help-articles-btn:focus-visible {
|
|
149
92
|
outline: var(--orange) solid 2px;
|
|
@@ -155,11 +98,9 @@ async function goToWebsite() {
|
|
|
155
98
|
min-width: 32px;
|
|
156
99
|
width: 32px;
|
|
157
100
|
}
|
|
158
|
-
.help-btn-wrapper .help-articles-btn.collapsed {
|
|
159
|
-
padding: 10px 0px;
|
|
160
|
-
}
|
|
161
101
|
.help-btn-wrapper .help-btn-actions {
|
|
162
102
|
visibility: hidden;
|
|
103
|
+
width: 100%;
|
|
163
104
|
max-height: 0px;
|
|
164
105
|
overflow-y: hidden;
|
|
165
106
|
transition: all 0.5s ease-in-out;
|
|
@@ -173,9 +114,10 @@ async function goToWebsite() {
|
|
|
173
114
|
border: none;
|
|
174
115
|
padding: 0;
|
|
175
116
|
background: none;
|
|
176
|
-
color: var(--nav-
|
|
117
|
+
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|
|
177
118
|
cursor: pointer;
|
|
178
119
|
font-size: 14px;
|
|
120
|
+
width: 100%;
|
|
179
121
|
text-align: left;
|
|
180
122
|
position: relative;
|
|
181
123
|
padding: 6px 51px 6px 45px;
|
|
@@ -188,7 +130,7 @@ async function goToWebsite() {
|
|
|
188
130
|
bottom: 0px;
|
|
189
131
|
right: 0px;
|
|
190
132
|
left: -45px;
|
|
191
|
-
background-color: var(--nav-background-color,
|
|
133
|
+
background-color: var(--dscl-nav-active-background-color, #463e59);
|
|
192
134
|
}
|
|
193
135
|
.help-btn-wrapper .caret-icon {
|
|
194
136
|
margin-left: auto;
|
|
@@ -198,12 +140,12 @@ async function goToWebsite() {
|
|
|
198
140
|
.help-btn-wrapper .caret-icon.collapse {
|
|
199
141
|
transform: rotate(0.5turn);
|
|
200
142
|
}
|
|
201
|
-
.help-btn-wrapper
|
|
143
|
+
.help-btn-wrapper img {
|
|
144
|
+
background: #504764;
|
|
202
145
|
border-radius: 4px;
|
|
203
|
-
color: var(--nav-icon-color, #662e80);
|
|
204
146
|
}
|
|
205
147
|
.help-btn-wrapper span {
|
|
206
|
-
color: var(--nav-
|
|
148
|
+
color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
|
|
207
149
|
margin-left: 8px;
|
|
208
150
|
font-size: 12px;
|
|
209
151
|
letter-spacing: 0.4px;
|