energy-components 2.1.0 → 2.3.0
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/dist/components/datepicker.es.js +322 -308
- package/dist/components/dropdown.es.js +173 -159
- package/dist/components/index.es.js +127 -121
- package/dist/components/indicatorDots.es.js +215 -0
- package/dist/components/loader.es.js +9 -9
- package/dist/components/searchField.es.js +188 -0
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/indicatorDots.css +1 -0
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/searchField.css +1 -0
- package/dist/components/style/table.css +1 -1
- package/dist/components/style/tableRenderer.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/table.es.js +76 -71
- package/dist/components/tableRenderer.es.js +244 -141
- package/dist/components/textField.es.js +204 -145
- package/dist/components/tooltip.es.js +129 -113
- package/dist/energy-components.css +1 -1
- package/dist/energy-components.es.js +6381 -5779
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/table/table-renderer.vue.d.ts +10 -1
- package/dist/types/src/components/content/table/table.vue.d.ts +13 -1
- package/dist/types/src/components/content/table/use-column-resize.d.ts +9 -0
- package/dist/types/src/components/feedback/indicator-dots/indicator-dots.vue.d.ts +181 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +25 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +25 -0
- package/dist/types/src/components/input/search-field/search-field.vue.d.ts +137 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +64 -3
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/llms/index.md +2 -0
- package/llms/rdsdate-picker.md +1 -0
- package/llms/rdsdropdown.md +1 -0
- package/llms/rdsindicator-dots.md +23 -0
- package/llms/rdssearch-field.md +22 -0
- package/llms/rdstable.md +2 -0
- package/llms/rdstext-field.md +5 -0
- package/llms/rdstooltip.md +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { R as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import './style/textField.css';const
|
|
1
|
+
import { defineComponent as de, ref as y, useSlots as ce, computed as o, watch as L, onMounted as fe, onBeforeUnmount as pe, openBlock as r, createElementBlock as h, normalizeClass as x, createElementVNode as g, renderSlot as b, createBlock as E, createCommentVNode as d, mergeProps as O, toHandlers as U, createTextVNode as W, toDisplayString as N, withModifiers as q, createVNode as H } from "vue";
|
|
2
|
+
import { g as me } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { R as G, s as ve } from "./icon-svg-CW3eQRcp.js";
|
|
4
|
+
import F from "./actionButton.es.js";
|
|
5
|
+
import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import './style/textField.css';const he = { class: "rds-e-textfield__input-container" }, ge = {
|
|
7
7
|
key: 0,
|
|
8
|
+
class: "rds-e-textfield__prefix"
|
|
9
|
+
}, _e = ["data-value"], xe = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly", "name", "required", "inputmode", "pattern", "min", "max", "step", "enterkeyhint", "spellcheck", "autocapitalize", "aria-invalid", "aria-describedby"], be = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "rds-e-textfield__suffix"
|
|
12
|
+
}, we = ["for"], Se = {
|
|
13
|
+
key: 1,
|
|
8
14
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
9
|
-
},
|
|
15
|
+
}, ke = ["aria-label"], Ve = {
|
|
10
16
|
key: 0,
|
|
11
17
|
class: "rds-e-textfield__helper"
|
|
12
|
-
},
|
|
18
|
+
}, Ne = ["id"], qe = /* @__PURE__ */ de({
|
|
13
19
|
__name: "text-field",
|
|
14
20
|
props: {
|
|
15
21
|
/**
|
|
@@ -20,6 +26,19 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
20
26
|
type: Boolean,
|
|
21
27
|
default: !1
|
|
22
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* Versión compacta del campo de texto con altura reducida (42px en lugar de 52px).
|
|
31
|
+
* En este modo se ocultan visualmente el label y el helper text para ahorrar espacio.
|
|
32
|
+
* Los eventos y cambios de estado visual se mantienen.
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ **Uso recomendado**: Solo para celdas de tablas editables.
|
|
35
|
+
* No se recomienda fuera de este contexto por cuestiones de accesibilidad,
|
|
36
|
+
* ya que la ausencia del label visible puede dificultar la comprensión del campo.
|
|
37
|
+
*/
|
|
38
|
+
compact: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
23
42
|
/**
|
|
24
43
|
* Etiqueta que se muestra sobre el campo de entrada. y Placeholder
|
|
25
44
|
*/
|
|
@@ -41,6 +60,20 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
41
60
|
type: [String, Number, null],
|
|
42
61
|
required: !0
|
|
43
62
|
},
|
|
63
|
+
/**
|
|
64
|
+
* Texto a mostrar antes del valor del input. (Reemplaza al icono izquierdo si existe)
|
|
65
|
+
*/
|
|
66
|
+
prefix: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ""
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Texto a mostrar después del valor del input, siguiendo dinámicamente al texto.
|
|
72
|
+
*/
|
|
73
|
+
suffix: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: ""
|
|
76
|
+
},
|
|
44
77
|
/**
|
|
45
78
|
* Indica si el campo de entrada está deshabilitado o no.
|
|
46
79
|
*/
|
|
@@ -63,7 +96,7 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
63
96
|
maxLength: {
|
|
64
97
|
type: Number,
|
|
65
98
|
required: !1,
|
|
66
|
-
validator: (
|
|
99
|
+
validator: (i) => i == null ? !0 : typeof i != "number" || Number.isNaN(i) ? (console.info("El valor de maxLength debe ser un número"), !1) : i < 0 ? (console.info("El valor de maxLength no puede ser menor a 0"), !1) : !0
|
|
67
100
|
},
|
|
68
101
|
/**
|
|
69
102
|
* Número mínimo de caracteres permitidos en el campo de entrada.
|
|
@@ -72,7 +105,7 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
72
105
|
minLength: {
|
|
73
106
|
type: Number,
|
|
74
107
|
required: !1,
|
|
75
|
-
validator: (
|
|
108
|
+
validator: (i) => i == null ? !0 : typeof i != "number" || Number.isNaN(i) ? (console.info("El valor de minLength debe ser un número"), !1) : i < 0 ? (console.info("El valor de minLength no puede ser menor a 0"), !1) : !0
|
|
76
109
|
},
|
|
77
110
|
/**
|
|
78
111
|
* Tipo del input HTML. Por defecto 'text'.
|
|
@@ -81,9 +114,9 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
81
114
|
type: {
|
|
82
115
|
type: String,
|
|
83
116
|
default: "text",
|
|
84
|
-
validator: (
|
|
85
|
-
const
|
|
86
|
-
return
|
|
117
|
+
validator: (i) => {
|
|
118
|
+
const c = ["text", "number", "password", "email", "tel", "url"], f = c.includes(i);
|
|
119
|
+
return f || console.warn(`[RDSTextfield]: El valor de la prop 'type' debe ser uno de: ${c.join(", ")}. Valor recibido: ${i}`), f;
|
|
87
120
|
}
|
|
88
121
|
},
|
|
89
122
|
/**
|
|
@@ -159,9 +192,9 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
159
192
|
autocomplete: {
|
|
160
193
|
type: String,
|
|
161
194
|
default: "off",
|
|
162
|
-
validator: (
|
|
163
|
-
const
|
|
164
|
-
return (
|
|
195
|
+
validator: (i, c) => {
|
|
196
|
+
const f = ["new-password", "current-password", "off"];
|
|
197
|
+
return (c.password || c.type === "password") && !f.includes(i) ? (console.info(`[RDSTextfield]: El valor de autocomplete para un campo de contraseña debe ser uno de los siguientes: ${f.join(", ")}`), !1) : !0;
|
|
165
198
|
}
|
|
166
199
|
},
|
|
167
200
|
/** Atributos adicionales del input */
|
|
@@ -217,58 +250,65 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
217
250
|
}
|
|
218
251
|
},
|
|
219
252
|
emits: ["update:modelValue", "clear", "keydown", "keyup", "keypress", "change"],
|
|
220
|
-
setup(
|
|
221
|
-
const e =
|
|
222
|
-
if (
|
|
253
|
+
setup(i, { expose: c, emit: f }) {
|
|
254
|
+
const e = i, p = f, a = y(null), m = y(!1), u = y(!1), w = y(!1), S = y(!1), J = me(), _ = y(""), n = y(!1), $ = ce(), B = o(() => !!e.prefix || !!$.prefix), T = o(() => !!e.suffix || !!$.suffix), C = () => {
|
|
255
|
+
if (a.value)
|
|
223
256
|
if (e.type === "number") {
|
|
224
|
-
const t =
|
|
225
|
-
|
|
257
|
+
const t = a.value, l = t.value !== "" || t.selectionStart !== null && t.selectionStart > 0 || t.validity.badInput;
|
|
258
|
+
n.value = l;
|
|
226
259
|
} else
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
|
|
230
|
-
|
|
260
|
+
n.value = a.value.value !== "";
|
|
261
|
+
}, Q = () => {
|
|
262
|
+
!e.disabled && !e.readonly && a.value && a.value.focus();
|
|
263
|
+
}, I = o(() => e.id !== void 0 && e.id !== null ? String(e.id) : `text-field-${J}`), D = o(() => e.helper || e.error ? `${I.value}-helper` : void 0), v = o(() => e.password || e.type === "password"), X = o(() => v.value ? m.value ? "text" : "password" : ["text", "number", "password", "email", "tel", "url"].includes(e.type) ? e.type : "text"), Y = o(() => e.autocomplete), Z = o(() => {
|
|
264
|
+
const t = e.modelValue === null || e.modelValue === void 0 ? "" : String(e.modelValue);
|
|
265
|
+
return v.value && !m.value ? "•".repeat(t.length) : t;
|
|
266
|
+
}), ee = (t) => {
|
|
267
|
+
const l = t.target, j = l.value.trim();
|
|
268
|
+
let k = l.value;
|
|
231
269
|
if (e.type === "number") {
|
|
232
|
-
const
|
|
233
|
-
|
|
270
|
+
const V = l.value !== "" || l.selectionStart !== null && l.selectionStart > 0 || l.validity.badInput;
|
|
271
|
+
n.value = V;
|
|
234
272
|
} else
|
|
235
|
-
|
|
273
|
+
n.value = l.value !== "";
|
|
236
274
|
if (e.type === "number") {
|
|
237
275
|
if (l.value.trim() === "")
|
|
238
|
-
|
|
276
|
+
k = null;
|
|
239
277
|
else {
|
|
240
|
-
const
|
|
241
|
-
|
|
278
|
+
const V = Number.parseFloat(l.value);
|
|
279
|
+
k = Number.isNaN(V) ? l.value : V;
|
|
242
280
|
}
|
|
243
|
-
|
|
244
|
-
} else l.value === "" && e.modelValue === null && (
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
},
|
|
249
|
-
const t =
|
|
250
|
-
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
},
|
|
281
|
+
j === "" && !l.validity.badInput && (n.value = !1);
|
|
282
|
+
} else l.value === "" && e.modelValue === null && (k = null);
|
|
283
|
+
p("update:modelValue", k), C();
|
|
284
|
+
}, te = () => {
|
|
285
|
+
S.value = !0;
|
|
286
|
+
}, R = () => {
|
|
287
|
+
const t = a.value?.value.trim() || "";
|
|
288
|
+
n.value = t !== "", u.value = !1, w.value = !1, S.value = !1, t === "" && (_.value = ""), C();
|
|
289
|
+
}, z = () => {
|
|
290
|
+
u.value = !0, w.value = !S.value, S.value = !1;
|
|
291
|
+
}, le = (t) => {
|
|
292
|
+
p("keydown", t);
|
|
293
|
+
}, ae = (t) => {
|
|
294
|
+
p("keyup", t);
|
|
295
|
+
}, ie = (t) => {
|
|
296
|
+
p("keypress", t);
|
|
297
|
+
}, oe = (t) => {
|
|
298
|
+
p("change", t);
|
|
299
|
+
}, ne = o(() => {
|
|
262
300
|
const t = [];
|
|
263
|
-
|
|
301
|
+
_.value && t.push(_.value);
|
|
302
|
+
const l = e.modelValue !== null && String(e.modelValue).trim().length > 0;
|
|
303
|
+
return (B.value || T.value || l || n.value || u.value) && t.push("rds-e-textfield--filled"), e.error && t.push("rds-e-textfield--error"), e.disabled && t.push("rds-e-textfield--disabled"), e.fullWidth && t.push("rds-e-textfield--full-width"), e.compact && t.push("rds-e-textfield--compact"), u.value && t.push("rds-e-textfield--focused"), e.readonly && t.push("rds-e-textfield--readonly"), t.join(" ");
|
|
264
304
|
});
|
|
265
|
-
|
|
305
|
+
L(
|
|
266
306
|
() => e.modelValue,
|
|
267
307
|
(t) => {
|
|
268
|
-
t !== null && String(t).length > 0 && (
|
|
308
|
+
t !== null && String(t).length > 0 && (_.value = ""), (t === "" || t === null) && !u.value && (n.value = !1);
|
|
269
309
|
}
|
|
270
310
|
);
|
|
271
|
-
const
|
|
311
|
+
const s = o(() => {
|
|
272
312
|
const t = {
|
|
273
313
|
name: e.icon,
|
|
274
314
|
class: "",
|
|
@@ -288,7 +328,6 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
288
328
|
return v.value || e.clearable ? {
|
|
289
329
|
left: {
|
|
290
330
|
...t,
|
|
291
|
-
// ocultar icono izquierdo en modo password para evitar ambigüedad
|
|
292
331
|
name: v.value ? "" : t.name
|
|
293
332
|
},
|
|
294
333
|
right: {
|
|
@@ -297,155 +336,175 @@ import './style/textField.css';const de = { class: "rds-e-textfield__input-conta
|
|
|
297
336
|
}
|
|
298
337
|
} : l;
|
|
299
338
|
});
|
|
300
|
-
|
|
339
|
+
L(
|
|
301
340
|
v,
|
|
302
341
|
(t) => {
|
|
303
342
|
m.value = !1;
|
|
304
343
|
},
|
|
305
344
|
{ immediate: !0 }
|
|
306
345
|
);
|
|
307
|
-
const
|
|
308
|
-
const l =
|
|
346
|
+
const A = (t) => {
|
|
347
|
+
const l = ve.includes(t);
|
|
309
348
|
return l || console.warn(`[RDSTextfield]: El icono "${t}" no es un icono válido.`), l;
|
|
310
|
-
},
|
|
311
|
-
const l =
|
|
349
|
+
}, K = (t) => {
|
|
350
|
+
const l = a.value;
|
|
312
351
|
if (!l) return;
|
|
313
|
-
l.matches(":-webkit-autofill") && t.animationName.startsWith("onAutoFillStart") && l.value.trim().length > 0 && (
|
|
352
|
+
l.matches(":-webkit-autofill") && t.animationName.startsWith("onAutoFillStart") && l.value.trim().length > 0 && (_.value = "rds-e-textfield--filled", n.value = !0);
|
|
314
353
|
};
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}),
|
|
318
|
-
|
|
319
|
-
}),
|
|
354
|
+
fe(() => {
|
|
355
|
+
a.value && (a.value.addEventListener("animationstart", K), C());
|
|
356
|
+
}), pe(() => {
|
|
357
|
+
a.value && a.value.removeEventListener("animationstart", K);
|
|
358
|
+
}), c({
|
|
320
359
|
focus: () => {
|
|
321
|
-
|
|
360
|
+
a.value && (a.value.focus(), z());
|
|
322
361
|
},
|
|
323
362
|
blur: () => {
|
|
324
|
-
|
|
363
|
+
a.value && (a.value.blur(), R());
|
|
325
364
|
}
|
|
326
365
|
});
|
|
327
|
-
const
|
|
366
|
+
const re = () => {
|
|
328
367
|
m.value = !m.value;
|
|
329
|
-
},
|
|
368
|
+
}, se = () => {
|
|
330
369
|
const t = e.type === "number";
|
|
331
|
-
|
|
332
|
-
},
|
|
370
|
+
p("update:modelValue", t ? null : ""), a.value && (a.value.value = ""), u.value = !1, n.value = !1, a.value && a.value.blur(), p("clear");
|
|
371
|
+
}, M = (t) => {
|
|
333
372
|
(t.key === "Enter" || t.key === " ") && t.currentTarget?.click();
|
|
334
|
-
},
|
|
335
|
-
return
|
|
373
|
+
}, ue = o(() => m.value ? "Ocultar contraseña" : "Mostrar contraseña");
|
|
374
|
+
return L(
|
|
336
375
|
() => e.password,
|
|
337
376
|
(t) => {
|
|
338
377
|
t && console.warn('[RDSTextfield]: Deprecado `password`. Usa type="password" + toggleVisibility. Esta prop será eliminada en próximas versiones.');
|
|
339
378
|
},
|
|
340
379
|
{ immediate: !0 }
|
|
341
|
-
), (t, l) => (
|
|
342
|
-
class:
|
|
380
|
+
), (t, l) => (r(), h("div", {
|
|
381
|
+
class: x(["rds-e-textfield", ne.value])
|
|
343
382
|
}, [
|
|
344
383
|
g("div", {
|
|
345
|
-
class:
|
|
346
|
-
"rds-e-textfield__container--keyboard-focus":
|
|
347
|
-
"rds-e-textfield__container--active":
|
|
384
|
+
class: x(["rds-e-textfield__container", {
|
|
385
|
+
"rds-e-textfield__container--keyboard-focus": w.value,
|
|
386
|
+
"rds-e-textfield__container--active": u.value && !w.value
|
|
348
387
|
}]),
|
|
349
|
-
onMousedown:
|
|
388
|
+
onMousedown: te
|
|
350
389
|
}, [
|
|
351
|
-
|
|
352
|
-
e.loading ? (
|
|
390
|
+
B.value ? d("", !0) : b(t.$slots, "left-icon", { key: 0 }, () => [
|
|
391
|
+
e.loading ? (r(), E(G, {
|
|
353
392
|
key: 0,
|
|
354
393
|
name: "loading",
|
|
355
394
|
class: "rds-e-textfield__icon--loading"
|
|
356
|
-
})) :
|
|
357
|
-
|
|
395
|
+
})) : d("", !0),
|
|
396
|
+
s.value.left.name && A(s.value.left.name) && !i.loading ? (r(), E(G, O({
|
|
358
397
|
key: 1,
|
|
359
|
-
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden":
|
|
398
|
+
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": u.value }],
|
|
360
399
|
"aria-hidden": "true"
|
|
361
|
-
},
|
|
400
|
+
}, s.value.left, U(s.value.left.events)), null, 16, ["class"])) : d("", !0)
|
|
362
401
|
], !0),
|
|
363
|
-
g("div",
|
|
364
|
-
g("
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
402
|
+
g("div", he, [
|
|
403
|
+
g("div", {
|
|
404
|
+
class: "rds-e-textfield__input-wrapper",
|
|
405
|
+
onClick: Q
|
|
406
|
+
}, [
|
|
407
|
+
B.value ? (r(), h("span", ge, [
|
|
408
|
+
b(t.$slots, "prefix", {}, () => [
|
|
409
|
+
W(N(e.prefix), 1)
|
|
410
|
+
], !0)
|
|
411
|
+
])) : d("", !0),
|
|
412
|
+
g("div", {
|
|
413
|
+
class: x(["rds-e-textfield__input-sizer", { "rds-e-textfield__input-sizer--grow": !T.value }]),
|
|
414
|
+
"data-value": Z.value
|
|
415
|
+
}, [
|
|
416
|
+
g("input", {
|
|
417
|
+
id: I.value,
|
|
418
|
+
ref_key: "input",
|
|
419
|
+
ref: a,
|
|
420
|
+
type: X.value,
|
|
421
|
+
class: "rds-e-textfield__input",
|
|
422
|
+
maxlength: e.type === "number" ? void 0 : e.maxLength,
|
|
423
|
+
minlength: e.type === "number" ? void 0 : e.minLength,
|
|
424
|
+
disabled: e.disabled,
|
|
425
|
+
value: e.modelValue === null ? "" : e.modelValue,
|
|
426
|
+
autocomplete: Y.value,
|
|
427
|
+
readonly: e.readonly,
|
|
428
|
+
name: e.name,
|
|
429
|
+
required: e.required,
|
|
430
|
+
inputmode: e.inputmode,
|
|
431
|
+
pattern: e.pattern,
|
|
432
|
+
min: e.min,
|
|
433
|
+
max: e.max,
|
|
434
|
+
step: e.step,
|
|
435
|
+
enterkeyhint: e.enterkeyhint,
|
|
436
|
+
spellcheck: e.spellcheck,
|
|
437
|
+
autocapitalize: e.autocapitalize,
|
|
438
|
+
"aria-invalid": e.error,
|
|
439
|
+
"aria-describedby": D.value,
|
|
440
|
+
onInput: ee,
|
|
441
|
+
onBlur: R,
|
|
442
|
+
onFocus: z,
|
|
443
|
+
onKeydown: le,
|
|
444
|
+
onKeyup: ae,
|
|
445
|
+
onKeypress: ie,
|
|
446
|
+
onChange: oe
|
|
447
|
+
}, null, 40, xe)
|
|
448
|
+
], 10, _e),
|
|
449
|
+
T.value ? (r(), h("span", be, [
|
|
450
|
+
b(t.$slots, "suffix", {}, () => [
|
|
451
|
+
W(N(e.suffix), 1)
|
|
452
|
+
], !0)
|
|
453
|
+
])) : d("", !0)
|
|
454
|
+
]),
|
|
396
455
|
g("label", {
|
|
397
|
-
for:
|
|
398
|
-
class:
|
|
399
|
-
},
|
|
456
|
+
for: I.value,
|
|
457
|
+
class: x(["rds-e-textfield__label", e.disabled ? "rds-e-textfield__label--disabled" : ""])
|
|
458
|
+
}, N(e.label), 11, we)
|
|
400
459
|
]),
|
|
401
|
-
v.value && e.toggleVisibility || e.clearable ||
|
|
402
|
-
|
|
403
|
-
v.value && e.toggleVisibility ? (
|
|
460
|
+
v.value && e.toggleVisibility || e.clearable || s.value.right.name || t.$slots["right-icon"] ? (r(), h("span", Se, [
|
|
461
|
+
b(t.$slots, "right-icon", {}, () => [
|
|
462
|
+
v.value && e.toggleVisibility ? (r(), h("button", {
|
|
404
463
|
key: 0,
|
|
405
464
|
type: "button",
|
|
406
465
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right rds-e-textfield__icon--password",
|
|
407
|
-
"aria-label":
|
|
408
|
-
onClick:
|
|
409
|
-
onKeydown:
|
|
466
|
+
"aria-label": ue.value,
|
|
467
|
+
onClick: q(re, ["stop"]),
|
|
468
|
+
onKeydown: q(M, ["stop", "prevent"])
|
|
410
469
|
}, [
|
|
411
|
-
|
|
470
|
+
H(F, {
|
|
412
471
|
icon: m.value ? "eye_open" : "eye_close",
|
|
413
472
|
variant: "ghost",
|
|
414
473
|
small: ""
|
|
415
474
|
}, null, 8, ["icon"])
|
|
416
|
-
], 40,
|
|
475
|
+
], 40, ke)) : e.clearable ? (r(), h("button", {
|
|
417
476
|
key: 1,
|
|
418
477
|
type: "button",
|
|
419
478
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right rds-e-textfield__icon--clear",
|
|
420
479
|
"aria-label": "Limpiar campo",
|
|
421
|
-
onClick:
|
|
422
|
-
onKeydown:
|
|
480
|
+
onClick: q(se, ["stop"]),
|
|
481
|
+
onKeydown: q(M, ["stop", "prevent"])
|
|
423
482
|
}, [
|
|
424
|
-
|
|
483
|
+
H(F, {
|
|
425
484
|
icon: "close",
|
|
426
485
|
variant: "ghost",
|
|
427
486
|
small: ""
|
|
428
487
|
})
|
|
429
|
-
], 32)) :
|
|
488
|
+
], 32)) : s.value.right.name && A(s.value.right.name) ? (r(), E(F, O({
|
|
430
489
|
key: 2,
|
|
431
|
-
icon:
|
|
490
|
+
icon: s.value.right.name,
|
|
432
491
|
variant: "ghost",
|
|
433
492
|
small: ""
|
|
434
|
-
},
|
|
493
|
+
}, U(s.value.right.events)), null, 16, ["icon"])) : d("", !0)
|
|
435
494
|
], !0)
|
|
436
|
-
])) :
|
|
495
|
+
])) : d("", !0)
|
|
437
496
|
], 34),
|
|
438
|
-
e.helper || e.error ? (
|
|
439
|
-
|
|
497
|
+
e.helper || e.error ? (r(), h("div", Ve, [
|
|
498
|
+
b(t.$slots, "helper-text", {}, () => [
|
|
440
499
|
g("span", {
|
|
441
|
-
id:
|
|
442
|
-
class:
|
|
443
|
-
},
|
|
500
|
+
id: D.value,
|
|
501
|
+
class: x(e.error ? "rds-e-textfield__helper--error" : "")
|
|
502
|
+
}, N(e.helperText), 11, Ne)
|
|
444
503
|
], !0)
|
|
445
|
-
])) :
|
|
504
|
+
])) : d("", !0)
|
|
446
505
|
], 2));
|
|
447
506
|
}
|
|
448
|
-
}),
|
|
507
|
+
}), Ee = /* @__PURE__ */ ye(qe, [["__scopeId", "data-v-5c6648f7"]]);
|
|
449
508
|
export {
|
|
450
|
-
|
|
509
|
+
Ee as default
|
|
451
510
|
};
|