@bolttech/atoms-button 0.2.0 → 0.2.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/README.md +1 -0
- package/index.js +22 -14
- package/package.json +3 -3
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
4
12
|
|
|
5
13
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
14
|
|
|
@@ -1092,7 +1100,7 @@ var SizeVariant;
|
|
|
1092
1100
|
SizeVariant["ghost"] = "ghost";
|
|
1093
1101
|
})(SizeVariant || (SizeVariant = {}));
|
|
1094
1102
|
|
|
1095
|
-
const Container = /*#__PURE__*/
|
|
1103
|
+
const Container = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
1096
1104
|
displayName: "atoms-buttonstyles__Container",
|
|
1097
1105
|
componentId: "i4bzba-0"
|
|
1098
1106
|
})(["display:flex;align-items:center;gap:", ";.left-img-btn,.right-img-btn,svg{width:", ";height:", ";}"], ({
|
|
@@ -1105,7 +1113,7 @@ const Container = /*#__PURE__*/styled.div.withConfig({
|
|
|
1105
1113
|
theme,
|
|
1106
1114
|
size
|
|
1107
1115
|
}) => theme.components.button[size].icon.size);
|
|
1108
|
-
const Button$1 = /*#__PURE__*/
|
|
1116
|
+
const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
1109
1117
|
displayName: "atoms-buttonstyles__Button",
|
|
1110
1118
|
componentId: "i4bzba-1"
|
|
1111
1119
|
})(["background-color:", ";border-radius:", ";border:1px solid ", ";box-shadow:", ";color:", ";fill:", ";padding:", ";:active:enabled{background-color:", ";border:1px solid ", ";color:", ";fill:", ";}:disabled{background-color:", ";border:1px solid ", ";color:", ";fill:", ";}:hover:enabled{background-color:", ";border:1px solid ", ";color:", ";fill:", ";}"], ({
|
|
@@ -1171,7 +1179,7 @@ const Button$1 = /*#__PURE__*/styled.button.withConfig({
|
|
|
1171
1179
|
theme,
|
|
1172
1180
|
variant
|
|
1173
1181
|
}) => theme.components.button[variant].icon.color.hover);
|
|
1174
|
-
const ButtonTitle = /*#__PURE__*/
|
|
1182
|
+
const ButtonTitle = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
1175
1183
|
displayName: "atoms-buttonstyles__ButtonTitle",
|
|
1176
1184
|
componentId: "i4bzba-2"
|
|
1177
1185
|
})(["font-size:", ";font-weight:", ";letter-spacing:", ";line-height:", ";text-decoration:", ";text-indent:", ";text-transform:", ";"], ({
|
|
@@ -1214,7 +1222,7 @@ function Button({
|
|
|
1214
1222
|
iconLeft,
|
|
1215
1223
|
onClick
|
|
1216
1224
|
}) {
|
|
1217
|
-
return jsx(Button$1, Object.assign({
|
|
1225
|
+
return jsxRuntime.jsx(Button$1, Object.assign({
|
|
1218
1226
|
"data-testid": dataTestId,
|
|
1219
1227
|
variant: variant,
|
|
1220
1228
|
size: size,
|
|
@@ -1223,27 +1231,27 @@ function Button({
|
|
|
1223
1231
|
disabled: disabled,
|
|
1224
1232
|
onClick: () => !disabled && onClick()
|
|
1225
1233
|
}, {
|
|
1226
|
-
children: jsxs(Container, Object.assign({
|
|
1234
|
+
children: jsxRuntime.jsxs(Container, Object.assign({
|
|
1227
1235
|
size: size
|
|
1228
1236
|
}, {
|
|
1229
|
-
children: [iconLeft && jsx("div", Object.assign({
|
|
1237
|
+
children: [iconLeft && jsxRuntime.jsx("div", Object.assign({
|
|
1230
1238
|
className: "left-img-btn",
|
|
1231
1239
|
"data-testid": `left-img-btn-${iconLeft}`
|
|
1232
1240
|
}, {
|
|
1233
|
-
children: jsx(Icon, {
|
|
1241
|
+
children: jsxRuntime.jsx(atomsIcon.Icon, {
|
|
1234
1242
|
dataTestId: `buttonIcon-${iconLeft}`,
|
|
1235
1243
|
icon: iconLeft
|
|
1236
1244
|
})
|
|
1237
|
-
})), title && jsx(ButtonTitle, Object.assign({
|
|
1245
|
+
})), title && jsxRuntime.jsx(ButtonTitle, Object.assign({
|
|
1238
1246
|
size: size,
|
|
1239
1247
|
sizeVariant: SizeVariant[variant]
|
|
1240
1248
|
}, {
|
|
1241
1249
|
children: title
|
|
1242
|
-
})), iconRight && jsx("div", Object.assign({
|
|
1250
|
+
})), iconRight && jsxRuntime.jsx("div", Object.assign({
|
|
1243
1251
|
className: "right-img-btn",
|
|
1244
1252
|
"data-testid": `left-img-btn-${iconRight}`
|
|
1245
1253
|
}, {
|
|
1246
|
-
children: jsx(Icon, {
|
|
1254
|
+
children: jsxRuntime.jsx(atomsIcon.Icon, {
|
|
1247
1255
|
dataTestId: `buttonIcon-${iconRight}`,
|
|
1248
1256
|
icon: iconRight
|
|
1249
1257
|
})
|
|
@@ -1252,4 +1260,4 @@ function Button({
|
|
|
1252
1260
|
}));
|
|
1253
1261
|
}
|
|
1254
1262
|
|
|
1255
|
-
|
|
1263
|
+
exports.Button = Button;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/atoms-button",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"module": "./index.js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./src/index.d.ts",
|
|
8
8
|
"dependencies": {},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@bolttech/atoms-icon": "0.1.
|
|
11
|
-
"@edirect/frontend-foundations": "0.0.
|
|
10
|
+
"@bolttech/atoms-icon": "0.1.5",
|
|
11
|
+
"@edirect/frontend-foundations": "0.0.27",
|
|
12
12
|
"styled-components": "5.3.6"
|
|
13
13
|
}
|
|
14
14
|
}
|