lizaui 3.0.19 → 3.0.20
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/chunks/{index-Dtsw1VqP.js → index-BIzSm1_7.js} +2 -2
- package/dist/chunks/{index-Dtsw1VqP.js.map → index-BIzSm1_7.js.map} +1 -1
- package/dist/chunks/{index-BxJKdzwL.js → index-mYE_k9Xd.js} +165 -152
- package/dist/chunks/{index-BxJKdzwL.js.map → index-mYE_k9Xd.js.map} +1 -1
- package/dist/components/ui/modal.d.ts +8 -3
- package/dist/components/ui/modal.d.ts.map +1 -1
- package/dist/effects/motion-effect/index.d.ts +27 -0
- package/dist/effects/motion-effect/index.d.ts.map +1 -0
- package/dist/effects/motion-highlight/index.d.ts +83 -0
- package/dist/effects/motion-highlight/index.d.ts.map +1 -0
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +3 -3
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as g } from "./jsx-runtime-BYq8_R6m.js";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import Ge, { useContext as Vt, Component as Ii, useId as Ni, useState as Ve, useEffect as Fe, forwardRef as Kt, createElement as
|
|
3
|
+
import Ge, { useContext as Vt, Component as Ii, useId as Ni, useState as Ve, useEffect as Fe, forwardRef as Kt, createElement as ke, createContext as Mi, useRef as ve, useLayoutEffect as Li, useImperativeHandle as dr, useCallback as ge, useMemo as ki } from "react";
|
|
4
4
|
import { c as oe } from "./variants-DhZQjbsQ.js";
|
|
5
|
-
import { t as
|
|
5
|
+
import { t as ji } from "./tv-ButAo3dF.js";
|
|
6
6
|
import { t as Me } from "./bundle-mjs-kGHm2Pod.js";
|
|
7
7
|
import { c as de, L as fr } from "./utils-C3tlRhMf.js";
|
|
8
8
|
import { c as Xe } from "./clsx-OuTLNxxd.js";
|
|
@@ -156,13 +156,13 @@ function mo(e, t) {
|
|
|
156
156
|
let n = t.min - e.min, o = t.max - e.max;
|
|
157
157
|
return t.max - t.min < e.max - e.min && ([n, o] = [o, n]), { min: n, max: o };
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ka(e, t) {
|
|
160
160
|
return {
|
|
161
161
|
x: mo(e.x, t.x),
|
|
162
162
|
y: mo(e.y, t.y)
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function ja(e, t) {
|
|
166
166
|
let n = 0.5;
|
|
167
167
|
const o = pe(e), i = pe(t);
|
|
168
168
|
return i > o ? n = An(t.min, t.max - o, e.min) : o > i && (n = An(e.min, e.max - i, t.min)), pr(0, 1, n);
|
|
@@ -283,7 +283,7 @@ class Ba {
|
|
|
283
283
|
if (!i || !i.layout)
|
|
284
284
|
return !1;
|
|
285
285
|
const a = Hi(o, i.root, this.visualElement.getTransformPagePoint());
|
|
286
|
-
let r =
|
|
286
|
+
let r = ka(i.layout.layoutBox, a);
|
|
287
287
|
if (n) {
|
|
288
288
|
const s = n(Ui(r));
|
|
289
289
|
this.hasMutatedConstraints = !!s, s && (r = Gi(s));
|
|
@@ -367,7 +367,7 @@ class Ba {
|
|
|
367
367
|
const s = this.getAxisMotionValue(r);
|
|
368
368
|
if (s && this.constraints !== !1) {
|
|
369
369
|
const l = s.get();
|
|
370
|
-
i[r] =
|
|
370
|
+
i[r] = ja({ min: l, max: l }, this.constraints[r]);
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
373
|
const { transformTemplate: a } = this.visualElement.getProps();
|
|
@@ -728,7 +728,7 @@ function hn(e, t, n, o) {
|
|
|
728
728
|
const { latestValues: i } = t;
|
|
729
729
|
i[e] && (n[e] = i[e], t.setStaticValue(e, 0), o && (o[e] = 0));
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function kr(e) {
|
|
732
732
|
if (e.hasCheckedOptimisedAppear = !0, e.root === e)
|
|
733
733
|
return;
|
|
734
734
|
const { visualElement: t } = e.options;
|
|
@@ -740,9 +740,9 @@ function jr(e) {
|
|
|
740
740
|
window.MotionCancelOptimisedAnimation(n, "transform", Pe, !(i || a));
|
|
741
741
|
}
|
|
742
742
|
const { parent: o } = e;
|
|
743
|
-
o && !o.hasCheckedOptimisedAppear &&
|
|
743
|
+
o && !o.hasCheckedOptimisedAppear && kr(o);
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function jr({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: o, resetTransform: i }) {
|
|
746
746
|
return class {
|
|
747
747
|
constructor(r = {}, s = t == null ? void 0 : t()) {
|
|
748
748
|
this.id = ll++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
@@ -776,7 +776,7 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
776
776
|
let u;
|
|
777
777
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
778
778
|
e(r, () => {
|
|
779
|
-
this.root.updateBlockedByResize = !0, u && u(), u = Ya(f, 250), Ot.hasAnimatedSinceResize && (Ot.hasAnimatedSinceResize = !1, this.nodes.forEach(
|
|
779
|
+
this.root.updateBlockedByResize = !0, u && u(), u = Ya(f, 250), Ot.hasAnimatedSinceResize && (Ot.hasAnimatedSinceResize = !1, this.nodes.forEach(ko));
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
s && this.root.registerSharedNode(s, this), this.options.animate !== !1 && c && (s || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: f, hasRelativeLayoutChanged: h, layout: m }) => {
|
|
@@ -794,7 +794,7 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
794
794
|
};
|
|
795
795
|
(c.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w), this.setAnimationOrigin(u, S);
|
|
796
796
|
} else
|
|
797
|
-
f ||
|
|
797
|
+
f || ko(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
798
798
|
this.targetLayout = m;
|
|
799
799
|
});
|
|
800
800
|
}
|
|
@@ -829,7 +829,7 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
829
829
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
830
830
|
return;
|
|
831
831
|
}
|
|
832
|
-
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear &&
|
|
832
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && kr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
833
833
|
return;
|
|
834
834
|
this.isLayoutDirty = !0;
|
|
835
835
|
for (let u = 0; u < this.path.length; u++) {
|
|
@@ -1047,7 +1047,7 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
1047
1047
|
let w;
|
|
1048
1048
|
this.mixTargetDelta = (C) => {
|
|
1049
1049
|
const A = C / 1e3;
|
|
1050
|
-
|
|
1050
|
+
jo(f.x, r.x, A), jo(f.y, r.y, A), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (wt(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Sl(this.relativeTarget, this.relativeTargetOrigin, h, A), w && ol(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = le()), we(w, this.relativeTarget)), p && (this.animationValues = u, Za(u, c, this.latestValues, A, S, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
|
|
1051
1051
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
1052
1052
|
}
|
|
1053
1053
|
startAnimation(r) {
|
|
@@ -1252,7 +1252,7 @@ function ml(e) {
|
|
|
1252
1252
|
const { visualElement: t } = e.options;
|
|
1253
1253
|
t && t.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"), e.resetTransform();
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function ko(e) {
|
|
1256
1256
|
e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
|
|
1257
1257
|
}
|
|
1258
1258
|
function gl(e) {
|
|
@@ -1267,7 +1267,7 @@ function yl(e) {
|
|
|
1267
1267
|
function xl(e) {
|
|
1268
1268
|
e.removeLeadSnapshot();
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function jo(e, t, n) {
|
|
1271
1271
|
e.translate = ce(t.translate, 0, n), e.scale = ce(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
|
|
1272
1272
|
}
|
|
1273
1273
|
function Oo(e, t, n, o) {
|
|
@@ -1296,7 +1296,7 @@ function Cl(e) {
|
|
|
1296
1296
|
var t;
|
|
1297
1297
|
return e !== e.root && ((t = e.scroll) == null ? void 0 : t.wasRoot);
|
|
1298
1298
|
}
|
|
1299
|
-
const El =
|
|
1299
|
+
const El = jr({
|
|
1300
1300
|
attachResizeListener: (e, t) => Bn(e, "resize", t),
|
|
1301
1301
|
measureScroll: () => ({
|
|
1302
1302
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -1305,7 +1305,7 @@ const El = kr({
|
|
|
1305
1305
|
checkIsScrollRoot: () => !0
|
|
1306
1306
|
}), pn = {
|
|
1307
1307
|
current: void 0
|
|
1308
|
-
}, _r =
|
|
1308
|
+
}, _r = jr({
|
|
1309
1309
|
measureScroll: (e) => ({
|
|
1310
1310
|
x: e.scrollLeft,
|
|
1311
1311
|
y: e.scrollTop
|
|
@@ -1340,7 +1340,7 @@ const El = kr({
|
|
|
1340
1340
|
...aa,
|
|
1341
1341
|
...Rl,
|
|
1342
1342
|
...Tl
|
|
1343
|
-
}, ia), mn = /* @__PURE__ */ ca(Al), Dl =
|
|
1343
|
+
}, ia), mn = /* @__PURE__ */ ca(Al), Dl = ji({
|
|
1344
1344
|
slots: {
|
|
1345
1345
|
base: ["relative", "inline-flex", "shrink-0"],
|
|
1346
1346
|
badge: [
|
|
@@ -1895,7 +1895,7 @@ var Ml = [
|
|
|
1895
1895
|
function Ll(e, t) {
|
|
1896
1896
|
e && Vn.flushSync(() => e.dispatchEvent(t));
|
|
1897
1897
|
}
|
|
1898
|
-
const
|
|
1898
|
+
const kl = zr(["flex items-center cursor-pointer relative rounded-full p-0.5 px-1 relative overflow-hidden"], {
|
|
1899
1899
|
variants: {
|
|
1900
1900
|
color: {
|
|
1901
1901
|
primary: "bg-primary",
|
|
@@ -1915,7 +1915,7 @@ const jl = zr(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
1915
1915
|
color: "primary",
|
|
1916
1916
|
size: "md"
|
|
1917
1917
|
}
|
|
1918
|
-
}),
|
|
1918
|
+
}), jl = ({
|
|
1919
1919
|
id: e = null,
|
|
1920
1920
|
color: t,
|
|
1921
1921
|
size: n = "md",
|
|
@@ -1970,7 +1970,7 @@ const jl = zr(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
1970
1970
|
"label",
|
|
1971
1971
|
{
|
|
1972
1972
|
htmlFor: S,
|
|
1973
|
-
className: de(
|
|
1973
|
+
className: de(kl({ size: n, color: t }), F),
|
|
1974
1974
|
children: [
|
|
1975
1975
|
/* @__PURE__ */ g.jsx(
|
|
1976
1976
|
"input",
|
|
@@ -2025,7 +2025,7 @@ const jl = zr(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
2025
2025
|
!i && c && u && /* @__PURE__ */ g.jsx(fr, { text: c })
|
|
2026
2026
|
] });
|
|
2027
2027
|
};
|
|
2028
|
-
|
|
2028
|
+
jl.displayName = "Switch";
|
|
2029
2029
|
function te(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
2030
2030
|
return function(i) {
|
|
2031
2031
|
if (e == null || e(i), n === !1 || !i.defaultPrevented)
|
|
@@ -2531,7 +2531,7 @@ var Xr = "PopperAnchor", Yr = d.forwardRef(
|
|
|
2531
2531
|
Yr.displayName = Xr;
|
|
2532
2532
|
var Hn = "PopperContent", [dc, fc] = Hr(Hn), qr = d.forwardRef(
|
|
2533
2533
|
(e, t) => {
|
|
2534
|
-
var b, R, _,
|
|
2534
|
+
var b, R, _, j, $, V;
|
|
2535
2535
|
const {
|
|
2536
2536
|
__scopePopper: n,
|
|
2537
2537
|
side: o = "bottom",
|
|
@@ -2573,9 +2573,9 @@ var Hn = "PopperContent", [dc, fc] = Hr(Hn), qr = d.forwardRef(
|
|
|
2573
2573
|
l && ma({ ...B }),
|
|
2574
2574
|
ga({
|
|
2575
2575
|
...B,
|
|
2576
|
-
apply: ({ elements: G, rects: T, availableWidth:
|
|
2576
|
+
apply: ({ elements: G, rects: T, availableWidth: k, availableHeight: Q }) => {
|
|
2577
2577
|
const { width: se, height: Z } = T.reference, Y = G.floating.style;
|
|
2578
|
-
Y.setProperty("--radix-popper-available-width", `${
|
|
2578
|
+
Y.setProperty("--radix-popper-available-width", `${k}px`), Y.setProperty("--radix-popper-available-height", `${Q}px`), Y.setProperty("--radix-popper-anchor-width", `${se}px`), Y.setProperty("--radix-popper-anchor-height", `${Z}px`);
|
|
2579
2579
|
}
|
|
2580
2580
|
}),
|
|
2581
2581
|
C && va({ element: C, padding: s }),
|
|
@@ -2601,7 +2601,7 @@ var Hn = "PopperContent", [dc, fc] = Hr(Hn), qr = d.forwardRef(
|
|
|
2601
2601
|
minWidth: "max-content",
|
|
2602
2602
|
zIndex: M,
|
|
2603
2603
|
"--radix-popper-transform-origin": [
|
|
2604
|
-
(
|
|
2604
|
+
(j = J.transformOrigin) == null ? void 0 : j.x,
|
|
2605
2605
|
($ = J.transformOrigin) == null ? void 0 : $.y
|
|
2606
2606
|
].join(" "),
|
|
2607
2607
|
// hide the content if using the hide middleware and should be hidden
|
|
@@ -2902,7 +2902,7 @@ function Mc(e, t) {
|
|
|
2902
2902
|
function Lc(e) {
|
|
2903
2903
|
return e;
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function kc(e, t) {
|
|
2906
2906
|
t === void 0 && (t = Lc);
|
|
2907
2907
|
var n = [], o = !1, i = {
|
|
2908
2908
|
read: function() {
|
|
@@ -2957,9 +2957,9 @@ function jc(e, t) {
|
|
|
2957
2957
|
};
|
|
2958
2958
|
return i;
|
|
2959
2959
|
}
|
|
2960
|
-
function
|
|
2960
|
+
function jc(e) {
|
|
2961
2961
|
e === void 0 && (e = {});
|
|
2962
|
-
var t =
|
|
2962
|
+
var t = kc(null);
|
|
2963
2963
|
return t.options = Ae({ async: !0, ssr: !1 }, e), t;
|
|
2964
2964
|
}
|
|
2965
2965
|
var os = function(e) {
|
|
@@ -2975,7 +2975,7 @@ os.isSideCarExport = !0;
|
|
|
2975
2975
|
function Oc(e, t) {
|
|
2976
2976
|
return e.useMedium(t), os;
|
|
2977
2977
|
}
|
|
2978
|
-
var rs =
|
|
2978
|
+
var rs = jc(), wn = function() {
|
|
2979
2979
|
}, qt = d.forwardRef(function(e, t) {
|
|
2980
2980
|
var n = d.useRef(null), o = d.useState({
|
|
2981
2981
|
onScrollCapture: wn,
|
|
@@ -3198,7 +3198,7 @@ var ot = Mn ? { passive: !1 } : !1, qc = function(e) {
|
|
|
3198
3198
|
l && (t.contains(s) || t === s)
|
|
3199
3199
|
);
|
|
3200
3200
|
return (u && Math.abs(f) < 1 || !u && Math.abs(h) < 1) && (c = !0), c;
|
|
3201
|
-
},
|
|
3201
|
+
}, kt = function(e) {
|
|
3202
3202
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
3203
3203
|
}, Jo = function(e) {
|
|
3204
3204
|
return [e.deltaX, e.deltaY];
|
|
@@ -3232,7 +3232,7 @@ function iu(e) {
|
|
|
3232
3232
|
var s = d.useCallback(function(p, v) {
|
|
3233
3233
|
if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
|
|
3234
3234
|
return !r.current.allowPinchZoom;
|
|
3235
|
-
var y =
|
|
3235
|
+
var y = kt(p), S = n.current, w = "deltaX" in p ? p.deltaX : S[0] - y[0], C = "deltaY" in p ? p.deltaY : S[1] - y[1], A, D = p.target, P = Math.abs(w) > Math.abs(C) ? "h" : "v";
|
|
3236
3236
|
if ("touches" in p && P === "h" && D.type === "range")
|
|
3237
3237
|
return !1;
|
|
3238
3238
|
var F = Zo(P, D);
|
|
@@ -3247,7 +3247,7 @@ function iu(e) {
|
|
|
3247
3247
|
}, []), l = d.useCallback(function(p) {
|
|
3248
3248
|
var v = p;
|
|
3249
3249
|
if (!(!rt.length || rt[rt.length - 1] !== a)) {
|
|
3250
|
-
var y = "deltaY" in v ? Jo(v) :
|
|
3250
|
+
var y = "deltaY" in v ? Jo(v) : kt(v), S = t.current.filter(function(A) {
|
|
3251
3251
|
return A.name === v.type && (A.target === v.target || v.target === A.shadowParent) && ou(A.delta, y);
|
|
3252
3252
|
})[0];
|
|
3253
3253
|
if (S && S.should) {
|
|
@@ -3269,11 +3269,11 @@ function iu(e) {
|
|
|
3269
3269
|
});
|
|
3270
3270
|
}, 1);
|
|
3271
3271
|
}, []), u = d.useCallback(function(p) {
|
|
3272
|
-
n.current =
|
|
3272
|
+
n.current = kt(p), o.current = void 0;
|
|
3273
3273
|
}, []), f = d.useCallback(function(p) {
|
|
3274
3274
|
c(p.type, Jo(p), p.target, s(p, e.lockRef.current));
|
|
3275
3275
|
}, []), h = d.useCallback(function(p) {
|
|
3276
|
-
c(p.type,
|
|
3276
|
+
c(p.type, kt(p), p.target, s(p, e.lockRef.current));
|
|
3277
3277
|
}, []);
|
|
3278
3278
|
d.useEffect(function() {
|
|
3279
3279
|
return rt.push(a), e.setCallbacks({
|
|
@@ -3336,7 +3336,7 @@ const hu = Kt(
|
|
|
3336
3336
|
children: a,
|
|
3337
3337
|
iconNode: r,
|
|
3338
3338
|
...s
|
|
3339
|
-
}, l) =>
|
|
3339
|
+
}, l) => ke(
|
|
3340
3340
|
"svg",
|
|
3341
3341
|
{
|
|
3342
3342
|
ref: l,
|
|
@@ -3350,14 +3350,14 @@ const hu = Kt(
|
|
|
3350
3350
|
...s
|
|
3351
3351
|
},
|
|
3352
3352
|
[
|
|
3353
|
-
...r.map(([c, u]) =>
|
|
3353
|
+
...r.map(([c, u]) => ke(c, u)),
|
|
3354
3354
|
...Array.isArray(a) ? a : [a]
|
|
3355
3355
|
]
|
|
3356
3356
|
)
|
|
3357
3357
|
);
|
|
3358
3358
|
const Zt = (e, t) => {
|
|
3359
3359
|
const n = Kt(
|
|
3360
|
-
({ className: o, ...i }, a) =>
|
|
3360
|
+
({ className: o, ...i }, a) => ke(hu, {
|
|
3361
3361
|
ref: a,
|
|
3362
3362
|
iconNode: t,
|
|
3363
3363
|
className: cs(
|
|
@@ -3485,7 +3485,7 @@ function ds({
|
|
|
3485
3485
|
}
|
|
3486
3486
|
}), [y, S, w, D, H, L]);
|
|
3487
3487
|
const B = C(O.current, i);
|
|
3488
|
-
return
|
|
3488
|
+
return ke(x, {
|
|
3489
3489
|
...p,
|
|
3490
3490
|
children: e,
|
|
3491
3491
|
className: t,
|
|
@@ -3502,7 +3502,7 @@ function ds({
|
|
|
3502
3502
|
[ie.panelSize]: parseFloat("" + B.flexGrow).toFixed(1)
|
|
3503
3503
|
});
|
|
3504
3504
|
}
|
|
3505
|
-
const Pu = Kt((e, t) =>
|
|
3505
|
+
const Pu = Kt((e, t) => ke(ds, {
|
|
3506
3506
|
...e,
|
|
3507
3507
|
forwardedRef: t
|
|
3508
3508
|
}));
|
|
@@ -3661,7 +3661,7 @@ function Lu(e, t, n, o, i) {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
};
|
|
3663
3663
|
}
|
|
3664
|
-
function
|
|
3664
|
+
function ku(e) {
|
|
3665
3665
|
const {
|
|
3666
3666
|
target: t
|
|
3667
3667
|
} = e, {
|
|
@@ -3787,7 +3787,7 @@ function $t() {
|
|
|
3787
3787
|
const {
|
|
3788
3788
|
body: o
|
|
3789
3789
|
} = n;
|
|
3790
|
-
t > 0 && (o.addEventListener("pointerdown",
|
|
3790
|
+
t > 0 && (o.addEventListener("pointerdown", ku, e), o.addEventListener("pointermove", Cn, e));
|
|
3791
3791
|
}));
|
|
3792
3792
|
}
|
|
3793
3793
|
function Wt(e, t) {
|
|
@@ -3798,7 +3798,7 @@ function Wt(e, t) {
|
|
|
3798
3798
|
o(e, i, t);
|
|
3799
3799
|
});
|
|
3800
3800
|
}
|
|
3801
|
-
function
|
|
3801
|
+
function ju() {
|
|
3802
3802
|
const [e, t] = Ve(0);
|
|
3803
3803
|
return ge(() => t((n) => n + 1), []);
|
|
3804
3804
|
}
|
|
@@ -4207,7 +4207,7 @@ function st(e, t, n) {
|
|
|
4207
4207
|
}
|
|
4208
4208
|
});
|
|
4209
4209
|
}
|
|
4210
|
-
function
|
|
4210
|
+
function jt(e, t) {
|
|
4211
4211
|
if (e.length !== t.length)
|
|
4212
4212
|
return !1;
|
|
4213
4213
|
for (let n = 0; n < e.length; n++)
|
|
@@ -4359,7 +4359,7 @@ function As({
|
|
|
4359
4359
|
tagName: u = "div",
|
|
4360
4360
|
...f
|
|
4361
4361
|
}) {
|
|
4362
|
-
const h = Xn(a), m = ve(null), [x, p] = Ve(null), [v, y] = Ve([]), S =
|
|
4362
|
+
const h = Xn(a), m = ve(null), [x, p] = Ve(null), [v, y] = Ve([]), S = ju(), w = ve({}), C = ve(/* @__PURE__ */ new Map()), A = ve(0), D = ve({
|
|
4363
4363
|
autoSaveId: e,
|
|
4364
4364
|
direction: o,
|
|
4365
4365
|
dragState: x,
|
|
@@ -4431,7 +4431,7 @@ function As({
|
|
|
4431
4431
|
const b = N.map(($) => $.constraints), {
|
|
4432
4432
|
collapsedSize: R = 0,
|
|
4433
4433
|
panelSize: _,
|
|
4434
|
-
pivotIndices:
|
|
4434
|
+
pivotIndices: j
|
|
4435
4435
|
} = Ke(N, E, M);
|
|
4436
4436
|
if (W(_ != null, `Panel size not found for panel "${E.id}"`), !Le(_, R)) {
|
|
4437
4437
|
C.current.set(E.id, _);
|
|
@@ -4439,11 +4439,11 @@ function As({
|
|
|
4439
4439
|
delta: V,
|
|
4440
4440
|
initialLayout: M,
|
|
4441
4441
|
panelConstraints: b,
|
|
4442
|
-
pivotIndices:
|
|
4442
|
+
pivotIndices: j,
|
|
4443
4443
|
prevLayout: M,
|
|
4444
4444
|
trigger: "imperative-api"
|
|
4445
4445
|
});
|
|
4446
|
-
|
|
4446
|
+
jt(M, G) || (y(G), P.current.layout = G, I && I(G), st(N, G, w.current));
|
|
4447
4447
|
}
|
|
4448
4448
|
}
|
|
4449
4449
|
}, []), L = ge((E, I) => {
|
|
@@ -4456,12 +4456,12 @@ function As({
|
|
|
4456
4456
|
if (E.constraints.collapsible) {
|
|
4457
4457
|
const R = b.map((T) => T.constraints), {
|
|
4458
4458
|
collapsedSize: _ = 0,
|
|
4459
|
-
panelSize:
|
|
4459
|
+
panelSize: j = 0,
|
|
4460
4460
|
minSize: $ = 0,
|
|
4461
4461
|
pivotIndices: V
|
|
4462
4462
|
} = Ke(b, E, N), G = I ?? $;
|
|
4463
|
-
if (Le(
|
|
4464
|
-
const T = C.current.get(E.id),
|
|
4463
|
+
if (Le(j, _)) {
|
|
4464
|
+
const T = C.current.get(E.id), k = T != null && T >= G ? T : G, se = it(b, E) === b.length - 1 ? j - k : k - j, Z = gt({
|
|
4465
4465
|
delta: se,
|
|
4466
4466
|
initialLayout: N,
|
|
4467
4467
|
panelConstraints: R,
|
|
@@ -4469,7 +4469,7 @@ function As({
|
|
|
4469
4469
|
prevLayout: N,
|
|
4470
4470
|
trigger: "imperative-api"
|
|
4471
4471
|
});
|
|
4472
|
-
|
|
4472
|
+
jt(N, Z) || (y(Z), P.current.layout = Z, M && M(Z), st(b, Z, w.current));
|
|
4473
4473
|
}
|
|
4474
4474
|
}
|
|
4475
4475
|
}, []), z = ge((E) => {
|
|
@@ -4533,15 +4533,15 @@ function As({
|
|
|
4533
4533
|
} = P.current;
|
|
4534
4534
|
let R = null;
|
|
4535
4535
|
if (E) {
|
|
4536
|
-
const
|
|
4537
|
-
|
|
4536
|
+
const j = Gu(E, b, M);
|
|
4537
|
+
j && (C.current = new Map(Object.entries(j.expandToSizes)), R = j.layout);
|
|
4538
4538
|
}
|
|
4539
4539
|
R == null && (R = Wu({
|
|
4540
4540
|
panelDataArray: b
|
|
4541
4541
|
}));
|
|
4542
4542
|
const _ = ar({
|
|
4543
4543
|
layout: R,
|
|
4544
|
-
panelConstraints: b.map((
|
|
4544
|
+
panelConstraints: b.map((j) => j.constraints)
|
|
4545
4545
|
});
|
|
4546
4546
|
sr(N, _) || (y(_), P.current.layout = _, I && I(_), st(b, _, w.current));
|
|
4547
4547
|
}
|
|
@@ -4561,28 +4561,28 @@ function As({
|
|
|
4561
4561
|
return () => null;
|
|
4562
4562
|
const {
|
|
4563
4563
|
direction: _,
|
|
4564
|
-
dragState:
|
|
4564
|
+
dragState: j,
|
|
4565
4565
|
id: $,
|
|
4566
4566
|
keyboardResizeBy: V,
|
|
4567
4567
|
onLayout: G
|
|
4568
4568
|
} = D.current, {
|
|
4569
4569
|
layout: T,
|
|
4570
|
-
panelDataArray:
|
|
4570
|
+
panelDataArray: k
|
|
4571
4571
|
} = P.current, {
|
|
4572
4572
|
initialLayout: Q
|
|
4573
|
-
} =
|
|
4574
|
-
let Z = $u(b, E, _,
|
|
4573
|
+
} = j ?? {}, se = bs($, E, R);
|
|
4574
|
+
let Z = $u(b, E, _, j, V, R);
|
|
4575
4575
|
const Y = _ === "horizontal";
|
|
4576
4576
|
Y && I && (Z = -Z);
|
|
4577
|
-
const he =
|
|
4577
|
+
const he = k.map((De) => De.constraints), Te = gt({
|
|
4578
4578
|
delta: Z,
|
|
4579
4579
|
initialLayout: Q ?? T,
|
|
4580
4580
|
panelConstraints: he,
|
|
4581
4581
|
pivotIndices: se,
|
|
4582
4582
|
prevLayout: T,
|
|
4583
4583
|
trigger: fs(b) ? "keyboard" : "mouse-or-touch"
|
|
4584
|
-
}), me = !
|
|
4585
|
-
(hs(b) || ps(b)) && A.current != Z && (A.current = Z, !me && Z !== 0 ? Y ? Rn(E, Z < 0 ? gs : vs) : Rn(E, Z < 0 ? ys : xs) : Rn(E, 0)), me && (y(Te), P.current.layout = Te, G && G(Te), st(
|
|
4584
|
+
}), me = !jt(T, Te);
|
|
4585
|
+
(hs(b) || ps(b)) && A.current != Z && (A.current = Z, !me && Z !== 0 ? Y ? Rn(E, Z < 0 ? gs : vs) : Rn(E, Z < 0 ? ys : xs) : Rn(E, 0)), me && (y(Te), P.current.layout = Te, G && G(Te), st(k, Te, w.current));
|
|
4586
4586
|
};
|
|
4587
4587
|
}, []), U = ge((E, I) => {
|
|
4588
4588
|
const {
|
|
@@ -4592,18 +4592,18 @@ function As({
|
|
|
4592
4592
|
panelDataArray: b
|
|
4593
4593
|
} = P.current, R = b.map((T) => T.constraints), {
|
|
4594
4594
|
panelSize: _,
|
|
4595
|
-
pivotIndices:
|
|
4595
|
+
pivotIndices: j
|
|
4596
4596
|
} = Ke(b, E, N);
|
|
4597
4597
|
W(_ != null, `Panel size not found for panel "${E.id}"`);
|
|
4598
4598
|
const V = it(b, E) === b.length - 1 ? _ - I : I - _, G = gt({
|
|
4599
4599
|
delta: V,
|
|
4600
4600
|
initialLayout: N,
|
|
4601
4601
|
panelConstraints: R,
|
|
4602
|
-
pivotIndices:
|
|
4602
|
+
pivotIndices: j,
|
|
4603
4603
|
prevLayout: N,
|
|
4604
4604
|
trigger: "imperative-api"
|
|
4605
4605
|
});
|
|
4606
|
-
|
|
4606
|
+
jt(N, G) || (y(G), P.current.layout = G, M && M(G), st(b, G, w.current));
|
|
4607
4607
|
}, []), q = ge((E, I) => {
|
|
4608
4608
|
const {
|
|
4609
4609
|
layout: M,
|
|
@@ -4613,13 +4613,13 @@ function As({
|
|
|
4613
4613
|
collapsible: R
|
|
4614
4614
|
} = I, {
|
|
4615
4615
|
collapsedSize: _ = 0,
|
|
4616
|
-
collapsible:
|
|
4616
|
+
collapsible: j,
|
|
4617
4617
|
maxSize: $ = 100,
|
|
4618
4618
|
minSize: V = 0
|
|
4619
4619
|
} = E.constraints, {
|
|
4620
4620
|
panelSize: G
|
|
4621
4621
|
} = Ke(N, E, M);
|
|
4622
|
-
G != null && (R &&
|
|
4622
|
+
G != null && (R && j && Le(G, b) ? Le(b, _) || U(E, _) : G < V ? U(E, V) : G > $ && U(E, $));
|
|
4623
4623
|
}, [U]), J = ge((E, I) => {
|
|
4624
4624
|
const {
|
|
4625
4625
|
direction: M
|
|
@@ -4644,7 +4644,7 @@ function As({
|
|
|
4644
4644
|
panelDataArray: I
|
|
4645
4645
|
} = P.current, M = it(I, E);
|
|
4646
4646
|
M >= 0 && (I.splice(M, 1), delete w.current[E.id], P.current.panelDataArrayChanged = !0, S());
|
|
4647
|
-
}, [S]), ne =
|
|
4647
|
+
}, [S]), ne = ki(() => ({
|
|
4648
4648
|
collapsePanel: F,
|
|
4649
4649
|
direction: o,
|
|
4650
4650
|
dragState: x,
|
|
@@ -4669,9 +4669,9 @@ function As({
|
|
|
4669
4669
|
overflow: "hidden",
|
|
4670
4670
|
width: "100%"
|
|
4671
4671
|
};
|
|
4672
|
-
return
|
|
4672
|
+
return ke(Jt.Provider, {
|
|
4673
4673
|
value: ne
|
|
4674
|
-
},
|
|
4674
|
+
}, ke(u, {
|
|
4675
4675
|
...f,
|
|
4676
4676
|
children: t,
|
|
4677
4677
|
className: n,
|
|
@@ -4687,7 +4687,7 @@ function As({
|
|
|
4687
4687
|
[ie.groupId]: h
|
|
4688
4688
|
}));
|
|
4689
4689
|
}
|
|
4690
|
-
const Yu = Kt((e, t) =>
|
|
4690
|
+
const Yu = Kt((e, t) => ke(As, {
|
|
4691
4691
|
...e,
|
|
4692
4692
|
forwardedRef: t
|
|
4693
4693
|
}));
|
|
@@ -4844,7 +4844,7 @@ function Zu({
|
|
|
4844
4844
|
handleId: z,
|
|
4845
4845
|
resizeHandler: K,
|
|
4846
4846
|
panelGroupElement: L
|
|
4847
|
-
}),
|
|
4847
|
+
}), ke(m, {
|
|
4848
4848
|
...x,
|
|
4849
4849
|
children: e,
|
|
4850
4850
|
className: t,
|
|
@@ -4929,18 +4929,18 @@ var Ns = "DialogTrigger", Ms = d.forwardRef(
|
|
|
4929
4929
|
Ms.displayName = Ns;
|
|
4930
4930
|
var Zn = "DialogPortal", [Qu, Ls] = Ds(Zn, {
|
|
4931
4931
|
forceMount: void 0
|
|
4932
|
-
}),
|
|
4932
|
+
}), ks = (e) => {
|
|
4933
4933
|
const { __scopeDialog: t, forceMount: n, children: o, container: i } = e, a = Re(Zn, t);
|
|
4934
4934
|
return /* @__PURE__ */ g.jsx(Qu, { scope: t, forceMount: n, children: d.Children.map(o, (r) => /* @__PURE__ */ g.jsx(Yt, { present: n || a.open, children: /* @__PURE__ */ g.jsx(Un, { asChild: !0, container: i, children: r }) })) });
|
|
4935
4935
|
};
|
|
4936
|
-
|
|
4937
|
-
var Ht = "DialogOverlay",
|
|
4936
|
+
ks.displayName = Zn;
|
|
4937
|
+
var Ht = "DialogOverlay", js = d.forwardRef(
|
|
4938
4938
|
(e, t) => {
|
|
4939
4939
|
const n = Ls(Ht, e.__scopeDialog), { forceMount: o = n.forceMount, ...i } = e, a = Re(Ht, e.__scopeDialog);
|
|
4940
4940
|
return a.modal ? /* @__PURE__ */ g.jsx(Yt, { present: o || a.open, children: /* @__PURE__ */ g.jsx(td, { ...i, ref: t }) }) : null;
|
|
4941
4941
|
}
|
|
4942
4942
|
);
|
|
4943
|
-
|
|
4943
|
+
js.displayName = Ht;
|
|
4944
4944
|
var ed = Pt("DialogOverlay.RemoveScroll"), td = d.forwardRef(
|
|
4945
4945
|
(e, t) => {
|
|
4946
4946
|
const { __scopeDialog: n, ...o } = e, i = Re(Ht, n);
|
|
@@ -5081,7 +5081,7 @@ $s.displayName = Fs;
|
|
|
5081
5081
|
function Qn(e) {
|
|
5082
5082
|
return e ? "open" : "closed";
|
|
5083
5083
|
}
|
|
5084
|
-
var Ws = "DialogTitleWarning", [
|
|
5084
|
+
var Ws = "DialogTitleWarning", [kf, Hs] = Ol(Ws, {
|
|
5085
5085
|
contentName: Je,
|
|
5086
5086
|
titleName: Jn,
|
|
5087
5087
|
docsSlug: "dialog"
|
|
@@ -5105,8 +5105,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
5105
5105
|
const r = document.getElementById(t);
|
|
5106
5106
|
}
|
|
5107
5107
|
}, [o, e, t]), null;
|
|
5108
|
-
}, ad = Is, ld = Ms, cd =
|
|
5109
|
-
function
|
|
5108
|
+
}, ad = Is, ld = Ms, cd = ks, ud = js, dd = Os, fd = zs, hd = Vs, Us = $s;
|
|
5109
|
+
function jf({ ...e }) {
|
|
5110
5110
|
return /* @__PURE__ */ g.jsx(ad, { "data-slot": "dialog", ...e });
|
|
5111
5111
|
}
|
|
5112
5112
|
function Of({ ...e }) {
|
|
@@ -5118,32 +5118,45 @@ function pd({ ...e }) {
|
|
|
5118
5118
|
function _f({ ...e }) {
|
|
5119
5119
|
return /* @__PURE__ */ g.jsx(Us, { "data-slot": "dialog-close", ...e });
|
|
5120
5120
|
}
|
|
5121
|
-
function md({ className: e,
|
|
5121
|
+
function md({ className: e, backdrop: t, ...n }) {
|
|
5122
|
+
let o = "";
|
|
5123
|
+
switch (t) {
|
|
5124
|
+
case "transparent":
|
|
5125
|
+
o = "bg-transparent";
|
|
5126
|
+
break;
|
|
5127
|
+
case "opaque":
|
|
5128
|
+
o = "bg-black/50";
|
|
5129
|
+
break;
|
|
5130
|
+
case "blur":
|
|
5131
|
+
o = "backdrop-blur-md backdrop-saturate-150 bg-overlay/30";
|
|
5132
|
+
break;
|
|
5133
|
+
}
|
|
5122
5134
|
return /* @__PURE__ */ g.jsx(
|
|
5123
5135
|
ud,
|
|
5124
5136
|
{
|
|
5125
5137
|
"data-slot": "dialog-overlay",
|
|
5126
5138
|
className: de(
|
|
5127
5139
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
5140
|
+
o,
|
|
5128
5141
|
e
|
|
5129
5142
|
),
|
|
5130
|
-
...
|
|
5143
|
+
...n
|
|
5131
5144
|
}
|
|
5132
5145
|
);
|
|
5133
5146
|
}
|
|
5134
5147
|
const zf = d.forwardRef(
|
|
5135
|
-
({ className: e, children: t, showCloseButton: n = !0,
|
|
5136
|
-
/* @__PURE__ */ g.jsx(md, {}),
|
|
5148
|
+
({ className: e, children: t, showCloseButton: n = !0, backdrop: o = "opaque", ...i }, a) => /* @__PURE__ */ g.jsx(ua, { children: /* @__PURE__ */ g.jsxs(pd, { "data-slot": "dialog-portal", children: [
|
|
5149
|
+
/* @__PURE__ */ g.jsx(md, { backdrop: o }),
|
|
5137
5150
|
/* @__PURE__ */ g.jsxs(
|
|
5138
5151
|
dd,
|
|
5139
5152
|
{
|
|
5140
5153
|
"data-slot": "dialog-content",
|
|
5141
|
-
ref:
|
|
5154
|
+
ref: a,
|
|
5142
5155
|
className: de(
|
|
5143
5156
|
"bg-content1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
5144
5157
|
e
|
|
5145
5158
|
),
|
|
5146
|
-
...
|
|
5159
|
+
...i,
|
|
5147
5160
|
children: [
|
|
5148
5161
|
t,
|
|
5149
5162
|
n && /* @__PURE__ */ g.jsxs(
|
|
@@ -5411,9 +5424,9 @@ var Ce = 10, [ni, We] = ht(et), Rd = "SelectContentImpl", Td = Pt("SelectContent
|
|
|
5411
5424
|
}, [w]), Fr();
|
|
5412
5425
|
const U = d.useCallback(
|
|
5413
5426
|
(b) => {
|
|
5414
|
-
const [R, ..._] = O().map((V) => V.ref.current), [
|
|
5427
|
+
const [R, ..._] = O().map((V) => V.ref.current), [j] = _.slice(-1), $ = document.activeElement;
|
|
5415
5428
|
for (const V of b)
|
|
5416
|
-
if (V === $ || (V == null || V.scrollIntoView({ block: "nearest" }), V === R && A && (A.scrollTop = 0), V ===
|
|
5429
|
+
if (V === $ || (V == null || V.scrollIntoView({ block: "nearest" }), V === R && A && (A.scrollTop = 0), V === j && A && (A.scrollTop = A.scrollHeight), V == null || V.focus(), document.activeElement !== $)) return;
|
|
5417
5430
|
},
|
|
5418
5431
|
[O, A]
|
|
5419
5432
|
), q = d.useCallback(
|
|
@@ -5427,14 +5440,14 @@ var Ce = 10, [ni, We] = ht(et), Rd = "SelectContentImpl", Td = Pt("SelectContent
|
|
|
5427
5440
|
d.useEffect(() => {
|
|
5428
5441
|
if (w) {
|
|
5429
5442
|
let b = { x: 0, y: 0 };
|
|
5430
|
-
const R = (
|
|
5443
|
+
const R = (j) => {
|
|
5431
5444
|
var $, V;
|
|
5432
5445
|
b = {
|
|
5433
|
-
x: Math.abs(Math.round(
|
|
5434
|
-
y: Math.abs(Math.round(
|
|
5446
|
+
x: Math.abs(Math.round(j.pageX) - ((($ = re.current) == null ? void 0 : $.x) ?? 0)),
|
|
5447
|
+
y: Math.abs(Math.round(j.pageY) - (((V = re.current) == null ? void 0 : V.y) ?? 0))
|
|
5435
5448
|
};
|
|
5436
|
-
}, _ = (
|
|
5437
|
-
b.x <= 10 && b.y <= 10 ?
|
|
5449
|
+
}, _ = (j) => {
|
|
5450
|
+
b.x <= 10 && b.y <= 10 ? j.preventDefault() : w.contains(j.target) || J(!1), document.removeEventListener("pointermove", R), re.current = null;
|
|
5438
5451
|
};
|
|
5439
5452
|
return re.current !== null && (document.addEventListener("pointermove", R), document.addEventListener("pointerup", _, { capture: !0, once: !0 })), () => {
|
|
5440
5453
|
document.removeEventListener("pointermove", R), document.removeEventListener("pointerup", _, { capture: !0 });
|
|
@@ -5447,21 +5460,21 @@ var Ce = 10, [ni, We] = ht(et), Rd = "SelectContentImpl", Td = Pt("SelectContent
|
|
|
5447
5460
|
};
|
|
5448
5461
|
}, [J]);
|
|
5449
5462
|
const [ye, ne] = wi((b) => {
|
|
5450
|
-
const R = O().filter(($) => !$.disabled), _ = R.find(($) => $.ref.current === document.activeElement),
|
|
5451
|
-
|
|
5463
|
+
const R = O().filter(($) => !$.disabled), _ = R.find(($) => $.ref.current === document.activeElement), j = bi(R, b, _);
|
|
5464
|
+
j && setTimeout(() => j.ref.current.focus());
|
|
5452
5465
|
}), ue = d.useCallback(
|
|
5453
5466
|
(b, R, _) => {
|
|
5454
|
-
const
|
|
5455
|
-
(S.value !== void 0 && S.value === R ||
|
|
5467
|
+
const j = !K.current && !_;
|
|
5468
|
+
(S.value !== void 0 && S.value === R || j) && (L(b), j && (K.current = !0));
|
|
5456
5469
|
},
|
|
5457
5470
|
[S.value]
|
|
5458
5471
|
), E = d.useCallback(() => w == null ? void 0 : w.focus(), [w]), I = d.useCallback(
|
|
5459
5472
|
(b, R, _) => {
|
|
5460
|
-
const
|
|
5461
|
-
(S.value !== void 0 && S.value === R ||
|
|
5473
|
+
const j = !K.current && !_;
|
|
5474
|
+
(S.value !== void 0 && S.value === R || j) && H(b);
|
|
5462
5475
|
},
|
|
5463
5476
|
[S.value]
|
|
5464
|
-
), M = o === "popper" ?
|
|
5477
|
+
), M = o === "popper" ? kn : ri, N = M === kn ? {
|
|
5465
5478
|
side: s,
|
|
5466
5479
|
sideOffset: l,
|
|
5467
5480
|
align: c,
|
|
@@ -5533,12 +5546,12 @@ var Ce = 10, [ni, We] = ht(et), Rd = "SelectContentImpl", Td = Pt("SelectContent
|
|
|
5533
5546
|
onKeyDown: te(y.onKeyDown, (b) => {
|
|
5534
5547
|
const R = b.ctrlKey || b.altKey || b.metaKey;
|
|
5535
5548
|
if (b.key === "Tab" && b.preventDefault(), !R && b.key.length === 1 && ne(b.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(b.key)) {
|
|
5536
|
-
let
|
|
5537
|
-
if (["ArrowUp", "End"].includes(b.key) && (
|
|
5538
|
-
const $ = b.target, V =
|
|
5539
|
-
|
|
5549
|
+
let j = O().filter(($) => !$.disabled).map(($) => $.ref.current);
|
|
5550
|
+
if (["ArrowUp", "End"].includes(b.key) && (j = j.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(b.key)) {
|
|
5551
|
+
const $ = b.target, V = j.indexOf($);
|
|
5552
|
+
j = j.slice(V + 1);
|
|
5540
5553
|
}
|
|
5541
|
-
setTimeout(() => U(
|
|
5554
|
+
setTimeout(() => U(j)), b.preventDefault();
|
|
5542
5555
|
}
|
|
5543
5556
|
})
|
|
5544
5557
|
}
|
|
@@ -5557,20 +5570,20 @@ var Ad = "SelectItemAlignedPosition", ri = d.forwardRef((e, t) => {
|
|
|
5557
5570
|
if (a.trigger && a.valueNode && s && c && p && v && y) {
|
|
5558
5571
|
const P = a.trigger.getBoundingClientRect(), F = c.getBoundingClientRect(), L = a.valueNode.getBoundingClientRect(), z = y.getBoundingClientRect();
|
|
5559
5572
|
if (a.dir !== "rtl") {
|
|
5560
|
-
const $ = z.left - F.left, V = L.left - $, G = P.left - V, T = P.width + G,
|
|
5573
|
+
const $ = z.left - F.left, V = L.left - $, G = P.left - V, T = P.width + G, k = Math.max(T, F.width), Q = window.innerWidth - Ce, se = cr(V, [
|
|
5561
5574
|
Ce,
|
|
5562
5575
|
// Prevents the content from going off the starting edge of the
|
|
5563
5576
|
// viewport. It may still go off the ending edge, but this can be
|
|
5564
5577
|
// controlled by the user since they may want to manage overflow in a
|
|
5565
5578
|
// specific way.
|
|
5566
5579
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
5567
|
-
Math.max(Ce, Q -
|
|
5580
|
+
Math.max(Ce, Q - k)
|
|
5568
5581
|
]);
|
|
5569
5582
|
s.style.minWidth = T + "px", s.style.left = se + "px";
|
|
5570
5583
|
} else {
|
|
5571
|
-
const $ = F.right - z.right, V = window.innerWidth - L.right - $, G = window.innerWidth - P.right - V, T = P.width + G,
|
|
5584
|
+
const $ = F.right - z.right, V = window.innerWidth - L.right - $, G = window.innerWidth - P.right - V, T = P.width + G, k = Math.max(T, F.width), Q = window.innerWidth - Ce, se = cr(V, [
|
|
5572
5585
|
Ce,
|
|
5573
|
-
Math.max(Ce, Q -
|
|
5586
|
+
Math.max(Ce, Q - k)
|
|
5574
5587
|
]);
|
|
5575
5588
|
s.style.minWidth = T + "px", s.style.right = se + "px";
|
|
5576
5589
|
}
|
|
@@ -5657,7 +5670,7 @@ var Ad = "SelectItemAlignedPosition", ri = d.forwardRef((e, t) => {
|
|
|
5657
5670
|
);
|
|
5658
5671
|
});
|
|
5659
5672
|
ri.displayName = Ad;
|
|
5660
|
-
var Dd = "SelectPopperPosition",
|
|
5673
|
+
var Dd = "SelectPopperPosition", kn = d.forwardRef((e, t) => {
|
|
5661
5674
|
const {
|
|
5662
5675
|
__scopeSelect: n,
|
|
5663
5676
|
align: o = "start",
|
|
@@ -5685,10 +5698,10 @@ var Dd = "SelectPopperPosition", jn = d.forwardRef((e, t) => {
|
|
|
5685
5698
|
}
|
|
5686
5699
|
);
|
|
5687
5700
|
});
|
|
5688
|
-
|
|
5689
|
-
var [Id, eo] = ht(et, {}),
|
|
5701
|
+
kn.displayName = Dd;
|
|
5702
|
+
var [Id, eo] = ht(et, {}), jn = "SelectViewport", si = d.forwardRef(
|
|
5690
5703
|
(e, t) => {
|
|
5691
|
-
const { __scopeSelect: n, nonce: o, ...i } = e, a = We(
|
|
5704
|
+
const { __scopeSelect: n, nonce: o, ...i } = e, a = We(jn, n), r = eo(jn, n), s = ae(t, a.onViewportChange), l = d.useRef(0);
|
|
5692
5705
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
5693
5706
|
/* @__PURE__ */ g.jsx(
|
|
5694
5707
|
"style",
|
|
@@ -5738,7 +5751,7 @@ var [Id, eo] = ht(et, {}), kn = "SelectViewport", si = d.forwardRef(
|
|
|
5738
5751
|
] });
|
|
5739
5752
|
}
|
|
5740
5753
|
);
|
|
5741
|
-
si.displayName =
|
|
5754
|
+
si.displayName = jn;
|
|
5742
5755
|
var ii = "SelectGroup", [Nd, Md] = ht(ii), ai = d.forwardRef(
|
|
5743
5756
|
(e, t) => {
|
|
5744
5757
|
const { __scopeSelect: n, ...o } = e, i = ut();
|
|
@@ -5940,20 +5953,20 @@ var vi = d.forwardRef((e, t) => {
|
|
|
5940
5953
|
})
|
|
5941
5954
|
}
|
|
5942
5955
|
);
|
|
5943
|
-
}),
|
|
5956
|
+
}), kd = "SelectSeparator", yi = d.forwardRef(
|
|
5944
5957
|
(e, t) => {
|
|
5945
5958
|
const { __scopeSelect: n, ...o } = e;
|
|
5946
5959
|
return /* @__PURE__ */ g.jsx(ee.div, { "aria-hidden": !0, ...o, ref: t });
|
|
5947
5960
|
}
|
|
5948
5961
|
);
|
|
5949
|
-
yi.displayName =
|
|
5950
|
-
var zn = "SelectArrow",
|
|
5962
|
+
yi.displayName = kd;
|
|
5963
|
+
var zn = "SelectArrow", jd = d.forwardRef(
|
|
5951
5964
|
(e, t) => {
|
|
5952
5965
|
const { __scopeSelect: n, ...o } = e, i = sn(n), a = $e(zn, n), r = We(zn, n);
|
|
5953
5966
|
return a.open && r.position === "popper" ? /* @__PURE__ */ g.jsx(xc, { ...i, ...o, ref: t }) : null;
|
|
5954
5967
|
}
|
|
5955
5968
|
);
|
|
5956
|
-
|
|
5969
|
+
jd.displayName = zn;
|
|
5957
5970
|
var Od = "SelectBubbleInput", xi = d.forwardRef(
|
|
5958
5971
|
({ __scopeSelect: e, value: t, ...n }, o) => {
|
|
5959
5972
|
const i = d.useRef(null), a = ae(o, i), r = gd(t);
|
|
@@ -6180,21 +6193,21 @@ var pf = d.createContext({}), mf = d.forwardRef((e, t) => {
|
|
|
6180
6193
|
i == null || i(T), F(T);
|
|
6181
6194
|
}, [i]), O = d.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), B = d.useRef(null), X = d.useRef(null), K = d.useRef({ value: L, onChange: H, isIOS: typeof window < "u" && ((w = (S = window == null ? void 0 : window.CSS) == null ? void 0 : S.supports) == null ? void 0 : w.call(S, "-webkit-touch-callout", "none")) }), U = d.useRef({ prev: [(C = B.current) == null ? void 0 : C.selectionStart, (A = B.current) == null ? void 0 : A.selectionEnd, (D = B.current) == null ? void 0 : D.selectionDirection] });
|
|
6182
6195
|
d.useImperativeHandle(t, () => B.current, []), d.useEffect(() => {
|
|
6183
|
-
let T = B.current,
|
|
6184
|
-
if (!T || !
|
|
6196
|
+
let T = B.current, k = X.current;
|
|
6197
|
+
if (!T || !k) return;
|
|
6185
6198
|
K.current.value !== T.value && K.current.onChange(T.value), U.current.prev = [T.selectionStart, T.selectionEnd, T.selectionDirection];
|
|
6186
6199
|
function Q() {
|
|
6187
6200
|
if (document.activeElement !== T) {
|
|
6188
6201
|
ue(null), I(null);
|
|
6189
6202
|
return;
|
|
6190
6203
|
}
|
|
6191
|
-
let Y = T.selectionStart, he = T.selectionEnd, Te = T.selectionDirection, me = T.maxLength, De = T.value, Ie = U.current.prev,
|
|
6204
|
+
let Y = T.selectionStart, he = T.selectionEnd, Te = T.selectionDirection, me = T.maxLength, De = T.value, Ie = U.current.prev, je = -1, Oe = -1, He;
|
|
6192
6205
|
if (De.length !== 0 && Y !== null && he !== null) {
|
|
6193
6206
|
let Ti = Y === he, Ai = Y === De.length && De.length < me;
|
|
6194
6207
|
if (Ti && !Ai) {
|
|
6195
6208
|
let Ue = Y;
|
|
6196
|
-
if (Ue === 0)
|
|
6197
|
-
else if (Ue === me)
|
|
6209
|
+
if (Ue === 0) je = 0, Oe = 1, He = "forward";
|
|
6210
|
+
else if (Ue === me) je = Ue - 1, Oe = Ue, He = "backward";
|
|
6198
6211
|
else if (me > 1 && De.length > 1) {
|
|
6199
6212
|
let an = 0;
|
|
6200
6213
|
if (Ie[0] !== null && Ie[1] !== null) {
|
|
@@ -6202,12 +6215,12 @@ var pf = d.createContext({}), mf = d.forwardRef((e, t) => {
|
|
|
6202
6215
|
let Di = Ie[0] === Ie[1] && Ie[0] < me;
|
|
6203
6216
|
He === "backward" && !Di && (an = -1);
|
|
6204
6217
|
}
|
|
6205
|
-
|
|
6218
|
+
je = an + Ue, Oe = an + Ue + 1;
|
|
6206
6219
|
}
|
|
6207
6220
|
}
|
|
6208
|
-
|
|
6221
|
+
je !== -1 && Oe !== -1 && je !== Oe && B.current.setSelectionRange(je, Oe, He);
|
|
6209
6222
|
}
|
|
6210
|
-
let to =
|
|
6223
|
+
let to = je !== -1 ? je : Y, no = Oe !== -1 ? Oe : he, Ri = He ?? Te;
|
|
6211
6224
|
ue(to), I(no), U.current.prev = [to, no, Ri];
|
|
6212
6225
|
}
|
|
6213
6226
|
if (document.addEventListener("selectionchange", Q, { capture: !0 }), Q(), document.activeElement === T && ye(!0), !document.getElementById("input-otp-style")) {
|
|
@@ -6218,7 +6231,7 @@ var pf = d.createContext({}), mf = d.forwardRef((e, t) => {
|
|
|
6218
6231
|
}
|
|
6219
6232
|
}
|
|
6220
6233
|
let se = () => {
|
|
6221
|
-
|
|
6234
|
+
k && k.style.setProperty("--root-height", `${T.clientHeight}px`);
|
|
6222
6235
|
};
|
|
6223
6236
|
se();
|
|
6224
6237
|
let Z = new ResizeObserver(se);
|
|
@@ -6229,57 +6242,57 @@ var pf = d.createContext({}), mf = d.forwardRef((e, t) => {
|
|
|
6229
6242
|
let [q, J] = d.useState(!1), [re, ye] = d.useState(!1), [ne, ue] = d.useState(null), [E, I] = d.useState(null);
|
|
6230
6243
|
d.useEffect(() => {
|
|
6231
6244
|
lf(() => {
|
|
6232
|
-
var T,
|
|
6245
|
+
var T, k, Q, se;
|
|
6233
6246
|
(T = B.current) == null || T.dispatchEvent(new Event("input"));
|
|
6234
|
-
let Z = (
|
|
6247
|
+
let Z = (k = B.current) == null ? void 0 : k.selectionStart, Y = (Q = B.current) == null ? void 0 : Q.selectionEnd, he = (se = B.current) == null ? void 0 : se.selectionDirection;
|
|
6235
6248
|
Z !== null && Y !== null && (ue(Z), I(Y), U.current.prev = [Z, Y, he]);
|
|
6236
6249
|
});
|
|
6237
6250
|
}, [L, re]), d.useEffect(() => {
|
|
6238
6251
|
z !== void 0 && L !== z && z.length < a && L.length === a && (u == null || u(L));
|
|
6239
6252
|
}, [a, u, z, L]);
|
|
6240
6253
|
let M = hf({ containerRef: X, inputRef: B, pushPasswordManagerStrategy: f, isFocused: re }), N = d.useCallback((T) => {
|
|
6241
|
-
let
|
|
6242
|
-
if (
|
|
6254
|
+
let k = T.currentTarget.value.slice(0, a);
|
|
6255
|
+
if (k.length > 0 && O && !O.test(k)) {
|
|
6243
6256
|
T.preventDefault();
|
|
6244
6257
|
return;
|
|
6245
6258
|
}
|
|
6246
|
-
typeof z == "string" &&
|
|
6259
|
+
typeof z == "string" && k.length < z.length && document.dispatchEvent(new Event("selectionchange")), H(k);
|
|
6247
6260
|
}, [a, H, z, O]), b = d.useCallback(() => {
|
|
6248
6261
|
var T;
|
|
6249
6262
|
if (B.current) {
|
|
6250
|
-
let
|
|
6251
|
-
(T = B.current) == null || T.setSelectionRange(
|
|
6263
|
+
let k = Math.min(B.current.value.length, a - 1), Q = B.current.value.length;
|
|
6264
|
+
(T = B.current) == null || T.setSelectionRange(k, Q), ue(k), I(Q);
|
|
6252
6265
|
}
|
|
6253
6266
|
ye(!0);
|
|
6254
6267
|
}, [a]), R = d.useCallback((T) => {
|
|
6255
|
-
var
|
|
6268
|
+
var k, Q;
|
|
6256
6269
|
let se = B.current;
|
|
6257
6270
|
if (!h && (!K.current.isIOS || !T.clipboardData || !se)) return;
|
|
6258
6271
|
let Z = T.clipboardData.getData("text/plain"), Y = h ? h(Z) : Z;
|
|
6259
6272
|
T.preventDefault();
|
|
6260
|
-
let he = (
|
|
6273
|
+
let he = (k = B.current) == null ? void 0 : k.selectionStart, Te = (Q = B.current) == null ? void 0 : Q.selectionEnd, me = (he !== Te ? L.slice(0, he) + Y + L.slice(Te) : L.slice(0, he) + Y + L.slice(he)).slice(0, a);
|
|
6261
6274
|
if (me.length > 0 && O && !O.test(me)) return;
|
|
6262
6275
|
se.value = me, H(me);
|
|
6263
6276
|
let De = Math.min(me.length, a - 1), Ie = me.length;
|
|
6264
6277
|
se.setSelectionRange(De, Ie), ue(De), I(Ie);
|
|
6265
|
-
}, [a, H, O, L]), _ = d.useMemo(() => ({ position: "relative", cursor: y.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [y.disabled]),
|
|
6266
|
-
var
|
|
6267
|
-
R(T), (
|
|
6278
|
+
}, [a, H, O, L]), _ = d.useMemo(() => ({ position: "relative", cursor: y.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [y.disabled]), j = d.useMemo(() => ({ position: "absolute", inset: 0, width: M.willPushPWMBadge ? `calc(100% + ${M.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: M.willPushPWMBadge ? `inset(0 ${M.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: r, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [M.PWM_BADGE_SPACE_WIDTH, M.willPushPWMBadge, r]), $ = d.useMemo(() => d.createElement("input", sf(rf({ autoComplete: y.autoComplete || "one-time-code" }, y), { "data-input-otp": !0, "data-input-otp-placeholder-shown": L.length === 0 || void 0, "data-input-otp-mss": ne, "data-input-otp-mse": E, inputMode: c, pattern: O == null ? void 0 : O.source, "aria-placeholder": l, style: j, maxLength: a, value: L, ref: B, onPaste: (T) => {
|
|
6279
|
+
var k;
|
|
6280
|
+
R(T), (k = y.onPaste) == null || k.call(y, T);
|
|
6268
6281
|
}, onChange: N, onMouseOver: (T) => {
|
|
6269
|
-
var
|
|
6270
|
-
J(!0), (
|
|
6282
|
+
var k;
|
|
6283
|
+
J(!0), (k = y.onMouseOver) == null || k.call(y, T);
|
|
6271
6284
|
}, onMouseLeave: (T) => {
|
|
6272
|
-
var
|
|
6273
|
-
J(!1), (
|
|
6285
|
+
var k;
|
|
6286
|
+
J(!1), (k = y.onMouseLeave) == null || k.call(y, T);
|
|
6274
6287
|
}, onFocus: (T) => {
|
|
6275
|
-
var
|
|
6276
|
-
b(), (
|
|
6288
|
+
var k;
|
|
6289
|
+
b(), (k = y.onFocus) == null || k.call(y, T);
|
|
6277
6290
|
}, onBlur: (T) => {
|
|
6278
|
-
var
|
|
6279
|
-
ye(!1), (
|
|
6280
|
-
} })), [N, b, R, c,
|
|
6291
|
+
var k;
|
|
6292
|
+
ye(!1), (k = y.onBlur) == null || k.call(y, T);
|
|
6293
|
+
} })), [N, b, R, c, j, a, E, ne, y, O == null ? void 0 : O.source, L]), V = d.useMemo(() => ({ slots: Array.from({ length: a }).map((T, k) => {
|
|
6281
6294
|
var Q;
|
|
6282
|
-
let se = re && ne !== null && E !== null && (ne === E &&
|
|
6295
|
+
let se = re && ne !== null && E !== null && (ne === E && k === ne || k >= ne && k < E), Z = L[k] !== void 0 ? L[k] : null, Y = L[0] !== void 0 ? null : (Q = l == null ? void 0 : l[k]) != null ? Q : null;
|
|
6283
6296
|
return { char: Z, placeholderChar: Y, isActive: se, hasFakeCaret: se && Z === null };
|
|
6284
6297
|
}), isFocused: re, isHovering: !y.disabled && q }), [re, q, a, E, ne, y.disabled, L]), G = d.useMemo(() => p ? p(V) : d.createElement(pf.Provider, { value: V }, v), [v, V, p]);
|
|
6285
6298
|
return d.createElement(d.Fragment, null, x !== null && d.createElement("noscript", null, d.createElement("style", null, x)), d.createElement("div", { ref: X, "data-input-otp-container": !0, style: _, className: m }, G, d.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, $)));
|
|
@@ -6325,7 +6338,7 @@ export {
|
|
|
6325
6338
|
Bf as J,
|
|
6326
6339
|
Ff as K,
|
|
6327
6340
|
$f as L,
|
|
6328
|
-
|
|
6341
|
+
jf as M,
|
|
6329
6342
|
zf as N,
|
|
6330
6343
|
ud as O,
|
|
6331
6344
|
ee as P,
|
|
@@ -6339,13 +6352,13 @@ export {
|
|
|
6339
6352
|
pf as X,
|
|
6340
6353
|
Lf as Y,
|
|
6341
6354
|
ld as Z,
|
|
6342
|
-
|
|
6355
|
+
kf as _,
|
|
6343
6356
|
Xf as a,
|
|
6344
6357
|
hd as a0,
|
|
6345
6358
|
Us as a1,
|
|
6346
6359
|
Mf as a2,
|
|
6347
6360
|
Nl as a3,
|
|
6348
|
-
|
|
6361
|
+
jl as a4,
|
|
6349
6362
|
_f as a5,
|
|
6350
6363
|
Vf as a6,
|
|
6351
6364
|
md as a7,
|
|
@@ -6380,4 +6393,4 @@ export {
|
|
|
6380
6393
|
Pu as y,
|
|
6381
6394
|
Zu as z
|
|
6382
6395
|
};
|
|
6383
|
-
//# sourceMappingURL=index-
|
|
6396
|
+
//# sourceMappingURL=index-mYE_k9Xd.js.map
|