@algorisys/zen-ui-solid 13.8.0 → 13.8.1
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/form/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/form/radio/radio-group.d.ts.map +1 -1
- package/dist/components/form/slider/slider.d.ts.map +1 -1
- package/dist/components/form/switch/switch.d.ts.map +1 -1
- package/dist/index208.js +13 -13
- package/dist/index209.js +2 -2
- package/dist/index210.js +5 -5
- package/dist/index211.js +12 -12
- package/dist/index212.js +13 -13
- package/dist/index213.js +10 -10
- package/dist/index214.js +10 -10
- package/dist/index215.js +9 -9
- package/dist/index216.js +9 -9
- package/dist/index218.js +14 -14
- package/dist/index219.js +14 -14
- package/dist/index220.js +13 -13
- package/dist/index221.js +1 -1
- package/dist/index222.js +5 -5
- package/dist/index223.js +9 -9
- package/dist/index224.js +24 -24
- package/dist/index225.js +5 -5
- package/dist/index226.js +3 -3
- package/dist/index249.js +10 -10
- package/dist/index250.js +3 -3
- package/dist/index252.js +2 -2
- package/dist/index257.js +1 -1
- package/dist/index258.js +1 -1
- package/dist/index271.js +5 -5
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +5 -3
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +3 -17
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +17 -16
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +16 -3
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +3 -3
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +3 -26
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +26 -11
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +10 -7
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +8 -49
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +49 -13
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +12 -6
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +7 -4
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +4 -5
- package/dist/index284.js.map +1 -1
- package/dist/index286.js +6 -260
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +105 -64
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +67 -19
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +72 -3
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +22 -15
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +58 -7
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +3 -384
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +16 -35
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +384 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +92 -19
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +34 -391
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +6 -118
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +17 -48
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +62 -16
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +48 -58
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +31 -62
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +16 -20
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +58 -56
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +20 -10
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +10 -117
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +920 -20
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +37 -19
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +256 -18
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +114 -71
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +556 -891
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +121 -36
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +17 -114
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +363 -560
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +85 -118
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +16 -112
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +115 -67
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +21 -16
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +19 -91
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +20 -87
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +71 -16
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +118 -32
- package/dist/index321.js.map +1 -1
- package/dist/index323.js +1 -1
- package/dist/index324.js +93 -63
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +5 -116
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +38 -7
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +44 -7
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +2 -13
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +65 -7
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +115 -3
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +608 -3
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +295 -4
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +88 -5
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +11 -95
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +20 -5
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +62 -38
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +33 -43
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +7 -2
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +6 -608
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +11 -294
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +6 -88
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +3 -10
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +3 -19
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +4 -61
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +5 -33
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +3 -466
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +9 -125
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +33 -134
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +21 -3
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +5 -5
- package/dist/index351.js +2 -2
- package/dist/index357.js +464 -8
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +126 -33
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +133 -20
- package/dist/index359.js.map +1 -1
- package/dist/index53.js +21 -15
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +15 -9
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +20 -14
- package/dist/index55.js.map +1 -1
- package/dist/index62.js +42 -22
- package/dist/index62.js.map +1 -1
- package/dist/server/index.js +50 -12
- package/package.json +1 -1
package/dist/index313.js
CHANGED
|
@@ -1,592 +1,395 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { flip as st, shift as rt, size as ct, hide as lt, arrow as ft, computePosition as ut, offset as at } from "./index357.js";
|
|
2
|
+
import { rectToClientRect as J, floor as W, createCoords as v, round as S, max as T, min as M } from "./index358.js";
|
|
3
|
+
import { getOverflowAncestors as N, isElement as R, getDocumentElement as C, getWindow as x, isHTMLElement as F, getComputedStyle as b, isTopLayer as A, getParentNode as z, isLastTraversableNode as $, isTableElement as ht, isContainingBlock as Q, getContainingBlock as dt, getNodeName as _, isOverflowElement as Y, getNodeScroll as D, isWebKit as Z, getFrameElement as k } from "./index359.js";
|
|
4
|
+
function tt(t) {
|
|
5
|
+
const e = b(t);
|
|
6
|
+
let o = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
|
7
|
+
const n = F(t), r = n ? t.offsetWidth : o, s = n ? t.offsetHeight : i, c = S(o) !== r || S(i) !== s;
|
|
8
|
+
return c && (o = r, i = s), {
|
|
9
|
+
width: o,
|
|
10
|
+
height: i,
|
|
11
|
+
$: c
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function X(t) {
|
|
15
|
+
return R(t) ? t : t.contextElement;
|
|
16
|
+
}
|
|
17
|
+
function E(t) {
|
|
18
|
+
const e = X(t);
|
|
19
|
+
if (!F(e))
|
|
20
|
+
return v(1);
|
|
21
|
+
const o = e.getBoundingClientRect(), {
|
|
22
|
+
width: i,
|
|
23
|
+
height: n,
|
|
24
|
+
$: r
|
|
25
|
+
} = tt(e);
|
|
26
|
+
let s = (r ? S(o.width) : o.width) / i, c = (r ? S(o.height) : o.height) / n;
|
|
27
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
28
|
+
x: s,
|
|
29
|
+
y: c
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const gt = /* @__PURE__ */ v(0);
|
|
33
|
+
function et(t) {
|
|
34
|
+
const e = x(t);
|
|
35
|
+
return !Z() || !e.visualViewport ? gt : {
|
|
36
|
+
x: e.visualViewport.offsetLeft,
|
|
37
|
+
y: e.visualViewport.offsetTop
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function pt(t, e, o) {
|
|
41
|
+
return e === void 0 && (e = !1), !!o && e && o === x(t);
|
|
42
|
+
}
|
|
43
|
+
function L(t, e, o, i) {
|
|
44
|
+
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
45
|
+
const n = t.getBoundingClientRect(), r = X(t);
|
|
46
|
+
let s = v(1);
|
|
47
|
+
e && (i ? R(i) && (s = E(i)) : s = E(t));
|
|
48
|
+
const c = pt(r, o, i) ? et(r) : v(0);
|
|
49
|
+
let f = (n.left + c.x) / s.x, l = (n.top + c.y) / s.y, u = n.width / s.x, a = n.height / s.y;
|
|
50
|
+
if (r && i) {
|
|
51
|
+
const d = x(r), h = R(i) ? x(i) : i;
|
|
52
|
+
let y = d, p = k(y);
|
|
53
|
+
for (; p && h !== y; ) {
|
|
54
|
+
const w = E(p), g = p.getBoundingClientRect(), m = b(p), O = g.left + (p.clientLeft + parseFloat(m.paddingLeft)) * w.x, V = g.top + (p.clientTop + parseFloat(m.paddingTop)) * w.y;
|
|
55
|
+
f *= w.x, l *= w.y, u *= w.x, a *= w.y, f += O, l += V, y = x(p), p = k(y);
|
|
56
|
+
}
|
|
13
57
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
58
|
+
return J({
|
|
59
|
+
width: u,
|
|
60
|
+
height: a,
|
|
61
|
+
x: f,
|
|
62
|
+
y: l
|
|
63
|
+
});
|
|
18
64
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
65
|
+
function B(t, e) {
|
|
66
|
+
const o = D(t).scrollLeft;
|
|
67
|
+
return e ? e.left + o : L(C(t)).left + o;
|
|
21
68
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
69
|
+
function ot(t, e) {
|
|
70
|
+
const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - B(t, o), n = o.top + e.scrollTop;
|
|
71
|
+
return {
|
|
72
|
+
x: i,
|
|
73
|
+
y: n
|
|
74
|
+
};
|
|
24
75
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
76
|
+
function wt(t) {
|
|
77
|
+
let {
|
|
78
|
+
elements: e,
|
|
79
|
+
rect: o,
|
|
80
|
+
offsetParent: i,
|
|
81
|
+
strategy: n
|
|
82
|
+
} = t;
|
|
83
|
+
const r = n === "fixed", s = C(i), c = e ? A(e.floating) : !1;
|
|
84
|
+
if (i === s || c && r)
|
|
85
|
+
return o;
|
|
86
|
+
let f = {
|
|
87
|
+
scrollLeft: 0,
|
|
88
|
+
scrollTop: 0
|
|
89
|
+
}, l = v(1);
|
|
90
|
+
const u = v(0), a = F(i);
|
|
91
|
+
if ((a || !r) && ((_(i) !== "body" || Y(s)) && (f = D(i)), a)) {
|
|
92
|
+
const h = L(i);
|
|
93
|
+
l = E(i), u.x = h.x + i.clientLeft, u.y = h.y + i.clientTop;
|
|
94
|
+
}
|
|
95
|
+
const d = s && !a && !r ? ot(s, f) : v(0);
|
|
96
|
+
return {
|
|
97
|
+
width: o.width * l.x,
|
|
98
|
+
height: o.height * l.y,
|
|
99
|
+
x: o.x * l.x - f.scrollLeft * l.x + u.x + d.x,
|
|
100
|
+
y: o.y * l.y - f.scrollTop * l.y + u.y + d.y
|
|
101
|
+
};
|
|
27
102
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
return !1;
|
|
31
|
-
for (const s of e)
|
|
32
|
-
if (!t.has(s))
|
|
33
|
-
return !1;
|
|
34
|
-
return !0;
|
|
103
|
+
function yt(t) {
|
|
104
|
+
return t.getClientRects ? Array.from(t.getClientRects()) : [];
|
|
35
105
|
}
|
|
36
|
-
function
|
|
37
|
-
const t =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return K != null ? B(K) : new b();
|
|
46
|
-
}), [S, p] = X({
|
|
47
|
-
value: w,
|
|
48
|
-
defaultValue: g,
|
|
49
|
-
onChange: (K) => t.onSelectionChange?.(K)
|
|
50
|
-
}), [m, v] = k(o(t.selectionBehavior)), D = () => o(t.selectionMode), T = () => o(t.disallowEmptySelection) ?? !1, x = (K) => {
|
|
51
|
-
(o(t.allowDuplicateSelectionEvents) || !Y(K, S())) && p(K);
|
|
106
|
+
function mt(t) {
|
|
107
|
+
const e = D(t), o = t.ownerDocument.body, i = T(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), n = T(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
108
|
+
let r = -e.scrollLeft + B(t);
|
|
109
|
+
const s = -e.scrollTop;
|
|
110
|
+
return b(o).direction === "rtl" && (r += T(t.clientWidth, o.clientWidth) - i), {
|
|
111
|
+
width: i,
|
|
112
|
+
height: n,
|
|
113
|
+
x: r,
|
|
114
|
+
y: s
|
|
52
115
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
116
|
+
}
|
|
117
|
+
const vt = 25;
|
|
118
|
+
function xt(t, e, o) {
|
|
119
|
+
o === void 0 && (o = "viewport");
|
|
120
|
+
const i = o === "layoutViewport", n = x(t), r = C(t), s = n.visualViewport;
|
|
121
|
+
let c = r.clientWidth, f = r.clientHeight, l = 0, u = 0;
|
|
122
|
+
if (s) {
|
|
123
|
+
const d = !Z() || e === "fixed";
|
|
124
|
+
i ? d || (l = -s.offsetLeft, u = -s.offsetTop) : (c = s.width, f = s.height, d && (l = s.offsetLeft, u = s.offsetTop));
|
|
125
|
+
}
|
|
126
|
+
if (B(r) <= 0) {
|
|
127
|
+
const d = r.ownerDocument, h = d.body, y = getComputedStyle(h), p = d.compatMode === "CSS1Compat" && parseFloat(y.marginLeft) + parseFloat(y.marginRight) || 0, w = Math.abs(r.clientWidth - h.clientWidth - p), g = getComputedStyle(r).scrollbarGutter === "stable both-edges" ? w / 2 : w;
|
|
128
|
+
g <= vt && (c -= g);
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
width: c,
|
|
132
|
+
height: f,
|
|
133
|
+
x: l,
|
|
134
|
+
y: u
|
|
69
135
|
};
|
|
70
136
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
137
|
+
function Rt(t, e) {
|
|
138
|
+
const o = L(t, !0, e === "fixed"), i = o.top + t.clientTop, n = o.left + t.clientLeft, r = E(t), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = n * r.x, l = i * r.y;
|
|
73
139
|
return {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const g = o(e.keyboardDelegate), S = o(e.selectionManager);
|
|
79
|
-
if (!g.getKeyForSearch)
|
|
80
|
-
return;
|
|
81
|
-
const p = se(w.key);
|
|
82
|
-
if (!p || w.ctrlKey || w.metaKey)
|
|
83
|
-
return;
|
|
84
|
-
p === " " && t().trim().length > 0 && (w.preventDefault(), w.stopPropagation());
|
|
85
|
-
let m = s((D) => D + p), v = g.getKeyForSearch(m, S.focusedKey()) ?? g.getKeyForSearch(m);
|
|
86
|
-
v == null && ne(m) && (m = m[0], v = g.getKeyForSearch(m, S.focusedKey()) ?? g.getKeyForSearch(m)), v != null && (S.setFocusedKey(v), e.onTypeSelect?.(v)), clearTimeout(n()), c(window.setTimeout(() => s(""), 500));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
140
|
+
width: s,
|
|
141
|
+
height: c,
|
|
142
|
+
x: f,
|
|
143
|
+
y: l
|
|
89
144
|
};
|
|
90
145
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
146
|
+
function G(t, e, o) {
|
|
147
|
+
let i;
|
|
148
|
+
if (e === "viewport" || e === "layoutViewport")
|
|
149
|
+
i = xt(t, o, e);
|
|
150
|
+
else if (e === "document")
|
|
151
|
+
i = mt(C(t));
|
|
152
|
+
else if (R(e))
|
|
153
|
+
i = Rt(e, o);
|
|
154
|
+
else {
|
|
155
|
+
const n = et(t);
|
|
156
|
+
i = {
|
|
157
|
+
x: e.x - n.x,
|
|
158
|
+
y: e.y - n.y,
|
|
159
|
+
width: e.width,
|
|
160
|
+
height: e.height
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
return J(i);
|
|
93
164
|
}
|
|
94
|
-
function
|
|
95
|
-
|
|
165
|
+
function bt(t, e) {
|
|
166
|
+
const o = e.get(t);
|
|
167
|
+
if (o)
|
|
168
|
+
return o;
|
|
169
|
+
let i = N(t, [], !1).filter((c) => R(c) && _(c) !== "body"), n = null;
|
|
170
|
+
const r = b(t).position === "fixed";
|
|
171
|
+
let s = r ? z(t) : t;
|
|
172
|
+
for (; R(s) && !$(s); ) {
|
|
173
|
+
const c = b(s), f = Q(s), l = n ? n.position : r ? "fixed" : "";
|
|
174
|
+
!f && (l === "fixed" || l === "absolute" && c.position === "static") ? i = i.filter((a) => a !== s) : n = c, s = z(s);
|
|
175
|
+
}
|
|
176
|
+
return e.set(t, i), i;
|
|
96
177
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
178
|
+
function Ct(t) {
|
|
179
|
+
let {
|
|
180
|
+
element: e,
|
|
181
|
+
boundary: o,
|
|
182
|
+
rootBoundary: i,
|
|
183
|
+
strategy: n
|
|
184
|
+
} = t;
|
|
185
|
+
const s = [...o === "clippingAncestors" ? A(e) ? [] : bt(e, this._c) : [].concat(o), i], c = G(e, s[0], n);
|
|
186
|
+
let f = c.top, l = c.right, u = c.bottom, a = c.left;
|
|
187
|
+
for (let d = 1; d < s.length; d++) {
|
|
188
|
+
const h = G(e, s[d], n);
|
|
189
|
+
f = T(h.top, f), l = M(h.right, l), u = M(h.bottom, u), a = T(h.left, a);
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
width: l - a,
|
|
193
|
+
height: u - f,
|
|
194
|
+
x: a,
|
|
195
|
+
y: f
|
|
106
196
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
i && (g = {
|
|
110
|
-
top: i.scrollTop,
|
|
111
|
-
left: i.scrollLeft
|
|
112
|
-
});
|
|
113
|
-
});
|
|
197
|
+
}
|
|
198
|
+
function Lt(t) {
|
|
114
199
|
const {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
q(i, S.onKeyDown), i.altKey && i.key === "Tab" && i.preventDefault();
|
|
122
|
-
const u = t();
|
|
123
|
-
if (!u?.contains(i.target))
|
|
124
|
-
return;
|
|
125
|
-
const l = o(c.selectionManager), y = o(c.selectOnFocus), d = (a) => {
|
|
126
|
-
a != null && (l.setFocusedKey(a), i.shiftKey && l.selectionMode() === "multiple" ? l.extendSelection(a) : y && !V(i) && l.replaceSelection(a));
|
|
127
|
-
}, r = o(c.keyboardDelegate), M = o(c.shouldFocusWrap), h = l.focusedKey();
|
|
128
|
-
switch (i.key) {
|
|
129
|
-
case (p() === "vertical" ? "ArrowDown" : "ArrowRight"): {
|
|
130
|
-
if (r.getKeyBelow) {
|
|
131
|
-
i.preventDefault();
|
|
132
|
-
let a;
|
|
133
|
-
h != null ? a = r.getKeyBelow(h) : a = r.getFirstKey?.(), a == null && M && (a = r.getFirstKey?.(h)), d(a);
|
|
134
|
-
}
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
case (p() === "vertical" ? "ArrowUp" : "ArrowLeft"): {
|
|
138
|
-
if (r.getKeyAbove) {
|
|
139
|
-
i.preventDefault();
|
|
140
|
-
let a;
|
|
141
|
-
h != null ? a = r.getKeyAbove(h) : a = r.getLastKey?.(), a == null && M && (a = r.getLastKey?.(h)), d(a);
|
|
142
|
-
}
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
case (p() === "vertical" ? "ArrowLeft" : "ArrowUp"): {
|
|
146
|
-
if (r.getKeyLeftOf) {
|
|
147
|
-
i.preventDefault();
|
|
148
|
-
const a = w() === "rtl";
|
|
149
|
-
let F;
|
|
150
|
-
h != null ? F = r.getKeyLeftOf(h) : F = a ? r.getFirstKey?.() : r.getLastKey?.(), d(F);
|
|
151
|
-
}
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
case (p() === "vertical" ? "ArrowRight" : "ArrowDown"): {
|
|
155
|
-
if (r.getKeyRightOf) {
|
|
156
|
-
i.preventDefault();
|
|
157
|
-
const a = w() === "rtl";
|
|
158
|
-
let F;
|
|
159
|
-
h != null ? F = r.getKeyRightOf(h) : F = a ? r.getLastKey?.() : r.getFirstKey?.(), d(F);
|
|
160
|
-
}
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
case "Home":
|
|
164
|
-
if (r.getFirstKey) {
|
|
165
|
-
i.preventDefault();
|
|
166
|
-
const a = r.getFirstKey(h, I(i));
|
|
167
|
-
a != null && (l.setFocusedKey(a), I(i) && i.shiftKey && l.selectionMode() === "multiple" ? l.extendSelection(a) : y && l.replaceSelection(a));
|
|
168
|
-
}
|
|
169
|
-
break;
|
|
170
|
-
case "End":
|
|
171
|
-
if (r.getLastKey) {
|
|
172
|
-
i.preventDefault();
|
|
173
|
-
const a = r.getLastKey(h, I(i));
|
|
174
|
-
a != null && (l.setFocusedKey(a), I(i) && i.shiftKey && l.selectionMode() === "multiple" ? l.extendSelection(a) : y && l.replaceSelection(a));
|
|
175
|
-
}
|
|
176
|
-
break;
|
|
177
|
-
case "PageDown":
|
|
178
|
-
if (r.getKeyPageBelow && h != null) {
|
|
179
|
-
i.preventDefault();
|
|
180
|
-
const a = r.getKeyPageBelow(h);
|
|
181
|
-
d(a);
|
|
182
|
-
}
|
|
183
|
-
break;
|
|
184
|
-
case "PageUp":
|
|
185
|
-
if (r.getKeyPageAbove && h != null) {
|
|
186
|
-
i.preventDefault();
|
|
187
|
-
const a = r.getKeyPageAbove(h);
|
|
188
|
-
d(a);
|
|
189
|
-
}
|
|
190
|
-
break;
|
|
191
|
-
case "a":
|
|
192
|
-
I(i) && l.selectionMode() === "multiple" && o(c.disallowSelectAll) !== !0 && (i.preventDefault(), l.selectAll());
|
|
193
|
-
break;
|
|
194
|
-
case "Escape":
|
|
195
|
-
i.defaultPrevented || (i.preventDefault(), o(c.disallowEmptySelection) || l.clearSelection());
|
|
196
|
-
break;
|
|
197
|
-
case "Tab":
|
|
198
|
-
if (!o(c.allowsTabNavigation)) {
|
|
199
|
-
if (i.shiftKey)
|
|
200
|
-
u.focus();
|
|
201
|
-
else {
|
|
202
|
-
const a = $(u, {
|
|
203
|
-
tabbable: !0
|
|
204
|
-
});
|
|
205
|
-
let F, P;
|
|
206
|
-
do
|
|
207
|
-
P = a.lastChild(), P && (F = P);
|
|
208
|
-
while (P);
|
|
209
|
-
F && !F.contains(document.activeElement) && E(F);
|
|
210
|
-
}
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}, v = (i) => {
|
|
215
|
-
const u = o(c.selectionManager), l = o(c.keyboardDelegate), y = o(c.selectOnFocus);
|
|
216
|
-
if (u.isFocused()) {
|
|
217
|
-
i.currentTarget.contains(i.target) || u.setFocused(!1);
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (i.currentTarget.contains(i.target)) {
|
|
221
|
-
if (u.setFocused(!0), u.focusedKey() == null) {
|
|
222
|
-
const d = (M) => {
|
|
223
|
-
M != null && (u.setFocusedKey(M), y && u.replaceSelection(M));
|
|
224
|
-
}, r = i.relatedTarget;
|
|
225
|
-
r && i.currentTarget.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING ? d(u.lastSelectedKey() ?? l.getLastKey?.()) : d(u.firstSelectedKey() ?? l.getFirstKey?.());
|
|
226
|
-
} else if (!o(c.isVirtualized)) {
|
|
227
|
-
const d = f();
|
|
228
|
-
if (d) {
|
|
229
|
-
d.scrollTop = g.top, d.scrollLeft = g.left;
|
|
230
|
-
const r = d.querySelector(`[data-key="${u.focusedKey()}"]`);
|
|
231
|
-
r && (E(r), O(d, r));
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}, D = (i) => {
|
|
236
|
-
const u = o(c.selectionManager);
|
|
237
|
-
i.currentTarget.contains(i.relatedTarget) || u.setFocused(!1);
|
|
238
|
-
}, T = (i) => {
|
|
239
|
-
f() === i.target && i.preventDefault();
|
|
240
|
-
}, x = () => {
|
|
241
|
-
const i = o(c.autoFocus);
|
|
242
|
-
if (!i)
|
|
243
|
-
return;
|
|
244
|
-
const u = o(c.selectionManager), l = o(c.keyboardDelegate);
|
|
245
|
-
let y;
|
|
246
|
-
i === "first" && (y = l.getFirstKey?.()), i === "last" && (y = l.getLastKey?.());
|
|
247
|
-
const d = u.selectedKeys();
|
|
248
|
-
d.size && (y = d.values().next().value), u.setFocused(!0), u.setFocusedKey(y);
|
|
249
|
-
const r = t();
|
|
250
|
-
r && y == null && !o(c.shouldUseVirtualFocus) && E(r);
|
|
251
|
-
};
|
|
252
|
-
return J(() => {
|
|
253
|
-
c.deferAutoFocus ? setTimeout(x, 0) : x();
|
|
254
|
-
}), L(C([f, () => o(c.isVirtualized), () => o(c.selectionManager).focusedKey()], (i) => {
|
|
255
|
-
const [u, l, y] = i;
|
|
256
|
-
if (l)
|
|
257
|
-
y && c.scrollToKey?.(y);
|
|
258
|
-
else if (y && u) {
|
|
259
|
-
const d = u.querySelector(`[data-key="${y}"]`);
|
|
260
|
-
d && O(u, d);
|
|
261
|
-
}
|
|
262
|
-
})), {
|
|
263
|
-
tabIndex: A(() => {
|
|
264
|
-
if (!o(c.shouldUseVirtualFocus))
|
|
265
|
-
return o(c.selectionManager).focusedKey() == null ? 0 : -1;
|
|
266
|
-
}),
|
|
267
|
-
onKeyDown: m,
|
|
268
|
-
onMouseDown: T,
|
|
269
|
-
onFocusIn: v,
|
|
270
|
-
onFocusOut: D
|
|
200
|
+
width: e,
|
|
201
|
+
height: o
|
|
202
|
+
} = tt(t);
|
|
203
|
+
return {
|
|
204
|
+
width: e,
|
|
205
|
+
height: o
|
|
271
206
|
};
|
|
272
207
|
}
|
|
273
|
-
function
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const m = (l) => {
|
|
279
|
-
S() && (p = l.pointerType, l.pointerType === "mouse" && l.button === 0 && !o(e.shouldSelectOnPressUp) && f(l));
|
|
280
|
-
}, v = (l) => {
|
|
281
|
-
S() && l.pointerType === "mouse" && l.button === 0 && o(e.shouldSelectOnPressUp) && o(e.allowsDifferentPressOrigin) && f(l);
|
|
282
|
-
}, D = (l) => {
|
|
283
|
-
S() && (o(e.shouldSelectOnPressUp) && !o(e.allowsDifferentPressOrigin) || p !== "mouse") && f(l);
|
|
284
|
-
}, T = (l) => {
|
|
285
|
-
!S() || !["Enter", " "].includes(l.key) || (V(l) ? s().toggleSelection(n()) : f(l));
|
|
286
|
-
}, x = (l) => {
|
|
287
|
-
g() && l.preventDefault();
|
|
288
|
-
}, K = (l) => {
|
|
289
|
-
const y = t();
|
|
290
|
-
c() || g() || !y || l.target === y && s().setFocusedKey(n());
|
|
291
|
-
}, i = A(() => {
|
|
292
|
-
if (!(c() || g()))
|
|
293
|
-
return n() === s().focusedKey() ? 0 : -1;
|
|
294
|
-
}), u = A(() => o(e.virtualized) ? void 0 : n());
|
|
295
|
-
return L(C([t, n, c, () => s().focusedKey(), () => s().isFocused()], ([l, y, d, r, M]) => {
|
|
296
|
-
l && y === r && M && !d && document.activeElement !== l && (e.focus ? e.focus() : E(l));
|
|
297
|
-
})), {
|
|
298
|
-
isSelected: w,
|
|
299
|
-
isDisabled: g,
|
|
300
|
-
allowsSelection: S,
|
|
301
|
-
tabIndex: i,
|
|
302
|
-
dataKey: u,
|
|
303
|
-
onPointerDown: m,
|
|
304
|
-
onPointerUp: v,
|
|
305
|
-
onClick: D,
|
|
306
|
-
onKeyDown: T,
|
|
307
|
-
onMouseDown: x,
|
|
308
|
-
onFocus: K
|
|
208
|
+
function Ot(t, e, o) {
|
|
209
|
+
const i = F(e), n = C(e), r = o === "fixed", s = L(t, !0, r, e);
|
|
210
|
+
let c = {
|
|
211
|
+
scrollLeft: 0,
|
|
212
|
+
scrollTop: 0
|
|
309
213
|
};
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
constructor(e, t) {
|
|
315
|
-
this.collection = e, this.state = t;
|
|
316
|
-
}
|
|
317
|
-
/** The type of selection that is allowed in the collection. */
|
|
318
|
-
selectionMode() {
|
|
319
|
-
return this.state.selectionMode();
|
|
320
|
-
}
|
|
321
|
-
/** Whether the collection allows empty selection. */
|
|
322
|
-
disallowEmptySelection() {
|
|
323
|
-
return this.state.disallowEmptySelection();
|
|
324
|
-
}
|
|
325
|
-
/** The selection behavior for the collection. */
|
|
326
|
-
selectionBehavior() {
|
|
327
|
-
return this.state.selectionBehavior();
|
|
328
|
-
}
|
|
329
|
-
/** Sets the selection behavior for the collection. */
|
|
330
|
-
setSelectionBehavior(e) {
|
|
331
|
-
this.state.setSelectionBehavior(e);
|
|
332
|
-
}
|
|
333
|
-
/** Whether the collection is currently focused. */
|
|
334
|
-
isFocused() {
|
|
335
|
-
return this.state.isFocused();
|
|
336
|
-
}
|
|
337
|
-
/** Sets whether the collection is focused. */
|
|
338
|
-
setFocused(e) {
|
|
339
|
-
this.state.setFocused(e);
|
|
340
|
-
}
|
|
341
|
-
/** The current focused key in the collection. */
|
|
342
|
-
focusedKey() {
|
|
343
|
-
return this.state.focusedKey();
|
|
344
|
-
}
|
|
345
|
-
/** Sets the focused key. */
|
|
346
|
-
setFocusedKey(e) {
|
|
347
|
-
(e == null || this.collection().getItem(e)) && this.state.setFocusedKey(e);
|
|
348
|
-
}
|
|
349
|
-
/** The currently selected keys in the collection. */
|
|
350
|
-
selectedKeys() {
|
|
351
|
-
return this.state.selectedKeys();
|
|
352
|
-
}
|
|
353
|
-
/** Returns whether a key is selected. */
|
|
354
|
-
isSelected(e) {
|
|
355
|
-
if (this.state.selectionMode() === "none")
|
|
356
|
-
return !1;
|
|
357
|
-
const t = this.getKey(e);
|
|
358
|
-
return t == null ? !1 : this.state.selectedKeys().has(t);
|
|
359
|
-
}
|
|
360
|
-
/** Whether the selection is empty. */
|
|
361
|
-
isEmpty() {
|
|
362
|
-
return this.state.selectedKeys().size === 0;
|
|
363
|
-
}
|
|
364
|
-
/** Whether all items in the collection are selected. */
|
|
365
|
-
isSelectAll() {
|
|
366
|
-
if (this.isEmpty())
|
|
367
|
-
return !1;
|
|
368
|
-
const e = this.state.selectedKeys();
|
|
369
|
-
return this.getAllSelectableKeys().every((t) => e.has(t));
|
|
370
|
-
}
|
|
371
|
-
firstSelectedKey() {
|
|
372
|
-
let e;
|
|
373
|
-
for (const t of this.state.selectedKeys()) {
|
|
374
|
-
const s = this.collection().getItem(t), n = s?.index != null && e?.index != null && s.index < e.index;
|
|
375
|
-
(!e || n) && (e = s);
|
|
376
|
-
}
|
|
377
|
-
return e?.key;
|
|
378
|
-
}
|
|
379
|
-
lastSelectedKey() {
|
|
380
|
-
let e;
|
|
381
|
-
for (const t of this.state.selectedKeys()) {
|
|
382
|
-
const s = this.collection().getItem(t), n = s?.index != null && e?.index != null && s.index > e.index;
|
|
383
|
-
(!e || n) && (e = s);
|
|
384
|
-
}
|
|
385
|
-
return e?.key;
|
|
214
|
+
const f = v(0);
|
|
215
|
+
if ((i || !r) && ((_(e) !== "body" || Y(n)) && (c = D(e)), i)) {
|
|
216
|
+
const d = L(e, !0, r, e);
|
|
217
|
+
f.x = d.x + e.clientLeft, f.y = d.y + e.clientTop;
|
|
386
218
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
219
|
+
!i && n && (f.x = B(n));
|
|
220
|
+
const l = n && !i && !r ? ot(n, c) : v(0), u = s.left + c.scrollLeft - f.x - l.x, a = s.top + c.scrollTop - f.y - l.y;
|
|
221
|
+
return {
|
|
222
|
+
x: u,
|
|
223
|
+
y: a,
|
|
224
|
+
width: s.width,
|
|
225
|
+
height: s.height
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function I(t) {
|
|
229
|
+
return b(t).position === "static";
|
|
230
|
+
}
|
|
231
|
+
function j(t, e) {
|
|
232
|
+
if (!F(t) || b(t).position === "fixed")
|
|
233
|
+
return null;
|
|
234
|
+
if (e)
|
|
235
|
+
return e(t);
|
|
236
|
+
let o = t.offsetParent;
|
|
237
|
+
return C(t) === o && (o = o.ownerDocument.body), o;
|
|
238
|
+
}
|
|
239
|
+
function it(t, e) {
|
|
240
|
+
const o = x(t);
|
|
241
|
+
if (A(t))
|
|
242
|
+
return o;
|
|
243
|
+
if (!F(t)) {
|
|
244
|
+
let n = z(t);
|
|
245
|
+
for (; n && !$(n); ) {
|
|
246
|
+
if (R(n) && !I(n))
|
|
247
|
+
return n;
|
|
248
|
+
n = z(n);
|
|
394
249
|
}
|
|
395
|
-
|
|
396
|
-
if (t == null)
|
|
397
|
-
return;
|
|
398
|
-
const s = this.state.selectedKeys(), n = s.anchorKey || t, c = new b(s, n, t);
|
|
399
|
-
for (const f of this.getKeyRange(n, s.currentKey || t))
|
|
400
|
-
c.delete(f);
|
|
401
|
-
for (const f of this.getKeyRange(t, n))
|
|
402
|
-
this.canSelectItem(f) && c.add(f);
|
|
403
|
-
this.state.setSelectedKeys(c);
|
|
404
|
-
}
|
|
405
|
-
getKeyRange(e, t) {
|
|
406
|
-
const s = this.collection().getItem(e), n = this.collection().getItem(t);
|
|
407
|
-
return s && n ? s.index != null && n.index != null && s.index <= n.index ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
|
|
250
|
+
return o;
|
|
408
251
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
252
|
+
let i = j(t, e);
|
|
253
|
+
for (; i && ht(i) && I(i); )
|
|
254
|
+
i = j(i, e);
|
|
255
|
+
return i && $(i) && I(i) && !Q(i) ? o : i || dt(t) || o;
|
|
256
|
+
}
|
|
257
|
+
const Tt = async function(t) {
|
|
258
|
+
const e = this.getOffsetParent || it, o = this.getDimensions, i = await o(t.floating);
|
|
259
|
+
return {
|
|
260
|
+
reference: Ot(t.reference, await e(t.floating), t.strategy),
|
|
261
|
+
floating: {
|
|
262
|
+
x: 0,
|
|
263
|
+
y: 0,
|
|
264
|
+
width: i.width,
|
|
265
|
+
height: i.height
|
|
417
266
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
function Et(t) {
|
|
270
|
+
return b(t).direction === "rtl";
|
|
271
|
+
}
|
|
272
|
+
const Ft = {
|
|
273
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: wt,
|
|
274
|
+
getDocumentElement: C,
|
|
275
|
+
getClippingRect: Ct,
|
|
276
|
+
getOffsetParent: it,
|
|
277
|
+
getElementRects: Tt,
|
|
278
|
+
getClientRects: yt,
|
|
279
|
+
getDimensions: Lt,
|
|
280
|
+
getScale: E,
|
|
281
|
+
isElement: R,
|
|
282
|
+
isRTL: Et
|
|
283
|
+
};
|
|
284
|
+
function nt(t, e) {
|
|
285
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
286
|
+
}
|
|
287
|
+
function Wt(t, e, o) {
|
|
288
|
+
let i = null, n;
|
|
289
|
+
const r = C(t);
|
|
290
|
+
function s() {
|
|
291
|
+
var u;
|
|
292
|
+
clearTimeout(n), (u = i) == null || u.disconnect(), i = null;
|
|
293
|
+
}
|
|
294
|
+
function c(u, a) {
|
|
295
|
+
u === void 0 && (u = !1), a === void 0 && (a = 1), s();
|
|
296
|
+
const d = t.getBoundingClientRect(), {
|
|
297
|
+
left: h,
|
|
298
|
+
top: y,
|
|
299
|
+
width: p,
|
|
300
|
+
height: w
|
|
301
|
+
} = d;
|
|
302
|
+
if (u || e(), !p || !w)
|
|
430
303
|
return;
|
|
304
|
+
const g = W(y), m = W(r.clientWidth - (h + p)), O = W(r.clientHeight - (y + w)), V = W(h), q = {
|
|
305
|
+
rootMargin: -g + "px " + -m + "px " + -O + "px " + -V + "px",
|
|
306
|
+
threshold: T(0, M(1, a)) || 1
|
|
307
|
+
};
|
|
308
|
+
let P = !0;
|
|
309
|
+
function K(U) {
|
|
310
|
+
const H = U[0].intersectionRatio;
|
|
311
|
+
if (!nt(d, t.getBoundingClientRect()))
|
|
312
|
+
return c();
|
|
313
|
+
if (H !== a) {
|
|
314
|
+
if (!P)
|
|
315
|
+
return c();
|
|
316
|
+
H ? c(!1, H) : n = setTimeout(() => {
|
|
317
|
+
c(!1, 1e-7);
|
|
318
|
+
}, 1e3);
|
|
319
|
+
}
|
|
320
|
+
P = !1;
|
|
431
321
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
if (this.selectionMode() === "none")
|
|
441
|
-
return;
|
|
442
|
-
const t = this.getKey(e);
|
|
443
|
-
if (t == null)
|
|
444
|
-
return;
|
|
445
|
-
const s = this.canSelectItem(t) ? new b([t], t, t) : new b();
|
|
446
|
-
this.state.setSelectedKeys(s);
|
|
447
|
-
}
|
|
448
|
-
/** Replaces the selection with the given keys. */
|
|
449
|
-
setSelectedKeys(e) {
|
|
450
|
-
if (this.selectionMode() === "none")
|
|
451
|
-
return;
|
|
452
|
-
const t = new b();
|
|
453
|
-
for (const s of e) {
|
|
454
|
-
const n = this.getKey(s);
|
|
455
|
-
if (n != null && (t.add(n), this.selectionMode() === "single"))
|
|
456
|
-
break;
|
|
322
|
+
try {
|
|
323
|
+
i = new IntersectionObserver(K, {
|
|
324
|
+
...q,
|
|
325
|
+
// Handle <iframe>s
|
|
326
|
+
root: r.ownerDocument
|
|
327
|
+
});
|
|
328
|
+
} catch {
|
|
329
|
+
i = new IntersectionObserver(K, q);
|
|
457
330
|
}
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
/** Selects all items in the collection. */
|
|
461
|
-
selectAll() {
|
|
462
|
-
this.selectionMode() === "multiple" && this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()));
|
|
331
|
+
i.observe(t);
|
|
463
332
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
clearSelection() {
|
|
468
|
-
const e = this.state.selectedKeys();
|
|
469
|
-
!this.disallowEmptySelection() && e.size > 0 && this.state.setSelectedKeys(new b());
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* Toggles between select all and an empty selection.
|
|
473
|
-
*/
|
|
474
|
-
toggleSelectAll() {
|
|
475
|
-
this.isSelectAll() ? this.clearSelection() : this.selectAll();
|
|
476
|
-
}
|
|
477
|
-
select(e, t) {
|
|
478
|
-
this.selectionMode() !== "none" && (this.selectionMode() === "single" ? this.isSelected(e) && !this.disallowEmptySelection() ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior() === "toggle" || t && t.pointerType === "touch" ? this.toggleSelection(e) : this.replaceSelection(e));
|
|
479
|
-
}
|
|
480
|
-
/** Returns whether the current selection is equal to the given selection. */
|
|
481
|
-
isSelectionEqual(e) {
|
|
482
|
-
if (e === this.state.selectedKeys())
|
|
483
|
-
return !0;
|
|
484
|
-
const t = this.selectedKeys();
|
|
485
|
-
if (e.size !== t.size)
|
|
486
|
-
return !1;
|
|
487
|
-
for (const s of e)
|
|
488
|
-
if (!t.has(s))
|
|
489
|
-
return !1;
|
|
490
|
-
for (const s of t)
|
|
491
|
-
if (!e.has(s))
|
|
492
|
-
return !1;
|
|
493
|
-
return !0;
|
|
494
|
-
}
|
|
495
|
-
canSelectItem(e) {
|
|
496
|
-
if (this.state.selectionMode() === "none")
|
|
497
|
-
return !1;
|
|
498
|
-
const t = this.collection().getItem(e);
|
|
499
|
-
return t != null && !t.disabled;
|
|
500
|
-
}
|
|
501
|
-
isDisabled(e) {
|
|
502
|
-
const t = this.collection().getItem(e);
|
|
503
|
-
return !t || t.disabled;
|
|
504
|
-
}
|
|
505
|
-
getAllSelectableKeys() {
|
|
506
|
-
const e = [];
|
|
507
|
-
return ((s) => {
|
|
508
|
-
for (; s != null; ) {
|
|
509
|
-
if (this.canSelectItem(s)) {
|
|
510
|
-
const n = this.collection().getItem(s);
|
|
511
|
-
if (!n)
|
|
512
|
-
continue;
|
|
513
|
-
n.type === "item" && e.push(s);
|
|
514
|
-
}
|
|
515
|
-
s = this.collection().getKeyAfter(s);
|
|
516
|
-
}
|
|
517
|
-
})(this.collection().getFirstKey()), e;
|
|
518
|
-
}
|
|
519
|
-
}, z = class {
|
|
520
|
-
keyMap = /* @__PURE__ */ new Map();
|
|
521
|
-
iterable;
|
|
522
|
-
firstKey;
|
|
523
|
-
lastKey;
|
|
524
|
-
constructor(e) {
|
|
525
|
-
this.iterable = e;
|
|
526
|
-
for (const n of e)
|
|
527
|
-
this.keyMap.set(n.key, n);
|
|
528
|
-
if (this.keyMap.size === 0)
|
|
529
|
-
return;
|
|
530
|
-
let t, s = 0;
|
|
531
|
-
for (const [n, c] of this.keyMap)
|
|
532
|
-
t ? (t.nextKey = n, c.prevKey = t.key) : (this.firstKey = n, c.prevKey = void 0), c.type === "item" && (c.index = s++), t = c, t.nextKey = void 0;
|
|
533
|
-
this.lastKey = t.key;
|
|
534
|
-
}
|
|
535
|
-
*[Symbol.iterator]() {
|
|
536
|
-
yield* this.iterable;
|
|
537
|
-
}
|
|
538
|
-
getSize() {
|
|
539
|
-
return this.keyMap.size;
|
|
540
|
-
}
|
|
541
|
-
getKeys() {
|
|
542
|
-
return this.keyMap.keys();
|
|
543
|
-
}
|
|
544
|
-
getKeyBefore(e) {
|
|
545
|
-
return this.keyMap.get(e)?.prevKey;
|
|
546
|
-
}
|
|
547
|
-
getKeyAfter(e) {
|
|
548
|
-
return this.keyMap.get(e)?.nextKey;
|
|
549
|
-
}
|
|
550
|
-
getFirstKey() {
|
|
551
|
-
return this.firstKey;
|
|
552
|
-
}
|
|
553
|
-
getLastKey() {
|
|
554
|
-
return this.lastKey;
|
|
555
|
-
}
|
|
556
|
-
getItem(e) {
|
|
557
|
-
return this.keyMap.get(e);
|
|
558
|
-
}
|
|
559
|
-
at(e) {
|
|
560
|
-
const t = [...this.getKeys()];
|
|
561
|
-
return this.getItem(t[e]);
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
function ge(e) {
|
|
565
|
-
const t = ee(e), n = U({
|
|
566
|
-
dataSource: () => o(e.dataSource),
|
|
567
|
-
getKey: () => o(e.getKey),
|
|
568
|
-
getTextValue: () => o(e.getTextValue),
|
|
569
|
-
getDisabled: () => o(e.getDisabled),
|
|
570
|
-
getSectionChildren: () => o(e.getSectionChildren),
|
|
571
|
-
factory: (f) => e.filter ? new z(e.filter(f)) : new z(f)
|
|
572
|
-
}, [() => e.filter]), c = new ie(n, t);
|
|
573
|
-
return G(() => {
|
|
574
|
-
const f = t.focusedKey();
|
|
575
|
-
f != null && !n().getItem(f) && t.setFocusedKey(void 0);
|
|
576
|
-
}), {
|
|
577
|
-
collection: n,
|
|
578
|
-
selectionManager: () => c
|
|
333
|
+
const f = x(t), l = () => c(o);
|
|
334
|
+
return f.addEventListener("resize", l), c(!0), () => {
|
|
335
|
+
f.removeEventListener("resize", l), s();
|
|
579
336
|
};
|
|
580
337
|
}
|
|
338
|
+
function Vt(t, e, o, i) {
|
|
339
|
+
i === void 0 && (i = {});
|
|
340
|
+
const {
|
|
341
|
+
ancestorScroll: n = !0,
|
|
342
|
+
ancestorResize: r = !0,
|
|
343
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
344
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
345
|
+
animationFrame: f = !1
|
|
346
|
+
} = i, l = X(t), u = n || r ? [...l ? N(l) : [], ...e ? N(e) : []] : [];
|
|
347
|
+
u.forEach((g) => {
|
|
348
|
+
n && g.addEventListener("scroll", o), r && g.addEventListener("resize", o);
|
|
349
|
+
});
|
|
350
|
+
const a = l && c ? Wt(l, o, r) : null;
|
|
351
|
+
let d = -1, h = null;
|
|
352
|
+
s && (h = new ResizeObserver((g) => {
|
|
353
|
+
let [m] = g;
|
|
354
|
+
m && m.target === l && h && e && (h.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
355
|
+
var O;
|
|
356
|
+
(O = h) == null || O.observe(e);
|
|
357
|
+
})), o();
|
|
358
|
+
}), l && !f && h.observe(l), e && h.observe(e));
|
|
359
|
+
let y, p = f ? L(t) : null;
|
|
360
|
+
f && w();
|
|
361
|
+
function w() {
|
|
362
|
+
const g = L(t);
|
|
363
|
+
p && !nt(p, g) && o(), p = g, y = requestAnimationFrame(w);
|
|
364
|
+
}
|
|
365
|
+
return o(), () => {
|
|
366
|
+
var g;
|
|
367
|
+
u.forEach((m) => {
|
|
368
|
+
n && m.removeEventListener("scroll", o), r && m.removeEventListener("resize", o);
|
|
369
|
+
}), a?.(), (g = h) == null || g.disconnect(), h = null, f && cancelAnimationFrame(y);
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
const Ht = at, It = rt, Mt = st, Nt = ct, $t = lt, At = ft, _t = (t, e, o) => {
|
|
373
|
+
const i = /* @__PURE__ */ new Map(), n = o ?? {}, r = {
|
|
374
|
+
...Ft,
|
|
375
|
+
...n.platform,
|
|
376
|
+
_c: i
|
|
377
|
+
};
|
|
378
|
+
return ut(t, e, {
|
|
379
|
+
...n,
|
|
380
|
+
platform: r
|
|
381
|
+
});
|
|
382
|
+
};
|
|
581
383
|
export {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
384
|
+
At as arrow,
|
|
385
|
+
Vt as autoUpdate,
|
|
386
|
+
_t as computePosition,
|
|
387
|
+
Mt as flip,
|
|
388
|
+
N as getOverflowAncestors,
|
|
389
|
+
$t as hide,
|
|
390
|
+
Ht as offset,
|
|
391
|
+
Ft as platform,
|
|
392
|
+
It as shift,
|
|
393
|
+
Nt as size
|
|
591
394
|
};
|
|
592
395
|
//# sourceMappingURL=index313.js.map
|