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.
Files changed (98) hide show
  1. package/dist/components/accordion.es.js +71 -53
  2. package/dist/components/avatar.es.js +1 -1
  3. package/dist/components/button.es.js +1 -1
  4. package/dist/components/checkbox.es.js +1 -1
  5. package/dist/components/collapsable.es.js +1 -1
  6. package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-f-OHx-l3.js +86 -0
  7. package/dist/components/datepicker.es.js +1 -1
  8. package/dist/components/directAccess.es.js +1 -1
  9. package/dist/components/dragAndDrop.es.js +1 -1
  10. package/dist/components/dropdown.es.js +1 -1
  11. package/dist/components/fileUploadItem.es.js +1 -1
  12. package/dist/components/filterChip.es.js +1 -1
  13. package/dist/components/filterTag.es.js +1 -1
  14. package/dist/components/{floating-ui.vue-oA1DfKeS.js → floating-ui.vue-DHEoOe5S.js} +305 -303
  15. package/dist/components/{icon-svg-C8XeOnqu.js → icon-svg-K8-vLJgV.js} +1257 -792
  16. package/dist/components/iconList.es.js +1 -1
  17. package/dist/components/iconSvg.es.js +1 -1
  18. package/dist/components/index.es.js +2 -2
  19. package/dist/components/infoBox.es.js +1 -1
  20. package/dist/components/link.es.js +84 -85
  21. package/dist/components/modal.es.js +41 -39
  22. package/dist/components/multiselect.es.js +52 -52
  23. package/dist/components/multiselectcontentwrapper.es.js +2 -2
  24. package/dist/components/persistentToast.es.js +1 -1
  25. package/dist/components/popover.es.js +2 -2
  26. package/dist/components/popoverMenu.es.js +51 -51
  27. package/dist/components/progressBar.es.js +2 -2
  28. package/dist/components/quantitySelector.es.js +1 -1
  29. package/dist/components/radioButton.es.js +1 -1
  30. package/dist/components/selectionChip.es.js +1 -1
  31. package/dist/components/sidedrawer.es.js +1 -1
  32. package/dist/components/style/accordion.css +1 -1
  33. package/dist/components/style/accordionGroup.css +1 -1
  34. package/dist/components/style/actionButton.css +1 -1
  35. package/dist/components/style/avatar.css +1 -1
  36. package/dist/components/style/badge.css +1 -1
  37. package/dist/components/style/breadcrumbs.css +1 -1
  38. package/dist/components/style/button.css +1 -1
  39. package/dist/components/style/card.css +1 -1
  40. package/dist/components/style/checkbox.css +1 -1
  41. package/dist/components/style/collapsable.css +1 -1
  42. package/dist/components/style/datepicker.css +1 -1
  43. package/dist/components/style/directAccess.css +1 -1
  44. package/dist/components/style/divider.css +1 -1
  45. package/dist/components/style/dragAndDrop.css +1 -1
  46. package/dist/components/style/dropdown.css +1 -1
  47. package/dist/components/style/fileUploadItem.css +1 -1
  48. package/dist/components/style/filterChip.css +1 -1
  49. package/dist/components/style/filterTag.css +1 -1
  50. package/dist/components/style/floatingActionButton.css +1 -1
  51. package/dist/components/style/icon-svg.css +1 -1
  52. package/dist/components/style/iconList.css +1 -1
  53. package/dist/components/style/indicator.css +1 -1
  54. package/dist/components/style/infoBox.css +1 -1
  55. package/dist/components/style/link.css +1 -1
  56. package/dist/components/style/loader.css +1 -1
  57. package/dist/components/style/modal.css +1 -1
  58. package/dist/components/style/multiselect.css +1 -1
  59. package/dist/components/style/multiselectcontentwrapper.css +1 -1
  60. package/dist/components/style/overlay.css +1 -1
  61. package/dist/components/style/pagination.css +1 -1
  62. package/dist/components/style/persistentToast.css +1 -1
  63. package/dist/components/style/popover.css +1 -1
  64. package/dist/components/style/popoverMenu.css +1 -1
  65. package/dist/components/style/progressBar.css +1 -1
  66. package/dist/components/style/quantitySelector.css +1 -1
  67. package/dist/components/style/radioButton.css +1 -1
  68. package/dist/components/style/selectionChip.css +1 -1
  69. package/dist/components/style/sidebar.css +1 -1
  70. package/dist/components/style/sidedrawer.css +1 -1
  71. package/dist/components/style/snackBar.css +1 -1
  72. package/dist/components/style/switch.css +1 -1
  73. package/dist/components/style/tabBar.css +1 -1
  74. package/dist/components/style/tablepaginatedcomponent.css +1 -1
  75. package/dist/components/style/tableslotedcomponent.css +1 -1
  76. package/dist/components/style/tag.css +1 -1
  77. package/dist/components/style/textArea.css +1 -1
  78. package/dist/components/style/textField.css +1 -1
  79. package/dist/components/style/toggle.css +1 -1
  80. package/dist/components/style/tooltip.css +1 -1
  81. package/dist/components/switch.es.js +1 -1
  82. package/dist/components/tabBar.es.js +1 -1
  83. package/dist/components/tablepaginatedcomponent.es.js +46 -46
  84. package/dist/components/tableslotedcomponent.es.js +119 -119
  85. package/dist/components/tag.es.js +1 -1
  86. package/dist/components/textArea.es.js +1 -1
  87. package/dist/components/textField.es.js +136 -131
  88. package/dist/components/toggle.es.js +24 -24
  89. package/dist/components/tooltip.es.js +2 -2
  90. package/dist/energy-components.es.js +6329 -5838
  91. package/dist/energy-components.umd.js +2 -2
  92. package/dist/style.css +1 -1
  93. package/dist/types/src/components/content/accordion/accordion.vue.d.ts +19 -0
  94. package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +1 -1
  95. package/dist/types/src/components/navigation/link/link.vue.d.ts +8 -5
  96. package/dist/types/tsconfig.tsbuildinfo +1 -1
  97. package/package.json +2 -2
  98. 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-C8XeOnqu.js";
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-C8XeOnqu.js";
1
+ import { R as a } from "./icon-svg-K8-vLJgV.js";
2
2
  import "./_plugin-vue_export-helper-CHgC5LLL.js";
