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.
Files changed (70) hide show
  1. package/dist/components/accordion.es.js +1 -1
  2. package/dist/components/avatar.es.js +1 -1
  3. package/dist/components/button.es.js +1 -1
  4. package/dist/components/checkbox.es.js +1 -1
  5. package/dist/components/collapsable.es.js +1 -1
  6. 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
  7. package/dist/components/datepicker.es.js +1 -1
  8. package/dist/components/directAccess.es.js +1 -1
  9. package/dist/components/dragAndDrop.es.js +93 -75
  10. package/dist/components/dropdown.es.js +414 -272
  11. package/dist/components/fileUploadItem.es.js +1 -1
  12. package/dist/components/filterChip.es.js +1 -1
  13. package/dist/components/filterTag.es.js +1 -1
  14. package/dist/components/{icon-svg-CW3eQRcp.js → icon-svg-BWxX0W6p.js} +15 -3
  15. package/dist/components/iconList.es.js +1 -1
  16. package/dist/components/iconSvg.es.js +1 -1
  17. package/dist/components/index.es.js +2 -2
  18. package/dist/components/indicator.es.js +1 -1
  19. package/dist/components/indicatorDots.es.js +1 -1
  20. package/dist/components/infoBox.es.js +1 -1
  21. package/dist/components/link.es.js +1 -1
  22. package/dist/components/modal.es.js +1 -1
  23. package/dist/components/multiselect.es.js +14 -8
  24. package/dist/components/multiselectcontentwrapper.es.js +42 -36
  25. package/dist/components/persistentToast.es.js +1 -1
  26. package/dist/components/popover.es.js +90 -71
  27. package/dist/components/popoverMenu.es.js +67 -60
  28. package/dist/components/progressBar.es.js +1 -1
  29. package/dist/components/quantitySelector.es.js +1 -1
  30. package/dist/components/radioButton.es.js +1 -1
  31. package/dist/components/searchField.es.js +1 -1
  32. package/dist/components/selectionChip.es.js +1 -1
  33. package/dist/components/sidedrawer.es.js +1 -1
  34. package/dist/components/style/dragAndDrop.css +1 -1
  35. package/dist/components/style/dropdown.css +1 -1
  36. package/dist/components/style/multiselect.css +1 -1
  37. package/dist/components/style/multiselectcontentwrapper.css +1 -1
  38. package/dist/components/style/pagination.css +1 -1
  39. package/dist/components/style/popover.css +1 -1
  40. package/dist/components/style/popoverMenu.css +1 -1
  41. package/dist/components/style/table.css +1 -1
  42. package/dist/components/style/tableRenderer.css +1 -1
  43. package/dist/components/switch.es.js +1 -1
  44. package/dist/components/tabBar.es.js +1 -1
  45. package/dist/components/table.es.js +101 -92
  46. package/dist/components/tableRenderer.es.js +363 -214
  47. package/dist/components/tag.es.js +1 -1
  48. package/dist/components/textArea.es.js +1 -1
  49. package/dist/components/textField.es.js +1 -1
  50. package/dist/components/toggle.es.js +1 -1
  51. package/dist/components/tooltip.es.js +1 -1
  52. package/dist/energy-components.css +1 -1
  53. package/dist/energy-components.es.js +6511 -6143
  54. package/dist/energy-components.umd.js +2 -2
  55. package/dist/style.css +1 -1
  56. package/dist/types/src/components/content/table/table-renderer.vue.d.ts +7 -2
  57. package/dist/types/src/components/content/table/table.vue.d.ts +27 -1
  58. package/dist/types/src/components/content/table/use-column-reorder.d.ts +29 -0
  59. package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +15 -0
  60. package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +9 -0
  61. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +25 -0
  62. package/dist/types/src/components/overlay/popover/popover.vue.d.ts +4 -0
  63. package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +10 -4
  64. package/dist/types/tsconfig.tsbuildinfo +1 -1
  65. package/llms/rdsdrag-and-drop.md +1 -0
  66. package/llms/rdsdropdown.md +4 -2
  67. package/llms/rdspopover-menu.md +2 -0
  68. package/llms/rdspopover.md +2 -0
  69. package/llms/rdstable.md +4 -0
  70. 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-CW3eQRcp.js";
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-CW3eQRcp.js";
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-CW3eQRcp.js";
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-CW3eQRcp.js";
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,4 +1,4 @@
1
- import { _ as f } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-BfTKaP_f.js";
1
+ import { _ as f } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-CBOSJyvR.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -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-CW3eQRcp.js";
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-CW3eQRcp.js";
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-CW3eQRcp.js";
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 W, ref as _, computed as u, openBlock as b, createElementBlock as x, withModifiers as c, normalizeClass as k, createElementVNode as o, renderSlot as q, createVNode as L, toDisplayString as D, createCommentVNode as M } from "vue";
2
- import { g as z } from "./getInstance-GhoEcxLF.js";
3
- import { R as A } from "./icon-svg-CW3eQRcp.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 = {
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
- }, J = /* @__PURE__ */ W({
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: y }) {
99
- const t = r, f = y;
100
- let S = 0;
101
- const C = () => `rds-dd-file-${S++}`, n = _(null), i = _(!1), w = z(), g = u(() => t.id || `rds-drag-drop-${w}`), F = u(() => [
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": i.value && !t.disabled,
105
- "rds-e-drag-and-drop--disabled": t.disabled,
106
- "rds-e-drag-and-drop--full-width": t.fullWidth,
107
- "rds-e-drag-and-drop--error": t.error && !t.disabled
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
- ]), m = u(() => t.error && t.errorMessage ? t.errorMessage : t.detailText), I = u(() => t.showDetailText && (m.value || !t.error)), T = (e) => {
110
- if (!e || e.length === 0)
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 (!t.multiple && e.length > 1)
119
+ if (!e.multiple && a.length > 1)
113
120
  return { valid: !1, message: "Solo se permite seleccionar un archivo." };
114
- if (t.maxFiles !== null && t.maxFiles > 0 && e.length > t.maxFiles)
115
- return { valid: !1, message: `Se permite un máximo de ${t.maxFiles} archivos por selección.` };
116
- if (t.accept) {
117
- const a = t.accept.split(",").map((l) => l.trim().toLowerCase());
118
- for (let l = 0; l < e.length; l++) {
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}` };
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
- }, v = (e) => {
126
- if (t.disabled) return;
127
- if (!e || e.length === 0) {
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
- f("filesSelected", e);
132
- const a = T(e);
133
- if (a.valid) {
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
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 a.message && (f("validationError", a.message), n.value && (n.value.value = ""));
145
- }, B = (e) => {
146
- const a = e.target;
147
- v(a.files);
148
- }, E = () => {
149
- t.disabled || (i.value = !0);
150
- }, $ = (e) => {
151
- t.disabled || (e.preventDefault(), i.value = !0);
152
- }, R = (e) => {
153
- const a = e.relatedTarget;
154
- (!e.currentTarget || !e.currentTarget.contains(a)) && (i.value = !1);
155
- }, N = (e) => {
156
- if (t.disabled) return;
157
- i.value = !1;
158
- const a = e.dataTransfer?.files;
159
- v(a || null);
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 (e, a) => (b(), x("div", {
162
- class: k(F.value),
163
- onDragenter: c(E, ["prevent"]),
164
- onDragover: c($, ["prevent"]),
165
- onDragleave: c(R, ["prevent"]),
166
- onDrop: c(N, ["prevent"])
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: g.value,
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: B
178
- }, null, 40, V),
194
+ onChange: R
195
+ }, null, 40, G),
179
196
  o("label", {
180
- for: g.value,
197
+ for: m.value,
181
198
  class: "rds-e-drag-and-drop__label"
182
199
  }, [
183
- q(e.$slots, "content", {}, () => [
184
- o("span", P, [
185
- L(A, {
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", j, [
192
- o("span", G, D(r.label), 1),
193
- I.value ? (b(), x("span", H, D(m.value), 1)) : M("", !0)
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, O)
197
- ], 34));
214
+ ], 8, H)
215
+ ], 42, j));
198
216
  }
199
- }), ee = /* @__PURE__ */ U(J, [["__scopeId", "data-v-3928ef06"]]);
217
+ }), de = /* @__PURE__ */ P(ee, [["__scopeId", "data-v-9dade050"]]);
200
218
  export {
201
- ee as default
219
+ de as default
202
220
  };