@indxsearch/systm 1.2.6 → 1.2.7
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/Button.d.ts +10 -2
- package/dist/index.es.js +172 -156
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -137,7 +137,7 @@ function To() {
|
|
|
137
137
|
}
|
|
138
138
|
function a(S, B) {
|
|
139
139
|
function W() {
|
|
140
|
-
|
|
140
|
+
M || (M = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
142
|
B
|
|
143
143
|
));
|
|
@@ -149,7 +149,7 @@ function To() {
|
|
|
149
149
|
}
|
|
150
150
|
function u() {
|
|
151
151
|
var S = e(this.type);
|
|
152
|
-
return
|
|
152
|
+
return k[S] || (k[S] = !0, console.error(
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
154
|
)), S = this.props.ref, S !== void 0 ? S : null;
|
|
155
155
|
}
|
|
@@ -248,7 +248,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return S();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
251
|
+
var M, k = {}, A = h.react_stack_bottom_frame.bind(
|
|
252
252
|
h,
|
|
253
253
|
s
|
|
254
254
|
)(), L = I(r(s)), H = {};
|
|
@@ -280,32 +280,48 @@ function Po() {
|
|
|
280
280
|
return _n || (_n = 1, process.env.NODE_ENV === "production" ? at.exports = Ro() : at.exports = To()), at.exports;
|
|
281
281
|
}
|
|
282
282
|
var y = Po();
|
|
283
|
-
const Oo = "_button_1sns4_1", Ao = "_micro_1sns4_22",
|
|
283
|
+
const Oo = "_button_1sns4_1", Ao = "_micro_1sns4_22", ko = "_large_1sns4_38", Mo = "_primary_1sns4_47", No = "_secondary_1sns4_57", Io = "_ghost_1sns4_67", jt = {
|
|
284
284
|
button: Oo,
|
|
285
285
|
micro: Ao,
|
|
286
286
|
default: "_default_1sns4_30",
|
|
287
|
-
large:
|
|
288
|
-
primary:
|
|
287
|
+
large: ko,
|
|
288
|
+
primary: Mo,
|
|
289
289
|
secondary: No,
|
|
290
290
|
ghost: Io
|
|
291
291
|
};
|
|
292
292
|
function Il(e) {
|
|
293
|
-
const { size: t = "default", variant: n = "primary", iconLeft: r, iconRight: o, className: s, children: i,
|
|
293
|
+
const { size: t = "default", variant: n = "primary", iconLeft: r, iconRight: o, className: s, children: i, ...a } = e, { href: u } = a, d = "disabled" in a ? a.disabled : !1, v = t === "micro" ? "14px" : t === "large" ? "21px" : "14px", p = [
|
|
294
294
|
jt.button,
|
|
295
295
|
jt[t],
|
|
296
296
|
jt[n],
|
|
297
|
-
|
|
297
|
+
d ? "cursor-not-allowed" : "cursor-pointer",
|
|
298
298
|
s
|
|
299
299
|
].filter(Boolean).join(" ");
|
|
300
300
|
if (process.env.NODE_ENV !== "production") {
|
|
301
|
-
const
|
|
302
|
-
|
|
301
|
+
const c = (r || o) && !i, m = a["aria-label"] || a["aria-labelledby"];
|
|
302
|
+
c && !m && console.warn("Button: Icon-only buttons should have an aria-label or aria-labelledby for accessibility.");
|
|
303
303
|
}
|
|
304
|
-
|
|
305
|
-
r && J.cloneElement(r, { size:
|
|
304
|
+
const g = /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
305
|
+
r && J.cloneElement(r, { size: v, color: "currentColor" }),
|
|
306
306
|
i,
|
|
307
|
-
o && J.cloneElement(o, { size:
|
|
307
|
+
o && J.cloneElement(o, { size: v, color: "currentColor" })
|
|
308
308
|
] });
|
|
309
|
+
if (u) {
|
|
310
|
+
const { type: c, disabled: m, ...w } = a;
|
|
311
|
+
return /* @__PURE__ */ y.jsx(
|
|
312
|
+
"a",
|
|
313
|
+
{
|
|
314
|
+
className: p,
|
|
315
|
+
href: u,
|
|
316
|
+
...w,
|
|
317
|
+
"aria-disabled": d ? "true" : void 0,
|
|
318
|
+
onClick: d ? (b) => b.preventDefault() : w.onClick,
|
|
319
|
+
children: g
|
|
320
|
+
}
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
const { type: h = "button", ...l } = a;
|
|
324
|
+
return /* @__PURE__ */ y.jsx("button", { className: p, type: h, ...l, children: g });
|
|
309
325
|
}
|
|
310
326
|
const Do = "_checkboxWrapper_1vygn_1", jo = "_checkbox_1vygn_1", Lo = "_label_1vygn_44", Fo = "_score_1vygn_48", Bo = "_disabled_1vygn_55", Ie = {
|
|
311
327
|
checkboxWrapper: Do,
|
|
@@ -590,9 +606,9 @@ var Rn;
|
|
|
590
606
|
function nr() {
|
|
591
607
|
return Rn || (Rn = 1, (function(e) {
|
|
592
608
|
var t = Ge && Ge.__spreadArray || function(C, R, P) {
|
|
593
|
-
if (P || arguments.length === 2) for (var I = 0,
|
|
594
|
-
(
|
|
595
|
-
return C.concat(
|
|
609
|
+
if (P || arguments.length === 2) for (var I = 0, M = R.length, k; I < M; I++)
|
|
610
|
+
(k || !(I in R)) && (k || (k = Array.prototype.slice.call(R, 0, I)), k[I] = R[I]);
|
|
611
|
+
return C.concat(k || Array.prototype.slice.call(R));
|
|
596
612
|
};
|
|
597
613
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isIOS = e.useThumbOverlap = e.assertUnreachable = e.voidFn = e.getTrackBackground = e.replaceAt = e.schd = e.translate = e.getClosestThumbIndex = e.translateThumbs = e.getPaddingAndBorder = e.getMargin = e.checkInitialOverlap = e.checkValuesAgainstBoundaries = e.checkBoundaries = e.isVertical = e.relativeValue = e.normalizeValue = e.isStepDivisible = e.isTouchEvent = e.getStepDecimals = void 0;
|
|
598
614
|
var n = J, r = /* @__PURE__ */ rn(), o = function(C) {
|
|
@@ -605,13 +621,13 @@ function nr() {
|
|
|
605
621
|
}
|
|
606
622
|
e.isTouchEvent = s;
|
|
607
623
|
function i(C, R, P) {
|
|
608
|
-
var I = (R - C) / P,
|
|
609
|
-
return parseInt(
|
|
624
|
+
var I = (R - C) / P, M = 8, k = Number(I.toFixed(M));
|
|
625
|
+
return parseInt(k.toString(), 10) === k;
|
|
610
626
|
}
|
|
611
627
|
e.isStepDivisible = i;
|
|
612
|
-
function a(C, R, P, I,
|
|
628
|
+
function a(C, R, P, I, M, k, A) {
|
|
613
629
|
var L = 1e11;
|
|
614
|
-
if (C = Math.round(C * L) / L, !
|
|
630
|
+
if (C = Math.round(C * L) / L, !k) {
|
|
615
631
|
var H = A[R - 1], S = A[R + 1];
|
|
616
632
|
if (H && H > C)
|
|
617
633
|
return H;
|
|
@@ -622,7 +638,7 @@ function nr() {
|
|
|
622
638
|
return I;
|
|
623
639
|
if (C < P)
|
|
624
640
|
return P;
|
|
625
|
-
var B = Math.floor(C * L - P * L) % Math.floor(
|
|
641
|
+
var B = Math.floor(C * L - P * L) % Math.floor(M * L), W = Math.floor(C * L - Math.abs(B)), $ = B === 0 ? C : W / L, q = Math.abs(B / L) < M / 2 ? $ : $ + M, Z = (0, e.getStepDecimals)(M);
|
|
626
642
|
return parseFloat(q.toFixed(Z));
|
|
627
643
|
}
|
|
628
644
|
e.normalizeValue = a;
|
|
@@ -676,17 +692,17 @@ function nr() {
|
|
|
676
692
|
e.getPaddingAndBorder = l;
|
|
677
693
|
function c(C, R, P) {
|
|
678
694
|
var I = P ? -1 : 1;
|
|
679
|
-
C.forEach(function(
|
|
680
|
-
return w(
|
|
695
|
+
C.forEach(function(M, k) {
|
|
696
|
+
return w(M, I * R[k].x, R[k].y);
|
|
681
697
|
});
|
|
682
698
|
}
|
|
683
699
|
e.translateThumbs = c;
|
|
684
700
|
function m(C, R, P, I) {
|
|
685
|
-
for (var
|
|
701
|
+
for (var M = 0, k = F(C[0], R, P, I), A = 1; A < C.length; A++) {
|
|
686
702
|
var L = F(C[A], R, P, I);
|
|
687
|
-
L <
|
|
703
|
+
L < k && (k = L, M = A);
|
|
688
704
|
}
|
|
689
|
-
return
|
|
705
|
+
return M;
|
|
690
706
|
}
|
|
691
707
|
e.getClosestThumbIndex = m;
|
|
692
708
|
function w(C, R, P) {
|
|
@@ -695,9 +711,9 @@ function nr() {
|
|
|
695
711
|
e.translate = w;
|
|
696
712
|
var b = function(C) {
|
|
697
713
|
var R = [], P = null, I = function() {
|
|
698
|
-
for (var
|
|
699
|
-
k
|
|
700
|
-
R =
|
|
714
|
+
for (var M = [], k = 0; k < arguments.length; k++)
|
|
715
|
+
M[k] = arguments[k];
|
|
716
|
+
R = M, !P && (P = requestAnimationFrame(function() {
|
|
701
717
|
P = null, C.apply(void 0, R);
|
|
702
718
|
}));
|
|
703
719
|
};
|
|
@@ -710,12 +726,12 @@ function nr() {
|
|
|
710
726
|
}
|
|
711
727
|
e.replaceAt = x;
|
|
712
728
|
function _(C) {
|
|
713
|
-
var R = C.values, P = C.colors, I = C.min,
|
|
729
|
+
var R = C.values, P = C.colors, I = C.min, M = C.max, k = C.direction, A = k === void 0 ? r.Direction.Right : k, L = C.rtl, H = L === void 0 ? !1 : L;
|
|
714
730
|
H && A === r.Direction.Right ? A = r.Direction.Left : H && r.Direction.Left && (A = r.Direction.Right);
|
|
715
731
|
var S = R.slice(0).sort(function(W, $) {
|
|
716
732
|
return W - $;
|
|
717
733
|
}).map(function(W) {
|
|
718
|
-
return (W - I) / (
|
|
734
|
+
return (W - I) / (M - I) * 100;
|
|
719
735
|
}), B = S.reduce(function(W, $, q) {
|
|
720
736
|
return "".concat(W, ", ").concat(P[q], " ").concat($, "%, ").concat(P[q + 1], " ").concat($, "%");
|
|
721
737
|
}, "");
|
|
@@ -729,42 +745,42 @@ function nr() {
|
|
|
729
745
|
throw new Error("Didn't expect to get here");
|
|
730
746
|
}
|
|
731
747
|
e.assertUnreachable = O;
|
|
732
|
-
var T = function(C, R, P, I,
|
|
733
|
-
|
|
748
|
+
var T = function(C, R, P, I, M) {
|
|
749
|
+
M === void 0 && (M = function(A) {
|
|
734
750
|
return A;
|
|
735
751
|
});
|
|
736
|
-
var
|
|
752
|
+
var k = Math.ceil(t([C], Array.from(C.children), !0).reduce(function(A, L) {
|
|
737
753
|
var H = Math.ceil(L.getBoundingClientRect().width);
|
|
738
754
|
if (L.innerText && L.innerText.includes(P) && L.childElementCount === 0) {
|
|
739
755
|
var S = L.cloneNode(!0);
|
|
740
|
-
S.innerHTML =
|
|
756
|
+
S.innerHTML = M(R.toFixed(I)), S.style.visibility = "hidden", document.body.appendChild(S), H = Math.ceil(S.getBoundingClientRect().width), document.body.removeChild(S);
|
|
741
757
|
}
|
|
742
758
|
return H > A ? H : A;
|
|
743
759
|
}, C.getBoundingClientRect().width));
|
|
744
|
-
return
|
|
745
|
-
}, j = function(C, R, P, I,
|
|
760
|
+
return k;
|
|
761
|
+
}, j = function(C, R, P, I, M, k, A) {
|
|
746
762
|
A === void 0 && (A = function(S) {
|
|
747
763
|
return S;
|
|
748
764
|
});
|
|
749
765
|
var L = [], H = function(S) {
|
|
750
|
-
var B = T(P[S], I[S],
|
|
766
|
+
var B = T(P[S], I[S], M, k, A), W = R[S].x;
|
|
751
767
|
R.forEach(function($, q) {
|
|
752
|
-
var Z = $.x, D = T(P[q], I[q],
|
|
768
|
+
var Z = $.x, D = T(P[q], I[q], M, k, A);
|
|
753
769
|
S !== q && (W >= Z && W <= Z + D || W + B >= Z && W + B <= Z + D) && (L.includes(q) || (L.push(S), L.push(q), L = t(t([], L, !0), [S, q], !1), H(q)));
|
|
754
770
|
});
|
|
755
771
|
};
|
|
756
772
|
return H(C), Array.from(new Set(L.sort()));
|
|
757
|
-
}, N = function(C, R, P, I,
|
|
758
|
-
I === void 0 && (I = 0.1),
|
|
773
|
+
}, N = function(C, R, P, I, M, k) {
|
|
774
|
+
I === void 0 && (I = 0.1), M === void 0 && (M = " - "), k === void 0 && (k = function(q) {
|
|
759
775
|
return q;
|
|
760
776
|
});
|
|
761
|
-
var A = (0, e.getStepDecimals)(I), L = (0, n.useState)({}), H = L[0], S = L[1], B = (0, n.useState)(
|
|
777
|
+
var A = (0, e.getStepDecimals)(I), L = (0, n.useState)({}), H = L[0], S = L[1], B = (0, n.useState)(k(R[P].toFixed(A))), W = B[0], $ = B[1];
|
|
762
778
|
return (0, n.useEffect)(function() {
|
|
763
779
|
if (C) {
|
|
764
780
|
var q = C.getThumbs();
|
|
765
781
|
if (q.length < 1)
|
|
766
782
|
return;
|
|
767
|
-
var Z = {}, D = C.getOffsets(), U = j(P, D, q, R,
|
|
783
|
+
var Z = {}, D = C.getOffsets(), U = j(P, D, q, R, M, A, k), G = k(R[P].toFixed(A));
|
|
768
784
|
if (U.length) {
|
|
769
785
|
var z = U.reduce(function(ce, xe, Se, it) {
|
|
770
786
|
return ce.length ? t(t([], ce, !0), [D[it[Se]].x], !1) : [D[it[Se]].x];
|
|
@@ -775,7 +791,7 @@ function nr() {
|
|
|
775
791
|
Y.push(R[ce].toFixed(A));
|
|
776
792
|
}), G = Array.from(new Set(Y.sort(function(ce, xe) {
|
|
777
793
|
return parseFloat(ce) - parseFloat(xe);
|
|
778
|
-
}))).map(
|
|
794
|
+
}))).map(k).join(M);
|
|
779
795
|
var K = Math.min.apply(Math, z), te = Math.max.apply(Math, z), ae = q[U[z.indexOf(te)]].getBoundingClientRect().width;
|
|
780
796
|
Z.left = "".concat(Math.abs(K - (te + ae)) / 2, "px"), Z.transform = "translate(-50%, 0)";
|
|
781
797
|
} else
|
|
@@ -787,8 +803,8 @@ function nr() {
|
|
|
787
803
|
};
|
|
788
804
|
e.useThumbOverlap = N;
|
|
789
805
|
function F(C, R, P, I) {
|
|
790
|
-
var
|
|
791
|
-
return d(I) ? Math.abs(P - (A + H / 2)) : Math.abs(R - (
|
|
806
|
+
var M = C.getBoundingClientRect(), k = M.left, A = M.top, L = M.width, H = M.height;
|
|
807
|
+
return d(I) ? Math.abs(P - (A + H / 2)) : Math.abs(R - (k + L / 2));
|
|
792
808
|
}
|
|
793
809
|
var V = function() {
|
|
794
810
|
var C, R = ((C = navigator.userAgentData) === null || C === void 0 ? void 0 : C.platform) || navigator.platform;
|
|
@@ -994,28 +1010,28 @@ function Oi() {
|
|
|
994
1010
|
return null;
|
|
995
1011
|
var R = C.getBoundingClientRect(), P = (0, i.isVertical)(E) ? R.height : R.width;
|
|
996
1012
|
if (x[0] !== -1 && x[1] !== -1) {
|
|
997
|
-
var I = c - x[0],
|
|
1013
|
+
var I = c - x[0], M = m - x[1], k = 0;
|
|
998
1014
|
switch (E) {
|
|
999
1015
|
case a.Direction.Right:
|
|
1000
1016
|
case a.Direction.Left:
|
|
1001
|
-
|
|
1017
|
+
k = I / P * (T - O);
|
|
1002
1018
|
break;
|
|
1003
1019
|
case a.Direction.Down:
|
|
1004
1020
|
case a.Direction.Up:
|
|
1005
|
-
|
|
1021
|
+
k = M / P * (T - O);
|
|
1006
1022
|
break;
|
|
1007
1023
|
default:
|
|
1008
1024
|
(0, i.assertUnreachable)(E);
|
|
1009
1025
|
}
|
|
1010
|
-
if (V && (
|
|
1026
|
+
if (V && (k *= -1), Math.abs(k) >= F / 2) {
|
|
1011
1027
|
for (var A = 0; A < l.thumbRefs.length; A++) {
|
|
1012
|
-
if (N[A] === T && Math.sign(
|
|
1028
|
+
if (N[A] === T && Math.sign(k) === 1 || N[A] === O && Math.sign(k) === -1)
|
|
1013
1029
|
return;
|
|
1014
|
-
var L = N[A] +
|
|
1015
|
-
L > T ?
|
|
1030
|
+
var L = N[A] + k;
|
|
1031
|
+
L > T ? k = T - N[A] : L < O && (k = O - N[A]);
|
|
1016
1032
|
}
|
|
1017
1033
|
for (var H = N.slice(0), A = 0; A < l.thumbRefs.length; A++)
|
|
1018
|
-
H = (0, i.replaceAt)(H, A, l.normalizeValue(N[A] +
|
|
1034
|
+
H = (0, i.replaceAt)(H, A, l.normalizeValue(N[A] + k, A));
|
|
1019
1035
|
l.setState({
|
|
1020
1036
|
draggedTrackPos: [c, m]
|
|
1021
1037
|
}), j(H);
|
|
@@ -1131,7 +1147,7 @@ function Oi() {
|
|
|
1131
1147
|
},
|
|
1132
1148
|
isDragged: this.state.draggedThumbIndex > -1,
|
|
1133
1149
|
disabled: N,
|
|
1134
|
-
children: o(o([], R.map(function(P, I,
|
|
1150
|
+
children: o(o([], R.map(function(P, I, M) {
|
|
1135
1151
|
return _({
|
|
1136
1152
|
props: {
|
|
1137
1153
|
style: h.props.direction === a.Direction.Left || h.props.direction === a.Direction.Right ? {
|
|
@@ -1149,16 +1165,16 @@ function Oi() {
|
|
|
1149
1165
|
index: I
|
|
1150
1166
|
});
|
|
1151
1167
|
}), !0), E.map(function(P, I) {
|
|
1152
|
-
var
|
|
1168
|
+
var M = h.state.draggedThumbIndex === I;
|
|
1153
1169
|
return b({
|
|
1154
1170
|
index: I,
|
|
1155
1171
|
value: P,
|
|
1156
|
-
isDragged:
|
|
1172
|
+
isDragged: M,
|
|
1157
1173
|
props: {
|
|
1158
1174
|
style: {
|
|
1159
1175
|
position: "absolute",
|
|
1160
1176
|
zIndex: C[I],
|
|
1161
|
-
cursor: N ? "inherit" :
|
|
1177
|
+
cursor: N ? "inherit" : M ? "grabbing" : "grab",
|
|
1162
1178
|
userSelect: "none",
|
|
1163
1179
|
touchAction: "none",
|
|
1164
1180
|
WebkitUserSelect: "none",
|
|
@@ -1437,9 +1453,9 @@ function Et(e, t = []) {
|
|
|
1437
1453
|
);
|
|
1438
1454
|
};
|
|
1439
1455
|
};
|
|
1440
|
-
return o.scopeName = e, [r,
|
|
1456
|
+
return o.scopeName = e, [r, ki(o, ...t)];
|
|
1441
1457
|
}
|
|
1442
|
-
function
|
|
1458
|
+
function ki(...e) {
|
|
1443
1459
|
const t = e[0];
|
|
1444
1460
|
if (e.length === 1) return t;
|
|
1445
1461
|
const n = () => {
|
|
@@ -1457,7 +1473,7 @@ function Mi(...e) {
|
|
|
1457
1473
|
};
|
|
1458
1474
|
return n.scopeName = t.scopeName, n;
|
|
1459
1475
|
}
|
|
1460
|
-
function
|
|
1476
|
+
function kn(e, t) {
|
|
1461
1477
|
if (typeof e == "function")
|
|
1462
1478
|
return e(t);
|
|
1463
1479
|
e != null && (e.current = t);
|
|
@@ -1466,14 +1482,14 @@ function rr(...e) {
|
|
|
1466
1482
|
return (t) => {
|
|
1467
1483
|
let n = !1;
|
|
1468
1484
|
const r = e.map((o) => {
|
|
1469
|
-
const s =
|
|
1485
|
+
const s = kn(o, t);
|
|
1470
1486
|
return !n && typeof s == "function" && (n = !0), s;
|
|
1471
1487
|
});
|
|
1472
1488
|
if (n)
|
|
1473
1489
|
return () => {
|
|
1474
1490
|
for (let o = 0; o < r.length; o++) {
|
|
1475
1491
|
const s = r[o];
|
|
1476
|
-
typeof s == "function" ? s() :
|
|
1492
|
+
typeof s == "function" ? s() : kn(e[o], null);
|
|
1477
1493
|
}
|
|
1478
1494
|
};
|
|
1479
1495
|
};
|
|
@@ -1483,7 +1499,7 @@ function ee(...e) {
|
|
|
1483
1499
|
}
|
|
1484
1500
|
// @__NO_SIDE_EFFECTS__
|
|
1485
1501
|
function et(e) {
|
|
1486
|
-
const t = /* @__PURE__ */
|
|
1502
|
+
const t = /* @__PURE__ */ Mi(e), n = f.forwardRef((r, o) => {
|
|
1487
1503
|
const { children: s, ...i } = r, a = f.Children.toArray(s), u = a.find(Ii);
|
|
1488
1504
|
if (u) {
|
|
1489
1505
|
const d = u.props.children, v = a.map((p) => p === u ? f.Children.count(d) > 1 ? f.Children.only(null) : f.isValidElement(d) ? d.props.children : null : p);
|
|
@@ -1494,7 +1510,7 @@ function et(e) {
|
|
|
1494
1510
|
return n.displayName = `${e}.Slot`, n;
|
|
1495
1511
|
}
|
|
1496
1512
|
// @__NO_SIDE_EFFECTS__
|
|
1497
|
-
function
|
|
1513
|
+
function Mi(e) {
|
|
1498
1514
|
const t = f.forwardRef((n, r) => {
|
|
1499
1515
|
const { children: o, ...s } = n;
|
|
1500
1516
|
if (f.isValidElement(o)) {
|
|
@@ -1616,7 +1632,7 @@ function $i(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1616
1632
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
1617
1633
|
}, [n, t]);
|
|
1618
1634
|
}
|
|
1619
|
-
var Hi = "DismissableLayer", Yt = "dismissableLayer.update", Ui = "dismissableLayer.pointerDownOutside", zi = "dismissableLayer.focusOutside",
|
|
1635
|
+
var Hi = "DismissableLayer", Yt = "dismissableLayer.update", Ui = "dismissableLayer.pointerDownOutside", zi = "dismissableLayer.focusOutside", Mn, or = f.createContext({
|
|
1620
1636
|
layers: /* @__PURE__ */ new Set(),
|
|
1621
1637
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
1622
1638
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -1641,8 +1657,8 @@ var Hi = "DismissableLayer", Yt = "dismissableLayer.update", Ui = "dismissableLa
|
|
|
1641
1657
|
b === d.layers.size - 1 && (r == null || r(T), !T.defaultPrevented && a && (T.preventDefault(), a()));
|
|
1642
1658
|
}, g), f.useEffect(() => {
|
|
1643
1659
|
if (v)
|
|
1644
|
-
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
1645
|
-
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents =
|
|
1660
|
+
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Mn = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(v)), d.layers.add(v), Nn(), () => {
|
|
1661
|
+
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents = Mn);
|
|
1646
1662
|
};
|
|
1647
1663
|
}, [v, g, n, d]), f.useEffect(() => () => {
|
|
1648
1664
|
v && (d.layers.delete(v), d.layersWithOutsidePointerEventsDisabled.delete(v), Nn());
|
|
@@ -2167,17 +2183,17 @@ const gs = (e) => ({
|
|
|
2167
2183
|
}, h = ln(o), l = cn(h), c = await i.getDimensions(d), m = h === "y", w = m ? "top" : "left", b = m ? "bottom" : "right", x = m ? "clientHeight" : "clientWidth", _ = s.reference[l] + s.reference[h] - g[h] - s.floating[l], E = g[h] - s.reference[h], O = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
2168
2184
|
let T = O ? O[x] : 0;
|
|
2169
2185
|
(!T || !await (i.isElement == null ? void 0 : i.isElement(O))) && (T = a.floating[x] || s.floating[l]);
|
|
2170
|
-
const j = _ / 2 - E / 2, N = T / 2 - c[l] / 2 - 1, F = Ee(p[w], N), V = Ee(p[b], N), C = F, R = T - c[l] - V, P = T / 2 - c[l] / 2 + j, I = qt(C, P, R),
|
|
2186
|
+
const j = _ / 2 - E / 2, N = T / 2 - c[l] / 2 - 1, F = Ee(p[w], N), V = Ee(p[b], N), C = F, R = T - c[l] - V, P = T / 2 - c[l] / 2 + j, I = qt(C, P, R), M = !u.arrow && Ue(o) != null && P !== I && s.reference[l] / 2 - (P < C ? F : V) - c[l] / 2 < 0, k = M ? P < C ? P - C : P - R : 0;
|
|
2171
2187
|
return {
|
|
2172
|
-
[h]: g[h] +
|
|
2188
|
+
[h]: g[h] + k,
|
|
2173
2189
|
data: {
|
|
2174
2190
|
[h]: I,
|
|
2175
|
-
centerOffset: P - I -
|
|
2176
|
-
...
|
|
2177
|
-
alignmentOffset:
|
|
2191
|
+
centerOffset: P - I - k,
|
|
2192
|
+
...M && {
|
|
2193
|
+
alignmentOffset: k
|
|
2178
2194
|
}
|
|
2179
2195
|
},
|
|
2180
|
-
reset:
|
|
2196
|
+
reset: M
|
|
2181
2197
|
};
|
|
2182
2198
|
}
|
|
2183
2199
|
}), bs = function(e) {
|
|
@@ -2230,12 +2246,12 @@ const gs = (e) => ({
|
|
|
2230
2246
|
placement: I
|
|
2231
2247
|
}
|
|
2232
2248
|
};
|
|
2233
|
-
let
|
|
2234
|
-
if (!
|
|
2249
|
+
let M = (C = F.filter((k) => k.overflows[0] <= 0).sort((k, A) => k.overflows[1] - A.overflows[1])[0]) == null ? void 0 : C.placement;
|
|
2250
|
+
if (!M)
|
|
2235
2251
|
switch (h) {
|
|
2236
2252
|
case "bestFit": {
|
|
2237
2253
|
var R;
|
|
2238
|
-
const
|
|
2254
|
+
const k = (R = F.filter((A) => {
|
|
2239
2255
|
if (O) {
|
|
2240
2256
|
const L = he(A.placement);
|
|
2241
2257
|
return L === b || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -2244,17 +2260,17 @@ const gs = (e) => ({
|
|
|
2244
2260
|
}
|
|
2245
2261
|
return !0;
|
|
2246
2262
|
}).map((A) => [A.placement, A.overflows.filter((L) => L > 0).reduce((L, H) => L + H, 0)]).sort((A, L) => A[1] - L[1])[0]) == null ? void 0 : R[0];
|
|
2247
|
-
|
|
2263
|
+
k && (M = k);
|
|
2248
2264
|
break;
|
|
2249
2265
|
}
|
|
2250
2266
|
case "initialPlacement":
|
|
2251
|
-
|
|
2267
|
+
M = a;
|
|
2252
2268
|
break;
|
|
2253
2269
|
}
|
|
2254
|
-
if (o !==
|
|
2270
|
+
if (o !== M)
|
|
2255
2271
|
return {
|
|
2256
2272
|
reset: {
|
|
2257
|
-
placement:
|
|
2273
|
+
placement: M
|
|
2258
2274
|
}
|
|
2259
2275
|
};
|
|
2260
2276
|
}
|
|
@@ -2553,12 +2569,12 @@ function Tt(e) {
|
|
|
2553
2569
|
}
|
|
2554
2570
|
});
|
|
2555
2571
|
}
|
|
2556
|
-
const Os = ["transform", "translate", "scale", "rotate", "perspective"], As = ["transform", "translate", "scale", "rotate", "perspective", "filter"],
|
|
2572
|
+
const Os = ["transform", "translate", "scale", "rotate", "perspective"], As = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ks = ["paint", "layout", "strict", "content"];
|
|
2557
2573
|
function un(e) {
|
|
2558
2574
|
const t = dn(), n = de(e) ? fe(e) : e;
|
|
2559
|
-
return Os.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || As.some((r) => (n.willChange || "").includes(r)) ||
|
|
2575
|
+
return Os.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || As.some((r) => (n.willChange || "").includes(r)) || ks.some((r) => (n.contain || "").includes(r));
|
|
2560
2576
|
}
|
|
2561
|
-
function
|
|
2577
|
+
function Ms(e) {
|
|
2562
2578
|
let t = Ce(e);
|
|
2563
2579
|
for (; ve(t) && !$e(t); ) {
|
|
2564
2580
|
if (un(t))
|
|
@@ -2656,7 +2672,7 @@ function pr(e) {
|
|
|
2656
2672
|
function Ds(e, t, n) {
|
|
2657
2673
|
return t === void 0 && (t = !1), !n || t && n !== se(e) ? !1 : t;
|
|
2658
2674
|
}
|
|
2659
|
-
function
|
|
2675
|
+
function ke(e, t, n, r) {
|
|
2660
2676
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2661
2677
|
const o = e.getBoundingClientRect(), s = fn(e);
|
|
2662
2678
|
let i = me(1);
|
|
@@ -2680,7 +2696,7 @@ function Me(e, t, n, r) {
|
|
|
2680
2696
|
}
|
|
2681
2697
|
function Ot(e, t) {
|
|
2682
2698
|
const n = Pt(e).scrollLeft;
|
|
2683
|
-
return t ? t.left + n :
|
|
2699
|
+
return t ? t.left + n : ke(ge(e)).left + n;
|
|
2684
2700
|
}
|
|
2685
2701
|
function hr(e, t) {
|
|
2686
2702
|
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - Ot(e, n), o = n.top + t.scrollTop;
|
|
@@ -2705,7 +2721,7 @@ function js(e) {
|
|
|
2705
2721
|
}, d = me(1);
|
|
2706
2722
|
const v = me(0), p = ve(r);
|
|
2707
2723
|
if ((p || !p && !s) && ((ze(r) !== "body" || rt(i)) && (u = Pt(r)), ve(r))) {
|
|
2708
|
-
const h =
|
|
2724
|
+
const h = ke(r);
|
|
2709
2725
|
d = Ve(r), v.x = h.x + r.clientLeft, v.y = h.y + r.clientTop;
|
|
2710
2726
|
}
|
|
2711
2727
|
const g = i && !p && !s ? hr(i, u) : me(0);
|
|
@@ -2753,7 +2769,7 @@ function Bs(e, t) {
|
|
|
2753
2769
|
}
|
|
2754
2770
|
const Vs = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
2755
2771
|
function Ws(e, t) {
|
|
2756
|
-
const n =
|
|
2772
|
+
const n = ke(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = ve(e) ? Ve(e) : me(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, u = o * s.x, d = r * s.y;
|
|
2757
2773
|
return {
|
|
2758
2774
|
width: i,
|
|
2759
2775
|
height: a,
|
|
@@ -2826,7 +2842,7 @@ function Us(e) {
|
|
|
2826
2842
|
};
|
|
2827
2843
|
}
|
|
2828
2844
|
function zs(e, t, n) {
|
|
2829
|
-
const r = ve(t), o = ge(t), s = n === "fixed", i =
|
|
2845
|
+
const r = ve(t), o = ge(t), s = n === "fixed", i = ke(e, !0, s, t);
|
|
2830
2846
|
let a = {
|
|
2831
2847
|
scrollLeft: 0,
|
|
2832
2848
|
scrollTop: 0
|
|
@@ -2837,7 +2853,7 @@ function zs(e, t, n) {
|
|
|
2837
2853
|
}
|
|
2838
2854
|
if (r || !r && !s)
|
|
2839
2855
|
if ((ze(t) !== "body" || rt(o)) && (a = Pt(t)), r) {
|
|
2840
|
-
const h =
|
|
2856
|
+
const h = ke(t, !0, s, t);
|
|
2841
2857
|
u.x = h.x + t.clientLeft, u.y = h.y + t.clientTop;
|
|
2842
2858
|
} else o && d();
|
|
2843
2859
|
s && !r && o && d();
|
|
@@ -2876,7 +2892,7 @@ function vr(e, t) {
|
|
|
2876
2892
|
let r = qn(e, t);
|
|
2877
2893
|
for (; r && Ts(r) && Vt(r); )
|
|
2878
2894
|
r = qn(r, t);
|
|
2879
|
-
return r && $e(r) && Vt(r) && !un(r) ? n : r ||
|
|
2895
|
+
return r && $e(r) && Vt(r) && !un(r) ? n : r || Ms(e) || n;
|
|
2880
2896
|
}
|
|
2881
2897
|
const Ys = async function(e) {
|
|
2882
2898
|
const t = this.getOffsetParent || vr, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -2977,10 +2993,10 @@ function Zs(e, t, n, r) {
|
|
|
2977
2993
|
(x = h) == null || x.observe(t);
|
|
2978
2994
|
})), n();
|
|
2979
2995
|
}), d && !u && h.observe(d), h.observe(t));
|
|
2980
|
-
let l, c = u ?
|
|
2996
|
+
let l, c = u ? ke(e) : null;
|
|
2981
2997
|
u && m();
|
|
2982
2998
|
function m() {
|
|
2983
|
-
const w =
|
|
2999
|
+
const w = ke(e);
|
|
2984
3000
|
c && !gr(c, w) && n(), c = w, l = requestAnimationFrame(m);
|
|
2985
3001
|
}
|
|
2986
3002
|
return n(), () => {
|
|
@@ -3118,22 +3134,22 @@ function sa(e) {
|
|
|
3118
3134
|
floating: T,
|
|
3119
3135
|
setReference: b,
|
|
3120
3136
|
setFloating: x
|
|
3121
|
-
}), [b, x]),
|
|
3137
|
+
}), [b, x]), M = f.useMemo(() => ({
|
|
3122
3138
|
reference: _,
|
|
3123
3139
|
floating: E
|
|
3124
|
-
}), [_, E]),
|
|
3140
|
+
}), [_, E]), k = f.useMemo(() => {
|
|
3125
3141
|
const A = {
|
|
3126
3142
|
position: n,
|
|
3127
3143
|
left: 0,
|
|
3128
3144
|
top: 0
|
|
3129
3145
|
};
|
|
3130
|
-
if (!
|
|
3146
|
+
if (!M.floating)
|
|
3131
3147
|
return A;
|
|
3132
|
-
const L = Xn(
|
|
3148
|
+
const L = Xn(M.floating, v.x), H = Xn(M.floating, v.y);
|
|
3133
3149
|
return a ? {
|
|
3134
3150
|
...A,
|
|
3135
3151
|
transform: "translate(" + L + "px, " + H + "px)",
|
|
3136
|
-
...br(
|
|
3152
|
+
...br(M.floating) >= 1.5 && {
|
|
3137
3153
|
willChange: "transform"
|
|
3138
3154
|
}
|
|
3139
3155
|
} : {
|
|
@@ -3141,14 +3157,14 @@ function sa(e) {
|
|
|
3141
3157
|
left: L,
|
|
3142
3158
|
top: H
|
|
3143
3159
|
};
|
|
3144
|
-
}, [n, a,
|
|
3160
|
+
}, [n, a, M.floating, v.x, v.y]);
|
|
3145
3161
|
return f.useMemo(() => ({
|
|
3146
3162
|
...v,
|
|
3147
3163
|
update: R,
|
|
3148
3164
|
refs: I,
|
|
3149
|
-
elements:
|
|
3150
|
-
floatingStyles:
|
|
3151
|
-
}), [v, R, I,
|
|
3165
|
+
elements: M,
|
|
3166
|
+
floatingStyles: k
|
|
3167
|
+
}), [v, R, I, M, k]);
|
|
3152
3168
|
}
|
|
3153
3169
|
const aa = (e) => {
|
|
3154
3170
|
function t(n) {
|
|
@@ -3270,7 +3286,7 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3270
3286
|
boundary: V.filter(Sa),
|
|
3271
3287
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
3272
3288
|
altBoundary: C
|
|
3273
|
-
}, { refs: P, floatingStyles: I, placement:
|
|
3289
|
+
}, { refs: P, floatingStyles: I, placement: M, isPositioned: k, middlewareData: A } = sa({
|
|
3274
3290
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
3275
3291
|
strategy: "fixed",
|
|
3276
3292
|
placement: N,
|
|
@@ -3300,10 +3316,10 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3300
3316
|
_a({ arrowWidth: T, arrowHeight: j }),
|
|
3301
3317
|
g && pa({ strategy: "referenceHidden", ...R })
|
|
3302
3318
|
]
|
|
3303
|
-
}), [L, H] = Pr(
|
|
3319
|
+
}), [L, H] = Pr(M), S = Ae(l);
|
|
3304
3320
|
re(() => {
|
|
3305
|
-
|
|
3306
|
-
}, [
|
|
3321
|
+
k && (S == null || S());
|
|
3322
|
+
}, [k, S]);
|
|
3307
3323
|
const B = (D = A.arrow) == null ? void 0 : D.x, W = (U = A.arrow) == null ? void 0 : U.y, $ = ((G = A.arrow) == null ? void 0 : G.centerOffset) !== 0, [q, Z] = f.useState();
|
|
3308
3324
|
return re(() => {
|
|
3309
3325
|
w && Z(window.getComputedStyle(w).zIndex);
|
|
@@ -3314,7 +3330,7 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3314
3330
|
"data-radix-popper-content-wrapper": "",
|
|
3315
3331
|
style: {
|
|
3316
3332
|
...I,
|
|
3317
|
-
transform:
|
|
3333
|
+
transform: k ? I.transform : "translate(0, -200%)",
|
|
3318
3334
|
// keep off the page when measuring
|
|
3319
3335
|
minWidth: "max-content",
|
|
3320
3336
|
zIndex: q,
|
|
@@ -3351,7 +3367,7 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3351
3367
|
...c.style,
|
|
3352
3368
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
3353
3369
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
3354
|
-
animation:
|
|
3370
|
+
animation: k ? void 0 : "none"
|
|
3355
3371
|
}
|
|
3356
3372
|
}
|
|
3357
3373
|
)
|
|
@@ -3430,7 +3446,7 @@ function Pr(e) {
|
|
|
3430
3446
|
const [t, n = "center"] = e.split("-");
|
|
3431
3447
|
return [t, n];
|
|
3432
3448
|
}
|
|
3433
|
-
var Or = Sr, mn = Er, Ar = Cr,
|
|
3449
|
+
var Or = Sr, mn = Er, Ar = Cr, kr = Tr, Ea = "Portal", vn = f.forwardRef((e, t) => {
|
|
3434
3450
|
var a;
|
|
3435
3451
|
const { container: n, ...r } = e, [o, s] = f.useState(!1);
|
|
3436
3452
|
re(() => s(!0), []);
|
|
@@ -3491,7 +3507,7 @@ function Pa(e) {
|
|
|
3491
3507
|
const t = f.useRef({ value: e, previous: e });
|
|
3492
3508
|
return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
3493
3509
|
}
|
|
3494
|
-
var
|
|
3510
|
+
var Mr = Object.freeze({
|
|
3495
3511
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
3496
3512
|
position: "absolute",
|
|
3497
3513
|
border: 0,
|
|
@@ -3509,19 +3525,19 @@ var kr = Object.freeze({
|
|
|
3509
3525
|
{
|
|
3510
3526
|
...e,
|
|
3511
3527
|
ref: t,
|
|
3512
|
-
style: { ...
|
|
3528
|
+
style: { ...Mr, ...e.style }
|
|
3513
3529
|
}
|
|
3514
3530
|
)
|
|
3515
3531
|
);
|
|
3516
3532
|
Aa.displayName = Oa;
|
|
3517
|
-
var
|
|
3533
|
+
var ka = function(e) {
|
|
3518
3534
|
if (typeof document > "u")
|
|
3519
3535
|
return null;
|
|
3520
3536
|
var t = Array.isArray(e) ? e[0] : e;
|
|
3521
3537
|
return t.ownerDocument.body;
|
|
3522
3538
|
}, Le = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), dt = {}, $t = 0, Nr = function(e) {
|
|
3523
3539
|
return e && (e.host || Nr(e.parentNode));
|
|
3524
|
-
},
|
|
3540
|
+
}, Ma = function(e, t) {
|
|
3525
3541
|
return t.map(function(n) {
|
|
3526
3542
|
if (e.contains(n))
|
|
3527
3543
|
return n;
|
|
@@ -3531,7 +3547,7 @@ var Ma = function(e) {
|
|
|
3531
3547
|
return !!n;
|
|
3532
3548
|
});
|
|
3533
3549
|
}, Na = function(e, t, n, r) {
|
|
3534
|
-
var o =
|
|
3550
|
+
var o = Ma(t, Array.isArray(e) ? e : [e]);
|
|
3535
3551
|
dt[n] || (dt[n] = /* @__PURE__ */ new WeakMap());
|
|
3536
3552
|
var s = dt[n], i = [], a = /* @__PURE__ */ new Set(), u = new Set(o), d = function(p) {
|
|
3537
3553
|
!p || a.has(p) || (a.add(p), d(p.parentNode));
|
|
@@ -3558,7 +3574,7 @@ var Ma = function(e) {
|
|
|
3558
3574
|
};
|
|
3559
3575
|
}, Ir = function(e, t, n) {
|
|
3560
3576
|
n === void 0 && (n = "data-aria-hidden");
|
|
3561
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o =
|
|
3577
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = ka(e);
|
|
3562
3578
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Na(r, o, n, "aria-hidden")) : function() {
|
|
3563
3579
|
return null;
|
|
3564
3580
|
};
|
|
@@ -3706,7 +3722,7 @@ function Ha(e, t) {
|
|
|
3706
3722
|
return e.useMedium(t), jr;
|
|
3707
3723
|
}
|
|
3708
3724
|
var Lr = $a(), Ut = function() {
|
|
3709
|
-
},
|
|
3725
|
+
}, kt = f.forwardRef(function(e, t) {
|
|
3710
3726
|
var n = f.useRef(null), r = f.useState({
|
|
3711
3727
|
onScrollCapture: Ut,
|
|
3712
3728
|
onWheelCapture: Ut,
|
|
@@ -3719,12 +3735,12 @@ var Lr = $a(), Ut = function() {
|
|
|
3719
3735
|
i ? f.cloneElement(f.Children.only(a), pe(pe({}, T), { ref: O })) : f.createElement(b, pe({}, T, { className: u, ref: O }), a)
|
|
3720
3736
|
);
|
|
3721
3737
|
});
|
|
3722
|
-
|
|
3738
|
+
kt.defaultProps = {
|
|
3723
3739
|
enabled: !0,
|
|
3724
3740
|
removeScrollBar: !0,
|
|
3725
3741
|
inert: !1
|
|
3726
3742
|
};
|
|
3727
|
-
|
|
3743
|
+
kt.classNames = {
|
|
3728
3744
|
fullWidth: gt,
|
|
3729
3745
|
zeroRight: vt
|
|
3730
3746
|
};
|
|
@@ -4034,13 +4050,13 @@ function hc(e) {
|
|
|
4034
4050
|
}
|
|
4035
4051
|
const mc = Ha(Lr, pc);
|
|
4036
4052
|
var gn = f.forwardRef(function(e, t) {
|
|
4037
|
-
return f.createElement(
|
|
4053
|
+
return f.createElement(kt, pe({}, e, { ref: t, sideCar: mc }));
|
|
4038
4054
|
});
|
|
4039
|
-
gn.classNames =
|
|
4040
|
-
var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"],
|
|
4055
|
+
gn.classNames = kt.classNames;
|
|
4056
|
+
var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], Me = "Select", [Mt, Nt, bc] = Li(Me), [Ye] = Et(Me, [
|
|
4041
4057
|
bc,
|
|
4042
4058
|
At
|
|
4043
|
-
]), It = At(), [yc, Re] = Ye(
|
|
4059
|
+
]), It = At(), [yc, Re] = Ye(Me), [wc, xc] = Ye(Me), $r = (e) => {
|
|
4044
4060
|
const {
|
|
4045
4061
|
__scopeSelect: t,
|
|
4046
4062
|
children: n,
|
|
@@ -4060,13 +4076,13 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4060
4076
|
prop: r,
|
|
4061
4077
|
defaultProp: o ?? !1,
|
|
4062
4078
|
onChange: s,
|
|
4063
|
-
caller:
|
|
4079
|
+
caller: Me
|
|
4064
4080
|
}), [N, F] = Zt({
|
|
4065
4081
|
prop: i,
|
|
4066
4082
|
defaultProp: a,
|
|
4067
4083
|
onChange: u,
|
|
4068
|
-
caller:
|
|
4069
|
-
}), V = f.useRef(null), C = m ? l || !!m.closest("form") : !0, [R, P] = f.useState(/* @__PURE__ */ new Set()), I = Array.from(R).map((
|
|
4084
|
+
caller: Me
|
|
4085
|
+
}), V = f.useRef(null), C = m ? l || !!m.closest("form") : !0, [R, P] = f.useState(/* @__PURE__ */ new Set()), I = Array.from(R).map((M) => M.props.value).join(";");
|
|
4070
4086
|
return /* @__PURE__ */ y.jsx(Or, { ...c, children: /* @__PURE__ */ y.jsxs(
|
|
4071
4087
|
yc,
|
|
4072
4088
|
{
|
|
@@ -4087,17 +4103,17 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4087
4103
|
triggerPointerDownPosRef: V,
|
|
4088
4104
|
disabled: g,
|
|
4089
4105
|
children: [
|
|
4090
|
-
/* @__PURE__ */ y.jsx(
|
|
4106
|
+
/* @__PURE__ */ y.jsx(Mt.Provider, { scope: t, children: /* @__PURE__ */ y.jsx(
|
|
4091
4107
|
wc,
|
|
4092
4108
|
{
|
|
4093
4109
|
scope: e.__scopeSelect,
|
|
4094
|
-
onNativeOptionAdd: f.useCallback((
|
|
4095
|
-
P((
|
|
4110
|
+
onNativeOptionAdd: f.useCallback((M) => {
|
|
4111
|
+
P((k) => new Set(k).add(M));
|
|
4096
4112
|
}, []),
|
|
4097
|
-
onNativeOptionRemove: f.useCallback((
|
|
4098
|
-
P((
|
|
4099
|
-
const A = new Set(
|
|
4100
|
-
return A.delete(
|
|
4113
|
+
onNativeOptionRemove: f.useCallback((M) => {
|
|
4114
|
+
P((k) => {
|
|
4115
|
+
const A = new Set(k);
|
|
4116
|
+
return A.delete(M), A;
|
|
4101
4117
|
});
|
|
4102
4118
|
}, []),
|
|
4103
4119
|
children: n
|
|
@@ -4112,7 +4128,7 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4112
4128
|
name: v,
|
|
4113
4129
|
autoComplete: p,
|
|
4114
4130
|
value: N,
|
|
4115
|
-
onChange: (
|
|
4131
|
+
onChange: (M) => F(M.target.value),
|
|
4116
4132
|
disabled: g,
|
|
4117
4133
|
form: l,
|
|
4118
4134
|
children: [
|
|
@@ -4126,7 +4142,7 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4126
4142
|
}
|
|
4127
4143
|
) });
|
|
4128
4144
|
};
|
|
4129
|
-
$r.displayName =
|
|
4145
|
+
$r.displayName = Me;
|
|
4130
4146
|
var Hr = "SelectTrigger", Ur = f.forwardRef(
|
|
4131
4147
|
(e, t) => {
|
|
4132
4148
|
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = It(n), i = Re(Hr, n), a = i.disabled || r, u = ee(t, i.onTriggerChange), d = Nt(n), v = f.useRef("touch"), [p, g, h] = lo((c) => {
|
|
@@ -4205,7 +4221,7 @@ var Ne = "SelectContent", Xr = f.forwardRef(
|
|
|
4205
4221
|
}, []), !n.open) {
|
|
4206
4222
|
const s = r;
|
|
4207
4223
|
return s ? _t.createPortal(
|
|
4208
|
-
/* @__PURE__ */ y.jsx(Zr, { scope: e.__scopeSelect, children: /* @__PURE__ */ y.jsx(
|
|
4224
|
+
/* @__PURE__ */ y.jsx(Zr, { scope: e.__scopeSelect, children: /* @__PURE__ */ y.jsx(Mt.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ y.jsx("div", { children: e.children }) }) }),
|
|
4209
4225
|
s
|
|
4210
4226
|
) : null;
|
|
4211
4227
|
}
|
|
@@ -4241,20 +4257,20 @@ var ue = 10, [Zr, Te] = Ye(Ne), Ec = "SelectContentImpl", Cc = /* @__PURE__ */ e
|
|
|
4241
4257
|
f.useEffect(() => {
|
|
4242
4258
|
if (x) return Ir(x);
|
|
4243
4259
|
}, [x]), sr();
|
|
4244
|
-
const
|
|
4260
|
+
const M = f.useCallback(
|
|
4245
4261
|
(D) => {
|
|
4246
4262
|
const [U, ...G] = C().map((K) => K.ref.current), [z] = G.slice(-1), Y = document.activeElement;
|
|
4247
4263
|
for (const K of D)
|
|
4248
4264
|
if (K === Y || (K == null || K.scrollIntoView({ block: "nearest" }), K === U && E && (E.scrollTop = 0), K === z && E && (E.scrollTop = E.scrollHeight), K == null || K.focus(), document.activeElement !== Y)) return;
|
|
4249
4265
|
},
|
|
4250
4266
|
[C, E]
|
|
4251
|
-
),
|
|
4252
|
-
() =>
|
|
4253
|
-
[
|
|
4267
|
+
), k = f.useCallback(
|
|
4268
|
+
() => M([j, x]),
|
|
4269
|
+
[M, j, x]
|
|
4254
4270
|
);
|
|
4255
4271
|
f.useEffect(() => {
|
|
4256
|
-
R &&
|
|
4257
|
-
}, [R,
|
|
4272
|
+
R && k();
|
|
4273
|
+
}, [R, k]);
|
|
4258
4274
|
const { onOpenChange: A, triggerPointerDownPosRef: L } = b;
|
|
4259
4275
|
f.useEffect(() => {
|
|
4260
4276
|
if (x) {
|
|
@@ -4316,7 +4332,7 @@ var ue = 10, [Zr, Te] = Ye(Ne), Ec = "SelectContentImpl", Cc = /* @__PURE__ */ e
|
|
|
4316
4332
|
selectedItem: j,
|
|
4317
4333
|
onItemLeave: W,
|
|
4318
4334
|
itemTextRefCallback: $,
|
|
4319
|
-
focusSelectedItem:
|
|
4335
|
+
focusSelectedItem: k,
|
|
4320
4336
|
selectedItemText: F,
|
|
4321
4337
|
position: r,
|
|
4322
4338
|
isPositioned: R,
|
|
@@ -4370,7 +4386,7 @@ var ue = 10, [Zr, Te] = Ye(Ne), Ec = "SelectContentImpl", Cc = /* @__PURE__ */ e
|
|
|
4370
4386
|
const Y = D.target, K = z.indexOf(Y);
|
|
4371
4387
|
z = z.slice(K + 1);
|
|
4372
4388
|
}
|
|
4373
|
-
setTimeout(() =>
|
|
4389
|
+
setTimeout(() => M(z)), D.preventDefault();
|
|
4374
4390
|
}
|
|
4375
4391
|
})
|
|
4376
4392
|
}
|
|
@@ -4406,14 +4422,14 @@ var Rc = "SelectItemAlignedPosition", Jr = f.forwardRef((e, t) => {
|
|
|
4406
4422
|
]);
|
|
4407
4423
|
a.style.minWidth = ae + "px", a.style.right = Se + "px";
|
|
4408
4424
|
}
|
|
4409
|
-
const V = g(), C = window.innerHeight - ue * 2, R = c.scrollHeight, P = window.getComputedStyle(d), I = parseInt(P.borderTopWidth, 10),
|
|
4425
|
+
const V = g(), C = window.innerHeight - ue * 2, R = c.scrollHeight, P = window.getComputedStyle(d), I = parseInt(P.borderTopWidth, 10), M = parseInt(P.paddingTop, 10), k = parseInt(P.borderBottomWidth, 10), A = parseInt(P.paddingBottom, 10), L = I + M + R + A + k, H = Math.min(m.offsetHeight * 5, L), S = window.getComputedStyle(c), B = parseInt(S.paddingTop, 10), W = parseInt(S.paddingBottom, 10), $ = T.top + T.height / 2 - ue, q = C - $, Z = m.offsetHeight / 2, D = m.offsetTop + Z, U = I + M + D, G = L - U;
|
|
4410
4426
|
if (U <= $) {
|
|
4411
4427
|
const Y = V.length > 0 && m === V[V.length - 1].ref.current;
|
|
4412
4428
|
a.style.bottom = "0px";
|
|
4413
4429
|
const K = d.clientHeight - c.offsetTop - c.offsetHeight, te = Math.max(
|
|
4414
4430
|
q,
|
|
4415
4431
|
Z + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
4416
|
-
(Y ? W : 0) + K +
|
|
4432
|
+
(Y ? W : 0) + K + k
|
|
4417
4433
|
), ae = U + te;
|
|
4418
4434
|
a.style.height = ae + "px";
|
|
4419
4435
|
} else {
|
|
@@ -4531,7 +4547,7 @@ var [Pc, bn] = Ye(Ne, {}), Qt = "SelectViewport", Qr = f.forwardRef(
|
|
|
4531
4547
|
nonce: r
|
|
4532
4548
|
}
|
|
4533
4549
|
),
|
|
4534
|
-
/* @__PURE__ */ y.jsx(
|
|
4550
|
+
/* @__PURE__ */ y.jsx(Mt.Slot, { scope: n, children: /* @__PURE__ */ y.jsx(
|
|
4535
4551
|
Q.div,
|
|
4536
4552
|
{
|
|
4537
4553
|
"data-radix-select-viewport": "",
|
|
@@ -4571,20 +4587,20 @@ var [Pc, bn] = Ye(Ne, {}), Qt = "SelectViewport", Qr = f.forwardRef(
|
|
|
4571
4587
|
}
|
|
4572
4588
|
);
|
|
4573
4589
|
Qr.displayName = Qt;
|
|
4574
|
-
var eo = "SelectGroup", [Oc, Ac] = Ye(eo),
|
|
4590
|
+
var eo = "SelectGroup", [Oc, Ac] = Ye(eo), kc = f.forwardRef(
|
|
4575
4591
|
(e, t) => {
|
|
4576
4592
|
const { __scopeSelect: n, ...r } = e, o = Ct();
|
|
4577
4593
|
return /* @__PURE__ */ y.jsx(Oc, { scope: n, id: o, children: /* @__PURE__ */ y.jsx(Q.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
4578
4594
|
}
|
|
4579
4595
|
);
|
|
4580
|
-
|
|
4581
|
-
var to = "SelectLabel",
|
|
4596
|
+
kc.displayName = eo;
|
|
4597
|
+
var to = "SelectLabel", Mc = f.forwardRef(
|
|
4582
4598
|
(e, t) => {
|
|
4583
4599
|
const { __scopeSelect: n, ...r } = e, o = Ac(to, n);
|
|
4584
4600
|
return /* @__PURE__ */ y.jsx(Q.div, { id: o.id, ...r, ref: t });
|
|
4585
4601
|
}
|
|
4586
4602
|
);
|
|
4587
|
-
|
|
4603
|
+
Mc.displayName = to;
|
|
4588
4604
|
var St = "SelectItem", [Nc, no] = Ye(St), ro = f.forwardRef(
|
|
4589
4605
|
(e, t) => {
|
|
4590
4606
|
const {
|
|
@@ -4618,7 +4634,7 @@ var St = "SelectItem", [Nc, no] = Ye(St), ro = f.forwardRef(
|
|
|
4618
4634
|
p((x) => x || ((b == null ? void 0 : b.textContent) ?? "").trim());
|
|
4619
4635
|
}, []),
|
|
4620
4636
|
children: /* @__PURE__ */ y.jsx(
|
|
4621
|
-
|
|
4637
|
+
Mt.ItemSlot,
|
|
4622
4638
|
{
|
|
4623
4639
|
scope: n,
|
|
4624
4640
|
value: r,
|
|
@@ -4782,7 +4798,7 @@ Fc.displayName = Lc;
|
|
|
4782
4798
|
var nn = "SelectArrow", Bc = f.forwardRef(
|
|
4783
4799
|
(e, t) => {
|
|
4784
4800
|
const { __scopeSelect: n, ...r } = e, o = It(n), s = Re(nn, n), i = Te(nn, n);
|
|
4785
|
-
return s.open && i.position === "popper" ? /* @__PURE__ */ y.jsx(
|
|
4801
|
+
return s.open && i.position === "popper" ? /* @__PURE__ */ y.jsx(kr, { ...o, ...r, ref: t }) : null;
|
|
4786
4802
|
}
|
|
4787
4803
|
);
|
|
4788
4804
|
Bc.displayName = nn;
|
|
@@ -4804,7 +4820,7 @@ var Vc = "SelectBubbleInput", ao = f.forwardRef(
|
|
|
4804
4820
|
Q.select,
|
|
4805
4821
|
{
|
|
4806
4822
|
...n,
|
|
4807
|
-
style: { ...
|
|
4823
|
+
style: { ...Mr, ...n.style },
|
|
4808
4824
|
ref: s,
|
|
4809
4825
|
defaultValue: t
|
|
4810
4826
|
}
|
|
@@ -5168,7 +5184,7 @@ hl.displayName = wo;
|
|
|
5168
5184
|
var ml = "PopoverArrow", vl = f.forwardRef(
|
|
5169
5185
|
(e, t) => {
|
|
5170
5186
|
const { __scopePopover: n, ...r } = e, o = ot(n);
|
|
5171
|
-
return /* @__PURE__ */ y.jsx(
|
|
5187
|
+
return /* @__PURE__ */ y.jsx(kr, { ...o, ...r, ref: t });
|
|
5172
5188
|
}
|
|
5173
5189
|
);
|
|
5174
5190
|
vl.displayName = ml;
|
|
@@ -5203,7 +5219,7 @@ const xl = "_content_1qahr_1", Sl = {
|
|
|
5203
5219
|
children: t
|
|
5204
5220
|
}
|
|
5205
5221
|
) })
|
|
5206
|
-
] }), _l = "_table_1b0iq_1", El = "_caption_1b0iq_8", Cl = "_headerRow_1b0iq_25", Rl = "_dataRow_1b0iq_33", Tl = "_cellInner_1b0iq_41", Pl = "_cellLabel_1b0iq_47", Ol = "_cellContent_1b0iq_52", Al = "_value_1b0iq_58",
|
|
5222
|
+
] }), _l = "_table_1b0iq_1", El = "_caption_1b0iq_8", Cl = "_headerRow_1b0iq_25", Rl = "_dataRow_1b0iq_33", Tl = "_cellInner_1b0iq_41", Pl = "_cellLabel_1b0iq_47", Ol = "_cellContent_1b0iq_52", Al = "_value_1b0iq_58", kl = "_icon_1b0iq_64", be = {
|
|
5207
5223
|
table: _l,
|
|
5208
5224
|
caption: El,
|
|
5209
5225
|
headerRow: Cl,
|
|
@@ -5212,7 +5228,7 @@ const xl = "_content_1qahr_1", Sl = {
|
|
|
5212
5228
|
cellLabel: Pl,
|
|
5213
5229
|
cellContent: Ol,
|
|
5214
5230
|
value: Al,
|
|
5215
|
-
icon:
|
|
5231
|
+
icon: kl
|
|
5216
5232
|
};
|
|
5217
5233
|
function zl({ children: e, caption: t, "aria-label": n }) {
|
|
5218
5234
|
return process.env.NODE_ENV !== "production" && !t && !n && console.warn("Table: Component should have either a caption or aria-label for accessibility."), /* @__PURE__ */ y.jsxs("table", { className: be.table, "aria-label": n, children: [
|