energy-components 2.6.0 → 2.8.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 +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-BfTKaP_f.js → collapsable.scss_vue_type_style_index_0_src_true_lang-CBOSJyvR.js} +1 -1
- package/dist/components/datepicker.es.js +1 -1
- package/dist/components/directAccess.es.js +1 -1
- package/dist/components/dragAndDrop.es.js +93 -75
- package/dist/components/dropdown.es.js +414 -272
- package/dist/components/fileUploadItem.es.js +1 -1
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/filterTag.es.js +1 -1
- package/dist/components/{icon-svg-CW3eQRcp.js → icon-svg-BWxX0W6p.js} +15 -3
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/indicator.es.js +1 -1
- package/dist/components/indicatorDots.es.js +1 -1
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/modal.es.js +1 -1
- package/dist/components/multiselect.es.js +14 -8
- package/dist/components/multiselectcontentwrapper.es.js +42 -36
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/popover.es.js +90 -71
- package/dist/components/popoverMenu.es.js +67 -60
- package/dist/components/progressBar.es.js +1 -1
- package/dist/components/quantitySelector.es.js +1 -1
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/searchField.es.js +1 -1
- package/dist/components/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/style/dragAndDrop.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/popoverMenu.css +1 -1
- package/dist/components/style/table.css +1 -1
- package/dist/components/style/tableRenderer.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +1 -1
- package/dist/components/table.es.js +101 -92
- package/dist/components/tableRenderer.es.js +363 -214
- 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/toggle.es.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/energy-components.css +1 -1
- package/dist/energy-components.es.js +6511 -6143
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/table/table-renderer.vue.d.ts +7 -2
- package/dist/types/src/components/content/table/table.vue.d.ts +27 -1
- package/dist/types/src/components/content/table/use-column-reorder.d.ts +29 -0
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +15 -0
- package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +9 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +25 -0
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +4 -0
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +10 -4
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/llms/rdsdrag-and-drop.md +1 -0
- package/llms/rdsdropdown.md +4 -2
- package/llms/rdspopover-menu.md +2 -0
- package/llms/rdspopover.md +2 -0
- package/llms/rdstable.md +4 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as B, toRefs as D, ref as p, watch as K, nextTick as T, inject as k, onMounted as $, onBeforeUnmount as A, openBlock as f, createElementBlock as R, createElementVNode as i, mergeProps as x, withKeys as z, toDisplayString as v, unref as m, createBlock as N, createCommentVNode as V, createVNode as H, normalizeClass as S, renderSlot as P, createTextVNode as U } from "vue";
|
|
2
|
-
import { R as j } from "./icon-svg-
|
|
2
|
+
import { R as j } from "./icon-svg-BWxX0W6p.js";
|
|
3
3
|
import E from "./tag.es.js";
|
|
4
4
|
import { R as F, U as I } from "./types-CFEN6-OM.js";
|
|
5
5
|
import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, computed as a, openBlock as n, createElementBlock as s, withKeys as o, normalizeStyle as u, normalizeClass as k, toDisplayString as _, createBlock as b, createCommentVNode as z } from "vue";
|
|
2
|
-
import { R as C } from "./icon-svg-
|
|
2
|
+
import { R as C } from "./icon-svg-BWxX0W6p.js";
|
|
3
3
|
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"], D = {
|
|
5
5
|
key: 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, computed as s, openBlock as r, createElementBlock as f, mergeProps as p, createBlock as v, normalizeClass as m, createCommentVNode as y, createElementVNode as h, renderSlot as g, createTextVNode as x, toDisplayString as B } from "vue";
|
|
2
|
-
import { R as S } from "./icon-svg-
|
|
2
|
+
import { R as S } from "./icon-svg-BWxX0W6p.js";
|
|
3
3
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/button.css';const $ = ["id", "type", "disabled", "aria-disabled", "aria-busy", "aria-label"], L = { class: "rds-e-btn__text" }, I = /* @__PURE__ */ b({
|
|
5
5
|
__name: "button",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as D, computed as c, ref as d, watch as N, onMounted as E, onBeforeUnmount as L, openBlock as s, createElementBlock as R, normalizeClass as u, createElementVNode as b, mergeProps as T, renderSlot as U, createTextVNode as z, toDisplayString as I, createBlock as x, withCtx as $, createVNode as F, createCommentVNode as K } from "vue";
|
|
2
|
-
import { R as g } from "./icon-svg-
|
|
2
|
+
import { R as g } from "./icon-svg-BWxX0W6p.js";
|
|
3
3
|
import M from "./tooltip.es.js";
|
|
4
4
|
import { g as p } from "./getInstance-GhoEcxLF.js";
|
|
5
5
|
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, ref as i, computed as c, watch as y, nextTick as o, onMounted as N, onBeforeUnmount as R, openBlock as g, createElementBlock as S, normalizeClass as u, createElementVNode as s, withKeys as $, createBlock as I, createCommentVNode as L, toDisplayString as x, createVNode as O, renderSlot as V, createTextVNode as H } from "vue";
|
|
2
|
-
import { R as k } from "./icon-svg-
|
|
2
|
+
import { R as k } from "./icon-svg-BWxX0W6p.js";
|
|
3
3
|
import './style/collapsable.css';const D = ["id", "aria-expanded", "aria-controls", "disabled"], K = { class: "rds-e-collapsable__header-title" }, M = { class: "rds-e-collapsable__header-title-text" }, T = ["id", "aria-labelledby"], U = /* @__PURE__ */ C({
|
|
4
4
|
__name: "collapsable",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive as ya, ref as G, defineComponent as Je, useSlots as Vt, toRef as fa, onMounted as Ze, nextTick as it, onUnmounted as ga, watch as ct, computed as U, openBlock as O, createElementBlock as X, unref as s, normalizeClass as xe, createVNode as tt, mergeProps as Qe, isRef as $n, createSlots as Ge, renderList as Se, withCtx as ke, renderSlot as de, normalizeProps as ze, guardReactiveProps as lt, createBlock as Te, resolveDynamicComponent as Ya, Teleport as qr, Transition as la, createCommentVNode as K, h as jr, render as Cn, createElementVNode as ge, withModifiers as Ot, normalizeStyle as vt, Fragment as _e, toDisplayString as et, useAttrs as Qr, createTextVNode as Ct, getCurrentScope as Ur, onScopeDispose as Xr, onBeforeUpdate as zr, withDirectives as Pa, vShow as Ta, withKeys as Aa, useModel as Kr, toRefs as Gr, toHandlers as Jr, mergeModels as Yn } from "vue";
|
|
2
|
-
import { R as Zr } from "./icon-svg-
|
|
2
|
+
import { R as Zr } from "./icon-svg-BWxX0W6p.js";
|
|
3
3
|
import Rn from "./button.es.js";
|
|
4
4
|
import el from "./textField.es.js";
|
|
5
5
|
import { _ as tl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as R, toRefs as D, computed as i, openBlock as l, createBlock as u, resolveDynamicComponent as E, unref as t, normalizeClass as j, withCtx as I, renderSlot as m, createElementVNode as c, normalizeStyle as k, createElementBlock as N, createCommentVNode as y, toDisplayString as O } from "vue";
|
|
2
2
|
import { s as T } from "./functions-D3GA3OzJ.js";
|
|
3
|
-
import { R as h } from "./icon-svg-
|
|
3
|
+
import { R as h } from "./icon-svg-BWxX0W6p.js";
|
|
4
4
|
import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
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-content" }, F = { class: "rds-e-direct-access__text" }, G = /* @__PURE__ */ R({
|
|
6
6
|
__name: "direct-access",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/dragAndDrop.css';const
|
|
1
|
+
import { defineComponent as q, ref as x, computed as i, openBlock as y, createElementBlock as D, withModifiers as c, withKeys as w, normalizeClass as M, createElementVNode as o, renderSlot as z, createVNode as U, toDisplayString as g, createCommentVNode as V } from "vue";
|
|
2
|
+
import { g as K } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { R as O } from "./icon-svg-BWxX0W6p.js";
|
|
4
|
+
import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/dragAndDrop.css';const j = ["tabindex", "aria-disabled", "aria-label"], G = ["id", "accept", "multiple", "disabled"], H = ["for"], J = { class: "rds-e-drag-and-drop__icon-wrapper" }, Q = { class: "rds-e-drag-and-drop__icon-wrapper-text" }, X = { class: "rds-e-drag-and-drop__text-container" }, Y = { class: "rds-e-drag-and-drop__text" }, Z = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-drag-and-drop__detail"
|
|
8
|
-
},
|
|
8
|
+
}, ee = /* @__PURE__ */ q({
|
|
9
9
|
__name: "drag-and-drop",
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -22,6 +22,13 @@ import './style/dragAndDrop.css';const V = ["id", "accept", "multiple", "disable
|
|
|
22
22
|
type: String,
|
|
23
23
|
default: ""
|
|
24
24
|
},
|
|
25
|
+
/**
|
|
26
|
+
* Texto que se muestra en el botón para dispositivos móviles.
|
|
27
|
+
*/
|
|
28
|
+
mobileButtonText: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "Añade tu archivo"
|
|
31
|
+
},
|
|
25
32
|
/**
|
|
26
33
|
* Indica si el componente está deshabilitado.
|
|
27
34
|
*/
|
|
@@ -95,78 +102,88 @@ import './style/dragAndDrop.css';const V = ["id", "accept", "multiple", "disable
|
|
|
95
102
|
}
|
|
96
103
|
},
|
|
97
104
|
emits: ["filesSelected", "validationError", "fileReady"],
|
|
98
|
-
setup(r, { emit:
|
|
99
|
-
const
|
|
100
|
-
let
|
|
101
|
-
const C = () => `rds-dd-file-${
|
|
105
|
+
setup(r, { emit: S }) {
|
|
106
|
+
const e = r, p = S;
|
|
107
|
+
let T = 0;
|
|
108
|
+
const C = () => `rds-dd-file-${T++}`, n = x(null), u = x(!1), F = K(), m = i(() => e.id || `rds-drag-drop-${F}`), B = i(() => [
|
|
102
109
|
"rds-e-drag-and-drop",
|
|
103
110
|
{
|
|
104
|
-
"rds-e-drag-and-drop--dragging":
|
|
105
|
-
"rds-e-drag-and-drop--disabled":
|
|
106
|
-
"rds-e-drag-and-drop--full-width":
|
|
107
|
-
"rds-e-drag-and-drop--error":
|
|
111
|
+
"rds-e-drag-and-drop--dragging": u.value && !e.disabled,
|
|
112
|
+
"rds-e-drag-and-drop--disabled": e.disabled,
|
|
113
|
+
"rds-e-drag-and-drop--full-width": e.fullWidth,
|
|
114
|
+
"rds-e-drag-and-drop--error": e.error && !e.disabled
|
|
108
115
|
}
|
|
109
|
-
]),
|
|
110
|
-
if (!
|
|
116
|
+
]), I = i(() => e.disabled ? -1 : 0), E = i(() => e.label || e.mobileButtonText || "Añade tu archivo"), v = i(() => e.error && e.errorMessage ? e.errorMessage : e.detailText), $ = i(() => e.showDetailText && (v.value || !e.error)), A = (a) => {
|
|
117
|
+
if (!a || a.length === 0)
|
|
111
118
|
return { valid: !1, message: "No se seleccionaron archivos." };
|
|
112
|
-
if (!
|
|
119
|
+
if (!e.multiple && a.length > 1)
|
|
113
120
|
return { valid: !1, message: "Solo se permite seleccionar un archivo." };
|
|
114
|
-
if (
|
|
115
|
-
return { valid: !1, message: `Se permite un máximo de ${
|
|
116
|
-
if (
|
|
117
|
-
const
|
|
118
|
-
for (let l = 0; l <
|
|
119
|
-
const
|
|
120
|
-
if (!
|
|
121
|
-
return { valid: !1, message: `El tipo de archivo '${
|
|
121
|
+
if (e.maxFiles !== null && e.maxFiles > 0 && a.length > e.maxFiles)
|
|
122
|
+
return { valid: !1, message: `Se permite un máximo de ${e.maxFiles} archivos por selección.` };
|
|
123
|
+
if (e.accept) {
|
|
124
|
+
const t = e.accept.split(",").map((l) => l.trim().toLowerCase());
|
|
125
|
+
for (let l = 0; l < a.length; l++) {
|
|
126
|
+
const d = a[l], f = `.${d.name.split(".").pop()?.toLowerCase()}`, _ = d.type.toLowerCase();
|
|
127
|
+
if (!t.some((s) => s.startsWith(".") ? f === s : s.includes("/") ? s.endsWith("/*") ? _.startsWith(s.replace("/*", "")) : _ === s : !1))
|
|
128
|
+
return { valid: !1, message: `El tipo de archivo '${d.name}' no es válido. Permitidos: ${e.accept}` };
|
|
122
129
|
}
|
|
123
130
|
}
|
|
124
131
|
return { valid: !0 };
|
|
125
|
-
},
|
|
126
|
-
if (
|
|
127
|
-
if (!
|
|
132
|
+
}, h = (a) => {
|
|
133
|
+
if (e.disabled) return;
|
|
134
|
+
if (!a || a.length === 0) {
|
|
128
135
|
n.value && (n.value.value = "");
|
|
129
136
|
return;
|
|
130
137
|
}
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
for (let l = 0; l <
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
id:
|
|
138
|
-
file:
|
|
139
|
-
name:
|
|
140
|
-
size:
|
|
138
|
+
p("filesSelected", a);
|
|
139
|
+
const t = A(a);
|
|
140
|
+
if (t.valid) {
|
|
141
|
+
for (let l = 0; l < a.length; l++) {
|
|
142
|
+
const d = a[l], f = C();
|
|
143
|
+
p("fileReady", {
|
|
144
|
+
id: f,
|
|
145
|
+
file: d,
|
|
146
|
+
name: d.name,
|
|
147
|
+
size: d.size
|
|
141
148
|
});
|
|
142
149
|
}
|
|
143
150
|
n.value && (n.value.value = "");
|
|
144
|
-
} else
|
|
145
|
-
},
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
151
|
+
} else t.message && (p("validationError", t.message), n.value && (n.value.value = ""));
|
|
152
|
+
}, R = (a) => {
|
|
153
|
+
const t = a.target;
|
|
154
|
+
h(t.files);
|
|
155
|
+
}, b = (a) => {
|
|
156
|
+
a.preventDefault(), e.disabled || n.value?.click();
|
|
157
|
+
}, k = () => {
|
|
158
|
+
e.disabled || (u.value = !0);
|
|
159
|
+
}, L = (a) => {
|
|
160
|
+
e.disabled || (a.preventDefault(), u.value = !0);
|
|
161
|
+
}, N = (a) => {
|
|
162
|
+
const t = a.relatedTarget;
|
|
163
|
+
(!a.currentTarget || !a.currentTarget.contains(t)) && (u.value = !1);
|
|
164
|
+
}, W = (a) => {
|
|
165
|
+
if (e.disabled) return;
|
|
166
|
+
u.value = !1;
|
|
167
|
+
const t = a.dataTransfer?.files;
|
|
168
|
+
h(t || null);
|
|
160
169
|
};
|
|
161
|
-
return (
|
|
162
|
-
class:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
return (a, t) => (y(), D("div", {
|
|
171
|
+
class: M(B.value),
|
|
172
|
+
tabindex: I.value,
|
|
173
|
+
role: "button",
|
|
174
|
+
"aria-disabled": r.disabled ? "true" : "false",
|
|
175
|
+
"aria-label": E.value,
|
|
176
|
+
onKeydown: [
|
|
177
|
+
w(b, ["enter"]),
|
|
178
|
+
w(b, ["space"])
|
|
179
|
+
],
|
|
180
|
+
onDragenter: c(k, ["prevent"]),
|
|
181
|
+
onDragover: c(L, ["prevent"]),
|
|
182
|
+
onDragleave: c(N, ["prevent"]),
|
|
183
|
+
onDrop: c(W, ["prevent"])
|
|
167
184
|
}, [
|
|
168
185
|
o("input", {
|
|
169
|
-
id:
|
|
186
|
+
id: m.value,
|
|
170
187
|
ref_key: "fileInputRef",
|
|
171
188
|
ref: n,
|
|
172
189
|
type: "file",
|
|
@@ -174,29 +191,30 @@ import './style/dragAndDrop.css';const V = ["id", "accept", "multiple", "disable
|
|
|
174
191
|
accept: r.accept,
|
|
175
192
|
multiple: r.multiple,
|
|
176
193
|
disabled: r.disabled,
|
|
177
|
-
onChange:
|
|
178
|
-
}, null, 40,
|
|
194
|
+
onChange: R
|
|
195
|
+
}, null, 40, G),
|
|
179
196
|
o("label", {
|
|
180
|
-
for:
|
|
197
|
+
for: m.value,
|
|
181
198
|
class: "rds-e-drag-and-drop__label"
|
|
182
199
|
}, [
|
|
183
|
-
|
|
184
|
-
o("span",
|
|
185
|
-
|
|
200
|
+
z(a.$slots, "content", {}, () => [
|
|
201
|
+
o("span", J, [
|
|
202
|
+
U(O, {
|
|
186
203
|
name: r.icon,
|
|
187
204
|
class: "rds-e-drag-and-drop__icon",
|
|
188
205
|
"aria-hidden": "true"
|
|
189
|
-
}, null, 8, ["name"])
|
|
206
|
+
}, null, 8, ["name"]),
|
|
207
|
+
o("p", Q, g(r.mobileButtonText), 1)
|
|
190
208
|
]),
|
|
191
|
-
o("div",
|
|
192
|
-
o("span",
|
|
193
|
-
|
|
209
|
+
o("div", X, [
|
|
210
|
+
o("span", Y, g(r.label), 1),
|
|
211
|
+
$.value ? (y(), D("span", Z, g(v.value), 1)) : V("", !0)
|
|
194
212
|
])
|
|
195
213
|
], !0)
|
|
196
|
-
], 8,
|
|
197
|
-
],
|
|
214
|
+
], 8, H)
|
|
215
|
+
], 42, j));
|
|
198
216
|
}
|
|
199
|
-
}),
|
|
217
|
+
}), de = /* @__PURE__ */ P(ee, [["__scopeId", "data-v-9dade050"]]);
|
|
200
218
|
export {
|
|
201
|
-
|
|
219
|
+
de as default
|
|
202
220
|
};
|