@usssa/component-library 1.0.0-alpha.4 → 1.0.0-alpha.41
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 +4 -1
- package/package.json +6 -4
- package/src/App.vue +9 -0
- package/src/assets/quasar-logo-vertical.svg +15 -0
- package/src/boot/.gitkeep +0 -0
- package/src/boot/google-maps.js +11 -0
- package/src/components/ComponentLink.vue +26 -0
- package/src/components/core/UAvatar.vue +161 -0
- package/src/components/core/UAvatarGroup.vue +119 -0
- package/src/components/core/UBadgeStd.vue +91 -0
- package/src/components/core/UBannerStd.vue +115 -0
- package/src/components/core/UBreadCrumbs.vue +67 -0
- package/src/components/core/UBtnIcon.vue +159 -0
- package/src/components/core/UBtnStd.vue +129 -0
- package/src/components/core/UBtnToggle.vue +68 -0
- package/src/components/core/UCheckboxStd.vue +95 -0
- package/src/components/core/UChip.vue +251 -0
- package/src/components/core/UDialogStd.vue +242 -0
- package/src/components/core/UDrawer.vue +211 -0
- package/src/components/core/UInnerLoader.vue +58 -0
- package/src/components/core/UInputAddressLookup.vue +466 -0
- package/src/components/core/UInputPhoneStd.vue +295 -0
- package/src/components/core/UInputTextStd.vue +293 -0
- package/src/components/core/UMenuButtonStd.vue +274 -0
- package/src/components/core/UMenuDropdown.vue +77 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +262 -0
- package/src/components/core/UMenuItem.vue +132 -0
- package/src/components/core/UMultiSelectStd.vue +259 -0
- package/src/components/core/UPagination.vue +104 -0
- package/src/components/core/URadioBtn.vue +116 -0
- package/src/components/core/URadioStd.vue +62 -0
- package/src/components/core/USelectStd.vue +233 -0
- package/src/components/core/UTabBtnStd.vue +167 -0
- package/src/components/core/UTable/UTable.vue +93 -0
- package/src/components/core/UTable/UTd.vue +63 -0
- package/src/components/core/UTable/UTh.vue +48 -0
- package/src/components/core/UTable/UTr.vue +20 -0
- package/src/components/core/UTableStd.vue +636 -0
- package/src/components/core/UTabsStd.vue +111 -0
- package/src/components/core/UToggleStd.vue +159 -0
- package/src/components/core/UTooltip.vue +71 -0
- package/src/components/index.js +66 -0
- package/src/composables/useNotify.js +79 -0
- package/src/composables/useOverlayLoader.js +23 -0
- package/src/css/app.sass +159 -0
- package/src/css/colors.sass +101 -0
- package/src/css/media.sass +1 -0
- package/src/css/quasar.variables.sass +119 -0
- package/src/css/typography.sass +0 -0
- package/src/css/vars/colors.variables.sass +126 -0
- package/src/layouts/MainLayout.vue +173 -0
- package/src/pages/AdvancedSearch.vue +512 -0
- package/src/pages/Avatar.vue +77 -0
- package/src/pages/AvatarGroup.vue +139 -0
- package/src/pages/BadgeStd.vue +83 -0
- package/src/pages/BannerPage.vue +76 -0
- package/src/pages/BreadCrumbs.vue +100 -0
- package/src/pages/BtnIcon.vue +120 -0
- package/src/pages/BtnStd.vue +138 -0
- package/src/pages/BtnToggle.vue +131 -0
- package/src/pages/CheckBox.vue +62 -0
- package/src/pages/Chip.vue +108 -0
- package/src/pages/ComponentBase.vue +54 -0
- package/src/pages/Dialog.vue +221 -0
- package/src/pages/Drawer.vue +128 -0
- package/src/pages/ErrorNotFound.vue +11 -0
- package/src/pages/IndexPage.vue +11 -0
- package/src/pages/InnerLoader.vue +81 -0
- package/src/pages/InputAddressLookup.vue +258 -0
- package/src/pages/InputPhone.vue +152 -0
- package/src/pages/InputText.vue +140 -0
- package/src/pages/MenuButton.vue +194 -0
- package/src/pages/MenuDropdown.vue +79 -0
- package/src/pages/MenuItem.vue +68 -0
- package/src/pages/MultiSelectStd.vue +174 -0
- package/src/pages/NotifyPage.vue +109 -0
- package/src/pages/OverlayLoader.vue +128 -0
- package/src/pages/Pagination.vue +71 -0
- package/src/pages/Radio.vue +80 -0
- package/src/pages/RadioBtn.vue +104 -0
- package/src/pages/SelectStd.vue +160 -0
- package/src/pages/TabButtonPage.vue +126 -0
- package/src/pages/TablePage.vue +375 -0
- package/src/pages/TabsPage.vue +261 -0
- package/src/pages/TogglePage.vue +58 -0
- package/src/pages/TooltipPage.vue +125 -0
- package/src/router/index.js +34 -0
- package/src/router/routes.js +149 -0
- package/dist/spa/assets/Avatar.45667392.js +0 -9
- package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
- package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
- package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
- package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
- package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
- package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
- package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
- package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
- package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
- package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
- package/dist/spa/assets/Chip.49ffc857.js +0 -11
- package/dist/spa/assets/Chip.74acaa33.css +0 -1
- package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
- package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
- package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
- package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
- package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
- package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
- package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
- package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
- package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
- package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
- package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
- package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
- package/dist/spa/assets/QPage.ca395ec4.js +0 -1
- package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
- package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
- package/dist/spa/assets/QSelect.a40eb786.js +0 -1
- package/dist/spa/assets/QTabs.72f2507e.js +0 -1
- package/dist/spa/assets/QToggle.376c48be.js +0 -1
- package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
- package/dist/spa/assets/Radio.0ac35288.js +0 -7
- package/dist/spa/assets/Radio.aca54a89.css +0 -1
- package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
- package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
- package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
- package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
- package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
- package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
- package/dist/spa/assets/TogglePage.8129b631.css +0 -1
- package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
- package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
- package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
- package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
- package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
- package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
- package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
- package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
- package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
- package/dist/spa/assets/dom.e9d4ad51.js +0 -1
- package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
- package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
- package/dist/spa/assets/format.41663636.js +0 -1
- package/dist/spa/assets/index.43c62a18.js +0 -21
- package/dist/spa/assets/index.4fbd73cf.css +0 -5
- package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
- package/dist/spa/assets/render.e67ff27a.js +0 -1
- package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
- package/dist/spa/assets/touch.9135741d.js +0 -1
- package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
- package/dist/spa/favicon.ico +0 -0
- package/dist/spa/icons/caret-down.svg +0 -5
- package/dist/spa/icons/circle-xmark.svg +0 -6
- package/dist/spa/icons/favicon-128x128.png +0 -0
- package/dist/spa/icons/favicon-16x16.png +0 -0
- package/dist/spa/icons/favicon-32x32.png +0 -0
- package/dist/spa/icons/favicon-96x96.png +0 -0
- package/dist/spa/index.html +0 -3
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
|
+
import UBtnStd from './UBtnStd.vue'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
heading: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
fields: Object,
|
|
11
|
+
position: String,
|
|
12
|
+
size: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'default',
|
|
15
|
+
},
|
|
16
|
+
customSize: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
headingCaption: String,
|
|
20
|
+
leftIcon: String,
|
|
21
|
+
closeIcon: String,
|
|
22
|
+
showActionButtons: Boolean,
|
|
23
|
+
leftIconLabel: String,
|
|
24
|
+
closeIconLabel: String,
|
|
25
|
+
divider: Boolean,
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const model = defineModel()
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits(['onBackIconClick', 'hideDialog'])
|
|
31
|
+
const dialogRef = ref(true)
|
|
32
|
+
|
|
33
|
+
const handleBackClick = () => {
|
|
34
|
+
return emit('onBackIconClick')
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const headerClass = computed(() => {
|
|
38
|
+
return props.divider ? 'divider' : ''
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const dialogStyle = computed(() => ({
|
|
42
|
+
'--customSize': props.customSize
|
|
43
|
+
}))
|
|
44
|
+
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<q-dialog
|
|
49
|
+
no-backdrop-dismiss
|
|
50
|
+
ref="dialogRef"
|
|
51
|
+
:position="position"
|
|
52
|
+
full-width
|
|
53
|
+
:class="`dialog-${size}`"
|
|
54
|
+
:style="dialogStyle"
|
|
55
|
+
v-model="model"
|
|
56
|
+
v-bind="$attrs"
|
|
57
|
+
>
|
|
58
|
+
<q-card class="dialog-wrapper full-height">
|
|
59
|
+
<q-card-section
|
|
60
|
+
:class="`col items-center q-pa-none heading-section ${headerClass}`"
|
|
61
|
+
>
|
|
62
|
+
<div class="heading-wrapper row">
|
|
63
|
+
<div class="flex items-center dialog-heading-container">
|
|
64
|
+
<div v-if="leftIcon">
|
|
65
|
+
<UBtnStd
|
|
66
|
+
tabindex="-1"
|
|
67
|
+
class="dialog-action-icons"
|
|
68
|
+
:flat="true"
|
|
69
|
+
@click="handleBackClick()"
|
|
70
|
+
>
|
|
71
|
+
<q-icon
|
|
72
|
+
class="icon-back"
|
|
73
|
+
:class="leftIcon"
|
|
74
|
+
size="1.5rem"
|
|
75
|
+
:aria-label="leftIconLabel"
|
|
76
|
+
tabindex="0"
|
|
77
|
+
/>
|
|
78
|
+
</UBtnStd>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="col">
|
|
81
|
+
<div>
|
|
82
|
+
<span class="text-heading-sm dialog-heading">
|
|
83
|
+
{{ heading }}
|
|
84
|
+
</span>
|
|
85
|
+
</div>
|
|
86
|
+
<div>
|
|
87
|
+
<span class="text-body-sm dialog-caption" v-if="headingCaption">
|
|
88
|
+
{{ headingCaption }}
|
|
89
|
+
</span>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<UBtnStd
|
|
95
|
+
class="dialog-action-icons"
|
|
96
|
+
:flat="true"
|
|
97
|
+
tabindex="-1"
|
|
98
|
+
@click="dialogRef.hide()"
|
|
99
|
+
>
|
|
100
|
+
<q-icon
|
|
101
|
+
v-if="closeIcon"
|
|
102
|
+
class="icon-close"
|
|
103
|
+
:class="closeIcon"
|
|
104
|
+
size="1.5rem"
|
|
105
|
+
:aria-label="closeIconLabel"
|
|
106
|
+
tabindex="0"
|
|
107
|
+
/>
|
|
108
|
+
</UBtnStd>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="row">
|
|
111
|
+
<slot name="secondary_row"></slot>
|
|
112
|
+
</div>
|
|
113
|
+
</q-card-section>
|
|
114
|
+
|
|
115
|
+
<q-card-section class="full-height main-content-dialog scroll q-px-ba">
|
|
116
|
+
<slot name="content" />
|
|
117
|
+
</q-card-section>
|
|
118
|
+
|
|
119
|
+
<div class="q-pa-ba action-wrapper" v-if="showActionButtons">
|
|
120
|
+
<q-card-actions align="left" class="action-buttons">
|
|
121
|
+
<slot name="action_secondary_one"></slot>
|
|
122
|
+
<slot name="action_secondary_two"></slot>
|
|
123
|
+
</q-card-actions>
|
|
124
|
+
<q-card-actions align="right" class="action-buttons">
|
|
125
|
+
<slot name="action_primary_one"></slot>
|
|
126
|
+
<slot name="action_primary_two"></slot>
|
|
127
|
+
</q-card-actions>
|
|
128
|
+
</div>
|
|
129
|
+
</q-card>
|
|
130
|
+
</q-dialog>
|
|
131
|
+
</template>
|
|
132
|
+
|
|
133
|
+
<style lang="sass">
|
|
134
|
+
.dialog-default, .dialog-half
|
|
135
|
+
.q-dialog__inner--left, .q-dialog__inner--right
|
|
136
|
+
.dialog-wrapper
|
|
137
|
+
max-height: 100vh !important
|
|
138
|
+
.q-dialog__inner
|
|
139
|
+
&.q-dialog__inner--right
|
|
140
|
+
padding-right: $ba !important
|
|
141
|
+
&.q-dialog__inner--left
|
|
142
|
+
padding-left: $ba !important
|
|
143
|
+
.dialog-heading-container
|
|
144
|
+
gap: $xs
|
|
145
|
+
|
|
146
|
+
.dialog-caption
|
|
147
|
+
color: $neutral-9
|
|
148
|
+
.dialog-heading
|
|
149
|
+
color: $dark
|
|
150
|
+
|
|
151
|
+
.heading-section
|
|
152
|
+
padding: $ba
|
|
153
|
+
|
|
154
|
+
.dialog-wrapper
|
|
155
|
+
border-radius: $xs !important
|
|
156
|
+
.divider
|
|
157
|
+
border-bottom: 1.5px solid $neutral-4
|
|
158
|
+
.action-wrapper
|
|
159
|
+
display: flex
|
|
160
|
+
justify-content: space-between
|
|
161
|
+
border-radius: 0 0 $xs $xs !important
|
|
162
|
+
.q-card__actions
|
|
163
|
+
padding: 0
|
|
164
|
+
|
|
165
|
+
.dialog-half
|
|
166
|
+
.q-dialog__inner
|
|
167
|
+
padding: $ba 0
|
|
168
|
+
width: 50% !important
|
|
169
|
+
|
|
170
|
+
.dialog-full
|
|
171
|
+
.q-dialog__inner
|
|
172
|
+
padding: 0 0
|
|
173
|
+
width: 100% !important
|
|
174
|
+
.dialog-wrapper
|
|
175
|
+
max-height: calc(100vh - 1rem)
|
|
176
|
+
border-radius: $xs $xs 0 0 !important
|
|
177
|
+
&.action-wrapper
|
|
178
|
+
border-radius: 0 !important
|
|
179
|
+
.main-content-dialog
|
|
180
|
+
padding: $ms $ms
|
|
181
|
+
padding-bottom: 0
|
|
182
|
+
margin-bottom: $ms !important
|
|
183
|
+
.heading-section
|
|
184
|
+
padding: $ba $ms !important
|
|
185
|
+
.action-wrapper
|
|
186
|
+
padding: $ba $ms
|
|
187
|
+
|
|
188
|
+
.dialog-custom
|
|
189
|
+
.q-dialog__inner
|
|
190
|
+
padding: $ba 0
|
|
191
|
+
width: var(--customSize)
|
|
192
|
+
|
|
193
|
+
.dialog-default
|
|
194
|
+
.q-dialog__inner
|
|
195
|
+
padding: $ba 0
|
|
196
|
+
width: 35.25rem !important
|
|
197
|
+
|
|
198
|
+
.heading-wrapper
|
|
199
|
+
justify-content: space-between
|
|
200
|
+
flex-wrap: nowrap
|
|
201
|
+
margin-bottom: $ba
|
|
202
|
+
|
|
203
|
+
.icon-close
|
|
204
|
+
color: $neutral-9
|
|
205
|
+
cursor: pointer
|
|
206
|
+
align-self: flex-start
|
|
207
|
+
|
|
208
|
+
.icon-back
|
|
209
|
+
cursor: pointer
|
|
210
|
+
color: $neutral-9
|
|
211
|
+
|
|
212
|
+
.main-content-dialog
|
|
213
|
+
margin-bottom: $ba
|
|
214
|
+
padding-bottom: 0
|
|
215
|
+
|
|
216
|
+
.full-height
|
|
217
|
+
height: 100vh
|
|
218
|
+
display: flex
|
|
219
|
+
flex-direction: column
|
|
220
|
+
|
|
221
|
+
.action-buttons
|
|
222
|
+
display: flex
|
|
223
|
+
align-items: center
|
|
224
|
+
gap: $xs
|
|
225
|
+
.q-btn
|
|
226
|
+
margin: 0 !important
|
|
227
|
+
|
|
228
|
+
.q-btn.dialog-action-icons
|
|
229
|
+
padding: 0px 0px !important
|
|
230
|
+
min-width: 0px !important
|
|
231
|
+
min-height: 0px !important
|
|
232
|
+
height: auto !important
|
|
233
|
+
|
|
234
|
+
.q-focus-helper
|
|
235
|
+
background: transparent !important
|
|
236
|
+
|
|
237
|
+
#closeIconLabelRef
|
|
238
|
+
display: none
|
|
239
|
+
|
|
240
|
+
#leftIconLabelRef
|
|
241
|
+
display: none
|
|
242
|
+
</style>
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useRouter } from 'vue-router'
|
|
3
|
+
import UMenuItem from './UMenuItem.vue'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import UBtnIcon from './UBtnIcon.vue'
|
|
6
|
+
import UTooltip from './UTooltip.vue'
|
|
7
|
+
import UBadgeStd from './UBadgeStd.vue'
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
menu: {
|
|
10
|
+
default: () => [],
|
|
11
|
+
type: Array,
|
|
12
|
+
},
|
|
13
|
+
brandLogo: {
|
|
14
|
+
default: '',
|
|
15
|
+
},
|
|
16
|
+
brandMiniLogo: {
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
homeLink: {
|
|
20
|
+
required: true,
|
|
21
|
+
default: '/home',
|
|
22
|
+
type: String,
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
const $router = useRouter()
|
|
26
|
+
const currentRoute = computed(() => $router.currentRoute.value.fullPath)
|
|
27
|
+
|
|
28
|
+
const open = defineModel('open', {
|
|
29
|
+
default: false,
|
|
30
|
+
type: Boolean,
|
|
31
|
+
})
|
|
32
|
+
const miniState = defineModel('miniState', {
|
|
33
|
+
default: false,
|
|
34
|
+
type: Boolean,
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const getCurrentPath = (int = 1) => {
|
|
38
|
+
return currentRoute.value.split('/')[int]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const currentPath = computed(() => getCurrentPath())
|
|
42
|
+
|
|
43
|
+
const emit = defineEmits(['menuItemClicked', 'closeDrawer'])
|
|
44
|
+
|
|
45
|
+
const handleClick = (menu) => {
|
|
46
|
+
emit('menuItemClicked', menu)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const handleCloseDrawer = () => {
|
|
50
|
+
emit('closeDrawer')
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* returning x offset for tooltip for long text
|
|
55
|
+
* @param {*} label
|
|
56
|
+
*/
|
|
57
|
+
const getXOffset = (label) => {
|
|
58
|
+
let labelLength = label.trim().length
|
|
59
|
+
return labelLength <= 4 ? 65 : labelLength < 9 ? 85 : 145
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
<template>
|
|
63
|
+
<q-drawer
|
|
64
|
+
v-model="open"
|
|
65
|
+
show-if-above
|
|
66
|
+
:mini="miniState"
|
|
67
|
+
:width="224"
|
|
68
|
+
:mini-width="64"
|
|
69
|
+
:breakpoint="400"
|
|
70
|
+
:class="`u-drawer ${miniState ? 'u-mini-drawer' : ''}`"
|
|
71
|
+
side="left"
|
|
72
|
+
>
|
|
73
|
+
<q-scroll-area class="u-drawer-scrollable-area">
|
|
74
|
+
<div
|
|
75
|
+
:class="`flex items-center justify-${
|
|
76
|
+
miniState ? 'center' : 'between'
|
|
77
|
+
} ${miniState ? 'q-py-ba' : 'q-py-xs q-pl-ba q-pr-xxs'}`"
|
|
78
|
+
>
|
|
79
|
+
<NuxtLink
|
|
80
|
+
class="flex items-center justify-center cursor-pointer"
|
|
81
|
+
:to="homeLink"
|
|
82
|
+
>
|
|
83
|
+
<img
|
|
84
|
+
v-if="!miniState"
|
|
85
|
+
:src="`${brandLogo}`"
|
|
86
|
+
alt="usssa-logo"
|
|
87
|
+
aria-label="usssa logo"
|
|
88
|
+
class="full-logo"
|
|
89
|
+
/>
|
|
90
|
+
<img
|
|
91
|
+
v-else
|
|
92
|
+
:src="brandMiniLogo"
|
|
93
|
+
alt="usssa-logo"
|
|
94
|
+
aria-label="usssa logo"
|
|
95
|
+
class="mini-state-logo"
|
|
96
|
+
/>
|
|
97
|
+
</NuxtLink>
|
|
98
|
+
<div
|
|
99
|
+
v-if="!miniState"
|
|
100
|
+
class="drawer-open-close-icon-wrapper flex items-center justify-center"
|
|
101
|
+
>
|
|
102
|
+
<UBtnIcon
|
|
103
|
+
ref="btn-icon"
|
|
104
|
+
size="sm"
|
|
105
|
+
ariaLabel="Sidebar shrink icon"
|
|
106
|
+
color="primary"
|
|
107
|
+
iconClass="fa-kit-duotone fa-sidebar-shrink"
|
|
108
|
+
@click="handleCloseDrawer"
|
|
109
|
+
dense
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<q-list
|
|
114
|
+
:class="`drawer-menu-list ${miniState ? 'drawer-menu-mini-list' : ''}`"
|
|
115
|
+
padding
|
|
116
|
+
>
|
|
117
|
+
<template v-for="(m, i) in menu" :key="i">
|
|
118
|
+
<UMenuItem
|
|
119
|
+
:label="m.label"
|
|
120
|
+
:left-icon="m.leftIcon"
|
|
121
|
+
@onClick="handleClick(m)"
|
|
122
|
+
:id="`u-drawer-menu-${i}`"
|
|
123
|
+
:selected="currentPath === m.to.replaceAll('/', '')"
|
|
124
|
+
:class="`q-pb-xs ${miniState ? 'mini-menu-box' : ''}`"
|
|
125
|
+
>
|
|
126
|
+
<template v-if="!miniState" #trailing_slot>
|
|
127
|
+
<UBadgeStd v-if="m.badgeInfo" size="lg" :label="m.badgeInfo" />
|
|
128
|
+
<q-icon
|
|
129
|
+
v-if="m.rightIcon"
|
|
130
|
+
:class="`${m.rightIcon} ${
|
|
131
|
+
currentPath === m.to.replaceAll('/', '')
|
|
132
|
+
? ''
|
|
133
|
+
: 'non-active-right-icon'
|
|
134
|
+
}`"
|
|
135
|
+
:aria-label="m.badgeInfo"
|
|
136
|
+
size="1rem"
|
|
137
|
+
/>
|
|
138
|
+
</template>
|
|
139
|
+
</UMenuItem>
|
|
140
|
+
<UTooltip
|
|
141
|
+
:description="m.label"
|
|
142
|
+
v-if="miniState"
|
|
143
|
+
:target="`#u-drawer-menu-${i}`"
|
|
144
|
+
anchor="center right"
|
|
145
|
+
self="center right"
|
|
146
|
+
:offset="[getXOffset(m.label), 20]"
|
|
147
|
+
/>
|
|
148
|
+
</template>
|
|
149
|
+
</q-list>
|
|
150
|
+
</q-scroll-area>
|
|
151
|
+
</q-drawer>
|
|
152
|
+
</template>
|
|
153
|
+
<style lang="sass">
|
|
154
|
+
.mini-state-logo
|
|
155
|
+
height: 1.5rem
|
|
156
|
+
width: 2.022rem
|
|
157
|
+
|
|
158
|
+
.q-drawer:has(.u-drawer)
|
|
159
|
+
width: 14rem !important
|
|
160
|
+
|
|
161
|
+
.q-drawer:has(.u-mini-drawer)
|
|
162
|
+
width: 4rem !important
|
|
163
|
+
|
|
164
|
+
.u-drawer
|
|
165
|
+
background: $surface-bg-1
|
|
166
|
+
.q-scrollarea__content
|
|
167
|
+
width: 100%
|
|
168
|
+
|
|
169
|
+
.u-drawer-scrollable-area
|
|
170
|
+
height: calc(100% - 0px)
|
|
171
|
+
margin-top: 0px
|
|
172
|
+
|
|
173
|
+
.menu-icon-class
|
|
174
|
+
font-size: 1rem
|
|
175
|
+
|
|
176
|
+
.menu-icon-wrapper
|
|
177
|
+
min-width: auto !important
|
|
178
|
+
|
|
179
|
+
.full-logo
|
|
180
|
+
width: 5.918rem
|
|
181
|
+
height: 1.5rem
|
|
182
|
+
|
|
183
|
+
.drawer-open-close-icon
|
|
184
|
+
font-size: 1rem
|
|
185
|
+
color: $primary
|
|
186
|
+
|
|
187
|
+
.drawer-open-close-icon-wrapper
|
|
188
|
+
height: $md
|
|
189
|
+
width: $md
|
|
190
|
+
|
|
191
|
+
.drawer-menu-list
|
|
192
|
+
padding: 0px $xs
|
|
193
|
+
|
|
194
|
+
.drawer-menu-mini-list
|
|
195
|
+
display: grid
|
|
196
|
+
place-content: center
|
|
197
|
+
place-items: center
|
|
198
|
+
|
|
199
|
+
.u-drawer
|
|
200
|
+
.drawer-menu-list
|
|
201
|
+
.q-icon
|
|
202
|
+
color: $primary !important
|
|
203
|
+
|
|
204
|
+
.mini-menu-box
|
|
205
|
+
width: 3.5rem
|
|
206
|
+
|
|
207
|
+
.u-drawer
|
|
208
|
+
.drawer-menu-list
|
|
209
|
+
.non-active-right-icon
|
|
210
|
+
color: $dark !important
|
|
211
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
loading: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
required: true,
|
|
6
|
+
},
|
|
7
|
+
loadingMessage: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
image: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
spinnerColor: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false,
|
|
18
|
+
},
|
|
19
|
+
spinnerSize: {
|
|
20
|
+
type: String,
|
|
21
|
+
requried: false,
|
|
22
|
+
default: '2rem',
|
|
23
|
+
},
|
|
24
|
+
imageHeight: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
imageWidth: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
<template>
|
|
33
|
+
<q-inner-loading :showing="loading" color="primary" v-bind="$attrs">
|
|
34
|
+
<div class="column items-center q-gutter-y-sm">
|
|
35
|
+
<img
|
|
36
|
+
class="q-my-none"
|
|
37
|
+
alt="Loader Image"
|
|
38
|
+
:src="image"
|
|
39
|
+
:width="imageWidth"
|
|
40
|
+
:height="imageHeight"
|
|
41
|
+
/>
|
|
42
|
+
<div class="row items-center">
|
|
43
|
+
<div v-if="loadingMessage">
|
|
44
|
+
<span class="message q-mr-sm">{{ loadingMessage }}</span>
|
|
45
|
+
</div>
|
|
46
|
+
<q-spinner-facebook :color="spinnerColor" :size="spinnerSize" />
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</q-inner-loading>
|
|
50
|
+
</template>
|
|
51
|
+
<style scoped lang="sass">
|
|
52
|
+
.u-loader
|
|
53
|
+
position: relative
|
|
54
|
+
height: 100%
|
|
55
|
+
.message
|
|
56
|
+
color: $dark
|
|
57
|
+
font-weight: 500
|
|
58
|
+
</style>
|