energy-components 1.6.0-beta.0 → 1.6.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 (54) hide show
  1. package/dist/components/accordion.es.js +13 -13
  2. package/dist/components/button.es.js +11 -11
  3. package/dist/components/checkbox.es.js +7 -7
  4. package/dist/components/dropdown.es.js +278 -148
  5. package/dist/components/filterChip.es.js +4 -4
  6. package/dist/components/{icon-svg-CeKfjk3j.js → icon-svg-DGp2yHJn.js} +700 -670
  7. package/dist/components/iconList.es.js +5 -5
  8. package/dist/components/iconSvg.es.js +1 -1
  9. package/dist/components/index.es.js +62 -59
  10. package/dist/components/infoBox.es.js +48 -33
  11. package/dist/components/link.es.js +15 -15
  12. package/dist/components/modal.es.js +69 -39
  13. package/dist/components/multiselect.es.js +230 -184
  14. package/dist/components/multiselectcontentwrapper.es.js +140 -0
  15. package/dist/components/pagination.es.js +118 -86
  16. package/dist/components/persistentToast.es.js +29 -23
  17. package/dist/components/quantitySelector.es.js +9 -9
  18. package/dist/components/radioButton.es.js +16 -16
  19. package/dist/components/selectionChip.es.js +5 -5
  20. package/dist/components/sidedrawer.es.js +36 -28
  21. package/dist/components/style/datepicker.css +1 -1
  22. package/dist/components/style/dropdown.css +1 -1
  23. package/dist/components/style/infoBox.css +1 -1
  24. package/dist/components/style/modal.css +1 -1
  25. package/dist/components/style/multiselect.css +1 -1
  26. package/dist/components/style/multiselectcontentwrapper.css +1 -0
  27. package/dist/components/style/pagination.css +1 -1
  28. package/dist/components/style/persistentToast.css +1 -1
  29. package/dist/components/style/sidedrawer.css +1 -1
  30. package/dist/components/style/tablepaginatedcomponent.css +1 -1
  31. package/dist/components/style/tableslotedcomponent.css +1 -1
  32. package/dist/components/style/textField.css +1 -1
  33. package/dist/components/switch.es.js +10 -10
  34. package/dist/components/tabBar.es.js +12 -12
  35. package/dist/components/tablepaginatedcomponent.es.js +69 -66
  36. package/dist/components/tableslotedcomponent.es.js +147 -138
  37. package/dist/components/tag.es.js +5 -5
  38. package/dist/components/textArea.es.js +22 -22
  39. package/dist/components/textField.es.js +93 -84
  40. package/dist/components/tooltip.es.js +61 -61
  41. package/dist/energy-components.es.js +7354 -6797
  42. package/dist/energy-components.umd.js +1 -1
  43. package/dist/style.css +1 -1
  44. package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +20 -1
  45. package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +1 -0
  46. package/dist/types/src/components/index.d.ts +1 -0
  47. package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +86 -0
  48. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +582 -0
  49. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +10 -3
  50. package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +15 -0
  51. package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +63 -31
  52. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +27 -1
  53. package/dist/types/tsconfig.tsbuildinfo +1 -1
  54. package/package.json +4 -4
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as p, ref as a, computed as v, openBlock as s, createElementBlock 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, I as k } from "./icon-svg-CeKfjk3j.js";
2
+ import { i as m, R as k } from "./icon-svg-DGp2yHJn.js";
3
3
  import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/iconList.css';const y = { class: "rds-e-icon-list" }, I = ["onClick"], N = /* @__PURE__ */ p({
