energy-components 2.0.0-beta.3 → 2.0.0-beta.4
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.
- package/dist/components/dropdown.es.js +252 -223
- package/dist/components/indicator.es.js +137 -81
- package/dist/components/link.es.js +7 -7
- package/dist/components/multiselect.es.js +104 -51
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/collapsable.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/toggle.css +1 -1
- package/dist/components/tag.es.js +33 -22
- package/dist/components/toggle.es.js +31 -26
- package/dist/energy-components.css +1 -1
- package/dist/energy-components.es.js +5002 -4849
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +3 -3
- package/dist/types/src/components/buttons/button/button.vue.d.ts +4 -4
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +3 -3
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +1 -1
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +2 -2
- package/dist/types/src/components/content/table/table.vue.d.ts +1 -1
- package/dist/types/src/components/content/tag/tag.vue.d.ts +23 -2
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +88 -1
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +3 -3
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +3 -3
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +2 -2
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +7 -7
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +2 -2
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +4 -4
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +3 -3
- package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +1 -1
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +4 -4
- package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
- package/dist/types/src/components/input/text-area/text-area.vue.d.ts +2 -2
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +7 -7
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +7 -0
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +4 -4
- package/dist/types/src/components/navigation/link/link.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +2 -2
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +7 -7
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +5 -5
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +9 -9
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/llms/rdsindicator.md +5 -0
- package/llms/rdstag.md +1 -0
- package/llms/rdstoggle.md +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as q, toRefs as C, ref as B, computed as I, watch as $, onMounted as P, onBeforeUnmount as T, createElementBlock as d, openBlock as l, normalizeClass as A, createElementVNode as f, normalizeStyle as W, Fragment as D, renderList as F, createCommentVNode as _, createBlock as M, toDisplayString as g, unref as u, createTextVNode as U } from "vue";
|
|
2
|
+
import { d as X, t as L, a as Y } from "./functions-D3GA3OzJ.js";
|
|
3
|
+
import { R as j } from "./icon-svg-CTR8GnC2.js";
|
|
4
|
+
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/indicator.css';const H = ["id"], J = { class: "rds-e-indicator__inner" }, K = { class: "rds-e-indicator__step-content" }, O = { key: 0 }, Q = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "rds-e-indicator__number"
|
|
8
|
+
}, Z = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "rds-e-indicator__detail"
|
|
11
|
+
}, x = /* @__PURE__ */ q({
|
|
5
12
|
__name: "indicator",
|
|
6
13
|
props: {
|
|
7
14
|
/**
|
|
@@ -11,7 +18,7 @@ import './style/indicator.css';const D = ["id"], M = { class: "rds-e-indicator__
|
|
|
11
18
|
type: Array,
|
|
12
19
|
required: !0,
|
|
13
20
|
validator(a) {
|
|
14
|
-
return !Array.isArray(a) || a.length === 0 ? (console.warn("Advertencia: steps debe ser un array no vacío de strings."), !1) : a.every((
|
|
21
|
+
return !Array.isArray(a) || a.length === 0 ? (console.warn("Advertencia: steps debe ser un array no vacío de strings."), !1) : a.every((i) => typeof i != "string" ? (console.warn(`Advertencia: Todos los elementos en steps deben ser strings. Encontrado: ${typeof i}`), !1) : /^[a-z0-9\s\u00C0-\u017F]+$/i.test(i) ? !0 : (console.warn(`Advertencia: El paso "${i}" contiene caracteres no permitidos. Solo se permiten letras, números y espacios.`), !1));
|
|
15
22
|
}
|
|
16
23
|
},
|
|
17
24
|
/**
|
|
@@ -38,6 +45,46 @@ import './style/indicator.css';const D = ["id"], M = { class: "rds-e-indicator__
|
|
|
38
45
|
type: String,
|
|
39
46
|
default: "default"
|
|
40
47
|
},
|
|
48
|
+
/**
|
|
49
|
+
* Estilo de numeración de pasos.
|
|
50
|
+
* 'none' mantiene el comportamiento anterior (número dentro del bullet).
|
|
51
|
+
* 'outside' muestra el número fuera del bullet.
|
|
52
|
+
* 'inline' integra la numeración en el título del paso.
|
|
53
|
+
*/
|
|
54
|
+
numbering: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "none"
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Mostrar etiquetas (labels). En variante 'small' se ocultan siempre.
|
|
60
|
+
*/
|
|
61
|
+
showLabels: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !0
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* Tipo de contenido interno del item.
|
|
67
|
+
* - 'empty': bullet sin contenido (por defecto). Si numbering es 'none', se mantiene número dentro para compatibilidad.
|
|
68
|
+
* - 'icon': muestra un icono dentro del bullet.
|
|
69
|
+
*/
|
|
70
|
+
itemContent: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "empty"
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Lista opcional de iconos (nombres) a renderizar por paso cuando itemContent='icon'.
|
|
76
|
+
*/
|
|
77
|
+
icons: {
|
|
78
|
+
type: Array,
|
|
79
|
+
default: void 0
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* Detalles opcionales por paso. Si existe un detalle en el índice, se mostrará bajo el título.
|
|
83
|
+
*/
|
|
84
|
+
details: {
|
|
85
|
+
type: Array,
|
|
86
|
+
default: void 0
|
|
87
|
+
},
|
|
41
88
|
/**
|
|
42
89
|
* Si el indicador debe ocupar todo el ancho.
|
|
43
90
|
*/
|
|
@@ -61,122 +108,131 @@ import './style/indicator.css';const D = ["id"], M = { class: "rds-e-indicator__
|
|
|
61
108
|
}
|
|
62
109
|
},
|
|
63
110
|
setup(a) {
|
|
64
|
-
const
|
|
65
|
-
direction:
|
|
66
|
-
currentStep:
|
|
67
|
-
steps:
|
|
68
|
-
fullWidth:
|
|
69
|
-
} =
|
|
70
|
-
let r =
|
|
71
|
-
const
|
|
111
|
+
const e = a, {
|
|
112
|
+
direction: i,
|
|
113
|
+
currentStep: m,
|
|
114
|
+
steps: k,
|
|
115
|
+
fullWidth: E
|
|
116
|
+
} = C(e), v = B(null), y = B(null), p = B([]), b = C(e).icons?.value, h = C(e).details?.value, z = (r, t) => e.numbering === "inline" ? `${t + 1}. ${r}` : r, N = I(() => {
|
|
117
|
+
let r = e.currentStep;
|
|
118
|
+
const t = e.steps.length, n = i.value === "vertical" ? "height" : "width";
|
|
72
119
|
if (r < 1)
|
|
73
120
|
return {
|
|
74
|
-
[
|
|
121
|
+
[n]: "0%"
|
|
75
122
|
};
|
|
76
|
-
if (r >
|
|
123
|
+
if (r > t && (r = t), t === 1)
|
|
77
124
|
return {
|
|
78
|
-
[
|
|
125
|
+
[n]: "100%"
|
|
79
126
|
};
|
|
80
|
-
const
|
|
127
|
+
const s = (r - 1) / (t - 1) * 100, o = r < t ? 100 / (t - 1) / 2 : 0;
|
|
81
128
|
return {
|
|
82
|
-
[
|
|
129
|
+
[n]: `${s + o}%`
|
|
83
130
|
};
|
|
84
|
-
}),
|
|
85
|
-
if (
|
|
86
|
-
const r =
|
|
87
|
-
if (
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
r.style.left = `${
|
|
131
|
+
}), R = () => {
|
|
132
|
+
if (v.value && y.value) {
|
|
133
|
+
const r = y.value, t = p.value[0];
|
|
134
|
+
if (t) {
|
|
135
|
+
if (i.value === "vertical") {
|
|
136
|
+
const n = t.getBoundingClientRect(), s = v.value.getBoundingClientRect(), o = n.left + n.width / 2 - s.left;
|
|
137
|
+
r.style.left = `${o}px`;
|
|
91
138
|
}
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
94
|
-
r.style.top = `${
|
|
139
|
+
if (i.value === "horizontal") {
|
|
140
|
+
const n = t.getBoundingClientRect(), s = v.value.getBoundingClientRect(), o = n.top + n.height / 2 - s.top;
|
|
141
|
+
r.style.top = `${o}px`;
|
|
95
142
|
}
|
|
96
143
|
}
|
|
97
144
|
}
|
|
98
|
-
},
|
|
99
|
-
const
|
|
145
|
+
}, V = (r) => {
|
|
146
|
+
const t = r === 0 || r === e.steps.length - 1, n = !t;
|
|
100
147
|
return {
|
|
101
148
|
"rds-e-indicator__step-wrapper--first": r === 0,
|
|
102
|
-
"rds-e-indicator__step-wrapper--last": r ===
|
|
103
|
-
"rds-e-indicator__step-wrapper--side":
|
|
104
|
-
"rds-e-indicator__step-wrapper--central":
|
|
149
|
+
"rds-e-indicator__step-wrapper--last": r === e.steps.length - 1,
|
|
150
|
+
"rds-e-indicator__step-wrapper--side": t,
|
|
151
|
+
"rds-e-indicator__step-wrapper--central": n
|
|
105
152
|
};
|
|
106
|
-
},
|
|
107
|
-
!
|
|
108
|
-
const
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
|
|
153
|
+
}, S = () => {
|
|
154
|
+
!e.steps || !e.steps.length || e.steps.forEach((r, t) => {
|
|
155
|
+
const n = t < m.value, s = t === m.value - 1;
|
|
156
|
+
let o = p.value[t]?.classList, c = [];
|
|
157
|
+
o && (o = Array.from(o), c = Array.from(o), c = L(
|
|
158
|
+
c,
|
|
112
159
|
"rds-e-indicator__bullet--active",
|
|
113
|
-
|
|
114
|
-
),
|
|
115
|
-
|
|
160
|
+
n
|
|
161
|
+
), c = L(
|
|
162
|
+
c,
|
|
116
163
|
"rds-e-indicator__bullet--current",
|
|
117
|
-
|
|
118
|
-
),
|
|
119
|
-
|
|
164
|
+
s
|
|
165
|
+
), Y(o, c) || setTimeout(() => {
|
|
166
|
+
p.value[t].classList.remove(...o), p.value[t].classList.add(...c);
|
|
120
167
|
}, 150));
|
|
121
168
|
});
|
|
122
|
-
},
|
|
123
|
-
|
|
169
|
+
}, w = () => {
|
|
170
|
+
R();
|
|
124
171
|
};
|
|
125
|
-
return
|
|
126
|
-
[
|
|
172
|
+
return $(
|
|
173
|
+
[i, k, E],
|
|
127
174
|
() => {
|
|
128
|
-
|
|
175
|
+
w(), S();
|
|
129
176
|
},
|
|
130
177
|
{ immediate: !0 }
|
|
131
|
-
),
|
|
132
|
-
|
|
133
|
-
}),
|
|
134
|
-
|
|
135
|
-
}),
|
|
136
|
-
window.removeEventListener("resize",
|
|
137
|
-
}), (r,
|
|
178
|
+
), $(m, () => {
|
|
179
|
+
S();
|
|
180
|
+
}), P(() => {
|
|
181
|
+
R(), S(), window.addEventListener("resize", X(w, 200)), e.variant === "small" && e.itemContent === "icon" && console.warn('RDSIndicator: Los iconos dentro del bullet no están soportados en la variante "small". El icono no se renderizará.');
|
|
182
|
+
}), T(() => {
|
|
183
|
+
window.removeEventListener("resize", w);
|
|
184
|
+
}), (r, t) => (l(), d("div", {
|
|
138
185
|
id: a.id,
|
|
139
186
|
ref_key: "$indicator",
|
|
140
|
-
ref:
|
|
141
|
-
class:
|
|
142
|
-
`rds-e-indicator--${
|
|
143
|
-
{ "rds-e-indicator--small":
|
|
144
|
-
{ "rds-e-indicator--full-width":
|
|
187
|
+
ref: v,
|
|
188
|
+
class: A(["rds-e-indicator", [
|
|
189
|
+
`rds-e-indicator--${e.direction}`,
|
|
190
|
+
{ "rds-e-indicator--small": e.variant === "small" },
|
|
191
|
+
{ "rds-e-indicator--full-width": e.fullWidth }
|
|
145
192
|
]])
|
|
146
193
|
}, [
|
|
147
|
-
|
|
148
|
-
|
|
194
|
+
f("div", J, [
|
|
195
|
+
f("div", {
|
|
149
196
|
ref_key: "$progressBar",
|
|
150
|
-
ref:
|
|
197
|
+
ref: y,
|
|
151
198
|
class: "rds-e-indicator__progress-bar"
|
|
152
199
|
}, [
|
|
153
|
-
|
|
200
|
+
f("div", {
|
|
154
201
|
class: "rds-e-indicator__progress-bar__fill",
|
|
155
|
-
style:
|
|
202
|
+
style: W(N.value)
|
|
156
203
|
}, null, 4)
|
|
157
204
|
], 512),
|
|
158
|
-
(
|
|
159
|
-
key:
|
|
160
|
-
class:
|
|
205
|
+
(l(!0), d(D, null, F(e.steps, (n, s) => (l(), d("div", {
|
|
206
|
+
key: s,
|
|
207
|
+
class: A(["rds-e-indicator__step-wrapper", V(s)])
|
|
161
208
|
}, [
|
|
162
|
-
|
|
163
|
-
|
|
209
|
+
f("div", K, [
|
|
210
|
+
f("div", {
|
|
164
211
|
ref_for: !0,
|
|
165
|
-
ref: (
|
|
212
|
+
ref: (o) => p.value[s] = o,
|
|
166
213
|
class: "rds-e-indicator__bullet"
|
|
167
214
|
}, [
|
|
168
|
-
|
|
215
|
+
e.variant !== "small" && e.numbering === "none" && e.itemContent === "empty" ? (l(), d("span", O, g(s + 1), 1)) : _("", !0),
|
|
216
|
+
e.itemContent === "icon" && e.variant !== "small" && u(b) && u(b)[s] ? (l(), M(j, {
|
|
217
|
+
key: 1,
|
|
218
|
+
name: u(b)[s],
|
|
219
|
+
class: "rds-e-indicator__icon"
|
|
220
|
+
}, null, 8, ["name"])) : _("", !0)
|
|
169
221
|
], 512)
|
|
170
222
|
]),
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
223
|
+
e.numbering === "outside" ? (l(), d("div", Q, g(s + 1), 1)) : _("", !0),
|
|
224
|
+
e.variant !== "small" && e.showLabels ? (l(), d("div", {
|
|
225
|
+
key: 1,
|
|
226
|
+
class: A(["rds-e-indicator__label", { "rds-e-indicator__label--ellipsis": e.ellipsis }])
|
|
227
|
+
}, [
|
|
228
|
+
U(g(z(n, s)) + " ", 1),
|
|
229
|
+
u(h) && u(h)[s] ? (l(), d("div", Z, g(u(h)[s]), 1)) : _("", !0)
|
|
230
|
+
], 2)) : _("", !0)
|
|
175
231
|
], 2))), 128))
|
|
176
232
|
])
|
|
177
|
-
], 10,
|
|
233
|
+
], 10, H));
|
|
178
234
|
}
|
|
179
|
-
}),
|
|
235
|
+
}), ne = /* @__PURE__ */ G(x, [["__scopeId", "data-v-942bba3b"]]);
|
|
180
236
|
export {
|
|
181
|
-
|
|
237
|
+
ne as default
|
|
182
238
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, useAttrs as z, computed as o, createBlock as
|
|
1
|
+
import { defineComponent as B, useAttrs as z, computed as o, createBlock as a, openBlock as t, resolveDynamicComponent as I, mergeProps as s, withCtx as D, createCommentVNode as i, createElementBlock as _, normalizeClass as k, renderSlot as g, createTextVNode as y, toDisplayString as h } from "vue";
|
|
2
2
|
import { s as j } from "./functions-D3GA3OzJ.js";
|
|
3
3
|
import { R as l } from "./icon-svg-CTR8GnC2.js";
|
|
4
4
|
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -120,7 +120,7 @@ import './style/link.css';const O = /* @__PURE__ */ B({
|
|
|
120
120
|
}
|
|
121
121
|
v("click", r);
|
|
122
122
|
}, f = o(() => e.icon?.size ?? 14);
|
|
123
|
-
return (r, m) => (t(),
|
|
123
|
+
return (r, m) => (t(), a(I(e.tag === "a" ? e.tag : "router-link"), s({
|
|
124
124
|
id: e.id,
|
|
125
125
|
class: x.value,
|
|
126
126
|
to: e.tag === "router-link" ? e.to : null,
|
|
@@ -128,12 +128,12 @@ import './style/link.css';const O = /* @__PURE__ */ B({
|
|
|
128
128
|
}, r.$attrs, {
|
|
129
129
|
rel: S.value,
|
|
130
130
|
style: w.value,
|
|
131
|
-
tabindex: e.disabled ? -1 :
|
|
131
|
+
tabindex: e.disabled ? -1 : 0,
|
|
132
132
|
"aria-disabled": e.disabled,
|
|
133
133
|
onClick: C
|
|
134
134
|
}), {
|
|
135
135
|
default: D(() => [
|
|
136
|
-
e.icon.name && !e.right && !e.arrow ? (t(),
|
|
136
|
+
e.icon.name && !e.right && !e.arrow ? (t(), a(l, s({
|
|
137
137
|
key: 0,
|
|
138
138
|
name: e.icon.name
|
|
139
139
|
}, {
|
|
@@ -154,7 +154,7 @@ import './style/link.css';const O = /* @__PURE__ */ B({
|
|
|
154
154
|
y(h(e.text), 1)
|
|
155
155
|
], !0)
|
|
156
156
|
], 2)) : i("", !0),
|
|
157
|
-
e.arrow ? (t(),
|
|
157
|
+
e.arrow ? (t(), a(l, s({ key: 2 }, {
|
|
158
158
|
name: e.right ? "arrow_right" : "arrow_left",
|
|
159
159
|
size: e.arrowSmall ? 16 : void 0
|
|
160
160
|
}, {
|
|
@@ -172,7 +172,7 @@ import './style/link.css';const O = /* @__PURE__ */ B({
|
|
|
172
172
|
y(h(e.text), 1)
|
|
173
173
|
], !0)
|
|
174
174
|
], 2)),
|
|
175
|
-
e.icon.name && e.right && !e.arrow ? (t(),
|
|
175
|
+
e.icon.name && e.right && !e.arrow ? (t(), a(l, s({
|
|
176
176
|
key: 4,
|
|
177
177
|
name: e.icon.name
|
|
178
178
|
}, e.icon, {
|
|
@@ -184,7 +184,7 @@ import './style/link.css';const O = /* @__PURE__ */ B({
|
|
|
184
184
|
_: 3
|
|
185
185
|
}, 16, ["id", "class", "to", "href", "rel", "style", "tabindex", "aria-disabled"]));
|
|
186
186
|
}
|
|
187
|
-
}), N = /* @__PURE__ */ A(O, [["__scopeId", "data-v-
|
|
187
|
+
}), N = /* @__PURE__ */ A(O, [["__scopeId", "data-v-f0ad4a8d"]]);
|
|
188
188
|
export {
|
|
189
189
|
N as default
|
|
190
190
|
};
|