@bolttech/atoms-button 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/index.js +69 -31
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,14 +1,6 @@
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);
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Icon } from '@bolttech/atoms-icon';
3
+ import styled from 'styled-components';
12
4
 
13
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
14
6
 
@@ -1100,10 +1092,21 @@ var SizeVariant;
1100
1092
  SizeVariant["ghost"] = "ghost";
1101
1093
  })(SizeVariant || (SizeVariant = {}));
1102
1094
 
1103
- const Container = /*#__PURE__*/styled__default["default"].div.withConfig({
1104
- displayName: "atoms-buttonstyles__Container",
1105
- componentId: "i4bzba-0"
1106
- })(["display:flex;align-items:center;gap:", ";.left-img-btn,.right-img-btn,svg{width:", ";height:", ";}"], ({
1095
+ let _ = t => t,
1096
+ _t,
1097
+ _t2,
1098
+ _t3;
1099
+ const Container = styled.div(_t || (_t = _`
1100
+ display: flex;
1101
+ align-items: center;
1102
+ gap: ${0};
1103
+ .left-img-btn,
1104
+ .right-img-btn,
1105
+ svg {
1106
+ width: ${0};
1107
+ height: ${0};
1108
+ }
1109
+ `), ({
1107
1110
  theme,
1108
1111
  size
1109
1112
  }) => theme.components.button[size].generic.gap, ({
@@ -1113,10 +1116,40 @@ const Container = /*#__PURE__*/styled__default["default"].div.withConfig({
1113
1116
  theme,
1114
1117
  size
1115
1118
  }) => theme.components.button[size].icon.size);
1116
- const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
1117
- displayName: "atoms-buttonstyles__Button",
1118
- componentId: "i4bzba-1"
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:", ";}"], ({
1119
+ const Button$1 = styled.button(_t2 || (_t2 = _`
1120
+ background-color: ${0};
1121
+ border-radius: ${0};
1122
+ border: 1px solid
1123
+ ${0};
1124
+ box-shadow: ${0};
1125
+ color: ${0};
1126
+ fill: ${0};
1127
+ padding: ${0};
1128
+
1129
+ :active:enabled {
1130
+ background-color: ${0};
1131
+ border: 1px solid
1132
+ ${0};
1133
+ color: ${0};
1134
+ fill: ${0};
1135
+ }
1136
+
1137
+ :disabled {
1138
+ background-color: ${0};
1139
+ border: 1px solid
1140
+ ${0};
1141
+ color: ${0};
1142
+ fill: ${0};
1143
+ }
1144
+
1145
+ :hover:enabled {
1146
+ background-color: ${0};
1147
+ border: 1px solid
1148
+ ${0};
1149
+ color: ${0};
1150
+ fill: ${0};
1151
+ }
1152
+ `), ({
1120
1153
  theme,
1121
1154
  variant
1122
1155
  }) => theme.components.button[variant].container.color.default, ({
@@ -1179,10 +1212,15 @@ const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
1179
1212
  theme,
1180
1213
  variant
1181
1214
  }) => theme.components.button[variant].icon.color.hover);
1182
- const ButtonTitle = /*#__PURE__*/styled__default["default"].label.withConfig({
1183
- displayName: "atoms-buttonstyles__ButtonTitle",
1184
- componentId: "i4bzba-2"
1185
- })(["font-size:", ";font-weight:", ";letter-spacing:", ";line-height:", ";text-decoration:", ";text-indent:", ";text-transform:", ";"], ({
1215
+ const ButtonTitle = styled.label(_t3 || (_t3 = _`
1216
+ font-size: ${0};
1217
+ font-weight: ${0};
1218
+ letter-spacing: ${0};
1219
+ line-height: ${0};
1220
+ text-decoration: ${0};
1221
+ text-indent: ${0};
1222
+ text-transform: ${0};
1223
+ `), ({
1186
1224
  theme,
1187
1225
  size,
1188
1226
  sizeVariant
@@ -1222,7 +1260,7 @@ function Button({
1222
1260
  iconLeft,
1223
1261
  onClick
1224
1262
  }) {
1225
- return jsxRuntime.jsx(Button$1, Object.assign({
1263
+ return jsx(Button$1, Object.assign({
1226
1264
  "data-testid": dataTestId,
1227
1265
  variant: variant,
1228
1266
  size: size,
@@ -1231,27 +1269,27 @@ function Button({
1231
1269
  disabled: disabled,
1232
1270
  onClick: () => !disabled && onClick()
1233
1271
  }, {
1234
- children: jsxRuntime.jsxs(Container, Object.assign({
1272
+ children: jsxs(Container, Object.assign({
1235
1273
  size: size
1236
1274
  }, {
1237
- children: [iconLeft && jsxRuntime.jsx("div", Object.assign({
1275
+ children: [iconLeft && jsx("div", Object.assign({
1238
1276
  className: "left-img-btn",
1239
1277
  "data-testid": `left-img-btn-${iconLeft}`
1240
1278
  }, {
1241
- children: jsxRuntime.jsx(atomsIcon.Icon, {
1279
+ children: jsx(Icon, {
1242
1280
  dataTestId: `buttonIcon-${iconLeft}`,
1243
1281
  icon: iconLeft
1244
1282
  })
1245
- })), title && jsxRuntime.jsx(ButtonTitle, Object.assign({
1283
+ })), title && jsx(ButtonTitle, Object.assign({
1246
1284
  size: size,
1247
1285
  sizeVariant: SizeVariant[variant]
1248
1286
  }, {
1249
1287
  children: title
1250
- })), iconRight && jsxRuntime.jsx("div", Object.assign({
1288
+ })), iconRight && jsx("div", Object.assign({
1251
1289
  className: "right-img-btn",
1252
1290
  "data-testid": `left-img-btn-${iconRight}`
1253
1291
  }, {
1254
- children: jsxRuntime.jsx(atomsIcon.Icon, {
1292
+ children: jsx(Icon, {
1255
1293
  dataTestId: `buttonIcon-${iconRight}`,
1256
1294
  icon: iconRight
1257
1295
  })
@@ -1260,4 +1298,4 @@ function Button({
1260
1298
  }));
1261
1299
  }
1262
1300
 
1263
- exports.Button = Button;
1301
+ export { Button };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bolttech/atoms-button",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "module": "./index.js",
5
5
  "main": "./index.js",
6
6
  "type": "module",