energy-components 1.0.4 → 1.1.2-beta.1

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 (52) hide show
  1. package/dist/components/getInstance-GhoEcxLF.js +21 -0
  2. package/dist/components/index.es.js +25 -22
  3. package/dist/components/infoBox.es.js +4 -4
  4. package/dist/components/link.es.js +41 -33
  5. package/dist/components/modal.es.js +60 -39
  6. package/dist/components/persistentToast.es.js +4 -4
  7. package/dist/components/radioButton.es.js +43 -59
  8. package/dist/components/sidebar.es.js +102 -0
  9. package/dist/components/style/accordion.css +1 -1
  10. package/dist/components/style/accordionGroup.css +1 -1
  11. package/dist/components/style/actionButton.css +1 -1
  12. package/dist/components/style/breadcrumbs.css +1 -1
  13. package/dist/components/style/button.css +1 -1
  14. package/dist/components/style/card.css +1 -1
  15. package/dist/components/style/checkbox.css +1 -1
  16. package/dist/components/style/datepicker.css +1 -1
  17. package/dist/components/style/divider.css +1 -1
  18. package/dist/components/style/dropdown.css +1 -1
  19. package/dist/components/style/floatingActionButton.css +1 -1
  20. package/dist/components/style/icon-svg.css +1 -1
  21. package/dist/components/style/iconList.css +1 -1
  22. package/dist/components/style/indicator.css +1 -1
  23. package/dist/components/style/infoBox.css +1 -1
  24. package/dist/components/style/link.css +1 -1
  25. package/dist/components/style/modal.css +1 -1
  26. package/dist/components/style/multiselect.css +1 -1
  27. package/dist/components/style/overlay.css +1 -1
  28. package/dist/components/style/pagination.css +1 -1
  29. package/dist/components/style/persistentToast.css +1 -1
  30. package/dist/components/style/radioButton.css +1 -1
  31. package/dist/components/style/sidebar.css +1 -0
  32. package/dist/components/style/switch.css +1 -1
  33. package/dist/components/style/tabBar.css +1 -1
  34. package/dist/components/style/tag.css +1 -1
  35. package/dist/components/style/textArea.css +1 -1
  36. package/dist/components/style/textField.css +1 -1
  37. package/dist/components/style/tooltip.css +1 -1
  38. package/dist/components/textField.es.js +58 -59
  39. package/dist/components/tooltip.es.js +34 -33
  40. package/dist/composables/index.es.js +37 -0
  41. package/dist/energy-components.es.js +2847 -2720
  42. package/dist/energy-components.umd.js +1 -1
  43. package/dist/style.css +1 -1
  44. package/dist/types/src/components/index.d.ts +1 -0
  45. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +4 -7
  46. package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +49 -0
  47. package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
  48. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +34 -2
  49. package/dist/types/src/composables/breakpoints.d.ts +5 -0
  50. package/dist/types/src/composables/index.d.ts +1 -0
  51. package/dist/types/tsconfig.tsbuildinfo +1 -1
  52. package/package.json +7 -3
@@ -0,0 +1,21 @@
1
+ import { getCurrentInstance as s } from "vue";
2
+ function o(e) {
3
+ const t = s();
4
+ if (!t)
5
+ throw new Error(`[energy-components] ${e} must be called from inside a setup function`);
6
+ return t;
7
+ }
8
+ let r = 0, n = /* @__PURE__ */ new WeakMap();
9
+ function a() {
10
+ const e = o("getUid");
11
+ if (n.has(e))
12
+ return n.get(e);
13
+ const t = r++;
14
+ return n.set(e, t), t;
15
+ }
16
+ a.reset = () => {
17
+ r = 0, n = /* @__PURE__ */ new WeakMap();
18
+ };
19
+ export {
20
+ a as g
21
+ };
@@ -7,15 +7,15 @@ import e from "./textField.es.js";
7
7
  import D from "./textArea.es.js";
8
8
  import R from "./switch.es.js";
9
9
  import p from "./radioButton.es.js";
