@availity/mui-button 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,16 +1,8 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __esm = (fn, res) => function __init() {
9
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
- };
11
- var __commonJS = (cb, mod) => function __require() {
12
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
- };
14
6
  var __export = (target, all) => {
15
7
  for (var name in all)
16
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -23,1305 +15,23 @@ var __copyProps = (to, from, except, desc) => {
23
15
  }
24
16
  return to;
25
17
  };
26
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
- mod
29
- ));
30
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
19
 
32
- // node_modules/tsup/assets/cjs_shims.js
33
- var init_cjs_shims = __esm({
34
- "node_modules/tsup/assets/cjs_shims.js"() {
35
- }
36
- });
37
-
38
- // ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
39
- var require_react_is_production_min = __commonJS({
40
- "../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
41
- "use strict";
42
- init_cjs_shims();
43
- var b = "function" === typeof Symbol && Symbol.for;
44
- var c = b ? Symbol.for("react.element") : 60103;
45
- var d = b ? Symbol.for("react.portal") : 60106;
46
- var e = b ? Symbol.for("react.fragment") : 60107;
47
- var f = b ? Symbol.for("react.strict_mode") : 60108;
48
- var g = b ? Symbol.for("react.profiler") : 60114;
49
- var h = b ? Symbol.for("react.provider") : 60109;
50
- var k = b ? Symbol.for("react.context") : 60110;
51
- var l = b ? Symbol.for("react.async_mode") : 60111;
52
- var m = b ? Symbol.for("react.concurrent_mode") : 60111;
53
- var n = b ? Symbol.for("react.forward_ref") : 60112;
54
- var p = b ? Symbol.for("react.suspense") : 60113;
55
- var q = b ? Symbol.for("react.suspense_list") : 60120;
56
- var r = b ? Symbol.for("react.memo") : 60115;
57
- var t = b ? Symbol.for("react.lazy") : 60116;
58
- var v = b ? Symbol.for("react.block") : 60121;
59
- var w = b ? Symbol.for("react.fundamental") : 60117;
60
- var x = b ? Symbol.for("react.responder") : 60118;
61
- var y = b ? Symbol.for("react.scope") : 60119;
62
- function z(a) {
63
- if ("object" === typeof a && null !== a) {
64
- var u = a.$$typeof;
65
- switch (u) {
66
- case c:
67
- switch (a = a.type, a) {
68
- case l:
69
- case m:
70
- case e:
71
- case g:
72
- case f:
73
- case p:
74
- return a;
75
- default:
76
- switch (a = a && a.$$typeof, a) {
77
- case k:
78
- case n:
79
- case t:
80
- case r:
81
- case h:
82
- return a;
83
- default:
84
- return u;
85
- }
86
- }
87
- case d:
88
- return u;
89
- }
90
- }
91
- }
92
- function A(a) {
93
- return z(a) === m;
94
- }
95
- exports.AsyncMode = l;
96
- exports.ConcurrentMode = m;
97
- exports.ContextConsumer = k;
98
- exports.ContextProvider = h;
99
- exports.Element = c;
100
- exports.ForwardRef = n;
101
- exports.Fragment = e;
102
- exports.Lazy = t;
103
- exports.Memo = r;
104
- exports.Portal = d;
105
- exports.Profiler = g;
106
- exports.StrictMode = f;
107
- exports.Suspense = p;
108
- exports.isAsyncMode = function(a) {
109
- return A(a) || z(a) === l;
110
- };
111
- exports.isConcurrentMode = A;
112
- exports.isContextConsumer = function(a) {
113
- return z(a) === k;
114
- };
115
- exports.isContextProvider = function(a) {
116
- return z(a) === h;
117
- };
118
- exports.isElement = function(a) {
119
- return "object" === typeof a && null !== a && a.$$typeof === c;
120
- };
121
- exports.isForwardRef = function(a) {
122
- return z(a) === n;
123
- };
124
- exports.isFragment = function(a) {
125
- return z(a) === e;
126
- };
127
- exports.isLazy = function(a) {
128
- return z(a) === t;
129
- };
130
- exports.isMemo = function(a) {
131
- return z(a) === r;
132
- };
133
- exports.isPortal = function(a) {
134
- return z(a) === d;
135
- };
136
- exports.isProfiler = function(a) {
137
- return z(a) === g;
138
- };
139
- exports.isStrictMode = function(a) {
140
- return z(a) === f;
141
- };
142
- exports.isSuspense = function(a) {
143
- return z(a) === p;
144
- };
145
- exports.isValidElementType = function(a) {
146
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
147
- };
148
- exports.typeOf = z;
149
- }
150
- });
151
-
152
- // ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
153
- var require_react_is_development = __commonJS({
154
- "../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports) {
155
- "use strict";
156
- init_cjs_shims();
157
- if (process.env.NODE_ENV !== "production") {
158
- (function() {
159
- "use strict";
160
- var hasSymbol = typeof Symbol === "function" && Symbol.for;
161
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
162
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
163
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
164
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
165
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
166
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
167
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
168
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
169
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
170
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
171
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
172
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
173
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
174
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
175
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
176
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
177
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
178
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
179
- function isValidElementType(type) {
180
- return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
181
- }
182
- function typeOf(object) {
183
- if (typeof object === "object" && object !== null) {
184
- var $$typeof = object.$$typeof;
185
- switch ($$typeof) {
186
- case REACT_ELEMENT_TYPE:
187
- var type = object.type;
188
- switch (type) {
189
- case REACT_ASYNC_MODE_TYPE:
190
- case REACT_CONCURRENT_MODE_TYPE:
191
- case REACT_FRAGMENT_TYPE:
192
- case REACT_PROFILER_TYPE:
193
- case REACT_STRICT_MODE_TYPE:
194
- case REACT_SUSPENSE_TYPE:
195
- return type;
196
- default:
197
- var $$typeofType = type && type.$$typeof;
198
- switch ($$typeofType) {
199
- case REACT_CONTEXT_TYPE:
200
- case REACT_FORWARD_REF_TYPE:
201
- case REACT_LAZY_TYPE:
202
- case REACT_MEMO_TYPE:
203
- case REACT_PROVIDER_TYPE:
204
- return $$typeofType;
205
- default:
206
- return $$typeof;
207
- }
208
- }
209
- case REACT_PORTAL_TYPE:
210
- return $$typeof;
211
- }
212
- }
213
- return void 0;
214
- }
215
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
216
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
217
- var ContextConsumer = REACT_CONTEXT_TYPE;
218
- var ContextProvider = REACT_PROVIDER_TYPE;
219
- var Element = REACT_ELEMENT_TYPE;
220
- var ForwardRef = REACT_FORWARD_REF_TYPE;
221
- var Fragment = REACT_FRAGMENT_TYPE;
222
- var Lazy = REACT_LAZY_TYPE;
223
- var Memo = REACT_MEMO_TYPE;
224
- var Portal = REACT_PORTAL_TYPE;
225
- var Profiler = REACT_PROFILER_TYPE;
226
- var StrictMode = REACT_STRICT_MODE_TYPE;
227
- var Suspense = REACT_SUSPENSE_TYPE;
228
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
229
- function isAsyncMode(object) {
230
- {
231
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
232
- hasWarnedAboutDeprecatedIsAsyncMode = true;
233
- console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
234
- }
235
- }
236
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
237
- }
238
- function isConcurrentMode(object) {
239
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
240
- }
241
- function isContextConsumer(object) {
242
- return typeOf(object) === REACT_CONTEXT_TYPE;
243
- }
244
- function isContextProvider(object) {
245
- return typeOf(object) === REACT_PROVIDER_TYPE;
246
- }
247
- function isElement(object) {
248
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
249
- }
250
- function isForwardRef(object) {
251
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
252
- }
253
- function isFragment(object) {
254
- return typeOf(object) === REACT_FRAGMENT_TYPE;
255
- }
256
- function isLazy(object) {
257
- return typeOf(object) === REACT_LAZY_TYPE;
258
- }
259
- function isMemo(object) {
260
- return typeOf(object) === REACT_MEMO_TYPE;
261
- }
262
- function isPortal(object) {
263
- return typeOf(object) === REACT_PORTAL_TYPE;
264
- }
265
- function isProfiler(object) {
266
- return typeOf(object) === REACT_PROFILER_TYPE;
267
- }
268
- function isStrictMode(object) {
269
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
270
- }
271
- function isSuspense(object) {
272
- return typeOf(object) === REACT_SUSPENSE_TYPE;
273
- }
274
- exports.AsyncMode = AsyncMode;
275
- exports.ConcurrentMode = ConcurrentMode;
276
- exports.ContextConsumer = ContextConsumer;
277
- exports.ContextProvider = ContextProvider;
278
- exports.Element = Element;
279
- exports.ForwardRef = ForwardRef;
280
- exports.Fragment = Fragment;
281
- exports.Lazy = Lazy;
282
- exports.Memo = Memo;
283
- exports.Portal = Portal;
284
- exports.Profiler = Profiler;
285
- exports.StrictMode = StrictMode;
286
- exports.Suspense = Suspense;
287
- exports.isAsyncMode = isAsyncMode;
288
- exports.isConcurrentMode = isConcurrentMode;
289
- exports.isContextConsumer = isContextConsumer;
290
- exports.isContextProvider = isContextProvider;
291
- exports.isElement = isElement;
292
- exports.isForwardRef = isForwardRef;
293
- exports.isFragment = isFragment;
294
- exports.isLazy = isLazy;
295
- exports.isMemo = isMemo;
296
- exports.isPortal = isPortal;
297
- exports.isProfiler = isProfiler;
298
- exports.isStrictMode = isStrictMode;
299
- exports.isSuspense = isSuspense;
300
- exports.isValidElementType = isValidElementType;
301
- exports.typeOf = typeOf;
302
- })();
303
- }
304
- }
305
- });
306
-
307
- // ../../node_modules/prop-types/node_modules/react-is/index.js
308
- var require_react_is = __commonJS({
309
- "../../node_modules/prop-types/node_modules/react-is/index.js"(exports, module2) {
310
- "use strict";
311
- init_cjs_shims();
312
- if (process.env.NODE_ENV === "production") {
313
- module2.exports = require_react_is_production_min();
314
- } else {
315
- module2.exports = require_react_is_development();
316
- }
317
- }
318
- });
319
-
320
- // ../../node_modules/object-assign/index.js
321
- var require_object_assign = __commonJS({
322
- "../../node_modules/object-assign/index.js"(exports, module2) {
323
- "use strict";
324
- init_cjs_shims();
325
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
326
- var hasOwnProperty = Object.prototype.hasOwnProperty;
327
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
328
- function toObject(val) {
329
- if (val === null || val === void 0) {
330
- throw new TypeError("Object.assign cannot be called with null or undefined");
331
- }
332
- return Object(val);
333
- }
334
- function shouldUseNative() {
335
- try {
336
- if (!Object.assign) {
337
- return false;
338
- }
339
- var test1 = new String("abc");
340
- test1[5] = "de";
341
- if (Object.getOwnPropertyNames(test1)[0] === "5") {
342
- return false;
343
- }
344
- var test2 = {};
345
- for (var i = 0; i < 10; i++) {
346
- test2["_" + String.fromCharCode(i)] = i;
347
- }
348
- var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
349
- return test2[n];
350
- });
351
- if (order2.join("") !== "0123456789") {
352
- return false;
353
- }
354
- var test3 = {};
355
- "abcdefghijklmnopqrst".split("").forEach(function(letter) {
356
- test3[letter] = letter;
357
- });
358
- if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
359
- return false;
360
- }
361
- return true;
362
- } catch (err) {
363
- return false;
364
- }
365
- }
366
- module2.exports = shouldUseNative() ? Object.assign : function(target, source) {
367
- var from;
368
- var to = toObject(target);
369
- var symbols;
370
- for (var s = 1; s < arguments.length; s++) {
371
- from = Object(arguments[s]);
372
- for (var key in from) {
373
- if (hasOwnProperty.call(from, key)) {
374
- to[key] = from[key];
375
- }
376
- }
377
- if (getOwnPropertySymbols) {
378
- symbols = getOwnPropertySymbols(from);
379
- for (var i = 0; i < symbols.length; i++) {
380
- if (propIsEnumerable.call(from, symbols[i])) {
381
- to[symbols[i]] = from[symbols[i]];
382
- }
383
- }
384
- }
385
- }
386
- return to;
387
- };
388
- }
389
- });
390
-
391
- // ../../node_modules/prop-types/lib/ReactPropTypesSecret.js
392
- var require_ReactPropTypesSecret = __commonJS({
393
- "../../node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module2) {
394
- "use strict";
395
- init_cjs_shims();
396
- var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
397
- module2.exports = ReactPropTypesSecret;
398
- }
399
- });
400
-
401
- // ../../node_modules/prop-types/lib/has.js
402
- var require_has = __commonJS({
403
- "../../node_modules/prop-types/lib/has.js"(exports, module2) {
404
- init_cjs_shims();
405
- module2.exports = Function.call.bind(Object.prototype.hasOwnProperty);
406
- }
407
- });
408
-
409
- // ../../node_modules/prop-types/checkPropTypes.js
410
- var require_checkPropTypes = __commonJS({
411
- "../../node_modules/prop-types/checkPropTypes.js"(exports, module2) {
412
- "use strict";
413
- init_cjs_shims();
414
- var printWarning = function() {
415
- };
416
- if (process.env.NODE_ENV !== "production") {
417
- ReactPropTypesSecret = require_ReactPropTypesSecret();
418
- loggedTypeFailures = {};
419
- has = require_has();
420
- printWarning = function(text) {
421
- var message = "Warning: " + text;
422
- if (typeof console !== "undefined") {
423
- console.error(message);
424
- }
425
- try {
426
- throw new Error(message);
427
- } catch (x) {
428
- }
429
- };
430
- }
431
- var ReactPropTypesSecret;
432
- var loggedTypeFailures;
433
- var has;
434
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
435
- if (process.env.NODE_ENV !== "production") {
436
- for (var typeSpecName in typeSpecs) {
437
- if (has(typeSpecs, typeSpecName)) {
438
- var error;
439
- try {
440
- if (typeof typeSpecs[typeSpecName] !== "function") {
441
- var err = Error(
442
- (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
443
- );
444
- err.name = "Invariant Violation";
445
- throw err;
446
- }
447
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
448
- } catch (ex) {
449
- error = ex;
450
- }
451
- if (error && !(error instanceof Error)) {
452
- printWarning(
453
- (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
454
- );
455
- }
456
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
457
- loggedTypeFailures[error.message] = true;
458
- var stack = getStack ? getStack() : "";
459
- printWarning(
460
- "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
461
- );
462
- }
463
- }
464
- }
465
- }
466
- }
467
- checkPropTypes.resetWarningCache = function() {
468
- if (process.env.NODE_ENV !== "production") {
469
- loggedTypeFailures = {};
470
- }
471
- };
472
- module2.exports = checkPropTypes;
473
- }
474
- });
475
-
476
- // ../../node_modules/prop-types/factoryWithTypeCheckers.js
477
- var require_factoryWithTypeCheckers = __commonJS({
478
- "../../node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module2) {
479
- "use strict";
480
- init_cjs_shims();
481
- var ReactIs = require_react_is();
482
- var assign = require_object_assign();
483
- var ReactPropTypesSecret = require_ReactPropTypesSecret();
484
- var has = require_has();
485
- var checkPropTypes = require_checkPropTypes();
486
- var printWarning = function() {
487
- };
488
- if (process.env.NODE_ENV !== "production") {
489
- printWarning = function(text) {
490
- var message = "Warning: " + text;
491
- if (typeof console !== "undefined") {
492
- console.error(message);
493
- }
494
- try {
495
- throw new Error(message);
496
- } catch (x) {
497
- }
498
- };
499
- }
500
- function emptyFunctionThatReturnsNull() {
501
- return null;
502
- }
503
- module2.exports = function(isValidElement, throwOnDirectAccess) {
504
- var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
505
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
506
- function getIteratorFn(maybeIterable) {
507
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
508
- if (typeof iteratorFn === "function") {
509
- return iteratorFn;
510
- }
511
- }
512
- var ANONYMOUS = "<<anonymous>>";
513
- var ReactPropTypes = {
514
- array: createPrimitiveTypeChecker("array"),
515
- bigint: createPrimitiveTypeChecker("bigint"),
516
- bool: createPrimitiveTypeChecker("boolean"),
517
- func: createPrimitiveTypeChecker("function"),
518
- number: createPrimitiveTypeChecker("number"),
519
- object: createPrimitiveTypeChecker("object"),
520
- string: createPrimitiveTypeChecker("string"),
521
- symbol: createPrimitiveTypeChecker("symbol"),
522
- any: createAnyTypeChecker(),
523
- arrayOf: createArrayOfTypeChecker,
524
- element: createElementTypeChecker(),
525
- elementType: createElementTypeTypeChecker(),
526
- instanceOf: createInstanceTypeChecker,
527
- node: createNodeChecker(),
528
- objectOf: createObjectOfTypeChecker,
529
- oneOf: createEnumTypeChecker,
530
- oneOfType: createUnionTypeChecker,
531
- shape: createShapeTypeChecker,
532
- exact: createStrictShapeTypeChecker
533
- };
534
- function is(x, y) {
535
- if (x === y) {
536
- return x !== 0 || 1 / x === 1 / y;
537
- } else {
538
- return x !== x && y !== y;
539
- }
540
- }
541
- function PropTypeError(message, data) {
542
- this.message = message;
543
- this.data = data && typeof data === "object" ? data : {};
544
- this.stack = "";
545
- }
546
- PropTypeError.prototype = Error.prototype;
547
- function createChainableTypeChecker(validate) {
548
- if (process.env.NODE_ENV !== "production") {
549
- var manualPropTypeCallCache = {};
550
- var manualPropTypeWarningCount = 0;
551
- }
552
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
553
- componentName = componentName || ANONYMOUS;
554
- propFullName = propFullName || propName;
555
- if (secret !== ReactPropTypesSecret) {
556
- if (throwOnDirectAccess) {
557
- var err = new Error(
558
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
559
- );
560
- err.name = "Invariant Violation";
561
- throw err;
562
- } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
563
- var cacheKey = componentName + ":" + propName;
564
- if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
565
- printWarning(
566
- "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
567
- );
568
- manualPropTypeCallCache[cacheKey] = true;
569
- manualPropTypeWarningCount++;
570
- }
571
- }
572
- }
573
- if (props[propName] == null) {
574
- if (isRequired) {
575
- if (props[propName] === null) {
576
- return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
577
- }
578
- return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
579
- }
580
- return null;
581
- } else {
582
- return validate(props, propName, componentName, location, propFullName);
583
- }
584
- }
585
- var chainedCheckType = checkType.bind(null, false);
586
- chainedCheckType.isRequired = checkType.bind(null, true);
587
- return chainedCheckType;
588
- }
589
- function createPrimitiveTypeChecker(expectedType) {
590
- function validate(props, propName, componentName, location, propFullName, secret) {
591
- var propValue = props[propName];
592
- var propType = getPropType(propValue);
593
- if (propType !== expectedType) {
594
- var preciseType = getPreciseType(propValue);
595
- return new PropTypeError(
596
- "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
597
- { expectedType }
598
- );
599
- }
600
- return null;
601
- }
602
- return createChainableTypeChecker(validate);
603
- }
604
- function createAnyTypeChecker() {
605
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
606
- }
607
- function createArrayOfTypeChecker(typeChecker) {
608
- function validate(props, propName, componentName, location, propFullName) {
609
- if (typeof typeChecker !== "function") {
610
- return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
611
- }
612
- var propValue = props[propName];
613
- if (!Array.isArray(propValue)) {
614
- var propType = getPropType(propValue);
615
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
616
- }
617
- for (var i = 0; i < propValue.length; i++) {
618
- var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
619
- if (error instanceof Error) {
620
- return error;
621
- }
622
- }
623
- return null;
624
- }
625
- return createChainableTypeChecker(validate);
626
- }
627
- function createElementTypeChecker() {
628
- function validate(props, propName, componentName, location, propFullName) {
629
- var propValue = props[propName];
630
- if (!isValidElement(propValue)) {
631
- var propType = getPropType(propValue);
632
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
633
- }
634
- return null;
635
- }
636
- return createChainableTypeChecker(validate);
637
- }
638
- function createElementTypeTypeChecker() {
639
- function validate(props, propName, componentName, location, propFullName) {
640
- var propValue = props[propName];
641
- if (!ReactIs.isValidElementType(propValue)) {
642
- var propType = getPropType(propValue);
643
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
644
- }
645
- return null;
646
- }
647
- return createChainableTypeChecker(validate);
648
- }
649
- function createInstanceTypeChecker(expectedClass) {
650
- function validate(props, propName, componentName, location, propFullName) {
651
- if (!(props[propName] instanceof expectedClass)) {
652
- var expectedClassName = expectedClass.name || ANONYMOUS;
653
- var actualClassName = getClassName(props[propName]);
654
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
655
- }
656
- return null;
657
- }
658
- return createChainableTypeChecker(validate);
659
- }
660
- function createEnumTypeChecker(expectedValues) {
661
- if (!Array.isArray(expectedValues)) {
662
- if (process.env.NODE_ENV !== "production") {
663
- if (arguments.length > 1) {
664
- printWarning(
665
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
666
- );
667
- } else {
668
- printWarning("Invalid argument supplied to oneOf, expected an array.");
669
- }
670
- }
671
- return emptyFunctionThatReturnsNull;
672
- }
673
- function validate(props, propName, componentName, location, propFullName) {
674
- var propValue = props[propName];
675
- for (var i = 0; i < expectedValues.length; i++) {
676
- if (is(propValue, expectedValues[i])) {
677
- return null;
678
- }
679
- }
680
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
681
- var type = getPreciseType(value);
682
- if (type === "symbol") {
683
- return String(value);
684
- }
685
- return value;
686
- });
687
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
688
- }
689
- return createChainableTypeChecker(validate);
690
- }
691
- function createObjectOfTypeChecker(typeChecker) {
692
- function validate(props, propName, componentName, location, propFullName) {
693
- if (typeof typeChecker !== "function") {
694
- return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
695
- }
696
- var propValue = props[propName];
697
- var propType = getPropType(propValue);
698
- if (propType !== "object") {
699
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
700
- }
701
- for (var key in propValue) {
702
- if (has(propValue, key)) {
703
- var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
704
- if (error instanceof Error) {
705
- return error;
706
- }
707
- }
708
- }
709
- return null;
710
- }
711
- return createChainableTypeChecker(validate);
712
- }
713
- function createUnionTypeChecker(arrayOfTypeCheckers) {
714
- if (!Array.isArray(arrayOfTypeCheckers)) {
715
- process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
716
- return emptyFunctionThatReturnsNull;
717
- }
718
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
719
- var checker = arrayOfTypeCheckers[i];
720
- if (typeof checker !== "function") {
721
- printWarning(
722
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
723
- );
724
- return emptyFunctionThatReturnsNull;
725
- }
726
- }
727
- function validate(props, propName, componentName, location, propFullName) {
728
- var expectedTypes = [];
729
- for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
730
- var checker2 = arrayOfTypeCheckers[i2];
731
- var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
732
- if (checkerResult == null) {
733
- return null;
734
- }
735
- if (checkerResult.data && has(checkerResult.data, "expectedType")) {
736
- expectedTypes.push(checkerResult.data.expectedType);
737
- }
738
- }
739
- var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
740
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
741
- }
742
- return createChainableTypeChecker(validate);
743
- }
744
- function createNodeChecker() {
745
- function validate(props, propName, componentName, location, propFullName) {
746
- if (!isNode(props[propName])) {
747
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
748
- }
749
- return null;
750
- }
751
- return createChainableTypeChecker(validate);
752
- }
753
- function invalidValidatorError(componentName, location, propFullName, key, type) {
754
- return new PropTypeError(
755
- (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
756
- );
757
- }
758
- function createShapeTypeChecker(shapeTypes) {
759
- function validate(props, propName, componentName, location, propFullName) {
760
- var propValue = props[propName];
761
- var propType = getPropType(propValue);
762
- if (propType !== "object") {
763
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
764
- }
765
- for (var key in shapeTypes) {
766
- var checker = shapeTypes[key];
767
- if (typeof checker !== "function") {
768
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
769
- }
770
- var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
771
- if (error) {
772
- return error;
773
- }
774
- }
775
- return null;
776
- }
777
- return createChainableTypeChecker(validate);
778
- }
779
- function createStrictShapeTypeChecker(shapeTypes) {
780
- function validate(props, propName, componentName, location, propFullName) {
781
- var propValue = props[propName];
782
- var propType = getPropType(propValue);
783
- if (propType !== "object") {
784
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
785
- }
786
- var allKeys = assign({}, props[propName], shapeTypes);
787
- for (var key in allKeys) {
788
- var checker = shapeTypes[key];
789
- if (has(shapeTypes, key) && typeof checker !== "function") {
790
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
791
- }
792
- if (!checker) {
793
- return new PropTypeError(
794
- "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
795
- );
796
- }
797
- var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
798
- if (error) {
799
- return error;
800
- }
801
- }
802
- return null;
803
- }
804
- return createChainableTypeChecker(validate);
805
- }
806
- function isNode(propValue) {
807
- switch (typeof propValue) {
808
- case "number":
809
- case "string":
810
- case "undefined":
811
- return true;
812
- case "boolean":
813
- return !propValue;
814
- case "object":
815
- if (Array.isArray(propValue)) {
816
- return propValue.every(isNode);
817
- }
818
- if (propValue === null || isValidElement(propValue)) {
819
- return true;
820
- }
821
- var iteratorFn = getIteratorFn(propValue);
822
- if (iteratorFn) {
823
- var iterator = iteratorFn.call(propValue);
824
- var step;
825
- if (iteratorFn !== propValue.entries) {
826
- while (!(step = iterator.next()).done) {
827
- if (!isNode(step.value)) {
828
- return false;
829
- }
830
- }
831
- } else {
832
- while (!(step = iterator.next()).done) {
833
- var entry = step.value;
834
- if (entry) {
835
- if (!isNode(entry[1])) {
836
- return false;
837
- }
838
- }
839
- }
840
- }
841
- } else {
842
- return false;
843
- }
844
- return true;
845
- default:
846
- return false;
847
- }
848
- }
849
- function isSymbol(propType, propValue) {
850
- if (propType === "symbol") {
851
- return true;
852
- }
853
- if (!propValue) {
854
- return false;
855
- }
856
- if (propValue["@@toStringTag"] === "Symbol") {
857
- return true;
858
- }
859
- if (typeof Symbol === "function" && propValue instanceof Symbol) {
860
- return true;
861
- }
862
- return false;
863
- }
864
- function getPropType(propValue) {
865
- var propType = typeof propValue;
866
- if (Array.isArray(propValue)) {
867
- return "array";
868
- }
869
- if (propValue instanceof RegExp) {
870
- return "object";
871
- }
872
- if (isSymbol(propType, propValue)) {
873
- return "symbol";
874
- }
875
- return propType;
876
- }
877
- function getPreciseType(propValue) {
878
- if (typeof propValue === "undefined" || propValue === null) {
879
- return "" + propValue;
880
- }
881
- var propType = getPropType(propValue);
882
- if (propType === "object") {
883
- if (propValue instanceof Date) {
884
- return "date";
885
- } else if (propValue instanceof RegExp) {
886
- return "regexp";
887
- }
888
- }
889
- return propType;
890
- }
891
- function getPostfixForTypeWarning(value) {
892
- var type = getPreciseType(value);
893
- switch (type) {
894
- case "array":
895
- case "object":
896
- return "an " + type;
897
- case "boolean":
898
- case "date":
899
- case "regexp":
900
- return "a " + type;
901
- default:
902
- return type;
903
- }
904
- }
905
- function getClassName(propValue) {
906
- if (!propValue.constructor || !propValue.constructor.name) {
907
- return ANONYMOUS;
908
- }
909
- return propValue.constructor.name;
910
- }
911
- ReactPropTypes.checkPropTypes = checkPropTypes;
912
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
913
- ReactPropTypes.PropTypes = ReactPropTypes;
914
- return ReactPropTypes;
915
- };
916
- }
917
- });
918
-
919
- // ../../node_modules/prop-types/factoryWithThrowingShims.js
920
- var require_factoryWithThrowingShims = __commonJS({
921
- "../../node_modules/prop-types/factoryWithThrowingShims.js"(exports, module2) {
922
- "use strict";
923
- init_cjs_shims();
924
- var ReactPropTypesSecret = require_ReactPropTypesSecret();
925
- function emptyFunction() {
926
- }
927
- function emptyFunctionWithReset() {
928
- }
929
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
930
- module2.exports = function() {
931
- function shim(props, propName, componentName, location, propFullName, secret) {
932
- if (secret === ReactPropTypesSecret) {
933
- return;
934
- }
935
- var err = new Error(
936
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
937
- );
938
- err.name = "Invariant Violation";
939
- throw err;
940
- }
941
- ;
942
- shim.isRequired = shim;
943
- function getShim() {
944
- return shim;
945
- }
946
- ;
947
- var ReactPropTypes = {
948
- array: shim,
949
- bigint: shim,
950
- bool: shim,
951
- func: shim,
952
- number: shim,
953
- object: shim,
954
- string: shim,
955
- symbol: shim,
956
- any: shim,
957
- arrayOf: getShim,
958
- element: shim,
959
- elementType: shim,
960
- instanceOf: getShim,
961
- node: shim,
962
- objectOf: getShim,
963
- oneOf: getShim,
964
- oneOfType: getShim,
965
- shape: getShim,
966
- exact: getShim,
967
- checkPropTypes: emptyFunctionWithReset,
968
- resetWarningCache: emptyFunction
969
- };
970
- ReactPropTypes.PropTypes = ReactPropTypes;
971
- return ReactPropTypes;
972
- };
973
- }
974
- });
975
-
976
- // ../../node_modules/prop-types/index.js
977
- var require_prop_types = __commonJS({
978
- "../../node_modules/prop-types/index.js"(exports, module2) {
979
- init_cjs_shims();
980
- if (process.env.NODE_ENV !== "production") {
981
- ReactIs = require_react_is();
982
- throwOnDirectAccess = true;
983
- module2.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
984
- } else {
985
- module2.exports = require_factoryWithThrowingShims()();
986
- }
987
- var ReactIs;
988
- var throwOnDirectAccess;
989
- }
990
- });
991
-
992
20
  // src/index.ts
