energy-components 1.14.2 → 1.15.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 (112) hide show
  1. package/dist/components/accordion.es.js +30 -27
  2. package/dist/components/actionButton.es.js +56 -11
  3. package/dist/components/avatar.es.js +24 -16
  4. package/dist/components/breadcrumbs.es.js +37 -29
  5. package/dist/components/button.es.js +31 -22
  6. package/dist/components/card.es.js +17 -9
  7. package/dist/components/checkbox.es.js +67 -56
  8. package/dist/components/collapsable.es.js +1 -1
  9. package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-DfOWp1XD.js → collapsable.scss_vue_type_style_index_0_src_true_lang-Bi5q6Y3n.js} +1 -1
  10. package/dist/components/directAccess.es.js +26 -18
  11. package/dist/components/dragAndDrop.es.js +1 -1
  12. package/dist/components/dropdown.es.js +27 -27
  13. package/dist/components/fileUploadItem.es.js +23 -21
  14. package/dist/components/filterChip.es.js +22 -14
  15. package/dist/components/filterTag.es.js +27 -19
  16. package/dist/components/floating-ui.vue-7LKzPqHI.js +1148 -0
  17. package/dist/components/floatingActionButton.es.js +19 -11
  18. package/dist/components/{icon-svg-DuzOdbk1.js → icon-svg-BU0OQFKH.js} +990 -742
  19. package/dist/components/iconList.es.js +1 -1
  20. package/dist/components/iconSvg.es.js +1 -1
  21. package/dist/components/index.es.js +83 -77
  22. package/dist/components/indicator.es.js +37 -29
  23. package/dist/components/infoBox.es.js +47 -39
  24. package/dist/components/link.es.js +22 -13
  25. package/dist/components/loader.es.js +22 -21
  26. package/dist/components/modal.es.js +37 -28
  27. package/dist/components/overlay.es.js +21 -11
  28. package/dist/components/pagination.es.js +164 -109
  29. package/dist/components/persistentToast.es.js +32 -24
  30. package/dist/components/popover.es.js +166 -0
  31. package/dist/components/progressBar.es.js +30 -22
  32. package/dist/components/quantitySelector.es.js +60 -48
  33. package/dist/components/radioButton.es.js +1 -1
  34. package/dist/components/selectionChip.es.js +15 -7
  35. package/dist/components/sidedrawer.es.js +1 -1
  36. package/dist/components/snackBar.es.js +131 -0
  37. package/dist/components/style/accordion.css +1 -1
  38. package/dist/components/style/actionButton.css +1 -1
  39. package/dist/components/style/avatar.css +1 -1
  40. package/dist/components/style/breadcrumbs.css +1 -1
  41. package/dist/components/style/button.css +1 -1
  42. package/dist/components/style/card.css +1 -1
  43. package/dist/components/style/checkbox.css +1 -1
  44. package/dist/components/style/directAccess.css +1 -1
  45. package/dist/components/style/fileUploadItem.css +1 -1
  46. package/dist/components/style/filterChip.css +1 -1
  47. package/dist/components/style/filterTag.css +1 -1
  48. package/dist/components/style/floatingActionButton.css +1 -1
  49. package/dist/components/style/icon-svg.css +1 -1
  50. package/dist/components/style/indicator.css +1 -1
  51. package/dist/components/style/infoBox.css +1 -1
  52. package/dist/components/style/link.css +1 -1
  53. package/dist/components/style/loader.css +1 -1
  54. package/dist/components/style/modal.css +1 -1
  55. package/dist/components/style/overlay.css +1 -1
  56. package/dist/components/style/pagination.css +1 -1
  57. package/dist/components/style/persistentToast.css +1 -1
  58. package/dist/components/style/popover.css +1 -0
  59. package/dist/components/style/progressBar.css +1 -1
  60. package/dist/components/style/quantitySelector.css +1 -1
  61. package/dist/components/style/selectionChip.css +1 -1
  62. package/dist/components/style/snackBar.css +1 -0
  63. package/dist/components/style/tabBar.css +1 -1
  64. package/dist/components/style/tag.css +1 -1
  65. package/dist/components/style/toggle.css +1 -1
  66. package/dist/components/style/tooltip.css +1 -1
  67. package/dist/components/switch.es.js +1 -1
  68. package/dist/components/tabBar.es.js +23 -15
  69. package/dist/components/tableslotedcomponent.es.js +1 -1
  70. package/dist/components/tag.es.js +31 -23
  71. package/dist/components/textArea.es.js +1 -1
  72. package/dist/components/textField.es.js +1 -1
  73. package/dist/components/toggle.es.js +20 -16
  74. package/dist/components/tooltip.es.js +71 -1019
  75. package/dist/energy-components.es.js +6845 -5844
  76. package/dist/energy-components.umd.js +2 -2
  77. package/dist/style.css +1 -1
  78. package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +47 -0
  79. package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
  80. package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +15 -0
  81. package/dist/types/src/components/content/avatar/avatar.vue.d.ts +15 -0
  82. package/dist/types/src/components/content/card/card.vue.d.ts +15 -0
  83. package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +1 -1
  84. package/dist/types/src/components/content/tag/tag.vue.d.ts +15 -0
  85. package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +15 -0
  86. package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +15 -0
  87. package/dist/types/src/components/feedback/loader/loader.vue.d.ts +1 -1
  88. package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +15 -0
  89. package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +15 -0
  90. package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +180 -0
  91. package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +15 -0
  92. package/dist/types/src/components/index.d.ts +2 -0
  93. package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +24 -7
  94. package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
  95. package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +1 -1
  96. package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +15 -0
  97. package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +15 -0
  98. package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +15 -0
  99. package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +15 -0
  100. package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
  101. package/dist/types/src/components/input/toggle/toggle.vue.d.ts +4 -0
  102. package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +15 -0
  103. package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +15 -0
  104. package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
  105. package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +47 -0
  106. package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +15 -0
  107. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +15 -0
  108. package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +15 -0
  109. package/dist/types/src/components/overlay/popover/popover.vue.d.ts +35 -0
  110. package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +15 -0
  111. package/dist/types/tsconfig.tsbuildinfo +1 -1
  112. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
