energy-components 1.12.0 → 1.13.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/checkbox.es.js +67 -45
- package/dist/components/datepicker.es.js +2276 -2251
- package/dist/components/dropdown.es.js +148 -141
- package/dist/components/index.es.js +15 -15
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/textField.es.js +25 -25
- package/dist/components/tooltip.es.js +50 -50
- package/dist/energy-components.es.js +14968 -14915
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +2 -2
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +2 -2
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +15 -0
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +4 -2
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +13 -13
- package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +2 -2
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unref as at, defineComponent as Ft, toRefs as Ht, ref as U, computed as jt, createElementBlock as vt, openBlock as bt, createElementVNode as Z, renderSlot as At, normalizeClass as
|
|
1
|
+
import { unref as at, defineComponent as Ft, toRefs as Ht, ref as U, computed as jt, createElementBlock as vt, openBlock as bt, createElementVNode as Z, renderSlot as At, normalizeClass as Rt, createCommentVNode as It, createVNode as Yt, toDisplayString as Ct, createTextVNode as zt } from "vue";
|
|
2
2
|
import { R as Xt } from "./icon-svg-DuzOdbk1.js";
|
|
3
3
|
import { _ as Kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/tooltip.css';const X = Math.min, S = Math.max, nt = Math.round, $ = (t) => ({
|
|
@@ -282,16 +282,16 @@ const ne = (t) => ({
|
|
|
282
282
|
x: o,
|
|
283
283
|
y: n
|
|
284
284
|
}, d = pt(i), m = mt(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], E = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
285
|
-
let
|
|
286
|
-
(!
|
|
287
|
-
const W = b / 2 - v / 2, P =
|
|
285
|
+
let R = E ? E[y] : 0;
|
|
286
|
+
(!R || !await (s.isElement == null ? void 0 : s.isElement(E))) && (R = l.floating[y] || r.floating[m]);
|
|
287
|
+
const W = b / 2 - v / 2, P = R / 2 - g[m] / 2 - 1, O = X(u[w], P), F = X(u[x], P), k = O, H = R - g[m] - F, A = R / 2 - g[m] / 2 + W, z = ft(k, A, H), M = !c.arrow && Q(i) != null && A !== z && r.reference[m] / 2 - (A < k ? O : F) - g[m] / 2 < 0, T = M ? A < k ? A - k : A - H : 0;
|
|
288
288
|
return {
|
|
289
|
-
[d]: p[d] +
|
|
289
|
+
[d]: p[d] + T,
|
|
290
290
|
data: {
|
|
291
291
|
[d]: z,
|
|
292
|
-
centerOffset: A - z -
|
|
292
|
+
centerOffset: A - z - T,
|
|
293
293
|
...M && {
|
|
294
|
-
alignmentOffset:
|
|
294
|
+
alignmentOffset: T
|
|
295
295
|
}
|
|
296
296
|
},
|
|
297
297
|
reset: M
|
|
@@ -323,7 +323,7 @@ const ne = (t) => ({
|
|
|
323
323
|
return {};
|
|
324
324
|
const w = I(i), x = V(l), y = I(l) === l, b = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), v = p || (y || !g ? [ot(l)] : Qt(l)), E = m !== "none";
|
|
325
325
|
!p && E && v.push(...Zt(l, g, m, b));
|
|
326
|
-
const
|
|
326
|
+
const R = [l, ...v], W = await gt(e, h), P = [];
|
|
327
327
|
let O = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
328
328
|
if (f && P.push(W[w]), u) {
|
|
329
329
|
const A = Jt(i, s, b);
|
|
@@ -334,10 +334,10 @@ const ne = (t) => ({
|
|
|
334
334
|
overflows: P
|
|
335
335
|
}], !P.every((A) => A <= 0)) {
|
|
336
336
|
var F, k;
|
|
337
|
-
const A = (((F = r.flip) == null ? void 0 : F.index) || 0) + 1, z =
|
|
337
|
+
const A = (((F = r.flip) == null ? void 0 : F.index) || 0) + 1, z = R[A];
|
|
338
338
|
if (z && (!(u === "alignment" ? x !== V(z) : !1) || // We leave the current main axis only if every placement on that axis
|
|
339
339
|
// overflows the main axis.
|
|
340
|
-
O.every((
|
|
340
|
+
O.every((_) => _.overflows[0] > 0 && V(_.placement) === x)))
|
|
341
341
|
return {
|
|
342
342
|
data: {
|
|
343
343
|
index: A,
|
|
@@ -347,21 +347,21 @@ const ne = (t) => ({
|
|
|
347
347
|
placement: z
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
let M = (k = O.filter((
|
|
350
|
+
let M = (k = O.filter((T) => T.overflows[0] <= 0).sort((T, _) => T.overflows[1] - _.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
351
351
|
if (!M)
|
|
352
352
|
switch (d) {
|
|
353
353
|
case "bestFit": {
|
|
354
354
|
var H;
|
|
355
|
-
const
|
|
355
|
+
const T = (H = O.filter((_) => {
|
|
356
356
|
if (E) {
|
|
357
|
-
const j = V(
|
|
357
|
+
const j = V(_.placement);
|
|
358
358
|
return j === x || // Create a bias to the `y` side axis due to horizontal
|
|
359
359
|
// reading directions favoring greater width.
|
|
360
360
|
j === "y";
|
|
361
361
|
}
|
|
362
362
|
return !0;
|
|
363
|
-
}).map((
|
|
364
|
-
|
|
363
|
+
}).map((_) => [_.placement, _.overflows.filter((j) => j > 0).reduce((j, Bt) => j + Bt, 0)]).sort((_, j) => _[1] - j[1])[0]) == null ? void 0 : H[0];
|
|
364
|
+
T && (M = T);
|
|
365
365
|
break;
|
|
366
366
|
}
|
|
367
367
|
case "initialPlacement":
|
|
@@ -506,15 +506,15 @@ const se = function(t) {
|
|
|
506
506
|
let h, w;
|
|
507
507
|
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");
|
|
508
508
|
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), E = !e.middlewareData.shift;
|
|
509
|
-
let
|
|
510
|
-
if ((o = e.middlewareData.shift) != null && o.enabled.x && (W = y), (n = e.middlewareData.shift) != null && n.enabled.y && (
|
|
509
|
+
let R = b, W = v;
|
|
510
|
+
if ((o = e.middlewareData.shift) != null && o.enabled.x && (W = y), (n = e.middlewareData.shift) != null && n.enabled.y && (R = x), E && !p) {
|
|
511
511
|
const O = S(f.left, 0), F = S(f.right, 0), k = S(f.top, 0), H = S(f.bottom, 0);
|
|
512
|
-
d ? W = m - 2 * (O !== 0 || F !== 0 ? O + F : S(f.left, f.right)) :
|
|
512
|
+
d ? W = m - 2 * (O !== 0 || F !== 0 ? O + F : S(f.left, f.right)) : R = g - 2 * (k !== 0 || H !== 0 ? k + H : S(f.top, f.bottom));
|
|
513
513
|
}
|
|
514
514
|
await c({
|
|
515
515
|
...e,
|
|
516
516
|
availableWidth: W,
|
|
517
|
-
availableHeight:
|
|
517
|
+
availableHeight: R
|
|
518
518
|
});
|
|
519
519
|
const P = await s.getDimensions(l.floating);
|
|
520
520
|
return m !== P.width || g !== P.height ? {
|
|
@@ -531,7 +531,7 @@ function st() {
|
|
|
531
531
|
function K(t) {
|
|
532
532
|
return ht(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function C(t) {
|
|
535
535
|
var e;
|
|
536
536
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
537
537
|
}
|
|
@@ -540,16 +540,16 @@ function B(t) {
|
|
|
540
540
|
return (e = (ht(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
541
541
|
}
|
|
542
542
|
function ht(t) {
|
|
543
|
-
return st() ? t instanceof Node || t instanceof
|
|
543
|
+
return st() ? t instanceof Node || t instanceof C(t).Node : !1;
|
|
544
544
|
}
|
|
545
545
|
function D(t) {
|
|
546
|
-
return st() ? t instanceof Element || t instanceof
|
|
546
|
+
return st() ? t instanceof Element || t instanceof C(t).Element : !1;
|
|
547
547
|
}
|
|
548
548
|
function N(t) {
|
|
549
|
-
return st() ? t instanceof HTMLElement || t instanceof
|
|
549
|
+
return st() ? t instanceof HTMLElement || t instanceof C(t).HTMLElement : !1;
|
|
550
550
|
}
|
|
551
551
|
function St(t) {
|
|
552
|
-
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
552
|
+
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof C(t).ShadowRoot;
|
|
553
553
|
}
|
|
554
554
|
function et(t) {
|
|
555
555
|
const {
|
|
@@ -594,7 +594,7 @@ function G(t) {
|
|
|
594
594
|
return ["html", "body", "#document"].includes(K(t));
|
|
595
595
|
}
|
|
596
596
|
function L(t) {
|
|
597
|
-
return
|
|
597
|
+
return C(t).getComputedStyle(t);
|
|
598
598
|
}
|
|
599
599
|
function lt(t) {
|
|
600
600
|
return D(t) ? {
|
|
@@ -624,7 +624,7 @@ function Et(t) {
|
|
|
624
624
|
function Pt(t, e, o) {
|
|
625
625
|
var n;
|
|
626
626
|
e === void 0 && (e = []);
|
|
627
|
-
const i = Et(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s =
|
|
627
|
+
const i = Et(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s = C(i);
|
|
628
628
|
return r ? (dt(s), e.concat(s, s.visualViewport || [], et(i) ? i : [], [])) : e.concat(i, Pt(i, []));
|
|
629
629
|
}
|
|
630
630
|
function dt(t) {
|
|
@@ -660,14 +660,14 @@ function q(t) {
|
|
|
660
660
|
}
|
|
661
661
|
const fe = /* @__PURE__ */ $(0);
|
|
662
662
|
function Nt(t) {
|
|
663
|
-
const e =
|
|
663
|
+
const e = C(t);
|
|
664
664
|
return !xt() || !e.visualViewport ? fe : {
|
|
665
665
|
x: e.visualViewport.offsetLeft,
|
|
666
666
|
y: e.visualViewport.offsetTop
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
669
|
function ue(t, e, o) {
|
|
670
|
-
return e === void 0 && (e = !1), !o || e && o !==
|
|
670
|
+
return e === void 0 && (e = !1), !o || e && o !== C(t) ? !1 : e;
|
|
671
671
|
}
|
|
672
672
|
function tt(t, e, o, n) {
|
|
673
673
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
@@ -677,11 +677,11 @@ function tt(t, e, o, n) {
|
|
|
677
677
|
const l = ue(r, o, n) ? Nt(r) : $(0);
|
|
678
678
|
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;
|
|
679
679
|
if (r) {
|
|
680
|
-
const p =
|
|
680
|
+
const p = C(r), d = n && D(n) ? C(n) : n;
|
|
681
681
|
let m = p, g = dt(m);
|
|
682
682
|
for (; g && n && d !== m; ) {
|
|
683
683
|
const h = q(g), w = g.getBoundingClientRect(), x = L(g), y = w.left + (g.clientLeft + parseFloat(x.paddingLeft)) * h.x, b = w.top + (g.clientTop + parseFloat(x.paddingTop)) * h.y;
|
|
684
|
-
c *= h.x, a *= h.y, f *= h.x, u *= h.y, c += y, a += b, m =
|
|
684
|
+
c *= h.x, a *= h.y, f *= h.x, u *= h.y, c += y, a += b, m = C(g), g = dt(m);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
return it({
|
|
@@ -748,7 +748,7 @@ function pe(t) {
|
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
750
|
function ge(t, e) {
|
|
751
|
-
const o =
|
|
751
|
+
const o = C(t), n = B(t), i = o.visualViewport;
|
|
752
752
|
let r = n.clientWidth, s = n.clientHeight, l = 0, c = 0;
|
|
753
753
|
if (i) {
|
|
754
754
|
r = i.width, s = i.height;
|
|
@@ -771,7 +771,7 @@ function he(t, e) {
|
|
|
771
771
|
y: a
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Tt(t, e, o) {
|
|
775
775
|
let n;
|
|
776
776
|
if (e === "viewport")
|
|
777
777
|
n = ge(t, o);
|
|
@@ -815,9 +815,9 @@ function xe(t) {
|
|
|
815
815
|
strategy: i
|
|
816
816
|
} = t;
|
|
817
817
|
const s = [...o === "clippingAncestors" ? rt(e) ? [] : we(e, this._c) : [].concat(o), n], l = s[0], c = s.reduce((a, f) => {
|
|
818
|
-
const u =
|
|
818
|
+
const u = Tt(e, f, i);
|
|
819
819
|
return a.top = S(u.top, a.top), a.right = X(u.right, a.right), a.bottom = X(u.bottom, a.bottom), a.left = S(u.left, a.left), a;
|
|
820
|
-
},
|
|
820
|
+
}, Tt(e, l, i));
|
|
821
821
|
return {
|
|
822
822
|
width: c.right - c.left,
|
|
823
823
|
height: c.bottom - c.top,
|
|
@@ -862,7 +862,7 @@ function ve(t, e, o) {
|
|
|
862
862
|
function ct(t) {
|
|
863
863
|
return L(t).position === "static";
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function _t(t, e) {
|
|
866
866
|
if (!N(t) || L(t).position === "fixed")
|
|
867
867
|
return null;
|
|
868
868
|
if (e)
|
|
@@ -871,7 +871,7 @@ function Tt(t, e) {
|
|
|
871
871
|
return B(t) === o && (o = o.ownerDocument.body), o;
|
|
872
872
|
}
|
|
873
873
|
function Vt(t, e) {
|
|
874
|
-
const o =
|
|
874
|
+
const o = C(t);
|
|
875
875
|
if (rt(t))
|
|
876
876
|
return o;
|
|
877
877
|
if (!N(t)) {
|
|
@@ -883,9 +883,9 @@ function Vt(t, e) {
|
|
|
883
883
|
}
|
|
884
884
|
return o;
|
|
885
885
|
}
|
|
886
|
-
let n =
|
|
886
|
+
let n = _t(t, e);
|
|
887
887
|
for (; n && ce(n) && ct(n); )
|
|
888
|
-
n =
|
|
888
|
+
n = _t(n, e);
|
|
889
889
|
return n && G(n) && ct(n) && !wt(n) ? o : n || ae(t) || o;
|
|
890
890
|
}
|
|
891
891
|
const be = async function(t) {
|
|
@@ -903,7 +903,7 @@ const be = async function(t) {
|
|
|
903
903
|
function Ae(t) {
|
|
904
904
|
return L(t).direction === "rtl";
|
|
905
905
|
}
|
|
906
|
-
const
|
|
906
|
+
const Re = {
|
|
907
907
|
convertOffsetParentRelativeRectToViewportRelativeRect: de,
|
|
908
908
|
getDocumentElement: B,
|
|
909
909
|
getClippingRect: xe,
|
|
@@ -914,9 +914,9 @@ const Ce = {
|
|
|
914
914
|
getScale: q,
|
|
915
915
|
isElement: D,
|
|
916
916
|
isRTL: Ae
|
|
917
|
-
},
|
|
917
|
+
}, Ce = se, Oe = re, Se = oe, Te = le, _e = ne, De = (t, e, o) => {
|
|
918
918
|
const n = /* @__PURE__ */ new Map(), i = {
|
|
919
|
-
platform:
|
|
919
|
+
platform: Re,
|
|
920
920
|
...o
|
|
921
921
|
}, r = {
|
|
922
922
|
...i.platform,
|
|
@@ -946,7 +946,7 @@ function ke(t) {
|
|
|
946
946
|
options: t,
|
|
947
947
|
fn(e) {
|
|
948
948
|
const o = Ee(Pe(t.element));
|
|
949
|
-
return o == null ? {} :
|
|
949
|
+
return o == null ? {} : _e({
|
|
950
950
|
element: o,
|
|
951
951
|
padding: t.padding
|
|
952
952
|
}).fn(e);
|
|
@@ -1010,12 +1010,12 @@ const $e = { class: "rds-e-tooltip" }, Ne = {
|
|
|
1010
1010
|
{
|
|
1011
1011
|
placement: e.placement,
|
|
1012
1012
|
middleware: [
|
|
1013
|
-
|
|
1013
|
+
Ce(e.offsetSpace),
|
|
1014
1014
|
Se(),
|
|
1015
1015
|
Oe(),
|
|
1016
|
-
|
|
1017
|
-
apply({ availableHeight: v, availableWidth: E, elements:
|
|
1018
|
-
Object.assign(
|
|
1016
|
+
Te({
|
|
1017
|
+
apply({ availableHeight: v, availableWidth: E, elements: R }) {
|
|
1018
|
+
Object.assign(R.floating.style, {
|
|
1019
1019
|
maxWidth: n.value ? `${Math.max(0, E)}px` : "380px",
|
|
1020
1020
|
width: "max-content",
|
|
1021
1021
|
maxHeight: `${Math.max(0, v)}px`
|
|
@@ -1066,10 +1066,10 @@ const $e = { class: "rds-e-tooltip" }, Ne = {
|
|
|
1066
1066
|
Z("div", {
|
|
1067
1067
|
ref_key: "floatingRef",
|
|
1068
1068
|
ref: s,
|
|
1069
|
-
class:
|
|
1069
|
+
class: Rt(d.value)
|
|
1070
1070
|
}, [
|
|
1071
1071
|
at(i) ? (bt(), vt("div", Ne, [
|
|
1072
|
-
Z("h3", We,
|
|
1072
|
+
Z("h3", We, Ct(at(i)), 1),
|
|
1073
1073
|
Yt(Xt, {
|
|
1074
1074
|
name: "close",
|
|
1075
1075
|
"aria-hidden": "true",
|
|
@@ -1079,13 +1079,13 @@ const $e = { class: "rds-e-tooltip" }, Ne = {
|
|
|
1079
1079
|
])) : It("", !0),
|
|
1080
1080
|
Z("div", Me, [
|
|
1081
1081
|
At(m.$slots, "tooltip-content", {}, () => [
|
|
1082
|
-
zt(
|
|
1082
|
+
zt(Ct(t.content), 1)
|
|
1083
1083
|
], !0)
|
|
1084
1084
|
]),
|
|
1085
1085
|
Z("div", {
|
|
1086
1086
|
ref_key: "arrowRef",
|
|
1087
1087
|
ref: l,
|
|
1088
|
-
class:
|
|
1088
|
+
class: Rt(["rds-e-tooltip__tooltip-arrow", a.value])
|
|
1089
1089
|
}, null, 2)
|
|
1090
1090
|
], 2)
|
|
1091
1091
|
]));
|