@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
- <input
178
- :id="id"
179
- ref="input"
180
- :autocomplete="autocomplete ? 'on' : 'off'"
181
- class="h-full w-full flex-1 appearance-none items-center rounded-lg outline-none placeholder-gray-600 dark:placeholder-gray-400"
182
- :class="{
183
- 'field-disabled': disabled,
184
- 'focus:placeholder-gray-900 hover:placeholder-gray-900 dark:focus:placeholder-gray-100 dark:hover:placeholder-gray-100': !disabled,
185
- 'text-gray-900 dark:text-gray-100': !lineThrough,
186
- 'text-gray-500 dark:text-gray-500 line-through': lineThrough,
187
- 'font-medium tracking-tight uppercase': uppercase,
188
- 'font-normal': !uppercase,
189
- 'text-center': alignment === 'center',
190
- 'text-left': alignment === 'left',
191
- 'text-right': alignment === 'right',
192
- 'bg-gray-100 dark:bg-gray-900': background === 'gray',
193
- 'bg-white dark:bg-gray-900': background === 'white',
194
- 'border shadow-sm border-gray-200 dark:border-gray-800 px-3': border === 'full',
195
- 'hover:border-gray-300 focus:border-gray-400 dark:hover:border-gray-700 dark:focus:border-gray-600': border === 'full' && !disabled,
196
- 'border-b border-gray-200 dark:border-gray-800 px-10': border === 'bottom',
197
- 'border-0 p-0': border === 'none',
198
- 'text-xs': size === 'xs',
199
- 'text-sm': size === 'sm',
200
- 'text-base': size === 'base',
201
- 'text-lg': size === 'lg',
202
- }"
203
- :disabled="disabled"
204
- :max="max"
205
- :min="min"
206
- :placeholder="placeholder"
207
- spellcheck="false"
208
- :type="type === 'password' && showPassword ? 'text' : type"
209
- :value="modelValue"
210
- @blur="onFieldBlur"
211
- @focus="onFieldFocus"
212
- @input="onFieldInput"
213
- @keydown="onFieldKeyDown"
214
- @keyup="onFieldKeyUp"
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "1.4.45",
3
+ "version": "1.4.46",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",