energy-components 1.15.1 → 1.16.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 (46) hide show
  1. package/dist/components/accordion.es.js +1 -1
  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-CWwaY_PV.js → collapsable.scss_vue_type_style_index_0_src_true_lang-Bi5q6Y3n.js} +1 -1
  7. package/dist/components/directAccess.es.js +1 -1
  8. package/dist/components/dragAndDrop.es.js +1 -1
  9. package/dist/components/dropdown.es.js +1 -1
  10. package/dist/components/fileUploadItem.es.js +1 -1
  11. package/dist/components/filterChip.es.js +1 -1
  12. package/dist/components/filterTag.es.js +1 -1
  13. package/dist/components/{icon-svg-BGa9K9qG.js → icon-svg-BU0OQFKH.js} +4 -4
  14. package/dist/components/iconList.es.js +1 -1
  15. package/dist/components/iconSvg.es.js +1 -1
  16. package/dist/components/index.es.js +2 -2
  17. package/dist/components/infoBox.es.js +1 -1
  18. package/dist/components/link.es.js +1 -1
  19. package/dist/components/modal.es.js +54 -47
  20. package/dist/components/persistentToast.es.js +1 -1
  21. package/dist/components/popover.es.js +86 -67
  22. package/dist/components/progressBar.es.js +1 -1
  23. package/dist/components/quantitySelector.es.js +1 -1
  24. package/dist/components/radioButton.es.js +1 -1
  25. package/dist/components/selectionChip.es.js +1 -1
  26. package/dist/components/sidedrawer.es.js +1 -1
  27. package/dist/components/style/button.css +1 -1
  28. package/dist/components/style/icon-svg.css +1 -1
  29. package/dist/components/style/modal.css +1 -1
  30. package/dist/components/style/popover.css +1 -1
  31. package/dist/components/style/tooltip.css +1 -1
  32. package/dist/components/switch.es.js +1 -1
  33. package/dist/components/tabBar.es.js +1 -1
  34. package/dist/components/tableslotedcomponent.es.js +1 -1
  35. package/dist/components/tag.es.js +1 -1
  36. package/dist/components/textArea.es.js +1 -1
  37. package/dist/components/textField.es.js +1 -1
  38. package/dist/components/tooltip.es.js +99 -62
  39. package/dist/energy-components.es.js +3041 -2978
  40. package/dist/energy-components.umd.js +2 -2
  41. package/dist/style.css +1 -1
  42. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +19 -0
  43. package/dist/types/src/components/overlay/popover/popover.vue.d.ts +6 -1
  44. package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +42 -2
  45. package/dist/types/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as R, toRefs as B, ref as s, watch as D, nextTick as N, inject as v, onMounted as V, onBeforeUnmount as q, createElementBlock as w, openBlock as _, createElementVNode as n, toDisplayString as h, createBlock as H, createCommentVNode as P, createVNode as T, unref as d, mergeProps as j, normalizeClass as y, renderSlot as A, createTextVNode as E } from "vue";
2
- import { R as I } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as I } from "./icon-svg-BU0OQFKH.js";
3
3
  import O from "./tag.es.js";
4
4
  import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  import './style/accordion.css';const b = ["id"], z = { class: "rds-e-accordion-title" }, M = { class: "rds-e-accordion-title_right" }, U = /* @__PURE__ */ R({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, computed as a, createElementBlock as s, openBlock as n, withKeys as o, normalizeStyle as u, normalizeClass as k, createBlock as _, createCommentVNode as b, toDisplayString as z } from "vue";
2
- import { R as C } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as C } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"], D = {
5
5
  key: 1,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as x, toRefs as I, computed as r, createElementBlock as $, openBlock as b, normalizeClass as m, unref as n, createBlock as k, createCommentVNode as C, createElementVNode as N, renderSlot as R, createTextVNode as V, toDisplayString as D } from "vue";
