@usssa/component-library 1.0.0-alpha.89 → 1.0.0-alpha.90
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/package.json
CHANGED
|
@@ -77,15 +77,16 @@ defineOptions({
|
|
|
77
77
|
inheritAttrs: false,
|
|
78
78
|
})
|
|
79
79
|
|
|
80
|
+
const modelValue = defineModel()
|
|
81
|
+
|
|
82
|
+
const emit = defineEmits(['onRightIconClick'])
|
|
83
|
+
|
|
80
84
|
const leftBorderRadius = computed(() => {
|
|
81
85
|
if (props.leftBorderRadius === true) {
|
|
82
86
|
return 'leftBorderRadius'
|
|
83
87
|
}
|
|
84
88
|
return ''
|
|
85
89
|
})
|
|
86
|
-
const modelValue = defineModel()
|
|
87
|
-
|
|
88
|
-
const emit = defineEmits(['onRightIconClick'])
|
|
89
90
|
|
|
90
91
|
const handleRightIconClick = () => {
|
|
91
92
|
emit('onRightIconClick')
|
|
@@ -96,64 +97,66 @@ const handleRightIconClick = () => {
|
|
|
96
97
|
<div class="q-gutter-xs" :class="parentClass">
|
|
97
98
|
<label
|
|
98
99
|
v-if="label"
|
|
99
|
-
role="label"
|
|
100
|
-
for="input"
|
|
101
100
|
class="row items-center q-mb-xxs"
|
|
101
|
+
for="input"
|
|
102
|
+
role="label"
|
|
102
103
|
>
|
|
103
104
|
<div class="u-input-label text-body-sm">
|
|
104
105
|
{{ label }}
|
|
105
|
-
<span class="text-red-5 text-body-sm q-mx-xxs"
|
|
106
|
+
<span v-if="isRequired" class="text-red-5 text-body-sm q-mx-xxs">
|
|
106
107
|
*
|
|
107
108
|
</span>
|
|
108
109
|
</div>
|
|
109
110
|
<q-icon
|
|
110
|
-
class="q-ml-xxs fa-kit-duotone fa-circle-info cursor-pointer"
|
|
111
111
|
v-if="toolTipText"
|
|
112
|
-
|
|
112
|
+
class="q-ml-xxs fa-kit-duotone fa-circle-info cursor-pointer"
|
|
113
113
|
color="neutral-9"
|
|
114
114
|
:aria-label="toolTipText"
|
|
115
|
+
size="1rem"
|
|
115
116
|
>
|
|
116
117
|
<UTooltip
|
|
117
|
-
:description="toolTipText"
|
|
118
118
|
anchor="top middle"
|
|
119
|
-
|
|
119
|
+
:description="toolTipText"
|
|
120
120
|
:offset="[0, 0]"
|
|
121
|
+
self="bottom middle"
|
|
121
122
|
/>
|
|
122
123
|
</q-icon>
|
|
123
124
|
</label>
|
|
124
125
|
<q-input
|
|
125
|
-
|
|
126
|
-
class="u-input"
|
|
127
|
-
:class="`field-${size} ${leftBorderRadius}`"
|
|
126
|
+
v-bind="$attrs"
|
|
128
127
|
v-model="modelValue"
|
|
128
|
+
:class="`field-${size} ${leftBorderRadius}`"
|
|
129
|
+
class="u-input"
|
|
130
|
+
:borderless="borderless"
|
|
131
|
+
:bottom-slots="!!hintText"
|
|
132
|
+
:disable="disable"
|
|
133
|
+
:error="error"
|
|
134
|
+
hide-bottom-space
|
|
135
|
+
id="input"
|
|
129
136
|
name="input"
|
|
130
137
|
:outlined="outlined"
|
|
131
138
|
:placeholder="placeholder"
|
|
139
|
+
:readonly="readonly"
|
|
132
140
|
:rules="validationRules"
|
|
133
141
|
:standout="!outlined"
|
|
134
142
|
type="text"
|
|
135
|
-
:bottom-slots="!!hintText"
|
|
136
|
-
hide-bottom-space
|
|
137
|
-
:readonly="readonly"
|
|
138
|
-
:disable="disable"
|
|
139
|
-
:borderless="borderless"
|
|
140
|
-
:error="error"
|
|
141
|
-
v-bind="$attrs"
|
|
142
143
|
>
|
|
143
|
-
|
|
144
|
+
<!--Added below line to resolve "Missing form label" accessibility issue -->
|
|
145
|
+
<template class="hidden">{{ label }}</template>
|
|
146
|
+
<template v-if="leftIcon" #prepend>
|
|
144
147
|
<slot name="prepend"></slot>
|
|
145
148
|
<q-icon
|
|
146
149
|
v-if="!$slots.prepend"
|
|
147
150
|
:class="`slot-icon-size-${size} ${leftIcon}`"
|
|
148
151
|
/>
|
|
149
152
|
</template>
|
|
150
|
-
<template
|
|
153
|
+
<template v-if="hintText" #hint>
|
|
151
154
|
<div class="row items-center text-neutral-9 no-wrap">
|
|
152
155
|
<q-icon
|
|
153
|
-
:class="hintIcon"
|
|
154
156
|
v-if="hintIcon"
|
|
155
|
-
|
|
157
|
+
:class="hintIcon"
|
|
156
158
|
:aria-label="hintText"
|
|
159
|
+
size="1rem"
|
|
157
160
|
/>
|
|
158
161
|
<div class="q-ml-xxs text-body-xs">{{ hintText }}</div>
|
|
159
162
|
</div>
|
|
@@ -163,23 +166,23 @@ const handleRightIconClick = () => {
|
|
|
163
166
|
<q-spinner v-if="loading" size="1rem"/>
|
|
164
167
|
<q-icon
|
|
165
168
|
v-if="rightIcon"
|
|
166
|
-
@click="handleRightIconClick"
|
|
167
169
|
:class="`slot-icon-size-${size} ${rightIcon}`"
|
|
168
|
-
:tabindex="0"
|
|
169
170
|
:aria-label="
|
|
170
171
|
rightIcon && rightIconAriaLabel
|
|
171
172
|
? rightIconAriaLabel
|
|
172
173
|
: 'right input icon '
|
|
173
174
|
"
|
|
175
|
+
:tabindex="0"
|
|
176
|
+
@click="handleRightIconClick"
|
|
174
177
|
/>
|
|
175
178
|
</slot>
|
|
176
179
|
</template>
|
|
177
180
|
<template v-slot:error>
|
|
178
|
-
<div class="row items-center no-wrap"
|
|
181
|
+
<div v-if="errorMessage" class="row items-center no-wrap">
|
|
179
182
|
<q-icon
|
|
180
183
|
class="fa-kit-duotone fa-warning-octagon"
|
|
181
|
-
size="1rem"
|
|
182
184
|
:aria-label="errorMessage"
|
|
185
|
+
size="1rem"
|
|
183
186
|
/>
|
|
184
187
|
<div class="q-ml-xxs text-body-xs" role="validation error">
|
|
185
188
|
{{ errorMessage }}
|
|
@@ -189,7 +192,6 @@ const handleRightIconClick = () => {
|
|
|
189
192
|
</q-input>
|
|
190
193
|
</div>
|
|
191
194
|
</template>
|
|
192
|
-
|
|
193
195
|
<style lang="sass">
|
|
194
196
|
.u-input
|
|
195
197
|
.q-field--with-bottom
|