@chekinapp/ui 0.0.69 → 0.0.71
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/dist/index.cjs +3 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9400,24 +9400,11 @@ import {
|
|
|
9400
9400
|
} from "react";
|
|
9401
9401
|
import { jsx as jsx125, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
9402
9402
|
var getValueArray = (value) => {
|
|
9403
|
-
if (value
|
|
9403
|
+
if (value) {
|
|
9404
9404
|
return Array.isArray(value) ? value : [value];
|
|
9405
9405
|
}
|
|
9406
9406
|
return [];
|
|
9407
9407
|
};
|
|
9408
|
-
var convertStringToValue = (stringValue, option) => {
|
|
9409
|
-
debugger;
|
|
9410
|
-
if (option) {
|
|
9411
|
-
return option.value;
|
|
9412
|
-
}
|
|
9413
|
-
if (stringValue === "true") return true;
|
|
9414
|
-
if (stringValue === "false") return false;
|
|
9415
|
-
const numValue = Number(stringValue);
|
|
9416
|
-
if (!isNaN(numValue) && stringValue !== "") {
|
|
9417
|
-
return numValue;
|
|
9418
|
-
}
|
|
9419
|
-
return stringValue;
|
|
9420
|
-
};
|
|
9421
9408
|
function getToggleContent(label, disabled, readOnly, active) {
|
|
9422
9409
|
if (isValidElement2(label)) {
|
|
9423
9410
|
return cloneElement2(label, {
|
|
@@ -9454,9 +9441,8 @@ function TogglesInternal({
|
|
|
9454
9441
|
const newValueArray = Array.isArray(newValue) ? newValue : [newValue];
|
|
9455
9442
|
const typedValues = newValueArray.map((item) => {
|
|
9456
9443
|
const option2 = options.find((opt) => String(opt.value) === item);
|
|
9457
|
-
return
|
|
9444
|
+
return option2 ? option2.value : item;
|
|
9458
9445
|
});
|
|
9459
|
-
debugger;
|
|
9460
9446
|
onChange?.(
|
|
9461
9447
|
typedValues,
|
|
9462
9448
|
{}
|
|
@@ -9465,7 +9451,7 @@ function TogglesInternal({
|
|
|
9465
9451
|
}
|
|
9466
9452
|
const singleValue = Array.isArray(newValue) ? newValue[0] : newValue;
|
|
9467
9453
|
const option = options.find((opt) => String(opt.value) === singleValue);
|
|
9468
|
-
const typedValue =
|
|
9454
|
+
const typedValue = option ? option.value : singleValue;
|
|
9469
9455
|
onChange?.(
|
|
9470
9456
|
typedValue,
|
|
9471
9457
|
{}
|