@usssa/component-library 1.0.0-alpha.27 → 1.0.0-alpha.271
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 +8 -5
- package/package.json +30 -8
- package/src/assets/VS.svg +5 -0
- package/src/assets/fonts/CorneroRegular.woff +0 -0
- package/src/assets/fonts/CorneroRegular.woff2 +0 -0
- package/src/assets/logo.svg +19 -0
- package/src/assets/no-result.svg +25 -0
- package/src/assets/upload-illustration.svg +48 -0
- package/src/components/core/UAccordionSelect.vue +237 -0
- package/src/components/core/UAvatar.vue +90 -26
- package/src/components/core/UAvatarGroup.vue +62 -52
- package/src/components/core/UBadgeStd.vue +6 -1
- package/src/components/core/UBannerStd.vue +100 -31
- package/src/components/core/UBracket.vue +2181 -0
- package/src/components/core/UBreadCrumbs.vue +171 -0
- package/src/components/core/UBtnIcon.vue +106 -53
- package/src/components/core/UBtnStd.vue +38 -31
- package/src/components/core/UBtnToggle.vue +11 -6
- package/src/components/core/UCheckboxStd.vue +26 -20
- package/src/components/core/UChip.vue +107 -58
- package/src/components/core/UDate.vue +627 -0
- package/src/components/core/UDialogStd.vue +456 -58
- package/src/components/core/UDrawer/UDrawer.vue +479 -0
- package/src/components/core/UDrawer/UDrawerMenuItem.vue +130 -0
- package/src/components/core/UEventCard.vue +463 -0
- package/src/components/core/UExpansionStd.vue +380 -0
- package/src/components/core/UExpansionTableStd.vue +311 -0
- package/src/components/core/UFilter.vue +99 -0
- package/src/components/core/UGameObject.vue +478 -0
- package/src/components/core/UInnerLoader.vue +69 -0
- package/src/components/core/UInputAddressLookup.vue +535 -0
- package/src/components/core/UInputPhoneStd.vue +74 -67
- package/src/components/core/UInputTextStd.vue +99 -64
- package/src/components/core/UInputTypeahead.vue +44 -0
- package/src/components/core/UInputTypeaheadAdvanceSearch.vue +134 -0
- package/src/components/core/UMatchup.vue +404 -0
- package/src/components/core/UMenuButtonStd.vue +280 -0
- package/src/components/core/UMenuDropdown.vue +38 -33
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +306 -0
- package/src/components/core/UMenuItem.vue +226 -0
- package/src/components/core/UMenuSearch.vue +73 -0
- package/src/components/core/UModal.vue +660 -0
- package/src/components/core/UMultiSelectStd.vue +521 -63
- package/src/components/core/UPagination.vue +76 -24
- package/src/components/core/URadioBtn.vue +66 -43
- package/src/components/core/URadioStd.vue +23 -14
- package/src/components/core/USelectStd.vue +441 -84
- package/src/components/core/USheet.vue +349 -0
- package/src/components/core/UStepper/UProgress.vue +157 -0
- package/src/components/core/UStepper/UStepper.vue +214 -0
- package/src/components/core/UTabBtnStd.vue +36 -22
- package/src/components/core/UTable/UTable.vue +2269 -57
- package/src/components/core/UTableStd.vue +1436 -286
- package/src/components/core/UTabsStd.vue +53 -23
- package/src/components/core/UToggleStd.vue +18 -13
- package/src/components/core/UToolbar/UCustomMenuIcon.vue +58 -0
- package/src/components/core/UToolbar/UToolbar.vue +226 -0
- package/src/components/core/UTooltip.vue +32 -10
- package/src/components/core/UTypeahead.vue +890 -0
- package/src/components/core/UUploader.vue +757 -0
- package/src/components/core/UVenueCard.vue +221 -0
- package/src/components/index.js +83 -30
- package/src/composables/useNotify.js +16 -16
- package/src/composables/useOverlayLoader.js +23 -0
- package/src/composables/useScreenType.js +30 -0
- package/src/css/app.sass +69 -36
- package/src/css/colors.sass +2 -0
- package/src/css/quasar.variables.sass +102 -70
- package/src/css/vars/colors.variables.sass +28 -41
- package/src/utils/bracket.json +1538 -0
- package/src/utils/data.ts +179 -0
- package/src/App.vue +0 -9
- package/src/boot/.gitkeep +0 -0
- package/src/components/core/UMenutem.vue +0 -130
- package/src/layouts/MainLayout.vue +0 -145
- package/src/pages/Avatar.vue +0 -77
- package/src/pages/AvatarGroup.vue +0 -139
- package/src/pages/BadgeStd.vue +0 -83
- package/src/pages/BannerPage.vue +0 -76
- package/src/pages/BtnIcon.vue +0 -120
- package/src/pages/BtnStd.vue +0 -126
- package/src/pages/BtnToggle.vue +0 -131
- package/src/pages/CheckBox.vue +0 -62
- package/src/pages/Chip.vue +0 -108
- package/src/pages/ComponentBase.vue +0 -54
- package/src/pages/Dialog.vue +0 -206
- package/src/pages/ErrorNotFound.vue +0 -11
- package/src/pages/IndexPage.vue +0 -11
- package/src/pages/InputPhone.vue +0 -152
- package/src/pages/InputText.vue +0 -140
- package/src/pages/MenuDropdown.vue +0 -79
- package/src/pages/MenuItem.vue +0 -68
- package/src/pages/MultiSelectStd.vue +0 -174
- package/src/pages/NotifyPage.vue +0 -109
- package/src/pages/Pagination.vue +0 -71
- package/src/pages/Radio.vue +0 -80
- package/src/pages/RadioBtn.vue +0 -104
- package/src/pages/SelectStd.vue +0 -160
- package/src/pages/TabButtonPage.vue +0 -126
- package/src/pages/TablePage.vue +0 -375
- package/src/pages/TabsPage.vue +0 -261
- package/src/pages/TogglePage.vue +0 -58
- package/src/pages/TooltipPage.vue +0 -125
- package/src/router/index.js +0 -34
- package/src/router/routes.js +0 -121
|
@@ -1,77 +1,93 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { useScreenType } from '../../composables/useScreenType'
|
|
4
|
+
|
|
5
|
+
const selectedTab = defineModel({
|
|
6
|
+
required: true,
|
|
7
|
+
type: [Boolean, String, Number],
|
|
8
|
+
})
|
|
9
|
+
|
|
2
10
|
const props = defineProps({
|
|
11
|
+
align: { type: String, default: 'justify' },
|
|
12
|
+
dataTestId: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'tabs-std',
|
|
15
|
+
},
|
|
3
16
|
tabs: {
|
|
4
17
|
type: Array,
|
|
5
18
|
required: true,
|
|
6
19
|
},
|
|
7
|
-
align: { type: String, default: 'justify' },
|
|
8
20
|
})
|
|
9
21
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
const $screen = useScreenType()
|
|
23
|
+
|
|
24
|
+
const isMobileOrTablet = computed(
|
|
25
|
+
() => $screen.value.isMobile || $screen.value.isTablet
|
|
26
|
+
)
|
|
14
27
|
</script>
|
|
15
28
|
|
|
16
29
|
<template>
|
|
17
30
|
<q-tabs
|
|
18
31
|
v-model="selectedTab"
|
|
19
|
-
:
|
|
32
|
+
:class="`u-tabs-std text-caption-md${
|
|
33
|
+
isMobileOrTablet ? ' mobile-tabs remove-actions' : ''
|
|
34
|
+
}`"
|
|
20
35
|
active-color="primary"
|
|
36
|
+
:align="align"
|
|
37
|
+
:dataTestId="dataTestId"
|
|
38
|
+
:dense="true"
|
|
21
39
|
indicator-color="primary"
|
|
22
|
-
outside-arrows
|
|
23
40
|
inline-label
|
|
24
41
|
mobile-arrows
|
|
25
|
-
:align="align"
|
|
26
42
|
no-caps
|
|
27
|
-
|
|
43
|
+
outside-arrows
|
|
28
44
|
>
|
|
29
45
|
<template v-for="tab in tabs" :key="tab.name">
|
|
30
46
|
<q-tab
|
|
31
|
-
:aria-label="tab.label"
|
|
32
47
|
v-if="!tab.route"
|
|
48
|
+
:aria-label="tab.label"
|
|
49
|
+
:disable="tab.disable"
|
|
33
50
|
:name="tab.name"
|
|
34
51
|
:ripple="false"
|
|
35
|
-
:disable="tab.disable"
|
|
36
52
|
>
|
|
37
53
|
<template v-slot:default>
|
|
38
54
|
<q-icon
|
|
39
|
-
:aria-label="tab.label"
|
|
40
|
-
:alt="tab.label"
|
|
41
55
|
v-if="tab.leftIcon"
|
|
42
56
|
:class="`left-icon ${tab.leftIcon}`"
|
|
57
|
+
:alt="tab.label"
|
|
58
|
+
:aria-label="tab.label"
|
|
43
59
|
/>
|
|
44
60
|
<p class="q-ma-none">{{ tab.label }}</p>
|
|
45
61
|
<q-icon
|
|
46
|
-
:aria-label="tab.label"
|
|
47
|
-
:alt="tab.label"
|
|
48
62
|
v-if="tab.rightIcon"
|
|
49
63
|
:class="`right-icon ${tab.rightIcon}`"
|
|
64
|
+
:alt="tab.label"
|
|
65
|
+
:aria-label="tab.label"
|
|
50
66
|
/>
|
|
51
67
|
</template>
|
|
52
68
|
</q-tab>
|
|
53
69
|
<q-route-tab
|
|
54
70
|
v-else
|
|
71
|
+
:aria-label="tab.label"
|
|
72
|
+
:disable="tab.disable"
|
|
73
|
+
exact
|
|
55
74
|
:name="tab.name"
|
|
56
75
|
:ripple="false"
|
|
57
76
|
:to="`${tab.route}`"
|
|
58
|
-
exact
|
|
59
|
-
:aria-label="tab.label"
|
|
60
|
-
:disable="tab.disable"
|
|
61
77
|
>
|
|
62
78
|
<template v-slot:default>
|
|
63
79
|
<q-icon
|
|
64
|
-
:aria-label="tab.label"
|
|
65
|
-
:alt="tab.label"
|
|
66
80
|
v-if="tab.leftIcon"
|
|
67
81
|
:class="`left-icon ${tab.leftIcon}`"
|
|
82
|
+
:alt="tab.label"
|
|
83
|
+
:aria-label="tab.label"
|
|
68
84
|
/>
|
|
69
85
|
<p class="q-ma-none">{{ tab.label }}</p>
|
|
70
86
|
<q-icon
|
|
71
|
-
:aria-label="tab.label"
|
|
72
|
-
:alt="tab.label"
|
|
73
87
|
v-if="tab.rightIcon"
|
|
74
88
|
:class="`right-icon ${tab.rightIcon}`"
|
|
89
|
+
:alt="tab.label"
|
|
90
|
+
:aria-label="tab.label"
|
|
75
91
|
/>
|
|
76
92
|
</template>
|
|
77
93
|
</q-route-tab>
|
|
@@ -83,6 +99,9 @@ const selectedTab = defineModel({
|
|
|
83
99
|
.u-tabs-std
|
|
84
100
|
color: $dark
|
|
85
101
|
font-weight: 500
|
|
102
|
+
.q-tabs__content
|
|
103
|
+
overflow-x: auto
|
|
104
|
+
overflow-y: hidden
|
|
86
105
|
|
|
87
106
|
& .q-tab__content
|
|
88
107
|
& .q-icon
|
|
@@ -101,11 +120,22 @@ const selectedTab = defineModel({
|
|
|
101
120
|
|
|
102
121
|
.q-tab--inactive, .q-tab--active
|
|
103
122
|
min-width: 5.5rem
|
|
123
|
+
height: $lg
|
|
104
124
|
|
|
105
125
|
.q-tab--inactive
|
|
106
126
|
border-bottom: 2px solid $neutral-3
|
|
107
127
|
opacity: 1
|
|
108
128
|
|
|
109
129
|
.q-tab--inactive:hover
|
|
110
|
-
color:
|
|
130
|
+
color: inherit
|
|
131
|
+
|
|
132
|
+
.mobile-tabs
|
|
133
|
+
.q-tab--inactive, .q-tab--active
|
|
134
|
+
min-width: auto !important
|
|
135
|
+
|
|
136
|
+
.remove-actions
|
|
137
|
+
.q-tabs__arrow
|
|
138
|
+
display: none
|
|
139
|
+
padding-left: 0px !important
|
|
140
|
+
padding-right: 0px !important
|
|
111
141
|
</style>
|
|
@@ -2,27 +2,31 @@
|
|
|
2
2
|
import { onMounted, watch } from 'vue'
|
|
3
3
|
|
|
4
4
|
const props = defineProps({
|
|
5
|
-
|
|
5
|
+
checkedIcon: {
|
|
6
6
|
type: String,
|
|
7
|
-
default: '
|
|
7
|
+
default: '',
|
|
8
|
+
},
|
|
9
|
+
dataTestId: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'toggle-std',
|
|
8
12
|
},
|
|
9
13
|
disabled: {
|
|
10
14
|
type: Boolean,
|
|
11
15
|
default: false,
|
|
12
16
|
},
|
|
13
|
-
label: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: '',
|
|
16
|
-
},
|
|
17
17
|
id: {
|
|
18
18
|
type: [String, Number],
|
|
19
19
|
default: 'u-toggle',
|
|
20
20
|
required: true, // it is required for to match accessibility crieteria
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
label: {
|
|
23
23
|
type: String,
|
|
24
24
|
default: '',
|
|
25
25
|
},
|
|
26
|
+
name: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'toggle',
|
|
29
|
+
},
|
|
26
30
|
unCheckedIcon: {
|
|
27
31
|
type: String,
|
|
28
32
|
default: '',
|
|
@@ -82,27 +86,28 @@ watch(toggle, () => {
|
|
|
82
86
|
<template>
|
|
83
87
|
<label class="hidden" :for="`u-toggle-${id}`">{{ label }}</label>
|
|
84
88
|
<q-toggle
|
|
85
|
-
|
|
89
|
+
v-bind="$attrs"
|
|
86
90
|
v-model="toggle"
|
|
87
|
-
:name="name"
|
|
88
|
-
color="primary"
|
|
89
91
|
class="u-toggle"
|
|
92
|
+
color="primary"
|
|
93
|
+
:dataTestId="dataTestId"
|
|
90
94
|
:disable="disabled"
|
|
91
|
-
|
|
95
|
+
:id="`u-toggle-${id}`"
|
|
96
|
+
:name="name"
|
|
92
97
|
>
|
|
93
98
|
<template v-slot:default>
|
|
94
99
|
<q-icon
|
|
95
100
|
v-if="checkedIcon && toggle"
|
|
96
|
-
:id="`u-toggle-right-icon-${name}`"
|
|
97
101
|
:class="`${checkedIcon} u-checked-icon`"
|
|
98
102
|
:aria-label="`${name ? name : ''} checked toggle icon`"
|
|
103
|
+
:id="`u-toggle-right-icon-${name}`"
|
|
99
104
|
>
|
|
100
105
|
</q-icon>
|
|
101
106
|
<q-icon
|
|
102
107
|
v-if="unCheckedIcon && !toggle"
|
|
103
|
-
:id="`u-toggle-left-icon-${name}`"
|
|
104
108
|
:class="`${unCheckedIcon} u-unchecked-icon`"
|
|
105
109
|
:aria-label="`${name ? name : ''} unchecked toggle icon`"
|
|
110
|
+
:id="`u-toggle-left-icon-${name}`"
|
|
106
111
|
>
|
|
107
112
|
</q-icon>
|
|
108
113
|
</template>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const emit = defineEmits(['toggleDrawer'])
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
menuOpen: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: true,
|
|
7
|
+
},
|
|
8
|
+
})
|
|
9
|
+
const toggleDrawer = () => {
|
|
10
|
+
emit('toggleDrawer')
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="menu-container q-ml-ba" @click="toggleDrawer">
|
|
16
|
+
<div class="bar top" :class="{ open: !menuOpen }" />
|
|
17
|
+
<div class="bar bottom" :class="{ open: !menuOpen }" />
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style lang="sass">
|
|
22
|
+
$bar-width: 1.25rem
|
|
23
|
+
$bar-height: 0.125rem
|
|
24
|
+
$tap-area: $md
|
|
25
|
+
$transition-speed: 0.2s
|
|
26
|
+
|
|
27
|
+
.menu-container
|
|
28
|
+
width: $tap-area
|
|
29
|
+
height: $tap-area
|
|
30
|
+
display: flex
|
|
31
|
+
justify-content: center
|
|
32
|
+
align-items: center
|
|
33
|
+
position: relative
|
|
34
|
+
cursor: pointer
|
|
35
|
+
|
|
36
|
+
.bar
|
|
37
|
+
width: $bar-width
|
|
38
|
+
height: $bar-height
|
|
39
|
+
background-color: black
|
|
40
|
+
position: absolute
|
|
41
|
+
transition: transform $transition-speed ease-in-out
|
|
42
|
+
|
|
43
|
+
&.top
|
|
44
|
+
top: 50%
|
|
45
|
+
transform: translateY(-4px)
|
|
46
|
+
|
|
47
|
+
&.bottom
|
|
48
|
+
top: 50%
|
|
49
|
+
transform: translateY(4px)
|
|
50
|
+
|
|
51
|
+
/* Morphing into X */
|
|
52
|
+
&.open
|
|
53
|
+
&.top
|
|
54
|
+
transform: translateY(0) rotate(-45deg)
|
|
55
|
+
|
|
56
|
+
&.bottom
|
|
57
|
+
transform: translateY(0) rotate(45deg)
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import UBtnIcon from '../UBtnIcon.vue'
|
|
4
|
+
import UBtnStd from '../UBtnStd.vue'
|
|
5
|
+
import UCustomMenuIcon from './UCustomMenuIcon.vue'
|
|
6
|
+
import { useScreenType } from '../../../composables/useScreenType'
|
|
7
|
+
|
|
8
|
+
const emit = defineEmits(['navigateBack', 'toggleDrawer', 'onLogoClick'])
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
dataTestId: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: 'toolbar',
|
|
13
|
+
},
|
|
14
|
+
isMiniState: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
isSubPage: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
navigateBack: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'Back to',
|
|
25
|
+
},
|
|
26
|
+
sidebarExpandIcon: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'Sidebar expand icon',
|
|
29
|
+
},
|
|
30
|
+
title: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
toggleMenuIcon: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'Toggle menu icon',
|
|
37
|
+
},
|
|
38
|
+
usssaLogo: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'usssa logo',
|
|
41
|
+
},
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const $screen = useScreenType()
|
|
45
|
+
|
|
46
|
+
// Computed property for the title text
|
|
47
|
+
const pageTitle = computed(() => {
|
|
48
|
+
return props.isSubPage ? `${props.navigateBack} ${props.title} ` : props.title
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
// Function to handle the back navigation
|
|
52
|
+
const handleClick = () => {
|
|
53
|
+
emit('navigateBack')
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const onLogoClick = () => {
|
|
57
|
+
emit('onLogoClick')
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const toggleDrawer = () => {
|
|
61
|
+
emit('toggleDrawer')
|
|
62
|
+
}
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<template>
|
|
66
|
+
<q-toolbar
|
|
67
|
+
v-if="$screen.isTablet"
|
|
68
|
+
class="u-header-toolbar-container"
|
|
69
|
+
:dataTestId="dataTestId"
|
|
70
|
+
>
|
|
71
|
+
<UCustomMenuIcon
|
|
72
|
+
:aria-label="props.toggleMenuIcon"
|
|
73
|
+
:menuOpen="isMiniState"
|
|
74
|
+
tabindex="0"
|
|
75
|
+
@toggleDrawer="toggleDrawer"
|
|
76
|
+
/>
|
|
77
|
+
|
|
78
|
+
<section class="fit row justify-between items-center q-ml-xxs q-mr-ba">
|
|
79
|
+
<UBtnStd
|
|
80
|
+
class="q-pa-none"
|
|
81
|
+
:aria-label="props.usssaLogo"
|
|
82
|
+
flat
|
|
83
|
+
:ripple="false"
|
|
84
|
+
@click="onLogoClick"
|
|
85
|
+
>
|
|
86
|
+
<img
|
|
87
|
+
class="mini-state-logo full-logo"
|
|
88
|
+
:alt="props.usssaLogo"
|
|
89
|
+
:aria-label="props.usssaLogo"
|
|
90
|
+
src="/images/logo.svg"
|
|
91
|
+
/>
|
|
92
|
+
</UBtnStd>
|
|
93
|
+
|
|
94
|
+
<!-- Action element container -->
|
|
95
|
+
<div class="u-header-toolbar-action-container">
|
|
96
|
+
<slot name="right_section"></slot>
|
|
97
|
+
</div>
|
|
98
|
+
</section>
|
|
99
|
+
</q-toolbar>
|
|
100
|
+
|
|
101
|
+
<q-toolbar
|
|
102
|
+
v-if="$screen.isMobile"
|
|
103
|
+
class="u-header-toolbar-container"
|
|
104
|
+
:dataTestId="dataTestId"
|
|
105
|
+
>
|
|
106
|
+
<section class="fit row items-center q-mr-ba">
|
|
107
|
+
<UCustomMenuIcon
|
|
108
|
+
:aria-label="props.toggleMenuIcon"
|
|
109
|
+
:menuOpen="isMiniState"
|
|
110
|
+
tabindex="0"
|
|
111
|
+
@toggleDrawer="toggleDrawer"
|
|
112
|
+
/>
|
|
113
|
+
|
|
114
|
+
<div class="logo-container-mb items-center justify-center">
|
|
115
|
+
<!-- Add logo click emitter -->
|
|
116
|
+
<UBtnStd
|
|
117
|
+
class="q-pa-none"
|
|
118
|
+
:aria-label="props.usssaLogo"
|
|
119
|
+
flat
|
|
120
|
+
:ripple="false"
|
|
121
|
+
size="sm"
|
|
122
|
+
@click="onLogoClick"
|
|
123
|
+
>
|
|
124
|
+
<img
|
|
125
|
+
class="mini-state-logo full-logo"
|
|
126
|
+
:alt="props.usssaLogo"
|
|
127
|
+
:aria-label="props.usssaLogo"
|
|
128
|
+
src="/images/logo.svg"
|
|
129
|
+
/>
|
|
130
|
+
</UBtnStd>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<!-- Action element container -->
|
|
134
|
+
<div class="u-header-toolbar-action-container">
|
|
135
|
+
<slot name="right_section"></slot>
|
|
136
|
+
</div>
|
|
137
|
+
</section>
|
|
138
|
+
</q-toolbar>
|
|
139
|
+
|
|
140
|
+
<q-toolbar
|
|
141
|
+
v-if="$screen.isDesktop"
|
|
142
|
+
class="u-header-toolbar-container"
|
|
143
|
+
:dataTestId="dataTestId"
|
|
144
|
+
>
|
|
145
|
+
<!-- Expand icon to open sidebar or drawer-->
|
|
146
|
+
<UBtnIcon
|
|
147
|
+
v-if="isMiniState"
|
|
148
|
+
class="q-ml-xxs"
|
|
149
|
+
:ariaLabel="props.sidebarExpandIcon"
|
|
150
|
+
color="primary"
|
|
151
|
+
dataTestId="expand-button"
|
|
152
|
+
iconClass="fa-kit-duotone fa-sidebar-expand"
|
|
153
|
+
size="sm"
|
|
154
|
+
@click="toggleDrawer"
|
|
155
|
+
/>
|
|
156
|
+
|
|
157
|
+
<section class="fit row justify-between items-center q-ml-xs q-mr-ba">
|
|
158
|
+
<!-- Title container with dynamic title and optional back button -->
|
|
159
|
+
<UBtnStd
|
|
160
|
+
v-if="isSubPage"
|
|
161
|
+
class="back_to_button icon-secondary-opacity"
|
|
162
|
+
:aria-label="pageTitle"
|
|
163
|
+
color="primary"
|
|
164
|
+
dataTestId="back-button"
|
|
165
|
+
:flat="true"
|
|
166
|
+
:label="pageTitle"
|
|
167
|
+
leftIconSize="ms"
|
|
168
|
+
left-icon="fa-kit-duotone fa-circle-arrow-left"
|
|
169
|
+
tabindex="0"
|
|
170
|
+
@click="handleClick"
|
|
171
|
+
/>
|
|
172
|
+
<span
|
|
173
|
+
v-else
|
|
174
|
+
class="q-my-none text-heading-xxs q-ml-xxs text-dark"
|
|
175
|
+
dataTestId="toolbar-title"
|
|
176
|
+
tabindex="0"
|
|
177
|
+
>
|
|
178
|
+
{{ pageTitle }}
|
|
179
|
+
</span>
|
|
180
|
+
|
|
181
|
+
<!-- Action element container -->
|
|
182
|
+
<div class="u-header-toolbar-action-container">
|
|
183
|
+
<slot name="right_section"></slot>
|
|
184
|
+
</div>
|
|
185
|
+
</section>
|
|
186
|
+
</q-toolbar>
|
|
187
|
+
</template>
|
|
188
|
+
|
|
189
|
+
<style lang="sass">
|
|
190
|
+
.u-header-toolbar-container
|
|
191
|
+
background-color: white
|
|
192
|
+
width: 100%
|
|
193
|
+
padding: 0px
|
|
194
|
+
display: flex
|
|
195
|
+
align-items: center
|
|
196
|
+
align-self: stretch
|
|
197
|
+
padding: $xs 0
|
|
198
|
+
|
|
199
|
+
.full-logo
|
|
200
|
+
width: 5.918rem
|
|
201
|
+
height: $md
|
|
202
|
+
margin-top: $xxs
|
|
203
|
+
|
|
204
|
+
.logo-container-mb
|
|
205
|
+
flex: 1
|
|
206
|
+
display: flex
|
|
207
|
+
|
|
208
|
+
.u-header-toolbar-inner-container
|
|
209
|
+
width: 100%
|
|
210
|
+
|
|
211
|
+
.u-header-toolbar-title-container
|
|
212
|
+
display: flex
|
|
213
|
+
align-items: center
|
|
214
|
+
gap: $xs
|
|
215
|
+
|
|
216
|
+
.u-header-toolbar-action-container
|
|
217
|
+
display: flex
|
|
218
|
+
align-items: center
|
|
219
|
+
gap: $sm
|
|
220
|
+
|
|
221
|
+
.back_to_button
|
|
222
|
+
.button-label
|
|
223
|
+
color: $dark !important
|
|
224
|
+
.q-header:has(.u-header-toolbar-container)
|
|
225
|
+
z-index: 5000
|
|
226
|
+
</style>
|
|
@@ -1,42 +1,63 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { computed, useSlots } from 'vue'
|
|
3
|
+
|
|
2
4
|
const props = defineProps({
|
|
3
|
-
|
|
5
|
+
anchor: {
|
|
4
6
|
type: String,
|
|
5
7
|
},
|
|
6
|
-
|
|
8
|
+
dataTestId: {
|
|
7
9
|
type: String,
|
|
8
|
-
|
|
10
|
+
default: 'tooltip-std',
|
|
9
11
|
},
|
|
10
|
-
|
|
12
|
+
description: {
|
|
11
13
|
type: String,
|
|
14
|
+
required: true,
|
|
12
15
|
},
|
|
13
|
-
|
|
16
|
+
icon: {
|
|
14
17
|
type: String,
|
|
15
18
|
},
|
|
16
19
|
offset: {
|
|
17
20
|
type: Array,
|
|
18
21
|
},
|
|
22
|
+
self: {
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
19
25
|
target: {
|
|
20
26
|
type: String,
|
|
21
27
|
default: '',
|
|
22
28
|
},
|
|
23
29
|
})
|
|
30
|
+
|
|
31
|
+
const slots = useSlots()
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* checking if string contains only white spaces
|
|
35
|
+
*/
|
|
36
|
+
const getTooltipText = computed(() => {
|
|
37
|
+
if (!props.description.replace(/\s/g, '')) {
|
|
38
|
+
return null
|
|
39
|
+
} else {
|
|
40
|
+
return props.description
|
|
41
|
+
}
|
|
42
|
+
})
|
|
24
43
|
</script>
|
|
25
44
|
|
|
26
45
|
<template>
|
|
27
46
|
<q-tooltip
|
|
28
|
-
class="u-tooltip shadow-2 bg-dark row"
|
|
29
47
|
v-bind="$attrs"
|
|
48
|
+
v-if="getTooltipText || slots.item"
|
|
49
|
+
class="u-tooltip shadow-2 bg-dark row"
|
|
30
50
|
:anchor="anchor"
|
|
31
|
-
:
|
|
51
|
+
:dataTestId="dataTestId"
|
|
32
52
|
:offset="offset"
|
|
53
|
+
:self="self"
|
|
33
54
|
:target="target"
|
|
34
55
|
>
|
|
35
56
|
<div class="row no-wrap tooltip-content">
|
|
36
|
-
<div class="flex items-center"
|
|
37
|
-
<q-icon :class="icon" size="1rem"
|
|
57
|
+
<div v-if="icon" class="flex items-center">
|
|
58
|
+
<q-icon :class="icon" size="1rem" />
|
|
38
59
|
</div>
|
|
39
|
-
<div class="text-body-xs tooltip-text">{{
|
|
60
|
+
<div class="text-body-xs tooltip-text">{{ getTooltipText }}</div>
|
|
40
61
|
<slot name="item" />
|
|
41
62
|
</div>
|
|
42
63
|
</q-tooltip>
|
|
@@ -47,6 +68,7 @@ const props = defineProps({
|
|
|
47
68
|
border-radius: $xs
|
|
48
69
|
padding: $xs $sm
|
|
49
70
|
max-width: 22.5rem !important
|
|
71
|
+
word-break: break-word
|
|
50
72
|
|
|
51
73
|
.tooltip-text
|
|
52
74
|
color: $neutral-1
|