@bolttech/atoms-checkbox 0.1.3 → 0.1.5
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.js → index.cjs} +22 -14
- package/package.json +4 -5
package/{index.js → index.cjs}
RENAMED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
3
11
|
|
|
4
12
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
5
13
|
|
|
@@ -1082,11 +1090,11 @@ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign },
|
|
|
1082
1090
|
assign: assign
|
|
1083
1091
|
});
|
|
1084
1092
|
|
|
1085
|
-
const CheckboxContainer = /*#__PURE__*/
|
|
1093
|
+
const CheckboxContainer = /*#__PURE__*/styled__default["default"].section.withConfig({
|
|
1086
1094
|
displayName: "atoms-checkboxstyles__CheckboxContainer",
|
|
1087
1095
|
componentId: "sc-1gq944z-0"
|
|
1088
1096
|
})(["display:flex;flex-direction:row;"]);
|
|
1089
|
-
const Input = /*#__PURE__*/
|
|
1097
|
+
const Input = /*#__PURE__*/styled__default["default"].input.attrs({
|
|
1090
1098
|
type: 'checkbox'
|
|
1091
1099
|
}).withConfig({
|
|
1092
1100
|
displayName: "atoms-checkboxstyles__Input",
|
|
@@ -1117,7 +1125,7 @@ const Input = /*#__PURE__*/styled.input.attrs({
|
|
|
1117
1125
|
}) => theme.components.checkbox.innerSquare.color.disableSelected, ({
|
|
1118
1126
|
theme
|
|
1119
1127
|
}) => theme.components.checkbox.checkmark.color.selectedDisable);
|
|
1120
|
-
const Label = /*#__PURE__*/
|
|
1128
|
+
const Label = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
1121
1129
|
displayName: "atoms-checkboxstyles__Label",
|
|
1122
1130
|
componentId: "sc-1gq944z-2"
|
|
1123
1131
|
})(["color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";padding-left:", ";"], ({
|
|
@@ -1136,11 +1144,11 @@ const Label = /*#__PURE__*/styled.label.withConfig({
|
|
|
1136
1144
|
}) => theme.components.checkbox.fieldLabel.letterSpacing, ({
|
|
1137
1145
|
theme
|
|
1138
1146
|
}) => theme.components.checkbox.gap);
|
|
1139
|
-
const CheckboxContainerError = /*#__PURE__*/
|
|
1147
|
+
const CheckboxContainerError = /*#__PURE__*/styled__default["default"].section.withConfig({
|
|
1140
1148
|
displayName: "atoms-checkboxstyles__CheckboxContainerError",
|
|
1141
1149
|
componentId: "sc-1gq944z-3"
|
|
1142
1150
|
})([""]);
|
|
1143
|
-
const LabelError = /*#__PURE__*/
|
|
1151
|
+
const LabelError = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
1144
1152
|
displayName: "atoms-checkboxstyles__LabelError",
|
|
1145
1153
|
componentId: "sc-1gq944z-4"
|
|
1146
1154
|
})(["color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";"], ({
|
|
@@ -1166,9 +1174,9 @@ function Checkbox({
|
|
|
1166
1174
|
checked,
|
|
1167
1175
|
onChange
|
|
1168
1176
|
}) {
|
|
1169
|
-
return jsxs(Fragment, {
|
|
1170
|
-
children: [jsxs(CheckboxContainer, {
|
|
1171
|
-
children: [jsx(Input, {
|
|
1177
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1178
|
+
children: [jsxRuntime.jsxs(CheckboxContainer, {
|
|
1179
|
+
children: [jsxRuntime.jsx(Input, {
|
|
1172
1180
|
id: id,
|
|
1173
1181
|
disabled: disabled,
|
|
1174
1182
|
error: errorMessage,
|
|
@@ -1177,18 +1185,18 @@ function Checkbox({
|
|
|
1177
1185
|
type: "checkbox",
|
|
1178
1186
|
"data-testid": `${id}-test`,
|
|
1179
1187
|
onChange: onChange
|
|
1180
|
-
}), jsx(Label, Object.assign({
|
|
1188
|
+
}), jsxRuntime.jsx(Label, Object.assign({
|
|
1181
1189
|
htmlFor: id,
|
|
1182
1190
|
disabled: disabled
|
|
1183
1191
|
}, {
|
|
1184
1192
|
children: label
|
|
1185
1193
|
}))]
|
|
1186
|
-
}), errorMessage && jsx(CheckboxContainerError, {
|
|
1187
|
-
children: jsx(LabelError, {
|
|
1194
|
+
}), errorMessage && jsxRuntime.jsx(CheckboxContainerError, {
|
|
1195
|
+
children: jsxRuntime.jsx(LabelError, {
|
|
1188
1196
|
children: errorMessage
|
|
1189
1197
|
})
|
|
1190
1198
|
})]
|
|
1191
1199
|
});
|
|
1192
1200
|
}
|
|
1193
1201
|
|
|
1194
|
-
|
|
1202
|
+
exports.Checkbox = Checkbox;
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/atoms-checkbox",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"type": "module",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"main": "./index.cjs",
|
|
5
|
+
"type": "commonjs",
|
|
7
6
|
"types": "./src/index.d.ts",
|
|
8
7
|
"dependencies": {},
|
|
9
8
|
"peerDependencies": {
|
|
10
|
-
"@edirect/frontend-foundations": "0.0.
|
|
9
|
+
"@edirect/frontend-foundations": "0.0.27",
|
|
11
10
|
"react": "18.2.0",
|
|
12
11
|
"styled-components": "5.3.6"
|
|
13
12
|
}
|