energy-components 1.22.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.
Files changed (80) hide show
  1. package/README.md +21 -6
  2. package/dist/components/accordion.es.js +17 -17
  3. package/dist/components/avatar.es.js +7 -7
  4. package/dist/components/breadcrumbs.es.js +32 -32
  5. package/dist/components/button.es.js +24 -24
  6. package/dist/components/checkbox.es.js +14 -17
  7. package/dist/components/collapsable.es.js +1 -1
  8. 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
  9. package/dist/components/datepicker.es.js +4644 -4639
  10. package/dist/components/directAccess.es.js +45 -50
  11. package/dist/components/dragAndDrop.es.js +44 -46
  12. package/dist/components/dropdown.es.js +154 -163
  13. package/dist/components/fileUploadItem.es.js +18 -18
  14. package/dist/components/filterChip.es.js +9 -9
  15. package/dist/components/filterTag.es.js +7 -7
  16. package/dist/components/{floating-ui.vue-DHEoOe5S.js → floating-ui.vue-C-DgKOwt.js} +1 -1
  17. package/dist/components/functions-D3GA3OzJ.js +24 -0
  18. package/dist/components/icon-svg-DxlNo61Q.js +869 -0
  19. package/dist/components/iconList.es.js +25 -29
  20. package/dist/components/iconSvg.es.js +1 -1
  21. package/dist/components/index.es.js +46 -46
  22. package/dist/components/indicator.es.js +27 -28
  23. package/dist/components/infoBox.es.js +17 -17
  24. package/dist/components/link.es.js +51 -55
  25. package/dist/components/modal.es.js +20 -20
  26. package/dist/components/multiselect.es.js +2 -3
  27. package/dist/components/overlay.es.js +20 -15
  28. package/dist/components/pagination.es.js +111 -111
  29. package/dist/components/persistentToast.es.js +11 -11
  30. package/dist/components/popover.es.js +18 -18
  31. package/dist/components/popoverMenu.es.js +22 -22
  32. package/dist/components/progressBar.es.js +8 -8
  33. package/dist/components/quantitySelector.es.js +12 -12
  34. package/dist/components/radioButton.es.js +26 -26
  35. package/dist/components/selectionChip.es.js +5 -5
  36. package/dist/components/sidedrawer.es.js +19 -19
  37. package/dist/components/style/accordionGroup.css +1 -1
  38. package/dist/components/style/actionButton.css +1 -1
  39. package/dist/components/style/button.css +1 -1
  40. package/dist/components/style/checkbox.css +1 -1
  41. package/dist/components/style/datepicker.css +1 -1
  42. package/dist/components/style/directAccess.css +1 -1
  43. package/dist/components/style/dragAndDrop.css +1 -1
  44. package/dist/components/style/filterChip.css +1 -1
  45. package/dist/components/style/icon-svg.css +1 -1
  46. package/dist/components/style/iconList.css +1 -1
  47. package/dist/components/style/link.css +1 -1
  48. package/dist/components/style/modal.css +1 -1
  49. package/dist/components/style/overlay.css +1 -1
  50. package/dist/components/style/pagination.css +1 -1
  51. package/dist/components/style/persistentToast.css +1 -1
  52. package/dist/components/style/selectionChip.css +1 -1
  53. package/dist/components/style/sidedrawer.css +1 -1
  54. package/dist/components/style/tabBar.css +1 -1
  55. package/dist/components/style/tableslotedcomponent.css +1 -1
  56. package/dist/components/switch.es.js +9 -9
  57. package/dist/components/tabBar.es.js +32 -33
  58. package/dist/components/tablepaginatedcomponent.es.js +35 -36
  59. package/dist/components/tableslotedcomponent.es.js +116 -121
  60. package/dist/components/tag.es.js +6 -6
  61. package/dist/components/textArea.es.js +103 -106
  62. package/dist/components/textField.es.js +21 -22
  63. package/dist/components/toggle.es.js +23 -23
  64. package/dist/components/tooltip.es.js +59 -59
  65. package/dist/energy-components.css +1 -0
  66. package/dist/energy-components.es.js +9101 -24972
  67. package/dist/energy-components.umd.js +2 -2
  68. package/dist/style.css +1 -1
  69. package/dist/types/src/components/icon-svg/icon-list.d.ts +8 -9
  70. package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +2 -2
  71. package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +2 -2
  72. package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +2 -2
  73. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +1 -1
  74. package/dist/types/src/helpers/functions.d.ts +1 -0
  75. package/dist/types/style.d.ts +1 -0
  76. package/dist/types/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +24 -17
  78. package/dist/components/functions-DIHwdgF0.js +0 -18
  79. package/dist/components/icon-svg-K8-vLJgV.js +0 -16718
  80. package/dist/composables/index.es.js +0 -37
