@sinco/react 1.2.5-rc.6 → 1.2.5-rc.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.esm.js +1158 -562
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -2310,7 +2310,7 @@ process.env.NODE_ENV !== "production" ? GlobalStyles$2.propTypes = {
2310
2310
  } : void 0;
2311
2311
 
2312
2312
  /**
2313
- * @mui/styled-engine v6.3.1
2313
+ * @mui/styled-engine v6.4.0
2314
2314
  *
2315
2315
  * @license MIT
2316
2316
  * This source code is licensed under the MIT license found in the
@@ -2350,6 +2350,295 @@ function internal_serializeStyles(styles) {
2350
2350
  return serializeStyles(wrapper);
2351
2351
  }
2352
2352
 
2353
+ var reactIs = {exports: {}};
2354
+
2355
+ var reactIs_production = {};
2356
+
2357
+ /**
2358
+ * @license React
2359
+ * react-is.production.js
2360
+ *
2361
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2362
+ *
2363
+ * This source code is licensed under the MIT license found in the
2364
+ * LICENSE file in the root directory of this source tree.
2365
+ */
2366
+
2367
+ var hasRequiredReactIs_production;
2368
+
2369
+ function requireReactIs_production () {
2370
+ if (hasRequiredReactIs_production) return reactIs_production;
2371
+ hasRequiredReactIs_production = 1;
2372
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
2373
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
2374
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
2375
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
2376
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler");
2377
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
2378
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
2379
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
2380
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
2381
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
2382
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
2383
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
2384
+ REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
2385
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
2386
+ function typeOf(object) {
2387
+ if ("object" === typeof object && null !== object) {
2388
+ var $$typeof = object.$$typeof;
2389
+ switch ($$typeof) {
2390
+ case REACT_ELEMENT_TYPE:
2391
+ switch (((object = object.type), object)) {
2392
+ case REACT_FRAGMENT_TYPE:
2393
+ case REACT_PROFILER_TYPE:
2394
+ case REACT_STRICT_MODE_TYPE:
2395
+ case REACT_SUSPENSE_TYPE:
2396
+ case REACT_SUSPENSE_LIST_TYPE:
2397
+ return object;
2398
+ default:
2399
+ switch (((object = object && object.$$typeof), object)) {
2400
+ case REACT_CONTEXT_TYPE:
2401
+ case REACT_FORWARD_REF_TYPE:
2402
+ case REACT_LAZY_TYPE:
2403
+ case REACT_MEMO_TYPE:
2404
+ return object;
2405
+ case REACT_CONSUMER_TYPE:
2406
+ return object;
2407
+ default:
2408
+ return $$typeof;
2409
+ }
2410
+ }
2411
+ case REACT_PORTAL_TYPE:
2412
+ return $$typeof;
2413
+ }
2414
+ }
2415
+ }
2416
+ reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
2417
+ reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
2418
+ reactIs_production.Element = REACT_ELEMENT_TYPE;
2419
+ reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
2420
+ reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
2421
+ reactIs_production.Lazy = REACT_LAZY_TYPE;
2422
+ reactIs_production.Memo = REACT_MEMO_TYPE;
2423
+ reactIs_production.Portal = REACT_PORTAL_TYPE;
2424
+ reactIs_production.Profiler = REACT_PROFILER_TYPE;
2425
+ reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
2426
+ reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
2427
+ reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
2428
+ reactIs_production.isContextConsumer = function (object) {
2429
+ return typeOf(object) === REACT_CONSUMER_TYPE;
2430
+ };
2431
+ reactIs_production.isContextProvider = function (object) {
2432
+ return typeOf(object) === REACT_CONTEXT_TYPE;
2433
+ };
2434
+ reactIs_production.isElement = function (object) {
2435
+ return (
2436
+ "object" === typeof object &&
2437
+ null !== object &&
2438
+ object.$$typeof === REACT_ELEMENT_TYPE
2439
+ );
2440
+ };
2441
+ reactIs_production.isForwardRef = function (object) {
2442
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
2443
+ };
2444
+ reactIs_production.isFragment = function (object) {
2445
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
2446
+ };
2447
+ reactIs_production.isLazy = function (object) {
2448
+ return typeOf(object) === REACT_LAZY_TYPE;
2449
+ };
2450
+ reactIs_production.isMemo = function (object) {
2451
+ return typeOf(object) === REACT_MEMO_TYPE;
2452
+ };
2453
+ reactIs_production.isPortal = function (object) {
2454
+ return typeOf(object) === REACT_PORTAL_TYPE;
2455
+ };
2456
+ reactIs_production.isProfiler = function (object) {
2457
+ return typeOf(object) === REACT_PROFILER_TYPE;
2458
+ };
2459
+ reactIs_production.isStrictMode = function (object) {
2460
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
2461
+ };
2462
+ reactIs_production.isSuspense = function (object) {
2463
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
2464
+ };
2465
+ reactIs_production.isSuspenseList = function (object) {
2466
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
2467
+ };
2468
+ reactIs_production.isValidElementType = function (type) {
2469
+ return "string" === typeof type ||
2470
+ "function" === typeof type ||
2471
+ type === REACT_FRAGMENT_TYPE ||
2472
+ type === REACT_PROFILER_TYPE ||
2473
+ type === REACT_STRICT_MODE_TYPE ||
2474
+ type === REACT_SUSPENSE_TYPE ||
2475
+ type === REACT_SUSPENSE_LIST_TYPE ||
2476
+ type === REACT_OFFSCREEN_TYPE ||
2477
+ ("object" === typeof type &&
2478
+ null !== type &&
2479
+ (type.$$typeof === REACT_LAZY_TYPE ||
2480
+ type.$$typeof === REACT_MEMO_TYPE ||
2481
+ type.$$typeof === REACT_CONTEXT_TYPE ||
2482
+ type.$$typeof === REACT_CONSUMER_TYPE ||
2483
+ type.$$typeof === REACT_FORWARD_REF_TYPE ||
2484
+ type.$$typeof === REACT_CLIENT_REFERENCE ||
2485
+ void 0 !== type.getModuleId))
2486
+ ? !0
2487
+ : !1;
2488
+ };
2489
+ reactIs_production.typeOf = typeOf;
2490
+ return reactIs_production;
2491
+ }
2492
+
2493
+ var reactIs_development = {};
2494
+
2495
+ /**
2496
+ * @license React
2497
+ * react-is.development.js
2498
+ *
2499
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2500
+ *
2501
+ * This source code is licensed under the MIT license found in the
2502
+ * LICENSE file in the root directory of this source tree.
2503
+ */
2504
+
2505
+ var hasRequiredReactIs_development;
2506
+
2507
+ function requireReactIs_development () {
2508
+ if (hasRequiredReactIs_development) return reactIs_development;
2509
+ hasRequiredReactIs_development = 1;
2510
+ "production" !== process.env.NODE_ENV &&
2511
+ (function () {
2512
+ function typeOf(object) {
2513
+ if ("object" === typeof object && null !== object) {
2514
+ var $$typeof = object.$$typeof;
2515
+ switch ($$typeof) {
2516
+ case REACT_ELEMENT_TYPE:
2517
+ switch (((object = object.type), object)) {
2518
+ case REACT_FRAGMENT_TYPE:
2519
+ case REACT_PROFILER_TYPE:
2520
+ case REACT_STRICT_MODE_TYPE:
2521
+ case REACT_SUSPENSE_TYPE:
2522
+ case REACT_SUSPENSE_LIST_TYPE:
2523
+ return object;
2524
+ default:
2525
+ switch (((object = object && object.$$typeof), object)) {
2526
+ case REACT_CONTEXT_TYPE:
2527
+ case REACT_FORWARD_REF_TYPE:
2528
+ case REACT_LAZY_TYPE:
2529
+ case REACT_MEMO_TYPE:
2530
+ return object;
2531
+ case REACT_CONSUMER_TYPE:
2532
+ return object;
2533
+ default:
2534
+ return $$typeof;
2535
+ }
2536
+ }
2537
+ case REACT_PORTAL_TYPE:
2538
+ return $$typeof;
2539
+ }
2540
+ }
2541
+ }
2542
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
2543
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
2544
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
2545
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
2546
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler");
2547
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
2548
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
2549
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
2550
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
2551
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
2552
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
2553
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
2554
+ REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
2555
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
2556
+ reactIs_development.ContextConsumer = REACT_CONSUMER_TYPE;
2557
+ reactIs_development.ContextProvider = REACT_CONTEXT_TYPE;
2558
+ reactIs_development.Element = REACT_ELEMENT_TYPE;
2559
+ reactIs_development.ForwardRef = REACT_FORWARD_REF_TYPE;
2560
+ reactIs_development.Fragment = REACT_FRAGMENT_TYPE;
2561
+ reactIs_development.Lazy = REACT_LAZY_TYPE;
2562
+ reactIs_development.Memo = REACT_MEMO_TYPE;
2563
+ reactIs_development.Portal = REACT_PORTAL_TYPE;
2564
+ reactIs_development.Profiler = REACT_PROFILER_TYPE;
2565
+ reactIs_development.StrictMode = REACT_STRICT_MODE_TYPE;
2566
+ reactIs_development.Suspense = REACT_SUSPENSE_TYPE;
2567
+ reactIs_development.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
2568
+ reactIs_development.isContextConsumer = function (object) {
2569
+ return typeOf(object) === REACT_CONSUMER_TYPE;
2570
+ };
2571
+ reactIs_development.isContextProvider = function (object) {
2572
+ return typeOf(object) === REACT_CONTEXT_TYPE;
2573
+ };
2574
+ reactIs_development.isElement = function (object) {
2575
+ return (
2576
+ "object" === typeof object &&
2577
+ null !== object &&
2578
+ object.$$typeof === REACT_ELEMENT_TYPE
2579
+ );
2580
+ };
2581
+ reactIs_development.isForwardRef = function (object) {
2582
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
2583
+ };
2584
+ reactIs_development.isFragment = function (object) {
2585
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
2586
+ };
2587
+ reactIs_development.isLazy = function (object) {
2588
+ return typeOf(object) === REACT_LAZY_TYPE;
2589
+ };
2590
+ reactIs_development.isMemo = function (object) {
2591
+ return typeOf(object) === REACT_MEMO_TYPE;
2592
+ };
2593
+ reactIs_development.isPortal = function (object) {
2594
+ return typeOf(object) === REACT_PORTAL_TYPE;
2595
+ };
2596
+ reactIs_development.isProfiler = function (object) {
2597
+ return typeOf(object) === REACT_PROFILER_TYPE;
2598
+ };
2599
+ reactIs_development.isStrictMode = function (object) {
2600
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
2601
+ };
2602
+ reactIs_development.isSuspense = function (object) {
2603
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
2604
+ };
2605
+ reactIs_development.isSuspenseList = function (object) {
2606
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
2607
+ };
2608
+ reactIs_development.isValidElementType = function (type) {
2609
+ return "string" === typeof type ||
2610
+ "function" === typeof type ||
2611
+ type === REACT_FRAGMENT_TYPE ||
2612
+ type === REACT_PROFILER_TYPE ||
2613
+ type === REACT_STRICT_MODE_TYPE ||
2614
+ type === REACT_SUSPENSE_TYPE ||
2615
+ type === REACT_SUSPENSE_LIST_TYPE ||
2616
+ type === REACT_OFFSCREEN_TYPE ||
2617
+ ("object" === typeof type &&
2618
+ null !== type &&
2619
+ (type.$$typeof === REACT_LAZY_TYPE ||
2620
+ type.$$typeof === REACT_MEMO_TYPE ||
2621
+ type.$$typeof === REACT_CONTEXT_TYPE ||
2622
+ type.$$typeof === REACT_CONSUMER_TYPE ||
2623
+ type.$$typeof === REACT_FORWARD_REF_TYPE ||
2624
+ type.$$typeof === REACT_CLIENT_REFERENCE ||
2625
+ void 0 !== type.getModuleId))
2626
+ ? !0
2627
+ : !1;
2628
+ };
2629
+ reactIs_development.typeOf = typeOf;
2630
+ })();
2631
+ return reactIs_development;
2632
+ }
2633
+
2634
+ if (process.env.NODE_ENV === 'production') {
2635
+ reactIs.exports = requireReactIs_production();
2636
+ } else {
2637
+ reactIs.exports = requireReactIs_development();
2638
+ }
2639
+
2640
+ var reactIsExports = reactIs.exports;
2641
+
2353
2642
  // https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
