@bolttech/atoms-button 0.21.2 → 0.22.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/index.cjs +103 -100
- package/package.json +6 -6
- package/src/lib/atoms-button.styles.d.ts +16 -4
- package/src/lib/atoms-button.type.d.ts +0 -14
package/index.cjs
CHANGED
|
@@ -16,7 +16,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
16
16
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17
17
|
|
|
18
18
|
var check = function (it) {
|
|
19
|
-
return it && it.Math
|
|
19
|
+
return it && it.Math === Math && it;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
@@ -45,7 +45,7 @@ var fails$8 = fails$9;
|
|
|
45
45
|
// Detect IE8's incomplete defineProperty implementation
|
|
46
46
|
var descriptors = !fails$8(function () {
|
|
47
47
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
48
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1]
|
|
48
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
var fails$7 = fails$9;
|
|
@@ -124,7 +124,7 @@ var indexedObject = fails$6(function () {
|
|
|
124
124
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
125
125
|
return !$Object$2('z').propertyIsEnumerable(0);
|
|
126
126
|
}) ? function (it) {
|
|
127
|
-
return classof(it)
|
|
127
|
+
return classof(it) === 'String' ? split(it, '') : $Object$2(it);
|
|
128
128
|
} : $Object$2;
|
|
129
129
|
|
|
130
130
|
// we can't use just `it == null` since of `document.all` special case
|
|
@@ -140,7 +140,7 @@ var $TypeError$5 = TypeError;
|
|
|
140
140
|
// `RequireObjectCoercible` abstract operation
|
|
141
141
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
142
142
|
var requireObjectCoercible$2 = function (it) {
|
|
143
|
-
if (isNullOrUndefined$1(it)) throw $TypeError$5("Can't call method on " + it);
|
|
143
|
+
if (isNullOrUndefined$1(it)) throw new $TypeError$5("Can't call method on " + it);
|
|
144
144
|
return it;
|
|
145
145
|
};
|
|
146
146
|
|
|
@@ -232,7 +232,6 @@ if (!version && userAgent) {
|
|
|
232
232
|
var engineV8Version = version;
|
|
233
233
|
|
|
234
234
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
235
|
-
|
|
236
235
|
var V8_VERSION = engineV8Version;
|
|
237
236
|
var fails$5 = fails$9;
|
|
238
237
|
var global$8 = global$b;
|
|
@@ -241,7 +240,7 @@ var $String$3 = global$8.String;
|
|
|
241
240
|
|
|
242
241
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
243
242
|
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
|
|
244
|
-
var symbol = Symbol();
|
|
243
|
+
var symbol = Symbol('symbol detection');
|
|
245
244
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
246
245
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
247
246
|
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
@@ -252,7 +251,6 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(func
|
|
|
252
251
|
});
|
|
253
252
|
|
|
254
253
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
255
|
-
|
|
256
254
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
257
255
|
|
|
258
256
|
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
@@ -291,7 +289,7 @@ var $TypeError$4 = TypeError;
|
|
|
291
289
|
// `Assert: IsCallable(argument) is true`
|
|
292
290
|
var aCallable$1 = function (argument) {
|
|
293
291
|
if (isCallable$6(argument)) return argument;
|
|
294
|
-
throw $TypeError$4(tryToString(argument) + ' is not a function');
|
|
292
|
+
throw new $TypeError$4(tryToString(argument) + ' is not a function');
|
|
295
293
|
};
|
|
296
294
|
|
|
297
295
|
var aCallable = aCallable$1;
|
|
@@ -317,7 +315,7 @@ var ordinaryToPrimitive$1 = function (input, pref) {
|
|
|
317
315
|
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
|
|
318
316
|
if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
|
|
319
317
|
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
|
|
320
|
-
throw $TypeError$3("Can't convert object to primitive value");
|
|
318
|
+
throw new $TypeError$3("Can't convert object to primitive value");
|
|
321
319
|
};
|
|
322
320
|
|
|
323
321
|
var shared$3 = {exports: {}};
|
|
@@ -348,10 +346,10 @@ var store$2 = sharedStore;
|
|
|
348
346
|
(shared$3.exports = function (key, value) {
|
|
349
347
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
350
348
|
})('versions', []).push({
|
|
351
|
-
version: '3.
|
|
349
|
+
version: '3.33.2',
|
|
352
350
|
mode: 'global',
|
|
353
351
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
354
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
352
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE',
|
|
355
353
|
source: 'https://github.com/zloirock/core-js'
|
|
356
354
|
});
|
|
357
355
|
|
|
@@ -426,7 +424,7 @@ var toPrimitive$1 = function (input, pref) {
|
|
|
426
424
|
if (pref === undefined) pref = 'default';
|
|
427
425
|
result = call$2(exoticToPrim, input, pref);
|
|
428
426
|
if (!isObject$3(result) || isSymbol$1(result)) return result;
|
|
429
|
-
throw $TypeError$2("Can't convert object to primitive value");
|
|
427
|
+
throw new $TypeError$2("Can't convert object to primitive value");
|
|
430
428
|
}
|
|
431
429
|
if (pref === undefined) pref = 'number';
|
|
432
430
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -462,7 +460,7 @@ var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
|
|
|
462
460
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
463
461
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
464
462
|
get: function () { return 7; }
|
|
465
|
-
}).a
|
|
463
|
+
}).a !== 7;
|
|
466
464
|
});
|
|
467
465
|
|
|
468
466
|
var DESCRIPTORS$6 = descriptors;
|
|
@@ -500,7 +498,7 @@ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
|
|
|
500
498
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
501
499
|
value: 42,
|
|
502
500
|
writable: false
|
|
503
|
-
}).prototype
|
|
501
|
+
}).prototype !== 42;
|
|
504
502
|
});
|
|
505
503
|
|
|
506
504
|
var isObject$1 = isObject$5;
|
|
@@ -511,7 +509,7 @@ var $TypeError$1 = TypeError;
|
|
|
511
509
|
// `Assert: Type(argument) is Object`
|
|
512
510
|
var anObject$2 = function (argument) {
|
|
513
511
|
if (isObject$1(argument)) return argument;
|
|
514
|
-
throw $TypeError$1($String$1(argument) + ' is not an object');
|
|
512
|
+
throw new $TypeError$1($String$1(argument) + ' is not an object');
|
|
515
513
|
};
|
|
516
514
|
|
|
517
515
|
var DESCRIPTORS$4 = descriptors;
|
|
@@ -553,7 +551,7 @@ objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defi
|
|
|
553
551
|
if (IE8_DOM_DEFINE) try {
|
|
554
552
|
return $defineProperty(O, P, Attributes);
|
|
555
553
|
} catch (error) { /* empty */ }
|
|
556
|
-
if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
|
|
554
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
|
|
557
555
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
558
556
|
return O;
|
|
559
557
|
};
|
|
@@ -644,7 +642,7 @@ var getterFor = function (TYPE) {
|
|
|
644
642
|
return function (it) {
|
|
645
643
|
var state;
|
|
646
644
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
647
|
-
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
645
|
+
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
648
646
|
} return state;
|
|
649
647
|
};
|
|
650
648
|
};
|
|
@@ -657,7 +655,7 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
657
655
|
store.set = store.set;
|
|
658
656
|
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
659
657
|
set = function (it, metadata) {
|
|
660
|
-
if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
658
|
+
if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
661
659
|
metadata.facade = it;
|
|
662
660
|
store.set(it, metadata);
|
|
663
661
|
return metadata;
|
|
@@ -672,7 +670,7 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
672
670
|
var STATE = sharedKey('state');
|
|
673
671
|
hiddenKeys$2[STATE] = true;
|
|
674
672
|
set = function (it, metadata) {
|
|
675
|
-
if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
673
|
+
if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
676
674
|
metadata.facade = it;
|
|
677
675
|
createNonEnumerableProperty$1(it, STATE, metadata);
|
|
678
676
|
return metadata;
|
|
@@ -843,10 +841,10 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
843
841
|
var value;
|
|
844
842
|
// Array#includes uses SameValueZero equality algorithm
|
|
845
843
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
846
|
-
if (IS_INCLUDES && el
|
|
844
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
847
845
|
value = O[index++];
|
|
848
846
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
849
|
-
if (value
|
|
847
|
+
if (value !== value) return true;
|
|
850
848
|
// Array#indexOf ignores holes, Array#includes - not
|
|
851
849
|
} else for (;length > index; index++) {
|
|
852
850
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
@@ -951,8 +949,8 @@ var replacement = /#|\.prototype\./;
|
|
|
951
949
|
|
|
952
950
|
var isForced$1 = function (feature, detection) {
|
|
953
951
|
var value = data[normalize(feature)];
|
|
954
|
-
return value
|
|
955
|
-
: value
|
|
952
|
+
return value === POLYFILL ? true
|
|
953
|
+
: value === NATIVE ? false
|
|
956
954
|
: isCallable(detection) ? fails$1(detection)
|
|
957
955
|
: !!detection;
|
|
958
956
|
};
|
|
@@ -1065,11 +1063,11 @@ var objectAssign = !$assign || fails(function () {
|
|
|
1065
1063
|
var A = {};
|
|
1066
1064
|
var B = {};
|
|
1067
1065
|
// eslint-disable-next-line es/no-symbol -- safe
|
|
1068
|
-
var symbol = Symbol();
|
|
1066
|
+
var symbol = Symbol('assign detection');
|
|
1069
1067
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
1070
1068
|
A[symbol] = 7;
|
|
1071
1069
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1072
|
-
return $assign({}, A)[symbol]
|
|
1070
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1073
1071
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1074
1072
|
var T = toObject(target);
|
|
1075
1073
|
var argumentsLength = arguments.length;
|
|
@@ -1124,7 +1122,12 @@ function __rest(s, e) {
|
|
|
1124
1122
|
t[p[i]] = s[p[i]];
|
|
1125
1123
|
}
|
|
1126
1124
|
return t;
|
|
1127
|
-
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1128
|
+
var e = new Error(message);
|
|
1129
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1130
|
+
};
|
|
1128
1131
|
|
|
1129
1132
|
var SizeVariant;
|
|
1130
1133
|
(function (SizeVariant) {
|
|
@@ -1140,25 +1143,25 @@ const Container = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
1140
1143
|
componentId: "sc-i4bzba-0"
|
|
1141
1144
|
})(["display:flex;align-items:center;gap:", ";white-space:nowrap;cursor:pointer;.left-img-btn,.right-img-btn{display:flex;label{font-size:", ";}}*{cursor:pointer;}"], ({
|
|
1142
1145
|
theme,
|
|
1143
|
-
size
|
|
1144
|
-
}) => theme.components.button[size].generic.gap, ({
|
|
1146
|
+
$size
|
|
1147
|
+
}) => theme.components.button[$size].generic.gap, ({
|
|
1145
1148
|
theme,
|
|
1146
|
-
size
|
|
1147
|
-
}) => theme.components.button[size].icon.size);
|
|
1149
|
+
$size
|
|
1150
|
+
}) => theme.components.button[$size].icon.size);
|
|
1148
1151
|
const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
1149
1152
|
displayName: "atoms-buttonstyles__Button",
|
|
1150
1153
|
componentId: "sc-i4bzba-1"
|
|
1151
|
-
})(["height:fit-content;background-color:", ";border-radius:", ";border:1px solid ", ";box-shadow:", ";color:", ";padding:", ";label.material-symbols-sharp{color:", ";}
|
|
1154
|
+
})(["height:fit-content;background-color:", ";border-radius:", ";border:1px solid ", ";box-shadow:", ";color:", ";padding:", ";label.material-symbols-sharp{color:", ";}&:disabled{background-color:", ";border:1px solid ", ";color:", ";label.material-symbols-sharp{color:", ";}}&:active:enabled{background-color:", ";border:1px solid ", ";color:", ";label.material-symbols-sharp{color:", ";}}&:hover:enabled{background-color:", ";border:1px solid ", ";color:", ";label.material-symbols-sharp{color:", ";}}", ""], ({
|
|
1152
1155
|
theme,
|
|
1153
|
-
variant
|
|
1154
|
-
}) => theme.components.button[variant].container.color.default, ({
|
|
1156
|
+
$variant
|
|
1157
|
+
}) => theme.components.button[$variant].container.color.default, ({
|
|
1155
1158
|
theme,
|
|
1156
|
-
size,
|
|
1157
|
-
sizeVariant
|
|
1158
|
-
}) => theme.components.button[size][sizeVariant].borderRadius, ({
|
|
1159
|
+
$size,
|
|
1160
|
+
$sizeVariant
|
|
1161
|
+
}) => theme.components.button[$size][$sizeVariant].borderRadius, ({
|
|
1159
1162
|
theme,
|
|
1160
|
-
variant
|
|
1161
|
-
}) => theme.components.button[variant].container.border.default, ({
|
|
1163
|
+
$variant
|
|
1164
|
+
}) => theme.components.button[$variant].container.border.default, ({
|
|
1162
1165
|
theme: {
|
|
1163
1166
|
effects: {
|
|
1164
1167
|
shadow
|
|
@@ -1166,85 +1169,85 @@ const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
|
1166
1169
|
}
|
|
1167
1170
|
}) => shadow.lvl0, ({
|
|
1168
1171
|
theme,
|
|
1169
|
-
variant
|
|
1170
|
-
}) => theme.components.button[variant].text.color.default, ({
|
|
1172
|
+
$variant
|
|
1173
|
+
}) => theme.components.button[$variant].text.color.default, ({
|
|
1171
1174
|
theme,
|
|
1172
|
-
size,
|
|
1173
|
-
sizeVariant
|
|
1174
|
-
}) => `${theme.components.button[size][sizeVariant].paddingVertical} ${theme.components.button[size][sizeVariant].paddingHorizontal}`, ({
|
|
1175
|
+
$size,
|
|
1176
|
+
$sizeVariant
|
|
1177
|
+
}) => `${theme.components.button[$size][$sizeVariant].paddingVertical} ${theme.components.button[$size][$sizeVariant].paddingHorizontal}`, ({
|
|
1175
1178
|
theme,
|
|
1176
|
-
variant
|
|
1177
|
-
}) => theme.components.button[variant].icon.color.default, ({
|
|
1179
|
+
$variant
|
|
1180
|
+
}) => theme.components.button[$variant].icon.color.default, ({
|
|
1178
1181
|
theme,
|
|
1179
|
-
variant
|
|
1180
|
-
}) => theme.components.button[variant].container.color.
|
|
1182
|
+
$variant
|
|
1183
|
+
}) => theme.components.button[$variant].container.color.disable, ({
|
|
1181
1184
|
theme,
|
|
1182
|
-
variant
|
|
1183
|
-
}) => theme.components.button[variant].container.border.
|
|
1185
|
+
$variant
|
|
1186
|
+
}) => theme.components.button[$variant].container.border.disable, ({
|
|
1184
1187
|
theme,
|
|
1185
|
-
variant
|
|
1186
|
-
}) => theme.components.button[variant].text.color.
|
|
1188
|
+
$variant
|
|
1189
|
+
}) => theme.components.button[$variant].text.color.disable, ({
|
|
1187
1190
|
theme,
|
|
1188
|
-
variant
|
|
1189
|
-
}) => theme.components.button[variant].icon.color.
|
|
1191
|
+
$variant
|
|
1192
|
+
}) => theme.components.button[$variant].icon.color.disable, ({
|
|
1190
1193
|
theme,
|
|
1191
|
-
variant
|
|
1192
|
-
}) => theme.components.button[variant].container.color.
|
|
1194
|
+
$variant
|
|
1195
|
+
}) => theme.components.button[$variant].container.color.active, ({
|
|
1193
1196
|
theme,
|
|
1194
|
-
variant
|
|
1195
|
-
}) => theme.components.button[variant].container.border.
|
|
1197
|
+
$variant
|
|
1198
|
+
}) => theme.components.button[$variant].container.border.active, ({
|
|
1196
1199
|
theme,
|
|
1197
|
-
variant
|
|
1198
|
-
}) => theme.components.button[variant].text.color.
|
|
1200
|
+
$variant
|
|
1201
|
+
}) => theme.components.button[$variant].text.color.active, ({
|
|
1199
1202
|
theme,
|
|
1200
|
-
variant
|
|
1201
|
-
}) => theme.components.button[variant].icon.color.
|
|
1203
|
+
$variant
|
|
1204
|
+
}) => theme.components.button[$variant].icon.color.active, ({
|
|
1202
1205
|
theme,
|
|
1203
|
-
variant
|
|
1204
|
-
}) => theme.components.button[variant].container.color.hover, ({
|
|
1206
|
+
$variant
|
|
1207
|
+
}) => theme.components.button[$variant].container.color.hover, ({
|
|
1205
1208
|
theme,
|
|
1206
|
-
variant
|
|
1207
|
-
}) => theme.components.button[variant].container.border.hover, ({
|
|
1209
|
+
$variant
|
|
1210
|
+
}) => theme.components.button[$variant].container.border.hover, ({
|
|
1208
1211
|
theme,
|
|
1209
|
-
variant
|
|
1210
|
-
}) => theme.components.button[variant].text.color.hover, ({
|
|
1212
|
+
$variant
|
|
1213
|
+
}) => theme.components.button[$variant].text.color.hover, ({
|
|
1211
1214
|
theme,
|
|
1212
|
-
variant
|
|
1213
|
-
}) => theme.components.button[variant].icon.color.hover, ({
|
|
1214
|
-
fullWidth
|
|
1215
|
-
}) => fullWidth && styled.css(["width:100%;", "{justify-content:center;}"], Container));
|
|
1215
|
+
$variant
|
|
1216
|
+
}) => theme.components.button[$variant].icon.color.hover, ({
|
|
1217
|
+
$fullWidth
|
|
1218
|
+
}) => $fullWidth && styled.css(["width:100%;", "{justify-content:center;}"], Container));
|
|
1216
1219
|
const ButtonTitle = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
1217
1220
|
displayName: "atoms-buttonstyles__ButtonTitle",
|
|
1218
1221
|
componentId: "sc-i4bzba-2"
|
|
1219
1222
|
})(["font-size:", ";font-weight:", ";letter-spacing:", ";line-height:", ";text-decoration:", ";text-indent:", ";text-transform:", ";"], ({
|
|
1220
1223
|
theme,
|
|
1221
|
-
size,
|
|
1222
|
-
sizeVariant
|
|
1223
|
-
}) => theme.components.button[size][sizeVariant].textLabel.fontSize, ({
|
|
1224
|
+
$size,
|
|
1225
|
+
$sizeVariant
|
|
1226
|
+
}) => theme.components.button[$size][$sizeVariant].textLabel.fontSize, ({
|
|
1224
1227
|
theme,
|
|
1225
|
-
size,
|
|
1226
|
-
sizeVariant
|
|
1227
|
-
}) => theme.components.button[size][sizeVariant].textLabel.fontWeight, ({
|
|
1228
|
+
$size,
|
|
1229
|
+
$sizeVariant
|
|
1230
|
+
}) => theme.components.button[$size][$sizeVariant].textLabel.fontWeight, ({
|
|
1228
1231
|
theme,
|
|
1229
|
-
size,
|
|
1230
|
-
sizeVariant
|
|
1231
|
-
}) => theme.components.button[size][sizeVariant].textLabel.letterSpacing, ({
|
|
1232
|
+
$size,
|
|
1233
|
+
$sizeVariant
|
|
1234
|
+
}) => theme.components.button[$size][$sizeVariant].textLabel.letterSpacing, ({
|
|
1232
1235
|
theme,
|
|
1233
|
-
size,
|
|
1234
|
-
sizeVariant
|
|
1235
|
-
}) => theme.components.button[size][sizeVariant].textLabel.lineHeight, ({
|
|
1236
|
+
$size,
|
|
1237
|
+
$sizeVariant
|
|
1238
|
+
}) => theme.components.button[$size][$sizeVariant].textLabel.lineHeight, ({
|
|
1236
1239
|
theme,
|
|
1237
|
-
size,
|
|
1238
|
-
sizeVariant
|
|
1239
|
-
}) => theme.components.button[size][sizeVariant].textLabel.textDecoration, ({
|
|
1240
|
+
$size,
|
|
1241
|
+
$sizeVariant
|
|
1242
|
+
}) => theme.components.button[$size][$sizeVariant].textLabel.textDecoration, ({
|
|
1240
1243
|
theme,
|
|
1241
|
-
size,
|
|
1242
|
-
sizeVariant
|
|
1243
|
-
}) => theme.components.button[size][sizeVariant].textLabel.paragraphSpacing, ({
|
|
1244
|
+
$size,
|
|
1245
|
+
$sizeVariant
|
|
1246
|
+
}) => theme.components.button[$size][$sizeVariant].textLabel.paragraphSpacing, ({
|
|
1244
1247
|
theme,
|
|
1245
|
-
size,
|
|
1246
|
-
sizeVariant
|
|
1247
|
-
}) => theme.components.button[size][sizeVariant].textLabel.textCase);
|
|
1248
|
+
$size,
|
|
1249
|
+
$sizeVariant
|
|
1250
|
+
}) => theme.components.button[$size][$sizeVariant].textLabel.textCase);
|
|
1248
1251
|
|
|
1249
1252
|
const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
1250
1253
|
var {
|
|
@@ -1262,18 +1265,18 @@ const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
1262
1265
|
props = __rest(_a, ["dataTestId", "disabled", "title", "variant", "size", "iconRight", "iconLeft", "fullWidth", "type", "onClick"]);
|
|
1263
1266
|
return jsxRuntime.jsx(Button$1, Object.assign({
|
|
1264
1267
|
"data-testid": dataTestId,
|
|
1265
|
-
variant: variant,
|
|
1266
|
-
size: size,
|
|
1267
|
-
sizeVariant: SizeVariant[variant],
|
|
1268
|
-
inverseColors: variant === 'alternative',
|
|
1268
|
+
"$variant": variant,
|
|
1269
|
+
"$size": size,
|
|
1270
|
+
"$sizeVariant": SizeVariant[variant],
|
|
1271
|
+
"$inverseColors": variant === 'alternative',
|
|
1269
1272
|
disabled: disabled,
|
|
1270
1273
|
type: type,
|
|
1271
|
-
fullWidth: fullWidth,
|
|
1274
|
+
"$fullWidth": fullWidth,
|
|
1272
1275
|
onClick: () => !disabled && onClick && onClick(),
|
|
1273
1276
|
ref: ref
|
|
1274
1277
|
}, uiUtils.applyDataAttributes(props), {
|
|
1275
1278
|
children: jsxRuntime.jsxs(Container, {
|
|
1276
|
-
size: size,
|
|
1279
|
+
"$size": size,
|
|
1277
1280
|
children: [iconLeft && jsxRuntime.jsx("div", {
|
|
1278
1281
|
className: "left-img-btn",
|
|
1279
1282
|
"data-testid": `left-img-btn-${iconLeft}`,
|
|
@@ -1282,8 +1285,8 @@ const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
1282
1285
|
icon: iconLeft
|
|
1283
1286
|
}, uiUtils.applyDataAttributes(props, 'icon-left')))
|
|
1284
1287
|
}), title && jsxRuntime.jsx(ButtonTitle, Object.assign({
|
|
1285
|
-
size: size,
|
|
1286
|
-
sizeVariant: SizeVariant[variant]
|
|
1288
|
+
"$size": size,
|
|
1289
|
+
"$sizeVariant": SizeVariant[variant]
|
|
1287
1290
|
}, uiUtils.applyDataAttributes(props, 'label'), {
|
|
1288
1291
|
children: title
|
|
1289
1292
|
})), iconRight && jsxRuntime.jsx("div", {
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/atoms-button",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"main": "./index.cjs",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@bolttech/atoms-icon": "0.
|
|
9
|
-
"@bolttech/default-theme": "0.0
|
|
10
|
-
"@bolttech/frontend-foundations": "0.
|
|
11
|
-
"@bolttech/ui-utils": "0.
|
|
8
|
+
"@bolttech/atoms-icon": "0.22.0",
|
|
9
|
+
"@bolttech/default-theme": "0.1.0",
|
|
10
|
+
"@bolttech/frontend-foundations": "0.2.0",
|
|
11
|
+
"@bolttech/ui-utils": "0.2.0",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"styled-components": "
|
|
13
|
+
"styled-components": "6.1.1"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {}
|
|
16
16
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonSizes, ButtonVariants } from './atoms-button.type';
|
|
3
|
+
export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$size: ButtonSizes;
|
|
5
|
+
}>>;
|
|
6
|
+
export declare const Button: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
7
|
+
$variant: ButtonVariants;
|
|
8
|
+
$size: ButtonSizes;
|
|
9
|
+
$sizeVariant: 'generic' | 'ghost';
|
|
10
|
+
$fullWidth: boolean;
|
|
11
|
+
$inverseColors: boolean;
|
|
12
|
+
}>>;
|
|
13
|
+
export declare const ButtonTitle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
|
|
14
|
+
$size: ButtonSizes;
|
|
15
|
+
$sizeVariant: 'generic' | 'ghost';
|
|
16
|
+
}>>;
|
|
@@ -14,17 +14,3 @@ export type ButtonProps = DefaultProps & {
|
|
|
14
14
|
fullWidth?: boolean;
|
|
15
15
|
onClick?: () => void;
|
|
16
16
|
};
|
|
17
|
-
export type ContainerProps = {
|
|
18
|
-
size: string;
|
|
19
|
-
};
|
|
20
|
-
export type StyledButtonProps = {
|
|
21
|
-
variant: string;
|
|
22
|
-
size: ButtonSizes;
|
|
23
|
-
sizeVariant: 'generic' | 'ghost';
|
|
24
|
-
fullWidth: boolean;
|
|
25
|
-
inverseColors: boolean;
|
|
26
|
-
};
|
|
27
|
-
export type ButtonTitleProps = {
|
|
28
|
-
size: ButtonSizes;
|
|
29
|
-
sizeVariant: 'generic' | 'ghost';
|
|
30
|
-
};
|