@saasmakers/ui 1.4.45 → 1.4.46
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.
|
@@ -174,45 +174,66 @@ defineExpose({ focus })
|
|
|
174
174
|
>
|
|
175
175
|
<slot name="inputLeft" />
|
|
176
176
|
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
177
|
+
<div class="relative h-full min-w-0 flex-1">
|
|
178
|
+
<input
|
|
179
|
+
:id="id"
|
|
180
|
+
ref="input"
|
|
181
|
+
:autocomplete="autocomplete ? 'on' : 'off'"
|
|
182
|
+
class="h-full w-full appearance-none items-center rounded-lg outline-none placeholder-gray-600 dark:placeholder-gray-400"
|
|
183
|
+
:class="{
|
|
184
|
+
'field-disabled': disabled,
|
|
185
|
+
'focus:placeholder-gray-900 hover:placeholder-gray-900 dark:focus:placeholder-gray-100 dark:hover:placeholder-gray-100': !disabled,
|
|
186
|
+
'text-gray-900 dark:text-gray-100': !lineThrough,
|
|
187
|
+
'text-gray-500 dark:text-gray-500 line-through': lineThrough,
|
|
188
|
+
'font-medium tracking-tight uppercase': uppercase,
|
|
189
|
+
'font-normal': !uppercase,
|
|
190
|
+
'text-center': alignment === 'center',
|
|
191
|
+
'text-left': alignment === 'left',
|
|
192
|
+
'text-right': alignment === 'right',
|
|
193
|
+
'bg-gray-100 dark:bg-gray-900': background === 'gray',
|
|
194
|
+
'bg-white dark:bg-gray-900': background === 'white',
|
|
195
|
+
'border shadow-sm border-gray-200 dark:border-gray-800': border === 'full',
|
|
196
|
+
'pl-3 pr-10': border === 'full' && type === 'password',
|
|
197
|
+
'px-3': border === 'full' && type !== 'password',
|
|
198
|
+
'hover:border-gray-300 focus:border-gray-400 dark:hover:border-gray-700 dark:focus:border-gray-600': border === 'full' && !disabled,
|
|
199
|
+
'border-b border-gray-200 dark:border-gray-800': border === 'bottom',
|
|
200
|
+
'pl-10 pr-16': border === 'bottom' && type === 'password',
|
|
201
|
+
'px-10': border === 'bottom' && type !== 'password',
|
|
202
|
+
'border-0 p-0': border === 'none' && type !== 'password',
|
|
203
|
+
'border-0 pr-9': border === 'none' && type === 'password',
|
|
204
|
+
'text-xs': size === 'xs',
|
|
205
|
+
'text-sm': size === 'sm',
|
|
206
|
+
'text-base': size === 'base',
|
|
207
|
+
'text-lg': size === 'lg',
|
|
208
|
+
}"
|
|
209
|
+
:disabled="disabled"
|
|
210
|
+
:max="max"
|
|
211
|
+
:min="min"
|
|
212
|
+
:placeholder="placeholder"
|
|
213
|
+
spellcheck="false"
|
|
214
|
+
:type="type === 'password' && showPassword ? 'text' : type"
|
|
215
|
+
:value="modelValue"
|
|
216
|
+
@blur="onFieldBlur"
|
|
217
|
+
@focus="onFieldFocus"
|
|
218
|
+
@input="onFieldInput"
|
|
219
|
+
@keydown="onFieldKeyDown"
|
|
220
|
+
@keyup="onFieldKeyUp"
|
|
221
|
+
>
|
|
222
|
+
|
|
223
|
+
<button
|
|
224
|
+
v-if="type === 'password'"
|
|
225
|
+
class="absolute inset-y-0 right-0 flex items-center pr-3 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200"
|
|
226
|
+
:disabled="disabled"
|
|
227
|
+
tabindex="-1"
|
|
228
|
+
type="button"
|
|
229
|
+
@click="onTogglePasswordVisibility"
|
|
230
|
+
>
|
|
231
|
+
<BaseIcon
|
|
232
|
+
:icon="showPassword ? 'solar:eye-closed-linear' : 'solar:eye-linear'"
|
|
233
|
+
size="sm"
|
|
234
|
+
/>
|
|
235
|
+
</button>
|
|
236
|
+
</div>
|
|
216
237
|
|
|
217
238
|
<BaseSpinner
|
|
218
239
|
v-if="loading"
|
|
@@ -221,20 +242,6 @@ defineExpose({ focus })
|
|
|
221
242
|
/>
|
|
222
243
|
|
|
223
244
|
<slot name="inputRight" />
|
|
224
|
-
|
|
225
|
-
<button
|
|
226
|
-
v-if="type === 'password'"
|
|
227
|
-
class="ml-2 text-gray-500 flex-initial dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200"
|
|
228
|
-
:disabled="disabled"
|
|
229
|
-
tabindex="-1"
|
|
230
|
-
type="button"
|
|
231
|
-
@click="onTogglePasswordVisibility"
|
|
232
|
-
>
|
|
233
|
-
<BaseIcon
|
|
234
|
-
:icon="showPassword ? 'solar:eye-closed-linear' : 'solar:eye-linear'"
|
|
235
|
-
size="sm"
|
|
236
|
-
/>
|
|
237
|
-
</button>
|
|
238
245
|
</div>
|
|
239
246
|
|
|
240
247
|
<FieldMessage
|