energy-components 1.1.1 → 1.1.2

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 (50) hide show
  1. package/dist/components/button.es.js +9 -10
  2. package/dist/components/getInstance-GhoEcxLF.js +21 -0
  3. package/dist/components/infoBox.es.js +4 -4
  4. package/dist/components/link.es.js +41 -30
  5. package/dist/components/modal.es.js +39 -43
  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 +48 -50
  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 -1
  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/textArea.es.js +28 -26
  39. package/dist/components/textField.es.js +72 -70
  40. package/dist/components/tooltip.es.js +41 -40
  41. package/dist/energy-components.es.js +2472 -2464
  42. package/dist/energy-components.umd.js +1 -1
  43. package/dist/style.css +1 -1
  44. package/dist/types/src/components/buttons/button/button.vue.d.ts +0 -2
  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 +5 -5
  47. package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -2
  48. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +0 -2
  49. package/dist/types/tsconfig.tsbuildinfo +1 -1
  50. package/package.json +2 -2
@@ -47,7 +47,6 @@ import './style/button.css';const w = ["type", "disabled"], D = { class: "rds-e-
47
47
  variant: {
48
48
  type: String,
49
49
  default: "primary",
50
- required: !0,
51
50
  validator(e) {
52
51
  const t = ["primary", "secondary", "ghost"].includes(e);
53
52
  return t || console.info(
@@ -101,7 +100,7 @@ import './style/button.css';const w = ["type", "disabled"], D = { class: "rds-e-
101
100
  setup(e) {
102
101
  const t = e, {
103
102
  text: o,
104
- icon: a,
103
+ icon: n,
105
104
  type: r,
106
105
  variant: i,
107
106
  small: f,
@@ -110,13 +109,13 @@ import './style/button.css';const w = ["type", "disabled"], D = { class: "rds-e-
110
109
  inverse: d,
111
110
  revertIcon: _,
112
111
  loading: p
113
- } = I(t), c = l(() => p.value ? "loading" : a != null && a.value ? a == null ? void 0 : a.value : ""), h = l(() => r.value && ["button", "submit", "reset"].includes(r.value) ? r.value : "button"), b = l(() => ["primary", "secondary", "ghost"].includes(i.value) ? i.value : "primary"), g = l(() => {
114
- const n = ["rds-e-btn"];
115
- return i.value && n.push(`rds-e-btn--${b.value}`), d.value && n.push(`rds-e-btn--${b.value}-inverse`), c.value && n.push(
112
+ } = I(t), c = l(() => p.value ? "loading" : n != null && n.value ? n == null ? void 0 : n.value : ""), h = l(() => r.value && ["button", "submit", "reset"].includes(r.value) ? r.value : "button"), b = l(() => ["primary", "secondary", "ghost"].includes(i.value) ? i.value : "primary"), g = l(() => {
113
+ const a = ["rds-e-btn"];
114
+ return i.value && a.push(`rds-e-btn--${b.value}`), d.value && a.push(`rds-e-btn--${b.value}-inverse`), c.value && a.push(
116
115
  o != null && o.value ? "rds-e-btn--with-icon" : "rds-e-btn--icon"
117
- ), f.value && n.push("rds-e-btn--small"), _.value && n.push("rds-e-btn--revert"), u.value && n.push("rds-e-style-state-disabled"), p.value && n.push("rds-e-btn--loading"), y.value && n.push("rds-e-btn--mobile-width"), n.join(" ");
116
+ ), f.value && a.push("rds-e-btn--small"), _.value && a.push("rds-e-btn--revert"), u.value && a.push("rds-e-style-state-disabled"), p.value && a.push("rds-e-btn--loading"), y.value && a.push("rds-e-btn--mobile-width"), a.join(" ");
118
117
  });
119
- return (n, W) => (v(), S("button", {
118
+ return (a, W) => (v(), S("button", {
120
119
  type: h.value,
121
120
  disabled: s(u),
122
121
  class: m(g.value)
@@ -132,13 +131,13 @@ import './style/button.css';const w = ["type", "disabled"], D = { class: "rds-e-
132
131
  "aria-hidden": "true"
133
132
  }, null, 8, ["name", "small", "class"])) : k("", !0),
134
133
  $("span", D, [
135
- C(n.$slots, "default", {}, () => [
134
+ C(a.$slots, "default", {}, () => [
136
135
  N(V(s(o)), 1)
137
136
  ], !0)
138
137
  ])
139
138
  ], 10, w));
140
139
  }
141
- }), F = /* @__PURE__ */ L(R, [["__scopeId", "data-v-590609be"]]);
140
+ }), T = /* @__PURE__ */ L(R, [["__scopeId", "data-v-a17b5b56"]]);
142
141
  export {
143
- F as default
142
+ T as default
144
143
  };
@@ -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
+ };
@@ -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,15 +1,14 @@
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
  /**
8
8
  * <span>Texto a mostrar en el link</span>
9
9
  */
10
10
  text: {
11
- type: String,
12
- required: !0
11
+ type: String
13
12
  },
14
13
  /**
15
14
  * <span>Url a la que redirige el link</span>
@@ -67,6 +66,13 @@ import './style/link.css';const V = /* @__PURE__ */ D({
67
66
  right: {
68
67
  type: Boolean,
69
68
  default: !0
69
+ },
70
+ /**
71
+ * <span>Clase personalizada que se aplica solo al elemento (span) que contiene el texto del enlace.</span>
72
+ */
73
+ customClass: {
74
+ type: String,
75
+ default: ""
70
76
  }
71
77
  },
72
78
  setup(s) {
@@ -75,73 +81,78 @@ import './style/link.css';const V = /* @__PURE__ */ D({
75
81
  to: g,
76
82
  icon: n,
77
83
  tag: o,
78
- disabled: p,
79
- inverse: c,
84
+ disabled: c,
85
+ inverse: p,
80
86
  arrow: u,
81
87
  right: t,
82
- underline: h
83
- } = E(v), j = f(() => {
84
- var r, b;
88
+ underline: h,
89
+ customClass: j
90
+ } = L(v), D = f(() => {
91
+ var l, C;
85
92
  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(" ");
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(" ");
87
94
  }), w = f(() => {
88
- var r;
95
+ var l;
89
96
  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(
97
+ return n != null && n.value && (a.push("link__icon"), c.value && a.push("link__icon--disabled")), ((l = n == null ? void 0 : n.value) == null ? void 0 : l.name) !== "arrow" && p.value && a.push("link__icon--inverse"), a.push(
91
98
  t.value ? "link__icon--animation-right" : "link__icon--animation-left"
92
99
  ), a.join(" ");
93
100
  }), x = f(() => {
94
101
  var a;
95
102
  return u.value || ((a = n == null ? void 0 : n.value) == null ? void 0 : a.name);
96
103
  });
97
- return (a, r) => (l(), d(L(e(o) === "a" ? e(o) : "router-link"), {
98
- class: m(j.value),
104
+ return (a, l) => (r(), d(N(e(o) === "a" ? e(o) : "router-link"), {
105
+ class: m(D.value),
99
106
  to: e(o) === "router-link" ? e(g) : null,
100
107
  href: e(o) === "a" ? e(g) : null,
101
- disable: e(p)
108
+ disable: e(c)
102
109
  }, {
103
- default: N(() => [
104
- e(n).name && !e(t) && !e(u) ? (l(), d(k, _({
110
+ default: R(() => [
111
+ e(n).name && !e(t) && !e(u) ? (r(), d(k, _({
105
112
  key: 0,
106
113
  name: e(n).name
107
114
  }, {
108
115
  ...e(n)
109
- }, { class: w.value }), null, 16, ["name", "class"])) : i("", !0),
110
- e(t) ? (l(), B("span", {
116
+ }, {
117
+ class: ["rds-e-link__icon-left", w.value]
118
+ }), null, 16, ["name", "class"])) : i("", !0),
119
+ e(t) ? (r(), b("span", {
111
120
  key: 1,
112
- class: m(["rds-e-link__text", {
121
+ class: m(["rds-e-link__text", [e(j), {
113
122
  "rds-e-mr-xs": x.value,
114
123
  "rds-e-link__text--underline": e(h)
115
- }])
124
+ }]])
116
125
  }, [
117
- C(a.$slots, "default", {}, () => [
126
+ B(a.$slots, "default", {}, () => [
118
127
  S(I(e(y)), 1)
119
128
  ], !0)
120
129
  ], 2)) : i("", !0),
121
- e(u) ? (l(), d(k, _({ key: 2 }, {
130
+ e(u) ? (r(), d(k, _({ key: 2 }, {
122
131
  name: e(t) ? "arrow_right" : "arrow_left"
123
132
  }, {
124
133
  class: ["link__icon--arrow", [
125
134
  e(t) ? "link__icon--animation-right" : "link__icon--animation-left"
126
135
  ]]
127
136
  }), null, 16, ["class"])) : i("", !0),
128
- e(t) ? i("", !0) : (l(), B("span", {
137
+ e(t) ? i("", !0) : (r(), b("span", {
129
138
  key: 3,
130
139
  class: m(["rds-e-link__text", { "rds-e-ml-xs": x.value }])
131
140
  }, [
132
- C(a.$slots, "default", {}, () => [
141
+ B(a.$slots, "default", {}, () => [
133
142
  S(I(e(y)), 1)
134
143
  ], !0)
135
144
  ], 2)),
136
- e(n).name && e(t) && !e(u) ? (l(), d(k, _({
145
+ e(n).name && e(t) && !e(u) ? (r(), d(k, _({
137
146
  key: 4,
138
147
  name: e(n).name
139
- }, e(n), { class: w.value }), null, 16, ["name", "class"])) : i("", !0)
148
+ }, e(n), {
149
+ class: ["rds-e-link__icon-right", w.value]
150
+ }), null, 16, ["name", "class"])) : i("", !0)
140
151
  ]),
141
152
  _: 3
142
153
  }, 8, ["class", "to", "href", "disable"]));
143
154
  }
144
- }), M = /* @__PURE__ */ R(V, [["__scopeId", "data-v-2e064780"]]);
155
+ }), P = /* @__PURE__ */ V($, [["__scopeId", "data-v-d51e1628"]]);
145
156
  export {
146
- M as default
157
+ P as default
147
158
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as h, ref as v, computed as C, onMounted as k, openBlock as s, createBlock as u, unref as a, withCtx as p, createVNode as b, normalizeStyle as w, createElementVNode as d, renderSlot as n, createCommentVNode as l, createElementBlock as _ } from "vue";
2
- import x from "./overlay.es.js";
3
- import S from "./card.es.js";
4
- import { I as $ } from "./icon-svg-CEZ-L3iv.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 = {
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
- }, g = { class: "rds-e-modal__body" }, q = {
9
+ }, W = { class: "rds-e-modal__body" }, g = {
10
10
  key: 1,
11
11
  class: "rds-e-modal__section-spacer"
12
- }, E = { class: "rds-e-modal__footer" }, I = /* @__PURE__ */ h({
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 N = { class: "rds-e-modal__container" }, R = {
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
@@ -49,7 +48,7 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
49
48
  maxWidth: {
50
49
  type: [String, Number],
51
50
  default: 820,
52
- validator: (o) => typeof o == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(o)
51
+ validator: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
53
52
  },
54
53
  /**
55
54
  * Ancho del modal en dispositivos de escritorio.
@@ -57,55 +56,52 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
57
56
  width: {
58
57
  type: [String, Number],
59
58
  default: 600,
60
- validator: (o) => typeof o == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(o)
59
+ validator: (t) => typeof t == "number" ? !0 : /^\d+(?:px|em|rem|%)$/.test(t)
61
60
  }
62
61
  },
63
62
  emits: ["onCloseRequest"],
64
- setup(o, { emit: f }) {
65
- const t = o, i = f, m = v(null), y = C(() => {
66
- const e = typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth, r = typeof t.width == "number" ? `${t.width}px` : t.width;
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;
67
66
  return {
68
- "--rds-modal-max-width": e,
69
- "--rds-modal-width": r
67
+ "--rds-modal-max-width": o,
68
+ "--rds-modal-width": s
70
69
  };
71
- }), c = () => {
72
- t.preventClose || i("onCloseRequest");
70
+ }), y = () => {
71
+ e.preventClose || m("onCloseRequest");
73
72
  };
74
- return k(() => {
75
- var e;
76
- (e = m.value) == null || e.addEventListener("click", c);
77
- }), (e, r) => o.open ? (s(), u(a(x), {
73
+ return (o, s) => t.open ? (r(), i(a(w), {
78
74
  key: 0,
79
75
  ref_key: "overlay",
80
- ref: m,
76
+ ref: _,
81
77
  class: "rds-e-modal__overlay",
82
- teleport: t.teleport,
83
- onClick: c
78
+ teleport: e.teleport,
79
+ onClick: y
84
80
  }, {
85
- default: p(() => [
86
- b(a(S), {
81
+ default: c(() => [
82
+ k(a(x), {
87
83
  class: "rds-e-modal__card",
88
- style: w(y.value)
84
+ style: b(f.value)
89
85
  }, {
90
- default: p(() => [
91
- d("div", N, [
92
- d("div", R, [
93
- n(e.$slots, "header", {}, void 0, !0),
94
- t.showClose ? (s(), u(a($), {
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), {
95
91
  key: 0,
96
92
  class: "rds-e-modal__header-close",
97
93
  name: "close",
98
94
  small: "",
99
- onClick: r[0] || (r[0] = () => i("onCloseRequest"))
95
+ onClick: s[0] || (s[0] = () => m("onCloseRequest"))
100
96
  })) : l("", !0)
101
97
  ]),
102
- e.$slots.body ? (s(), _("span", W)) : l("", !0),
103
- d("div", g, [
104
- n(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)
105
101
  ]),
106
- e.$slots.footer ? (s(), _("span", q)) : l("", !0),
107
- d("div", E, [
108
- n(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)
109
105
  ])
110
106
  ])
111
107
  ]),
@@ -115,7 +111,7 @@ import './style/modal.css';const N = { class: "rds-e-modal__container" }, R = {
115
111
  _: 3
116
112
  }, 8, ["teleport"])) : l("", !0);
117
113
  }
118
- }), M = /* @__PURE__ */ B(I, [["__scopeId", "data-v-a3839f6f"]]);
114
+ }), j = /* @__PURE__ */ $(I, [["__scopeId", "data-v-62095f3f"]]);
119
115
  export {
120
- M as default
116
+ j as default
121
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
  };