2354
2643
  function isPlainObject(item) {
2355
2644
  if (typeof item !== 'object' || item === null) {
@@ -2359,7 +2648,7 @@ function isPlainObject(item) {
2359
2648
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
2360
2649
  }
2361
2650
  function deepClone(source) {
2362
- if (/*#__PURE__*/React.isValidElement(source) || !isPlainObject(source)) {
2651
+ if (/*#__PURE__*/React.isValidElement(source) || reactIsExports.isValidElementType(source) || !isPlainObject(source)) {
2363
2652
  return source;
2364
2653
  }
2365
2654
  const output = {};
@@ -2395,7 +2684,7 @@ function deepmerge(target, source, options = {
2395
2684
  } : target;
2396
2685
  if (isPlainObject(target) && isPlainObject(source)) {
2397
2686
  Object.keys(source).forEach(key => {
2398
- if (/*#__PURE__*/React.isValidElement(source[key])) {
2687
+ if (/*#__PURE__*/React.isValidElement(source[key]) || reactIsExports.isValidElementType(source[key])) {
2399
2688
  output[key] = source[key];
2400
2689
  } else if (isPlainObject(source[key]) &&
2401
2690
  // Avoid prototype pollution
@@ -3823,383 +4112,94 @@ function extendSxProp$1(props) {
3823
4112
  }
3824
4113
  return {
3825
4114
  ...systemProps,
3826
- ...result
3827
- };
3828
- };
3829
- } else {
3830
- finalSx = {
3831
- ...systemProps,
3832
- ...inSx
3833
- };
3834
- }
3835
- return {
3836
- ...otherProps,
3837
- sx: finalSx
3838
- };
3839
- }
3840
-
3841
- const defaultGenerator = componentName => componentName;
3842
- const createClassNameGenerator = () => {
3843
- let generate = defaultGenerator;
3844
- return {
3845
- configure(generator) {
3846
- generate = generator;
3847
- },
3848
- generate(componentName) {
3849
- return generate(componentName);
3850
- },
3851
- reset() {
3852
- generate = defaultGenerator;
3853
- }
3854
- };
3855
- };
3856
- const ClassNameGenerator = createClassNameGenerator();
3857
-
3858
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
3859
-
3860
- function createBox(options = {}) {
3861
- const {
3862
- themeId,
3863
- defaultTheme,
3864
- defaultClassName = 'MuiBox-root',
3865
- generateClassName
3866
- } = options;
3867
- const BoxRoot = styled$2('div', {
3868
- shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
3869
- })(styleFunctionSx);
3870
- const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
3871
- const theme = useTheme$1(defaultTheme);
3872
- const {
3873
- className,
3874
- component = 'div',
3875
- ...other
3876
- } = extendSxProp$1(inProps);
3877
- return /*#__PURE__*/jsx(BoxRoot, {
3878
- as: component,
3879
- ref: ref,
3880
- className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
3881
- theme: themeId ? theme[themeId] || theme : theme,
3882
- ...other
3883
- });
3884
- });
3885
- return Box;
3886
- }
3887
-
3888
- const globalStateClasses = {
3889
- active: 'active',
3890
- checked: 'checked',
3891
- completed: 'completed',
3892
- disabled: 'disabled',
3893
- error: 'error',
3894
- expanded: 'expanded',
3895
- focused: 'focused',
3896
- focusVisible: 'focusVisible',
3897
- open: 'open',
3898
- readOnly: 'readOnly',
3899
- required: 'required',
3900
- selected: 'selected'
3901
- };
3902
- function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
3903
- const globalStateClass = globalStateClasses[slot];
3904
- return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
3905
- }
3906
-
3907
- function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
3908
- const result = {};
3909
- slots.forEach(slot => {
3910
- result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
3911
- });
3912
- return result;
3913
- }
3914
-
3915
- var reactIs = {exports: {}};
3916
-
3917
- var reactIs_production = {};
3918
-
3919
- /**
3920
- * @license React
3921
- * react-is.production.js
3922
- *
3923
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3924
- *
3925
- * This source code is licensed under the MIT license found in the
3926
- * LICENSE file in the root directory of this source tree.
3927
- */
3928
-
3929
- var hasRequiredReactIs_production;
3930
-
3931
- function requireReactIs_production () {
3932
- if (hasRequiredReactIs_production) return reactIs_production;
3933
- hasRequiredReactIs_production = 1;
3934
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
3935
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
3936
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
3937
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
3938
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
3939
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
3940
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
3941
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
3942
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
3943
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
3944
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
3945
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
3946
- REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
3947
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
3948
- function typeOf(object) {
3949
- if ("object" === typeof object && null !== object) {
3950
- var $$typeof = object.$$typeof;
3951
- switch ($$typeof) {
3952
- case REACT_ELEMENT_TYPE:
3953
- switch (((object = object.type), object)) {
3954
- case REACT_FRAGMENT_TYPE:
3955
- case REACT_PROFILER_TYPE:
3956
- case REACT_STRICT_MODE_TYPE:
3957
- case REACT_SUSPENSE_TYPE:
3958
- case REACT_SUSPENSE_LIST_TYPE:
3959
- return object;
3960
- default:
3961
- switch (((object = object && object.$$typeof), object)) {
3962
- case REACT_CONTEXT_TYPE:
3963
- case REACT_FORWARD_REF_TYPE:
3964
- case REACT_LAZY_TYPE:
3965
- case REACT_MEMO_TYPE:
3966
- return object;
3967
- case REACT_CONSUMER_TYPE:
3968
- return object;
3969
- default:
3970
- return $$typeof;
3971
- }
3972
- }
3973
- case REACT_PORTAL_TYPE:
3974
- return $$typeof;
3975
- }
3976
- }
3977
- }
3978
- reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
3979
- reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
3980
- reactIs_production.Element = REACT_ELEMENT_TYPE;
3981
- reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
3982
- reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
3983
- reactIs_production.Lazy = REACT_LAZY_TYPE;
3984
- reactIs_production.Memo = REACT_MEMO_TYPE;
3985
- reactIs_production.Portal = REACT_PORTAL_TYPE;
3986
- reactIs_production.Profiler = REACT_PROFILER_TYPE;
3987
- reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
3988
- reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
3989
- reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
3990
- reactIs_production.isContextConsumer = function (object) {
3991
- return typeOf(object) === REACT_CONSUMER_TYPE;
3992
- };
3993
- reactIs_production.isContextProvider = function (object) {
3994
- return typeOf(object) === REACT_CONTEXT_TYPE;
3995
- };
3996
- reactIs_production.isElement = function (object) {
3997
- return (
3998
- "object" === typeof object &&
3999
- null !== object &&
4000
- object.$$typeof === REACT_ELEMENT_TYPE
4001
- );
4002
- };
4003
- reactIs_production.isForwardRef = function (object) {
4004
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
4005
- };
4006
- reactIs_production.isFragment = function (object) {
4007
- return typeOf(object) === REACT_FRAGMENT_TYPE;
4008
- };
4009
- reactIs_production.isLazy = function (object) {
4010
- return typeOf(object) === REACT_LAZY_TYPE;
4011
- };
4012
- reactIs_production.isMemo = function (object) {
4013
- return typeOf(object) === REACT_MEMO_TYPE;
4014
- };
4015
- reactIs_production.isPortal = function (object) {
4016
- return typeOf(object) === REACT_PORTAL_TYPE;
4017
- };
4018
- reactIs_production.isProfiler = function (object) {
4019
- return typeOf(object) === REACT_PROFILER_TYPE;
4020
- };
4021
- reactIs_production.isStrictMode = function (object) {
4022
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
4023
- };
4024
- reactIs_production.isSuspense = function (object) {
4025
- return typeOf(object) === REACT_SUSPENSE_TYPE;
4026
- };
4027
- reactIs_production.isSuspenseList = function (object) {
4028
- return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
4029
- };
4030
- reactIs_production.isValidElementType = function (type) {
4031
- return "string" === typeof type ||
4032
- "function" === typeof type ||
4033
- type === REACT_FRAGMENT_TYPE ||
4034
- type === REACT_PROFILER_TYPE ||
4035
- type === REACT_STRICT_MODE_TYPE ||
4036
- type === REACT_SUSPENSE_TYPE ||
4037
- type === REACT_SUSPENSE_LIST_TYPE ||
4038
- type === REACT_OFFSCREEN_TYPE ||
4039
- ("object" === typeof type &&
4040
- null !== type &&
4041
- (type.$$typeof === REACT_LAZY_TYPE ||
4042
- type.$$typeof === REACT_MEMO_TYPE ||
4043
- type.$$typeof === REACT_CONTEXT_TYPE ||
4044
- type.$$typeof === REACT_CONSUMER_TYPE ||
4045
- type.$$typeof === REACT_FORWARD_REF_TYPE ||
4046
- type.$$typeof === REACT_CLIENT_REFERENCE ||
4047
- void 0 !== type.getModuleId))
4048
- ? !0
4049
- : !1;
4050
- };
4051
- reactIs_production.typeOf = typeOf;
4052
- return reactIs_production;
4115
+ ...result
4116
+ };
4117
+ };
4118
+ } else {
4119
+ finalSx = {
4120
+ ...systemProps,
4121
+ ...inSx
4122
+ };
4123
+ }
4124
+ return {
4125
+ ...otherProps,
4126
+ sx: finalSx
4127
+ };
4053
4128
  }
4054
4129
 
4055
- var reactIs_development = {};
4056
-
4057
- /**
4058
- * @license React
4059
- * react-is.development.js
4060
- *
4061
- * Copyright (c) Meta Platforms, Inc. and affiliates.
4062
- *
4063
- * This source code is licensed under the MIT license found in the
4064
- * LICENSE file in the root directory of this source tree.
4065
- */
4130
+ const defaultGenerator = componentName => componentName;
4131
+ const createClassNameGenerator = () => {
4132
+ let generate = defaultGenerator;
4133
+ return {
4134
+ configure(generator) {
4135
+ generate = generator;
4136
+ },
4137
+ generate(componentName) {
4138
+ return generate(componentName);
4139
+ },
4140
+ reset() {
4141
+ generate = defaultGenerator;
4142
+ }
4143
+ };
4144
+ };
4145
+ const ClassNameGenerator = createClassNameGenerator();
4066
4146
 