10
- import { _ as c } from "./radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js";
11
- import s from "./dropdown.es.js";
10
+ import { _ as s } from "./radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js";
11
+ import c from "./dropdown.es.js";
12
12
  import f from "./datepicker.es.js";
13
13
  import d from "./tag.es.js";
14
14
  import u from "./accordionGroup.es.js";
15
15
  import l from "./accordion.es.js";
16
- import B from "./divider.es.js";
17
- import T from "./card.es.js";
18
- import b from "./link.es.js";
16
+ import b from "./divider.es.js";
17
+ import B from "./card.es.js";
18
+ import T from "./link.es.js";
19
19
  import A from "./breadcrumbs.es.js";
20
20
  import g from "./tabBar.es.js";
21
21
  import x from "./pagination.es.js";
@@ -25,6 +25,7 @@ import _ from "./infoBox.es.js";
25
25
  import P from "./modal.es.js";
26
26
  import w from "./overlay.es.js";
27
27
  import k from "./tooltip.es.js";
28
+ import G from "./sidebar.es.js";
28
29
  const t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29
30
  __proto__: null,
30
31
  RDSAccordion: l,
@@ -32,22 +33,23 @@ const t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32
33
  RDSActionButton: n,
33
34
  RDSBreadcrumbs: A,
34
35
  RDSButton: a,
35
- RDSCard: T,
36
+ RDSCard: B,
36
37
  RDSCheckbox: S,
37
38
  RDSDatePicker: f,
38
- RDSDivider: B,
39
- RDSDropdown: s,
39
+ RDSDivider: b,
40
+ RDSDropdown: c,
40
41
  RDSFloatinActionButton: m,
41
42
  RDSIconSvg: i,
42
43
  RDSIndicator: I,
43
44
  RDSInfoBox: _,
44
- RDSLink: b,
45
+ RDSLink: T,
45
46
  RDSModal: P,
46
47
  RDSOverlay: w,
47
48
  RDSPagination: x,
48
49
  RDSPersistentToast: v,
49
50
  RDSRadioButton: p,
50
- RDSRadioGroup: c,
51
+ RDSRadioGroup: s,
52
+ RDSSidebar: G,
51
53
  RDSSwitch: R,
52
54
  RDSTabBar: g,
53
55
  RDSTag: d,
@@ -55,11 +57,11 @@ const t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
55
57
  RDSTextField: e,
56
58
  RDSTooltip: k
57
59
  }, Symbol.toStringTag, { value: "Module" }));
