energy-components 1.14.1 → 1.15.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 +30 -27
- package/dist/components/actionButton.es.js +56 -11
- package/dist/components/avatar.es.js +24 -16
- package/dist/components/breadcrumbs.es.js +37 -29
- package/dist/components/button.es.js +31 -22
- package/dist/components/card.es.js +17 -9
- package/dist/components/checkbox.es.js +67 -56
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-DfOWp1XD.js → collapsable.scss_vue_type_style_index_0_src_true_lang-Bi5q6Y3n.js} +1 -1
- package/dist/components/directAccess.es.js +26 -18
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +27 -27
- package/dist/components/fileUploadItem.es.js +23 -21
- package/dist/components/filterChip.es.js +22 -14
- package/dist/components/filterTag.es.js +27 -19
- package/dist/components/floating-ui.vue-7LKzPqHI.js +1148 -0
- package/dist/components/floatingActionButton.es.js +19 -11
- package/dist/components/{icon-svg-DuzOdbk1.js → icon-svg-BU0OQFKH.js} +990 -742
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +83 -77
- package/dist/components/indicator.es.js +37 -29
- package/dist/components/infoBox.es.js +47 -39
- package/dist/components/link.es.js +22 -13
- package/dist/components/loader.es.js +22 -21
- package/dist/components/modal.es.js +37 -28
- package/dist/components/overlay.es.js +21 -11
- package/dist/components/pagination.es.js +164 -109
- package/dist/components/persistentToast.es.js +32 -24
- package/dist/components/popover.es.js +166 -0
- package/dist/components/progressBar.es.js +30 -22
- package/dist/components/quantitySelector.es.js +60 -48
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +15 -7
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/snackBar.es.js +131 -0
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/avatar.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/card.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/infoBox.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/loader.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/popover.css +1 -0
- package/dist/components/style/progressBar.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/snackBar.css +1 -0
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/toggle.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +23 -15
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +31 -23
- package/dist/components/textArea.es.js +57 -57
- package/dist/components/textField.es.js +1 -1
- package/dist/components/toggle.es.js +20 -16
- package/dist/components/tooltip.es.js +71 -1019
- package/dist/energy-components.es.js +6825 -5824
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +47 -0
- package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +15 -0
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +15 -0
- package/dist/types/src/components/content/card/card.vue.d.ts +15 -0
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +1 -1
- package/dist/types/src/components/content/tag/tag.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/loader/loader.vue.d.ts +1 -1
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +180 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +15 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +24 -7
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +1 -1
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +15 -0
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +15 -0
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +4 -0
- package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +47 -0
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +35 -0
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +15 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as f, toRefs as y, computed as g, createElementBlock as t, openBlock as s, normalizeClass as h, createElementVNode as
|
|
2
|
-
import { R as
|
|
1
|
+
import { defineComponent as f, toRefs as y, computed as g, createElementBlock as t, openBlock as s, normalizeClass as h, createElementVNode as r, createCommentVNode as o, createVNode as a, toDisplayString as c, renderSlot as d } from "vue";
|
|
2
|
+
import { R as l } from "./icon-svg-BU0OQFKH.js";
|
|
3
3
|
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/persistentToast.css';const $ = { class: "alert" },
|
|
4
|
+
import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "rds-e-persistent-toast__custom-icon-block"
|
|
7
|
-
},
|
|
7
|
+
}, q = { class: "rds-e-persistent-toast__wrapper" }, w = { class: "rds-e-persistent-toast__title__wrapper" }, b = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "rds-e-persistent-toast__title rds-mb-03"
|
|
10
|
-
},
|
|
10
|
+
}, R = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "rds-e-persistent-toast__text"
|
|
13
13
|
}, T = {
|
|
@@ -16,7 +16,7 @@ import './style/persistentToast.css';const $ = { class: "alert" }, S = {
|
|
|
16
16
|
}, B = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "rds-e-persistent-toast__action-section"
|
|
19
|
-
},
|
|
19
|
+
}, D = /* @__PURE__ */ f({
|
|
20
20
|
__name: "persistent-toast",
|
|
21
21
|
props: {
|
|
22
22
|
/**
|
|
@@ -83,33 +83,41 @@ import './style/persistentToast.css';const $ = { class: "alert" }, S = {
|
|
|
83
83
|
close: {
|
|
84
84
|
type: Boolean,
|
|
85
85
|
required: !1
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* ID del persistent-toast para testing
|
|
89
|
+
*/
|
|
90
|
+
id: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: void 0
|
|
86
93
|
}
|
|
87
94
|
},
|
|
88
95
|
emits: ["onCloseToastAction"],
|
|
89
96
|
setup(e, { emit: u }) {
|
|
90
|
-
const _ = e, m = u, { type:
|
|
91
|
-
() => `rds-e-persistent-toast rds-mb-03 rds-e-persistent-toast${
|
|
97
|
+
const _ = e, m = u, { type: n } = y(_), p = g(
|
|
98
|
+
() => `rds-e-persistent-toast rds-mb-03 rds-e-persistent-toast${n.value === "success" ? "--success" : ""}${n.value === "error" ? "--error" : ""}${n.value === "warning" ? "--warning" : ""}${n.value === "info" ? "--info" : ""}`
|
|
92
99
|
), v = () => {
|
|
93
100
|
m("onCloseToastAction");
|
|
94
101
|
};
|
|
95
|
-
return (
|
|
102
|
+
return (i, N) => (s(), t("div", {
|
|
103
|
+
id: e.id,
|
|
96
104
|
class: h(["rds-e-persistent-toast", p.value]),
|
|
97
105
|
role: "alert"
|
|
98
106
|
}, [
|
|
99
|
-
|
|
100
|
-
e.icon ? (s(), t("div",
|
|
101
|
-
a(
|
|
107
|
+
r("div", $, [
|
|
108
|
+
e.icon ? (s(), t("div", C, [
|
|
109
|
+
a(l, {
|
|
102
110
|
name: e.icon,
|
|
103
111
|
class: "rds-e-persistent-toast__custom-icon",
|
|
104
112
|
"aria-hidden": "true"
|
|
105
113
|
}, null, 8, ["name"])
|
|
106
114
|
])) : o("", !0),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
e.title ? (s(), t("div",
|
|
110
|
-
e.message && !
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
r("div", q, [
|
|
116
|
+
r("div", w, [
|
|
117
|
+
e.title ? (s(), t("div", b, c(e.title), 1)) : o("", !0),
|
|
118
|
+
e.message && !i.$slots["content-section"] ? (s(), t("p", R, c(e.message), 1)) : o("", !0),
|
|
119
|
+
i.$slots["content-section"] ? (s(), t("div", T, [
|
|
120
|
+
d(i.$slots, "content-section", {}, void 0, !0)
|
|
113
121
|
])) : o("", !0)
|
|
114
122
|
]),
|
|
115
123
|
e.close ? (s(), t("div", {
|
|
@@ -117,7 +125,7 @@ import './style/persistentToast.css';const $ = { class: "alert" }, S = {
|
|
|
117
125
|
class: "rds-e-persistent-toast__close-block",
|
|
118
126
|
onClick: v
|
|
119
127
|
}, [
|
|
120
|
-
a(
|
|
128
|
+
a(l, {
|
|
121
129
|
name: "close",
|
|
122
130
|
class: "rds-e-persistent-toast__custom-icon",
|
|
123
131
|
"aria-hidden": "true"
|
|
@@ -125,12 +133,12 @@ import './style/persistentToast.css';const $ = { class: "alert" }, S = {
|
|
|
125
133
|
])) : o("", !0)
|
|
126
134
|
])
|
|
127
135
|
]),
|
|
128
|
-
|
|
129
|
-
|
|
136
|
+
i.$slots["action-section"] ? (s(), t("div", B, [
|
|
137
|
+
d(i.$slots, "action-section", {}, void 0, !0)
|
|
130
138
|
])) : o("", !0)
|
|
131
|
-
],
|
|
139
|
+
], 10, S));
|
|
132
140
|
}
|
|
133
|
-
}),
|
|
141
|
+
}), I = /* @__PURE__ */ k(D, [["__scopeId", "data-v-9c8ae892"]]);
|
|
134
142
|
export {
|
|
135
|
-
|
|
143
|
+
I as default
|
|
136
144
|
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { ref as m, computed as k, onBeforeUnmount as R, createElementBlock as d, openBlock as s, createElementVNode as v, createBlock as _, renderSlot as h, Teleport as x, createCommentVNode as b, normalizeStyle as C, unref as F, Fragment as N, renderList as O, toDisplayString as P, nextTick as $ } from "vue";
|
|
2
|
+
import { o as H, f as M, s as V, a as z, u as A, d as D } from "./floating-ui.vue-7LKzPqHI.js";
|
|
3
|
+
import { R as I } from "./icon-svg-BU0OQFKH.js";
|
|
4
|
+
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/popover.css';const j = { class: "rds-e-popover" }, W = { class: "rds-e-popover__list" }, q = ["onClick"], G = {
|
|
6
|
+
__name: "popover",
|
|
7
|
+
props: {
|
|
8
|
+
/**
|
|
9
|
+
* <span>Lista de elementos a mostrar en el popover</span>
|
|
10
|
+
*/
|
|
11
|
+
items: {
|
|
12
|
+
type: Array,
|
|
13
|
+
default: () => []
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* <span>Posición del popover relativa al trigger</span>
|
|
17
|
+
*/
|
|
18
|
+
placement: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "bottom-start"
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* <span>Posiciones alternativas cuando no hay espacio</span>
|
|
24
|
+
*/
|
|
25
|
+
fallbackPlacements: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: () => []
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* <span>Espacio de desplazamiento para el popover</span>
|
|
31
|
+
*/
|
|
32
|
+
offsetSpace: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 8
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* <span>Ancho del popover en píxeles (responsive automático en pantallas pequeñas)</span>
|
|
38
|
+
*/
|
|
39
|
+
width: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 240
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Selector para teleport (ej: 'body', '#modal-container')
|
|
45
|
+
* Si no se especifica, se renderiza inline
|
|
46
|
+
*/
|
|
47
|
+
teleportTo: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: null
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* <span>Si debe cambiar automáticamente de posición cuando no cabe</span>
|
|
53
|
+
*/
|
|
54
|
+
autoFlip: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !1
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* <span>Si debe cerrarse cuando el trigger no es visible en el viewport</span>
|
|
60
|
+
*/
|
|
61
|
+
closeOnTriggerHidden: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !1
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
emits: [
|
|
67
|
+
/**
|
|
68
|
+
* <span>Se emite cuando se selecciona un elemento del popover</span>
|
|
69
|
+
*/
|
|
70
|
+
"select"
|
|
71
|
+
],
|
|
72
|
+
setup(r, { emit: w }) {
|
|
73
|
+
const n = r, E = w, t = m(!1), o = m(null), c = m(null), S = k(() => {
|
|
74
|
+
const e = [
|
|
75
|
+
H(n.offsetSpace)
|
|
76
|
+
];
|
|
77
|
+
return n.autoFlip && e.push(
|
|
78
|
+
M({
|
|
79
|
+
fallbackPlacements: n.fallbackPlacements.length ? n.fallbackPlacements : void 0
|
|
80
|
+
})
|
|
81
|
+
), e.push(
|
|
82
|
+
V({ padding: 8 }),
|
|
83
|
+
z({
|
|
84
|
+
apply({ availableWidth: y, elements: l }) {
|
|
85
|
+
const i = Math.min(n.width, y - 32);
|
|
86
|
+
Object.assign(l.floating.style, {
|
|
87
|
+
width: `${i}px`
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
), e;
|
|
92
|
+
}), { floatingStyles: T, update: B } = A(
|
|
93
|
+
o,
|
|
94
|
+
c,
|
|
95
|
+
{
|
|
96
|
+
placement: k(() => n.placement),
|
|
97
|
+
middleware: S,
|
|
98
|
+
whileElementsMounted: D
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
let u, f, p;
|
|
102
|
+
const a = () => {
|
|
103
|
+
document.removeEventListener("click", u), document.removeEventListener("keydown", f), document.removeEventListener("scroll", p, !0);
|
|
104
|
+
};
|
|
105
|
+
u = (e) => {
|
|
106
|
+
c.value && !c.value.contains(e.target) && o.value && !o.value.contains(e.target) && (t.value = !1, a());
|
|
107
|
+
}, f = (e) => {
|
|
108
|
+
e.key === "Escape" && (t.value = !1, a());
|
|
109
|
+
}, p = () => {
|
|
110
|
+
if (!o.value) return;
|
|
111
|
+
const e = o.value.getBoundingClientRect();
|
|
112
|
+
(e.bottom < 0 || e.top > window.innerHeight) && (t.value = !1, a());
|
|
113
|
+
};
|
|
114
|
+
const L = async () => {
|
|
115
|
+
t.value = !t.value, t.value ? (await $(), B(), document.addEventListener("click", u), document.addEventListener("keydown", f), n.closeOnTriggerHidden && document.addEventListener("scroll", p, !0)) : a();
|
|
116
|
+
}, g = (e) => {
|
|
117
|
+
E("select", e), t.value = !1, a();
|
|
118
|
+
};
|
|
119
|
+
return R(a), (e, y) => (s(), d("div", j, [
|
|
120
|
+
v("button", {
|
|
121
|
+
ref_key: "referenceRef",
|
|
122
|
+
ref: o,
|
|
123
|
+
class: "rds-e-popover__trigger-btn",
|
|
124
|
+
onClick: L
|
|
125
|
+
}, [
|
|
126
|
+
h(e.$slots, "trigger", {}, void 0, !0)
|
|
127
|
+
], 512),
|
|
128
|
+
(s(), _(x, {
|
|
129
|
+
to: r.teleportTo,
|
|
130
|
+
disabled: !r.teleportTo
|
|
131
|
+
}, [
|
|
132
|
+
t.value ? (s(), d("div", {
|
|
133
|
+
key: 0,
|
|
134
|
+
ref_key: "floatingRef",
|
|
135
|
+
ref: c,
|
|
136
|
+
class: "rds-e-popover__content",
|
|
137
|
+
style: C(F(T))
|
|
138
|
+
}, [
|
|
139
|
+
v("ul", W, [
|
|
140
|
+
(s(!0), d(N, null, O(r.items, (l, i) => h(e.$slots, "item", {
|
|
141
|
+
item: l,
|
|
142
|
+
index: i,
|
|
143
|
+
onSelect: () => g(l)
|
|
144
|
+
}, () => [
|
|
145
|
+
(s(), d("li", {
|
|
146
|
+
key: i,
|
|
147
|
+
class: "rds-e-popover__item rds-body-1",
|
|
148
|
+
onClick: (J) => g(l)
|
|
149
|
+
}, [
|
|
150
|
+
l.icon ? (s(), _(I, {
|
|
151
|
+
key: 0,
|
|
152
|
+
class: "rds-mr-6 rds-e-popover__item-icon",
|
|
153
|
+
name: l.icon
|
|
154
|
+
}, null, 8, ["name"])) : b("", !0),
|
|
155
|
+
v("span", null, P(l.label), 1)
|
|
156
|
+
], 8, q))
|
|
157
|
+
], !0)), 256))
|
|
158
|
+
])
|
|
159
|
+
], 4)) : b("", !0)
|
|
160
|
+
], 8, ["to", "disabled"]))
|
|
161
|
+
]));
|
|
162
|
+
}
|
|
163
|
+
}, Z = /* @__PURE__ */ U(G, [["__scopeId", "data-v-69668ffe"]]);
|
|
164
|
+
export {
|
|
165
|
+
Z as default
|
|
166
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as y, computed as
|
|
2
|
-
import { R as C } from "./icon-svg-
|
|
1
|
+
import { defineComponent as y, computed as o, createElementBlock as a, openBlock as n, normalizeClass as u, createCommentVNode as p, createElementVNode as t, renderSlot as m, normalizeProps as g, mergeProps as B, createVNode as S, createTextVNode as h, guardReactiveProps as k, toDisplayString as d, normalizeStyle as x } from "vue";
|
|
2
|
+
import { R as C } from "./icon-svg-BU0OQFKH.js";
|
|
3
3
|
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/progressBar.css';const w = {
|
|
4
|
+
import './style/progressBar.css';const w = ["id"], P = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "rds-e-progress-bar__content"
|
|
7
|
-
},
|
|
7
|
+
}, R = { class: "rds-flex" }, V = { class: "body-1" }, $ = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "rds-e-progress-bar__percentage body-2"
|
|
10
|
-
},
|
|
10
|
+
}, z = /* @__PURE__ */ y({
|
|
11
11
|
__name: "progress-bar",
|
|
12
12
|
props: {
|
|
13
13
|
/**
|
|
@@ -60,51 +60,59 @@ import './style/progressBar.css';const w = {
|
|
|
60
60
|
whiteBar: {
|
|
61
61
|
type: Boolean,
|
|
62
62
|
default: !1
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* ID del progress-bar para testing
|
|
66
|
+
*/
|
|
67
|
+
id: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: void 0
|
|
63
70
|
}
|
|
64
71
|
},
|
|
65
72
|
emits: ["goBack"],
|
|
66
|
-
setup(
|
|
67
|
-
const e =
|
|
73
|
+
setup(r, { emit: _ }) {
|
|
74
|
+
const e = r, b = _, s = o(() => ({ step: e.step, maxSteps: e.maxSteps })), v = o(() => `${e.step / e.maxSteps * 100}%`), f = o(() => `${Math.round(e.step / e.maxSteps * 100)}%`), l = () => {
|
|
68
75
|
b("goBack");
|
|
69
76
|
};
|
|
70
|
-
return (c,
|
|
71
|
-
|
|
77
|
+
return (c, i) => (n(), a("div", {
|
|
78
|
+
id: r.id,
|
|
79
|
+
class: u(["rds-e-progress-bar", [
|
|
72
80
|
{ "rds-e-progress-bar--inverse": e.inverse },
|
|
73
81
|
{ "rds-e-progress-bar--without-counter": e.hideCounter }
|
|
74
82
|
]])
|
|
75
83
|
}, [
|
|
76
|
-
e.hideCounter ?
|
|
77
|
-
t("div",
|
|
78
|
-
e.step > 1 &&
|
|
84
|
+
e.hideCounter ? p("", !0) : (n(), a("div", P, [
|
|
85
|
+
t("div", R, [
|
|
86
|
+
e.step > 1 && r.backButton ? m(c.$slots, "back-button", g(B({ key: 0 }, { goBack: l, inverse: e.inverse })), () => [
|
|
79
87
|
t("button", {
|
|
80
88
|
class: "body-1 rds-e-progress-bar__back-button",
|
|
81
|
-
onClick:
|
|
89
|
+
onClick: l
|
|
82
90
|
}, [
|
|
83
91
|
S(C, { name: "arrow_left" }),
|
|
84
|
-
|
|
92
|
+
i[0] || (i[0] = h(" Atrás "))
|
|
85
93
|
])
|
|
86
|
-
], !0) :
|
|
87
|
-
m(c.$slots, "steps", g(
|
|
94
|
+
], !0) : p("", !0),
|
|
95
|
+
m(c.$slots, "steps", g(k({
|
|
88
96
|
step: s.value.step,
|
|
89
97
|
maxSteps: s.value.maxSteps,
|
|
90
98
|
inverse: e.inverse
|
|
91
99
|
})), () => [
|
|
92
|
-
t("p",
|
|
100
|
+
t("p", V, d(s.value.step) + " / " + d(s.value.maxSteps), 1)
|
|
93
101
|
], !0)
|
|
94
102
|
]),
|
|
95
103
|
t("div", null, [
|
|
96
|
-
e.percentage ? (
|
|
104
|
+
e.percentage ? (n(), a("p", $, d(f.value), 1)) : p("", !0)
|
|
97
105
|
])
|
|
98
106
|
])),
|
|
99
107
|
t("div", {
|
|
100
|
-
class:
|
|
108
|
+
class: u(["rds-e-progress-bar__progress", [
|
|
101
109
|
{ "rds-e-progress-bar__progress--white": e.whiteBar }
|
|
102
110
|
]]),
|
|
103
111
|
style: x({ "--counterWidth": v.value })
|
|
104
112
|
}, null, 6)
|
|
105
|
-
],
|
|
113
|
+
], 10, w));
|
|
106
114
|
}
|
|
107
|
-
}),
|
|
115
|
+
}), I = /* @__PURE__ */ N(z, [["__scopeId", "data-v-cc42902d"]]);
|
|
108
116
|
export {
|
|
109
|
-
|
|
117
|
+
I as default
|
|
110
118
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as y } from "./icon-svg-
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/quantitySelector.css';const
|
|
1
|
+
import { defineComponent as w, mergeModels as c, useModel as B, ref as s, createElementBlock as I, openBlock as D, normalizeClass as r, createElementVNode as o, withDirectives as m, createVNode as v, vShow as f, vModelText as b } from "vue";
|
|
2
|
+
import { R as y } from "./icon-svg-BU0OQFKH.js";
|
|
3
|
+
import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/quantitySelector.css';const M = ["id"], x = ["id", "disabled"], $ = ["id", "disabled"], R = ["id", "disabled"], z = ["id", "disabled"], E = /* @__PURE__ */ w({
|
|
5
5
|
__name: "quantity-selector",
|
|
6
6
|
props: /* @__PURE__ */ c({
|
|
7
7
|
/**
|
|
@@ -28,8 +28,8 @@ import './style/quantitySelector.css';const _ = ["disabled"], M = ["disabled"],
|
|
|
28
28
|
size: {
|
|
29
29
|
type: String,
|
|
30
30
|
default: "default",
|
|
31
|
-
validator(
|
|
32
|
-
return ["default", "small"].includes(
|
|
31
|
+
validator(e) {
|
|
32
|
+
return ["default", "small"].includes(e);
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
/**
|
|
@@ -38,106 +38,118 @@ import './style/quantitySelector.css';const _ = ["disabled"], M = ["disabled"],
|
|
|
38
38
|
fullWidth: {
|
|
39
39
|
type: Boolean,
|
|
40
40
|
default: !1
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* ID del quantity-selector para testing
|
|
44
|
+
*/
|
|
45
|
+
id: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: void 0
|
|
41
48
|
}
|
|
42
49
|
}, {
|
|
43
50
|
modelValue: {
|
|
44
51
|
default: 0,
|
|
45
|
-
validator(
|
|
46
|
-
return
|
|
47
|
-
`[RDSQuantitySelector]: El valor de modelValue debe estar entre 0 y 99. Valor actual: ${
|
|
52
|
+
validator(e) {
|
|
53
|
+
return e < 0 || e > 99 ? (console.warn(
|
|
54
|
+
`[RDSQuantitySelector]: El valor de modelValue debe estar entre 0 y 99. Valor actual: ${e}`
|
|
48
55
|
), !1) : !0;
|
|
49
56
|
}
|
|
50
57
|
},
|
|
51
58
|
modelModifiers: {}
|
|
52
59
|
}),
|
|
53
60
|
emits: /* @__PURE__ */ c(["onClickPlus", "onClickMinus", "onChange", "onDelete"], ["update:modelValue"]),
|
|
54
|
-
setup(
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
|
|
61
|
+
setup(e, { emit: h }) {
|
|
62
|
+
const k = e, n = h, l = B(e, "modelValue"), d = s(!1), u = s(null), C = s(null), q = () => {
|
|
63
|
+
l.value < 99 && (l.value++, n("onChange", l.value)), n("onClickPlus");
|
|
64
|
+
}, g = () => {
|
|
65
|
+
k.deleteButton && l.value !== 0 ? (n("onDelete"), l.value = 0, n("onChange", l.value)) : l.value > 0 && (l.value--, n("onChange", l.value)), n("onClickMinus");
|
|
59
66
|
}, N = (t) => {
|
|
60
67
|
const a = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab"];
|
|
61
68
|
!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
|
-
},
|
|
69
|
+
}, V = () => {
|
|
63
70
|
if (u.value) {
|
|
64
71
|
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 ? (
|
|
72
|
+
(u.value.value === null || u.value.value === "") && (t = 0), !Number.isNaN(t) && t >= 0 && t <= 99 ? (l.value = t, n("onChange", l.value)) : Number.isNaN(t) && (l.value = 0, n("onChange", l.value));
|
|
66
73
|
}
|
|
67
|
-
|
|
74
|
+
d.value = !1;
|
|
68
75
|
};
|
|
69
|
-
return (t, a) => (
|
|
76
|
+
return (t, a) => (D(), I("div", {
|
|
77
|
+
id: e.id,
|
|
70
78
|
class: r(["rds-e-quantity-selector", {
|
|
71
|
-
"rds-e-quantity-selector--disabled":
|
|
72
|
-
"rds-e-quantity-selector--small":
|
|
73
|
-
"rds-e-quantity-selector--full-width":
|
|
79
|
+
"rds-e-quantity-selector--disabled": e.disabled,
|
|
80
|
+
"rds-e-quantity-selector--small": e.size === "small",
|
|
81
|
+
"rds-e-quantity-selector--full-width": e.fullWidth
|
|
74
82
|
}])
|
|
75
83
|
}, [
|
|
76
84
|
o("button", {
|
|
85
|
+
id: e.id ? `${e.id}-decrement` : void 0,
|
|
77
86
|
class: r(["rds-e-quantity-selector__button", {
|
|
78
|
-
"rds-e-quantity-selector__button--disabled":
|
|
79
|
-
"rds-e-quantity-selector__button--limit":
|
|
87
|
+
"rds-e-quantity-selector__button--disabled": e.disabled || l.value === 0,
|
|
88
|
+
"rds-e-quantity-selector__button--limit": l.value === 0
|
|
80
89
|
}]),
|
|
81
|
-
disabled:
|
|
82
|
-
onClick:
|
|
90
|
+
disabled: e.disabled || l.value === 0,
|
|
91
|
+
onClick: g
|
|
83
92
|
}, [
|
|
84
93
|
v(y, {
|
|
85
|
-
name:
|
|
94
|
+
name: e.deleteButton && l.value !== 0 ? "delete" : "minus"
|
|
86
95
|
}, null, 8, ["name"])
|
|
87
|
-
], 10,
|
|
96
|
+
], 10, x),
|
|
88
97
|
m(o("input", {
|
|
98
|
+
id: e.id ? `${e.id}-main-input` : void 0,
|
|
89
99
|
ref_key: "mainInput",
|
|
90
|
-
ref:
|
|
91
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
100
|
+
ref: C,
|
|
101
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => l.value = i),
|
|
92
102
|
type: "number",
|
|
93
103
|
class: "rds-e-quantity-selector__input",
|
|
94
|
-
disabled:
|
|
104
|
+
disabled: e.disabled,
|
|
95
105
|
max: 99,
|
|
96
106
|
min: 0,
|
|
97
107
|
readonly: "",
|
|
98
|
-
onClick: a[1] || (a[1] = (
|
|
99
|
-
}, null, 8,
|
|
100
|
-
[f, !
|
|
108
|
+
onClick: a[1] || (a[1] = (i) => d.value = !0)
|
|
109
|
+
}, null, 8, $), [
|
|
110
|
+
[f, !d.value],
|
|
101
111
|
[
|
|
102
112
|
b,
|
|
103
|
-
|
|
113
|
+
l.value,
|
|
104
114
|
void 0,
|
|
105
115
|
{ number: !0 }
|
|
106
116
|
]
|
|
107
117
|
]),
|
|
108
118
|
m(o("input", {
|
|
119
|
+
id: e.id ? `${e.id}-manual-input` : void 0,
|
|
109
120
|
ref_key: "manualInput",
|
|
110
121
|
ref: u,
|
|
111
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
122
|
+
"onUpdate:modelValue": a[2] || (a[2] = (i) => l.value = i),
|
|
112
123
|
type: "number",
|
|
113
124
|
class: "rds-e-quantity-selector__input",
|
|
114
|
-
disabled:
|
|
125
|
+
disabled: e.disabled,
|
|
115
126
|
max: 99,
|
|
116
127
|
min: 0,
|
|
117
|
-
onBlur:
|
|
128
|
+
onBlur: V,
|
|
118
129
|
onKeydown: N
|
|
119
|
-
}, null, 40,
|
|
120
|
-
[f,
|
|
130
|
+
}, null, 40, R), [
|
|
131
|
+
[f, d.value],
|
|
121
132
|
[
|
|
122
133
|
b,
|
|
123
|
-
|
|
134
|
+
l.value,
|
|
124
135
|
void 0,
|
|
125
136
|
{ number: !0 }
|
|
126
137
|
]
|
|
127
138
|
]),
|
|
128
139
|
o("button", {
|
|
140
|
+
id: e.id ? `${e.id}-increment` : void 0,
|
|
129
141
|
class: r(["rds-e-quantity-selector__button", {
|
|
130
|
-
"rds-e-quantity-selector__button--disabled":
|
|
131
|
-
"rds-e-quantity-selector__button--limit":
|
|
142
|
+
"rds-e-quantity-selector__button--disabled": e.disabled || l.value === 99,
|
|
143
|
+
"rds-e-quantity-selector__button--limit": l.value === 99
|
|
132
144
|
}]),
|
|
133
|
-
disabled:
|
|
134
|
-
onClick:
|
|
145
|
+
disabled: e.disabled || l.value === 99,
|
|
146
|
+
onClick: q
|
|
135
147
|
}, [
|
|
136
148
|
v(y, { name: "add" })
|
|
137
|
-
], 10,
|
|
138
|
-
],
|
|
149
|
+
], 10, z)
|
|
150
|
+
], 10, M));
|
|
139
151
|
}
|
|
140
|
-
}),
|
|
152
|
+
}), T = /* @__PURE__ */ S(E, [["__scopeId", "data-v-78572892"]]);
|
|
141
153
|
export {
|
|
142
|
-
|
|
154
|
+
T as default
|
|
143
155
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as B, ref as f, computed as m, inject as i, onMounted as _, onBeforeUnmount as D, createElementBlock as b, openBlock as r, normalizeClass as n, createElementVNode as v, unref as E, createCommentVNode as w, createBlock as N, toDisplayString as x } from "vue";
|
|
2
|
-
import { R as C } from "./icon-svg-
|
|
2
|
+
import { R as C } from "./icon-svg-BU0OQFKH.js";
|
|
3
3
|
import { g as G } from "./getInstance-GhoEcxLF.js";
|
|
4
4
|
import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/radioButton.css';const L = ["id", "value", "name", "disabled", "checked"], $ = ["for"], j = /* @__PURE__ */ B({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as d, ref as r, computed as h, createElementBlock as p, openBlock as s, normalizeClass as u, createBlock as f, createCommentVNode as m, createElementVNode as g, toDisplayString as
|
|
2
|
-
import { R as
|
|
1
|
+
import { defineComponent as d, ref as r, computed as h, createElementBlock as p, openBlock as s, normalizeClass as u, createBlock as f, createCommentVNode as m, createElementVNode as g, toDisplayString as y } from "vue";
|
|
2
|
+
import { R as _ } from "./icon-svg-BU0OQFKH.js";
|
|
3
3
|
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/selectionChip.css';const C = ["disabled"], k = { class: "rds-e-selection-chip__text" },
|
|
4
|
+
import './style/selectionChip.css';const C = ["id", "disabled"], k = { class: "rds-e-selection-chip__text" }, S = /* @__PURE__ */ d({
|
|
5
5
|
__name: "selection-chip",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -55,6 +55,13 @@ import './style/selectionChip.css';const C = ["disabled"], k = { class: "rds-e-s
|
|
|
55
55
|
highlight: {
|
|
56
56
|
type: Boolean,
|
|
57
57
|
default: !1
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* ID del selection-chip para testing
|
|
61
|
+
*/
|
|
62
|
+
id: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: void 0
|
|
58
65
|
}
|
|
59
66
|
},
|
|
60
67
|
emits: ["onClickChip"],
|
|
@@ -65,7 +72,8 @@ import './style/selectionChip.css';const C = ["disabled"], k = { class: "rds-e-s
|
|
|
65
72
|
}), a = () => {
|
|
66
73
|
e.disabled || c("onClickChip", e.filterValue);
|
|
67
74
|
};
|
|
68
|
-
return (t,
|
|
75
|
+
return (t, B) => (s(), p("button", {
|
|
76
|
+
id: i.id,
|
|
69
77
|
ref_key: "chipRef",
|
|
70
78
|
ref: o,
|
|
71
79
|
class: u(n.value),
|
|
@@ -73,16 +81,16 @@ import './style/selectionChip.css';const C = ["disabled"], k = { class: "rds-e-s
|
|
|
73
81
|
type: "button",
|
|
74
82
|
onClick: a
|
|
75
83
|
}, [
|
|
76
|
-
e.icon ? (s(), f(
|
|
84
|
+
e.icon ? (s(), f(_, {
|
|
77
85
|
key: 0,
|
|
78
86
|
name: e.icon,
|
|
79
87
|
class: "rds-e-selection-chip__icon",
|
|
80
88
|
"aria-hidden": "true"
|
|
81
89
|
}, null, 8, ["name"])) : m("", !0),
|
|
82
|
-
g("span", k,
|
|
90
|
+
g("span", k, y(i.text), 1)
|
|
83
91
|
], 10, C));
|
|
84
92
|
}
|
|
85
|
-
}), V = /* @__PURE__ */ b(
|
|
93
|
+
}), V = /* @__PURE__ */ b(S, [["__scopeId", "data-v-9d9c93f9"]]);
|
|
86
94
|
export {
|
|
87
95
|
V as default
|
|
88
96
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as B, toRefs as $, ref as n, computed as u, watch as O, createElementBlock as l, openBlock as a, normalizeClass as v, createElementVNode as o, withModifiers as R, normalizeStyle as z, createCommentVNode as w, createBlock as D, renderSlot as c, toDisplayString as E } from "vue";
|
|
2
|
-
import { R as H } from "./icon-svg-
|
|
2
|
+
import { R as H } from "./icon-svg-BU0OQFKH.js";
|
|
3
3
|
import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/sidedrawer.css';const N = { class: "rds-e-sidedrawer__header rds-mb-24" }, T = {
|
|
5
5
|
key: 0,
|