@bolttech/atoms-button 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # atoms-button
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test atoms-button` to execute the unit tests via [Jest](https://jestjs.io).
package/index.js ADDED
@@ -0,0 +1,1257 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Icon } from '@bolttech/atoms-icon';
3
+ import styled from 'styled-components';
4
+
5
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
+
7
+ var check = function (it) {
8
+ return it && it.Math == Math && it;
9
+ };
10
+
11
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
+ var global$a =
13
+ // eslint-disable-next-line es/no-global-this -- safe
14
+ check(typeof globalThis == 'object' && globalThis) ||
15
+ check(typeof window == 'object' && window) ||
16
+ // eslint-disable-next-line no-restricted-globals -- safe
17
+ check(typeof self == 'object' && self) ||
18
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19
+ // eslint-disable-next-line no-new-func -- fallback
20
+ (function () { return this; })() || Function('return this')();
21
+
22
+ var objectGetOwnPropertyDescriptor = {};
23
+
24
+ var fails$9 = function (exec) {
25
+ try {
26
+ return !!exec();
27
+ } catch (error) {
28
+ return true;
29
+ }
30
+ };
31
+
32
+ var fails$8 = fails$9;
33
+
34
+ // Detect IE8's incomplete defineProperty implementation
35
+ var descriptors = !fails$8(function () {
36
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
37
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
38
+ });
39
+
40
+ var fails$7 = fails$9;
41
+
42
+ var functionBindNative = !fails$7(function () {
43
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
44
+ var test = (function () { /* empty */ }).bind();
45
+ // eslint-disable-next-line no-prototype-builtins -- safe
46
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
47
+ });
48
+
49
+ var NATIVE_BIND$1 = functionBindNative;
50
+
51
+ var call$5 = Function.prototype.call;
52
+
53
+ var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
54
+ return call$5.apply(call$5, arguments);
55
+ };
56
+
57
+ var objectPropertyIsEnumerable = {};
58
+
59
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
60
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
61
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
62
+
63
+ // Nashorn ~ JDK8 bug
64
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
65
+
66
+ // `Object.prototype.propertyIsEnumerable` method implementation
67
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
68
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
69
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
70
+ return !!descriptor && descriptor.enumerable;
71
+ } : $propertyIsEnumerable;
72
+
73
+ var createPropertyDescriptor$2 = function (bitmap, value) {
74
+ return {
75
+ enumerable: !(bitmap & 1),
76
+ configurable: !(bitmap & 2),
77
+ writable: !(bitmap & 4),
78
+ value: value
79
+ };
80
+ };
81
+
82
+ var NATIVE_BIND = functionBindNative;
83
+
84
+ var FunctionPrototype$1 = Function.prototype;
85
+ var call$4 = FunctionPrototype$1.call;
86
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
87
+
88
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
89
+ return function () {
90
+ return call$4.apply(fn, arguments);
91
+ };
92
+ };
93
+
94
+ var uncurryThis$8 = functionUncurryThis;
95
+
96
+ var toString$1 = uncurryThis$8({}.toString);
97
+ var stringSlice = uncurryThis$8(''.slice);
98
+
99
+ var classofRaw = function (it) {
100
+ return stringSlice(toString$1(it), 8, -1);
101
+ };
102
+
103
+ var uncurryThis$7 = functionUncurryThis;
104
+ var fails$6 = fails$9;
105
+ var classof = classofRaw;
106
+
107
+ var $Object$2 = Object;
108
+ var split = uncurryThis$7(''.split);
109
+
110
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
111
+ var indexedObject = fails$6(function () {
112
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
113
+ // eslint-disable-next-line no-prototype-builtins -- safe
114
+ return !$Object$2('z').propertyIsEnumerable(0);
115
+ }) ? function (it) {
116
+ return classof(it) == 'String' ? split(it, '') : $Object$2(it);
117
+ } : $Object$2;
118
+
119
+ // we can't use just `it == null` since of `document.all` special case
120
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
121
+ var isNullOrUndefined$2 = function (it) {
122
+ return it === null || it === undefined;
123
+ };
124
+
125
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
126
+
127
+ var $TypeError$5 = TypeError;
128
+
129
+ // `RequireObjectCoercible` abstract operation
130
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
131
+ var requireObjectCoercible$2 = function (it) {
132
+ if (isNullOrUndefined$1(it)) throw $TypeError$5("Can't call method on " + it);
133
+ return it;
134
+ };
135
+
136
+ // toObject with fallback for non-array-like ES3 strings
137
+ var IndexedObject$1 = indexedObject;
138
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
139
+
140
+ var toIndexedObject$3 = function (it) {
141
+ return IndexedObject$1(requireObjectCoercible$1(it));
142
+ };
143
+
144
+ var documentAll$2 = typeof document == 'object' && document.all;
145
+
146
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
147
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
148
+
149
+ var documentAll_1 = {
150
+ all: documentAll$2,
151
+ IS_HTMLDDA: IS_HTMLDDA
152
+ };
153
+
154
+ var $documentAll$1 = documentAll_1;
155
+
156
+ var documentAll$1 = $documentAll$1.all;
157
+
158
+ // `IsCallable` abstract operation
159
+ // https://tc39.es/ecma262/#sec-iscallable
160
+ var isCallable$a = $documentAll$1.IS_HTMLDDA ? function (argument) {
161
+ return typeof argument == 'function' || argument === documentAll$1;
162
+ } : function (argument) {
163
+ return typeof argument == 'function';
164
+ };
165
+
166
+ var isCallable$9 = isCallable$a;
167
+ var $documentAll = documentAll_1;
168
+
169
+ var documentAll = $documentAll.all;
170
+
171
+ var isObject$5 = $documentAll.IS_HTMLDDA ? function (it) {
172
+ return typeof it == 'object' ? it !== null : isCallable$9(it) || it === documentAll;
173
+ } : function (it) {
174
+ return typeof it == 'object' ? it !== null : isCallable$9(it);
175
+ };
176
+
177
+ var global$9 = global$a;
178
+ var isCallable$8 = isCallable$a;
179
+
180
+ var aFunction = function (argument) {
181
+ return isCallable$8(argument) ? argument : undefined;
182
+ };
183
+
184
+ var getBuiltIn$3 = function (namespace, method) {
185
+ return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
186
+ };
187
+
188
+ var uncurryThis$6 = functionUncurryThis;
189
+
190
+ var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
191
+
192
+ var getBuiltIn$2 = getBuiltIn$3;
193
+
194
+ var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
195
+
196
+ var global$8 = global$a;
197
+ var userAgent = engineUserAgent;
198
+
199
+ var process = global$8.process;
200
+ var Deno = global$8.Deno;
201
+ var versions = process && process.versions || Deno && Deno.version;
202
+ var v8 = versions && versions.v8;
203
+ var match, version;
204
+
205
+ if (v8) {
206
+ match = v8.split('.');
207
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
208
+ // but their correct versions are not interesting for us
209
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
210
+ }
211
+
212
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
213
+ // so check `userAgent` even if `.v8` exists, but 0
214
+ if (!version && userAgent) {
215
+ match = userAgent.match(/Edge\/(\d+)/);
216
+ if (!match || match[1] >= 74) {
217
+ match = userAgent.match(/Chrome\/(\d+)/);
218
+ if (match) version = +match[1];
219
+ }
220
+ }
221
+
222
+ var engineV8Version = version;
223
+
224
+ /* eslint-disable es/no-symbol -- required for testing */
225
+
226
+ var V8_VERSION = engineV8Version;
227
+ var fails$5 = fails$9;
228
+
229
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
230
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
231
+ var symbol = Symbol();
232
+ // Chrome 38 Symbol has incorrect toString conversion
233
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
234
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
235
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
236
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
237
+ });
238
+
239
+ /* eslint-disable es/no-symbol -- required for testing */
240
+
241
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
242
+
243
+ var useSymbolAsUid = NATIVE_SYMBOL$1
244
+ && !Symbol.sham
245
+ && typeof Symbol.iterator == 'symbol';
246
+
247
+ var getBuiltIn$1 = getBuiltIn$3;
248
+ var isCallable$7 = isCallable$a;
249
+ var isPrototypeOf = objectIsPrototypeOf;
250
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
251
+
252
+ var $Object$1 = Object;
253
+
254
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
255
+ return typeof it == 'symbol';
256
+ } : function (it) {
257
+ var $Symbol = getBuiltIn$1('Symbol');
258
+ return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
259
+ };
260
+
261
+ var $String$1 = String;
262
+
263
+ var tryToString$1 = function (argument) {
264
+ try {
265
+ return $String$1(argument);
266
+ } catch (error) {
267
+ return 'Object';
268
+ }
269
+ };
270
+
271
+ var isCallable$6 = isCallable$a;
272
+ var tryToString = tryToString$1;
273
+
274
+ var $TypeError$4 = TypeError;
275
+
276
+ // `Assert: IsCallable(argument) is true`
277
+ var aCallable$1 = function (argument) {
278
+ if (isCallable$6(argument)) return argument;
279
+ throw $TypeError$4(tryToString(argument) + ' is not a function');
280
+ };
281
+
282
+ var aCallable = aCallable$1;
283
+ var isNullOrUndefined = isNullOrUndefined$2;
284
+
285
+ // `GetMethod` abstract operation
286
+ // https://tc39.es/ecma262/#sec-getmethod
287
+ var getMethod$1 = function (V, P) {
288
+ var func = V[P];
289
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
290
+ };
291
+
292
+ var call$3 = functionCall;
293
+ var isCallable$5 = isCallable$a;
294
+ var isObject$4 = isObject$5;
295
+
296
+ var $TypeError$3 = TypeError;
297
+
298
+ // `OrdinaryToPrimitive` abstract operation
299
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
300
+ var ordinaryToPrimitive$1 = function (input, pref) {
301
+ var fn, val;
302
+ if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
303
+ if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
304
+ if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
305
+ throw $TypeError$3("Can't convert object to primitive value");
306
+ };
307
+
308
+ var shared$3 = {exports: {}};
309
+
310
+ var global$7 = global$a;
311
+
312
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
313
+ var defineProperty$2 = Object.defineProperty;
314
+
315
+ var defineGlobalProperty$3 = function (key, value) {
316
+ try {
317
+ defineProperty$2(global$7, key, { value: value, configurable: true, writable: true });
318
+ } catch (error) {
319
+ global$7[key] = value;
320
+ } return value;
321
+ };
322
+
323
+ var global$6 = global$a;
324
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
325
+
326
+ var SHARED = '__core-js_shared__';
327
+ var store$3 = global$6[SHARED] || defineGlobalProperty$2(SHARED, {});
328
+
329
+ var sharedStore = store$3;
330
+
331
+ var store$2 = sharedStore;
332
+
333
+ (shared$3.exports = function (key, value) {
334
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
335
+ })('versions', []).push({
336
+ version: '3.26.1',
337
+ mode: 'global',
338
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
339
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
340
+ source: 'https://github.com/zloirock/core-js'
341
+ });
342
+
343
+ var requireObjectCoercible = requireObjectCoercible$2;
344
+
345
+ var $Object = Object;
346
+
347
+ // `ToObject` abstract operation
348
+ // https://tc39.es/ecma262/#sec-toobject
349
+ var toObject$2 = function (argument) {
350
+ return $Object(requireObjectCoercible(argument));
351
+ };
352
+
353
+ var uncurryThis$5 = functionUncurryThis;
354
+ var toObject$1 = toObject$2;
355
+
356
+ var hasOwnProperty = uncurryThis$5({}.hasOwnProperty);
357
+
358
+ // `HasOwnProperty` abstract operation
359
+ // https://tc39.es/ecma262/#sec-hasownproperty
360
+ // eslint-disable-next-line es/no-object-hasown -- safe
361
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
362
+ return hasOwnProperty(toObject$1(it), key);
363
+ };
364
+
365
+ var uncurryThis$4 = functionUncurryThis;
366
+
367
+ var id = 0;
368
+ var postfix = Math.random();
369
+ var toString = uncurryThis$4(1.0.toString);
370
+
371
+ var uid$2 = function (key) {
372
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
373
+ };
374
+
375
+ var global$5 = global$a;
376
+ var shared$2 = shared$3.exports;
377
+ var hasOwn$6 = hasOwnProperty_1;
378
+ var uid$1 = uid$2;
379
+ var NATIVE_SYMBOL = symbolConstructorDetection;
380
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
381
+
382
+ var WellKnownSymbolsStore = shared$2('wks');
383
+ var Symbol$1 = global$5.Symbol;
384
+ var symbolFor = Symbol$1 && Symbol$1['for'];
385
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
386
+
387
+ var wellKnownSymbol$1 = function (name) {
388
+ if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
389
+ var description = 'Symbol.' + name;
390
+ if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
391
+ WellKnownSymbolsStore[name] = Symbol$1[name];
392
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
393
+ WellKnownSymbolsStore[name] = symbolFor(description);
394
+ } else {
395
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
396
+ }
397
+ } return WellKnownSymbolsStore[name];
398
+ };
399
+
400
+ var call$2 = functionCall;
401
+ var isObject$3 = isObject$5;
402
+ var isSymbol$1 = isSymbol$2;
403
+ var getMethod = getMethod$1;
404
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
405
+ var wellKnownSymbol = wellKnownSymbol$1;
406
+
407
+ var $TypeError$2 = TypeError;
408
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
409
+
410
+ // `ToPrimitive` abstract operation
411
+ // https://tc39.es/ecma262/#sec-toprimitive
412
+ var toPrimitive$1 = function (input, pref) {
413
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
414
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
415
+ var result;
416
+ if (exoticToPrim) {
417
+ if (pref === undefined) pref = 'default';
418
+ result = call$2(exoticToPrim, input, pref);
419
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
420
+ throw $TypeError$2("Can't convert object to primitive value");
421
+ }
422
+ if (pref === undefined) pref = 'number';
423
+ return ordinaryToPrimitive(input, pref);
424
+ };
425
+
426
+ var toPrimitive = toPrimitive$1;
427
+ var isSymbol = isSymbol$2;
428
+
429
+ // `ToPropertyKey` abstract operation
430
+ // https://tc39.es/ecma262/#sec-topropertykey
431
+ var toPropertyKey$2 = function (argument) {
432
+ var key = toPrimitive(argument, 'string');
433
+ return isSymbol(key) ? key : key + '';
434
+ };
435
+
436
+ var global$4 = global$a;
437
+ var isObject$2 = isObject$5;
438
+
439
+ var document$1 = global$4.document;
440
+ // typeof document.createElement is 'object' in old IE
441
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
442
+
443
+ var documentCreateElement = function (it) {
444
+ return EXISTS$1 ? document$1.createElement(it) : {};
445
+ };
446
+
447
+ var DESCRIPTORS$7 = descriptors;
448
+ var fails$4 = fails$9;
449
+ var createElement = documentCreateElement;
450
+
451
+ // Thanks to IE8 for its funny defineProperty
452
+ var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
453
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
454
+ return Object.defineProperty(createElement('div'), 'a', {
455
+ get: function () { return 7; }
456
+ }).a != 7;
457
+ });
458
+
459
+ var DESCRIPTORS$6 = descriptors;
460
+ var call$1 = functionCall;
461
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
462
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
463
+ var toIndexedObject$2 = toIndexedObject$3;
464
+ var toPropertyKey$1 = toPropertyKey$2;
465
+ var hasOwn$5 = hasOwnProperty_1;
466
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
467
+
468
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
469
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
470
+
471
+ // `Object.getOwnPropertyDescriptor` method
472
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
473
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
474
+ O = toIndexedObject$2(O);
475
+ P = toPropertyKey$1(P);
476
+ if (IE8_DOM_DEFINE$1) try {
477
+ return $getOwnPropertyDescriptor$1(O, P);
478
+ } catch (error) { /* empty */ }
479
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
480
+ };
481
+
482
+ var objectDefineProperty = {};
483
+
484
+ var DESCRIPTORS$5 = descriptors;
485
+ var fails$3 = fails$9;
486
+
487
+ // V8 ~ Chrome 36-
488
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
489
+ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
490
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
491
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
492
+ value: 42,
493
+ writable: false
494
+ }).prototype != 42;
495
+ });
496
+
497
+ var isObject$1 = isObject$5;
498
+
499
+ var $String = String;
500
+ var $TypeError$1 = TypeError;
501
+
502
+ // `Assert: Type(argument) is Object`
503
+ var anObject$2 = function (argument) {
504
+ if (isObject$1(argument)) return argument;
505
+ throw $TypeError$1($String(argument) + ' is not an object');
506
+ };
507
+
508
+ var DESCRIPTORS$4 = descriptors;
509
+ var IE8_DOM_DEFINE = ie8DomDefine;
510
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
511
+ var anObject$1 = anObject$2;
512
+ var toPropertyKey = toPropertyKey$2;
513
+
514
+ var $TypeError = TypeError;
515
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
516
+ var $defineProperty = Object.defineProperty;
517
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
518
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
519
+ var ENUMERABLE = 'enumerable';
520
+ var CONFIGURABLE$1 = 'configurable';
521
+ var WRITABLE = 'writable';
522
+
523
+ // `Object.defineProperty` method
524
+ // https://tc39.es/ecma262/#sec-object.defineproperty
525
+ objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
526
+ anObject$1(O);
527
+ P = toPropertyKey(P);
528
+ anObject$1(Attributes);
529
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
530
+ var current = $getOwnPropertyDescriptor(O, P);
531
+ if (current && current[WRITABLE]) {
532
+ O[P] = Attributes.value;
533
+ Attributes = {
534
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
535
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
536
+ writable: false
537
+ };
538
+ }
539
+ } return $defineProperty(O, P, Attributes);
540
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
541
+ anObject$1(O);
542
+ P = toPropertyKey(P);
543
+ anObject$1(Attributes);
544
+ if (IE8_DOM_DEFINE) try {
545
+ return $defineProperty(O, P, Attributes);
546
+ } catch (error) { /* empty */ }
547
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
548
+ if ('value' in Attributes) O[P] = Attributes.value;
549
+ return O;
550
+ };
551
+
552
+ var DESCRIPTORS$3 = descriptors;
553
+ var definePropertyModule$2 = objectDefineProperty;
554
+ var createPropertyDescriptor = createPropertyDescriptor$2;
555
+
556
+ var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
557
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
558
+ } : function (object, key, value) {
559
+ object[key] = value;
560
+ return object;
561
+ };
562
+
563
+ var makeBuiltIn$2 = {exports: {}};
564
+
565
+ var DESCRIPTORS$2 = descriptors;
566
+ var hasOwn$4 = hasOwnProperty_1;
567
+
568
+ var FunctionPrototype = Function.prototype;
569
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
570
+ var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
571
+
572
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
573
+ // additional protection from minified / mangled / dropped function names
574
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
575
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
576
+
577
+ var functionName = {
578
+ EXISTS: EXISTS,
579
+ PROPER: PROPER,
580
+ CONFIGURABLE: CONFIGURABLE
581
+ };
582
+
583
+ var uncurryThis$3 = functionUncurryThis;
584
+ var isCallable$4 = isCallable$a;
585
+ var store$1 = sharedStore;
586
+
587
+ var functionToString = uncurryThis$3(Function.toString);
588
+
589
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
590
+ if (!isCallable$4(store$1.inspectSource)) {
591
+ store$1.inspectSource = function (it) {
592
+ return functionToString(it);
593
+ };
594
+ }
595
+
596
+ var inspectSource$1 = store$1.inspectSource;
597
+
598
+ var global$3 = global$a;
599
+ var isCallable$3 = isCallable$a;
600
+
601
+ var WeakMap$1 = global$3.WeakMap;
602
+
603
+ var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
604
+
605
+ var shared$1 = shared$3.exports;
606
+ var uid = uid$2;
607
+
608
+ var keys = shared$1('keys');
609
+
610
+ var sharedKey$1 = function (key) {
611
+ return keys[key] || (keys[key] = uid(key));
612
+ };
613
+
614
+ var hiddenKeys$3 = {};
615
+
616
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
617
+ var global$2 = global$a;
618
+ var isObject = isObject$5;
619
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
620
+ var hasOwn$3 = hasOwnProperty_1;
621
+ var shared = sharedStore;
622
+ var sharedKey = sharedKey$1;
623
+ var hiddenKeys$2 = hiddenKeys$3;
624
+
625
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
626
+ var TypeError$1 = global$2.TypeError;
627
+ var WeakMap = global$2.WeakMap;
628
+ var set, get, has;
629
+
630
+ var enforce = function (it) {
631
+ return has(it) ? get(it) : set(it, {});
632
+ };
633
+
634
+ var getterFor = function (TYPE) {
635
+ return function (it) {
636
+ var state;
637
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
638
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
639
+ } return state;
640
+ };
641
+ };
642
+
643
+ if (NATIVE_WEAK_MAP || shared.state) {
644
+ var store = shared.state || (shared.state = new WeakMap());
645
+ /* eslint-disable no-self-assign -- prototype methods protection */
646
+ store.get = store.get;
647
+ store.has = store.has;
648
+ store.set = store.set;
649
+ /* eslint-enable no-self-assign -- prototype methods protection */
650
+ set = function (it, metadata) {
651
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
652
+ metadata.facade = it;
653
+ store.set(it, metadata);
654
+ return metadata;
655
+ };
656
+ get = function (it) {
657
+ return store.get(it) || {};
658
+ };
659
+ has = function (it) {
660
+ return store.has(it);
661
+ };
662
+ } else {
663
+ var STATE = sharedKey('state');
664
+ hiddenKeys$2[STATE] = true;
665
+ set = function (it, metadata) {
666
+ if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
667
+ metadata.facade = it;
668
+ createNonEnumerableProperty$1(it, STATE, metadata);
669
+ return metadata;
670
+ };
671
+ get = function (it) {
672
+ return hasOwn$3(it, STATE) ? it[STATE] : {};
673
+ };
674
+ has = function (it) {
675
+ return hasOwn$3(it, STATE);
676
+ };
677
+ }
678
+
679
+ var internalState = {
680
+ set: set,
681
+ get: get,
682
+ has: has,
683
+ enforce: enforce,
684
+ getterFor: getterFor
685
+ };
686
+
687
+ var fails$2 = fails$9;
688
+ var isCallable$2 = isCallable$a;
689
+ var hasOwn$2 = hasOwnProperty_1;
690
+ var DESCRIPTORS$1 = descriptors;
691
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
692
+ var inspectSource = inspectSource$1;
693
+ var InternalStateModule = internalState;
694
+
695
+ var enforceInternalState = InternalStateModule.enforce;
696
+ var getInternalState = InternalStateModule.get;
697
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
698
+ var defineProperty$1 = Object.defineProperty;
699
+
700
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
701
+ return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
702
+ });
703
+
704
+ var TEMPLATE = String(String).split('String');
705
+
706
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
707
+ if (String(name).slice(0, 7) === 'Symbol(') {
708
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
709
+ }
710
+ if (options && options.getter) name = 'get ' + name;
711
+ if (options && options.setter) name = 'set ' + name;
712
+ if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
713
+ if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
714
+ else value.name = name;
715
+ }
716
+ if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
717
+ defineProperty$1(value, 'length', { value: options.arity });
718
+ }
719
+ try {
720
+ if (options && hasOwn$2(options, 'constructor') && options.constructor) {
721
+ if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
722
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
723
+ } else if (value.prototype) value.prototype = undefined;
724
+ } catch (error) { /* empty */ }
725
+ var state = enforceInternalState(value);
726
+ if (!hasOwn$2(state, 'source')) {
727
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
728
+ } return value;
729
+ };
730
+
731
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
732
+ // eslint-disable-next-line no-extend-native -- required
733
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
734
+ return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
735
+ }, 'toString');
736
+
737
+ var isCallable$1 = isCallable$a;
738
+ var definePropertyModule$1 = objectDefineProperty;
739
+ var makeBuiltIn = makeBuiltIn$2.exports;
740
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
741
+
742
+ var defineBuiltIn$1 = function (O, key, value, options) {
743
+ if (!options) options = {};
744
+ var simple = options.enumerable;
745
+ var name = options.name !== undefined ? options.name : key;
746
+ if (isCallable$1(value)) makeBuiltIn(value, name, options);
747
+ if (options.global) {
748
+ if (simple) O[key] = value;
749
+ else defineGlobalProperty$1(key, value);
750
+ } else {
751
+ try {
752
+ if (!options.unsafe) delete O[key];
753
+ else if (O[key]) simple = true;
754
+ } catch (error) { /* empty */ }
755
+ if (simple) O[key] = value;
756
+ else definePropertyModule$1.f(O, key, {
757
+ value: value,
758
+ enumerable: false,
759
+ configurable: !options.nonConfigurable,
760
+ writable: !options.nonWritable
761
+ });
762
+ } return O;
763
+ };
764
+
765
+ var objectGetOwnPropertyNames = {};
766
+
767
+ var ceil = Math.ceil;
768
+ var floor = Math.floor;
769
+
770
+ // `Math.trunc` method
771
+ // https://tc39.es/ecma262/#sec-math.trunc
772
+ // eslint-disable-next-line es/no-math-trunc -- safe
773
+ var mathTrunc = Math.trunc || function trunc(x) {
774
+ var n = +x;
775
+ return (n > 0 ? floor : ceil)(n);
776
+ };
777
+
778
+ var trunc = mathTrunc;
779
+
780
+ // `ToIntegerOrInfinity` abstract operation
781
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
782
+ var toIntegerOrInfinity$2 = function (argument) {
783
+ var number = +argument;
784
+ // eslint-disable-next-line no-self-compare -- NaN check
785
+ return number !== number || number === 0 ? 0 : trunc(number);
786
+ };
787
+
788
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
789
+
790
+ var max = Math.max;
791
+ var min$1 = Math.min;
792
+
793
+ // Helper for a popular repeating case of the spec:
794
+ // Let integer be ? ToInteger(index).
795
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
796
+ var toAbsoluteIndex$1 = function (index, length) {
797
+ var integer = toIntegerOrInfinity$1(index);
798
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
799
+ };
800
+
801
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
802
+
803
+ var min = Math.min;
804
+
805
+ // `ToLength` abstract operation
806
+ // https://tc39.es/ecma262/#sec-tolength
807
+ var toLength$1 = function (argument) {
808
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
809
+ };
810
+
811
+ var toLength = toLength$1;
812
+
813
+ // `LengthOfArrayLike` abstract operation
814
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
815
+ var lengthOfArrayLike$1 = function (obj) {
816
+ return toLength(obj.length);
817
+ };
818
+
819
+ var toIndexedObject$1 = toIndexedObject$3;
820
+ var toAbsoluteIndex = toAbsoluteIndex$1;
821
+ var lengthOfArrayLike = lengthOfArrayLike$1;
822
+
823
+ // `Array.prototype.{ indexOf, includes }` methods implementation
824
+ var createMethod = function (IS_INCLUDES) {
825
+ return function ($this, el, fromIndex) {
826
+ var O = toIndexedObject$1($this);
827
+ var length = lengthOfArrayLike(O);
828
+ var index = toAbsoluteIndex(fromIndex, length);
829
+ var value;
830
+ // Array#includes uses SameValueZero equality algorithm
831
+ // eslint-disable-next-line no-self-compare -- NaN check
832
+ if (IS_INCLUDES && el != el) while (length > index) {
833
+ value = O[index++];
834
+ // eslint-disable-next-line no-self-compare -- NaN check
835
+ if (value != value) return true;
836
+ // Array#indexOf ignores holes, Array#includes - not
837
+ } else for (;length > index; index++) {
838
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
839
+ } return !IS_INCLUDES && -1;
840
+ };
841
+ };
842
+
843
+ var arrayIncludes = {
844
+ // `Array.prototype.includes` method
845
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
846
+ includes: createMethod(true),
847
+ // `Array.prototype.indexOf` method
848
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
849
+ indexOf: createMethod(false)
850
+ };
851
+
852
+ var uncurryThis$2 = functionUncurryThis;
853
+ var hasOwn$1 = hasOwnProperty_1;
854
+ var toIndexedObject = toIndexedObject$3;
855
+ var indexOf = arrayIncludes.indexOf;
856
+ var hiddenKeys$1 = hiddenKeys$3;
857
+
858
+ var push = uncurryThis$2([].push);
859
+
860
+ var objectKeysInternal = function (object, names) {
861
+ var O = toIndexedObject(object);
862
+ var i = 0;
863
+ var result = [];
864
+ var key;
865
+ for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
866
+ // Don't enum bug & hidden keys
867
+ while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
868
+ ~indexOf(result, key) || push(result, key);
869
+ }
870
+ return result;
871
+ };
872
+
873
+ // IE8- don't enum bug keys
874
+ var enumBugKeys$2 = [
875
+ 'constructor',
876
+ 'hasOwnProperty',
877
+ 'isPrototypeOf',
878
+ 'propertyIsEnumerable',
879
+ 'toLocaleString',
880
+ 'toString',
881
+ 'valueOf'
882
+ ];
883
+
884
+ var internalObjectKeys$1 = objectKeysInternal;
885
+ var enumBugKeys$1 = enumBugKeys$2;
886
+
887
+ var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
888
+
889
+ // `Object.getOwnPropertyNames` method
890
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
891
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
892
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
893
+ return internalObjectKeys$1(O, hiddenKeys);
894
+ };
895
+
896
+ var objectGetOwnPropertySymbols = {};
897
+
898
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
899
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
900
+
901
+ var getBuiltIn = getBuiltIn$3;
902
+ var uncurryThis$1 = functionUncurryThis;
903
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
904
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
905
+ var anObject = anObject$2;
906
+
907
+ var concat$1 = uncurryThis$1([].concat);
908
+
909
+ // all object keys, includes non-enumerable and symbols
910
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
911
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
912
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
913
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
914
+ };
915
+
916
+ var hasOwn = hasOwnProperty_1;
917
+ var ownKeys = ownKeys$1;
918
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
919
+ var definePropertyModule = objectDefineProperty;
920
+
921
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
922
+ var keys = ownKeys(source);
923
+ var defineProperty = definePropertyModule.f;
924
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
925
+ for (var i = 0; i < keys.length; i++) {
926
+ var key = keys[i];
927
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
928
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
929
+ }
930
+ }
931
+ };
932
+
933
+ var fails$1 = fails$9;
934
+ var isCallable = isCallable$a;
935
+
936
+ var replacement = /#|\.prototype\./;
937
+
938
+ var isForced$1 = function (feature, detection) {
939
+ var value = data[normalize(feature)];
940
+ return value == POLYFILL ? true
941
+ : value == NATIVE ? false
942
+ : isCallable(detection) ? fails$1(detection)
943
+ : !!detection;
944
+ };
945
+
946
+ var normalize = isForced$1.normalize = function (string) {
947
+ return String(string).replace(replacement, '.').toLowerCase();
948
+ };
949
+
950
+ var data = isForced$1.data = {};
951
+ var NATIVE = isForced$1.NATIVE = 'N';
952
+ var POLYFILL = isForced$1.POLYFILL = 'P';
953
+
954
+ var isForced_1 = isForced$1;
955
+
956
+ var global$1 = global$a;
957
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
958
+ var createNonEnumerableProperty = createNonEnumerableProperty$2;
959
+ var defineBuiltIn = defineBuiltIn$1;
960
+ var defineGlobalProperty = defineGlobalProperty$3;
961
+ var copyConstructorProperties = copyConstructorProperties$1;
962
+ var isForced = isForced_1;
963
+
964
+ /*
965
+ options.target - name of the target object
966
+ options.global - target is the global object
967
+ options.stat - export as static methods of target
968
+ options.proto - export as prototype methods of target
969
+ options.real - real prototype method for the `pure` version
970
+ options.forced - export even if the native feature is available
971
+ options.bind - bind methods to the target, required for the `pure` version
972
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
973
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
974
+ options.sham - add a flag to not completely full polyfills
975
+ options.enumerable - export as enumerable property
976
+ options.dontCallGetSet - prevent calling a getter on target
977
+ options.name - the .name of the function if it does not match the key
978
+ */
979
+ var _export = function (options, source) {
980
+ var TARGET = options.target;
981
+ var GLOBAL = options.global;
982
+ var STATIC = options.stat;
983
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
984
+ if (GLOBAL) {
985
+ target = global$1;
986
+ } else if (STATIC) {
987
+ target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
988
+ } else {
989
+ target = (global$1[TARGET] || {}).prototype;
990
+ }
991
+ if (target) for (key in source) {
992
+ sourceProperty = source[key];
993
+ if (options.dontCallGetSet) {
994
+ descriptor = getOwnPropertyDescriptor(target, key);
995
+ targetProperty = descriptor && descriptor.value;
996
+ } else targetProperty = target[key];
997
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
998
+ // contained in target
999
+ if (!FORCED && targetProperty !== undefined) {
1000
+ if (typeof sourceProperty == typeof targetProperty) continue;
1001
+ copyConstructorProperties(sourceProperty, targetProperty);
1002
+ }
1003
+ // add a flag to not completely full polyfills
1004
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1005
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
1006
+ }
1007
+ defineBuiltIn(target, key, sourceProperty, options);
1008
+ }
1009
+ };
1010
+
1011
+ var internalObjectKeys = objectKeysInternal;
1012
+ var enumBugKeys = enumBugKeys$2;
1013
+
1014
+ // `Object.keys` method
1015
+ // https://tc39.es/ecma262/#sec-object.keys
1016
+ // eslint-disable-next-line es/no-object-keys -- safe
1017
+ var objectKeys$1 = Object.keys || function keys(O) {
1018
+ return internalObjectKeys(O, enumBugKeys);
1019
+ };
1020
+
1021
+ var DESCRIPTORS = descriptors;
1022
+ var uncurryThis = functionUncurryThis;
1023
+ var call = functionCall;
1024
+ var fails = fails$9;
1025
+ var objectKeys = objectKeys$1;
1026
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1027
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1028
+ var toObject = toObject$2;
1029
+ var IndexedObject = indexedObject;
1030
+
1031
+ // eslint-disable-next-line es/no-object-assign -- safe
1032
+ var $assign = Object.assign;
1033
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1034
+ var defineProperty = Object.defineProperty;
1035
+ var concat = uncurryThis([].concat);
1036
+
1037
+ // `Object.assign` method
1038
+ // https://tc39.es/ecma262/#sec-object.assign
1039
+ var objectAssign = !$assign || fails(function () {
1040
+ // should have correct order of operations (Edge bug)
1041
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1042
+ enumerable: true,
1043
+ get: function () {
1044
+ defineProperty(this, 'b', {
1045
+ value: 3,
1046
+ enumerable: false
1047
+ });
1048
+ }
1049
+ }), { b: 2 })).b !== 1) return true;
1050
+ // should work with symbols and should have deterministic property order (V8 bug)
1051
+ var A = {};
1052
+ var B = {};
1053
+ // eslint-disable-next-line es/no-symbol -- safe
1054
+ var symbol = Symbol();
1055
+ var alphabet = 'abcdefghijklmnopqrst';
1056
+ A[symbol] = 7;
1057
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1058
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1059
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1060
+ var T = toObject(target);
1061
+ var argumentsLength = arguments.length;
1062
+ var index = 1;
1063
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1064
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1065
+ while (argumentsLength > index) {
1066
+ var S = IndexedObject(arguments[index++]);
1067
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1068
+ var length = keys.length;
1069
+ var j = 0;
1070
+ var key;
1071
+ while (length > j) {
1072
+ key = keys[j++];
1073
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1074
+ }
1075
+ } return T;
1076
+ } : $assign;
1077
+
1078
+ var $ = _export;
1079
+ var assign = objectAssign;
1080
+
1081
+ // `Object.assign` method
1082
+ // https://tc39.es/ecma262/#sec-object.assign
1083
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1084
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1085
+ assign: assign
1086
+ });
1087
+
1088
+ var SizeVariant;
1089
+ (function (SizeVariant) {
1090
+ SizeVariant["transaction"] = "generic";
1091
+ SizeVariant["brand"] = "generic";
1092
+ SizeVariant["alternative"] = "generic";
1093
+ SizeVariant["outline"] = "generic";
1094
+ SizeVariant["ghost"] = "ghost";
1095
+ })(SizeVariant || (SizeVariant = {}));
1096
+
1097
+ const Container = /*#__PURE__*/styled.div.withConfig({
1098
+ displayName: "atoms-buttonstyles__Container",
1099
+ componentId: "i4bzba-0"
1100
+ })(["display:flex;align-items:center;gap:", ";.left-img-btn,.right-img-btn,svg{width:", ";height:", ";}"], ({
1101
+ theme,
1102
+ size
1103
+ }) => theme.components.button[size].generic.gap, ({
1104
+ theme,
1105
+ size
1106
+ }) => theme.components.button[size].icon.size, ({
1107
+ theme,
1108
+ size
1109
+ }) => theme.components.button[size].icon.size);
1110
+ const Button$1 = /*#__PURE__*/styled.button.withConfig({
1111
+ displayName: "atoms-buttonstyles__Button",
1112
+ componentId: "i4bzba-1"
1113
+ })(["background-color:", ";border-radius:", ";border:1px solid ", ";box-shadow:", ";color:", ";fill:", ";padding:", ";:active:enabled{background-color:", ";border:1px solid ", ";color:", ";fill:", ";}:disabled{background-color:", ";border:1px solid ", ";color:", ";fill:", ";}:hover:enabled{background-color:", ";border:1px solid ", ";color:", ";fill:", ";}"], ({
1114
+ theme,
1115
+ variant
1116
+ }) => theme.components.button[variant].container.color.default, ({
1117
+ theme,
1118
+ size,
1119
+ sizeVariant
1120
+ }) => theme.components.button[size][sizeVariant].borderRadius, ({
1121
+ theme,
1122
+ variant
1123
+ }) => theme.components.button[variant].container.border.default, ({
1124
+ theme: {
1125
+ effects: {
1126
+ shadow
1127
+ }
1128
+ }
1129
+ }) => `${shadow.lvl0.x} ${shadow.lvl0.y} ${shadow.lvl0.blur} ${shadow.lvl0.spread} ${shadow.lvl0.color}`, ({
1130
+ theme,
1131
+ variant
1132
+ }) => theme.components.button[variant].text.color.default, ({
1133
+ theme,
1134
+ variant
1135
+ }) => theme.components.button[variant].icon.color.default, ({
1136
+ theme,
1137
+ size,
1138
+ sizeVariant
1139
+ }) => `${theme.components.button[size][sizeVariant].paddingVertical} ${theme.components.button[size][sizeVariant].paddingHorizontal}`, ({
1140
+ theme,
1141
+ variant
1142
+ }) => theme.components.button[variant].container.color.active, ({
1143
+ theme,
1144
+ variant
1145
+ }) => theme.components.button[variant].container.border.active, ({
1146
+ theme,
1147
+ variant
1148
+ }) => theme.components.button[variant].text.color.active, ({
1149
+ theme,
1150
+ variant
1151
+ }) => theme.components.button[variant].icon.color.active, ({
1152
+ theme,
1153
+ variant
1154
+ }) => theme.components.button[variant].container.color.disable, ({
1155
+ theme,
1156
+ variant
1157
+ }) => theme.components.button[variant].container.border.disable, ({
1158
+ theme,
1159
+ variant
1160
+ }) => theme.components.button[variant].text.color.disable, ({
1161
+ theme,
1162
+ variant
1163
+ }) => theme.components.button[variant].icon.color.disable, ({
1164
+ theme,
1165
+ variant
1166
+ }) => theme.components.button[variant].container.color.hover, ({
1167
+ theme,
1168
+ variant
1169
+ }) => theme.components.button[variant].container.border.hover, ({
1170
+ theme,
1171
+ variant
1172
+ }) => theme.components.button[variant].text.color.hover, ({
1173
+ theme,
1174
+ variant
1175
+ }) => theme.components.button[variant].icon.color.hover);
1176
+ const ButtonTitle = /*#__PURE__*/styled.label.withConfig({
1177
+ displayName: "atoms-buttonstyles__ButtonTitle",
1178
+ componentId: "i4bzba-2"
1179
+ })(["font-size:", ";font-weight:", ";letter-spacing:", ";line-height:", ";text-decoration:", ";text-indent:", ";text-transform:", ";"], ({
1180
+ theme,
1181
+ size,
1182
+ sizeVariant
1183
+ }) => theme.components.button[size][sizeVariant].textLabel.fontSize, ({
1184
+ theme,
1185
+ size,
1186
+ sizeVariant
1187
+ }) => theme.components.button[size][sizeVariant].textLabel.fontWeight, ({
1188
+ theme,
1189
+ size,
1190
+ sizeVariant
1191
+ }) => theme.components.button[size][sizeVariant].textLabel.letterSpacing, ({
1192
+ theme,
1193
+ size,
1194
+ sizeVariant
1195
+ }) => theme.components.button[size][sizeVariant].textLabel.lineHeight, ({
1196
+ theme,
1197
+ size,
1198
+ sizeVariant
1199
+ }) => theme.components.button[size][sizeVariant].textLabel.textDecoration, ({
1200
+ theme,
1201
+ size,
1202
+ sizeVariant
1203
+ }) => theme.components.button[size][sizeVariant].textLabel.paragraphSpacing, ({
1204
+ theme,
1205
+ size,
1206
+ sizeVariant
1207
+ }) => theme.components.button[size][sizeVariant].textLabel.textCase);
1208
+
1209
+ function Button({
1210
+ dataTestId,
1211
+ disabled = false,
1212
+ title = '',
1213
+ variant,
1214
+ size,
1215
+ iconRight,
1216
+ iconLeft,
1217
+ onClick
1218
+ }) {
1219
+ return jsx(Button$1, Object.assign({
1220
+ "data-testid": dataTestId,
1221
+ variant: variant,
1222
+ size: size,
1223
+ sizeVariant: SizeVariant[variant],
1224
+ inverseColors: variant === 'alternative',
1225
+ disabled: disabled,
1226
+ onClick: () => !disabled && onClick()
1227
+ }, {
1228
+ children: jsxs(Container, Object.assign({
1229
+ size: size
1230
+ }, {
1231
+ children: [iconLeft && jsx("div", Object.assign({
1232
+ className: "left-img-btn",
1233
+ "data-testid": `left-img-btn-${iconLeft}`
1234
+ }, {
1235
+ children: jsx(Icon, {
1236
+ dataTestId: `buttonIcon-${iconLeft}`,
1237
+ icon: iconLeft
1238
+ })
1239
+ })), title && jsx(ButtonTitle, Object.assign({
1240
+ size: size,
1241
+ sizeVariant: SizeVariant[variant]
1242
+ }, {
1243
+ children: title
1244
+ })), iconRight && jsx("div", Object.assign({
1245
+ className: "right-img-btn",
1246
+ "data-testid": `left-img-btn-${iconRight}`
1247
+ }, {
1248
+ children: jsx(Icon, {
1249
+ dataTestId: `buttonIcon-${iconRight}`,
1250
+ icon: iconRight
1251
+ })
1252
+ }))]
1253
+ }))
1254
+ }));
1255
+ }
1256
+
1257
+ export { Button };
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@bolttech/atoms-button",
3
+ "version": "0.1.0",
4
+ "module": "./index.js",
5
+ "main": "./index.js",
6
+ "type": "module",
7
+ "types": "./src/index.d.ts",
8
+ "dependencies": {},
9
+ "peerDependencies": {
10
+ "@bolttech/atoms-icon": "0.1.0",
11
+ "@edirect/frontend-foundations": "0.0.21",
12
+ "styled-components": "5.3.6"
13
+ }
14
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { Button } from './lib/atoms-button';
2
+ export type { ButtonProps } from './lib/atoms-button.type';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from './atoms-button.type';
3
+ export declare function Button({ dataTestId, disabled, title, variant, size, iconRight, iconLeft, onClick, }: ButtonProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ButtonTitleProps, ContainerProps, StyledButtonProps } from './atoms-button.type';
2
+ export declare const Container: import("styled-components").StyledComponent<"div", any, ContainerProps, never>;
3
+ export declare const Button: import("styled-components").StyledComponent<"button", any, StyledButtonProps, never>;
4
+ export declare const ButtonTitle: import("styled-components").StyledComponent<"label", any, ButtonTitleProps, never>;
@@ -0,0 +1,25 @@
1
+ export type ButtonVariants = 'transaction' | 'brand' | 'alternative' | 'outline' | 'ghost';
2
+ export type ButtonSizes = 'sm' | 'md' | 'lg';
3
+ export type ButtonProps = {
4
+ dataTestId?: string;
5
+ disabled: boolean;
6
+ title?: string;
7
+ variant: ButtonVariants;
8
+ size: ButtonSizes;
9
+ iconRight?: string;
10
+ iconLeft?: string;
11
+ onClick: () => void;
12
+ };
13
+ export type ContainerProps = {
14
+ size: string;
15
+ };
16
+ export type StyledButtonProps = {
17
+ variant: string;
18
+ size: ButtonSizes;
19
+ sizeVariant: 'generic' | 'ghost';
20
+ inverseColors: boolean;
21
+ };
22
+ export type ButtonTitleProps = {
23
+ size: ButtonSizes;
24
+ sizeVariant: 'generic' | 'ghost';
25
+ };
@@ -0,0 +1,7 @@
1
+ export declare enum SizeVariant {
2
+ transaction = "generic",
3
+ brand = "generic",
4
+ alternative = "generic",
5
+ outline = "generic",
6
+ ghost = "ghost"
7
+ }