energy-components 1.23.0 → 2.0.0-beta.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/README.md +21 -6
- package/dist/components/accordion.es.js +17 -17
- package/dist/components/avatar.es.js +7 -7
- package/dist/components/breadcrumbs.es.js +32 -32
- package/dist/components/button.es.js +24 -24
- package/dist/components/checkbox.es.js +14 -17
- 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 → collapsable.scss_vue_type_style_index_0_src_true_lang-BERfoghR.js} +10 -10
- package/dist/components/datepicker.es.js +4644 -4639
- package/dist/components/directAccess.es.js +45 -50
- package/dist/components/dragAndDrop.es.js +44 -46
- package/dist/components/dropdown.es.js +154 -163
- package/dist/components/fileUploadItem.es.js +18 -18
- package/dist/components/filterChip.es.js +9 -9
- package/dist/components/filterTag.es.js +7 -7
- package/dist/components/{floating-ui.vue-DHEoOe5S.js → floating-ui.vue-C-DgKOwt.js} +1 -1
- package/dist/components/functions-D3GA3OzJ.js +24 -0
- package/dist/components/icon-svg-DxlNo61Q.js +869 -0
- package/dist/components/iconList.es.js +25 -29
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +46 -46
- package/dist/components/indicator.es.js +27 -28
- package/dist/components/infoBox.es.js +17 -17
- package/dist/components/link.es.js +82 -85
- package/dist/components/modal.es.js +20 -20
- package/dist/components/multiselect.es.js +54 -55
- package/dist/components/overlay.es.js +20 -15
- package/dist/components/pagination.es.js +111 -111
- package/dist/components/persistentToast.es.js +11 -11
- package/dist/components/popover.es.js +18 -18
- package/dist/components/popoverMenu.es.js +22 -22
- package/dist/components/progressBar.es.js +8 -8
- package/dist/components/quantitySelector.es.js +12 -12
- package/dist/components/radioButton.es.js +26 -26
- package/dist/components/selectionChip.es.js +5 -5
- package/dist/components/sidedrawer.es.js +19 -19
- package/dist/components/style/accordionGroup.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/dragAndDrop.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/iconList.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/modal.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/selectionChip.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- package/dist/components/switch.es.js +9 -9
- package/dist/components/tabBar.es.js +32 -33
- package/dist/components/tablepaginatedcomponent.es.js +35 -36
- package/dist/components/tableslotedcomponent.es.js +116 -121
- package/dist/components/tag.es.js +6 -6
- package/dist/components/textArea.es.js +103 -106
- package/dist/components/textField.es.js +21 -22
- package/dist/components/toggle.es.js +23 -23
- package/dist/components/tooltip.es.js +59 -59
- package/dist/energy-components.css +1 -0
- package/dist/energy-components.es.js +8931 -24801
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/icon-svg/icon-list.d.ts +8 -9
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +2 -2
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/link/link.vue.d.ts +5 -8
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +1 -1
- package/dist/types/src/helpers/functions.d.ts +1 -0
- package/dist/types/style.d.ts +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -17
- package/dist/components/functions-DIHwdgF0.js +0 -18
- package/dist/components/icon-svg-K8-vLJgV.js +0 -16718
- package/dist/composables/index.es.js +0 -37
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
1
|
+
import { defineComponent as L, mergeModels as O, useModel as Q, toRefs as W, ref as k, computed as s, createElementBlock as f, openBlock as o, normalizeClass as u, createElementVNode as r, withDirectives as X, unref as e, vModelText as Y, renderSlot as S, createTextVNode as Z, createBlock as q, createCommentVNode as i, mergeProps as z, toHandlers as D, toDisplayString as _ } from "vue";
|
|
2
|
+
import { I as F } from "./icon-svg-DxlNo61Q.js";
|
|
3
|
+
import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/textArea.css';function V(t, p = !0, d = !0) {
|
|
5
5
|
return p && !t.trim() ? (console.warn("Advertencia: El valor no puede estar vacío"), !1) : d && !/^[\w\s\u00C0-\u017F\-:.,;()¿?¡!%"'$€]+$/.test(t) ? (console.warn("Advertencia: El valor contiene caracteres inválidos"), !1) : !0;
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const te = { class: "rds-e-textarea__input-container" }, ae = ["id", "name", "maxlength", "minlength", "rows", "disabled"], re = ["for"], le = { key: 0 }, ne = { key: 0 }, oe = { key: 1 }, se = { key: 0 }, ue = /* @__PURE__ */ L({
|
|
8
8
|
__name: "text-area",
|
|
9
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ O({
|
|
10
10
|
/**
|
|
11
11
|
* Etiqueta que se muestra sobre el campo de entrada. y Placeholder
|
|
12
12
|
*/
|
|
@@ -136,34 +136,34 @@ const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "ma
|
|
|
136
136
|
}),
|
|
137
137
|
emits: ["update:modelValue"],
|
|
138
138
|
setup(t) {
|
|
139
|
-
const p = t, d =
|
|
139
|
+
const p = t, d = Q(t, "modelValue"), {
|
|
140
140
|
label: B,
|
|
141
141
|
id: E,
|
|
142
142
|
disabled: g,
|
|
143
143
|
maxlength: x,
|
|
144
144
|
minlength: C,
|
|
145
145
|
modelValue: c,
|
|
146
|
-
icon:
|
|
146
|
+
icon: T,
|
|
147
147
|
rightIcon: M,
|
|
148
|
-
helper:
|
|
148
|
+
helper: A,
|
|
149
149
|
error: y,
|
|
150
|
-
helperText:
|
|
150
|
+
helperText: H,
|
|
151
151
|
clearable: b,
|
|
152
152
|
lengthError: w
|
|
153
|
-
} =
|
|
153
|
+
} = W(p), v = k(!1), m = k(!1), h = k(!1), P = () => {
|
|
154
154
|
h.value = !0;
|
|
155
|
-
},
|
|
155
|
+
}, j = () => {
|
|
156
156
|
v.value = !1, m.value = !1, h.value = !1;
|
|
157
|
-
},
|
|
157
|
+
}, K = () => {
|
|
158
158
|
v.value = !0, m.value = !h.value, h.value = !1;
|
|
159
|
-
}, N = s(() => c.value.length === x.value), I = s(() => c.value.length === 0 ? !1 : c.value.length < C.value),
|
|
159
|
+
}, N = s(() => c.value.length === x.value), I = s(() => c.value.length === 0 ? !1 : c.value.length < C.value), $ = s(() => w.value && (N.value || I.value)), R = s(() => {
|
|
160
160
|
const a = [];
|
|
161
|
-
return c.value && a.push("rds-e-textarea--filled"), y.value && a.push("rds-e-textarea--error"), g.value && a.push("rds-e-textarea--disabled"),
|
|
162
|
-
}),
|
|
161
|
+
return c.value && a.push("rds-e-textarea--filled"), y.value && a.push("rds-e-textarea--error"), g.value && a.push("rds-e-textarea--disabled"), $.value && a.push("rds-e-textarea--error"), a.join(" ");
|
|
162
|
+
}), U = () => {
|
|
163
163
|
d.value = "";
|
|
164
164
|
}, l = s(() => {
|
|
165
165
|
const a = {
|
|
166
|
-
name:
|
|
166
|
+
name: T.value,
|
|
167
167
|
class: "",
|
|
168
168
|
events: {
|
|
169
169
|
click: () => {
|
|
@@ -178,101 +178,98 @@ const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "ma
|
|
|
178
178
|
name: "close",
|
|
179
179
|
class: "rds-e-textfield__icon--clear",
|
|
180
180
|
events: {
|
|
181
|
-
click: () =>
|
|
181
|
+
click: () => U()
|
|
182
182
|
}
|
|
183
183
|
}), n;
|
|
184
|
-
}),
|
|
185
|
-
return (a, n) => {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
}), G = s(() => c.value.length);
|
|
185
|
+
return (a, n) => (o(), f("div", {
|
|
186
|
+
class: u(["rds-e-textarea", R.value])
|
|
187
|
+
}, [
|
|
188
|
+
r("div", {
|
|
189
|
+
class: u(["rds-e-textarea__container", {
|
|
190
|
+
"rds-e-textarea__container--keyboard-focus": m.value,
|
|
191
|
+
"rds-e-textarea__container--active": v.value && !m.value
|
|
192
|
+
}]),
|
|
193
|
+
onMousedown: P
|
|
189
194
|
}, [
|
|
190
|
-
r("div",
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
n[1] || (n[1] = r("div", { class: "rds-e-textarea__resize-handle" }, [
|
|
214
|
-
r("svg", {
|
|
215
|
-
width: "12",
|
|
216
|
-
height: "14",
|
|
217
|
-
viewBox: "0 0 12 14",
|
|
218
|
-
fill: "none",
|
|
219
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
220
|
-
}, [
|
|
221
|
-
r("path", {
|
|
222
|
-
d: "M11 1V3C11 8.52285 6.52285 13 1 13V13",
|
|
223
|
-
"stroke-width": "1.2",
|
|
224
|
-
"stroke-linecap": "round"
|
|
225
|
-
})
|
|
226
|
-
])
|
|
227
|
-
], -1)),
|
|
228
|
-
r("label", {
|
|
229
|
-
for: (q = e(E)) == null ? void 0 : q.toString(),
|
|
230
|
-
class: u(["rds-e-textarea__label", {
|
|
231
|
-
"rds-e-textarea__label--with-icon": l.value.left.name,
|
|
232
|
-
"rds-e-textarea__label--active": v.value
|
|
233
|
-
}])
|
|
195
|
+
r("div", te, [
|
|
196
|
+
X(r("textarea", {
|
|
197
|
+
id: e(E)?.toString(),
|
|
198
|
+
"onUpdate:modelValue": n[0] || (n[0] = (J) => d.value = J),
|
|
199
|
+
type: "text",
|
|
200
|
+
class: u(["rds-e-textarea__input", { "rds-e-textarea__input--active": v.value }]),
|
|
201
|
+
name: t.name,
|
|
202
|
+
maxlength: e(x),
|
|
203
|
+
minlength: e(C),
|
|
204
|
+
rows: t.rows,
|
|
205
|
+
disabled: e(g),
|
|
206
|
+
onBlur: j,
|
|
207
|
+
onFocus: K
|
|
208
|
+
}, null, 42, ae), [
|
|
209
|
+
[Y, d.value]
|
|
210
|
+
]),
|
|
211
|
+
n[1] || (n[1] = r("div", { class: "rds-e-textarea__resize-handle" }, [
|
|
212
|
+
r("svg", {
|
|
213
|
+
width: "12",
|
|
214
|
+
height: "14",
|
|
215
|
+
viewBox: "0 0 12 14",
|
|
216
|
+
fill: "none",
|
|
217
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
234
218
|
}, [
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}, [
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
219
|
+
r("path", {
|
|
220
|
+
d: "M11 1V3C11 8.52285 6.52285 13 1 13V13",
|
|
221
|
+
"stroke-width": "1.2",
|
|
222
|
+
"stroke-linecap": "round"
|
|
223
|
+
})
|
|
224
|
+
])
|
|
225
|
+
], -1)),
|
|
226
|
+
r("label", {
|
|
227
|
+
for: e(E)?.toString(),
|
|
228
|
+
class: u(["rds-e-textarea__label", {
|
|
229
|
+
"rds-e-textarea__label--with-icon": l.value.left.name,
|
|
230
|
+
"rds-e-textarea__label--active": v.value
|
|
231
|
+
}])
|
|
232
|
+
}, [
|
|
233
|
+
S(a.$slots, "left-icon", {}, () => [
|
|
234
|
+
l.value.left.name ? (o(), q(F, z({
|
|
235
|
+
key: 0,
|
|
236
|
+
class: "rds-e-textarea__icon rds-e-textarea__icon--left",
|
|
237
|
+
"aria-hidden": "true"
|
|
238
|
+
}, l.value.left, D(l.value.left.events)), null, 16)) : i("", !0)
|
|
239
|
+
], !0),
|
|
240
|
+
Z(" " + _(e(B)), 1)
|
|
241
|
+
], 10, re),
|
|
242
|
+
r("div", {
|
|
243
|
+
class: u(["rds-e-textarea__counter", {
|
|
244
|
+
"rds-e-textarea__counter--disabled": e(g),
|
|
245
|
+
"rds-e-textarea__counter--clearable": e(b)
|
|
246
|
+
}])
|
|
247
|
+
}, [
|
|
248
|
+
t.counter && !e(M) && !e(b) ? (o(), f("p", le, _(G.value) + "/" + _(e(x)), 1)) : i("", !0),
|
|
249
|
+
S(a.$slots, "right-icon", {}, () => [
|
|
250
|
+
l.value.right.name ? (o(), q(F, z({
|
|
251
|
+
key: 0,
|
|
252
|
+
class: "rds-e-textarea__icon rds-e-textarea__icon--right",
|
|
253
|
+
"aria-hidden": "true"
|
|
254
|
+
}, l.value.right, D(l.value.right.events)), null, 16)) : i("", !0)
|
|
269
255
|
], !0)
|
|
270
|
-
])
|
|
271
|
-
]
|
|
272
|
-
],
|
|
273
|
-
|
|
256
|
+
], 2)
|
|
257
|
+
])
|
|
258
|
+
], 34),
|
|
259
|
+
r("ul", {
|
|
260
|
+
class: u(["rds-e-textarea__helper", e(y) || $.value ? "rds-e-textarea__helper--error" : ""])
|
|
261
|
+
}, [
|
|
262
|
+
N.value && e(w) ? (o(), f("li", ne, " Ha alcanzado el número máximo de carácteres ")) : i("", !0),
|
|
263
|
+
I.value && e(w) ? (o(), f("li", oe, " Ha alcanzado el número mínimo de carácteres ")) : i("", !0),
|
|
264
|
+
r("li", null, [
|
|
265
|
+
S(a.$slots, "helper-text", {}, () => [
|
|
266
|
+
e(A) || e(y) ? (o(), f("span", se, _(e(H)), 1)) : i("", !0)
|
|
267
|
+
], !0)
|
|
268
|
+
])
|
|
269
|
+
], 2)
|
|
270
|
+
], 2));
|
|
274
271
|
}
|
|
275
|
-
}),
|
|
272
|
+
}), ve = /* @__PURE__ */ ee(ue, [["__scopeId", "data-v-b6c3c9f8"]]);
|
|
276
273
|
export {
|
|
277
|
-
|
|
274
|
+
ve as default
|
|
278
275
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
import { g as me } from "./getInstance-GhoEcxLF.js";
|
|
3
|
-
import {
|
|
3
|
+
import { I as F, s as pe } from "./icon-svg-DxlNo61Q.js";
|
|
4
4
|
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
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,
|
|
@@ -161,18 +161,18 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
161
161
|
const o = l, u = i, {
|
|
162
162
|
type: v,
|
|
163
163
|
label: O,
|
|
164
|
-
disabled:
|
|
164
|
+
disabled: I,
|
|
165
165
|
modelValue: x,
|
|
166
166
|
icon: U,
|
|
167
167
|
rightIcon: z,
|
|
168
168
|
helper: H,
|
|
169
|
-
error:
|
|
169
|
+
error: B,
|
|
170
170
|
helperText: G,
|
|
171
171
|
clearable: J,
|
|
172
172
|
password: b,
|
|
173
173
|
autocomplete: Q,
|
|
174
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),
|
|
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), C = () => {
|
|
176
176
|
if (a.value)
|
|
177
177
|
if (v.value === "number") {
|
|
178
178
|
const e = a.value, t = e.value !== "" || e.selectionStart !== null && e.selectionStart > 0 || e.validity.badInput;
|
|
@@ -199,14 +199,13 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
199
199
|
}
|
|
200
200
|
K === "" && !t.validity.badInput && (n.value = !1);
|
|
201
201
|
} else t.value === "" && x.value === null && (k = null);
|
|
202
|
-
u("update:modelValue", k),
|
|
202
|
+
u("update:modelValue", k), C();
|
|
203
203
|
}, le = () => {
|
|
204
204
|
S.value = !0;
|
|
205
205
|
}, D = () => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}, R = () => {
|
|
206
|
+
const e = a.value?.value.trim() || "";
|
|
207
|
+
n.value = e !== "", d.value = !1, w.value = !1, S.value = !1, e === "" && (h.value = ""), C();
|
|
208
|
+
}, M = () => {
|
|
210
209
|
d.value = !0, w.value = !S.value, S.value = !1;
|
|
211
210
|
}, ae = (e) => {
|
|
212
211
|
u("keydown", e);
|
|
@@ -218,7 +217,7 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
218
217
|
u("change", e);
|
|
219
218
|
}, re = y(() => {
|
|
220
219
|
const e = [];
|
|
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"),
|
|
220
|
+
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"), B.value && e.push("rds-e-textfield--error"), I.value && e.push("rds-e-textfield--disabled"), X.value && e.push("rds-e-textfield--full-width"), e.join(" ");
|
|
222
221
|
});
|
|
223
222
|
P(
|
|
224
223
|
() => x.value,
|
|
@@ -277,7 +276,7 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
277
276
|
(e) => p.value = !e,
|
|
278
277
|
{ immediate: !0 }
|
|
279
278
|
);
|
|
280
|
-
const
|
|
279
|
+
const R = (e) => {
|
|
281
280
|
const t = pe.includes(e);
|
|
282
281
|
return t || console.warn(`[RDSTextfield]: El icono "${e}" no es un icono válido.`), t;
|
|
283
282
|
}, q = (e) => {
|
|
@@ -286,12 +285,12 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
286
285
|
t.matches(":-webkit-autofill") && e.animationName.startsWith("onAutoFillStart") && t.value.trim().length > 0 && (h.value = "rds-e-textfield--filled", n.value = !0);
|
|
287
286
|
};
|
|
288
287
|
return de(() => {
|
|
289
|
-
a.value && (a.value.addEventListener("animationstart", q),
|
|
288
|
+
a.value && (a.value.addEventListener("animationstart", q), C());
|
|
290
289
|
}), ce(() => {
|
|
291
290
|
a.value && a.value.removeEventListener("animationstart", q);
|
|
292
291
|
}), r({
|
|
293
292
|
focus: () => {
|
|
294
|
-
a.value && (a.value.focus(),
|
|
293
|
+
a.value && (a.value.focus(), M());
|
|
295
294
|
},
|
|
296
295
|
blur: () => {
|
|
297
296
|
a.value && (a.value.blur(), D());
|
|
@@ -312,7 +311,7 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
312
311
|
name: "loading",
|
|
313
312
|
class: "rds-e-textfield__icon--loading"
|
|
314
313
|
})) : _("", !0),
|
|
315
|
-
s.value.left.name &&
|
|
314
|
+
s.value.left.name && R(s.value.left.name) && !l.loading ? (m(), E(F, j({
|
|
316
315
|
key: 1,
|
|
317
316
|
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": d.value }],
|
|
318
317
|
"aria-hidden": "true"
|
|
@@ -327,13 +326,13 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
327
326
|
class: "rds-e-textfield__input",
|
|
328
327
|
maxlength: o.type === "number" ? void 0 : o.maxLength,
|
|
329
328
|
minlength: o.type === "number" ? void 0 : o.minLength,
|
|
330
|
-
disabled: f(
|
|
329
|
+
disabled: f(I),
|
|
331
330
|
value: o.modelValue === null ? "" : o.modelValue,
|
|
332
331
|
autocomplete: ee.value,
|
|
333
332
|
readonly: l.readonly,
|
|
334
333
|
onInput: te,
|
|
335
334
|
onBlur: D,
|
|
336
|
-
onFocus:
|
|
335
|
+
onFocus: M,
|
|
337
336
|
onKeydown: ae,
|
|
338
337
|
onKeyup: ne,
|
|
339
338
|
onKeypress: oe,
|
|
@@ -341,12 +340,12 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
341
340
|
}, null, 40, ge),
|
|
342
341
|
g("label", {
|
|
343
342
|
for: $.value,
|
|
344
|
-
class: V(["rds-e-textfield__label", f(
|
|
343
|
+
class: V(["rds-e-textfield__label", f(I) ? "rds-e-textfield__label--disabled" : ""])
|
|
345
344
|
}, W(f(O)), 11, _e)
|
|
346
345
|
]),
|
|
347
346
|
s.value.right.name || e.$slots["right-icon"] ? (m(), L("span", xe, [
|
|
348
347
|
T(e.$slots, "right-icon", {}, () => [
|
|
349
|
-
s.value.right.name &&
|
|
348
|
+
s.value.right.name && R(s.value.right.name) ? (m(), E(F, j({
|
|
350
349
|
key: 0,
|
|
351
350
|
"aria-hidden": "true",
|
|
352
351
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
@@ -356,16 +355,16 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
|
|
|
356
355
|
], !0)
|
|
357
356
|
])) : _("", !0)
|
|
358
357
|
], 34),
|
|
359
|
-
f(H) || f(
|
|
358
|
+
f(H) || f(B) ? (m(), L("div", be, [
|
|
360
359
|
T(e.$slots, "helper-text", {}, () => [
|
|
361
360
|
g("span", {
|
|
362
|
-
class: V(f(
|
|
361
|
+
class: V(f(B) ? "rds-e-textfield__helper--error" : "")
|
|
363
362
|
}, W(f(G)), 3)
|
|
364
363
|
], !0)
|
|
365
364
|
])) : _("", !0)
|
|
366
365
|
], 2));
|
|
367
366
|
}
|
|
368
|
-
}),
|
|
367
|
+
}), Ie = /* @__PURE__ */ he(we, [["__scopeId", "data-v-f6902be3"]]);
|
|
369
368
|
export {
|
|
370
|
-
|
|
369
|
+
Ie as default
|
|
371
370
|
};
|
|
@@ -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 L, ref as R, onMounted as y, createElementBlock as V, openBlock as E, normalizeClass as n, createElementVNode as c, unref as i, toDisplayString as f } from "vue";
|
|
2
|
+
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
import './style/toggle.css';const B = ["id"], F = ["id"], I = ["id"], G = /* @__PURE__ */ T({
|
|
4
4
|
__name: "toggle",
|
|
5
5
|
props: {
|
|
6
6
|
small: { type: Boolean },
|
|
@@ -14,18 +14,18 @@ import './style/toggle.css';const R = ["id"], G = ["id"], H = ["id"], W = /* @__
|
|
|
14
14
|
id: {}
|
|
15
15
|
},
|
|
16
16
|
emits: ["update:modelValue"],
|
|
17
|
-
setup(e, { emit:
|
|
18
|
-
const
|
|
17
|
+
setup(e, { emit: h }) {
|
|
18
|
+
const r = e, a = h, { modelValue: d, switchType: u, valueLeft: g, valueRight: s } = L(r), l = {
|
|
19
19
|
LEFT: "left",
|
|
20
20
|
RIGHT: "right"
|
|
21
|
-
},
|
|
22
|
-
|
|
21
|
+
}, t = R(l.LEFT), m = (v) => {
|
|
22
|
+
a("update:modelValue", v);
|
|
23
23
|
};
|
|
24
24
|
return y(() => {
|
|
25
|
-
|
|
26
|
-
}), (
|
|
25
|
+
u?.value ? (a("update:modelValue", d?.value), t.value = d?.value ? l.RIGHT : l.LEFT) : d?.value === s?.value ? (a("update:modelValue", s?.value), t.value = l.RIGHT) : (a("update:modelValue", g?.value), t.value = l.LEFT);
|
|
26
|
+
}), (v, o) => (E(), V("div", {
|
|
27
27
|
id: e.id,
|
|
28
|
-
class:
|
|
28
|
+
class: n(["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 R = ["id"], G = ["id"], H = ["id"], W = /* @__
|
|
|
34
34
|
}
|
|
35
35
|
]])
|
|
36
36
|
}, [
|
|
37
|
-
|
|
37
|
+
c("button", {
|
|
38
38
|
id: e.id ? `${e.id}-left` : void 0,
|
|
39
|
-
class:
|
|
40
|
-
"rds-e-toggle__tab--active":
|
|
39
|
+
class: n(["rds-e-toggle__tab", {
|
|
40
|
+
"rds-e-toggle__tab--active": t.value === l.LEFT
|
|
41
41
|
}]),
|
|
42
42
|
type: "button",
|
|
43
|
-
onClick:
|
|
44
|
-
},
|
|
45
|
-
|
|
43
|
+
onClick: o[0] || (o[0] = (b) => (m(i(u) ? !0 : i(g)), t.value = l.LEFT))
|
|
44
|
+
}, f(e.labelLeft), 11, F),
|
|
45
|
+
c("button", {
|
|
46
46
|
id: e.id ? `${e.id}-right` : void 0,
|
|
47
|
-
class:
|
|
48
|
-
"rds-e-toggle__tab--active":
|
|
47
|
+
class: n(["rds-e-toggle__tab", {
|
|
48
|
+
"rds-e-toggle__tab--active": t.value === l.RIGHT
|
|
49
49
|
}]),
|
|
50
50
|
type: "button",
|
|
51
|
-
onClick:
|
|
52
|
-
},
|
|
53
|
-
], 10,
|
|
51
|
+
onClick: o[1] || (o[1] = (b) => (m(i(u) ? !1 : i(s)), t.value = l.RIGHT))
|
|
52
|
+
}, f(e.labelRight), 11, I)
|
|
53
|
+
], 10, B));
|
|
54
54
|
}
|
|
55
|
-
}),
|
|
55
|
+
}), k = /* @__PURE__ */ w(G, [["__scopeId", "data-v-be1c5818"]]);
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
k as default
|
|
58
58
|
};
|