@bolttech/atoms-button 0.0.1

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