energy-components 1.21.0 → 1.23.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 +71 -53
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-f-OHx-l3.js +86 -0
- package/dist/components/datepicker.es.js +1 -1
- package/dist/components/directAccess.es.js +1 -1
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +1 -1
- package/dist/components/fileUploadItem.es.js +1 -1
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/filterTag.es.js +1 -1
- package/dist/components/{floating-ui.vue-oA1DfKeS.js → floating-ui.vue-DHEoOe5S.js} +305 -303
- package/dist/components/{icon-svg-C8XeOnqu.js → icon-svg-K8-vLJgV.js} +1257 -792
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +84 -85
- package/dist/components/modal.es.js +41 -39
- package/dist/components/multiselect.es.js +52 -52
- package/dist/components/multiselectcontentwrapper.es.js +2 -2
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/popover.es.js +2 -2
- package/dist/components/popoverMenu.es.js +51 -51
- package/dist/components/progressBar.es.js +2 -2
- package/dist/components/quantitySelector.es.js +1 -1
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/accordionGroup.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/avatar.css +1 -1
- package/dist/components/style/badge.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/collapsable.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/divider.css +1 -1
- package/dist/components/style/dragAndDrop.css +1 -1
- package/dist/components/style/dropdown.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/iconList.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/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.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 -1
- package/dist/components/style/popoverMenu.css +1 -1
- package/dist/components/style/progressBar.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/radioButton.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/sidebar.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/snackBar.css +1 -1
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- package/dist/components/style/tag.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 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +1 -1
- package/dist/components/tablepaginatedcomponent.es.js +46 -46
- package/dist/components/tableslotedcomponent.es.js +119 -119
- package/dist/components/tag.es.js +1 -1
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +136 -131
- package/dist/components/toggle.es.js +24 -24
- package/dist/components/tooltip.es.js +2 -2
- package/dist/energy-components.es.js +6329 -5838
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/accordion/accordion.vue.d.ts +19 -0
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +1 -1
- package/dist/types/src/components/navigation/link/link.vue.d.ts +8 -5
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-6HkNT8L9.js +0 -86
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, ref as a, computed as v, createElementBlock as s, openBlock as i, Fragment as u, withDirectives as f, createElementVNode as r, vModelText as C, renderList as L, normalizeClass as x, createVNode as g, toDisplayString as h } from "vue";
|
|
2
|
-
import { i as m, R as k } from "./icon-svg-
|
|
2
|
+
import { i as m, R as k } from "./icon-svg-K8-vLJgV.js";
|
|
3
3
|
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/iconList.css';const y = { class: "rds-e-icon-list" }, D = ["onClick"], N = /* @__PURE__ */ p({
|
|
5
5
|
__name: "icon-list",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as a } from "./icon-svg-
|
|
1
|
+
import { R as a } from "./icon-svg-K8-vLJgV.js";
|
|
2
2
|
import i from "./button.es.js";
|
|
3
3
|
import e from "./floatingActionButton.es.js";
|
|
4
4
|
import m from "./actionButton.es.js";
|
|
@@ -24,7 +24,7 @@ import P from "./divider.es.js";
|
|
|
24
24
|
import _ from "./card.es.js";
|
|
25
25
|
import h from "./tablepaginatedcomponent.es.js";
|
|
26
26
|
import x from "./avatar.es.js";
|
|
27
|
-
import { _ as I } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-
|
|
27
|
+
import { _ as I } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-f-OHx-l3.js";
|
|
28
28
|
import F from "./link.es.js";
|
|
29
29
|
import k from "./breadcrumbs.es.js";
|
|
30
30
|
import w from "./tabBar.es.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, ref as u, toRefs as k, computed as $, watch as S, nextTick as w, createElementBlock as t, openBlock as o, normalizeClass as m, createElementVNode as a, createCommentVNode as s, createVNode as b, toDisplayString as r, renderSlot as v } from "vue";
|
|
2
|
-
import { R as _ } from "./icon-svg-
|
|
2
|
+
import { R as _ } from "./icon-svg-K8-vLJgV.js";
|
|
3
3
|
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/infoBox.css';const q = ["id"], B = { class: "alert" }, H = {
|
|
5
5
|
key: 0,
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/link.css';const
|
|
1
|
+
import { defineComponent as D, computed as n, createBlock as l, openBlock as i, resolveDynamicComponent as z, mergeProps as s, withCtx as N, createCommentVNode as o, createElementBlock as g, normalizeClass as d, renderSlot as v, createTextVNode as w, toDisplayString as b, normalizeStyle as j } from "vue";
|
|
2
|
+
import { R as c } from "./icon-svg-K8-vLJgV.js";
|
|
3
|
+
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/link.css';const R = /* @__PURE__ */ D({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
8
8
|
* <span>Texto a mostrar en el link</span>
|
|
9
9
|
*/
|
|
10
10
|
text: {
|
|
11
|
-
type: String
|
|
11
|
+
type: String,
|
|
12
|
+
default: void 0
|
|
12
13
|
},
|
|
13
14
|
/**
|
|
14
|
-
* <span>Url a la que redirige el link</span>
|
|
15
|
+
* <span>Url a la que redirige el link. Acepta string o Location object</span>
|
|
15
16
|
*/
|
|
16
17
|
to: {
|
|
17
|
-
type: String,
|
|
18
|
+
type: [String, Object],
|
|
19
|
+
// Corregido: Permite objetos de ruta sin lanzar warning
|
|
18
20
|
default: ""
|
|
19
21
|
},
|
|
20
22
|
/**
|
|
@@ -23,7 +25,7 @@ import './style/link.css';const A = /* @__PURE__ */ $({
|
|
|
23
25
|
icon: {
|
|
24
26
|
type: Object,
|
|
25
27
|
default: () => ({ name: "", modifier: "" }),
|
|
26
|
-
validator: (
|
|
28
|
+
validator: (r) => typeof r.name == "string" && (r.modifier === void 0 || typeof r.modifier == "string") ? !0 : (console.error("El icono debe tener una propiedad name de tipo string y una propiedad modifier opcional de tipo string"), !1)
|
|
27
29
|
},
|
|
28
30
|
/**
|
|
29
31
|
* <span>Tag del link</span>
|
|
@@ -97,97 +99,94 @@ import './style/link.css';const A = /* @__PURE__ */ $({
|
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
emits: ["click"],
|
|
100
|
-
setup(
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
customClass: x,
|
|
112
|
-
color: l,
|
|
113
|
-
arrowSmall: S,
|
|
114
|
-
id: L
|
|
115
|
-
} = M(z), N = m(() => l.value ? { color: l.value } : void 0), V = m(() => {
|
|
116
|
-
var t, f;
|
|
117
|
-
const a = ["rds-e-link"];
|
|
118
|
-
return _.value && a.push("rds-e-link--inverse"), b.value && a.push("rds-e-link--underline"), i.value && a.push("rds-e-style-state-disabled"), ((t = r == null ? void 0 : r.value) == null ? void 0 : t.name) !== "arrow" && a.push("rds-e-arrow-link"), ((f = r == null ? void 0 : r.value) == null ? void 0 : f.name) !== "arrow" && _.value && a.push("rds-e-arrow-link__icon--inverse"), x.value === "rds-e-breadcrumbs__link--text" && a.push("rds-e-link__breadcrumbs"), a.join(" ");
|
|
119
|
-
}), C = m(() => {
|
|
120
|
-
var t;
|
|
121
|
-
const a = ["rds-e-arrow-link__icon--arrow"];
|
|
122
|
-
return r != null && r.value && (a.push("rds-e-arrow-link__icon"), i.value && a.push("rds-e-arrow-link__icon--disabled")), ((t = r == null ? void 0 : r.value) == null ? void 0 : t.name) !== "arrow" && _.value && a.push("rds-e-arrow-link__icon--inverse"), a.push(
|
|
123
|
-
n.value ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left"
|
|
124
|
-
), a.join(" ");
|
|
125
|
-
}), B = m(() => {
|
|
102
|
+
setup(r, { emit: u }) {
|
|
103
|
+
const e = r, h = u, x = (t) => {
|
|
104
|
+
if (e.disabled) {
|
|
105
|
+
t.preventDefault(), t.stopPropagation();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
h("click", t);
|
|
109
|
+
}, S = n(() => e.disabled ? "span" : e.tag === "a" ? "a" : e.tag), C = n(() => {
|
|
110
|
+
const t = {};
|
|
111
|
+
return e.disabled ? (t.role = "link", t["aria-disabled"] = !0, t) : (e.tag === "router-link" ? t.to = e.to : t.href = typeof e.to == "string" ? e.to : void 0, t);
|
|
112
|
+
}), B = n(() => e.color ? { color: e.color } : void 0), I = n(() => {
|
|
126
113
|
var a;
|
|
127
|
-
|
|
114
|
+
const t = ((a = e.icon) == null ? void 0 : a.name) === "arrow";
|
|
115
|
+
return {
|
|
116
|
+
"rds-e-link": !0,
|
|
117
|
+
"rds-e-link--inverse": e.inverse,
|
|
118
|
+
"rds-e-link--underline": e.underline,
|
|
119
|
+
"rds-e-style-state-disabled": e.disabled,
|
|
120
|
+
"rds-e-arrow-link": !t,
|
|
121
|
+
"rds-e-arrow-link__icon--inverse": !t && e.inverse,
|
|
122
|
+
"rds-e-link__breadcrumbs": e.customClass === "rds-e-breadcrumbs__link--text"
|
|
123
|
+
};
|
|
124
|
+
}), m = n(() => {
|
|
125
|
+
var k, y;
|
|
126
|
+
const t = ["rds-e-arrow-link__icon--arrow"], a = !!((k = e.icon) != null && k.name), p = ((y = e.icon) == null ? void 0 : y.name) !== "arrow";
|
|
127
|
+
return a && (t.push("rds-e-arrow-link__icon"), e.disabled && t.push("rds-e-arrow-link__icon--disabled")), p && e.inverse && t.push("rds-e-arrow-link__icon--inverse"), t.push(e.right ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left"), t.join(" ");
|
|
128
|
+
}), f = n(() => {
|
|
129
|
+
var t;
|
|
130
|
+
return e.arrow || !!((t = e.icon) != null && t.name);
|
|
128
131
|
});
|
|
129
|
-
return (
|
|
130
|
-
id:
|
|
131
|
-
class:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
default: T(() => [
|
|
141
|
-
e(r).name && !e(n) && !e(c) ? (s(), p(y, v({
|
|
132
|
+
return (t, a) => (i(), l(z(S.value), s({
|
|
133
|
+
id: r.id,
|
|
134
|
+
class: I.value
|
|
135
|
+
}, C.value, {
|
|
136
|
+
style: B.value,
|
|
137
|
+
tabindex: r.disabled ? -1 : void 0,
|
|
138
|
+
"aria-disabled": r.disabled,
|
|
139
|
+
onClick: x
|
|
140
|
+
}), {
|
|
141
|
+
default: N(() => [
|
|
142
|
+
r.icon.name && !r.right && !r.arrow ? (i(), l(c, s({
|
|
142
143
|
key: 0,
|
|
143
|
-
name:
|
|
144
|
-
}, {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}), null, 16, ["name", "class", "style"])) : d("", !0),
|
|
150
|
-
e(n) ? (s(), I("span", {
|
|
144
|
+
name: r.icon.name
|
|
145
|
+
}, { ...r.icon }, {
|
|
146
|
+
class: ["rds-e-link__icon-left", m.value],
|
|
147
|
+
style: e.color ? { color: e.color } : void 0
|
|
148
|
+
}), null, 16, ["name", "class", "style"])) : o("", !0),
|
|
149
|
+
r.right ? (i(), g("span", {
|
|
151
150
|
key: 1,
|
|
152
|
-
class:
|
|
153
|
-
"rds-e-mr-xs":
|
|
154
|
-
"rds-e-link__text--underline":
|
|
151
|
+
class: d(["rds-e-link__text", [r.customClass, {
|
|
152
|
+
"rds-e-mr-xs": f.value,
|
|
153
|
+
"rds-e-link__text--underline": r.underline
|
|
155
154
|
}]])
|
|
156
155
|
}, [
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
v(t.$slots, "default", {}, () => [
|
|
157
|
+
w(b(r.text), 1)
|
|
159
158
|
], !0)
|
|
160
|
-
], 2)) :
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
class: ["rds-e-arrow-link__icon--arrow", [
|
|
166
|
-
|
|
167
|
-
{ "rds-flex rds-flex-center-center":
|
|
168
|
-
]],
|
|
169
|
-
style: e
|
|
170
|
-
}
|
|
171
|
-
|
|
159
|
+
], 2)) : o("", !0),
|
|
160
|
+
r.arrow ? (i(), l(c, {
|
|
161
|
+
key: 2,
|
|
162
|
+
name: r.right ? "arrow_right" : "arrow_left",
|
|
163
|
+
size: r.arrowSmall ? 16 : void 0,
|
|
164
|
+
class: d(["rds-e-arrow-link__icon--arrow", [
|
|
165
|
+
r.right ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left",
|
|
166
|
+
{ "rds-flex rds-flex-center-center": r.arrowSmall }
|
|
167
|
+
]]),
|
|
168
|
+
style: j(e.color ? { color: e.color } : void 0)
|
|
169
|
+
}, null, 8, ["name", "size", "class", "style"])) : o("", !0),
|
|
170
|
+
r.right ? o("", !0) : (i(), g("span", {
|
|
172
171
|
key: 3,
|
|
173
|
-
class:
|
|
172
|
+
class: d(["rds-e-link__text", { "rds-e-ml-xs": f.value }])
|
|
174
173
|
}, [
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
v(t.$slots, "default", {}, () => [
|
|
175
|
+
w(b(r.text), 1)
|
|
177
176
|
], !0)
|
|
178
177
|
], 2)),
|
|
179
|
-
|
|
178
|
+
r.icon.name && r.right && !r.arrow ? (i(), l(c, s({
|
|
180
179
|
key: 4,
|
|
181
|
-
name:
|
|
182
|
-
},
|
|
183
|
-
class: ["rds-e-link__icon-right",
|
|
184
|
-
style: e
|
|
185
|
-
}), null, 16, ["name", "class", "style"])) :
|
|
180
|
+
name: r.icon.name
|
|
181
|
+
}, r.icon, {
|
|
182
|
+
class: ["rds-e-link__icon-right", m.value],
|
|
183
|
+
style: e.color ? { color: e.color } : void 0
|
|
184
|
+
}), null, 16, ["name", "class", "style"])) : o("", !0)
|
|
186
185
|
]),
|
|
187
186
|
_: 3
|
|
188
|
-
},
|
|
187
|
+
}, 16, ["id", "class", "style", "tabindex", "aria-disabled"]));
|
|
189
188
|
}
|
|
190
|
-
}),
|
|
189
|
+
}), T = /* @__PURE__ */ A(R, [["__scopeId", "data-v-31849beb"]]);
|
|
191
190
|
export {
|
|
192
|
-
|
|
191
|
+
T as default
|
|
193
192
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as m, onMounted as N, onBeforeUnmount as W, watch as D, computed as _, createBlock as R, createCommentVNode as f, openBlock as d, unref as c, withCtx as C, createVNode as E, withModifiers as F, normalizeStyle as T, createElementVNode as v, normalizeClass as S, createElementBlock as h, renderSlot as p } from "vue";
|
|
2
2
|
import V from "./overlay.es.js";
|
|
3
3
|
import L from "./card.es.js";
|
|
4
|
-
import { R as A } from "./icon-svg-
|
|
4
|
+
import { R as A } from "./icon-svg-K8-vLJgV.js";
|
|
5
5
|
import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import './style/modal.css';const U = { class: "rds-e-
|
|
6
|
+
import './style/modal.css';const U = { class: "rds-e-modal__header" }, j = { class: "rds-e-modal__header-text" }, G = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "rds-e-modal__spacer"
|
|
9
|
-
},
|
|
9
|
+
}, J = /* @__PURE__ */ z({
|
|
10
10
|
__name: "modal",
|
|
11
11
|
props: {
|
|
12
12
|
/**
|
|
@@ -45,7 +45,7 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
45
45
|
maxWidth: {
|
|
46
46
|
type: [String, Number],
|
|
47
47
|
default: 820,
|
|
48
|
-
validator: (
|
|
48
|
+
validator: (o) => typeof o == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(o)
|
|
49
49
|
},
|
|
50
50
|
/**
|
|
51
51
|
* Ancho del modal en dispositivos de escritorio.
|
|
@@ -53,7 +53,7 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
53
53
|
width: {
|
|
54
54
|
type: [String, Number],
|
|
55
55
|
default: 600,
|
|
56
|
-
validator: (
|
|
56
|
+
validator: (o) => typeof o == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(o)
|
|
57
57
|
},
|
|
58
58
|
/**
|
|
59
59
|
* Altura máxima del modal en dispositivos móviles en vh, por defecto es 50vh. Recibe un Number cualquiera
|
|
@@ -62,7 +62,7 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
62
62
|
mobileHeight: {
|
|
63
63
|
type: [Number],
|
|
64
64
|
default: 50,
|
|
65
|
-
validator: (
|
|
65
|
+
validator: (o) => o < 30 ? (console.warn(`energy-components: mobileHeight: ${o} es menor que 30. Se limitará a 30vh.`), !0) : (o > 90 && console.warn(`energy-components: mobileHeight: ${o} es mayor que 90. Se limitará a 90vh.`), !0)
|
|
66
66
|
},
|
|
67
67
|
/**
|
|
68
68
|
* ID del modal para testing
|
|
@@ -73,8 +73,8 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
emits: ["onCloseRequest", "onOpenRequest", "onToggleRequest"],
|
|
76
|
-
setup(
|
|
77
|
-
const
|
|
76
|
+
setup(o, { expose: k, emit: O }) {
|
|
77
|
+
const t = o, s = O, q = m(null), r = m(null), $ = m(null), u = m(!1);
|
|
78
78
|
let i = null, a = null;
|
|
79
79
|
const n = () => {
|
|
80
80
|
const e = r.value;
|
|
@@ -86,9 +86,9 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
86
86
|
u.value = !1;
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
const
|
|
90
|
-
u.value =
|
|
91
|
-
},
|
|
89
|
+
const w = 1, M = e.scrollHeight - e.clientHeight - e.scrollTop;
|
|
90
|
+
u.value = M > w;
|
|
91
|
+
}, H = () => {
|
|
92
92
|
n();
|
|
93
93
|
}, y = () => {
|
|
94
94
|
typeof ResizeObserver < "u" && (i = new ResizeObserver(() => {
|
|
@@ -99,20 +99,20 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
99
99
|
}, b = () => {
|
|
100
100
|
i && r.value && i.unobserve(r.value), i = null, a && a.disconnect(), a = null, window.removeEventListener("resize", n);
|
|
101
101
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}),
|
|
102
|
+
N(() => {
|
|
103
|
+
t.open && y();
|
|
104
|
+
}), W(() => {
|
|
105
105
|
b();
|
|
106
|
-
}),
|
|
106
|
+
}), D(() => t.open, (e) => {
|
|
107
107
|
e ? y() : b();
|
|
108
108
|
});
|
|
109
|
-
const x =
|
|
110
|
-
const e = typeof
|
|
109
|
+
const x = _(() => t.mobileHeight < 30 ? "30vh" : t.mobileHeight > 90 ? "90vh" : `${t.mobileHeight}vh`), B = _(() => {
|
|
110
|
+
const e = typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth, l = typeof t.width == "number" ? `${t.width}px` : t.width;
|
|
111
111
|
return { "--rds-modal-max-width": e, "--rds-modal-width": l, "--rds-modal-mobile-height": x.value };
|
|
112
112
|
}), g = () => {
|
|
113
|
-
|
|
113
|
+
t.preventClose || s("onCloseRequest");
|
|
114
114
|
};
|
|
115
|
-
return
|
|
115
|
+
return k({
|
|
116
116
|
/**
|
|
117
117
|
* { () => void } Gestiona el clic fuera del modal.
|
|
118
118
|
*/
|
|
@@ -142,30 +142,32 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
142
142
|
toggleModal: () => {
|
|
143
143
|
s("onToggleRequest");
|
|
144
144
|
}
|
|
145
|
-
}), (e, l) =>
|
|
145
|
+
}), (e, l) => o.open ? (d(), R(c(V), {
|
|
146
146
|
key: 0,
|
|
147
|
-
id:
|
|
147
|
+
id: o.id,
|
|
148
148
|
ref_key: "overlay",
|
|
149
|
-
ref:
|
|
149
|
+
ref: q,
|
|
150
150
|
class: "rds-e-modal__overlay",
|
|
151
|
-
teleport:
|
|
151
|
+
teleport: t.teleport,
|
|
152
152
|
onClick: g
|
|
153
153
|
}, {
|
|
154
154
|
default: C(() => [
|
|
155
|
-
|
|
156
|
-
id:
|
|
155
|
+
E(c(L), {
|
|
156
|
+
id: o.id ? `${o.id}-card` : void 0,
|
|
157
157
|
class: "rds-e-modal__card",
|
|
158
|
-
style:
|
|
159
|
-
onClick: l[1] || (l[1] =
|
|
158
|
+
style: T(B.value),
|
|
159
|
+
onClick: l[1] || (l[1] = F(() => {
|
|
160
160
|
}, ["stop"]))
|
|
161
161
|
}, {
|
|
162
162
|
default: C(() => [
|
|
163
|
-
v("div",
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
v("div", {
|
|
164
|
+
class: S(["rds-e-modal__container", { "rds-e-modal__container--no-footer": !e.$slots.footer }])
|
|
165
|
+
}, [
|
|
166
|
+
v("div", U, [
|
|
167
|
+
v("div", j, [
|
|
166
168
|
p(e.$slots, "header", {}, void 0, !0)
|
|
167
169
|
]),
|
|
168
|
-
|
|
170
|
+
t.showClose ? (d(), R(c(A), {
|
|
169
171
|
key: 0,
|
|
170
172
|
class: "rds-e-modal__header-close",
|
|
171
173
|
name: "close",
|
|
@@ -178,19 +180,19 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
178
180
|
ref_key: "bodyRef",
|
|
179
181
|
ref: r,
|
|
180
182
|
class: "rds-e-modal__body",
|
|
181
|
-
onScroll:
|
|
183
|
+
onScroll: H
|
|
182
184
|
}, [
|
|
183
185
|
p(e.$slots, "body", {}, void 0, !0)
|
|
184
|
-
], 544)) : (d(), h("div",
|
|
186
|
+
], 544)) : (d(), h("div", G)),
|
|
185
187
|
e.$slots.footer ? (d(), h("div", {
|
|
186
188
|
key: 2,
|
|
187
189
|
ref_key: "footerRef",
|
|
188
|
-
ref:
|
|
189
|
-
class:
|
|
190
|
+
ref: $,
|
|
191
|
+
class: S(["rds-e-modal__footer", { "rds-e-modal__footer--has-shadow": u.value }])
|
|
190
192
|
}, [
|
|
191
193
|
p(e.$slots, "footer", {}, void 0, !0)
|
|
192
194
|
], 2)) : f("", !0)
|
|
193
|
-
])
|
|
195
|
+
], 2)
|
|
194
196
|
]),
|
|
195
197
|
_: 3
|
|
196
198
|
}, 8, ["id", "style"])
|
|
@@ -198,7 +200,7 @@ import './style/modal.css';const U = { class: "rds-e-modal__container" }, j = {
|
|
|
198
200
|
_: 3
|
|
199
201
|
}, 8, ["id", "teleport"])) : f("", !0);
|
|
200
202
|
}
|
|
201
|
-
}),
|
|
203
|
+
}), Z = /* @__PURE__ */ I(J, [["__scopeId", "data-v-5521fdf1"]]);
|
|
202
204
|
export {
|
|
203
|
-
|
|
205
|
+
Z as default
|
|
204
206
|
};
|