@easypost/easy-ui 1.0.0-alpha.75 → 1.0.0-alpha.76
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/CHANGELOG.md +12 -0
- package/Drawer/index.js +3 -1685
- package/Drawer/index.mjs +1 -1683
- package/Notification/Notification.d.ts +12 -1
- package/Notification/Notification.d.ts.map +1 -1
- package/Notification/NotificationContainer.d.ts.map +1 -1
- package/Notification/NotificationRegion.d.ts +7 -2
- package/Notification/NotificationRegion.d.ts.map +1 -1
- package/Notification/NotificationTransition.d.ts +29 -0
- package/Notification/NotificationTransition.d.ts.map +1 -0
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Provider/index.js +1 -1
- package/Provider/index.mjs +1 -1
- package/__chunks__/CSSTransition-BXyX0mUc.js +1689 -0
- package/__chunks__/CSSTransition-C4FQrt4m.mjs +1690 -0
- package/__chunks__/{Notification-BCS0ugaf.js → Notification-B_dzUkJq.js} +347 -33
- package/__chunks__/{Notification-lg6ggtug.mjs → Notification-C-_hCM1v.mjs} +348 -34
- package/package.json +2 -2
- package/style.css +181 -150
|
@@ -0,0 +1,1690 @@
|
|
|
1
|
+
import { _ as _objectWithoutPropertiesLoose, a as _extends } from "./objectWithoutPropertiesLoose-COdxq1Ge.mjs";
|
|
2
|
+
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.mjs";
|
|
3
|
+
import React__default from "react";
|
|
4
|
+
import ReactDOM from "react-dom";
|
|
5
|
+
function _setPrototypeOf(t, e) {
|
|
6
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
|
7
|
+
return t2.__proto__ = e2, t2;
|
|
8
|
+
}, _setPrototypeOf(t, e);
|
|
9
|
+
}
|
|
10
|
+
function _inheritsLoose(t, o) {
|
|
11
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
12
|
+
}
|
|
13
|
+
var propTypes = { exports: {} };
|
|
14
|
+
var reactIs = { exports: {} };
|
|
15
|
+
var reactIs_production_min = {};
|
|
16
|
+
/** @license React v16.13.1
|
|
17
|
+
* react-is.production.min.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
var hasRequiredReactIs_production_min;
|
|
25
|
+
function requireReactIs_production_min() {
|
|
26
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
27
|
+
hasRequiredReactIs_production_min = 1;
|
|
28
|
+
var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
29
|
+
function z(a) {
|
|
30
|
+
if ("object" === typeof a && null !== a) {
|
|
31
|
+
var u = a.$$typeof;
|
|
32
|
+
switch (u) {
|
|
33
|
+
case c:
|
|
34
|
+
switch (a = a.type, a) {
|
|
35
|
+
case l:
|
|
36
|
+
case m:
|
|
37
|
+
case e:
|
|
38
|
+
case g:
|
|
39
|
+
case f:
|
|
40
|
+
case p:
|
|
41
|
+
return a;
|
|
42
|
+
default:
|
|
43
|
+
switch (a = a && a.$$typeof, a) {
|
|
44
|
+
case k:
|
|
45
|
+
case n:
|
|
46
|
+
case t:
|
|
47
|
+
case r:
|
|
48
|
+
case h:
|
|
49
|
+
return a;
|
|
50
|
+
default:
|
|
51
|
+
return u;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
case d:
|
|
55
|
+
return u;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function A(a) {
|
|
60
|
+
return z(a) === m;
|
|
61
|
+
}
|
|
62
|
+
reactIs_production_min.AsyncMode = l;
|
|
63
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
64
|
+
reactIs_production_min.ContextConsumer = k;
|
|
65
|
+
reactIs_production_min.ContextProvider = h;
|
|
66
|
+
reactIs_production_min.Element = c;
|
|
67
|
+
reactIs_production_min.ForwardRef = n;
|
|
68
|
+
reactIs_production_min.Fragment = e;
|
|
69
|
+
reactIs_production_min.Lazy = t;
|
|
70
|
+
reactIs_production_min.Memo = r;
|
|
71
|
+
reactIs_production_min.Portal = d;
|
|
72
|
+
reactIs_production_min.Profiler = g;
|
|
73
|
+
reactIs_production_min.StrictMode = f;
|
|
74
|
+
reactIs_production_min.Suspense = p;
|
|
75
|
+
reactIs_production_min.isAsyncMode = function(a) {
|
|
76
|
+
return A(a) || z(a) === l;
|
|
77
|
+
};
|
|
78
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
79
|
+
reactIs_production_min.isContextConsumer = function(a) {
|
|
80
|
+
return z(a) === k;
|
|
81
|
+
};
|
|
82
|
+
reactIs_production_min.isContextProvider = function(a) {
|
|
83
|
+
return z(a) === h;
|
|
84
|
+
};
|
|
85
|
+
reactIs_production_min.isElement = function(a) {
|
|
86
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
87
|
+
};
|
|
88
|
+
reactIs_production_min.isForwardRef = function(a) {
|
|
89
|
+
return z(a) === n;
|
|
90
|
+
};
|
|
91
|
+
reactIs_production_min.isFragment = function(a) {
|
|
92
|
+
return z(a) === e;
|
|
93
|
+
};
|
|
94
|
+
reactIs_production_min.isLazy = function(a) {
|
|
95
|
+
return z(a) === t;
|
|
96
|
+
};
|
|
97
|
+
reactIs_production_min.isMemo = function(a) {
|
|
98
|
+
return z(a) === r;
|
|
99
|
+
};
|
|
100
|
+
reactIs_production_min.isPortal = function(a) {
|
|
101
|
+
return z(a) === d;
|
|
102
|
+
};
|
|
103
|
+
reactIs_production_min.isProfiler = function(a) {
|
|
104
|
+
return z(a) === g;
|
|
105
|
+
};
|
|
106
|
+
reactIs_production_min.isStrictMode = function(a) {
|
|
107
|
+
return z(a) === f;
|
|
108
|
+
};
|
|
109
|
+
reactIs_production_min.isSuspense = function(a) {
|
|
110
|
+
return z(a) === p;
|
|
111
|
+
};
|
|
112
|
+
reactIs_production_min.isValidElementType = function(a) {
|
|
113
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
114
|
+
};
|
|
115
|
+
reactIs_production_min.typeOf = z;
|
|
116
|
+
return reactIs_production_min;
|
|
117
|
+
}
|
|
118
|
+
var reactIs_development = {};
|
|
119
|
+
/** @license React v16.13.1
|
|
120
|
+
* react-is.development.js
|
|
121
|
+
*
|
|
122
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the MIT license found in the
|
|
125
|
+
* LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/
|
|
127
|
+
var hasRequiredReactIs_development;
|
|
128
|
+
function requireReactIs_development() {
|
|
129
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
130
|
+
hasRequiredReactIs_development = 1;
|
|
131
|
+
if (process.env.NODE_ENV !== "production") {
|
|
132
|
+
(function() {
|
|
133
|
+
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
134
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
135
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
136
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
137
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
138
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
139
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
140
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
141
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
142
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
143
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
144
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
145
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
146
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
147
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
148
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
149
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
150
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
151
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
152
|
+
function isValidElementType(type) {
|
|
153
|
+
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
154
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
155
|
+
}
|
|
156
|
+
function typeOf(object) {
|
|
157
|
+
if (typeof object === "object" && object !== null) {
|
|
158
|
+
var $$typeof = object.$$typeof;
|
|
159
|
+
switch ($$typeof) {
|
|
160
|
+
case REACT_ELEMENT_TYPE:
|
|
161
|
+
var type = object.type;
|
|
162
|
+
switch (type) {
|
|
163
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
164
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
165
|
+
case REACT_FRAGMENT_TYPE:
|
|
166
|
+
case REACT_PROFILER_TYPE:
|
|
167
|
+
case REACT_STRICT_MODE_TYPE:
|
|
168
|
+
case REACT_SUSPENSE_TYPE:
|
|
169
|
+
return type;
|
|
170
|
+
default:
|
|
171
|
+
var $$typeofType = type && type.$$typeof;
|
|
172
|
+
switch ($$typeofType) {
|
|
173
|
+
case REACT_CONTEXT_TYPE:
|
|
174
|
+
case REACT_FORWARD_REF_TYPE:
|
|
175
|
+
case REACT_LAZY_TYPE:
|
|
176
|
+
case REACT_MEMO_TYPE:
|
|
177
|
+
case REACT_PROVIDER_TYPE:
|
|
178
|
+
return $$typeofType;
|
|
179
|
+
default:
|
|
180
|
+
return $$typeof;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
case REACT_PORTAL_TYPE:
|
|
184
|
+
return $$typeof;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return void 0;
|
|
188
|
+
}
|
|
189
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
190
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
191
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
192
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
193
|
+
var Element2 = REACT_ELEMENT_TYPE;
|
|
194
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
195
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
196
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
197
|
+
var Memo = REACT_MEMO_TYPE;
|
|
198
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
199
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
200
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
201
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
202
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
203
|
+
function isAsyncMode(object) {
|
|
204
|
+
{
|
|
205
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
206
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
207
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
211
|
+
}
|
|
212
|
+
function isConcurrentMode(object) {
|
|
213
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
214
|
+
}
|
|
215
|
+
function isContextConsumer(object) {
|
|
216
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
217
|
+
}
|
|
218
|
+
function isContextProvider(object) {
|
|
219
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
220
|
+
}
|
|
221
|
+
function isElement(object) {
|
|
222
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
223
|
+
}
|
|
224
|
+
function isForwardRef(object) {
|
|
225
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
226
|
+
}
|
|
227
|
+
function isFragment(object) {
|
|
228
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
229
|
+
}
|
|
230
|
+
function isLazy(object) {
|
|
231
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
232
|
+
}
|
|
233
|
+
function isMemo(object) {
|
|
234
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
235
|
+
}
|
|
236
|
+
function isPortal(object) {
|
|
237
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
238
|
+
}
|
|
239
|
+
function isProfiler(object) {
|
|
240
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
241
|
+
}
|
|
242
|
+
function isStrictMode(object) {
|
|
243
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
244
|
+
}
|
|
245
|
+
function isSuspense(object) {
|
|
246
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
247
|
+
}
|
|
248
|
+
reactIs_development.AsyncMode = AsyncMode;
|
|
249
|
+
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
250
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
251
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
252
|
+
reactIs_development.Element = Element2;
|
|
253
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
254
|
+
reactIs_development.Fragment = Fragment;
|
|
255
|
+
reactIs_development.Lazy = Lazy;
|
|
256
|
+
reactIs_development.Memo = Memo;
|
|
257
|
+
reactIs_development.Portal = Portal;
|
|
258
|
+
reactIs_development.Profiler = Profiler;
|
|
259
|
+
reactIs_development.StrictMode = StrictMode;
|
|
260
|
+
reactIs_development.Suspense = Suspense;
|
|
261
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
262
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
263
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
264
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
265
|
+
reactIs_development.isElement = isElement;
|
|
266
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
267
|
+
reactIs_development.isFragment = isFragment;
|
|
268
|
+
reactIs_development.isLazy = isLazy;
|
|
269
|
+
reactIs_development.isMemo = isMemo;
|
|
270
|
+
reactIs_development.isPortal = isPortal;
|
|
271
|
+
reactIs_development.isProfiler = isProfiler;
|
|
272
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
273
|
+
reactIs_development.isSuspense = isSuspense;
|
|
274
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
275
|
+
reactIs_development.typeOf = typeOf;
|
|
276
|
+
})();
|
|
277
|
+
}
|
|
278
|
+
return reactIs_development;
|
|
279
|
+
}
|
|
280
|
+
var hasRequiredReactIs;
|
|
281
|
+
function requireReactIs() {
|
|
282
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
283
|
+
hasRequiredReactIs = 1;
|
|
284
|
+
if (process.env.NODE_ENV === "production") {
|
|
285
|
+
reactIs.exports = requireReactIs_production_min();
|
|
286
|
+
} else {
|
|
287
|
+
reactIs.exports = requireReactIs_development();
|
|
288
|
+
}
|
|
289
|
+
return reactIs.exports;
|
|
290
|
+
}
|
|
291
|
+
/*
|
|
292
|
+
object-assign
|
|
293
|
+
(c) Sindre Sorhus
|
|
294
|
+
@license MIT
|
|
295
|
+
*/
|
|
296
|
+
var objectAssign;
|
|
297
|
+
var hasRequiredObjectAssign;
|
|
298
|
+
function requireObjectAssign() {
|
|
299
|
+
if (hasRequiredObjectAssign) return objectAssign;
|
|
300
|
+
hasRequiredObjectAssign = 1;
|
|
301
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
302
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
303
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
304
|
+
function toObject(val) {
|
|
305
|
+
if (val === null || val === void 0) {
|
|
306
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
307
|
+
}
|
|
308
|
+
return Object(val);
|
|
309
|
+
}
|
|
310
|
+
function shouldUseNative() {
|
|
311
|
+
try {
|
|
312
|
+
if (!Object.assign) {
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
var test1 = new String("abc");
|
|
316
|
+
test1[5] = "de";
|
|
317
|
+
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
var test2 = {};
|
|
321
|
+
for (var i = 0; i < 10; i++) {
|
|
322
|
+
test2["_" + String.fromCharCode(i)] = i;
|
|
323
|
+
}
|
|
324
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
325
|
+
return test2[n];
|
|
326
|
+
});
|
|
327
|
+
if (order2.join("") !== "0123456789") {
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
330
|
+
var test3 = {};
|
|
331
|
+
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
332
|
+
test3[letter] = letter;
|
|
333
|
+
});
|
|
334
|
+
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
return true;
|
|
338
|
+
} catch (err) {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
|
|
343
|
+
var from;
|
|
344
|
+
var to = toObject(target);
|
|
345
|
+
var symbols;
|
|
346
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
347
|
+
from = Object(arguments[s]);
|
|
348
|
+
for (var key in from) {
|
|
349
|
+
if (hasOwnProperty.call(from, key)) {
|
|
350
|
+
to[key] = from[key];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (getOwnPropertySymbols) {
|
|
354
|
+
symbols = getOwnPropertySymbols(from);
|
|
355
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
356
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
357
|
+
to[symbols[i]] = from[symbols[i]];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return to;
|
|
363
|
+
};
|
|
364
|
+
return objectAssign;
|
|
365
|
+
}
|
|
366
|
+
var ReactPropTypesSecret_1;
|
|
367
|
+
var hasRequiredReactPropTypesSecret;
|
|
368
|
+
function requireReactPropTypesSecret() {
|
|
369
|
+
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
370
|
+
hasRequiredReactPropTypesSecret = 1;
|
|
371
|
+
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
372
|
+
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
373
|
+
return ReactPropTypesSecret_1;
|
|
374
|
+
}
|
|
375
|
+
var has;
|
|
376
|
+
var hasRequiredHas;
|
|
377
|
+
function requireHas() {
|
|
378
|
+
if (hasRequiredHas) return has;
|
|
379
|
+
hasRequiredHas = 1;
|
|
380
|
+
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
381
|
+
return has;
|
|
382
|
+
}
|
|
383
|
+
var checkPropTypes_1;
|
|
384
|
+
var hasRequiredCheckPropTypes;
|
|
385
|
+
function requireCheckPropTypes() {
|
|
386
|
+
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
387
|
+
hasRequiredCheckPropTypes = 1;
|
|
388
|
+
var printWarning = function() {
|
|
389
|
+
};
|
|
390
|
+
if (process.env.NODE_ENV !== "production") {
|
|
391
|
+
var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
|
|
392
|
+
var loggedTypeFailures = {};
|
|
393
|
+
var has2 = /* @__PURE__ */ requireHas();
|
|
394
|
+
printWarning = function(text) {
|
|
395
|
+
var message = "Warning: " + text;
|
|
396
|
+
if (typeof console !== "undefined") {
|
|
397
|
+
console.error(message);
|
|
398
|
+
}
|
|
399
|
+
try {
|
|
400
|
+
throw new Error(message);
|
|
401
|
+
} catch (x) {
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
406
|
+
if (process.env.NODE_ENV !== "production") {
|
|
407
|
+
for (var typeSpecName in typeSpecs) {
|
|
408
|
+
if (has2(typeSpecs, typeSpecName)) {
|
|
409
|
+
var error;
|
|
410
|
+
try {
|
|
411
|
+
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
412
|
+
var err = Error(
|
|
413
|
+
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
414
|
+
);
|
|
415
|
+
err.name = "Invariant Violation";
|
|
416
|
+
throw err;
|
|
417
|
+
}
|
|
418
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
419
|
+
} catch (ex) {
|
|
420
|
+
error = ex;
|
|
421
|
+
}
|
|
422
|
+
if (error && !(error instanceof Error)) {
|
|
423
|
+
printWarning(
|
|
424
|
+
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
428
|
+
loggedTypeFailures[error.message] = true;
|
|
429
|
+
var stack = getStack ? getStack() : "";
|
|
430
|
+
printWarning(
|
|
431
|
+
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
checkPropTypes.resetWarningCache = function() {
|
|
439
|
+
if (process.env.NODE_ENV !== "production") {
|
|
440
|
+
loggedTypeFailures = {};
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
checkPropTypes_1 = checkPropTypes;
|
|
444
|
+
return checkPropTypes_1;
|
|
445
|
+
}
|
|
446
|
+
var factoryWithTypeCheckers;
|
|
447
|
+
var hasRequiredFactoryWithTypeCheckers;
|
|
448
|
+
function requireFactoryWithTypeCheckers() {
|
|
449
|
+
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
450
|
+
hasRequiredFactoryWithTypeCheckers = 1;
|
|
451
|
+
var ReactIs = requireReactIs();
|
|
452
|
+
var assign = requireObjectAssign();
|
|
453
|
+
var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
|
|
454
|
+
var has2 = /* @__PURE__ */ requireHas();
|
|
455
|
+
var checkPropTypes = /* @__PURE__ */ requireCheckPropTypes();
|
|
456
|
+
var printWarning = function() {
|
|
457
|
+
};
|
|
458
|
+
if (process.env.NODE_ENV !== "production") {
|
|
459
|
+
printWarning = function(text) {
|
|
460
|
+
var message = "Warning: " + text;
|
|
461
|
+
if (typeof console !== "undefined") {
|
|
462
|
+
console.error(message);
|
|
463
|
+
}
|
|
464
|
+
try {
|
|
465
|
+
throw new Error(message);
|
|
466
|
+
} catch (x) {
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
function emptyFunctionThatReturnsNull() {
|
|
471
|
+
return null;
|
|
472
|
+
}
|
|
473
|
+
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
474
|
+
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
475
|
+
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
476
|
+
function getIteratorFn(maybeIterable) {
|
|
477
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
478
|
+
if (typeof iteratorFn === "function") {
|
|
479
|
+
return iteratorFn;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
var ANONYMOUS = "<<anonymous>>";
|
|
483
|
+
var ReactPropTypes = {
|
|
484
|
+
array: createPrimitiveTypeChecker("array"),
|
|
485
|
+
bigint: createPrimitiveTypeChecker("bigint"),
|
|
486
|
+
bool: createPrimitiveTypeChecker("boolean"),
|
|
487
|
+
func: createPrimitiveTypeChecker("function"),
|
|
488
|
+
number: createPrimitiveTypeChecker("number"),
|
|
489
|
+
object: createPrimitiveTypeChecker("object"),
|
|
490
|
+
string: createPrimitiveTypeChecker("string"),
|
|
491
|
+
symbol: createPrimitiveTypeChecker("symbol"),
|
|
492
|
+
any: createAnyTypeChecker(),
|
|
493
|
+
arrayOf: createArrayOfTypeChecker,
|
|
494
|
+
element: createElementTypeChecker(),
|
|
495
|
+
elementType: createElementTypeTypeChecker(),
|
|
496
|
+
instanceOf: createInstanceTypeChecker,
|
|
497
|
+
node: createNodeChecker(),
|
|
498
|
+
objectOf: createObjectOfTypeChecker,
|
|
499
|
+
oneOf: createEnumTypeChecker,
|
|
500
|
+
oneOfType: createUnionTypeChecker,
|
|
501
|
+
shape: createShapeTypeChecker,
|
|
502
|
+
exact: createStrictShapeTypeChecker
|
|
503
|
+
};
|
|
504
|
+
function is(x, y) {
|
|
505
|
+
if (x === y) {
|
|
506
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
507
|
+
} else {
|
|
508
|
+
return x !== x && y !== y;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
function PropTypeError(message, data) {
|
|
512
|
+
this.message = message;
|
|
513
|
+
this.data = data && typeof data === "object" ? data : {};
|
|
514
|
+
this.stack = "";
|
|
515
|
+
}
|
|
516
|
+
PropTypeError.prototype = Error.prototype;
|
|
517
|
+
function createChainableTypeChecker(validate) {
|
|
518
|
+
if (process.env.NODE_ENV !== "production") {
|
|
519
|
+
var manualPropTypeCallCache = {};
|
|
520
|
+
var manualPropTypeWarningCount = 0;
|
|
521
|
+
}
|
|
522
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
523
|
+
componentName = componentName || ANONYMOUS;
|
|
524
|
+
propFullName = propFullName || propName;
|
|
525
|
+
if (secret !== ReactPropTypesSecret) {
|
|
526
|
+
if (throwOnDirectAccess) {
|
|
527
|
+
var err = new Error(
|
|
528
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
529
|
+
);
|
|
530
|
+
err.name = "Invariant Violation";
|
|
531
|
+
throw err;
|
|
532
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
|
|
533
|
+
var cacheKey = componentName + ":" + propName;
|
|
534
|
+
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
535
|
+
manualPropTypeWarningCount < 3) {
|
|
536
|
+
printWarning(
|
|
537
|
+
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
538
|
+
);
|
|
539
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
540
|
+
manualPropTypeWarningCount++;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
if (props[propName] == null) {
|
|
545
|
+
if (isRequired) {
|
|
546
|
+
if (props[propName] === null) {
|
|
547
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
|
|
548
|
+
}
|
|
549
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
|
|
550
|
+
}
|
|
551
|
+
return null;
|
|
552
|
+
} else {
|
|
553
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
557
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
558
|
+
return chainedCheckType;
|
|
559
|
+
}
|
|
560
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
561
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
562
|
+
var propValue = props[propName];
|
|
563
|
+
var propType = getPropType(propValue);
|
|
564
|
+
if (propType !== expectedType) {
|
|
565
|
+
var preciseType = getPreciseType(propValue);
|
|
566
|
+
return new PropTypeError(
|
|
567
|
+
"Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
|
|
568
|
+
{ expectedType }
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
return null;
|
|
572
|
+
}
|
|
573
|
+
return createChainableTypeChecker(validate);
|
|
574
|
+
}
|
|
575
|
+
function createAnyTypeChecker() {
|
|
576
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
577
|
+
}
|
|
578
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
579
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
580
|
+
if (typeof typeChecker !== "function") {
|
|
581
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
|
582
|
+
}
|
|
583
|
+
var propValue = props[propName];
|
|
584
|
+
if (!Array.isArray(propValue)) {
|
|
585
|
+
var propType = getPropType(propValue);
|
|
586
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
587
|
+
}
|
|
588
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
589
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
590
|
+
if (error instanceof Error) {
|
|
591
|
+
return error;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
return null;
|
|
595
|
+
}
|
|
596
|
+
return createChainableTypeChecker(validate);
|
|
597
|
+
}
|
|
598
|
+
function createElementTypeChecker() {
|
|
599
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
600
|
+
var propValue = props[propName];
|
|
601
|
+
if (!isValidElement(propValue)) {
|
|
602
|
+
var propType = getPropType(propValue);
|
|
603
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
604
|
+
}
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
return createChainableTypeChecker(validate);
|
|
608
|
+
}
|
|
609
|
+
function createElementTypeTypeChecker() {
|
|
610
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
611
|
+
var propValue = props[propName];
|
|
612
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
613
|
+
var propType = getPropType(propValue);
|
|
614
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
|
|
615
|
+
}
|
|
616
|
+
return null;
|
|
617
|
+
}
|
|
618
|
+
return createChainableTypeChecker(validate);
|
|
619
|
+
}
|
|
620
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
621
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
622
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
623
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
624
|
+
var actualClassName = getClassName(props[propName]);
|
|
625
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
626
|
+
}
|
|
627
|
+
return null;
|
|
628
|
+
}
|
|
629
|
+
return createChainableTypeChecker(validate);
|
|
630
|
+
}
|
|
631
|
+
function createEnumTypeChecker(expectedValues) {
|
|
632
|
+
if (!Array.isArray(expectedValues)) {
|
|
633
|
+
if (process.env.NODE_ENV !== "production") {
|
|
634
|
+
if (arguments.length > 1) {
|
|
635
|
+
printWarning(
|
|
636
|
+
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
637
|
+
);
|
|
638
|
+
} else {
|
|
639
|
+
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return emptyFunctionThatReturnsNull;
|
|
643
|
+
}
|
|
644
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
645
|
+
var propValue = props[propName];
|
|
646
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
647
|
+
if (is(propValue, expectedValues[i])) {
|
|
648
|
+
return null;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
652
|
+
var type = getPreciseType(value);
|
|
653
|
+
if (type === "symbol") {
|
|
654
|
+
return String(value);
|
|
655
|
+
}
|
|
656
|
+
return value;
|
|
657
|
+
});
|
|
658
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
|
|
659
|
+
}
|
|
660
|
+
return createChainableTypeChecker(validate);
|
|
661
|
+
}
|
|
662
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
663
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
664
|
+
if (typeof typeChecker !== "function") {
|
|
665
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
|
666
|
+
}
|
|
667
|
+
var propValue = props[propName];
|
|
668
|
+
var propType = getPropType(propValue);
|
|
669
|
+
if (propType !== "object") {
|
|
670
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
671
|
+
}
|
|
672
|
+
for (var key in propValue) {
|
|
673
|
+
if (has2(propValue, key)) {
|
|
674
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
675
|
+
if (error instanceof Error) {
|
|
676
|
+
return error;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return null;
|
|
681
|
+
}
|
|
682
|
+
return createChainableTypeChecker(validate);
|
|
683
|
+
}
|
|
684
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
685
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
686
|
+
process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
687
|
+
return emptyFunctionThatReturnsNull;
|
|
688
|
+
}
|
|
689
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
690
|
+
var checker = arrayOfTypeCheckers[i];
|
|
691
|
+
if (typeof checker !== "function") {
|
|
692
|
+
printWarning(
|
|
693
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
694
|
+
);
|
|
695
|
+
return emptyFunctionThatReturnsNull;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
699
|
+
var expectedTypes = [];
|
|
700
|
+
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
701
|
+
var checker2 = arrayOfTypeCheckers[i2];
|
|
702
|
+
var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
703
|
+
if (checkerResult == null) {
|
|
704
|
+
return null;
|
|
705
|
+
}
|
|
706
|
+
if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
|
|
707
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
|
|
711
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
|
|
712
|
+
}
|
|
713
|
+
return createChainableTypeChecker(validate);
|
|
714
|
+
}
|
|
715
|
+
function createNodeChecker() {
|
|
716
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
717
|
+
if (!isNode(props[propName])) {
|
|
718
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
|
|
719
|
+
}
|
|
720
|
+
return null;
|
|
721
|
+
}
|
|
722
|
+
return createChainableTypeChecker(validate);
|
|
723
|
+
}
|
|
724
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
725
|
+
return new PropTypeError(
|
|
726
|
+
(componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
730
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
731
|
+
var propValue = props[propName];
|
|
732
|
+
var propType = getPropType(propValue);
|
|
733
|
+
if (propType !== "object") {
|
|
734
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
735
|
+
}
|
|
736
|
+
for (var key in shapeTypes) {
|
|
737
|
+
var checker = shapeTypes[key];
|
|
738
|
+
if (typeof checker !== "function") {
|
|
739
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
740
|
+
}
|
|
741
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
742
|
+
if (error) {
|
|
743
|
+
return error;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
return null;
|
|
747
|
+
}
|
|
748
|
+
return createChainableTypeChecker(validate);
|
|
749
|
+
}
|
|
750
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
751
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
752
|
+
var propValue = props[propName];
|
|
753
|
+
var propType = getPropType(propValue);
|
|
754
|
+
if (propType !== "object") {
|
|
755
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
756
|
+
}
|
|
757
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
758
|
+
for (var key in allKeys) {
|
|
759
|
+
var checker = shapeTypes[key];
|
|
760
|
+
if (has2(shapeTypes, key) && typeof checker !== "function") {
|
|
761
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
762
|
+
}
|
|
763
|
+
if (!checker) {
|
|
764
|
+
return new PropTypeError(
|
|
765
|
+
"Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
769
|
+
if (error) {
|
|
770
|
+
return error;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return null;
|
|
774
|
+
}
|
|
775
|
+
return createChainableTypeChecker(validate);
|
|
776
|
+
}
|
|
777
|
+
function isNode(propValue) {
|
|
778
|
+
switch (typeof propValue) {
|
|
779
|
+
case "number":
|
|
780
|
+
case "string":
|
|
781
|
+
case "undefined":
|
|
782
|
+
return true;
|
|
783
|
+
case "boolean":
|
|
784
|
+
return !propValue;
|
|
785
|
+
case "object":
|
|
786
|
+
if (Array.isArray(propValue)) {
|
|
787
|
+
return propValue.every(isNode);
|
|
788
|
+
}
|
|
789
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
790
|
+
return true;
|
|
791
|
+
}
|
|
792
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
793
|
+
if (iteratorFn) {
|
|
794
|
+
var iterator = iteratorFn.call(propValue);
|
|
795
|
+
var step;
|
|
796
|
+
if (iteratorFn !== propValue.entries) {
|
|
797
|
+
while (!(step = iterator.next()).done) {
|
|
798
|
+
if (!isNode(step.value)) {
|
|
799
|
+
return false;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
} else {
|
|
803
|
+
while (!(step = iterator.next()).done) {
|
|
804
|
+
var entry = step.value;
|
|
805
|
+
if (entry) {
|
|
806
|
+
if (!isNode(entry[1])) {
|
|
807
|
+
return false;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
} else {
|
|
813
|
+
return false;
|
|
814
|
+
}
|
|
815
|
+
return true;
|
|
816
|
+
default:
|
|
817
|
+
return false;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
function isSymbol(propType, propValue) {
|
|
821
|
+
if (propType === "symbol") {
|
|
822
|
+
return true;
|
|
823
|
+
}
|
|
824
|
+
if (!propValue) {
|
|
825
|
+
return false;
|
|
826
|
+
}
|
|
827
|
+
if (propValue["@@toStringTag"] === "Symbol") {
|
|
828
|
+
return true;
|
|
829
|
+
}
|
|
830
|
+
if (typeof Symbol === "function" && propValue instanceof Symbol) {
|
|
831
|
+
return true;
|
|
832
|
+
}
|
|
833
|
+
return false;
|
|
834
|
+
}
|
|
835
|
+
function getPropType(propValue) {
|
|
836
|
+
var propType = typeof propValue;
|
|
837
|
+
if (Array.isArray(propValue)) {
|
|
838
|
+
return "array";
|
|
839
|
+
}
|
|
840
|
+
if (propValue instanceof RegExp) {
|
|
841
|
+
return "object";
|
|
842
|
+
}
|
|
843
|
+
if (isSymbol(propType, propValue)) {
|
|
844
|
+
return "symbol";
|
|
845
|
+
}
|
|
846
|
+
return propType;
|
|
847
|
+
}
|
|
848
|
+
function getPreciseType(propValue) {
|
|
849
|
+
if (typeof propValue === "undefined" || propValue === null) {
|
|
850
|
+
return "" + propValue;
|
|
851
|
+
}
|
|
852
|
+
var propType = getPropType(propValue);
|
|
853
|
+
if (propType === "object") {
|
|
854
|
+
if (propValue instanceof Date) {
|
|
855
|
+
return "date";
|
|
856
|
+
} else if (propValue instanceof RegExp) {
|
|
857
|
+
return "regexp";
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
return propType;
|
|
861
|
+
}
|
|
862
|
+
function getPostfixForTypeWarning(value) {
|
|
863
|
+
var type = getPreciseType(value);
|
|
864
|
+
switch (type) {
|
|
865
|
+
case "array":
|
|
866
|
+
case "object":
|
|
867
|
+
return "an " + type;
|
|
868
|
+
case "boolean":
|
|
869
|
+
case "date":
|
|
870
|
+
case "regexp":
|
|
871
|
+
return "a " + type;
|
|
872
|
+
default:
|
|
873
|
+
return type;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
function getClassName(propValue) {
|
|
877
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
878
|
+
return ANONYMOUS;
|
|
879
|
+
}
|
|
880
|
+
return propValue.constructor.name;
|
|
881
|
+
}
|
|
882
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
883
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
884
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
885
|
+
return ReactPropTypes;
|
|
886
|
+
};
|
|
887
|
+
return factoryWithTypeCheckers;
|
|
888
|
+
}
|
|
889
|
+
var factoryWithThrowingShims;
|
|
890
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
891
|
+
function requireFactoryWithThrowingShims() {
|
|
892
|
+
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
893
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
894
|
+
var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
|
|
895
|
+
function emptyFunction() {
|
|
896
|
+
}
|
|
897
|
+
function emptyFunctionWithReset() {
|
|
898
|
+
}
|
|
899
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
900
|
+
factoryWithThrowingShims = function() {
|
|
901
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
902
|
+
if (secret === ReactPropTypesSecret) {
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
var err = new Error(
|
|
906
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
907
|
+
);
|
|
908
|
+
err.name = "Invariant Violation";
|
|
909
|
+
throw err;
|
|
910
|
+
}
|
|
911
|
+
shim.isRequired = shim;
|
|
912
|
+
function getShim() {
|
|
913
|
+
return shim;
|
|
914
|
+
}
|
|
915
|
+
var ReactPropTypes = {
|
|
916
|
+
array: shim,
|
|
917
|
+
bigint: shim,
|
|
918
|
+
bool: shim,
|
|
919
|
+
func: shim,
|
|
920
|
+
number: shim,
|
|
921
|
+
object: shim,
|
|
922
|
+
string: shim,
|
|
923
|
+
symbol: shim,
|
|
924
|
+
any: shim,
|
|
925
|
+
arrayOf: getShim,
|
|
926
|
+
element: shim,
|
|
927
|
+
elementType: shim,
|
|
928
|
+
instanceOf: getShim,
|
|
929
|
+
node: shim,
|
|
930
|
+
objectOf: getShim,
|
|
931
|
+
oneOf: getShim,
|
|
932
|
+
oneOfType: getShim,
|
|
933
|
+
shape: getShim,
|
|
934
|
+
exact: getShim,
|
|
935
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
936
|
+
resetWarningCache: emptyFunction
|
|
937
|
+
};
|
|
938
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
939
|
+
return ReactPropTypes;
|
|
940
|
+
};
|
|
941
|
+
return factoryWithThrowingShims;
|
|
942
|
+
}
|
|
943
|
+
var hasRequiredPropTypes;
|
|
944
|
+
function requirePropTypes() {
|
|
945
|
+
if (hasRequiredPropTypes) return propTypes.exports;
|
|
946
|
+
hasRequiredPropTypes = 1;
|
|
947
|
+
if (process.env.NODE_ENV !== "production") {
|
|
948
|
+
var ReactIs = requireReactIs();
|
|
949
|
+
var throwOnDirectAccess = true;
|
|
950
|
+
propTypes.exports = /* @__PURE__ */ requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
951
|
+
} else {
|
|
952
|
+
propTypes.exports = /* @__PURE__ */ requireFactoryWithThrowingShims()();
|
|
953
|
+
}
|
|
954
|
+
return propTypes.exports;
|
|
955
|
+
}
|
|
956
|
+
var propTypesExports = /* @__PURE__ */ requirePropTypes();
|
|
957
|
+
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
958
|
+
function hasClass(element, className) {
|
|
959
|
+
if (element.classList) return !!className && element.classList.contains(className);
|
|
960
|
+
return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
|
|
961
|
+
}
|
|
962
|
+
function addClass(element, className) {
|
|
963
|
+
if (element.classList) element.classList.add(className);
|
|
964
|
+
else if (!hasClass(element, className)) if (typeof element.className === "string") element.className = element.className + " " + className;
|
|
965
|
+
else element.setAttribute("class", (element.className && element.className.baseVal || "") + " " + className);
|
|
966
|
+
}
|
|
967
|
+
function replaceClassName(origClass, classToRemove) {
|
|
968
|
+
return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
969
|
+
}
|
|
970
|
+
function removeClass$1(element, className) {
|
|
971
|
+
if (element.classList) {
|
|
972
|
+
element.classList.remove(className);
|
|
973
|
+
} else if (typeof element.className === "string") {
|
|
974
|
+
element.className = replaceClassName(element.className, className);
|
|
975
|
+
} else {
|
|
976
|
+
element.setAttribute("class", replaceClassName(element.className && element.className.baseVal || "", className));
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
const config = {
|
|
980
|
+
disabled: false
|
|
981
|
+
};
|
|
982
|
+
var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
983
|
+
enter: PropTypes.number,
|
|
984
|
+
exit: PropTypes.number,
|
|
985
|
+
appear: PropTypes.number
|
|
986
|
+
}).isRequired]) : null;
|
|
987
|
+
var classNamesShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
988
|
+
enter: PropTypes.string,
|
|
989
|
+
exit: PropTypes.string,
|
|
990
|
+
active: PropTypes.string
|
|
991
|
+
}), PropTypes.shape({
|
|
992
|
+
enter: PropTypes.string,
|
|
993
|
+
enterDone: PropTypes.string,
|
|
994
|
+
enterActive: PropTypes.string,
|
|
995
|
+
exit: PropTypes.string,
|
|
996
|
+
exitDone: PropTypes.string,
|
|
997
|
+
exitActive: PropTypes.string
|
|
998
|
+
})]) : null;
|
|
999
|
+
const TransitionGroupContext = React__default.createContext(null);
|
|
1000
|
+
var forceReflow = function forceReflow2(node) {
|
|
1001
|
+
return node.scrollTop;
|
|
1002
|
+
};
|
|
1003
|
+
var UNMOUNTED = "unmounted";
|
|
1004
|
+
var EXITED = "exited";
|
|
1005
|
+
var ENTERING = "entering";
|
|
1006
|
+
var ENTERED = "entered";
|
|
1007
|
+
var EXITING = "exiting";
|
|
1008
|
+
var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
1009
|
+
_inheritsLoose(Transition2, _React$Component);
|
|
1010
|
+
function Transition2(props, context) {
|
|
1011
|
+
var _this;
|
|
1012
|
+
_this = _React$Component.call(this, props, context) || this;
|
|
1013
|
+
var parentGroup = context;
|
|
1014
|
+
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
|
1015
|
+
var initialStatus;
|
|
1016
|
+
_this.appearStatus = null;
|
|
1017
|
+
if (props.in) {
|
|
1018
|
+
if (appear) {
|
|
1019
|
+
initialStatus = EXITED;
|
|
1020
|
+
_this.appearStatus = ENTERING;
|
|
1021
|
+
} else {
|
|
1022
|
+
initialStatus = ENTERED;
|
|
1023
|
+
}
|
|
1024
|
+
} else {
|
|
1025
|
+
if (props.unmountOnExit || props.mountOnEnter) {
|
|
1026
|
+
initialStatus = UNMOUNTED;
|
|
1027
|
+
} else {
|
|
1028
|
+
initialStatus = EXITED;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
_this.state = {
|
|
1032
|
+
status: initialStatus
|
|
1033
|
+
};
|
|
1034
|
+
_this.nextCallback = null;
|
|
1035
|
+
return _this;
|
|
1036
|
+
}
|
|
1037
|
+
Transition2.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
|
|
1038
|
+
var nextIn = _ref.in;
|
|
1039
|
+
if (nextIn && prevState.status === UNMOUNTED) {
|
|
1040
|
+
return {
|
|
1041
|
+
status: EXITED
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
return null;
|
|
1045
|
+
};
|
|
1046
|
+
var _proto = Transition2.prototype;
|
|
1047
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
1048
|
+
this.updateStatus(true, this.appearStatus);
|
|
1049
|
+
};
|
|
1050
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
1051
|
+
var nextStatus = null;
|
|
1052
|
+
if (prevProps !== this.props) {
|
|
1053
|
+
var status = this.state.status;
|
|
1054
|
+
if (this.props.in) {
|
|
1055
|
+
if (status !== ENTERING && status !== ENTERED) {
|
|
1056
|
+
nextStatus = ENTERING;
|
|
1057
|
+
}
|
|
1058
|
+
} else {
|
|
1059
|
+
if (status === ENTERING || status === ENTERED) {
|
|
1060
|
+
nextStatus = EXITING;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
this.updateStatus(false, nextStatus);
|
|
1065
|
+
};
|
|
1066
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
1067
|
+
this.cancelNextCallback();
|
|
1068
|
+
};
|
|
1069
|
+
_proto.getTimeouts = function getTimeouts() {
|
|
1070
|
+
var timeout2 = this.props.timeout;
|
|
1071
|
+
var exit, enter, appear;
|
|
1072
|
+
exit = enter = appear = timeout2;
|
|
1073
|
+
if (timeout2 != null && typeof timeout2 !== "number") {
|
|
1074
|
+
exit = timeout2.exit;
|
|
1075
|
+
enter = timeout2.enter;
|
|
1076
|
+
appear = timeout2.appear !== void 0 ? timeout2.appear : enter;
|
|
1077
|
+
}
|
|
1078
|
+
return {
|
|
1079
|
+
exit,
|
|
1080
|
+
enter,
|
|
1081
|
+
appear
|
|
1082
|
+
};
|
|
1083
|
+
};
|
|
1084
|
+
_proto.updateStatus = function updateStatus(mounting, nextStatus) {
|
|
1085
|
+
if (mounting === void 0) {
|
|
1086
|
+
mounting = false;
|
|
1087
|
+
}
|
|
1088
|
+
if (nextStatus !== null) {
|
|
1089
|
+
this.cancelNextCallback();
|
|
1090
|
+
if (nextStatus === ENTERING) {
|
|
1091
|
+
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
1092
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
|
|
1093
|
+
if (node) forceReflow(node);
|
|
1094
|
+
}
|
|
1095
|
+
this.performEnter(mounting);
|
|
1096
|
+
} else {
|
|
1097
|
+
this.performExit();
|
|
1098
|
+
}
|
|
1099
|
+
} else if (this.props.unmountOnExit && this.state.status === EXITED) {
|
|
1100
|
+
this.setState({
|
|
1101
|
+
status: UNMOUNTED
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
_proto.performEnter = function performEnter(mounting) {
|
|
1106
|
+
var _this2 = this;
|
|
1107
|
+
var enter = this.props.enter;
|
|
1108
|
+
var appearing = this.context ? this.context.isMounting : mounting;
|
|
1109
|
+
var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
|
|
1110
|
+
var timeouts = this.getTimeouts();
|
|
1111
|
+
var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
|
|
1112
|
+
if (!mounting && !enter || config.disabled) {
|
|
1113
|
+
this.safeSetState({
|
|
1114
|
+
status: ENTERED
|
|
1115
|
+
}, function() {
|
|
1116
|
+
_this2.props.onEntered(maybeNode);
|
|
1117
|
+
});
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
this.props.onEnter(maybeNode, maybeAppearing);
|
|
1121
|
+
this.safeSetState({
|
|
1122
|
+
status: ENTERING
|
|
1123
|
+
}, function() {
|
|
1124
|
+
_this2.props.onEntering(maybeNode, maybeAppearing);
|
|
1125
|
+
_this2.onTransitionEnd(enterTimeout, function() {
|
|
1126
|
+
_this2.safeSetState({
|
|
1127
|
+
status: ENTERED
|
|
1128
|
+
}, function() {
|
|
1129
|
+
_this2.props.onEntered(maybeNode, maybeAppearing);
|
|
1130
|
+
});
|
|
1131
|
+
});
|
|
1132
|
+
});
|
|
1133
|
+
};
|
|
1134
|
+
_proto.performExit = function performExit() {
|
|
1135
|
+
var _this3 = this;
|
|
1136
|
+
var exit = this.props.exit;
|
|
1137
|
+
var timeouts = this.getTimeouts();
|
|
1138
|
+
var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
|
|
1139
|
+
if (!exit || config.disabled) {
|
|
1140
|
+
this.safeSetState({
|
|
1141
|
+
status: EXITED
|
|
1142
|
+
}, function() {
|
|
1143
|
+
_this3.props.onExited(maybeNode);
|
|
1144
|
+
});
|
|
1145
|
+
return;
|
|
1146
|
+
}
|
|
1147
|
+
this.props.onExit(maybeNode);
|
|
1148
|
+
this.safeSetState({
|
|
1149
|
+
status: EXITING
|
|
1150
|
+
}, function() {
|
|
1151
|
+
_this3.props.onExiting(maybeNode);
|
|
1152
|
+
_this3.onTransitionEnd(timeouts.exit, function() {
|
|
1153
|
+
_this3.safeSetState({
|
|
1154
|
+
status: EXITED
|
|
1155
|
+
}, function() {
|
|
1156
|
+
_this3.props.onExited(maybeNode);
|
|
1157
|
+
});
|
|
1158
|
+
});
|
|
1159
|
+
});
|
|
1160
|
+
};
|
|
1161
|
+
_proto.cancelNextCallback = function cancelNextCallback() {
|
|
1162
|
+
if (this.nextCallback !== null) {
|
|
1163
|
+
this.nextCallback.cancel();
|
|
1164
|
+
this.nextCallback = null;
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
_proto.safeSetState = function safeSetState(nextState, callback) {
|
|
1168
|
+
callback = this.setNextCallback(callback);
|
|
1169
|
+
this.setState(nextState, callback);
|
|
1170
|
+
};
|
|
1171
|
+
_proto.setNextCallback = function setNextCallback(callback) {
|
|
1172
|
+
var _this4 = this;
|
|
1173
|
+
var active = true;
|
|
1174
|
+
this.nextCallback = function(event) {
|
|
1175
|
+
if (active) {
|
|
1176
|
+
active = false;
|
|
1177
|
+
_this4.nextCallback = null;
|
|
1178
|
+
callback(event);
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
this.nextCallback.cancel = function() {
|
|
1182
|
+
active = false;
|
|
1183
|
+
};
|
|
1184
|
+
return this.nextCallback;
|
|
1185
|
+
};
|
|
1186
|
+
_proto.onTransitionEnd = function onTransitionEnd(timeout2, handler) {
|
|
1187
|
+
this.setNextCallback(handler);
|
|
1188
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
|
|
1189
|
+
var doesNotHaveTimeoutOrListener = timeout2 == null && !this.props.addEndListener;
|
|
1190
|
+
if (!node || doesNotHaveTimeoutOrListener) {
|
|
1191
|
+
setTimeout(this.nextCallback, 0);
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1194
|
+
if (this.props.addEndListener) {
|
|
1195
|
+
var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], maybeNode = _ref3[0], maybeNextCallback = _ref3[1];
|
|
1196
|
+
this.props.addEndListener(maybeNode, maybeNextCallback);
|
|
1197
|
+
}
|
|
1198
|
+
if (timeout2 != null) {
|
|
1199
|
+
setTimeout(this.nextCallback, timeout2);
|
|
1200
|
+
}
|
|
1201
|
+
};
|
|
1202
|
+
_proto.render = function render() {
|
|
1203
|
+
var status = this.state.status;
|
|
1204
|
+
if (status === UNMOUNTED) {
|
|
1205
|
+
return null;
|
|
1206
|
+
}
|
|
1207
|
+
var _this$props = this.props, children = _this$props.children;
|
|
1208
|
+
_this$props.in;
|
|
1209
|
+
_this$props.mountOnEnter;
|
|
1210
|
+
_this$props.unmountOnExit;
|
|
1211
|
+
_this$props.appear;
|
|
1212
|
+
_this$props.enter;
|
|
1213
|
+
_this$props.exit;
|
|
1214
|
+
_this$props.timeout;
|
|
1215
|
+
_this$props.addEndListener;
|
|
1216
|
+
_this$props.onEnter;
|
|
1217
|
+
_this$props.onEntering;
|
|
1218
|
+
_this$props.onEntered;
|
|
1219
|
+
_this$props.onExit;
|
|
1220
|
+
_this$props.onExiting;
|
|
1221
|
+
_this$props.onExited;
|
|
1222
|
+
_this$props.nodeRef;
|
|
1223
|
+
var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
1224
|
+
return (
|
|
1225
|
+
// allows for nested Transitions
|
|
1226
|
+
/* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
|
|
1227
|
+
value: null
|
|
1228
|
+
}, typeof children === "function" ? children(status, childProps) : React__default.cloneElement(React__default.Children.only(children), childProps))
|
|
1229
|
+
);
|
|
1230
|
+
};
|
|
1231
|
+
return Transition2;
|
|
1232
|
+
}(React__default.Component);
|
|
1233
|
+
Transition.contextType = TransitionGroupContext;
|
|
1234
|
+
Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1235
|
+
/**
|
|
1236
|
+
* A React reference to DOM element that need to transition:
|
|
1237
|
+
* https://stackoverflow.com/a/51127130/4671932
|
|
1238
|
+
*
|
|
1239
|
+
* - When `nodeRef` prop is used, `node` is not passed to callback functions
|
|
1240
|
+
* (e.g. `onEnter`) because user already has direct access to the node.
|
|
1241
|
+
* - When changing `key` prop of `Transition` in a `TransitionGroup` a new
|
|
1242
|
+
* `nodeRef` need to be provided to `Transition` with changed `key` prop
|
|
1243
|
+
* (see
|
|
1244
|
+
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
1245
|
+
*/
|
|
1246
|
+
nodeRef: PropTypes.shape({
|
|
1247
|
+
current: typeof Element === "undefined" ? PropTypes.any : function(propValue, key, componentName, location, propFullName, secret) {
|
|
1248
|
+
var value = propValue[key];
|
|
1249
|
+
return PropTypes.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
1250
|
+
}
|
|
1251
|
+
}),
|
|
1252
|
+
/**
|
|
1253
|
+
* A `function` child can be used instead of a React element. This function is
|
|
1254
|
+
* called with the current transition status (`'entering'`, `'entered'`,
|
|
1255
|
+
* `'exiting'`, `'exited'`), which can be used to apply context
|
|
1256
|
+
* specific props to a component.
|
|
1257
|
+
*
|
|
1258
|
+
* ```jsx
|
|
1259
|
+
* <Transition in={this.state.in} timeout={150}>
|
|
1260
|
+
* {state => (
|
|
1261
|
+
* <MyComponent className={`fade fade-${state}`} />
|
|
1262
|
+
* )}
|
|
1263
|
+
* </Transition>
|
|
1264
|
+
* ```
|
|
1265
|
+
*/
|
|
1266
|
+
children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
|
1267
|
+
/**
|
|
1268
|
+
* Show the component; triggers the enter or exit states
|
|
1269
|
+
*/
|
|
1270
|
+
in: PropTypes.bool,
|
|
1271
|
+
/**
|
|
1272
|
+
* By default the child component is mounted immediately along with
|
|
1273
|
+
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
1274
|
+
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
1275
|
+
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
1276
|
+
*/
|
|
1277
|
+
mountOnEnter: PropTypes.bool,
|
|
1278
|
+
/**
|
|
1279
|
+
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
1280
|
+
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
1281
|
+
*/
|
|
1282
|
+
unmountOnExit: PropTypes.bool,
|
|
1283
|
+
/**
|
|
1284
|
+
* By default the child component does not perform the enter transition when
|
|
1285
|
+
* it first mounts, regardless of the value of `in`. If you want this
|
|
1286
|
+
* behavior, set both `appear` and `in` to `true`.
|
|
1287
|
+
*
|
|
1288
|
+
* > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
|
|
1289
|
+
* > only adds an additional enter transition. However, in the
|
|
1290
|
+
* > `<CSSTransition>` component that first enter transition does result in
|
|
1291
|
+
* > additional `.appear-*` classes, that way you can choose to style it
|
|
1292
|
+
* > differently.
|
|
1293
|
+
*/
|
|
1294
|
+
appear: PropTypes.bool,
|
|
1295
|
+
/**
|
|
1296
|
+
* Enable or disable enter transitions.
|
|
1297
|
+
*/
|
|
1298
|
+
enter: PropTypes.bool,
|
|
1299
|
+
/**
|
|
1300
|
+
* Enable or disable exit transitions.
|
|
1301
|
+
*/
|
|
1302
|
+
exit: PropTypes.bool,
|
|
1303
|
+
/**
|
|
1304
|
+
* The duration of the transition, in milliseconds.
|
|
1305
|
+
* Required unless `addEndListener` is provided.
|
|
1306
|
+
*
|
|
1307
|
+
* You may specify a single timeout for all transitions:
|
|
1308
|
+
*
|
|
1309
|
+
* ```jsx
|
|
1310
|
+
* timeout={500}
|
|
1311
|
+
* ```
|
|
1312
|
+
*
|
|
1313
|
+
* or individually:
|
|
1314
|
+
*
|
|
1315
|
+
* ```jsx
|
|
1316
|
+
* timeout={{
|
|
1317
|
+
* appear: 500,
|
|
1318
|
+
* enter: 300,
|
|
1319
|
+
* exit: 500,
|
|
1320
|
+
* }}
|
|
1321
|
+
* ```
|
|
1322
|
+
*
|
|
1323
|
+
* - `appear` defaults to the value of `enter`
|
|
1324
|
+
* - `enter` defaults to `0`
|
|
1325
|
+
* - `exit` defaults to `0`
|
|
1326
|
+
*
|
|
1327
|
+
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
1328
|
+
*/
|
|
1329
|
+
timeout: function timeout(props) {
|
|
1330
|
+
var pt = timeoutsShape;
|
|
1331
|
+
if (!props.addEndListener) pt = pt.isRequired;
|
|
1332
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1333
|
+
args[_key - 1] = arguments[_key];
|
|
1334
|
+
}
|
|
1335
|
+
return pt.apply(void 0, [props].concat(args));
|
|
1336
|
+
},
|
|
1337
|
+
/**
|
|
1338
|
+
* Add a custom transition end trigger. Called with the transitioning
|
|
1339
|
+
* DOM node and a `done` callback. Allows for more fine grained transition end
|
|
1340
|
+
* logic. Timeouts are still used as a fallback if provided.
|
|
1341
|
+
*
|
|
1342
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1343
|
+
*
|
|
1344
|
+
* ```jsx
|
|
1345
|
+
* addEndListener={(node, done) => {
|
|
1346
|
+
* // use the css transitionend event to mark the finish of a transition
|
|
1347
|
+
* node.addEventListener('transitionend', done, false);
|
|
1348
|
+
* }}
|
|
1349
|
+
* ```
|
|
1350
|
+
*/
|
|
1351
|
+
addEndListener: PropTypes.func,
|
|
1352
|
+
/**
|
|
1353
|
+
* Callback fired before the "entering" status is applied. An extra parameter
|
|
1354
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
1355
|
+
*
|
|
1356
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1357
|
+
*
|
|
1358
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
1359
|
+
*/
|
|
1360
|
+
onEnter: PropTypes.func,
|
|
1361
|
+
/**
|
|
1362
|
+
* Callback fired after the "entering" status is applied. An extra parameter
|
|
1363
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
1364
|
+
*
|
|
1365
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1366
|
+
*
|
|
1367
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
1368
|
+
*/
|
|
1369
|
+
onEntering: PropTypes.func,
|
|
1370
|
+
/**
|
|
1371
|
+
* Callback fired after the "entered" status is applied. An extra parameter
|
|
1372
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
1373
|
+
*
|
|
1374
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1375
|
+
*
|
|
1376
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
1377
|
+
*/
|
|
1378
|
+
onEntered: PropTypes.func,
|
|
1379
|
+
/**
|
|
1380
|
+
* Callback fired before the "exiting" status is applied.
|
|
1381
|
+
*
|
|
1382
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1383
|
+
*
|
|
1384
|
+
* @type Function(node: HtmlElement) -> void
|
|
1385
|
+
*/
|
|
1386
|
+
onExit: PropTypes.func,
|
|
1387
|
+
/**
|
|
1388
|
+
* Callback fired after the "exiting" status is applied.
|
|
1389
|
+
*
|
|
1390
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1391
|
+
*
|
|
1392
|
+
* @type Function(node: HtmlElement) -> void
|
|
1393
|
+
*/
|
|
1394
|
+
onExiting: PropTypes.func,
|
|
1395
|
+
/**
|
|
1396
|
+
* Callback fired after the "exited" status is applied.
|
|
1397
|
+
*
|
|
1398
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
1399
|
+
*
|
|
1400
|
+
* @type Function(node: HtmlElement) -> void
|
|
1401
|
+
*/
|
|
1402
|
+
onExited: PropTypes.func
|
|
1403
|
+
} : {};
|
|
1404
|
+
function noop() {
|
|
1405
|
+
}
|
|
1406
|
+
Transition.defaultProps = {
|
|
1407
|
+
in: false,
|
|
1408
|
+
mountOnEnter: false,
|
|
1409
|
+
unmountOnExit: false,
|
|
1410
|
+
appear: false,
|
|
1411
|
+
enter: true,
|
|
1412
|
+
exit: true,
|
|
1413
|
+
onEnter: noop,
|
|
1414
|
+
onEntering: noop,
|
|
1415
|
+
onEntered: noop,
|
|
1416
|
+
onExit: noop,
|
|
1417
|
+
onExiting: noop,
|
|
1418
|
+
onExited: noop
|
|
1419
|
+
};
|
|
1420
|
+
Transition.UNMOUNTED = UNMOUNTED;
|
|
1421
|
+
Transition.EXITED = EXITED;
|
|
1422
|
+
Transition.ENTERING = ENTERING;
|
|
1423
|
+
Transition.ENTERED = ENTERED;
|
|
1424
|
+
Transition.EXITING = EXITING;
|
|
1425
|
+
var _addClass = function addClass$1(node, classes) {
|
|
1426
|
+
return node && classes && classes.split(" ").forEach(function(c) {
|
|
1427
|
+
return addClass(node, c);
|
|
1428
|
+
});
|
|
1429
|
+
};
|
|
1430
|
+
var removeClass = function removeClass2(node, classes) {
|
|
1431
|
+
return node && classes && classes.split(" ").forEach(function(c) {
|
|
1432
|
+
return removeClass$1(node, c);
|
|
1433
|
+
});
|
|
1434
|
+
};
|
|
1435
|
+
var CSSTransition = /* @__PURE__ */ function(_React$Component) {
|
|
1436
|
+
_inheritsLoose(CSSTransition2, _React$Component);
|
|
1437
|
+
function CSSTransition2() {
|
|
1438
|
+
var _this;
|
|
1439
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1440
|
+
args[_key] = arguments[_key];
|
|
1441
|
+
}
|
|
1442
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
1443
|
+
_this.appliedClasses = {
|
|
1444
|
+
appear: {},
|
|
1445
|
+
enter: {},
|
|
1446
|
+
exit: {}
|
|
1447
|
+
};
|
|
1448
|
+
_this.onEnter = function(maybeNode, maybeAppearing) {
|
|
1449
|
+
var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument[0], appearing = _this$resolveArgument[1];
|
|
1450
|
+
_this.removeClasses(node, "exit");
|
|
1451
|
+
_this.addClass(node, appearing ? "appear" : "enter", "base");
|
|
1452
|
+
if (_this.props.onEnter) {
|
|
1453
|
+
_this.props.onEnter(maybeNode, maybeAppearing);
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
_this.onEntering = function(maybeNode, maybeAppearing) {
|
|
1457
|
+
var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument2[0], appearing = _this$resolveArgument2[1];
|
|
1458
|
+
var type = appearing ? "appear" : "enter";
|
|
1459
|
+
_this.addClass(node, type, "active");
|
|
1460
|
+
if (_this.props.onEntering) {
|
|
1461
|
+
_this.props.onEntering(maybeNode, maybeAppearing);
|
|
1462
|
+
}
|
|
1463
|
+
};
|
|
1464
|
+
_this.onEntered = function(maybeNode, maybeAppearing) {
|
|
1465
|
+
var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument3[0], appearing = _this$resolveArgument3[1];
|
|
1466
|
+
var type = appearing ? "appear" : "enter";
|
|
1467
|
+
_this.removeClasses(node, type);
|
|
1468
|
+
_this.addClass(node, type, "done");
|
|
1469
|
+
if (_this.props.onEntered) {
|
|
1470
|
+
_this.props.onEntered(maybeNode, maybeAppearing);
|
|
1471
|
+
}
|
|
1472
|
+
};
|
|
1473
|
+
_this.onExit = function(maybeNode) {
|
|
1474
|
+
var _this$resolveArgument4 = _this.resolveArguments(maybeNode), node = _this$resolveArgument4[0];
|
|
1475
|
+
_this.removeClasses(node, "appear");
|
|
1476
|
+
_this.removeClasses(node, "enter");
|
|
1477
|
+
_this.addClass(node, "exit", "base");
|
|
1478
|
+
if (_this.props.onExit) {
|
|
1479
|
+
_this.props.onExit(maybeNode);
|
|
1480
|
+
}
|
|
1481
|
+
};
|
|
1482
|
+
_this.onExiting = function(maybeNode) {
|
|
1483
|
+
var _this$resolveArgument5 = _this.resolveArguments(maybeNode), node = _this$resolveArgument5[0];
|
|
1484
|
+
_this.addClass(node, "exit", "active");
|
|
1485
|
+
if (_this.props.onExiting) {
|
|
1486
|
+
_this.props.onExiting(maybeNode);
|
|
1487
|
+
}
|
|
1488
|
+
};
|
|
1489
|
+
_this.onExited = function(maybeNode) {
|
|
1490
|
+
var _this$resolveArgument6 = _this.resolveArguments(maybeNode), node = _this$resolveArgument6[0];
|
|
1491
|
+
_this.removeClasses(node, "exit");
|
|
1492
|
+
_this.addClass(node, "exit", "done");
|
|
1493
|
+
if (_this.props.onExited) {
|
|
1494
|
+
_this.props.onExited(maybeNode);
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
_this.resolveArguments = function(maybeNode, maybeAppearing) {
|
|
1498
|
+
return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] : [maybeNode, maybeAppearing];
|
|
1499
|
+
};
|
|
1500
|
+
_this.getClassNames = function(type) {
|
|
1501
|
+
var classNames = _this.props.classNames;
|
|
1502
|
+
var isStringClassNames = typeof classNames === "string";
|
|
1503
|
+
var prefix = isStringClassNames && classNames ? classNames + "-" : "";
|
|
1504
|
+
var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
|
|
1505
|
+
var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
|
|
1506
|
+
var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
|
|
1507
|
+
return {
|
|
1508
|
+
baseClassName,
|
|
1509
|
+
activeClassName,
|
|
1510
|
+
doneClassName
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
return _this;
|
|
1514
|
+
}
|
|
1515
|
+
var _proto = CSSTransition2.prototype;
|
|
1516
|
+
_proto.addClass = function addClass2(node, type, phase) {
|
|
1517
|
+
var className = this.getClassNames(type)[phase + "ClassName"];
|
|
1518
|
+
var _this$getClassNames = this.getClassNames("enter"), doneClassName = _this$getClassNames.doneClassName;
|
|
1519
|
+
if (type === "appear" && phase === "done" && doneClassName) {
|
|
1520
|
+
className += " " + doneClassName;
|
|
1521
|
+
}
|
|
1522
|
+
if (phase === "active") {
|
|
1523
|
+
if (node) forceReflow(node);
|
|
1524
|
+
}
|
|
1525
|
+
if (className) {
|
|
1526
|
+
this.appliedClasses[type][phase] = className;
|
|
1527
|
+
_addClass(node, className);
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
_proto.removeClasses = function removeClasses(node, type) {
|
|
1531
|
+
var _this$appliedClasses$ = this.appliedClasses[type], baseClassName = _this$appliedClasses$.base, activeClassName = _this$appliedClasses$.active, doneClassName = _this$appliedClasses$.done;
|
|
1532
|
+
this.appliedClasses[type] = {};
|
|
1533
|
+
if (baseClassName) {
|
|
1534
|
+
removeClass(node, baseClassName);
|
|
1535
|
+
}
|
|
1536
|
+
if (activeClassName) {
|
|
1537
|
+
removeClass(node, activeClassName);
|
|
1538
|
+
}
|
|
1539
|
+
if (doneClassName) {
|
|
1540
|
+
removeClass(node, doneClassName);
|
|
1541
|
+
}
|
|
1542
|
+
};
|
|
1543
|
+
_proto.render = function render() {
|
|
1544
|
+
var _this$props = this.props;
|
|
1545
|
+
_this$props.classNames;
|
|
1546
|
+
var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
|
|
1547
|
+
return /* @__PURE__ */ React__default.createElement(Transition, _extends({}, props, {
|
|
1548
|
+
onEnter: this.onEnter,
|
|
1549
|
+
onEntered: this.onEntered,
|
|
1550
|
+
onEntering: this.onEntering,
|
|
1551
|
+
onExit: this.onExit,
|
|
1552
|
+
onExiting: this.onExiting,
|
|
1553
|
+
onExited: this.onExited
|
|
1554
|
+
}));
|
|
1555
|
+
};
|
|
1556
|
+
return CSSTransition2;
|
|
1557
|
+
}(React__default.Component);
|
|
1558
|
+
CSSTransition.defaultProps = {
|
|
1559
|
+
classNames: ""
|
|
1560
|
+
};
|
|
1561
|
+
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, Transition.propTypes, {
|
|
1562
|
+
/**
|
|
1563
|
+
* The animation classNames applied to the component as it appears, enters,
|
|
1564
|
+
* exits or has finished the transition. A single name can be provided, which
|
|
1565
|
+
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
|
|
1566
|
+
*
|
|
1567
|
+
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
|
|
1568
|
+
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
|
|
1569
|
+
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
|
|
1570
|
+
*
|
|
1571
|
+
* A few details to note about how these classes are applied:
|
|
1572
|
+
*
|
|
1573
|
+
* 1. They are _joined_ with the ones that are already defined on the child
|
|
1574
|
+
* component, so if you want to add some base styles, you can use
|
|
1575
|
+
* `className` without worrying that it will be overridden.
|
|
1576
|
+
*
|
|
1577
|
+
* 2. If the transition component mounts with `in={false}`, no classes are
|
|
1578
|
+
* applied yet. You might be expecting `*-exit-done`, but if you think
|
|
1579
|
+
* about it, a component cannot finish exiting if it hasn't entered yet.
|
|
1580
|
+
*
|
|
1581
|
+
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
|
|
1582
|
+
* allows you to define different behavior for when appearing is done and
|
|
1583
|
+
* when regular entering is done, using selectors like
|
|
1584
|
+
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
|
|
1585
|
+
* an epic entrance animation when element first appears in the DOM using
|
|
1586
|
+
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
|
1587
|
+
* simply use `fade-enter-done` for defining both cases.
|
|
1588
|
+
*
|
|
1589
|
+
* Each individual classNames can also be specified independently like:
|
|
1590
|
+
*
|
|
1591
|
+
* ```js
|
|
1592
|
+
* classNames={{
|
|
1593
|
+
* appear: 'my-appear',
|
|
1594
|
+
* appearActive: 'my-active-appear',
|
|
1595
|
+
* appearDone: 'my-done-appear',
|
|
1596
|
+
* enter: 'my-enter',
|
|
1597
|
+
* enterActive: 'my-active-enter',
|
|
1598
|
+
* enterDone: 'my-done-enter',
|
|
1599
|
+
* exit: 'my-exit',
|
|
1600
|
+
* exitActive: 'my-active-exit',
|
|
1601
|
+
* exitDone: 'my-done-exit',
|
|
1602
|
+
* }}
|
|
1603
|
+
* ```
|
|
1604
|
+
*
|
|
1605
|
+
* If you want to set these classes using CSS Modules:
|
|
1606
|
+
*
|
|
1607
|
+
* ```js
|
|
1608
|
+
* import styles from './styles.css';
|
|
1609
|
+
* ```
|
|
1610
|
+
*
|
|
1611
|
+
* you might want to use camelCase in your CSS file, that way could simply
|
|
1612
|
+
* spread them instead of listing them one by one:
|
|
1613
|
+
*
|
|
1614
|
+
* ```js
|
|
1615
|
+
* classNames={{ ...styles }}
|
|
1616
|
+
* ```
|
|
1617
|
+
*
|
|
1618
|
+
* @type {string | {
|
|
1619
|
+
* appear?: string,
|
|
1620
|
+
* appearActive?: string,
|
|
1621
|
+
* appearDone?: string,
|
|
1622
|
+
* enter?: string,
|
|
1623
|
+
* enterActive?: string,
|
|
1624
|
+
* enterDone?: string,
|
|
1625
|
+
* exit?: string,
|
|
1626
|
+
* exitActive?: string,
|
|
1627
|
+
* exitDone?: string,
|
|
1628
|
+
* }}
|
|
1629
|
+
*/
|
|
1630
|
+
classNames: classNamesShape,
|
|
1631
|
+
/**
|
|
1632
|
+
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
|
1633
|
+
* applied.
|
|
1634
|
+
*
|
|
1635
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1636
|
+
*
|
|
1637
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
1638
|
+
*/
|
|
1639
|
+
onEnter: PropTypes.func,
|
|
1640
|
+
/**
|
|
1641
|
+
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
1642
|
+
* 'appear-active' class is applied.
|
|
1643
|
+
*
|
|
1644
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1645
|
+
*
|
|
1646
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
1647
|
+
*/
|
|
1648
|
+
onEntering: PropTypes.func,
|
|
1649
|
+
/**
|
|
1650
|
+
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
1651
|
+
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
1652
|
+
*
|
|
1653
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1654
|
+
*
|
|
1655
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
1656
|
+
*/
|
|
1657
|
+
onEntered: PropTypes.func,
|
|
1658
|
+
/**
|
|
1659
|
+
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
1660
|
+
* applied.
|
|
1661
|
+
*
|
|
1662
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
1663
|
+
*
|
|
1664
|
+
* @type Function(node: HtmlElement)
|
|
1665
|
+
*/
|
|
1666
|
+
onExit: PropTypes.func,
|
|
1667
|
+
/**
|
|
1668
|
+
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
1669
|
+
*
|
|
1670
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
1671
|
+
*
|
|
1672
|
+
* @type Function(node: HtmlElement)
|
|
1673
|
+
*/
|
|
1674
|
+
onExiting: PropTypes.func,
|
|
1675
|
+
/**
|
|
1676
|
+
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
1677
|
+
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
1678
|
+
*
|
|
1679
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
1680
|
+
*
|
|
1681
|
+
* @type Function(node: HtmlElement)
|
|
1682
|
+
*/
|
|
1683
|
+
onExited: PropTypes.func
|
|
1684
|
+
}) : {};
|
|
1685
|
+
export {
|
|
1686
|
+
CSSTransition as C,
|
|
1687
|
+
PropTypes as P,
|
|
1688
|
+
TransitionGroupContext as T,
|
|
1689
|
+
_inheritsLoose as _
|
|
1690
|
+
};
|