4067
- var hasRequiredReactIs_development;
4147
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
4068
4148
 
4069
- function requireReactIs_development () {
4070
- if (hasRequiredReactIs_development) return reactIs_development;
4071
- hasRequiredReactIs_development = 1;
4072
- "production" !== process.env.NODE_ENV &&
4073
- (function () {
4074
- function typeOf(object) {
4075
- if ("object" === typeof object && null !== object) {
4076
- var $$typeof = object.$$typeof;
4077
- switch ($$typeof) {
4078
- case REACT_ELEMENT_TYPE:
4079
- switch (((object = object.type), object)) {
4080
- case REACT_FRAGMENT_TYPE:
4081
- case REACT_PROFILER_TYPE:
4082
- case REACT_STRICT_MODE_TYPE:
4083
- case REACT_SUSPENSE_TYPE:
4084
- case REACT_SUSPENSE_LIST_TYPE:
4085
- return object;
4086
- default:
4087
- switch (((object = object && object.$$typeof), object)) {
4088
- case REACT_CONTEXT_TYPE:
4089
- case REACT_FORWARD_REF_TYPE:
4090
- case REACT_LAZY_TYPE:
4091
- case REACT_MEMO_TYPE:
4092
- return object;
4093
- case REACT_CONSUMER_TYPE:
4094
- return object;
4095
- default:
4096
- return $$typeof;
4097
- }
4098
- }
4099
- case REACT_PORTAL_TYPE:
4100
- return $$typeof;
4101
- }
4102
- }
4103
- }
4104
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
4105
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
4106
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
4107
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
4108
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
4109
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
4110
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
4111
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
4112
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
4113
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
4114
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
4115
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
4116
- REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
4117
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
4118
- reactIs_development.ContextConsumer = REACT_CONSUMER_TYPE;
4119
- reactIs_development.ContextProvider = REACT_CONTEXT_TYPE;
4120
- reactIs_development.Element = REACT_ELEMENT_TYPE;
4121
- reactIs_development.ForwardRef = REACT_FORWARD_REF_TYPE;
4122
- reactIs_development.Fragment = REACT_FRAGMENT_TYPE;
4123
- reactIs_development.Lazy = REACT_LAZY_TYPE;
4124
- reactIs_development.Memo = REACT_MEMO_TYPE;
4125
- reactIs_development.Portal = REACT_PORTAL_TYPE;
4126
- reactIs_development.Profiler = REACT_PROFILER_TYPE;
4127
- reactIs_development.StrictMode = REACT_STRICT_MODE_TYPE;
4128
- reactIs_development.Suspense = REACT_SUSPENSE_TYPE;
4129
- reactIs_development.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
4130
- reactIs_development.isContextConsumer = function (object) {
4131
- return typeOf(object) === REACT_CONSUMER_TYPE;
4132
- };
4133
- reactIs_development.isContextProvider = function (object) {
4134
- return typeOf(object) === REACT_CONTEXT_TYPE;
4135
- };
4136
- reactIs_development.isElement = function (object) {
4137
- return (
4138
- "object" === typeof object &&
4139
- null !== object &&
4140
- object.$$typeof === REACT_ELEMENT_TYPE
4141
- );
4142
- };
4143
- reactIs_development.isForwardRef = function (object) {
4144
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
4145
- };
4146
- reactIs_development.isFragment = function (object) {
4147
- return typeOf(object) === REACT_FRAGMENT_TYPE;
4148
- };
4149
- reactIs_development.isLazy = function (object) {
4150
- return typeOf(object) === REACT_LAZY_TYPE;
4151
- };
4152
- reactIs_development.isMemo = function (object) {
4153
- return typeOf(object) === REACT_MEMO_TYPE;
4154
- };
4155
- reactIs_development.isPortal = function (object) {
4156
- return typeOf(object) === REACT_PORTAL_TYPE;
4157
- };
4158
- reactIs_development.isProfiler = function (object) {
4159
- return typeOf(object) === REACT_PROFILER_TYPE;
4160
- };
4161
- reactIs_development.isStrictMode = function (object) {
4162
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
4163
- };
4164
- reactIs_development.isSuspense = function (object) {
4165
- return typeOf(object) === REACT_SUSPENSE_TYPE;
4166
- };
4167
- reactIs_development.isSuspenseList = function (object) {
4168
- return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
4169
- };
4170
- reactIs_development.isValidElementType = function (type) {
4171
- return "string" === typeof type ||
4172
- "function" === typeof type ||
4173
- type === REACT_FRAGMENT_TYPE ||
4174
- type === REACT_PROFILER_TYPE ||
4175
- type === REACT_STRICT_MODE_TYPE ||
4176
- type === REACT_SUSPENSE_TYPE ||
4177
- type === REACT_SUSPENSE_LIST_TYPE ||
4178
- type === REACT_OFFSCREEN_TYPE ||
4179
- ("object" === typeof type &&
4180
- null !== type &&
4181
- (type.$$typeof === REACT_LAZY_TYPE ||
4182
- type.$$typeof === REACT_MEMO_TYPE ||
4183
- type.$$typeof === REACT_CONTEXT_TYPE ||
4184
- type.$$typeof === REACT_CONSUMER_TYPE ||
4185
- type.$$typeof === REACT_FORWARD_REF_TYPE ||
4186
- type.$$typeof === REACT_CLIENT_REFERENCE ||
4187
- void 0 !== type.getModuleId))
4188
- ? !0
4189
- : !1;
4190
- };
4191
- reactIs_development.typeOf = typeOf;
4192
- })();
4193
- return reactIs_development;
4149
+ function createBox(options = {}) {
4150
+ const {
4151
+ themeId,
4152
+ defaultTheme,
4153
+ defaultClassName = 'MuiBox-root',
4154
+ generateClassName
4155
+ } = options;
4156
+ const BoxRoot = styled$2('div', {
4157
+ shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
4158
+ })(styleFunctionSx);
4159
+ const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
4160
+ const theme = useTheme$1(defaultTheme);
4161
+ const {
4162
+ className,
4163
+ component = 'div',
4164
+ ...other
4165
+ } = extendSxProp$1(inProps);
4166
+ return /*#__PURE__*/jsx(BoxRoot, {
4167
+ as: component,
4168
+ ref: ref,
4169
+ className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
4170
+ theme: themeId ? theme[themeId] || theme : theme,
4171
+ ...other
4172
+ });
4173
+ });
4174
+ return Box;
4194
4175
  }
4195
4176
 
4196
- if (process.env.NODE_ENV === 'production') {
4197
- reactIs.exports = requireReactIs_production();
4198
- } else {
4199
- reactIs.exports = requireReactIs_development();
4177
+ const globalStateClasses = {
4178
+ active: 'active',
4179
+ checked: 'checked',
4180
+ completed: 'completed',
4181
+ disabled: 'disabled',
4182
+ error: 'error',
4183
+ expanded: 'expanded',
4184
+ focused: 'focused',
4185
+ focusVisible: 'focusVisible',
4186
+ open: 'open',
4187
+ readOnly: 'readOnly',
4188
+ required: 'required',
4189
+ selected: 'selected'
4190
+ };
4191
+ function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
4192
+ const globalStateClass = globalStateClasses[slot];
4193
+ return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
4200
4194
  }
4201
4195
 
4202
- var reactIsExports = reactIs.exports;
4196
+ function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
4197
+ const result = {};
4198
+ slots.forEach(slot => {
4199
+ result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
4200
+ });
4201
+ return result;
4202
+ }
4203
4203
 
4204
4204
  function getFunctionComponentName(Component, fallback = '') {
4205
4205
  return Component.displayName || Component.name || fallback;
@@ -5108,6 +5108,49 @@ function setRef(ref, value) {
5108
5108
  }
5109
5109
  }
5110
5110
 
