@usssa/component-library 1.0.0-alpha.21 → 1.0.0-alpha.210
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 +25 -6
- 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/UBreadCrumbs.vue +171 -0
- package/src/components/core/UBtnIcon.vue +57 -52
- 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 +91 -43
- package/src/components/core/UDate.vue +581 -0
- package/src/components/core/UDialogStd.vue +452 -58
- package/src/components/core/UDrawer/UDrawer.vue +471 -0
- package/src/components/core/UDrawer/UDrawerMenuItem.vue +124 -0
- package/src/components/core/UEventCard.vue +419 -0
- package/src/components/core/UExpansionStd.vue +274 -0
- package/src/components/core/UExpansionTableStd.vue +297 -0
- package/src/components/core/UFilter.vue +89 -0
- package/src/components/core/UGameObject.vue +441 -0
- package/src/components/core/UInnerLoader.vue +69 -0
- package/src/components/core/UInputAddressLookup.vue +484 -0
- package/src/components/core/UInputPhoneStd.vue +74 -68
- package/src/components/core/UInputTextStd.vue +137 -116
- package/src/components/core/UInputTypeahead.vue +44 -0
- package/src/components/core/UInputTypeaheadAdvanceSearch.vue +134 -0
- package/src/components/core/UMenuButtonStd.vue +280 -0
- package/src/components/core/UMenuDropdown.vue +82 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +306 -0
- package/src/components/core/UMenuItem.vue +221 -0
- package/src/components/core/UMenuSearch.vue +73 -0
- package/src/components/core/UModal.vue +660 -0
- package/src/components/core/UMultiSelectStd.vue +501 -61
- package/src/components/core/UPagination.vue +84 -25
- package/src/components/core/URadioBtn.vue +66 -43
- package/src/components/core/URadioStd.vue +23 -14
- package/src/components/core/USelectStd.vue +415 -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 +211 -0
- package/src/components/core/UTabBtnStd.vue +36 -22
- package/src/components/core/UTable/UTable.vue +2055 -57
- package/src/components/core/UTableStd.vue +1301 -273
- package/src/components/core/UTabsStd.vue +52 -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 +31 -10
- package/src/components/core/UTypeahead.vue +890 -0
- package/src/components/core/UUploader.vue +644 -0
- package/src/components/index.js +77 -26
- 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 +42 -25
- package/src/css/colors.sass +2 -0
- package/src/css/quasar.variables.sass +99 -68
- package/src/css/vars/colors.variables.sass +28 -41
- package/src/utils/data.ts +177 -0
- package/src/App.vue +0 -9
- package/src/boot/.gitkeep +0 -0
- package/src/layouts/MainLayout.vue +0 -137
- 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 -92
- 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 -139
- 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 -371
- 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 -113
|
@@ -1,129 +1,329 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed } from 'vue'
|
|
2
|
+
import { computed, onMounted, ref, watch } from 'vue'
|
|
3
|
+
import { useScreenType } from '../../composables/useScreenType'
|
|
4
|
+
import UAvatar from './UAvatar.vue'
|
|
5
|
+
import UBtnStd from './UBtnStd.vue'
|
|
6
|
+
import UInputTextStd from './UInputTextStd.vue'
|
|
7
|
+
import UMenuItem from './UMenuItem.vue'
|
|
8
|
+
import USheet from './USheet.vue'
|
|
3
9
|
import UTooltip from './UTooltip.vue'
|
|
4
10
|
|
|
11
|
+
const emit = defineEmits(['update:modelValue'])
|
|
12
|
+
|
|
5
13
|
const props = defineProps({
|
|
6
|
-
|
|
14
|
+
applyLabel: {
|
|
7
15
|
type: String,
|
|
16
|
+
default: 'Apply',
|
|
8
17
|
},
|
|
9
|
-
|
|
10
|
-
type:
|
|
11
|
-
|
|
18
|
+
cancelLabel: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'Cancel',
|
|
12
21
|
},
|
|
13
|
-
|
|
14
|
-
type:
|
|
15
|
-
|
|
22
|
+
caption: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: '',
|
|
16
25
|
},
|
|
17
|
-
|
|
26
|
+
color: {
|
|
18
27
|
type: String,
|
|
28
|
+
default: 'neutral-7',
|
|
19
29
|
},
|
|
20
|
-
|
|
30
|
+
closeIconLabel: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'Close Icon',
|
|
33
|
+
},
|
|
34
|
+
dataTestId: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'select-std',
|
|
37
|
+
},
|
|
38
|
+
disableAvatar: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true,
|
|
41
|
+
},
|
|
42
|
+
filterFn: {
|
|
43
|
+
type: Function,
|
|
44
|
+
required: false,
|
|
45
|
+
},
|
|
46
|
+
hintIcon: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'fa-kit-duotone fa-triangle-exclamation',
|
|
49
|
+
},
|
|
50
|
+
hintText: {
|
|
21
51
|
type: String,
|
|
22
52
|
},
|
|
23
53
|
isRequired: {
|
|
24
54
|
type: Boolean,
|
|
25
55
|
default: false,
|
|
26
56
|
},
|
|
27
|
-
|
|
57
|
+
label: {
|
|
28
58
|
type: String,
|
|
29
59
|
},
|
|
30
60
|
leftIcon: {
|
|
31
61
|
type: String,
|
|
32
62
|
},
|
|
33
|
-
|
|
63
|
+
modelValue: {
|
|
64
|
+
type: [String, Number],
|
|
65
|
+
requried: true,
|
|
66
|
+
},
|
|
67
|
+
noSearchText: {
|
|
34
68
|
type: String,
|
|
69
|
+
required: false,
|
|
35
70
|
},
|
|
36
|
-
|
|
71
|
+
optionLabel: {
|
|
37
72
|
type: String,
|
|
38
|
-
|
|
73
|
+
},
|
|
74
|
+
optionValue: {
|
|
75
|
+
type: String,
|
|
76
|
+
},
|
|
77
|
+
options: {
|
|
78
|
+
type: Array,
|
|
79
|
+
required: true,
|
|
39
80
|
},
|
|
40
81
|
placeholder: {
|
|
41
82
|
type: String,
|
|
42
83
|
default: 'Select',
|
|
43
84
|
},
|
|
44
|
-
|
|
85
|
+
popupClass: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: '',
|
|
88
|
+
},
|
|
89
|
+
readonly: {
|
|
45
90
|
type: Boolean,
|
|
46
|
-
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
93
|
+
sheetLabel: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: '',
|
|
96
|
+
},
|
|
97
|
+
showErrorIcon: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: false,
|
|
47
100
|
},
|
|
48
101
|
size: {
|
|
49
102
|
type: String,
|
|
50
103
|
default: 'md',
|
|
51
104
|
validator: (val) => ['sm', 'md', 'lg'].includes(val),
|
|
52
105
|
},
|
|
53
|
-
|
|
106
|
+
toolTipText: {
|
|
54
107
|
type: String,
|
|
55
|
-
required: false,
|
|
56
108
|
},
|
|
57
|
-
|
|
58
|
-
type:
|
|
109
|
+
useInput: {
|
|
110
|
+
type: Boolean,
|
|
59
111
|
required: false,
|
|
60
112
|
},
|
|
61
|
-
color: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: 'neutral-7',
|
|
64
|
-
},
|
|
65
|
-
popupClass: {
|
|
66
|
-
type: String,
|
|
67
|
-
default: '',
|
|
68
|
-
},
|
|
69
113
|
})
|
|
70
114
|
|
|
71
|
-
const
|
|
115
|
+
const $screen = useScreenType()
|
|
116
|
+
|
|
117
|
+
const dialogs = ref([])
|
|
118
|
+
const initialOptions = ref([...props.options])
|
|
119
|
+
const placeholderText = ref(props?.placeholder)
|
|
120
|
+
const search = ref('')
|
|
121
|
+
const selectedItem = ref(props.modelValue)
|
|
122
|
+
const selectRef = ref(null)
|
|
123
|
+
|
|
124
|
+
const filterOptions = computed(() => {
|
|
125
|
+
if (!search.value) return initialOptions.value
|
|
126
|
+
return [...initialOptions.value].filter((option) =>
|
|
127
|
+
option.label.toLowerCase().includes(search.value.toLocaleLowerCase())
|
|
128
|
+
)
|
|
129
|
+
})
|
|
72
130
|
|
|
73
131
|
const model = computed({
|
|
74
132
|
get() {
|
|
75
133
|
return props.modelValue
|
|
76
134
|
},
|
|
77
135
|
set(value) {
|
|
136
|
+
selectedItem.value = value
|
|
78
137
|
return emit('update:modelValue', value)
|
|
79
138
|
},
|
|
80
139
|
})
|
|
140
|
+
|
|
141
|
+
const sheetHeading = computed(() => {
|
|
142
|
+
if (props.sheetLabel) {
|
|
143
|
+
return props.sheetLabel
|
|
144
|
+
}
|
|
145
|
+
return props.label
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
// sheet apply action
|
|
149
|
+
const handleApply = () => {
|
|
150
|
+
dialogs.value[0].open = false
|
|
151
|
+
model.value = selectedItem.value
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// for opening the sheet in mobile screen
|
|
155
|
+
const handleClick = (event) => {
|
|
156
|
+
if (props.readonly) return
|
|
157
|
+
if (!$screen.value.isMobile) return
|
|
158
|
+
const isBorderClick = event.target.classList.contains('q-field__control')
|
|
159
|
+
|
|
160
|
+
if (
|
|
161
|
+
isBorderClick ||
|
|
162
|
+
event.target.closest('.q-field__control') ||
|
|
163
|
+
event.target.closest('.q-field__append')
|
|
164
|
+
) {
|
|
165
|
+
event.preventDefault()
|
|
166
|
+
event.stopPropagation()
|
|
167
|
+
dialogs.value = [
|
|
168
|
+
{
|
|
169
|
+
open: true,
|
|
170
|
+
height: 350,
|
|
171
|
+
persistent: true,
|
|
172
|
+
transitionDuration: 500,
|
|
173
|
+
position: 'bottom',
|
|
174
|
+
},
|
|
175
|
+
]
|
|
176
|
+
search.value = ''
|
|
177
|
+
if (model.value === '') {
|
|
178
|
+
selectedItem.value = ''
|
|
179
|
+
} else {
|
|
180
|
+
selectedItem.value = model.value
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// sheet closing action
|
|
186
|
+
const handleClose = () => {
|
|
187
|
+
dialogs.value[0].open = false
|
|
188
|
+
if (model.value) {
|
|
189
|
+
if (selectedItem.value) {
|
|
190
|
+
if (model.value !== selectedItem.value) {
|
|
191
|
+
selectedItem.value = model.value
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
} else {
|
|
195
|
+
selectedItem.value = ''
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const handleInput = (event) => {
|
|
200
|
+
if (event.type == 'input' && props.useInput && $screen.value.isMobile) {
|
|
201
|
+
let inputElement = document.querySelector('.q-field__input')
|
|
202
|
+
event.preventDefault()
|
|
203
|
+
inputElement.value = ''
|
|
204
|
+
handleClick(event)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// adding scroll if highlighted menu is not visible to user
|
|
209
|
+
const handleKeydown = () => {
|
|
210
|
+
setTimeout(() => {
|
|
211
|
+
const currentItem = document.getElementsByClassName(
|
|
212
|
+
'q-manual-focusable--focused'
|
|
213
|
+
)[0]
|
|
214
|
+
const dropdownContainer =
|
|
215
|
+
document.getElementsByClassName('u-options-menu')[0]
|
|
216
|
+
if (currentItem && dropdownContainer) {
|
|
217
|
+
const itemRect = currentItem.getBoundingClientRect()
|
|
218
|
+
const containerRect = dropdownContainer.getBoundingClientRect()
|
|
219
|
+
const isVisible =
|
|
220
|
+
itemRect.top >= containerRect.top &&
|
|
221
|
+
itemRect.bottom <= containerRect.bottom
|
|
222
|
+
if (!isVisible) {
|
|
223
|
+
currentItem.scrollIntoView({
|
|
224
|
+
behavior: 'smooth',
|
|
225
|
+
block: 'nearest',
|
|
226
|
+
inline: 'nearest',
|
|
227
|
+
})
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}, 100)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const handleKeydownEnter = (event) => {
|
|
234
|
+
handleClick(event)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// selecting sheet items
|
|
238
|
+
const handleSheetItemClick = (item, key) => {
|
|
239
|
+
selectedItem.value = item.value
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const updateVal = (val) => {
|
|
243
|
+
placeholderText.value = val?.length ? '' : props?.placeholder
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
onMounted(() => {
|
|
247
|
+
// Add click listener to handle border clicks more reliably
|
|
248
|
+
if (selectRef.value) {
|
|
249
|
+
const controlContainer =
|
|
250
|
+
selectRef.value?.$el.querySelector('.q-field__control')
|
|
251
|
+
if (controlContainer) {
|
|
252
|
+
controlContainer.addEventListener('click', handleClick, {
|
|
253
|
+
passive: false,
|
|
254
|
+
})
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
})
|
|
258
|
+
watch(
|
|
259
|
+
() => props?.placeholder,
|
|
260
|
+
(value) => {
|
|
261
|
+
placeholderText.value = value
|
|
262
|
+
}
|
|
263
|
+
)
|
|
264
|
+
watch(
|
|
265
|
+
() => $screen.value,
|
|
266
|
+
(newValue) => {
|
|
267
|
+
if (newValue) {
|
|
268
|
+
selectedItem.value = props.modelValue
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
)
|
|
81
272
|
</script>
|
|
82
273
|
|
|
83
274
|
<template>
|
|
84
|
-
<section class="column q-gutter-
|
|
85
|
-
<label
|
|
275
|
+
<section class="column q-gutter-xs" :dataTestId="dataTestId">
|
|
276
|
+
<label class="row items-center" for="select">
|
|
86
277
|
<div class="u-select-label text-body-sm">
|
|
87
|
-
{{ label }}
|
|
88
|
-
<span class="text-red-5 q-ml-xs"
|
|
278
|
+
<span>{{ label }}</span>
|
|
279
|
+
<span v-if="isRequired" class="text-red-5 q-ml-xs">*</span>
|
|
89
280
|
</div>
|
|
90
281
|
|
|
91
282
|
<q-icon
|
|
92
|
-
class="q-ml-xs fa-kit-duotone fa-circle-info cursor-pointer"
|
|
93
283
|
v-if="toolTipText"
|
|
94
|
-
|
|
95
|
-
color="neutral-9"
|
|
284
|
+
class="q-ml-xs fa-kit-duotone fa-circle-info cursor-pointer"
|
|
96
285
|
aria-hidden="true"
|
|
286
|
+
color="neutral-9"
|
|
287
|
+
size="1rem"
|
|
97
288
|
>
|
|
98
289
|
<UTooltip
|
|
99
|
-
:description="toolTipText"
|
|
100
290
|
anchor="top middle"
|
|
291
|
+
:description="toolTipText"
|
|
101
292
|
self="bottom middle"
|
|
102
293
|
/>
|
|
103
294
|
</q-icon>
|
|
104
295
|
</label>
|
|
105
296
|
|
|
106
297
|
<q-select
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
298
|
+
v-bind="$attrs"
|
|
299
|
+
v-model="model"
|
|
300
|
+
:class="`u-select field-${size}`"
|
|
301
|
+
options-selected-class="primary bg-blue-1"
|
|
302
|
+
:popup-content-class="`u-options-menu ${popupClass}`"
|
|
303
|
+
behavior="menu"
|
|
304
|
+
bottom-slots
|
|
110
305
|
:color="color"
|
|
111
306
|
emit-value
|
|
307
|
+
hide-bottom-space
|
|
308
|
+
:hide-dropdown-icon="$screen.isMobile ? true : false"
|
|
309
|
+
id="select"
|
|
112
310
|
map-options
|
|
113
311
|
:menu-offset="[0, 5]"
|
|
114
|
-
:
|
|
312
|
+
:no-error-icon="!showErrorIcon"
|
|
115
313
|
:option-label="optionLabel"
|
|
314
|
+
:option-value="optionValue"
|
|
116
315
|
:options="options"
|
|
117
316
|
outlined
|
|
118
|
-
|
|
119
|
-
:
|
|
120
|
-
|
|
121
|
-
hide-bottom-space
|
|
122
|
-
bottom-slots
|
|
123
|
-
v-bind="$attrs"
|
|
317
|
+
:placeholder="placeholderText"
|
|
318
|
+
:readonly="readonly"
|
|
319
|
+
ref="selectRef"
|
|
124
320
|
:use-input="useInput"
|
|
321
|
+
@click="handleClick"
|
|
125
322
|
@filter="filterFn"
|
|
126
|
-
|
|
323
|
+
@input="handleInput"
|
|
324
|
+
@keydown="handleKeydown"
|
|
325
|
+
@keydown.enter="handleKeydownEnter"
|
|
326
|
+
@update:model-value="(val) => updateVal(val)"
|
|
127
327
|
>
|
|
128
328
|
<template v-slot:no-option>
|
|
129
329
|
<q-item>
|
|
@@ -132,15 +332,21 @@ const model = computed({
|
|
|
132
332
|
</q-item-section>
|
|
133
333
|
</q-item>
|
|
134
334
|
</template>
|
|
335
|
+
<template v-if="$screen.isMobile && !readonly" v-slot:append>
|
|
336
|
+
<q-icon
|
|
337
|
+
class="cursor-pointer"
|
|
338
|
+
name="arrow_drop_down"
|
|
339
|
+
@click.stop="handleClick"
|
|
340
|
+
/>
|
|
341
|
+
</template>
|
|
135
342
|
|
|
136
343
|
<template v-if="leftIcon" v-slot:prepend>
|
|
137
344
|
<q-icon :class="leftIcon" size="1rem" />
|
|
138
345
|
</template>
|
|
139
346
|
|
|
140
347
|
<template v-if="hintText" v-slot:hint>
|
|
141
|
-
<div class="row no-wrap items-center">
|
|
142
|
-
<q-icon :class="hintIcon" size="1rem"
|
|
143
|
-
|
|
348
|
+
<div class="row no-wrap items-center text-neutral-9">
|
|
349
|
+
<q-icon v-if="hintIcon" :class="hintIcon" size="1rem" />
|
|
144
350
|
<div class="q-mx-xxs text-body-xs">
|
|
145
351
|
{{ hintText }}
|
|
146
352
|
</div>
|
|
@@ -148,30 +354,133 @@ const model = computed({
|
|
|
148
354
|
</template>
|
|
149
355
|
|
|
150
356
|
<template v-slot:option="scope">
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
357
|
+
<UMenuItem
|
|
358
|
+
v-bind="scope.itemProps"
|
|
359
|
+
v-if="!$screen.isMobile"
|
|
360
|
+
class="q-ma-xxs"
|
|
361
|
+
iconClass="icon-secondary-opacity"
|
|
362
|
+
:label="scope.opt.label"
|
|
363
|
+
:leftIcon="scope.opt.leftIcon"
|
|
364
|
+
:key="scope.opt.value"
|
|
365
|
+
:rightIcon="scope.opt.rightIcon"
|
|
366
|
+
:selected="scope.selected || model === scope.label"
|
|
367
|
+
>
|
|
368
|
+
<template #leading_slot>
|
|
369
|
+
<slot name="leading_slot" />
|
|
370
|
+
<div v-if="!disableAvatar">
|
|
371
|
+
<UAvatar
|
|
372
|
+
v-if="scope.opt.avatarUrl"
|
|
373
|
+
:image="scope.opt.avatarUrl"
|
|
374
|
+
:name="scope.opt.label"
|
|
375
|
+
size="md"
|
|
376
|
+
/>
|
|
377
|
+
<UAvatar v-else :name="scope.opt.label" size="md" />
|
|
378
|
+
</div>
|
|
379
|
+
</template>
|
|
380
|
+
<template #trailing_slot>
|
|
381
|
+
<slot name="trailing_slot">
|
|
382
|
+
<q-icon
|
|
383
|
+
v-if="scope.selected || model === scope.label"
|
|
384
|
+
class="fa-kit-duotone fa-circle-check"
|
|
385
|
+
color="primary"
|
|
386
|
+
size="1rem"
|
|
387
|
+
/>
|
|
388
|
+
</slot>
|
|
389
|
+
</template>
|
|
390
|
+
</UMenuItem>
|
|
173
391
|
</template>
|
|
174
392
|
</q-select>
|
|
393
|
+
<USheet
|
|
394
|
+
v-if="$screen.isMobile"
|
|
395
|
+
v-model:dialogs="dialogs"
|
|
396
|
+
:close-icon-label="closeIconLabel"
|
|
397
|
+
dialogClass="select-sheet"
|
|
398
|
+
:heading="sheetHeading"
|
|
399
|
+
:heading-caption="caption"
|
|
400
|
+
:show-action-buttons="true"
|
|
401
|
+
>
|
|
402
|
+
<template #header>
|
|
403
|
+
<UInputTextStd
|
|
404
|
+
v-if="useInput"
|
|
405
|
+
v-model="search"
|
|
406
|
+
class="q-mt-ba"
|
|
407
|
+
:leftIcon="leftIcon"
|
|
408
|
+
:placeholder="placeholder"
|
|
409
|
+
size="md"
|
|
410
|
+
/>
|
|
411
|
+
</template>
|
|
412
|
+
<template #content>
|
|
413
|
+
<template v-if="filterOptions.length > 0">
|
|
414
|
+
<template v-for="(item, index) in filterOptions" :key="item.value">
|
|
415
|
+
<UMenuItem
|
|
416
|
+
iconClass=""
|
|
417
|
+
:destructive="item.destructive"
|
|
418
|
+
:disable="item.disable"
|
|
419
|
+
:hide="item.hide"
|
|
420
|
+
:inSheet="true"
|
|
421
|
+
:label="item.label"
|
|
422
|
+
labelStyle="text-caption-lg"
|
|
423
|
+
:leftIcon="item.leftIcon"
|
|
424
|
+
:positive="item.positive"
|
|
425
|
+
:rightIcon="item.rightIcon"
|
|
426
|
+
:selected="
|
|
427
|
+
item.value === selectedItem || item.label === selectedItem
|
|
428
|
+
"
|
|
429
|
+
@onClick="handleSheetItemClick(item, index)"
|
|
430
|
+
>
|
|
431
|
+
<template #leading_slot>
|
|
432
|
+
<slot name="leading_slot" />
|
|
433
|
+
<div v-if="!disableAvatar">
|
|
434
|
+
<UAvatar
|
|
435
|
+
v-if="item.avatarUrl"
|
|
436
|
+
:image="item.avatarUrl"
|
|
437
|
+
:name="item.label"
|
|
438
|
+
size="md"
|
|
439
|
+
/>
|
|
440
|
+
<UAvatar v-else :name="item.label" size="md" />
|
|
441
|
+
</div>
|
|
442
|
+
</template>
|
|
443
|
+
<template #trailing_slot>
|
|
444
|
+
<slot name="trailing_slot">
|
|
445
|
+
<q-icon
|
|
446
|
+
v-if="
|
|
447
|
+
item.value === selectedItem || item.label === selectedItem
|
|
448
|
+
"
|
|
449
|
+
class="fa-kit-duotone fa-circle-check"
|
|
450
|
+
color="primary"
|
|
451
|
+
size="1rem"
|
|
452
|
+
/>
|
|
453
|
+
</slot>
|
|
454
|
+
</template>
|
|
455
|
+
</UMenuItem>
|
|
456
|
+
</template>
|
|
457
|
+
</template>
|
|
458
|
+
<template v-else>
|
|
459
|
+
<q-item>
|
|
460
|
+
<q-item-section class="text-grey">
|
|
461
|
+
{{ noSearchText }}
|
|
462
|
+
</q-item-section>
|
|
463
|
+
</q-item>
|
|
464
|
+
</template>
|
|
465
|
+
</template>
|
|
466
|
+
<template #action_primary_one>
|
|
467
|
+
<UBtnStd
|
|
468
|
+
color="primary"
|
|
469
|
+
:label="cancelLabel"
|
|
470
|
+
outline
|
|
471
|
+
size="md"
|
|
472
|
+
@onClick="handleClose"
|
|
473
|
+
/>
|
|
474
|
+
</template>
|
|
475
|
+
<template #action_primary_two>
|
|
476
|
+
<UBtnStd
|
|
477
|
+
color="primary"
|
|
478
|
+
:label="applyLabel"
|
|
479
|
+
size="md"
|
|
480
|
+
@onClick="handleApply"
|
|
481
|
+
/>
|
|
482
|
+
</template>
|
|
483
|
+
</USheet>
|
|
175
484
|
</section>
|
|
176
485
|
</template>
|
|
177
486
|
|
|
@@ -188,7 +497,7 @@ const model = computed({
|
|
|
188
497
|
|
|
189
498
|
&::before
|
|
190
499
|
background: white
|
|
191
|
-
border:
|
|
500
|
+
border: 0.094rem solid $neutral-4
|
|
192
501
|
|
|
193
502
|
&.field-sm
|
|
194
503
|
.q-field__marginal
|
|
@@ -197,37 +506,59 @@ const model = computed({
|
|
|
197
506
|
&.field-md
|
|
198
507
|
.q-field__marginal
|
|
199
508
|
height: $lg
|
|
200
|
-
|
|
201
509
|
&.field-lg
|
|
202
510
|
.q-field__marginal
|
|
203
511
|
height: $xl
|
|
204
512
|
|
|
205
513
|
&:hover .q-field__control::before
|
|
206
|
-
border:
|
|
514
|
+
border: 0.094rem solid $primary
|
|
207
515
|
|
|
208
516
|
&.q-field--with-bottom
|
|
209
517
|
padding-bottom: 0
|
|
210
518
|
|
|
211
519
|
.q-field__control:focus-within
|
|
212
|
-
box-shadow : 0 0 0
|
|
520
|
+
box-shadow : 0 0 0 0.125rem rgba(35, 75, 169, .20)
|
|
213
521
|
|
|
214
522
|
.q-field__bottom
|
|
215
|
-
padding:
|
|
523
|
+
padding: $xxs 0 0 0
|
|
216
524
|
|
|
217
525
|
.q-field__prepend
|
|
218
526
|
padding-right: $xs
|
|
219
527
|
|
|
528
|
+
.u-select.q-field--disabled
|
|
529
|
+
&.q-field--outlined .q-field__control
|
|
530
|
+
&::before
|
|
531
|
+
background: $neutral-3
|
|
532
|
+
|
|
533
|
+
.select-sheet
|
|
534
|
+
.sheet-card-wrapper .q-card__section .q-item
|
|
535
|
+
padding:$ba $ba !important
|
|
536
|
+
margin-bottom: $xs !important
|
|
537
|
+
border-radius: $sm !important
|
|
538
|
+
align-items: flex-start !important
|
|
539
|
+
.label
|
|
540
|
+
line-height: $ms !important
|
|
541
|
+
.q-icon
|
|
542
|
+
font-size: $ms !important
|
|
543
|
+
.q-focus-helper
|
|
544
|
+
display: none
|
|
545
|
+
|
|
546
|
+
.sheet-action-wrapper .action-buttons
|
|
547
|
+
gap: $ba !important
|
|
548
|
+
padding: $ba !important
|
|
549
|
+
|
|
550
|
+
.sheet-card-wrapper .main-content-dialog
|
|
551
|
+
padding-top: $xs !important
|
|
552
|
+
padding-bottom: $xs !important
|
|
553
|
+
|
|
220
554
|
.u-options-menu
|
|
221
555
|
border-radius: $xs
|
|
222
556
|
box-shadow: $shadow-2
|
|
223
557
|
max-height: 11.25rem !important
|
|
224
|
-
width: 18rem
|
|
225
558
|
overflow-y: auto
|
|
226
559
|
scrollbar-width: none
|
|
227
560
|
|
|
228
|
-
.u-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
padding: $xs
|
|
232
|
-
min-height: $lg
|
|
561
|
+
.u-options-menu
|
|
562
|
+
.q-item:last-child
|
|
563
|
+
margin-bottom: $xxs
|
|
233
564
|
</style>
|