2
- import { R as E } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as E } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/button.css';const w = ["id", "type", "disabled"], W = { class: "rds-e-btn__text" }, j = /* @__PURE__ */ x({
5
5
  __name: "button",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as V, computed as r, ref as c, watch as _, onMounted as D, onBeforeUnmount as E, createElementBlock as L, openBlock as u, normalizeClass as d, createElementVNode as b, renderSlot as N, createTextVNode as R, createBlock as x, createCommentVNode as T, toDisplayString as q, withCtx as U, createVNode as z } from "vue";
2
- import { R as y } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as y } from "./icon-svg-BU0OQFKH.js";
3
3
  import I from "./tooltip.es.js";
4
4
  import { g as F } from "./getInstance-GhoEcxLF.js";
5
5
  import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-CWwaY_PV.js";
1
+ import { _ as f } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-Bi5q6Y3n.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as w, ref as d, computed as r, watch as f, nextTick as c, createElementBlock as B, openBlock as m, normalizeClass as i, createElementVNode as a, withKeys as C, createBlock as S, createCommentVNode as $, createVNode as I, toDisplayString as v, renderSlot as N, createTextVNode as V } from "vue";
2
- import { R as h } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as h } from "./icon-svg-BU0OQFKH.js";
3
3
  import './style/collapsable.css';const H = ["id", "aria-expanded", "aria-controls", "disabled"], x = { class: "rds-e-collapsable__header-title" }, D = { class: "rds-e-collapsable__header-title-text" }, E = ["id", "aria-labelledby"], W = /* @__PURE__ */ w({
4
4
  __name: "collapsable",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as j, toRefs as E, computed as o, createBlock as d, openBlock as l, resolveDynamicComponent as I, unref as t, normalizeClass as N, withCtx as O, renderSlot as u, createElementVNode as m, createCommentVNode as b, createElementBlock as T, normalizeStyle as w, toDisplayString as V } from "vue";
2
- import { R as S } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as S } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/directAccess.css';const A = { class: "rds-e-direct-access__artwork-container" }, M = ["src", "alt", "aria-hidden"], F = { class: "rds-e-direct-access__text-container" }, G = { class: "rds-e-direct-access__text" }, H = /* @__PURE__ */ j({
5
5
  __name: "direct-access",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as k, ref as _, computed as c, createElementBlock as b, openBlock as x, withModifiers as f, normalizeClass as q, createElementVNode as u, renderSlot as L, createVNode as M, createCommentVNode as z, toDisplayString as D } from "vue";
2
2
  import { g as A } from "./getInstance-GhoEcxLF.js";
3
- import { R as U } from "./icon-svg-BGa9K9qG.js";
3
+ import { R as U } from "./icon-svg-BU0OQFKH.js";
4
4
  import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  import './style/dragAndDrop.css';const O = ["id", "accept", "multiple", "disabled"], P = ["for"], j = { class: "rds-e-drag-and-drop__icon-wrapper" }, G = { class: "rds-e-drag-and-drop__text-container" }, H = { class: "rds-e-drag-and-drop__text" }, J = {
6
6
  key: 0,
@@ -3,7 +3,7 @@ import he from "./multiselect.es.js";
3
3
  import ke from "./checkbox.es.js";
4
4
  import { _ as $e } from "./radio-group.vue_vue_type_script_setup_true_lang-DpguLlRK.js";
5
5
  import Ce from "./radioButton.es.js";
6
- import { R as Y } from "./icon-svg-BGa9K9qG.js";
6
+ import { R as Y } from "./icon-svg-BU0OQFKH.js";
7
7
  import Z from "./textField.es.js";
8
8
  import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__option" }, xe = { class: "rds-e-dropdown__option-container" }, Ve = { class: "rds-e-dropdown__option--prepend" }, Be = { class: "rds-e-dropdown__option--content" }, Ae = {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as M, ref as N, computed as c, createElementBlock as l, openBlock as o, normalizeClass as $, createElementVNode as r, renderSlot as v, createVNode as p, createCommentVNode as n, toDisplayString as m, withModifiers as I } from "vue";
2
- import { R as g } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as g } from "./icon-svg-BU0OQFKH.js";
3
3
  import z from "./progressBar.es.js";
