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.
- package/dist/components/accordion.es.js +60 -50
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/badge.es.js +93 -0
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +95 -55
- package/dist/components/collapsable.es.js +1 -1
- 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
- package/dist/components/datepicker.es.js +1 -1
- package/dist/components/directAccess.es.js +1 -1
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +1 -1
- package/dist/components/fileUploadItem.es.js +45 -34
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/filterTag.es.js +1 -1
- package/dist/components/{icon-svg-arye8CV8.js → icon-svg-C8XeOnqu.js} +805 -767
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +59 -56
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/modal.es.js +93 -56
- package/dist/components/multiselect.es.js +77 -74
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/popover.es.js +107 -74
- package/dist/components/popoverMenu.es.js +98 -75
- 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/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/badge.css +1 -0
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/popoverMenu.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +1 -1
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +1 -1
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +131 -120
- package/dist/components/tooltip.es.js +1 -1
- package/dist/energy-components.es.js +5538 -5243
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/accordion/accordion.vue.d.ts +14 -0
- package/dist/types/src/components/feedback/badge/badge.vue.d.ts +119 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +60 -0
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +17 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -0
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +3 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { defineComponent as M, ref as
|
|
2
|
-
import { R as g } from "./icon-svg-
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/fileUploadItem.css';const
|
|
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 = {
|
|
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
|
|
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
|
|
115
|
-
}), h = c(() =>
|
|
116
|
-
const t =
|
|
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
|
-
!
|
|
132
|
+
!o.disabled && t && b("action", { actionType: t.type, fileId: o.id });
|
|
122
133
|
};
|
|
123
|
-
return (t, i) => (
|
|
134
|
+
return (t, i) => (l(), s("div", {
|
|
124
135
|
id: e.id,
|
|
125
|
-
class:
|
|
126
|
-
onMouseover: i[1] || (i[1] = (d) =>
|
|
127
|
-
onMouseleave: i[2] || (i[2] = (d) =>
|
|
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
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
a.value !== "error" ? (
|
|
142
|
-
|
|
143
|
-
a.value === "uploading" && e.timeRemaining ? (
|
|
144
|
-
])) :
|
|
145
|
-
a.value === "error" && e.errorMessage ? (
|
|
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 ? (
|
|
148
|
-
p(
|
|
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
|
-
])) :
|
|
170
|
+
])) : r("", !0)
|
|
160
171
|
]),
|
|
161
|
-
|
|
172
|
+
n("div", j, [
|
|
162
173
|
v(t.$slots, "action", {}, () => [
|
|
163
|
-
e.action ? (
|
|
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] =
|
|
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)) :
|
|
187
|
+
], 8, A)) : r("", !0)
|
|
177
188
|
], !0)
|
|
178
189
|
])
|
|
179
|
-
], 42,
|
|
190
|
+
], 42, C));
|
|
180
191
|
}
|
|
181
|
-
}), J = /* @__PURE__ */
|
|
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-
|
|
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-
|
|
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",
|