@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,295 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UInputTextStd from './UInputTextStd.vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
hintText: {
|
|
6
|
+
type: String,
|
|
7
|
+
},
|
|
8
|
+
hintIcon: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: 'fa-kit-duotone fa-circle-info',
|
|
11
|
+
},
|
|
12
|
+
isRequired: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false,
|
|
15
|
+
},
|
|
16
|
+
label: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
rightIcon: {
|
|
20
|
+
type: String,
|
|
21
|
+
},
|
|
22
|
+
outlined: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true,
|
|
25
|
+
},
|
|
26
|
+
borderless: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
placeholder: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'Input Text',
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'md',
|
|
37
|
+
validator: (val) => ['sm', 'md', 'lg'].includes(val),
|
|
38
|
+
},
|
|
39
|
+
toolTipText: {
|
|
40
|
+
type: String,
|
|
41
|
+
},
|
|
42
|
+
validationRules: {
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => [(val) => val.length === 10],
|
|
45
|
+
},
|
|
46
|
+
readonly: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
disable: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
error: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
},
|
|
57
|
+
errorMessage: {
|
|
58
|
+
type: String,
|
|
59
|
+
},
|
|
60
|
+
options: {
|
|
61
|
+
type: Array,
|
|
62
|
+
},
|
|
63
|
+
selectedCountry: {
|
|
64
|
+
type: Object,
|
|
65
|
+
},
|
|
66
|
+
mask: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: '##########',
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
const modelValue = defineModel()
|
|
73
|
+
|
|
74
|
+
const emit = defineEmits(['update-country'])
|
|
75
|
+
|
|
76
|
+
const selectCountry = (country) => {
|
|
77
|
+
emit('update-country', country)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const toLowerCase = (str) => str.toLowerCase()
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<UInputTextStd
|
|
85
|
+
class="phone-input"
|
|
86
|
+
:label="label"
|
|
87
|
+
:isRequired="isRequired"
|
|
88
|
+
v-model="modelValue"
|
|
89
|
+
:mask="mask"
|
|
90
|
+
:validationRules="validationRules"
|
|
91
|
+
leftIcon="true"
|
|
92
|
+
:rightIcon="rightIcon"
|
|
93
|
+
:hintText="hintText"
|
|
94
|
+
:hintIcon="hintIcon"
|
|
95
|
+
:toolTipText="toolTipText"
|
|
96
|
+
:placeholder="placeholder"
|
|
97
|
+
:size="size"
|
|
98
|
+
:disable="disable"
|
|
99
|
+
:readonly="readonly"
|
|
100
|
+
:error="error"
|
|
101
|
+
:error-message="errorMessage"
|
|
102
|
+
:borderless="borderless"
|
|
103
|
+
:outlined="outlined"
|
|
104
|
+
>
|
|
105
|
+
<template v-slot:prepend>
|
|
106
|
+
<q-btn-dropdown
|
|
107
|
+
:disable="readonly"
|
|
108
|
+
rounded
|
|
109
|
+
flat
|
|
110
|
+
class="u-phone-dropdown text-body-sm"
|
|
111
|
+
:class="`btn-field-${size}`"
|
|
112
|
+
content-class="u-dropdown-list"
|
|
113
|
+
menu-anchor="top right"
|
|
114
|
+
menu-self="bottom middle"
|
|
115
|
+
:menu-offset="[30, 5]"
|
|
116
|
+
>
|
|
117
|
+
<template #label>
|
|
118
|
+
<q-icon
|
|
119
|
+
left
|
|
120
|
+
:aria-label="selectedCountry.name"
|
|
121
|
+
:class="`fi fi-${toLowerCase(
|
|
122
|
+
selectedCountry.flag
|
|
123
|
+
)} flag-icon q-mr-xs`"
|
|
124
|
+
/>
|
|
125
|
+
<label class="selected-code"> {{ selectedCountry.code }}</label>
|
|
126
|
+
</template>
|
|
127
|
+
|
|
128
|
+
<q-list class="u-list">
|
|
129
|
+
<q-item
|
|
130
|
+
v-for="country in options"
|
|
131
|
+
:key="country.code"
|
|
132
|
+
clickable
|
|
133
|
+
v-close-popup
|
|
134
|
+
v-ripple
|
|
135
|
+
@click="selectCountry(country)"
|
|
136
|
+
class="q-my-xxs"
|
|
137
|
+
>
|
|
138
|
+
<q-item-section class="flag-section">
|
|
139
|
+
<q-icon
|
|
140
|
+
:aria-label="country.name"
|
|
141
|
+
left
|
|
142
|
+
:class="`fi fi-${toLowerCase(country.flag)} flag-icon q-mr-xs`"
|
|
143
|
+
size="1.25rem"
|
|
144
|
+
/>
|
|
145
|
+
</q-item-section>
|
|
146
|
+
<q-item-section>
|
|
147
|
+
<q-item-label class="text-body-sm">
|
|
148
|
+
{{ country.name }}
|
|
149
|
+
</q-item-label>
|
|
150
|
+
</q-item-section>
|
|
151
|
+
</q-item>
|
|
152
|
+
</q-list>
|
|
153
|
+
</q-btn-dropdown>
|
|
154
|
+
</template>
|
|
155
|
+
</UInputTextStd>
|
|
156
|
+
</template>
|
|
157
|
+
|
|
158
|
+
<style lang="sass">
|
|
159
|
+
.selected-code
|
|
160
|
+
width: 1.5rem
|
|
161
|
+
color: $dark
|
|
162
|
+
.u-dropdown-list
|
|
163
|
+
.q-item__section--main
|
|
164
|
+
margin-left: 0px
|
|
165
|
+
|
|
166
|
+
.flag-icon
|
|
167
|
+
width: 1rem
|
|
168
|
+
height: 0.65rem
|
|
169
|
+
.phone-input
|
|
170
|
+
.q-field__control
|
|
171
|
+
&:hover
|
|
172
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
173
|
+
border-right: 1.5px solid $primary
|
|
174
|
+
&.q-field--outlined .q-field__control:before
|
|
175
|
+
transition: none
|
|
176
|
+
.u-phone-dropdown
|
|
177
|
+
background: #6f7d9812
|
|
178
|
+
|
|
179
|
+
&.q-field--error .q-field__control
|
|
180
|
+
&:hover
|
|
181
|
+
.u-phone-dropdown
|
|
182
|
+
border-right: 2px solid $accent
|
|
183
|
+
&.q-field--outlined.q-field--readonly .q-field__control:focus-within::before
|
|
184
|
+
border: 1.5px solid $primary
|
|
185
|
+
|
|
186
|
+
&.q-field--error
|
|
187
|
+
&:hover
|
|
188
|
+
.u-phone-dropdown
|
|
189
|
+
border-right: 2px solid $accent
|
|
190
|
+
.u-phone-dropdown
|
|
191
|
+
border-right: 2px solid $accent
|
|
192
|
+
|
|
193
|
+
&.q-field--borderless
|
|
194
|
+
.q-field__control.relative-position.row.no-wrap.text-negative:focus-within
|
|
195
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
196
|
+
border-right: 2px solid $accent-transparent
|
|
197
|
+
&.field-lg
|
|
198
|
+
&.q-field--outlined .q-field__control
|
|
199
|
+
padding: 0 $sm 0 0
|
|
200
|
+
|
|
201
|
+
.u-list
|
|
202
|
+
width: 15rem
|
|
203
|
+
padding: $xxs
|
|
204
|
+
.q-item
|
|
205
|
+
height: $md
|
|
206
|
+
padding: 0px $xs
|
|
207
|
+
.q-item__section--main
|
|
208
|
+
flex: none
|
|
209
|
+
.u-phone-dropdown
|
|
210
|
+
border-radius: $xs 0px 0px $xs
|
|
211
|
+
border-right: 1.5px solid $neutral-4
|
|
212
|
+
&:hover::before
|
|
213
|
+
border: 0px solid $primary
|
|
214
|
+
|
|
215
|
+
&.q-btn
|
|
216
|
+
height: 2rem
|
|
217
|
+
min-height: 2rem
|
|
218
|
+
padding: 0px $xs
|
|
219
|
+
|
|
220
|
+
&.btn-field-sm
|
|
221
|
+
height: $md
|
|
222
|
+
&.btn-field-md
|
|
223
|
+
height: $lg
|
|
224
|
+
&.btn-field-lg
|
|
225
|
+
height: $xl
|
|
226
|
+
|
|
227
|
+
.q-btn-dropdown__arrow
|
|
228
|
+
width: 1rem
|
|
229
|
+
height: 1rem
|
|
230
|
+
|
|
231
|
+
.phone-input
|
|
232
|
+
.q-field__inner
|
|
233
|
+
border-radius: $xs
|
|
234
|
+
&.q-field--borderless
|
|
235
|
+
.q-field__control
|
|
236
|
+
padding: 0 $xs 0 0
|
|
237
|
+
background: $neutral-1
|
|
238
|
+
border-radius: $xs
|
|
239
|
+
&:hover
|
|
240
|
+
box-shadow : 0px 0px 0px 2px $primary-transparent
|
|
241
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
242
|
+
border-right: 2px solid $neutral-4
|
|
243
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
244
|
+
border-right: none
|
|
245
|
+
&:focus-within
|
|
246
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
247
|
+
border-right: 2px solid $neutral-4
|
|
248
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
249
|
+
border-right: 2px solid transparent
|
|
250
|
+
|
|
251
|
+
.q-field--standout .q-field__control
|
|
252
|
+
border-radius: $xs
|
|
253
|
+
|
|
254
|
+
.q-field__append.q-field__marginal.row.no-wrap.items-center.q-anchor--skip
|
|
255
|
+
display: none
|
|
256
|
+
|
|
257
|
+
.q-field__before,
|
|
258
|
+
.q-field__prepend
|
|
259
|
+
padding: 0 $xs
|
|
260
|
+
padding-left: 0
|
|
261
|
+
|
|
262
|
+
.q-field__after,
|
|
263
|
+
.q-field__append
|
|
264
|
+
padding-left: 0px
|
|
265
|
+
|
|
266
|
+
.q-icon
|
|
267
|
+
&.slot-icon-size-sm
|
|
268
|
+
font-size: $sm
|
|
269
|
+
&.slot-icon-size-md
|
|
270
|
+
font-size: $ba
|
|
271
|
+
&.slot-icon-size-lg
|
|
272
|
+
font-size: $ba
|
|
273
|
+
|
|
274
|
+
&.q-field--auto-height .q-field__control,
|
|
275
|
+
&.q-field--auto-height .q-field__native
|
|
276
|
+
min-height: 2rem
|
|
277
|
+
|
|
278
|
+
&.q-field--outlined .q-field__control
|
|
279
|
+
border-radius: $xs
|
|
280
|
+
padding: 0 $xs 0 0
|
|
281
|
+
background: $neutral-1
|
|
282
|
+
&::before
|
|
283
|
+
border:1.5px solid $neutral-4
|
|
284
|
+
&:hover::before
|
|
285
|
+
border:1.5px solid $primary
|
|
286
|
+
|
|
287
|
+
.q-field__control.relative-position.row.no-wrap.text-negative:focus-within
|
|
288
|
+
box-shadow: 0px 0px 0px 2px $accent-transparent
|
|
289
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
290
|
+
border-right: 2px solid $accent
|
|
291
|
+
.q-field__control:focus-within
|
|
292
|
+
box-shadow : 0px 0px 0px 2px $primary-transparent
|
|
293
|
+
.q-btn-dropdown.u-phone-dropdown
|
|
294
|
+
border-right: 2px solid $primary
|
|
295
|
+
</style>
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import UTooltip from './UTooltip.vue'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
hintText: {
|
|
7
|
+
type: String,
|
|
8
|
+
},
|
|
9
|
+
hintIcon: {
|
|
10
|
+
type: String,
|
|
11
|
+
},
|
|
12
|
+
isRequired: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false,
|
|
15
|
+
},
|
|
16
|
+
label: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
leftIcon: {
|
|
20
|
+
type: String,
|
|
21
|
+
},
|
|
22
|
+
rightIcon: {
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
25
|
+
outlined: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true,
|
|
28
|
+
},
|
|
29
|
+
borderless: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
placeholder: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
rightIconAriaLabel: {
|
|
37
|
+
type: String,
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'md',
|
|
42
|
+
validator: (val) => ['sm', 'md', 'lg'].includes(val),
|
|
43
|
+
},
|
|
44
|
+
toolTipText: {
|
|
45
|
+
type: String,
|
|
46
|
+
},
|
|
47
|
+
validationRules: {
|
|
48
|
+
type: Array,
|
|
49
|
+
},
|
|
50
|
+
readonly: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
disable: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
error: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
},
|
|
61
|
+
errorMessage: {
|
|
62
|
+
type: String,
|
|
63
|
+
},
|
|
64
|
+
leftBorderRadius: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false,
|
|
67
|
+
},
|
|
68
|
+
parentClass: {
|
|
69
|
+
type: String,
|
|
70
|
+
},
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
defineOptions({
|
|
74
|
+
inheritAttrs: false,
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const leftBorderRadius = computed(() => {
|
|
78
|
+
if (props.leftBorderRadius === true) {
|
|
79
|
+
return 'leftBorderRadius'
|
|
80
|
+
}
|
|
81
|
+
return ''
|
|
82
|
+
})
|
|
83
|
+
const modelValue = defineModel()
|
|
84
|
+
|
|
85
|
+
const emit = defineEmits(['onRightIconClick'])
|
|
86
|
+
|
|
87
|
+
const handleRightIconClick = () => {
|
|
88
|
+
emit('onRightIconClick')
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<template>
|
|
93
|
+
<div class="q-gutter-xs" :class="parentClass">
|
|
94
|
+
<label
|
|
95
|
+
v-if="label"
|
|
96
|
+
role="label"
|
|
97
|
+
for="input"
|
|
98
|
+
class="row items-center q-mb-xxs"
|
|
99
|
+
>
|
|
100
|
+
<div class="u-input-label text-body-sm">
|
|
101
|
+
{{ label }}
|
|
102
|
+
<span class="text-red-5 text-body-sm q-mx-xxs" v-if="isRequired">
|
|
103
|
+
*
|
|
104
|
+
</span>
|
|
105
|
+
</div>
|
|
106
|
+
<q-icon
|
|
107
|
+
class="q-ml-xxs fa-kit-duotone fa-circle-info cursor-pointer"
|
|
108
|
+
v-if="toolTipText"
|
|
109
|
+
size="1rem"
|
|
110
|
+
color="neutral-9"
|
|
111
|
+
:aria-label="toolTipText"
|
|
112
|
+
>
|
|
113
|
+
<UTooltip
|
|
114
|
+
:description="toolTipText"
|
|
115
|
+
anchor="top middle"
|
|
116
|
+
self="bottom middle"
|
|
117
|
+
:offset="[0, 0]"
|
|
118
|
+
/>
|
|
119
|
+
</q-icon>
|
|
120
|
+
</label>
|
|
121
|
+
<q-input
|
|
122
|
+
id="input"
|
|
123
|
+
class="u-input"
|
|
124
|
+
:class="`field-${size} ${leftBorderRadius}`"
|
|
125
|
+
v-model="modelValue"
|
|
126
|
+
name="input"
|
|
127
|
+
:outlined="outlined"
|
|
128
|
+
:placeholder="placeholder"
|
|
129
|
+
:rules="validationRules"
|
|
130
|
+
:standout="!outlined"
|
|
131
|
+
type="text"
|
|
132
|
+
:bottom-slots="!!hintText"
|
|
133
|
+
hide-bottom-space
|
|
134
|
+
:readonly="readonly"
|
|
135
|
+
:disable="disable"
|
|
136
|
+
:borderless="borderless"
|
|
137
|
+
:error="error"
|
|
138
|
+
v-bind="$attrs"
|
|
139
|
+
>
|
|
140
|
+
<template #prepend v-if="leftIcon">
|
|
141
|
+
<slot name="prepend"></slot>
|
|
142
|
+
<q-icon
|
|
143
|
+
v-if="!$slots.prepend"
|
|
144
|
+
:class="`slot-icon-size-${size} ${leftIcon}`"
|
|
145
|
+
/>
|
|
146
|
+
</template>
|
|
147
|
+
<template #hint v-if="hintText">
|
|
148
|
+
<div class="row items-center text-neutral-9 no-wrap">
|
|
149
|
+
<q-icon
|
|
150
|
+
:class="hintIcon"
|
|
151
|
+
v-if="hintIcon"
|
|
152
|
+
size="1rem"
|
|
153
|
+
:aria-label="hintText"
|
|
154
|
+
/>
|
|
155
|
+
<div class="q-ml-xxs text-body-xs">{{ hintText }}</div>
|
|
156
|
+
</div>
|
|
157
|
+
</template>
|
|
158
|
+
<template #append>
|
|
159
|
+
<slot name="append">
|
|
160
|
+
<q-icon
|
|
161
|
+
v-if="rightIcon"
|
|
162
|
+
@click="handleRightIconClick"
|
|
163
|
+
:class="`slot-icon-size-${size} ${rightIcon}`"
|
|
164
|
+
:tabindex="0"
|
|
165
|
+
:aria-label="
|
|
166
|
+
rightIcon && rightIconAriaLabel
|
|
167
|
+
? rightIconAriaLabel
|
|
168
|
+
: 'right input icon '
|
|
169
|
+
"
|
|
170
|
+
/>
|
|
171
|
+
</slot>
|
|
172
|
+
</template>
|
|
173
|
+
<template v-slot:error>
|
|
174
|
+
<div class="row items-center no-wrap" v-if="errorMessage">
|
|
175
|
+
<q-icon
|
|
176
|
+
class="fa-kit-duotone fa-warning-octagon"
|
|
177
|
+
size="1rem"
|
|
178
|
+
:aria-label="errorMessage"
|
|
179
|
+
/>
|
|
180
|
+
<div class="q-ml-xxs text-body-xs" role="validation error">
|
|
181
|
+
{{ errorMessage }}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</template>
|
|
185
|
+
</q-input>
|
|
186
|
+
</div>
|
|
187
|
+
</template>
|
|
188
|
+
|
|
189
|
+
<style lang="sass">
|
|
190
|
+
.u-input
|
|
191
|
+
.q-field--with-bottom
|
|
192
|
+
padding-bottom: 0px
|
|
193
|
+
&.q-field--outlined.q-field--disabled .q-field__control
|
|
194
|
+
background: $neutral-3
|
|
195
|
+
&.leftBorderRadius
|
|
196
|
+
&.q-field--outlined .q-field__control
|
|
197
|
+
border-radius: 0px $xs $xs 0px
|
|
198
|
+
&.q-field--borderless
|
|
199
|
+
.q-field__control
|
|
200
|
+
border-radius: 0px $xs $xs 0px
|
|
201
|
+
|
|
202
|
+
.q-field__inner
|
|
203
|
+
border-radius: $xs
|
|
204
|
+
|
|
205
|
+
&.q-field--borderless
|
|
206
|
+
.q-field__control
|
|
207
|
+
padding: 0 $xs
|
|
208
|
+
background: $neutral-1
|
|
209
|
+
border-radius: $xs
|
|
210
|
+
&:hover
|
|
211
|
+
box-shadow : 0px 0px 0px 2px $primary-transparent
|
|
212
|
+
|
|
213
|
+
.q-field--standout .q-field__control
|
|
214
|
+
border-radius: $xs
|
|
215
|
+
|
|
216
|
+
.q-field__append.q-field__marginal.row.no-wrap.items-center.q-anchor--skip
|
|
217
|
+
display: none
|
|
218
|
+
|
|
219
|
+
.q-field__before,
|
|
220
|
+
.q-field__prepend
|
|
221
|
+
padding: 0 $xs
|
|
222
|
+
padding-left: 0
|
|
223
|
+
|
|
224
|
+
.q-field__after,
|
|
225
|
+
.q-field__append
|
|
226
|
+
padding-left: $xs
|
|
227
|
+
|
|
228
|
+
.q-icon
|
|
229
|
+
&.slot-icon-size-sm
|
|
230
|
+
font-size: $sm
|
|
231
|
+
&.slot-icon-size-md
|
|
232
|
+
font-size: $ba
|
|
233
|
+
&.slot-icon-size-lg
|
|
234
|
+
font-size: $ba
|
|
235
|
+
|
|
236
|
+
&.q-field--auto-height .q-field__control,
|
|
237
|
+
&.q-field--auto-height .q-field__native
|
|
238
|
+
min-height: $md
|
|
239
|
+
|
|
240
|
+
&.q-field--outlined .q-field__control
|
|
241
|
+
border-radius: $xs
|
|
242
|
+
padding: 0 $xs
|
|
243
|
+
background: $neutral-1
|
|
244
|
+
|
|
245
|
+
&::before
|
|
246
|
+
border:1.5px solid $neutral-4
|
|
247
|
+
|
|
248
|
+
&:hover::before
|
|
249
|
+
border:1.5px solid $primary
|
|
250
|
+
|
|
251
|
+
.q-field__control.relative-position.row.no-wrap.text-negative:focus-within
|
|
252
|
+
box-shadow: 0px 0px 0px 2px $accent-transparent
|
|
253
|
+
|
|
254
|
+
.q-field__control:focus-within
|
|
255
|
+
box-shadow : 0px 0px 0px 2px $primary-transparent
|
|
256
|
+
|
|
257
|
+
&.field-sm
|
|
258
|
+
.q-field__control,
|
|
259
|
+
.q-field__marginal
|
|
260
|
+
height: $md
|
|
261
|
+
&.q-field--outlined.q-field__control
|
|
262
|
+
padding: 0 $xs
|
|
263
|
+
|
|
264
|
+
&.q-field__prepend .q-field__marginal
|
|
265
|
+
padding: 0 $xs
|
|
266
|
+
|
|
267
|
+
&.field-md
|
|
268
|
+
.q-field__control,
|
|
269
|
+
.q-field__marginal
|
|
270
|
+
height: $lg
|
|
271
|
+
&.q-field--outlined.q-field__control
|
|
272
|
+
padding: 0 $xs
|
|
273
|
+
|
|
274
|
+
&.q-field__prepend.q-field__marginal
|
|
275
|
+
padding: 0 $xs
|
|
276
|
+
padding-left: 0
|
|
277
|
+
|
|
278
|
+
&.field-lg
|
|
279
|
+
.q-field__control,
|
|
280
|
+
.q-field__marginal
|
|
281
|
+
height: $xl
|
|
282
|
+
&.q-field--outlined .q-field__control
|
|
283
|
+
padding: 0 $sm
|
|
284
|
+
.q-field__prepend.q-field__marginal
|
|
285
|
+
padding-left: 0px
|
|
286
|
+
|
|
287
|
+
.q-field__bottom
|
|
288
|
+
padding: 0
|
|
289
|
+
align-items: center
|
|
290
|
+
|
|
291
|
+
.q-field__messages
|
|
292
|
+
margin-top: $xxs
|
|
293
|
+
</style>
|