energy-components 1.21.0 → 1.23.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/accordion.es.js +71 -53
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-f-OHx-l3.js +86 -0
- package/dist/components/datepicker.es.js +1 -1
- package/dist/components/directAccess.es.js +1 -1
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +1 -1
- package/dist/components/fileUploadItem.es.js +1 -1
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/filterTag.es.js +1 -1
- package/dist/components/{floating-ui.vue-oA1DfKeS.js → floating-ui.vue-DHEoOe5S.js} +305 -303
- package/dist/components/{icon-svg-C8XeOnqu.js → icon-svg-K8-vLJgV.js} +1257 -792
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +84 -85
- package/dist/components/modal.es.js +41 -39
- package/dist/components/multiselect.es.js +52 -52
- package/dist/components/multiselectcontentwrapper.es.js +2 -2
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/popover.es.js +2 -2
- package/dist/components/popoverMenu.es.js +51 -51
- package/dist/components/progressBar.es.js +2 -2
- package/dist/components/quantitySelector.es.js +1 -1
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/accordionGroup.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/avatar.css +1 -1
- package/dist/components/style/badge.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/card.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/collapsable.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/divider.css +1 -1
- package/dist/components/style/dragAndDrop.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/iconList.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/infoBox.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/loader.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/popoverMenu.css +1 -1
- package/dist/components/style/progressBar.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/radioButton.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/sidebar.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/snackBar.css +1 -1
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/toggle.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +1 -1
- package/dist/components/tablepaginatedcomponent.es.js +46 -46
- package/dist/components/tableslotedcomponent.es.js +119 -119
- package/dist/components/tag.es.js +1 -1
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +136 -131
- package/dist/components/toggle.es.js +24 -24
- package/dist/components/tooltip.es.js +2 -2
- package/dist/energy-components.es.js +6329 -5838
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/accordion/accordion.vue.d.ts +19 -0
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +1 -1
- package/dist/types/src/components/navigation/link/link.vue.d.ts +8 -5
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-6HkNT8L9.js +0 -86
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/textField.css';const
|
|
1
|
+
import { defineComponent as ie, toRefs as ue, ref as c, computed as y, watch as P, onMounted as de, onBeforeUnmount as ce, createElementBlock as L, openBlock as m, normalizeClass as V, createElementVNode as g, createCommentVNode as _, renderSlot as T, createBlock as E, mergeProps as j, toHandlers as fe, unref as f, toDisplayString as W, withModifiers as ve } from "vue";
|
|
2
|
+
import { g as me } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { R as F, s as pe } from "./icon-svg-K8-vLJgV.js";
|
|
4
|
+
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/textField.css';const ye = { class: "rds-e-textfield__input-container" }, ge = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly"], _e = ["for"], xe = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
8
|
-
},
|
|
8
|
+
}, be = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "rds-e-textfield__helper"
|
|
11
|
-
},
|
|
11
|
+
}, we = /* @__PURE__ */ ie({
|
|
12
12
|
__name: "text-field",
|
|
13
13
|
props: {
|
|
14
14
|
/**
|
|
@@ -62,7 +62,7 @@ import './style/textField.css';const pe = { class: "rds-e-textfield__input-conta
|
|
|
62
62
|
maxLength: {
|
|
63
63
|
type: Number,
|
|
64
64
|
required: !1,
|
|
65
|
-
validator: (
|
|
65
|
+
validator: (l) => l == null ? !0 : typeof l != "number" || Number.isNaN(l) ? (console.info("El valor de maxLength debe ser un número"), !1) : l < 0 ? (console.info("El valor de maxLength no puede ser menor a 0"), !1) : !0
|
|
66
66
|
},
|
|
67
67
|
/**
|
|
68
68
|
* Número mínimo de caracteres permitidos en el campo de entrada.
|
|
@@ -71,7 +71,7 @@ import './style/textField.css';const pe = { class: "rds-e-textfield__input-conta
|
|
|
71
71
|
minLength: {
|
|
72
72
|
type: Number,
|
|
73
73
|
required: !1,
|
|
74
|
-
validator: (
|
|
74
|
+
validator: (l) => l == null ? !0 : typeof l != "number" || Number.isNaN(l) ? (console.info("El valor de minLength debe ser un número"), !1) : l < 0 ? (console.info("El valor de minLength no puede ser menor a 0"), !1) : !0
|
|
75
75
|
},
|
|
76
76
|
/**
|
|
77
77
|
* Tipo del input HTML. Por defecto 'text'.
|
|
@@ -80,9 +80,9 @@ import './style/textField.css';const pe = { class: "rds-e-textfield__input-conta
|
|
|
80
80
|
type: {
|
|
81
81
|
type: String,
|
|
82
82
|
default: "text",
|
|
83
|
-
validator: (
|
|
84
|
-
const r = ["text", "number", "password", "email", "tel", "url"], i = r.includes(
|
|
85
|
-
return i || console.warn(`[RDSTextfield]: El valor de la prop 'type' debe ser uno de: ${r.join(", ")}. Valor recibido: ${
|
|
83
|
+
validator: (l) => {
|
|
84
|
+
const r = ["text", "number", "password", "email", "tel", "url"], i = r.includes(l);
|
|
85
|
+
return i || console.warn(`[RDSTextfield]: El valor de la prop 'type' debe ser uno de: ${r.join(", ")}. Valor recibido: ${l}`), i;
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
/**
|
|
@@ -150,90 +150,97 @@ import './style/textField.css';const pe = { class: "rds-e-textfield__input-conta
|
|
|
150
150
|
autocomplete: {
|
|
151
151
|
type: String,
|
|
152
152
|
default: "off",
|
|
153
|
-
validator: (
|
|
153
|
+
validator: (l, r) => {
|
|
154
154
|
const i = ["new-password", "current-password", "off"];
|
|
155
|
-
return (r.password || r.type === "password") && !i.includes(
|
|
155
|
+
return (r.password || r.type === "password") && !i.includes(l) ? (console.info(`[RDSTextfield]: El valor de autocomplete para un campo de contraseña debe ser uno de los siguientes: ${i.join(", ")}`), !1) : !0;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
emits: ["update:modelValue", "clear", "keydown", "keyup", "keypress", "change"],
|
|
160
|
-
setup(
|
|
161
|
-
const
|
|
162
|
-
type:
|
|
163
|
-
label:
|
|
160
|
+
setup(l, { expose: r, emit: i }) {
|
|
161
|
+
const o = l, u = i, {
|
|
162
|
+
type: v,
|
|
163
|
+
label: O,
|
|
164
164
|
disabled: B,
|
|
165
|
-
modelValue:
|
|
166
|
-
icon:
|
|
167
|
-
rightIcon:
|
|
168
|
-
helper:
|
|
165
|
+
modelValue: x,
|
|
166
|
+
icon: U,
|
|
167
|
+
rightIcon: z,
|
|
168
|
+
helper: H,
|
|
169
169
|
error: C,
|
|
170
|
-
helperText:
|
|
171
|
-
clearable:
|
|
170
|
+
helperText: G,
|
|
171
|
+
clearable: J,
|
|
172
172
|
password: b,
|
|
173
|
-
autocomplete:
|
|
174
|
-
fullWidth:
|
|
175
|
-
} =
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
173
|
+
autocomplete: Q,
|
|
174
|
+
fullWidth: X
|
|
175
|
+
} = ue(o), a = c(null), p = c(!0), d = c(!1), w = c(!1), S = c(!1), Y = me(), h = c(""), n = c(!1), I = () => {
|
|
176
|
+
if (a.value)
|
|
177
|
+
if (v.value === "number") {
|
|
178
|
+
const e = a.value, t = e.value !== "" || e.selectionStart !== null && e.selectionStart > 0 || e.validity.badInput;
|
|
179
|
+
n.value = t;
|
|
180
|
+
} else
|
|
181
|
+
n.value = a.value.value !== "";
|
|
182
|
+
}, $ = y(() => o.id || `text-field-${Y}`), Z = y(() => b.value ? p.value ? "text" : "password" : ["text", "number", "password", "email", "tel", "url"].includes(v.value) ? v.value : "text"), ee = y(() => {
|
|
183
|
+
if (b.value || v.value === "password")
|
|
184
|
+
return Q.value;
|
|
185
|
+
}), te = (e) => {
|
|
186
|
+
const t = e.target, K = t.value.trim();
|
|
187
|
+
let k = t.value;
|
|
188
|
+
if (v.value === "number") {
|
|
189
|
+
const N = t.value !== "" || t.selectionStart !== null && t.selectionStart > 0 || t.validity.badInput;
|
|
190
|
+
n.value = N;
|
|
184
191
|
} else
|
|
185
|
-
|
|
186
|
-
if (
|
|
187
|
-
if (
|
|
188
|
-
|
|
192
|
+
n.value = t.value !== "";
|
|
193
|
+
if (v.value === "number") {
|
|
194
|
+
if (t.value.trim() === "")
|
|
195
|
+
k = null;
|
|
189
196
|
else {
|
|
190
|
-
const N = Number.parseFloat(
|
|
191
|
-
|
|
197
|
+
const N = Number.parseFloat(t.value);
|
|
198
|
+
k = Number.isNaN(N) ? t.value : N;
|
|
192
199
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
200
|
+
K === "" && !t.validity.badInput && (n.value = !1);
|
|
201
|
+
} else t.value === "" && x.value === null && (k = null);
|
|
202
|
+
u("update:modelValue", k), I();
|
|
203
|
+
}, le = () => {
|
|
196
204
|
S.value = !0;
|
|
197
|
-
}, $ = () => {
|
|
198
|
-
if (h.value = !1, w.value = !1, S.value = !1, d.value === "number" && l.value) {
|
|
199
|
-
const e = l.value.value !== "" || l.value.selectionStart !== null && l.value.selectionStart > 0 || l.value.validity.badInput;
|
|
200
|
-
y.value = e;
|
|
201
|
-
}
|
|
202
205
|
}, D = () => {
|
|
203
|
-
|
|
204
|
-
|
|
206
|
+
var t;
|
|
207
|
+
const e = ((t = a.value) == null ? void 0 : t.value.trim()) || "";
|
|
208
|
+
n.value = e !== "", d.value = !1, w.value = !1, S.value = !1, e === "" && (h.value = ""), I();
|
|
209
|
+
}, R = () => {
|
|
210
|
+
d.value = !0, w.value = !S.value, S.value = !1;
|
|
211
|
+
}, ae = (e) => {
|
|
205
212
|
u("keydown", e);
|
|
206
|
-
},
|
|
213
|
+
}, ne = (e) => {
|
|
207
214
|
u("keyup", e);
|
|
208
|
-
},
|
|
215
|
+
}, oe = (e) => {
|
|
209
216
|
u("keypress", e);
|
|
210
|
-
},
|
|
217
|
+
}, se = (e) => {
|
|
211
218
|
u("change", e);
|
|
212
|
-
},
|
|
219
|
+
}, re = y(() => {
|
|
213
220
|
const e = [];
|
|
214
|
-
return
|
|
221
|
+
return h.value && e.push(h.value), (x.value !== null && String(x.value).trim().length > 0 || n.value || d.value) && e.push("rds-e-textfield--filled"), C.value && e.push("rds-e-textfield--error"), B.value && e.push("rds-e-textfield--disabled"), X.value && e.push("rds-e-textfield--full-width"), e.join(" ");
|
|
215
222
|
});
|
|
216
|
-
|
|
217
|
-
() =>
|
|
223
|
+
P(
|
|
224
|
+
() => x.value,
|
|
218
225
|
(e) => {
|
|
219
|
-
e !== null && String(e).length > 0 && (
|
|
226
|
+
e !== null && String(e).length > 0 && (h.value = ""), (e === "" || e === null) && !d.value && (n.value = !1);
|
|
220
227
|
}
|
|
221
228
|
);
|
|
222
|
-
const
|
|
229
|
+
const s = y(() => {
|
|
223
230
|
const e = {
|
|
224
|
-
name:
|
|
231
|
+
name: U.value,
|
|
225
232
|
class: "",
|
|
226
233
|
events: {
|
|
227
234
|
click: () => {
|
|
228
235
|
}
|
|
229
236
|
}
|
|
230
|
-
},
|
|
237
|
+
}, t = {
|
|
231
238
|
left: {
|
|
232
239
|
...e
|
|
233
240
|
},
|
|
234
241
|
right: {
|
|
235
242
|
...e,
|
|
236
|
-
name:
|
|
243
|
+
name: z.value
|
|
237
244
|
}
|
|
238
245
|
};
|
|
239
246
|
return b.value ? {
|
|
@@ -243,13 +250,13 @@ import './style/textField.css';const pe = { class: "rds-e-textfield__input-conta
|
|
|
243
250
|
},
|
|
244
251
|
right: {
|
|
245
252
|
...e,
|
|
246
|
-
name:
|
|
253
|
+
name: p.value ? "eye_open" : "eye_close",
|
|
247
254
|
class: "rds-e-textfield__icon--password",
|
|
248
255
|
events: {
|
|
249
|
-
click: () =>
|
|
256
|
+
click: () => p.value = !p.value
|
|
250
257
|
}
|
|
251
258
|
}
|
|
252
|
-
} :
|
|
259
|
+
} : J.value ? {
|
|
253
260
|
left: {
|
|
254
261
|
...e
|
|
255
262
|
},
|
|
@@ -259,108 +266,106 @@ import './style/textField.css';const pe = { class: "rds-e-textfield__input-conta
|
|
|
259
266
|
class: "rds-e-textfield__icon--clear",
|
|
260
267
|
events: {
|
|
261
268
|
click: () => {
|
|
262
|
-
u("update:modelValue", ""), u("clear");
|
|
269
|
+
u("update:modelValue", ""), a.value && (a.value.value = ""), d.value = !1, n.value = !1, a.value && a.value.blur(), u("clear");
|
|
263
270
|
}
|
|
264
271
|
}
|
|
265
272
|
}
|
|
266
|
-
} :
|
|
273
|
+
} : t;
|
|
267
274
|
});
|
|
268
|
-
|
|
275
|
+
P(
|
|
269
276
|
b,
|
|
270
|
-
(e) =>
|
|
277
|
+
(e) => p.value = !e,
|
|
271
278
|
{ immediate: !0 }
|
|
272
279
|
);
|
|
273
|
-
const
|
|
274
|
-
const
|
|
275
|
-
return
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
|
|
280
|
+
const M = (e) => {
|
|
281
|
+
const t = pe.includes(e);
|
|
282
|
+
return t || console.warn(`[RDSTextfield]: El icono "${e}" no es un icono válido.`), t;
|
|
283
|
+
}, q = (e) => {
|
|
284
|
+
const t = a.value;
|
|
285
|
+
if (!t) return;
|
|
286
|
+
t.matches(":-webkit-autofill") && e.animationName.startsWith("onAutoFillStart") && t.value.trim().length > 0 && (h.value = "rds-e-textfield--filled", n.value = !0);
|
|
279
287
|
};
|
|
280
|
-
return
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
}), ie(() => {
|
|
286
|
-
l.value && l.value.removeEventListener("animationstart", M);
|
|
288
|
+
return de(() => {
|
|
289
|
+
a.value && (a.value.addEventListener("animationstart", q), I());
|
|
290
|
+
}), ce(() => {
|
|
291
|
+
a.value && a.value.removeEventListener("animationstart", q);
|
|
287
292
|
}), r({
|
|
288
293
|
focus: () => {
|
|
289
|
-
|
|
294
|
+
a.value && (a.value.focus(), R());
|
|
290
295
|
},
|
|
291
296
|
blur: () => {
|
|
292
|
-
|
|
297
|
+
a.value && (a.value.blur(), D());
|
|
293
298
|
}
|
|
294
|
-
}), (e,
|
|
295
|
-
class: V(["rds-e-textfield",
|
|
299
|
+
}), (e, t) => (m(), L("div", {
|
|
300
|
+
class: V(["rds-e-textfield", re.value])
|
|
296
301
|
}, [
|
|
297
|
-
|
|
302
|
+
g("div", {
|
|
298
303
|
class: V(["rds-e-textfield__container", {
|
|
299
304
|
"rds-e-textfield__container--keyboard-focus": w.value,
|
|
300
|
-
"rds-e-textfield__container--active":
|
|
305
|
+
"rds-e-textfield__container--active": d.value && !w.value
|
|
301
306
|
}]),
|
|
302
|
-
onMousedown:
|
|
307
|
+
onMousedown: le
|
|
303
308
|
}, [
|
|
304
|
-
|
|
305
|
-
|
|
309
|
+
T(e.$slots, "left-icon", {}, () => [
|
|
310
|
+
l.loading ? (m(), E(F, {
|
|
306
311
|
key: 0,
|
|
307
312
|
name: "loading",
|
|
308
313
|
class: "rds-e-textfield__icon--loading"
|
|
309
|
-
})) :
|
|
310
|
-
|
|
314
|
+
})) : _("", !0),
|
|
315
|
+
s.value.left.name && M(s.value.left.name) && !l.loading ? (m(), E(F, j({
|
|
311
316
|
key: 1,
|
|
312
|
-
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden":
|
|
317
|
+
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": d.value }],
|
|
313
318
|
"aria-hidden": "true"
|
|
314
|
-
},
|
|
319
|
+
}, s.value.left, fe(s.value.left.events)), null, 16, ["class"])) : _("", !0)
|
|
315
320
|
], !0),
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
id:
|
|
321
|
+
g("div", ye, [
|
|
322
|
+
g("input", {
|
|
323
|
+
id: $.value,
|
|
319
324
|
ref_key: "input",
|
|
320
|
-
ref:
|
|
321
|
-
type:
|
|
325
|
+
ref: a,
|
|
326
|
+
type: Z.value,
|
|
322
327
|
class: "rds-e-textfield__input",
|
|
323
|
-
maxlength:
|
|
324
|
-
minlength:
|
|
328
|
+
maxlength: o.type === "number" ? void 0 : o.maxLength,
|
|
329
|
+
minlength: o.type === "number" ? void 0 : o.minLength,
|
|
325
330
|
disabled: f(B),
|
|
326
|
-
value:
|
|
327
|
-
autocomplete:
|
|
328
|
-
readonly:
|
|
329
|
-
onInput:
|
|
330
|
-
onBlur:
|
|
331
|
-
onFocus:
|
|
332
|
-
onKeydown:
|
|
333
|
-
onKeyup:
|
|
334
|
-
onKeypress:
|
|
335
|
-
onChange:
|
|
336
|
-
}, null, 40,
|
|
337
|
-
|
|
338
|
-
for:
|
|
331
|
+
value: o.modelValue === null ? "" : o.modelValue,
|
|
332
|
+
autocomplete: ee.value,
|
|
333
|
+
readonly: l.readonly,
|
|
334
|
+
onInput: te,
|
|
335
|
+
onBlur: D,
|
|
336
|
+
onFocus: R,
|
|
337
|
+
onKeydown: ae,
|
|
338
|
+
onKeyup: ne,
|
|
339
|
+
onKeypress: oe,
|
|
340
|
+
onChange: se
|
|
341
|
+
}, null, 40, ge),
|
|
342
|
+
g("label", {
|
|
343
|
+
for: $.value,
|
|
339
344
|
class: V(["rds-e-textfield__label", f(B) ? "rds-e-textfield__label--disabled" : ""])
|
|
340
|
-
},
|
|
345
|
+
}, W(f(O)), 11, _e)
|
|
341
346
|
]),
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
347
|
+
s.value.right.name || e.$slots["right-icon"] ? (m(), L("span", xe, [
|
|
348
|
+
T(e.$slots, "right-icon", {}, () => [
|
|
349
|
+
s.value.right.name && M(s.value.right.name) ? (m(), E(F, j({
|
|
345
350
|
key: 0,
|
|
346
351
|
"aria-hidden": "true",
|
|
347
352
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
348
|
-
},
|
|
349
|
-
onClick:
|
|
350
|
-
}), null, 16, ["onClick"])) :
|
|
353
|
+
}, s.value.right, {
|
|
354
|
+
onClick: ve(s.value.right.events.click, ["stop"])
|
|
355
|
+
}), null, 16, ["onClick"])) : _("", !0)
|
|
351
356
|
], !0)
|
|
352
|
-
])) :
|
|
357
|
+
])) : _("", !0)
|
|
353
358
|
], 34),
|
|
354
|
-
f(
|
|
355
|
-
|
|
356
|
-
|
|
359
|
+
f(H) || f(C) ? (m(), L("div", be, [
|
|
360
|
+
T(e.$slots, "helper-text", {}, () => [
|
|
361
|
+
g("span", {
|
|
357
362
|
class: V(f(C) ? "rds-e-textfield__helper--error" : "")
|
|
358
|
-
},
|
|
363
|
+
}, W(f(G)), 3)
|
|
359
364
|
], !0)
|
|
360
|
-
])) :
|
|
365
|
+
])) : _("", !0)
|
|
361
366
|
], 2));
|
|
362
367
|
}
|
|
363
|
-
}),
|
|
368
|
+
}), Be = /* @__PURE__ */ he(we, [["__scopeId", "data-v-f6902be3"]]);
|
|
364
369
|
export {
|
|
365
|
-
|
|
370
|
+
Be as default
|
|
366
371
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as T, toRefs as
|
|
2
|
-
import { _ as
|
|
3
|
-
import './style/toggle.css';const
|
|
1
|
+
import { defineComponent as T, toRefs as E, ref as L, onMounted as y, createElementBlock as B, openBlock as F, normalizeClass as g, createElementVNode as m, unref as u, toDisplayString as v } from "vue";
|
|
2
|
+
import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
import './style/toggle.css';const R = ["id"], G = ["id"], H = ["id"], W = /* @__PURE__ */ T({
|
|
4
4
|
__name: "toggle",
|
|
5
5
|
props: {
|
|
6
6
|
small: { type: Boolean },
|
|
@@ -14,18 +14,18 @@ import './style/toggle.css';const I = ["id"], R = ["id"], _ = ["id"], G = /* @__
|
|
|
14
14
|
id: {}
|
|
15
15
|
},
|
|
16
16
|
emits: ["update:modelValue"],
|
|
17
|
-
setup(
|
|
18
|
-
const b =
|
|
17
|
+
setup(e, { emit: r }) {
|
|
18
|
+
const b = e, d = r, { modelValue: t, switchType: i, valueLeft: n, valueRight: a } = E(b), l = {
|
|
19
19
|
LEFT: "left",
|
|
20
20
|
RIGHT: "right"
|
|
21
|
-
},
|
|
22
|
-
|
|
21
|
+
}, o = L(l.LEFT), c = (f) => {
|
|
22
|
+
d("update:modelValue", f);
|
|
23
23
|
};
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
}), (
|
|
24
|
+
return y(() => {
|
|
25
|
+
i != null && i.value ? (d("update:modelValue", t == null ? void 0 : t.value), o.value = t != null && t.value ? l.RIGHT : l.LEFT) : (t == null ? void 0 : t.value) === (a == null ? void 0 : a.value) ? (d("update:modelValue", a == null ? void 0 : a.value), o.value = l.RIGHT) : (d("update:modelValue", n == null ? void 0 : n.value), o.value = l.LEFT);
|
|
26
|
+
}), (f, s) => (F(), B("div", {
|
|
27
27
|
id: e.id,
|
|
28
|
-
class:
|
|
28
|
+
class: g(["rds-e-toggle", [
|
|
29
29
|
{
|
|
30
30
|
"rds-e-toggle--small-full-width": e.small && e.fullWidth,
|
|
31
31
|
"rds-e-toggle--full-width": e.fullWidth && !e.small,
|
|
@@ -34,25 +34,25 @@ import './style/toggle.css';const I = ["id"], R = ["id"], _ = ["id"], G = /* @__
|
|
|
34
34
|
}
|
|
35
35
|
]])
|
|
36
36
|
}, [
|
|
37
|
-
|
|
37
|
+
m("button", {
|
|
38
38
|
id: e.id ? `${e.id}-left` : void 0,
|
|
39
|
-
class:
|
|
40
|
-
"rds-e-toggle__tab--active":
|
|
39
|
+
class: g(["rds-e-toggle__tab", {
|
|
40
|
+
"rds-e-toggle__tab--active": o.value === l.LEFT
|
|
41
41
|
}]),
|
|
42
42
|
type: "button",
|
|
43
|
-
onClick:
|
|
44
|
-
},
|
|
45
|
-
|
|
43
|
+
onClick: s[0] || (s[0] = (h) => (c(u(i) ? !0 : u(n)), o.value = l.LEFT))
|
|
44
|
+
}, v(e.labelLeft), 11, G),
|
|
45
|
+
m("button", {
|
|
46
46
|
id: e.id ? `${e.id}-right` : void 0,
|
|
47
|
-
class:
|
|
48
|
-
"rds-e-toggle__tab--active":
|
|
47
|
+
class: g(["rds-e-toggle__tab", {
|
|
48
|
+
"rds-e-toggle__tab--active": o.value === l.RIGHT
|
|
49
49
|
}]),
|
|
50
50
|
type: "button",
|
|
51
|
-
onClick:
|
|
52
|
-
},
|
|
53
|
-
], 10,
|
|
51
|
+
onClick: s[1] || (s[1] = (h) => (c(u(i) ? !1 : u(a)), o.value = l.RIGHT))
|
|
52
|
+
}, v(e.labelRight), 11, H)
|
|
53
|
+
], 10, R));
|
|
54
54
|
}
|
|
55
|
-
}),
|
|
55
|
+
}), C = /* @__PURE__ */ I(W, [["__scopeId", "data-v-be1c5818"]]);
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
C as default
|
|
58
58
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as q, toRefs as G, ref as u, computed as T, onBeforeUnmount as J, createElementBlock as x, openBlock as m, createElementVNode as v, createBlock as K, renderSlot as D, Teleport as Q, normalizeClass as N, createCommentVNode as O, unref as A, createVNode as Z, toDisplayString as E, createTextVNode as ee, nextTick as te } from "vue";
|
|
2
|
-
import { a as oe, o as le, f as ae, s as ie, b as se, c as re, d as ne } from "./floating-ui.vue-
|
|
3
|
-
import { R as ue } from "./icon-svg-
|
|
2
|
+
import { a as oe, o as le, f as ae, s as ie, b as se, c as re, d as ne } from "./floating-ui.vue-DHEoOe5S.js";
|
|
3
|
+
import { R as ue } from "./icon-svg-K8-vLJgV.js";
|
|
4
4
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/tooltip.css';const ce = ["id"], fe = {
|
|
6
6
|
key: 0,
|