energy-components 1.18.0 → 1.19.0-beta.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.
- package/dist/components/breadcrumbs.es.js +32 -29
- package/dist/components/datepicker.es.js +1642 -1638
- package/dist/components/{floating-ui.vue-7LKzPqHI.js → floating-ui.vue-DWAG1g94.js} +3 -3
- package/dist/components/link.es.js +51 -49
- package/dist/components/popover.es.js +47 -47
- package/dist/components/sidebar.es.js +143 -59
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/sidebar.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/textField.es.js +28 -26
- package/dist/components/tooltip.es.js +135 -84
- package/dist/energy-components.es.js +4689 -4543
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +2 -0
- package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +128 -3
- package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +18 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +10 -6
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -2
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +47 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { c as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/tooltip.css';const
|
|
1
|
+
import { defineComponent as J, toRefs as K, ref as r, computed as _, onBeforeUnmount as Q, createElementBlock as y, openBlock as c, createElementVNode as p, createBlock as Z, renderSlot as C, Teleport as ee, normalizeClass as M, createCommentVNode as D, unref as N, createVNode as te, toDisplayString as O, createTextVNode as oe, nextTick as le } from "vue";
|
|
2
|
+
import { a as ae, c as se, o as ie, f as re, s as ne, b as de, d as ue } from "./floating-ui.vue-DWAG1g94.js";
|
|
3
|
+
import { R as ce } from "./icon-svg-arye8CV8.js";
|
|
4
|
+
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/tooltip.css';const fe = ["id"], me = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-tooltip__header"
|
|
8
|
-
},
|
|
8
|
+
}, ve = { class: "rds-e-tooltip__title" }, he = { class: "rds-e-tooltip__content" }, _e = /* @__PURE__ */ J({
|
|
9
9
|
__name: "tooltip",
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -41,7 +41,6 @@ import './style/tooltip.css';const Z = ["id"], ee = {
|
|
|
41
41
|
large: {
|
|
42
42
|
type: Boolean,
|
|
43
43
|
default: !1
|
|
44
|
-
// Aquí se necesita aclaración, ya que en el original se menciona 'size: 'large'', pero no se define un default para 'large'
|
|
45
44
|
},
|
|
46
45
|
/**
|
|
47
46
|
* <span>Especifica si el tooltip debe ocupar el ancho completo</span>
|
|
@@ -77,6 +76,27 @@ import './style/tooltip.css';const Z = ["id"], ee = {
|
|
|
77
76
|
hideArrow: {
|
|
78
77
|
type: Boolean,
|
|
79
78
|
default: !1
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* <span>Delay (ms) para ocultar el tooltip tras abandonar el trigger o el propio tooltip. Máximo 3000ms.</span>
|
|
82
|
+
*/
|
|
83
|
+
hideDelay: {
|
|
84
|
+
type: Number,
|
|
85
|
+
default: 0
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* <span>Actualiza la posición automáticamente en scroll/resize/mutaciones</span>
|
|
89
|
+
*/
|
|
90
|
+
autoUpdate: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !0
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* <span>Selector para teleport (ej: 'body', '#modal-container'). Si no se especifica se renderiza inline.</span>
|
|
96
|
+
*/
|
|
97
|
+
teleportTo: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: null
|
|
80
100
|
}
|
|
81
101
|
},
|
|
82
102
|
emits: [
|
|
@@ -91,114 +111,145 @@ import './style/tooltip.css';const Z = ["id"], ee = {
|
|
|
91
111
|
*/
|
|
92
112
|
"hide"
|
|
93
113
|
],
|
|
94
|
-
setup(l, { expose:
|
|
95
|
-
const
|
|
114
|
+
setup(l, { expose: E, emit: H }) {
|
|
115
|
+
const a = l, n = H, { large: g, fullWidth: V, title: s, inverse: j } = K(a), d = r(), i = r(), f = r(), e = r(!0), T = r("");
|
|
116
|
+
let o = null, m = !1, v = !1, t = null;
|
|
117
|
+
const x = _(() => Math.min(Math.max(a.hideDelay, 0), 3e3)), I = _(() => ({
|
|
96
118
|
"rds-e-tooltip__tooltip": !0,
|
|
97
119
|
"rds-e-tooltip__tooltip-hidden": e.value,
|
|
98
|
-
"rds-e-tooltip__tooltip--large":
|
|
99
|
-
"rds-e-tooltip__tooltip--inverse":
|
|
100
|
-
})),
|
|
101
|
-
const { x:
|
|
102
|
-
|
|
103
|
-
|
|
120
|
+
"rds-e-tooltip__tooltip--large": g.value,
|
|
121
|
+
"rds-e-tooltip__tooltip--inverse": j.value
|
|
122
|
+
})), w = async () => {
|
|
123
|
+
const { x: u, y: k, middlewareData: F, placement: B } = await se(
|
|
124
|
+
d.value,
|
|
125
|
+
i.value,
|
|
104
126
|
{
|
|
105
|
-
placement:
|
|
127
|
+
placement: a.placement,
|
|
106
128
|
middleware: [
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
apply({ availableHeight:
|
|
112
|
-
Object.assign(
|
|
113
|
-
maxWidth:
|
|
129
|
+
ie(a.offsetSpace),
|
|
130
|
+
re(),
|
|
131
|
+
ne(),
|
|
132
|
+
de({
|
|
133
|
+
apply({ availableHeight: Y, availableWidth: q, elements: G }) {
|
|
134
|
+
Object.assign(G.floating.style, {
|
|
135
|
+
maxWidth: V.value ? `${Math.max(0, q)}px` : "380px",
|
|
114
136
|
width: "max-content",
|
|
115
|
-
maxHeight: `${Math.max(0,
|
|
137
|
+
maxHeight: `${Math.max(0, Y)}px`
|
|
116
138
|
});
|
|
117
139
|
}
|
|
118
140
|
}),
|
|
119
|
-
|
|
120
|
-
element:
|
|
121
|
-
padding:
|
|
141
|
+
ue({
|
|
142
|
+
element: f.value,
|
|
143
|
+
padding: g.value ? 16 : 8
|
|
122
144
|
})
|
|
123
145
|
]
|
|
124
146
|
}
|
|
125
147
|
);
|
|
126
|
-
Object.assign(
|
|
127
|
-
left: `${
|
|
128
|
-
top: `${
|
|
148
|
+
Object.assign(i.value.style, {
|
|
149
|
+
left: `${u}px`,
|
|
150
|
+
top: `${k}px`
|
|
129
151
|
});
|
|
130
|
-
const { x, y:
|
|
152
|
+
const { x: R, y: $ } = F.arrow, X = {
|
|
131
153
|
left: "right",
|
|
132
154
|
right: "left",
|
|
133
155
|
bottom: "top",
|
|
134
156
|
top: "bottom"
|
|
135
157
|
};
|
|
136
|
-
|
|
137
|
-
left:
|
|
138
|
-
top:
|
|
158
|
+
T.value = `rds-e-tooltip__tooltip-arrow--${B}`, Object.assign(f.value.style, {
|
|
159
|
+
left: R != null ? `${R}px` : "",
|
|
160
|
+
top: $ != null ? `${$}px` : "",
|
|
139
161
|
bottom: "",
|
|
140
162
|
right: "",
|
|
141
|
-
[
|
|
163
|
+
[X[B.split("-")[0]]]: "-4px"
|
|
142
164
|
});
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
s.
|
|
147
|
-
V();
|
|
148
|
-
}));
|
|
165
|
+
}, U = () => {
|
|
166
|
+
clearTimeout(o), e.value ? e.value = !0 : (e.value = !0, n("hide"));
|
|
167
|
+
}, S = () => {
|
|
168
|
+
s != null && s.value || (e.value ? e.value = !0 : (e.value = !0, n("hide"))), clearTimeout(o);
|
|
149
169
|
}, h = () => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
170
|
+
a.suppressed || (clearTimeout(o), e.value = !1, n("show"), le(() => {
|
|
171
|
+
w(), a.autoUpdate && d.value && i.value && (t == null || t(), t = ae(
|
|
172
|
+
d.value,
|
|
173
|
+
i.value,
|
|
174
|
+
() => {
|
|
175
|
+
w();
|
|
176
|
+
}
|
|
177
|
+
));
|
|
178
|
+
}));
|
|
179
|
+
}, W = () => {
|
|
180
|
+
v = !0, h();
|
|
181
|
+
}, z = () => {
|
|
182
|
+
v = !1, o = setTimeout(() => {
|
|
183
|
+
m || S();
|
|
184
|
+
}, x.value);
|
|
185
|
+
}, A = () => {
|
|
186
|
+
m = !0, clearTimeout(o);
|
|
187
|
+
}, L = () => {
|
|
188
|
+
m = !1, v || (o = setTimeout(() => {
|
|
189
|
+
S();
|
|
190
|
+
}, x.value));
|
|
191
|
+
}, b = () => {
|
|
192
|
+
e.value || (e.value = !0, n("hide"), t && (t(), t = null));
|
|
193
|
+
}, P = () => {
|
|
194
|
+
b();
|
|
153
195
|
};
|
|
154
|
-
return
|
|
155
|
-
show:
|
|
156
|
-
hide:
|
|
157
|
-
isOpen:
|
|
158
|
-
}), (
|
|
196
|
+
return E({
|
|
197
|
+
show: h,
|
|
198
|
+
hide: b,
|
|
199
|
+
isOpen: _(() => !e.value)
|
|
200
|
+
}), Q(() => {
|
|
201
|
+
clearTimeout(o), t && (t(), t = null);
|
|
202
|
+
}), (u, k) => (c(), y("div", {
|
|
159
203
|
id: l.id,
|
|
160
204
|
class: "rds-e-tooltip"
|
|
161
205
|
}, [
|
|
162
|
-
|
|
206
|
+
p("div", {
|
|
163
207
|
ref_key: "referenceRef",
|
|
164
|
-
ref:
|
|
208
|
+
ref: d,
|
|
165
209
|
class: "rds-e-tooltip__trigger",
|
|
166
|
-
onBlur:
|
|
167
|
-
onFocus:
|
|
168
|
-
onMouseenter:
|
|
169
|
-
onMouseleave:
|
|
210
|
+
onBlur: U,
|
|
211
|
+
onFocus: h,
|
|
212
|
+
onMouseenter: W,
|
|
213
|
+
onMouseleave: z
|
|
170
214
|
}, [
|
|
171
|
-
|
|
215
|
+
C(u.$slots, "default", {}, void 0, !0)
|
|
172
216
|
], 544),
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
class: R(O.value)
|
|
217
|
+
(c(), Z(ee, {
|
|
218
|
+
to: l.teleportTo,
|
|
219
|
+
disabled: !l.teleportTo
|
|
177
220
|
}, [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
221
|
+
p("div", {
|
|
222
|
+
ref_key: "floatingRef",
|
|
223
|
+
ref: i,
|
|
224
|
+
class: M(I.value),
|
|
225
|
+
onMouseenter: A,
|
|
226
|
+
onMouseleave: L
|
|
227
|
+
}, [
|
|
228
|
+
N(s) ? (c(), y("div", me, [
|
|
229
|
+
p("h3", ve, O(N(s)), 1),
|
|
230
|
+
te(ce, {
|
|
231
|
+
name: "close",
|
|
232
|
+
"aria-hidden": "true",
|
|
233
|
+
class: "rds-e-tooltip__icon",
|
|
234
|
+
onClick: P
|
|
235
|
+
})
|
|
236
|
+
])) : D("", !0),
|
|
237
|
+
p("div", he, [
|
|
238
|
+
C(u.$slots, "tooltip-content", {}, () => [
|
|
239
|
+
oe(O(l.content), 1)
|
|
240
|
+
], !0)
|
|
241
|
+
]),
|
|
242
|
+
l.hideArrow ? D("", !0) : (c(), y("div", {
|
|
243
|
+
key: 1,
|
|
244
|
+
ref_key: "arrowRef",
|
|
245
|
+
ref: f,
|
|
246
|
+
class: M(["rds-e-tooltip__tooltip-arrow", T.value])
|
|
247
|
+
}, null, 2))
|
|
248
|
+
], 34)
|
|
249
|
+
], 8, ["to", "disabled"]))
|
|
250
|
+
], 8, fe));
|
|
200
251
|
}
|
|
201
|
-
}),
|
|
252
|
+
}), we = /* @__PURE__ */ pe(_e, [["__scopeId", "data-v-5a12657d"]]);
|
|
202
253
|
export {
|
|
203
|
-
|
|
254
|
+
we as default
|
|
204
255
|
};
|