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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as re, toRefs as ie, ref as f, computed as v, watch as A, onMounted as ue, onBeforeUnmount as de, createElementBlock as V, openBlock as p, normalizeClass as S, createElementVNode as g, createCommentVNode as y, renderSlot as B, createBlock as E, mergeProps as M, toHandlers as ce, unref as c, toDisplayString as K, withModifiers as fe } from "vue";
2
- import { g as ve } from "./getInstance-GhoEcxLF.js";
3
- import { R as T, s as pe } from "./icon-svg-arye8CV8.js";
4
- import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/textField.css';const he = { class: "rds-e-textfield__input-container" }, ge = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly"], ye = ["for"], _e = {
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
- }, xe = {
8
+ }, ye = {
9
9
  key: 0,
10
10
  class: "rds-e-textfield__helper"
11
- }, be = /* @__PURE__ */ re({
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
- default: 100,
63
- validator: (t) => t < 0 ? (console.info("El valor de maxLength no puede ser menor a 0"), !1) : Number.isNaN(t) ? (console.info("El valor de maxLength debe ser un número"), !1) : !0
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
- default: 0,
71
- validator: (t) => t < 0 ? (console.info("El valor de minLength no puede ser menor a 0"), !1) : Number.isNaN(t) ? (console.info("El valor de minLength debe ser un número"), !1) : !0
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: m,
160
- label: P,
162
+ type: y,
163
+ label: K,
161
164
  disabled: N,
162
- maxLength: j,
163
- minLength: q,
164
- modelValue: u,
165
- icon: W,
166
- rightIcon: O,
167
- helper: U,
168
- error: L,
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: G,
173
- fullWidth: J
174
- } = ie(n), a = f(null), h = f(!0), x = f(!1), b = f(!1), w = f(!1), Q = ve(), k = f(""), I = v(() => n.id || `text-field-${Q}`), X = v(() => _.value ? h.value ? "text" : "password" : ["text", "number", "password", "email", "tel", "url"].includes(m.value) ? m.value : "text"), Y = v(() => {
175
- if (_.value || m.value === "password")
176
- return G.value;
177
- }), Z = (e) => {
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 d = l.value;
180
- if (m.value === "number")
180
+ let u = l.value;
181
+ if (y.value === "number")
181
182
  if (l.value.trim() === "")
182
- d = null;
183
+ u = null;
183
184
  else {
184
185
  const R = Number.parseFloat(l.value);
185
- d = Number.isNaN(R) ? l.value : R;
186
+ u = Number.isNaN(R) ? l.value : R;
186
187
  }
187
- else l.value === "" && u.value === null && (d = null);
188
- i("update:modelValue", d);
189
- }, ee = () => {
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
- }, te = (e) => {
196
+ }, Z = (e) => {
196
197
  i("keydown", e);
197
- }, le = (e) => {
198
+ }, ee = (e) => {
198
199
  i("keyup", e);
199
- }, ae = (e) => {
200
+ }, te = (e) => {
200
201
  i("keypress", e);
201
- }, ne = (e) => {
202
+ }, le = (e) => {
202
203
  i("change", e);
203
- }, oe = v(() => {
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), u.value !== null && String(u.value).length > 0 && e.push("rds-e-textfield--filled"), oe.value && e.push("rds-e-textfield--error"), N.value && e.push("rds-e-textfield--disabled"), J.value && e.push("rds-e-textfield--full-width"), e.join(" ");
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
- A(
212
- () => u.value,
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: W.value,
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: O.value
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: h.value ? "eye_open" : "eye_close",
238
+ name: p.value ? "eye_open" : "eye_close",
242
239
  class: "rds-e-textfield__icon--password",
243
240
  events: {
244
- click: () => h.value = !h.value
241
+ click: () => p.value = !p.value
245
242
  }
246
243
  }
247
- } : H.value ? {
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
- A(
260
+ q(
264
261
  _,
265
- (e) => h.value = !e,
262
+ (e) => p.value = !e,
266
263
  { immediate: !0 }
267
264
  );
268
265
  const D = (e) => {
269
- const l = pe.includes(e);
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 d;
273
- ((d = a.value) == null ? void 0 : d.matches(":-webkit-autofill")) && e.animationName.startsWith("onAutoFillStart") && (k.value = "rds-e-textfield--filled");
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 ue(() => {
272
+ return se(() => {
276
273
  a.value && a.value.addEventListener("animationstart", F);
277
- }), de(() => {
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) => (p(), V("div", {
287
- class: S(["rds-e-textfield", se.value])
283
+ }), (e, l) => (f(), B("div", {
284
+ class: S(["rds-e-textfield", ae.value])
288
285
  }, [
289
- g("div", {
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: ee
291
+ onMousedown: Y
295
292
  }, [
296
- B(e.$slots, "left-icon", {}, () => [
297
- t.loading ? (p(), E(T, {
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
- })) : y("", !0),
302
- o.value.left.name && D(o.value.left.name) && !t.loading ? (p(), E(T, M({
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, ce(o.value.left.events)), null, 16, ["class"])) : y("", !0)
303
+ }, o.value.left, ie(o.value.left.events)), null, 16, ["class"])) : h("", !0)
307
304
  ], !0),
308
- g("div", he, [
309
- g("input", {
305
+ m("div", pe, [
306
+ m("input", {
310
307
  id: I.value,
311
308
  ref_key: "input",
312
309
  ref: a,
313
- type: X.value,
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: c(N),
314
+ disabled: d(N),
318
315
  value: n.modelValue === null ? "" : n.modelValue,
319
- autocomplete: Y.value,
316
+ autocomplete: Q.value,
320
317
  readonly: t.readonly,
321
- onInput: Z,
318
+ onInput: X,
322
319
  onBlur: C,
323
320
  onFocus: $,
324
- onKeydown: te,
325
- onKeyup: le,
326
- onKeypress: ae,
327
- onChange: ne
328
- }, null, 40, ge),
329
- g("label", {
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", c(N) ? "rds-e-textfield__label--disabled" : ""])
332
- }, K(c(P)), 11, ye)
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"] ? (p(), V("span", _e, [
335
- B(e.$slots, "right-icon", {}, () => [
336
- o.value.right.name && D(o.value.right.name) ? (p(), E(T, M({
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: fe(o.value.right.events.click, ["stop"])
342
- }), null, 16, ["onClick"])) : y("", !0)
338
+ onClick: ue(o.value.right.events.click, ["stop"])
339
+ }), null, 16, ["onClick"])) : h("", !0)
343
340
  ], !0)
344
- ])) : y("", !0)
341
+ ])) : h("", !0)
345
342
  ], 34),
346
- c(U) || c(L) ? (p(), V("div", xe, [
347
- B(e.$slots, "helper-text", {}, () => [
348
- g("span", {
349
- class: S(c(L) ? "rds-e-textfield__helper--error" : "")
350
- }, K(c(z)), 3)
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
- ])) : y("", !0)
349
+ ])) : h("", !0)
353
350
  ], 2));