4
4
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  import './style/fileUploadItem.css';const R = ["id"], w = { class: "rds-e-file-upload-item__icon-container" }, E = { class: "rds-e-file-upload-item__details" }, F = { class: "rds-e-file-upload-item__info-wrapper" }, x = { class: "rds-e-file-upload-item__name" }, D = {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as g, ref as b, computed as s, createElementBlock as a, openBlock as l, normalizeClass as y, createCommentVNode as r, createElementVNode as k, createBlock as c, toDisplayString as n } from "vue";
2
- import { R as o } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as o } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/filterChip.css';const _ = ["id", "disabled"], I = {
5
5
  key: 0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, ref as m, createElementBlock as b, openBlock as g, withKeys as s, normalizeClass as v, createElementVNode as x, createVNode as p, toDisplayString as y, withModifiers as l } from "vue";
2
- import { R as S } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as S } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/filterTag.css';const w = ["id", "aria-disabled", "tabindex"], _ = { class: "rds-e-filter-tag__text" }, k = /* @__PURE__ */ u({
5
5
  __name: "filter-tag",
@@ -16132,10 +16132,10 @@ import './style/icon-svg.css';const I = [
16132
16132
  return (e, l) => (r(), s("span", {
16133
16133
  id: c.id,
16134
16134
  "aria-hidden": "true",
16135
- class: a(["rds-e-icon", [
16135
+ class: a(["icon rds-e-icon", [
16136
16136
  `rds-e-icon-${c.name}`,
16137
- c.modifier && `rds-e-icon--${c.modifier}`,
16138
- c.small && !c.size && "rds-e-icon--small"
16137
+ c.modifier && `icon--${c.modifier}`,
16138
+ c.small && !c.size && "icon--small"
16139
16139
  ]]),
16140
16140
  style: n(M.value)
16141
16141
  }, [
@@ -16145,7 +16145,7 @@ import './style/icon-svg.css';const I = [
16145
16145
  }, null, 2))), 128))
16146
16146
  ], 14, g));
16147
16147
  }