5111
+ let globalId = 0;
5112
+
5113
+ // TODO React 17: Remove `useGlobalId` once React 17 support is removed
5114
+ function useGlobalId(idOverride) {
5115
+ const [defaultId, setDefaultId] = React.useState(idOverride);
5116
+ const id = idOverride || defaultId;
5117
+ React.useEffect(() => {
5118
+ if (defaultId == null) {
5119
+ // Fallback to this default id when possible.
5120
+ // Use the incrementing value for client-side rendering only.
5121
+ // We can't use it server-side.
5122
+ // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
5123
+ globalId += 1;
5124
+ setDefaultId(`mui-${globalId}`);
5125
+ }
5126
+ }, [defaultId]);
5127
+ return id;
5128
+ }
5129
+
5130
+ // See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
5131
+ const safeReact = {
5132
+ ...React
5133
+ };
5134
+ const maybeReactUseId = safeReact.useId;
5135
+
5136
+ /**
5137
+ *
5138
+ * @example <div id={useId()} />
5139
+ * @param idOverride
5140
+ * @returns {string}
5141
+ */
5142
+ function useId(idOverride) {
5143
+ // React.useId() is only available from React 17.0.0.
5144
+ if (maybeReactUseId !== undefined) {
5145
+ const reactId = maybeReactUseId();
5146
+ return idOverride ?? reactId;
5147
+ }
5148
+
5149
+ // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
5150
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
5151
+ return useGlobalId(idOverride);
5152
+ }
5153
+
5111
5154
  function useControlled({
5112
5155
  controlled,
5113
5156
  default: defaultProp,
@@ -7053,7 +7096,7 @@ function setColor(obj, key, defaultValue) {
7053
7096
  }
7054
7097
  }
7055
7098
  function toRgb(color) {
7056
- if (!color || !color.startsWith('hsl')) {
7099
+ if (typeof color !== 'string' || !color.startsWith('hsl')) {
7057
7100
  return color;
7058
7101
  }
7059
7102
  return hslToRgb(color);
@@ -7345,7 +7388,7 @@ function createThemeWithVars(options = {}, ...args) {
7345
7388
 
7346
7389
  // The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.
7347
7390
 
7348
- if (colors && typeof colors === 'object') {
7391
+ if (color !== 'tonalOffset' && colors && typeof colors === 'object') {
7349
7392
  // Silent the error for custom palettes.
7350
7393
  if (colors.main) {
7351
7394
  setColor(palette[color], 'mainChannel', private_safeColorChannel(toRgb(colors.main)));
@@ -9389,7 +9432,7 @@ const v6Colors = {
9389
9432
  textDisabled: true
9390
9433
  };
9391
9434
  const extendSxProp = internal_createExtendSxProp();
9392
- const useUtilityClasses$l = ownerState => {
9435
+ const useUtilityClasses$m = ownerState => {
9393
9436
  const {
9394
9437
  align,
9395
9438
  gutterBottom,
@@ -9530,7 +9573,7 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, re
9530
9573
  variantMapping
9531
9574
  };
9532
9575
  const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';
9533
- const classes = useUtilityClasses$l(ownerState);
9576
+ const classes = useUtilityClasses$m(ownerState);
9534
9577
  return /*#__PURE__*/jsx(TypographyRoot, {
9535
9578
  as: Component,
9536
9579
  ref: ref,
@@ -10358,7 +10401,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
10358
10401
  onExited: PropTypes.func
10359
10402
  } : {}; // Name the function so it is clearer in the documentation
10360
10403
 
10361
- function noop() {}
10404
+ function noop$1() {}
10362
10405
 
10363
10406
  Transition.defaultProps = {
10364
10407
  in: false,
@@ -10367,12 +10410,12 @@ Transition.defaultProps = {
10367
10410
  appear: false,
10368
10411
  enter: true,
10369
10412
  exit: true,
10370
- onEnter: noop,
10371
- onEntering: noop,
10372
- onEntered: noop,
10373
- onExit: noop,
10374
- onExiting: noop,
10375
- onExited: noop
10413
+ onEnter: noop$1,
10414
+ onEntering: noop$1,
10415
+ onEntered: noop$1,
10416
+ onExit: noop$1,
10417
+ onExiting: noop$1,
10418
+ onExited: noop$1
10376
10419
  };
10377
10420
  Transition.UNMOUNTED = UNMOUNTED;
10378
10421
  Transition.EXITED = EXITED;
@@ -11102,7 +11145,7 @@ function getButtonBaseUtilityClass(slot) {
11102
11145
  }
11103
11146
  const buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);
11104
11147
 
11105
- const useUtilityClasses$k = ownerState => {
11148
+ const useUtilityClasses$l = ownerState => {
11106
11149
  const {
11107
11150
  disabled,
11108
11151
  focusVisible,
@@ -11223,34 +11266,22 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
11223
11266
  ripple.pulsate();
11224
11267
  }
11225
11268
  }, [disableRipple, focusRipple, focusVisible, ripple]);
11226
- function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
11227
- return useEventCallback(event => {
11228
- if (eventCallback) {
11229
- eventCallback(event);
11230
- }
11231
- const ignore = skipRippleAction;
11232
- if (!ignore) {
11233
- ripple[rippleAction](event);
11234
- }
11235
- return true;
11236
- });
11237
- }
11238
- const handleMouseDown = useRippleHandler('start', onMouseDown);
11239
- const handleContextMenu = useRippleHandler('stop', onContextMenu);
11240
- const handleDragLeave = useRippleHandler('stop', onDragLeave);
11241
- const handleMouseUp = useRippleHandler('stop', onMouseUp);
11242
- const handleMouseLeave = useRippleHandler('stop', event => {
11269
+ const handleMouseDown = useRippleHandler(ripple, 'start', onMouseDown, disableTouchRipple);
11270
+ const handleContextMenu = useRippleHandler(ripple, 'stop', onContextMenu, disableTouchRipple);
11271
+ const handleDragLeave = useRippleHandler(ripple, 'stop', onDragLeave, disableTouchRipple);
11272
+ const handleMouseUp = useRippleHandler(ripple, 'stop', onMouseUp, disableTouchRipple);
11273
+ const handleMouseLeave = useRippleHandler(ripple, 'stop', event => {
11243
11274
  if (focusVisible) {
11244
11275
  event.preventDefault();
11245
11276
  }
11246
11277
  if (onMouseLeave) {
11247
11278
  onMouseLeave(event);
11248
11279
  }
11249
- });
11250
- const handleTouchStart = useRippleHandler('start', onTouchStart);
11251
- const handleTouchEnd = useRippleHandler('stop', onTouchEnd);
11252
- const handleTouchMove = useRippleHandler('stop', onTouchMove);
11253
- const handleBlur = useRippleHandler('stop', event => {
11280
+ }, disableTouchRipple);
11281
+ const handleTouchStart = useRippleHandler(ripple, 'start', onTouchStart, disableTouchRipple);
11282
+ const handleTouchEnd = useRippleHandler(ripple, 'stop', onTouchEnd, disableTouchRipple);
11283
+ const handleTouchMove = useRippleHandler(ripple, 'stop', onTouchMove, disableTouchRipple);
11284
+ const handleBlur = useRippleHandler(ripple, 'stop', event => {
11254
11285
  if (!isFocusVisible(event.target)) {
11255
11286
  setFocusVisible(false);
11256
11287
  }
@@ -11344,7 +11375,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
11344
11375
  tabIndex,
11345
11376
  focusVisible
11346
11377
  };
11347
- const classes = useUtilityClasses$k(ownerState);
11378
+ const classes = useUtilityClasses$l(ownerState);
11348
11379
  return /*#__PURE__*/jsxs(ButtonBaseRoot, {
11349
11380
  as: ComponentProp,
11350
11381
  className: clsx(classes.root, className),
@@ -11374,6 +11405,17 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
11374
11405
  }) : null]
11375
11406
  });
11376
11407
  });
11408
+ function useRippleHandler(ripple, rippleAction, eventCallback, skipRippleAction = false) {
11409
+ return useEventCallback(event => {
11410
+ if (eventCallback) {
11411
+ eventCallback(event);
11412
+ }
11413
+ if (!skipRippleAction) {
11414
+ ripple[rippleAction](event);
11415
+ }
11416
+ return true;
11417
+ });
11418
+ }
11377
11419
  process.env.NODE_ENV !== "production" ? ButtonBase.propTypes /* remove-proptypes */ = {
11378
11420
  // ┌────────────────────────────── Warning ──────────────────────────────┐
11379
11421
  // │ These PropTypes are generated from the TypeScript type definitions. │
@@ -11538,7 +11580,7 @@ function getSwitchBaseUtilityClass(slot) {
11538
11580
  }
11539
11581
  generateUtilityClasses('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']);
11540
11582
 
11541
- const useUtilityClasses$j = ownerState => {
11583
+ const useUtilityClasses$k = ownerState => {
11542
11584
  const {
11543
11585
  classes,
11544
11586
  checked,
@@ -11680,7 +11722,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
11680
11722
  disableFocusRipple,
11681
11723
  edge
11682
11724
  };
11683
- const classes = useUtilityClasses$j(ownerState);
11725
+ const classes = useUtilityClasses$k(ownerState);
11684
11726
  return /*#__PURE__*/jsxs(SwitchBaseRoot, {
11685
11727
  component: "span",
11686
11728
  className: clsx(classes.root, className),
@@ -11828,7 +11870,7 @@ function getSvgIconUtilityClass(slot) {
11828
11870
  }
11829
11871
  generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
11830
11872
 
11831
- const useUtilityClasses$i = ownerState => {
11873
+ const useUtilityClasses$j = ownerState => {
11832
11874
  const {
11833
11875
  color,
11834
11876
  fontSize,
@@ -11958,7 +12000,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
11958
12000
  if (!inheritViewBox) {
11959
12001
  more.viewBox = viewBox;
11960
12002
  }
11961
- const classes = useUtilityClasses$i(ownerState);
12003
+ const classes = useUtilityClasses$j(ownerState);
11962
12004
  return /*#__PURE__*/jsxs(SvgIconRoot, {
11963
12005
  as: component,
11964
12006
  className: clsx(classes.root, className),
@@ -12048,9 +12090,7 @@ process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */
12048
12090
  */
12049
12091
  viewBox: PropTypes.string
12050
12092
  } : void 0;
12051
- if (SvgIcon) {
12052
- SvgIcon.muiName = 'SvgIcon';
12053
- }
12093
+ SvgIcon.muiName = 'SvgIcon';
12054
12094
 
12055
12095
  function createSvgIcon(path, displayName) {
12056
12096
  function Component(props, ref) {
@@ -12172,7 +12212,7 @@ function getRadioUtilityClass(slot) {
12172
12212
  }
12173
12213
  const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
12174
12214
 
12175
- const useUtilityClasses$h = ownerState => {
12215
+ const useUtilityClasses$i = ownerState => {
12176
12216
  const {
12177
12217
  classes,
12178
12218
  color,
@@ -12295,7 +12335,7 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
12295
12335
  color,
12296
12336
  size
12297
12337
  };
12298
- const classes = useUtilityClasses$h(ownerState);
12338
+ const classes = useUtilityClasses$i(ownerState);
12299
12339
  const radioGroup = useRadioGroup();
12300
12340
  let checked = checkedProp;
12301
12341
  const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);
@@ -12432,7 +12472,7 @@ function getCheckboxUtilityClass(slot) {
12432
12472
  }
12433
12473
  const checkboxClasses = generateUtilityClasses('MuiCheckbox', ['root', 'checked', 'disabled', 'indeterminate', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium']);
12434
12474
 
12435
- const useUtilityClasses$g = ownerState => {
12475
+ const useUtilityClasses$h = ownerState => {
12436
12476
  const {
12437
12477
  classes,
12438
12478
  indeterminate,
@@ -12539,7 +12579,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
12539
12579
  indeterminate,
12540
12580
  size
12541
12581
  };
12542
- const classes = useUtilityClasses$g(ownerState);
12582
+ const classes = useUtilityClasses$h(ownerState);
12543
12583
  return /*#__PURE__*/jsx(CheckboxRoot, {
12544
12584
  type: "checkbox",
12545
12585
  inputProps: {
@@ -12825,7 +12865,7 @@ function getPaperUtilityClass(slot) {
12825
12865
  }
12826
12866
  generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);
12827
12867
 
12828
- const useUtilityClasses$f = ownerState => {
12868
+ const useUtilityClasses$g = ownerState => {
12829
12869
  const {
12830
12870
  square,
12831
12871
  elevation,
@@ -12897,7 +12937,7 @@ const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
12897
12937
  square,
12898
12938
  variant
12899
12939
  };
12900
- const classes = useUtilityClasses$f(ownerState);
12940
+ const classes = useUtilityClasses$g(ownerState);
12901
12941
  if (process.env.NODE_ENV !== 'production') {
12902
12942
  if (theme.shadows[elevation] === undefined) {
12903
12943
  console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join('\n'));
@@ -12961,10 +13001,349 @@ process.env.NODE_ENV !== "production" ? Paper.propTypes /* remove-proptypes */ =
12961
13001
  return null;
12962
13002
  }),
12963
13003
  /**
12964
- * If `true`, rounded corners are disabled.
12965
- * @default false
13004
+ * If `true`, rounded corners are disabled.
13005
+ * @default false
13006
+ */
13007
+ square: PropTypes.bool,
13008
+ /**
13009
+ * @ignore
13010
+ */
13011
+ style: PropTypes.object,
13012
+ /**
13013
+ * The system prop that allows defining system overrides as well as additional CSS styles.
13014
+ */
13015
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
13016
+ /**
13017
+ * The variant to use.
13018
+ * @default 'elevation'
13019
+ */
13020
+ variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])
13021
+ } : void 0;
13022
+
13023
+ /**
13024
+ * An internal function to create a Material UI slot.
13025
+ *
13026
+ * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop
13027
+ * while Base UI does not need to support leaf component customization.
13028
+ *
13029
+ * @param {string} name: name of the slot
13030
+ * @param {object} parameters
13031
+ * @returns {[Slot, slotProps]} The slot's React component and the slot's props
13032
+ *
13033
+ * Note: the returned slot's props
13034
+ * - will never contain `component` prop.
13035
+ * - might contain `as` prop.
13036
+ */
13037
+ function useSlot(
13038
+ /**
13039
+ * The slot's name. All Material UI components should have `root` slot.
13040
+ *
13041
+ * If the name is `root`, the logic behaves differently from other slots,
13042
+ * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.
13043
+ */
13044
+ name, parameters) {
13045
+ const {
13046
+ className,
13047
+ elementType: initialElementType,
13048
+ ownerState,
13049
+ externalForwardedProps,
13050
+ internalForwardedProps,
13051
+ shouldForwardComponentProp = false,
13052
+ ...useSlotPropsParams
13053
+ } = parameters;
13054
+ const {
13055
+ component: rootComponent,
13056
+ slots = {
13057
+ [name]: undefined
13058
+ },
13059
+ slotProps = {
13060
+ [name]: undefined
13061
+ },
13062
+ ...other
13063
+ } = externalForwardedProps;
13064
+ const elementType = slots[name] || initialElementType;
13065
+
13066
+ // `slotProps[name]` can be a callback that receives the component's ownerState.
13067
+ // `resolvedComponentsProps` is always a plain object.
13068
+ const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
13069
+ const {
13070
+ props: {
13071
+ component: slotComponent,
13072
+ ...mergedProps
13073
+ },
13074
+ internalRef
13075
+ } = mergeSlotProps({
13076
+ className,
13077
+ ...useSlotPropsParams,
13078
+ externalForwardedProps: name === 'root' ? other : undefined,
13079
+ externalSlotProps: resolvedComponentsProps
13080
+ });
13081
+ const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);
13082
+ const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;
13083
+ const props = appendOwnerState(elementType, {
13084
+ ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),
13085
+ ...(name !== 'root' && !slots[name] && internalForwardedProps),
13086
+ ...mergedProps,
13087
+ ...(LeafComponent && !shouldForwardComponentProp && {
13088
+ as: LeafComponent
13089
+ }),
13090
+ ...(LeafComponent && shouldForwardComponentProp && {
13091
+ component: LeafComponent
13092
+ }),
13093
+ ref
13094
+ }, ownerState);
13095
+ return [elementType, props];
13096
+ }
13097
+
13098
+ function getCircularProgressUtilityClass(slot) {
13099
+ return generateUtilityClass('MuiCircularProgress', slot);
13100
+ }
13101
+ generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);
13102
+
13103
+ const SIZE = 44;
13104
+ const circularRotateKeyframe = keyframes`
13105
+ 0% {
13106
+ transform: rotate(0deg);
13107
+ }
13108
+
13109
+ 100% {
13110
+ transform: rotate(360deg);
13111
+ }
13112
+ `;
13113
+ const circularDashKeyframe = keyframes`
13114
+ 0% {
13115
+ stroke-dasharray: 1px, 200px;
13116
+ stroke-dashoffset: 0;
13117
+ }
13118
+
13119
+ 50% {
13120
+ stroke-dasharray: 100px, 200px;
13121
+ stroke-dashoffset: -15px;
13122
+ }
13123
+
13124
+ 100% {
13125
+ stroke-dasharray: 1px, 200px;
13126
+ stroke-dashoffset: -126px;
13127
+ }
13128
+ `;
13129
+
13130
+ // This implementation is for supporting both Styled-components v4+ and Pigment CSS.
13131
+ // A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).
13132
+ // which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).
13133
+ const rotateAnimation = typeof circularRotateKeyframe !== 'string' ? css`
13134
+ animation: ${circularRotateKeyframe} 1.4s linear infinite;
13135
+ ` : null;
13136
+ const dashAnimation = typeof circularDashKeyframe !== 'string' ? css`
13137
+ animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
13138
+ ` : null;
13139
+ const useUtilityClasses$f = ownerState => {
13140
+ const {
13141
+ classes,
13142
+ variant,
13143
+ color,
13144
+ disableShrink
13145
+ } = ownerState;
13146
+ const slots = {
13147
+ root: ['root', variant, `color${capitalize(color)}`],
13148
+ svg: ['svg'],
13149
+ circle: ['circle', `circle${capitalize(variant)}`, disableShrink && 'circleDisableShrink']
13150
+ };
13151
+ return composeClasses(slots, getCircularProgressUtilityClass, classes);
13152
+ };
13153
+ const CircularProgressRoot = styled('span', {
13154
+ name: 'MuiCircularProgress',
13155
+ slot: 'Root',
13156
+ overridesResolver: (props, styles) => {
13157
+ const {
13158
+ ownerState
13159
+ } = props;
13160
+ return [styles.root, styles[ownerState.variant], styles[`color${capitalize(ownerState.color)}`]];
13161
+ }
13162
+ })(memoTheme(({
13163
+ theme
13164
+ }) => ({
13165
+ display: 'inline-block',
13166
+ variants: [{
13167
+ props: {
13168
+ variant: 'determinate'
13169
+ },
13170
+ style: {
13171
+ transition: theme.transitions.create('transform')
13172
+ }
13173
+ }, {
13174
+ props: {
13175
+ variant: 'indeterminate'
13176
+ },
13177
+ style: rotateAnimation || {
13178
+ animation: `${circularRotateKeyframe} 1.4s linear infinite`
13179
+ }
13180
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
13181
+ props: {
13182
+ color
13183
+ },
13184
+ style: {
13185
+ color: (theme.vars || theme).palette[color].main
13186
+ }
13187
+ }))]
13188
+ })));
13189
+ const CircularProgressSVG = styled('svg', {
13190
+ name: 'MuiCircularProgress',
13191
+ slot: 'Svg',
13192
+ overridesResolver: (props, styles) => styles.svg
13193
+ })({
13194
+ display: 'block' // Keeps the progress centered
13195
+ });
13196
+ const CircularProgressCircle = styled('circle', {
13197
+ name: 'MuiCircularProgress',
13198
+ slot: 'Circle',
13199
+ overridesResolver: (props, styles) => {
13200
+ const {
13201
+ ownerState
13202
+ } = props;
13203
+ return [styles.circle, styles[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles.circleDisableShrink];
13204
+ }
13205
+ })(memoTheme(({
13206
+ theme
13207
+ }) => ({
13208
+ stroke: 'currentColor',
13209
+ variants: [{
13210
+ props: {
13211
+ variant: 'determinate'
13212
+ },
13213
+ style: {
13214
+ transition: theme.transitions.create('stroke-dashoffset')
13215
+ }
13216
+ }, {
13217
+ props: {
13218
+ variant: 'indeterminate'
13219
+ },
13220
+ style: {
13221
+ // Some default value that looks fine waiting for the animation to kicks in.
13222
+ strokeDasharray: '80px, 200px',
13223
+ strokeDashoffset: 0 // Add the unit to fix a Edge 16 and below bug.
13224
+ }
13225
+ }, {
13226
+ props: ({
13227
+ ownerState
13228
+ }) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink,
13229
+ style: dashAnimation || {
13230
+ // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
13231
+ animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`
13232
+ }
13233
+ }]
13234
+ })));
13235
+
13236
+ /**
13237
+ * ## ARIA
13238
+ *
13239
+ * If the progress bar is describing the loading progress of a particular region of a page,
13240
+ * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
13241
+ * attribute to `true` on that region until it has finished loading.
13242
+ */
13243
+ const CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(inProps, ref) {
13244
+ const props = useDefaultProps({
13245
+ props: inProps,
13246
+ name: 'MuiCircularProgress'
13247
+ });
13248
+ const {
13249
+ className,
13250
+ color = 'primary',
13251
+ disableShrink = false,
13252
+ size = 40,
13253
+ style,
13254
+ thickness = 3.6,
13255
+ value = 0,
13256
+ variant = 'indeterminate',
13257
+ ...other
13258
+ } = props;
13259
+ const ownerState = {
13260
+ ...props,
13261
+ color,
13262
+ disableShrink,
13263
+ size,
13264
+ thickness,
13265
+ value,
13266
+ variant
13267
+ };
13268
+ const classes = useUtilityClasses$f(ownerState);
13269
+ const circleStyle = {};
13270
+ const rootStyle = {};
13271
+ const rootProps = {};
13272
+ if (variant === 'determinate') {
13273
+ const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
13274
+ circleStyle.strokeDasharray = circumference.toFixed(3);
13275
+ rootProps['aria-valuenow'] = Math.round(value);
13276
+ circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;
13277
+ rootStyle.transform = 'rotate(-90deg)';
13278
+ }
13279
+ return /*#__PURE__*/jsx(CircularProgressRoot, {
13280
+ className: clsx(classes.root, className),
13281
+ style: {
13282
+ width: size,
13283
+ height: size,
13284
+ ...rootStyle,
13285
+ ...style
13286
+ },
13287
+ ownerState: ownerState,
13288
+ ref: ref,
13289
+ role: "progressbar",
13290
+ ...rootProps,
13291
+ ...other,
13292
+ children: /*#__PURE__*/jsx(CircularProgressSVG, {
13293
+ className: classes.svg,
13294
+ ownerState: ownerState,
13295
+ viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
13296
+ children: /*#__PURE__*/jsx(CircularProgressCircle, {
13297
+ className: classes.circle,
13298
+ style: circleStyle,
13299
+ ownerState: ownerState,
13300
+ cx: SIZE,
13301
+ cy: SIZE,
13302
+ r: (SIZE - thickness) / 2,
13303
+ fill: "none",
13304
+ strokeWidth: thickness
13305
+ })
13306
+ })
13307
+ });
13308
+ });
13309
+ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes /* remove-proptypes */ = {
13310
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
13311
+ // │ These PropTypes are generated from the TypeScript type definitions. │
13312
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
13313
+ // └─────────────────────────────────────────────────────────────────────┘
13314
+ /**
13315
+ * Override or extend the styles applied to the component.
13316
+ */
13317
+ classes: PropTypes.object,
13318
+ /**
13319
+ * @ignore
13320
+ */
13321
+ className: PropTypes.string,
13322
+ /**
13323
+ * The color of the component.
13324
+ * It supports both default and custom theme colors, which can be added as shown in the
13325
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
13326
+ * @default 'primary'
13327
+ */
13328
+ color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
13329
+ /**
13330
+ * If `true`, the shrink animation is disabled.
13331
+ * This only works if variant is `indeterminate`.
13332
+ * @default false
13333
+ */
13334
+ disableShrink: chainPropTypes(PropTypes.bool, props => {
13335
+ if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {
13336
+ return new Error('MUI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');
13337
+ }
13338
+ return null;
13339
+ }),
13340
+ /**
13341
+ * The size of the component.
13342
+ * If using a number, the pixel unit is assumed.
13343
+ * If using a string, you need to provide the CSS unit, for example '3rem'.
13344
+ * @default 40
12966
13345
  */
12967
- square: PropTypes.bool,
13346
+ size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
12968
13347
  /**
12969
13348
  * @ignore
12970
13349
  */
@@ -12973,97 +13352,29 @@ process.env.NODE_ENV !== "production" ? Paper.propTypes /* remove-proptypes */ =
12973
13352
  * The system prop that allows defining system overrides as well as additional CSS styles.
12974
13353
  */
12975
13354
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
13355
+ /**
13356
+ * The thickness of the circle.
13357
+ * @default 3.6
13358
+ */
13359
+ thickness: PropTypes.number,
13360
+ /**
13361
+ * The value of the progress indicator for the determinate variant.
13362
+ * Value between 0 and 100.
13363
+ * @default 0
13364
+ */
13365
+ value: PropTypes.number,
12976
13366
  /**
12977
13367
  * The variant to use.
12978
- * @default 'elevation'
13368
+ * Use indeterminate when there is no progress value.
13369
+ * @default 'indeterminate'
12979
13370
  */
12980
- variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])
13371
+ variant: PropTypes.oneOf(['determinate', 'indeterminate'])
12981
13372
  } : void 0;
12982
13373
 
12983
- /**
12984
- * An internal function to create a Material UI slot.
12985
- *
12986
- * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop
12987
- * while Base UI does not need to support leaf component customization.
12988
- *
12989
- * @param {string} name: name of the slot
12990
- * @param {object} parameters
12991
- * @returns {[Slot, slotProps]} The slot's React component and the slot's props
12992
- *
12993
- * Note: the returned slot's props
12994
- * - will never contain `component` prop.
12995
- * - might contain `as` prop.
12996
- */
12997
- function useSlot(
12998
- /**
12999
- * The slot's name. All Material UI components should have `root` slot.
13000
- *
13001
- * If the name is `root`, the logic behaves differently from other slots,
13002
- * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.
13003
- */
13004
- name, parameters) {
13005
- const {
13006
- className,
13007
- elementType: initialElementType,
13008
- ownerState,
13009
- externalForwardedProps,
13010
- getSlotOwnerState,
13011
- internalForwardedProps,
13012
- ...useSlotPropsParams
13013
- } = parameters;
13014
- const {
13015
- component: rootComponent,
13016
- slots = {
13017
- [name]: undefined
13018
- },
13019
- slotProps = {
13020
- [name]: undefined
13021
- },
13022
- ...other
13023
- } = externalForwardedProps;
13024
- const elementType = slots[name] || initialElementType;
13025
-
13026
- // `slotProps[name]` can be a callback that receives the component's ownerState.
13027
- // `resolvedComponentsProps` is always a plain object.
13028
- const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
13029
- const {
13030
- props: {
13031
- component: slotComponent,
13032
- ...mergedProps
13033
- },
13034
- internalRef
13035
- } = mergeSlotProps({
13036
- className,
13037
- ...useSlotPropsParams,
13038
- externalForwardedProps: name === 'root' ? other : undefined,
13039
- externalSlotProps: resolvedComponentsProps
13040
- });
13041
- const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);
13042
- const slotOwnerState = getSlotOwnerState ? getSlotOwnerState(mergedProps) : {};
13043
- const finalOwnerState = {
13044
- ...ownerState,
13045
- ...slotOwnerState
13046
- };
13047
- const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;
13048
- const props = appendOwnerState(elementType, {
13049
- ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),
13050
- ...(name !== 'root' && !slots[name] && internalForwardedProps),
13051
- ...mergedProps,
13052
- ...(LeafComponent && {
13053
- as: LeafComponent
13054
- }),
13055
- ref
13056
- }, finalOwnerState);
13057
- Object.keys(slotOwnerState).forEach(propName => {
13058
- delete props[propName];
13059
- });
13060
- return [elementType, props];
13061
- }
13062
-
13063
13374
  function getIconButtonUtilityClass(slot) {
13064
13375
  return generateUtilityClass('MuiIconButton', slot);
13065
13376
  }
13066
- const iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
13377
+ const iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'loading', 'loadingIndicator', 'loadingWrapper']);
13067
13378
 
13068
13379
  const useUtilityClasses$e = ownerState => {
13069
13380
  const {
@@ -13071,10 +13382,13 @@ const useUtilityClasses$e = ownerState => {
13071
13382
  disabled,
13072
13383
  color,
13073
13384
  edge,
13074
- size
13385
+ size,
13386
+ loading
13075
13387
  } = ownerState;
13076
13388
  const slots = {
13077
- root: ['root', disabled && 'disabled', color !== 'default' && `color${capitalize(color)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`]
13389
+ root: ['root', loading && 'loading', disabled && 'disabled', color !== 'default' && `color${capitalize(color)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],
13390
+ loadingIndicator: ['loadingIndicator'],
13391
+ loadingWrapper: ['loadingWrapper']
13078
13392
  };
13079
13393
  return composeClasses(slots, getIconButtonUtilityClass, classes);
13080
13394
  };
@@ -13085,7 +13399,7 @@ const IconButtonRoot = styled(ButtonBase, {
13085
13399
  const {
13086
13400
  ownerState
13087
13401
  } = props;
13088
- return [styles.root, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];
13402
+ return [styles.root, ownerState.loading && styles.loading, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];
13089
13403
  }
13090
13404
  })(memoTheme(({
13091
13405
  theme
@@ -13188,8 +13502,34 @@ const IconButtonRoot = styled(ButtonBase, {
13188
13502
  [`&.${iconButtonClasses.disabled}`]: {
13189
13503
  backgroundColor: 'transparent',
13190
13504
  color: (theme.vars || theme).palette.action.disabled
13505
+ },
13506
+ [`&.${iconButtonClasses.loading}`]: {
13507
+ color: 'transparent'
13191
13508
  }
13192
13509
  })));
13510
+ const IconButtonLoadingIndicator = styled('span', {
13511
+ name: 'MuiIconButton',
13512
+ slot: 'LoadingIndicator',
13513
+ overridesResolver: (props, styles) => styles.loadingIndicator
13514
+ })(({
13515
+ theme
13516
+ }) => ({
13517
+ display: 'none',
13518
+ position: 'absolute',
13519
+ visibility: 'visible',
13520
+ top: '50%',
13521
+ left: '50%',
13522
+ transform: 'translate(-50%, -50%)',
13523
+ color: (theme.vars || theme).palette.action.disabled,
13524
+ variants: [{
13525
+ props: {
13526
+ loading: true
13527
+ },
13528
+ style: {
13529
+ display: 'flex'
13530
+ }
13531
+ }]
13532
+ }));
13193
13533
 
13194
13534
  /**
13195
13535
  * Refer to the [Icons](/material-ui/icons/) section of the documentation
@@ -13208,26 +13548,51 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
13208
13548
  disabled = false,
13209
13549
  disableFocusRipple = false,
13210
13550
  size = 'medium',
13551
+ id: idProp,
13552
+ loading = null,
13553
+ loadingIndicator: loadingIndicatorProp,
13211
13554
  ...other
13212
13555
  } = props;
13556
+ const id = useId(idProp);
13557
+ const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/jsx(CircularProgress, {
13558
+ "aria-labelledby": id,
13559
+ color: "inherit",
13560
+ size: 16
13561
+ });
13213
13562
  const ownerState = {
13214
13563
  ...props,
13215
13564
  edge,
13216
13565
  color,
13217
13566
  disabled,
13218
13567
  disableFocusRipple,
13568
+ loading,
13569
+ loadingIndicator,
13219
13570
  size
13220
13571
  };
13221
13572
  const classes = useUtilityClasses$e(ownerState);
13222
- return /*#__PURE__*/jsx(IconButtonRoot, {
13573
+ return /*#__PURE__*/jsxs(IconButtonRoot, {
13574
+ id: id,
13223
13575
  className: clsx(classes.root, className),
13224
13576
  centerRipple: true,
13225
13577
  focusRipple: !disableFocusRipple,
13226
- disabled: disabled,
13578
+ disabled: disabled || loading,
13227
13579
  ref: ref,
13228
13580
  ...other,
13229
13581
  ownerState: ownerState,
13230
- children: children
13582
+ children: [typeof loading === 'boolean' &&
13583
+ /*#__PURE__*/
13584
+ // use plain HTML span to minimize the runtime overhead
13585
+ jsx("span", {
13586
+ className: classes.loadingWrapper,
13587
+ style: {
13588
+ display: 'contents'
13589
+ },
13590
+ children: /*#__PURE__*/jsx(IconButtonLoadingIndicator, {
13591
+ className: classes.loadingIndicator,
13592
+ ownerState: ownerState,
13593
+ children: loading && loadingIndicator
13594
+ })
13595
+ }), children]
13231
13596
  });
13232
13597
  });
13233
13598
  process.env.NODE_ENV !== "production" ? IconButton.propTypes /* remove-proptypes */ = {
@@ -13286,6 +13651,23 @@ process.env.NODE_ENV !== "production" ? IconButton.propTypes /* remove-proptypes
13286
13651
  * @default false
13287
13652
  */
13288
13653
  edge: PropTypes.oneOf(['end', 'start', false]),
13654
+ /**
13655
+ * @ignore
13656
+ */
13657
+ id: PropTypes.string,
13658
+ /**
13659
+ * If `true`, the loading indicator is visible and the button is disabled.
13660
+ * If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
13661
+ * @default null
13662
+ */
13663
+ loading: PropTypes.bool,
13664
+ /**
13665
+ * Element placed before the children if the button is in loading state.
13666
+ * The node should contain an element with `role="progressbar"` with an accessible name.
13667
+ * By default, it renders a `CircularProgress` that is labeled by the button itself.
13668
+ * @default <CircularProgress color="inherit" size={16} />
13669
+ */
13670
+ loadingIndicator: PropTypes.node,
13289
13671
  /**
13290
13672
  * The size of the component.
13291
13673
  * `small` is equivalent to the dense button styling.
@@ -13505,7 +13887,7 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes /* remove-proptypes */
13505
13887
  enableColorOnDark: PropTypes.bool,
13506
13888
  /**
13507
13889
  * The positioning type. The behavior of the different options is described
13508
- * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
13890
+ * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/position).
13509
13891
  * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
13510
13892
  * @default 'fixed'
13511
13893
  */
@@ -13561,13 +13943,9 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
13561
13943
  };
13562
13944
  return /*#__PURE__*/React.cloneElement(children, newProps);
13563
13945
  }
13564
- return /*#__PURE__*/jsx(React.Fragment, {
13565
- children: children
13566
- });
13946
+ return children;
13567
13947
  }
13568
- return /*#__PURE__*/jsx(React.Fragment, {
13569
- children: mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode
13570
- });
13948
+ return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;
13571
13949
  });
13572
13950
  process.env.NODE_ENV !== "production" ? Portal.propTypes /* remove-proptypes */ = {
13573
13951
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -14704,7 +15082,10 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
14704
15082
  addEndListener: handleAddEndListener,
14705
15083
  timeout: timeout,
14706
15084
  ...other,
14707
- children: (state, childProps) => {
15085
+ children: (state, {
15086
+ ownerState,
15087
+ ...restChildProps
15088
+ }) => {
14708
15089
  return /*#__PURE__*/React.cloneElement(children, {
14709
15090
  style: {
14710
15091
  opacity: 0,
@@ -14714,7 +15095,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
14714
15095
  ...children.props.style
14715
15096
  },
14716
15097
  ref: handleRef,
14717
- ...childProps
15098
+ ...restChildProps
14718
15099
  });
14719
15100
  }
14720
15101
  });
@@ -14800,13 +15181,6 @@ function getBackdropUtilityClass(slot) {
14800
15181
  }
14801
15182
  generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
14802
15183
 
14803
- const removeOwnerState = props => {
14804
- const {
14805
- ownerState,
14806
- ...rest
14807
- } = props;
14808
- return rest;
14809
- };
14810
15184
  const useUtilityClasses$b = ownerState => {
14811
15185
  const {
14812
15186
  classes,
@@ -14895,12 +15269,11 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
14895
15269
  externalForwardedProps,
14896
15270
  ownerState
14897
15271
  });
14898
- const transitionPropsRemoved = removeOwnerState(transitionProps);
14899
15272
  return /*#__PURE__*/jsx(TransitionSlot, {
14900
15273
  in: open,
14901
15274
  timeout: transitionDuration,
14902
15275
  ...other,
14903
- ...transitionPropsRemoved,
15276
+ ...transitionProps,
14904
15277
  children: /*#__PURE__*/jsx(RootSlot, {
14905
15278
  "aria-hidden": true,
14906
15279
  ...rootProps,
@@ -15033,7 +15406,7 @@ process.env.NODE_ENV !== "production" ? Box$2.propTypes /* remove-proptypes */ =
15033
15406
  function getButtonUtilityClass(slot) {
15034
15407
  return generateUtilityClass('MuiButton', slot);
15035
15408
  }
15036
- const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
15409
+ const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge', 'loading', 'loadingWrapper', 'loadingIconPlaceholder', 'loadingIndicator', 'loadingPositionCenter', 'loadingPositionStart', 'loadingPositionEnd']);
15037
15410
 
15038
15411
  /**
15039
15412
  * @ignore - internal component.
@@ -15058,13 +15431,16 @@ const useUtilityClasses$a = ownerState => {
15058
15431
  fullWidth,
15059
15432
  size,
15060
15433
  variant,
15434
+ loading,
15435
+ loadingPosition,
15061
15436
  classes
15062
15437
  } = ownerState;
15063
15438
  const slots = {
15064
- root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
15065
- label: ['label'],
15439
+ root: ['root', loading && 'loading', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],
15066
15440
  startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],
15067
- endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`]
15441
+ endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`],
15442
+ loadingIndicator: ['loadingIndicator'],
15443
+ loadingWrapper: ['loadingWrapper']
15068
15444
  };
15069
15445
  const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
15070
15446
  return {
@@ -15109,7 +15485,7 @@ const ButtonRoot = styled(ButtonBase, {
15109
15485
  const {
15110
15486
  ownerState
15111
15487
  } = props;
15112
- return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];
15488
+ return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.loading && styles.loading];
15113
15489
  }
15114
15490
  })(memoTheme(({
15115
15491
  theme
@@ -15296,6 +15672,18 @@ const ButtonRoot = styled(ButtonBase, {
15296
15672
  style: {
15297
15673
  width: '100%'
15298
15674
  }
15675
+ }, {
15676
+ props: {
15677
+ loadingPosition: 'center'
15678
+ },
15679
+ style: {
15680
+ transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
15681
+ duration: theme.transitions.duration.short
15682
+ }),
15683
+ [`&.${buttonClasses.loading}`]: {
15684
+ color: 'transparent'
15685
+ }
15686
+ }
15299
15687
  }]
15300
15688
  };
15301
15689
  }));
@@ -15306,9 +15694,11 @@ const ButtonStartIcon = styled('span', {
15306
15694
  const {
15307
15695
  ownerState
15308
15696
  } = props;
15309
- return [styles.startIcon, styles[`iconSize${capitalize(ownerState.size)}`]];
15697
+ return [styles.startIcon, ownerState.loading && styles.startIconLoadingStart, styles[`iconSize${capitalize(ownerState.size)}`]];
15310
15698
  }
15311
- })({
15699
+ })(({
15700
+ theme
15701
+ }) => ({
15312
15702
  display: 'inherit',
15313
15703
  marginRight: 8,
15314
15704
  marginLeft: -4,
@@ -15319,8 +15709,28 @@ const ButtonStartIcon = styled('span', {
15319
15709
  style: {
15320
15710
  marginLeft: -2
15321
15711
  }
15712
+ }, {
15713
+ props: {
15714
+ loadingPosition: 'start',
15715
+ loading: true
15716
+ },
15717
+ style: {
15718
+ transition: theme.transitions.create(['opacity'], {
15719
+ duration: theme.transitions.duration.short
15720
+ }),
15721
+ opacity: 0
15722
+ }
15723
+ }, {
15724
+ props: {
15725
+ loadingPosition: 'start',
15726
+ loading: true,
15727
+ fullWidth: true
15728
+ },
15729
+ style: {
15730
+ marginRight: -8
15731
+ }
15322
15732
  }, ...commonIconStyles]
15323
- });
15733
+ }));
15324
15734
  const ButtonEndIcon = styled('span', {
15325
15735
  name: 'MuiButton',
15326
15736
  slot: 'EndIcon',
@@ -15328,9 +15738,11 @@ const ButtonEndIcon = styled('span', {
15328
15738
  const {
15329
15739
  ownerState
15330
15740
  } = props;
15331
- return [styles.endIcon, styles[`iconSize${capitalize(ownerState.size)}`]];
15741
+ return [styles.endIcon, ownerState.loading && styles.endIconLoadingEnd, styles[`iconSize${capitalize(ownerState.size)}`]];
15332
15742
  }
15333
- })({
15743
+ })(({
15744
+ theme
15745
+ }) => ({
15334
15746
  display: 'inherit',
15335
15747
  marginRight: -4,
15336
15748
  marginLeft: 8,
@@ -15341,7 +15753,128 @@ const ButtonEndIcon = styled('span', {
15341
15753
  style: {
15342
15754
  marginRight: -2
15343
15755
  }
15756
+ }, {
15757
+ props: {
15758
+ loadingPosition: 'end',
15759
+ loading: true
15760
+ },
15761
+ style: {
15762
+ transition: theme.transitions.create(['opacity'], {
15763
+ duration: theme.transitions.duration.short
15764
+ }),
15765
+ opacity: 0
15766
+ }
15767
+ }, {
15768
+ props: {
15769
+ loadingPosition: 'end',
15770
+ loading: true,
15771
+ fullWidth: true
15772
+ },
15773
+ style: {
15774
+ marginLeft: -8
15775
+ }
15344
15776
  }, ...commonIconStyles]
15777
+ }));
15778
+ const ButtonLoadingIndicator = styled('span', {
15779
+ name: 'MuiButton',
15780
+ slot: 'LoadingIndicator',
15781
+ overridesResolver: (props, styles) => styles.loadingIndicator
15782
+ })(({
15783
+ theme
15784
+ }) => ({
15785
+ display: 'none',
15786
+ position: 'absolute',
15787
+ visibility: 'visible',
15788
+ variants: [{
15789
+ props: {
15790
+ loading: true
15791
+ },
15792
+ style: {
15793
+ display: 'flex'
15794
+ }
15795
+ }, {
15796
+ props: {
15797
+ loadingPosition: 'start'
15798
+ },
15799
+ style: {
15800
+ left: 14
15801
+ }
15802
+ }, {
15803
+ props: {
15804
+ loadingPosition: 'start',
15805
+ size: 'small'
15806
+ },
15807
+ style: {
15808
+ left: 10
15809
+ }
15810
+ }, {
15811
+ props: {
15812
+ variant: 'text',
15813
+ loadingPosition: 'start'
15814
+ },
15815
+ style: {
15816
+ left: 6
15817
+ }
15818
+ }, {
15819
+ props: {
15820
+ loadingPosition: 'center'
15821
+ },
15822
+ style: {
15823
+ left: '50%',
15824
+ transform: 'translate(-50%)',
15825
+ color: (theme.vars || theme).palette.action.disabled
15826
+ }
15827
+ }, {
15828
+ props: {
15829
+ loadingPosition: 'end'
15830
+ },
15831
+ style: {
15832
+ right: 14
15833
+ }
15834
+ }, {
15835
+ props: {
15836
+ loadingPosition: 'end',
15837
+ size: 'small'
15838
+ },
15839
+ style: {
15840
+ right: 10
15841
+ }
15842
+ }, {
15843
+ props: {
15844
+ variant: 'text',
15845
+ loadingPosition: 'end'
15846
+ },
15847
+ style: {
15848
+ right: 6
15849
+ }
15850
+ }, {
15851
+ props: {
15852
+ loadingPosition: 'start',
15853
+ fullWidth: true
15854
+ },
15855
+ style: {
15856
+ position: 'relative',
15857
+ left: -10
15858
+ }
15859
+ }, {
15860
+ props: {
15861
+ loadingPosition: 'end',
15862
+ fullWidth: true
15863
+ },
15864
+ style: {
15865
+ position: 'relative',
15866
+ right: -10
15867
+ }
15868
+ }]
15869
+ }));
15870
+ const ButtonLoadingIconPlaceholder = styled('span', {
15871
+ name: 'MuiButton',
15872
+ slot: 'LoadingIconPlaceholder',
15873
+ overridesResolver: (props, styles) => styles.loadingIconPlaceholder
15874
+ })({
15875
+ display: 'inline-block',
15876
+ width: '1em',
15877
+ height: '1em'
15345
15878
  });
15346
15879
  const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
15347
15880
  // props priority: `inProps` > `contextProps` > `themeDefaultProps`
@@ -15363,12 +15896,22 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
15363
15896
  endIcon: endIconProp,
15364
15897
  focusVisibleClassName,
15365
15898
  fullWidth = false,
15899
+ id: idProp,
15900
+ loading = null,
15901
+ loadingIndicator: loadingIndicatorProp,
15902
+ loadingPosition = 'center',
15366
15903
  size = 'medium',
15367
15904
  startIcon: startIconProp,
15368
15905
  type,
15369
15906
  variant = 'text',
15370
15907
  ...other
15371
15908
  } = props;
15909
+ const id = useId(idProp);
15910
+ const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/jsx(CircularProgress, {
15911
+ "aria-labelledby": id,
15912
+ color: "inherit",
15913
+ size: 16
15914
+ });
15372
15915
  const ownerState = {
15373
15916
  ...props,
15374
15917
  color,
@@ -15377,34 +15920,58 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
15377
15920
  disableElevation,
15378
15921
  disableFocusRipple,
15379
15922
  fullWidth,
15923
+ loading,
15924
+ loadingIndicator,
15925
+ loadingPosition,
15380
15926
  size,
15381
15927
  type,
15382
15928
  variant
15383
15929
  };
15384
15930
  const classes = useUtilityClasses$a(ownerState);
15385
- const startIcon = startIconProp && /*#__PURE__*/jsx(ButtonStartIcon, {
15931
+ const startIcon = (startIconProp || loading && loadingPosition === 'start') && /*#__PURE__*/jsx(ButtonStartIcon, {
15386
15932
  className: classes.startIcon,
15387
15933
  ownerState: ownerState,
15388
- children: startIconProp
15934
+ children: startIconProp || /*#__PURE__*/jsx(ButtonLoadingIconPlaceholder, {
15935
+ className: classes.loadingIconPlaceholder,
15936
+ ownerState: ownerState
15937
+ })
15389
15938
  });
15390
- const endIcon = endIconProp && /*#__PURE__*/jsx(ButtonEndIcon, {
15939
+ const endIcon = (endIconProp || loading && loadingPosition === 'end') && /*#__PURE__*/jsx(ButtonEndIcon, {
15391
15940
  className: classes.endIcon,
15392
15941
  ownerState: ownerState,
15393
- children: endIconProp
15942
+ children: endIconProp || /*#__PURE__*/jsx(ButtonLoadingIconPlaceholder, {
15943
+ className: classes.loadingIconPlaceholder,
15944
+ ownerState: ownerState
15945
+ })
15394
15946
  });
15395
15947
  const positionClassName = buttonGroupButtonContextPositionClassName || '';
15948
+ const loader = typeof loading === 'boolean' ?
15949
+ /*#__PURE__*/
15950
+ // use plain HTML span to minimize the runtime overhead
15951
+ jsx("span", {
15952
+ className: classes.loadingWrapper,
15953
+ style: {
15954
+ display: 'contents'
15955
+ },
15956
+ children: loading && /*#__PURE__*/jsx(ButtonLoadingIndicator, {
15957
+ className: classes.loadingIndicator,
15958
+ ownerState: ownerState,
15959
+ children: loadingIndicator
15960
+ })
15961
+ }) : null;
15396
15962
  return /*#__PURE__*/jsxs(ButtonRoot, {
15397
15963
  ownerState: ownerState,
15398
15964
  className: clsx(contextProps.className, classes.root, className, positionClassName),
15399
15965
  component: component,
15400
- disabled: disabled,
15966
+ disabled: disabled || loading,
15401
15967
  focusRipple: !disableFocusRipple,
15402
15968
  focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
15403
15969
  ref: ref,
15404
15970
  type: type,
15971
+ id: id,
15405
15972
  ...other,
15406
15973
  classes: classes,
15407
- children: [startIcon, children, endIcon]
15974
+ children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]
15408
15975
  });
15409
15976
  });
15410
15977
  process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = {
@@ -15477,6 +16044,28 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */
15477
16044
  * If defined, an `a` element will be used as the root node.
15478
16045
  */
15479
16046
  href: PropTypes.string,
16047
+ /**
16048
+ * @ignore
16049
+ */
16050
+ id: PropTypes.string,
16051
+ /**
16052
+ * If `true`, the loading indicator is visible and the button is disabled.
16053
+ * If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
16054
+ * @default null
16055
+ */
16056
+ loading: PropTypes.bool,
16057
+ /**
16058
+ * Element placed before the children if the button is in loading state.
16059
+ * The node should contain an element with `role="progressbar"` with an accessible name.
16060
+ * By default, it renders a `CircularProgress` that is labeled by the button itself.
16061
+ * @default <CircularProgress color="inherit" size={16} />
16062
+ */
16063
+ loadingIndicator: PropTypes.node,
16064
+ /**
16065
+ * The loading indicator can be positioned on the start, end, or the center of the button.
16066
+ * @default 'center'
16067
+ */
16068
+ loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),
15480
16069
  /**
15481
16070
  * The size of the component.
15482
16071
  * `small` is equivalent to the dense button styling.
@@ -16041,6 +16630,7 @@ function getContainer(container) {
16041
16630
  function getHasTransition(children) {
16042
16631
  return children ? children.props.hasOwnProperty('in') : false;
16043
16632
  }
16633
+ const noop = () => {};
16044
16634
 
16045
16635
  // A modal manager used to track and manage the state of open Modals.
16046
16636
  // Modals don't open on the server so this won't conflict with concurrent requests.
@@ -16212,8 +16802,8 @@ function useModal(parameters) {
16212
16802
  }
16213
16803
  };
16214
16804
  return {
16215
- onEnter: createChainedFunction(handleEnter, children?.props.onEnter),
16216
- onExited: createChainedFunction(handleExited, children?.props.onExited)
16805
+ onEnter: createChainedFunction(handleEnter, children?.props.onEnter ?? noop),
16806
+ onExited: createChainedFunction(handleExited, children?.props.onExited ?? noop)
16217
16807
  };
16218
16808
  };
16219
16809
  return {
@@ -17128,7 +17718,10 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
17128
17718
  in: inProp,
17129
17719
  timeout: timeout,
17130
17720
  ...other,
17131
- children: (state, childProps) => {
17721
+ children: (state, {
17722
+ ownerState,
17723
+ ...restChildProps
17724
+ }) => {
17132
17725
  return /*#__PURE__*/React.cloneElement(children, {
17133
17726
  ref: handleRef,
17134
17727
  style: {
@@ -17136,7 +17729,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
17136
17729
  ...style,
17137
17730
  ...children.props.style
17138
17731
  },
17139
- ...childProps
17732
+ ...restChildProps
17140
17733
  });
17141
17734
  }
17142
17735
  });
@@ -17247,7 +17840,7 @@ process.env.NODE_ENV !== "production" ? Slide.propTypes /* remove-proptypes */ =
17247
17840
  function getDrawerUtilityClass(slot) {
17248
17841
  return generateUtilityClass('MuiDrawer', slot);
17249
17842
  }
17250
- generateUtilityClasses('MuiDrawer', ['root', 'docked', 'paper', 'paperAnchorLeft', 'paperAnchorRight', 'paperAnchorTop', 'paperAnchorBottom', 'paperAnchorDockedLeft', 'paperAnchorDockedRight', 'paperAnchorDockedTop', 'paperAnchorDockedBottom', 'modal']);
17843
+ generateUtilityClasses('MuiDrawer', ['root', 'docked', 'paper', 'anchorLeft', 'anchorRight', 'anchorTop', 'anchorBottom', 'paperAnchorLeft', 'paperAnchorRight', 'paperAnchorTop', 'paperAnchorBottom', 'paperAnchorDockedLeft', 'paperAnchorDockedRight', 'paperAnchorDockedTop', 'paperAnchorDockedBottom', 'modal']);
17251
17844
 
17252
17845
  const overridesResolver$2 = (props, styles) => {
17253
17846
  const {
@@ -17262,7 +17855,7 @@ const useUtilityClasses$7 = ownerState => {
17262
17855
  variant
17263
17856
  } = ownerState;
17264
17857
  const slots = {
17265
- root: ['root'],
17858
+ root: ['root', `anchor${capitalize(anchor)}`],
17266
17859
  docked: [(variant === 'permanent' || variant === 'persistent') && 'docked'],
17267
17860
  modal: ['modal'],
17268
17861
  paper: ['paper', `paperAnchor${capitalize(anchor)}`, variant !== 'temporary' && `paperAnchorDocked${capitalize(anchor)}`]
@@ -17746,7 +18339,10 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
17746
18339
  addEndListener: handleAddEndListener,
17747
18340
  timeout: timeout === 'auto' ? null : timeout,
17748
18341
  ...other,
17749
- children: (state, childProps) => {
18342
+ children: (state, {
18343
+ ownerState,
18344
+ ...restChildProps
18345
+ }) => {
17750
18346
  return /*#__PURE__*/React.cloneElement(children, {
17751
18347
  style: {
17752
18348
  opacity: 0,
@@ -17757,7 +18353,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
17757
18353
  ...children.props.style
17758
18354
  },
17759
18355
  ref: handleRef,
17760
- ...childProps
18356
+ ...restChildProps
17761
18357
  });
17762
18358
  }
17763
18359
  });
@@ -17960,6 +18556,7 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
17960
18556
  }) : /*#__PURE__*/jsxs(React.Fragment, {
17961
18557
  children: [position === 'start' ? (/* notranslate needed while Google Translate will not fix zero-width space issue */_span$1 || (_span$1 = /*#__PURE__*/jsx("span", {
17962
18558
  className: "notranslate",
18559
+ "aria-hidden": true,
17963
18560
  children: "\u200B"
17964
18561
  }))) : null, children]
17965
18562
  })
@@ -18018,7 +18615,7 @@ process.env.NODE_ENV !== "production" ? InputAdornment.propTypes /* remove-propt
18018
18615
  function getLinearProgressUtilityClass(slot) {
18019
18616
  return generateUtilityClass('MuiLinearProgress', slot);
18020
18617
  }
18021
- generateUtilityClasses('MuiLinearProgress', ['root', 'colorPrimary', 'colorSecondary', 'determinate', 'indeterminate', 'buffer', 'query', 'dashed', 'dashedColorPrimary', 'dashedColorSecondary', 'bar', 'barColorPrimary', 'barColorSecondary', 'bar1Indeterminate', 'bar1Determinate', 'bar1Buffer', 'bar2Indeterminate', 'bar2Buffer']);
18618
+ generateUtilityClasses('MuiLinearProgress', ['root', 'colorPrimary', 'colorSecondary', 'determinate', 'indeterminate', 'buffer', 'query', 'dashed', 'dashedColorPrimary', 'dashedColorSecondary', 'bar', 'bar1', 'bar2', 'barColorPrimary', 'barColorSecondary', 'bar1Indeterminate', 'bar1Determinate', 'bar1Buffer', 'bar2Indeterminate', 'bar2Buffer']);
18022
18619
 
18023
18620
  const TRANSITION_DURATION = 4; // seconds
18024
18621
  const indeterminate1Keyframe = keyframes`
@@ -18091,8 +18688,8 @@ const useUtilityClasses$5 = ownerState => {
18091
18688
  const slots = {
18092
18689
  root: ['root', `color${capitalize(color)}`, variant],
18093
18690
  dashed: ['dashed', `dashedColor${capitalize(color)}`],
18094
- bar1: ['bar', `barColor${capitalize(color)}`, (variant === 'indeterminate' || variant === 'query') && 'bar1Indeterminate', variant === 'determinate' && 'bar1Determinate', variant === 'buffer' && 'bar1Buffer'],
18095
- bar2: ['bar', variant !== 'buffer' && `barColor${capitalize(color)}`, variant === 'buffer' && `color${capitalize(color)}`, (variant === 'indeterminate' || variant === 'query') && 'bar2Indeterminate', variant === 'buffer' && 'bar2Buffer']
18691
+ bar1: ['bar', 'bar1', `barColor${capitalize(color)}`, (variant === 'indeterminate' || variant === 'query') && 'bar1Indeterminate', variant === 'determinate' && 'bar1Determinate', variant === 'buffer' && 'bar1Buffer'],
18692
+ bar2: ['bar', 'bar2', variant !== 'buffer' && `barColor${capitalize(color)}`, variant === 'buffer' && `color${capitalize(color)}`, (variant === 'indeterminate' || variant === 'query') && 'bar2Indeterminate', variant === 'buffer' && 'bar2Buffer']
18096
18693
  };
18097
18694
  return composeClasses(slots, getLinearProgressUtilityClass, classes);
18098
18695
  };
@@ -18210,7 +18807,7 @@ const LinearProgressBar1 = styled('span', {
18210
18807
  const {
18211
18808
  ownerState
18212
18809
  } = props;
18213
- return [styles.bar, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar1Indeterminate, ownerState.variant === 'determinate' && styles.bar1Determinate, ownerState.variant === 'buffer' && styles.bar1Buffer];
18810
+ return [styles.bar, styles.bar1, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar1Indeterminate, ownerState.variant === 'determinate' && styles.bar1Determinate, ownerState.variant === 'buffer' && styles.bar1Buffer];
18214
18811
  }
18215
18812
  })(memoTheme(({
18216
18813
  theme
@@ -18274,7 +18871,7 @@ const LinearProgressBar2 = styled('span', {
18274
18871
  const {
18275
18872
  ownerState
18276
18873
  } = props;
18277
- return [styles.bar, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar2Indeterminate, ownerState.variant === 'buffer' && styles.bar2Buffer];
18874
+ return [styles.bar, styles.bar2, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar2Indeterminate, ownerState.variant === 'buffer' && styles.bar2Buffer];
18278
18875
  }
18279
18876
  })(memoTheme(({
18280
18877
  theme
@@ -19479,6 +20076,7 @@ function NotchedOutline(props) {
19479
20076
  }) : // notranslate needed while Google Translate will not fix zero-width space issue
19480
20077
  _span || (_span = /*#__PURE__*/jsx("span", {
19481
20078
  className: "notranslate",
20079
+ "aria-hidden": true,
19482
20080
  children: "\u200B"
19483
20081
  }))
19484
20082
  })
@@ -19902,9 +20500,7 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
19902
20500
  */
19903
20501
  value: PropTypes.any
19904
20502
  } : void 0;
19905
- if (OutlinedInput) {
19906
- OutlinedInput.muiName = 'Input';
19907
- }
20503
+ OutlinedInput.muiName = 'Input';
19908
20504
 
19909
20505
  const Stack = createStack({
19910
20506
  createStyledComponent: styled('div', {