pge-front-common 14.1.40 → 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
@@ -8749,7 +8749,7 @@ var selectColourStyles$1 = function (isInvalid, isDarkMode, isMobile) { return (
8749
8749
  menuList: function (base) { return (__assign(__assign({}, base), { backgroundColor: isDarkMode ? "#4B4B4C" : "#fff", padding: "0.5rem 0", borderRadius: "8px" })); },
8750
8750
  }); };
8751
8751
  var BasicSelect = function (_a) {
8752
- var name = _a.name, 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;
8752
+ var name = _a.name, 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, _d = _a.isClearable, isClearable = _d === void 0 ? true : _d;
8753
8753
  var isDarkMode = useDarkMode();
8754
8754
  useIsMobile();
8755
8755
  var CustomDropdownIndicator = function () { return (React__namespace.createElement("div", { className: styles$l.contentIcon },
@@ -8759,7 +8759,7 @@ var BasicSelect = function (_a) {
8759
8759
  label,
8760
8760
  isRequired ? React__namespace.createElement("span", { className: styles$l.errorRequired }, "*") : null)),
8761
8761
  React__namespace.createElement("div", { className: styles$l.selectElement },
8762
- React__namespace.createElement(StateManagedSelect$1, { inputId: name, isMulti: false, isDisabled: isDisabled, options: optionsSelect, value: optionsSelect.find(function (opt) { return opt.value === value; }) || value, onChange: handleChange, placeholder: placeholder, styles: selectColourStyles$1(hasError, isDarkMode), isSearchable: true, isClearable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: {
8762
+ React__namespace.createElement(StateManagedSelect$1, { inputId: name, isMulti: false, isDisabled: isDisabled, options: optionsSelect, value: optionsSelect.find(function (opt) { return opt.value === value; }) || value, onChange: handleChange, placeholder: placeholder, styles: selectColourStyles$1(hasError, isDarkMode), isSearchable: true, isClearable: isClearable, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: {
8763
8763
  DropdownIndicator: CustomDropdownIndicator,
8764
8764
  ClearIndicator: CustomClearIndicator,
8765
8765
  }, "aria-label": typeof label === "string"
@@ -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 _e = useController({ name: name, control: control }), _f = _e.field; _f.onChange; _f.value; var rest = __rest(_f, ["onChange", "value"]), error = _e.fieldState.error;
21793
- var _g = React__namespace.useState(typeof window !== "undefined" && window.innerWidth <= 768), isMobile = _g[0], setIsMobile = _g[1];
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