energy-components 1.2.0 → 1.4.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/button.es.js +11 -11
- package/dist/components/checkbox.es.js +7 -7
- package/dist/components/datepicker.es.js +2 -2
- package/dist/components/dropdown.es.js +11 -11
- package/dist/components/{icon-svg-GoL3_ayS.js → icon-svg-u9BWBbvW.js} +1 -1
- package/dist/components/iconList.es.js +5 -5
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +83 -74
- 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/persistentToast.es.js +5 -5
- package/dist/components/quantitySelector.es.js +69 -86
- package/dist/components/radioButton.es.js +16 -16
- package/dist/components/selectionChip.es.js +87 -0
- package/dist/components/sidedrawer.es.js +85 -0
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/selectionChip.css +1 -0
- package/dist/components/style/sidedrawer.css +1 -0
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/toggle.css +1 -0
- package/dist/components/switch.es.js +40 -36
- package/dist/components/tabBar.es.js +12 -12
- package/dist/components/tag.es.js +5 -5
- package/dist/components/textArea.es.js +64 -57
- package/dist/components/textField.es.js +91 -77
- package/dist/components/toggle.es.js +53 -0
- package/dist/components/tooltip.es.js +61 -61
- package/dist/energy-components.es.js +4081 -3862
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +3 -0
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +24 -19
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +120 -0
- package/dist/types/src/components/input/switch/switch.vue.d.ts +12 -3
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +8 -0
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +41 -0
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +75 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as h, ref as C, computed as v, openBlock as r, createBlock as m, unref as a, withCtx as u, createVNode as k, normalizeStyle as b, withModifiers as w, createElementVNode as d, renderSlot as n, createCommentVNode as l, createElementBlock as c } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import './style/modal.css';const
|
|
2
|
+
import S from "./overlay.es.js";
|
|
3
|
+
import x from "./card.es.js";
|
|
4
|
+
import { R as $ } from "./icon-svg-u9BWBbvW.js";
|
|
5
|
+
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import './style/modal.css';const B = { class: "rds-e-modal__container" }, N = { class: "rds-e-modal__header" }, W = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "rds-e-modal__section-spacer"
|
|
9
9
|
}, g = { class: "rds-e-modal__body" }, q = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "rds-e-modal__section-spacer"
|
|
12
|
-
},
|
|
12
|
+
}, D = { class: "rds-e-modal__footer" }, V = /* @__PURE__ */ h({
|
|
13
13
|
__name: "modal",
|
|
14
14
|
props: {
|
|
15
15
|
/**
|
|
@@ -70,7 +70,7 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
|
|
|
70
70
|
}), y = () => {
|
|
71
71
|
e.preventClose || i("onCloseRequest");
|
|
72
72
|
};
|
|
73
|
-
return (o, s) => t.open ? (r(), m(a(
|
|
73
|
+
return (o, s) => t.open ? (r(), m(a(S), {
|
|
74
74
|
key: 0,
|
|
75
75
|
ref_key: "overlay",
|
|
76
76
|
ref: f,
|
|
@@ -79,15 +79,15 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
|
|
|
79
79
|
onClick: y
|
|
80
80
|
}, {
|
|
81
81
|
default: u(() => [
|
|
82
|
-
k(a(
|
|
82
|
+
k(a(x), {
|
|
83
83
|
class: "rds-e-modal__card",
|
|
84
84
|
style: b(_.value),
|
|
85
85
|
onClick: s[1] || (s[1] = w(() => {
|
|
86
86
|
}, ["stop"]))
|
|
87
87
|
}, {
|
|
88
88
|
default: u(() => [
|
|
89
|
-
d("div",
|
|
90
|
-
d("div",
|
|
89
|
+
d("div", B, [
|
|
90
|
+
d("div", N, [
|
|
91
91
|
n(o.$slots, "header", {}, void 0, !0),
|
|
92
92
|
e.showClose ? (r(), m(a($), {
|
|
93
93
|
key: 0,
|
|
@@ -102,7 +102,7 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
|
|
|
102
102
|
n(o.$slots, "body", {}, void 0, !0)
|
|
103
103
|
]),
|
|
104
104
|
o.$slots.footer ? (r(), c("span", q)) : l("", !0),
|
|
105
|
-
d("div",
|
|
105
|
+
d("div", D, [
|
|
106
106
|
n(o.$slots, "footer", {}, void 0, !0)
|
|
107
107
|
])
|
|
108
108
|
])
|
|
@@ -113,7 +113,7 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
|
|
|
113
113
|
_: 3
|
|
114
114
|
}, 8, ["teleport"])) : l("", !0);
|
|
115
115
|
}
|
|
116
|
-
}), j = /* @__PURE__ */
|
|
116
|
+
}), j = /* @__PURE__ */ R(V, [["__scopeId", "data-v-24bc0adc"]]);
|
|
117
117
|
export {
|
|
118
118
|
j as default
|
|
119
119
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as f, toRefs as v, computed as y, openBlock as t, createElementBlock as s, normalizeClass as g, createElementVNode as n, createVNode as a, createCommentVNode as o, toDisplayString as c, renderSlot as h } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { R as l } from "./icon-svg-u9BWBbvW.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 S = { class: "alert" }, C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "rds-e-persistent-toast__custom-icon-block"
|
|
7
7
|
}, $ = { class: "rds-e-persistent-toast__wrapper" }, b = { class: "rds-e-persistent-toast__title__wrapper" }, q = {
|
|
@@ -89,12 +89,12 @@ import './style/persistentToast.css';const C = { class: "alert" }, S = {
|
|
|
89
89
|
), p = () => {
|
|
90
90
|
m("onCloseToastAction");
|
|
91
91
|
};
|
|
92
|
-
return (i,
|
|
92
|
+
return (i, N) => (t(), s("div", {
|
|
93
93
|
class: g(["rds-e-persistent-toast", _.value]),
|
|
94
94
|
role: "alert"
|
|
95
95
|
}, [
|
|
96
|
-
n("div",
|
|
97
|
-
e.icon ? (t(), s("div",
|
|
96
|
+
n("div", S, [
|
|
97
|
+
e.icon ? (t(), s("div", C, [
|
|
98
98
|
a(l, {
|
|
99
99
|
name: e.icon,
|
|
100
100
|
class: "rds-e-persistent-toast__custom-icon",
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/quantitySelector.css';const _ = ["disabled"],
|
|
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-u9BWBbvW.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
|
-
props: {
|
|
7
|
-
/**
|
|
8
|
-
* <span>Valor del componente.</span>
|
|
9
|
-
*/
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: Number,
|
|
12
|
-
default: 0,
|
|
13
|
-
validator(l) {
|
|
14
|
-
return l < 0 || l > 99 ? (console.warn(
|
|
15
|
-
`[RDSQuantitySelector]: El valor de modelValue debe estar entre 0 y 99. Valor actual: ${l}`
|
|
16
|
-
), !1) : !0;
|
|
17
|
-
}
|
|
18
|
-
},
|
|
6
|
+
props: /* @__PURE__ */ c({
|
|
19
7
|
/**
|
|
20
8
|
* <span>Indica si se muestra el botón de borrado.</span>
|
|
21
9
|
* <br>
|
|
@@ -43,118 +31,113 @@ import './style/quantitySelector.css';const _ = ["disabled"], D = ["disabled"],
|
|
|
43
31
|
validator(l) {
|
|
44
32
|
return ["default", "small"].includes(l);
|
|
45
33
|
}
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* <span>Indica si el componente ocupa el 100% del ancho de su contenedor.</span>
|
|
37
|
+
*/
|
|
38
|
+
fullWidth: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
46
41
|
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, h = (a) => {
|
|
55
|
-
const u = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab"];
|
|
56
|
-
if (!u.includes(a.key) && Number.isNaN(Number.parseInt(a.key))) {
|
|
57
|
-
a.preventDefault();
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (d.value && String(d.value.value).length >= 2 && !u.includes(a.key)) {
|
|
61
|
-
a.preventDefault();
|
|
62
|
-
return;
|
|
42
|
+
}, {
|
|
43
|
+
modelValue: {
|
|
44
|
+
default: 0,
|
|
45
|
+
validator(l) {
|
|
46
|
+
return l < 0 || l > 99 ? (console.warn(
|
|
47
|
+
`[RDSQuantitySelector]: El valor de modelValue debe estar entre 0 y 99. Valor actual: ${l}`
|
|
48
|
+
), !1) : !0;
|
|
63
49
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
},
|
|
51
|
+
modelModifiers: {}
|
|
52
|
+
}),
|
|
53
|
+
emits: /* @__PURE__ */ c(["onClickPlus", "onClickMinus", "onChange", "onDelete"], ["update:modelValue"]),
|
|
54
|
+
setup(l, { emit: p }) {
|
|
55
|
+
const h = l, n = p, e = w(l, "modelValue"), s = i(!1), u = i(null), k = i(null), C = () => {
|
|
56
|
+
e.value < 99 && (e.value++, n("onChange", e.value)), n("onClickPlus");
|
|
57
|
+
}, q = () => {
|
|
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");
|
|
59
|
+
}, N = (t) => {
|
|
60
|
+
const a = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab"];
|
|
61
|
+
!a.includes(t.key) && Number.isNaN(Number.parseInt(t.key)) && t.preventDefault(), u.value && String(u.value.value).length >= 2 && !a.includes(t.key) && t.preventDefault();
|
|
62
|
+
}, g = () => {
|
|
63
|
+
if (u.value) {
|
|
64
|
+
let t = Number.parseInt(u.value.value, 10);
|
|
65
|
+
(u.value.value === null || u.value.value === "") && (t = 0), !Number.isNaN(t) && t >= 0 && t <= 99 ? (e.value = t, n("onChange", e.value)) : Number.isNaN(t) && (e.value = 0, n("onChange", e.value));
|
|
74
66
|
}
|
|
75
|
-
s.value = !1
|
|
76
|
-
o.value && (o.value.value = String(e.value));
|
|
77
|
-
});
|
|
67
|
+
s.value = !1;
|
|
78
68
|
};
|
|
79
|
-
return
|
|
80
|
-
(
|
|
81
|
-
(a) => {
|
|
82
|
-
e.value = a, o.value && (o.value.value = String(a));
|
|
83
|
-
}
|
|
84
|
-
), f(s, (a) => {
|
|
85
|
-
a && c(() => {
|
|
86
|
-
var u, n;
|
|
87
|
-
(u = d.value) == null || u.focus(), (n = d.value) == null || n.select();
|
|
88
|
-
});
|
|
89
|
-
}), (a, u) => (w(), B("div", {
|
|
90
|
-
class: m(["rds-e-quantity-selector", {
|
|
69
|
+
return (t, a) => (B(), I("div", {
|
|
70
|
+
class: r(["rds-e-quantity-selector", {
|
|
91
71
|
"rds-e-quantity-selector--disabled": l.disabled,
|
|
92
|
-
"rds-e-quantity-selector--small": l.size === "small"
|
|
72
|
+
"rds-e-quantity-selector--small": l.size === "small",
|
|
73
|
+
"rds-e-quantity-selector--full-width": l.fullWidth
|
|
93
74
|
}])
|
|
94
75
|
}, [
|
|
95
|
-
|
|
96
|
-
class:
|
|
97
|
-
"rds-e-quantity-selector__button--disabled": l.disabled || e.value === 0
|
|
76
|
+
o("button", {
|
|
77
|
+
class: r(["rds-e-quantity-selector__button", {
|
|
78
|
+
"rds-e-quantity-selector__button--disabled": l.disabled || e.value === 0,
|
|
79
|
+
"rds-e-quantity-selector__button--limit": e.value === 0
|
|
98
80
|
}]),
|
|
99
81
|
disabled: l.disabled || e.value === 0,
|
|
100
|
-
onClick:
|
|
82
|
+
onClick: q
|
|
101
83
|
}, [
|
|
102
|
-
|
|
84
|
+
m(y, {
|
|
103
85
|
name: l.deleteButton && e.value !== 0 ? "delete" : "minus"
|
|
104
86
|
}, null, 8, ["name"])
|
|
105
87
|
], 10, _),
|
|
106
|
-
|
|
88
|
+
f(o("input", {
|
|
107
89
|
ref_key: "mainInput",
|
|
108
|
-
ref:
|
|
109
|
-
"onUpdate:modelValue":
|
|
90
|
+
ref: k,
|
|
91
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => e.value = d),
|
|
110
92
|
type: "number",
|
|
111
93
|
class: "rds-e-quantity-selector__input",
|
|
112
94
|
disabled: l.disabled,
|
|
113
95
|
max: 99,
|
|
114
96
|
min: 0,
|
|
115
97
|
readonly: "",
|
|
116
|
-
onClick:
|
|
117
|
-
}, null, 8,
|
|
118
|
-
[
|
|
98
|
+
onClick: a[1] || (a[1] = (d) => s.value = !0)
|
|
99
|
+
}, null, 8, M), [
|
|
100
|
+
[v, !s.value],
|
|
119
101
|
[
|
|
120
|
-
|
|
102
|
+
b,
|
|
121
103
|
e.value,
|
|
122
104
|
void 0,
|
|
123
105
|
{ number: !0 }
|
|
124
106
|
]
|
|
125
107
|
]),
|
|
126
|
-
|
|
108
|
+
f(o("input", {
|
|
127
109
|
ref_key: "manualInput",
|
|
128
|
-
ref:
|
|
129
|
-
"onUpdate:modelValue":
|
|
110
|
+
ref: u,
|
|
111
|
+
"onUpdate:modelValue": a[2] || (a[2] = (d) => e.value = d),
|
|
130
112
|
type: "number",
|
|
131
113
|
class: "rds-e-quantity-selector__input",
|
|
132
114
|
disabled: l.disabled,
|
|
133
115
|
max: 99,
|
|
134
116
|
min: 0,
|
|
135
|
-
onBlur:
|
|
136
|
-
onKeydown:
|
|
137
|
-
}, null, 40,
|
|
138
|
-
[
|
|
117
|
+
onBlur: g,
|
|
118
|
+
onKeydown: N
|
|
119
|
+
}, null, 40, S), [
|
|
120
|
+
[v, s.value],
|
|
139
121
|
[
|
|
140
|
-
|
|
122
|
+
b,
|
|
141
123
|
e.value,
|
|
142
124
|
void 0,
|
|
143
125
|
{ number: !0 }
|
|
144
126
|
]
|
|
145
127
|
]),
|
|
146
|
-
|
|
147
|
-
class:
|
|
148
|
-
"rds-e-quantity-selector__button--disabled": l.disabled || e.value === 99
|
|
128
|
+
o("button", {
|
|
129
|
+
class: r(["rds-e-quantity-selector__button", {
|
|
130
|
+
"rds-e-quantity-selector__button--disabled": l.disabled || e.value === 99,
|
|
131
|
+
"rds-e-quantity-selector__button--limit": e.value === 99
|
|
149
132
|
}]),
|
|
150
133
|
disabled: l.disabled || e.value === 99,
|
|
151
|
-
onClick:
|
|
134
|
+
onClick: C
|
|
152
135
|
}, [
|
|
153
|
-
|
|
154
|
-
], 10,
|
|
136
|
+
m(y, { name: "add" })
|
|
137
|
+
], 10, x)
|
|
155
138
|
], 2));
|
|
156
139
|
}
|
|
157
|
-
}), A = /* @__PURE__ */
|
|
140
|
+
}), A = /* @__PURE__ */ D(R, [["__scopeId", "data-v-e9c62df7"]]);
|
|
158
141
|
export {
|
|
159
142
|
A as default
|
|
160
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-u9BWBbvW.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
|
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as r, ref as h, computed as s, openBlock as p, createElementBlock as u, normalizeClass as f, createVNode as g, createElementVNode as m, toDisplayString as _ } from "vue";
|
|
2
|
+
import { R as b } from "./icon-svg-u9BWBbvW.js";
|
|
3
|
+
import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/selectionChip.css';const C = ["disabled"], k = { class: "rds-e-selection-chip__text" }, S = /* @__PURE__ */ r({
|
|
5
|
+
__name: "selection-chip",
|
|
6
|
+
props: {
|
|
7
|
+
/**
|
|
8
|
+
* <span>Tipo de chip a base del fondo en donde se va a usar</span>
|
|
9
|
+
* <br>
|
|
10
|
+
* `['default', 'floating']`
|
|
11
|
+
*/
|
|
12
|
+
surfaceType: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "default",
|
|
15
|
+
validator: (i) => ["default", "floating"].includes(i)
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* <span>Icono a mostrar en el chip</span>
|
|
19
|
+
*/
|
|
20
|
+
icon: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* Valor del filtro representado por el chip.
|
|
26
|
+
*/
|
|
27
|
+
filterValue: {
|
|
28
|
+
type: [String, Number, Object, Boolean],
|
|
29
|
+
required: !0
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* <span>Texto a mostrar en el chip</span>
|
|
33
|
+
*/
|
|
34
|
+
text: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: !0
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* <span>Indica si está disabled el componente</span>
|
|
40
|
+
*/
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* <span>Indica si el componente está selected</span>
|
|
47
|
+
*/
|
|
48
|
+
selected: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* <span>Estado del componente "highlight"</span>
|
|
54
|
+
*/
|
|
55
|
+
highlight: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !1
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
emits: ["onClickChip"],
|
|
61
|
+
setup(i, { emit: l }) {
|
|
62
|
+
const e = i, c = l, o = h(null), n = s(() => e.icon || "check"), a = s(() => {
|
|
63
|
+
const t = ["rds-e-selection-chip"];
|
|
64
|
+
return t.push(`rds-e-selection-chip--${e.surfaceType}`), e.disabled && t.push("rds-e-selection-chip--disabled"), e.selected && !e.highlight && t.push("rds-e-selection-chip--selected"), e.highlight && t.push("rds-e-selection-chip--highlight"), e.selected && e.highlight && t.push("rds-e-selection-chip--selected-highlight"), t;
|
|
65
|
+
}), d = () => {
|
|
66
|
+
e.disabled || c("onClickChip", e.filterValue);
|
|
67
|
+
};
|
|
68
|
+
return (t, x) => (p(), u("button", {
|
|
69
|
+
ref_key: "chipRef",
|
|
70
|
+
ref: o,
|
|
71
|
+
class: f(a.value),
|
|
72
|
+
disabled: i.disabled,
|
|
73
|
+
type: "button",
|
|
74
|
+
onClick: d
|
|
75
|
+
}, [
|
|
76
|
+
g(b, {
|
|
77
|
+
name: n.value,
|
|
78
|
+
class: "rds-e-selection-chip__icon",
|
|
79
|
+
"aria-hidden": "true"
|
|
80
|
+
}, null, 8, ["name"]),
|
|
81
|
+
m("span", k, _(i.text), 1)
|
|
82
|
+
], 10, C));
|
|
83
|
+
}
|
|
84
|
+
}), V = /* @__PURE__ */ y(S, [["__scopeId", "data-v-9b7aba98"]]);
|
|
85
|
+
export {
|
|
86
|
+
V as default
|
|
87
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent as S, ref as a, computed as n, watch as g, openBlock as o, createElementBlock as l, normalizeClass as c, createElementVNode as u, toDisplayString as k, createCommentVNode as m, createBlock as b, renderSlot as y } from "vue";
|
|
2
|
+
import { R as B } from "./icon-svg-u9BWBbvW.js";
|
|
3
|
+
import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/sidedrawer.css';const D = { class: "rds-e-sidedrawer__header rds-mb-24" }, E = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "rds-headline-04 rds-content-high"
|
|
7
|
+
}, H = /* @__PURE__ */ S({
|
|
8
|
+
__name: "sidedrawer",
|
|
9
|
+
props: {
|
|
10
|
+
/**
|
|
11
|
+
* <span>Texto a mostrar en el título</span>
|
|
12
|
+
*/
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* <span>Mostrar o no la X de cierre</span>
|
|
19
|
+
*/
|
|
20
|
+
iconClose: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["sidedrawerChange"],
|
|
26
|
+
setup(t, { expose: w, emit: _ }) {
|
|
27
|
+
const v = _, f = a(), e = a(!0), d = a(!0), h = n(() => ({
|
|
28
|
+
"rds-e-sidedrawer--hide": e.value,
|
|
29
|
+
"rds-e-sidedrawer--show": !e.value
|
|
30
|
+
})), p = n(() => ({
|
|
31
|
+
"rds-e-sidedrawer__content--hide": e.value,
|
|
32
|
+
"rds-e-sidedrawer__content--show": !e.value
|
|
33
|
+
})), C = () => {
|
|
34
|
+
v("sidedrawerChange", e.value);
|
|
35
|
+
}, s = (r) => {
|
|
36
|
+
e.value = r, C();
|
|
37
|
+
};
|
|
38
|
+
return g(e, (r) => {
|
|
39
|
+
r ? setTimeout(() => {
|
|
40
|
+
d.value = !0;
|
|
41
|
+
}, 500) : d.value = !1;
|
|
42
|
+
}), w({
|
|
43
|
+
/**
|
|
44
|
+
* { boolean } Muestra el estado actual del sidebar.
|
|
45
|
+
*/
|
|
46
|
+
isHide: e,
|
|
47
|
+
/**
|
|
48
|
+
* { () => void } Abre el sidebar.
|
|
49
|
+
*/
|
|
50
|
+
openSidedrawer: () => s(!1),
|
|
51
|
+
/**
|
|
52
|
+
* { () => void } Cierra el sidedrawer.
|
|
53
|
+
*/
|
|
54
|
+
closeSidedrawer: () => s(!0),
|
|
55
|
+
/**
|
|
56
|
+
* { (state: boolean) => void } Cambia el estado del sidedrawer.
|
|
57
|
+
*/
|
|
58
|
+
toogleSidedrawer: () => {
|
|
59
|
+
s(!e.value);
|
|
60
|
+
}
|
|
61
|
+
}), (r, i) => (o(), l("div", {
|
|
62
|
+
class: c(["rds-e-sidedrawer", [h.value, { "rds-e-sidedrawer--hidden": d.value }]])
|
|
63
|
+
}, [
|
|
64
|
+
u("div", {
|
|
65
|
+
ref_key: "sidebar",
|
|
66
|
+
ref: f,
|
|
67
|
+
class: c(["rds-e-sidedrawer__content rds-pa-24", p.value])
|
|
68
|
+
}, [
|
|
69
|
+
u("div", D, [
|
|
70
|
+
t.title ? (o(), l("h2", E, k(t.title), 1)) : m("", !0),
|
|
71
|
+
t.iconClose ? (o(), b(B, {
|
|
72
|
+
key: 1,
|
|
73
|
+
name: "close",
|
|
74
|
+
class: "rds-e-sidedrawer__icon",
|
|
75
|
+
onClick: i[0] || (i[0] = (I) => s(!0))
|
|
76
|
+
})) : m("", !0)
|
|
77
|
+
]),
|
|
78
|
+
y(r.$slots, "content", {}, void 0, !0)
|
|
79
|
+
], 2)
|
|
80
|
+
], 2));
|
|
81
|
+
}
|
|
82
|
+
}), $ = /* @__PURE__ */ x(H, [["__scopeId", "data-v-784b3aa8"]]);
|
|
83
|
+
export {
|
|
84
|
+
$ as default
|
|
85
|
+
};
|