4
+ import './style/iconList.css';const y = { class: "rds-e-icon-list" }, D = ["onClick"], N = /* @__PURE__ */ p({
5
5
  __name: "icon-list",
6
- setup(T) {
6
+ setup(S) {
7
7
  const o = a(""), l = a(!1), c = a(""), d = v(() => {
8
8
  let t = m;
9
9
  return o.value.length > 2 && (t = m.filter(
@@ -33,13 +33,13 @@ import './style/iconList.css';const y = { class: "rds-e-icon-list" }, I = ["onCl
33
33
  class: x(["rds-e-icon-list__item", {
34
34
  "rds-e-icon-list__item--active": l.value && c.value === e.name
35
35
  }]),
36
- onClick: (V) => _(e.name)
36
+ onClick: (T) => _(e.name)
37
37
  }, [
38
38
  g(k, {
39
39
  name: e.name
40
40
  }, null, 8, ["name"]),
41
41
  r("code", null, h(e.name), 1)
42
- ], 10, I))), 128))
42
+ ], 10, D))), 128))
43
43
  ])
44
44
  ], 64));
45
45
  }
@@ -1,4 +1,4 @@
1
- import { I as a } from "./icon-svg-CeKfjk3j.js";
1
+ import { R as a } from "./icon-svg-DGp2yHJn.js";
2
2
  import "./_plugin-vue_export-helper-CHgC5LLL.js";
3
3
  export {
4
4
  a as default
@@ -1,4 +1,4 @@
1
- import { I as i } from "./icon-svg-CeKfjk3j.js";
1
+ import { R as i } from "./icon-svg-DGp2yHJn.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";
@@ -9,69 +9,71 @@ import R from "./switch.es.js";
9
9
  import p from "./radioButton.es.js";
10
10
  import { _ as s } from "./radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js";
11
11
  import c from "./dropdown.es.js";
12
- import d from "./datepicker.es.js";
13
- import f from "./quantitySelector.es.js";
12
+ import f from "./datepicker.es.js";
13
+ import d from "./quantitySelector.es.js";
14
14
  import l from "./toggle.es.js";
15
15
  import u from "./selectionChip.es.js";
16
- import b from "./tag.es.js";
17
- import T from "./accordionGroup.es.js";
16
+ import b from "./filterChip.es.js";
17
+ import T from "./tag.es.js";
18
+ import B from "./accordionGroup.es.js";
18
19
  import g from "./accordion.es.js";
19
- import B from "./divider.es.js";
20
- import A from "./card.es.js";
20
+ import A from "./divider.es.js";
21
+ import h from "./card.es.js";
21
22
  import x from "./tablepaginatedcomponent.es.js";
22
- import I from "./link.es.js";
23
- import w from "./breadcrumbs.es.js";
24
- import v from "./tabBar.es.js";
25
- import _ from "./pagination.es.js";
26
- import h from "./indicator.es.js";
27
- import y from "./persistentToast.es.js";
28
- import P from "./infoBox.es.js";
29
- import C from "./modal.es.js";
30
- import k from "./overlay.es.js";
23
+ import w from "./link.es.js";
24
+ import C from "./breadcrumbs.es.js";
25
+ import _ from "./tabBar.es.js";
26
+ import y from "./pagination.es.js";
27
+ import I from "./indicator.es.js";
28
+ import P from "./persistentToast.es.js";
29
+ import v from "./infoBox.es.js";
30
+ import k from "./modal.es.js";
31
+ import F from "./overlay.es.js";
31
32
  import G from "./tooltip.es.js";
32
- import F from "./sidebar.es.js";
33
- import M from "./sidedrawer.es.js";
33
+ import M from "./sidebar.es.js";
34
+ import O from "./sidedrawer.es.js";
34
35
  const t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
35
36
  __proto__: null,
36
37
  RDSAccordion: g,
37
- RDSAccordionGroup: T,
38
+ RDSAccordionGroup: B,
38
39
  RDSActionButton: m,
39
- RDSBreadcrumbs: w,
40
+ RDSBreadcrumbs: C,
40
41
  RDSButton: a,
41
- RDSCard: A,
42
+ RDSCard: h,
42
43
  RDSCheckbox: S,
43
- RDSDatePicker: d,
44
- RDSDivider: B,
44
+ RDSDatePicker: f,
45
+ RDSDivider: A,
45
46
  RDSDropdown: c,
47
+ RDSFilterChip: b,
46
48
  RDSFloatinActionButton: e,
47
49
  RDSIconSvg: i,
48
- RDSIndicator: h,
49
- RDSInfoBox: P,
50
- RDSLink: I,
51
- RDSModal: C,
52
- RDSOverlay: k,
53
- RDSPagination: _,
54
- RDSPersistentToast: y,
55
- RDSQuantitySelector: f,
50
+ RDSIndicator: I,
51
+ RDSInfoBox: v,
52
+ RDSLink: w,
53
+ RDSModal: k,
54
+ RDSOverlay: F,
55
+ RDSPagination: y,
56
+ RDSPersistentToast: P,
57
+ RDSQuantitySelector: d,
56
58
  RDSRadioButton: p,
57
59
  RDSRadioGroup: s,
58
60
  RDSSelectionChip: u,
59
- RDSSidebar: F,
60
- RDSSidedrawer: M,
61
+ RDSSidebar: M,
62
+ RDSSidedrawer: O,
61
63
  RDSSwitch: R,
62
- RDSTabBar: v,
64
+ RDSTabBar: _,
63
65
  RDSTable: x,
64
- RDSTag: b,
66
+ RDSTag: T,
65
67
  RDSTextArea: D,
66
68
  RDSTextField: n,
67
69
  RDSToggle: l,
68
70
  RDSTooltip: G
69
71
  }, Symbol.toStringTag, { value: "Module" }));
