energy-components 1.6.0-beta.1 → 1.6.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 +278 -148
- package/dist/components/filterChip.es.js +4 -4
- package/dist/components/{icon-svg-pUb3-FXk.js → icon-svg-DGp2yHJn.js} +1 -1
- package/dist/components/iconList.es.js +5 -5
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +62 -59
- package/dist/components/infoBox.es.js +17 -17
- package/dist/components/link.es.js +15 -15
- package/dist/components/modal.es.js +69 -39
- package/dist/components/multiselect.es.js +230 -184
- package/dist/components/multiselectcontentwrapper.es.js +140 -0
- package/dist/components/pagination.es.js +118 -86
- package/dist/components/persistentToast.es.js +9 -9
- 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 +36 -28
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.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 -0
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- 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 +55 -53
- package/dist/components/tableslotedcomponent.es.js +155 -148
- package/dist/components/tag.es.js +5 -5
- package/dist/components/textArea.es.js +22 -22
- package/dist/components/textField.es.js +93 -84
- package/dist/components/tooltip.es.js +61 -61
- package/dist/energy-components.es.js +6576 -6073
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +86 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +582 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +10 -3
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +63 -31
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +27 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as y, mergeModels as c, useModel as g, ref as r, onMounted as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as y, mergeModels as c, useModel as g, ref as r, onMounted as S, onBeforeUnmount as B, openBlock as d, createElementBlock as u, normalizeClass as V, createElementVNode as m, renderSlot as p, createTextVNode as x, toDisplayString as E, createBlock as _, createCommentVNode as f } from "vue";
|
|
2
|
+
import { R as C } from "./icon-svg-DGp2yHJn.js";
|
|
3
3
|
import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/switch.css';const N = ["id", "disabled", "checked"],
|
|
4
|
+
import './style/switch.css';const N = ["id", "disabled", "checked"], D = ["for", "aria-label"], L = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "rds-e-switch__label-text"
|
|
7
|
-
},
|
|
7
|
+
}, F = /* @__PURE__ */ y({
|
|
8
8
|
__name: "switch",
|
|
9
9
|
props: /* @__PURE__ */ c({
|
|
10
10
|
/**
|
|
@@ -58,9 +58,9 @@ import './style/switch.css';const N = ["id", "disabled", "checked"], L = ["for",
|
|
|
58
58
|
const n = t.target.checked;
|
|
59
59
|
a.value = n, w("update:checked", n);
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return S(() => {
|
|
62
62
|
window.addEventListener("keydown", s), window.addEventListener("mousedown", i);
|
|
63
|
-
}),
|
|
63
|
+
}), B(() => {
|
|
64
64
|
window.removeEventListener("keydown", s), window.removeEventListener("mousedown", i);
|
|
65
65
|
}), (t, n) => (d(), u("div", {
|
|
66
66
|
class: V(["rds-e-switch", { "rds-e-switch--focused": l.value }])
|
|
@@ -80,7 +80,7 @@ import './style/switch.css';const N = ["id", "disabled", "checked"], L = ["for",
|
|
|
80
80
|
for: e.id.toString(),
|
|
81
81
|
"aria-label": e.label
|
|
82
82
|
}, [
|
|
83
|
-
e.label || t.$slots["text-label"] ? (d(), u("span",
|
|
83
|
+
e.label || t.$slots["text-label"] ? (d(), u("span", L, [
|
|
84
84
|
p(t.$slots, "text-label", {}, () => [
|
|
85
85
|
x(E(e.label), 1)
|
|
86
86
|
], !0),
|
|
@@ -91,10 +91,10 @@ import './style/switch.css';const N = ["id", "disabled", "checked"], L = ["for",
|
|
|
91
91
|
"aria-hidden": "true"
|
|
92
92
|
}, null, 8, ["name"])) : f("", !0)
|
|
93
93
|
])) : f("", !0)
|
|
94
|
-
], 8,
|
|
94
|
+
], 8, D)
|
|
95
95
|
], 2));
|
|
96
96
|
}
|
|
97
|
-
}),
|
|
97
|
+
}), T = /* @__PURE__ */ M(F, [["__scopeId", "data-v-be80169d"]]);
|
|
98
98
|
export {
|
|
99
|
-
|
|
99
|
+
T as default
|
|
100
100
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as N, mergeModels as B, toRefs as W, useModel as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as N, mergeModels as B, toRefs as W, useModel as D, ref as m, computed as h, onMounted as K, nextTick as $, onUnmounted as F, watch as L, openBlock as s, createElementBlock as d, normalizeClass as u, createVNode as R, createCommentVNode as g, createElementVNode as f, Fragment as q, renderList as H, unref as O, withKeys as S, withModifiers as V, createBlock as P, createTextVNode as U, toDisplayString as j, renderSlot as G } from "vue";
|
|
2
|
+
import { R as w } from "./icon-svg-DGp2yHJn.js";
|
|
3
3
|
import { d as J } from "./functions-DIHwdgF0.js";
|
|
4
4
|
import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "onKeydown"], Y = { class: "rds-e-top-bar__item-title" }, Z = {
|
|
@@ -62,9 +62,9 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
62
62
|
}),
|
|
63
63
|
emits: /* @__PURE__ */ B(["activeTabChanged"], ["update:activeTab"]),
|
|
64
64
|
setup(o, { emit: v }) {
|
|
65
|
-
const i = o,
|
|
65
|
+
const i = o, A = v, {
|
|
66
66
|
options: r
|
|
67
|
-
} = W(i),
|
|
67
|
+
} = W(i), M = D(o, "activeTab"), a = m(""), b = m(null), l = m(null);
|
|
68
68
|
let p = [];
|
|
69
69
|
const y = h(() => l.value ? l.value.scrollWidth > l.value.clientWidth : !1), z = h(() => r.value.findIndex((t) => t.id === a.value) > 0 && y.value), E = h(() => l.value ? r.value.findIndex((t) => t.id === a.value) < i.options.length - 1 && y.value : !1), k = (e) => {
|
|
70
70
|
const t = i.options.find((n) => n.id === a.value);
|
|
@@ -92,15 +92,15 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
92
92
|
const C = () => {
|
|
93
93
|
T(a.value);
|
|
94
94
|
};
|
|
95
|
-
return
|
|
96
|
-
await
|
|
95
|
+
return K(async () => {
|
|
96
|
+
await $(), b.value && (p = Array.from(
|
|
97
97
|
b.value.children
|
|
98
98
|
)), a.value = i.options[0].id ?? "", window.addEventListener("resize", J(C, 200));
|
|
99
99
|
}), F(() => {
|
|
100
100
|
window.removeEventListener("resize", C);
|
|
101
101
|
}), L(a, (e) => {
|
|
102
|
-
T(e),
|
|
103
|
-
}), L(
|
|
102
|
+
T(e), A("activeTabChanged", k(!1));
|
|
103
|
+
}), L(M, (e) => c(e)), (e, t) => (s(), d("div", {
|
|
104
104
|
class: u(["rds-e-top-bar", {
|
|
105
105
|
"rds-e-top-bar--fluid": o.fluid,
|
|
106
106
|
"rds-e-top-bar--divider": o.divider
|
|
@@ -114,7 +114,7 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
114
114
|
]),
|
|
115
115
|
onClick: x
|
|
116
116
|
}, [
|
|
117
|
-
|
|
117
|
+
R(w, {
|
|
118
118
|
class: "rds-e-top-bar__icon",
|
|
119
119
|
name: "arrow_left"
|
|
120
120
|
})
|
|
@@ -140,8 +140,8 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
140
140
|
tabindex: a.value === n.id ? 0 : -1,
|
|
141
141
|
onClick: (te) => c(n.id),
|
|
142
142
|
onKeydown: [
|
|
143
|
-
V(
|
|
144
|
-
V(
|
|
143
|
+
S(V(x, ["prevent"]), ["left"]),
|
|
144
|
+
S(V(I, ["prevent"]), ["right"])
|
|
145
145
|
]
|
|
146
146
|
}, [
|
|
147
147
|
f("span", Y, [
|
|
@@ -163,7 +163,7 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
163
163
|
]),
|
|
164
164
|
onClick: I
|
|
165
165
|
}, [
|
|
166
|
-
|
|
166
|
+
R(w, {
|
|
167
167
|
class: "rds-e-top-bar__icon",
|
|
168
168
|
name: "arrow_right"
|
|
169
169
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as H, toRefs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as H, toRefs as M, ref as i, watch as N, watchEffect as V, openBlock as u, createElementBlock as g, Fragment as K, renderList as v, unref as k, renderSlot as h, createBlock as z, mergeProps as F, createSlots as S, withCtx as B, normalizeProps as C, guardReactiveProps as w, withDirectives as q, createVNode as G, vShow as J } from "vue";
|
|
2
|
+
import Q from "./tableslotedcomponent.es.js";
|
|
3
|
+
import U from "./pagination.es.js";
|
|
4
4
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated__container" }, Y = /* @__PURE__ */ H({
|
|
6
6
|
__name: "TablePaginatedComponent",
|
|
@@ -28,21 +28,21 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
28
28
|
asynchrone: { type: Boolean, default: !0 },
|
|
29
29
|
jumpTo: { type: Boolean, default: !1 }
|
|
30
30
|
},
|
|
31
|
-
emits: ["
|
|
32
|
-
setup(
|
|
33
|
-
const t =
|
|
31
|
+
emits: ["update:options", "update:reset", "update:selection", "update:selectedAll", "update:sort", "onItemExpansion"],
|
|
32
|
+
setup(A, { expose: E, emit: _ }) {
|
|
33
|
+
const t = A, s = _, {
|
|
34
34
|
loading: I,
|
|
35
|
-
items:
|
|
36
|
-
selectableKey:
|
|
37
|
-
header:
|
|
35
|
+
items: d,
|
|
36
|
+
selectableKey: $,
|
|
37
|
+
header: D,
|
|
38
38
|
asynchrone: P
|
|
39
|
-
} =
|
|
39
|
+
} = M(t), c = i(), p = i([]), o = i([]), y = i({
|
|
40
40
|
item: {
|
|
41
|
-
header:
|
|
42
|
-
items:
|
|
41
|
+
header: D,
|
|
42
|
+
items: p
|
|
43
43
|
},
|
|
44
|
-
selectableKey:
|
|
45
|
-
listChecked:
|
|
44
|
+
selectableKey: $,
|
|
45
|
+
listChecked: o,
|
|
46
46
|
checkedAll: t.checkedAll,
|
|
47
47
|
initChecked: [],
|
|
48
48
|
variant: t.variant,
|
|
@@ -52,65 +52,66 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
52
52
|
hideSelectAll: t.hideSelectAll,
|
|
53
53
|
showEmptyState: t.showEmptyState,
|
|
54
54
|
mockItems: t.itemsPerPage[0]
|
|
55
|
-
}), b =
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
p.value
|
|
55
|
+
}), b = i(null), m = i(1), r = i(), O = () => {
|
|
56
|
+
p.value = [], m.value = 1, r.value = void 0, s("update:reset");
|
|
57
|
+
}, T = () => {
|
|
58
|
+
p.value = d.value;
|
|
59
59
|
}, j = (e) => {
|
|
60
60
|
const a = {};
|
|
61
61
|
if ("pagination" in e) {
|
|
62
|
-
e.pagination
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const n = e.pagination;
|
|
63
|
+
n.reset && O();
|
|
64
|
+
let l = !1;
|
|
65
|
+
r.value = n, (n.page ?? 0) > m.value && (m.value = n.page ?? 0, l = !0), r.value && (r.value.isNewPage = l);
|
|
65
66
|
}
|
|
66
|
-
Object.assign(a,
|
|
67
|
+
r.value && Object.assign(a, r.value), c.value && c.value.clearVisibleDetails(), s("update:options", a);
|
|
67
68
|
}, x = (e) => {
|
|
68
|
-
const a =
|
|
69
|
-
a > -1 ?
|
|
69
|
+
const a = o.value.indexOf(e);
|
|
70
|
+
a > -1 ? o.value.splice(a, 1) : o.value.push(e), s("update:selection", o.value);
|
|
70
71
|
}, L = () => {
|
|
71
72
|
var e;
|
|
72
73
|
(e = b.value) == null || e.resetPagination();
|
|
73
74
|
}, R = (e) => {
|
|
74
|
-
e && (
|
|
75
|
+
e && (o.value = []), y.value.checkedAll = e, s("update:selectedAll", e);
|
|
75
76
|
};
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
}),
|
|
79
|
-
if (!P.value &&
|
|
77
|
+
return o.value = [...t.initChecked], P.value || (p.value = d.value), N(d, () => {
|
|
78
|
+
T();
|
|
79
|
+
}, { deep: !0 }), V(() => {
|
|
80
|
+
if (!P.value && d.value.length >= 0) {
|
|
80
81
|
const e = (t.activePage - 1) * t.itemsPerPage[0], a = e + t.itemsPerPage[0];
|
|
81
|
-
|
|
82
|
+
p.value = d.value.slice(e, a);
|
|
82
83
|
}
|
|
83
|
-
}),
|
|
84
|
+
}), E({
|
|
84
85
|
/** Fuerza a refrescar la paginacion y la tabla */
|
|
85
86
|
$reset: L
|
|
86
|
-
}), (e, a) => (
|
|
87
|
-
e.$slots.mobile && e.isMobileDevice ? (
|
|
88
|
-
key: `mobile-${
|
|
87
|
+
}), (e, a) => (u(), g("div", X, [
|
|
88
|
+
e.$slots.mobile && e.isMobileDevice ? (u(!0), g(K, { key: 0 }, v(k(d), (n, l) => (u(), g("div", {
|
|
89
|
+
key: `mobile-${l}`,
|
|
89
90
|
class: "table_paginted__mobile_item"
|
|
90
91
|
}, [
|
|
91
|
-
|
|
92
|
-
]))), 128)) : (
|
|
92
|
+
h(e.$slots, "mobile", { item: n }, void 0, !0)
|
|
93
|
+
]))), 128)) : (u(), z(Q, F({
|
|
93
94
|
key: 1,
|
|
94
95
|
ref_key: "tableSloted",
|
|
95
|
-
ref:
|
|
96
|
+
ref: c,
|
|
96
97
|
class: "mb-5"
|
|
97
98
|
}, y.value, {
|
|
98
|
-
loading:
|
|
99
|
+
loading: k(I),
|
|
99
100
|
"is-mobile-device": e.isMobileDevice,
|
|
100
101
|
"items-expanded": e.itemsExpanded,
|
|
101
102
|
onOnClickCheckbox: x,
|
|
102
103
|
onSelectAll: R,
|
|
103
|
-
onOnItemExpansion: a[0] || (a[0] = (n) =>
|
|
104
|
-
onOnHeaderSort: a[1] || (a[1] = (n) =>
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
-
name:
|
|
108
|
-
fn:
|
|
109
|
-
|
|
104
|
+
onOnItemExpansion: a[0] || (a[0] = (n) => s("onItemExpansion", n)),
|
|
105
|
+
onOnHeaderSort: a[1] || (a[1] = (n) => s("update:sort", n))
|
|
106
|
+
}), S({ _: 2 }, [
|
|
107
|
+
v(e.$slots, (n, l) => ({
|
|
108
|
+
name: l,
|
|
109
|
+
fn: B((f) => [
|
|
110
|
+
h(e.$slots, l, C(w(f || {})), void 0, !0)
|
|
110
111
|
])
|
|
111
112
|
}))
|
|
112
113
|
]), 1040, ["loading", "is-mobile-device", "items-expanded"])),
|
|
113
|
-
|
|
114
|
+
q(G(U, {
|
|
114
115
|
ref_key: "paginationComponentRef",
|
|
115
116
|
ref: b,
|
|
116
117
|
class: "rds-mt-16",
|
|
@@ -119,20 +120,21 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
119
120
|
"items-per-page": t.itemsPerPage[0],
|
|
120
121
|
"hide-leyend": t.hideLeyend,
|
|
121
122
|
"jump-to": t.jumpTo,
|
|
123
|
+
selected: !0,
|
|
122
124
|
onPageChanged: a[2] || (a[2] = (n) => j({ pagination: n }))
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
name:
|
|
126
|
-
fn:
|
|
127
|
-
|
|
125
|
+
}, S({ _: 2 }, [
|
|
126
|
+
v(e.$slots, (n, l) => ({
|
|
127
|
+
name: l,
|
|
128
|
+
fn: B((f) => [
|
|
129
|
+
h(e.$slots, l, C(w(f || {})), void 0, !0)
|
|
128
130
|
])
|
|
129
131
|
}))
|
|
130
132
|
]), 1032, ["total-items", "current-page", "items-per-page", "hide-leyend", "jump-to"]), [
|
|
131
|
-
[
|
|
133
|
+
[J, !e.hidePagination]
|
|
132
134
|
])
|
|
133
135
|
]));
|
|
134
136
|
}
|
|
135
|
-
}), ne = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-
|
|
137
|
+
}), ne = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-4d909f61"]]);
|
|
136
138
|
export {
|
|
137
139
|
ne as default
|
|
138
140
|
};
|