@@ -1,7 +1,8 @@
1
- import { defineComponent as j, toRefs as E, computed as o, createBlock as d, openBlock as l, resolveDynamicComponent as I, unref as t, normalizeClass as N, withCtx as O, renderSlot as u, createElementVNode as m, createCommentVNode as b, createElementBlock as T, normalizeStyle as w, toDisplayString as V } from "vue";
2
- import { R as S } from "./icon-svg-K8-vLJgV.js";
3
- import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/directAccess.css';const A = { class: "rds-e-direct-access__artwork-container" }, M = ["src", "alt", "aria-hidden"], F = { class: "rds-e-direct-access__text-container" }, G = { class: "rds-e-direct-access__text" }, H = /* @__PURE__ */ j({
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: (i) => ["horizontal", "vertical"].includes(i)
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(i, { emit: g }) {
82
- const x = i, z = g, { text: p, layout: C, disabled: c, arrow: _, artwork: r, ariaLabel: $, linkTo: a, useRouterLink: B } = E(x), L = o(() => [
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--${C.value}`,
85
+ `rds-e-direct-access--${S.value}`,
85
86
  { "rds-e-direct-access--disabled": c.value },
86
- { "rds-e-direct-access--with-arrow": _.value }
87
- ]), n = o(() => B.value && !!a.value), R = o(() => $.value || p.value), f = o(() => {
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
- }, D = (e) => {
92
+ }, B = (e) => {
95
93
  if (c.value) {
96
94
  e.preventDefault();
97
95
  return;
98
96
  }
99
- z("click", e);
97
+ g("click", e);
100
98
  };
101
- return (e, s) => (l(), d(I(t(a) ? n.value ? "router-link" : "a" : "button"), {
102
- id: i.id,
103
- type: t(a) ? void 0 : "button",
104
- href: !n.value && t(a) ? t(a) : void 0,
105
- to: n.value && t(a) ? t(a) : void 0,
106
- class: N(L.value),
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": R.value,
109
- onClick: D
106
+ "aria-label": L.value,
107
+ onClick: B
110
108
  }, {
111
- default: O(() => [
109
+ default: j(() => [
112
110
  u(e.$slots, "default", {}, () => [
113
- m("div", A, [
114
- u(e.$slots, "artwork", {}, () => {
115
- var k, y, h;
116
- return [
117
- (y = (k = t(r)) == null ? void 0 : k.icon) != null && y.name ? (l(), d(S, {
118
- key: 0,
119
- name: t(r).icon.name,
120
- style: w(v(t(r).icon)),
121
- class: "rds-e-direct-access__artwork-item rds-e-direct-access__artwork-item--icon",
122
- "aria-hidden": "true"
123
- }, null, 8, ["name", "style"])) : (h = t(r)) != null && h.microillustration && f.value ? (l(), T("img", {
124
- key: 1,
125
- src: f.value,
126
- alt: t(r).microillustration.alt || "",
127
- style: w(v(t(r).microillustration)),
128
- class: "rds-e-direct-access__artwork-item rds-e-direct-access__artwork-item--microillustration",
129
- "aria-hidden": !t(r).microillustration.alt
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", F, [
129
+ m("div", M, [
135
130
  u(e.$slots, "text", {}, () => [
136
- m("span", G, V(t(p)), 1)
131
+ m("span", U, O(t(p)), 1)
137
132
  ], !0)
138
133
  ]),
139
- t(_) ? (l(), d(S, {
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
- })) : b("", !0)
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
- }), Q = /* @__PURE__ */ q(H, [["__scopeId", "data-v-9bb4e0b7"]]);
146
+ }), P = /* @__PURE__ */ V(F, [["__scopeId", "data-v-35d83735"]]);
152
147
  export {
153
- Q as default
148
+ P as default
154
149
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as k, ref as _, computed as c, createElementBlock as b, openBlock as x, withModifiers as f, normalizeClass as q, createElementVNode as u, renderSlot as L, createVNode as M, createCommentVNode as z, toDisplayString as D } from "vue";
2
- import { g as A } from "./getInstance-GhoEcxLF.js";
3
- import { R as U } from "./icon-svg-K8-vLJgV.js";
4
- import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/dragAndDrop.css';const O = ["id", "accept", "multiple", "disabled"], P = ["for"], j = { class: "rds-e-drag-and-drop__icon-wrapper" }, G = { class: "rds-e-drag-and-drop__text-container" }, H = { class: "rds-e-drag-and-drop__text" }, J = {
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
- }, K = /* @__PURE__ */ k({
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: y }) {
99
- const t = r, p = y;
98
+ setup(r, { emit: D }) {
99
+ const t = r, f = D;
100
100
  let S = 0;
101
- const C = () => `rds-dd-file-${S++}`, s = _(null), i = _(!1), w = A(), g = c(() => t.id || `rds-drag-drop-${w}`), F = c(() => [
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 = c(() => t.error && t.errorMessage ? t.errorMessage : t.detailText), I = c(() => t.showDetailText && (m.value || !t.error)), T = (e) => {
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 n = t.accept.split(",").map((l) => l.trim().toLowerCase());
117
+ const a = t.accept.split(",").map((l) => l.trim().toLowerCase());
119
118
  for (let l = 0; l < e.length; l++) {
120
- const o = e[l], W = `.${(a = o.name.split(".").pop()) == null ? void 0 : a.toLowerCase()}`, h = o.type.toLowerCase();
121
- if (!n.some((d) => d.startsWith(".") ? W === d : d.includes("/") ? d.endsWith("/*") ? h.startsWith(d.replace("/*", "")) : h === d : !1))
122
- return { valid: !1, message: `El tipo de archivo '${o.name}' no es válido. Permitidos: ${t.accept}` };
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
- s.value && (s.value.value = "");
128
+ n.value && (n.value.value = "");
130
129
  return;
131
130
  }
132
- p("filesSelected", e);
131
+ f("filesSelected", e);
133
132
  const a = T(e);
134
133
  if (a.valid) {
135
- for (let n = 0; n < e.length; n++) {
136
- const l = e[n], o = C();
137
- p("fileReady", {
138
- id: o,
139
- file: l,
140
- name: l.name,
141
- size: l.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
- s.value && (s.value.value = "");
145
- } else a.message && (p("validationError", a.message), s.value && (s.value.value = ""));
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
- }, R = (e) => {
152
+ }, N = (e) => {
154
153
  const a = e.relatedTarget;
155
154
  (!e.currentTarget || !e.currentTarget.contains(a)) && (i.value = !1);
156
- }, N = (e) => {
157
- var n;
155
+ }, W = (e) => {
158
156
  if (t.disabled) return;
159
157
  i.value = !1;
160
- const a = (n = e.dataTransfer) == null ? void 0 : n.files;
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: f(E, ["prevent"]),
166
- onDragover: f($, ["prevent"]),
167
- onDragleave: f(R, ["prevent"]),
168
- onDrop: f(N, ["prevent"])
163
+ onDragenter: c(E, ["prevent"]),
164
+ onDragover: c($, ["prevent"]),
165
+ onDragleave: c(N, ["prevent"]),
166
+ onDrop: c(W, ["prevent"])
169
167
  }, [
170
- u("input", {
168
+ o("input", {
171
169
  id: g.value,
172
170
  ref_key: "fileInputRef",
173
- ref: s,
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, O),
181
- u("label", {
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
- u("span", j, [
187
- M(U, {
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
- u("div", G, [
194
- u("span", H, D(r.label), 1),
195
- I.value ? (x(), b("span", J, D(m.value), 1)) : z("", !0)
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, P)
196
+ ], 8, O)
199
197
  ], 34));
200
198
  }
201
- }), te = /* @__PURE__ */ V(K, [["__scopeId", "data-v-3928ef06"]]);
199
+ }), ee = /* @__PURE__ */ U(J, [["__scopeId", "data-v-3928ef06"]]);
202
200
  export {
203
- te as default
201
+ ee as default
204
202
  };