energy-components 1.6.0-beta.0 → 1.6.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 +13 -13
- package/dist/components/button.es.js +11 -11
- package/dist/components/checkbox.es.js +7 -7
- package/dist/components/dropdown.es.js +278 -148
- package/dist/components/filterChip.es.js +4 -4
- package/dist/components/{icon-svg-CeKfjk3j.js → icon-svg-DGp2yHJn.js} +700 -670
- package/dist/components/iconList.es.js +5 -5
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +62 -59
- package/dist/components/infoBox.es.js +48 -33
- package/dist/components/link.es.js +15 -15
- package/dist/components/modal.es.js +69 -39
- package/dist/components/multiselect.es.js +230 -184
- package/dist/components/multiselectcontentwrapper.es.js +140 -0
- package/dist/components/pagination.es.js +118 -86
- package/dist/components/persistentToast.es.js +29 -23
- package/dist/components/quantitySelector.es.js +9 -9
- package/dist/components/radioButton.es.js +16 -16
- package/dist/components/selectionChip.es.js +5 -5
- package/dist/components/sidedrawer.es.js +36 -28
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/infoBox.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -0
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/switch.es.js +10 -10
- package/dist/components/tabBar.es.js +12 -12
- package/dist/components/tablepaginatedcomponent.es.js +69 -66
- package/dist/components/tableslotedcomponent.es.js +147 -138
- package/dist/components/tag.es.js +5 -5
- package/dist/components/textArea.es.js +22 -22
- package/dist/components/textField.es.js +93 -84
- package/dist/components/tooltip.es.js +61 -61
- package/dist/energy-components.es.js +7354 -6797
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +20 -1
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +86 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +582 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +10 -3
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +63 -31
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +27 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { openBlock as o, createElementBlock as c, normalizeClass as m, withModifiers as u, normalizeStyle as b, createElementVNode as a, renderSlot as i, createTextVNode as g, toDisplayString as h, createCommentVNode as r, Fragment as S, renderList as y, withDirectives as _, vShow as f } from "vue";
|
|
2
|
+
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
import './style/multiselectcontentwrapper.css';const w = {
|
|
4
|
+
name: "MultiselectContentWrapper",
|
|
5
|
+
props: {
|
|
6
|
+
teleported: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: !1
|
|
9
|
+
},
|
|
10
|
+
id: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: () => `multiselect-${Date.now()}-${Math.floor(Math.random() * 1e3)}`
|
|
13
|
+
// Valor por defecto único
|
|
14
|
+
},
|
|
15
|
+
multiple: Boolean,
|
|
16
|
+
max: [Number, Boolean],
|
|
17
|
+
internalValue: Array,
|
|
18
|
+
filteredOptions: Array,
|
|
19
|
+
isSelected: Function,
|
|
20
|
+
optionHighlight: Function,
|
|
21
|
+
select: Function,
|
|
22
|
+
pointerSet: Function,
|
|
23
|
+
selectLabelText: String,
|
|
24
|
+
selectedLabelText: String,
|
|
25
|
+
deselectLabelText: String,
|
|
26
|
+
tagPlaceholder: String,
|
|
27
|
+
groupSelect: Boolean,
|
|
28
|
+
selectGroupLabelText: String,
|
|
29
|
+
deselectGroupLabelText: String,
|
|
30
|
+
getOptionLabel: Function,
|
|
31
|
+
groupHighlight: Function,
|
|
32
|
+
selectGroup: Function,
|
|
33
|
+
options: Array,
|
|
34
|
+
hasOptionGroup: Boolean,
|
|
35
|
+
search: String,
|
|
36
|
+
loading: Boolean,
|
|
37
|
+
showNoResults: Boolean,
|
|
38
|
+
showNoOptions: Boolean,
|
|
39
|
+
small: Boolean,
|
|
40
|
+
contentStyle: Object,
|
|
41
|
+
customStyle: Object
|
|
42
|
+
},
|
|
43
|
+
emits: ["focus"]
|
|
44
|
+
}, O = ["id", "aria-multiselectable"], M = { key: 0 }, v = { class: "multiselect__option" }, T = ["aria-selected", "id", "role"], x = ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"], B = ["data-select", "data-deselect", "onMouseenter", "onMousedown"], F = { class: "multiselect__option" }, N = { class: "multiselect__option" };
|
|
45
|
+
function k(l, n, e, G, C, D) {
|
|
46
|
+
return o(), c("div", {
|
|
47
|
+
class: m([
|
|
48
|
+
"multiselect__content-wrapper",
|
|
49
|
+
{ "multiselect__content-wrapper--small": e.small },
|
|
50
|
+
e.teleported ? "multiselect__content-wrapper--teleported" : ""
|
|
51
|
+
]),
|
|
52
|
+
onFocus: n[0] || (n[0] = (t) => l.$emit("focus")),
|
|
53
|
+
tabindex: "-1",
|
|
54
|
+
onMousedown: n[1] || (n[1] = u(() => {
|
|
55
|
+
}, ["prevent"])),
|
|
56
|
+
style: b(e.customStyle),
|
|
57
|
+
ref: "wrapper"
|
|
58
|
+
}, [
|
|
59
|
+
a("ul", {
|
|
60
|
+
class: "multiselect__content",
|
|
61
|
+
style: b(e.contentStyle),
|
|
62
|
+
role: "listbox",
|
|
63
|
+
id: "listbox-" + (e.teleported ? "teleported-" : "") + e.id,
|
|
64
|
+
"aria-multiselectable": e.multiple
|
|
65
|
+
}, [
|
|
66
|
+
i(l.$slots, "beforeList", {}, void 0, !0),
|
|
67
|
+
e.multiple && e.max === e.internalValue.length ? (o(), c("li", M, [
|
|
68
|
+
a("span", v, [
|
|
69
|
+
i(l.$slots, "maxElements", {}, () => [
|
|
70
|
+
g("Maximum of " + h(e.max) + " options selected. First remove a selected option to select another.", 1)
|
|
71
|
+
], !0)
|
|
72
|
+
])
|
|
73
|
+
])) : r("", !0),
|
|
74
|
+
!e.max || e.internalValue.length < e.max ? (o(!0), c(S, { key: 1 }, y(e.filteredOptions, (t, s) => (o(), c("li", {
|
|
75
|
+
class: "multiselect__element",
|
|
76
|
+
key: s,
|
|
77
|
+
"aria-selected": e.isSelected(t),
|
|
78
|
+
id: e.id + "-" + s,
|
|
79
|
+
role: t && (t.$isLabel || t.$isDisabled) ? null : "option"
|
|
80
|
+
}, [
|
|
81
|
+
t && (t.$isLabel || t.$isDisabled) ? r("", !0) : (o(), c("span", {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: m([e.optionHighlight(s, t), "multiselect__option"]),
|
|
84
|
+
onClick: u((d) => e.select(t), ["stop"]),
|
|
85
|
+
onMouseenter: u((d) => e.pointerSet(s), ["self"]),
|
|
86
|
+
"data-select": t && t.isTag ? e.tagPlaceholder : e.selectLabelText,
|
|
87
|
+
"data-selected": e.selectedLabelText,
|
|
88
|
+
"data-deselect": e.deselectLabelText
|
|
89
|
+
}, [
|
|
90
|
+
i(l.$slots, "option", {
|
|
91
|
+
option: t,
|
|
92
|
+
search: e.search,
|
|
93
|
+
index: s
|
|
94
|
+
}, () => [
|
|
95
|
+
a("span", null, h(e.getOptionLabel(t)), 1)
|
|
96
|
+
], !0)
|
|
97
|
+
], 42, x)),
|
|
98
|
+
t && (t.$isLabel || t.$isDisabled) ? (o(), c("span", {
|
|
99
|
+
key: 1,
|
|
100
|
+
"data-select": e.groupSelect && e.selectGroupLabelText,
|
|
101
|
+
"data-deselect": e.groupSelect && e.deselectGroupLabelText,
|
|
102
|
+
class: m([e.groupHighlight(s, t), "multiselect__option"]),
|
|
103
|
+
onMouseenter: u((d) => e.groupSelect && e.pointerSet(s), ["self"]),
|
|
104
|
+
onMousedown: u((d) => e.selectGroup(t), ["prevent"])
|
|
105
|
+
}, [
|
|
106
|
+
i(l.$slots, "option", {
|
|
107
|
+
option: t,
|
|
108
|
+
search: e.search,
|
|
109
|
+
index: s
|
|
110
|
+
}, () => [
|
|
111
|
+
a("span", null, h(e.getOptionLabel(t)), 1)
|
|
112
|
+
], !0)
|
|
113
|
+
], 42, B)) : r("", !0)
|
|
114
|
+
], 8, T))), 128)) : r("", !0),
|
|
115
|
+
_(a("li", null, [
|
|
116
|
+
a("span", F, [
|
|
117
|
+
i(l.$slots, "noResult", { search: e.search }, () => [
|
|
118
|
+
n[2] || (n[2] = g("No elements found. Consider changing the search query."))
|
|
119
|
+
], !0)
|
|
120
|
+
])
|
|
121
|
+
], 512), [
|
|
122
|
+
[f, e.showNoResults && e.filteredOptions.length === 0 && e.search && !e.loading]
|
|
123
|
+
]),
|
|
124
|
+
_(a("li", null, [
|
|
125
|
+
a("span", N, [
|
|
126
|
+
i(l.$slots, "noOptions", {}, () => [
|
|
127
|
+
n[3] || (n[3] = g("List is empty."))
|
|
128
|
+
], !0)
|
|
129
|
+
])
|
|
130
|
+
], 512), [
|
|
131
|
+
[f, e.showNoOptions && (e.options.length === 0 || e.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !e.loading]
|
|
132
|
+
]),
|
|
133
|
+
i(l.$slots, "afterList", {}, void 0, !0)
|
|
134
|
+
], 12, O)
|
|
135
|
+
], 38);
|
|
136
|
+
}
|
|
137
|
+
const A = /* @__PURE__ */ L(w, [["render", k], ["__scopeId", "data-v-b87add6b"]]);
|
|
138
|
+
export {
|
|
139
|
+
A as default
|
|
140
|
+
};
|
|
@@ -1,160 +1,192 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/pagination.css';const
|
|
1
|
+
import { defineComponent as j, toRefs as F, ref as V, computed as u, openBlock as o, createElementBlock as g, createElementVNode as f, createBlock as C, createCommentVNode as h, createVNode as P, Fragment as A, renderList as T, toDisplayString as k, unref as U } from "vue";
|
|
2
|
+
import c from "./actionButton.es.js";
|
|
3
|
+
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/pagination.css';const G = { class: "rds-e-pagination-container rds-flex" }, H = { class: "rds-e-pagination" }, J = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "rds-e-pagination-leyend"
|
|
7
|
-
},
|
|
7
|
+
}, K = /* @__PURE__ */ j({
|
|
8
8
|
__name: "pagination",
|
|
9
9
|
props: {
|
|
10
10
|
/**
|
|
11
|
-
* La página actual que se está visualizando.
|
|
11
|
+
* La página actual que se está visualizando. Usada para inicializar el componente.
|
|
12
12
|
*/
|
|
13
13
|
currentPage: {
|
|
14
14
|
type: Number,
|
|
15
15
|
required: !0
|
|
16
16
|
},
|
|
17
17
|
/**
|
|
18
|
-
* Habilita
|
|
18
|
+
* Habilita los botones para "saltar" a la primera y última página.
|
|
19
19
|
*/
|
|
20
20
|
jumpTo: {
|
|
21
21
|
type: Boolean,
|
|
22
22
|
default: !1
|
|
23
23
|
},
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
selected: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: !1
|
|
30
|
-
},
|
|
31
|
-
/**
|
|
32
|
-
* Ocultar la leyenda de paginación
|
|
25
|
+
* Oculta la leyenda "Mostrando resultados X-Y de Z".
|
|
26
|
+
* Solo tiene efecto si se usa la prop `totalItems`.
|
|
33
27
|
*/
|
|
34
28
|
hideLeyend: {
|
|
35
29
|
type: Boolean,
|
|
36
30
|
default: !1
|
|
37
31
|
},
|
|
38
32
|
/**
|
|
39
|
-
* El número total de items
|
|
33
|
+
* El número total de items a paginar.
|
|
34
|
+
* Requerido si no se proporciona `totalPages`. Habilita la leyenda.
|
|
40
35
|
*/
|
|
41
36
|
totalItems: {
|
|
42
37
|
type: Number,
|
|
43
|
-
required: !
|
|
38
|
+
required: !1,
|
|
39
|
+
default: void 0
|
|
44
40
|
},
|
|
45
41
|
/**
|
|
46
|
-
*
|
|
42
|
+
* Número de items a mostrar por página.
|
|
43
|
+
* Usado para calcular el total de páginas (si se usa `totalItems`) y el offset/end en el evento.
|
|
47
44
|
*/
|
|
48
45
|
itemsPerPage: {
|
|
49
46
|
type: Number,
|
|
50
47
|
default: 10
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* El número total de páginas.
|
|
51
|
+
* Usado como fallback si `totalItems` no se proporciona.
|
|
52
|
+
*/
|
|
53
|
+
totalPages: {
|
|
54
|
+
type: Number,
|
|
55
|
+
required: !1,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Controla si el número de la página activa se resalta visualmente.
|
|
60
|
+
* El resaltado requiere que esta prop sea true.
|
|
61
|
+
*/
|
|
62
|
+
selected: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !1
|
|
51
65
|
}
|
|
52
66
|
},
|
|
53
67
|
emits: ["pageChanged"],
|
|
54
|
-
setup(
|
|
55
|
-
const
|
|
56
|
-
itemsPerPage:
|
|
57
|
-
totalItems:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
for (let
|
|
68
|
-
|
|
69
|
-
else
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
68
|
+
setup(p, { expose: N, emit: w }) {
|
|
69
|
+
const m = p, M = w, {
|
|
70
|
+
itemsPerPage: v,
|
|
71
|
+
totalItems: e,
|
|
72
|
+
totalPages: r,
|
|
73
|
+
hideLeyend: S
|
|
74
|
+
} = F(m), l = V(m.currentPage), d = u(() => typeof (e == null ? void 0 : e.value) == "number" && e.value >= 0), b = u(() => d.value && typeof (e == null ? void 0 : e.value) == "number" ? e.value <= 0 || v.value <= 0 ? 1 : Math.ceil(e.value / v.value) : typeof (r == null ? void 0 : r.value) == "number" && r.value > 0 ? r.value : (typeof (r == null ? void 0 : r.value) > "u" && typeof (e == null ? void 0 : e.value) > "u" && console.warn("[RDSPagination] Props `totalItems` o `totalPages` son requeridas."), 1)), $ = u(() => d.value && !S.value && typeof (e == null ? void 0 : e.value) == "number" && e.value > 0), L = u(() => !d.value || typeof (e == null ? void 0 : e.value) != "number" || e.value === 0 ? 0 : (l.value - 1) * v.value + 1), q = u(() => {
|
|
75
|
+
if (!d.value || typeof (e == null ? void 0 : e.value) != "number") return 0;
|
|
76
|
+
const t = l.value * v.value;
|
|
77
|
+
return Math.min(t, e.value);
|
|
78
|
+
}), _ = u(() => l.value === 1), x = u(() => l.value === b.value), D = u(() => {
|
|
79
|
+
const t = [], a = b.value, n = l.value;
|
|
80
|
+
if (a <= 3)
|
|
81
|
+
for (let i = 1; i <= a; i++)
|
|
82
|
+
t.push(i);
|
|
83
|
+
else n === 1 ? t.push(1, 2, Math.min(3, a)) : n === a ? t.push(Math.max(1, a - 2), a - 1, a) : t.push(n - 1, n, n + 1);
|
|
84
|
+
return [...new Set(t)].filter((i) => i >= 1 && i <= a);
|
|
85
|
+
}), E = (t) => {
|
|
86
|
+
let a = l.value;
|
|
87
|
+
const n = b.value;
|
|
88
|
+
if ("navigator" in t)
|
|
89
|
+
switch (t.navigator) {
|
|
90
|
+
case "next":
|
|
91
|
+
l.value < n && (a = l.value + 1);
|
|
92
|
+
break;
|
|
93
|
+
case "prev":
|
|
94
|
+
l.value > 1 && (a = l.value - 1);
|
|
95
|
+
break;
|
|
96
|
+
case "first":
|
|
97
|
+
l.value !== 1 && (a = 1);
|
|
98
|
+
break;
|
|
99
|
+
case "last":
|
|
100
|
+
l.value !== n && (a = n);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
else "page" in t && typeof t.page == "number" && t.page >= 1 && t.page <= n && t.page !== l.value && (a = t.page);
|
|
104
|
+
return a !== l.value ? (l.value = a, !0) : !1;
|
|
105
|
+
}, s = (t, a = !1) => {
|
|
106
|
+
if (E(t) || a) {
|
|
107
|
+
const i = v.value, y = (l.value - 1) * i;
|
|
108
|
+
let B = y + i;
|
|
109
|
+
d.value && typeof (e == null ? void 0 : e.value) == "number" && (B = Math.min(y + i, e.value));
|
|
110
|
+
const R = {
|
|
111
|
+
...t,
|
|
112
|
+
page: l.value,
|
|
113
|
+
offset: y,
|
|
114
|
+
limit: i,
|
|
115
|
+
end: B,
|
|
116
|
+
reset: a || void 0
|
|
117
|
+
};
|
|
118
|
+
M("pageChanged", R);
|
|
119
|
+
}
|
|
87
120
|
};
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
u.jumpTo ? (o(), h(g, {
|
|
121
|
+
return N({
|
|
122
|
+
/** Resetea la paginación a la primera página y emite el evento pageChanged. */
|
|
123
|
+
resetPagination: () => {
|
|
124
|
+
l.value !== 1 && s({ page: 1 }, !0);
|
|
125
|
+
}
|
|
126
|
+
}), (t, a) => (o(), g("div", G, [
|
|
127
|
+
f("ul", H, [
|
|
128
|
+
f("li", null, [
|
|
129
|
+
p.jumpTo ? (o(), C(c, {
|
|
98
130
|
key: 0,
|
|
99
131
|
class: "rds-e-pagination__actionBtn",
|
|
100
132
|
variant: "ghost",
|
|
101
133
|
small: "",
|
|
102
134
|
icon: "back",
|
|
103
135
|
"aria-label": "First Page",
|
|
104
|
-
disabled:
|
|
105
|
-
onClick:
|
|
106
|
-
}, null, 8, ["disabled"])) :
|
|
136
|
+
disabled: _.value,
|
|
137
|
+
onClick: a[0] || (a[0] = (n) => s({ navigator: "first" }))
|
|
138
|
+
}, null, 8, ["disabled"])) : h("", !0)
|
|
107
139
|
]),
|
|
108
|
-
|
|
109
|
-
P(
|
|
140
|
+
f("li", null, [
|
|
141
|
+
P(c, {
|
|
110
142
|
class: "rds-e-pagination__actionBtn",
|
|
111
143
|
variant: "ghost",
|
|
112
144
|
small: "",
|
|
113
145
|
icon: "arrow_left",
|
|
114
146
|
"aria-label": "Prev page",
|
|
115
|
-
disabled:
|
|
116
|
-
onClick:
|
|
147
|
+
disabled: _.value,
|
|
148
|
+
onClick: a[1] || (a[1] = (n) => s({ navigator: "prev" }))
|
|
117
149
|
}, null, 8, ["disabled"])
|
|
118
150
|
]),
|
|
119
|
-
(o(!0),
|
|
120
|
-
P(
|
|
151
|
+
(o(!0), g(A, null, T(D.value, (n) => (o(), g("li", { key: n }, [
|
|
152
|
+
P(c, {
|
|
121
153
|
class: "rds-e-pagination__item",
|
|
122
|
-
variant:
|
|
154
|
+
variant: n === l.value && m.selected ? "primary" : "ghost",
|
|
123
155
|
small: "",
|
|
124
|
-
text: String(
|
|
156
|
+
text: String(n),
|
|
125
157
|
icon: "",
|
|
126
|
-
"aria-label": `page number ${
|
|
127
|
-
onClick: (
|
|
158
|
+
"aria-label": `page number ${n}`,
|
|
159
|
+
onClick: (i) => s({ page: n })
|
|
128
160
|
}, null, 8, ["variant", "text", "aria-label", "onClick"])
|
|
129
161
|
]))), 128)),
|
|
130
|
-
|
|
131
|
-
P(
|
|
162
|
+
f("li", null, [
|
|
163
|
+
P(c, {
|
|
132
164
|
class: "rds-e-pagination__actionBtn",
|
|
133
165
|
variant: "ghost",
|
|
134
166
|
icon: "arrow_right",
|
|
135
167
|
small: "",
|
|
136
168
|
"aria-label": "next page",
|
|
137
|
-
disabled:
|
|
138
|
-
onClick:
|
|
169
|
+
disabled: x.value,
|
|
170
|
+
onClick: a[2] || (a[2] = (n) => s({ navigator: "next" }))
|
|
139
171
|
}, null, 8, ["disabled"])
|
|
140
172
|
]),
|
|
141
|
-
|
|
142
|
-
|
|
173
|
+
f("li", null, [
|
|
174
|
+
p.jumpTo ? (o(), C(c, {
|
|
143
175
|
key: 0,
|
|
144
176
|
class: "rds-e-pagination__actionBtn",
|
|
145
177
|
variant: "ghost",
|
|
146
178
|
small: "",
|
|
147
179
|
icon: "last",
|
|
148
180
|
"aria-label": "last page",
|
|
149
|
-
disabled:
|
|
150
|
-
onClick:
|
|
151
|
-
}, null, 8, ["disabled"])) :
|
|
181
|
+
disabled: x.value,
|
|
182
|
+
onClick: a[3] || (a[3] = (n) => s({ navigator: "last" }))
|
|
183
|
+
}, null, 8, ["disabled"])) : h("", !0)
|
|
152
184
|
])
|
|
153
185
|
]),
|
|
154
|
-
|
|
186
|
+
$.value ? (o(), g("p", J, " Mostrando resultados " + k(L.value) + "-" + k(q.value) + " de " + k(U(e)), 1)) : h("", !0)
|
|
155
187
|
]));
|
|
156
188
|
}
|
|
157
|
-
}),
|
|
189
|
+
}), X = /* @__PURE__ */ z(K, [["__scopeId", "data-v-f56e8bc0"]]);
|
|
158
190
|
export {
|
|
159
|
-
|
|
191
|
+
X as default
|
|
160
192
|
};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as v, toRefs as y, computed as g, openBlock as t, createElementBlock as s, normalizeClass as h, createElementVNode as i, createVNode as a, createCommentVNode as o, toDisplayString as c, renderSlot as l } from "vue";
|
|
2
|
+
import { R as d } from "./icon-svg-DGp2yHJn.js";
|
|
3
3
|
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/persistentToast.css';const
|
|
4
|
+
import './style/persistentToast.css';const $ = { class: "alert" }, S = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "rds-e-persistent-toast__custom-icon-block"
|
|
7
|
-
},
|
|
7
|
+
}, C = { class: "rds-e-persistent-toast__wrapper" }, q = { class: "rds-e-persistent-toast__title__wrapper" }, w = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "rds-e-persistent-toast__title rds-mb-03"
|
|
10
|
-
},
|
|
10
|
+
}, b = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "rds-e-persistent-toast__text"
|
|
13
13
|
}, T = {
|
|
14
|
+
key: 2,
|
|
15
|
+
class: "rds-e-persistent-toast__content-section"
|
|
16
|
+
}, B = {
|
|
14
17
|
key: 0,
|
|
15
18
|
class: "rds-e-persistent-toast__action-section"
|
|
16
|
-
},
|
|
19
|
+
}, N = /* @__PURE__ */ v({
|
|
17
20
|
__name: "persistent-toast",
|
|
18
21
|
props: {
|
|
19
22
|
/**
|
|
@@ -83,35 +86,38 @@ import './style/persistentToast.css';const C = { class: "alert" }, S = {
|
|
|
83
86
|
}
|
|
84
87
|
},
|
|
85
88
|
emits: ["onCloseToastAction"],
|
|
86
|
-
setup(e, { emit:
|
|
87
|
-
const
|
|
89
|
+
setup(e, { emit: u }) {
|
|
90
|
+
const _ = e, m = u, { type: r } = y(_), p = g(
|
|
88
91
|
() => `rds-e-persistent-toast rds-mb-03 rds-e-persistent-toast${r.value === "success" ? "--success" : ""}${r.value === "error" ? "--error" : ""}${r.value === "warning" ? "--warning" : ""}${r.value === "info" ? "--info" : ""}`
|
|
89
|
-
),
|
|
92
|
+
), f = () => {
|
|
90
93
|
m("onCloseToastAction");
|
|
91
94
|
};
|
|
92
|
-
return (
|
|
93
|
-
class:
|
|
95
|
+
return (n, R) => (t(), s("div", {
|
|
96
|
+
class: h(["rds-e-persistent-toast", p.value]),
|
|
94
97
|
role: "alert"
|
|
95
98
|
}, [
|
|
96
|
-
|
|
99
|
+
i("div", $, [
|
|
97
100
|
e.icon ? (t(), s("div", S, [
|
|
98
|
-
a(
|
|
101
|
+
a(d, {
|
|
99
102
|
name: e.icon,
|
|
100
103
|
class: "rds-e-persistent-toast__custom-icon",
|
|
101
104
|
"aria-hidden": "true"
|
|
102
105
|
}, null, 8, ["name"])
|
|
103
106
|
])) : o("", !0),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
e.title ? (t(), s("div",
|
|
107
|
-
e.message ? (t(), s("p",
|
|
107
|
+
i("div", C, [
|
|
108
|
+
i("div", q, [
|
|
109
|
+
e.title ? (t(), s("div", w, c(e.title), 1)) : o("", !0),
|
|
110
|
+
e.message && !n.$slots["content-section"] ? (t(), s("p", b, c(e.message), 1)) : o("", !0),
|
|
111
|
+
n.$slots["content-section"] ? (t(), s("div", T, [
|
|
112
|
+
l(n.$slots, "content-section", {}, void 0, !0)
|
|
113
|
+
])) : o("", !0)
|
|
108
114
|
]),
|
|
109
115
|
e.close ? (t(), s("div", {
|
|
110
116
|
key: 0,
|
|
111
117
|
class: "rds-e-persistent-toast__close-block",
|
|
112
|
-
onClick:
|
|
118
|
+
onClick: f
|
|
113
119
|
}, [
|
|
114
|
-
a(
|
|
120
|
+
a(d, {
|
|
115
121
|
name: "close",
|
|
116
122
|
class: "rds-e-persistent-toast__custom-icon",
|
|
117
123
|
"aria-hidden": "true"
|
|
@@ -119,12 +125,12 @@ import './style/persistentToast.css';const C = { class: "alert" }, S = {
|
|
|
119
125
|
])) : o("", !0)
|
|
120
126
|
])
|
|
121
127
|
]),
|
|
122
|
-
|
|
123
|
-
|
|
128
|
+
n.$slots["action-section"] ? (t(), s("div", B, [
|
|
129
|
+
l(n.$slots, "action-section", {}, void 0, !0)
|
|
124
130
|
])) : o("", !0)
|
|
125
131
|
], 2));
|
|
126
132
|
}
|
|
127
|
-
}),
|
|
133
|
+
}), E = /* @__PURE__ */ k(N, [["__scopeId", "data-v-9599464c"]]);
|
|
128
134
|
export {
|
|
129
|
-
|
|
135
|
+
E as default
|
|
130
136
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/quantitySelector.css';const
|
|
1
|
+
import { defineComponent as V, mergeModels as c, useModel as w, ref as i, openBlock as B, createElementBlock as I, normalizeClass as r, createElementVNode as o, createVNode as m, withDirectives as f, vShow as v, vModelText as b } from "vue";
|
|
2
|
+
import { R as y } from "./icon-svg-DGp2yHJn.js";
|
|
3
|
+
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/quantitySelector.css';const _ = ["disabled"], M = ["disabled"], S = ["disabled"], x = ["disabled"], R = /* @__PURE__ */ V({
|
|
5
5
|
__name: "quantity-selector",
|
|
6
6
|
props: /* @__PURE__ */ c({
|
|
7
7
|
/**
|
|
@@ -52,7 +52,7 @@ import './style/quantitySelector.css';const D = ["disabled"], M = ["disabled"],
|
|
|
52
52
|
}),
|
|
53
53
|
emits: /* @__PURE__ */ c(["onClickPlus", "onClickMinus", "onChange", "onDelete"], ["update:modelValue"]),
|
|
54
54
|
setup(l, { emit: p }) {
|
|
55
|
-
const h = l, n = p, e =
|
|
55
|
+
const h = l, n = p, e = w(l, "modelValue"), s = i(!1), u = i(null), k = i(null), C = () => {
|
|
56
56
|
e.value < 99 && (e.value++, n("onChange", e.value)), n("onClickPlus");
|
|
57
57
|
}, q = () => {
|
|
58
58
|
h.deleteButton && e.value !== 0 ? (n("onDelete"), e.value = 0, n("onChange", e.value)) : e.value > 0 && (e.value--, n("onChange", e.value)), n("onClickMinus");
|
|
@@ -66,7 +66,7 @@ import './style/quantitySelector.css';const D = ["disabled"], M = ["disabled"],
|
|
|
66
66
|
}
|
|
67
67
|
s.value = !1;
|
|
68
68
|
};
|
|
69
|
-
return (t, a) => (
|
|
69
|
+
return (t, a) => (B(), I("div", {
|
|
70
70
|
class: r(["rds-e-quantity-selector", {
|
|
71
71
|
"rds-e-quantity-selector--disabled": l.disabled,
|
|
72
72
|
"rds-e-quantity-selector--small": l.size === "small",
|
|
@@ -84,7 +84,7 @@ import './style/quantitySelector.css';const D = ["disabled"], M = ["disabled"],
|
|
|
84
84
|
m(y, {
|
|
85
85
|
name: l.deleteButton && e.value !== 0 ? "delete" : "minus"
|
|
86
86
|
}, null, 8, ["name"])
|
|
87
|
-
], 10,
|
|
87
|
+
], 10, _),
|
|
88
88
|
f(o("input", {
|
|
89
89
|
ref_key: "mainInput",
|
|
90
90
|
ref: k,
|
|
@@ -137,7 +137,7 @@ import './style/quantitySelector.css';const D = ["disabled"], M = ["disabled"],
|
|
|
137
137
|
], 10, x)
|
|
138
138
|
], 2));
|
|
139
139
|
}
|
|
140
|
-
}),
|
|
140
|
+
}), A = /* @__PURE__ */ D(R, [["__scopeId", "data-v-e9c62df7"]]);
|
|
141
141
|
export {
|
|
142
|
-
|
|
142
|
+
A as default
|
|
143
143
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { g as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/radioButton.css';const L = ["id", "value", "name", "disabled", "checked"], $ = ["for"], j = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as B, ref as f, computed as m, inject as i, onMounted as _, onBeforeUnmount as D, openBlock as r, createElementBlock as b, normalizeClass as n, createElementVNode as v, unref as E, toDisplayString as N, createCommentVNode as w, createBlock as x } from "vue";
|
|
2
|
+
import { R as C } from "./icon-svg-DGp2yHJn.js";
|
|
3
|
+
import { g as G } from "./getInstance-GhoEcxLF.js";
|
|
4
|
+
import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/radioButton.css';const L = ["id", "value", "name", "disabled", "checked"], $ = ["for"], j = /* @__PURE__ */ B({
|
|
6
6
|
__name: "radio-button",
|
|
7
7
|
props: {
|
|
8
8
|
/**
|
|
@@ -50,17 +50,17 @@ import './style/radioButton.css';const L = ["id", "value", "name", "disabled", "
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
setup(e) {
|
|
53
|
-
const o = e, d = f(!1), t = f(!1), y =
|
|
53
|
+
const o = e, d = f(!1), t = f(!1), y = G(), l = m(() => o.id || `input-${y}`), a = i("radioGroupValue"), p = i("radioGroupName");
|
|
54
54
|
a || console.warn("RDSRadioButton debe estar dentro de un RDSRadioGroup");
|
|
55
|
-
const
|
|
56
|
-
o.id && !
|
|
55
|
+
const S = i("validateId");
|
|
56
|
+
o.id && !S(o.id) && console.warn(
|
|
57
57
|
`RDSRadioButton con id ${o.id} tiene un id duplicado. Se generará un id único.`
|
|
58
58
|
);
|
|
59
|
-
const
|
|
59
|
+
const k = m(() => (a == null ? void 0 : a.value) === o.option), R = () => {
|
|
60
60
|
!o.disabled && a && (a.value = o.option);
|
|
61
|
-
},
|
|
61
|
+
}, g = () => {
|
|
62
62
|
t.value && (d.value = !0);
|
|
63
|
-
},
|
|
63
|
+
}, h = () => d.value = !1, s = (u) => {
|
|
64
64
|
u.key === "Tab" && (t.value = !0);
|
|
65
65
|
}, c = () => {
|
|
66
66
|
t.value = !1;
|
|
@@ -79,10 +79,10 @@ import './style/radioButton.css';const L = ["id", "value", "name", "disabled", "
|
|
|
79
79
|
class: n(`rds-e-radio ${e.error ? " rds-e-radio--error" : ""}`),
|
|
80
80
|
name: E(p),
|
|
81
81
|
disabled: e.disabled,
|
|
82
|
-
checked:
|
|
83
|
-
onChange:
|
|
84
|
-
onFocus:
|
|
85
|
-
onBlur:
|
|
82
|
+
checked: k.value,
|
|
83
|
+
onChange: R,
|
|
84
|
+
onFocus: g,
|
|
85
|
+
onBlur: h
|
|
86
86
|
}, null, 42, L),
|
|
87
87
|
v("label", {
|
|
88
88
|
for: l.value,
|
|
@@ -101,7 +101,7 @@ import './style/radioButton.css';const L = ["id", "value", "name", "disabled", "
|
|
|
101
101
|
], 10, $)
|
|
102
102
|
], 2));
|
|
103
103
|
}
|
|
104
|
-
}), V = /* @__PURE__ */
|
|
104
|
+
}), V = /* @__PURE__ */ I(j, [["__scopeId", "data-v-c8280e86"]]);
|
|
105
105
|
export {
|
|
106
106
|
V as default
|
|
107
107
|
};
|