energy-components 1.6.0-beta.0 → 1.6.0-beta.1
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 +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/dropdown.es.js +1 -1
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/{icon-svg-CeKfjk3j.js → icon-svg-pUb3-FXk.js} +699 -669
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/infoBox.es.js +46 -31
- package/dist/components/link.es.js +1 -1
- package/dist/components/modal.es.js +1 -1
- package/dist/components/persistentToast.es.js +30 -24
- 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/infoBox.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/style/tableslotedcomponent.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 +42 -41
- package/dist/components/tableslotedcomponent.es.js +29 -27
- package/dist/components/tag.es.js +1 -1
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/energy-components.es.js +1771 -1717
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +20 -1
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
2
|
-
import { I as L } from "./icon-svg-
|
|
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 c, 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-pUb3-FXk.js";
|
|
3
3
|
import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-header", "onClick"], be = ["id", "checked", "onClick"], ke = ["for"], fe = {
|
|
5
5
|
key: 0,
|
|
@@ -32,18 +32,18 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["selectAll", "onClickCheckbox", "onItemExpansion", "onHeaderSort"],
|
|
34
34
|
setup(j, { expose: z, emit: F }) {
|
|
35
|
-
const
|
|
35
|
+
const i = j, y = F, { item: k, listChecked: P, selectableKey: r } = le(i), S = te(), q = _(), v = _([]), m = _([]), K = _([]), U = _({}), f = _(!1), Y = _(!0), G = C(() => {
|
|
36
36
|
const e = "table";
|
|
37
37
|
let t = e;
|
|
38
|
-
return t = `${t} ${e}--${
|
|
38
|
+
return t = `${t} ${e}--${i.variant}`, i.condensed && (t = `${t} ${e}--condensed`), t;
|
|
39
39
|
}), J = C(() => {
|
|
40
40
|
const e = "table__body";
|
|
41
41
|
let t = e;
|
|
42
|
-
return t = `${t} ${e}--${
|
|
43
|
-
}), Q = C(() =>
|
|
42
|
+
return t = `${t} ${e}--${i.variant}`, i.condensed && (t = `${t} ${e}--condensed`), t;
|
|
43
|
+
}), Q = C(() => i.mockItems ? Array.from({ length: i.mockItems }, () => ({
|
|
44
44
|
expandible: !1,
|
|
45
45
|
visible: !1
|
|
46
|
-
})) : []), g = C(() =>
|
|
46
|
+
})) : []), g = C(() => i.loading && v.value.length === 0 ? Q.value : v.value), W = (e) => {
|
|
47
47
|
if (r != null && r.value) {
|
|
48
48
|
const t = e[r.value];
|
|
49
49
|
return P.value.includes(t);
|
|
@@ -53,9 +53,9 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
53
53
|
r != null && r.value && y("onClickCheckbox", String(e[r.value]));
|
|
54
54
|
}, B = async (e, t = !1) => {
|
|
55
55
|
var l;
|
|
56
|
-
e.expandible && (
|
|
56
|
+
e.expandible && (i.isMobileDevice || (e.visible = !e.visible), y("onItemExpansion", {
|
|
57
57
|
...e,
|
|
58
|
-
isMobileDevice:
|
|
58
|
+
isMobileDevice: i.isMobileDevice
|
|
59
59
|
}), t && (await re(), (l = document.querySelector(".table__group--is-open")) == null || l.scrollIntoView({ behavior: "smooth" })));
|
|
60
60
|
}, Z = (e) => {
|
|
61
61
|
f.value = e.target.checked, y("selectAll", f.value);
|
|
@@ -98,16 +98,16 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
98
98
|
}, T = (e = !1) => {
|
|
99
99
|
Y.value = !e, m.value = [
|
|
100
100
|
...k.value.header.map((t) => ("sort" in t || Object.assign(t, { sort: "" }), t))
|
|
101
|
-
], H(e), f.value =
|
|
101
|
+
], H(e), f.value = i.checkedAll;
|
|
102
102
|
};
|
|
103
103
|
T();
|
|
104
104
|
const M = (e) => Object.keys(e);
|
|
105
105
|
return se(() => {
|
|
106
106
|
var e;
|
|
107
|
-
T(!0), (e =
|
|
107
|
+
T(!0), (e = i.itemsExpanded) != null && e.length && i.itemsExpanded.forEach((t) => {
|
|
108
108
|
k.value.items[t] && B(k.value.items[t], !0);
|
|
109
109
|
});
|
|
110
|
-
}), ae(() =>
|
|
110
|
+
}), ae(() => i.isMobileDevice, () => {
|
|
111
111
|
v.value = [...k.value.items].map((e) => ({
|
|
112
112
|
...e,
|
|
113
113
|
visible: !1
|
|
@@ -120,9 +120,9 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
120
120
|
}), (e, t) => (o(), n("div", {
|
|
121
121
|
class: b(["table__container", G.value])
|
|
122
122
|
}, [
|
|
123
|
-
|
|
123
|
+
c("table", null, [
|
|
124
124
|
e.hideHeaders ? d("", !0) : (o(), n("thead", de, [
|
|
125
|
-
|
|
125
|
+
c("tr", null, [
|
|
126
126
|
(o(!0), n(p, null, x(m.value, (l, a) => (o(), n("th", {
|
|
127
127
|
key: `header-${a}`,
|
|
128
128
|
"data-header": `data-header-${l.key}`,
|
|
@@ -138,19 +138,19 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
138
138
|
}, [
|
|
139
139
|
h(e.$slots, `header-${l.key}`, { item: l }, () => [
|
|
140
140
|
l.type === "selectAll" ? (o(), n(p, { key: 0 }, [
|
|
141
|
-
|
|
141
|
+
c("input", {
|
|
142
142
|
id: `checkbox_${l.key}`,
|
|
143
143
|
class: "rds-checkbox",
|
|
144
144
|
type: "checkbox",
|
|
145
145
|
checked: l.allSelected,
|
|
146
146
|
onClick: l.callback
|
|
147
147
|
}, null, 8, be),
|
|
148
|
-
|
|
148
|
+
c("label", {
|
|
149
149
|
for: `checkbox_${l.key}`,
|
|
150
150
|
class: "rds-checkbox__label"
|
|
151
151
|
}, null, 8, ke)
|
|
152
152
|
], 64)) : (o(), n(p, { key: 1 }, [
|
|
153
|
-
|
|
153
|
+
c("span", {
|
|
154
154
|
style: ne({
|
|
155
155
|
color: (l == null ? void 0 : l.sort) !== "" ? "#00ADC3" : ""
|
|
156
156
|
}),
|
|
@@ -165,21 +165,21 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
165
165
|
], !0)
|
|
166
166
|
], 10, _e))), 128)),
|
|
167
167
|
$(r) && !e.hideSelectAll ? (o(), n("th", fe, [
|
|
168
|
-
|
|
168
|
+
c("input", {
|
|
169
169
|
id: "All",
|
|
170
170
|
class: "rds-checkbox table__checkbox",
|
|
171
171
|
type: "checkbox",
|
|
172
172
|
checked: f.value,
|
|
173
173
|
onClick: Z
|
|
174
174
|
}, null, 8, pe),
|
|
175
|
-
t[0] || (t[0] =
|
|
175
|
+
t[0] || (t[0] = c("label", {
|
|
176
176
|
for: "All",
|
|
177
177
|
class: "rds-checkbox__label rds-checkbox__label--no-text"
|
|
178
178
|
}, null, -1))
|
|
179
179
|
])) : d("", !0)
|
|
180
180
|
])
|
|
181
181
|
])),
|
|
182
|
-
|
|
182
|
+
c("tbody", {
|
|
183
183
|
class: b(J.value)
|
|
184
184
|
}, [
|
|
185
185
|
E(N, { name: "fade" }, {
|
|
@@ -193,7 +193,7 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
193
193
|
g.value.length !== 0 ? (o(!0), n(p, { key: 0 }, x(g.value, (l, a) => (o(), n(p, {
|
|
194
194
|
key: `row-${a}}`
|
|
195
195
|
}, [
|
|
196
|
-
|
|
196
|
+
c("tr", {
|
|
197
197
|
ref_for: !0,
|
|
198
198
|
ref: (s) => {
|
|
199
199
|
K.value[a] = s;
|
|
@@ -224,14 +224,14 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
224
224
|
value: l[s.key],
|
|
225
225
|
item: l
|
|
226
226
|
}, () => [
|
|
227
|
-
|
|
227
|
+
c("span", {
|
|
228
228
|
title: D(s.key, String(l[s.key] || ""), a)
|
|
229
229
|
}, O(D(s.key, String(l[s.key] || ""), a)), 9, he)
|
|
230
230
|
], !0)
|
|
231
231
|
], 10, ge))), 128)),
|
|
232
232
|
$(r) ? (o(), n("td", $e, [
|
|
233
233
|
h(e.$slots, "td-checkbox", { item: l }, () => [
|
|
234
|
-
|
|
234
|
+
c("input", {
|
|
235
235
|
id: `add-${a}-${l[$(r)]}`,
|
|
236
236
|
ref_for: !0,
|
|
237
237
|
ref: () => {
|
|
@@ -244,7 +244,7 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
244
244
|
type: "checkbox",
|
|
245
245
|
onClick: (s) => X(l)
|
|
246
246
|
}, null, 8, me),
|
|
247
|
-
|
|
247
|
+
c("label", {
|
|
248
248
|
for: `add-${a}-${l[$(r)]}`,
|
|
249
249
|
class: "rds-checkbox__label rds-checkbox__label--no-text"
|
|
250
250
|
}, null, 8, Ce)
|
|
@@ -259,7 +259,7 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
259
259
|
}
|
|
260
260
|
]])
|
|
261
261
|
}, [
|
|
262
|
-
|
|
262
|
+
c("td", {
|
|
263
263
|
class: b(["table__cell table__group--dropdown rds-background-grey", {
|
|
264
264
|
"table__group--dropdown-disabled": l.status !== "ACTIVE",
|
|
265
265
|
"table__cell--table": !l.expandible
|
|
@@ -280,14 +280,16 @@ import './style/tableslotedcomponent.css';const de = { key: 0 }, _e = ["data-hea
|
|
|
280
280
|
E(N, { name: "fade" }, {
|
|
281
281
|
default: V(() => [
|
|
282
282
|
e.showEmptyState && !e.loading && g.value.length === 0 ? h(e.$slots, "empty", { key: 0 }, () => [
|
|
283
|
-
t[1] || (t[1] =
|
|
283
|
+
t[1] || (t[1] = c("div", { class: "table__empty-state" }, [
|
|
284
|
+
c("h3", { class: "rds-title-02" }, " No hay elementos a mostrar. ")
|
|
285
|
+
], -1))
|
|
284
286
|
], !0) : d("", !0)
|
|
285
287
|
]),
|
|
286
288
|
_: 3
|
|
287
289
|
})
|
|
288
290
|
], 2));
|
|
289
291
|
}
|
|
290
|
-
}), He = /* @__PURE__ */ ue(Ee, [["__scopeId", "data-v-
|
|
292
|
+
}), He = /* @__PURE__ */ ue(Ee, [["__scopeId", "data-v-d7f3beaa"]]);
|
|
291
293
|
export {
|
|
292
294
|
He as default
|
|
293
295
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { I as f } from "./icon-svg-pUb3-FXk.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",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { I as $ } from "./icon-svg-pUb3-FXk.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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as O, toRefs as Q, ref as S, computed as d, watch as W, openBlock as u, createElementBlock as g, normalizeClass as y, createElementVNode as c, renderSlot as x, createBlock as N, mergeProps as V, toHandlers as X, createCommentVNode as p, unref as t, toDisplayString as B, withModifiers as Y } from "vue";
|
|
2
2
|
import { g as Z } from "./getInstance-GhoEcxLF.js";
|
|
3
|
-
import { I, s as ee } from "./icon-svg-
|
|
3
|
+
import { I, s as ee } from "./icon-svg-pUb3-FXk.js";
|
|
4
4
|
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/textField.css';const le = { class: "rds-e-textfield__container" }, ne = { class: "rds-e-textfield__input-container" }, oe = ["id", "type", "maxLength", "minLength", "disabled", "value", "autocomplete", "readonly"], ae = ["for"], re = {
|
|
6
6
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unref as at, defineComponent as Vt, toRefs as Ft, ref as U, computed as Ht, openBlock as bt, createElementBlock as vt, createElementVNode as Z, renderSlot as jt, normalizeClass as At, toDisplayString as Ct, createVNode as It, createCommentVNode as Yt } from "vue";
|
|
2
|
-
import { I as zt } from "./icon-svg-
|
|
2
|
+
import { I as zt } from "./icon-svg-pUb3-FXk.js";
|
|
3
3
|
import { _ as Xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/tooltip.css';const Y = Math.min, O = Math.max, nt = Math.round, k = (t) => ({
|
|
5
5
|
x: t,
|