energy-components 1.19.0-beta.0 → 1.20.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/{floating-ui.vue-DWAG1g94.js → floating-ui.vue-oA1DfKeS.js} +2 -2
- package/dist/components/index.es.js +43 -40
- package/dist/components/popover.es.js +3 -3
- package/dist/components/popoverMenu.es.js +125 -0
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/popoverMenu.css +1 -0
- package/dist/components/style/sidedrawer.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 +93 -96
- package/dist/components/tooltip.es.js +113 -111
- package/dist/energy-components.es.js +3143 -3025
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +14 -10
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +73 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/textField.css';const
|
|
1
|
+
import { defineComponent as ne, toRefs as oe, ref as c, computed as v, watch as q, onMounted as se, onBeforeUnmount as re, createElementBlock as B, openBlock as f, normalizeClass as S, createElementVNode as m, createCommentVNode as h, renderSlot as L, createBlock as T, mergeProps as M, toHandlers as ie, unref as d, toDisplayString as A, withModifiers as ue } from "vue";
|
|
2
|
+
import { g as de } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { R as E, s as ce } from "./icon-svg-arye8CV8.js";
|
|
4
|
+
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/textField.css';const pe = { class: "rds-e-textfield__input-container" }, ve = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly"], me = ["for"], he = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
8
|
-
},
|
|
8
|
+
}, ye = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "rds-e-textfield__helper"
|
|
11
|
-
},
|
|
11
|
+
}, ge = /* @__PURE__ */ ne({
|
|
12
12
|
__name: "text-field",
|
|
13
13
|
props: {
|
|
14
14
|
/**
|
|
@@ -56,19 +56,22 @@ import './style/textField.css';const he = { class: "rds-e-textfield__input-conta
|
|
|
56
56
|
},
|
|
57
57
|
/**
|
|
58
58
|
* Número máximo de caracteres permitidos en el campo de entrada.
|
|
59
|
+
* Si no se especifica, el componente no establecerá atributo maxlength (sin límite impuesto por la librería).
|
|
60
|
+
* Recomendación: establecerlo sólo cuando exista una restricción funcional o de negocio.
|
|
59
61
|
*/
|
|
60
62
|
maxLength: {
|
|
61
63
|
type: Number,
|
|
62
|
-
|
|
63
|
-
validator: (t) => t
|
|
64
|
+
required: !1,
|
|
65
|
+
validator: (t) => t == null ? !0 : typeof t != "number" || Number.isNaN(t) ? (console.info("El valor de maxLength debe ser un número"), !1) : t < 0 ? (console.info("El valor de maxLength no puede ser menor a 0"), !1) : !0
|
|
64
66
|
},
|
|
65
67
|
/**
|
|
66
68
|
* Número mínimo de caracteres permitidos en el campo de entrada.
|
|
69
|
+
* Si no se especifica, no se añade el atributo `minlength` al `<input>`.
|
|
67
70
|
*/
|
|
68
71
|
minLength: {
|
|
69
72
|
type: Number,
|
|
70
|
-
|
|
71
|
-
validator: (t) => t
|
|
73
|
+
required: !1,
|
|
74
|
+
validator: (t) => t == null ? !0 : typeof t != "number" || Number.isNaN(t) ? (console.info("El valor de minLength debe ser un número"), !1) : t < 0 ? (console.info("El valor de minLength no puede ser menor a 0"), !1) : !0
|
|
72
75
|
},
|
|
73
76
|
/**
|
|
74
77
|
* Tipo del input HTML. Por defecto 'text'.
|
|
@@ -156,67 +159,61 @@ import './style/textField.css';const he = { class: "rds-e-textfield__input-conta
|
|
|
156
159
|
emits: ["update:modelValue", "clear", "keydown", "keyup", "keypress", "change"],
|
|
157
160
|
setup(t, { expose: s, emit: r }) {
|
|
158
161
|
const n = t, i = r, {
|
|
159
|
-
type:
|
|
160
|
-
label:
|
|
162
|
+
type: y,
|
|
163
|
+
label: K,
|
|
161
164
|
disabled: N,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
helperText: z,
|
|
170
|
-
clearable: H,
|
|
165
|
+
modelValue: g,
|
|
166
|
+
icon: P,
|
|
167
|
+
rightIcon: j,
|
|
168
|
+
helper: W,
|
|
169
|
+
error: V,
|
|
170
|
+
helperText: O,
|
|
171
|
+
clearable: U,
|
|
171
172
|
password: _,
|
|
172
|
-
autocomplete:
|
|
173
|
-
fullWidth:
|
|
174
|
-
} =
|
|
175
|
-
if (_.value ||
|
|
176
|
-
return
|
|
177
|
-
}),
|
|
173
|
+
autocomplete: z,
|
|
174
|
+
fullWidth: H
|
|
175
|
+
} = oe(n), a = c(null), p = c(!0), x = c(!1), b = c(!1), w = c(!1), G = de(), k = c(""), I = v(() => n.id || `text-field-${G}`), J = v(() => _.value ? p.value ? "text" : "password" : ["text", "number", "password", "email", "tel", "url"].includes(y.value) ? y.value : "text"), Q = v(() => {
|
|
176
|
+
if (_.value || y.value === "password")
|
|
177
|
+
return z.value;
|
|
178
|
+
}), X = (e) => {
|
|
178
179
|
const l = e.target;
|
|
179
|
-
let
|
|
180
|
-
if (
|
|
180
|
+
let u = l.value;
|
|
181
|
+
if (y.value === "number")
|
|
181
182
|
if (l.value.trim() === "")
|
|
182
|
-
|
|
183
|
+
u = null;
|
|
183
184
|
else {
|
|
184
185
|
const R = Number.parseFloat(l.value);
|
|
185
|
-
|
|
186
|
+
u = Number.isNaN(R) ? l.value : R;
|
|
186
187
|
}
|
|
187
|
-
else l.value === "" &&
|
|
188
|
-
i("update:modelValue",
|
|
189
|
-
},
|
|
188
|
+
else l.value === "" && g.value === null && (u = null);
|
|
189
|
+
i("update:modelValue", u);
|
|
190
|
+
}, Y = () => {
|
|
190
191
|
w.value = !0;
|
|
191
192
|
}, C = () => {
|
|
192
193
|
x.value = !1, b.value = !1, w.value = !1;
|
|
193
194
|
}, $ = () => {
|
|
194
195
|
x.value = !0, b.value = !w.value, w.value = !1;
|
|
195
|
-
},
|
|
196
|
+
}, Z = (e) => {
|
|
196
197
|
i("keydown", e);
|
|
197
|
-
},
|
|
198
|
+
}, ee = (e) => {
|
|
198
199
|
i("keyup", e);
|
|
199
|
-
},
|
|
200
|
+
}, te = (e) => {
|
|
200
201
|
i("keypress", e);
|
|
201
|
-
},
|
|
202
|
+
}, le = (e) => {
|
|
202
203
|
i("change", e);
|
|
203
|
-
},
|
|
204
|
-
if (L.value) return !0;
|
|
205
|
-
const e = u.value === null || u.value === void 0 ? "" : String(u.value);
|
|
206
|
-
return e.length > 0 && (e.length < q.value || m.value !== "number" && e.length > j.value);
|
|
207
|
-
}), se = v(() => {
|
|
204
|
+
}, ae = v(() => {
|
|
208
205
|
const e = [];
|
|
209
|
-
return k.value !== "" && e.push(k.value),
|
|
206
|
+
return k.value !== "" && e.push(k.value), g.value !== null && String(g.value).length > 0 && e.push("rds-e-textfield--filled"), V.value && e.push("rds-e-textfield--error"), N.value && e.push("rds-e-textfield--disabled"), H.value && e.push("rds-e-textfield--full-width"), e.join(" ");
|
|
210
207
|
});
|
|
211
|
-
|
|
212
|
-
() =>
|
|
208
|
+
q(
|
|
209
|
+
() => g.value,
|
|
213
210
|
(e) => {
|
|
214
211
|
e !== null && String(e).length > 0 && (k.value = "");
|
|
215
212
|
}
|
|
216
213
|
);
|
|
217
214
|
const o = v(() => {
|
|
218
215
|
const e = {
|
|
219
|
-
name:
|
|
216
|
+
name: P.value,
|
|
220
217
|
class: "",
|
|
221
218
|
events: {
|
|
222
219
|
click: () => {
|
|
@@ -228,7 +225,7 @@ import './style/textField.css';const he = { class: "rds-e-textfield__input-conta
|
|
|
228
225
|
},
|
|
229
226
|
right: {
|
|
230
227
|
...e,
|
|
231
|
-
name:
|
|
228
|
+
name: j.value
|
|
232
229
|
}
|
|
233
230
|
};
|
|
234
231
|
return _.value ? {
|
|
@@ -238,13 +235,13 @@ import './style/textField.css';const he = { class: "rds-e-textfield__input-conta
|
|
|
238
235
|
},
|
|
239
236
|
right: {
|
|
240
237
|
...e,
|
|
241
|
-
name:
|
|
238
|
+
name: p.value ? "eye_open" : "eye_close",
|
|
242
239
|
class: "rds-e-textfield__icon--password",
|
|
243
240
|
events: {
|
|
244
|
-
click: () =>
|
|
241
|
+
click: () => p.value = !p.value
|
|
245
242
|
}
|
|
246
243
|
}
|
|
247
|
-
} :
|
|
244
|
+
} : U.value ? {
|
|
248
245
|
left: {
|
|
249
246
|
...e
|
|
250
247
|
},
|
|
@@ -260,21 +257,21 @@ import './style/textField.css';const he = { class: "rds-e-textfield__input-conta
|
|
|
260
257
|
}
|
|
261
258
|
} : l;
|
|
262
259
|
});
|
|
263
|
-
|
|
260
|
+
q(
|
|
264
261
|
_,
|
|
265
|
-
(e) =>
|
|
262
|
+
(e) => p.value = !e,
|
|
266
263
|
{ immediate: !0 }
|
|
267
264
|
);
|
|
268
265
|
const D = (e) => {
|
|
269
|
-
const l =
|
|
266
|
+
const l = ce.includes(e);
|
|
270
267
|
return l || console.warn(`[RDSTextfield]: El icono "${e}" no es un icono válido.`), l;
|
|
271
268
|
}, F = (e) => {
|
|
272
|
-
var
|
|
273
|
-
((
|
|
269
|
+
var u;
|
|
270
|
+
((u = a.value) == null ? void 0 : u.matches(":-webkit-autofill")) && e.animationName.startsWith("onAutoFillStart") && (k.value = "rds-e-textfield--filled");
|
|
274
271
|
};
|
|
275
|
-
return
|
|
272
|
+
return se(() => {
|
|
276
273
|
a.value && a.value.addEventListener("animationstart", F);
|
|
277
|
-
}),
|
|
274
|
+
}), re(() => {
|
|
278
275
|
a.value && a.value.removeEventListener("animationstart", F);
|
|
279
276
|
}), s({
|
|
280
277
|
focus: () => {
|
|
@@ -283,76 +280,76 @@ import './style/textField.css';const he = { class: "rds-e-textfield__input-conta
|
|
|
283
280
|
blur: () => {
|
|
284
281
|
a.value && (a.value.blur(), C());
|
|
285
282
|
}
|
|
286
|
-
}), (e, l) => (
|
|
287
|
-
class: S(["rds-e-textfield",
|
|
283
|
+
}), (e, l) => (f(), B("div", {
|
|
284
|
+
class: S(["rds-e-textfield", ae.value])
|
|
288
285
|
}, [
|
|
289
|
-
|
|
286
|
+
m("div", {
|
|
290
287
|
class: S(["rds-e-textfield__container", {
|
|
291
288
|
"rds-e-textfield__container--keyboard-focus": b.value,
|
|
292
289
|
"rds-e-textfield__container--active": x.value && !b.value
|
|
293
290
|
}]),
|
|
294
|
-
onMousedown:
|
|
291
|
+
onMousedown: Y
|
|
295
292
|
}, [
|
|
296
|
-
|
|
297
|
-
t.loading ? (
|
|
293
|
+
L(e.$slots, "left-icon", {}, () => [
|
|
294
|
+
t.loading ? (f(), T(E, {
|
|
298
295
|
key: 0,
|
|
299
296
|
name: "loading",
|
|
300
297
|
class: "rds-e-textfield__icon--loading"
|
|
301
|
-
})) :
|
|
302
|
-
o.value.left.name && D(o.value.left.name) && !t.loading ? (
|
|
298
|
+
})) : h("", !0),
|
|
299
|
+
o.value.left.name && D(o.value.left.name) && !t.loading ? (f(), T(E, M({
|
|
303
300
|
key: 1,
|
|
304
301
|
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": x.value }],
|
|
305
302
|
"aria-hidden": "true"
|
|
306
|
-
}, o.value.left,
|
|
303
|
+
}, o.value.left, ie(o.value.left.events)), null, 16, ["class"])) : h("", !0)
|
|
307
304
|
], !0),
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
m("div", pe, [
|
|
306
|
+
m("input", {
|
|
310
307
|
id: I.value,
|
|
311
308
|
ref_key: "input",
|
|
312
309
|
ref: a,
|
|
313
|
-
type:
|
|
310
|
+
type: J.value,
|
|
314
311
|
class: "rds-e-textfield__input",
|
|
315
312
|
maxlength: n.type === "number" ? void 0 : n.maxLength,
|
|
316
313
|
minlength: n.type === "number" ? void 0 : n.minLength,
|
|
317
|
-
disabled:
|
|
314
|
+
disabled: d(N),
|
|
318
315
|
value: n.modelValue === null ? "" : n.modelValue,
|
|
319
|
-
autocomplete:
|
|
316
|
+
autocomplete: Q.value,
|
|
320
317
|
readonly: t.readonly,
|
|
321
|
-
onInput:
|
|
318
|
+
onInput: X,
|
|
322
319
|
onBlur: C,
|
|
323
320
|
onFocus: $,
|
|
324
|
-
onKeydown:
|
|
325
|
-
onKeyup:
|
|
326
|
-
onKeypress:
|
|
327
|
-
onChange:
|
|
328
|
-
}, null, 40,
|
|
329
|
-
|
|
321
|
+
onKeydown: Z,
|
|
322
|
+
onKeyup: ee,
|
|
323
|
+
onKeypress: te,
|
|
324
|
+
onChange: le
|
|
325
|
+
}, null, 40, ve),
|
|
326
|
+
m("label", {
|
|
330
327
|
for: I.value,
|
|
331
|
-
class: S(["rds-e-textfield__label",
|
|
332
|
-
},
|
|
328
|
+
class: S(["rds-e-textfield__label", d(N) ? "rds-e-textfield__label--disabled" : ""])
|
|
329
|
+
}, A(d(K)), 11, me)
|
|
333
330
|
]),
|
|
334
|
-
o.value.right.name || e.$slots["right-icon"] ? (
|
|
335
|
-
|
|
336
|
-
o.value.right.name && D(o.value.right.name) ? (
|
|
331
|
+
o.value.right.name || e.$slots["right-icon"] ? (f(), B("span", he, [
|
|
332
|
+
L(e.$slots, "right-icon", {}, () => [
|
|
333
|
+
o.value.right.name && D(o.value.right.name) ? (f(), T(E, M({
|
|
337
334
|
key: 0,
|
|
338
335
|
"aria-hidden": "true",
|
|
339
336
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
340
337
|
}, o.value.right, {
|
|
341
|
-
onClick:
|
|
342
|
-
}), null, 16, ["onClick"])) :
|
|
338
|
+
onClick: ue(o.value.right.events.click, ["stop"])
|
|
339
|
+
}), null, 16, ["onClick"])) : h("", !0)
|
|
343
340
|
], !0)
|
|
344
|
-
])) :
|
|
341
|
+
])) : h("", !0)
|
|
345
342
|
], 34),
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
class: S(
|
|
350
|
-
},
|
|
343
|
+
d(W) || d(V) ? (f(), B("div", ye, [
|
|
344
|
+
L(e.$slots, "helper-text", {}, () => [
|
|
345
|
+
m("span", {
|
|
346
|
+
class: S(d(V) ? "rds-e-textfield__helper--error" : "")
|
|
347
|
+
}, A(d(O)), 3)
|
|
351
348
|
], !0)
|
|
352
|
-
])) :
|
|
349
|
+
])) : h("", !0)
|
|
353
350
|
], 2));
|
|
354
351
|
}
|
|
355
|
-
}),
|
|
352
|
+
}), ke = /* @__PURE__ */ fe(ge, [["__scopeId", "data-v-47e21ff5"]]);
|
|
356
353
|
export {
|
|
357
|
-
|
|
354
|
+
ke as default
|
|
358
355
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/tooltip.css';const
|
|
1
|
+
import { defineComponent as q, toRefs as G, ref as u, computed as T, onBeforeUnmount as J, createElementBlock as x, openBlock as m, createElementVNode as v, createBlock as K, renderSlot as D, Teleport as Q, normalizeClass as N, createCommentVNode as O, unref as A, createVNode as Z, toDisplayString as E, createTextVNode as ee, nextTick as te } from "vue";
|
|
2
|
+
import { a as oe, o as le, f as ae, s as ie, b as se, c as re, d as ne } from "./floating-ui.vue-oA1DfKeS.js";
|
|
3
|
+
import { R as ue } from "./icon-svg-arye8CV8.js";
|
|
4
|
+
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/tooltip.css';const ce = ["id"], fe = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-tooltip__header"
|
|
8
|
-
},
|
|
8
|
+
}, pe = { class: "rds-e-tooltip__title" }, me = { class: "rds-e-tooltip__content" }, ve = /* @__PURE__ */ q({
|
|
9
9
|
__name: "tooltip",
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -111,145 +111,147 @@ import './style/tooltip.css';const fe = ["id"], me = {
|
|
|
111
111
|
*/
|
|
112
112
|
"hide"
|
|
113
113
|
],
|
|
114
|
-
setup(
|
|
115
|
-
const
|
|
116
|
-
let
|
|
117
|
-
const
|
|
114
|
+
setup(a, { expose: H, emit: V }) {
|
|
115
|
+
const o = a, d = V, { large: S, fullWidth: j, title: i, inverse: I } = G(o), c = u(), s = u(), r = u(), e = u(!0), h = u("");
|
|
116
|
+
let l = null, _ = !1, y = !1, t = null;
|
|
117
|
+
const b = T(() => Math.min(Math.max(o.hideDelay, 0), 3e3)), U = T(() => ({
|
|
118
118
|
"rds-e-tooltip__tooltip": !0,
|
|
119
119
|
"rds-e-tooltip__tooltip-hidden": e.value,
|
|
120
|
-
"rds-e-tooltip__tooltip--large":
|
|
121
|
-
"rds-e-tooltip__tooltip--inverse":
|
|
122
|
-
})),
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
"rds-e-tooltip__tooltip--large": S.value,
|
|
121
|
+
"rds-e-tooltip__tooltip--inverse": I.value
|
|
122
|
+
})), k = async () => {
|
|
123
|
+
const n = [
|
|
124
|
+
le(o.offsetSpace),
|
|
125
|
+
ae(),
|
|
126
|
+
ie(),
|
|
127
|
+
se({
|
|
128
|
+
apply({ availableHeight: f, availableWidth: p, elements: w }) {
|
|
129
|
+
Object.assign(w.floating.style, {
|
|
130
|
+
maxWidth: j.value ? `${Math.max(0, p)}px` : "380px",
|
|
131
|
+
width: "max-content",
|
|
132
|
+
maxHeight: `${Math.max(0, f)}px`
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
];
|
|
137
|
+
!o.hideArrow && r.value && n.push(re({
|
|
138
|
+
element: r.value,
|
|
139
|
+
padding: S.value ? 16 : 8
|
|
140
|
+
}));
|
|
141
|
+
const { x: $, y: Y, middlewareData: C, placement: M } = await ne(
|
|
142
|
+
c.value,
|
|
143
|
+
s.value,
|
|
126
144
|
{
|
|
127
|
-
placement:
|
|
128
|
-
middleware:
|
|
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",
|
|
136
|
-
width: "max-content",
|
|
137
|
-
maxHeight: `${Math.max(0, Y)}px`
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}),
|
|
141
|
-
ue({
|
|
142
|
-
element: f.value,
|
|
143
|
-
padding: g.value ? 16 : 8
|
|
144
|
-
})
|
|
145
|
-
]
|
|
145
|
+
placement: o.placement,
|
|
146
|
+
middleware: n
|
|
146
147
|
}
|
|
147
148
|
);
|
|
148
|
-
Object.assign(
|
|
149
|
-
left: `${
|
|
150
|
-
top: `${
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
149
|
+
if (Object.assign(s.value.style, {
|
|
150
|
+
left: `${$}px`,
|
|
151
|
+
top: `${Y}px`
|
|
152
|
+
}), !o.hideArrow && r.value && C.arrow) {
|
|
153
|
+
const { x: f, y: p } = C.arrow, w = {
|
|
154
|
+
left: "right",
|
|
155
|
+
right: "left",
|
|
156
|
+
bottom: "top",
|
|
157
|
+
top: "bottom"
|
|
158
|
+
};
|
|
159
|
+
h.value = `rds-e-tooltip__tooltip-arrow--${M}`, Object.assign(r.value.style, {
|
|
160
|
+
left: f != null ? `${f}px` : "",
|
|
161
|
+
top: p != null ? `${p}px` : "",
|
|
162
|
+
bottom: "",
|
|
163
|
+
right: "",
|
|
164
|
+
[w[M.split("-")[0]]]: "-4px"
|
|
165
|
+
});
|
|
166
|
+
} else o.hideArrow && (h.value = "");
|
|
167
|
+
}, W = () => {
|
|
168
|
+
clearTimeout(l), e.value ? e.value = !0 : (e.value = !0, d("hide"));
|
|
169
|
+
}, B = () => {
|
|
170
|
+
i != null && i.value || (e.value ? e.value = !0 : (e.value = !0, d("hide"))), clearTimeout(l);
|
|
171
|
+
}, g = () => {
|
|
172
|
+
o.suppressed || (clearTimeout(l), e.value = !1, d("show"), te(() => {
|
|
173
|
+
k(), o.autoUpdate && c.value && s.value && (t == null || t(), t = oe(
|
|
174
|
+
c.value,
|
|
175
|
+
s.value,
|
|
174
176
|
() => {
|
|
175
|
-
|
|
177
|
+
k();
|
|
176
178
|
}
|
|
177
179
|
));
|
|
178
180
|
}));
|
|
179
|
-
}, W = () => {
|
|
180
|
-
v = !0, h();
|
|
181
181
|
}, z = () => {
|
|
182
|
-
|
|
183
|
-
m || S();
|
|
184
|
-
}, x.value);
|
|
185
|
-
}, A = () => {
|
|
186
|
-
m = !0, clearTimeout(o);
|
|
182
|
+
y = !0, g();
|
|
187
183
|
}, L = () => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
},
|
|
191
|
-
}, b = () => {
|
|
192
|
-
e.value || (e.value = !0, n("hide"), t && (t(), t = null));
|
|
184
|
+
y = !1, l = setTimeout(() => {
|
|
185
|
+
_ || B();
|
|
186
|
+
}, b.value);
|
|
193
187
|
}, P = () => {
|
|
194
|
-
|
|
188
|
+
_ = !0, clearTimeout(l);
|
|
189
|
+
}, F = () => {
|
|
190
|
+
_ = !1, y || (l = setTimeout(() => {
|
|
191
|
+
B();
|
|
192
|
+
}, b.value));
|
|
193
|
+
}, R = () => {
|
|
194
|
+
e.value || (e.value = !0, d("hide"), t && (t(), t = null));
|
|
195
|
+
}, X = () => {
|
|
196
|
+
R();
|
|
195
197
|
};
|
|
196
|
-
return
|
|
197
|
-
show:
|
|
198
|
-
hide:
|
|
199
|
-
isOpen:
|
|
200
|
-
}),
|
|
201
|
-
clearTimeout(
|
|
202
|
-
}), (
|
|
203
|
-
id:
|
|
198
|
+
return H({
|
|
199
|
+
show: g,
|
|
200
|
+
hide: R,
|
|
201
|
+
isOpen: T(() => !e.value)
|
|
202
|
+
}), J(() => {
|
|
203
|
+
clearTimeout(l), t && (t(), t = null);
|
|
204
|
+
}), (n, $) => (m(), x("div", {
|
|
205
|
+
id: a.id,
|
|
204
206
|
class: "rds-e-tooltip"
|
|
205
207
|
}, [
|
|
206
|
-
|
|
208
|
+
v("div", {
|
|
207
209
|
ref_key: "referenceRef",
|
|
208
|
-
ref:
|
|
210
|
+
ref: c,
|
|
209
211
|
class: "rds-e-tooltip__trigger",
|
|
210
|
-
onBlur:
|
|
211
|
-
onFocus:
|
|
212
|
-
onMouseenter:
|
|
213
|
-
onMouseleave:
|
|
212
|
+
onBlur: W,
|
|
213
|
+
onFocus: g,
|
|
214
|
+
onMouseenter: z,
|
|
215
|
+
onMouseleave: L
|
|
214
216
|
}, [
|
|
215
|
-
|
|
217
|
+
D(n.$slots, "default", {}, void 0, !0)
|
|
216
218
|
], 544),
|
|
217
|
-
(
|
|
218
|
-
to:
|
|
219
|
-
disabled: !
|
|
219
|
+
(m(), K(Q, {
|
|
220
|
+
to: a.teleportTo,
|
|
221
|
+
disabled: !a.teleportTo
|
|
220
222
|
}, [
|
|
221
|
-
|
|
223
|
+
v("div", {
|
|
222
224
|
ref_key: "floatingRef",
|
|
223
|
-
ref:
|
|
224
|
-
class:
|
|
225
|
-
onMouseenter:
|
|
226
|
-
onMouseleave:
|
|
225
|
+
ref: s,
|
|
226
|
+
class: N(U.value),
|
|
227
|
+
onMouseenter: P,
|
|
228
|
+
onMouseleave: F
|
|
227
229
|
}, [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
A(i) ? (m(), x("div", fe, [
|
|
231
|
+
v("h3", pe, E(A(i)), 1),
|
|
232
|
+
Z(ue, {
|
|
231
233
|
name: "close",
|
|
232
234
|
"aria-hidden": "true",
|
|
233
235
|
class: "rds-e-tooltip__icon",
|
|
234
|
-
onClick:
|
|
236
|
+
onClick: X
|
|
235
237
|
})
|
|
236
|
-
])) :
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
])) : O("", !0),
|
|
239
|
+
v("div", me, [
|
|
240
|
+
D(n.$slots, "tooltip-content", {}, () => [
|
|
241
|
+
ee(E(a.content), 1)
|
|
240
242
|
], !0)
|
|
241
243
|
]),
|
|
242
|
-
|
|
244
|
+
a.hideArrow ? O("", !0) : (m(), x("div", {
|
|
243
245
|
key: 1,
|
|
244
246
|
ref_key: "arrowRef",
|
|
245
|
-
ref:
|
|
246
|
-
class:
|
|
247
|
+
ref: r,
|
|
248
|
+
class: N(["rds-e-tooltip__tooltip-arrow", h.value])
|
|
247
249
|
}, null, 2))
|
|
248
250
|
], 34)
|
|
249
251
|
], 8, ["to", "disabled"]))
|
|
250
|
-
], 8,
|
|
252
|
+
], 8, ce));
|
|
251
253
|
}
|
|
252
|
-
}), we = /* @__PURE__ */
|
|
254
|
+
}), we = /* @__PURE__ */ de(ve, [["__scopeId", "data-v-0165a45d"]]);
|
|
253
255
|
export {
|
|
254
256
|
we as default
|
|
255
257
|
};
|