@agility/plenum-ui 1.3.18 → 1.3.19
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/Select/Select.d.ts +1 -0
- package/lib/index.esm.js +2 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -12739,7 +12739,7 @@ var _Textarea = forwardRef(Textarea);
|
|
|
12739
12739
|
|
|
12740
12740
|
/** Comment */
|
|
12741
12741
|
var Select = function (_a) {
|
|
12742
|
-
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, value = _a.value;
|
|
12742
|
+
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, value = _a.value, className = _a.className;
|
|
12743
12743
|
var _b = useState(value || options[0].value), selectedOption = _b[0], setSelectedOption = _b[1];
|
|
12744
12744
|
var uniqueID = useId();
|
|
12745
12745
|
if (!id)
|
|
@@ -12756,11 +12756,10 @@ var Select = function (_a) {
|
|
|
12756
12756
|
typeof onChange == "function" && onChange(targetValue);
|
|
12757
12757
|
setSelectedOption(targetValue);
|
|
12758
12758
|
};
|
|
12759
|
-
var selectStyles = cn("block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none", "focus:ring-purple-500 focus:border-purple-500 sm:text-sm rounded", { "border-red-500": isError }, { "border-gray-300": !isError });
|
|
12760
12759
|
var wrapperStyle = cn({ "opacity-50": isDisabled });
|
|
12761
12760
|
return (React__default.createElement("div", { className: wrapperStyle },
|
|
12762
12761
|
label && (React__default.createElement(InputLabel, { isPlaceholder: true, isActive: true, label: label, isRequired: isRequired, id: id, isError: isError, isDisabled: isDisabled })),
|
|
12763
|
-
React__default.createElement("select", { id: id, name: name, className:
|
|
12762
|
+
React__default.createElement("select", { id: id, name: name, className: cn("block w-full border-gray-300 py-2 pl-3 pr-10 text-base focus:outline-none", "rounded focus:border-purple-500 focus:ring-purple-500 sm:text-sm", { "border-red-500": isError }, { "border-gray-300": !isError }, className), onChange: handleChange, disabled: isDisabled, value: selectedOption }, options.map(function (_a) {
|
|
12764
12763
|
var value = _a.value, label = _a.label;
|
|
12765
12764
|
return (React__default.createElement("option", { key: value, value: value }, label));
|
|
12766
12765
|
}))));
|