58
- let G;
59
- function ao(o) {
60
- G = o;
60
+ let h;
61
+ function no(o) {
62
+ h = o;
61
63
  }
62
- const mo = {
64
+ const So = {
63
65
  install: (o) => {
64
66
  for (const r in t)
65
67
  o.component(
@@ -74,29 +76,30 @@ export {
74
76
  n as RDSActionButton,
75
77
  A as RDSBreadcrumbs,
76
78
  a as RDSButton,
77
- T as RDSCard,
79
+ B as RDSCard,
78
80
  S as RDSCheckbox,
79
81
  f as RDSDatePicker,
80
- B as RDSDivider,
81
- s as RDSDropdown,
82
+ b as RDSDivider,
83
+ c as RDSDropdown,
82
84
  m as RDSFloatinActionButton,
83
85
  i as RDSIconSvg,
84
86
  I as RDSIndicator,
85
87
  _ as RDSInfoBox,
86
- b as RDSLink,
88
+ T as RDSLink,
87
89
  P as RDSModal,
88
90
  w as RDSOverlay,
89
91
  x as RDSPagination,
90
92
  v as RDSPersistentToast,
91
93
  p as RDSRadioButton,
92
- c as RDSRadioGroup,
94
+ s as RDSRadioGroup,
95
+ G as RDSSidebar,
93
96
  R as RDSSwitch,
94
97
  g as RDSTabBar,
95
98
  d as RDSTag,
96
99
  D as RDSTextArea,
97
100
  e as RDSTextField,
98
101
  k as RDSTooltip,
99
- G as VueInstance,
100
- mo as default,
101
- ao as setVueInstance
102
+ h as VueInstance,
103
+ So as default,
104
+ no as setVueInstance
102
105
  };
@@ -1,7 +1,7 @@
1
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
2
  import { I as b } from "./icon-svg-CEZ-L3iv.js";
3
3
  import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/infoBox.css';const q = { class: "max-layout alert" }, $ = {
4
+ import './style/infoBox.css';const q = { class: "alert" }, $ = {
5
5
  key: 0,
6
6
  class: "rds-e-info-box__custom-icon-block"
7
7
  }, B = { class: "rds-e-info-box__wrapper" }, H = { class: "rds-e-info-box__title__wrapper" }, I = {
@@ -82,7 +82,7 @@ import './style/infoBox.css';const q = { class: "max-layout alert" }, $ = {
82
82
  }
83
83
  },
84
84
  setup(e) {
85
- const x = e, n = d(!1), r = d(null), c = d(null), { type: l } = h(x), v = k(
85
+ const v = e, n = d(!1), r = d(null), c = d(null), { type: l } = h(v), x = k(
86
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" : ""}`
87
87
  ), g = () => {
88
88
  if (!r.value || !c.value) return;
@@ -100,7 +100,7 @@ import './style/infoBox.css';const q = { class: "max-layout alert" }, $ = {
100
100
  n.value = !n.value;
101
101
  };
102
102
  return (u, f) => (t(), s("div", {
103
- class: m(v.value),
103
+ class: m(x.value),
104
104
  role: "alert"
105
105
  }, [
106
106
  a("div", q, [
@@ -146,7 +146,7 @@ import './style/infoBox.css';const q = { class: "max-layout alert" }, $ = {
146
146
  ])
147
147
  ], 2));
148
148
  }
149
- }), T = /* @__PURE__ */ S(z, [["__scopeId", "data-v-4a206548"]]);
149
+ }), T = /* @__PURE__ */ S(z, [["__scopeId", "data-v-0a87bf57"]]);
150
150
  export {
151
151
  T as default
152
152
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as D, toRefs as E, computed as f, openBlock as l, createBlock as d, resolveDynamicComponent as L, unref as e, normalizeClass as m, withCtx as N, mergeProps as _, createCommentVNode as i, createElementBlock as B, renderSlot as C, createTextVNode as S, toDisplayString as I } from "vue";
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
2
  import { I as k } from "./icon-svg-CEZ-L3iv.js";
3
- import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/link.css';const V = /* @__PURE__ */ D({
3
+ import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/link.css';const $ = /* @__PURE__ */ E({
5
5
  __name: "link",
6
6
  props: {
7
7
  /**
@@ -67,81 +67,89 @@ import './style/link.css';const V = /* @__PURE__ */ D({
67
67
  right: {
68
68
  type: Boolean,
69
69
  default: !0
70
+ },
71
+ /**
72
+ * <span>Clase personalizada que se aplica solo al elemento (span) que contiene el texto del enlace.</span>
73
+ */
74
+ customClass: {
75
+ type: String,
76
+ default: ""
70
77
  }
71
78
  },
72
79
  setup(s) {
73
80
  const v = s, {
74
81
  text: y,
75
82
  to: g,
76
- icon: n,
83
+ icon: a,
77
84
  tag: o,
78
85
  disabled: p,
79
86
  inverse: c,
80
87
  arrow: u,
81
88
  right: t,
82
- underline: h
83
- } = E(v), j = f(() => {
84
- var r, b;
85
- const a = ["rds-e-link"];
86
- return c.value && a.push("rds-e-link--inverse"), h.value && a.push("rds-e-link--underline"), p.value && a.push("rds-e-style-state-disabled"), ((r = n == null ? void 0 : n.value) == null ? void 0 : r.name) !== "arrow" && a.push("link"), ((b = n == null ? void 0 : n.value) == null ? void 0 : b.name) !== "arrow" && c.value && a.push("link__icon--inverse"), a.join(" ");
89
+ underline: h,
90
+ customClass: j
91
+ } = L(v), D = f(() => {
92
+ var l, C;
93
+ const n = ["rds-e-link"];
94
+ return c.value && n.push("rds-e-link--inverse"), h.value && n.push("rds-e-link--underline"), p.value && n.push("rds-e-style-state-disabled"), ((l = a == null ? void 0 : a.value) == null ? void 0 : l.name) !== "arrow" && n.push("link"), ((C = a == null ? void 0 : a.value) == null ? void 0 : C.name) !== "arrow" && c.value && n.push("link__icon--inverse"), n.join(" ");
87
95
  }), w = f(() => {
88
- var r;
89
- const a = ["link__icon--arrow"];
90
- return n != null && n.value && (a.push("link__icon"), p.value && a.push("link__icon--disabled")), ((r = n == null ? void 0 : n.value) == null ? void 0 : r.name) !== "arrow" && c.value && a.push("link__icon--inverse"), a.push(
96
+ var l;
97
+ const n = ["link__icon--arrow"];
98
+ return a != null && a.value && (n.push("link__icon"), p.value && n.push("link__icon--disabled")), ((l = a == null ? void 0 : a.value) == null ? void 0 : l.name) !== "arrow" && c.value && n.push("link__icon--inverse"), n.push(
91
99
  t.value ? "link__icon--animation-right" : "link__icon--animation-left"
92
- ), a.join(" ");
100
+ ), n.join(" ");
93
101
  }), x = f(() => {
94
- var a;
95
- return u.value || ((a = n == null ? void 0 : n.value) == null ? void 0 : a.name);
102
+ var n;
103
+ return u.value || ((n = a == null ? void 0 : a.value) == null ? void 0 : n.name);
96
104
  });
97
- return (a, r) => (l(), d(L(e(o) === "a" ? e(o) : "router-link"), {
98
- class: m(j.value),
105
+ return (n, l) => (r(), d(N(e(o) === "a" ? e(o) : "router-link"), {
106
+ class: m(D.value),
99
107
  to: e(o) === "router-link" ? e(g) : null,
100
108
  href: e(o) === "a" ? e(g) : null,
101
109
  disable: e(p)
102
110
  }, {
103
- default: N(() => [
104
- e(n).name && !e(t) && !e(u) ? (l(), d(k, _({
111
+ default: R(() => [
112
+ e(a).name && !e(t) && !e(u) ? (r(), d(k, _({
105
113
  key: 0,
106
- name: e(n).name
114
+ name: e(a).name
107
115
  }, {
108
- ...e(n)
116
+ ...e(a)
109
117
  }, { class: w.value }), null, 16, ["name", "class"])) : i("", !0),
110
- e(t) ? (l(), B("span", {
118
+ e(t) ? (r(), b("span", {
111
119
  key: 1,
112
- class: m(["rds-e-link__text", {
120
+ class: m(["rds-e-link__text", [e(j), {
113
121
  "rds-e-mr-xs": x.value,
114
122
  "rds-e-link__text--underline": e(h)
115
- }])
123
+ }]])
116
124
  }, [
117
- C(a.$slots, "default", {}, () => [
125
+ B(n.$slots, "default", {}, () => [
118
126
  S(I(e(y)), 1)
119
127
  ], !0)
120
128
  ], 2)) : i("", !0),
121
- e(u) ? (l(), d(k, _({ key: 2 }, {
129
+ e(u) ? (r(), d(k, _({ key: 2 }, {
122
130
  name: e(t) ? "arrow_right" : "arrow_left"
123
131
  }, {
124
132
  class: ["link__icon--arrow", [
125
133
  e(t) ? "link__icon--animation-right" : "link__icon--animation-left"
126
134
  ]]
127
135
  }), null, 16, ["class"])) : i("", !0),
128
- e(t) ? i("", !0) : (l(), B("span", {
136
+ e(t) ? i("", !0) : (r(), b("span", {
129
137
  key: 3,
130
138
  class: m(["rds-e-link__text", { "rds-e-ml-xs": x.value }])
131
139
  }, [
132
- C(a.$slots, "default", {}, () => [
140
+ B(n.$slots, "default", {}, () => [
133
141
  S(I(e(y)), 1)
134
142
  ], !0)
135
143
  ], 2)),
136
- e(n).name && e(t) && !e(u) ? (l(), d(k, _({
144
+ e(a).name && e(t) && !e(u) ? (r(), d(k, _({
137
145
  key: 4,
138
- name: e(n).name
139
- }, e(n), { class: w.value }), null, 16, ["name", "class"])) : i("", !0)
146
+ name: e(a).name
147
+ }, e(a), { class: w.value }), null, 16, ["name", "class"])) : i("", !0)
140
148
  ]),
141
149
  _: 3
142
150
  }, 8, ["class", "to", "href", "disable"]));
143
151
  }
144
- }), M = /* @__PURE__ */ R(V, [["__scopeId", "data-v-2e064780"]]);
152
+ }), O = /* @__PURE__ */ V($, [["__scopeId", "data-v-1ba45da8"]]);
145
153
  export {
146
- M as default
154
+ O as default
147
155
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as v, ref as y, onMounted as C, openBlock as o, createBlock as m, unref as l, withCtx as p, createVNode as h, createElementVNode as t, renderSlot as a, createCommentVNode as s, createElementBlock as u } from "vue";
2
- import k from "./overlay.es.js";
3
- import B from "./card.es.js";
4
- import { I as b } from "./icon-svg-CEZ-L3iv.js";
5
- import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import './style/modal.css';const S = { class: "rds-e-modal__container" }, $ = { class: "rds-e-modal__header" }, q = {
1
+ import { defineComponent as h, ref as v, computed as C, openBlock as r, createBlock as i, unref as a, withCtx as c, createVNode as k, normalizeStyle as b, createElementVNode as d, renderSlot as n, createCommentVNode as l, createElementBlock as p } from "vue";
2
+ import w from "./overlay.es.js";
3
+ import x from "./card.es.js";
4
+ import { I as S } from "./icon-svg-CEZ-L3iv.js";
5
+ import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import './style/modal.css';const B = { class: "rds-e-modal__container" }, N = { class: "rds-e-modal__header" }, R = {
7
7
  key: 0,
8
8
  class: "rds-e-modal__section-spacer"
9
- }, w = { class: "rds-e-modal__body" }, E = {
9
+ }, W = { class: "rds-e-modal__body" }, g = {
10
10
  key: 1,
11
11
  class: "rds-e-modal__section-spacer"
12
- }, I = { class: "rds-e-modal__footer" }, N = /* @__PURE__ */ v({
12
+ }, q = { class: "rds-e-modal__footer" }, I = /* @__PURE__ */ h({
13
13
  __name: "modal",
14
14
  props: {
15
15
  /**
@@ -26,8 +26,7 @@ import './style/modal.css';const S = { class: "rds-e-modal__container" }, $ = {
26
26
  */
27
27
  teleport: {
28
28
  type: String,
29
- default: "body",
30
- required: !0
29
+ default: "body"
31
30
  },
32
31
  /**
33
32
  * Indica si se muestra el botón de cerrar, de la parte superior derecha
@@ -42,55 +41,77 @@ import './style/modal.css';const S = { class: "rds-e-modal__container" }, $ = {
42
41
  preventClose: {
43
42
  type: Boolean,
44
43
  default: !0
44
+ },
45
+ /**
46
+ * Ancho máximo del modal en dispositivos de escritorio.
47
+ */
48
+ maxWidth: {
49
+ type: [String, Number],
50
+ default: 820,
51
+ validator: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
52
+ },
53
+ /**
54
+ * Ancho del modal en dispositivos de escritorio.
55
+ */
56
+ width: {
57
+ type: [String, Number],
58
+ default: 600,
59
+ validator: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
45
60
  }
46
61
  },
47
62
  emits: ["onCloseRequest"],
48
- setup(d, { emit: f }) {
49
- const r = d, n = f, c = y(null), i = () => {
50
- r.preventClose || n("onCloseRequest");
63
+ setup(t, { emit: u }) {
64
+ const e = t, m = u, _ = v(null), f = C(() => {
65
+ const o = typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth, s = typeof e.width == "number" ? `${e.width}px` : e.width;
66
+ return {
67
+ "--rds-modal-max-width": o,
68
+ "--rds-modal-width": s
69
+ };
70
+ }), y = () => {
71
+ e.preventClose || m("onCloseRequest");
51
72
  };
52
- return C(() => {
53
- var e;
54
- (e = c.value) == null || e.addEventListener("click", i);
55
- }), (e, _) => d.open ? (o(), m(l(k), {
73
+ return (o, s) => t.open ? (r(), i(a(w), {
56
74
  key: 0,
57
75
  ref_key: "overlay",
58
- ref: c,
76
+ ref: _,
59
77
  class: "rds-e-modal__overlay",
60
- teleport: r.teleport,
61
- onClick: i
78
+ teleport: e.teleport,
79
+ onClick: y
62
80
  }, {
63
- default: p(() => [
64
- h(l(B), { class: "rds-e-modal__card" }, {
65
- default: p(() => [
66
- t("div", S, [
67
- t("div", $, [
68
- a(e.$slots, "header", {}, void 0, !0),
69
- r.showClose ? (o(), m(l(b), {
81
+ default: c(() => [
82
+ k(a(x), {
83
+ class: "rds-e-modal__card",
84
+ style: b(f.value)
85
+ }, {
86
+ default: c(() => [
87
+ d("div", B, [
88
+ d("div", N, [
89
+ n(o.$slots, "header", {}, void 0, !0),
90
+ e.showClose ? (r(), i(a(S), {
70
91
  key: 0,
71
92
  class: "rds-e-modal__header-close",
72
93
  name: "close",
73
94
  small: "",
74
- onClick: _[0] || (_[0] = () => n("onCloseRequest"))
75
- })) : s("", !0)
95
+ onClick: s[0] || (s[0] = () => m("onCloseRequest"))
96
+ })) : l("", !0)
76
97
  ]),
77
- e.$slots.body ? (o(), u("span", q)) : s("", !0),
78
- t("div", w, [
79
- a(e.$slots, "body", {}, void 0, !0)
98
+ o.$slots.body ? (r(), p("span", R)) : l("", !0),
99
+ d("div", W, [
100
+ n(o.$slots, "body", {}, void 0, !0)
80
101
  ]),
81
- e.$slots.footer ? (o(), u("span", E)) : s("", !0),
82
- t("div", I, [
83
- a(e.$slots, "footer", {}, void 0, !0)
102
+ o.$slots.footer ? (r(), p("span", g)) : l("", !0),
103
+ d("div", q, [
104
+ n(o.$slots, "footer", {}, void 0, !0)
84
105
  ])
85
106
  ])
86
107
  ]),
87
108
  _: 3
88
- })
109
+ }, 8, ["style"])
89
110
  ]),
90
111
  _: 3
91
- }, 8, ["teleport"])) : s("", !0);
112
+ }, 8, ["teleport"])) : l("", !0);
92
113
  }
93
- }), M = /* @__PURE__ */ R(N, [["__scopeId", "data-v-a952c8fb"]]);
114
+ }), j = /* @__PURE__ */ $(I, [["__scopeId", "data-v-62095f3f"]]);
94
115
  export {
95
- M as default
116
+ j as default
96
117
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as f, toRefs as v, computed as y, openBlock as t, createElementBlock as s, normalizeClass as g, createElementVNode as i, createVNode as a, createCommentVNode as o, toDisplayString as c, renderSlot as h } from "vue";
2
2
  import { I as l } from "./icon-svg-CEZ-L3iv.js";
3
3
  import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/persistentToast.css';const C = { class: "max-layout alert" }, S = {
4
+ import './style/persistentToast.css';const C = { class: "alert" }, S = {
5
5
  key: 0,
6
6
  class: "rds-e-persistent-toast__custom-icon-block"
7
7
  }, $ = { class: "rds-e-persistent-toast__wrapper" }, b = { class: "rds-e-persistent-toast__title__wrapper" }, q = {
@@ -13,7 +13,7 @@ import './style/persistentToast.css';const C = { class: "max-layout alert" }, S
13
13
  }, T = {
14
14
  key: 0,
15
15
  class: "rds-e-persistent-toast__action-section"
16
- }, x = /* @__PURE__ */ f({
16
+ }, B = /* @__PURE__ */ f({
17
17
  __name: "persistent-toast",
18
18
  props: {
19
19
  /**
@@ -89,7 +89,7 @@ import './style/persistentToast.css';const C = { class: "max-layout alert" }, S
89
89
  ), p = () => {
90
90
  m("onCloseToastAction");
91
91
  };
92
- return (n, B) => (t(), s("div", {
92
+ return (n, I) => (t(), s("div", {
93
93
  class: g(["rds-e-persistent-toast", _.value]),
94
94
  role: "alert"
95
95
  }, [
@@ -124,7 +124,7 @@ import './style/persistentToast.css';const C = { class: "max-layout alert" }, S
124
124
  ])) : o("", !0)
125
125
  ], 2));
126
126
  }
127
- }), A = /* @__PURE__ */ k(x, [["__scopeId", "data-v-51c9df5b"]]);
127
+ }), A = /* @__PURE__ */ k(B, [["__scopeId", "data-v-a5bffc75"]]);
128
128
  export {
129
129
  A as default
130
130
  };
@@ -1,24 +1,8 @@
1
- import { getCurrentInstance as I, defineComponent as D, ref as m, computed as v, inject as r, onMounted as E, onBeforeUnmount as N, openBlock as s, createElementBlock as b, normalizeClass as t, createElementVNode as w, unref as x, toDisplayString as $, createCommentVNode as p, createBlock as G } from "vue";
2
- import { I as L } from "./icon-svg-CEZ-L3iv.js";
3
- import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/radioButton.css';function U(e) {
5
- const n = I();
6
- if (!n)
7
- throw new Error(`[energy-components] ${e} must be called from inside a setup function`);
8
- return n;
9
- }
10
- let y = 0, a = /* @__PURE__ */ new WeakMap();
11
- function g() {
12
- const e = U("getUid");
13
- if (a.has(e))
14
- return a.get(e);
15
- const n = y++;
16
- return a.set(e, n), n;
17
- }
18
- g.reset = () => {
19
- y = 0, a = /* @__PURE__ */ new WeakMap();
20
- };
21
- const j = ["id", "value", "name", "disabled", "checked"], q = ["for"], F = /* @__PURE__ */ D({
1
+ import { defineComponent as R, ref as f, computed as m, inject as i, onMounted as _, onBeforeUnmount as D, openBlock as r, createElementBlock as b, normalizeClass as n, createElementVNode as v, unref as E, toDisplayString as N, createCommentVNode as w, createBlock as x } from "vue";
2
+ import { I as C } from "./icon-svg-CEZ-L3iv.js";
3
+ import { g as I } from "./getInstance-GhoEcxLF.js";
4
+ import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import './style/radioButton.css';const L = ["id", "value", "name", "disabled", "checked"], $ = ["for"], j = /* @__PURE__ */ R({
22
6
  __name: "radio-button",
23
7
  props: {
24
8
  /**
@@ -66,58 +50,58 @@ const j = ["id", "value", "name", "disabled", "checked"], q = ["for"], F = /* @_
66
50
  }
67
51
  },
68
52
  setup(e) {
69
- const n = e, d = m(!1), i = m(!1), k = g(), l = v(() => n.id || `input-${k}`), o = r("radioGroupValue"), h = r("radioGroupName");
70
- o || console.warn("RDSRadioButton debe estar dentro de un RDSRadioGroup");
71
- const S = r("validateId");
72
- n.id && !S(n.id) && console.warn(
73
- `RDSRadioButton con id ${n.id} tiene un id duplicado. Se generará un id único.`
53
+ const o = e, d = f(!1), t = f(!1), y = I(), l = m(() => o.id || `input-${y}`), a = i("radioGroupValue"), p = i("radioGroupName");
54
+ a || console.warn("RDSRadioButton debe estar dentro de un RDSRadioGroup");
55
+ const k = i("validateId");
56
+ o.id && !k(o.id) && console.warn(
57
+ `RDSRadioButton con id ${o.id} tiene un id duplicado. Se generará un id único.`
74
58
  );
75
- const _ = v(() => (o == null ? void 0 : o.value) === n.option), B = () => {
76
- !n.disabled && o && (o.value = n.option);
77
- }, R = () => {
78
- i.value && (d.value = !0);
79
- }, C = () => d.value = !1, c = (f) => {
80
- f.key === "Tab" && (i.value = !0);
81
- }, u = () => {
82
- i.value = !1;
59
+ const S = m(() => (a == null ? void 0 : a.value) === o.option), g = () => {
60
+ !o.disabled && a && (a.value = o.option);
61
+ }, h = () => {
62
+ t.value && (d.value = !0);
63
+ }, B = () => d.value = !1, s = (u) => {
64
+ u.key === "Tab" && (t.value = !0);
65
+ }, c = () => {
66
+ t.value = !1;
83
67
  };
84
- return E(() => {
85
- window.addEventListener("keydown", c), window.addEventListener("mousedown", u);
86
- }), N(() => {
87
- window.removeEventListener("keydown", c), window.removeEventListener("mousedown", u);
88
- }), (f, K) => (s(), b("div", {
89
- class: t(["rds-e-radio__container", { "rds-e-radio__container--focused": d.value }])
68
+ return _(() => {
69
+ window.addEventListener("keydown", s), window.addEventListener("mousedown", c);
70
+ }), D(() => {
71
+ window.removeEventListener("keydown", s), window.removeEventListener("mousedown", c);
72
+ }), (u, q) => (r(), b("div", {
73
+ class: n(["rds-e-radio__container", { "rds-e-radio__container--focused": d.value }])
90
74
  }, [
91
- w("input", {
75
+ v("input", {
92
76
  id: l.value,
93
77
  type: "radio",
94
78
  value: e.option,
95
- class: t(`rds-e-radio ${e.error ? " rds-e-radio--error" : ""}`),
96
- name: x(h),
79
+ class: n(`rds-e-radio ${e.error ? " rds-e-radio--error" : ""}`),
80
+ name: E(p),
97
81
  disabled: e.disabled,
98
- checked: _.value,
99
- onChange: B,
100
- onFocus: R,
101
- onBlur: C
102
- }, null, 42, j),
103
- w("label", {
82
+ checked: S.value,
83
+ onChange: g,
84
+ onFocus: h,
85
+ onBlur: B
86
+ }, null, 42, L),
87
+ v("label", {
104
88
  for: l.value,
105
- class: t(["rds-e-radio__label", { "rds-e-radio__label--error": e.error }])
89
+ class: n(["rds-e-radio__label", { "rds-e-radio__label--error": e.error }])
106
90
  }, [
107
- e.label ? (s(), b("span", {
91
+ e.label ? (r(), b("span", {
108
92
  key: 0,
109
- class: t(["rds-e-radio__label-text", { "rds-e-radio__label-text--disabled": e.disabled }])
110
- }, $(e.label), 3)) : p("", !0),
111
- e.label && e.icon ? (s(), G(L, {
93
+ class: n(["rds-e-radio__label-text", { "rds-e-radio__label-text--disabled": e.disabled }])
94
+ }, N(e.label), 3)) : w("", !0),
95
+ e.label && e.icon ? (r(), x(C, {
112
96
  key: 1,
113
- class: t(["rds-e-radio__label-icon", { "rds-e-radio__label-icon--disabled": e.disabled }]),
97
+ class: n(["rds-e-radio__label-icon", { "rds-e-radio__label-icon--disabled": e.disabled }]),
114
98
  name: e.icon,
115
99
  "aria-hidden": "true"
116
- }, null, 8, ["class", "name"])) : p("", !0)
117
- ], 10, q)
100
+ }, null, 8, ["class", "name"])) : w("", !0)
101
+ ], 10, $)
118
102
  ], 2));
119
103
  }
120
- }), O = /* @__PURE__ */ M(F, [["__scopeId", "data-v-c8280e86"]]);
104
+ }), V = /* @__PURE__ */ G(j, [["__scopeId", "data-v-c8280e86"]]);
121
105
  export {
122
- O as default
106
+ V as default
123
107
  };