3
3
  export {
4
4
  a as default
@@ -1,4 +1,4 @@
1
- import { R as a } from "./icon-svg-C8XeOnqu.js";
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-6HkNT8L9.js";
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-C8XeOnqu.js";
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 $, toRefs as M, computed as m, createBlock as p, openBlock as s, resolveDynamicComponent as O, unref as e, normalizeStyle as P, normalizeClass as k, withCtx as T, createCommentVNode as d, createElementBlock as I, mergeProps as v, renderSlot as D, createTextVNode as R, toDisplayString as j } from "vue";
2
- import { R as y } from "./icon-svg-C8XeOnqu.js";
3
- import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/link.css';const A = /* @__PURE__ */ $({
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: (o) => typeof o.name == "string" && (o.modifier === void 0 || typeof o.modifier == "string") ? !0 : (console.error("El icono debe tener una propiedad name de tipo string y una propiedad modifier opcional de tipo string"), !1)
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(o, { emit: w }) {
101
- const z = o, E = w, {
102
- text: g,
103
- to: h,
104
- icon: r,
105
- tag: u,
106
- disabled: i,
107
- inverse: _,
108
- arrow: c,
109
- right: n,
110
- underline: b,
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
- return c.value || ((a = r == null ? void 0 : r.value) == null ? void 0 : a.name);
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 (a, t) => (s(), p(O(e(u) === "a" ? e(u) : "router-link"), {
130
- id: e(L),
131
- class: k(V.value),
132
- to: e(u) === "router-link" ? e(h) : null,
133
- href: e(u) === "a" ? e(h) : null,
134
- disable: e(i),
135
- style: P(N.value),
136
- tabindex: e(i) ? -1 : void 0,
137
- "aria-disabled": e(i),
138
- onClick: t[0] || (t[0] = (f) => E("click", f))
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: e(r).name
144
- }, {
145
- ...e(r)
146
- }, {
147
- class: ["rds-e-link__icon-left", C.value],
148
- style: e(l) ? { color: e(l) } : void 0
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: k(["rds-e-link__text", [e(x), {
153
- "rds-e-mr-xs": B.value,
154
- "rds-e-link__text--underline": e(b)
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
- D(a.$slots, "default", {}, () => [
158
- R(j(e(g)), 1)
156
+ v(t.$slots, "default", {}, () => [
157
+ w(b(r.text), 1)
159
158
  ], !0)
160
- ], 2)) : d("", !0),
161
- e(c) ? (s(), p(y, v({ key: 2 }, {
162
- name: e(n) ? "arrow_right" : "arrow_left",
163
- size: e(S) ? 16 : void 0
164
- }, {
165
- class: ["rds-e-arrow-link__icon--arrow", [
166
- e(n) ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left",
167
- { "rds-flex rds-flex-center-center": e(S) }
168
- ]],
169
- style: e(l) ? { color: e(l) } : void 0
170
- }), null, 16, ["class", "style"])) : d("", !0),
171
- e(n) ? d("", !0) : (s(), I("span", {
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: k(["rds-e-link__text", { "rds-e-ml-xs": B.value }])
172
+ class: d(["rds-e-link__text", { "rds-e-ml-xs": f.value }])
174
173
  }, [
175
- D(a.$slots, "default", {}, () => [
176
- R(j(e(g)), 1)
174
+ v(t.$slots, "default", {}, () => [
175
+ w(b(r.text), 1)
177
176
  ], !0)
178
177
  ], 2)),
179
- e(r).name && e(n) && !e(c) ? (s(), p(y, v({
178
+ r.icon.name && r.right && !r.arrow ? (i(), l(c, s({
180
179
  key: 4,
181
- name: e(r).name
182
- }, e(r), {
183
- class: ["rds-e-link__icon-right", C.value],
184
- style: e(l) ? { color: e(l) } : void 0
185
- }), null, 16, ["name", "class", "style"])) : d("", !0)
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
- }, 8, ["id", "class", "to", "href", "disable", "style", "tabindex", "aria-disabled"]));
187
+ }, 16, ["id", "class", "style", "tabindex", "aria-disabled"]));
189
188
  }
190
- }), J = /* @__PURE__ */ q(A, [["__scopeId", "data-v-16fa62ca"]]);
189
+ }), T = /* @__PURE__ */ A(R, [["__scopeId", "data-v-31849beb"]]);
191
190
  export {
192
- J as default
191
+ T as default
193
192
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as M, ref as m, onMounted as z, onBeforeUnmount as N, watch as W, computed as w, createBlock as R, createCommentVNode as f, openBlock as d, unref as c, withCtx as C, createVNode as D, withModifiers as E, normalizeStyle as F, createElementVNode as v, createElementBlock as h, renderSlot as p, normalizeClass as T } from "vue";
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-C8XeOnqu.js";
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-modal__container" }, j = { class: "rds-e-modal__header" }, G = { class: "rds-e-modal__header-text" }, J = {
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
- }, K = /* @__PURE__ */ M({
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: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
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: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
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: (t) => t < 30 ? (console.warn(`energy-components: mobileHeight: ${t} es menor que 30. Se limitará a 30vh.`), !0) : (t > 90 && console.warn(`energy-components: mobileHeight: ${t} es mayor que 90. Se limitará a 90vh.`), !0)
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(t, { expose: S, emit: k }) {
77
- const o = t, s = k, O = m(null), r = m(null), q = m(null), u = m(!1);
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 _ = 1, B = e.scrollHeight - e.clientHeight - e.scrollTop;
90
- u.value = B > _;
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
- z(() => {
103
- o.open && y();
104
- }), N(() => {
102
+ N(() => {
103
+ t.open && y();
104
+ }), W(() => {
105
105
  b();
106
- }), W(() => o.open, (e) => {
106
+ }), D(() => t.open, (e) => {
107
107
  e ? y() : b();
108
108
  });
109
- const x = w(() => o.mobileHeight < 30 ? "30vh" : o.mobileHeight > 90 ? "90vh" : `${o.mobileHeight}vh`), H = w(() => {
110
- const e = typeof o.maxWidth == "number" ? `${o.maxWidth}px` : o.maxWidth, l = typeof o.width == "number" ? `${o.width}px` : o.width;
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
- o.preventClose || s("onCloseRequest");
113
+ t.preventClose || s("onCloseRequest");
114
114
  };
115
- return S({
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) => t.open ? (d(), R(c(V), {
145
+ }), (e, l) => o.open ? (d(), R(c(V), {
146
146
  key: 0,
147
- id: t.id,
147
+ id: o.id,
148
148
  ref_key: "overlay",
149
- ref: O,
149
+ ref: q,
150
150
  class: "rds-e-modal__overlay",
151
- teleport: o.teleport,
151
+ teleport: t.teleport,
152
152
  onClick: g
153
153
  }, {
154
154
  default: C(() => [
155
- D(c(L), {
156
- id: t.id ? `${t.id}-card` : void 0,
155
+ E(c(L), {
156
+ id: o.id ? `${o.id}-card` : void 0,
157
157
  class: "rds-e-modal__card",
158
- style: F(H.value),
159
- onClick: l[1] || (l[1] = E(() => {
158
+ style: T(B.value),
159
+ onClick: l[1] || (l[1] = F(() => {
160
160
  }, ["stop"]))
161
161
  }, {
162
162
  default: C(() => [
163
- v("div", U, [
164
- v("div", j, [
165
- v("div", G, [
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
- o.showClose ? (d(), R(c(A), {
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", J)),
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: q,
189
- class: T(["rds-e-modal__footer", { "rds-e-modal__footer--has-shadow": u.value }])
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
- }), ee = /* @__PURE__ */ I(K, [["__scopeId", "data-v-125b508a"]]);
203
+ }), Z = /* @__PURE__ */ I(J, [["__scopeId", "data-v-5521fdf1"]]);
202
204
  export {
203
- ee as default
205
+ Z as default
204
206
  };