@scalant/components 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.es.js +397 -85
- package/dist/components.umd.js +11 -2
- package/package.json +2 -2
package/dist/components.es.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,9 +29,9 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
29
|
-
import
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
33
|
+
import * as React from "react";
|
|
30
34
|
import React__default, { isValidElement, version as version$2, useContext, createContext, useRef, useLayoutEffect as useLayoutEffect$1, useEffect, forwardRef, useState, useMemo as useMemo$1, Children } from "react";
|
|
31
|
-
import { isMemo, ForwardRef } from "react-is";
|
|
32
35
|
import * as ReactDOM from "react-dom";
|
|
33
36
|
import ReactDOM__default from "react-dom";
|
|
34
37
|
function getDefaultExportFromCjs(x) {
|
|
@@ -236,8 +239,317 @@ function findDOMNode(node2) {
|
|
|
236
239
|
}
|
|
237
240
|
return null;
|
|
238
241
|
}
|
|
242
|
+
var reactIs = { exports: {} };
|
|
243
|
+
var reactIs_production_min = {};
|
|
244
|
+
/**
|
|
245
|
+
* @license React
|
|
246
|
+
* react-is.production.min.js
|
|
247
|
+
*
|
|
248
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the MIT license found in the
|
|
251
|
+
* LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/
|
|
253
|
+
var hasRequiredReactIs_production_min;
|
|
254
|
+
function requireReactIs_production_min() {
|
|
255
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
256
|
+
hasRequiredReactIs_production_min = 1;
|
|
257
|
+
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
|
|
258
|
+
u = Symbol.for("react.module.reference");
|
|
259
|
+
function v(a) {
|
|
260
|
+
if ("object" === typeof a && null !== a) {
|
|
261
|
+
var r = a.$$typeof;
|
|
262
|
+
switch (r) {
|
|
263
|
+
case b:
|
|
264
|
+
switch (a = a.type, a) {
|
|
265
|
+
case d:
|
|
266
|
+
case f:
|
|
267
|
+
case e:
|
|
268
|
+
case m:
|
|
269
|
+
case n:
|
|
270
|
+
return a;
|
|
271
|
+
default:
|
|
272
|
+
switch (a = a && a.$$typeof, a) {
|
|
273
|
+
case k:
|
|
274
|
+
case h:
|
|
275
|
+
case l:
|
|
276
|
+
case q:
|
|
277
|
+
case p:
|
|
278
|
+
case g:
|
|
279
|
+
return a;
|
|
280
|
+
default:
|
|
281
|
+
return r;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
case c:
|
|
285
|
+
return r;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
reactIs_production_min.ContextConsumer = h;
|
|
290
|
+
reactIs_production_min.ContextProvider = g;
|
|
291
|
+
reactIs_production_min.Element = b;
|
|
292
|
+
reactIs_production_min.ForwardRef = l;
|
|
293
|
+
reactIs_production_min.Fragment = d;
|
|
294
|
+
reactIs_production_min.Lazy = q;
|
|
295
|
+
reactIs_production_min.Memo = p;
|
|
296
|
+
reactIs_production_min.Portal = c;
|
|
297
|
+
reactIs_production_min.Profiler = f;
|
|
298
|
+
reactIs_production_min.StrictMode = e;
|
|
299
|
+
reactIs_production_min.Suspense = m;
|
|
300
|
+
reactIs_production_min.SuspenseList = n;
|
|
301
|
+
reactIs_production_min.isAsyncMode = function() {
|
|
302
|
+
return false;
|
|
303
|
+
};
|
|
304
|
+
reactIs_production_min.isConcurrentMode = function() {
|
|
305
|
+
return false;
|
|
306
|
+
};
|
|
307
|
+
reactIs_production_min.isContextConsumer = function(a) {
|
|
308
|
+
return v(a) === h;
|
|
309
|
+
};
|
|
310
|
+
reactIs_production_min.isContextProvider = function(a) {
|
|
311
|
+
return v(a) === g;
|
|
312
|
+
};
|
|
313
|
+
reactIs_production_min.isElement = function(a) {
|
|
314
|
+
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
315
|
+
};
|
|
316
|
+
reactIs_production_min.isForwardRef = function(a) {
|
|
317
|
+
return v(a) === l;
|
|
318
|
+
};
|
|
319
|
+
reactIs_production_min.isFragment = function(a) {
|
|
320
|
+
return v(a) === d;
|
|
321
|
+
};
|
|
322
|
+
reactIs_production_min.isLazy = function(a) {
|
|
323
|
+
return v(a) === q;
|
|
324
|
+
};
|
|
325
|
+
reactIs_production_min.isMemo = function(a) {
|
|
326
|
+
return v(a) === p;
|
|
327
|
+
};
|
|
328
|
+
reactIs_production_min.isPortal = function(a) {
|
|
329
|
+
return v(a) === c;
|
|
330
|
+
};
|
|
331
|
+
reactIs_production_min.isProfiler = function(a) {
|
|
332
|
+
return v(a) === f;
|
|
333
|
+
};
|
|
334
|
+
reactIs_production_min.isStrictMode = function(a) {
|
|
335
|
+
return v(a) === e;
|
|
336
|
+
};
|
|
337
|
+
reactIs_production_min.isSuspense = function(a) {
|
|
338
|
+
return v(a) === m;
|
|
339
|
+
};
|
|
340
|
+
reactIs_production_min.isSuspenseList = function(a) {
|
|
341
|
+
return v(a) === n;
|
|
342
|
+
};
|
|
343
|
+
reactIs_production_min.isValidElementType = function(a) {
|
|
344
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false;
|
|
345
|
+
};
|
|
346
|
+
reactIs_production_min.typeOf = v;
|
|
347
|
+
return reactIs_production_min;
|
|
348
|
+
}
|
|
349
|
+
var reactIs_development = {};
|
|
350
|
+
/**
|
|
351
|
+
* @license React
|
|
352
|
+
* react-is.development.js
|
|
353
|
+
*
|
|
354
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the MIT license found in the
|
|
357
|
+
* LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/
|
|
359
|
+
var hasRequiredReactIs_development;
|
|
360
|
+
function requireReactIs_development() {
|
|
361
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
362
|
+
hasRequiredReactIs_development = 1;
|
|
363
|
+
if (process.env.NODE_ENV !== "production") {
|
|
364
|
+
(function() {
|
|
365
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
366
|
+
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
367
|
+
var REACT_FRAGMENT_TYPE2 = Symbol.for("react.fragment");
|
|
368
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
369
|
+
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
370
|
+
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
371
|
+
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
372
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
|
|
373
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
374
|
+
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
375
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
376
|
+
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
377
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
378
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
379
|
+
var enableScopeAPI = false;
|
|
380
|
+
var enableCacheElement = false;
|
|
381
|
+
var enableTransitionTracing = false;
|
|
382
|
+
var enableLegacyHidden = false;
|
|
383
|
+
var enableDebugTracing = false;
|
|
384
|
+
var REACT_MODULE_REFERENCE;
|
|
385
|
+
{
|
|
386
|
+
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
387
|
+
}
|
|
388
|
+
function isValidElementType(type) {
|
|
389
|
+
if (typeof type === "string" || typeof type === "function") {
|
|
390
|
+
return true;
|
|
391
|
+
}
|
|
392
|
+
if (type === REACT_FRAGMENT_TYPE2 || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
393
|
+
return true;
|
|
394
|
+
}
|
|
395
|
+
if (typeof type === "object" && type !== null) {
|
|
396
|
+
if (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 || // This needs to include all possible module reference object
|
|
397
|
+
// types supported by any Flight configuration anywhere since
|
|
398
|
+
// we don't know which Flight build this will end up being used
|
|
399
|
+
// with.
|
|
400
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
401
|
+
return true;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
function typeOf(object) {
|
|
407
|
+
if (typeof object === "object" && object !== null) {
|
|
408
|
+
var $$typeof = object.$$typeof;
|
|
409
|
+
switch ($$typeof) {
|
|
410
|
+
case REACT_ELEMENT_TYPE:
|
|
411
|
+
var type = object.type;
|
|
412
|
+
switch (type) {
|
|
413
|
+
case REACT_FRAGMENT_TYPE2:
|
|
414
|
+
case REACT_PROFILER_TYPE:
|
|
415
|
+
case REACT_STRICT_MODE_TYPE:
|
|
416
|
+
case REACT_SUSPENSE_TYPE:
|
|
417
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
418
|
+
return type;
|
|
419
|
+
default:
|
|
420
|
+
var $$typeofType = type && type.$$typeof;
|
|
421
|
+
switch ($$typeofType) {
|
|
422
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
423
|
+
case REACT_CONTEXT_TYPE:
|
|
424
|
+
case REACT_FORWARD_REF_TYPE:
|
|
425
|
+
case REACT_LAZY_TYPE:
|
|
426
|
+
case REACT_MEMO_TYPE:
|
|
427
|
+
case REACT_PROVIDER_TYPE:
|
|
428
|
+
return $$typeofType;
|
|
429
|
+
default:
|
|
430
|
+
return $$typeof;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
case REACT_PORTAL_TYPE:
|
|
434
|
+
return $$typeof;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
return void 0;
|
|
438
|
+
}
|
|
439
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
440
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
441
|
+
var Element2 = REACT_ELEMENT_TYPE;
|
|
442
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
443
|
+
var Fragment = REACT_FRAGMENT_TYPE2;
|
|
444
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
445
|
+
var Memo = REACT_MEMO_TYPE;
|
|
446
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
447
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
448
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
449
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
450
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
451
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
452
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
|
|
453
|
+
function isAsyncMode(object) {
|
|
454
|
+
{
|
|
455
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
456
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
457
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return false;
|
|
461
|
+
}
|
|
462
|
+
function isConcurrentMode(object) {
|
|
463
|
+
{
|
|
464
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
465
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true;
|
|
466
|
+
console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
function isContextConsumer(object) {
|
|
472
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
473
|
+
}
|
|
474
|
+
function isContextProvider(object) {
|
|
475
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
476
|
+
}
|
|
477
|
+
function isElement(object) {
|
|
478
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
479
|
+
}
|
|
480
|
+
function isForwardRef(object) {
|
|
481
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
482
|
+
}
|
|
483
|
+
function isFragment2(object) {
|
|
484
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE2;
|
|
485
|
+
}
|
|
486
|
+
function isLazy(object) {
|
|
487
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
488
|
+
}
|
|
489
|
+
function isMemo(object) {
|
|
490
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
491
|
+
}
|
|
492
|
+
function isPortal(object) {
|
|
493
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
494
|
+
}
|
|
495
|
+
function isProfiler(object) {
|
|
496
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
497
|
+
}
|
|
498
|
+
function isStrictMode(object) {
|
|
499
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
500
|
+
}
|
|
501
|
+
function isSuspense(object) {
|
|
502
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
503
|
+
}
|
|
504
|
+
function isSuspenseList(object) {
|
|
505
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
506
|
+
}
|
|
507
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
508
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
509
|
+
reactIs_development.Element = Element2;
|
|
510
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
511
|
+
reactIs_development.Fragment = Fragment;
|
|
512
|
+
reactIs_development.Lazy = Lazy;
|
|
513
|
+
reactIs_development.Memo = Memo;
|
|
514
|
+
reactIs_development.Portal = Portal;
|
|
515
|
+
reactIs_development.Profiler = Profiler;
|
|
516
|
+
reactIs_development.StrictMode = StrictMode;
|
|
517
|
+
reactIs_development.Suspense = Suspense;
|
|
518
|
+
reactIs_development.SuspenseList = SuspenseList;
|
|
519
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
520
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
521
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
522
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
523
|
+
reactIs_development.isElement = isElement;
|
|
524
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
525
|
+
reactIs_development.isFragment = isFragment2;
|
|
526
|
+
reactIs_development.isLazy = isLazy;
|
|
527
|
+
reactIs_development.isMemo = isMemo;
|
|
528
|
+
reactIs_development.isPortal = isPortal;
|
|
529
|
+
reactIs_development.isProfiler = isProfiler;
|
|
530
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
531
|
+
reactIs_development.isSuspense = isSuspense;
|
|
532
|
+
reactIs_development.isSuspenseList = isSuspenseList;
|
|
533
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
534
|
+
reactIs_development.typeOf = typeOf;
|
|
535
|
+
})();
|
|
536
|
+
}
|
|
537
|
+
return reactIs_development;
|
|
538
|
+
}
|
|
539
|
+
var hasRequiredReactIs;
|
|
540
|
+
function requireReactIs() {
|
|
541
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
542
|
+
hasRequiredReactIs = 1;
|
|
543
|
+
if (process.env.NODE_ENV === "production") {
|
|
544
|
+
reactIs.exports = requireReactIs_production_min();
|
|
545
|
+
} else {
|
|
546
|
+
reactIs.exports = requireReactIs_development();
|
|
547
|
+
}
|
|
548
|
+
return reactIs.exports;
|
|
549
|
+
}
|
|
550
|
+
var reactIsExports = requireReactIs();
|
|
239
551
|
function useMemo(getValue2, condition, shouldUpdate) {
|
|
240
|
-
var cacheRef = React
|
|
552
|
+
var cacheRef = React.useRef({});
|
|
241
553
|
if (!("value" in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
|
|
242
554
|
cacheRef.current.value = getValue2();
|
|
243
555
|
cacheRef.current.condition = condition;
|
|
@@ -286,11 +598,11 @@ var supportRef = function supportRef2(nodeOrComponent) {
|
|
|
286
598
|
if (isReactElement(nodeOrComponent) && ReactMajorVersion >= 19) {
|
|
287
599
|
return true;
|
|
288
600
|
}
|
|
289
|
-
var type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
|
|
290
|
-
if (typeof type === "function" && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== ForwardRef) {
|
|
601
|
+
var type = reactIsExports.isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
|
|
602
|
+
if (typeof type === "function" && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== reactIsExports.ForwardRef) {
|
|
291
603
|
return false;
|
|
292
604
|
}
|
|
293
|
-
if (typeof nodeOrComponent === "function" && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== ForwardRef) {
|
|
605
|
+
if (typeof nodeOrComponent === "function" && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== reactIsExports.ForwardRef) {
|
|
294
606
|
return false;
|
|
295
607
|
}
|
|
296
608
|
return true;
|
|
@@ -725,7 +1037,7 @@ function createCache() {
|
|
|
725
1037
|
}
|
|
726
1038
|
return new Entity(cssinjsInstanceId);
|
|
727
1039
|
}
|
|
728
|
-
var StyleContext = /* @__PURE__ */ React
|
|
1040
|
+
var StyleContext = /* @__PURE__ */ React.createContext({
|
|
729
1041
|
hashPriority: "low",
|
|
730
1042
|
cache: createCache(),
|
|
731
1043
|
defaultCache: true
|
|
@@ -986,9 +1298,9 @@ var transformToken = function transformToken2(token2, themeKey, config) {
|
|
|
986
1298
|
scope: config === null || config === void 0 ? void 0 : config.scope
|
|
987
1299
|
})];
|
|
988
1300
|
};
|
|
989
|
-
var useInternalLayoutEffect = process.env.NODE_ENV !== "test" && canUseDom() ? React
|
|
1301
|
+
var useInternalLayoutEffect = process.env.NODE_ENV !== "test" && canUseDom() ? React.useLayoutEffect : React.useEffect;
|
|
990
1302
|
var useLayoutEffect = function useLayoutEffect2(callback, deps) {
|
|
991
|
-
var firstMountRef = React
|
|
1303
|
+
var firstMountRef = React.useRef(true);
|
|
992
1304
|
useInternalLayoutEffect(function() {
|
|
993
1305
|
return callback(firstMountRef.current);
|
|
994
1306
|
}, deps);
|
|
@@ -1006,10 +1318,10 @@ var useLayoutUpdateEffect = function useLayoutUpdateEffect2(callback, deps) {
|
|
|
1006
1318
|
}
|
|
1007
1319
|
}, deps);
|
|
1008
1320
|
};
|
|
1009
|
-
var fullClone$2 = _objectSpread2({}, React
|
|
1321
|
+
var fullClone$2 = _objectSpread2({}, React);
|
|
1010
1322
|
var useInsertionEffect$1 = fullClone$2.useInsertionEffect;
|
|
1011
1323
|
var useInsertionEffectPolyfill = function useInsertionEffectPolyfill2(renderEffect, effect, deps) {
|
|
1012
|
-
React
|
|
1324
|
+
React.useMemo(renderEffect, deps);
|
|
1013
1325
|
useLayoutEffect(function() {
|
|
1014
1326
|
return effect(true);
|
|
1015
1327
|
}, deps);
|
|
@@ -1020,7 +1332,7 @@ var useCompatibleInsertionEffect = useInsertionEffect$1 ? function(renderEffect,
|
|
|
1020
1332
|
return effect();
|
|
1021
1333
|
}, deps);
|
|
1022
1334
|
} : useInsertionEffectPolyfill;
|
|
1023
|
-
var fullClone$1 = _objectSpread2({}, React
|
|
1335
|
+
var fullClone$1 = _objectSpread2({}, React);
|
|
1024
1336
|
var useInsertionEffect = fullClone$1.useInsertionEffect;
|
|
1025
1337
|
var useCleanupRegister = function useCleanupRegister2(deps) {
|
|
1026
1338
|
var effectCleanups = [];
|
|
@@ -1034,7 +1346,7 @@ var useCleanupRegister = function useCleanupRegister2(deps) {
|
|
|
1034
1346
|
}
|
|
1035
1347
|
effectCleanups.push(fn);
|
|
1036
1348
|
}
|
|
1037
|
-
React
|
|
1349
|
+
React.useEffect(function() {
|
|
1038
1350
|
cleanupFlag = false;
|
|
1039
1351
|
return function() {
|
|
1040
1352
|
cleanupFlag = true;
|
|
@@ -1075,7 +1387,7 @@ if (process.env.NODE_ENV !== "production" && typeof module !== "undefined" && mo
|
|
|
1075
1387
|
}
|
|
1076
1388
|
}
|
|
1077
1389
|
function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove, onCacheEffect) {
|
|
1078
|
-
var _React$useContext = React
|
|
1390
|
+
var _React$useContext = React.useContext(StyleContext), globalCache = _React$useContext.cache;
|
|
1079
1391
|
var fullPath = [prefix].concat(_toConsumableArray(keyPath));
|
|
1080
1392
|
var fullPathStr = pathKey(fullPath);
|
|
1081
1393
|
var register = useEffectCleanupRegister([fullPathStr]);
|
|
@@ -1093,7 +1405,7 @@ function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove, onCacheEffect)
|
|
|
1093
1405
|
return updater ? updater(data) : data;
|
|
1094
1406
|
});
|
|
1095
1407
|
};
|
|
1096
|
-
React
|
|
1408
|
+
React.useMemo(
|
|
1097
1409
|
function() {
|
|
1098
1410
|
buildCache();
|
|
1099
1411
|
},
|
|
@@ -1855,7 +2167,7 @@ function Empty() {
|
|
|
1855
2167
|
var STYLE_PREFIX = "style";
|
|
1856
2168
|
function useStyleRegister(info, styleFn) {
|
|
1857
2169
|
var token2 = info.token, path = info.path, hashId = info.hashId, layer = info.layer, nonce = info.nonce, clientOnly = info.clientOnly, _info$order = info.order, order = _info$order === void 0 ? 0 : _info$order;
|
|
1858
|
-
var _React$useContext = React
|
|
2170
|
+
var _React$useContext = React.useContext(StyleContext), autoClear = _React$useContext.autoClear, mock = _React$useContext.mock, defaultCache = _React$useContext.defaultCache, hashPriority = _React$useContext.hashPriority, container = _React$useContext.container, ssrInline = _React$useContext.ssrInline, transformers = _React$useContext.transformers, linters = _React$useContext.linters, cache = _React$useContext.cache, enableLayer = _React$useContext.layer;
|
|
1859
2171
|
var tokenKey = token2._tokenKey;
|
|
1860
2172
|
var fullPath = [tokenKey];
|
|
1861
2173
|
if (enableLayer) {
|
|
@@ -1947,16 +2259,16 @@ function useStyleRegister(info, styleFn) {
|
|
|
1947
2259
|
return function(node2) {
|
|
1948
2260
|
var styleNode;
|
|
1949
2261
|
if (!ssrInline || isMergedClientSide || !defaultCache) {
|
|
1950
|
-
styleNode = /* @__PURE__ */ React
|
|
2262
|
+
styleNode = /* @__PURE__ */ React.createElement(Empty, null);
|
|
1951
2263
|
} else {
|
|
1952
2264
|
var _ref6;
|
|
1953
|
-
styleNode = /* @__PURE__ */ React
|
|
2265
|
+
styleNode = /* @__PURE__ */ React.createElement("style", _extends({}, (_ref6 = {}, _defineProperty(_ref6, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref6, ATTR_MARK, cachedStyleId), _ref6), {
|
|
1954
2266
|
dangerouslySetInnerHTML: {
|
|
1955
2267
|
__html: cachedStyleStr
|
|
1956
2268
|
}
|
|
1957
2269
|
}));
|
|
1958
2270
|
}
|
|
1959
|
-
return /* @__PURE__ */ React
|
|
2271
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, styleNode, node2);
|
|
1960
2272
|
};
|
|
1961
2273
|
}
|
|
1962
2274
|
var extract$1 = function extract2(cache, effectStyles, options) {
|
|
@@ -2072,11 +2384,11 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
2072
2384
|
}
|
|
2073
2385
|
};
|
|
2074
2386
|
}
|
|
2075
|
-
const WarningContext = /* @__PURE__ */ React
|
|
2387
|
+
const WarningContext = /* @__PURE__ */ React.createContext({});
|
|
2076
2388
|
const devUseWarning = process.env.NODE_ENV !== "production" ? (component) => {
|
|
2077
2389
|
const {
|
|
2078
2390
|
strict
|
|
2079
|
-
} = React
|
|
2391
|
+
} = React.useContext(WarningContext);
|
|
2080
2392
|
const typeWarning = (valid, type, message) => {
|
|
2081
2393
|
if (!valid) {
|
|
2082
2394
|
if (strict === false && type === "deprecated") {
|
|
@@ -3130,7 +3442,7 @@ const defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {
|
|
|
3130
3442
|
}
|
|
3131
3443
|
return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls;
|
|
3132
3444
|
};
|
|
3133
|
-
const ConfigContext = /* @__PURE__ */ React
|
|
3445
|
+
const ConfigContext = /* @__PURE__ */ React.createContext({
|
|
3134
3446
|
// We provide a default function for Context without provider
|
|
3135
3447
|
getPrefixCls: defaultGetPrefixCls,
|
|
3136
3448
|
iconPrefixCls: defaultIconPrefixCls
|
|
@@ -3140,7 +3452,7 @@ const {
|
|
|
3140
3452
|
} = ConfigContext;
|
|
3141
3453
|
const EMPTY_OBJECT = {};
|
|
3142
3454
|
function useComponentConfig(propName) {
|
|
3143
|
-
const context = React
|
|
3455
|
+
const context = React.useContext(ConfigContext);
|
|
3144
3456
|
const {
|
|
3145
3457
|
getPrefixCls,
|
|
3146
3458
|
direction,
|
|
@@ -3156,8 +3468,8 @@ function useComponentConfig(propName) {
|
|
|
3156
3468
|
getPopupContainer
|
|
3157
3469
|
});
|
|
3158
3470
|
}
|
|
3159
|
-
const DisabledContext = /* @__PURE__ */ React
|
|
3160
|
-
const SizeContext = /* @__PURE__ */ React
|
|
3471
|
+
const DisabledContext = /* @__PURE__ */ React.createContext(false);
|
|
3472
|
+
const SizeContext = /* @__PURE__ */ React.createContext(void 0);
|
|
3161
3473
|
var AbstractCalculator = /* @__PURE__ */ _createClass(function AbstractCalculator2() {
|
|
3162
3474
|
_classCallCheck(this, AbstractCalculator2);
|
|
3163
3475
|
});
|
|
@@ -3340,9 +3652,9 @@ var getCompVarPrefix = function getCompVarPrefix2(component, prefix) {
|
|
|
3340
3652
|
return "".concat([prefix, component.replace(/([A-Z]+)([A-Z][a-z]+)/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2")].filter(Boolean).join("-"));
|
|
3341
3653
|
};
|
|
3342
3654
|
function useEvent(callback) {
|
|
3343
|
-
var fnRef = React
|
|
3655
|
+
var fnRef = React.useRef();
|
|
3344
3656
|
fnRef.current = callback;
|
|
3345
|
-
var memoFn = React
|
|
3657
|
+
var memoFn = React.useCallback(function() {
|
|
3346
3658
|
var _fnRef$current;
|
|
3347
3659
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3348
3660
|
args[_key] = arguments[_key];
|
|
@@ -3352,9 +3664,9 @@ function useEvent(callback) {
|
|
|
3352
3664
|
return memoFn;
|
|
3353
3665
|
}
|
|
3354
3666
|
function useSafeState(defaultValue) {
|
|
3355
|
-
var destroyRef = React
|
|
3356
|
-
var _React$useState = React
|
|
3357
|
-
React
|
|
3667
|
+
var destroyRef = React.useRef(false);
|
|
3668
|
+
var _React$useState = React.useState(defaultValue), _React$useState2 = _slicedToArray(_React$useState, 2), value = _React$useState2[0], setValue = _React$useState2[1];
|
|
3669
|
+
React.useEffect(function() {
|
|
3358
3670
|
destroyRef.current = false;
|
|
3359
3671
|
return function() {
|
|
3360
3672
|
destroyRef.current = true;
|
|
@@ -4228,7 +4540,7 @@ const {
|
|
|
4228
4540
|
getCommonStyle: genCommonStyle,
|
|
4229
4541
|
getCompUnitless: () => unitless
|
|
4230
4542
|
});
|
|
4231
|
-
var Context = /* @__PURE__ */ React
|
|
4543
|
+
var Context = /* @__PURE__ */ React.createContext({});
|
|
4232
4544
|
var DomWrapper = /* @__PURE__ */ function(_React$Component) {
|
|
4233
4545
|
_inherits(DomWrapper2, _React$Component);
|
|
4234
4546
|
var _super = _createSuper(DomWrapper2);
|
|
@@ -4243,12 +4555,12 @@ var DomWrapper = /* @__PURE__ */ function(_React$Component) {
|
|
|
4243
4555
|
}
|
|
4244
4556
|
}]);
|
|
4245
4557
|
return DomWrapper2;
|
|
4246
|
-
}(React
|
|
4558
|
+
}(React.Component);
|
|
4247
4559
|
function useSyncState(defaultValue) {
|
|
4248
|
-
var _React$useReducer = React
|
|
4560
|
+
var _React$useReducer = React.useReducer(function(x) {
|
|
4249
4561
|
return x + 1;
|
|
4250
4562
|
}, 0), _React$useReducer2 = _slicedToArray(_React$useReducer, 2), forceUpdate = _React$useReducer2[1];
|
|
4251
|
-
var currentValueRef = React
|
|
4563
|
+
var currentValueRef = React.useRef(defaultValue);
|
|
4252
4564
|
var getValue2 = useEvent(function() {
|
|
4253
4565
|
return currentValueRef.current;
|
|
4254
4566
|
});
|
|
@@ -4350,7 +4662,7 @@ const useDomMotionEvents = function(onInternalMotionEnd) {
|
|
|
4350
4662
|
cacheElementRef.current = element;
|
|
4351
4663
|
}
|
|
4352
4664
|
}
|
|
4353
|
-
React
|
|
4665
|
+
React.useEffect(function() {
|
|
4354
4666
|
return function() {
|
|
4355
4667
|
removeMotionEvents(cacheElementRef.current);
|
|
4356
4668
|
};
|
|
@@ -4359,7 +4671,7 @@ const useDomMotionEvents = function(onInternalMotionEnd) {
|
|
|
4359
4671
|
};
|
|
4360
4672
|
var useIsomorphicLayoutEffect = canUseDom() ? useLayoutEffect$1 : useEffect;
|
|
4361
4673
|
const useNextFrame = function() {
|
|
4362
|
-
var nextFrameRef = React
|
|
4674
|
+
var nextFrameRef = React.useRef(null);
|
|
4363
4675
|
function cancelNextFrame() {
|
|
4364
4676
|
wrapperRaf.cancel(nextFrameRef.current);
|
|
4365
4677
|
}
|
|
@@ -4379,7 +4691,7 @@ const useNextFrame = function() {
|
|
|
4379
4691
|
});
|
|
4380
4692
|
nextFrameRef.current = nextFrameId;
|
|
4381
4693
|
}
|
|
4382
|
-
React
|
|
4694
|
+
React.useEffect(function() {
|
|
4383
4695
|
return function() {
|
|
4384
4696
|
cancelNextFrame();
|
|
4385
4697
|
};
|
|
@@ -4422,7 +4734,7 @@ const useStepQueue = function(status, prepareOnly, callback) {
|
|
|
4422
4734
|
}
|
|
4423
4735
|
}
|
|
4424
4736
|
}, [status, step]);
|
|
4425
|
-
React
|
|
4737
|
+
React.useEffect(function() {
|
|
4426
4738
|
return function() {
|
|
4427
4739
|
cancelNextFrame();
|
|
4428
4740
|
};
|
|
@@ -4480,7 +4792,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
4480
4792
|
return {};
|
|
4481
4793
|
}
|
|
4482
4794
|
};
|
|
4483
|
-
var eventHandlers = React
|
|
4795
|
+
var eventHandlers = React.useMemo(function() {
|
|
4484
4796
|
return getEventHandlers(currentStatus);
|
|
4485
4797
|
}, [currentStatus]);
|
|
4486
4798
|
var _useStepQueue = useStepQueue(currentStatus, !supportMotion, function(newStep) {
|
|
@@ -4556,7 +4868,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
4556
4868
|
clearTimeout(deadlineRef.current);
|
|
4557
4869
|
};
|
|
4558
4870
|
}, []);
|
|
4559
|
-
var firstMountChangeRef = React
|
|
4871
|
+
var firstMountChangeRef = React.useRef(false);
|
|
4560
4872
|
useEffect(function() {
|
|
4561
4873
|
if (asyncVisible) {
|
|
4562
4874
|
firstMountChangeRef.current = true;
|
|
@@ -4584,9 +4896,9 @@ function genCSSMotion(config) {
|
|
|
4584
4896
|
function isSupportTransition(props, contextMotion) {
|
|
4585
4897
|
return !!(props.motionName && transitionSupport && contextMotion !== false);
|
|
4586
4898
|
}
|
|
4587
|
-
var CSSMotion2 = /* @__PURE__ */ React
|
|
4899
|
+
var CSSMotion2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
4588
4900
|
var _props$visible = props.visible, visible = _props$visible === void 0 ? true : _props$visible, _props$removeOnLeave = props.removeOnLeave, removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave, forceRender = props.forceRender, children = props.children, motionName = props.motionName, leavedClassName = props.leavedClassName, eventProps = props.eventProps;
|
|
4589
|
-
var _React$useContext = React
|
|
4901
|
+
var _React$useContext = React.useContext(Context), contextMotion = _React$useContext.motion;
|
|
4590
4902
|
var supportMotion = isSupportTransition(props, contextMotion);
|
|
4591
4903
|
var nodeRef = useRef();
|
|
4592
4904
|
var wrapperNodeRef = useRef();
|
|
@@ -4598,11 +4910,11 @@ function genCSSMotion(config) {
|
|
|
4598
4910
|
}
|
|
4599
4911
|
}
|
|
4600
4912
|
var _useStatus = useStatus(supportMotion, visible, getDomElement, props), _useStatus2 = _slicedToArray(_useStatus, 4), status = _useStatus2[0], statusStep = _useStatus2[1], statusStyle = _useStatus2[2], mergedVisible = _useStatus2[3];
|
|
4601
|
-
var renderedRef = React
|
|
4913
|
+
var renderedRef = React.useRef(mergedVisible);
|
|
4602
4914
|
if (mergedVisible) {
|
|
4603
4915
|
renderedRef.current = true;
|
|
4604
4916
|
}
|
|
4605
|
-
var setNodeRef = React
|
|
4917
|
+
var setNodeRef = React.useCallback(function(node2) {
|
|
4606
4918
|
nodeRef.current = node2;
|
|
4607
4919
|
fillRef(ref, node2);
|
|
4608
4920
|
}, [ref]);
|
|
@@ -4643,15 +4955,15 @@ function genCSSMotion(config) {
|
|
|
4643
4955
|
style: statusStyle
|
|
4644
4956
|
}), setNodeRef);
|
|
4645
4957
|
}
|
|
4646
|
-
if (/* @__PURE__ */ React
|
|
4958
|
+
if (/* @__PURE__ */ React.isValidElement(motionChildren) && supportRef(motionChildren)) {
|
|
4647
4959
|
var originNodeRef = getNodeRef(motionChildren);
|
|
4648
4960
|
if (!originNodeRef) {
|
|
4649
|
-
motionChildren = /* @__PURE__ */ React
|
|
4961
|
+
motionChildren = /* @__PURE__ */ React.cloneElement(motionChildren, {
|
|
4650
4962
|
ref: setNodeRef
|
|
4651
4963
|
});
|
|
4652
4964
|
}
|
|
4653
4965
|
}
|
|
4654
|
-
return /* @__PURE__ */ React
|
|
4966
|
+
return /* @__PURE__ */ React.createElement(DomWrapper, {
|
|
4655
4967
|
ref: wrapperNodeRef
|
|
4656
4968
|
}, motionChildren);
|
|
4657
4969
|
});
|
|
@@ -4792,17 +5104,17 @@ function genCSSMotionList(transitionSupport) {
|
|
|
4792
5104
|
var _this$props = this.props, component = _this$props.component, children = _this$props.children, _onVisibleChanged = _this$props.onVisibleChanged;
|
|
4793
5105
|
_this$props.onAllRemoved;
|
|
4794
5106
|
var restProps = _objectWithoutProperties(_this$props, _excluded$3);
|
|
4795
|
-
var Component = component || React
|
|
5107
|
+
var Component = component || React.Fragment;
|
|
4796
5108
|
var motionProps = {};
|
|
4797
5109
|
MOTION_PROP_NAMES.forEach(function(prop) {
|
|
4798
5110
|
motionProps[prop] = restProps[prop];
|
|
4799
5111
|
delete restProps[prop];
|
|
4800
5112
|
});
|
|
4801
5113
|
delete restProps.keys;
|
|
4802
|
-
return /* @__PURE__ */ React
|
|
5114
|
+
return /* @__PURE__ */ React.createElement(Component, restProps, keyEntities.map(function(_ref2, index) {
|
|
4803
5115
|
var status = _ref2.status, eventProps = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
4804
5116
|
var visible = status === STATUS_ADD || status === STATUS_KEEP;
|
|
4805
|
-
return /* @__PURE__ */ React
|
|
5117
|
+
return /* @__PURE__ */ React.createElement(CSSMotion$1, _extends({}, motionProps, {
|
|
4806
5118
|
key: eventProps.key,
|
|
4807
5119
|
visible,
|
|
4808
5120
|
eventProps,
|
|
@@ -4843,7 +5155,7 @@ function genCSSMotionList(transitionSupport) {
|
|
|
4843
5155
|
}
|
|
4844
5156
|
}]);
|
|
4845
5157
|
return CSSMotionList2;
|
|
4846
|
-
}(React
|
|
5158
|
+
}(React.Component);
|
|
4847
5159
|
_defineProperty(CSSMotionList, "defaultProps", {
|
|
4848
5160
|
component: "div"
|
|
4849
5161
|
});
|
|
@@ -4947,7 +5259,7 @@ function getTwoToneColors() {
|
|
|
4947
5259
|
}
|
|
4948
5260
|
var IconBase = function IconBase2(props) {
|
|
4949
5261
|
var icon = props.icon, className = props.className, onClick = props.onClick, style2 = props.style, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, restProps = _objectWithoutProperties(props, _excluded$2);
|
|
4950
|
-
var svgRef = React
|
|
5262
|
+
var svgRef = React.useRef();
|
|
4951
5263
|
var colors = twoToneColorPalette;
|
|
4952
5264
|
if (primaryColor) {
|
|
4953
5265
|
colors = {
|
|
@@ -4998,9 +5310,9 @@ function getTwoToneColor() {
|
|
|
4998
5310
|
}
|
|
4999
5311
|
var _excluded$1 = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
|
|
5000
5312
|
setTwoToneColor(blue.primary);
|
|
5001
|
-
var Icon = /* @__PURE__ */ React
|
|
5313
|
+
var Icon = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
5002
5314
|
var className = props.className, icon = props.icon, spin = props.spin, rotate = props.rotate, tabIndex = props.tabIndex, onClick = props.onClick, twoToneColor = props.twoToneColor, restProps = _objectWithoutProperties(props, _excluded$1);
|
|
5003
|
-
var _React$useContext = React
|
|
5315
|
+
var _React$useContext = React.useContext(IconContext), _React$useContext$pre = _React$useContext.prefixCls, prefixCls = _React$useContext$pre === void 0 ? "anticon" : _React$useContext$pre, rootClassName = _React$useContext.rootClassName;
|
|
5004
5316
|
var classString = classNames(rootClassName, prefixCls, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), "".concat(prefixCls, "-spin"), !!spin || icon.name === "loading"), className);
|
|
5005
5317
|
var iconTabIndex = tabIndex;
|
|
5006
5318
|
if (iconTabIndex === void 0 && onClick) {
|
|
@@ -5011,7 +5323,7 @@ var Icon = /* @__PURE__ */ React$1.forwardRef(function(props, ref) {
|
|
|
5011
5323
|
transform: "rotate(".concat(rotate, "deg)")
|
|
5012
5324
|
} : void 0;
|
|
5013
5325
|
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
|
|
5014
|
-
return /* @__PURE__ */ React
|
|
5326
|
+
return /* @__PURE__ */ React.createElement("span", _extends({
|
|
5015
5327
|
role: "img",
|
|
5016
5328
|
"aria-label": icon.name
|
|
5017
5329
|
}, restProps, {
|
|
@@ -5019,7 +5331,7 @@ var Icon = /* @__PURE__ */ React$1.forwardRef(function(props, ref) {
|
|
|
5019
5331
|
tabIndex: iconTabIndex,
|
|
5020
5332
|
onClick,
|
|
5021
5333
|
className: classString
|
|
5022
|
-
}), /* @__PURE__ */ React
|
|
5334
|
+
}), /* @__PURE__ */ React.createElement(IconBase, {
|
|
5023
5335
|
icon,
|
|
5024
5336
|
primaryColor,
|
|
5025
5337
|
secondaryColor,
|
|
@@ -5043,12 +5355,12 @@ function cloneElement(element, props) {
|
|
|
5043
5355
|
}
|
|
5044
5356
|
var LoadingOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
|
|
5045
5357
|
var LoadingOutlined = function LoadingOutlined2(props, ref) {
|
|
5046
|
-
return /* @__PURE__ */ React
|
|
5358
|
+
return /* @__PURE__ */ React.createElement(Icon, _extends({}, props, {
|
|
5047
5359
|
ref,
|
|
5048
5360
|
icon: LoadingOutlined$1
|
|
5049
5361
|
}));
|
|
5050
5362
|
};
|
|
5051
|
-
var RefIcon = /* @__PURE__ */ React
|
|
5363
|
+
var RefIcon = /* @__PURE__ */ React.forwardRef(LoadingOutlined);
|
|
5052
5364
|
if (process.env.NODE_ENV !== "production") {
|
|
5053
5365
|
RefIcon.displayName = "LoadingOutlined";
|
|
5054
5366
|
}
|
|
@@ -5414,7 +5726,7 @@ function _unmount() {
|
|
|
5414
5726
|
}
|
|
5415
5727
|
const defaultReactRender = (node2, container) => {
|
|
5416
5728
|
if (process.env.NODE_ENV !== "production") {
|
|
5417
|
-
const majorVersion = parseInt(React
|
|
5729
|
+
const majorVersion = parseInt(React.version.split(".")[0], 10);
|
|
5418
5730
|
const fullKeys = Object.keys(ReactDOM);
|
|
5419
5731
|
process.env.NODE_ENV !== "production" ? warning$2(majorVersion < 19 || fullKeys.includes("createRoot"), "compatible", "antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.") : void 0;
|
|
5420
5732
|
}
|
|
@@ -5520,18 +5832,18 @@ const WaveEffect = (props) => {
|
|
|
5520
5832
|
component,
|
|
5521
5833
|
registerUnmount
|
|
5522
5834
|
} = props;
|
|
5523
|
-
const divRef = React
|
|
5524
|
-
const unmountRef = React
|
|
5525
|
-
React
|
|
5835
|
+
const divRef = React.useRef(null);
|
|
5836
|
+
const unmountRef = React.useRef(null);
|
|
5837
|
+
React.useEffect(() => {
|
|
5526
5838
|
unmountRef.current = registerUnmount();
|
|
5527
5839
|
}, []);
|
|
5528
|
-
const [color, setWaveColor] = React
|
|
5529
|
-
const [borderRadius, setBorderRadius] = React
|
|
5530
|
-
const [left, setLeft] = React
|
|
5531
|
-
const [top, setTop] = React
|
|
5532
|
-
const [width, setWidth] = React
|
|
5533
|
-
const [height, setHeight] = React
|
|
5534
|
-
const [enabled, setEnabled] = React
|
|
5840
|
+
const [color, setWaveColor] = React.useState(null);
|
|
5841
|
+
const [borderRadius, setBorderRadius] = React.useState([]);
|
|
5842
|
+
const [left, setLeft] = React.useState(0);
|
|
5843
|
+
const [top, setTop] = React.useState(0);
|
|
5844
|
+
const [width, setWidth] = React.useState(0);
|
|
5845
|
+
const [height, setHeight] = React.useState(0);
|
|
5846
|
+
const [enabled, setEnabled] = React.useState(false);
|
|
5535
5847
|
const waveStyle = {
|
|
5536
5848
|
left,
|
|
5537
5849
|
top,
|
|
@@ -5562,7 +5874,7 @@ const WaveEffect = (props) => {
|
|
|
5562
5874
|
} = nodeStyle;
|
|
5563
5875
|
setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map((radius) => validateNum(parseFloat(radius))));
|
|
5564
5876
|
}
|
|
5565
|
-
React
|
|
5877
|
+
React.useEffect(() => {
|
|
5566
5878
|
if (target) {
|
|
5567
5879
|
const id = wrapperRaf(() => {
|
|
5568
5880
|
syncPos();
|
|
@@ -5583,7 +5895,7 @@ const WaveEffect = (props) => {
|
|
|
5583
5895
|
return null;
|
|
5584
5896
|
}
|
|
5585
5897
|
const isSmallComponent = (component === "Checkbox" || component === "Radio") && (target === null || target === void 0 ? void 0 : target.classList.contains(TARGET_CLS));
|
|
5586
|
-
return /* @__PURE__ */ React
|
|
5898
|
+
return /* @__PURE__ */ React.createElement(CSSMotion, {
|
|
5587
5899
|
visible: true,
|
|
5588
5900
|
motionAppear: true,
|
|
5589
5901
|
motionName: "wave-motion",
|
|
@@ -5602,7 +5914,7 @@ const WaveEffect = (props) => {
|
|
|
5602
5914
|
let {
|
|
5603
5915
|
className: motionClassName
|
|
5604
5916
|
} = _ref;
|
|
5605
|
-
return /* @__PURE__ */ React
|
|
5917
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
5606
5918
|
ref: composeRef(divRef, ref),
|
|
5607
5919
|
className: classNames(className, motionClassName, {
|
|
5608
5920
|
"wave-quick": isSmallComponent
|
|
@@ -5629,7 +5941,7 @@ const showWaveEffect = (target, info) => {
|
|
|
5629
5941
|
function registerUnmount() {
|
|
5630
5942
|
return unmountCallback;
|
|
5631
5943
|
}
|
|
5632
|
-
unmountCallback = reactRender2(/* @__PURE__ */ React
|
|
5944
|
+
unmountCallback = reactRender2(/* @__PURE__ */ React.createElement(WaveEffect, Object.assign({}, info, {
|
|
5633
5945
|
target,
|
|
5634
5946
|
registerUnmount
|
|
5635
5947
|
})), holder);
|
|
@@ -5637,7 +5949,7 @@ const showWaveEffect = (target, info) => {
|
|
|
5637
5949
|
const useWave = (nodeRef, className, component) => {
|
|
5638
5950
|
const {
|
|
5639
5951
|
wave
|
|
5640
|
-
} = React
|
|
5952
|
+
} = React.useContext(ConfigContext);
|
|
5641
5953
|
const [, token2, hashId] = useToken();
|
|
5642
5954
|
const showWave = useEvent((event) => {
|
|
5643
5955
|
const node2 = nodeRef.current;
|
|
@@ -5656,7 +5968,7 @@ const useWave = (nodeRef, className, component) => {
|
|
|
5656
5968
|
hashId
|
|
5657
5969
|
});
|
|
5658
5970
|
});
|
|
5659
|
-
const rafId = React
|
|
5971
|
+
const rafId = React.useRef(null);
|
|
5660
5972
|
const showDebounceWave = (event) => {
|
|
5661
5973
|
wrapperRaf.cancel(rafId.current);
|
|
5662
5974
|
rafId.current = wrapperRaf(() => {
|
|
@@ -5730,10 +6042,10 @@ const useSize = (customSize) => {
|
|
|
5730
6042
|
}
|
|
5731
6043
|
return t;
|
|
5732
6044
|
});
|
|
5733
|
-
const SpaceCompactItemContext = /* @__PURE__ */ React
|
|
6045
|
+
const SpaceCompactItemContext = /* @__PURE__ */ React.createContext(null);
|
|
5734
6046
|
const useCompactItemContext = (prefixCls, direction) => {
|
|
5735
|
-
const compactItemContext = React
|
|
5736
|
-
const compactItemClassnames = React
|
|
6047
|
+
const compactItemContext = React.useContext(SpaceCompactItemContext);
|
|
6048
|
+
const compactItemClassnames = React.useMemo(() => {
|
|
5737
6049
|
if (!compactItemContext) {
|
|
5738
6050
|
return "";
|
|
5739
6051
|
}
|
|
@@ -5763,12 +6075,12 @@ var __rest$1 = function(s, e) {
|
|
|
5763
6075
|
}
|
|
5764
6076
|
return t;
|
|
5765
6077
|
};
|
|
5766
|
-
const GroupSizeContext = /* @__PURE__ */ React
|
|
6078
|
+
const GroupSizeContext = /* @__PURE__ */ React.createContext(void 0);
|
|
5767
6079
|
const ButtonGroup = (props) => {
|
|
5768
6080
|
const {
|
|
5769
6081
|
getPrefixCls,
|
|
5770
6082
|
direction
|
|
5771
|
-
} = React
|
|
6083
|
+
} = React.useContext(ConfigContext);
|
|
5772
6084
|
const {
|
|
5773
6085
|
prefixCls: customizePrefixCls,
|
|
5774
6086
|
size,
|
|
@@ -5776,7 +6088,7 @@ const ButtonGroup = (props) => {
|
|
|
5776
6088
|
} = props, others = __rest$1(props, ["prefixCls", "size", "className"]);
|
|
5777
6089
|
const prefixCls = getPrefixCls("btn-group", customizePrefixCls);
|
|
5778
6090
|
const [, , hashId] = useToken();
|
|
5779
|
-
const sizeCls = React
|
|
6091
|
+
const sizeCls = React.useMemo(() => {
|
|
5780
6092
|
switch (size) {
|
|
5781
6093
|
case "large":
|
|
5782
6094
|
return "lg";
|
|
@@ -5795,9 +6107,9 @@ const ButtonGroup = (props) => {
|
|
|
5795
6107
|
[`${prefixCls}-${sizeCls}`]: sizeCls,
|
|
5796
6108
|
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
5797
6109
|
}, className, hashId);
|
|
5798
|
-
return /* @__PURE__ */ React
|
|
6110
|
+
return /* @__PURE__ */ React.createElement(GroupSizeContext.Provider, {
|
|
5799
6111
|
value: size
|
|
5800
|
-
}, /* @__PURE__ */ React
|
|
6112
|
+
}, /* @__PURE__ */ React.createElement("div", Object.assign({}, others, {
|
|
5801
6113
|
className: classes
|
|
5802
6114
|
})));
|
|
5803
6115
|
};
|
|
@@ -6380,7 +6692,7 @@ var Slider = function Slider2(props) {
|
|
|
6380
6692
|
})));
|
|
6381
6693
|
};
|
|
6382
6694
|
function useComponent(components) {
|
|
6383
|
-
return React
|
|
6695
|
+
return React.useMemo(function() {
|
|
6384
6696
|
var _ref = components || {}, slider = _ref.slider;
|
|
6385
6697
|
return [slider || Slider];
|
|
6386
6698
|
}, [components]);
|
|
@@ -7535,7 +7847,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
7535
7847
|
}
|
|
7536
7848
|
const Button = (_a) => {
|
|
7537
7849
|
var _b = _a, { children, onClick } = _b, props = __objRest(_b, ["children", "onClick"]);
|
|
7538
|
-
return /* @__PURE__ */
|
|
7850
|
+
return /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({ type: "primary", onClick }, props), { children }));
|
|
7539
7851
|
};
|
|
7540
7852
|
export {
|
|
7541
7853
|
Button
|