energy-components 1.5.0 → 1.6.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/dist/components/accordion.es.js +13 -13
- package/dist/components/button.es.js +11 -11
- package/dist/components/checkbox.es.js +7 -7
- package/dist/components/dropdown.es.js +100 -91
- package/dist/components/filterChip.es.js +114 -0
- package/dist/components/{icon-svg-u9BWBbvW.js → icon-svg-CeKfjk3j.js} +5 -6
- package/dist/components/iconList.es.js +5 -5
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +47 -44
- package/dist/components/infoBox.es.js +8 -8
- package/dist/components/link.es.js +15 -15
- package/dist/components/modal.es.js +12 -12
- package/dist/components/multiselect.es.js +32 -23
- package/dist/components/pagination.es.js +127 -105
- package/dist/components/persistentToast.es.js +5 -5
- package/dist/components/quantitySelector.es.js +9 -9
- package/dist/components/radioButton.es.js +16 -16
- package/dist/components/selectionChip.es.js +5 -5
- package/dist/components/sidedrawer.es.js +8 -8
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/filterChip.css +1 -0
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -0
- package/dist/components/style/tableslotedcomponent.css +1 -0
- package/dist/components/style/textField.css +1 -1
- package/dist/components/switch.es.js +10 -10
- package/dist/components/tabBar.es.js +12 -12
- package/dist/components/tablepaginatedcomponent.es.js +137 -0
- package/dist/components/tableslotedcomponent.es.js +293 -0
- package/dist/components/tag.es.js +5 -5
- package/dist/components/textArea.es.js +22 -22
- package/dist/components/textField.es.js +95 -89
- package/dist/components/tooltip.es.js +61 -61
- package/dist/energy-components.es.js +6073 -5612
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/table/table-sloted/TableSlotedComponent.vue.d.ts +80 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +15 -0
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +150 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +1 -1
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +56 -14
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { defineComponent as ee, toRefs as le, getCurrentInstance as te, ref as _, computed as C, watchEffect as se, watch as ae, onMounted as oe, openBlock as o, createElementBlock as n, normalizeClass as b, createElementVNode as i, Fragment as p, renderList as x, renderSlot as h, normalizeStyle as ne, toDisplayString as O, createBlock as ce, mergeProps as ie, createCommentVNode as d, unref as $, createVNode as E, Transition as N, withCtx as V, nextTick as re } from "vue";
|
|
2
|
+
import { I as L } from "./icon-svg-CeKfjk3j.js";
|
|
3
|
+
import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-header", "onClick"], be = ["id", "checked", "onClick"], ke = ["for"], fe = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "table__cell table__cell--heading body-1 table__cell--right"
|
|
7
|
+
}, pe = ["checked"], ye = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "loading-overlay"
|
|
10
|
+
}, ve = ["onClick"], ge = ["column-key", "data-cell"], he = ["title"], $e = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "table__cell table__cell--shadow table__cell--right"
|
|
13
|
+
}, me = ["id", "checked", "disabled", "onClick"], Ce = ["for"], Se = ["colspan"], xe = ["colspan"], Ee = /* @__PURE__ */ ee({
|
|
14
|
+
__name: "TableSlotedComponent",
|
|
15
|
+
props: {
|
|
16
|
+
loading: { type: Boolean, default: !1 },
|
|
17
|
+
item: {},
|
|
18
|
+
hideHeaders: { type: Boolean, default: !1 },
|
|
19
|
+
statusTranslate: {},
|
|
20
|
+
applyShadow: { type: Boolean, default: !1 },
|
|
21
|
+
selectableKey: {},
|
|
22
|
+
hideSelectAll: { type: Boolean },
|
|
23
|
+
checkedAll: { type: Boolean, default: !1 },
|
|
24
|
+
listChecked: { default: [] },
|
|
25
|
+
noFixedColumn: { type: Boolean, default: !1 },
|
|
26
|
+
isMobileDevice: { type: Boolean, default: !1 },
|
|
27
|
+
variant: { default: "default" },
|
|
28
|
+
condensed: { type: Boolean },
|
|
29
|
+
itemsExpanded: {},
|
|
30
|
+
showEmptyState: { type: Boolean, default: !1 },
|
|
31
|
+
mockItems: {}
|
|
32
|
+
},
|
|
33
|
+
emits: ["selectAll", "onClickCheckbox", "onItemExpansion", "onHeaderSort"],
|
|
34
|
+
setup(j, { expose: z, emit: F }) {
|
|
35
|
+
const c = j, y = F, { item: k, listChecked: P, selectableKey: r } = le(c), S = te(), q = _(), v = _([]), m = _([]), K = _([]), U = _({}), f = _(!1), Y = _(!0), G = C(() => {
|
|
36
|
+
const e = "table";
|
|
37
|
+
let t = e;
|
|
38
|
+
return t = `${t} ${e}--${c.variant}`, c.condensed && (t = `${t} ${e}--condensed`), t;
|
|
39
|
+
}), J = C(() => {
|
|
40
|
+
const e = "table__body";
|
|
41
|
+
let t = e;
|
|
42
|
+
return t = `${t} ${e}--${c.variant}`, c.condensed && (t = `${t} ${e}--condensed`), t;
|
|
43
|
+
}), Q = C(() => c.mockItems ? Array.from({ length: c.mockItems }, () => ({
|
|
44
|
+
expandible: !1,
|
|
45
|
+
visible: !1
|
|
46
|
+
})) : []), g = C(() => c.loading && v.value.length === 0 ? Q.value : v.value), W = (e) => {
|
|
47
|
+
if (r != null && r.value) {
|
|
48
|
+
const t = e[r.value];
|
|
49
|
+
return P.value.includes(t);
|
|
50
|
+
}
|
|
51
|
+
return !1;
|
|
52
|
+
}, X = (e) => {
|
|
53
|
+
r != null && r.value && y("onClickCheckbox", String(e[r.value]));
|
|
54
|
+
}, B = async (e, t = !1) => {
|
|
55
|
+
var l;
|
|
56
|
+
e.expandible && (c.isMobileDevice || (e.visible = !e.visible), y("onItemExpansion", {
|
|
57
|
+
...e,
|
|
58
|
+
isMobileDevice: c.isMobileDevice
|
|
59
|
+
}), t && (await re(), (l = document.querySelector(".table__group--is-open")) == null || l.scrollIntoView({ behavior: "smooth" })));
|
|
60
|
+
}, Z = (e) => {
|
|
61
|
+
f.value = e.target.checked, y("selectAll", f.value);
|
|
62
|
+
}, A = (e) => e.align ? `table__cell--${e.align}` : "table__cell--left", R = (e, t) => t === "actions" ? !1 : e.status === "BLOCKED" || e.status === "BUSINESS_BLOCK" || e.status === "PT_BLOCKED" ? !0 : !!e.$disabled, D = (e, t, l) => {
|
|
63
|
+
var a, s;
|
|
64
|
+
if (!t) return "---";
|
|
65
|
+
if (e === "date") {
|
|
66
|
+
const u = (s = (a = k.value.items[l]) == null ? void 0 : a.rawElem) == null ? void 0 : s.operationHour;
|
|
67
|
+
if (u) return `${t} ${u}`;
|
|
68
|
+
}
|
|
69
|
+
return t;
|
|
70
|
+
}, w = (e, t) => {
|
|
71
|
+
if (!t.sortable) return;
|
|
72
|
+
const l = ["", "asc", "desc"], s = (l.indexOf(t.sort || "") + 1) % l.length;
|
|
73
|
+
if (m.value.forEach((u) => {
|
|
74
|
+
u.sortable && u.key !== t.key && (u.sort = "");
|
|
75
|
+
}), t.sort = l[s], t.sort === "")
|
|
76
|
+
return y("onHeaderSort", {});
|
|
77
|
+
y("onHeaderSort", {
|
|
78
|
+
sortBy: t.key,
|
|
79
|
+
order: t.sort
|
|
80
|
+
});
|
|
81
|
+
}, I = (e) => {
|
|
82
|
+
const t = {
|
|
83
|
+
name: "filter",
|
|
84
|
+
class: "",
|
|
85
|
+
style: {
|
|
86
|
+
transform: "translateY(6px)"
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return e.sort === "asc" && (t.class = "sortable_icon--active", t.style.transform = `${t.style.transform} scale(-1)`), e.sort === "desc" && (t.class = "sortable_icon--active"), t;
|
|
90
|
+
}, H = (e = !1) => {
|
|
91
|
+
v.value = [...k.value.items].map((t, l) => {
|
|
92
|
+
var a;
|
|
93
|
+
return {
|
|
94
|
+
...t,
|
|
95
|
+
visible: e ? !!((a = v.value[l]) != null && a.visible) : !1
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
}, T = (e = !1) => {
|
|
99
|
+
Y.value = !e, m.value = [
|
|
100
|
+
...k.value.header.map((t) => ("sort" in t || Object.assign(t, { sort: "" }), t))
|
|
101
|
+
], H(e), f.value = c.checkedAll;
|
|
102
|
+
};
|
|
103
|
+
T();
|
|
104
|
+
const M = (e) => Object.keys(e);
|
|
105
|
+
return se(() => {
|
|
106
|
+
var e;
|
|
107
|
+
T(!0), (e = c.itemsExpanded) != null && e.length && c.itemsExpanded.forEach((t) => {
|
|
108
|
+
k.value.items[t] && B(k.value.items[t], !0);
|
|
109
|
+
});
|
|
110
|
+
}), ae(() => c.isMobileDevice, () => {
|
|
111
|
+
v.value = [...k.value.items].map((e) => ({
|
|
112
|
+
...e,
|
|
113
|
+
visible: !1
|
|
114
|
+
}));
|
|
115
|
+
}), z({
|
|
116
|
+
clearVisibleDetails: H
|
|
117
|
+
}), oe(() => {
|
|
118
|
+
var e;
|
|
119
|
+
q.value = (e = S == null ? void 0 : S.vnode) == null ? void 0 : e.scopeId;
|
|
120
|
+
}), (e, t) => (o(), n("div", {
|
|
121
|
+
class: b(["table__container", G.value])
|
|
122
|
+
}, [
|
|
123
|
+
i("table", null, [
|
|
124
|
+
e.hideHeaders ? d("", !0) : (o(), n("thead", de, [
|
|
125
|
+
i("tr", null, [
|
|
126
|
+
(o(!0), n(p, null, x(m.value, (l, a) => (o(), n("th", {
|
|
127
|
+
key: `header-${a}`,
|
|
128
|
+
"data-header": `data-header-${l.key}`,
|
|
129
|
+
class: b(["table__cell table__cell--heading body-1", [
|
|
130
|
+
A(l),
|
|
131
|
+
{
|
|
132
|
+
"table__cell--shadow": l.sticky,
|
|
133
|
+
"table__cell--no-sticky": !l.sticky,
|
|
134
|
+
"table__cell--sortable": l.sortable
|
|
135
|
+
}
|
|
136
|
+
]]),
|
|
137
|
+
onClick: (s) => w(s, l)
|
|
138
|
+
}, [
|
|
139
|
+
h(e.$slots, `header-${l.key}`, { item: l }, () => [
|
|
140
|
+
l.type === "selectAll" ? (o(), n(p, { key: 0 }, [
|
|
141
|
+
i("input", {
|
|
142
|
+
id: `checkbox_${l.key}`,
|
|
143
|
+
class: "rds-checkbox",
|
|
144
|
+
type: "checkbox",
|
|
145
|
+
checked: l.allSelected,
|
|
146
|
+
onClick: l.callback
|
|
147
|
+
}, null, 8, be),
|
|
148
|
+
i("label", {
|
|
149
|
+
for: `checkbox_${l.key}`,
|
|
150
|
+
class: "rds-checkbox__label"
|
|
151
|
+
}, null, 8, ke)
|
|
152
|
+
], 64)) : (o(), n(p, { key: 1 }, [
|
|
153
|
+
i("span", {
|
|
154
|
+
style: ne({
|
|
155
|
+
color: (l == null ? void 0 : l.sort) !== "" ? "#00ADC3" : ""
|
|
156
|
+
}),
|
|
157
|
+
class: "rds-title-02"
|
|
158
|
+
}, O(l.text || ""), 5),
|
|
159
|
+
l.sortable ? (o(), ce(L, ie({
|
|
160
|
+
key: 0,
|
|
161
|
+
class: "table__header__icon sortable_icon",
|
|
162
|
+
ref_for: !0
|
|
163
|
+
}, I(l)), null, 16)) : d("", !0)
|
|
164
|
+
], 64))
|
|
165
|
+
], !0)
|
|
166
|
+
], 10, _e))), 128)),
|
|
167
|
+
$(r) && !e.hideSelectAll ? (o(), n("th", fe, [
|
|
168
|
+
i("input", {
|
|
169
|
+
id: "All",
|
|
170
|
+
class: "rds-checkbox table__checkbox",
|
|
171
|
+
type: "checkbox",
|
|
172
|
+
checked: f.value,
|
|
173
|
+
onClick: Z
|
|
174
|
+
}, null, 8, pe),
|
|
175
|
+
t[0] || (t[0] = i("label", {
|
|
176
|
+
for: "All",
|
|
177
|
+
class: "rds-checkbox__label rds-checkbox__label--no-text"
|
|
178
|
+
}, null, -1))
|
|
179
|
+
])) : d("", !0)
|
|
180
|
+
])
|
|
181
|
+
])),
|
|
182
|
+
i("tbody", {
|
|
183
|
+
class: b(J.value)
|
|
184
|
+
}, [
|
|
185
|
+
E(N, { name: "fade" }, {
|
|
186
|
+
default: V(() => [
|
|
187
|
+
e.loading ? (o(), n("div", ye, [
|
|
188
|
+
E(L, { name: "loading" })
|
|
189
|
+
])) : d("", !0)
|
|
190
|
+
]),
|
|
191
|
+
_: 1
|
|
192
|
+
}),
|
|
193
|
+
g.value.length !== 0 ? (o(!0), n(p, { key: 0 }, x(g.value, (l, a) => (o(), n(p, {
|
|
194
|
+
key: `row-${a}}`
|
|
195
|
+
}, [
|
|
196
|
+
i("tr", {
|
|
197
|
+
ref_for: !0,
|
|
198
|
+
ref: (s) => {
|
|
199
|
+
K.value[a] = s;
|
|
200
|
+
},
|
|
201
|
+
class: b(["table__group", [
|
|
202
|
+
{ "table__group--odd": a % 2 === 0 },
|
|
203
|
+
{ "table__group--is-open rds-background-grey": l.visible },
|
|
204
|
+
{ "table__group--expandible": l.expandible },
|
|
205
|
+
l.$class || ""
|
|
206
|
+
]]),
|
|
207
|
+
onClick: () => B(l)
|
|
208
|
+
}, [
|
|
209
|
+
(o(!0), n(p, null, x(m.value, (s, u) => (o(), n("td", {
|
|
210
|
+
key: `column-${u}`,
|
|
211
|
+
"column-key": u,
|
|
212
|
+
"data-cell": `data-cell-${s.key}`,
|
|
213
|
+
class: b(["table__cell rds-body-01", [
|
|
214
|
+
A(s),
|
|
215
|
+
{
|
|
216
|
+
"table__cell--shadow": s.sticky,
|
|
217
|
+
"table__cell--no-sticky": !s.sticky,
|
|
218
|
+
"table__cell--disabled": R(l, s.key)
|
|
219
|
+
},
|
|
220
|
+
l[`$${s.key}_class`] || ""
|
|
221
|
+
]])
|
|
222
|
+
}, [
|
|
223
|
+
h(e.$slots, `td-${s.key}`, {
|
|
224
|
+
value: l[s.key],
|
|
225
|
+
item: l
|
|
226
|
+
}, () => [
|
|
227
|
+
i("span", {
|
|
228
|
+
title: D(s.key, String(l[s.key] || ""), a)
|
|
229
|
+
}, O(D(s.key, String(l[s.key] || ""), a)), 9, he)
|
|
230
|
+
], !0)
|
|
231
|
+
], 10, ge))), 128)),
|
|
232
|
+
$(r) ? (o(), n("td", $e, [
|
|
233
|
+
h(e.$slots, "td-checkbox", { item: l }, () => [
|
|
234
|
+
i("input", {
|
|
235
|
+
id: `add-${a}-${l[$(r)]}`,
|
|
236
|
+
ref_for: !0,
|
|
237
|
+
ref: () => {
|
|
238
|
+
U.value[String(l[$(r)] || "")] = !0;
|
|
239
|
+
},
|
|
240
|
+
name: "checkbox-item",
|
|
241
|
+
class: "rds-checkbox",
|
|
242
|
+
checked: W(l) || f.value,
|
|
243
|
+
disabled: f.value,
|
|
244
|
+
type: "checkbox",
|
|
245
|
+
onClick: (s) => X(l)
|
|
246
|
+
}, null, 8, me),
|
|
247
|
+
i("label", {
|
|
248
|
+
for: `add-${a}-${l[$(r)]}`,
|
|
249
|
+
class: "rds-checkbox__label rds-checkbox__label--no-text"
|
|
250
|
+
}, null, 8, Ce)
|
|
251
|
+
], !0)
|
|
252
|
+
])) : d("", !0)
|
|
253
|
+
], 10, ve),
|
|
254
|
+
g.value[a].visible ? (o(), n("tr", {
|
|
255
|
+
key: 0,
|
|
256
|
+
class: b(["table__group table__group--dropdown", [
|
|
257
|
+
{
|
|
258
|
+
"table__group--odd": a % 2 === 0
|
|
259
|
+
}
|
|
260
|
+
]])
|
|
261
|
+
}, [
|
|
262
|
+
i("td", {
|
|
263
|
+
class: b(["table__cell table__group--dropdown rds-background-grey", {
|
|
264
|
+
"table__group--dropdown-disabled": l.status !== "ACTIVE",
|
|
265
|
+
"table__cell--table": !l.expandible
|
|
266
|
+
}]),
|
|
267
|
+
colspan: M(l).length
|
|
268
|
+
}, [
|
|
269
|
+
h(e.$slots, "expandible", { item: l }, void 0, !0)
|
|
270
|
+
], 10, Se)
|
|
271
|
+
], 2)) : d("", !0),
|
|
272
|
+
g.value[a].visible ? (o(), n("tr", {
|
|
273
|
+
key: 1,
|
|
274
|
+
class: "table__group--spacer",
|
|
275
|
+
colspan: M(l).length
|
|
276
|
+
}, null, 8, xe)) : d("", !0)
|
|
277
|
+
], 64))), 128)) : d("", !0)
|
|
278
|
+
], 2)
|
|
279
|
+
]),
|
|
280
|
+
E(N, { name: "fade" }, {
|
|
281
|
+
default: V(() => [
|
|
282
|
+
e.showEmptyState && !e.loading && g.value.length === 0 ? h(e.$slots, "empty", { key: 0 }, () => [
|
|
283
|
+
t[1] || (t[1] = i("p", { class: "rds-headline-03" }, " No hay datos para mostrar ", -1))
|
|
284
|
+
], !0) : d("", !0)
|
|
285
|
+
]),
|
|
286
|
+
_: 3
|
|
287
|
+
})
|
|
288
|
+
], 2));
|
|
289
|
+
}
|
|
290
|
+
}), He = /* @__PURE__ */ ue(Ee, [["__scopeId", "data-v-2f3d4308"]]);
|
|
291
|
+
export {
|
|
292
|
+
He as default
|
|
293
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as h, toRefs as x, computed as u, openBlock as o, createElementBlock as $, normalizeClass as r, unref as t, createBlock as p, createCommentVNode as d, createTextVNode as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as h, toRefs as x, computed as u, openBlock as o, createElementBlock as $, normalizeClass as r, unref as t, createBlock as p, createCommentVNode as d, createTextVNode as B, toDisplayString as S } from "vue";
|
|
2
|
+
import { I as f } from "./icon-svg-CeKfjk3j.js";
|
|
3
3
|
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/tag.css';const C = /* @__PURE__ */ h({
|
|
5
5
|
__name: "tag",
|
|
@@ -76,7 +76,7 @@ import './style/tag.css';const C = /* @__PURE__ */ h({
|
|
|
76
76
|
class: r(["rds-e-tag__icon", i.value]),
|
|
77
77
|
"aria-hidden": "true"
|
|
78
78
|
}, null, 8, ["name", "class"])) : d("", !0),
|
|
79
|
-
|
|
79
|
+
B(" " + S(t(_)) + " ", 1),
|
|
80
80
|
t(c) ? (o(), p(f, {
|
|
81
81
|
key: 1,
|
|
82
82
|
name: "arrow_right",
|
|
@@ -85,7 +85,7 @@ import './style/tag.css';const C = /* @__PURE__ */ h({
|
|
|
85
85
|
}, null, 8, ["class"])) : d("", !0)
|
|
86
86
|
], 2));
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
88
|
+
}), j = /* @__PURE__ */ k(C, [["__scopeId", "data-v-e784d437"]]);
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
j as default
|
|
91
91
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as G, mergeModels as J, useModel as K, toRefs as L, ref as O, computed as o, openBlock as s, createElementBlock as f, normalizeClass as h, createElementVNode as a, withDirectives as Q, unref as e, vModelText as W, renderSlot as y, createBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as G, mergeModels as J, useModel as K, toRefs as L, ref as O, computed as o, openBlock as s, createElementBlock as f, normalizeClass as h, createElementVNode as a, withDirectives as Q, unref as e, vModelText as W, renderSlot as y, createBlock as M, mergeProps as q, toHandlers as T, createCommentVNode as i, createTextVNode as X, toDisplayString as u } from "vue";
|
|
2
|
+
import { I as $ } from "./icon-svg-CeKfjk3j.js";
|
|
3
3
|
import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/textArea.css';function b(t, _ = !0, d = !0) {
|
|
5
5
|
return _ && !t.trim() ? (console.warn("Advertencia: El valor no puede estar vacío"), !1) : d && !/^[\w\-:]+$/.test(t) ? (console.warn("Advertencia: El valor contiene caracteres inválidos"), !1) : !0;
|
|
@@ -138,23 +138,23 @@ const Z = { class: "rds-e-textarea__container" }, ee = { class: "rds-e-textarea_
|
|
|
138
138
|
setup(t) {
|
|
139
139
|
const _ = t, d = K(t, "modelValue"), {
|
|
140
140
|
label: w,
|
|
141
|
-
id:
|
|
141
|
+
id: k,
|
|
142
142
|
disabled: p,
|
|
143
143
|
maxlength: m,
|
|
144
144
|
minlength: g,
|
|
145
145
|
modelValue: c,
|
|
146
146
|
icon: A,
|
|
147
|
-
rightIcon:
|
|
148
|
-
helper:
|
|
147
|
+
rightIcon: S,
|
|
148
|
+
helper: z,
|
|
149
149
|
error: x,
|
|
150
|
-
helperText:
|
|
150
|
+
helperText: D,
|
|
151
151
|
clearable: V,
|
|
152
|
-
lengthError:
|
|
153
|
-
} = L(_), v = O(!1),
|
|
152
|
+
lengthError: F
|
|
153
|
+
} = L(_), v = O(!1), P = () => {
|
|
154
154
|
v.value = !1;
|
|
155
|
-
},
|
|
155
|
+
}, j = () => {
|
|
156
156
|
v.value = !0;
|
|
157
|
-
}, B = o(() => c.value.length === m.value), E = o(() => c.value.length === 0 ? !1 : c.value.length < g.value), N = o(() =>
|
|
157
|
+
}, B = o(() => c.value.length === m.value), E = o(() => c.value.length === 0 ? !1 : c.value.length < g.value), N = o(() => F.value && (B.value || E.value)), H = o(() => {
|
|
158
158
|
const r = [];
|
|
159
159
|
return c.value && r.push("rds-e-textarea--filled"), x.value && r.push("rds-e-textarea--error"), p.value && r.push("rds-e-textarea--disabled"), N.value && r.push("rds-e-textarea--error"), r.join(" ");
|
|
160
160
|
}), l = o(() => {
|
|
@@ -167,7 +167,7 @@ const Z = { class: "rds-e-textarea__container" }, ee = { class: "rds-e-textarea_
|
|
|
167
167
|
}
|
|
168
168
|
}, n = {
|
|
169
169
|
left: { ...r },
|
|
170
|
-
right: { ...r, name:
|
|
170
|
+
right: { ...r, name: S.value }
|
|
171
171
|
};
|
|
172
172
|
return V.value && (n.right = {
|
|
173
173
|
...r,
|
|
@@ -177,16 +177,16 @@ const Z = { class: "rds-e-textarea__container" }, ee = { class: "rds-e-textarea_
|
|
|
177
177
|
click: () => d.value = ""
|
|
178
178
|
}
|
|
179
179
|
}), n;
|
|
180
|
-
}),
|
|
180
|
+
}), R = o(() => c.value.length);
|
|
181
181
|
return (r, n) => {
|
|
182
|
-
var C,
|
|
182
|
+
var C, I;
|
|
183
183
|
return s(), f("div", {
|
|
184
|
-
class: h(["rds-e-textarea",
|
|
184
|
+
class: h(["rds-e-textarea", H.value])
|
|
185
185
|
}, [
|
|
186
186
|
a("div", Z, [
|
|
187
187
|
a("div", ee, [
|
|
188
188
|
Q(a("textarea", {
|
|
189
|
-
id: (C = e(
|
|
189
|
+
id: (C = e(k)) == null ? void 0 : C.toString(),
|
|
190
190
|
"onUpdate:modelValue": n[0] || (n[0] = (U) => d.value = U),
|
|
191
191
|
type: "text",
|
|
192
192
|
class: h(["rds-e-textarea__input", { "rds-e-textarea__input--active": v.value }]),
|
|
@@ -195,8 +195,8 @@ const Z = { class: "rds-e-textarea__container" }, ee = { class: "rds-e-textarea_
|
|
|
195
195
|
minlength: e(g),
|
|
196
196
|
rows: t.rows,
|
|
197
197
|
disabled: e(p),
|
|
198
|
-
onBlur:
|
|
199
|
-
onFocus:
|
|
198
|
+
onBlur: P,
|
|
199
|
+
onFocus: j
|
|
200
200
|
}, null, 42, te), [
|
|
201
201
|
[W, d.value]
|
|
202
202
|
]),
|
|
@@ -216,14 +216,14 @@ const Z = { class: "rds-e-textarea__container" }, ee = { class: "rds-e-textarea_
|
|
|
216
216
|
])
|
|
217
217
|
], -1)),
|
|
218
218
|
a("label", {
|
|
219
|
-
for: (
|
|
219
|
+
for: (I = e(k)) == null ? void 0 : I.toString(),
|
|
220
220
|
class: h(["rds-e-textarea__label", {
|
|
221
221
|
"rds-e-textarea__label--with-icon": l.value.left.name,
|
|
222
222
|
"rds-e-textarea__label--active": v.value
|
|
223
223
|
}])
|
|
224
224
|
}, [
|
|
225
225
|
y(r.$slots, "left-icon", {}, () => [
|
|
226
|
-
l.value.left.name ? (s(),
|
|
226
|
+
l.value.left.name ? (s(), M($, q({
|
|
227
227
|
key: 0,
|
|
228
228
|
class: ["rds-e-textarea__icon rds-e-textarea__icon--left", { "rds-e-textarea__icon--hidden": v.value }],
|
|
229
229
|
"aria-hidden": "true"
|
|
@@ -237,9 +237,9 @@ const Z = { class: "rds-e-textarea__container" }, ee = { class: "rds-e-textarea_
|
|
|
237
237
|
"rds-e-textarea__counter--clearable": e(V)
|
|
238
238
|
}])
|
|
239
239
|
}, [
|
|
240
|
-
t.counter && !e(
|
|
240
|
+
t.counter && !e(S) ? (s(), f("p", ae, u(R.value) + "/" + u(e(m)), 1)) : i("", !0),
|
|
241
241
|
y(r.$slots, "right-icon", {}, () => [
|
|
242
|
-
l.value.right.name && !l.value.left.name ? (s(),
|
|
242
|
+
l.value.right.name && !l.value.left.name ? (s(), M($, q({
|
|
243
243
|
key: 0,
|
|
244
244
|
class: "rds-e-textarea__icon rds-e-textarea__icon--right",
|
|
245
245
|
"aria-hidden": "true"
|
|
@@ -255,7 +255,7 @@ const Z = { class: "rds-e-textarea__container" }, ee = { class: "rds-e-textarea_
|
|
|
255
255
|
E.value ? (s(), f("li", ne, " Min text length is " + u(e(g)), 1)) : i("", !0),
|
|
256
256
|
a("li", null, [
|
|
257
257
|
y(r.$slots, "helper-text", {}, () => [
|
|
258
|
-
e(
|
|
258
|
+
e(z) || e(x) ? (s(), f("span", se, u(e(D)), 1)) : i("", !0)
|
|
259
259
|
], !0)
|
|
260
260
|
])
|
|
261
261
|
], 2)
|