energy-components 1.20.0-beta.0 → 1.21.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 (58) hide show
  1. package/dist/components/accordion.es.js +60 -50
  2. package/dist/components/avatar.es.js +1 -1
  3. package/dist/components/badge.es.js +93 -0
  4. package/dist/components/button.es.js +1 -1
  5. package/dist/components/checkbox.es.js +95 -55
  6. package/dist/components/collapsable.es.js +1 -1
  7. package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-C2ohjDhp.js → collapsable.scss_vue_type_style_index_0_src_true_lang-6HkNT8L9.js} +1 -1
  8. package/dist/components/datepicker.es.js +1 -1
  9. package/dist/components/directAccess.es.js +1 -1
  10. package/dist/components/dragAndDrop.es.js +1 -1
  11. package/dist/components/dropdown.es.js +1 -1
  12. package/dist/components/fileUploadItem.es.js +45 -34
  13. package/dist/components/filterChip.es.js +1 -1
  14. package/dist/components/filterTag.es.js +1 -1
  15. package/dist/components/{icon-svg-arye8CV8.js → icon-svg-C8XeOnqu.js} +805 -767
  16. package/dist/components/iconList.es.js +1 -1
  17. package/dist/components/iconSvg.es.js +1 -1
  18. package/dist/components/index.es.js +59 -56
  19. package/dist/components/infoBox.es.js +1 -1
  20. package/dist/components/link.es.js +1 -1
  21. package/dist/components/modal.es.js +93 -56
  22. package/dist/components/multiselect.es.js +77 -74
  23. package/dist/components/persistentToast.es.js +1 -1
  24. package/dist/components/popover.es.js +107 -74
  25. package/dist/components/popoverMenu.es.js +98 -75
  26. package/dist/components/progressBar.es.js +1 -1
  27. package/dist/components/quantitySelector.es.js +1 -1
  28. package/dist/components/radioButton.es.js +1 -1
  29. package/dist/components/selectionChip.es.js +1 -1
  30. package/dist/components/sidedrawer.es.js +1 -1
  31. package/dist/components/style/accordion.css +1 -1
  32. package/dist/components/style/badge.css +1 -0
  33. package/dist/components/style/checkbox.css +1 -1
  34. package/dist/components/style/fileUploadItem.css +1 -1
  35. package/dist/components/style/modal.css +1 -1
  36. package/dist/components/style/popover.css +1 -1
  37. package/dist/components/style/popoverMenu.css +1 -1
  38. package/dist/components/style/textField.css +1 -1
  39. package/dist/components/switch.es.js +1 -1
  40. package/dist/components/tabBar.es.js +1 -1
  41. package/dist/components/tableslotedcomponent.es.js +1 -1
  42. package/dist/components/tag.es.js +1 -1
  43. package/dist/components/textArea.es.js +1 -1
  44. package/dist/components/textField.es.js +131 -120
  45. package/dist/components/tooltip.es.js +1 -1
  46. package/dist/energy-components.es.js +5538 -5243
  47. package/dist/energy-components.umd.js +2 -2
  48. package/dist/style.css +1 -1
  49. package/dist/types/src/components/content/accordion/accordion.vue.d.ts +14 -0
  50. package/dist/types/src/components/feedback/badge/badge.vue.d.ts +119 -0
  51. package/dist/types/src/components/index.d.ts +1 -0
  52. package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +60 -0
  53. package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +17 -0
  54. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +1 -1
  55. package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -0
  56. package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +3 -0
  57. package/dist/types/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +2 -2
