@agility/plenum-ui 1.3.9 → 1.3.12
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/lib/components/Forms/Radio/Radio.d.ts +2 -2
- package/lib/components/Forms/Select/Select.d.ts +2 -2
- package/lib/components/Forms/TextInput/TextInput.d.ts +3 -2
- package/lib/components/Forms/TextInputAddon/TextInputAddon.d.ts +6 -6
- package/lib/components/Forms/TextInputSelect/TextInputSelect.d.ts +2 -2
- package/lib/components/Forms/Textarea/Textarea.d.ts +5 -3
- package/lib/index.esm.js +78 -30
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +78 -30
- package/lib/index.js.map +1 -1
- package/lib/util/useID.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -7350,7 +7350,7 @@ var Switch = function (_a) {
|
|
|
7350
7350
|
}, [enabled]);
|
|
7351
7351
|
var switchStyles = cn("relative inline-flex flex-shrink-0", "border-2 border-transparent rounded-full cursor-pointer", "transition-colors ease-in-out duration-200 focus:outline-none", "focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75", { "bg-purple-600": enabled }, { "bg-gray-200": !enabled }, { "h-[38px] w-[74px]": size === "lg" }, { "h-[28px] w-[64px]": size === "md" }, { "h-[18px] w-[34px]": size === "sm" });
|
|
7352
7352
|
// the circular button inside the switch
|
|
7353
|
-
var toggleStyles = cn("pointer-events-none inline-block rounded-full bg-white", "
|
|
7353
|
+
var toggleStyles = cn("pointer-events-none inline-block rounded-full bg-white", " transform ring-0 transition ease-in-out duration-200", { "translate-x-9": enabled }, { "translate-x-0": !enabled }, { "h-[34px] w-[34px]": size === "lg" }, { "h-[24px] w-[24px]": size === "md" }, { "h-[14px] w-[14px] translate-x-4": size === "sm" && enabled }, { "h-[14px] w-[14px] translate-x-0": size === "sm" && !enabled });
|
|
7354
7354
|
return (React__default["default"].createElement("div", { className: "text-center" },
|
|
7355
7355
|
React__default["default"].createElement(ue, { checked: enabled, onChange: setEnabled, className: switchStyles },
|
|
7356
7356
|
React__default["default"].createElement("span", { className: "sr-only" }, "Use setting"),
|
|
@@ -12448,15 +12448,26 @@ var BaseField = function (_a, ref) {
|
|
|
12448
12448
|
};
|
|
12449
12449
|
var _BaseField = React.forwardRef(BaseField);
|
|
12450
12450
|
|
|
12451
|
+
var id = 0;
|
|
12452
|
+
function generateId() {
|
|
12453
|
+
return ++id;
|
|
12454
|
+
}
|
|
12455
|
+
var useId = function () {
|
|
12456
|
+
var _a = React.useState(generateId), id = _a[0], setId = _a[1];
|
|
12457
|
+
React.useLayoutEffect(function () {
|
|
12458
|
+
if (id === null)
|
|
12459
|
+
setId(generateId());
|
|
12460
|
+
}, [id]);
|
|
12461
|
+
return id != null ? '' + id : undefined;
|
|
12462
|
+
};
|
|
12463
|
+
|
|
12451
12464
|
var TextInput = function (_a, ref) {
|
|
12452
|
-
var label = _a.label, isFocused = _a.isFocused, isError = _a.isError, id = _a.id, name = _a.name, isRequired = _a.isRequired, type = _a.type, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, onChange = _a.onChange, externalValue = _a.value;
|
|
12465
|
+
var label = _a.label, isFocused = _a.isFocused, isError = _a.isError, id = _a.id, name = _a.name, isRequired = _a.isRequired, type = _a.type, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, onChange = _a.onChange, externalValue = _a.value, className = _a.className;
|
|
12466
|
+
var uniqueID = useId();
|
|
12453
12467
|
var _c = React.useState(Boolean(isFocused)), isFocus = _c[0], setIsFocus = _c[1];
|
|
12454
12468
|
var _d = React.useState(false); _d[0]; var setIsActive = _d[1];
|
|
12455
|
-
var _e = React.useState(defaultValue || ""), value = _e[0], setValue = _e[1];
|
|
12469
|
+
var _e = React.useState(externalValue || defaultValue || ""), value = _e[0], setValue = _e[1];
|
|
12456
12470
|
var inputRef = React.useRef(null);
|
|
12457
|
-
React.useEffect(function () {
|
|
12458
|
-
setValue(externalValue);
|
|
12459
|
-
}, [externalValue]);
|
|
12460
12471
|
// set force focus
|
|
12461
12472
|
React.useEffect(function () {
|
|
12462
12473
|
var input = inputRef.current;
|
|
@@ -12486,16 +12497,22 @@ var TextInput = function (_a, ref) {
|
|
|
12486
12497
|
setIsFocus(false);
|
|
12487
12498
|
setIsActive(!(input && input.value === ""));
|
|
12488
12499
|
};
|
|
12489
|
-
var className = cn("border py-2 px-3 rounded text-sm leading-5 font-normal w-full", { "border-gray-300 shadow-sm": !isFocus && !isError }, {
|
|
12490
|
-
"focus:ring-purple-500 border-purple-500 outline-purple-500 shadow-none": isFocus && !isError
|
|
12491
|
-
}, { "focus:ring-red-500 !border-red-500 shadow-none": isError });
|
|
12492
12500
|
var discriptionStyles = cn("text-sm mt-1 block", { "text-gray-500": !isError }, { "text-red-500": isError });
|
|
12501
|
+
if (!id)
|
|
12502
|
+
id = "input-".concat(uniqueID);
|
|
12503
|
+
if (!name)
|
|
12504
|
+
name = id;
|
|
12505
|
+
console.log();
|
|
12493
12506
|
return (React__default["default"].createElement("div", null,
|
|
12494
12507
|
React__default["default"].createElement(InputLabel, { isPlaceholder: true, label: label, isRequired: isRequired, id: id, isError: isError, isActive: true, isDisabled: isDisabled }),
|
|
12495
12508
|
React__default["default"].createElement("div", null,
|
|
12496
|
-
React__default["default"].createElement(_BaseField, { onFocus: handleInputFocus, onBlur: handleInputBlur, onChange: onChange, onValueChange: setValue, ref: ref, type: type, name: name, id: id, className:
|
|
12509
|
+
React__default["default"].createElement(_BaseField, { onFocus: handleInputFocus, onBlur: handleInputBlur, onChange: onChange, onValueChange: setValue, ref: ref, type: type, name: name, id: id, className: cn("w-full rounded border py-2 px-3 text-sm font-normal leading-5", { "border-gray-300": !isFocus && !isError }, {
|
|
12510
|
+
"border-purple-500 shadow-none outline-purple-500 focus:ring-purple-500": isFocus && !isError
|
|
12511
|
+
}, {
|
|
12512
|
+
"!border-red-500 shadow-none focus:ring-red-500": isError
|
|
12513
|
+
}, className), isDisabled: isDisabled, value: value, defaultValue: defaultValue, maxLength: maxLength }),
|
|
12497
12514
|
React__default["default"].createElement("div", { className: "flex flex-row space-x-3" },
|
|
12498
|
-
React__default["default"].createElement("div", { className: "grow" }, message && React__default["default"].createElement("span", { className: discriptionStyles }, message)),
|
|
12515
|
+
React__default["default"].createElement("div", { className: "grow" }, message && (React__default["default"].createElement("span", { className: discriptionStyles }, message))),
|
|
12499
12516
|
isShowCounter && (React__default["default"].createElement("div", { className: "shrink-0" },
|
|
12500
12517
|
React__default["default"].createElement(InputCounter, { current: Number(value === null || value === void 0 ? void 0 : value.length), limit: maxLength })))))));
|
|
12501
12518
|
};
|
|
@@ -12530,17 +12547,25 @@ var InputCta = function (_a) {
|
|
|
12530
12547
|
};
|
|
12531
12548
|
|
|
12532
12549
|
var TextInputAddon = function (_a, ref) {
|
|
12533
|
-
var label = _a.label, isFocused = _a.isFocused, isError = _a.isError, id = _a.id, name = _a.name, isRequired = _a.isRequired, type = _a.type, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, placeholder = _a.placeholder, leadIcon = _a.leadIcon, trailIcon = _a.trailIcon, inlineIcon = _a.inlineIcon, trailLabel = _a.trailLabel, leadLabel = _a.leadLabel, _c = _a.clearCta, clearCta = _c === void 0 ?
|
|
12550
|
+
var label = _a.label, isFocused = _a.isFocused, isError = _a.isError, id = _a.id, name = _a.name, isRequired = _a.isRequired, type = _a.type, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, placeholder = _a.placeholder, leadIcon = _a.leadIcon, trailIcon = _a.trailIcon, inlineIcon = _a.inlineIcon, trailLabel = _a.trailLabel, leadLabel = _a.leadLabel, _c = _a.clearCta, clearCta = _c === void 0 ? "none" : _c, onChange = _a.onChange, onCtaClick = _a.onCtaClick, externalValue = _a.value;
|
|
12534
12551
|
var _d = React.useState(Boolean(isFocused)), isFocus = _d[0], setIsFocus = _d[1];
|
|
12535
|
-
var _e = React.useState(defaultValue ||
|
|
12552
|
+
var _e = React.useState(defaultValue || ""), value = _e[0], setValue = _e[1];
|
|
12536
12553
|
var inputRef = React.useRef(null);
|
|
12554
|
+
var uniqueID = useId();
|
|
12555
|
+
if (!id)
|
|
12556
|
+
id = "input-".concat(uniqueID);
|
|
12557
|
+
if (!name)
|
|
12558
|
+
name = id;
|
|
12537
12559
|
React.useEffect(function () {
|
|
12538
12560
|
setValue(externalValue);
|
|
12539
12561
|
}, [externalValue]);
|
|
12540
12562
|
// set force focus
|
|
12541
12563
|
React.useEffect(function () {
|
|
12542
12564
|
var input = inputRef.current;
|
|
12543
|
-
if (!input ||
|
|
12565
|
+
if (!input ||
|
|
12566
|
+
isFocus === undefined ||
|
|
12567
|
+
isFocused === undefined ||
|
|
12568
|
+
isDisabled)
|
|
12544
12569
|
return;
|
|
12545
12570
|
if (isFocus || isFocused) {
|
|
12546
12571
|
input.focus();
|
|
@@ -12552,7 +12577,7 @@ var TextInputAddon = function (_a, ref) {
|
|
|
12552
12577
|
// set label as active if default value is set
|
|
12553
12578
|
React.useEffect(function () {
|
|
12554
12579
|
var input = inputRef.current;
|
|
12555
|
-
if (!input || defaultValue === undefined || defaultValue ===
|
|
12580
|
+
if (!input || defaultValue === undefined || defaultValue === "")
|
|
12556
12581
|
return;
|
|
12557
12582
|
}, [defaultValue]);
|
|
12558
12583
|
var handleInputFocus = function () {
|
|
@@ -12563,19 +12588,25 @@ var TextInputAddon = function (_a, ref) {
|
|
|
12563
12588
|
setIsFocus(false);
|
|
12564
12589
|
// add other focus effects here
|
|
12565
12590
|
};
|
|
12566
|
-
var className = cn(
|
|
12567
|
-
|
|
12591
|
+
var className = cn("border py-2 px-3 rounded text-sm leading-5 font-normal w-full border-gray-300 outline-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500 focus:border-purple-500 ", {
|
|
12592
|
+
"focus:ring-red-500 !border-red-500 !outline-red-500 shadow-none": isError
|
|
12593
|
+
}, { "pl-10": inlineIcon }, {
|
|
12594
|
+
"!rounded-r-none !rounded-l": (trailIcon || trailLabel) && !(leadIcon || leadLabel)
|
|
12595
|
+
}, {
|
|
12596
|
+
"!rounded-r-none !rounded-r": !(trailIcon || trailLabel) && (leadIcon || leadLabel)
|
|
12597
|
+
}, { "rounded-none": (trailIcon || trailLabel) && (leadIcon || leadLabel) });
|
|
12598
|
+
var discriptionStyles = cn("text-sm mt-1 block", { "text-gray-500": !isError }, { "text-red-500": isError });
|
|
12568
12599
|
return (React__default["default"].createElement("div", null,
|
|
12569
12600
|
label && (React__default["default"].createElement(InputLabel, { label: label, isRequired: isRequired, id: id, isError: isError, isDisabled: isDisabled })),
|
|
12570
12601
|
React__default["default"].createElement("div", { className: "flex" },
|
|
12571
|
-
(leadIcon || leadLabel) && (React__default["default"].createElement(InputCta, { icon: leadIcon, ctaLabel: leadLabel, align: "left", isClear: clearCta ===
|
|
12572
|
-
React__default["default"].createElement("div", { className: "flex-grow focus-within:z-20
|
|
12573
|
-
inlineIcon && (React__default["default"].createElement("div", { className: "absolute inset-y-0 left-0
|
|
12602
|
+
(leadIcon || leadLabel) && (React__default["default"].createElement(InputCta, { icon: leadIcon, ctaLabel: leadLabel, align: "left", isClear: clearCta === "left" || clearCta === "both" })),
|
|
12603
|
+
React__default["default"].createElement("div", { className: "relative flex-grow focus-within:z-20" },
|
|
12604
|
+
inlineIcon && (React__default["default"].createElement("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" },
|
|
12574
12605
|
React__default["default"].createElement(DynamicIcons, { icon: inlineIcon, className: "h-5 w-5 text-gray-400", outline: false }))),
|
|
12575
12606
|
React__default["default"].createElement(_BaseField, { onFocus: handleInputFocus, onBlur: handleInputBlur, onChange: onChange, onValueChange: setValue, ref: ref, type: type, name: name, id: id, className: className, isDisabled: isDisabled, value: value, defaultValue: defaultValue, maxLength: maxLength, placeholder: placeholder })),
|
|
12576
|
-
(trailIcon || trailLabel) && (React__default["default"].createElement(InputCta, { icon: trailIcon, ctaLabel: trailLabel, align: "right", isClear: clearCta ===
|
|
12607
|
+
(trailIcon || trailLabel) && (React__default["default"].createElement(InputCta, { icon: trailIcon, ctaLabel: trailLabel, align: "right", isClear: clearCta === "right" || clearCta === "both", onClickHandler: onCtaClick }))),
|
|
12577
12608
|
React__default["default"].createElement("div", { className: "flex flex-row space-x-3" },
|
|
12578
|
-
React__default["default"].createElement("div", { className: "grow" }, message && React__default["default"].createElement("span", { className: discriptionStyles }, message)),
|
|
12609
|
+
React__default["default"].createElement("div", { className: "grow" }, message && (React__default["default"].createElement("span", { className: discriptionStyles }, message))),
|
|
12579
12610
|
isShowCounter && (React__default["default"].createElement("div", { className: "shrink-0" },
|
|
12580
12611
|
React__default["default"].createElement(InputCounter, { current: Number(value === null || value === void 0 ? void 0 : value.length), limit: maxLength }))))));
|
|
12581
12612
|
};
|
|
@@ -12604,6 +12635,11 @@ var TextInputSelect = function (_a) {
|
|
|
12604
12635
|
var _d = React.useState(Boolean(isFocused)), isFocus = _d[0], setIsFocus = _d[1];
|
|
12605
12636
|
var _e = React.useState(defaultValue || ""), value = _e[0], setValue = _e[1];
|
|
12606
12637
|
var inputRef = React.useRef(null);
|
|
12638
|
+
var uniqueID = useId();
|
|
12639
|
+
if (!id)
|
|
12640
|
+
id = "select-".concat(uniqueID);
|
|
12641
|
+
if (!name)
|
|
12642
|
+
name = id;
|
|
12607
12643
|
React.useEffect(function () {
|
|
12608
12644
|
setValue(externalValue);
|
|
12609
12645
|
}, [externalValue]);
|
|
@@ -12649,7 +12685,7 @@ var TextInputSelect = function (_a) {
|
|
|
12649
12685
|
React__default["default"].createElement("div", { className: "relative flex-grow focus-within:z-20" },
|
|
12650
12686
|
prefix && (React__default["default"].createElement("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" },
|
|
12651
12687
|
React__default["default"].createElement("span", { className: "text-gray-500 sm:text-sm" }, prefix))),
|
|
12652
|
-
React__default["default"].createElement(_BaseField, { onFocus: handleInputFocus, onBlur: handleInputBlur, onChange: onChange, onValueChange: setValue, ref: inputRef, type: type, name: name, id: id, className: cn("w-full border border-gray-300 py-2 px-3 text-sm font-normal leading-5
|
|
12688
|
+
React__default["default"].createElement(_BaseField, { onFocus: handleInputFocus, onBlur: handleInputBlur, onChange: onChange, onValueChange: setValue, ref: inputRef, type: type, name: name, id: id, className: cn("w-full border border-gray-300 py-2 px-3 text-sm font-normal leading-5", "focus:border-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500 sm:text-sm", selectLocation === "right"
|
|
12653
12689
|
? "rounded-l"
|
|
12654
12690
|
: "rounded-r", isError ? "border-red-500" : "", prefix ? "pl-7" : ""), isDisabled: isDisabled, defaultValue: defaultValue, value: value, maxLength: maxLength, placeholder: placeholder })),
|
|
12655
12691
|
(inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.length) && selectLocation === "right" && (React__default["default"].createElement(InputSelect, { inputOptions: inputOptions, align: "right", onSelectOption: onSelectOption, isDisabled: isDisabled, className: cn(isError ? "border-red-500" : "") }))),
|
|
@@ -12662,6 +12698,11 @@ var TextInputSelect = function (_a) {
|
|
|
12662
12698
|
/** Comment */
|
|
12663
12699
|
var Radio = function (_a) {
|
|
12664
12700
|
var label = _a.label, id = _a.id, name = _a.name, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = _a.isChecked, isChecked = _c === void 0 ? false : _c, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, _e = _a.isError, isError = _e === void 0 ? false : _e, message = _a.message, onChange = _a.onChange, onClick = _a.onClick, value = _a.value;
|
|
12701
|
+
var uniqueID = useId();
|
|
12702
|
+
if (!id)
|
|
12703
|
+
id = "input-".concat(uniqueID);
|
|
12704
|
+
if (!name)
|
|
12705
|
+
name = id;
|
|
12665
12706
|
var checboxStyles = cn('focus:ring-purple-500 h-4 w-4 text-purple-600 border-gray-300', {
|
|
12666
12707
|
'border-red-500 shadow-none': isError
|
|
12667
12708
|
});
|
|
@@ -12689,22 +12730,24 @@ var Radio = function (_a) {
|
|
|
12689
12730
|
};
|
|
12690
12731
|
|
|
12691
12732
|
var Textarea = function (_a, ref) {
|
|
12692
|
-
var id = _a.id, name = _a.name, label = _a.label, isError = _a.isError, isRequired = _a.isRequired, isDisabled = _a.isDisabled, defaultValue = _a.defaultValue, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 500 : _b, _c = _a.rows, rows = _c === void 0 ? 4 : _c, onChange = _a.onChange;
|
|
12693
|
-
var
|
|
12733
|
+
var id = _a.id, name = _a.name, label = _a.label, isError = _a.isError, isRequired = _a.isRequired, isDisabled = _a.isDisabled, defaultValue = _a.defaultValue, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 500 : _b, _c = _a.rows, rows = _c === void 0 ? 4 : _c, onChange = _a.onChange, externalValue = _a.value, placeholder = _a.placeholder;
|
|
12734
|
+
var uniqueID = useId();
|
|
12735
|
+
var _d = React.useState(externalValue || defaultValue || ""), value = _d[0], setValue = _d[1];
|
|
12694
12736
|
var handleOnchange = function (e) {
|
|
12695
12737
|
var targetValue = e.currentTarget.value;
|
|
12696
12738
|
typeof onChange === "function" && onChange(targetValue);
|
|
12697
12739
|
setValue(targetValue);
|
|
12698
12740
|
};
|
|
12699
|
-
var className = cn("
|
|
12741
|
+
var className = cn("focus:ring-purple-500 focus:border-purple-500 block w-full sm:text-sm rounded", { "border-gray-300 ": !isError }, { "focus:ring-red-500 border-red-500 outline-red-500": isError });
|
|
12700
12742
|
var discriptionStyles = cn("text-sm mt-1 block", { "text-gray-500": !isError }, { "text-red-500": isError });
|
|
12701
|
-
|
|
12702
|
-
|
|
12743
|
+
if (!id)
|
|
12744
|
+
id = "ta-".concat(uniqueID);
|
|
12745
|
+
return (React__default["default"].createElement("div", { className: cn({ "opacity-50": isDisabled }) },
|
|
12703
12746
|
label && (React__default["default"].createElement(InputLabel, { isPlaceholder: true, isActive: true, label: label, isRequired: isRequired, id: id, isError: isError, isDisabled: isDisabled })),
|
|
12704
12747
|
React__default["default"].createElement("div", null,
|
|
12705
|
-
React__default["default"].createElement("textarea", { ref: ref, maxLength: maxLength, onChange: handleOnchange, rows: rows, name: name, id: id, className: className, defaultValue: defaultValue })),
|
|
12748
|
+
React__default["default"].createElement("textarea", { ref: ref, maxLength: maxLength, onChange: handleOnchange, rows: rows, name: name, id: id, className: className, defaultValue: defaultValue, value: value, placeholder: placeholder })),
|
|
12706
12749
|
React__default["default"].createElement("div", { className: "flex flex-row space-x-3" },
|
|
12707
|
-
React__default["default"].createElement("div", { className: "grow" }, message && React__default["default"].createElement("span", { className: discriptionStyles }, message)),
|
|
12750
|
+
React__default["default"].createElement("div", { className: "grow" }, message && (React__default["default"].createElement("span", { className: discriptionStyles }, message))),
|
|
12708
12751
|
isShowCounter && (React__default["default"].createElement("div", { className: "shrink-0" },
|
|
12709
12752
|
React__default["default"].createElement(InputCounter, { current: Number(value === null || value === void 0 ? void 0 : value.length), limit: maxLength }))))));
|
|
12710
12753
|
};
|
|
@@ -12714,6 +12757,11 @@ var _Textarea = React.forwardRef(Textarea);
|
|
|
12714
12757
|
var Select = function (_a) {
|
|
12715
12758
|
var label = _a.label, id = _a.id, name = _a.name, options = _a.options, onChange = _a.onChange, isDisabled = _a.isDisabled, isError = _a.isError, isRequired = _a.isRequired;
|
|
12716
12759
|
var _b = React.useState(options[0].value), selectedOption = _b[0], setSelectedOption = _b[1];
|
|
12760
|
+
var uniqueID = useId();
|
|
12761
|
+
if (!id)
|
|
12762
|
+
id = "select-".concat(uniqueID);
|
|
12763
|
+
if (!name)
|
|
12764
|
+
name = id;
|
|
12717
12765
|
var handleChange = function (e) {
|
|
12718
12766
|
var targetValue = e.target.value;
|
|
12719
12767
|
typeof onChange == "function" && onChange(targetValue);
|