@bolttech/atoms-checkbox 0.21.0 → 0.21.1
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 → index.cjs.js} +46 -63
- package/index.d.ts +1 -0
- package/package.json +8 -11
- package/src/lib/atoms-checkbox.styles.d.ts +334 -307
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
5
|
var react = require('react');
|
|
8
6
|
var styled = require('styled-components');
|
|
9
|
-
var frontendFoundations = require('@bolttech/frontend-foundations');
|
|
10
7
|
var uiUtils = require('@bolttech/ui-utils');
|
|
11
|
-
|
|
12
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
-
|
|
14
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
8
|
+
var frontendFoundations = require('@bolttech/frontend-foundations');
|
|
15
9
|
|
|
16
10
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17
11
|
|
|
@@ -61,7 +55,7 @@ var functionBindNative = !fails$7(function () {
|
|
|
61
55
|
var NATIVE_BIND$1 = functionBindNative;
|
|
62
56
|
|
|
63
57
|
var call$5 = Function.prototype.call;
|
|
64
|
-
|
|
58
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
65
59
|
var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
|
|
66
60
|
return call$5.apply(call$5, arguments);
|
|
67
61
|
};
|
|
@@ -95,6 +89,7 @@ var NATIVE_BIND = functionBindNative;
|
|
|
95
89
|
|
|
96
90
|
var FunctionPrototype$1 = Function.prototype;
|
|
97
91
|
var call$4 = FunctionPrototype$1.call;
|
|
92
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
98
93
|
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
|
|
99
94
|
|
|
100
95
|
var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
@@ -167,7 +162,7 @@ var isCallable$a = typeof documentAll == 'undefined' && documentAll !== undefine
|
|
|
167
162
|
|
|
168
163
|
var isCallable$9 = isCallable$a;
|
|
169
164
|
|
|
170
|
-
var isObject$
|
|
165
|
+
var isObject$4 = function (it) {
|
|
171
166
|
return typeof it == 'object' ? it !== null : isCallable$9(it);
|
|
172
167
|
};
|
|
173
168
|
|
|
@@ -294,7 +289,7 @@ var getMethod$1 = function (V, P) {
|
|
|
294
289
|
|
|
295
290
|
var call$3 = functionCall;
|
|
296
291
|
var isCallable$5 = isCallable$a;
|
|
297
|
-
var isObject$
|
|
292
|
+
var isObject$3 = isObject$4;
|
|
298
293
|
|
|
299
294
|
var $TypeError$3 = TypeError;
|
|
300
295
|
|
|
@@ -302,9 +297,9 @@ var $TypeError$3 = TypeError;
|
|
|
302
297
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
303
298
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
304
299
|
var fn, val;
|
|
305
|
-
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$
|
|
306
|
-
if (isCallable$5(fn = input.valueOf) && !isObject$
|
|
307
|
-
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$
|
|
300
|
+
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
|
|
301
|
+
if (isCallable$5(fn = input.valueOf) && !isObject$3(val = call$3(fn, input))) return val;
|
|
302
|
+
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
|
|
308
303
|
throw new $TypeError$3("Can't convert object to primitive value");
|
|
309
304
|
};
|
|
310
305
|
|
|
@@ -330,14 +325,16 @@ var SHARED = '__core-js_shared__';
|
|
|
330
325
|
var store$3 = sharedStore.exports = globalThis$6[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
331
326
|
|
|
332
327
|
(store$3.versions || (store$3.versions = [])).push({
|
|
333
|
-
version: '3.
|
|
328
|
+
version: '3.44.0',
|
|
334
329
|
mode: 'global',
|
|
335
|
-
copyright: '© 2014-
|
|
336
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
330
|
+
copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',
|
|
331
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE',
|
|
337
332
|
source: 'https://github.com/zloirock/core-js'
|
|
338
333
|
});
|
|
339
334
|
|
|
340
|
-
var
|
|
335
|
+
var sharedStoreExports = sharedStore.exports;
|
|
336
|
+
|
|
337
|
+
var store$2 = sharedStoreExports;
|
|
341
338
|
|
|
342
339
|
var shared$3 = function (key, value) {
|
|
343
340
|
return store$2[key] || (store$2[key] = value || {});
|
|
@@ -369,7 +366,7 @@ var uncurryThis$5 = functionUncurryThis;
|
|
|
369
366
|
|
|
370
367
|
var id = 0;
|
|
371
368
|
var postfix = Math.random();
|
|
372
|
-
var toString = uncurryThis$5(1.
|
|
369
|
+
var toString = uncurryThis$5(1.1.toString);
|
|
373
370
|
|
|
374
371
|
var uid$2 = function (key) {
|
|
375
372
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
@@ -395,7 +392,7 @@ var wellKnownSymbol$1 = function (name) {
|
|
|
395
392
|
};
|
|
396
393
|
|
|
397
394
|
var call$2 = functionCall;
|
|
398
|
-
var isObject$
|
|
395
|
+
var isObject$2 = isObject$4;
|
|
399
396
|
var isSymbol$1 = isSymbol$2;
|
|
400
397
|
var getMethod = getMethod$1;
|
|
401
398
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
@@ -407,13 +404,13 @@ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
|
407
404
|
// `ToPrimitive` abstract operation
|
|
408
405
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
409
406
|
var toPrimitive$1 = function (input, pref) {
|
|
410
|
-
if (!isObject$
|
|
407
|
+
if (!isObject$2(input) || isSymbol$1(input)) return input;
|
|
411
408
|
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
412
409
|
var result;
|
|
413
410
|
if (exoticToPrim) {
|
|
414
411
|
if (pref === undefined) pref = 'default';
|
|
415
412
|
result = call$2(exoticToPrim, input, pref);
|
|
416
|
-
if (!isObject$
|
|
413
|
+
if (!isObject$2(result) || isSymbol$1(result)) return result;
|
|
417
414
|
throw new $TypeError$2("Can't convert object to primitive value");
|
|
418
415
|
}
|
|
419
416
|
if (pref === undefined) pref = 'number';
|
|
@@ -431,11 +428,11 @@ var toPropertyKey$2 = function (argument) {
|
|
|
431
428
|
};
|
|
432
429
|
|
|
433
430
|
var globalThis$4 = globalThis_1;
|
|
434
|
-
var isObject$
|
|
431
|
+
var isObject$1 = isObject$4;
|
|
435
432
|
|
|
436
433
|
var document$1 = globalThis$4.document;
|
|
437
434
|
// typeof document.createElement is 'object' in old IE
|
|
438
|
-
var EXISTS$1 = isObject$
|
|
435
|
+
var EXISTS$1 = isObject$1(document$1) && isObject$1(document$1.createElement);
|
|
439
436
|
|
|
440
437
|
var documentCreateElement = function (it) {
|
|
441
438
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
@@ -491,14 +488,14 @@ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
|
|
|
491
488
|
}).prototype !== 42;
|
|
492
489
|
});
|
|
493
490
|
|
|
494
|
-
var isObject
|
|
491
|
+
var isObject = isObject$4;
|
|
495
492
|
|
|
496
493
|
var $String$1 = String;
|
|
497
494
|
var $TypeError$1 = TypeError;
|
|
498
495
|
|
|
499
496
|
// `Assert: Type(argument) is Object`
|
|
500
497
|
var anObject$2 = function (argument) {
|
|
501
|
-
if (isObject
|
|
498
|
+
if (isObject(argument)) return argument;
|
|
502
499
|
throw new $TypeError$1($String$1(argument) + ' is not an object');
|
|
503
500
|
};
|
|
504
501
|
|
|
@@ -567,19 +564,15 @@ var FunctionPrototype = Function.prototype;
|
|
|
567
564
|
var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
|
|
568
565
|
|
|
569
566
|
var EXISTS = hasOwn$4(FunctionPrototype, 'name');
|
|
570
|
-
// additional protection from minified / mangled / dropped function names
|
|
571
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
572
567
|
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
573
568
|
|
|
574
569
|
var functionName = {
|
|
575
|
-
EXISTS: EXISTS,
|
|
576
|
-
PROPER: PROPER,
|
|
577
570
|
CONFIGURABLE: CONFIGURABLE
|
|
578
571
|
};
|
|
579
572
|
|
|
580
573
|
var uncurryThis$4 = functionUncurryThis;
|
|
581
574
|
var isCallable$4 = isCallable$a;
|
|
582
|
-
var store$1 =
|
|
575
|
+
var store$1 = sharedStoreExports;
|
|
583
576
|
|
|
584
577
|
var functionToString = uncurryThis$4(Function.toString);
|
|
585
578
|
|
|
@@ -612,10 +605,9 @@ var hiddenKeys$3 = {};
|
|
|
612
605
|
|
|
613
606
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
614
607
|
var globalThis$2 = globalThis_1;
|
|
615
|
-
var isObject = isObject$5;
|
|
616
608
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
|
|
617
609
|
var hasOwn$3 = hasOwnProperty_1;
|
|
618
|
-
var shared =
|
|
610
|
+
var shared = sharedStoreExports;
|
|
619
611
|
var sharedKey = sharedKey$1;
|
|
620
612
|
var hiddenKeys$2 = hiddenKeys$3;
|
|
621
613
|
|
|
@@ -628,15 +620,6 @@ var enforce = function (it) {
|
|
|
628
620
|
return has(it) ? get(it) : set(it, {});
|
|
629
621
|
};
|
|
630
622
|
|
|
631
|
-
var getterFor = function (TYPE) {
|
|
632
|
-
return function (it) {
|
|
633
|
-
var state;
|
|
634
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
635
|
-
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
636
|
-
} return state;
|
|
637
|
-
};
|
|
638
|
-
};
|
|
639
|
-
|
|
640
623
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
641
624
|
var store = shared.state || (shared.state = new WeakMap());
|
|
642
625
|
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
@@ -674,12 +657,8 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
674
657
|
}
|
|
675
658
|
|
|
676
659
|
var internalState = {
|
|
677
|
-
set: set,
|
|
678
660
|
get: get,
|
|
679
|
-
|
|
680
|
-
enforce: enforce,
|
|
681
|
-
getterFor: getterFor
|
|
682
|
-
};
|
|
661
|
+
enforce: enforce};
|
|
683
662
|
|
|
684
663
|
var uncurryThis$3 = functionUncurryThis;
|
|
685
664
|
var fails$2 = fails$9;
|
|
@@ -736,9 +715,11 @@ Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
|
736
715
|
return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
|
|
737
716
|
}, 'toString');
|
|
738
717
|
|
|
718
|
+
var makeBuiltInExports = makeBuiltIn$2.exports;
|
|
719
|
+
|
|
739
720
|
var isCallable$1 = isCallable$a;
|
|
740
721
|
var definePropertyModule$1 = objectDefineProperty;
|
|
741
|
-
var makeBuiltIn =
|
|
722
|
+
var makeBuiltIn = makeBuiltInExports;
|
|
742
723
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
743
724
|
|
|
744
725
|
var defineBuiltIn$1 = function (O, key, value, options) {
|
|
@@ -845,9 +826,6 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
845
826
|
};
|
|
846
827
|
|
|
847
828
|
var arrayIncludes = {
|
|
848
|
-
// `Array.prototype.includes` method
|
|
849
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
850
|
-
includes: createMethod(true),
|
|
851
829
|
// `Array.prototype.indexOf` method
|
|
852
830
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
853
831
|
indexOf: createMethod(false)
|
|
@@ -1058,6 +1036,7 @@ var objectAssign = !$assign || fails(function () {
|
|
|
1058
1036
|
var symbol = Symbol('assign detection');
|
|
1059
1037
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
1060
1038
|
A[symbol] = 7;
|
|
1039
|
+
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
1061
1040
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1062
1041
|
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1063
1042
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
@@ -1103,6 +1082,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
1103
1082
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1104
1083
|
PERFORMANCE OF THIS SOFTWARE.
|
|
1105
1084
|
***************************************************************************** */
|
|
1085
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1086
|
+
|
|
1106
1087
|
|
|
1107
1088
|
function __rest(s, e) {
|
|
1108
1089
|
var t = {};
|
|
@@ -1121,19 +1102,19 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
1121
1102
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1122
1103
|
};
|
|
1123
1104
|
|
|
1124
|
-
const CheckboxContainer = /*#__PURE__*/
|
|
1105
|
+
const CheckboxContainer = /*#__PURE__*/styled.section.withConfig({
|
|
1125
1106
|
displayName: "atoms-checkboxstyles__CheckboxContainer",
|
|
1126
1107
|
componentId: "sc-1gq944z-0"
|
|
1127
1108
|
})(["display:flex;flex-direction:row;gap:", ";"], ({
|
|
1128
1109
|
theme
|
|
1129
1110
|
}) => theme.components.checkbox.gap);
|
|
1130
|
-
const InputContainer = /*#__PURE__*/
|
|
1111
|
+
const InputContainer = /*#__PURE__*/styled.div.withConfig({
|
|
1131
1112
|
displayName: "atoms-checkboxstyles__InputContainer",
|
|
1132
1113
|
componentId: "sc-1gq944z-1"
|
|
1133
1114
|
})(["display:flex;justify-items:center;height:", ";align-items:center;"], ({
|
|
1134
1115
|
theme
|
|
1135
1116
|
}) => theme.components.checkbox.fieldLabel.lineHeight);
|
|
1136
|
-
const Input = /*#__PURE__*/
|
|
1117
|
+
const Input = /*#__PURE__*/styled.input.attrs({
|
|
1137
1118
|
type: 'checkbox'
|
|
1138
1119
|
}).withConfig({
|
|
1139
1120
|
displayName: "atoms-checkboxstyles__Input",
|
|
@@ -1172,13 +1153,13 @@ const Input = /*#__PURE__*/styled__default["default"].input.attrs({
|
|
|
1172
1153
|
}) => theme.components.checkbox.innerSquare.color.disable, ({
|
|
1173
1154
|
theme
|
|
1174
1155
|
}) => theme.components.checkbox.checkmark.color.disable);
|
|
1175
|
-
const Label = /*#__PURE__*/
|
|
1156
|
+
const Label = /*#__PURE__*/styled.div.withConfig({
|
|
1176
1157
|
displayName: "atoms-checkboxstyles__Label",
|
|
1177
1158
|
componentId: "sc-1gq944z-3"
|
|
1178
|
-
})(["cursor:pointer;color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";"], ({
|
|
1159
|
+
})(["display:flex;align-items:flex-start;& > label{cursor:pointer;color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}"], ({
|
|
1179
1160
|
theme,
|
|
1180
|
-
disabled
|
|
1181
|
-
}) => disabled ? theme.components.checkbox.text.color.textLabel.disable : theme.components.checkbox.text.color.textLabel.default, ({
|
|
1161
|
+
$disabled
|
|
1162
|
+
}) => $disabled ? theme.components.checkbox.text.color.textLabel.disable : theme.components.checkbox.text.color.textLabel.default, ({
|
|
1182
1163
|
theme
|
|
1183
1164
|
}) => theme.components.checkbox.fieldLabel.fontWeight, ({
|
|
1184
1165
|
theme
|
|
@@ -1187,7 +1168,7 @@ const Label = /*#__PURE__*/styled__default["default"](frontendFoundations.Typogr
|
|
|
1187
1168
|
}) => theme.components.checkbox.fieldLabel.fontSize, ({
|
|
1188
1169
|
theme
|
|
1189
1170
|
}) => theme.components.checkbox.fieldLabel.letterSpacing);
|
|
1190
|
-
const LabelError = /*#__PURE__*/
|
|
1171
|
+
const LabelError = /*#__PURE__*/styled.label.withConfig({
|
|
1191
1172
|
displayName: "atoms-checkboxstyles__LabelError",
|
|
1192
1173
|
componentId: "sc-1gq944z-4"
|
|
1193
1174
|
})(["color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";"], ({
|
|
@@ -1231,12 +1212,14 @@ const Checkbox = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
1231
1212
|
onFocus: onFocus
|
|
1232
1213
|
}, uiUtils.applyDataAttributes(props, 'input')))
|
|
1233
1214
|
}), jsxRuntime.jsx(Label, Object.assign({
|
|
1234
|
-
disabled: disabled
|
|
1235
|
-
variant: "primary",
|
|
1236
|
-
type: "label",
|
|
1237
|
-
htmlFor: id
|
|
1215
|
+
"$disabled": disabled
|
|
1238
1216
|
}, uiUtils.applyDataAttributes(props, 'label'), {
|
|
1239
|
-
children:
|
|
1217
|
+
children: jsxRuntime.jsx(frontendFoundations.Typography, {
|
|
1218
|
+
variant: "primary",
|
|
1219
|
+
type: "label",
|
|
1220
|
+
htmlFor: id,
|
|
1221
|
+
children: label
|
|
1222
|
+
})
|
|
1240
1223
|
}))]
|
|
1241
1224
|
})), errorMessage && jsxRuntime.jsx("section", {
|
|
1242
1225
|
children: jsxRuntime.jsx(LabelError, Object.assign({
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/atoms-checkbox",
|
|
3
|
-
"version": "0.21.
|
|
4
|
-
"main": "./index.cjs",
|
|
5
|
-
"type": "commonjs",
|
|
6
|
-
"types": "./src/index.d.ts",
|
|
3
|
+
"version": "0.21.1",
|
|
7
4
|
"dependencies": {
|
|
8
|
-
"
|
|
9
|
-
"@bolttech/form-engine": "3.1.0-beta.19",
|
|
5
|
+
"styled-components": "6.1.1",
|
|
10
6
|
"@bolttech/frontend-foundations": "0.10.0",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"styled-components": "6.1.1"
|
|
7
|
+
"react": "19.1.1",
|
|
8
|
+
"@bolttech/ui-utils": "0.5.0"
|
|
14
9
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
10
|
+
"main": "./index.cjs.js",
|
|
11
|
+
"type": "commonjs",
|
|
12
|
+
"types": "./index.d.ts"
|
|
13
|
+
}
|