@usssa/component-library 1.0.0-alpha.166 → 1.0.0-alpha.167
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
CHANGED
package/package.json
CHANGED
|
@@ -27,6 +27,10 @@ const props = defineProps({
|
|
|
27
27
|
default: false,
|
|
28
28
|
type: Boolean,
|
|
29
29
|
},
|
|
30
|
+
collapseMenuLabel: {
|
|
31
|
+
default: 'Collapse Menu',
|
|
32
|
+
type: String,
|
|
33
|
+
},
|
|
30
34
|
dataTestId: {
|
|
31
35
|
default: 'drawer-std',
|
|
32
36
|
type: String,
|
|
@@ -51,10 +55,18 @@ const props = defineProps({
|
|
|
51
55
|
type: String,
|
|
52
56
|
default: 'left',
|
|
53
57
|
},
|
|
58
|
+
sidebarShrinkIcon: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'Sidebar shrink icon',
|
|
61
|
+
},
|
|
62
|
+
usssaLogo: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: 'usssa logo',
|
|
65
|
+
},
|
|
54
66
|
})
|
|
55
67
|
|
|
56
|
-
const $screen = useScreenType()
|
|
57
68
|
const $router = useRouter()
|
|
69
|
+
const $screen = useScreenType()
|
|
58
70
|
|
|
59
71
|
const currentPath = computed(() => getCurrentPath())
|
|
60
72
|
const currentRoute = computed(() => $router.currentRoute.value.fullPath)
|
|
@@ -198,15 +210,15 @@ watch(
|
|
|
198
210
|
<q-img
|
|
199
211
|
v-if="!miniState"
|
|
200
212
|
class="full-logo"
|
|
201
|
-
alt="
|
|
202
|
-
aria-label="
|
|
213
|
+
:alt="props.usssaLogo"
|
|
214
|
+
:aria-label="props.usssaLogo"
|
|
203
215
|
:src="`${brandLogo}`"
|
|
204
216
|
/>
|
|
205
217
|
<q-img
|
|
206
218
|
v-else
|
|
207
219
|
class="mini-state-logo"
|
|
208
|
-
alt="
|
|
209
|
-
aria-label="
|
|
220
|
+
:alt="props.usssaLogo"
|
|
221
|
+
:aria-label="props.usssaLogo"
|
|
210
222
|
:src="brandMiniLogo"
|
|
211
223
|
/>
|
|
212
224
|
</UBtnStd>
|
|
@@ -217,7 +229,7 @@ watch(
|
|
|
217
229
|
<UBtnIcon
|
|
218
230
|
v-if="$screen.isDesktop"
|
|
219
231
|
iconClass="fa-kit-duotone fa-sidebar-shrink"
|
|
220
|
-
ariaLabel="
|
|
232
|
+
:ariaLabel="props.sidebarShrinkIcon"
|
|
221
233
|
color="primary"
|
|
222
234
|
dense
|
|
223
235
|
ref="btn-icon"
|
|
@@ -226,7 +238,7 @@ watch(
|
|
|
226
238
|
/>
|
|
227
239
|
<UTooltip
|
|
228
240
|
anchor="center right"
|
|
229
|
-
description="
|
|
241
|
+
:description="props.collapseMenuLabel"
|
|
230
242
|
:offset="[4, 14]"
|
|
231
243
|
self="center start"
|
|
232
244
|
/>
|
|
@@ -285,7 +297,8 @@ watch(
|
|
|
285
297
|
<slot
|
|
286
298
|
v-if="m.slot && m.slot.hasSlot && showSlots"
|
|
287
299
|
:name="m.slot.slotName"
|
|
288
|
-
|
|
300
|
+
>
|
|
301
|
+
</slot>
|
|
289
302
|
</template>
|
|
290
303
|
</q-list>
|
|
291
304
|
<div
|
|
@@ -296,7 +309,7 @@ watch(
|
|
|
296
309
|
}"
|
|
297
310
|
id="drawer-footer"
|
|
298
311
|
>
|
|
299
|
-
<slot name="footer"
|
|
312
|
+
<slot name="footer"></slot>
|
|
300
313
|
</div>
|
|
301
314
|
</q-scroll-area>
|
|
302
315
|
</q-drawer>
|
|
@@ -19,16 +19,33 @@ const props = defineProps({
|
|
|
19
19
|
type: Boolean,
|
|
20
20
|
required: true,
|
|
21
21
|
},
|
|
22
|
+
navigateBack: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'Back to',
|
|
25
|
+
},
|
|
26
|
+
sidebarExpandIcon: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'Sidebar expand icon',
|
|
29
|
+
},
|
|
22
30
|
title: {
|
|
23
31
|
type: String,
|
|
24
32
|
required: true,
|
|
25
33
|
},
|
|
34
|
+
toggleMenuIcon: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'Toggle menu icon',
|
|
37
|
+
},
|
|
38
|
+
usssaLogo: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'usssa logo',
|
|
41
|
+
},
|
|
26
42
|
})
|
|
43
|
+
|
|
27
44
|
const $screen = useScreenType()
|
|
28
45
|
|
|
29
46
|
// Computed property for the title text
|
|
30
47
|
const pageTitle = computed(() => {
|
|
31
|
-
return props.isSubPage ?
|
|
48
|
+
return props.isSubPage ? `${props.navigateBack} ${props.title} ` : props.title
|
|
32
49
|
})
|
|
33
50
|
|
|
34
51
|
// Function to handle the back navigation
|
|
@@ -52,7 +69,7 @@ const toggleDrawer = () => {
|
|
|
52
69
|
:dataTestId="dataTestId"
|
|
53
70
|
>
|
|
54
71
|
<UCustomMenuIcon
|
|
55
|
-
aria-label="
|
|
72
|
+
:aria-label="props.toggleMenuIcon"
|
|
56
73
|
:menuOpen="isMiniState"
|
|
57
74
|
tabindex="0"
|
|
58
75
|
@toggleDrawer="toggleDrawer"
|
|
@@ -61,22 +78,22 @@ const toggleDrawer = () => {
|
|
|
61
78
|
<section class="fit row justify-between items-center q-ml-xxs q-mr-ba">
|
|
62
79
|
<UBtnStd
|
|
63
80
|
class="q-pa-none"
|
|
64
|
-
aria-label="
|
|
81
|
+
:aria-label="props.usssaLogo"
|
|
65
82
|
flat
|
|
66
83
|
:ripple="false"
|
|
67
84
|
@click="onLogoClick"
|
|
68
85
|
>
|
|
69
86
|
<img
|
|
70
87
|
class="mini-state-logo full-logo"
|
|
71
|
-
alt="
|
|
72
|
-
aria-label="
|
|
88
|
+
:alt="props.usssaLogo"
|
|
89
|
+
:aria-label="props.usssaLogo"
|
|
73
90
|
src="/images/logo.svg"
|
|
74
91
|
/>
|
|
75
92
|
</UBtnStd>
|
|
76
93
|
|
|
77
94
|
<!-- Action element container -->
|
|
78
95
|
<div class="u-header-toolbar-action-container">
|
|
79
|
-
<slot name="right_section"
|
|
96
|
+
<slot name="right_section"></slot>
|
|
80
97
|
</div>
|
|
81
98
|
</section>
|
|
82
99
|
</q-toolbar>
|
|
@@ -88,7 +105,7 @@ const toggleDrawer = () => {
|
|
|
88
105
|
>
|
|
89
106
|
<section class="fit row items-center q-mr-ba">
|
|
90
107
|
<UCustomMenuIcon
|
|
91
|
-
aria-label="
|
|
108
|
+
:aria-label="props.toggleMenuIcon"
|
|
92
109
|
:menuOpen="isMiniState"
|
|
93
110
|
tabindex="0"
|
|
94
111
|
@toggleDrawer="toggleDrawer"
|
|
@@ -98,7 +115,7 @@ const toggleDrawer = () => {
|
|
|
98
115
|
<!-- Add logo click emitter -->
|
|
99
116
|
<UBtnStd
|
|
100
117
|
class="q-pa-none"
|
|
101
|
-
aria-label="
|
|
118
|
+
:aria-label="props.usssaLogo"
|
|
102
119
|
flat
|
|
103
120
|
:ripple="false"
|
|
104
121
|
size="sm"
|
|
@@ -106,8 +123,8 @@ const toggleDrawer = () => {
|
|
|
106
123
|
>
|
|
107
124
|
<img
|
|
108
125
|
class="mini-state-logo full-logo"
|
|
109
|
-
alt="
|
|
110
|
-
aria-label="
|
|
126
|
+
:alt="props.usssaLogo"
|
|
127
|
+
:aria-label="props.usssaLogo"
|
|
111
128
|
src="/images/logo.svg"
|
|
112
129
|
/>
|
|
113
130
|
</UBtnStd>
|
|
@@ -115,7 +132,7 @@ const toggleDrawer = () => {
|
|
|
115
132
|
|
|
116
133
|
<!-- Action element container -->
|
|
117
134
|
<div class="u-header-toolbar-action-container">
|
|
118
|
-
<slot name="right_section"
|
|
135
|
+
<slot name="right_section"></slot>
|
|
119
136
|
</div>
|
|
120
137
|
</section>
|
|
121
138
|
</q-toolbar>
|
|
@@ -129,7 +146,7 @@ const toggleDrawer = () => {
|
|
|
129
146
|
<UBtnIcon
|
|
130
147
|
v-if="isMiniState"
|
|
131
148
|
class="q-ml-xxs"
|
|
132
|
-
ariaLabel="
|
|
149
|
+
:ariaLabel="props.sidebarExpandIcon"
|
|
133
150
|
color="primary"
|
|
134
151
|
dataTestId="expand-button"
|
|
135
152
|
iconClass="fa-kit-duotone fa-sidebar-expand"
|
|
@@ -163,7 +180,7 @@ const toggleDrawer = () => {
|
|
|
163
180
|
|
|
164
181
|
<!-- Action element container -->
|
|
165
182
|
<div class="u-header-toolbar-action-container">
|
|
166
|
-
<slot name="right_section"
|
|
183
|
+
<slot name="right_section"></slot>
|
|
167
184
|
</div>
|
|
168
185
|
</section>
|
|
169
186
|
</q-toolbar>
|
|
@@ -206,5 +223,4 @@ const toggleDrawer = () => {
|
|
|
206
223
|
color: $dark !important
|
|
207
224
|
.q-header:has(.u-header-toolbar-container)
|
|
208
225
|
z-index: 5000
|
|
209
|
-
|
|
210
226
|
</style>
|