993
21
  var src_exports = {};
994
22
  __export(src_exports, {
995
- Button: () => Button2,
996
- LoadingButton: () => LoadingButton3
23
+ Button: () => Button
997
24
  });
998
25
  module.exports = __toCommonJS(src_exports);
999
- init_cjs_shims();
1000
26
 
1001
27
  // src/lib/Button.tsx
1002
- init_cjs_shims();
1003
28
  var import_material = require("@mui/material");
1004
-
1005
- // ../../node_modules/@mui/lab/index.js
1006
- init_cjs_shims();
1007
-
1008
- // ../../node_modules/@mui/lab/node_modules/@babel/runtime/helpers/esm/extends.js
1009
- init_cjs_shims();
1010
- function _extends() {
1011
- _extends = Object.assign ? Object.assign.bind() : function(target) {
1012
- for (var i = 1; i < arguments.length; i++) {
1013
- var source = arguments[i];
1014
- for (var key in source) {
1015
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1016
- target[key] = source[key];
1017
- }
1018
- }
1019
- }
1020
- return target;
1021
- };
1022
- return _extends.apply(this, arguments);
1023
- }
1024
-
1025
- // ../../node_modules/@mui/lab/LoadingButton/index.js
1026
- init_cjs_shims();
1027
-
1028
- // ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
1029
- init_cjs_shims();
1030
-
1031
- // ../../node_modules/@mui/lab/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
1032
- init_cjs_shims();
1033
- function _objectWithoutPropertiesLoose(source, excluded) {
1034
- if (source == null)
1035
- return {};
1036
- var target = {};
1037
- var sourceKeys = Object.keys(source);
1038
- var key, i;
1039
- for (i = 0; i < sourceKeys.length; i++) {
1040
- key = sourceKeys[i];
1041
- if (excluded.indexOf(key) >= 0)
1042
- continue;
1043
- target[key] = source[key];
1044
- }
1045
- return target;
1046
- }
1047
-
1048
- // ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
1049
- var React = __toESM(require("react"));
1050
- var import_prop_types = __toESM(require_prop_types());
1051
-
1052
- // ../../node_modules/@mui/utils/esm/index.js
1053
- init_cjs_shims();
1054
-
1055
- // ../../node_modules/@mui/utils/esm/chainPropTypes.js
1056
- init_cjs_shims();
1057
- function chainPropTypes(propType1, propType2) {
1058
- if (process.env.NODE_ENV === "production") {
1059
- return () => null;
1060
- }
1061
- return function validate(...args) {
1062
- return propType1(...args) || propType2(...args);
1063
- };
1064
- }
1065
-
1066
- // ../../node_modules/@mui/utils/esm/composeClasses/index.js
1067
- init_cjs_shims();
1068
-
1069
- // ../../node_modules/@mui/utils/esm/composeClasses/composeClasses.js
1070
- init_cjs_shims();
1071
- function composeClasses(slots, getUtilityClass, classes) {
1072
- const output = {};
1073
- Object.keys(slots).forEach(
1074
- (slot) => {
1075
- output[slot] = slots[slot].reduce((acc, key) => {
1076
- if (key) {
1077
- acc.push(getUtilityClass(key));
1078
- if (classes && classes[key]) {
1079
- acc.push(classes[key]);
1080
- }
1081
- }
1082
- return acc;
1083
- }, []).join(" ");
1084
- }
1085
- );
1086
- return output;
1087
- }
1088
-
1089
- // ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
1090
- var import_utils3 = require("@mui/material/utils");
1091
-
1092
- // ../../node_modules/@mui/base/index.js
1093
- init_cjs_shims();
1094
-
1095
- // ../../node_modules/@mui/base/composeClasses/index.js
1096
- init_cjs_shims();
1097
-
1098
- // ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
1099
- var import_styles = require("@mui/material/styles");
1100
- var import_Button = __toESM(require("@mui/material/Button"));
1101
- var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
1102
-
1103
- // ../../node_modules/@mui/lab/LoadingButton/loadingButtonClasses.js
1104
- init_cjs_shims();
1105
- var import_generateUtilityClass = __toESM(require("@mui/material/generateUtilityClass"));
1106
- var import_generateUtilityClasses = __toESM(require("@mui/material/generateUtilityClasses"));
1107
- function getLoadingButtonUtilityClass(slot) {
1108
- return (0, import_generateUtilityClass.default)("MuiLoadingButton", slot);
1109
- }
1110
- var loadingButtonClasses = (0, import_generateUtilityClasses.default)("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]);
1111
- var loadingButtonClasses_default = loadingButtonClasses;
1112
-
1113
- // ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
1114
- var import_jsx_runtime = require("react/jsx-runtime");
1115
- var import_jsx_runtime2 = require("react/jsx-runtime");
1116
- var _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
1117
- var useUtilityClasses = (ownerState) => {
1118
- const {
1119
- loading,
1120
- loadingPosition,
1121
- classes
1122
- } = ownerState;
1123
- const slots = {
1124
- root: ["root", loading && "loading"],
1125
- startIcon: [loading && `startIconLoading${(0, import_utils3.capitalize)(loadingPosition)}`],
1126
- endIcon: [loading && `endIconLoading${(0, import_utils3.capitalize)(loadingPosition)}`],
1127
- loadingIndicator: ["loadingIndicator", loading && `loadingIndicator${(0, import_utils3.capitalize)(loadingPosition)}`]
1128
- };
1129
- const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);
1130
- return _extends({}, classes, composedClasses);
1131
- };
1132
- var rootShouldForwardProp = (prop) => prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as" && prop !== "classes";
1133
- var LoadingButtonRoot = (0, import_styles.styled)(import_Button.default, {
1134
- shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
1135
- name: "MuiLoadingButton",
1136
- slot: "Root",
1137
- overridesResolver: (props, styles) => {
1138
- return [styles.root, styles.startIconLoadingStart && {
1139
- [`& .${loadingButtonClasses_default.startIconLoadingStart}`]: styles.startIconLoadingStart
1140
- }, styles.endIconLoadingEnd && {
1141
- [`& .${loadingButtonClasses_default.endIconLoadingEnd}`]: styles.endIconLoadingEnd
1142
- }];
1143
- }
1144
- })(({
1145
- ownerState,
1146
- theme
1147
- }) => _extends({
1148
- [`& .${loadingButtonClasses_default.startIconLoadingStart}, & .${loadingButtonClasses_default.endIconLoadingEnd}`]: {
1149
- transition: theme.transitions.create(["opacity"], {
1150
- duration: theme.transitions.duration.short
1151
- }),
1152
- opacity: 0
1153
- }
1154
- }, ownerState.loadingPosition === "center" && {
1155
- transition: theme.transitions.create(["background-color", "box-shadow", "border-color"], {
1156
- duration: theme.transitions.duration.short
1157
- }),
1158
- [`&.${loadingButtonClasses_default.loading}`]: {
1159
- color: "transparent"
1160
- }
1161
- }, ownerState.loadingPosition === "start" && ownerState.fullWidth && {
1162
- [`& .${loadingButtonClasses_default.startIconLoadingStart}, & .${loadingButtonClasses_default.endIconLoadingEnd}`]: {
1163
- transition: theme.transitions.create(["opacity"], {
1164
- duration: theme.transitions.duration.short
1165
- }),
1166
- opacity: 0,
1167
- marginRight: -8
1168
- }
1169
- }, ownerState.loadingPosition === "end" && ownerState.fullWidth && {
1170
- [`& .${loadingButtonClasses_default.startIconLoadingStart}, & .${loadingButtonClasses_default.endIconLoadingEnd}`]: {
1171
- transition: theme.transitions.create(["opacity"], {
1172
- duration: theme.transitions.duration.short
1173
- }),
1174
- opacity: 0,
1175
- marginLeft: -8
1176
- }
1177
- }));
1178
- var LoadingButtonLoadingIndicator = (0, import_styles.styled)("div", {
1179
- name: "MuiLoadingButton",
1180
- slot: "LoadingIndicator",
1181
- overridesResolver: (props, styles) => {
1182
- const {
1183
- ownerState
1184
- } = props;
1185
- return [styles.loadingIndicator, styles[`loadingIndicator${(0, import_utils3.capitalize)(ownerState.loadingPosition)}`]];
1186
- }
1187
- })(({
1188
- theme,
1189
- ownerState
1190
- }) => _extends({
1191
- position: "absolute",
1192
- visibility: "visible",
1193
- display: "flex"
1194
- }, ownerState.loadingPosition === "start" && (ownerState.variant === "outlined" || ownerState.variant === "contained") && {
1195
- left: ownerState.size === "small" ? 10 : 14
1196
- }, ownerState.loadingPosition === "start" && ownerState.variant === "text" && {
1197
- left: 6
1198
- }, ownerState.loadingPosition === "center" && {
1199
- left: "50%",
1200
- transform: "translate(-50%)",
1201
- color: (theme.vars || theme).palette.action.disabled
1202
- }, ownerState.loadingPosition === "end" && (ownerState.variant === "outlined" || ownerState.variant === "contained") && {
1203
- right: ownerState.size === "small" ? 10 : 14
1204
- }, ownerState.loadingPosition === "end" && ownerState.variant === "text" && {
1205
- right: 6
1206
- }, ownerState.loadingPosition === "start" && ownerState.fullWidth && {
1207
- position: "relative",
1208
- left: -10
1209
- }, ownerState.loadingPosition === "end" && ownerState.fullWidth && {
1210
- position: "relative",
1211
- right: -10
1212
- }));
1213
- var LoadingButton = /* @__PURE__ */ React.forwardRef(function LoadingButton2(inProps, ref) {
1214
- const props = (0, import_styles.useThemeProps)({
1215
- props: inProps,
1216
- name: "MuiLoadingButton"
1217
- });
1218
- const {
1219
- children,
1220
- disabled = false,
1221
- id: idProp,
1222
- loading = false,
1223
- loadingIndicator: loadingIndicatorProp,
1224
- loadingPosition = "center",
1225
- variant = "text"
1226
- } = props, other = _objectWithoutPropertiesLoose(props, _excluded);
1227
- const id = (0, import_utils3.unstable_useId)(idProp);
1228
- const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CircularProgress.default, {
1229
- "aria-labelledby": id,
1230
- color: "inherit",
1231
- size: 16
1232
- });
1233
- const ownerState = _extends({}, props, {
1234
- disabled,
1235
- loading,
1236
- loadingIndicator,
1237
- loadingPosition,
1238
- variant
1239
- });
1240
- const classes = useUtilityClasses(ownerState);
1241
- const loadingButtonLoadingIndicator = loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingButtonLoadingIndicator, {
1242
- className: classes.loadingIndicator,
1243
- ownerState,
1244
- children: loadingIndicator
1245
- }) : null;
1246
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(LoadingButtonRoot, _extends({
1247
- disabled: disabled || loading,
1248
- id,
1249
- ref
1250
- }, other, {
1251
- variant,
1252
- classes,
1253
- ownerState,
1254
- children: [ownerState.loadingPosition === "end" ? children : loadingButtonLoadingIndicator, ownerState.loadingPosition === "end" ? loadingButtonLoadingIndicator : children]
1255
- }));
1256
- });
1257
- process.env.NODE_ENV !== "production" ? LoadingButton.propTypes = {
1258
- children: import_prop_types.default.node,
1259
- classes: import_prop_types.default.object,
1260
- disabled: import_prop_types.default.bool,
1261
- id: import_prop_types.default.string,
1262
- loading: import_prop_types.default.bool,
1263
- loadingIndicator: import_prop_types.default.node,
1264
- loadingPosition: chainPropTypes(import_prop_types.default.oneOf(["start", "end", "center"]), (props) => {
1265
- if (props.loadingPosition === "start" && !props.startIcon) {
1266
- return new Error(`MUI: The loadingPosition="start" should be used in combination with startIcon.`);
1267
- }
1268
- if (props.loadingPosition === "end" && !props.endIcon) {
1269
- return new Error(`MUI: The loadingPosition="end" should be used in combination with endIcon.`);
1270
- }
1271
- return null;
1272
- }),
1273
- sx: import_prop_types.default.oneOfType([import_prop_types.default.arrayOf(import_prop_types.default.oneOfType([import_prop_types.default.func, import_prop_types.default.object, import_prop_types.default.bool])), import_prop_types.default.func, import_prop_types.default.object]),
1274
- variant: import_prop_types.default.oneOfType([import_prop_types.default.oneOf(["contained", "outlined", "text"]), import_prop_types.default.string])
1275
- } : void 0;
1276
- var LoadingButton_default = LoadingButton;
1277
-
1278
- // src/lib/Button.tsx
1279
29
  var import_jsx_runtime = require("react/jsx-runtime");
