energy-components 1.10.0 → 1.11.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/breadcrumbs.es.js +21 -19
- package/dist/components/button.es.js +56 -48
- package/dist/components/collapsable.es.js +4 -0
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-DfOWp1XD.js +86 -0
- package/dist/components/datepicker.es.js +717 -708
- package/dist/components/index.es.js +73 -70
- package/dist/components/link.es.js +59 -47
- package/dist/components/pagination.es.js +129 -80
- package/dist/components/sidedrawer.es.js +48 -43
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/collapsable.css +1 -0
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/tabBar.es.js +95 -84
- package/dist/components/textField.es.js +122 -108
- package/dist/energy-components.es.js +4468 -4276
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +53 -0
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +15 -0
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +7 -5
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +29 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as g, toRefs as h, ref as
|
|
1
|
+
import { defineComponent as g, toRefs as h, ref as C, watchEffect as y, onMounted as L, createElementBlock as c, openBlock as l, Fragment as I, renderList as w, normalizeClass as x, unref as B, createVNode as j, mergeProps as E, toHandlers as P, withCtx as T, createCommentVNode as D } from "vue";
|
|
2
2
|
import N from "./link.es.js";
|
|
3
3
|
import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/breadcrumbs.css';const R = { key: 0 },
|
|
4
|
+
import './style/breadcrumbs.css';const R = { key: 0 }, S = /* @__PURE__ */ g({
|
|
5
5
|
__name: "breadcrumbs",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -28,14 +28,14 @@ import './style/breadcrumbs.css';const R = { key: 0 }, V = /* @__PURE__ */ g({
|
|
|
28
28
|
},
|
|
29
29
|
emits: ["onClickTrimmedList"],
|
|
30
30
|
setup(d, { emit: p }) {
|
|
31
|
-
const
|
|
32
|
-
items:
|
|
31
|
+
const t = d, f = p, {
|
|
32
|
+
items: s,
|
|
33
33
|
inverse: o
|
|
34
|
-
} = h(
|
|
35
|
-
f("onClickTrimmedList",
|
|
36
|
-
},
|
|
34
|
+
} = h(t), n = C(), m = () => {
|
|
35
|
+
f("onClickTrimmedList", s.value.slice(1, -1));
|
|
36
|
+
}, v = () => {
|
|
37
37
|
n.value = [
|
|
38
|
-
|
|
38
|
+
s.value[0],
|
|
39
39
|
{
|
|
40
40
|
text: "...",
|
|
41
41
|
active: !1,
|
|
@@ -43,29 +43,31 @@ import './style/breadcrumbs.css';const R = { key: 0 }, V = /* @__PURE__ */ g({
|
|
|
43
43
|
to: "",
|
|
44
44
|
clickable: !0
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
s.value[s.value.length - 1]
|
|
47
47
|
];
|
|
48
48
|
}, u = () => {
|
|
49
|
-
|
|
50
|
-
},
|
|
49
|
+
t.trimItems && s.value.length > 3 ? v() : typeof t.items == "object" ? n.value = t.items : console.error("energy-components: The prop is not an Object");
|
|
50
|
+
}, _ = (e, a) => {
|
|
51
51
|
const r = {
|
|
52
52
|
...e,
|
|
53
|
-
inverse: o.value
|
|
53
|
+
inverse: o.value,
|
|
54
|
+
customClass: "rds-e-breadcrumbs__link--text"
|
|
54
55
|
};
|
|
55
56
|
return a !== n.value.length - 1 && Object.assign(r, {
|
|
56
57
|
arrow: !0,
|
|
57
|
-
right: !0
|
|
58
|
+
right: !0,
|
|
59
|
+
arrowSmall: !0
|
|
58
60
|
}), r;
|
|
59
|
-
},
|
|
61
|
+
}, b = (e) => ({
|
|
60
62
|
click: (r) => {
|
|
61
|
-
r.preventDefault(), r.stopPropagation(), e != null && e.clickable &&
|
|
63
|
+
r.preventDefault(), r.stopPropagation(), e != null && e.clickable && m();
|
|
62
64
|
}
|
|
63
65
|
}), k = (e) => [
|
|
64
66
|
"rds-e-breadcrumbs__link",
|
|
65
67
|
e != null && e.active ? "rds-e-breadcrumbs__link--active" : "",
|
|
66
68
|
o.value && (e != null && e.active) ? "rds-e-breadcrumbs__link--inverse-active" : ""
|
|
67
69
|
];
|
|
68
|
-
return
|
|
70
|
+
return y(() => {
|
|
69
71
|
u();
|
|
70
72
|
}), L(() => {
|
|
71
73
|
u();
|
|
@@ -75,7 +77,7 @@ import './style/breadcrumbs.css';const R = { key: 0 }, V = /* @__PURE__ */ g({
|
|
|
75
77
|
}, [
|
|
76
78
|
j(N, E({
|
|
77
79
|
class: k(r)
|
|
78
|
-
}, { ref_for: !0 },
|
|
80
|
+
}, { ref_for: !0 }, _(r, i), P(b(r))), {
|
|
79
81
|
default: T(() => [
|
|
80
82
|
r != null && r.clickable ? (l(), c("span", R, "...")) : D("", !0)
|
|
81
83
|
]),
|
|
@@ -83,7 +85,7 @@ import './style/breadcrumbs.css';const R = { key: 0 }, V = /* @__PURE__ */ g({
|
|
|
83
85
|
}, 1040, ["class"])
|
|
84
86
|
], 2))), 128));
|
|
85
87
|
}
|
|
86
|
-
}),
|
|
88
|
+
}), A = /* @__PURE__ */ O(S, [["__scopeId", "data-v-696e4937"]]);
|
|
87
89
|
export {
|
|
88
|
-
|
|
90
|
+
A as default
|
|
89
91
|
};
|
|
@@ -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 S, toRefs as x, computed as r, createElementBlock as I, openBlock as b, normalizeClass as m, unref as s, createBlock as $, createCommentVNode as k, createElementVNode as C, renderSlot as N, createTextVNode as R, toDisplayString as V } from "vue";
|
|
2
|
+
import { R as D } from "./icon-svg-DuzOdbk1.js";
|
|
3
|
+
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/button.css';const L = ["type", "disabled"], w = { class: "rds-e-btn__text" }, W = /* @__PURE__ */ S({
|
|
5
5
|
__name: "button",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -10,8 +10,8 @@ import './style/button.css';const E = ["type", "disabled"], L = { class: "rds-e-
|
|
|
10
10
|
text: {
|
|
11
11
|
type: String,
|
|
12
12
|
default: "",
|
|
13
|
-
validator(
|
|
14
|
-
return !
|
|
13
|
+
validator(t, a) {
|
|
14
|
+
return !t && !a.icon ? (console.info("No se han pasado ni texto ni icono al botón"), !1) : !0;
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
/**
|
|
@@ -20,8 +20,8 @@ import './style/button.css';const E = ["type", "disabled"], L = { class: "rds-e-
|
|
|
20
20
|
icon: {
|
|
21
21
|
type: String,
|
|
22
22
|
default: "",
|
|
23
|
-
validator(
|
|
24
|
-
return !
|
|
23
|
+
validator(t, a) {
|
|
24
|
+
return !t && !a.text ? (console.info("No se han pasado ni texto ni icono al botón"), !1) : !0;
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
/**
|
|
@@ -32,11 +32,11 @@ import './style/button.css';const E = ["type", "disabled"], L = { class: "rds-e-
|
|
|
32
32
|
type: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: "button",
|
|
35
|
-
validator(
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
-
`El tipo ${
|
|
39
|
-
),
|
|
35
|
+
validator(t) {
|
|
36
|
+
const a = ["button", "submit", "reset"].includes(t);
|
|
37
|
+
return a || console.info(
|
|
38
|
+
`El tipo ${t} no es válido. Los tipos válidos son: button, submit, reset`
|
|
39
|
+
), a;
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
/**
|
|
@@ -47,11 +47,11 @@ import './style/button.css';const E = ["type", "disabled"], L = { class: "rds-e-
|
|
|
47
47
|
variant: {
|
|
48
48
|
type: String,
|
|
49
49
|
default: "primary",
|
|
50
|
-
validator(
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
`La variante ${
|
|
54
|
-
),
|
|
50
|
+
validator(t) {
|
|
51
|
+
const a = ["primary", "secondary", "ghost", "commercial"].includes(t);
|
|
52
|
+
return a || console.info(
|
|
53
|
+
`La variante ${t} no es válida. Las variantes válidas son: primary, secondary, ghost, commercial`
|
|
54
|
+
), a;
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
/**
|
|
@@ -95,49 +95,57 @@ import './style/button.css';const E = ["type", "disabled"], L = { class: "rds-e-
|
|
|
95
95
|
loading: {
|
|
96
96
|
type: Boolean,
|
|
97
97
|
default: !1
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* <span>Indica si el botón es destructivo (solo para variantes 'secondary' y 'ghost')</span>
|
|
101
|
+
*/
|
|
102
|
+
destructive: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: !1
|
|
98
105
|
}
|
|
99
106
|
},
|
|
100
|
-
setup(
|
|
101
|
-
const
|
|
102
|
-
text:
|
|
107
|
+
setup(t) {
|
|
108
|
+
const a = t, {
|
|
109
|
+
text: l,
|
|
103
110
|
icon: n,
|
|
104
|
-
type:
|
|
105
|
-
variant:
|
|
106
|
-
small:
|
|
107
|
-
disabled:
|
|
111
|
+
type: i,
|
|
112
|
+
variant: u,
|
|
113
|
+
small: p,
|
|
114
|
+
disabled: d,
|
|
108
115
|
mobileWidth: y,
|
|
109
|
-
inverse:
|
|
110
|
-
revertIcon:
|
|
111
|
-
loading:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
inverse: c,
|
|
117
|
+
revertIcon: h,
|
|
118
|
+
loading: v,
|
|
119
|
+
destructive: _
|
|
120
|
+
} = x(a), f = r(() => v.value ? "loading" : n != null && n.value ? n == null ? void 0 : n.value : ""), g = r(() => i.value && ["button", "submit", "reset"].includes(i.value) ? i.value : "button"), o = r(() => ["primary", "secondary", "ghost", "commercial"].includes(u.value) ? u.value : "primary"), B = r(() => {
|
|
121
|
+
const e = ["rds-e-btn"];
|
|
122
|
+
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
|
+
l != null && l.value ? "rds-e-btn--with-icon" : "rds-e-btn--icon"
|
|
124
|
+
), 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(" ");
|
|
117
125
|
});
|
|
118
|
-
return (
|
|
119
|
-
type:
|
|
120
|
-
disabled:
|
|
121
|
-
class: m(
|
|
126
|
+
return (e, j) => (b(), I("button", {
|
|
127
|
+
type: g.value,
|
|
128
|
+
disabled: s(d),
|
|
129
|
+
class: m(B.value)
|
|
122
130
|
}, [
|
|
123
|
-
|
|
131
|
+
f.value ? (b(), $(D, {
|
|
124
132
|
key: 0,
|
|
125
|
-
name:
|
|
126
|
-
small:
|
|
133
|
+
name: f.value,
|
|
134
|
+
small: s(p),
|
|
127
135
|
class: m(["rds-e-btn__icon", [
|
|
128
|
-
|
|
129
|
-
|
|
136
|
+
s(c) ? `rds-e-btn__icon--${s(c)}` : "",
|
|
137
|
+
s(d) ? "rds-e-btn__icon--disabled" : ""
|
|
130
138
|
]]),
|
|
131
139
|
"aria-hidden": "true"
|
|
132
140
|
}, null, 8, ["name", "small", "class"])) : k("", !0),
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
141
|
+
C("span", w, [
|
|
142
|
+
N(e.$slots, "default", {}, () => [
|
|
143
|
+
R(V(s(l)), 1)
|
|
136
144
|
], !0)
|
|
137
145
|
])
|
|
138
|
-
], 10,
|
|
146
|
+
], 10, L));
|
|
139
147
|
}
|
|
140
|
-
}),
|
|
148
|
+
}), q = /* @__PURE__ */ E(W, [["__scopeId", "data-v-9550b6cc"]]);
|
|
141
149
|
export {
|
|
142
|
-
|
|
150
|
+
q as default
|
|
143
151
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent as w, ref as d, computed as r, watch as f, nextTick as c, createElementBlock as B, openBlock as m, normalizeClass as i, createElementVNode as a, withKeys as C, createBlock as S, createCommentVNode as $, createVNode as I, toDisplayString as v, renderSlot as N, createTextVNode as V } from "vue";
|
|
2
|
+
import { R as h } from "./icon-svg-DuzOdbk1.js";
|
|
3
|
+
import './style/collapsable.css';const H = ["id", "aria-expanded", "aria-controls", "disabled"], x = { class: "rds-e-collapsable__header-title" }, D = { class: "rds-e-collapsable__header-title-text" }, E = ["id", "aria-labelledby"], W = /* @__PURE__ */ w({
|
|
4
|
+
__name: "collapsable",
|
|
5
|
+
props: {
|
|
6
|
+
title: {},
|
|
7
|
+
content: { default: "" },
|
|
8
|
+
icon: { default: "" },
|
|
9
|
+
open: { type: Boolean, default: !1 },
|
|
10
|
+
disabled: { type: Boolean, default: !1 },
|
|
11
|
+
fullWidth: { type: Boolean, default: !1 },
|
|
12
|
+
id: { default: "" }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:open"],
|
|
15
|
+
setup(y, { emit: g }) {
|
|
16
|
+
const o = y, k = g, l = d(o.open), t = d(null), s = d(null), p = r(() => o.id || `rds-collapsable-${Math.random().toString(36).substr(2, 9)}`), u = r(() => `${p.value}-panel`), b = r(() => `${p.value}-header`), n = () => {
|
|
17
|
+
if (!t.value || !s.value) return;
|
|
18
|
+
const e = s.value.scrollHeight;
|
|
19
|
+
t.value.style.maxHeight = l.value ? `${e}px` : "0px";
|
|
20
|
+
}, _ = () => {
|
|
21
|
+
o.disabled || (l.value = !l.value, k("update:open", l.value), c(() => {
|
|
22
|
+
n();
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
return f(() => o.open, (e) => {
|
|
26
|
+
l.value = e, c(() => {
|
|
27
|
+
n();
|
|
28
|
+
});
|
|
29
|
+
}), f(l, () => {
|
|
30
|
+
c(() => {
|
|
31
|
+
n();
|
|
32
|
+
});
|
|
33
|
+
}, { immediate: !0 }), (e, K) => (m(), B("div", {
|
|
34
|
+
class: i(["rds-e-collapsable", {
|
|
35
|
+
"rds-e-collapsable--open": l.value,
|
|
36
|
+
"rds-e-collapsable--disabled": e.disabled,
|
|
37
|
+
"rds-e-collapsable--full-width": e.fullWidth
|
|
38
|
+
}])
|
|
39
|
+
}, [
|
|
40
|
+
a("button", {
|
|
41
|
+
id: b.value,
|
|
42
|
+
class: "rds-e-collapsable__header",
|
|
43
|
+
type: "button",
|
|
44
|
+
"aria-expanded": l.value,
|
|
45
|
+
"aria-controls": u.value,
|
|
46
|
+
disabled: e.disabled,
|
|
47
|
+
onClick: _,
|
|
48
|
+
onKeydown: C(_, ["enter", "space"])
|
|
49
|
+
}, [
|
|
50
|
+
e.icon ? (m(), S(h, {
|
|
51
|
+
key: 0,
|
|
52
|
+
name: e.icon,
|
|
53
|
+
class: "rds-e-collapsable__header-icon"
|
|
54
|
+
}, null, 8, ["name"])) : $("", !0),
|
|
55
|
+
a("span", x, [
|
|
56
|
+
a("span", D, v(e.title), 1)
|
|
57
|
+
]),
|
|
58
|
+
I(h, {
|
|
59
|
+
class: i(["rds-e-collapsable__header-arrow", { "rds-e-collapsable__header-arrow--open": l.value }]),
|
|
60
|
+
name: "arrow_down"
|
|
61
|
+
}, null, 8, ["class"])
|
|
62
|
+
], 40, H),
|
|
63
|
+
a("div", {
|
|
64
|
+
id: u.value,
|
|
65
|
+
ref_key: "panel",
|
|
66
|
+
ref: t,
|
|
67
|
+
class: i(["rds-e-collapsable__panel", { "rds-e-collapsable__panel--open": l.value }]),
|
|
68
|
+
role: "region",
|
|
69
|
+
"aria-labelledby": b.value
|
|
70
|
+
}, [
|
|
71
|
+
a("div", {
|
|
72
|
+
ref_key: "panelContent",
|
|
73
|
+
ref: s,
|
|
74
|
+
class: "rds-e-collapsable__panel-content"
|
|
75
|
+
}, [
|
|
76
|
+
N(e.$slots, "default", {}, () => [
|
|
77
|
+
V(v(e.content), 1)
|
|
78
|
+
])
|
|
79
|
+
], 512)
|
|
80
|
+
], 10, E)
|
|
81
|
+
], 2));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
W as _
|
|
86
|
+
};
|