- import { defineComponent as R, toRefs as B, ref as l, 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-DuzOdbk1.js";
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-BU0OQFKH.js";
3
3
  import O from "./tag.es.js";
4
4
  import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { class: "rds-e-accordion-title" }, M = { class: "rds-e-accordion-title_right" }, U = /* @__PURE__ */ R({
5
+ import './style/accordion.css';const b = ["id"], z = { class: "rds-e-accordion-title" }, M = { class: "rds-e-accordion-title_right" }, U = /* @__PURE__ */ R({
6
6
  __name: "accordion",
7
7
  props: {
8
8
  /**
@@ -43,22 +43,22 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
43
43
  }
44
44
  },
45
45
  emits: ["update:open"],
46
- setup(c, { expose: C, emit: S }) {
47
- const o = c, k = S, { tag: a } = B(o), t = l(o.open), i = l(null), s = l(null), x = () => {
48
- if (!i.value || !s.value) return;
49
- const e = s.value.scrollHeight;
50
- i.value.style.maxHeight = t.value ? `${e}px` : "0px";
51
- }, r = (e) => {
46
+ setup(r, { expose: C, emit: S }) {
47
+ const o = r, k = S, { tag: c } = B(o), t = s(o.open), a = s(null), l = s(null), x = () => {
48
+ if (!a.value || !l.value) return;
49
+ const e = l.value.scrollHeight;
50
+ a.value.style.maxHeight = t.value ? `${e}px` : "0px";
51
+ }, i = (e) => {
52
52
  e === void 0 ? t.value = !t.value : t.value = e, k("update:open", t.value), x();
53
- }, p = () => {
54
- r(!0);
55
53
  }, u = () => {
56
- r(!1);
54
+ i(!0);
55
+ }, p = () => {
56
+ i(!1);
57
57
  };
58
58
  D(
59
59
  () => o.open,
60
60
  (e) => N(() => {
61
- r(e);
61
+ i(e);
62
62
  }),
63
63
  { immediate: !0 }
64
64
  );
@@ -66,8 +66,8 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
66
66
  return V(() => {
67
67
  m && m({
68
68
  id: o.id,
69
- open: p,
70
- close: u
69
+ open: u,
70
+ close: p
71
71
  });
72
72
  }), q(() => {
73
73
  f && f(o.id);
@@ -75,22 +75,25 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
75
75
  /**
76
76
  * Abre el panel.
77
77
  */
78
- openPanel: p,
78
+ openPanel: u,
79
79
  /**
80
80
  * Cierra el panel.
81
81
  */
82
- closePanel: u
83
- }), (e, g) => (_(), w("div", b, [
82
+ closePanel: p
83
+ }), (e, g) => (_(), w("div", {
84
+ id: r.id,
85
+ class: "rds-e-accordion"
86
+ }, [
84
87
  n("div", {
85
88
  class: "rds-e-accordion-title_container",
86
- onClick: g[0] || (g[0] = () => r())
89
+ onClick: g[0] || (g[0] = () => i())
87
90
  }, [
88
- n("span", z, h(c.title), 1),
91
+ n("span", z, h(r.title), 1),
89
92
  n("div", M, [
90
- d(a) && d(a).icon ? (_(), H(O, j({
93
+ d(c) && d(c).icon ? (_(), H(O, j({
91
94
  key: 0,
92
95
  class: "rds-e-accordion-title_tag"
93
- }, d(a), { small: "" }), null, 16)) : P("", !0),
96
+ }, d(c), { small: "" }), null, 16)) : P("", !0),
94
97
  T(I, {
95
98
  class: y(["rds-e-accordion-title_icon", { "rds-e-accordion-title_icon--open": t.value }]),
96
99
  name: "arrow_down"
@@ -99,22 +102,22 @@ import './style/accordion.css';const b = { class: "rds-e-accordion" }, z = { cla
99
102
  ]),
100
103
  n("div", {
101
104
  ref_key: "panel",
102
- ref: i,
105
+ ref: a,
103
106
  class: y(["rds-e-accordion-panel", { "rds-e-accordion-panel--open": t.value }])
104
107
  }, [
105
108
  n("div", {
106
109
  ref_key: "panelContent",
107
- ref: s,
110
+ ref: l,
108
111
  class: "rds-e-accordion-panel_content"
109
112
  }, [
110
113
  A(e.$slots, "default", {}, () => [
111
- E(h(c.content), 1)
114
+ E(h(r.content), 1)
112
115
  ], !0)
113
116
  ], 512)
114
117
  ], 2)
115
- ]));
118
+ ], 8, b));
116
119
  }
117
- }), L = /* @__PURE__ */ $(U, [["__scopeId", "data-v-150c3a24"]]);
120
+ }), L = /* @__PURE__ */ $(U, [["__scopeId", "data-v-620f5458"]]);
118
121
  export {
119
122
  L as default
120
123
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as o, createBlock as a, openBlock as r, mergeProps as n } from "vue";
2
- import s from "./button.es.js";
3
- import { _ as l } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/actionButton.css';const p = /* @__PURE__ */ o({
1
+ import { defineComponent as r, createBlock as o, openBlock as i, withCtx as l, createVNode as d, mergeProps as n } from "vue";
2
+ import a from "./button.es.js";
3
+ import s from "./tooltip.es.js";
4
+ import { _ as p } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import './style/actionButton.css';const c = /* @__PURE__ */ r({
5
6
  __name: "action-button",
6
7
  props: {
7
8
  /**
@@ -19,8 +20,8 @@ import './style/actionButton.css';const p = /* @__PURE__ */ o({
19
20
  variant: {
20
21
  type: String,
21
22
  default: "primary",
22
- validator(e) {
23
- return ["primary", "secondary", "ghost"].includes(e);
23
+ validator(t) {
24
+ return ["primary", "secondary", "ghost"].includes(t);
24
25
  }
25
26
  },
26
27
  /**
@@ -50,15 +51,59 @@ import './style/actionButton.css';const p = /* @__PURE__ */ o({
50
51
  loading: {
51
52
  type: Boolean,
52
53
  default: !1
54
+ },
55
+ /**
56
+ * <span>ID del botón para testing</span>
57
+ */
58
+ id: {
59
+ type: String,
60
+ default: void 0
61
+ },
62
+ /**
63
+ * <span>Contenido del tooltip. Si se proporciona, se mostrará el tooltip al hacer hover</span>
64
+ */
65
+ tooltip: {
66
+ type: String,
67
+ default: ""
68
+ },
69
+ /**
70
+ * <span>Posición del tooltip (top, bottom, left, right). Si no se especifica, se posiciona automáticamente</span>
71
+ */
72
+ tooltipPosition: {
73
+ type: String,
74
+ default: void 0,
75
+ validator(t) {
76
+ return t === void 0 || ["top", "bottom", "left", "right"].includes(t);
77
+ }
53
78
  }
54
79
  },
55
- setup(e) {
56
- return (t, i) => (r(), a(s, n({ class: "rds-e-btn--action" }, { ...t.$props, ...t.$attrs }, {
80
+ setup(t) {
81
+ return (e, f) => t.tooltip ? (i(), o(s, {
82
+ key: 0,
83
+ content: t.tooltip,
84
+ placement: t.tooltipPosition || void 0,
85
+ inverse: t.inverse
86
+ }, {
87
+ default: l(() => [
88
+ d(a, n({
89
+ id: t.id,
90
+ class: "rds-e-btn--action"
91
+ }, { ...e.$props, ...e.$attrs }, {
92
+ text: "",
93
+ "is-action": ""
94
+ }), null, 16, ["id"])
95
+ ]),
96
+ _: 1
97
+ }, 8, ["content", "placement", "inverse"])) : (i(), o(a, n({
98
+ key: 1,
99
+ id: t.id,
100
+ class: "rds-e-btn--action"
101
+ }, { ...e.$props, ...e.$attrs }, {
57
102
  text: "",
58
103
  "is-action": ""
59
- }), null, 16));
104
+ }), null, 16, ["id"]));
60
105
  }
61
- }), f = /* @__PURE__ */ l(p, [["__scopeId", "data-v-261a503b"]]);
106
+ }), g = /* @__PURE__ */ p(c, [["__scopeId", "data-v-765c5af6"]]);
62
107
  export {
63
- f as default
108
+ g as default
64
109
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as _, computed as a, createElementBlock as s, openBlock as r, withKeys as o, normalizeStyle as u, normalizeClass as h, createBlock as k, createCommentVNode as b, toDisplayString as z } from "vue";
2
- import { R as C } from "./icon-svg-DuzOdbk1.js";
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-BU0OQFKH.js";
3
3
  import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
4
+ import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"], D = {
5
5
  key: 1,
6
6
  class: "rds-e-avatar__initials"
7
7
  }, N = {
8
8
  key: 3,
9
9
  class: "rds-e-avatar__badge",
10
10
  "aria-hidden": "true"
11
- }, E = /* @__PURE__ */ _({
11
+ }, E = /* @__PURE__ */ h({
12
12
  __name: "avatar",
13
13
  props: {
14
14
  /**
@@ -78,6 +78,13 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
78
78
  alt: {
79
79
  type: String,
80
80
  default: "Avatar"
81
+ },
82
+ /**
83
+ * ID del avatar para testing
84
+ */
85
+ id: {
86
+ type: String,
87
+ default: void 0
81
88
  }
82
89
  },
83
90
  emits: ["click"],
@@ -87,7 +94,7 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
87
94
  m: "32px",
88
95
  l: "40px",
89
96
  xl: "48px"
90
- }, v = a(() => `rds-e-avatar--${e.size}`), n = a(() => !e.initials || typeof e.initials != "string" ? "" : e.initials.trim().substring(0, 2).toUpperCase()), y = a(() => {
97
+ }, v = a(() => `rds-e-avatar--${e.size}`), r = a(() => !e.initials || typeof e.initials != "string" ? "" : e.initials.trim().substring(0, 2).toUpperCase()), y = a(() => {
91
98
  switch (e.size) {
92
99
  case "s":
93
100
  return "10px";
@@ -109,7 +116,7 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
109
116
  fontSize: y.value,
110
117
  lineHeight: i
111
118
  };
112
- }), c = a(() => e.type === "icon" && e.iconName ? e.iconName : "user_default"), x = a(() => {
119
+ }), c = a(() => e.type === "icon" && e.iconName ? e.iconName : "user_default"), g = a(() => {
113
120
  switch (e.size) {
114
121
  case "s":
115
122
  return "12px";
@@ -122,14 +129,15 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
122
129
  default:
123
130
  return "20px";
124
131
  }
125
- }), g = a(() => ({
126
- fontSize: x.value,
132
+ }), x = a(() => ({
133
+ fontSize: g.value,
127
134
  color: "#001E37"
128
- })), S = a(() => e.alt && e.type === "image" ? e.alt : e.type === "initials" && n.value ? `Avatar con iniciales ${n.value}` : e.type === "icon" ? `Avatar con icono ${c.value}` : e.badge ? "Avatar de usuario con notificación" : "Avatar de usuario"), l = (i) => {
135
+ })), S = a(() => e.alt && e.type === "image" ? e.alt : e.type === "initials" && r.value ? `Avatar con iniciales ${r.value}` : e.type === "icon" ? `Avatar con icono ${c.value}` : e.badge ? "Avatar de usuario con notificación" : "Avatar de usuario"), l = (i) => {
129
136
  p("click", i);
130
137
  };
131
- return (i, I) => (r(), s("div", {
132
- class: h(["rds-e-avatar", [v.value]]),
138
+ return (i, I) => (n(), s("div", {
139
+ id: t.id,
140
+ class: k(["rds-e-avatar", [v.value]]),
133
141
  style: u(f.value),
134
142
  role: "button",
135
143
  tabindex: "0",
@@ -140,22 +148,22 @@ import './style/avatar.css';const A = ["aria-label"], B = ["src", "alt"], D = {
140
148
  o(l, ["space"])
141
149
  ]
142
150
  }, [
143
- t.type === "image" && t.src ? (r(), s("img", {
151
+ t.type === "image" && t.src ? (n(), s("img", {
144
152
  key: 0,
145
153
  src: t.src,
146
154
  alt: t.alt,
147
155
  class: "rds-e-avatar__image"
148
- }, null, 8, B)) : t.type === "initials" && n.value ? (r(), s("span", D, z(n.value), 1)) : (r(), k(C, {
156
+ }, null, 8, B)) : t.type === "initials" && r.value ? (n(), s("span", D, z(r.value), 1)) : (n(), _(C, {
149
157
  key: 2,
150
158
  name: c.value,
151
159
  class: "rds-e-avatar__icon",
152
- style: u(g.value),
160
+ style: u(x.value),
153
161
  "aria-hidden": "true"
154
162
  }, null, 8, ["name", "style"])),
155
- t.badge ? (r(), s("span", N)) : b("", !0)
163
+ t.badge ? (n(), s("span", N)) : b("", !0)
156
164
  ], 46, A));
157
165
  }
158
- }), R = /* @__PURE__ */ w(E, [["__scopeId", "data-v-194a7f49"]]);
166
+ }), R = /* @__PURE__ */ w(E, [["__scopeId", "data-v-11470780"]]);
159
167
  export {
160
168
  R as default
161
169
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as h, toRefs as C, ref as y, watchEffect as L, onMounted as T, createElementBlock as o, openBlock as c, Fragment as I, renderList as x, normalizeClass as w, unref as B, createVNode as j, mergeProps as E, toHandlers as P, withCtx as D, createCommentVNode as N } from "vue";
2
- import O from "./link.es.js";
3
- import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/breadcrumbs.css';const S = { key: 0 }, V = /* @__PURE__ */ h({
1
+ import { defineComponent as h, toRefs as y, ref as C, watchEffect as L, onMounted as T, createElementBlock as i, openBlock as u, Fragment as I, renderList as w, normalizeClass as x, unref as B, createVNode as j, mergeProps as E, toHandlers as P, withCtx as S, createCommentVNode as D } from "vue";
2
+ import N from "./link.es.js";
3
+ import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/breadcrumbs.css';const R = ["id"], V = { key: 0 }, $ = /* @__PURE__ */ h({
5
5
  __name: "breadcrumbs",
6
6
  props: {
7
7
  /**
@@ -31,17 +31,24 @@ import './style/breadcrumbs.css';const S = { key: 0 }, V = /* @__PURE__ */ h({
31
31
  leftTrim: {
32
32
  type: Boolean,
33
33
  default: !1
34
+ },
35
+ /**
36
+ * ID del breadcrumbs para testing
37
+ */
38
+ id: {
39
+ type: String,
40
+ default: void 0
34
41
  }
35
42
  },
36
43
  emits: ["onClickTrimmedList"],
37
- setup(v, { emit: m }) {
38
- const s = v, u = m, {
44
+ setup(a, { emit: v }) {
45
+ const s = a, d = v, {
39
46
  items: r,
40
- inverse: l
41
- } = C(s), a = y(), d = () => {
42
- s.leftTrim ? u("onClickTrimmedList", r.value.slice(0, -2)) : u("onClickTrimmedList", r.value.slice(1, -1));
47
+ inverse: n
48
+ } = y(s), l = C(), m = () => {
49
+ s.leftTrim ? d("onClickTrimmedList", r.value.slice(0, -2)) : d("onClickTrimmedList", r.value.slice(1, -1));
43
50
  }, p = () => {
44
- a.value = [
51
+ l.value = [
45
52
  r.value[0],
46
53
  {
47
54
  text: "...",
@@ -53,7 +60,7 @@ import './style/breadcrumbs.css';const S = { key: 0 }, V = /* @__PURE__ */ h({
53
60
  r.value[r.value.length - 1]
54
61
  ];
55
62
  }, b = () => {
56
- a.value = [
63
+ l.value = [
57
64
  {
58
65
  text: "...",
59
66
  active: !1,
@@ -64,47 +71,48 @@ import './style/breadcrumbs.css';const S = { key: 0 }, V = /* @__PURE__ */ h({
64
71
  r.value[r.value.length - 2],
65
72
  r.value[r.value.length - 1]
66
73
  ];
67
- }, i = () => {
68
- s.trimItems && r.value.length >= 3 ? p() : s.leftTrim && r.value.length >= 3 ? b() : typeof s.items == "object" ? a.value = s.items : console.error("energy-components: The prop is not an Object");
69
- }, k = (e, n) => {
74
+ }, f = () => {
75
+ s.trimItems && r.value.length >= 3 ? p() : s.leftTrim && r.value.length >= 3 ? b() : typeof s.items == "object" ? l.value = s.items : console.error("energy-components: The prop is not an Object");
76
+ }, k = (e, o) => {
70
77
  const t = {
71
78
  ...e,
72
- inverse: l.value,
79
+ inverse: n.value,
73
80
  customClass: "rds-e-breadcrumbs__link--text"
74
81
  };
75
- return n !== a.value.length - 1 && Object.assign(t, {
82
+ return o !== l.value.length - 1 && Object.assign(t, {
76
83
  arrow: !0,
77
84
  right: !0,
78
85
  arrowSmall: !0
79
86
  }), t;
80
87
  }, _ = (e) => ({
81
88
  click: (t) => {
82
- t.preventDefault(), t.stopPropagation(), e != null && e.clickable && d();
89
+ t.preventDefault(), t.stopPropagation(), e != null && e.clickable && m();
83
90
  }
84
91
  }), g = (e) => [
85
92
  "rds-e-breadcrumbs__link",
86
93
  e != null && e.active ? "rds-e-breadcrumbs__link--active" : "",
87
- l.value && (e != null && e.active) ? "rds-e-breadcrumbs__link--inverse-active" : ""
94
+ n.value && (e != null && e.active) ? "rds-e-breadcrumbs__link--inverse-active" : ""
88
95
  ];
89
96
  return L(() => {
90
- i();
97
+ f();
91
98
  }), T(() => {
92
- i();
93
- }), (e, n) => (c(!0), o(I, null, x(a.value, (t, f) => (c(), o("ul", {
94
- key: f,
95
- class: w(["rds-e-breadcrumbs", `${B(l) ? "rds-e-breadcrumbs--inverse" : ""}`])
99
+ f();
100
+ }), (e, o) => (u(!0), i(I, null, w(l.value, (t, c) => (u(), i("ul", {
101
+ id: a.id ? `${a.id}-${c}` : void 0,
102
+ key: c,
103
+ class: x(["rds-e-breadcrumbs", `${B(n) ? "rds-e-breadcrumbs--inverse" : ""}`])
96
104
  }, [
97
- j(O, E({
105
+ j(N, E({
98
106
  class: g(t)
99
- }, { ref_for: !0 }, k(t, f), P(_(t))), {
100
- default: D(() => [
101
- t != null && t.clickable ? (c(), o("span", S, "...")) : N("", !0)
107
+ }, { ref_for: !0 }, k(t, c), P(_(t))), {
108
+ default: S(() => [
109
+ t != null && t.clickable ? (u(), i("span", V, "...")) : D("", !0)
102
110
  ]),
103
111
  _: 2
104
112
  }, 1040, ["class"])
105
- ], 2))), 128));
113
+ ], 10, R))), 128));
106
114
  }
107
- }), F = /* @__PURE__ */ R(V, [["__scopeId", "data-v-ea69b47a"]]);
115
+ }), F = /* @__PURE__ */ O($, [["__scopeId", "data-v-dfc178d7"]]);
108
116
  export {
109
117
  F as default
110
118
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as S, toRefs as x, computed as r, createElementBlock as I, openBlock as b, normalizeClass as m, unref as s, createBlock as $, createCommentVNode as k, createElementVNode as C, renderSlot as N, createTextVNode as R, toDisplayString as V } from "vue";
2
- import { R as D } from "./icon-svg-DuzOdbk1.js";
3
- import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/button.css';const L = ["type", "disabled"], w = { class: "rds-e-btn__text" }, W = /* @__PURE__ */ S({
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-BU0OQFKH.js";
3
+ import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/button.css';const w = ["id", "type", "disabled"], W = { class: "rds-e-btn__text" }, j = /* @__PURE__ */ x({
5
5
  __name: "button",
6
6
  props: {
7
7
  /**
@@ -102,12 +102,19 @@ import './style/button.css';const L = ["type", "disabled"], w = { class: "rds-e-
102
102
  destructive: {
103
103
  type: Boolean,
104
104
  default: !1
105
+ },
106
+ /**
107
+ * <span>ID del botón para testing</span>
108
+ */
109
+ id: {
110
+ type: String,
111
+ default: void 0
105
112
  }
106
113
  },
107
114
  setup(t) {
108
115
  const a = t, {
109
116
  text: l,
110
- icon: n,
117
+ icon: s,
111
118
  type: i,
112
119
  variant: u,
113
120
  small: p,
@@ -116,36 +123,38 @@ import './style/button.css';const L = ["type", "disabled"], w = { class: "rds-e-
116
123
  inverse: c,
117
124
  revertIcon: h,
118
125
  loading: v,
119
- destructive: _
120
- } = x(a), f = r(() => v.value ? "loading" : n != null && n.value ? n == null ? void 0 : n.value : ""), g = r(() => i.value && ["button", "submit", "reset"].includes(i.value) ? i.value : "button"), o = r(() => ["primary", "secondary", "ghost", "commercial"].includes(u.value) ? u.value : "primary"), B = r(() => {
126
+ destructive: _,
127
+ id: g
128
+ } = I(a), f = r(() => v.value ? "loading" : s != null && s.value ? s == null ? void 0 : s.value : ""), B = r(() => i.value && ["button", "submit", "reset"].includes(i.value) ? i.value : "button"), o = r(() => ["primary", "secondary", "ghost", "commercial"].includes(u.value) ? u.value : "primary"), S = r(() => {
121
129
  const e = ["rds-e-btn"];
122
130
  return u.value && e.push(`rds-e-btn--${o.value}`), c.value && e.push(`rds-e-btn--${o.value}-inverse`), f.value && e.push(
123
131
  l != null && l.value ? "rds-e-btn--with-icon" : "rds-e-btn--icon"
124
132
  ), p.value && e.push("rds-e-btn--small"), h.value && e.push("rds-e-btn--revert"), d.value && e.push("rds-e-style-state-disabled"), v.value && e.push("rds-e-btn--loading"), y.value && e.push("rds-e-btn--mobile-width"), _.value && (o.value === "secondary" || o.value === "ghost") && e.push(`rds-e-btn--${o.value}-destructive`), e.join(" ");
125
133
  });
126
- return (e, j) => (b(), I("button", {
127
- type: g.value,
128
- disabled: s(d),
129
- class: m(B.value)
134
+ return (e, z) => (b(), $("button", {
135
+ id: n(g),
136
+ type: B.value,
137
+ disabled: n(d),
138
+ class: m(S.value)
130
139
  }, [
131
- f.value ? (b(), $(D, {
140
+ f.value ? (b(), k(E, {
132
141
  key: 0,
133
142
  name: f.value,
134
- small: s(p),
143
+ small: n(p),
135
144
  class: m(["rds-e-btn__icon", [
136
- s(c) ? `rds-e-btn__icon--${s(c)}` : "",
137
- s(d) ? "rds-e-btn__icon--disabled" : ""
145
+ n(c) ? `rds-e-btn__icon--${n(c)}` : "",
146
+ n(d) ? "rds-e-btn__icon--disabled" : ""
138
147
  ]]),
139
148
  "aria-hidden": "true"
140
- }, null, 8, ["name", "small", "class"])) : k("", !0),
141
- C("span", w, [
142
- N(e.$slots, "default", {}, () => [
143
- R(V(s(l)), 1)
149
+ }, null, 8, ["name", "small", "class"])) : C("", !0),
150
+ N("span", W, [
151
+ R(e.$slots, "default", {}, () => [
152
+ V(D(n(l)), 1)
144
153
  ], !0)
145
154
  ])
146
- ], 10, L));
155
+ ], 10, w));
147
156
  }
148
- }), q = /* @__PURE__ */ E(W, [["__scopeId", "data-v-9550b6cc"]]);
157
+ }), A = /* @__PURE__ */ L(j, [["__scopeId", "data-v-508169ab"]]);
149
158
  export {
150
- q as default
159
+ A as default
151
160
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as s, createElementBlock as o, openBlock as r, normalizeClass as a, renderSlot as c } from "vue";
2
- import { _ as n } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import './style/card.css';const d = /* @__PURE__ */ s({
1
+ import { defineComponent as o, createElementBlock as s, openBlock as d, normalizeClass as r, renderSlot as a } from "vue";
2
+ import { _ as c } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import './style/card.css';const n = ["id"], i = /* @__PURE__ */ o({
4
4
  __name: "card",
5
5
  props: {
6
6
  /**
@@ -9,16 +9,24 @@ import './style/card.css';const d = /* @__PURE__ */ s({
9
9
  customClass: {
10
10
  type: String,
11
11
  default: ""
12
+ },
13
+ /**
14
+ * ID de la card para testing
15
+ */
16
+ id: {
17
+ type: String,
18
+ default: void 0
12
19
  }
13
20
  },
14
21
  setup(e) {
15
- return (t, l) => (r(), o("div", {
16
- class: a(["rds-e-card", e.customClass])
22
+ return (t, l) => (d(), s("div", {
23
+ id: e.id,
24
+ class: r(["rds-e-card", e.customClass])
17
25
  }, [
18
- c(t.$slots, "default", {}, void 0, !0)
19
- ], 2));
26
+ a(t.$slots, "default", {}, void 0, !0)
27
+ ], 10, n));
20
28
  }
21
- }), _ = /* @__PURE__ */ n(d, [["__scopeId", "data-v-f2e83835"]]);
29
+ }), p = /* @__PURE__ */ c(i, [["__scopeId", "data-v-efdb39c8"]]);
22
30
  export {
23
- _ as default
31
+ p as default
24
32
  };