1280
- var Button2 = ({ children, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, {
1281
- ...rest,
1282
- children
1283
- });
1284
- var LoadingButton3 = ({ children, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingButton_default, {
30
+ var Button = ({ children, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, {
1285
31
  ...rest,
1286
32
  children
1287
33
  });
1288
34
  // Annotate the CommonJS export names for ESM import in node:
1289
35
  0 && (module.exports = {
1290
- Button,
1291
- LoadingButton
36
+ Button
1292
37
  });
1293
- /*
1294
- object-assign
1295
- (c) Sindre Sorhus
1296
- @license MIT
1297
- */
1298
- /**
1299
- * @mui/base v5.0.0-alpha.119
1300
- *
1301
- * @license MIT
1302
- * This source code is licensed under the MIT license found in the
1303
- * LICENSE file in the root directory of this source tree.
1304
- */
1305
- /**
1306
- * @mui/lab v5.0.0-alpha.121
1307
- *
1308
- * @license MIT
1309
- * This source code is licensed under the MIT license found in the
1310
- * LICENSE file in the root directory of this source tree.
1311
- */
1312
- /** @license React v16.13.1
1313
- * react-is.development.js
1314
- *
1315
- * Copyright (c) Facebook, Inc. and its affiliates.
1316
- *
1317
- * This source code is licensed under the MIT license found in the
1318
- * LICENSE file in the root directory of this source tree.
1319
- */
1320
- /** @license React v16.13.1
1321
- * react-is.production.min.js
1322
- *
1323
- * Copyright (c) Facebook, Inc. and its affiliates.
1324
- *
1325
- * This source code is licensed under the MIT license found in the
1326
- * LICENSE file in the root directory of this source tree.
1327
- */