@acrool/react-picker 0.1.0 → 0.1.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MotionDrawer/utils.d.ts +4 -3
- package/dist/PickerProvider.d.ts +2 -1
- package/dist/acrool-react-picker.es.js +289 -283
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { EVertical } from '../types';
|
|
2
|
+
import { EVertical, IPosition } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Get the closest scrollable parent of an element.
|
|
5
5
|
* Caches results for performance.
|
|
@@ -9,6 +9,7 @@ export declare function getScrollParent(element: HTMLElement): HTMLElement | Win
|
|
|
9
9
|
* Update the position of the picker element relative to the anchor element.
|
|
10
10
|
* @param anchorRef Reference to the anchor element.
|
|
11
11
|
* @param pickerRef Reference to the picker element.
|
|
12
|
-
* @param
|
|
12
|
+
* @param importantPosition 強制指定位置
|
|
13
|
+
* @param setVertical 設定垂直(top/bottom, 讓選擇棄可以決定順序
|
|
13
14
|
*/
|
|
14
|
-
export declare const updatePosition: (anchorRef: RefObject<HTMLElement>, pickerRef: RefObject<HTMLElement>, setVertical: (vertical: EVertical) => void) => void;
|
|
15
|
+
export declare const updatePosition: (anchorRef: RefObject<HTMLElement>, pickerRef: RefObject<HTMLElement>, setVertical: (vertical: EVertical) => void, importantPosition?: IPosition) => void;
|
package/dist/PickerProvider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EVertical } from './types';
|
|
2
|
+
import { EVertical, IPosition } from './types';
|
|
3
3
|
interface IContextProps<T = any> {
|
|
4
4
|
hide: () => void;
|
|
5
5
|
show: () => void;
|
|
@@ -9,6 +9,7 @@ interface IContextProps<T = any> {
|
|
|
9
9
|
inputBlur: () => void;
|
|
10
10
|
isInputFocus: boolean;
|
|
11
11
|
value?: T;
|
|
12
|
+
importantPosition?: IPosition;
|
|
12
13
|
vertical: EVertical;
|
|
13
14
|
setVertical: (vertical: EVertical) => void;
|
|
14
15
|
onChange: (value: T) => void;
|
|
@@ -108,29 +108,29 @@ var qt = {};
|
|
|
108
108
|
var ki;
|
|
109
109
|
function ga() {
|
|
110
110
|
return ki || (ki = 1, process.env.NODE_ENV !== "production" && function() {
|
|
111
|
-
var t = Ln, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"),
|
|
112
|
-
function
|
|
111
|
+
var t = Ln, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
|
|
112
|
+
function T(h) {
|
|
113
113
|
if (h === null || typeof h != "object")
|
|
114
114
|
return null;
|
|
115
|
-
var
|
|
116
|
-
return typeof
|
|
115
|
+
var m = g && h[g] || h[v];
|
|
116
|
+
return typeof m == "function" ? m : null;
|
|
117
117
|
}
|
|
118
118
|
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
119
119
|
function y(h) {
|
|
120
120
|
{
|
|
121
|
-
for (var
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0), C = 1; C < m; C++)
|
|
122
|
+
b[C - 1] = arguments[C];
|
|
123
|
+
x("error", h, b);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function x(h, m, b) {
|
|
127
127
|
{
|
|
128
128
|
var C = P.ReactDebugCurrentFrame, k = C.getStackAddendum();
|
|
129
|
-
k !== "" && (
|
|
130
|
-
var O =
|
|
129
|
+
k !== "" && (m += "%s", b = b.concat([k]));
|
|
130
|
+
var O = b.map(function(E) {
|
|
131
131
|
return String(E);
|
|
132
132
|
});
|
|
133
|
-
O.unshift("Warning: " +
|
|
133
|
+
O.unshift("Warning: " + m), Function.prototype.apply.call(console[h], console, O);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
var w = !1, A = !1, j = !1, q = !1, R = !1, W;
|
|
@@ -142,12 +142,12 @@ function ga() {
|
|
|
142
142
|
// with.
|
|
143
143
|
h.$$typeof === W || h.getModuleId !== void 0));
|
|
144
144
|
}
|
|
145
|
-
function rt(h,
|
|
145
|
+
function rt(h, m, b) {
|
|
146
146
|
var C = h.displayName;
|
|
147
147
|
if (C)
|
|
148
148
|
return C;
|
|
149
|
-
var k =
|
|
150
|
-
return k !== "" ?
|
|
149
|
+
var k = m.displayName || m.name || "";
|
|
150
|
+
return k !== "" ? b + "(" + k + ")" : b;
|
|
151
151
|
}
|
|
152
152
|
function wt(h) {
|
|
153
153
|
return h.displayName || "Context";
|
|
@@ -176,11 +176,11 @@ function ga() {
|
|
|
176
176
|
if (typeof h == "object")
|
|
177
177
|
switch (h.$$typeof) {
|
|
178
178
|
case a:
|
|
179
|
-
var
|
|
180
|
-
return wt(
|
|
179
|
+
var m = h;
|
|
180
|
+
return wt(m) + ".Consumer";
|
|
181
181
|
case r:
|
|
182
|
-
var
|
|
183
|
-
return wt(
|
|
182
|
+
var b = h;
|
|
183
|
+
return wt(b._context) + ".Provider";
|
|
184
184
|
case l:
|
|
185
185
|
return rt(h, h.render, "ForwardRef");
|
|
186
186
|
case f:
|
|
@@ -260,7 +260,7 @@ function ga() {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
var ze = P.ReactCurrentDispatcher, Ye;
|
|
263
|
-
function ve(h,
|
|
263
|
+
function ve(h, m, b) {
|
|
264
264
|
{
|
|
265
265
|
if (Ye === void 0)
|
|
266
266
|
try {
|
|
@@ -278,13 +278,13 @@ function ga() {
|
|
|
278
278
|
var ko = typeof WeakMap == "function" ? WeakMap : Map;
|
|
279
279
|
Pe = new ko();
|
|
280
280
|
}
|
|
281
|
-
function yi(h,
|
|
281
|
+
function yi(h, m) {
|
|
282
282
|
if (!h || Xe)
|
|
283
283
|
return "";
|
|
284
284
|
{
|
|
285
|
-
var
|
|
286
|
-
if (
|
|
287
|
-
return
|
|
285
|
+
var b = Pe.get(h);
|
|
286
|
+
if (b !== void 0)
|
|
287
|
+
return b;
|
|
288
288
|
}
|
|
289
289
|
var C;
|
|
290
290
|
Xe = !0;
|
|
@@ -293,7 +293,7 @@ function ga() {
|
|
|
293
293
|
var O;
|
|
294
294
|
O = ze.current, ze.current = null, Do();
|
|
295
295
|
try {
|
|
296
|
-
if (
|
|
296
|
+
if (m) {
|
|
297
297
|
var E = function() {
|
|
298
298
|
throw Error();
|
|
299
299
|
};
|
|
@@ -349,14 +349,14 @@ function ga() {
|
|
|
349
349
|
var Ft = h ? h.displayName || h.name : "", St = Ft ? ve(Ft) : "";
|
|
350
350
|
return typeof h == "function" && Pe.set(h, St), St;
|
|
351
351
|
}
|
|
352
|
-
function Lo(h,
|
|
352
|
+
function Lo(h, m, b) {
|
|
353
353
|
return yi(h, !1);
|
|
354
354
|
}
|
|
355
355
|
function Oo(h) {
|
|
356
|
-
var
|
|
357
|
-
return !!(
|
|
356
|
+
var m = h.prototype;
|
|
357
|
+
return !!(m && m.isReactComponent);
|
|
358
358
|
}
|
|
359
|
-
function xe(h,
|
|
359
|
+
function xe(h, m, b) {
|
|
360
360
|
if (h == null)
|
|
361
361
|
return "";
|
|
362
362
|
if (typeof h == "function")
|
|
@@ -374,11 +374,11 @@ function ga() {
|
|
|
374
374
|
case l:
|
|
375
375
|
return Lo(h.render);
|
|
376
376
|
case f:
|
|
377
|
-
return xe(h.type,
|
|
377
|
+
return xe(h.type, m, b);
|
|
378
378
|
case d: {
|
|
379
379
|
var C = h, k = C._payload, O = C._init;
|
|
380
380
|
try {
|
|
381
|
-
return xe(O(k),
|
|
381
|
+
return xe(O(k), m, b);
|
|
382
382
|
} catch {
|
|
383
383
|
}
|
|
384
384
|
}
|
|
@@ -388,12 +388,12 @@ function ga() {
|
|
|
388
388
|
var zt = Object.prototype.hasOwnProperty, vi = {}, Pi = P.ReactDebugCurrentFrame;
|
|
389
389
|
function be(h) {
|
|
390
390
|
if (h) {
|
|
391
|
-
var
|
|
392
|
-
Pi.setExtraStackFrame(
|
|
391
|
+
var m = h._owner, b = xe(h.type, h._source, m ? m.type : null);
|
|
392
|
+
Pi.setExtraStackFrame(b);
|
|
393
393
|
} else
|
|
394
394
|
Pi.setExtraStackFrame(null);
|
|
395
395
|
}
|
|
396
|
-
function jo(h,
|
|
396
|
+
function jo(h, m, b, C, k) {
|
|
397
397
|
{
|
|
398
398
|
var O = Function.call.bind(zt);
|
|
399
399
|
for (var E in h)
|
|
@@ -401,14 +401,14 @@ function ga() {
|
|
|
401
401
|
var V = void 0;
|
|
402
402
|
try {
|
|
403
403
|
if (typeof h[E] != "function") {
|
|
404
|
-
var X = Error((C || "React class") + ": " +
|
|
404
|
+
var X = Error((C || "React class") + ": " + b + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
405
405
|
throw X.name = "Invariant Violation", X;
|
|
406
406
|
}
|
|
407
|
-
V = h[E](
|
|
407
|
+
V = h[E](m, E, C, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
408
408
|
} catch (B) {
|
|
409
409
|
V = B;
|
|
410
410
|
}
|
|
411
|
-
V && !(V instanceof Error) && (be(k), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class",
|
|
411
|
+
V && !(V instanceof Error) && (be(k), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", b, E, typeof V), be(null)), V instanceof Error && !(V.message in vi) && (vi[V.message] = !0, be(k), y("Failed %s type: %s", b, V.message), be(null));
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}
|
|
@@ -418,8 +418,8 @@ function ga() {
|
|
|
418
418
|
}
|
|
419
419
|
function _o(h) {
|
|
420
420
|
{
|
|
421
|
-
var
|
|
422
|
-
return
|
|
421
|
+
var m = typeof Symbol == "function" && Symbol.toStringTag, b = m && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
422
|
+
return b;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
function Bo(h) {
|
|
@@ -445,56 +445,56 @@ function ga() {
|
|
|
445
445
|
Ze = {};
|
|
446
446
|
function No(h) {
|
|
447
447
|
if (zt.call(h, "ref")) {
|
|
448
|
-
var
|
|
449
|
-
if (
|
|
448
|
+
var m = Object.getOwnPropertyDescriptor(h, "ref").get;
|
|
449
|
+
if (m && m.isReactWarning)
|
|
450
450
|
return !1;
|
|
451
451
|
}
|
|
452
452
|
return h.ref !== void 0;
|
|
453
453
|
}
|
|
454
454
|
function Uo(h) {
|
|
455
455
|
if (zt.call(h, "key")) {
|
|
456
|
-
var
|
|
457
|
-
if (
|
|
456
|
+
var m = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
457
|
+
if (m && m.isReactWarning)
|
|
458
458
|
return !1;
|
|
459
459
|
}
|
|
460
460
|
return h.key !== void 0;
|
|
461
461
|
}
|
|
462
|
-
function Wo(h,
|
|
463
|
-
if (typeof h.ref == "string" && Yt.current &&
|
|
464
|
-
var
|
|
465
|
-
Ze[
|
|
462
|
+
function Wo(h, m) {
|
|
463
|
+
if (typeof h.ref == "string" && Yt.current && m && Yt.current.stateNode !== m) {
|
|
464
|
+
var b = Z(Yt.current.type);
|
|
465
|
+
Ze[b] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(Yt.current.type), h.ref), Ze[b] = !0);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function $o(h,
|
|
468
|
+
function $o(h, m) {
|
|
469
469
|
{
|
|
470
|
-
var
|
|
471
|
-
Ti || (Ti = !0, y("%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://reactjs.org/link/special-props)",
|
|
470
|
+
var b = function() {
|
|
471
|
+
Ti || (Ti = !0, y("%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://reactjs.org/link/special-props)", m));
|
|
472
472
|
};
|
|
473
|
-
|
|
474
|
-
get:
|
|
473
|
+
b.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
474
|
+
get: b,
|
|
475
475
|
configurable: !0
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
function Ko(h,
|
|
479
|
+
function Ko(h, m) {
|
|
480
480
|
{
|
|
481
|
-
var
|
|
482
|
-
wi || (wi = !0, y("%s: `ref` 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://reactjs.org/link/special-props)",
|
|
481
|
+
var b = function() {
|
|
482
|
+
wi || (wi = !0, y("%s: `ref` 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://reactjs.org/link/special-props)", m));
|
|
483
483
|
};
|
|
484
|
-
|
|
485
|
-
get:
|
|
484
|
+
b.isReactWarning = !0, Object.defineProperty(h, "ref", {
|
|
485
|
+
get: b,
|
|
486
486
|
configurable: !0
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
var Go = function(h,
|
|
490
|
+
var Go = function(h, m, b, C, k, O, E) {
|
|
491
491
|
var V = {
|
|
492
492
|
// This tag allows us to uniquely identify this as a React Element
|
|
493
493
|
$$typeof: e,
|
|
494
494
|
// Built-in properties that belong on the element
|
|
495
495
|
type: h,
|
|
496
|
-
key:
|
|
497
|
-
ref:
|
|
496
|
+
key: m,
|
|
497
|
+
ref: b,
|
|
498
498
|
props: E,
|
|
499
499
|
// Record the component responsible for creating this element.
|
|
500
500
|
_owner: O
|
|
@@ -516,12 +516,12 @@ function ga() {
|
|
|
516
516
|
value: k
|
|
517
517
|
}), Object.freeze && (Object.freeze(V.props), Object.freeze(V)), V;
|
|
518
518
|
};
|
|
519
|
-
function Ho(h,
|
|
519
|
+
function Ho(h, m, b, C, k) {
|
|
520
520
|
{
|
|
521
521
|
var O, E = {}, V = null, X = null;
|
|
522
|
-
|
|
523
|
-
for (O in
|
|
524
|
-
zt.call(
|
|
522
|
+
b !== void 0 && (bi(b), V = "" + b), Uo(m) && (bi(m.key), V = "" + m.key), No(m) && (X = m.ref, Wo(m, k));
|
|
523
|
+
for (O in m)
|
|
524
|
+
zt.call(m, O) && !Io.hasOwnProperty(O) && (E[O] = m[O]);
|
|
525
525
|
if (h && h.defaultProps) {
|
|
526
526
|
var B = h.defaultProps;
|
|
527
527
|
for (O in B)
|
|
@@ -537,8 +537,8 @@ function ga() {
|
|
|
537
537
|
var Je = P.ReactCurrentOwner, Si = P.ReactDebugCurrentFrame;
|
|
538
538
|
function jt(h) {
|
|
539
539
|
if (h) {
|
|
540
|
-
var
|
|
541
|
-
Si.setExtraStackFrame(
|
|
540
|
+
var m = h._owner, b = xe(h.type, h._source, m ? m.type : null);
|
|
541
|
+
Si.setExtraStackFrame(b);
|
|
542
542
|
} else
|
|
543
543
|
Si.setExtraStackFrame(null);
|
|
544
544
|
}
|
|
@@ -562,10 +562,10 @@ Check the render method of \`` + h + "`.";
|
|
|
562
562
|
function zo(h) {
|
|
563
563
|
{
|
|
564
564
|
if (h !== void 0) {
|
|
565
|
-
var
|
|
565
|
+
var m = h.fileName.replace(/^.*[\\\/]/, ""), b = h.lineNumber;
|
|
566
566
|
return `
|
|
567
567
|
|
|
568
|
-
Check your code at ` +
|
|
568
|
+
Check your code at ` + m + ":" + b + ".";
|
|
569
569
|
}
|
|
570
570
|
return "";
|
|
571
571
|
}
|
|
@@ -573,77 +573,77 @@ Check your code at ` + g + ":" + T + ".";
|
|
|
573
573
|
var Ai = {};
|
|
574
574
|
function Yo(h) {
|
|
575
575
|
{
|
|
576
|
-
var
|
|
577
|
-
if (!
|
|
578
|
-
var
|
|
579
|
-
|
|
576
|
+
var m = Ci();
|
|
577
|
+
if (!m) {
|
|
578
|
+
var b = typeof h == "string" ? h : h.displayName || h.name;
|
|
579
|
+
b && (m = `
|
|
580
580
|
|
|
581
|
-
Check the top-level render call using <` +
|
|
581
|
+
Check the top-level render call using <` + b + ">.");
|
|
582
582
|
}
|
|
583
|
-
return
|
|
583
|
+
return m;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function Ri(h,
|
|
586
|
+
function Ri(h, m) {
|
|
587
587
|
{
|
|
588
588
|
if (!h._store || h._store.validated || h.key != null)
|
|
589
589
|
return;
|
|
590
590
|
h._store.validated = !0;
|
|
591
|
-
var
|
|
592
|
-
if (Ai[
|
|
591
|
+
var b = Yo(m);
|
|
592
|
+
if (Ai[b])
|
|
593
593
|
return;
|
|
594
|
-
Ai[
|
|
594
|
+
Ai[b] = !0;
|
|
595
595
|
var C = "";
|
|
596
|
-
h && h._owner && h._owner !== Je.current && (C = " It was passed a child from " + Z(h._owner.type) + "."), jt(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',
|
|
596
|
+
h && h._owner && h._owner !== Je.current && (C = " It was passed a child from " + Z(h._owner.type) + "."), jt(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, C), jt(null);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function Vi(h,
|
|
599
|
+
function Vi(h, m) {
|
|
600
600
|
{
|
|
601
601
|
if (typeof h != "object")
|
|
602
602
|
return;
|
|
603
603
|
if (qe(h))
|
|
604
|
-
for (var
|
|
605
|
-
var C = h[
|
|
606
|
-
tn(C) && Ri(C,
|
|
604
|
+
for (var b = 0; b < h.length; b++) {
|
|
605
|
+
var C = h[b];
|
|
606
|
+
tn(C) && Ri(C, m);
|
|
607
607
|
}
|
|
608
608
|
else if (tn(h))
|
|
609
609
|
h._store && (h._store.validated = !0);
|
|
610
610
|
else if (h) {
|
|
611
|
-
var k =
|
|
611
|
+
var k = T(h);
|
|
612
612
|
if (typeof k == "function" && k !== h.entries)
|
|
613
613
|
for (var O = k.call(h), E; !(E = O.next()).done; )
|
|
614
|
-
tn(E.value) && Ri(E.value,
|
|
614
|
+
tn(E.value) && Ri(E.value, m);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
function Xo(h) {
|
|
619
619
|
{
|
|
620
|
-
var
|
|
621
|
-
if (
|
|
620
|
+
var m = h.type;
|
|
621
|
+
if (m == null || typeof m == "string")
|
|
622
622
|
return;
|
|
623
|
-
var
|
|
624
|
-
if (typeof
|
|
625
|
-
|
|
626
|
-
else if (typeof
|
|
623
|
+
var b;
|
|
624
|
+
if (typeof m == "function")
|
|
625
|
+
b = m.propTypes;
|
|
626
|
+
else if (typeof m == "object" && (m.$$typeof === l || // Note: Memo only checks outer props here.
|
|
627
627
|
// Inner props are checked in the reconciler.
|
|
628
|
-
|
|
629
|
-
|
|
628
|
+
m.$$typeof === f))
|
|
629
|
+
b = m.propTypes;
|
|
630
630
|
else
|
|
631
631
|
return;
|
|
632
|
-
if (
|
|
633
|
-
var C = Z(
|
|
634
|
-
jo(
|
|
635
|
-
} else if (
|
|
632
|
+
if (b) {
|
|
633
|
+
var C = Z(m);
|
|
634
|
+
jo(b, h.props, "prop", C, h);
|
|
635
|
+
} else if (m.PropTypes !== void 0 && !Qe) {
|
|
636
636
|
Qe = !0;
|
|
637
|
-
var k = Z(
|
|
637
|
+
var k = Z(m);
|
|
638
638
|
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
|
|
639
639
|
}
|
|
640
|
-
typeof
|
|
640
|
+
typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
function qo(h) {
|
|
644
644
|
{
|
|
645
|
-
for (var
|
|
646
|
-
var C =
|
|
645
|
+
for (var m = Object.keys(h.props), b = 0; b < m.length; b++) {
|
|
646
|
+
var C = m[b];
|
|
647
647
|
if (C !== "children" && C !== "key") {
|
|
648
648
|
jt(h), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), jt(null);
|
|
649
649
|
break;
|
|
@@ -653,7 +653,7 @@ Check the top-level render call using <` + T + ">.");
|
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
var Ei = {};
|
|
656
|
-
function Di(h,
|
|
656
|
+
function Di(h, m, b, C, k, O) {
|
|
657
657
|
{
|
|
658
658
|
var E = H(h);
|
|
659
659
|
if (!E) {
|
|
@@ -664,11 +664,11 @@ Check the top-level render call using <` + T + ">.");
|
|
|
664
664
|
var B;
|
|
665
665
|
h === null ? B = "null" : qe(h) ? B = "array" : h !== void 0 && h.$$typeof === e ? (B = "<" + (Z(h.type) || "Unknown") + " />", V = " Did you accidentally export a JSX literal instead of a component?") : B = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, V);
|
|
666
666
|
}
|
|
667
|
-
var N = Ho(h,
|
|
667
|
+
var N = Ho(h, m, b, k, O);
|
|
668
668
|
if (N == null)
|
|
669
669
|
return N;
|
|
670
670
|
if (E) {
|
|
671
|
-
var tt =
|
|
671
|
+
var tt = m.children;
|
|
672
672
|
if (tt !== void 0)
|
|
673
673
|
if (C)
|
|
674
674
|
if (qe(tt)) {
|
|
@@ -680,8 +680,8 @@ Check the top-level render call using <` + T + ">.");
|
|
|
680
680
|
else
|
|
681
681
|
Vi(tt, h);
|
|
682
682
|
}
|
|
683
|
-
if (zt.call(
|
|
684
|
-
var St = Z(h), J = Object.keys(
|
|
683
|
+
if (zt.call(m, "key")) {
|
|
684
|
+
var St = Z(h), J = Object.keys(m).filter(function(na) {
|
|
685
685
|
return na !== "key";
|
|
686
686
|
}), en = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
687
687
|
if (!Ei[St + en]) {
|
|
@@ -697,11 +697,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
697
697
|
return h === i ? qo(N) : Xo(N), N;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
function Zo(h,
|
|
701
|
-
return Di(h,
|
|
700
|
+
function Zo(h, m, b) {
|
|
701
|
+
return Di(h, m, b, !0);
|
|
702
702
|
}
|
|
703
|
-
function Jo(h,
|
|
704
|
-
return Di(h,
|
|
703
|
+
function Jo(h, m, b) {
|
|
704
|
+
return Di(h, m, b, !1);
|
|
705
705
|
}
|
|
706
706
|
var Qo = Jo, ta = Zo;
|
|
707
707
|
qt.Fragment = i, qt.jsx = Qo, qt.jsxs = ta;
|
|
@@ -805,12 +805,12 @@ function rr(t, e) {
|
|
|
805
805
|
}, o = () => n = !0, r = Te.reduce((P, y) => (P[y] = ba(o), P), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: f, postRender: d } = r, p = () => {
|
|
806
806
|
const P = performance.now();
|
|
807
807
|
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(P - s.timestamp, Ta), 1), s.timestamp = P, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), f.process(s), d.process(s), s.isProcessing = !1, n && e && (i = !1, t(p));
|
|
808
|
-
},
|
|
808
|
+
}, g = () => {
|
|
809
809
|
n = !0, i = !0, s.isProcessing || t(p);
|
|
810
810
|
};
|
|
811
811
|
return { schedule: Te.reduce((P, y) => {
|
|
812
|
-
const
|
|
813
|
-
return P[y] = (w, A = !1, j = !1) => (n ||
|
|
812
|
+
const x = r[y];
|
|
813
|
+
return P[y] = (w, A = !1, j = !1) => (n || g(), x.schedule(w, A, j)), P;
|
|
814
814
|
}, {}), cancel: (P) => {
|
|
815
815
|
for (let y = 0; y < Te.length; y++)
|
|
816
816
|
r[Te[y]].cancel(P);
|
|
@@ -971,8 +971,8 @@ function Ma({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
971
971
|
}, { isStatic: f } = u, d = Va(a), p = i(a, f);
|
|
972
972
|
if (!f && _n) {
|
|
973
973
|
La(u, t);
|
|
974
|
-
const
|
|
975
|
-
c =
|
|
974
|
+
const g = Oa(u);
|
|
975
|
+
c = g.MeasureLayout, d.visualElement = wa(s, p, u, e, g.ProjectionNode);
|
|
976
976
|
}
|
|
977
977
|
return _.jsxs(Be.Provider, { value: d, children: [c && d.visualElement ? _.jsx(c, { visualElement: d.visualElement, ...u }) : null, n(s, a, Aa(p, d.visualElement, l), p, f, d.visualElement)] });
|
|
978
978
|
}
|
|
@@ -1343,8 +1343,8 @@ function Yn(t, {
|
|
|
1343
1343
|
return;
|
|
1344
1344
|
}
|
|
1345
1345
|
t.attrs = t.style, t.style = {};
|
|
1346
|
-
const { attrs: d, style: p, dimensions:
|
|
1347
|
-
d.transform && (
|
|
1346
|
+
const { attrs: d, style: p, dimensions: g } = t;
|
|
1347
|
+
d.transform && (g && (p.transform = d.transform), delete d.transform), g && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin = tl(g, s !== void 0 ? s : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), i !== void 0 && (d.scale = i), r !== void 0 && il(d, r, a, l, !1);
|
|
1348
1348
|
}
|
|
1349
1349
|
const mr = () => ({
|
|
1350
1350
|
...zn(),
|
|
@@ -1500,27 +1500,27 @@ function Ni(t, e, n) {
|
|
|
1500
1500
|
function ul(t, e, n, i, s) {
|
|
1501
1501
|
var o;
|
|
1502
1502
|
const r = {}, a = [], l = i && ((o = t.style) === null || o === void 0 ? void 0 : o.willChange) === void 0, c = s(t, {});
|
|
1503
|
-
for (const
|
|
1504
|
-
r[
|
|
1503
|
+
for (const T in c)
|
|
1504
|
+
r[T] = Re(c[T]);
|
|
1505
1505
|
let { initial: u, animate: f } = t;
|
|
1506
1506
|
const d = Ue(t), p = lr(t);
|
|
1507
1507
|
e && p && !d && t.inherit !== !1 && (u === void 0 && (u = e.initial), f === void 0 && (f = e.animate));
|
|
1508
|
-
let
|
|
1509
|
-
|
|
1510
|
-
const
|
|
1511
|
-
return
|
|
1512
|
-
for (const y in
|
|
1513
|
-
let
|
|
1514
|
-
if (Array.isArray(
|
|
1515
|
-
const w =
|
|
1516
|
-
|
|
1508
|
+
let g = n ? n.initial === !1 : !1;
|
|
1509
|
+
g = g || u === !1;
|
|
1510
|
+
const v = g ? f : u;
|
|
1511
|
+
return v && typeof v != "boolean" && !ae(v) && Ni(t, v, (T, P) => {
|
|
1512
|
+
for (const y in T) {
|
|
1513
|
+
let x = T[y];
|
|
1514
|
+
if (Array.isArray(x)) {
|
|
1515
|
+
const w = g ? x.length - 1 : 0;
|
|
1516
|
+
x = x[w];
|
|
1517
1517
|
}
|
|
1518
|
-
|
|
1518
|
+
x !== null && (r[y] = x);
|
|
1519
1519
|
}
|
|
1520
1520
|
for (const y in P)
|
|
1521
1521
|
r[y] = P[y];
|
|
1522
|
-
}), l && (f && u !== !1 && !ae(f) && Ni(t, f, (
|
|
1523
|
-
for (const P in
|
|
1522
|
+
}), l && (f && u !== !1 && !ae(f) && Ni(t, f, (T) => {
|
|
1523
|
+
for (const P in T)
|
|
1524
1524
|
cl(a, P);
|
|
1525
1525
|
}), a.length && (r.willChange = a.join(","))), r;
|
|
1526
1526
|
}
|
|
@@ -2271,11 +2271,11 @@ function fc({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
|
|
|
2271
2271
|
Gt(t <= ht(qi), "Spring duration must be 10 seconds or less");
|
|
2272
2272
|
let r = 1 - e;
|
|
2273
2273
|
r = Pt(cc, uc, r), t = Pt(lc, qi, dt(t)), r < 1 ? (s = (c) => {
|
|
2274
|
-
const u = c * r, f = u * t, d = u - n, p = Sn(c, r),
|
|
2275
|
-
return an - d / p *
|
|
2274
|
+
const u = c * r, f = u * t, d = u - n, p = Sn(c, r), g = Math.exp(-f);
|
|
2275
|
+
return an - d / p * g;
|
|
2276
2276
|
}, o = (c) => {
|
|
2277
|
-
const f = c * r * t, d = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t,
|
|
2278
|
-
return (-s(c) + an > 0 ? -1 : 1) * ((d - p) *
|
|
2277
|
+
const f = c * r * t, d = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-f), v = Sn(Math.pow(c, 2), r);
|
|
2278
|
+
return (-s(c) + an > 0 ? -1 : 1) * ((d - p) * g) / v;
|
|
2279
2279
|
}) : (s = (c) => {
|
|
2280
2280
|
const u = Math.exp(-c * t), f = (c - n) * t + 1;
|
|
2281
2281
|
return -an + u * f;
|
|
@@ -2336,33 +2336,33 @@ function zr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
|
2336
2336
|
const s = t[0], o = t[t.length - 1], r = { done: !1, value: s }, { stiffness: a, damping: l, mass: c, duration: u, velocity: f, isResolvedFromDuration: d } = gc({
|
|
2337
2337
|
...i,
|
|
2338
2338
|
velocity: -dt(i.velocity || 0)
|
|
2339
|
-
}), p = f || 0,
|
|
2339
|
+
}), p = f || 0, g = l / (2 * Math.sqrt(a * c)), v = o - s, T = dt(Math.sqrt(a / c)), P = Math.abs(v) < 5;
|
|
2340
2340
|
n || (n = P ? 0.01 : 2), e || (e = P ? 5e-3 : 0.5);
|
|
2341
2341
|
let y;
|
|
2342
|
-
if (
|
|
2343
|
-
const
|
|
2342
|
+
if (g < 1) {
|
|
2343
|
+
const x = Sn(T, g);
|
|
2344
2344
|
y = (w) => {
|
|
2345
|
-
const A = Math.exp(-
|
|
2346
|
-
return o - A * ((p +
|
|
2345
|
+
const A = Math.exp(-g * T * w);
|
|
2346
|
+
return o - A * ((p + g * T * v) / x * Math.sin(x * w) + v * Math.cos(x * w));
|
|
2347
2347
|
};
|
|
2348
|
-
} else if (
|
|
2349
|
-
y = (
|
|
2348
|
+
} else if (g === 1)
|
|
2349
|
+
y = (x) => o - Math.exp(-T * x) * (v + (p + T * v) * x);
|
|
2350
2350
|
else {
|
|
2351
|
-
const
|
|
2351
|
+
const x = T * Math.sqrt(g * g - 1);
|
|
2352
2352
|
y = (w) => {
|
|
2353
|
-
const A = Math.exp(-
|
|
2354
|
-
return o - A * ((p +
|
|
2353
|
+
const A = Math.exp(-g * T * w), j = Math.min(x * w, 300);
|
|
2354
|
+
return o - A * ((p + g * T * v) * Math.sinh(j) + x * v * Math.cosh(j)) / x;
|
|
2355
2355
|
};
|
|
2356
2356
|
}
|
|
2357
2357
|
return {
|
|
2358
2358
|
calculatedDuration: d && u || null,
|
|
2359
|
-
next: (
|
|
2360
|
-
const w = y(
|
|
2359
|
+
next: (x) => {
|
|
2360
|
+
const w = y(x);
|
|
2361
2361
|
if (d)
|
|
2362
|
-
r.done =
|
|
2362
|
+
r.done = x >= u;
|
|
2363
2363
|
else {
|
|
2364
2364
|
let A = p;
|
|
2365
|
-
|
|
2365
|
+
x !== 0 && (g < 1 ? A = Hr(y, x, w) : A = 0);
|
|
2366
2366
|
const j = Math.abs(A) <= n, q = Math.abs(o - w) <= e;
|
|
2367
2367
|
r.done = j && q;
|
|
2368
2368
|
}
|
|
@@ -2374,19 +2374,19 @@ function Ji({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2374
2374
|
const f = t[0], d = {
|
|
2375
2375
|
done: !1,
|
|
2376
2376
|
value: f
|
|
2377
|
-
}, p = (R) => a !== void 0 && R < a || l !== void 0 && R > l,
|
|
2378
|
-
let
|
|
2379
|
-
const
|
|
2380
|
-
P !==
|
|
2381
|
-
const y = (R) => -
|
|
2382
|
-
const W = y(R), H =
|
|
2377
|
+
}, p = (R) => a !== void 0 && R < a || l !== void 0 && R > l, g = (R) => a === void 0 ? l : l === void 0 || Math.abs(a - R) < Math.abs(l - R) ? a : l;
|
|
2378
|
+
let v = n * e;
|
|
2379
|
+
const T = f + v, P = r === void 0 ? T : r(T);
|
|
2380
|
+
P !== T && (v = P - f);
|
|
2381
|
+
const y = (R) => -v * Math.exp(-R / i), x = (R) => P + y(R), w = (R) => {
|
|
2382
|
+
const W = y(R), H = x(R);
|
|
2383
2383
|
d.done = Math.abs(W) <= c, d.value = d.done ? P : H;
|
|
2384
2384
|
};
|
|
2385
2385
|
let A, j;
|
|
2386
2386
|
const q = (R) => {
|
|
2387
2387
|
p(d.value) && (A = R, j = zr({
|
|
2388
|
-
keyframes: [d.value,
|
|
2389
|
-
velocity: Hr(
|
|
2388
|
+
keyframes: [d.value, g(d.value)],
|
|
2389
|
+
velocity: Hr(x, R, d.value),
|
|
2390
2390
|
// TODO: This should be passing * 1000
|
|
2391
2391
|
damping: s,
|
|
2392
2392
|
stiffness: o,
|
|
@@ -2658,22 +2658,22 @@ class oi extends Kr {
|
|
|
2658
2658
|
const { finalKeyframe: s, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: f } = i;
|
|
2659
2659
|
if (this.startTime === null)
|
|
2660
2660
|
return o.next(0);
|
|
2661
|
-
const { delay: d, repeat: p, repeatType:
|
|
2661
|
+
const { delay: d, repeat: p, repeatType: g, repeatDelay: v, onUpdate: T } = this.options;
|
|
2662
2662
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - u / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
2663
2663
|
const P = this.currentTime - d * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? P < 0 : P > u;
|
|
2664
2664
|
this.currentTime = Math.max(P, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
|
|
2665
|
-
let
|
|
2665
|
+
let x = this.currentTime, w = o;
|
|
2666
2666
|
if (p) {
|
|
2667
2667
|
const R = Math.min(this.currentTime, u) / f;
|
|
2668
2668
|
let W = Math.floor(R), H = R % 1;
|
|
2669
|
-
!H && R >= 1 && (H = 1), H === 1 && W--, W = Math.min(W, p + 1), !!(W % 2) && (
|
|
2669
|
+
!H && R >= 1 && (H = 1), H === 1 && W--, W = Math.min(W, p + 1), !!(W % 2) && (g === "reverse" ? (H = 1 - H, v && (H -= v / f)) : g === "mirror" && (w = r)), x = Pt(0, 1, H) * f;
|
|
2670
2670
|
}
|
|
2671
|
-
const A = y ? { done: !1, value: l[0] } : w.next(
|
|
2671
|
+
const A = y ? { done: !1, value: l[0] } : w.next(x);
|
|
2672
2672
|
a && (A.value = a(A.value));
|
|
2673
2673
|
let { done: j } = A;
|
|
2674
2674
|
!y && c !== null && (j = this.speed >= 0 ? this.currentTime >= u : this.currentTime <= 0);
|
|
2675
2675
|
const q = this.holdTime === null && (this.state === "finished" || this.state === "running" && j);
|
|
2676
|
-
return q && s !== void 0 && (A.value = He(l, this.options, s)),
|
|
2676
|
+
return q && s !== void 0 && (A.value = He(l, this.options, s)), T && T(A.value), q && this.finish(), A;
|
|
2677
2677
|
}
|
|
2678
2678
|
get duration() {
|
|
2679
2679
|
const { resolved: e } = this;
|
|
@@ -2804,8 +2804,8 @@ class ss extends Kr {
|
|
|
2804
2804
|
if (!(!((i = l.owner) === null || i === void 0) && i.current))
|
|
2805
2805
|
return !1;
|
|
2806
2806
|
if (Yc(this.options)) {
|
|
2807
|
-
const { onComplete: f, onUpdate: d, motionValue: p, ...
|
|
2808
|
-
e =
|
|
2807
|
+
const { onComplete: f, onUpdate: d, motionValue: p, ...g } = this.options, v = Xc(e, g);
|
|
2808
|
+
e = v.keyframes, e.length === 1 && (e[1] = e[0]), s = v.duration, o = v.times, r = v.ease, a = "keyframes";
|
|
2809
2809
|
}
|
|
2810
2810
|
const u = Gc(l.owner.current, c, e, { ...this.options, duration: s, times: o, ease: r });
|
|
2811
2811
|
return u.startTime = vt.now(), this.pendingTimeline ? (u.timeline = this.pendingTimeline, this.pendingTimeline = void 0) : u.onfinish = () => {
|
|
@@ -2913,8 +2913,8 @@ class ss extends Kr {
|
|
|
2913
2913
|
ease: r,
|
|
2914
2914
|
times: a,
|
|
2915
2915
|
isGenerator: !0
|
|
2916
|
-
}),
|
|
2917
|
-
c.setWithVelocity(p.sample(
|
|
2916
|
+
}), g = ht(this.time);
|
|
2917
|
+
c.setWithVelocity(p.sample(g - Fe).value, p.sample(g).value, Fe);
|
|
2918
2918
|
}
|
|
2919
2919
|
const { onStop: l } = this.options;
|
|
2920
2920
|
l && l(), this.cancel();
|
|
@@ -3335,22 +3335,22 @@ function ao(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3335
3335
|
const d = t.getValue(f, (o = t.latestValues[f]) !== null && o !== void 0 ? o : null), p = l[f];
|
|
3336
3336
|
if (p === void 0 || u && su(u, f))
|
|
3337
3337
|
continue;
|
|
3338
|
-
const
|
|
3338
|
+
const g = {
|
|
3339
3339
|
delay: n,
|
|
3340
3340
|
elapsed: 0,
|
|
3341
3341
|
...Qn(r || {}, f)
|
|
3342
3342
|
};
|
|
3343
|
-
let
|
|
3343
|
+
let v = !1;
|
|
3344
3344
|
if (window.HandoffAppearAnimations) {
|
|
3345
3345
|
const P = oo(t);
|
|
3346
3346
|
if (P) {
|
|
3347
3347
|
const y = window.HandoffAppearAnimations(P, f, d, L);
|
|
3348
|
-
y !== null && (
|
|
3348
|
+
y !== null && (g.elapsed = y, v = !0);
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
|
-
d.start(li(f, d, p, t.shouldReduceMotion && bt.has(f) ? { type: !1 } :
|
|
3352
|
-
const
|
|
3353
|
-
|
|
3351
|
+
d.start(li(f, d, p, t.shouldReduceMotion && bt.has(f) ? { type: !1 } : g, t, v, An(t, f)));
|
|
3352
|
+
const T = d.animation;
|
|
3353
|
+
T && c.push(T);
|
|
3354
3354
|
}
|
|
3355
3355
|
return a && Promise.all(c).then(() => {
|
|
3356
3356
|
L.update(() => {
|
|
@@ -3411,8 +3411,8 @@ function fu(t) {
|
|
|
3411
3411
|
var f;
|
|
3412
3412
|
const d = Ge(t, u, l === "exit" ? (f = t.presenceContext) === null || f === void 0 ? void 0 : f.custom : void 0);
|
|
3413
3413
|
if (d) {
|
|
3414
|
-
const { transition: p, transitionEnd:
|
|
3415
|
-
c = { ...c, ...
|
|
3414
|
+
const { transition: p, transitionEnd: g, ...v } = d;
|
|
3415
|
+
c = { ...c, ...v, ...g };
|
|
3416
3416
|
}
|
|
3417
3417
|
return c;
|
|
3418
3418
|
};
|
|
@@ -3421,20 +3421,20 @@ function fu(t) {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
function r(l) {
|
|
3423
3423
|
const c = t.getProps(), u = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
3424
|
-
let p = {},
|
|
3425
|
-
for (let
|
|
3426
|
-
const P = lu[
|
|
3427
|
-
A === !1 && (
|
|
3428
|
-
let j =
|
|
3424
|
+
let p = {}, g = 1 / 0;
|
|
3425
|
+
for (let T = 0; T < cu; T++) {
|
|
3426
|
+
const P = lu[T], y = n[P], x = c[P] !== void 0 ? c[P] : u[P], w = oe(x), A = P === l ? y.isActive : null;
|
|
3427
|
+
A === !1 && (g = T);
|
|
3428
|
+
let j = x === u[P] && x !== c[P] && w;
|
|
3429
3429
|
if (j && i && t.manuallyAnimateOnMount && (j = !1), y.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3430
3430
|
!y.isActive && A === null || // If we didn't and don't have any defined prop for this animation type
|
|
3431
|
-
!
|
|
3432
|
-
ae(
|
|
3431
|
+
!x && !y.prevProp || // Or if the prop doesn't define an animation
|
|
3432
|
+
ae(x) || typeof x == "boolean")
|
|
3433
3433
|
continue;
|
|
3434
|
-
let R = hu(y.prevProp,
|
|
3434
|
+
let R = hu(y.prevProp, x) || // If we're making this variant active, we want to always make it active
|
|
3435
3435
|
P === l && y.isActive && !j && w || // If we removed a higher-priority variant (i is in reverse order)
|
|
3436
|
-
|
|
3437
|
-
const H = Array.isArray(
|
|
3436
|
+
T > g && w, W = !1;
|
|
3437
|
+
const H = Array.isArray(x) ? x : [x];
|
|
3438
3438
|
let rt = H.reduce(s(P), {});
|
|
3439
3439
|
A === !1 && (rt = {});
|
|
3440
3440
|
const { prevResolvedValues: wt = {} } = y, Z = {
|
|
@@ -3452,20 +3452,20 @@ function fu(t) {
|
|
|
3452
3452
|
let Ot = !1;
|
|
3453
3453
|
vn(U) && vn(Lt) ? Ot = !Vr(U, Lt) : Ot = U !== Lt, Ot ? U != null ? M(D) : d.add(D) : U !== void 0 && d.has(D) ? M(D) : y.protectedKeys[D] = !0;
|
|
3454
3454
|
}
|
|
3455
|
-
y.prevProp =
|
|
3455
|
+
y.prevProp = x, y.prevResolvedValues = rt, y.isActive && (p = { ...p, ...rt }), i && t.blockInitialAnimation && (R = !1), R && (!j || W) && f.push(...H.map((D) => ({
|
|
3456
3456
|
animation: D,
|
|
3457
3457
|
options: { type: P }
|
|
3458
3458
|
})));
|
|
3459
3459
|
}
|
|
3460
3460
|
if (d.size) {
|
|
3461
|
-
const
|
|
3461
|
+
const T = {};
|
|
3462
3462
|
d.forEach((P) => {
|
|
3463
|
-
const y = t.getBaseTarget(P),
|
|
3464
|
-
|
|
3465
|
-
}), f.push({ animation:
|
|
3463
|
+
const y = t.getBaseTarget(P), x = t.getValue(P);
|
|
3464
|
+
x && (x.liveStyle = !0), T[P] = y ?? null;
|
|
3465
|
+
}), f.push({ animation: T });
|
|
3466
3466
|
}
|
|
3467
|
-
let
|
|
3468
|
-
return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (
|
|
3467
|
+
let v = !!f.length;
|
|
3468
|
+
return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (v = !1), i = !1, v ? e(f) : Promise.resolve();
|
|
3469
3469
|
}
|
|
3470
3470
|
function a(l, c) {
|
|
3471
3471
|
var u;
|
|
@@ -3581,19 +3581,19 @@ class lo {
|
|
|
3581
3581
|
const f = fn(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, p = yu(f.offset, { x: 0, y: 0 }) >= 3;
|
|
3582
3582
|
if (!d && !p)
|
|
3583
3583
|
return;
|
|
3584
|
-
const { point:
|
|
3585
|
-
this.history.push({ ...
|
|
3586
|
-
const { onStart:
|
|
3587
|
-
d || (
|
|
3584
|
+
const { point: g } = f, { timestamp: v } = $;
|
|
3585
|
+
this.history.push({ ...g, timestamp: v });
|
|
3586
|
+
const { onStart: T, onMove: P } = this.handlers;
|
|
3587
|
+
d || (T && T(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), P && P(this.lastMoveEvent, f);
|
|
3588
3588
|
}, this.handlePointerMove = (f, d) => {
|
|
3589
3589
|
this.lastMoveEvent = f, this.lastMoveEventInfo = un(d, this.transformPagePoint), L.update(this.updatePoint, !0);
|
|
3590
3590
|
}, this.handlePointerUp = (f, d) => {
|
|
3591
3591
|
this.end();
|
|
3592
|
-
const { onEnd: p, onSessionEnd:
|
|
3593
|
-
if (this.dragSnapToOrigin &&
|
|
3592
|
+
const { onEnd: p, onSessionEnd: g, resumeAnimation: v } = this.handlers;
|
|
3593
|
+
if (this.dragSnapToOrigin && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3594
3594
|
return;
|
|
3595
|
-
const
|
|
3596
|
-
this.startEvent && p && p(f,
|
|
3595
|
+
const T = fn(f.type === "pointercancel" ? this.lastMoveEventInfo : un(d, this.transformPagePoint), this.history);
|
|
3596
|
+
this.startEvent && p && p(f, T), g && g(f, T);
|
|
3597
3597
|
}, !wr(e))
|
|
3598
3598
|
return;
|
|
3599
3599
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
|
|
@@ -3833,32 +3833,32 @@ class _u {
|
|
|
3833
3833
|
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(Ke(u, "page").point);
|
|
3834
3834
|
}, o = (u, f) => {
|
|
3835
3835
|
var d;
|
|
3836
|
-
const { drag: p, dragPropagation:
|
|
3837
|
-
if (p && !
|
|
3836
|
+
const { drag: p, dragPropagation: g, onDragStart: v } = this.getProps();
|
|
3837
|
+
if (p && !g && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Cr(p), !this.openGlobalLock))
|
|
3838
3838
|
return;
|
|
3839
3839
|
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((P) => {
|
|
3840
3840
|
let y = this.getAxisMotionValue(P).get() || 0;
|
|
3841
3841
|
if (ot.test(y)) {
|
|
3842
|
-
const { projection:
|
|
3843
|
-
if (
|
|
3844
|
-
const w =
|
|
3842
|
+
const { projection: x } = this.visualElement;
|
|
3843
|
+
if (x && x.layout) {
|
|
3844
|
+
const w = x.layout.layoutBox[P];
|
|
3845
3845
|
w && (y = Q(w) * (parseFloat(y) / 100));
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
3848
|
this.originPoint[P] = y;
|
|
3849
|
-
}),
|
|
3850
|
-
const { animationState:
|
|
3851
|
-
|
|
3849
|
+
}), v && L.postRender(() => v(u, f)), (d = this.removeWillChange) === null || d === void 0 || d.call(this), this.removeWillChange = An(this.visualElement, "transform");
|
|
3850
|
+
const { animationState: T } = this.visualElement;
|
|
3851
|
+
T && T.setActive("whileDrag", !0);
|
|
3852
3852
|
}, r = (u, f) => {
|
|
3853
|
-
const { dragPropagation: d, dragDirectionLock: p, onDirectionLock:
|
|
3853
|
+
const { dragPropagation: d, dragDirectionLock: p, onDirectionLock: g, onDrag: v } = this.getProps();
|
|
3854
3854
|
if (!d && !this.openGlobalLock)
|
|
3855
3855
|
return;
|
|
3856
|
-
const { offset:
|
|
3856
|
+
const { offset: T } = f;
|
|
3857
3857
|
if (p && this.currentDirection === null) {
|
|
3858
|
-
this.currentDirection = Bu(
|
|
3858
|
+
this.currentDirection = Bu(T), this.currentDirection !== null && g && g(this.currentDirection);
|
|
3859
3859
|
return;
|
|
3860
3860
|
}
|
|
3861
|
-
this.updateAxis("x", f.point,
|
|
3861
|
+
this.updateAxis("x", f.point, T), this.updateAxis("y", f.point, T), this.visualElement.render(), v && v(u, f);
|
|
3862
3862
|
}, a = (u, f) => this.stop(u, f), l = () => nt((u) => {
|
|
3863
3863
|
var f;
|
|
3864
3864
|
return this.getAnimationState(u) === "paused" && ((f = this.getAxisMotionValue(u).animation) === null || f === void 0 ? void 0 : f.play());
|
|
@@ -3931,7 +3931,7 @@ class _u {
|
|
|
3931
3931
|
return;
|
|
3932
3932
|
let f = l && l[u] || {};
|
|
3933
3933
|
r && (f = { min: 0, max: 0 });
|
|
3934
|
-
const d = s ? 200 : 1e6, p = s ? 40 : 1e7,
|
|
3934
|
+
const d = s ? 200 : 1e6, p = s ? 40 : 1e7, g = {
|
|
3935
3935
|
type: "inertia",
|
|
3936
3936
|
velocity: i ? e[u] : 0,
|
|
3937
3937
|
bounceStiffness: d,
|
|
@@ -3942,7 +3942,7 @@ class _u {
|
|
|
3942
3942
|
...o,
|
|
3943
3943
|
...f
|
|
3944
3944
|
};
|
|
3945
|
-
return this.startAxisValueAnimation(u,
|
|
3945
|
+
return this.startAxisValueAnimation(u, g);
|
|
3946
3946
|
});
|
|
3947
3947
|
return Promise.all(c).then(a);
|
|
3948
3948
|
}
|
|
@@ -4338,8 +4338,8 @@ function tf(t, e, n) {
|
|
|
4338
4338
|
let i = "";
|
|
4339
4339
|
const s = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
|
|
4340
4340
|
if ((s || o || r) && (i = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (i += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
4341
|
-
const { transformPerspective: c, rotate: u, rotateX: f, rotateY: d, skewX: p, skewY:
|
|
4342
|
-
c && (i = `perspective(${c}px) ${i}`), u && (i += `rotate(${u}deg) `), f && (i += `rotateX(${f}deg) `), d && (i += `rotateY(${d}deg) `), p && (i += `skewX(${p}deg) `),
|
|
4341
|
+
const { transformPerspective: c, rotate: u, rotateX: f, rotateY: d, skewX: p, skewY: g } = n;
|
|
4342
|
+
c && (i = `perspective(${c}px) ${i}`), u && (i += `rotate(${u}deg) `), f && (i += `rotateX(${f}deg) `), d && (i += `rotateY(${d}deg) `), p && (i += `skewX(${p}deg) `), g && (i += `skewY(${g}deg) `);
|
|
4343
4343
|
}
|
|
4344
4344
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
4345
4345
|
return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
|
|
@@ -4427,23 +4427,23 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4427
4427
|
this.root.updateBlockedByResize = !0, f && f(), f = sf(d, 250), Ee.hasAnimatedSinceResize && (Ee.hasAnimatedSinceResize = !1, this.nodes.forEach(Us));
|
|
4428
4428
|
});
|
|
4429
4429
|
}
|
|
4430
|
-
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout:
|
|
4430
|
+
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout: g }) => {
|
|
4431
4431
|
if (this.isTreeAnimationBlocked()) {
|
|
4432
4432
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4433
4433
|
return;
|
|
4434
4434
|
}
|
|
4435
|
-
const
|
|
4436
|
-
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance ||
|
|
4437
|
-
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f,
|
|
4435
|
+
const v = this.options.transition || u.getDefaultTransition() || Tf, { onLayoutAnimationStart: T, onLayoutAnimationComplete: P } = u.getProps(), y = !this.targetLayout || !To(this.targetLayout, g) || p, x = !d && p;
|
|
4436
|
+
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || x || d && (y || !this.currentAnimation)) {
|
|
4437
|
+
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f, x);
|
|
4438
4438
|
const w = {
|
|
4439
|
-
...Qn(
|
|
4440
|
-
onPlay:
|
|
4439
|
+
...Qn(v, "layout"),
|
|
4440
|
+
onPlay: T,
|
|
4441
4441
|
onComplete: P
|
|
4442
4442
|
};
|
|
4443
4443
|
(u.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w);
|
|
4444
4444
|
} else
|
|
4445
4445
|
d || Us(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4446
|
-
this.targetLayout =
|
|
4446
|
+
this.targetLayout = g;
|
|
4447
4447
|
});
|
|
4448
4448
|
}
|
|
4449
4449
|
unmount() {
|
|
@@ -4666,12 +4666,12 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4666
4666
|
et(this.layoutCorrected, this.layout.layoutBox);
|
|
4667
4667
|
const d = this.treeScale.x, p = this.treeScale.y;
|
|
4668
4668
|
Ou(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = I());
|
|
4669
|
-
const { target:
|
|
4670
|
-
if (!
|
|
4669
|
+
const { target: g } = a;
|
|
4670
|
+
if (!g) {
|
|
4671
4671
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4672
4672
|
return;
|
|
4673
4673
|
}
|
|
4674
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Ds(this.prevProjectionDelta.x, this.projectionDelta.x), Ds(this.prevProjectionDelta.y, this.projectionDelta.y)), ie(this.projectionDelta, this.layoutCorrected,
|
|
4674
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Ds(this.prevProjectionDelta.x, this.projectionDelta.x), Ds(this.prevProjectionDelta.y, this.projectionDelta.y)), ie(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Bs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Bs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), te && Rt.recalculatedProjection++;
|
|
4675
4675
|
}
|
|
4676
4676
|
hide() {
|
|
4677
4677
|
this.isVisible = !1;
|
|
@@ -4693,12 +4693,12 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4693
4693
|
setAnimationOrigin(r, a = !1) {
|
|
4694
4694
|
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, f = Nt();
|
|
4695
4695
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4696
|
-
const d = I(), p = l ? l.source : void 0,
|
|
4696
|
+
const d = I(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, v = p !== g, T = this.getStack(), P = !T || T.members.length <= 1, y = !!(v && !P && this.options.crossfade === !0 && !this.path.some(bf));
|
|
4697
4697
|
this.animationProgress = 0;
|
|
4698
|
-
let
|
|
4698
|
+
let x;
|
|
4699
4699
|
this.mixTargetDelta = (w) => {
|
|
4700
4700
|
const A = w / 1e3;
|
|
4701
|
-
Ws(f.x, r.x, A), Ws(f.y, r.y, A), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (se(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), xf(this.relativeTarget, this.relativeTargetOrigin, d, A),
|
|
4701
|
+
Ws(f.x, r.x, A), Ws(f.y, r.y, A), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (se(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), xf(this.relativeTarget, this.relativeTargetOrigin, d, A), x && Ju(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = I()), et(x, this.relativeTarget)), v && (this.animationValues = u, Hu(u, c, this.latestValues, A, y, P)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
|
|
4702
4702
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4703
4703
|
}
|
|
4704
4704
|
startAnimation(r) {
|
|
@@ -4801,23 +4801,23 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4801
4801
|
return this.needsReset = !1, c.opacity = "", c.pointerEvents = Re(r == null ? void 0 : r.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4802
4802
|
const f = this.getLead();
|
|
4803
4803
|
if (!this.projectionDelta || !this.layout || !f.target) {
|
|
4804
|
-
const
|
|
4805
|
-
return this.options.layoutId && (
|
|
4804
|
+
const v = {};
|
|
4805
|
+
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents = Re(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !At(this.latestValues) && (v.transform = u ? u({}, "") : "none", this.hasProjected = !1), v;
|
|
4806
4806
|
}
|
|
4807
4807
|
const d = f.animationValues || f.latestValues;
|
|
4808
4808
|
this.applyTransformsToTarget(), c.transform = tf(this.projectionDeltaWithTransform, this.treeScale, d), u && (c.transform = u(d, c.transform));
|
|
4809
|
-
const { x: p, y:
|
|
4810
|
-
c.transformOrigin = `${p.origin * 100}% ${
|
|
4811
|
-
for (const
|
|
4812
|
-
if (d[
|
|
4809
|
+
const { x: p, y: g } = this.projectionDelta;
|
|
4810
|
+
c.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`, f.animationValues ? c.opacity = f === this ? (l = (a = d.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : c.opacity = f === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
|
|
4811
|
+
for (const v in ke) {
|
|
4812
|
+
if (d[v] === void 0)
|
|
4813
4813
|
continue;
|
|
4814
|
-
const { correct:
|
|
4814
|
+
const { correct: T, applyTo: P } = ke[v], y = c.transform === "none" ? d[v] : T(d[v], f);
|
|
4815
4815
|
if (P) {
|
|
4816
|
-
const
|
|
4817
|
-
for (let w = 0; w <
|
|
4816
|
+
const x = P.length;
|
|
4817
|
+
for (let w = 0; w < x; w++)
|
|
4818
4818
|
c[P[w]] = y;
|
|
4819
4819
|
} else
|
|
4820
|
-
c[
|
|
4820
|
+
c[v] = y;
|
|
4821
4821
|
}
|
|
4822
4822
|
return this.options.layoutId && (c.pointerEvents = f === this ? Re(r == null ? void 0 : r.pointerEvents) || "" : "none"), c;
|
|
4823
4823
|
}
|
|
@@ -4859,10 +4859,10 @@ function uf(t) {
|
|
|
4859
4859
|
if (f && !f.resumeFrom) {
|
|
4860
4860
|
const { snapshot: d, layout: p } = f;
|
|
4861
4861
|
if (d && p) {
|
|
4862
|
-
const
|
|
4863
|
-
se(
|
|
4864
|
-
const
|
|
4865
|
-
se(
|
|
4862
|
+
const g = I();
|
|
4863
|
+
se(g, n.layoutBox, d.layoutBox);
|
|
4864
|
+
const v = I();
|
|
4865
|
+
se(v, i, p.layoutBox), To(g, v) || (u = !0), f.options.layoutRoot && (t.relativeTarget = v, t.relativeTargetOrigin = g, t.relativeParent = f);
|
|
4866
4866
|
}
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
@@ -5027,7 +5027,7 @@ class kf {
|
|
|
5027
5027
|
return {};
|
|
5028
5028
|
}
|
|
5029
5029
|
constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
5030
|
-
this.applyWillChange = !1, this.resolveKeyframes = (d, p,
|
|
5030
|
+
this.applyWillChange = !1, this.resolveKeyframes = (d, p, g, v) => new this.KeyframeResolver(d, p, g, v, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ti, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
5031
5031
|
this.isRenderScheduled = !1, this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
5032
5032
|
}, this.isRenderScheduled = !1, this.scheduleRender = () => {
|
|
5033
5033
|
this.isRenderScheduled || (this.isRenderScheduled = !0, L.render(this.render, !1, !0));
|
|
@@ -5391,38 +5391,38 @@ function Xs(t) {
|
|
|
5391
5391
|
}
|
|
5392
5392
|
const Kf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
|
|
5393
5393
|
pt(!e, "Replace exitBeforeEnter with mode='wait'");
|
|
5394
|
-
const a = Mt(() => Xs(t), [t]), l = a.map(Ce), c = st(!0), u = st(a), f = Jn(() => /* @__PURE__ */ new Map()), [d, p] = _t(a), [
|
|
5394
|
+
const a = Mt(() => Xs(t), [t]), l = a.map(Ce), c = st(!0), u = st(a), f = Jn(() => /* @__PURE__ */ new Map()), [d, p] = _t(a), [g, v] = _t(a);
|
|
5395
5395
|
nr(() => {
|
|
5396
5396
|
c.current = !1, u.current = a;
|
|
5397
|
-
for (let y = 0; y <
|
|
5398
|
-
const
|
|
5399
|
-
l.includes(
|
|
5397
|
+
for (let y = 0; y < g.length; y++) {
|
|
5398
|
+
const x = Ce(g[y]);
|
|
5399
|
+
l.includes(x) ? f.delete(x) : f.get(x) !== !0 && f.set(x, !1);
|
|
5400
5400
|
}
|
|
5401
|
-
}, [
|
|
5402
|
-
const
|
|
5401
|
+
}, [g, l.length, l.join("-")]);
|
|
5402
|
+
const T = [];
|
|
5403
5403
|
if (a !== d) {
|
|
5404
5404
|
let y = [...a];
|
|
5405
|
-
for (let
|
|
5406
|
-
const w =
|
|
5407
|
-
l.includes(A) || (y.splice(
|
|
5405
|
+
for (let x = 0; x < g.length; x++) {
|
|
5406
|
+
const w = g[x], A = Ce(w);
|
|
5407
|
+
l.includes(A) || (y.splice(x, 0, w), T.push(w));
|
|
5408
5408
|
}
|
|
5409
|
-
r === "wait" &&
|
|
5409
|
+
r === "wait" && T.length && (y = T), v(Xs(y)), p(a);
|
|
5410
5410
|
return;
|
|
5411
5411
|
}
|
|
5412
|
-
process.env.NODE_ENV !== "production" && r === "wait" &&
|
|
5412
|
+
process.env.NODE_ENV !== "production" && r === "wait" && g.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
5413
5413
|
const { forceRender: P } = K(Un);
|
|
5414
|
-
return _.jsx(_.Fragment, { children:
|
|
5415
|
-
const
|
|
5416
|
-
if (f.has(
|
|
5417
|
-
f.set(
|
|
5414
|
+
return _.jsx(_.Fragment, { children: g.map((y) => {
|
|
5415
|
+
const x = Ce(y), w = a === g || l.includes(x), A = () => {
|
|
5416
|
+
if (f.has(x))
|
|
5417
|
+
f.set(x, !0);
|
|
5418
5418
|
else
|
|
5419
5419
|
return;
|
|
5420
5420
|
let j = !0;
|
|
5421
5421
|
f.forEach((q) => {
|
|
5422
5422
|
q || (j = !1);
|
|
5423
|
-
}), j && (P == null || P(),
|
|
5423
|
+
}), j && (P == null || P(), v(u.current), s && s());
|
|
5424
5424
|
};
|
|
5425
|
-
return _.jsx(Wf, { isPresent: w, initial: !c.current || i ? void 0 : !1, custom: w ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: w ? void 0 : A, children: y },
|
|
5425
|
+
return _.jsx(Wf, { isPresent: w, initial: !c.current || i ? void 0 : !1, custom: w ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: w ? void 0 : A, children: y }, x);
|
|
5426
5426
|
}) });
|
|
5427
5427
|
};
|
|
5428
5428
|
function De(t) {
|
|
@@ -5516,16 +5516,16 @@ function sh(t) {
|
|
|
5516
5516
|
}
|
|
5517
5517
|
return Ae.set(t, window), window;
|
|
5518
5518
|
}
|
|
5519
|
-
const rh = (t, e, n) => {
|
|
5520
|
-
var
|
|
5521
|
-
const
|
|
5522
|
-
if (!
|
|
5519
|
+
const rh = (t, e, n, i) => {
|
|
5520
|
+
var A;
|
|
5521
|
+
const s = (A = t.current) == null ? void 0 : A.firstChild, o = e.current;
|
|
5522
|
+
if (!s || !o)
|
|
5523
5523
|
return;
|
|
5524
|
-
const
|
|
5525
|
-
let
|
|
5526
|
-
const
|
|
5527
|
-
let
|
|
5528
|
-
!
|
|
5524
|
+
const r = o.getBoundingClientRect(), a = s.getBoundingClientRect(), l = window.innerHeight, c = window.innerWidth, u = window.pageYOffset || document.documentElement.scrollTop, f = window.pageXOffset || document.documentElement.scrollLeft, d = 8, p = a.top - d, g = l - a.bottom - d;
|
|
5525
|
+
let v = (i == null ? void 0 : i.vertical) ?? (g >= p ? at.bottom : at.top), T = v === at.bottom ? g : p;
|
|
5526
|
+
const P = r.width, y = a.left + P < c, x = a.right - P > 0;
|
|
5527
|
+
let w = (i == null ? void 0 : i.horizontal) ?? Jt.left;
|
|
5528
|
+
!y && x ? w = Jt.right : !y && !x && (w = Jt.left), n(v), o.style.top = v === at.bottom ? `${a.bottom + u}px` : `${a.top + u - T}px`, o.style.left = w === Jt.left ? `${a.left + f}px` : `${a.right + f - P}px`, o.style.minWidth = `${a.width}px`, o.style.height = `${T}px`, o.style.transformOrigin = v === at.bottom ? "top" : "bottom", o.style.flexDirection = v === at.bottom ? "column" : "column-reverse";
|
|
5529
5529
|
}, oh = {
|
|
5530
5530
|
variants: {
|
|
5531
5531
|
initial: { position: "absolute", zIndex: 999, opacity: 0, transition: { type: "spring" } },
|
|
@@ -5548,8 +5548,13 @@ const rh = (t, e, n) => {
|
|
|
5548
5548
|
onKeyDown: i
|
|
5549
5549
|
}, s) => {
|
|
5550
5550
|
const o = st(null), r = pa(), a = it(() => {
|
|
5551
|
-
rh(
|
|
5552
|
-
|
|
5551
|
+
rh(
|
|
5552
|
+
n,
|
|
5553
|
+
o,
|
|
5554
|
+
r.setVertical,
|
|
5555
|
+
r.importantPosition
|
|
5556
|
+
);
|
|
5557
|
+
}, []);
|
|
5553
5558
|
return ct(() => {
|
|
5554
5559
|
if (n.current && o.current) {
|
|
5555
5560
|
const l = sh(n.current);
|
|
@@ -5580,13 +5585,13 @@ const rh = (t, e, n) => {
|
|
|
5580
5585
|
function ph(t, e, n) {
|
|
5581
5586
|
const i = Me(t);
|
|
5582
5587
|
return Me((o, r) => {
|
|
5583
|
-
const [a, l] = _t(!1), [c, u] = _t(!1), [f, d] = _t(at.bottom), [p,
|
|
5588
|
+
const [a, l] = _t(!1), [c, u] = _t(!1), [f, d] = _t(at.bottom), [p, g] = _t(), v = st(null), T = st(null), P = st(null), y = st(p), x = (n == null ? void 0 : n.isEnableClickOutSiteHidden) !== !1, w = (n == null ? void 0 : n.isEnableHideSave) !== !1;
|
|
5584
5589
|
ct(() => {
|
|
5585
|
-
|
|
5590
|
+
g(o.value);
|
|
5586
5591
|
}, [JSON.stringify(o.value)]), ct(() => {
|
|
5587
5592
|
y.current = p;
|
|
5588
5593
|
}, [p]), ct(() => {
|
|
5589
|
-
a &&
|
|
5594
|
+
a && g(o.value);
|
|
5590
5595
|
}, [a, o.value]);
|
|
5591
5596
|
const A = it((M) => {
|
|
5592
5597
|
switch (M.key) {
|
|
@@ -5605,27 +5610,27 @@ function ph(t, e, n) {
|
|
|
5605
5610
|
}
|
|
5606
5611
|
}, [a]), j = it((M) => (D) => {
|
|
5607
5612
|
var U;
|
|
5608
|
-
M && (D.stopPropagation(), D.preventDefault(), (U =
|
|
5613
|
+
M && (D.stopPropagation(), D.preventDefault(), (U = T.current) == null || U.focus(), l(!1));
|
|
5609
5614
|
}, []), q = it((M) => {
|
|
5610
5615
|
var D;
|
|
5611
|
-
(D =
|
|
5616
|
+
(D = T.current) == null || D.focus(), l(!1), u(!1);
|
|
5612
5617
|
}, []), R = it((M) => {
|
|
5613
5618
|
M.preventDefault(), l(!0);
|
|
5614
5619
|
}, []), W = it(() => {
|
|
5615
5620
|
requestAnimationFrame(() => {
|
|
5616
5621
|
var M;
|
|
5617
|
-
(M =
|
|
5622
|
+
(M = T.current) == null || M.focus(), l(!1);
|
|
5618
5623
|
});
|
|
5619
5624
|
}, []), H = it(() => {
|
|
5620
5625
|
l((M) => (M && requestAnimationFrame(() => {
|
|
5621
5626
|
var D;
|
|
5622
|
-
(D =
|
|
5627
|
+
(D = T.current) == null || D.focus();
|
|
5623
5628
|
}), !M));
|
|
5624
5629
|
}, []), rt = it((M) => {
|
|
5625
|
-
!
|
|
5630
|
+
!v.current && P.current && !P.current.contains(M.target) && u(!1);
|
|
5626
5631
|
}, []), wt = it((M) => {
|
|
5627
5632
|
var U;
|
|
5628
|
-
const D = (U =
|
|
5633
|
+
const D = (U = v.current) == null ? void 0 : U.firstChild;
|
|
5629
5634
|
D && !D.contains(M.target) && P.current && !P.current.contains(M.target) && (l(!1), u(!1));
|
|
5630
5635
|
}, []), Z = it(() => {
|
|
5631
5636
|
if (typeof (o == null ? void 0 : o.onChange) > "u") {
|
|
@@ -5646,7 +5651,8 @@ function ph(t, e, n) {
|
|
|
5646
5651
|
inputBlur: () => u(!1),
|
|
5647
5652
|
isInputFocus: c,
|
|
5648
5653
|
value: p,
|
|
5649
|
-
onChange:
|
|
5654
|
+
onChange: g,
|
|
5655
|
+
importantPosition: n == null ? void 0 : n.importantPosition,
|
|
5650
5656
|
vertical: f,
|
|
5651
5657
|
setVertical: d
|
|
5652
5658
|
},
|
|
@@ -5661,7 +5667,7 @@ function ph(t, e, n) {
|
|
|
5661
5667
|
i,
|
|
5662
5668
|
{
|
|
5663
5669
|
...o,
|
|
5664
|
-
ref: Eo(r,
|
|
5670
|
+
ref: Eo(r, T)
|
|
5665
5671
|
}
|
|
5666
5672
|
)
|
|
5667
5673
|
}
|
|
@@ -5674,7 +5680,7 @@ function ph(t, e, n) {
|
|
|
5674
5680
|
children: /* @__PURE__ */ _.jsx(
|
|
5675
5681
|
lh,
|
|
5676
5682
|
{
|
|
5677
|
-
ref:
|
|
5683
|
+
ref: v,
|
|
5678
5684
|
anchorRef: P,
|
|
5679
5685
|
isDebug: n == null ? void 0 : n.isDebug,
|
|
5680
5686
|
onKeyDown: A,
|
|
@@ -5684,7 +5690,7 @@ function ph(t, e, n) {
|
|
|
5684
5690
|
}
|
|
5685
5691
|
) }),
|
|
5686
5692
|
a && /* @__PURE__ */ _.jsx(Qf, { onPickerHide: Z }),
|
|
5687
|
-
|
|
5693
|
+
x && a && /* @__PURE__ */ _.jsx(Zs, { onMousedown: wt }),
|
|
5688
5694
|
c && /* @__PURE__ */ _.jsx(Zs, { onMousedown: rt })
|
|
5689
5695
|
] })
|
|
5690
5696
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export declare enum EHorizontal {
|
|
|
9
9
|
left = "left",
|
|
10
10
|
right = "right"
|
|
11
11
|
}
|
|
12
|
+
export interface IPosition {
|
|
13
|
+
vertical: EVertical;
|
|
14
|
+
horizontal: EHorizontal;
|
|
15
|
+
}
|
|
12
16
|
export interface IPickerOptions {
|
|
13
17
|
variants?: TAnimationVariants;
|
|
14
18
|
transition?: Transition;
|
|
@@ -23,5 +27,6 @@ export interface IPickerOption {
|
|
|
23
27
|
isEnableHideSave?: boolean;
|
|
24
28
|
isEnableClickOutSiteHidden?: boolean;
|
|
25
29
|
isDebug?: boolean;
|
|
30
|
+
importantPosition?: IPosition;
|
|
26
31
|
}
|
|
27
32
|
export {};
|