energy-components 1.4.0 → 1.6.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 +13 -13
- package/dist/components/actionButton.es.js +3 -3
- package/dist/components/button.es.js +11 -11
- package/dist/components/checkbox.es.js +7 -7
- package/dist/components/dropdown.es.js +100 -91
- package/dist/components/filterChip.es.js +114 -0
- package/dist/components/{icon-svg-u9BWBbvW.js → icon-svg-CeKfjk3j.js} +5 -6
- package/dist/components/iconList.es.js +5 -5
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +47 -44
- package/dist/components/infoBox.es.js +8 -8
- package/dist/components/link.es.js +15 -15
- package/dist/components/modal.es.js +12 -12
- package/dist/components/multiselect.es.js +32 -23
- package/dist/components/pagination.es.js +127 -105
- package/dist/components/persistentToast.es.js +5 -5
- 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 +41 -28
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/filterChip.css +1 -0
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -0
- package/dist/components/style/tableslotedcomponent.css +1 -0
- 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 +137 -0
- package/dist/components/tableslotedcomponent.es.js +293 -0
- package/dist/components/tag.es.js +5 -5
- package/dist/components/textArea.es.js +22 -22
- package/dist/components/textField.es.js +95 -89
- package/dist/components/tooltip.es.js +61 -61
- package/dist/energy-components.es.js +6093 -5619
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +2 -2
- package/dist/types/src/components/content/table/table-sloted/TableSlotedComponent.vue.d.ts +80 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +15 -0
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +150 -0
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +16 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +1 -1
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +56 -14
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as B, toRefs as D, ref as l, watch as N, nextTick as R, inject as _, onMounted as V, onBeforeUnmount as q, openBlock as v, createElementBlock as w, createElementVNode as n, toDisplayString as h, unref as d, createBlock as H, mergeProps as I, createCommentVNode as P, createVNode as T, normalizeClass as y, renderSlot as j, createTextVNode as A } from "vue";
|
|
2
|
+
import { I as E } from "./icon-svg-CeKfjk3j.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 = { class: "rds-e-accordion" }, z = { class: "rds-e-accordion-title" }, M = { class: "rds-e-accordion-title_right" }, U = /* @__PURE__ */
|
|
5
|
+
import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { class: "rds-e-accordion-title" }, M = { class: "rds-e-accordion-title_right" }, U = /* @__PURE__ */ B({
|
|
6
6
|
__name: "accordion",
|
|
7
7
|
props: {
|
|
8
8
|
/**
|
|
@@ -43,21 +43,21 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
emits: ["update:open"],
|
|
46
|
-
setup(c, { expose: C, emit:
|
|
47
|
-
const o = c,
|
|
46
|
+
setup(c, { expose: C, emit: k }) {
|
|
47
|
+
const o = c, x = k, { tag: a } = D(o), t = l(o.open), i = l(null), s = l(null), S = () => {
|
|
48
48
|
if (!i.value || !s.value) return;
|
|
49
49
|
const e = s.value.scrollHeight;
|
|
50
50
|
i.value.style.maxHeight = t.value ? `${e}px` : "0px";
|
|
51
51
|
}, r = (e) => {
|
|
52
|
-
e === void 0 ? t.value = !t.value : t.value = e,
|
|
52
|
+
e === void 0 ? t.value = !t.value : t.value = e, x("update:open", t.value), S();
|
|
53
53
|
}, u = () => {
|
|
54
54
|
r(!0);
|
|
55
55
|
}, p = () => {
|
|
56
56
|
r(!1);
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
N(
|
|
59
59
|
() => o.open,
|
|
60
|
-
(e) =>
|
|
60
|
+
(e) => R(() => {
|
|
61
61
|
r(e);
|
|
62
62
|
}),
|
|
63
63
|
{ immediate: !0 }
|
|
@@ -87,11 +87,11 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
|
|
|
87
87
|
}, [
|
|
88
88
|
n("span", z, h(c.title), 1),
|
|
89
89
|
n("div", M, [
|
|
90
|
-
d(a) && d(a).icon ? (v(), H(O,
|
|
90
|
+
d(a) && d(a).icon ? (v(), H(O, I({
|
|
91
91
|
key: 0,
|
|
92
92
|
class: "rds-e-accordion-title_tag"
|
|
93
|
-
}, d(a), { small: "" }), null, 16)) :
|
|
94
|
-
|
|
93
|
+
}, d(a), { small: "" }), null, 16)) : P("", !0),
|
|
94
|
+
T(E, {
|
|
95
95
|
class: y(["rds-e-accordion-title_icon", { "rds-e-accordion-title_icon--open": t.value }]),
|
|
96
96
|
name: "arrow_down"
|
|
97
97
|
}, null, 8, ["class"])
|
|
@@ -107,8 +107,8 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
|
|
|
107
107
|
ref: s,
|
|
108
108
|
class: "rds-e-accordion-panel_content"
|
|
109
109
|
}, [
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
j(e.$slots, "default", {}, () => [
|
|
111
|
+
A(h(c.content), 1)
|
|
112
112
|
], !0)
|
|
113
113
|
], 512)
|
|
114
114
|
], 2)
|
|
@@ -14,13 +14,13 @@ import './style/actionButton.css';const p = /* @__PURE__ */ o({
|
|
|
14
14
|
/**
|
|
15
15
|
* <span>Variante del botón</span>
|
|
16
16
|
* <br>
|
|
17
|
-
*`['primary', 'secondary']`
|
|
17
|
+
*`['primary', 'secondary', 'ghost']`
|
|
18
18
|
*/
|
|
19
19
|
variant: {
|
|
20
20
|
type: String,
|
|
21
21
|
default: "primary",
|
|
22
22
|
validator(e) {
|
|
23
|
-
return ["primary", "secondary"].includes(e);
|
|
23
|
+
return ["primary", "secondary", "ghost"].includes(e);
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
/**
|
|
@@ -58,7 +58,7 @@ import './style/actionButton.css';const p = /* @__PURE__ */ o({
|
|
|
58
58
|
"is-action": ""
|
|
59
59
|
}), null, 16));
|
|
60
60
|
}
|
|
61
|
-
}), f = /* @__PURE__ */ l(p, [["__scopeId", "data-v-
|
|
61
|
+
}), f = /* @__PURE__ */ l(p, [["__scopeId", "data-v-261a503b"]]);
|
|
62
62
|
export {
|
|
63
63
|
f as default
|
|
64
64
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as B, toRefs as
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/button.css';const
|
|
1
|
+
import { defineComponent as B, toRefs as I, computed as l, openBlock as v, createElementBlock as S, unref as s, normalizeClass as m, createBlock as x, createCommentVNode as k, createElementVNode as $, renderSlot as C, createTextVNode as N, toDisplayString as V } from "vue";
|
|
2
|
+
import { I as E } from "./icon-svg-CeKfjk3j.js";
|
|
3
|
+
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/button.css';const w = ["type", "disabled"], D = { class: "rds-e-btn__text" }, R = /* @__PURE__ */ B({
|
|
5
5
|
__name: "button",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -109,18 +109,18 @@ import './style/button.css';const E = ["type", "disabled"], L = { class: "rds-e-
|
|
|
109
109
|
inverse: d,
|
|
110
110
|
revertIcon: _,
|
|
111
111
|
loading: p
|
|
112
|
-
} =
|
|
112
|
+
} = I(t), c = l(() => p.value ? "loading" : n != null && n.value ? n == null ? void 0 : n.value : ""), h = l(() => r.value && ["button", "submit", "reset"].includes(r.value) ? r.value : "button"), b = l(() => ["primary", "secondary", "ghost"].includes(i.value) ? i.value : "primary"), g = l(() => {
|
|
113
113
|
const a = ["rds-e-btn"];
|
|
114
114
|
return i.value && a.push(`rds-e-btn--${b.value}`), d.value && a.push(`rds-e-btn--${b.value}-inverse`), c.value && a.push(
|
|
115
115
|
o != null && o.value ? "rds-e-btn--with-icon" : "rds-e-btn--icon"
|
|
116
116
|
), f.value && a.push("rds-e-btn--small"), _.value && a.push("rds-e-btn--revert"), u.value && a.push("rds-e-style-state-disabled"), p.value && a.push("rds-e-btn--loading"), y.value && a.push("rds-e-btn--mobile-width"), a.join(" ");
|
|
117
117
|
});
|
|
118
|
-
return (a, W) => (v(),
|
|
118
|
+
return (a, W) => (v(), S("button", {
|
|
119
119
|
type: h.value,
|
|
120
120
|
disabled: s(u),
|
|
121
121
|
class: m(g.value)
|
|
122
122
|
}, [
|
|
123
|
-
c.value ? (v(),
|
|
123
|
+
c.value ? (v(), x(E, {
|
|
124
124
|
key: 0,
|
|
125
125
|
name: c.value,
|
|
126
126
|
small: s(f),
|
|
@@ -130,14 +130,14 @@ import './style/button.css';const E = ["type", "disabled"], L = { class: "rds-e-
|
|
|
130
130
|
]]),
|
|
131
131
|
"aria-hidden": "true"
|
|
132
132
|
}, null, 8, ["name", "small", "class"])) : k("", !0),
|
|
133
|
-
$("span",
|
|
133
|
+
$("span", D, [
|
|
134
134
|
C(a.$slots, "default", {}, () => [
|
|
135
|
-
N(
|
|
135
|
+
N(V(s(o)), 1)
|
|
136
136
|
], !0)
|
|
137
137
|
])
|
|
138
|
-
], 10,
|
|
138
|
+
], 10, w));
|
|
139
139
|
}
|
|
140
|
-
}), T = /* @__PURE__ */
|
|
140
|
+
}), T = /* @__PURE__ */ L(R, [["__scopeId", "data-v-a17b5b56"]]);
|
|
141
141
|
export {
|
|
142
142
|
T as default
|
|
143
143
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as x, ref as d, watch as v, onMounted as y, onBeforeUnmount as w, openBlock as b, createElementBlock as g, normalizeClass as o, createElementVNode as n, renderSlot as S, createTextVNode as B, toDisplayString as C, createBlock as E, createCommentVNode as L } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { I as V } from "./icon-svg-CeKfjk3j.js";
|
|
3
3
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/checkbox.css';const
|
|
4
|
+
import './style/checkbox.css';const N = ["id", "checked", "aria-label", "required", "disabled"], q = ["for"], D = /* @__PURE__ */ x({
|
|
5
5
|
__name: "checkbox",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -80,7 +80,7 @@ import './style/checkbox.css';const D = ["id", "checked", "aria-label", "require
|
|
|
80
80
|
window.addEventListener("keydown", r), window.addEventListener("mousedown", i);
|
|
81
81
|
}), w(() => {
|
|
82
82
|
window.removeEventListener("keydown", r), window.removeEventListener("mousedown", i);
|
|
83
|
-
}), (a,
|
|
83
|
+
}), (a, I) => (b(), g("div", {
|
|
84
84
|
class: o(["rds-e-checkbox__container", { "rds-e-checkbox__container--focused": l.value }])
|
|
85
85
|
}, [
|
|
86
86
|
n("input", {
|
|
@@ -94,7 +94,7 @@ import './style/checkbox.css';const D = ["id", "checked", "aria-label", "require
|
|
|
94
94
|
onChange: m,
|
|
95
95
|
onFocus: h,
|
|
96
96
|
onBlur: k
|
|
97
|
-
}, null, 42,
|
|
97
|
+
}, null, 42, N),
|
|
98
98
|
n("label", {
|
|
99
99
|
for: e.id.toString(),
|
|
100
100
|
class: o(["rds-e-checkbox__label", {
|
|
@@ -121,10 +121,10 @@ import './style/checkbox.css';const D = ["id", "checked", "aria-label", "require
|
|
|
121
121
|
}, null, 8, ["name"])) : L("", !0)
|
|
122
122
|
], 2)
|
|
123
123
|
], !0)
|
|
124
|
-
], 10,
|
|
124
|
+
], 10, q)
|
|
125
125
|
], 2));
|
|
126
126
|
}
|
|
127
|
-
}),
|
|
127
|
+
}), M = /* @__PURE__ */ _(D, [["__scopeId", "data-v-6beff478"]]);
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
M as default
|
|
130
130
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as G, mergeModels as M, toRefs as J, useModel as K, ref as Q, computed as h, openBlock as i, createElementBlock as y, createVNode as B, mergeProps as W, unref as n, withModifiers as u, createSlots as T, withCtx as a, normalizeClass as X, renderSlot as o, createElementVNode as d, createBlock as q, createCommentVNode as x, Fragment as Y, toDisplayString as O, nextTick as E } from "vue";
|
|
2
2
|
import Z from "./multiselect.es.js";
|
|
3
3
|
import ee from "./textField.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { I as le } from "./icon-svg-CeKfjk3j.js";
|
|
5
5
|
import te from "./checkbox.es.js";
|
|
6
6
|
import se from "./radioButton.es.js";
|
|
7
7
|
import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
import './style/dropdown.css';const ne = { class: "rds-e-dropdown" },
|
|
8
|
+
import './style/dropdown.css';const ne = { class: "rds-e-dropdown" }, ae = { class: "rds-e-dropdown__option" }, oe = { class: "rds-e-dropdown__option-container" }, de = { class: "rds-e-dropdown__option--prepend" }, ie = { class: "rds-e-dropdown__option--content" }, ue = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "rds-e-dropdown__option-detail"
|
|
11
|
-
}, ce = { key: 1 },
|
|
11
|
+
}, ce = { key: 1 }, me = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "rds-e-dropdown__option--append"
|
|
14
|
-
},
|
|
14
|
+
}, fe = { class: "rds-e-dropdown__after-list" }, pe = { class: "rds-e-dropdown__after-list-container" }, ve = /* @__PURE__ */ G({
|
|
15
15
|
__name: "dropdown",
|
|
16
|
-
props: /* @__PURE__ */
|
|
16
|
+
props: /* @__PURE__ */ M({
|
|
17
17
|
/**
|
|
18
18
|
* Id del dropdown
|
|
19
19
|
*/
|
|
@@ -101,6 +101,13 @@ import './style/dropdown.css';const ne = { class: "rds-e-dropdown" }, oe = { cla
|
|
|
101
101
|
type: Number,
|
|
102
102
|
default: 4
|
|
103
103
|
},
|
|
104
|
+
/**
|
|
105
|
+
* El alto maximo de la lista.
|
|
106
|
+
*/
|
|
107
|
+
maxHeight: {
|
|
108
|
+
type: Number,
|
|
109
|
+
default: 288
|
|
110
|
+
},
|
|
104
111
|
/**
|
|
105
112
|
* Texto a mostrar cuando se alcanza el limite de elementos seleccionados.
|
|
106
113
|
*/
|
|
@@ -114,27 +121,27 @@ import './style/dropdown.css';const ne = { class: "rds-e-dropdown" }, oe = { cla
|
|
|
114
121
|
},
|
|
115
122
|
modelModifiers: {}
|
|
116
123
|
}),
|
|
117
|
-
emits: /* @__PURE__ */
|
|
118
|
-
setup(t, { expose: $, emit:
|
|
119
|
-
const c = t,
|
|
120
|
-
disabled:
|
|
121
|
-
options:
|
|
124
|
+
emits: /* @__PURE__ */ M(["open", "close", "select", "change"], ["update:modelValue"]),
|
|
125
|
+
setup(t, { expose: $, emit: N }) {
|
|
126
|
+
const c = t, m = N, {
|
|
127
|
+
disabled: f,
|
|
128
|
+
options: b,
|
|
122
129
|
limit: C,
|
|
123
130
|
multiple: p
|
|
124
|
-
} = J(c), r = K(t, "modelValue"), v = Q(),
|
|
131
|
+
} = J(c), r = K(t, "modelValue"), v = Q(), _ = h(() => b.value.every((e) => typeof e == "object" && (e == null ? void 0 : e.id) && (e == null ? void 0 : e.label))), j = h(() => !p.value || c.closeOnSelect), D = h({
|
|
125
132
|
get: () => r.value ? c.multiple ? Array.isArray(r.value) ? r.value.length > C.value ? c.limitText(C.value) : r.value.map((e) => typeof e == "string" ? e : e.label).join(", ") : "" : typeof r.value == "object" ? r.value.label : typeof r.value == "string" ? r.value : "" : "",
|
|
126
133
|
set: () => null
|
|
127
|
-
}), F =
|
|
134
|
+
}), F = h(() => ({
|
|
128
135
|
"rds-e-dropdown-input": !0,
|
|
129
|
-
"rds-e-dropdown--disabled":
|
|
136
|
+
"rds-e-dropdown--disabled": f.value,
|
|
130
137
|
"rds-e-dropdown--small": c.small
|
|
131
|
-
})), S =
|
|
138
|
+
})), S = h(() => {
|
|
132
139
|
const e = {};
|
|
133
|
-
return
|
|
140
|
+
return _.value && Object.assign(e, {
|
|
134
141
|
"track-by": "id",
|
|
135
142
|
label: "label"
|
|
136
143
|
}), e;
|
|
137
|
-
}),
|
|
144
|
+
}), g = (e) => {
|
|
138
145
|
if (r.value === e) return !0;
|
|
139
146
|
if (Array.isArray(r.value)) {
|
|
140
147
|
if (typeof e == "string") return r.value.includes(e);
|
|
@@ -142,35 +149,35 @@ import './style/dropdown.css';const ne = { class: "rds-e-dropdown" }, oe = { cla
|
|
|
142
149
|
return r.value.some((s) => s.id === e.id);
|
|
143
150
|
}
|
|
144
151
|
return !1;
|
|
145
|
-
}, L = (e) => {
|
|
146
|
-
f("open", e);
|
|
147
152
|
}, I = (e) => {
|
|
148
|
-
|
|
153
|
+
m("open", e);
|
|
154
|
+
}, L = (e) => {
|
|
155
|
+
m("close", e);
|
|
149
156
|
}, U = (e) => {
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
E(() => {
|
|
158
|
+
m("select", e);
|
|
152
159
|
});
|
|
153
|
-
},
|
|
154
|
-
|
|
160
|
+
}, H = () => {
|
|
161
|
+
E(() => {
|
|
155
162
|
if (p.value) {
|
|
156
|
-
const e =
|
|
157
|
-
(s) =>
|
|
163
|
+
const e = b.value.filter(
|
|
164
|
+
(s) => g(s)
|
|
158
165
|
) || [];
|
|
159
|
-
|
|
166
|
+
m("change", e);
|
|
160
167
|
} else {
|
|
161
|
-
const e =
|
|
162
|
-
(s) =>
|
|
168
|
+
const e = b.value.find(
|
|
169
|
+
(s) => g(s)
|
|
163
170
|
);
|
|
164
|
-
|
|
171
|
+
m("change", [e]);
|
|
165
172
|
}
|
|
166
173
|
});
|
|
167
174
|
}, A = (e) => {
|
|
168
175
|
v.value.select(e);
|
|
169
176
|
}, R = () => {
|
|
170
177
|
v.value.activate();
|
|
171
|
-
},
|
|
178
|
+
}, P = () => {
|
|
172
179
|
v.value.deactivate();
|
|
173
|
-
},
|
|
180
|
+
}, z = () => {
|
|
174
181
|
v.value.toggle();
|
|
175
182
|
};
|
|
176
183
|
return $({
|
|
@@ -181,46 +188,48 @@ import './style/dropdown.css';const ne = { class: "rds-e-dropdown" }, oe = { cla
|
|
|
181
188
|
/**
|
|
182
189
|
* Cierra el dropdown
|
|
183
190
|
*/
|
|
184
|
-
deactivate:
|
|
185
|
-
}), (e, s) => (i(),
|
|
191
|
+
deactivate: P
|
|
192
|
+
}), (e, s) => (i(), y("div", ne, [
|
|
186
193
|
B(Z, W({
|
|
187
194
|
ref_key: "multiselect",
|
|
188
195
|
ref: v,
|
|
189
196
|
modelValue: r.value,
|
|
190
197
|
"onUpdate:modelValue": s[2] || (s[2] = (l) => r.value = l),
|
|
191
198
|
class: F.value,
|
|
192
|
-
options: n(
|
|
193
|
-
"close-on-select":
|
|
199
|
+
options: n(b),
|
|
200
|
+
"close-on-select": j.value,
|
|
194
201
|
"show-labels": !1,
|
|
195
|
-
disabled: n(
|
|
202
|
+
disabled: n(f),
|
|
196
203
|
multiple: n(p),
|
|
204
|
+
"max-height": t.maxHeight,
|
|
197
205
|
searchable: !1,
|
|
206
|
+
small: t.small,
|
|
198
207
|
"open-direction": "bottom",
|
|
199
208
|
limit: n(C),
|
|
200
209
|
"limit-text": t.limitText
|
|
201
210
|
}, S.value, {
|
|
202
|
-
onOpen:
|
|
203
|
-
onClose:
|
|
211
|
+
onOpen: I,
|
|
212
|
+
onClose: L,
|
|
204
213
|
onSelect: U,
|
|
205
|
-
"onUpdate:modelValue":
|
|
214
|
+
"onUpdate:modelValue": H,
|
|
206
215
|
onFocus: s[3] || (s[3] = u(() => R(), ["prevent"])),
|
|
207
216
|
onBlur: u(() => null, ["prevent"])
|
|
208
|
-
}),
|
|
209
|
-
selection:
|
|
217
|
+
}), T({
|
|
218
|
+
selection: a(({ isOpen: l }) => [
|
|
210
219
|
B(n(ee), {
|
|
211
220
|
id: `multiselect-dropdown-${t.id}`,
|
|
212
|
-
modelValue:
|
|
213
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
221
|
+
modelValue: D.value,
|
|
222
|
+
"onUpdate:modelValue": s[1] || (s[1] = (k) => D.value = k),
|
|
214
223
|
class: "rds-e-dropdown__input",
|
|
215
|
-
disabled: n(
|
|
224
|
+
disabled: n(f),
|
|
216
225
|
label: t.label,
|
|
217
226
|
error: t.error,
|
|
218
227
|
helper: t.helper,
|
|
219
228
|
"helper-text": t.helperText,
|
|
220
229
|
readonly: "",
|
|
221
|
-
onClick: u((
|
|
222
|
-
},
|
|
223
|
-
"right-icon":
|
|
230
|
+
onClick: u((k) => l ? null : R(), ["prevent", "stop"])
|
|
231
|
+
}, T({
|
|
232
|
+
"right-icon": a(() => [
|
|
224
233
|
B(n(le), {
|
|
225
234
|
name: "arrow_down",
|
|
226
235
|
"aria-hidden": "true",
|
|
@@ -229,111 +238,111 @@ import './style/dropdown.css';const ne = { class: "rds-e-dropdown" }, oe = { cla
|
|
|
229
238
|
}]),
|
|
230
239
|
onClick: s[0] || (s[0] = u(() => {
|
|
231
240
|
}, ["self", "stop"])),
|
|
232
|
-
onMousedown: u(
|
|
241
|
+
onMousedown: u(z, ["self", "prevent", "stop"])
|
|
233
242
|
}, null, 8, ["class"])
|
|
234
243
|
]),
|
|
235
244
|
_: 2
|
|
236
245
|
}, [
|
|
237
246
|
e.$slots["helper-text"] ? {
|
|
238
247
|
name: "helper-text",
|
|
239
|
-
fn:
|
|
240
|
-
|
|
248
|
+
fn: a(() => [
|
|
249
|
+
o(e.$slots, "helper-text", {}, void 0, !0)
|
|
241
250
|
]),
|
|
242
251
|
key: "0"
|
|
243
252
|
} : void 0
|
|
244
253
|
]), 1032, ["id", "modelValue", "disabled", "label", "error", "helper", "helper-text", "onClick"])
|
|
245
254
|
]),
|
|
246
|
-
placeholder:
|
|
247
|
-
s[4] || (s[4] =
|
|
255
|
+
placeholder: a(() => [
|
|
256
|
+
s[4] || (s[4] = d("span", null, null, -1))
|
|
248
257
|
]),
|
|
249
|
-
option:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
n(p) ? (i(),
|
|
258
|
+
option: a(({ option: l, search: k, index: V }) => [
|
|
259
|
+
d("div", ae, [
|
|
260
|
+
d("div", oe, [
|
|
261
|
+
d("div", de, [
|
|
262
|
+
n(p) ? (i(), q(n(te), {
|
|
254
263
|
key: 0,
|
|
255
264
|
id: `${V}-${l.id}`,
|
|
256
265
|
small: t.small,
|
|
257
|
-
"is-checked":
|
|
258
|
-
disabled: n(
|
|
259
|
-
onClick: u((
|
|
260
|
-
}, null, 8, ["id", "small", "is-checked", "disabled", "onClick"])) : !n(p) && t.showRadio ? (i(),
|
|
266
|
+
"is-checked": g(l),
|
|
267
|
+
disabled: n(f) || (l == null ? void 0 : l.$isDisabled) || !1,
|
|
268
|
+
onClick: u((w) => A(l), ["prevent", "stop"])
|
|
269
|
+
}, null, 8, ["id", "small", "is-checked", "disabled", "onClick"])) : !n(p) && t.showRadio ? (i(), q(n(se), {
|
|
261
270
|
key: 1,
|
|
262
271
|
id: `${V}-${l.id}`,
|
|
263
272
|
small: t.small,
|
|
264
273
|
"group-name": `group-${t.id}`,
|
|
265
|
-
checked:
|
|
266
|
-
disabled: n(
|
|
274
|
+
checked: g(l),
|
|
275
|
+
disabled: n(f) || (l == null ? void 0 : l.$isDisabled) || !1,
|
|
267
276
|
option: l,
|
|
268
|
-
onClick: u((
|
|
269
|
-
}, null, 8, ["id", "small", "group-name", "checked", "disabled", "option", "onClick"])) :
|
|
277
|
+
onClick: u((w) => A(l), ["prevent", "stop"])
|
|
278
|
+
}, null, 8, ["id", "small", "group-name", "checked", "disabled", "option", "onClick"])) : x("", !0)
|
|
270
279
|
]),
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
var
|
|
280
|
+
d("div", ie, [
|
|
281
|
+
o(e.$slots, "singleLabel", { option: l }, () => {
|
|
282
|
+
var w;
|
|
274
283
|
return [
|
|
275
|
-
(
|
|
276
|
-
|
|
277
|
-
l != null && l.detail ? (i(),
|
|
278
|
-
], 64)) : (i(),
|
|
284
|
+
(w = S.value) != null && w.label ? (i(), y(Y, { key: 0 }, [
|
|
285
|
+
d("span", null, O(l.label), 1),
|
|
286
|
+
l != null && l.detail ? (i(), y("span", ue, O(l.detail), 1)) : x("", !0)
|
|
287
|
+
], 64)) : (i(), y("span", ce, O(l), 1))
|
|
279
288
|
];
|
|
280
289
|
}, !0)
|
|
281
290
|
])
|
|
282
291
|
]),
|
|
283
|
-
e.$slots.optionAppend ? (i(),
|
|
284
|
-
|
|
292
|
+
e.$slots.optionAppend ? (i(), y("div", me, [
|
|
293
|
+
o(e.$slots, "optionAppend", {
|
|
285
294
|
option: l,
|
|
286
|
-
search:
|
|
295
|
+
search: k,
|
|
287
296
|
index: V
|
|
288
297
|
}, void 0, !0)
|
|
289
|
-
])) :
|
|
298
|
+
])) : x("", !0)
|
|
290
299
|
])
|
|
291
300
|
]),
|
|
292
301
|
_: 2
|
|
293
302
|
}, [
|
|
294
303
|
e.$slots.limit ? {
|
|
295
304
|
name: "limit",
|
|
296
|
-
fn:
|
|
297
|
-
|
|
305
|
+
fn: a(() => [
|
|
306
|
+
o(e.$slots, "limit", {}, void 0, !0)
|
|
298
307
|
]),
|
|
299
308
|
key: "0"
|
|
300
309
|
} : void 0,
|
|
301
310
|
e.$slots.maxElements ? {
|
|
302
311
|
name: "maxElements",
|
|
303
|
-
fn:
|
|
304
|
-
|
|
312
|
+
fn: a(() => [
|
|
313
|
+
o(e.$slots, "maxElements", {}, void 0, !0)
|
|
305
314
|
]),
|
|
306
315
|
key: "1"
|
|
307
316
|
} : void 0,
|
|
308
317
|
e.$slots.noResult ? {
|
|
309
318
|
name: "noResult",
|
|
310
|
-
fn:
|
|
311
|
-
|
|
319
|
+
fn: a(({ search: l }) => [
|
|
320
|
+
o(e.$slots, "noResult", { search: l }, void 0, !0)
|
|
312
321
|
]),
|
|
313
322
|
key: "2"
|
|
314
323
|
} : void 0,
|
|
315
324
|
e.$slots.noOptions ? {
|
|
316
325
|
name: "noOptions",
|
|
317
|
-
fn:
|
|
318
|
-
|
|
326
|
+
fn: a(() => [
|
|
327
|
+
o(e.$slots, "noOptions", {}, void 0, !0)
|
|
319
328
|
]),
|
|
320
329
|
key: "3"
|
|
321
330
|
} : void 0,
|
|
322
331
|
e.$slots.afterList ? {
|
|
323
332
|
name: "afterList",
|
|
324
|
-
fn:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
333
|
+
fn: a(() => [
|
|
334
|
+
d("div", fe, [
|
|
335
|
+
d("div", pe, [
|
|
336
|
+
o(e.$slots, "afterList", {}, void 0, !0)
|
|
328
337
|
])
|
|
329
338
|
])
|
|
330
339
|
]),
|
|
331
340
|
key: "4"
|
|
332
341
|
} : void 0
|
|
333
|
-
]), 1040, ["modelValue", "class", "options", "close-on-select", "disabled", "multiple", "limit", "limit-text"])
|
|
342
|
+
]), 1040, ["modelValue", "class", "options", "close-on-select", "disabled", "multiple", "max-height", "small", "limit", "limit-text"])
|
|
334
343
|
]));
|
|
335
344
|
}
|
|
336
|
-
}), Ce = /* @__PURE__ */ re(ve, [["__scopeId", "data-v-
|
|
345
|
+
}), Ce = /* @__PURE__ */ re(ve, [["__scopeId", "data-v-6cc6fc2c"]]);
|
|
337
346
|
export {
|
|
338
347
|
Ce as default
|
|
339
348
|
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { defineComponent as m, ref as g, computed as y, openBlock as l, createElementBlock as c, normalizeClass as b, createElementVNode as s, createBlock as a, createCommentVNode as r, toDisplayString as n } from "vue";
|
|
2
|
+
import { I as o } from "./icon-svg-CeKfjk3j.js";
|
|
3
|
+
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/filterChip.css';const k = ["disabled"], C = { class: "rds-e-filter-chip__icon-container" }, I = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "rds-e-filter-chip__number"
|
|
7
|
+
}, w = { class: "rds-e-filter-chip__text" }, B = /* @__PURE__ */ m({
|
|
8
|
+
__name: "filter-chip",
|
|
9
|
+
props: {
|
|
10
|
+
/**
|
|
11
|
+
* <span>Tipo de chip a base del fondo en donde se va a usar</span>
|
|
12
|
+
* <br>
|
|
13
|
+
* `['default', 'floating']`
|
|
14
|
+
*/
|
|
15
|
+
surfaceType: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "default",
|
|
18
|
+
validator: (e) => ["default", "floating"].includes(e)
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* <span>Icono a mostrar en el chip (a la izquierda)</span>
|
|
22
|
+
*/
|
|
23
|
+
leftIcon: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "check"
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* <span>Numero a mostrar en el chip (a la izquierda)</span>
|
|
29
|
+
*/
|
|
30
|
+
leftNumber: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* <span>Indica si se muestra el icono de flecha a la derecha</span>
|
|
36
|
+
*/
|
|
37
|
+
arrowIcon: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Valor del filtro representado por el chip.
|
|
43
|
+
*/
|
|
44
|
+
filterValue: {
|
|
45
|
+
type: [String, Number, Object, Boolean],
|
|
46
|
+
required: !0
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* <span>Texto a mostrar en el chip. Si contentType es 'number', se muestra este texto como numero</span>
|
|
50
|
+
*/
|
|
51
|
+
text: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: !0
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* <span>Indica si está disabled el componente</span>
|
|
57
|
+
*/
|
|
58
|
+
disabled: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* <span>Indica si el componente está selected</span>
|
|
64
|
+
*/
|
|
65
|
+
selected: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* <span>Estado del componente "highlight"</span>
|
|
71
|
+
*/
|
|
72
|
+
highlight: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !1
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
emits: ["onClickChip"],
|
|
78
|
+
setup(e, { emit: d }) {
|
|
79
|
+
const t = e, f = d, h = g(null), u = y(() => {
|
|
80
|
+
const i = ["rds-e-filter-chip"];
|
|
81
|
+
return i.push(`rds-e-filter-chip--${t.surfaceType}`), t.disabled && i.push("rds-e-filter-chip--disabled"), t.selected && !t.highlight && i.push("rds-e-filter-chip--selected"), t.highlight && i.push("rds-e-filter-chip--highlight"), t.selected && t.highlight && i.push("rds-e-filter-chip--selected-highlight"), t.arrowIcon && i.push("rds-e-filter-chip--with-arrow"), i;
|
|
82
|
+
}), p = () => {
|
|
83
|
+
t.disabled || f("onClickChip", t.filterValue);
|
|
84
|
+
};
|
|
85
|
+
return (i, N) => (l(), c("button", {
|
|
86
|
+
ref_key: "chipRef",
|
|
87
|
+
ref: h,
|
|
88
|
+
class: b(u.value),
|
|
89
|
+
disabled: e.disabled,
|
|
90
|
+
type: "button",
|
|
91
|
+
onClick: p
|
|
92
|
+
}, [
|
|
93
|
+
s("span", C, [
|
|
94
|
+
e.leftIcon && !e.leftNumber ? (l(), a(o, {
|
|
95
|
+
key: 0,
|
|
96
|
+
name: e.leftIcon,
|
|
97
|
+
class: "rds-e-filter-chip__icon",
|
|
98
|
+
"aria-hidden": "true"
|
|
99
|
+
}, null, 8, ["name"])) : r("", !0),
|
|
100
|
+
e.leftNumber && !e.leftIcon ? (l(), c("span", I, n(e.leftNumber), 1)) : r("", !0)
|
|
101
|
+
]),
|
|
102
|
+
s("span", w, n(e.text), 1),
|
|
103
|
+
e.arrowIcon ? (l(), a(o, {
|
|
104
|
+
key: 0,
|
|
105
|
+
name: "arrow_down",
|
|
106
|
+
class: "rds-e-filter-chip__arrow-icon",
|
|
107
|
+
"aria-hidden": "true"
|
|
108
|
+
})) : r("", !0)
|
|
109
|
+
], 10, k));
|
|
110
|
+
}
|
|
111
|
+
}), V = /* @__PURE__ */ _(B, [["__scopeId", "data-v-58cf5c6f"]]);
|
|
112
|
+
export {
|
|
113
|
+
V as default
|
|
114
|
+
};
|