70
- let O;
71
- function uo(o) {
72
- O = o;
72
+ let j;
73
+ function To(o) {
74
+ j = o;
73
75
  }
74
- const bo = {
76
+ const Bo = {
75
77
  install: (o) => {
76
78
  for (const r in t)
77
79
  o.component(
@@ -82,39 +84,40 @@ const bo = {
82
84
  };
83
85
  export {
84
86
  g as RDSAccordion,
85
- T as RDSAccordionGroup,
87
+ B as RDSAccordionGroup,
86
88
  m as RDSActionButton,
87
- w as RDSBreadcrumbs,
89
+ C as RDSBreadcrumbs,
88
90
  a as RDSButton,
89
- A as RDSCard,
91
+ h as RDSCard,
90
92
  S as RDSCheckbox,
91
- d as RDSDatePicker,
92
- B as RDSDivider,
93
+ f as RDSDatePicker,
94
+ A as RDSDivider,
93
95
  c as RDSDropdown,
96
+ b as RDSFilterChip,
94
97
  e as RDSFloatinActionButton,
95
98
  i as RDSIconSvg,
96
- h as RDSIndicator,
97
- P as RDSInfoBox,
98
- I as RDSLink,
99
- C as RDSModal,
100
- k as RDSOverlay,
101
- _ as RDSPagination,
102
- y as RDSPersistentToast,
103
- f as RDSQuantitySelector,
99
+ I as RDSIndicator,
100
+ v as RDSInfoBox,
101
+ w as RDSLink,
102
+ k as RDSModal,
103
+ F as RDSOverlay,
104
+ y as RDSPagination,
105
+ P as RDSPersistentToast,
106
+ d as RDSQuantitySelector,
104
107
  p as RDSRadioButton,
105
108
  s as RDSRadioGroup,
106
109
  u as RDSSelectionChip,
107
- F as RDSSidebar,
108
- M as RDSSidedrawer,
110
+ M as RDSSidebar,
111
+ O as RDSSidedrawer,
109
112
  R as RDSSwitch,
110
- v as RDSTabBar,
113
+ _ as RDSTabBar,
111
114
  x as RDSTable,
112
- b as RDSTag,
115
+ T as RDSTag,
113
116
  D as RDSTextArea,
114
117
  n as RDSTextField,
115
118
  l as RDSToggle,
116
119
  G as RDSTooltip,
117
- O as VueInstance,
118
- bo as default,
119
- uo as setVueInstance
120
+ j as VueInstance,
121
+ Bo as default,
122
+ To as setVueInstance
120
123
  };
@@ -1,19 +1,28 @@
1
- import { defineComponent as y, ref as d, toRefs as h, computed as k, watch as w, nextTick as C, openBlock as t, createElementBlock as s, normalizeClass as m, createElementVNode as a, createVNode as _, createCommentVNode as o, toDisplayString as i } from "vue";
2
- import { I as b } from "./icon-svg-CeKfjk3j.js";
3
- import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/infoBox.css';const q = { class: "alert" }, $ = {
1
+ import { defineComponent as k, ref as u, toRefs as h, computed as $, watch as w, nextTick as S, openBlock as t, createElementBlock as s, normalizeClass as m, createElementVNode as a, createVNode as b, createCommentVNode as o, toDisplayString as r, renderSlot as _ } from "vue";
2
+ import { R as v } from "./icon-svg-DGp2yHJn.js";
3
+ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/infoBox.css';const q = { class: "alert" }, B = {
5
5
  key: 0,
6
6
  class: "rds-e-info-box__custom-icon-block"
7
- }, B = { class: "rds-e-info-box__wrapper" }, H = { class: "rds-e-info-box__title__wrapper" }, I = {
7
+ }, H = { class: "rds-e-info-box__wrapper" }, N = { class: "rds-e-info-box__title__wrapper" }, R = {
8
8
  key: 0,
9
9
  class: "rds-e-info-box__title rds-mb-03"
10
- }, N = {
10
+ }, V = {
11
11
  key: 0,
12
12
  class: "rds-e-info-box__title rds-mb-03"
13
- }, V = {
13
+ }, D = {
14
14
  key: 2,
15
15
  class: "rds-e-info-box__text"
16
- }, E = { class: "rds-e-info-box__text" }, z = /* @__PURE__ */ y({
16
+ }, E = {
17
+ key: 3,
18
+ class: "rds-e-info-box__content-section"
19
+ }, I = {
20
+ key: 0,
21
+ class: "rds-e-info-box__text"
22
+ }, z = {
23
+ key: 1,
24
+ class: "rds-e-info-box__content-section"
25
+ }, O = /* @__PURE__ */ k({
17
26
  __name: "info-box",
18
27
  props: {
19
28
  /**
@@ -82,63 +91,69 @@ import './style/infoBox.css';const q = { class: "alert" }, $ = {
82
91
  }
83
92
  },
84
93
  setup(e) {
85
- const v = e, n = d(!1), r = d(null), c = d(null), { type: l } = h(v), x = k(
86
- () => `rds-e-info-box rds-mb-03 rds-e-info-box${l.value === "success" ? "--success" : ""}${l.value === "error" ? "--error" : ""}${l.value === "warning" ? "--warning" : ""}${l.value === "info" ? "--info" : ""}`
94
+ const x = e, l = u(!1), c = u(null), d = u(null), { type: i } = h(x), y = $(
95
+ () => `rds-e-info-box rds-mb-03 rds-e-info-box${i.value === "success" ? "--success" : ""}${i.value === "error" ? "--error" : ""}${i.value === "warning" ? "--warning" : ""}${i.value === "info" ? "--info" : ""}`
87
96
  ), g = () => {
88
- if (!r.value || !c.value) return;
89
- const u = c.value.scrollHeight;
90
- r.value.style.maxHeight = n.value ? `${u}px` : "0px";
97
+ if (!c.value || !d.value) return;
98
+ const n = d.value.scrollHeight;
99
+ c.value.style.maxHeight = l.value ? `${n}px` : "0px";
91
100
  };
92
101
  w(
93
- () => n.value,
94
- () => C(() => {
102
+ () => l.value,
103
+ () => S(() => {
95
104
  g();
96
105
  }),
97
106
  { immediate: !0 }
98
107
  );
99
108
  const p = () => {
100
- n.value = !n.value;
109
+ l.value = !l.value;
101
110
  };
102
- return (u, f) => (t(), s("div", {
103
- class: m(x.value),
111
+ return (n, f) => (t(), s("div", {
112
+ class: m(y.value),
104
113
  role: "alert"
105
114
  }, [
106
115
  a("div", q, [
107
- e.icon ? (t(), s("div", $, [
108
- _(b, {
116
+ e.icon ? (t(), s("div", B, [
117
+ b(v, {
109
118
  name: e.icon,
110
119
  class: "rds-e-info-box__custom-icon",
111
120
  "aria-hidden": "true"
112
121
  }, null, 8, ["name"])
113
122
  ])) : o("", !0),
114
- a("div", B, [
115
- a("div", H, [
116
- e.title && !e.collapsable ? (t(), s("div", I, i(e.title), 1)) : o("", !0),
123
+ a("div", H, [
124
+ a("div", N, [
125
+ e.title && !e.collapsable ? (t(), s("div", R, r(e.title), 1)) : o("", !0),
117
126
  e.collapsable ? (t(), s("div", {
118
127
  key: 1,
119
128
  class: "rds-e-info-box__collapsable rds-mb-03",
120
129
  onClick: f[0] || (f[0] = () => p())
121
130
  }, [
122
- e.title ? (t(), s("div", N, i(e.title), 1)) : o("", !0),
123
- _(b, {
131
+ e.title ? (t(), s("div", V, r(e.title), 1)) : o("", !0),
132
+ b(v, {
124
133
  name: "arrow_down",
125
- class: m(["rds-e-info-box__custom-icon", { "rds-e-info-box__custom-icon--open": n.value }]),
134
+ class: m(["rds-e-info-box__custom-icon", { "rds-e-info-box__custom-icon--open": l.value }]),
126
135
  "aria-hidden": "true"
127
136
  }, null, 8, ["class"])
128
137
  ])) : o("", !0),
129
- e.message && !e.collapsable ? (t(), s("p", V, i(e.message), 1)) : o("", !0),
138
+ e.message && !e.collapsable && !n.$slots["content-section"] ? (t(), s("p", D, r(e.message), 1)) : o("", !0),
139
+ n.$slots["content-section"] && !e.collapsable ? (t(), s("div", E, [
140
+ _(n.$slots, "content-section", {}, void 0, !0)
141
+ ])) : o("", !0),
130
142
  e.collapsable ? (t(), s("div", {
131
- key: 3,
143
+ key: 4,
132
144
  ref_key: "panel",
133
- ref: r,
145
+ ref: c,
134
146
  class: "rds-e-info-box__panel"
135
147
  }, [
136
148
  a("div", {
137
149
  ref_key: "panelContent",
138
- ref: c,
150
+ ref: d,
139
151
  class: "rds-e-info-box__panel-content"
140
152
  }, [
141
- a("p", E, i(e.message), 1)
153
+ n.$slots["content-section"] ? o("", !0) : (t(), s("p", I, r(e.message), 1)),
154
+ n.$slots["content-section"] ? (t(), s("div", z, [
155
+ _(n.$slots, "content-section", {}, void 0, !0)
156
+ ])) : o("", !0)
142
157
  ], 512)
143
158
  ], 512)) : o("", !0)
144
159
  ])
@@ -146,7 +161,7 @@ import './style/infoBox.css';const q = { class: "alert" }, $ = {
146
161
  ])
147
162
  ], 2));
148
163
  }
149
- }), T = /* @__PURE__ */ S(z, [["__scopeId", "data-v-0a87bf57"]]);
164
+ }), F = /* @__PURE__ */ C(O, [["__scopeId", "data-v-39ef726d"]]);
150
165
  export {
151
- T as default
166
+ F as default
152
167
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as E, toRefs as L, computed as f, openBlock as r, createBlock as d, resolveDynamicComponent as N, unref as e, normalizeClass as m, withCtx as R, mergeProps as _, createCommentVNode as i, createElementBlock as b, renderSlot as B, createTextVNode as S, toDisplayString as I } from "vue";
2
- import { I as k } from "./icon-svg-CeKfjk3j.js";
1
+ import { defineComponent as j, toRefs as E, computed as f, openBlock as r, createBlock as d, resolveDynamicComponent as L, unref as e, normalizeClass as m, withCtx as N, mergeProps as _, createCommentVNode as i, createElementBlock as S, renderSlot as b, createTextVNode as B, toDisplayString as I } from "vue";
2
+ import { R as k } from "./icon-svg-DGp2yHJn.js";
3
3
  import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/link.css';const $ = /* @__PURE__ */ E({
4
+ import './style/link.css';const $ = /* @__PURE__ */ j({
5
5
  __name: "link",
6
6
  props: {
7
7
  /**
@@ -86,8 +86,8 @@ import './style/link.css';const $ = /* @__PURE__ */ E({
86
86
  arrow: u,
87
87
  right: t,
88
88
  underline: h,
89
- customClass: j
90
- } = L(v), D = f(() => {
89
+ customClass: D
90
+ } = E(v), R = f(() => {
91
91
  var l, C;
92
92
  const a = ["rds-e-link"];
93
93
  return p.value && a.push("rds-e-link--inverse"), h.value && a.push("rds-e-link--underline"), c.value && a.push("rds-e-style-state-disabled"), ((l = n == null ? void 0 : n.value) == null ? void 0 : l.name) !== "arrow" && a.push("link"), ((C = n == null ? void 0 : n.value) == null ? void 0 : C.name) !== "arrow" && p.value && a.push("link__icon--inverse"), a.join(" ");
@@ -101,13 +101,13 @@ import './style/link.css';const $ = /* @__PURE__ */ E({
101
101
  var a;
102
102
  return u.value || ((a = n == null ? void 0 : n.value) == null ? void 0 : a.name);
103
103
  });
104
- return (a, l) => (r(), d(N(e(o) === "a" ? e(o) : "router-link"), {
105
- class: m(D.value),
104
+ return (a, l) => (r(), d(L(e(o) === "a" ? e(o) : "router-link"), {
105
+ class: m(R.value),
106
106
  to: e(o) === "router-link" ? e(g) : null,
107
107
  href: e(o) === "a" ? e(g) : null,
108
108
  disable: e(c)
109
109
  }, {
110
- default: R(() => [
110
+ default: N(() => [
111
111
  e(n).name && !e(t) && !e(u) ? (r(), d(k, _({
112
112
  key: 0,
113
113
  name: e(n).name
@@ -116,15 +116,15 @@ import './style/link.css';const $ = /* @__PURE__ */ E({
116
116
  }, {
117
117
  class: ["rds-e-link__icon-left", w.value]
118
118
  }), null, 16, ["name", "class"])) : i("", !0),
119
- e(t) ? (r(), b("span", {
119
+ e(t) ? (r(), S("span", {
120
120
  key: 1,
121
- class: m(["rds-e-link__text", [e(j), {
121
+ class: m(["rds-e-link__text", [e(D), {
122
122
  "rds-e-mr-xs": x.value,
123
123
  "rds-e-link__text--underline": e(h)
124
124
  }]])
125
125
  }, [
126
- B(a.$slots, "default", {}, () => [
127
- S(I(e(y)), 1)
126
+ b(a.$slots, "default", {}, () => [
127
+ B(I(e(y)), 1)
128
128
  ], !0)
129
129
  ], 2)) : i("", !0),
130
130
  e(u) ? (r(), d(k, _({ key: 2 }, {
@@ -134,12 +134,12 @@ import './style/link.css';const $ = /* @__PURE__ */ E({
134
134
  e(t) ? "link__icon--animation-right" : "link__icon--animation-left"
135
135
  ]]
136
136
  }), null, 16, ["class"])) : i("", !0),
137
- e(t) ? i("", !0) : (r(), b("span", {
137
+ e(t) ? i("", !0) : (r(), S("span", {
138
138
  key: 3,
139
139
  class: m(["rds-e-link__text", { "rds-e-ml-xs": x.value }])
140
140
  }, [
141
- B(a.$slots, "default", {}, () => [
142
- S(I(e(y)), 1)
141
+ b(a.$slots, "default", {}, () => [
142
+ B(I(e(y)), 1)
143
143
  ], !0)
144
144
  ], 2)),
145
145
  e(n).name && e(t) && !e(u) ? (r(), d(k, _({
@@ -1,15 +1,15 @@
1
- import { defineComponent as h, ref as C, computed as v, openBlock as r, createBlock as m, unref as a, withCtx as u, createVNode as k, normalizeStyle as b, withModifiers as w, createElementVNode as d, renderSlot as n, createCommentVNode as l, createElementBlock as c } from "vue";
2
- import x from "./overlay.es.js";
1
+ import { defineComponent as C, ref as R, computed as k, openBlock as d, createBlock as u, unref as a, withCtx as p, createVNode as v, normalizeStyle as b, withModifiers as g, createElementVNode as l, renderSlot as i, createCommentVNode as n, createElementBlock as c } from "vue";
2
+ import w from "./overlay.es.js";
3
3
  import S from "./card.es.js";
4
- import { I as $ } from "./icon-svg-CeKfjk3j.js";
5
- import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = { class: "rds-e-modal__header" }, W = {
4
+ import { R as q } from "./icon-svg-DGp2yHJn.js";
5
+ import { _ as x } 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 = {
7
7
  key: 0,
8
8
  class: "rds-e-modal__section-spacer"
9
- }, g = { class: "rds-e-modal__body" }, q = {
9
+ }, M = { class: "rds-e-modal__body" }, N = {
10
10
  key: 1,
11
11
  class: "rds-e-modal__section-spacer"
12
- }, I = { class: "rds-e-modal__footer" }, V = /* @__PURE__ */ h({
12
+ }, W = { class: "rds-e-modal__footer" }, D = /* @__PURE__ */ C({
13
13
  __name: "modal",
14
14
  props: {
15
15
  /**
@@ -48,7 +48,7 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
48
48
  maxWidth: {
49
49
  type: [String, Number],
50
50
  default: 820,
51
- validator: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
51
+ validator: (o) => typeof o == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(o)
52
52
  },
53
53
  /**
54
54
  * Ancho del modal en dispositivos de escritorio.
@@ -56,54 +56,84 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
56
56
  width: {
57
57
  type: [String, Number],
58
58
  default: 600,
59
- validator: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
59
+ validator: (o) => typeof o == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(o)
60
60
  }
61
61
  },
62
- emits: ["onCloseRequest"],
63
- setup(t, { emit: p }) {
64
- const e = t, i = p, f = C(null), _ = v(() => {
65
- const o = typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth, s = typeof e.width == "number" ? `${e.width}px` : e.width;
62
+ emits: ["onCloseRequest", "onOpenRequest", "onToggleRequest"],
63
+ setup(o, { expose: f, emit: _ }) {
64
+ const e = o, s = _, y = R(null), h = k(() => {
65
+ const t = typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth, r = typeof e.width == "number" ? `${e.width}px` : e.width;
66
66
  return {
67
- "--rds-modal-max-width": o,
68
- "--rds-modal-width": s
67
+ "--rds-modal-max-width": t,
68
+ "--rds-modal-width": r
69
69
  };
70
- }), y = () => {
71
- e.preventClose || i("onCloseRequest");
70
+ }), m = () => {
71
+ e.preventClose || s("onCloseRequest");
72
72
  };
73
- return (o, s) => t.open ? (r(), m(a(x), {
73
+ return f({
74
+ /**
75
+ * { () => void } Gestiona el clic fuera del modal.
76
+ */
77
+ modalClickOutside: () => m(),
78
+ /**
79
+ * { () => void } Solicita abrir el modal.
80
+ */
81
+ openModal: () => {
82
+ s("onOpenRequest");
83
+ },
84
+ /**
85
+ * { () => void } Solicita cerrar el modal.
86
+ */
87
+ closeModal: () => {
88
+ s("onCloseRequest");
89
+ },
90
+ /**
91
+ * { (state: boolean) => void } Cambia el estado del modal.
92
+ * @param {boolean} state - true para abrir, false para cerrar
93
+ */
94
+ changeModalState: (t) => {
95
+ s(t ? "onOpenRequest" : "onCloseRequest");
96
+ },
97
+ /**
98
+ * { () => void } Alterna el estado del modal.
99
+ */
100
+ toggleModal: () => {
101
+ s("onToggleRequest");
102
+ }
103
+ }), (t, r) => o.open ? (d(), u(a(w), {
74
104
  key: 0,
75
105
  ref_key: "overlay",
76
- ref: f,
106
+ ref: y,
77
107
  class: "rds-e-modal__overlay",
78
108
  teleport: e.teleport,
79
- onClick: y
109
+ onClick: m
80
110
  }, {
81
- default: u(() => [
82
- k(a(S), {
111
+ default: p(() => [
112
+ v(a(S), {
83
113
  class: "rds-e-modal__card",
84
- style: b(_.value),
85
- onClick: s[1] || (s[1] = w(() => {
114
+ style: b(h.value),
115
+ onClick: r[1] || (r[1] = g(() => {
86
116
  }, ["stop"]))
87
117
  }, {
88
- default: u(() => [
89
- d("div", N, [
90
- d("div", R, [
91
- n(o.$slots, "header", {}, void 0, !0),
92
- e.showClose ? (r(), m(a($), {
118
+ default: p(() => [
119
+ l("div", $, [
120
+ l("div", B, [
121
+ i(t.$slots, "header", {}, void 0, !0),
122
+ e.showClose ? (d(), u(a(q), {
93
123
  key: 0,
94
124
  class: "rds-e-modal__header-close",
95
125
  name: "close",
96
126
  small: "",
97
- onClick: s[0] || (s[0] = () => i("onCloseRequest"))
98
- })) : l("", !0)
127
+ onClick: r[0] || (r[0] = () => s("onCloseRequest"))
128
+ })) : n("", !0)
99
129
  ]),
100
- o.$slots.body ? (r(), c("span", W)) : l("", !0),
101
- d("div", g, [
102
- n(o.$slots, "body", {}, void 0, !0)
130
+ t.$slots.body ? (d(), c("span", O)) : n("", !0),
131
+ l("div", M, [
132
+ i(t.$slots, "body", {}, void 0, !0)
103
133
  ]),
104
- o.$slots.footer ? (r(), c("span", q)) : l("", !0),
105
- d("div", I, [
106
- n(o.$slots, "footer", {}, void 0, !0)
134
+ t.$slots.footer ? (d(), c("span", N)) : n("", !0),
135
+ l("div", W, [
136
+ i(t.$slots, "footer", {}, void 0, !0)
107
137
  ])
108
138
  ])
109
139
  ]),
@@ -111,9 +141,9 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
111
141
  }, 8, ["style"])
112
142
  ]),
113
143
  _: 3
114
- }, 8, ["teleport"])) : l("", !0);
144
+ }, 8, ["teleport"])) : n("", !0);
115
145
  }
116
- }), j = /* @__PURE__ */ B(V, [["__scopeId", "data-v-24bc0adc"]]);
146
+ }), j = /* @__PURE__ */ x(D, [["__scopeId", "data-v-2dbe0d23"]]);
117
147
  export {
118
148
  j as default
119
149
  };