@@ -1,12 +1,15 @@
1
- import { defineComponent as M, ref as N, computed as c, createElementBlock as l, openBlock as o, normalizeClass as $, createElementVNode as r, renderSlot as v, createVNode as p, createCommentVNode as n, toDisplayString as m, withModifiers as I } from "vue";
2
- import { R as g } from "./icon-svg-arye8CV8.js";
3
- import z from "./progressBar.es.js";
4
- import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/fileUploadItem.css';const R = ["id"], w = { class: "rds-e-file-upload-item__icon-container" }, E = { class: "rds-e-file-upload-item__details" }, F = { class: "rds-e-file-upload-item__info-wrapper" }, x = { class: "rds-e-file-upload-item__name" }, D = {
1
+ import { defineComponent as M, ref as z, computed as c, createElementBlock as s, openBlock as l, normalizeClass as N, createElementVNode as n, renderSlot as v, createVNode as p, createCommentVNode as r, toDisplayString as f, withModifiers as $ } from "vue";
2
+ import { R as g } from "./icon-svg-C8XeOnqu.js";
3
+ import w from "./progressBar.es.js";
4
+ import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import './style/fileUploadItem.css';const C = ["id"], F = { class: "rds-e-file-upload-item__icon-container" }, R = { class: "rds-e-file-upload-item__details" }, E = { class: "rds-e-file-upload-item__info-wrapper" }, x = { class: "rds-e-file-upload-item__name" }, D = {
6
6
  key: 0,
7
7
  class: "rds-e-file-upload-item__meta"
8
- }, P = { class: "rds-e-file-upload-item__size" }, V = {
8
+ }, P = {
9
9
  key: 0,
10
+ class: "rds-e-file-upload-item__size"
11
+ }, V = {
12
+ key: 1,
10
13
  class: "rds-e-file-upload-item__time-remaining"
11
14
  }, q = {
12
15
  key: 1,
@@ -105,28 +108,36 @@ import './style/fileUploadItem.css';const R = ["id"], w = { class: "rds-e-file-u
105
108
  showProgressBar: {
106
109
  type: Boolean,
107
110
  default: !1
111
+ },
112
+ /**
113
+ * Indica si se debe mostrar el tamaño del archivo.
114
+ * Si es false, el tamaño no se muestra.
115
+ */
116
+ showFileSize: {
117
+ type: Boolean,
118
+ default: !0
108
119
  }
109
120
  },
110
121
  emits: ["action"],
111
- setup(e, { emit: _ }) {
112
- const s = e, b = _, f = N(!1), a = c(() => s.disabled ? "disabled" : s.status), y = c(() => {
122
+ setup(e, { emit: y }) {
123
+ const o = e, b = y, m = z(!1), a = c(() => o.disabled ? "disabled" : o.status), _ = c(() => {
113
124
  const t = [`rds-e-file-upload-item--${a.value}`];
114
- return f.value && a.value !== "disabled" && a.value !== "uploading" && a.value !== "error" && t.push("rds-e-file-upload-item--hover"), t;
115
- }), h = c(() => s.fileIcon), S = c(() => {
116
- const t = s.fileSize;
125
+ return m.value && a.value !== "disabled" && a.value !== "uploading" && a.value !== "error" && t.push("rds-e-file-upload-item--hover"), t;
126
+ }), h = c(() => o.fileIcon), S = c(() => {
127
+ const t = o.fileSize;
117
128
  if (t === 0) return "0 Bytes";
118
129
  const i = 1024, d = ["Bytes", "KB", "MB", "GB", "TB"], u = Math.floor(Math.log(t) / Math.log(i)), k = u === 1 ? 0 : u > 1 ? 1 : 0;
119
130
  return `${Number.parseFloat((t / i ** u).toFixed(k))} ${d[u]}`;
120
131
  }), B = (t) => {
121
- !s.disabled && t && b("action", { actionType: t.type, fileId: s.id });
132
+ !o.disabled && t && b("action", { actionType: t.type, fileId: o.id });
122
133
  };
123
- return (t, i) => (o(), l("div", {
134
+ return (t, i) => (l(), s("div", {
124
135
  id: e.id,
125
- class: $(["rds-e-file-upload-item rds-radius-inputs", [y.value]]),
126
- onMouseover: i[1] || (i[1] = (d) => f.value = !0),
127
- onMouseleave: i[2] || (i[2] = (d) => f.value = !1)
136
+ class: N(["rds-e-file-upload-item rds-radius-inputs", [_.value]]),
137
+ onMouseover: i[1] || (i[1] = (d) => m.value = !0),
138
+ onMouseleave: i[2] || (i[2] = (d) => m.value = !1)
128
139
  }, [
129
- r("div", w, [
140
+ n("div", F, [
130
141
  v(t.$slots, "file-icon", {}, () => [
131
142
  p(g, {
132
143
  name: h.value,
@@ -135,17 +146,17 @@ import './style/fileUploadItem.css';const R = ["id"], w = { class: "rds-e-file-u
135
146
  }, null, 8, ["name"])
136
147
  ], !0)
137
148
  ]),
138
- r("div", E, [
139
- r("div", F, [
140
- r("span", x, m(e.fileName), 1),
141
- a.value !== "error" ? (o(), l("div", D, [
142
- r("span", P, m(S.value), 1),
143
- a.value === "uploading" && e.timeRemaining ? (o(), l("span", V, m(e.timeRemaining), 1)) : n("", !0)
144
- ])) : n("", !0),
145
- a.value === "error" && e.errorMessage ? (o(), l("div", q, m(e.errorMessage), 1)) : n("", !0)
149
+ n("div", R, [
150
+ n("div", E, [
151
+ n("span", x, f(e.fileName), 1),
152
+ a.value !== "error" ? (l(), s("div", D, [
153
+ e.showFileSize ? (l(), s("span", P, f(S.value), 1)) : r("", !0),
154
+ a.value === "uploading" && e.timeRemaining ? (l(), s("span", V, f(e.timeRemaining), 1)) : r("", !0)
155
+ ])) : r("", !0),
156
+ a.value === "error" && e.errorMessage ? (l(), s("div", q, f(e.errorMessage), 1)) : r("", !0)
146
157
  ]),
147
- a.value === "uploading" && e.showProgressBar ? (o(), l("div", T, [
148
- p(z, {
158
+ a.value === "uploading" && e.showProgressBar ? (l(), s("div", T, [
159
+ p(w, {
149
160
  id: e.id,
150
161
  class: "rds-e-file-upload-item__progress-bar",
151
162
  step: e.progress,
@@ -156,29 +167,29 @@ import './style/fileUploadItem.css';const R = ["id"], w = { class: "rds-e-file-u
156
167
  "hide-counter": "",
157
168
  inverse: ""
158
169
  }, null, 8, ["id", "step"])
159
- ])) : n("", !0)
170
+ ])) : r("", !0)
160
171
  ]),
161
- r("div", j, [
172
+ n("div", j, [
162
173
  v(t.$slots, "action", {}, () => [
163
- e.action ? (o(), l("button", {
174
+ e.action ? (l(), s("button", {
164
175
  key: 0,
165
176
  type: "button",
166
177
  class: "rds-e-file-upload-item__action-button",
167
178
  "aria-label": e.action.label || "Eliminar archivo",
168
179
  disabled: e.disabled,
169
- onClick: i[0] || (i[0] = I((d) => B(e.action), ["stop"]))
180
+ onClick: i[0] || (i[0] = $((d) => B(e.action), ["stop"]))
170
181
  }, [
171
182
  p(g, {
172
183
  name: e.action.icon,
173
184
  class: "rds-e-file-upload-item__action-icon",
174
185
  "aria-hidden": "true"
175
186
  }, null, 8, ["name"])
176
- ], 8, A)) : n("", !0)
187
+ ], 8, A)) : r("", !0)
177
188
  ], !0)
178
189
  ])
179
- ], 42, R));
190
+ ], 42, C));
180
191
  }
181
- }), J = /* @__PURE__ */ C(G, [["__scopeId", "data-v-acd37774"]]);
192
+ }), J = /* @__PURE__ */ I(G, [["__scopeId", "data-v-5ff636f4"]]);
182
193
  export {
183
194
  J as default
184
195
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as g, ref as b, computed as s, createElementBlock as a, openBlock as l, normalizeClass as y, createCommentVNode as r, createElementVNode as k, createBlock as c, toDisplayString as n } from "vue";
2
- import { R as o } from "./icon-svg-arye8CV8.js";
2
+ import { R as o } from "./icon-svg-C8XeOnqu.js";
3
3
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/filterChip.css';const _ = ["id", "disabled"], I = {
5
5
  key: 0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, ref as m, createElementBlock as b, openBlock as g, withKeys as s, normalizeClass as v, createElementVNode as x, createVNode as p, toDisplayString as y, withModifiers as l } from "vue";
2
- import { R as S } from "./icon-svg-arye8CV8.js";
2
+ import { R as S } from "./icon-svg-C8XeOnqu.js";
3
3
  import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/filterTag.css';const w = ["id", "aria-disabled", "tabindex"], _ = { class: "rds-e-filter-tag__text" }, k = /* @__PURE__ */ u({
5
5
  __name: "filter-tag",