354
351
  }
355
- }), Le = /* @__PURE__ */ me(be, [["__scopeId", "data-v-9a36ddb2"]]);
352
+ }), ke = /* @__PURE__ */ fe(ge, [["__scopeId", "data-v-47e21ff5"]]);
356
353
  export {
357
- Le as default
354
+ ke as default
358
355
  };
@@ -1,11 +1,11 @@
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 = {
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
- }, ve = { class: "rds-e-tooltip__title" }, he = { class: "rds-e-tooltip__content" }, _e = /* @__PURE__ */ J({
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(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 = _(() => ({
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": 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,
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: a.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(i.value.style, {
149
- left: `${u}px`,
150
- top: `${k}px`
151
- });
152
- const { x: R, y: $ } = F.arrow, X = {
153
- left: "right",
154
- right: "left",
155
- bottom: "top",
156
- top: "bottom"
157
- };
158
- T.value = `rds-e-tooltip__tooltip-arrow--${B}`, Object.assign(f.value.style, {
159
- left: R != null ? `${R}px` : "",
160
- top: $ != null ? `${$}px` : "",
161
- bottom: "",
162
- right: "",
163
- [X[B.split("-")[0]]]: "-4px"
164
- });
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);
169
- }, h = () => {
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,
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
- w();
177
+ k();
176
178
  }
177
179
  ));
178
180
  }));
179
- }, W = () => {
180
- v = !0, h();
181
181
  }, z = () => {
182
- v = !1, o = setTimeout(() => {
183
- m || S();
184
- }, x.value);
185
- }, A = () => {
186
- m = !0, clearTimeout(o);
182
+ y = !0, g();
187
183
  }, 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));
184
+ y = !1, l = setTimeout(() => {
185
+ _ || B();
186
+ }, b.value);
193
187
  }, P = () => {
194
- b();
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 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", {
203
- id: l.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
- p("div", {
208
+ v("div", {
207
209
  ref_key: "referenceRef",
208
- ref: d,
210
+ ref: c,
209
211
  class: "rds-e-tooltip__trigger",
210
- onBlur: U,
211
- onFocus: h,
212
- onMouseenter: W,
213
- onMouseleave: z
212
+ onBlur: W,
213
+ onFocus: g,
214
+ onMouseenter: z,
215
+ onMouseleave: L
214
216
  }, [
215
- C(u.$slots, "default", {}, void 0, !0)
217
+ D(n.$slots, "default", {}, void 0, !0)
216
218
  ], 544),
217
- (c(), Z(ee, {
218
- to: l.teleportTo,
219
- disabled: !l.teleportTo
219
+ (m(), K(Q, {
220
+ to: a.teleportTo,
221
+ disabled: !a.teleportTo
220
222
  }, [
221
- p("div", {
223
+ v("div", {
222
224
  ref_key: "floatingRef",
223
- ref: i,
224
- class: M(I.value),
225
- onMouseenter: A,
226
- onMouseleave: L
225
+ ref: s,
226
+ class: N(U.value),
227
+ onMouseenter: P,
228
+ onMouseleave: F
227
229
  }, [
228
- N(s) ? (c(), y("div", me, [
229
- p("h3", ve, O(N(s)), 1),
230
- te(ce, {
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: P
236
+ onClick: X
235
237
  })
236
- ])) : D("", !0),
237
- p("div", he, [
238
- C(u.$slots, "tooltip-content", {}, () => [
239
- oe(O(l.content), 1)
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
- l.hideArrow ? D("", !0) : (c(), y("div", {
244
+ a.hideArrow ? O("", !0) : (m(), x("div", {
243
245
  key: 1,
244
246
  ref_key: "arrowRef",
245
- ref: f,
246
- class: M(["rds-e-tooltip__tooltip-arrow", T.value])
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, fe));
252
+ ], 8, ce));
251
253
  }
252
- }), we = /* @__PURE__ */ pe(_e, [["__scopeId", "data-v-5a12657d"]]);
254
+ }), we = /* @__PURE__ */ de(ve, [["__scopeId", "data-v-0165a45d"]]);
253
255
  export {
254
256
  we as default
255
257
  };