@bolttech/atoms-button 0.2.3 → 0.2.4

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.
@@ -1,6 +1,14 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { Icon } from '@bolttech/atoms-icon';
3
- import styled from 'styled-components';
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);
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,21 +1100,10 @@ var SizeVariant;
1092
1100
  SizeVariant["ghost"] = "ghost";
1093
1101
  })(SizeVariant || (SizeVariant = {}));
1094
1102
 
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
- `), ({
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:", ";}"], ({
1110
1107
  theme,
1111
1108
  size
1112
1109
  }) => theme.components.button[size].generic.gap, ({
@@ -1116,40 +1113,10 @@ const Container = styled.div(_t || (_t = _`
1116
1113
  theme,
1117
1114
  size
1118
1115
  }) => theme.components.button[size].icon.size);
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
- `), ({
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:", ";}"], ({
1153
1120
  theme,
1154
1121
  variant
1155
1122
  }) => theme.components.button[variant].container.color.default, ({
@@ -1212,15 +1179,10 @@ const Button$1 = styled.button(_t2 || (_t2 = _`
1212
1179
  theme,
1213
1180
  variant
1214
1181
  }) => theme.components.button[variant].icon.color.hover);
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
- `), ({
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:", ";"], ({
1224
1186
  theme,
1225
1187
  size,
1226
1188
  sizeVariant
@@ -1260,7 +1222,7 @@ function Button({
1260
1222
  iconLeft,
1261
1223
  onClick
1262
1224
  }) {
1263
- return jsx(Button$1, Object.assign({
1225
+ return jsxRuntime.jsx(Button$1, Object.assign({
1264
1226
  "data-testid": dataTestId,
1265
1227
  variant: variant,
1266
1228
  size: size,
@@ -1269,27 +1231,27 @@ function Button({
1269
1231
  disabled: disabled,
1270
1232
  onClick: () => !disabled && onClick()
1271
1233
  }, {
1272
- children: jsxs(Container, Object.assign({
1234
+ children: jsxRuntime.jsxs(Container, Object.assign({
1273
1235
  size: size
1274
1236
  }, {
1275
- children: [iconLeft && jsx("div", Object.assign({
1237
+ children: [iconLeft && jsxRuntime.jsx("div", Object.assign({
1276
1238
  className: "left-img-btn",
1277
1239
  "data-testid": `left-img-btn-${iconLeft}`
1278
1240
  }, {
1279
- children: jsx(Icon, {
1241
+ children: jsxRuntime.jsx(atomsIcon.Icon, {
1280
1242
  dataTestId: `buttonIcon-${iconLeft}`,
1281
1243
  icon: iconLeft
1282
1244
  })
1283
- })), title && jsx(ButtonTitle, Object.assign({
1245
+ })), title && jsxRuntime.jsx(ButtonTitle, Object.assign({
1284
1246
  size: size,
1285
1247
  sizeVariant: SizeVariant[variant]
1286
1248
  }, {
1287
1249
  children: title
1288
- })), iconRight && jsx("div", Object.assign({
1250
+ })), iconRight && jsxRuntime.jsx("div", Object.assign({
1289
1251
  className: "right-img-btn",
1290
1252
  "data-testid": `left-img-btn-${iconRight}`
1291
1253
  }, {
1292
- children: jsx(Icon, {
1254
+ children: jsxRuntime.jsx(atomsIcon.Icon, {
1293
1255
  dataTestId: `buttonIcon-${iconRight}`,
1294
1256
  icon: iconRight
1295
1257
  })
@@ -1298,4 +1260,4 @@ function Button({
1298
1260
  }));
1299
1261
  }
1300
1262
 
1301
- export { Button };
1263
+ exports.Button = Button;
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@bolttech/atoms-button",
3
- "version": "0.2.3",
4
- "module": "./index.js",
5
- "main": "./index.js",
6
- "type": "module",
3
+ "version": "0.2.4",
4
+ "main": "./index.cjs",
5
+ "type": "commonjs",
7
6
  "types": "./src/index.d.ts",
8
7
  "dependencies": {},
9
8
  "peerDependencies": {
10
- "@bolttech/atoms-icon": "0.1.5",
9
+ "@bolttech/atoms-icon": "0.1.6",
11
10
  "@edirect/frontend-foundations": "0.0.27",
12
11
  "styled-components": "5.3.6"
13
12
  }