energy-components 1.14.2 → 1.15.1
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/README.md +1 -1
- package/dist/components/accordion.es.js +30 -27
- package/dist/components/actionButton.es.js +56 -11
- package/dist/components/avatar.es.js +24 -16
- package/dist/components/breadcrumbs.es.js +37 -29
- package/dist/components/button.es.js +31 -22
- package/dist/components/card.es.js +17 -9
- package/dist/components/checkbox.es.js +67 -56
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-DfOWp1XD.js → collapsable.scss_vue_type_style_index_0_src_true_lang-CWwaY_PV.js} +1 -1
- package/dist/components/directAccess.es.js +26 -18
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +27 -27
- package/dist/components/fileUploadItem.es.js +23 -21
- package/dist/components/filterChip.es.js +22 -14
- package/dist/components/filterTag.es.js +27 -19
- package/dist/components/floating-ui.vue-7LKzPqHI.js +1148 -0
- package/dist/components/floatingActionButton.es.js +19 -11
- package/dist/components/{icon-svg-DuzOdbk1.js → icon-svg-BGa9K9qG.js} +993 -745
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +83 -77
- package/dist/components/indicator.es.js +37 -29
- package/dist/components/infoBox.es.js +47 -39
- package/dist/components/link.es.js +22 -13
- package/dist/components/loader.es.js +22 -21
- package/dist/components/modal.es.js +37 -28
- package/dist/components/overlay.es.js +21 -11
- package/dist/components/pagination.es.js +164 -109
- package/dist/components/persistentToast.es.js +32 -24
- package/dist/components/popover.es.js +166 -0
- package/dist/components/progressBar.es.js +30 -22
- package/dist/components/quantitySelector.es.js +60 -48
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +15 -7
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/snackBar.es.js +131 -0
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/avatar.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/card.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/infoBox.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/loader.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/popover.css +1 -0
- package/dist/components/style/progressBar.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/snackBar.css +1 -0
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/toggle.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +23 -15
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +31 -23
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +1 -1
- package/dist/components/toggle.es.js +20 -16
- package/dist/components/tooltip.es.js +71 -1019
- package/dist/energy-components.es.js +6847 -5846
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +47 -0
- package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +15 -0
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +15 -0
- package/dist/types/src/components/content/card/card.vue.d.ts +15 -0
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +1 -1
- package/dist/types/src/components/content/tag/tag.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/loader/loader.vue.d.ts +1 -1
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +180 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +15 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +24 -7
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +1 -1
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +15 -0
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +15 -0
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +4 -0
- package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +47 -0
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +35 -0
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +15 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ which is also available for use.
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
You need Vue.js version 3.2+ to use this library.
|
|
12
|
-
It's also necessary to install energy-foundations
|
|
12
|
+
It's also necessary to install energy-foundations on its [latest version](https://www.npmjs.com/package/energy-foundations?activeTab=versions).
|
|
13
13
|
|
|
14
14
|
**Yarn**
|
|
15
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as R, toRefs as B, ref as
|
|
2
|
-
import { R as I } from "./icon-svg-
|
|
1
|
+
import { defineComponent as R, toRefs as B, ref as s, watch as D, nextTick as N, inject as v, onMounted as V, onBeforeUnmount as q, createElementBlock as w, openBlock as _, createElementVNode as n, toDisplayString as h, createBlock as H, createCommentVNode as P, createVNode as T, unref as d, mergeProps as j, normalizeClass as y, renderSlot as A, createTextVNode as E } from "vue";
|
|
2
|
+
import { R as I } from "./icon-svg-BGa9K9qG.js";
|
|
3
3
|
import O from "./tag.es.js";
|
|
4
4
|
import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
import './style/accordion.css';const b =
|
|
5
|
+
import './style/accordion.css';const b = ["id"], z = { class: "rds-e-accordion-title" }, M = { class: "rds-e-accordion-title_right" }, U = /* @__PURE__ */ R({
|
|
6
6
|
__name: "accordion",
|
|
7
7
|
props: {
|
|
8
8
|
/**
|
|
@@ -43,22 +43,22 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
emits: ["update:open"],
|
|
46
|
-
setup(
|
|
47
|
-
const o =
|
|
48
|
-
if (!
|
|
49
|
-
const e =
|
|
50
|
-
|
|
51
|
-
},
|
|
46
|
+
setup(r, { expose: C, emit: S }) {
|
|
47
|
+
const o = r, k = S, { tag: c } = B(o), t = s(o.open), a = s(null), l = s(null), x = () => {
|
|
48
|
+
if (!a.value || !l.value) return;
|
|
49
|
+
const e = l.value.scrollHeight;
|
|
50
|
+
a.value.style.maxHeight = t.value ? `${e}px` : "0px";
|
|
51
|
+
}, i = (e) => {
|
|
52
52
|
e === void 0 ? t.value = !t.value : t.value = e, k("update:open", t.value), x();
|
|
53
|
-
}, p = () => {
|
|
54
|
-
r(!0);
|
|
55
53
|
}, u = () => {
|
|
56
|
-
|
|
54
|
+
i(!0);
|
|
55
|
+
}, p = () => {
|
|
56
|
+
i(!1);
|
|
57
57
|
};
|
|
58
58
|
D(
|
|
59
59
|
() => o.open,
|
|
60
60
|
(e) => N(() => {
|
|
61
|
-
|
|
61
|
+
i(e);
|
|
62
62
|
}),
|
|
63
63
|
{ immediate: !0 }
|
|
64
64
|
);
|
|
@@ -66,8 +66,8 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
|
|
|
66
66
|
return V(() => {
|
|
67
67
|
m && m({
|
|
68
68
|
id: o.id,
|
|
69
|
-
open:
|
|
70
|
-
close:
|
|
69
|
+
open: u,
|
|
70
|
+
close: p
|
|
71
71
|
});
|
|
72
72
|
}), q(() => {
|
|
73
73
|
f && f(o.id);
|
|
@@ -75,22 +75,25 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
|
|
|
75
75
|
/**
|
|
76
76
|
* Abre el panel.
|
|
77
77
|
*/
|
|
78
|
-
openPanel:
|
|
78
|
+
openPanel: u,
|
|
79
79
|
/**
|
|
80
80
|
* Cierra el panel.
|
|
81
81
|
*/
|
|
82
|
-
closePanel:
|
|
83
|
-
}), (e, g) => (_(), w("div",
|
|
82
|
+
closePanel: p
|
|
83
|
+
}), (e, g) => (_(), w("div", {
|
|
84
|
+
id: r.id,
|
|
85
|
+
class: "rds-e-accordion"
|
|
86
|
+
}, [
|
|
84
87
|
n("div", {
|
|
85
88
|
class: "rds-e-accordion-title_container",
|
|
86
|
-
onClick: g[0] || (g[0] = () =>
|
|
89
|
+
onClick: g[0] || (g[0] = () => i())
|
|
87
90
|
}, [
|
|
88
|
-
n("span", z, h(
|
|
91
|
+
n("span", z, h(r.title), 1),
|
|
89
92
|
n("div", M, [
|
|
90
|
-
d(
|
|
93
|
+
d(c) && d(c).icon ? (_(), H(O, j({
|
|
91
94
|
key: 0,
|
|
92
95
|
class: "rds-e-accordion-title_tag"
|
|
93
|
-
}, d(
|
|
96
|
+
}, d(c), { small: "" }), null, 16)) : P("", !0),
|
|
94
97
|
T(I, {
|
|
95
98
|
class: y(["rds-e-accordion-title_icon", { "rds-e-accordion-title_icon--open": t.value }]),
|
|
96
99
|
name: "arrow_down"
|
|
@@ -99,22 +102,22 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
|
|
|
99
102
|
]),
|
|
100
103
|
n("div", {
|
|
101
104
|
ref_key: "panel",
|
|
102
|
-
ref:
|
|
105
|
+
ref: a,
|
|
103
106
|
class: y(["rds-e-accordion-panel", { "rds-e-accordion-panel--open": t.value }])
|
|
104
107
|
}, [
|
|
105
108
|
n("div", {
|
|
106
109
|
ref_key: "panelContent",
|
|
107
|
-
ref:
|
|
110
|
+
ref: l,
|
|
108
111
|
class: "rds-e-accordion-panel_content"
|
|
109
112
|
}, [
|
|
110
113
|
A(e.$slots, "default", {}, () => [
|
|
111
|
-
E(h(
|
|
114
|
+
E(h(r.content), 1)
|
|
112
115
|
], !0)
|
|
113
116
|
], 512)
|
|
114
117
|
], 2)
|
|
115
|
-
]));
|
|
118
|
+
], 8, b));
|
|
116
119
|
}
|
|
117
|
-
}), L = /* @__PURE__ */ $(U, [["__scopeId", "data-v-
|
|
120
|
+
}), L = /* @__PURE__ */ $(U, [["__scopeId", "data-v-620f5458"]]);
|
|
118
121
|
export {
|
|
119
122
|
L as default
|
|
120
123
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as r, createBlock as o, openBlock as i, withCtx as l, createVNode as d, mergeProps as n } from "vue";
|
|
2
|
+
import a from "./button.es.js";
|
|
3
|
+
import s from "./tooltip.es.js";
|
|
4
|
+
import { _ as p } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/actionButton.css';const c = /* @__PURE__ */ r({
|
|
5
6
|
__name: "action-button",
|
|
6
7
|
props: {
|
|
7
8
|
/**
|
|
@@ -19,8 +20,8 @@ import './style/actionButton.css';const p = /* @__PURE__ */ o({
|
|
|
19
20
|
variant: {
|
|
20
21
|
type: String,
|
|
21
22
|
default: "primary",
|
|
22
|
-
validator(
|
|
23
|
-
return ["primary", "secondary", "ghost"].includes(
|
|
23
|
+
validator(t) {
|
|
24
|
+
return ["primary", "secondary", "ghost"].includes(t);
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
/**
|
|
@@ -50,15 +51,59 @@ import './style/actionButton.css';const p = /* @__PURE__ */ o({
|
|
|
50
51
|
loading: {
|
|
51
52
|
type: Boolean,
|
|
52
53
|
default: !1
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* <span>ID del botón para testing</span>
|
|
57
|
+
*/
|
|
58
|
+
id: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: void 0
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* <span>Contenido del tooltip. Si se proporciona, se mostrará el tooltip al hacer hover</span>
|
|
64
|
+
*/
|
|
65
|
+
tooltip: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ""
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* <span>Posición del tooltip (top, bottom, left, right). Si no se especifica, se posiciona automáticamente</span>
|
|
71
|
+
*/
|
|
72
|
+
tooltipPosition: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: void 0,
|
|
75
|
+
validator(t) {
|
|
76
|
+
return t === void 0 || ["top", "bottom", "left", "right"].includes(t);
|
|
77
|
+
}
|
|
53
78
|
}
|
|
54
79
|
},
|
|
55
|
-
setup(
|
|
56
|
-
return (
|
|
80
|
+
setup(t) {
|
|
81
|
+
return (e, f) => t.tooltip ? (i(), o(s, {
|
|
82
|
+
key: 0,
|
|
83
|
+
content: t.tooltip,
|
|
84
|
+
placement: t.tooltipPosition || void 0,
|
|
85
|
+
inverse: t.inverse
|
|
86
|
+
}, {
|
|
87
|
+
default: l(() => [
|
|
88
|
+
d(a, n({
|
|
89
|
+
id: t.id,
|
|
90
|
+
class: "rds-e-btn--action"
|
|
91
|
+
}, { ...e.$props, ...e.$attrs }, {
|
|
92
|
+
text: "",
|
|
93
|
+
"is-action": ""
|
|
94
|
+
}), null, 16, ["id"])
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["content", "placement", "inverse"])) : (i(), o(a, n({
|
|
98
|
+
key: 1,
|
|
99
|
+
id: t.id,
|
|
100
|
+
class: "rds-e-btn--action"
|
|
101
|
+
}, { ...e.$props, ...e.$attrs }, {
|
|
57
102
|
text: "",
|
|
58
103
|
"is-action": ""
|
|
59
|
-
}), null, 16));
|
|
104
|
+
}), null, 16, ["id"]));
|
|
60
105
|
}
|
|
61
|
-
}),
|
|
106
|
+
}), g = /* @__PURE__ */ p(c, [["__scopeId", "data-v-765c5af6"]]);
|
|
62
107
|
export {
|
|
63
|
-
|
|
108
|
+
g as default
|
|
64
109
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as C } from "./icon-svg-
|
|
1
|
+
import { defineComponent as h, computed as a, createElementBlock as s, openBlock as n, withKeys as o, normalizeStyle as u, normalizeClass as k, createBlock as _, createCommentVNode as b, toDisplayString as z } from "vue";
|
|
2
|
+
import { R as C } from "./icon-svg-BGa9K9qG.js";
|
|
3
3
|
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
|
|
4
|
+
import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"], D = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "rds-e-avatar__initials"
|
|
7
7
|
}, N = {
|
|
8
8
|
key: 3,
|
|
9
9
|
class: "rds-e-avatar__badge",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
}, E = /* @__PURE__ */
|
|
11
|
+
}, E = /* @__PURE__ */ h({
|
|
12
12
|
__name: "avatar",
|
|
13
13
|
props: {
|
|
14
14
|
/**
|
|
@@ -78,6 +78,13 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
|
|
|
78
78
|
alt: {
|
|
79
79
|
type: String,
|
|
80
80
|
default: "Avatar"
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* ID del avatar para testing
|
|
84
|
+
*/
|
|
85
|
+
id: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: void 0
|
|
81
88
|
}
|
|
82
89
|
},
|
|
83
90
|
emits: ["click"],
|
|
@@ -87,7 +94,7 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
|
|
|
87
94
|
m: "32px",
|
|
88
95
|
l: "40px",
|
|
89
96
|
xl: "48px"
|
|
90
|
-
}, v = a(() => `rds-e-avatar--${e.size}`),
|
|
97
|
+
}, v = a(() => `rds-e-avatar--${e.size}`), r = a(() => !e.initials || typeof e.initials != "string" ? "" : e.initials.trim().substring(0, 2).toUpperCase()), y = a(() => {
|
|
91
98
|
switch (e.size) {
|
|
92
99
|
case "s":
|
|
93
100
|
return "10px";
|
|
@@ -109,7 +116,7 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
|
|
|
109
116
|
fontSize: y.value,
|
|
110
117
|
lineHeight: i
|
|
111
118
|
};
|
|
112
|
-
}), c = a(() => e.type === "icon" && e.iconName ? e.iconName : "user_default"),
|
|
119
|
+
}), c = a(() => e.type === "icon" && e.iconName ? e.iconName : "user_default"), g = a(() => {
|
|
113
120
|
switch (e.size) {
|
|
114
121
|
case "s":
|
|
115
122
|
return "12px";
|
|
@@ -122,14 +129,15 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
|
|
|
122
129
|
default:
|
|
123
130
|
return "20px";
|
|
124
131
|
}
|
|
125
|
-
}),
|
|
126
|
-
fontSize:
|
|
132
|
+
}), x = a(() => ({
|
|
133
|
+
fontSize: g.value,
|
|
127
134
|
color: "#001E37"
|
|
128
|
-
})), S = a(() => e.alt && e.type === "image" ? e.alt : e.type === "initials" &&
|
|
135
|
+
})), S = a(() => e.alt && e.type === "image" ? e.alt : e.type === "initials" && r.value ? `Avatar con iniciales ${r.value}` : e.type === "icon" ? `Avatar con icono ${c.value}` : e.badge ? "Avatar de usuario con notificación" : "Avatar de usuario"), l = (i) => {
|
|
129
136
|
p("click", i);
|
|
130
137
|
};
|
|
131
|
-
return (i, I) => (
|
|
132
|
-
|
|
138
|
+
return (i, I) => (n(), s("div", {
|
|
139
|
+
id: t.id,
|
|
140
|
+
class: k(["rds-e-avatar", [v.value]]),
|
|
133
141
|
style: u(f.value),
|
|
134
142
|
role: "button",
|
|
135
143
|
tabindex: "0",
|
|
@@ -140,22 +148,22 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
|
|
|
140
148
|
o(l, ["space"])
|
|
141
149
|
]
|
|
142
150
|
}, [
|
|
143
|
-
t.type === "image" && t.src ? (
|
|
151
|
+
t.type === "image" && t.src ? (n(), s("img", {
|
|
144
152
|
key: 0,
|
|
145
153
|
src: t.src,
|
|
146
154
|
alt: t.alt,
|
|
147
155
|
class: "rds-e-avatar__image"
|
|
148
|
-
}, null, 8, B)) : t.type === "initials" &&
|
|
156
|
+
}, null, 8, B)) : t.type === "initials" && r.value ? (n(), s("span", D, z(r.value), 1)) : (n(), _(C, {
|
|
149
157
|
key: 2,
|
|
150
158
|
name: c.value,
|
|
151
159
|
class: "rds-e-avatar__icon",
|
|
152
|
-
style: u(
|
|
160
|
+
style: u(x.value),
|
|
153
161
|
"aria-hidden": "true"
|
|
154
162
|
}, null, 8, ["name", "style"])),
|
|
155
|
-
t.badge ? (
|
|
163
|
+
t.badge ? (n(), s("span", N)) : b("", !0)
|
|
156
164
|
], 46, A));
|
|
157
165
|
}
|
|
158
|
-
}), R = /* @__PURE__ */ w(E, [["__scopeId", "data-v-
|
|
166
|
+
}), R = /* @__PURE__ */ w(E, [["__scopeId", "data-v-11470780"]]);
|
|
159
167
|
export {
|
|
160
168
|
R as default
|
|
161
169
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as h, toRefs as
|
|
2
|
-
import
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/breadcrumbs.css';const
|
|
1
|
+
import { defineComponent as h, toRefs as y, ref as C, watchEffect as L, onMounted as T, createElementBlock as i, openBlock as u, Fragment as I, renderList as w, normalizeClass as x, unref as B, createVNode as j, mergeProps as E, toHandlers as P, withCtx as S, createCommentVNode as D } from "vue";
|
|
2
|
+
import N from "./link.es.js";
|
|
3
|
+
import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/breadcrumbs.css';const R = ["id"], V = { key: 0 }, $ = /* @__PURE__ */ h({
|
|
5
5
|
__name: "breadcrumbs",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -31,17 +31,24 @@ import './style/breadcrumbs.css';const S = { key: 0 }, V = /* @__PURE__ */ h({
|
|
|
31
31
|
leftTrim: {
|
|
32
32
|
type: Boolean,
|
|
33
33
|
default: !1
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* ID del breadcrumbs para testing
|
|
37
|
+
*/
|
|
38
|
+
id: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: void 0
|
|
34
41
|
}
|
|
35
42
|
},
|
|
36
43
|
emits: ["onClickTrimmedList"],
|
|
37
|
-
setup(
|
|
38
|
-
const s =
|
|
44
|
+
setup(a, { emit: v }) {
|
|
45
|
+
const s = a, d = v, {
|
|
39
46
|
items: r,
|
|
40
|
-
inverse:
|
|
41
|
-
} =
|
|
42
|
-
s.leftTrim ?
|
|
47
|
+
inverse: n
|
|
48
|
+
} = y(s), l = C(), m = () => {
|
|
49
|
+
s.leftTrim ? d("onClickTrimmedList", r.value.slice(0, -2)) : d("onClickTrimmedList", r.value.slice(1, -1));
|
|
43
50
|
}, p = () => {
|
|
44
|
-
|
|
51
|
+
l.value = [
|
|
45
52
|
r.value[0],
|
|
46
53
|
{
|
|
47
54
|
text: "...",
|
|
@@ -53,7 +60,7 @@ import './style/breadcrumbs.css';const S = { key: 0 }, V = /* @__PURE__ */ h({
|
|
|
53
60
|
r.value[r.value.length - 1]
|
|
54
61
|
];
|
|
55
62
|
}, b = () => {
|
|
56
|
-
|
|
63
|
+
l.value = [
|
|
57
64
|
{
|
|
58
65
|
text: "...",
|
|
59
66
|
active: !1,
|
|
@@ -64,47 +71,48 @@ import './style/breadcrumbs.css';const S = { key: 0 }, V = /* @__PURE__ */ h({
|
|
|
64
71
|
r.value[r.value.length - 2],
|
|
65
72
|
r.value[r.value.length - 1]
|
|
66
73
|
];
|
|
67
|
-
},
|
|
68
|
-
s.trimItems && r.value.length >= 3 ? p() : s.leftTrim && r.value.length >= 3 ? b() : typeof s.items == "object" ?
|
|
69
|
-
}, k = (e,
|
|
74
|
+
}, f = () => {
|
|
75
|
+
s.trimItems && r.value.length >= 3 ? p() : s.leftTrim && r.value.length >= 3 ? b() : typeof s.items == "object" ? l.value = s.items : console.error("energy-components: The prop is not an Object");
|
|
76
|
+
}, k = (e, o) => {
|
|
70
77
|
const t = {
|
|
71
78
|
...e,
|
|
72
|
-
inverse:
|
|
79
|
+
inverse: n.value,
|
|
73
80
|
customClass: "rds-e-breadcrumbs__link--text"
|
|
74
81
|
};
|
|
75
|
-
return
|
|
82
|
+
return o !== l.value.length - 1 && Object.assign(t, {
|
|
76
83
|
arrow: !0,
|
|
77
84
|
right: !0,
|
|
78
85
|
arrowSmall: !0
|
|
79
86
|
}), t;
|
|
80
87
|
}, _ = (e) => ({
|
|
81
88
|
click: (t) => {
|
|
82
|
-
t.preventDefault(), t.stopPropagation(), e != null && e.clickable &&
|
|
89
|
+
t.preventDefault(), t.stopPropagation(), e != null && e.clickable && m();
|
|
83
90
|
}
|
|
84
91
|
}), g = (e) => [
|
|
85
92
|
"rds-e-breadcrumbs__link",
|
|
86
93
|
e != null && e.active ? "rds-e-breadcrumbs__link--active" : "",
|
|
87
|
-
|
|
94
|
+
n.value && (e != null && e.active) ? "rds-e-breadcrumbs__link--inverse-active" : ""
|
|
88
95
|
];
|
|
89
96
|
return L(() => {
|
|
90
|
-
|
|
97
|
+
f();
|
|
91
98
|
}), T(() => {
|
|
92
|
-
|
|
93
|
-
}), (e,
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
f();
|
|
100
|
+
}), (e, o) => (u(!0), i(I, null, w(l.value, (t, c) => (u(), i("ul", {
|
|
101
|
+
id: a.id ? `${a.id}-${c}` : void 0,
|
|
102
|
+
key: c,
|
|
103
|
+
class: x(["rds-e-breadcrumbs", `${B(n) ? "rds-e-breadcrumbs--inverse" : ""}`])
|
|
96
104
|
}, [
|
|
97
|
-
j(
|
|
105
|
+
j(N, E({
|
|
98
106
|
class: g(t)
|
|
99
|
-
}, { ref_for: !0 }, k(t,
|
|
100
|
-
default:
|
|
101
|
-
t != null && t.clickable ? (
|
|
107
|
+
}, { ref_for: !0 }, k(t, c), P(_(t))), {
|
|
108
|
+
default: S(() => [
|
|
109
|
+
t != null && t.clickable ? (u(), i("span", V, "...")) : D("", !0)
|
|
102
110
|
]),
|
|
103
111
|
_: 2
|
|
104
112
|
}, 1040, ["class"])
|
|
105
|
-
],
|
|
113
|
+
], 10, R))), 128));
|
|
106
114
|
}
|
|
107
|
-
}), F = /* @__PURE__ */
|
|
115
|
+
}), F = /* @__PURE__ */ O($, [["__scopeId", "data-v-dfc178d7"]]);
|
|
108
116
|
export {
|
|
109
117
|
F as default
|
|
110
118
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/button.css';const
|
|
1
|
+
import { defineComponent as x, toRefs as I, computed as r, createElementBlock as $, openBlock as b, normalizeClass as m, unref as n, createBlock as k, createCommentVNode as C, createElementVNode as N, renderSlot as R, createTextVNode as V, toDisplayString as D } from "vue";
|
|
2
|
+
import { R as E } from "./icon-svg-BGa9K9qG.js";
|
|
3
|
+
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/button.css';const w = ["id", "type", "disabled"], W = { class: "rds-e-btn__text" }, j = /* @__PURE__ */ x({
|
|
5
5
|
__name: "button",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -102,12 +102,19 @@ import './style/button.css';const L = ["type", "disabled"], w = { class: "rds-e-
|
|
|
102
102
|
destructive: {
|
|
103
103
|
type: Boolean,
|
|
104
104
|
default: !1
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* <span>ID del botón para testing</span>
|
|
108
|
+
*/
|
|
109
|
+
id: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: void 0
|
|
105
112
|
}
|
|
106
113
|
},
|
|
107
114
|
setup(t) {
|
|
108
115
|
const a = t, {
|
|
109
116
|
text: l,
|
|
110
|
-
icon:
|
|
117
|
+
icon: s,
|
|
111
118
|
type: i,
|
|
112
119
|
variant: u,
|
|
113
120
|
small: p,
|
|
@@ -116,36 +123,38 @@ import './style/button.css';const L = ["type", "disabled"], w = { class: "rds-e-
|
|
|
116
123
|
inverse: c,
|
|
117
124
|
revertIcon: h,
|
|
118
125
|
loading: v,
|
|
119
|
-
destructive: _
|
|
120
|
-
|
|
126
|
+
destructive: _,
|
|
127
|
+
id: g
|
|
128
|
+
} = I(a), f = r(() => v.value ? "loading" : s != null && s.value ? s == null ? void 0 : s.value : ""), B = r(() => i.value && ["button", "submit", "reset"].includes(i.value) ? i.value : "button"), o = r(() => ["primary", "secondary", "ghost", "commercial"].includes(u.value) ? u.value : "primary"), S = r(() => {
|
|
121
129
|
const e = ["rds-e-btn"];
|
|
122
130
|
return u.value && e.push(`rds-e-btn--${o.value}`), c.value && e.push(`rds-e-btn--${o.value}-inverse`), f.value && e.push(
|
|
123
131
|
l != null && l.value ? "rds-e-btn--with-icon" : "rds-e-btn--icon"
|
|
124
132
|
), p.value && e.push("rds-e-btn--small"), h.value && e.push("rds-e-btn--revert"), d.value && e.push("rds-e-style-state-disabled"), v.value && e.push("rds-e-btn--loading"), y.value && e.push("rds-e-btn--mobile-width"), _.value && (o.value === "secondary" || o.value === "ghost") && e.push(`rds-e-btn--${o.value}-destructive`), e.join(" ");
|
|
125
133
|
});
|
|
126
|
-
return (e,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
134
|
+
return (e, z) => (b(), $("button", {
|
|
135
|
+
id: n(g),
|
|
136
|
+
type: B.value,
|
|
137
|
+
disabled: n(d),
|
|
138
|
+
class: m(S.value)
|
|
130
139
|
}, [
|
|
131
|
-
f.value ? (b(),
|
|
140
|
+
f.value ? (b(), k(E, {
|
|
132
141
|
key: 0,
|
|
133
142
|
name: f.value,
|
|
134
|
-
small:
|
|
143
|
+
small: n(p),
|
|
135
144
|
class: m(["rds-e-btn__icon", [
|
|
136
|
-
|
|
137
|
-
|
|
145
|
+
n(c) ? `rds-e-btn__icon--${n(c)}` : "",
|
|
146
|
+
n(d) ? "rds-e-btn__icon--disabled" : ""
|
|
138
147
|
]]),
|
|
139
148
|
"aria-hidden": "true"
|
|
140
|
-
}, null, 8, ["name", "small", "class"])) :
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
149
|
+
}, null, 8, ["name", "small", "class"])) : C("", !0),
|
|
150
|
+
N("span", W, [
|
|
151
|
+
R(e.$slots, "default", {}, () => [
|
|
152
|
+
V(D(n(l)), 1)
|
|
144
153
|
], !0)
|
|
145
154
|
])
|
|
146
|
-
], 10,
|
|
155
|
+
], 10, w));
|
|
147
156
|
}
|
|
148
|
-
}),
|
|
157
|
+
}), A = /* @__PURE__ */ L(j, [["__scopeId", "data-v-508169ab"]]);
|
|
149
158
|
export {
|
|
150
|
-
|
|
159
|
+
A as default
|
|
151
160
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import './style/card.css';const
|
|
1
|
+
import { defineComponent as o, createElementBlock as s, openBlock as d, normalizeClass as r, renderSlot as a } from "vue";
|
|
2
|
+
import { _ as c } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
import './style/card.css';const n = ["id"], i = /* @__PURE__ */ o({
|
|
4
4
|
__name: "card",
|
|
5
5
|
props: {
|
|
6
6
|
/**
|
|
@@ -9,16 +9,24 @@ import './style/card.css';const d = /* @__PURE__ */ s({
|
|
|
9
9
|
customClass: {
|
|
10
10
|
type: String,
|
|
11
11
|
default: ""
|
|
12
|
+
},
|
|
13
|
+
/**
|
|
14
|
+
* ID de la card para testing
|
|
15
|
+
*/
|
|
16
|
+
id: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: void 0
|
|
12
19
|
}
|
|
13
20
|
},
|
|
14
21
|
setup(e) {
|
|
15
|
-
return (t, l) => (
|
|
16
|
-
|
|
22
|
+
return (t, l) => (d(), s("div", {
|
|
23
|
+
id: e.id,
|
|
24
|
+
class: r(["rds-e-card", e.customClass])
|
|
17
25
|
}, [
|
|
18
|
-
|
|
19
|
-
],
|
|
26
|
+
a(t.$slots, "default", {}, void 0, !0)
|
|
27
|
+
], 10, n));
|
|
20
28
|
}
|
|
21
|
-
}),
|
|
29
|
+
}), p = /* @__PURE__ */ c(i, [["__scopeId", "data-v-efdb39c8"]]);
|
|
22
30
|
export {
|
|
23
|
-
|
|
31
|
+
p as default
|
|
24
32
|
};
|