energy-components 1.1.2-beta.1 → 1.1.2
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/button.es.js +9 -10
- package/dist/components/link.es.js +28 -25
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/card.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/textArea.es.js +28 -26
- package/dist/components/textField.es.js +67 -64
- package/dist/components/tooltip.es.js +65 -65
- package/dist/energy-components.es.js +1823 -1816
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/button/button.vue.d.ts +0 -2
- package/dist/types/src/components/navigation/link/link.vue.d.ts +0 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { I as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/textField.css';const
|
|
1
|
+
import { defineComponent as H, toRefs as M, ref as L, computed as n, watch as U, openBlock as u, createElementBlock as v, normalizeClass as h, createElementVNode as i, renderSlot as _, createBlock as A, mergeProps as S, toHandlers as G, createCommentVNode as g, unref as t, toDisplayString as B, createVNode as J, withModifiers as K } from "vue";
|
|
2
|
+
import { g as O } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { I as V } from "./icon-svg-CEZ-L3iv.js";
|
|
4
|
+
import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/textField.css';const W = { class: "rds-e-textfield__container" }, X = { class: "rds-e-textfield__input-container" }, Y = ["id", "type", "maxLength", "minLength", "disabled", "value", "autocomplete", "readonly"], Z = ["for"], ee = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
8
|
-
},
|
|
8
|
+
}, te = { class: "rds-e-textfield__helper" }, le = /* @__PURE__ */ H({
|
|
9
9
|
__name: "text-field",
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -125,46 +125,48 @@ import './style/textField.css';const O = { class: "rds-e-textfield__container" }
|
|
|
125
125
|
},
|
|
126
126
|
emits: ["update:modelValue"],
|
|
127
127
|
setup(l, { emit: c }) {
|
|
128
|
-
const a = l,
|
|
129
|
-
label:
|
|
128
|
+
const a = l, x = c, {
|
|
129
|
+
label: E,
|
|
130
130
|
disabled: d,
|
|
131
|
-
maxLength:
|
|
132
|
-
minLength:
|
|
131
|
+
maxLength: y,
|
|
132
|
+
minLength: b,
|
|
133
133
|
modelValue: o,
|
|
134
|
-
icon:
|
|
135
|
-
rightIcon:
|
|
136
|
-
helper:
|
|
134
|
+
icon: I,
|
|
135
|
+
rightIcon: T,
|
|
136
|
+
helper: $,
|
|
137
137
|
error: f,
|
|
138
|
-
helperText:
|
|
139
|
-
clearable:
|
|
138
|
+
helperText: C,
|
|
139
|
+
clearable: R,
|
|
140
140
|
password: p,
|
|
141
|
-
autocomplete:
|
|
142
|
-
} =
|
|
141
|
+
autocomplete: q
|
|
142
|
+
} = M(a), s = L(!0), m = L(!1), D = O(), N = n(() => a.id || `text-field-${D}`), F = n(() => {
|
|
143
143
|
if (p.value)
|
|
144
|
-
return
|
|
145
|
-
}),
|
|
146
|
-
|
|
144
|
+
return q.value;
|
|
145
|
+
}), k = (e) => {
|
|
146
|
+
m.value = !1, x(
|
|
147
147
|
"update:modelValue",
|
|
148
148
|
e.target.value
|
|
149
149
|
);
|
|
150
|
-
},
|
|
150
|
+
}, j = () => {
|
|
151
|
+
m.value = !0;
|
|
152
|
+
}, P = n(() => !!(f.value || o.value.length && (o.value.length < b.value || o.value.length > y.value))), z = n(() => {
|
|
151
153
|
const e = [];
|
|
152
|
-
return o.value && e.push("rds-e-textfield--filled"),
|
|
153
|
-
}), r =
|
|
154
|
+
return o.value && e.push("rds-e-textfield--filled"), P.value && e.push("rds-e-textfield--error"), d.value && e.push("rds-e-textfield--disabled"), e.join(" ");
|
|
155
|
+
}), r = n(() => {
|
|
154
156
|
const e = {
|
|
155
|
-
name:
|
|
157
|
+
name: I.value,
|
|
156
158
|
class: "",
|
|
157
159
|
events: {
|
|
158
160
|
click: () => {
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
|
-
},
|
|
163
|
+
}, w = {
|
|
162
164
|
left: {
|
|
163
165
|
...e
|
|
164
166
|
},
|
|
165
167
|
right: {
|
|
166
168
|
...e,
|
|
167
|
-
name:
|
|
169
|
+
name: T.value
|
|
168
170
|
}
|
|
169
171
|
};
|
|
170
172
|
return p.value ? {
|
|
@@ -174,13 +176,13 @@ import './style/textField.css';const O = { class: "rds-e-textfield__container" }
|
|
|
174
176
|
},
|
|
175
177
|
right: {
|
|
176
178
|
...e,
|
|
177
|
-
name:
|
|
179
|
+
name: s.value ? "eye_open" : "eye_close",
|
|
178
180
|
class: "rds-e-textfield__icon--password",
|
|
179
181
|
events: {
|
|
180
|
-
click: () =>
|
|
182
|
+
click: () => s.value = !s.value
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
|
-
} :
|
|
185
|
+
} : R.value ? {
|
|
184
186
|
left: {
|
|
185
187
|
...e
|
|
186
188
|
},
|
|
@@ -189,67 +191,68 @@ import './style/textField.css';const O = { class: "rds-e-textfield__container" }
|
|
|
189
191
|
name: "close",
|
|
190
192
|
class: "rds-e-textfield__icon--clear",
|
|
191
193
|
events: {
|
|
192
|
-
click: () =>
|
|
194
|
+
click: () => x("update:modelValue", "")
|
|
193
195
|
}
|
|
194
196
|
}
|
|
195
|
-
} :
|
|
197
|
+
} : w;
|
|
196
198
|
});
|
|
197
|
-
return
|
|
199
|
+
return U(
|
|
198
200
|
p,
|
|
199
|
-
(e) =>
|
|
201
|
+
(e) => s.value = !e,
|
|
200
202
|
{ immediate: !0 }
|
|
201
|
-
), (e,
|
|
202
|
-
class:
|
|
203
|
+
), (e, w) => (u(), v("div", {
|
|
204
|
+
class: h(["rds-e-textfield", z.value])
|
|
203
205
|
}, [
|
|
204
|
-
i("div",
|
|
205
|
-
|
|
206
|
-
r.value.left.name ? (u(),
|
|
206
|
+
i("div", W, [
|
|
207
|
+
_(e.$slots, "left-icon", {}, () => [
|
|
208
|
+
r.value.left.name ? (u(), A(V, S({
|
|
207
209
|
key: 0,
|
|
208
|
-
class: "rds-e-textfield__icon rds-e-textfield__icon--left",
|
|
210
|
+
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": m.value }],
|
|
209
211
|
"aria-hidden": "true"
|
|
210
|
-
}, r.value.left,
|
|
212
|
+
}, r.value.left, G(r.value.left.events)), null, 16, ["class"])) : g("", !0)
|
|
211
213
|
], !0),
|
|
212
|
-
i("div",
|
|
214
|
+
i("div", X, [
|
|
213
215
|
i("input", {
|
|
214
|
-
id:
|
|
215
|
-
type:
|
|
216
|
+
id: N.value,
|
|
217
|
+
type: s.value ? "text" : "password",
|
|
216
218
|
class: "rds-e-textfield__input",
|
|
217
|
-
maxLength: t(
|
|
218
|
-
minLength: t(
|
|
219
|
+
maxLength: t(y),
|
|
220
|
+
minLength: t(b),
|
|
219
221
|
disabled: t(d),
|
|
220
222
|
value: t(o),
|
|
221
|
-
autocomplete:
|
|
223
|
+
autocomplete: F.value,
|
|
222
224
|
readonly: l.readonly,
|
|
223
|
-
onInput:
|
|
224
|
-
onBlur:
|
|
225
|
-
|
|
225
|
+
onInput: k,
|
|
226
|
+
onBlur: k,
|
|
227
|
+
onFocus: j
|
|
228
|
+
}, null, 40, Y),
|
|
226
229
|
i("label", {
|
|
227
|
-
for:
|
|
228
|
-
class:
|
|
229
|
-
},
|
|
230
|
+
for: N.value,
|
|
231
|
+
class: h(["rds-e-textfield__label", t(d) ? "rds-e-textfield__label--disabled" : ""])
|
|
232
|
+
}, B(t(E)), 11, Z)
|
|
230
233
|
]),
|
|
231
|
-
r.value.right.name || e.$slots["right-icon"] ? (u(),
|
|
232
|
-
|
|
233
|
-
|
|
234
|
+
r.value.right.name || e.$slots["right-icon"] ? (u(), v("span", ee, [
|
|
235
|
+
_(e.$slots, "right-icon", {}, () => [
|
|
236
|
+
J(V, S({
|
|
234
237
|
"aria-hidden": "true",
|
|
235
238
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
236
239
|
}, r.value.right, {
|
|
237
|
-
onClick:
|
|
240
|
+
onClick: K(r.value.right.events.click, ["stop"])
|
|
238
241
|
}), null, 16, ["onClick"])
|
|
239
242
|
], !0)
|
|
240
|
-
])) :
|
|
243
|
+
])) : g("", !0)
|
|
241
244
|
]),
|
|
242
|
-
i("div",
|
|
243
|
-
|
|
244
|
-
(t(
|
|
245
|
+
i("div", te, [
|
|
246
|
+
_(e.$slots, "helper-text", {}, () => [
|
|
247
|
+
(t($) || t(f)) && !t(d) ? (u(), v("span", {
|
|
245
248
|
key: 0,
|
|
246
|
-
class:
|
|
247
|
-
},
|
|
249
|
+
class: h(t(f) ? "rds-e-textfield__helper--error" : "")
|
|
250
|
+
}, B(t(C)), 3)) : g("", !0)
|
|
248
251
|
], !0)
|
|
249
252
|
])
|
|
250
253
|
], 2));
|
|
251
254
|
}
|
|
252
|
-
}),
|
|
255
|
+
}), ne = /* @__PURE__ */ Q(le, [["__scopeId", "data-v-2a397de0"]]);
|
|
253
256
|
export {
|
|
254
|
-
|
|
257
|
+
ne as default
|
|
255
258
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { unref as at, defineComponent as
|
|
1
|
+
import { unref as at, defineComponent as Mt, toRefs as Vt, ref as U, computed as Ft, openBlock as bt, createElementBlock as At, createElementVNode as Z, renderSlot as Ht, normalizeClass as Ct, toDisplayString as Rt, createVNode as jt, createCommentVNode as Yt } from "vue";
|
|
2
2
|
import { I as Xt } from "./icon-svg-CEZ-L3iv.js";
|
|
3
3
|
import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/tooltip.css';const X = Math.min,
|
|
4
|
+
import './style/tooltip.css';const X = Math.min, O = Math.max, nt = Math.round, H = (t) => ({
|
|
5
5
|
x: t,
|
|
6
6
|
y: t
|
|
7
7
|
}), zt = {
|
|
@@ -14,7 +14,7 @@ import './style/tooltip.css';const X = Math.min, R = Math.max, nt = Math.round,
|
|
|
14
14
|
end: "start"
|
|
15
15
|
};
|
|
16
16
|
function ft(t, e, o) {
|
|
17
|
-
return
|
|
17
|
+
return O(t, X(e, o));
|
|
18
18
|
}
|
|
19
19
|
function J(t, e) {
|
|
20
20
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -282,9 +282,9 @@ const te = (t) => ({
|
|
|
282
282
|
x: o,
|
|
283
283
|
y: n
|
|
284
284
|
}, d = ht(i), m = gt(d), g = await s.getDimensions(a), h = d === "y", w = h ? "top" : "left", x = h ? "bottom" : "right", y = h ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[d] - p[d] - r.floating[m], v = p[d] - r.reference[d], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
285
|
-
let
|
|
286
|
-
(!
|
|
287
|
-
const $ = b / 2 - v / 2, E =
|
|
285
|
+
let C = T ? T[y] : 0;
|
|
286
|
+
(!C || !await (s.isElement == null ? void 0 : s.isElement(T))) && (C = l.floating[y] || r.floating[m]);
|
|
287
|
+
const $ = b / 2 - v / 2, E = C / 2 - g[m] / 2 - 1, S = X(u[w], E), B = X(u[x], E), P = S, M = C - g[m] - B, A = C / 2 - g[m] / 2 + $, K = ft(P, A, M), W = !c.arrow && Q(i) != null && A !== K && r.reference[m] / 2 - (A < P ? S : B) - g[m] / 2 < 0, L = W ? A < P ? A - P : A - M : 0;
|
|
288
288
|
return {
|
|
289
289
|
[d]: p[d] + L,
|
|
290
290
|
data: {
|
|
@@ -323,42 +323,42 @@ const te = (t) => ({
|
|
|
323
323
|
return {};
|
|
324
324
|
const w = j(i), x = I(l), y = j(l) === l, b = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), v = p || (y || !g ? [ot(l)] : Gt(l)), T = m !== "none";
|
|
325
325
|
!p && T && v.push(...Qt(l, g, m, b));
|
|
326
|
-
const
|
|
327
|
-
let
|
|
326
|
+
const C = [l, ...v], $ = await wt(e, h), E = [];
|
|
327
|
+
let S = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
328
328
|
if (f && E.push($[w]), u) {
|
|
329
329
|
const A = qt(i, s, b);
|
|
330
330
|
E.push($[A[0]], $[A[1]]);
|
|
331
331
|
}
|
|
332
|
-
if (
|
|
332
|
+
if (S = [...S, {
|
|
333
333
|
placement: i,
|
|
334
334
|
overflows: E
|
|
335
335
|
}], !E.every((A) => A <= 0)) {
|
|
336
336
|
var B, P;
|
|
337
|
-
const A = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, K =
|
|
337
|
+
const A = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, K = C[A];
|
|
338
338
|
if (K)
|
|
339
339
|
return {
|
|
340
340
|
data: {
|
|
341
341
|
index: A,
|
|
342
|
-
overflows:
|
|
342
|
+
overflows: S
|
|
343
343
|
},
|
|
344
344
|
reset: {
|
|
345
345
|
placement: K
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
|
-
let W = (P =
|
|
348
|
+
let W = (P = S.filter((L) => L.overflows[0] <= 0).sort((L, V) => L.overflows[1] - V.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
349
349
|
if (!W)
|
|
350
350
|
switch (d) {
|
|
351
351
|
case "bestFit": {
|
|
352
|
-
var
|
|
353
|
-
const L = (
|
|
352
|
+
var M;
|
|
353
|
+
const L = (M = S.filter((V) => {
|
|
354
354
|
if (T) {
|
|
355
|
-
const F = I(
|
|
355
|
+
const F = I(V.placement);
|
|
356
356
|
return F === x || // Create a bias to the `y` side axis due to horizontal
|
|
357
357
|
// reading directions favoring greater width.
|
|
358
358
|
F === "y";
|
|
359
359
|
}
|
|
360
360
|
return !0;
|
|
361
|
-
}).map((
|
|
361
|
+
}).map((V) => [V.placement, V.overflows.filter((F) => F > 0).reduce((F, Bt) => F + Bt, 0)]).sort((V, F) => V[1] - F[1])[0]) == null ? void 0 : M[0];
|
|
362
362
|
L && (W = L);
|
|
363
363
|
break;
|
|
364
364
|
}
|
|
@@ -504,15 +504,15 @@ const oe = function(t) {
|
|
|
504
504
|
let h, w;
|
|
505
505
|
u === "top" || u === "bottom" ? (h = u, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = u, h = p === "end" ? "top" : "bottom");
|
|
506
506
|
const x = g - f.top - f.bottom, y = m - f.left - f.right, b = X(g - f[h], x), v = X(m - f[w], y), T = !e.middlewareData.shift;
|
|
507
|
-
let
|
|
508
|
-
if ((o = e.middlewareData.shift) != null && o.enabled.x && ($ = y), (n = e.middlewareData.shift) != null && n.enabled.y && (
|
|
509
|
-
const
|
|
510
|
-
d ? $ = m - 2 * (
|
|
507
|
+
let C = b, $ = v;
|
|
508
|
+
if ((o = e.middlewareData.shift) != null && o.enabled.x && ($ = y), (n = e.middlewareData.shift) != null && n.enabled.y && (C = x), T && !p) {
|
|
509
|
+
const S = O(f.left, 0), B = O(f.right, 0), P = O(f.top, 0), M = O(f.bottom, 0);
|
|
510
|
+
d ? $ = m - 2 * (S !== 0 || B !== 0 ? S + B : O(f.left, f.right)) : C = g - 2 * (P !== 0 || M !== 0 ? P + M : O(f.top, f.bottom));
|
|
511
511
|
}
|
|
512
512
|
await c({
|
|
513
513
|
...e,
|
|
514
514
|
availableWidth: $,
|
|
515
|
-
availableHeight:
|
|
515
|
+
availableHeight: C
|
|
516
516
|
});
|
|
517
517
|
const E = await s.getDimensions(l.floating);
|
|
518
518
|
return m !== E.width || g !== E.height ? {
|
|
@@ -529,7 +529,7 @@ function st() {
|
|
|
529
529
|
function z(t) {
|
|
530
530
|
return xt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function R(t) {
|
|
533
533
|
var e;
|
|
534
534
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
535
535
|
}
|
|
@@ -538,16 +538,16 @@ function N(t) {
|
|
|
538
538
|
return (e = (xt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
539
539
|
}
|
|
540
540
|
function xt(t) {
|
|
541
|
-
return st() ? t instanceof Node || t instanceof
|
|
541
|
+
return st() ? t instanceof Node || t instanceof R(t).Node : !1;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
return st() ? t instanceof Element || t instanceof
|
|
543
|
+
function _(t) {
|
|
544
|
+
return st() ? t instanceof Element || t instanceof R(t).Element : !1;
|
|
545
545
|
}
|
|
546
546
|
function k(t) {
|
|
547
|
-
return st() ? t instanceof HTMLElement || t instanceof
|
|
547
|
+
return st() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
549
|
+
function St(t) {
|
|
550
|
+
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
|
|
551
551
|
}
|
|
552
552
|
function et(t) {
|
|
553
553
|
const {
|
|
@@ -571,7 +571,7 @@ function rt(t) {
|
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
573
|
function yt(t) {
|
|
574
|
-
const e = vt(), o =
|
|
574
|
+
const e = vt(), o = _(t) ? D(t) : t;
|
|
575
575
|
return o.transform !== "none" || o.perspective !== "none" || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
576
576
|
}
|
|
577
577
|
function le(t) {
|
|
@@ -592,10 +592,10 @@ function G(t) {
|
|
|
592
592
|
return ["html", "body", "#document"].includes(z(t));
|
|
593
593
|
}
|
|
594
594
|
function D(t) {
|
|
595
|
-
return
|
|
595
|
+
return R(t).getComputedStyle(t);
|
|
596
596
|
}
|
|
597
597
|
function lt(t) {
|
|
598
|
-
return
|
|
598
|
+
return _(t) ? {
|
|
599
599
|
scrollLeft: t.scrollLeft,
|
|
600
600
|
scrollTop: t.scrollTop
|
|
601
601
|
} : {
|
|
@@ -610,10 +610,10 @@ function Y(t) {
|
|
|
610
610
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
611
611
|
t.assignedSlot || // DOM Element detected.
|
|
612
612
|
t.parentNode || // ShadowRoot detected.
|
|
613
|
-
|
|
613
|
+
St(t) && t.host || // Fallback.
|
|
614
614
|
N(t)
|
|
615
615
|
);
|
|
616
|
-
return
|
|
616
|
+
return St(e) ? e.host : e;
|
|
617
617
|
}
|
|
618
618
|
function Pt(t) {
|
|
619
619
|
const e = Y(t);
|
|
@@ -622,7 +622,7 @@ function Pt(t) {
|
|
|
622
622
|
function dt(t, e, o) {
|
|
623
623
|
var n;
|
|
624
624
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
625
|
-
const i = Pt(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s =
|
|
625
|
+
const i = Pt(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s = R(i);
|
|
626
626
|
if (r) {
|
|
627
627
|
const l = mt(s);
|
|
628
628
|
return e.concat(s, s.visualViewport || [], et(i) ? i : [], l && o ? dt(l) : []);
|
|
@@ -643,7 +643,7 @@ function Lt(t) {
|
|
|
643
643
|
};
|
|
644
644
|
}
|
|
645
645
|
function kt(t) {
|
|
646
|
-
return
|
|
646
|
+
return _(t) ? t : t.contextElement;
|
|
647
647
|
}
|
|
648
648
|
function q(t) {
|
|
649
649
|
const e = kt(t);
|
|
@@ -662,28 +662,28 @@ function q(t) {
|
|
|
662
662
|
}
|
|
663
663
|
const ce = /* @__PURE__ */ H(0);
|
|
664
664
|
function $t(t) {
|
|
665
|
-
const e =
|
|
665
|
+
const e = R(t);
|
|
666
666
|
return !vt() || !e.visualViewport ? ce : {
|
|
667
667
|
x: e.visualViewport.offsetLeft,
|
|
668
668
|
y: e.visualViewport.offsetTop
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
671
|
function ae(t, e, o) {
|
|
672
|
-
return e === void 0 && (e = !1), !o || e && o !==
|
|
672
|
+
return e === void 0 && (e = !1), !o || e && o !== R(t) ? !1 : e;
|
|
673
673
|
}
|
|
674
674
|
function tt(t, e, o, n) {
|
|
675
675
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
676
676
|
const i = t.getBoundingClientRect(), r = kt(t);
|
|
677
677
|
let s = H(1);
|
|
678
|
-
e && (n ?
|
|
678
|
+
e && (n ? _(n) && (s = q(n)) : s = q(t));
|
|
679
679
|
const l = ae(r, o, n) ? $t(r) : H(0);
|
|
680
680
|
let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, f = i.width / s.x, u = i.height / s.y;
|
|
681
681
|
if (r) {
|
|
682
|
-
const p =
|
|
682
|
+
const p = R(r), d = n && _(n) ? R(n) : n;
|
|
683
683
|
let m = p, g = mt(m);
|
|
684
684
|
for (; g && n && d !== m; ) {
|
|
685
685
|
const h = q(g), w = g.getBoundingClientRect(), x = D(g), y = w.left + (g.clientLeft + parseFloat(x.paddingLeft)) * h.x, b = w.top + (g.clientTop + parseFloat(x.paddingTop)) * h.y;
|
|
686
|
-
c *= h.x, a *= h.y, f *= h.x, u *= h.y, c += y, a += b, m =
|
|
686
|
+
c *= h.x, a *= h.y, f *= h.x, u *= h.y, c += y, a += b, m = R(g), g = mt(m);
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
return it({
|
|
@@ -727,10 +727,10 @@ function pt(t, e) {
|
|
|
727
727
|
return e ? e.left + o : tt(N(t)).left + o;
|
|
728
728
|
}
|
|
729
729
|
function de(t) {
|
|
730
|
-
const e = N(t), o = lt(t), n = t.ownerDocument.body, i =
|
|
730
|
+
const e = N(t), o = lt(t), n = t.ownerDocument.body, i = O(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = O(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
731
731
|
let s = -o.scrollLeft + pt(t);
|
|
732
732
|
const l = -o.scrollTop;
|
|
733
|
-
return D(n).direction === "rtl" && (s +=
|
|
733
|
+
return D(n).direction === "rtl" && (s += O(e.clientWidth, n.clientWidth) - i), {
|
|
734
734
|
width: i,
|
|
735
735
|
height: r,
|
|
736
736
|
x: s,
|
|
@@ -738,7 +738,7 @@ function de(t) {
|
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
740
|
function me(t, e) {
|
|
741
|
-
const o =
|
|
741
|
+
const o = R(t), n = N(t), i = o.visualViewport;
|
|
742
742
|
let r = n.clientWidth, s = n.clientHeight, l = 0, c = 0;
|
|
743
743
|
if (i) {
|
|
744
744
|
r = i.width, s = i.height;
|
|
@@ -761,13 +761,13 @@ function pe(t, e) {
|
|
|
761
761
|
y: a
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function _t(t, e, o) {
|
|
765
765
|
let n;
|
|
766
766
|
if (e === "viewport")
|
|
767
767
|
n = me(t, o);
|
|
768
768
|
else if (e === "document")
|
|
769
769
|
n = de(N(t));
|
|
770
|
-
else if (
|
|
770
|
+
else if (_(e))
|
|
771
771
|
n = pe(e, o);
|
|
772
772
|
else {
|
|
773
773
|
const i = $t(t);
|
|
@@ -781,16 +781,16 @@ function St(t, e, o) {
|
|
|
781
781
|
}
|
|
782
782
|
function Wt(t, e) {
|
|
783
783
|
const o = Y(t);
|
|
784
|
-
return o === e || !
|
|
784
|
+
return o === e || !_(o) || G(o) ? !1 : D(o).position === "fixed" || Wt(o, e);
|
|
785
785
|
}
|
|
786
786
|
function ge(t, e) {
|
|
787
787
|
const o = e.get(t);
|
|
788
788
|
if (o)
|
|
789
789
|
return o;
|
|
790
|
-
let n = dt(t, [], !1).filter((l) =>
|
|
790
|
+
let n = dt(t, [], !1).filter((l) => _(l) && z(l) !== "body"), i = null;
|
|
791
791
|
const r = D(t).position === "fixed";
|
|
792
792
|
let s = r ? Y(t) : t;
|
|
793
|
-
for (;
|
|
793
|
+
for (; _(s) && !G(s); ) {
|
|
794
794
|
const l = D(s), c = yt(s);
|
|
795
795
|
!c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || et(s) && !c && Wt(t, s)) ? n = n.filter((f) => f !== s) : i = l, s = Y(s);
|
|
796
796
|
}
|
|
@@ -804,9 +804,9 @@ function he(t) {
|
|
|
804
804
|
strategy: i
|
|
805
805
|
} = t;
|
|
806
806
|
const s = [...o === "clippingAncestors" ? rt(e) ? [] : ge(e, this._c) : [].concat(o), n], l = s[0], c = s.reduce((a, f) => {
|
|
807
|
-
const u =
|
|
808
|
-
return a.top =
|
|
809
|
-
},
|
|
807
|
+
const u = _t(e, f, i);
|
|
808
|
+
return a.top = O(u.top, a.top), a.right = X(u.right, a.right), a.bottom = X(u.bottom, a.bottom), a.left = O(u.left, a.left), a;
|
|
809
|
+
}, _t(e, l, i));
|
|
810
810
|
return {
|
|
811
811
|
width: c.right - c.left,
|
|
812
812
|
height: c.bottom - c.top,
|
|
@@ -862,13 +862,13 @@ function Dt(t, e) {
|
|
|
862
862
|
return N(t) === o && (o = o.ownerDocument.body), o;
|
|
863
863
|
}
|
|
864
864
|
function Nt(t, e) {
|
|
865
|
-
const o =
|
|
865
|
+
const o = R(t);
|
|
866
866
|
if (rt(t))
|
|
867
867
|
return o;
|
|
868
868
|
if (!k(t)) {
|
|
869
869
|
let i = Y(t);
|
|
870
870
|
for (; i && !G(i); ) {
|
|
871
|
-
if (
|
|
871
|
+
if (_(i) && !ct(i))
|
|
872
872
|
return i;
|
|
873
873
|
i = Y(i);
|
|
874
874
|
}
|
|
@@ -903,9 +903,9 @@ const be = {
|
|
|
903
903
|
getClientRects: ue,
|
|
904
904
|
getDimensions: we,
|
|
905
905
|
getScale: q,
|
|
906
|
-
isElement:
|
|
906
|
+
isElement: _,
|
|
907
907
|
isRTL: ve
|
|
908
|
-
}, Ae = oe, Ce = ie, Re = ee, Oe = se,
|
|
908
|
+
}, Ae = oe, Ce = ie, Re = ee, Oe = se, Se = te, _e = (t, e, o) => {
|
|
909
909
|
const n = /* @__PURE__ */ new Map(), i = {
|
|
910
910
|
platform: be,
|
|
911
911
|
...o
|
|
@@ -937,7 +937,7 @@ function Pe(t) {
|
|
|
937
937
|
options: t,
|
|
938
938
|
fn(e) {
|
|
939
939
|
const o = Te(Ee(t.element));
|
|
940
|
-
return o == null ? {} :
|
|
940
|
+
return o == null ? {} : Se({
|
|
941
941
|
element: o,
|
|
942
942
|
padding: t.padding
|
|
943
943
|
}).fn(e);
|
|
@@ -947,7 +947,7 @@ function Pe(t) {
|
|
|
947
947
|
const Le = { class: "rds-e-tooltip" }, ke = {
|
|
948
948
|
key: 0,
|
|
949
949
|
class: "rds-e-tooltip__header"
|
|
950
|
-
}, $e = { class: "rds-e-tooltip__title" }, We = { class: "rds-e-tooltip__content" }, Ne = /* @__PURE__ */
|
|
950
|
+
}, $e = { class: "rds-e-tooltip__title" }, We = { class: "rds-e-tooltip__content" }, Ne = /* @__PURE__ */ Mt({
|
|
951
951
|
__name: "tooltip",
|
|
952
952
|
props: {
|
|
953
953
|
/**
|
|
@@ -994,8 +994,8 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
994
994
|
}
|
|
995
995
|
},
|
|
996
996
|
setup(t) {
|
|
997
|
-
const e = t, { large: o, fullWidth: n, title: i } =
|
|
998
|
-
const { x: m, y: g, middlewareData: h, placement: w } = await
|
|
997
|
+
const e = t, { large: o, fullWidth: n, title: i } = Vt(e), r = U(), s = U(), l = U(), c = U(!0), a = U(""), f = async () => {
|
|
998
|
+
const { x: m, y: g, middlewareData: h, placement: w } = await _e(
|
|
999
999
|
r.value,
|
|
1000
1000
|
s.value,
|
|
1001
1001
|
{
|
|
@@ -1005,10 +1005,10 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
1005
1005
|
Re(),
|
|
1006
1006
|
Ce(),
|
|
1007
1007
|
Oe({
|
|
1008
|
-
apply({ availableHeight: v,
|
|
1009
|
-
Object.assign(
|
|
1010
|
-
|
|
1011
|
-
|
|
1008
|
+
apply({ availableHeight: v, availableWidth: T, elements: C }) {
|
|
1009
|
+
Object.assign(C.floating.style, {
|
|
1010
|
+
maxWidth: n.value ? `${Math.max(0, T)}px` : "380px",
|
|
1011
|
+
width: "max-content",
|
|
1012
1012
|
maxHeight: `${Math.max(0, v)}px`
|
|
1013
1013
|
});
|
|
1014
1014
|
}
|
|
@@ -1041,7 +1041,7 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
1041
1041
|
i != null && i.value || (c.value = !0);
|
|
1042
1042
|
}, p = () => {
|
|
1043
1043
|
c.value = !1, f();
|
|
1044
|
-
}, d = Ft(() => `rds-e-tooltip__tooltip ${c.value ? "rds-e-tooltip__tooltip-hidden " : ""}${o.value || i != null && i.value ? "rds-e-tooltip__tooltip--large " : ""}
|
|
1044
|
+
}, d = Ft(() => `rds-e-tooltip__tooltip ${c.value ? "rds-e-tooltip__tooltip-hidden " : ""}${o.value || i != null && i.value ? "rds-e-tooltip__tooltip--large " : ""}`);
|
|
1045
1045
|
return (m, g) => (bt(), At("div", Le, [
|
|
1046
1046
|
Z("div", {
|
|
1047
1047
|
ref_key: "referenceRef",
|
|
@@ -1077,7 +1077,7 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
1077
1077
|
], 2)
|
|
1078
1078
|
]));
|
|
1079
1079
|
}
|
|
1080
|
-
}), Fe = /* @__PURE__ */ It(Ne, [["__scopeId", "data-v-
|
|
1080
|
+
}), Fe = /* @__PURE__ */ It(Ne, [["__scopeId", "data-v-064513ce"]]);
|
|
1081
1081
|
export {
|
|
1082
1082
|
Fe as default
|
|
1083
1083
|
};
|