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,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as R, toRefs as D, computed as i, createBlock as d, openBlock as l, resolveDynamicComponent as E, unref as t, normalizeClass as I, withCtx as j, renderSlot as u, createElementVNode as m, createCommentVNode as k, createElementBlock as N, normalizeStyle as y, toDisplayString as O } from "vue";
|
|
2
|
+
import { s as T } from "./functions-D3GA3OzJ.js";
|
|
3
|
+
import { I as h } from "./icon-svg-DxlNo61Q.js";
|
|
4
|
+
import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/directAccess.css';const q = { class: "rds-e-direct-access__artwork-container" }, A = ["src", "alt", "aria-hidden"], M = { class: "rds-e-direct-access__text-container" }, U = { class: "rds-e-direct-access__text" }, F = /* @__PURE__ */ R({
|
|
5
6
|
__name: "direct-access",
|
|
6
7
|
props: {
|
|
7
8
|
/**
|
|
@@ -19,7 +20,7 @@ import './style/directAccess.css';const A = { class: "rds-e-direct-access__artwo
|
|
|
19
20
|
layout: {
|
|
20
21
|
type: String,
|
|
21
22
|
default: "horizontal",
|
|
22
|
-
validator: (
|
|
23
|
+
validator: (o) => ["horizontal", "vertical"].includes(o)
|
|
23
24
|
},
|
|
24
25
|
/**
|
|
25
26
|
* Objeto para configurar el arte gráfico (icono o microilustración).
|
|
@@ -78,77 +79,71 @@ import './style/directAccess.css';const A = { class: "rds-e-direct-access__artwo
|
|
|
78
79
|
}
|
|
79
80
|
},
|
|
80
81
|
emits: ["click"],
|
|
81
|
-
setup(
|
|
82
|
-
const
|
|
82
|
+
setup(o, { emit: w }) {
|
|
83
|
+
const b = o, g = w, { text: p, layout: S, disabled: c, arrow: f, artwork: a, ariaLabel: z, linkTo: r, useRouterLink: x } = D(b), C = i(() => [
|
|
83
84
|
"rds-e-direct-access",
|
|
84
|
-
`rds-e-direct-access--${
|
|
85
|
+
`rds-e-direct-access--${S.value}`,
|
|
85
86
|
{ "rds-e-direct-access--disabled": c.value },
|
|
86
|
-
{ "rds-e-direct-access--with-arrow":
|
|
87
|
-
]), n =
|
|
88
|
-
var e;
|
|
89
|
-
return (e = r.value) != null && e.microillustration && (r.value.microillustration.path || r.value.microillustration.url) || "";
|
|
90
|
-
}), v = (e) => {
|
|
87
|
+
{ "rds-e-direct-access--with-arrow": f.value }
|
|
88
|
+
]), n = i(() => x.value && !!r.value), L = i(() => z.value || p.value), $ = i(() => typeof r.value == "string" ? T(r.value) : ""), v = i(() => a.value?.microillustration && (a.value.microillustration.path || a.value.microillustration.url) || ""), _ = (e) => {
|
|
91
89
|
if (!e) return {};
|
|
92
90
|
const s = {};
|
|
93
91
|
return e.size && (s.fontSize = `${e.size}px`, s.width = `${e.size}px`, s.height = `${e.size}px`), e.color && "name" in e && (s.color = e.color), s;
|
|
94
|
-
},
|
|
92
|
+
}, B = (e) => {
|
|
95
93
|
if (c.value) {
|
|
96
94
|
e.preventDefault();
|
|
97
95
|
return;
|
|
98
96
|
}
|
|
99
|
-
|
|
97
|
+
g("click", e);
|
|
100
98
|
};
|
|
101
|
-
return (e, s) => (l(), d(
|
|
102
|
-
id:
|
|
103
|
-
type: t(
|
|
104
|
-
href: !n.value && t(
|
|
105
|
-
to: n.value && t(
|
|
106
|
-
class:
|
|
99
|
+
return (e, s) => (l(), d(E(t(r) ? n.value ? "router-link" : "a" : "button"), {
|
|
100
|
+
id: o.id,
|
|
101
|
+
type: t(r) ? void 0 : "button",
|
|
102
|
+
href: !n.value && t(r) ? $.value : void 0,
|
|
103
|
+
to: n.value && t(r) ? t(r) : void 0,
|
|
104
|
+
class: I(C.value),
|
|
107
105
|
disabled: t(c),
|
|
108
|
-
"aria-label":
|
|
109
|
-
onClick:
|
|
106
|
+
"aria-label": L.value,
|
|
107
|
+
onClick: B
|
|
110
108
|
}, {
|
|
111
|
-
default:
|
|
109
|
+
default: j(() => [
|
|
112
110
|
u(e.$slots, "default", {}, () => [
|
|
113
|
-
m("div",
|
|
114
|
-
u(e.$slots, "artwork", {}, () =>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}, null, 12, M)) : b("", !0)
|
|
131
|
-
];
|
|
132
|
-
}, !0)
|
|
111
|
+
m("div", q, [
|
|
112
|
+
u(e.$slots, "artwork", {}, () => [
|
|
113
|
+
t(a)?.icon?.name ? (l(), d(h, {
|
|
114
|
+
key: 0,
|
|
115
|
+
name: t(a).icon.name,
|
|
116
|
+
style: y(_(t(a).icon)),
|
|
117
|
+
class: "rds-e-direct-access__artwork-item rds-e-direct-access__artwork-item--icon",
|
|
118
|
+
"aria-hidden": "true"
|
|
119
|
+
}, null, 8, ["name", "style"])) : t(a)?.microillustration && v.value ? (l(), N("img", {
|
|
120
|
+
key: 1,
|
|
121
|
+
src: v.value,
|
|
122
|
+
alt: t(a).microillustration.alt || "",
|
|
123
|
+
style: y(_(t(a).microillustration)),
|
|
124
|
+
class: "rds-e-direct-access__artwork-item rds-e-direct-access__artwork-item--microillustration",
|
|
125
|
+
"aria-hidden": !t(a).microillustration.alt
|
|
126
|
+
}, null, 12, A)) : k("", !0)
|
|
127
|
+
], !0)
|
|
133
128
|
]),
|
|
134
|
-
m("div",
|
|
129
|
+
m("div", M, [
|
|
135
130
|
u(e.$slots, "text", {}, () => [
|
|
136
|
-
m("span",
|
|
131
|
+
m("span", U, O(t(p)), 1)
|
|
137
132
|
], !0)
|
|
138
133
|
]),
|
|
139
|
-
t(
|
|
134
|
+
t(f) ? (l(), d(h, {
|
|
140
135
|
key: 0,
|
|
141
136
|
name: "arrow_right",
|
|
142
137
|
small: "",
|
|
143
138
|
class: "rds-e-direct-access__arrow",
|
|
144
139
|
"aria-hidden": "true"
|
|
145
|
-
})) :
|
|
140
|
+
})) : k("", !0)
|
|
146
141
|
], !0)
|
|
147
142
|
]),
|
|
148
143
|
_: 3
|
|
149
144
|
}, 8, ["id", "type", "href", "to", "class", "disabled", "aria-label"]));
|
|
150
145
|
}
|
|
151
|
-
}),
|
|
146
|
+
}), P = /* @__PURE__ */ V(F, [["__scopeId", "data-v-35d83735"]]);
|
|
152
147
|
export {
|
|
153
|
-
|
|
148
|
+
P as default
|
|
154
149
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as k, ref as _, computed as
|
|
2
|
-
import { g as
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/dragAndDrop.css';const
|
|
1
|
+
import { defineComponent as k, ref as _, computed as u, createElementBlock as b, openBlock as x, withModifiers as c, normalizeClass as q, createElementVNode as o, renderSlot as L, createVNode as M, createCommentVNode as R, toDisplayString as y } from "vue";
|
|
2
|
+
import { g as z } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { I as A } from "./icon-svg-DxlNo61Q.js";
|
|
4
|
+
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/dragAndDrop.css';const V = ["id", "accept", "multiple", "disabled"], O = ["for"], P = { class: "rds-e-drag-and-drop__icon-wrapper" }, j = { class: "rds-e-drag-and-drop__text-container" }, G = { class: "rds-e-drag-and-drop__text" }, H = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-drag-and-drop__detail"
|
|
8
|
-
},
|
|
8
|
+
}, J = /* @__PURE__ */ k({
|
|
9
9
|
__name: "drag-and-drop",
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -95,10 +95,10 @@ import './style/dragAndDrop.css';const O = ["id", "accept", "multiple", "disable
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
emits: ["filesSelected", "validationError", "fileReady"],
|
|
98
|
-
setup(r, { emit:
|
|
99
|
-
const t = r,
|
|
98
|
+
setup(r, { emit: D }) {
|
|
99
|
+
const t = r, f = D;
|
|
100
100
|
let S = 0;
|
|
101
|
-
const C = () => `rds-dd-file-${S++}`,
|
|
101
|
+
const C = () => `rds-dd-file-${S++}`, n = _(null), i = _(!1), w = z(), g = u(() => t.id || `rds-drag-drop-${w}`), F = u(() => [
|
|
102
102
|
"rds-e-drag-and-drop",
|
|
103
103
|
{
|
|
104
104
|
"rds-e-drag-and-drop--dragging": i.value && !t.disabled,
|
|
@@ -106,8 +106,7 @@ import './style/dragAndDrop.css';const O = ["id", "accept", "multiple", "disable
|
|
|
106
106
|
"rds-e-drag-and-drop--full-width": t.fullWidth,
|
|
107
107
|
"rds-e-drag-and-drop--error": t.error && !t.disabled
|
|
108
108
|
}
|
|
109
|
-
]), m =
|
|
110
|
-
var a;
|
|
109
|
+
]), m = u(() => t.error && t.errorMessage ? t.errorMessage : t.detailText), I = u(() => t.showDetailText && (m.value || !t.error)), T = (e) => {
|
|
111
110
|
if (!e || e.length === 0)
|
|
112
111
|
return { valid: !1, message: "No se seleccionaron archivos." };
|
|
113
112
|
if (!t.multiple && e.length > 1)
|
|
@@ -115,34 +114,34 @@ import './style/dragAndDrop.css';const O = ["id", "accept", "multiple", "disable
|
|
|
115
114
|
if (t.maxFiles !== null && t.maxFiles > 0 && e.length > t.maxFiles)
|
|
116
115
|
return { valid: !1, message: `Se permite un máximo de ${t.maxFiles} archivos por selección.` };
|
|
117
116
|
if (t.accept) {
|
|
118
|
-
const
|
|
117
|
+
const a = t.accept.split(",").map((l) => l.trim().toLowerCase());
|
|
119
118
|
for (let l = 0; l < e.length; l++) {
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
122
|
-
return { valid: !1, message: `El tipo de archivo '${
|
|
119
|
+
const s = e[l], p = `.${s.name.split(".").pop()?.toLowerCase()}`, h = s.type.toLowerCase();
|
|
120
|
+
if (!a.some((d) => d.startsWith(".") ? p === d : d.includes("/") ? d.endsWith("/*") ? h.startsWith(d.replace("/*", "")) : h === d : !1))
|
|
121
|
+
return { valid: !1, message: `El tipo de archivo '${s.name}' no es válido. Permitidos: ${t.accept}` };
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
124
|
return { valid: !0 };
|
|
126
125
|
}, v = (e) => {
|
|
127
126
|
if (t.disabled) return;
|
|
128
127
|
if (!e || e.length === 0) {
|
|
129
|
-
|
|
128
|
+
n.value && (n.value.value = "");
|
|
130
129
|
return;
|
|
131
130
|
}
|
|
132
|
-
|
|
131
|
+
f("filesSelected", e);
|
|
133
132
|
const a = T(e);
|
|
134
133
|
if (a.valid) {
|
|
135
|
-
for (let
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
id:
|
|
139
|
-
file:
|
|
140
|
-
name:
|
|
141
|
-
size:
|
|
134
|
+
for (let l = 0; l < e.length; l++) {
|
|
135
|
+
const s = e[l], p = C();
|
|
136
|
+
f("fileReady", {
|
|
137
|
+
id: p,
|
|
138
|
+
file: s,
|
|
139
|
+
name: s.name,
|
|
140
|
+
size: s.size
|
|
142
141
|
});
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
} else a.message && (
|
|
143
|
+
n.value && (n.value.value = "");
|
|
144
|
+
} else a.message && (f("validationError", a.message), n.value && (n.value.value = ""));
|
|
146
145
|
}, B = (e) => {
|
|
147
146
|
const a = e.target;
|
|
148
147
|
v(a.files);
|
|
@@ -150,55 +149,54 @@ import './style/dragAndDrop.css';const O = ["id", "accept", "multiple", "disable
|
|
|
150
149
|
t.disabled || (i.value = !0);
|
|
151
150
|
}, $ = (e) => {
|
|
152
151
|
t.disabled || (e.preventDefault(), i.value = !0);
|
|
153
|
-
},
|
|
152
|
+
}, N = (e) => {
|
|
154
153
|
const a = e.relatedTarget;
|
|
155
154
|
(!e.currentTarget || !e.currentTarget.contains(a)) && (i.value = !1);
|
|
156
|
-
},
|
|
157
|
-
var n;
|
|
155
|
+
}, W = (e) => {
|
|
158
156
|
if (t.disabled) return;
|
|
159
157
|
i.value = !1;
|
|
160
|
-
const a =
|
|
158
|
+
const a = e.dataTransfer?.files;
|
|
161
159
|
v(a || null);
|
|
162
160
|
};
|
|
163
161
|
return (e, a) => (x(), b("div", {
|
|
164
162
|
class: q(F.value),
|
|
165
|
-
onDragenter:
|
|
166
|
-
onDragover:
|
|
167
|
-
onDragleave:
|
|
168
|
-
onDrop:
|
|
163
|
+
onDragenter: c(E, ["prevent"]),
|
|
164
|
+
onDragover: c($, ["prevent"]),
|
|
165
|
+
onDragleave: c(N, ["prevent"]),
|
|
166
|
+
onDrop: c(W, ["prevent"])
|
|
169
167
|
}, [
|
|
170
|
-
|
|
168
|
+
o("input", {
|
|
171
169
|
id: g.value,
|
|
172
170
|
ref_key: "fileInputRef",
|
|
173
|
-
ref:
|
|
171
|
+
ref: n,
|
|
174
172
|
type: "file",
|
|
175
173
|
class: "rds-e-drag-and-drop__input",
|
|
176
174
|
accept: r.accept,
|
|
177
175
|
multiple: r.multiple,
|
|
178
176
|
disabled: r.disabled,
|
|
179
177
|
onChange: B
|
|
180
|
-
}, null, 40,
|
|
181
|
-
|
|
178
|
+
}, null, 40, V),
|
|
179
|
+
o("label", {
|
|
182
180
|
for: g.value,
|
|
183
181
|
class: "rds-e-drag-and-drop__label"
|
|
184
182
|
}, [
|
|
185
183
|
L(e.$slots, "content", {}, () => [
|
|
186
|
-
|
|
187
|
-
M(
|
|
184
|
+
o("span", P, [
|
|
185
|
+
M(A, {
|
|
188
186
|
name: r.icon,
|
|
189
187
|
class: "rds-e-drag-and-drop__icon",
|
|
190
188
|
"aria-hidden": "true"
|
|
191
189
|
}, null, 8, ["name"])
|
|
192
190
|
]),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
I.value ? (x(), b("span",
|
|
191
|
+
o("div", j, [
|
|
192
|
+
o("span", G, y(r.label), 1),
|
|
193
|
+
I.value ? (x(), b("span", H, y(m.value), 1)) : R("", !0)
|
|
196
194
|
])
|
|
197
195
|
], !0)
|
|
198
|
-
], 8,
|
|
196
|
+
], 8, O)
|
|
199
197
|
], 34));
|
|
200
198
|
}
|
|
201
|
-
}),
|
|
199
|
+
}), ee = /* @__PURE__ */ U(J, [["__scopeId", "data-v-3928ef06"]]);
|
|
202
200
|
export {
|
|
203
|
-
|
|
201
|
+
ee as default
|
|
204
202
|
};
|