@bolttech/atoms-button 0.27.1 → 0.28.2
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/{index.cjs → index.cjs.js} +78 -90
- package/index.d.ts +1 -0
- package/package.json +9 -12
- package/src/lib/atoms-button.d.ts +9 -8
- package/src/lib/atoms-button.styles.d.ts +2 -3
- package/src/lib/atoms-button.type.d.ts +11 -1
- package/src/lib/enum.d.ts +0 -4
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
5
|
var react = require('react');
|
|
8
6
|
var atomsIcon = require('@bolttech/atoms-icon');
|
|
9
7
|
var styled = require('styled-components');
|
|
10
8
|
var uiUtils = require('@bolttech/ui-utils');
|
|
11
9
|
|
|
12
|
-
function
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
11
|
|
|
14
|
-
var styled__default = /*#__PURE__*/
|
|
12
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
15
13
|
|
|
16
14
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17
15
|
|
|
@@ -20,7 +18,7 @@ var check = function (it) {
|
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
23
|
-
var
|
|
21
|
+
var globalThis_1 =
|
|
24
22
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
25
23
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
26
24
|
check(typeof window == 'object' && window) ||
|
|
@@ -61,7 +59,7 @@ var functionBindNative = !fails$7(function () {
|
|
|
61
59
|
var NATIVE_BIND$1 = functionBindNative;
|
|
62
60
|
|
|
63
61
|
var call$5 = Function.prototype.call;
|
|
64
|
-
|
|
62
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
65
63
|
var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
|
|
66
64
|
return call$5.apply(call$5, arguments);
|
|
67
65
|
};
|
|
@@ -95,6 +93,7 @@ var NATIVE_BIND = functionBindNative;
|
|
|
95
93
|
|
|
96
94
|
var FunctionPrototype$1 = Function.prototype;
|
|
97
95
|
var call$4 = FunctionPrototype$1.call;
|
|
96
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
98
97
|
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
|
|
99
98
|
|
|
100
99
|
var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
@@ -167,11 +166,11 @@ var isCallable$a = typeof documentAll == 'undefined' && documentAll !== undefine
|
|
|
167
166
|
|
|
168
167
|
var isCallable$9 = isCallable$a;
|
|
169
168
|
|
|
170
|
-
var isObject$
|
|
169
|
+
var isObject$4 = function (it) {
|
|
171
170
|
return typeof it == 'object' ? it !== null : isCallable$9(it);
|
|
172
171
|
};
|
|
173
172
|
|
|
174
|
-
var
|
|
173
|
+
var globalThis$b = globalThis_1;
|
|
175
174
|
var isCallable$8 = isCallable$a;
|
|
176
175
|
|
|
177
176
|
var aFunction = function (argument) {
|
|
@@ -179,20 +178,25 @@ var aFunction = function (argument) {
|
|
|
179
178
|
};
|
|
180
179
|
|
|
181
180
|
var getBuiltIn$2 = function (namespace, method) {
|
|
182
|
-
return arguments.length < 2 ? aFunction(
|
|
181
|
+
return arguments.length < 2 ? aFunction(globalThis$b[namespace]) : globalThis$b[namespace] && globalThis$b[namespace][method];
|
|
183
182
|
};
|
|
184
183
|
|
|
185
184
|
var uncurryThis$7 = functionUncurryThis;
|
|
186
185
|
|
|
187
186
|
var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
|
|
188
187
|
|
|
189
|
-
var
|
|
188
|
+
var globalThis$a = globalThis_1;
|
|
189
|
+
|
|
190
|
+
var navigator = globalThis$a.navigator;
|
|
191
|
+
var userAgent$1 = navigator && navigator.userAgent;
|
|
190
192
|
|
|
191
|
-
var
|
|
192
|
-
var userAgent = engineUserAgent;
|
|
193
|
+
var environmentUserAgent = userAgent$1 ? String(userAgent$1) : '';
|
|
193
194
|
|
|
194
|
-
var
|
|
195
|
-
var
|
|
195
|
+
var globalThis$9 = globalThis_1;
|
|
196
|
+
var userAgent = environmentUserAgent;
|
|
197
|
+
|
|
198
|
+
var process = globalThis$9.process;
|
|
199
|
+
var Deno = globalThis$9.Deno;
|
|
196
200
|
var versions = process && process.versions || Deno && Deno.version;
|
|
197
201
|
var v8 = versions && versions.v8;
|
|
198
202
|
var match, version;
|
|
@@ -214,14 +218,14 @@ if (!version && userAgent) {
|
|
|
214
218
|
}
|
|
215
219
|
}
|
|
216
220
|
|
|
217
|
-
var
|
|
221
|
+
var environmentV8Version = version;
|
|
218
222
|
|
|
219
223
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
220
|
-
var V8_VERSION =
|
|
224
|
+
var V8_VERSION = environmentV8Version;
|
|
221
225
|
var fails$5 = fails$9;
|
|
222
|
-
var
|
|
226
|
+
var globalThis$8 = globalThis_1;
|
|
223
227
|
|
|
224
|
-
var $String$3 =
|
|
228
|
+
var $String$3 = globalThis$8.String;
|
|
225
229
|
|
|
226
230
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
227
231
|
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
|
|
@@ -238,9 +242,9 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(func
|
|
|
238
242
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
239
243
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
240
244
|
|
|
241
|
-
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
242
|
-
|
|
243
|
-
|
|
245
|
+
var useSymbolAsUid = NATIVE_SYMBOL$1 &&
|
|
246
|
+
!Symbol.sham &&
|
|
247
|
+
typeof Symbol.iterator == 'symbol';
|
|
244
248
|
|
|
245
249
|
var getBuiltIn$1 = getBuiltIn$2;
|
|
246
250
|
var isCallable$7 = isCallable$a;
|
|
@@ -289,7 +293,7 @@ var getMethod$1 = function (V, P) {
|
|
|
289
293
|
|
|
290
294
|
var call$3 = functionCall;
|
|
291
295
|
var isCallable$5 = isCallable$a;
|
|
292
|
-
var isObject$
|
|
296
|
+
var isObject$3 = isObject$4;
|
|
293
297
|
|
|
294
298
|
var $TypeError$3 = TypeError;
|
|
295
299
|
|
|
@@ -297,42 +301,44 @@ var $TypeError$3 = TypeError;
|
|
|
297
301
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
298
302
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
299
303
|
var fn, val;
|
|
300
|
-
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$
|
|
301
|
-
if (isCallable$5(fn = input.valueOf) && !isObject$
|
|
302
|
-
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$
|
|
304
|
+
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
|
|
305
|
+
if (isCallable$5(fn = input.valueOf) && !isObject$3(val = call$3(fn, input))) return val;
|
|
306
|
+
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
|
|
303
307
|
throw new $TypeError$3("Can't convert object to primitive value");
|
|
304
308
|
};
|
|
305
309
|
|
|
306
310
|
var sharedStore = {exports: {}};
|
|
307
311
|
|
|
308
|
-
var
|
|
312
|
+
var globalThis$7 = globalThis_1;
|
|
309
313
|
|
|
310
314
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
311
315
|
var defineProperty$2 = Object.defineProperty;
|
|
312
316
|
|
|
313
317
|
var defineGlobalProperty$3 = function (key, value) {
|
|
314
318
|
try {
|
|
315
|
-
defineProperty$2(
|
|
319
|
+
defineProperty$2(globalThis$7, key, { value: value, configurable: true, writable: true });
|
|
316
320
|
} catch (error) {
|
|
317
|
-
|
|
321
|
+
globalThis$7[key] = value;
|
|
318
322
|
} return value;
|
|
319
323
|
};
|
|
320
324
|
|
|
321
|
-
var globalThis$
|
|
325
|
+
var globalThis$6 = globalThis_1;
|
|
322
326
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
323
327
|
|
|
324
328
|
var SHARED = '__core-js_shared__';
|
|
325
|
-
var store$3 = sharedStore.exports = globalThis$
|
|
329
|
+
var store$3 = sharedStore.exports = globalThis$6[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
326
330
|
|
|
327
331
|
(store$3.versions || (store$3.versions = [])).push({
|
|
328
|
-
version: '3.
|
|
332
|
+
version: '3.48.0',
|
|
329
333
|
mode: 'global',
|
|
330
|
-
copyright: '©
|
|
331
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
334
|
+
copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
|
|
335
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
|
|
332
336
|
source: 'https://github.com/zloirock/core-js'
|
|
333
337
|
});
|
|
334
338
|
|
|
335
|
-
var
|
|
339
|
+
var sharedStoreExports = sharedStore.exports;
|
|
340
|
+
|
|
341
|
+
var store$2 = sharedStoreExports;
|
|
336
342
|
|
|
337
343
|
var shared$3 = function (key, value) {
|
|
338
344
|
return store$2[key] || (store$2[key] = value || {});
|
|
@@ -364,20 +370,20 @@ var uncurryThis$5 = functionUncurryThis;
|
|
|
364
370
|
|
|
365
371
|
var id = 0;
|
|
366
372
|
var postfix = Math.random();
|
|
367
|
-
var toString = uncurryThis$5(1.
|
|
373
|
+
var toString = uncurryThis$5(1.1.toString);
|
|
368
374
|
|
|
369
375
|
var uid$2 = function (key) {
|
|
370
376
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
371
377
|
};
|
|
372
378
|
|
|
373
|
-
var
|
|
379
|
+
var globalThis$5 = globalThis_1;
|
|
374
380
|
var shared$2 = shared$3;
|
|
375
381
|
var hasOwn$6 = hasOwnProperty_1;
|
|
376
382
|
var uid$1 = uid$2;
|
|
377
383
|
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
378
384
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
379
385
|
|
|
380
|
-
var Symbol$1 =
|
|
386
|
+
var Symbol$1 = globalThis$5.Symbol;
|
|
381
387
|
var WellKnownSymbolsStore = shared$2('wks');
|
|
382
388
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
383
389
|
|
|
@@ -390,7 +396,7 @@ var wellKnownSymbol$1 = function (name) {
|
|
|
390
396
|
};
|
|
391
397
|
|
|
392
398
|
var call$2 = functionCall;
|
|
393
|
-
var isObject$
|
|
399
|
+
var isObject$2 = isObject$4;
|
|
394
400
|
var isSymbol$1 = isSymbol$2;
|
|
395
401
|
var getMethod = getMethod$1;
|
|
396
402
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
@@ -402,13 +408,13 @@ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
|
402
408
|
// `ToPrimitive` abstract operation
|
|
403
409
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
404
410
|
var toPrimitive$1 = function (input, pref) {
|
|
405
|
-
if (!isObject$
|
|
411
|
+
if (!isObject$2(input) || isSymbol$1(input)) return input;
|
|
406
412
|
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
407
413
|
var result;
|
|
408
414
|
if (exoticToPrim) {
|
|
409
415
|
if (pref === undefined) pref = 'default';
|
|
410
416
|
result = call$2(exoticToPrim, input, pref);
|
|
411
|
-
if (!isObject$
|
|
417
|
+
if (!isObject$2(result) || isSymbol$1(result)) return result;
|
|
412
418
|
throw new $TypeError$2("Can't convert object to primitive value");
|
|
413
419
|
}
|
|
414
420
|
if (pref === undefined) pref = 'number';
|
|
@@ -425,12 +431,12 @@ var toPropertyKey$2 = function (argument) {
|
|
|
425
431
|
return isSymbol(key) ? key : key + '';
|
|
426
432
|
};
|
|
427
433
|
|
|
428
|
-
var
|
|
429
|
-
var isObject$
|
|
434
|
+
var globalThis$4 = globalThis_1;
|
|
435
|
+
var isObject$1 = isObject$4;
|
|
430
436
|
|
|
431
|
-
var document$1 =
|
|
437
|
+
var document$1 = globalThis$4.document;
|
|
432
438
|
// typeof document.createElement is 'object' in old IE
|
|
433
|
-
var EXISTS$1 = isObject$
|
|
439
|
+
var EXISTS$1 = isObject$1(document$1) && isObject$1(document$1.createElement);
|
|
434
440
|
|
|
435
441
|
var documentCreateElement = function (it) {
|
|
436
442
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
@@ -486,14 +492,14 @@ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
|
|
|
486
492
|
}).prototype !== 42;
|
|
487
493
|
});
|
|
488
494
|
|
|
489
|
-
var isObject
|
|
495
|
+
var isObject = isObject$4;
|
|
490
496
|
|
|
491
497
|
var $String$1 = String;
|
|
492
498
|
var $TypeError$1 = TypeError;
|
|
493
499
|
|
|
494
500
|
// `Assert: Type(argument) is Object`
|
|
495
501
|
var anObject$2 = function (argument) {
|
|
496
|
-
if (isObject
|
|
502
|
+
if (isObject(argument)) return argument;
|
|
497
503
|
throw new $TypeError$1($String$1(argument) + ' is not an object');
|
|
498
504
|
};
|
|
499
505
|
|
|
@@ -562,19 +568,15 @@ var FunctionPrototype = Function.prototype;
|
|
|
562
568
|
var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
|
|
563
569
|
|
|
564
570
|
var EXISTS = hasOwn$4(FunctionPrototype, 'name');
|
|
565
|
-
// additional protection from minified / mangled / dropped function names
|
|
566
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
567
571
|
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
568
572
|
|
|
569
573
|
var functionName = {
|
|
570
|
-
EXISTS: EXISTS,
|
|
571
|
-
PROPER: PROPER,
|
|
572
574
|
CONFIGURABLE: CONFIGURABLE
|
|
573
575
|
};
|
|
574
576
|
|
|
575
577
|
var uncurryThis$4 = functionUncurryThis;
|
|
576
578
|
var isCallable$4 = isCallable$a;
|
|
577
|
-
var store$1 =
|
|
579
|
+
var store$1 = sharedStoreExports;
|
|
578
580
|
|
|
579
581
|
var functionToString = uncurryThis$4(Function.toString);
|
|
580
582
|
|
|
@@ -587,10 +589,10 @@ if (!isCallable$4(store$1.inspectSource)) {
|
|
|
587
589
|
|
|
588
590
|
var inspectSource$1 = store$1.inspectSource;
|
|
589
591
|
|
|
590
|
-
var
|
|
592
|
+
var globalThis$3 = globalThis_1;
|
|
591
593
|
var isCallable$3 = isCallable$a;
|
|
592
594
|
|
|
593
|
-
var WeakMap$1 =
|
|
595
|
+
var WeakMap$1 = globalThis$3.WeakMap;
|
|
594
596
|
|
|
595
597
|
var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
596
598
|
|
|
@@ -606,32 +608,22 @@ var sharedKey$1 = function (key) {
|
|
|
606
608
|
var hiddenKeys$3 = {};
|
|
607
609
|
|
|
608
610
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
609
|
-
var
|
|
610
|
-
var isObject = isObject$5;
|
|
611
|
+
var globalThis$2 = globalThis_1;
|
|
611
612
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
|
|
612
613
|
var hasOwn$3 = hasOwnProperty_1;
|
|
613
|
-
var shared =
|
|
614
|
+
var shared = sharedStoreExports;
|
|
614
615
|
var sharedKey = sharedKey$1;
|
|
615
616
|
var hiddenKeys$2 = hiddenKeys$3;
|
|
616
617
|
|
|
617
618
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
618
|
-
var TypeError$1 =
|
|
619
|
-
var WeakMap =
|
|
619
|
+
var TypeError$1 = globalThis$2.TypeError;
|
|
620
|
+
var WeakMap = globalThis$2.WeakMap;
|
|
620
621
|
var set, get, has;
|
|
621
622
|
|
|
622
623
|
var enforce = function (it) {
|
|
623
624
|
return has(it) ? get(it) : set(it, {});
|
|
624
625
|
};
|
|
625
626
|
|
|
626
|
-
var getterFor = function (TYPE) {
|
|
627
|
-
return function (it) {
|
|
628
|
-
var state;
|
|
629
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
630
|
-
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
631
|
-
} return state;
|
|
632
|
-
};
|
|
633
|
-
};
|
|
634
|
-
|
|
635
627
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
636
628
|
var store = shared.state || (shared.state = new WeakMap());
|
|
637
629
|
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
@@ -669,12 +661,8 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
669
661
|
}
|
|
670
662
|
|
|
671
663
|
var internalState = {
|
|
672
|
-
set: set,
|
|
673
664
|
get: get,
|
|
674
|
-
|
|
675
|
-
enforce: enforce,
|
|
676
|
-
getterFor: getterFor
|
|
677
|
-
};
|
|
665
|
+
enforce: enforce};
|
|
678
666
|
|
|
679
667
|
var uncurryThis$3 = functionUncurryThis;
|
|
680
668
|
var fails$2 = fails$9;
|
|
@@ -731,9 +719,11 @@ Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
|
731
719
|
return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
|
|
732
720
|
}, 'toString');
|
|
733
721
|
|
|
722
|
+
var makeBuiltInExports = makeBuiltIn$2.exports;
|
|
723
|
+
|
|
734
724
|
var isCallable$1 = isCallable$a;
|
|
735
725
|
var definePropertyModule$1 = objectDefineProperty;
|
|
736
|
-
var makeBuiltIn =
|
|
726
|
+
var makeBuiltIn = makeBuiltInExports;
|
|
737
727
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
738
728
|
|
|
739
729
|
var defineBuiltIn$1 = function (O, key, value, options) {
|
|
@@ -840,9 +830,6 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
840
830
|
};
|
|
841
831
|
|
|
842
832
|
var arrayIncludes = {
|
|
843
|
-
// `Array.prototype.includes` method
|
|
844
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
845
|
-
includes: createMethod(true),
|
|
846
833
|
// `Array.prototype.indexOf` method
|
|
847
834
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
848
835
|
indexOf: createMethod(false)
|
|
@@ -952,7 +939,7 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
952
939
|
|
|
953
940
|
var isForced_1 = isForced$1;
|
|
954
941
|
|
|
955
|
-
var
|
|
942
|
+
var globalThis$1 = globalThis_1;
|
|
956
943
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
957
944
|
var createNonEnumerableProperty = createNonEnumerableProperty$2;
|
|
958
945
|
var defineBuiltIn = defineBuiltIn$1;
|
|
@@ -981,11 +968,11 @@ var _export = function (options, source) {
|
|
|
981
968
|
var STATIC = options.stat;
|
|
982
969
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
983
970
|
if (GLOBAL) {
|
|
984
|
-
target =
|
|
971
|
+
target = globalThis$1;
|
|
985
972
|
} else if (STATIC) {
|
|
986
|
-
target =
|
|
973
|
+
target = globalThis$1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
987
974
|
} else {
|
|
988
|
-
target =
|
|
975
|
+
target = globalThis$1[TARGET] && globalThis$1[TARGET].prototype;
|
|
989
976
|
}
|
|
990
977
|
if (target) for (key in source) {
|
|
991
978
|
sourceProperty = source[key];
|
|
@@ -1053,6 +1040,7 @@ var objectAssign = !$assign || fails(function () {
|
|
|
1053
1040
|
var symbol = Symbol('assign detection');
|
|
1054
1041
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
1055
1042
|
A[symbol] = 7;
|
|
1043
|
+
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
1056
1044
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1057
1045
|
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1058
1046
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
@@ -1098,6 +1086,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
1098
1086
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1099
1087
|
PERFORMANCE OF THIS SOFTWARE.
|
|
1100
1088
|
***************************************************************************** */
|
|
1089
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1090
|
+
|
|
1101
1091
|
|
|
1102
1092
|
function __rest(s, e) {
|
|
1103
1093
|
var t = {};
|
|
@@ -1118,14 +1108,10 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
1118
1108
|
|
|
1119
1109
|
var SizeVariant;
|
|
1120
1110
|
(function (SizeVariant) {
|
|
1121
|
-
SizeVariant["transaction"] = "generic";
|
|
1122
|
-
SizeVariant["brand"] = "generic";
|
|
1123
|
-
SizeVariant["alternative"] = "generic";
|
|
1124
|
-
SizeVariant["outline"] = "generic";
|
|
1125
1111
|
SizeVariant["ghost"] = "ghost";
|
|
1126
1112
|
})(SizeVariant || (SizeVariant = {}));
|
|
1127
1113
|
|
|
1128
|
-
const Container = /*#__PURE__*/styled__default
|
|
1114
|
+
const Container = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
1129
1115
|
displayName: "atoms-buttonstyles__Container",
|
|
1130
1116
|
componentId: "sc-i4bzba-0"
|
|
1131
1117
|
})(["display:flex;align-items:center;gap:", ";white-space:nowrap;cursor:pointer;.left-img-btn,.right-img-btn{display:flex;label{font-size:", ";}}*{cursor:pointer;}"], ({
|
|
@@ -1135,7 +1121,7 @@ const Container = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
1135
1121
|
theme,
|
|
1136
1122
|
$size
|
|
1137
1123
|
}) => theme.components.button[$size].icon.size);
|
|
1138
|
-
const Button$1 = /*#__PURE__*/styled__default
|
|
1124
|
+
const Button$1 = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
1139
1125
|
displayName: "atoms-buttonstyles__Button",
|
|
1140
1126
|
componentId: "sc-i4bzba-1"
|
|
1141
1127
|
})(["height:fit-content;background-color:", ";border-radius:", ";border:", " solid ", ";box-shadow:", ";color:", ";padding:", ";label.material-symbols-sharp{color:", ";}&:disabled{background-color:", ";border:", ";color:", ";label.material-symbols-sharp{color:", ";}}&:active:enabled{background-color:", ";border:", ";color:", ";label.material-symbols-sharp{color:", ";}}&:hover:enabled{background-color:", ";border:", ";color:", ";label.material-symbols-sharp{color:", ";}}", ""], ({
|
|
@@ -1208,7 +1194,7 @@ const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
|
1208
1194
|
}) => theme.components.button[$variant].icon.color.hover, ({
|
|
1209
1195
|
$fullWidth
|
|
1210
1196
|
}) => $fullWidth && styled.css(["width:100%;", "{justify-content:center;}"], Container));
|
|
1211
|
-
const ButtonTitle = /*#__PURE__*/styled__default
|
|
1197
|
+
const ButtonTitle = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
1212
1198
|
displayName: "atoms-buttonstyles__ButtonTitle",
|
|
1213
1199
|
componentId: "sc-i4bzba-2"
|
|
1214
1200
|
})(["font-size:", ";font-weight:", ";letter-spacing:", ";line-height:", ";text-decoration:", ";text-indent:", ";text-transform:", ";"], ({
|
|
@@ -1243,6 +1229,7 @@ const ButtonTitle = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
|
1243
1229
|
|
|
1244
1230
|
const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
1245
1231
|
var {
|
|
1232
|
+
id,
|
|
1246
1233
|
dataTestId,
|
|
1247
1234
|
disabled = false,
|
|
1248
1235
|
title = '',
|
|
@@ -1254,12 +1241,13 @@ const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
1254
1241
|
type = 'button',
|
|
1255
1242
|
onClick
|
|
1256
1243
|
} = _a,
|
|
1257
|
-
props = __rest(_a, ["dataTestId", "disabled", "title", "variant", "size", "iconRight", "iconLeft", "fullWidth", "type", "onClick"]);
|
|
1244
|
+
props = __rest(_a, ["id", "dataTestId", "disabled", "title", "variant", "size", "iconRight", "iconLeft", "fullWidth", "type", "onClick"]);
|
|
1258
1245
|
return jsxRuntime.jsx(Button$1, Object.assign({
|
|
1246
|
+
id: id,
|
|
1259
1247
|
"data-testid": dataTestId,
|
|
1260
1248
|
"$variant": variant,
|
|
1261
1249
|
"$size": size,
|
|
1262
|
-
"$sizeVariant": SizeVariant[variant],
|
|
1250
|
+
"$sizeVariant": variant !== 'ghost' ? 'generic' : SizeVariant[variant],
|
|
1263
1251
|
"$inverseColors": variant === 'alternative',
|
|
1264
1252
|
disabled: disabled,
|
|
1265
1253
|
type: type,
|
|
@@ -1278,7 +1266,7 @@ const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
1278
1266
|
}, uiUtils.applyDataAttributes(props, 'icon-left')))
|
|
1279
1267
|
}), title && jsxRuntime.jsx(ButtonTitle, Object.assign({
|
|
1280
1268
|
"$size": size,
|
|
1281
|
-
"$sizeVariant": SizeVariant[variant]
|
|
1269
|
+
"$sizeVariant": variant !== 'ghost' ? 'generic' : SizeVariant[variant]
|
|
1282
1270
|
}, uiUtils.applyDataAttributes(props, 'label'), {
|
|
1283
1271
|
children: title
|
|
1284
1272
|
})), iconRight && jsxRuntime.jsx("div", {
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/atoms-button",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"main": "./index.cjs",
|
|
5
|
-
"type": "commonjs",
|
|
6
|
-
"types": "./src/index.d.ts",
|
|
3
|
+
"version": "0.28.2",
|
|
7
4
|
"dependencies": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"@bolttech/
|
|
11
|
-
"@bolttech/ui-utils": "0.
|
|
12
|
-
"react": "18.2.0",
|
|
13
|
-
"styled-components": "6.1.1"
|
|
5
|
+
"styled-components": "6.1.1",
|
|
6
|
+
"react": "19.1.2",
|
|
7
|
+
"@bolttech/atoms-icon": "0.24.2",
|
|
8
|
+
"@bolttech/ui-utils": "0.6.0"
|
|
14
9
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
10
|
+
"main": "./index.cjs.js",
|
|
11
|
+
"type": "commonjs",
|
|
12
|
+
"types": "./index.d.ts"
|
|
13
|
+
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const Button: React.ForwardRefExoticComponent<import("@bolttech/ui-utils").DefaultProps & {
|
|
3
|
-
dataTestId?: string
|
|
4
|
-
disabled?: boolean
|
|
5
|
-
title?: string
|
|
3
|
+
dataTestId?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
title?: string;
|
|
6
6
|
variant: import("./atoms-button.type").ButtonVariants;
|
|
7
7
|
size: import("./atoms-button.type").ButtonSizes;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
id?: string;
|
|
9
|
+
iconRight?: string;
|
|
10
|
+
iconLeft?: string;
|
|
11
|
+
type?: import("./atoms-button.type").ButtonTypes;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
14
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
14
15
|
export default Button;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ButtonSizes, ButtonVariants } from './atoms-button.type';
|
|
3
2
|
export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
3
|
$size: ButtonSizes;
|
|
@@ -6,11 +5,11 @@ export declare const Container: import("styled-components").IStyledComponent<"we
|
|
|
6
5
|
export declare const Button: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
7
6
|
$variant: ButtonVariants;
|
|
8
7
|
$size: ButtonSizes;
|
|
9
|
-
$sizeVariant:
|
|
8
|
+
$sizeVariant: "generic" | "ghost";
|
|
10
9
|
$fullWidth: boolean;
|
|
11
10
|
$inverseColors: boolean;
|
|
12
11
|
}>>;
|
|
13
12
|
export declare const ButtonTitle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
14
13
|
$size: ButtonSizes;
|
|
15
|
-
$sizeVariant:
|
|
14
|
+
$sizeVariant: "generic" | "ghost";
|
|
16
15
|
}>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DefaultProps } from '@bolttech/ui-utils';
|
|
3
2
|
export type ButtonVariants = 'transaction' | 'brand' | 'alternative' | 'outline' | 'ghost';
|
|
4
3
|
export type ButtonSizes = 'sm' | 'md' | 'lg';
|
|
@@ -9,6 +8,17 @@ export type ButtonProps = DefaultProps & {
|
|
|
9
8
|
title?: string;
|
|
10
9
|
variant: ButtonVariants;
|
|
11
10
|
size: ButtonSizes;
|
|
11
|
+
/**
|
|
12
|
+
* The HTML `id` attribute for the button.
|
|
13
|
+
*
|
|
14
|
+
* Must be unique within the document and conform to
|
|
15
|
+
* HTML `id` naming rules (no spaces, not starting with a digit, etc.).
|
|
16
|
+
* Useful for targeting the button in scripts, automated tests,
|
|
17
|
+
* or associating it with a `<label>` for accessibility.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue - no `id` attribute is rendered
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
12
22
|
iconRight?: string;
|
|
13
23
|
iconLeft?: string;
|
|
14
24
|
type?: ButtonTypes;
|