pge-front-common 14.1.41 → 14.1.42
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/index.js
CHANGED
|
@@ -21788,9 +21788,9 @@ var selectColourStyles = function (isInvalid, isMobile, maxMenuHeight) { return
|
|
|
21788
21788
|
menuList: function (styles) { return (__assign(__assign({}, styles), { maxHeight: maxMenuHeight ? "".concat(maxMenuHeight, "px") : "300px" })); },
|
|
21789
21789
|
}); };
|
|
21790
21790
|
var SelectDefault = function (_a) {
|
|
21791
|
-
var name = _a.name, control = _a.control, optionsSelect = _a.optionsSelect, placeholder = _a.placeholder, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, label = _a.label, _c = _a.hasError, hasError = _c === void 0 ? false : _c, handleChange = _a.handleChange, isRequired = _a.isRequired, value = _a.value, handleInputChange = _a.handleInputChange, formatOptionLabel = _a.formatOptionLabel, _d = _a.isClearable, isClearable = _d === void 0 ? true : _d, maxMenuHeight = _a.maxMenuHeight;
|
|
21792
|
-
var
|
|
21793
|
-
var
|
|
21791
|
+
var name = _a.name, control = _a.control, optionsSelect = _a.optionsSelect, placeholder = _a.placeholder, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, label = _a.label, _c = _a.hasError, hasError = _c === void 0 ? false : _c, handleChange = _a.handleChange, isRequired = _a.isRequired, value = _a.value, handleInputChange = _a.handleInputChange, formatOptionLabel = _a.formatOptionLabel, _d = _a.isClearable, isClearable = _d === void 0 ? true : _d, maxMenuHeight = _a.maxMenuHeight, _e = _a.noOptionsMessage, noOptionsMessage = _e === void 0 ? "Nenhuma opção disponível" : _e;
|
|
21792
|
+
var _f = useController({ name: name, control: control }), _g = _f.field; _g.onChange; _g.value; var rest = __rest(_g, ["onChange", "value"]), error = _f.fieldState.error;
|
|
21793
|
+
var _h = React__namespace.useState(typeof window !== "undefined" && window.innerWidth <= 768), isMobile = _h[0], setIsMobile = _h[1];
|
|
21794
21794
|
var CustomDropdownIndicator = function () {
|
|
21795
21795
|
return (React__namespace.createElement("div", { className: styles$c.contentIcon },
|
|
21796
21796
|
React__namespace.createElement(IconTriangleRecall, { className: styles$c.iconChefron })));
|
|
@@ -21812,7 +21812,7 @@ var SelectDefault = function (_a) {
|
|
|
21812
21812
|
if (inputValue) {
|
|
21813
21813
|
handleInputChange === null || handleInputChange === void 0 ? void 0 : handleInputChange(inputValue);
|
|
21814
21814
|
}
|
|
21815
|
-
}, placeholder: placeholder, styles: selectColourStyles(hasError || !!error, isMobile, maxMenuHeight), isClearable: isClearable, isSearchable: true, formatOptionLabel: formatOptionLabel, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator }, "aria-label": label || placeholder || "Campo para seleção", inputId: "".concat(name, "-input") }, rest))),
|
|
21815
|
+
}, placeholder: placeholder, styles: selectColourStyles(hasError || !!error, isMobile, maxMenuHeight), isClearable: isClearable, isSearchable: true, formatOptionLabel: formatOptionLabel, noOptionsMessage: function () { return noOptionsMessage || "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator }, "aria-label": label || placeholder || "Campo para seleção", inputId: "".concat(name, "-input") }, rest))),
|
|
21816
21816
|
error && React__namespace.createElement("span", { className: styles$c.errorText }, error.message)));
|
|
21817
21817
|
};
|
|
21818
21818
|
|