@usssa/component-library 1.0.0-alpha.1 → 1.0.0-alpha.100
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 +18 -37
- package/package.json +17 -6
- package/src/assets/files.png +0 -0
- package/src/assets/logo.svg +19 -0
- package/src/assets/no-result.png +0 -0
- package/src/assets/quasar-logo-vertical.svg +15 -0
- package/src/components/ComponentLink.vue +26 -0
- package/src/components/core/UAvatar.vue +179 -0
- package/src/components/core/UAvatarGroup.vue +120 -0
- package/src/components/core/UBadgeStd.vue +91 -0
- package/src/components/core/UBannerStd.vue +142 -0
- package/src/components/core/UBreadCrumbs.vue +67 -0
- package/src/components/core/UBtnIcon.vue +158 -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 +244 -0
- package/src/components/core/UDrawer.vue +235 -0
- package/src/components/core/UInnerLoader.vue +58 -0
- package/src/components/core/UInputAddressLookup.vue +470 -0
- package/src/components/core/UInputPhoneStd.vue +299 -0
- package/src/components/core/UInputTextStd.vue +299 -0
- package/src/components/core/UInputTypeaheadAdvanceSearch.vue +59 -0
- package/src/components/core/UMenuButtonStd.vue +274 -0
- package/src/components/core/UMenuDropdown.vue +72 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +301 -0
- package/src/components/core/UMenuItem.vue +134 -0
- package/src/components/core/UMenuSearch.vue +752 -0
- package/src/components/core/UMultiSelectStd.vue +274 -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 +250 -0
- package/src/components/core/UTabBtnStd.vue +176 -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 +1003 -0
- package/src/components/core/UTabsStd.vue +111 -0
- package/src/components/core/UToggleStd.vue +159 -0
- package/src/components/core/UToolbar.vue +94 -0
- package/src/components/core/UTooltip.vue +73 -0
- package/src/components/core/UUploader.vue +497 -0
- package/src/components/index.js +75 -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 +121 -0
- package/src/css/typography.sass +0 -0
- package/src/css/vars/colors.variables.sass +126 -0
- package/src/utils/data.ts +146 -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,111 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
tabs: {
|
|
4
|
+
type: Array,
|
|
5
|
+
required: true,
|
|
6
|
+
},
|
|
7
|
+
align: { type: String, default: 'justify' },
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const selectedTab = defineModel({
|
|
11
|
+
required: true,
|
|
12
|
+
type: [Boolean, String, Number],
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<q-tabs
|
|
18
|
+
v-model="selectedTab"
|
|
19
|
+
:dense="true"
|
|
20
|
+
active-color="primary"
|
|
21
|
+
indicator-color="primary"
|
|
22
|
+
outside-arrows
|
|
23
|
+
inline-label
|
|
24
|
+
mobile-arrows
|
|
25
|
+
:align="align"
|
|
26
|
+
no-caps
|
|
27
|
+
class="u-tabs-std text-caption-md"
|
|
28
|
+
>
|
|
29
|
+
<template v-for="tab in tabs" :key="tab.name">
|
|
30
|
+
<q-tab
|
|
31
|
+
:aria-label="tab.label"
|
|
32
|
+
v-if="!tab.route"
|
|
33
|
+
:name="tab.name"
|
|
34
|
+
:ripple="false"
|
|
35
|
+
:disable="tab.disable"
|
|
36
|
+
>
|
|
37
|
+
<template v-slot:default>
|
|
38
|
+
<q-icon
|
|
39
|
+
:aria-label="tab.label"
|
|
40
|
+
:alt="tab.label"
|
|
41
|
+
v-if="tab.leftIcon"
|
|
42
|
+
:class="`left-icon ${tab.leftIcon}`"
|
|
43
|
+
/>
|
|
44
|
+
<p class="q-ma-none">{{ tab.label }}</p>
|
|
45
|
+
<q-icon
|
|
46
|
+
:aria-label="tab.label"
|
|
47
|
+
:alt="tab.label"
|
|
48
|
+
v-if="tab.rightIcon"
|
|
49
|
+
:class="`right-icon ${tab.rightIcon}`"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
</q-tab>
|
|
53
|
+
<q-route-tab
|
|
54
|
+
v-else
|
|
55
|
+
:name="tab.name"
|
|
56
|
+
:ripple="false"
|
|
57
|
+
:to="`${tab.route}`"
|
|
58
|
+
exact
|
|
59
|
+
:aria-label="tab.label"
|
|
60
|
+
:disable="tab.disable"
|
|
61
|
+
>
|
|
62
|
+
<template v-slot:default>
|
|
63
|
+
<q-icon
|
|
64
|
+
:aria-label="tab.label"
|
|
65
|
+
:alt="tab.label"
|
|
66
|
+
v-if="tab.leftIcon"
|
|
67
|
+
:class="`left-icon ${tab.leftIcon}`"
|
|
68
|
+
/>
|
|
69
|
+
<p class="q-ma-none">{{ tab.label }}</p>
|
|
70
|
+
<q-icon
|
|
71
|
+
:aria-label="tab.label"
|
|
72
|
+
:alt="tab.label"
|
|
73
|
+
v-if="tab.rightIcon"
|
|
74
|
+
:class="`right-icon ${tab.rightIcon}`"
|
|
75
|
+
/>
|
|
76
|
+
</template>
|
|
77
|
+
</q-route-tab>
|
|
78
|
+
</template>
|
|
79
|
+
</q-tabs>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<style lang="sass">
|
|
83
|
+
.u-tabs-std
|
|
84
|
+
color: $dark
|
|
85
|
+
font-weight: 500
|
|
86
|
+
|
|
87
|
+
& .q-tab__content
|
|
88
|
+
& .q-icon
|
|
89
|
+
width: $ms
|
|
90
|
+
height: $ms
|
|
91
|
+
font-size: $ms
|
|
92
|
+
|
|
93
|
+
& .left-icon
|
|
94
|
+
margin-right: 0.45rem
|
|
95
|
+
|
|
96
|
+
.right-icon
|
|
97
|
+
width: $ms
|
|
98
|
+
height: $ms
|
|
99
|
+
font-size: $ms
|
|
100
|
+
margin-left: 0.45rem
|
|
101
|
+
|
|
102
|
+
.q-tab--inactive, .q-tab--active
|
|
103
|
+
min-width: 5.5rem
|
|
104
|
+
|
|
105
|
+
.q-tab--inactive
|
|
106
|
+
border-bottom: 2px solid $neutral-3
|
|
107
|
+
opacity: 1
|
|
108
|
+
|
|
109
|
+
.q-tab--inactive:hover
|
|
110
|
+
color: $primary
|
|
111
|
+
</style>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onMounted, watch } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: 'toggle',
|
|
8
|
+
},
|
|
9
|
+
disabled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
label: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: '',
|
|
16
|
+
},
|
|
17
|
+
id: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: 'u-toggle',
|
|
20
|
+
required: true, // it is required for to match accessibility crieteria
|
|
21
|
+
},
|
|
22
|
+
checkedIcon: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: '',
|
|
25
|
+
},
|
|
26
|
+
unCheckedIcon: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const toggle = defineModel({ default: false, type: Boolean })
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* adding icons as a child of toggle thumb to keep icons in center
|
|
36
|
+
*/
|
|
37
|
+
const updateIconPosition = () => {
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
const thumbElement = document.getElementsByClassName('q-toggle__thumb')
|
|
40
|
+
const leftIconElement = document.getElementById(
|
|
41
|
+
`u-toggle-left-icon-${props.name}`
|
|
42
|
+
)
|
|
43
|
+
const rightIconElement = document.getElementById(
|
|
44
|
+
`u-toggle-right-icon-${props.name}`
|
|
45
|
+
)
|
|
46
|
+
if (thumbElement.length > 0) {
|
|
47
|
+
Array.from(thumbElement).forEach((element) => {
|
|
48
|
+
if (leftIconElement && element.id === props.id) {
|
|
49
|
+
leftIconElement.style.display = 'block'
|
|
50
|
+
element.appendChild(leftIconElement)
|
|
51
|
+
}
|
|
52
|
+
if (rightIconElement && element.id === props.id) {
|
|
53
|
+
rightIconElement.style.display = 'block'
|
|
54
|
+
element.appendChild(rightIconElement)
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
}, 100)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* adding the label to corresponding toggle input to match the accessibility
|
|
63
|
+
*/
|
|
64
|
+
onMounted(() => {
|
|
65
|
+
const toggleElement = document.getElementById(`u-toggle-${props.id}`)
|
|
66
|
+
if (toggleElement) {
|
|
67
|
+
const inputElement = toggleElement.querySelector('input')
|
|
68
|
+
const thumbElement = toggleElement.getElementsByClassName('q-toggle__thumb')
|
|
69
|
+
thumbElement[0].id = `${props.id}`
|
|
70
|
+
if (inputElement) {
|
|
71
|
+
inputElement.id = `u-toggle-${props.id}`
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
updateIconPosition()
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
watch(toggle, () => {
|
|
78
|
+
updateIconPosition()
|
|
79
|
+
})
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<template>
|
|
83
|
+
<label class="hidden" :for="`u-toggle-${id}`">{{ label }}</label>
|
|
84
|
+
<q-toggle
|
|
85
|
+
:id="`u-toggle-${id}`"
|
|
86
|
+
v-model="toggle"
|
|
87
|
+
:name="name"
|
|
88
|
+
color="primary"
|
|
89
|
+
class="u-toggle"
|
|
90
|
+
:disable="disabled"
|
|
91
|
+
v-bind="$attrs"
|
|
92
|
+
>
|
|
93
|
+
<template v-slot:default>
|
|
94
|
+
<q-icon
|
|
95
|
+
v-if="checkedIcon && toggle"
|
|
96
|
+
:id="`u-toggle-right-icon-${name}`"
|
|
97
|
+
:class="`${checkedIcon} u-checked-icon`"
|
|
98
|
+
:aria-label="`${name ? name : ''} checked toggle icon`"
|
|
99
|
+
>
|
|
100
|
+
</q-icon>
|
|
101
|
+
<q-icon
|
|
102
|
+
v-if="unCheckedIcon && !toggle"
|
|
103
|
+
:id="`u-toggle-left-icon-${name}`"
|
|
104
|
+
:class="`${unCheckedIcon} u-unchecked-icon`"
|
|
105
|
+
:aria-label="`${name ? name : ''} unchecked toggle icon`"
|
|
106
|
+
>
|
|
107
|
+
</q-icon>
|
|
108
|
+
</template>
|
|
109
|
+
</q-toggle>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<style lang="sass">
|
|
113
|
+
.u-toggle
|
|
114
|
+
.q-toggle__inner
|
|
115
|
+
padding: 0
|
|
116
|
+
|
|
117
|
+
.q-toggle__label
|
|
118
|
+
q-label
|
|
119
|
+
position: absolute
|
|
120
|
+
bottom: 1.8rem
|
|
121
|
+
left: 4.8rem
|
|
122
|
+
|
|
123
|
+
.u-checked-icon
|
|
124
|
+
color: $primary !important
|
|
125
|
+
font-size: 1rem
|
|
126
|
+
display: none
|
|
127
|
+
|
|
128
|
+
.u-unchecked-icon
|
|
129
|
+
font-size: 1rem
|
|
130
|
+
color: $description !important
|
|
131
|
+
display: none
|
|
132
|
+
|
|
133
|
+
.q-toggle__inner--truthy
|
|
134
|
+
.q-toggle__track
|
|
135
|
+
background: $primary
|
|
136
|
+
opacity: 1
|
|
137
|
+
|
|
138
|
+
.q-toggle__thumb:after
|
|
139
|
+
background: $neutral-1
|
|
140
|
+
|
|
141
|
+
.q-toggle__track
|
|
142
|
+
height: $md
|
|
143
|
+
border-radius: 1.175em
|
|
144
|
+
width: 3.5rem
|
|
145
|
+
padding: $xxs
|
|
146
|
+
background: $neutral-4
|
|
147
|
+
|
|
148
|
+
.q-toggle__thumb
|
|
149
|
+
top: 0.26rem
|
|
150
|
+
left: 0.27rem
|
|
151
|
+
width: $ms
|
|
152
|
+
height: $ms
|
|
153
|
+
|
|
154
|
+
.q-toggle__inner--truthy
|
|
155
|
+
.q-toggle__thumb
|
|
156
|
+
left: 1.72rem
|
|
157
|
+
width: $ms
|
|
158
|
+
height: $ms
|
|
159
|
+
</style>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import UBtnIcon from './UBtnIcon.vue'
|
|
4
|
+
import UBtnStd from './UBtnStd.vue';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const emit = defineEmits(['navigateBack'])
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
isMiniState: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
isSubPage: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
// Computed property for the title text
|
|
24
|
+
const pageTitle = computed(() => {
|
|
25
|
+
return props.isSubPage ? `Back to ${props.title} ` : props.title
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
// Function to handle the back navigation
|
|
29
|
+
const handleClick = () => {
|
|
30
|
+
emit('navigateBack')
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<q-toolbar class="u-header-toolbar-container">
|
|
36
|
+
<!-- Expand icon to open sidebar or drawer-->
|
|
37
|
+
<UBtnIcon
|
|
38
|
+
v-if="isMiniState"
|
|
39
|
+
ariaLabel="Sidebar expand icon"
|
|
40
|
+
color="primary"
|
|
41
|
+
class="q-ml-xxs"
|
|
42
|
+
iconClass="fa-kit-duotone fa-sidebar-shrink"
|
|
43
|
+
size="md"
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
<section class="fit row justify-between items-center q-mx-ms">
|
|
47
|
+
<!-- Title container with dynamic title and optional back button -->
|
|
48
|
+
<UBtnStd
|
|
49
|
+
v-if="isSubPage"
|
|
50
|
+
:aria-label="pageTitle"
|
|
51
|
+
class="back_to_button"
|
|
52
|
+
color="primary"
|
|
53
|
+
:flat="true"
|
|
54
|
+
:label="pageTitle"
|
|
55
|
+
left-icon="fa-kit-duotone fa-circle-arrow-left"
|
|
56
|
+
@click="handleClick"
|
|
57
|
+
/>
|
|
58
|
+
<span v-else class="q-my-none text-heading-sm">{{ pageTitle }}</span>
|
|
59
|
+
|
|
60
|
+
<!-- Action element container -->
|
|
61
|
+
<div class="u-header-toolbar-action-container">
|
|
62
|
+
<slot name="right_section"/>
|
|
63
|
+
</div>
|
|
64
|
+
</section>
|
|
65
|
+
</q-toolbar>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<style lang="sass">
|
|
69
|
+
.u-header-toolbar-container
|
|
70
|
+
background-color: white
|
|
71
|
+
width: 100%
|
|
72
|
+
padding: 0px
|
|
73
|
+
display: flex
|
|
74
|
+
align-items: center
|
|
75
|
+
align-self: stretch
|
|
76
|
+
padding: $sm 0
|
|
77
|
+
|
|
78
|
+
.u-header-toolbar-inner-container
|
|
79
|
+
width: 100%
|
|
80
|
+
|
|
81
|
+
.u-header-toolbar-title-container
|
|
82
|
+
display: flex
|
|
83
|
+
align-items: center
|
|
84
|
+
gap: $xs
|
|
85
|
+
|
|
86
|
+
.u-header-toolbar-action-container
|
|
87
|
+
display: flex
|
|
88
|
+
align-items: center
|
|
89
|
+
gap: $sm
|
|
90
|
+
|
|
91
|
+
.back_to_button
|
|
92
|
+
.button-label
|
|
93
|
+
color: $dark !important
|
|
94
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useSlots } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
icon: {
|
|
6
|
+
type: String,
|
|
7
|
+
},
|
|
8
|
+
description: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
anchor: {
|
|
13
|
+
type: String,
|
|
14
|
+
},
|
|
15
|
+
self: {
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
offset: {
|
|
19
|
+
type: Array,
|
|
20
|
+
},
|
|
21
|
+
target: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: '',
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const slots = useSlots()
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* checking if string contains only white spaces
|
|
31
|
+
*/
|
|
32
|
+
const getTooltipText = computed(() => {
|
|
33
|
+
if (!props.description.replace(/\s/g, '')) {
|
|
34
|
+
return null
|
|
35
|
+
} else {
|
|
36
|
+
return props.description
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<q-tooltip
|
|
43
|
+
v-if="getTooltipText || slots.item"
|
|
44
|
+
v-bind="$attrs"
|
|
45
|
+
class="u-tooltip shadow-2 bg-dark row"
|
|
46
|
+
:anchor="anchor"
|
|
47
|
+
:offset="offset"
|
|
48
|
+
:self="self"
|
|
49
|
+
:target="target"
|
|
50
|
+
>
|
|
51
|
+
<div class="row no-wrap tooltip-content">
|
|
52
|
+
<div v-if="icon" class="flex items-center">
|
|
53
|
+
<q-icon :class="icon" size="1rem"></q-icon>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="text-body-xs tooltip-text">{{ getTooltipText }}</div>
|
|
56
|
+
<slot name="item" />
|
|
57
|
+
</div>
|
|
58
|
+
</q-tooltip>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<style lang="sass">
|
|
62
|
+
.u-tooltip
|
|
63
|
+
border-radius: $xs
|
|
64
|
+
padding: $xs $sm
|
|
65
|
+
max-width: 22.5rem !important
|
|
66
|
+
|
|
67
|
+
.tooltip-text
|
|
68
|
+
color: $neutral-1
|
|
69
|
+
word-wrap: break-word
|
|
70
|
+
|
|
71
|
+
.tooltip-content
|
|
72
|
+
gap: $xxs
|
|
73
|
+
</style>
|