16148
- }), b = /* @__PURE__ */ u(x, [["__scopeId", "data-v-9a07cd0e"]]);
16148
+ }), b = /* @__PURE__ */ u(x, [["__scopeId", "data-v-29e5dc14"]]);
16149
16149
  export {
16150
16150
  b as R,
16151
16151
  d as i,
@@ -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-BGa9K9qG.js";
2
+ import { i as m, R as k } from "./icon-svg-BU0OQFKH.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-BGa9K9qG.js";
1
+ import { R as a } from "./icon-svg-BU0OQFKH.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 i } from "./icon-svg-BGa9K9qG.js";
1
+ import { R as i } from "./icon-svg-BU0OQFKH.js";
2
2
  import a 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 _ from "./divider.es.js";
24
24
  import h from "./card.es.js";
25
25
  import x from "./tablepaginatedcomponent.es.js";
26
26
  import I from "./avatar.es.js";
27
- import { _ as F } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-CWwaY_PV.js";
27
+ import { _ as F } from "./collapsable.scss_vue_type_style_index_0_src_true_lang-Bi5q6Y3n.js";
28
28
  import P 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-BGa9K9qG.js";
2
+ import { R as _ } from "./icon-svg-BU0OQFKH.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,5 +1,5 @@
1
1
  import { defineComponent as N, toRefs as V, computed as f, createBlock as p, openBlock as s, resolveDynamicComponent as $, unref as e, normalizeStyle as M, normalizeClass as _, withCtx as O, createCommentVNode as d, createElementBlock as I, mergeProps as k, renderSlot as D, createTextVNode as R, toDisplayString as j } from "vue";
2
- import { R as v } from "./icon-svg-BGa9K9qG.js";
2
+ import { R as v } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/link.css';const T = /* @__PURE__ */ N({
5
5
  __name: "link",
@@ -1,15 +1,18 @@
1
- import { defineComponent as v, ref as C, computed as R, createBlock as u, createCommentVNode as l, openBlock as a, unref as n, withCtx as c, createVNode as k, withModifiers as g, normalizeStyle as S, createElementVNode as r, createElementBlock as p, renderSlot as i } from "vue";
1
+ import { defineComponent as b, ref as C, computed as c, createBlock as p, createCommentVNode as l, openBlock as d, unref as i, withCtx as f, createVNode as k, withModifiers as R, normalizeStyle as S, createElementVNode as n, createElementBlock as a, renderSlot as m } from "vue";
2
2
  import w from "./overlay.es.js";
3
- import x from "./card.es.js";
4
- import { R as b } from "./icon-svg-BGa9K9qG.js";
5
- import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import './style/modal.css';const $ = { class: "rds-e-modal__container" }, B = { class: "rds-e-modal__header" }, O = { class: "rds-e-modal__header-text" }, M = {
3
+ import $ from "./card.es.js";
4
+ import { R as q } from "./icon-svg-BU0OQFKH.js";
5
+ import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import './style/modal.css';const H = { class: "rds-e-modal__container" }, B = { class: "rds-e-modal__header" }, N = { class: "rds-e-modal__header-text" }, O = {
7
7
  key: 0,
8
- class: "rds-e-modal__section-spacer"
9
- }, N = { class: "rds-e-modal__body" }, W = {
8
+ class: "rds-e-modal__body"
9
+ }, M = {
10
10
  key: 1,
11
- class: "rds-e-modal__section-spacer"
12
- }, D = { class: "rds-e-modal__footer" }, V = /* @__PURE__ */ v({
11
+ class: "rds-e-modal__spacer"
12
+ }, W = {
13
+ key: 2,
14
+ class: "rds-e-modal__footer"
15
+ }, V = /* @__PURE__ */ b({
13
16
  __name: "modal",
14
17
  props: {
15
18
  /**
@@ -58,6 +61,15 @@ import './style/modal.css';const $ = { class: "rds-e-modal__container" }, B = {
58
61
  default: 600,
59
62
  validator: (e) => typeof e == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(e)
60
63
  },
64
+ /**
65
+ * Altura máxima del modal en dispositivos móviles en vh, por defecto es 50vh. Recibe un Number cualquiera
66
+ * que es convertido a vh. El mínimo aceptado es 30 y el máximo aceptado es 90.
67
+ */
68
+ mobileHeight: {
69
+ type: [Number],
70
+ default: 50,
71
+ validator: (e) => e < 30 ? (console.warn(`energy-components: mobileHeight: ${e} es menor que 30. Se limitará a 30vh.`), !0) : (e > 90 && console.warn(`energy-components: mobileHeight: ${e} es mayor que 90. Se limitará a 90vh.`), !0)
72
+ },
61
73
  /**
62
74
  * ID del modal para testing
63
75
  */
@@ -67,85 +79,80 @@ import './style/modal.css';const $ = { class: "rds-e-modal__container" }, B = {
67
79
  }
68
80
  },
69
81
  emits: ["onCloseRequest", "onOpenRequest", "onToggleRequest"],
70
- setup(e, { expose: f, emit: _ }) {
71
- const t = e, s = _, y = C(null), h = R(() => {
72
- const o = typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth, d = typeof t.width == "number" ? `${t.width}px` : t.width;
73
- return {
74
- "--rds-modal-max-width": o,
75
- "--rds-modal-width": d
76
- };
77
- }), m = () => {
78
- t.preventClose || s("onCloseRequest");
82
+ setup(e, { expose: h, emit: y }) {
83
+ const t = e, r = y, _ = C(null), v = c(() => t.mobileHeight < 30 ? "30vh" : t.mobileHeight > 90 ? "90vh" : `${t.mobileHeight}vh`), g = c(() => {
84
+ const o = typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth, s = typeof t.width == "number" ? `${t.width}px` : t.width;
85
+ return { "--rds-modal-max-width": o, "--rds-modal-width": s, "--rds-modal-mobile-height": v.value };
86
+ }), u = () => {
87
+ t.preventClose || r("onCloseRequest");
79
88
  };
80
- return f({
89
+ return h({
81
90
  /**
82
91
  * { () => void } Gestiona el clic fuera del modal.
83
92
  */
84
- modalClickOutside: () => m(),
93
+ modalClickOutside: () => u(),
85
94
  /**
86
95
  * { () => void } Solicita abrir el modal.
87
96
  */
88
97
  openModal: () => {
89
- s("onOpenRequest");
98
+ r("onOpenRequest");
90
99
  },
91
100
  /**
92
101
  * { () => void } Solicita cerrar el modal.
93
102
  */
94
103
  closeModal: () => {
95
- s("onCloseRequest");
104
+ r("onCloseRequest");
96
105
  },
97
106
  /**
98
107
  * { (state: boolean) => void } Cambia el estado del modal.
99
108
  * @param {boolean} state - true para abrir, false para cerrar
100
109
  */
101
110
  changeModalState: (o) => {
102
- s(o ? "onOpenRequest" : "onCloseRequest");
111
+ r(o ? "onOpenRequest" : "onCloseRequest");
103
112
  },
104
113
  /**
105
114
  * { () => void } Alterna el estado del modal.
106
115
  */
107
116
  toggleModal: () => {
108
- s("onToggleRequest");
117
+ r("onToggleRequest");
109
118
  }
110
- }), (o, d) => e.open ? (a(), u(n(w), {
119
+ }), (o, s) => e.open ? (d(), p(i(w), {
111
120
  key: 0,
112
121
  id: e.id,
113
122
  ref_key: "overlay",
114
- ref: y,
123
+ ref: _,
115
124
  class: "rds-e-modal__overlay",
116
125
  teleport: t.teleport,
117
- onClick: m
126
+ onClick: u
118
127
  }, {
119
- default: c(() => [
120
- k(n(x), {
128
+ default: f(() => [
129
+ k(i($), {
121
130
  id: e.id ? `${e.id}-card` : void 0,
122
131
  class: "rds-e-modal__card",
123
- style: S(h.value),
124
- onClick: d[1] || (d[1] = g(() => {
132
+ style: S(g.value),
133
+ onClick: s[1] || (s[1] = R(() => {
125
134
  }, ["stop"]))
126
135
  }, {
127
- default: c(() => [
128
- r("div", $, [
129
- r("div", B, [
130
- r("div", O, [
131
- i(o.$slots, "header", {}, void 0, !0)
136
+ default: f(() => [
137
+ n("div", H, [
138
+ n("div", B, [
139
+ n("div", N, [
140
+ m(o.$slots, "header", {}, void 0, !0)
132
141
  ]),
133
- t.showClose ? (a(), u(n(b), {
142
+ t.showClose ? (d(), p(i(q), {
134
143
  key: 0,
135
144
  class: "rds-e-modal__header-close",
136
145
  name: "close",
137
146
  small: "",
138
- onClick: d[0] || (d[0] = () => s("onCloseRequest"))
147
+ onClick: s[0] || (s[0] = () => r("onCloseRequest"))
139
148
  })) : l("", !0)
140
149
  ]),
141
- o.$slots.body ? (a(), p("span", M)) : l("", !0),
142
- r("div", N, [
143
- i(o.$slots, "body", {}, void 0, !0)
144
- ]),
145
- o.$slots.footer ? (a(), p("span", W)) : l("", !0),
146
- r("div", D, [
147
- i(o.$slots, "footer", {}, void 0, !0)
148
- ])
150
+ o.$slots.body ? (d(), a("div", O, [
151
+ m(o.$slots, "body", {}, void 0, !0)
152
+ ])) : (d(), a("div", M)),
153
+ o.$slots.footer ? (d(), a("div", W, [
154
+ m(o.$slots, "footer", {}, void 0, !0)
155
+ ])) : l("", !0)
149
156
  ])
150
157
  ]),
151
158
  _: 3
@@ -154,7 +161,7 @@ import './style/modal.css';const $ = { class: "rds-e-modal__container" }, B = {
154
161
  _: 3
155
162
  }, 8, ["id", "teleport"])) : l("", !0);
156
163
  }
157
- }), A = /* @__PURE__ */ q(V, [["__scopeId", "data-v-c9a881de"]]);
164
+ }), A = /* @__PURE__ */ x(V, [["__scopeId", "data-v-75972b62"]]);
158
165
  export {
159
166
  A as default
160
167
  };
@@ -1,5 +1,5 @@
1
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-BGa9K9qG.js";
2
+ import { R as l } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C = {
5
5
  key: 0,
@@ -1,8 +1,11 @@
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-BGa9K9qG.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 = {
1
+ import { useSlots as P, computed as v, ref as g, onBeforeUnmount as $, createElementBlock as r, openBlock as n, createElementVNode as S, createBlock as w, renderSlot as y, Teleport as F, createCommentVNode as E, normalizeStyle as N, unref as D, Fragment as H, renderList as M, toDisplayString as V, nextTick as z } from "vue";
2
+ import { o as A, f as I, s as U, a as j, u as W, d as q } from "./floating-ui.vue-7LKzPqHI.js";
3
+ import { R as G } from "./icon-svg-BU0OQFKH.js";
4
+ import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import './style/popover.css';const K = { class: "rds-e-popover" }, Q = {
6
+ key: 1,
7
+ class: "rds-e-popover__list"
8
+ }, X = ["onClick"], Y = { class: "rds-e-popover__item-label" }, Z = {
6
9
  __name: "popover",
7
10
  props: {
8
11
  /**
@@ -67,100 +70,116 @@ import './style/popover.css';const j = { class: "rds-e-popover" }, W = { class:
67
70
  /**
68
71
  * <span>Se emite cuando se selecciona un elemento del popover</span>
69
72
  */
70
- "select"
73
+ "select",
74
+ /**
75
+ * Se emite cuando el popover se abre.
76
+ */
77
+ "open",
78
+ /**
79
+ * Se emite cuando el popover se cierra.
80
+ */
81
+ "close"
71
82
  ],
72
- setup(r, { emit: w }) {
73
- const n = r, E = w, t = m(!1), o = m(null), c = m(null), S = k(() => {
83
+ setup(c, { expose: T, emit: B }) {
84
+ const o = c, u = B, L = P(), O = v(() => !!L.default), s = g(!1), l = g(null), i = g(null), R = v(() => {
74
85
  const e = [
75
- H(n.offsetSpace)
86
+ A(o.offsetSpace)
76
87
  ];
77
- return n.autoFlip && e.push(
78
- M({
79
- fallbackPlacements: n.fallbackPlacements.length ? n.fallbackPlacements : void 0
88
+ return o.autoFlip && e.push(
89
+ I({
90
+ fallbackPlacements: o.fallbackPlacements.length ? o.fallbackPlacements : void 0
80
91
  })
81
92
  ), 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`
93
+ U({ padding: 8 }),
94
+ j({
95
+ apply({ availableWidth: h, elements: t }) {
96
+ const d = Math.min(o.width, h - 32);
97
+ Object.assign(t.floating.style, {
98
+ width: `${d}px`
88
99
  });
89
100
  }
90
101
  })
91
102
  ), e;
92
- }), { floatingStyles: T, update: B } = A(
93
- o,
94
- c,
103
+ }), { floatingStyles: x, update: C } = W(
104
+ l,
105
+ i,
95
106
  {
96
- placement: k(() => n.placement),
97
- middleware: S,
98
- whileElementsMounted: D
107
+ placement: v(() => o.placement),
108
+ middleware: R,
109
+ whileElementsMounted: q
99
110
  }
100
111
  );
101
- let u, f, p;
102
- const a = () => {
103
- document.removeEventListener("click", u), document.removeEventListener("keydown", f), document.removeEventListener("scroll", p, !0);
112
+ let p, f, m;
113
+ const k = () => {
114
+ document.removeEventListener("click", p), document.removeEventListener("keydown", f), document.removeEventListener("scroll", m, !0);
115
+ }, a = () => {
116
+ s.value && (s.value = !1, u("close"), k());
104
117
  };
105
- u = (e) => {
106
- c.value && !c.value.contains(e.target) && o.value && !o.value.contains(e.target) && (t.value = !1, a());
118
+ p = (e) => {
119
+ i.value && !i.value.contains(e.target) && l.value && !l.value.contains(e.target) && a();
107
120
  }, 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());
121
+ e.key === "Escape" && a();
122
+ }, m = () => {
123
+ if (!l.value) return;
124
+ const e = l.value.getBoundingClientRect();
125
+ (e.bottom < 0 || e.top > window.innerHeight) && a();
113
126
  };
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();
127
+ const _ = async () => {
128
+ s.value ? a() : (s.value = !0, u("open"), await z(), C(), setTimeout(() => {
129
+ document.addEventListener("click", p), document.addEventListener("keydown", f), o.closeOnTriggerHidden && document.addEventListener("scroll", m, !0);
130
+ }));
131
+ }, b = (e) => {
132
+ u("select", e), a();
118
133
  };
119
- return R(a), (e, y) => (s(), d("div", j, [
120
- v("button", {
134
+ return $(k), T({
135
+ toggle: _,
136
+ close: a,
137
+ isOpen: s
138
+ }), (e, h) => (n(), r("div", K, [
139
+ S("button", {
121
140
  ref_key: "referenceRef",
122
- ref: o,
141
+ ref: l,
123
142
  class: "rds-e-popover__trigger-btn",
124
- onClick: L
143
+ onClick: _
125
144
  }, [
126
- h(e.$slots, "trigger", {}, void 0, !0)
145
+ y(e.$slots, "trigger", {}, void 0, !0)
127
146
  ], 512),
128
- (s(), _(x, {
129
- to: r.teleportTo,
130
- disabled: !r.teleportTo
147
+ (n(), w(F, {
148
+ to: c.teleportTo,
149
+ disabled: !c.teleportTo
131
150
  }, [
132
- t.value ? (s(), d("div", {
151
+ s.value ? (n(), r("div", {
133
152
  key: 0,
134
153
  ref_key: "floatingRef",
135
- ref: c,
154
+ ref: i,
136
155
  class: "rds-e-popover__content",
137
- style: C(F(T))
156
+ style: N(D(x))
138
157
  }, [
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)
158
+ O.value ? y(e.$slots, "default", { key: 0 }, void 0, !0) : (n(), r("ul", Q, [
159
+ (n(!0), r(H, null, M(c.items, (t, d) => y(e.$slots, "item", {
160
+ item: t,
161
+ index: d,
162
+ onSelect: () => b(t)
144
163
  }, () => [
145
- (s(), d("li", {
146
- key: i,
147
- class: "rds-e-popover__item rds-body-1",
148
- onClick: (J) => g(l)
164
+ (n(), r("li", {
165
+ key: d,
166
+ class: "rds-e-popover__item rds-body-2",
167
+ onClick: (ee) => b(t)
149
168
  }, [
150
- l.icon ? (s(), _(I, {
169
+ t.icon ? (n(), w(G, {
151
170
  key: 0,
152
171
  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))
172
+ name: t.icon
173
+ }, null, 8, ["name"])) : E("", !0),
174
+ S("span", Y, V(t.label), 1)
175
+ ], 8, X))
157
176
  ], !0)), 256))
158
- ])
159
- ], 4)) : b("", !0)
177
+ ]))
178
+ ], 4)) : E("", !0)
160
179
  ], 8, ["to", "disabled"]))
161
180
  ]));
162
181
  }
163
- }, Z = /* @__PURE__ */ U(G, [["__scopeId", "data-v-69668ffe"]]);
182
+ }, le = /* @__PURE__ */ J(Z, [["__scopeId", "data-v-c37db8b1"]]);
164
183
  export {
165
- Z as default
184
+ le as default
166
185
  };
@@ -1,5 +1,5 @@
1
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-BGa9K9qG.js";
2
+ import { R as C } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/progressBar.css';const w = ["id"], P = {
5
5
  key: 0,
@@ -1,5 +1,5 @@
1
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-BGa9K9qG.js";
2
+ import { R as y } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
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",
@@ -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-BGa9K9qG.js";
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,5 +1,5 @@
1
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-BGa9K9qG.js";
2
+ import { R as _ } from "./icon-svg-BU0OQFKH.js";
3
3
  import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/selectionChip.css';const C = ["id", "disabled"], k = { class: "rds-e-selection-chip__text" }, S = /* @__PURE__ */ d({
5
5
  __name: "selection-chip",
@@ -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-BGa9K9qG.js";
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,