pge-front-common 14.0.41 → 14.0.43

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
@@ -135,9 +135,9 @@ var InputBase = function (_a) {
135
135
  _b[styles$y.textInputDanger] = restrictionMessage,
136
136
  _b)), style: __assign({ paddingLeft: leftIcon ? "36px" : "8px", paddingRight: rightIcon ? "36px" : "8px" }, style), id: props.name, value: value }, props, { disabled: disabled })),
137
137
  rightIcon && (React.createElement("button", { tabIndex: -1, type: "button", className: styles$y.iconWrapperRight, onClick: function () { return onRightIconClick === null || onRightIconClick === void 0 ? void 0 : onRightIconClick(); }, "aria-label": "A\u00E7\u00E3o ao clicar no \u00EDcone ao lado direito" }, rightIcon))),
138
- React.createElement("div", { className: styles$y.messageContainer },
138
+ (restrictionMessage || showCounter) && (React.createElement("div", { className: styles$y.messageContainer },
139
139
  React.createElement("div", { className: styles$y.messageWrapper }, restrictionMessage && (React.createElement("div", { className: styles$y.restrictionMessage }, restrictionMessage))),
140
- showCounter && (React.createElement("div", { className: "".concat(styles$y.counter, " ").concat(restrictionMessage ? styles$y.messageError : "") }, characterCount)))));
140
+ showCounter && (React.createElement("div", { className: "".concat(styles$y.counter, " ").concat(restrictionMessage ? styles$y.messageError : "") }, characterCount))))));
141
141
  };
142
142
 
143
143
  var IconDownload = function (props) { return (React.createElement("svg", __assign({ width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
@@ -760,11 +760,11 @@ var TextareaBase = function (_a) {
760
760
  : "0"
761
761
  : "8px",
762
762
  }, rows: rows, required: required })))),
763
- React.createElement("div", { className: styles$r.messageContainer },
763
+ (textError && hasError || !hasError && message || showCounter) && (React.createElement("div", { className: styles$r.messageContainer },
764
764
  React.createElement("div", { className: styles$r.messageWrapper },
765
765
  textError && hasError && (React.createElement("div", { className: "".concat(styles$r.message, " ").concat(styles$r.messageError) }, textError)),
766
766
  !hasError && message && (React.createElement("div", { className: styles$r.message }, message))),
767
- showCounter && (React.createElement("div", { className: "".concat(styles$r.counter, " ").concat(textError && hasError ? styles$r.messageError : "") }, characterCount)))));
767
+ showCounter && (React.createElement("div", { className: "".concat(styles$r.counter, " ").concat(textError && hasError ? styles$r.messageError : "") }, characterCount))))));
768
768
  };
769
769
 
770
770
  var css_248z$t = ".radioGroup-module__inputContainer___0cHBx {\r\n width: 306px;\r\n color: var(--color-label);\r\n}\r\n\r\n.radioGroup-module__label___Ziyuh {\r\n color: var(--color-label);\r\n width: 100%;\r\n font-family: var(--font-open-sans-serif);\r\n font-size: var(--input-font-size);\r\n font-weight: var(--input-font-weight);\r\n line-height: var(--input-line-height);\r\n text-align: left;\r\n cursor: pointer;\r\n}\r\n\r\n.radioGroup-module__labelRequired___q7SOr::after {\r\n content: \" *\";\r\n color: var(--color-danger);\r\n}\r\n\r\n.radioGroup-module__labelError___Ulm2e {\r\n color: var(--color-danger);\r\n}\r\n\r\n.radioGroup-module__inputWrapper___wbpEu {\r\n background-color: #fff;\r\n cursor: pointer;\r\n width: 100%;\r\n font-family: \"Open Sans\", sans-serif;\r\n font-size: var(--input-font-size);\r\n font-weight: var(--input-font-weight);\r\n line-height: var(--input-line-height);\r\n text-align: left;\r\n}\r\n\r\n.radioGroup-module__inputContent___g2v-v {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n}\r\n\r\n.radioGroup-module__message___FoIYt {\r\n color: var(--color-label);\r\n margin-left: 10px;\r\n margin-top: 0;\r\n font-family: \"Open Sans\", sans-serif;\r\n font-size: 10px;\r\n font-weight: 700;\r\n line-height: 14px;\r\n text-align: left;\r\n}\r\n\r\n.radioGroup-module__messageError___5BsQY {\r\n color: var(--color-danger);\r\n}\r\n\r\n.radioGroup-module__radioGroup___YpgFb {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0.4rem 0rem;\r\n font-size: 14px;\r\n font-family: var(--font-open-sans-regular);\r\n outline: none;\r\n line-height: 24px;\r\n font-weight: 400;\r\n transition: border-color 0.3s;\r\n cursor: pointer;\r\n}\r\n\r\n.radioGroup-module__radioGroup___YpgFb.radioGroup-module__horizontal___J4nzL {\r\n flex-direction: row;\r\n}\r\n\r\n.radioGroup-module__radioGroup___YpgFb.radioGroup-module__vertical___t-DLk {\r\n flex-direction: column;\r\n}\r\n\r\n.radioGroup-module__radioLabel___wJDuM {\r\n margin-right: 10px;\r\n display: flex;\r\n align-items: center;\r\n font-size: 14px;\r\n font-weight: 400;\r\n cursor: pointer;\r\n}\r\n\r\n.radioGroup-module__inputContainer___0cHBx input[type=\"radio\" i] {\r\n background-color: initial;\r\n cursor: pointer;\r\n appearance: auto;\r\n box-sizing: border-box;\r\n margin: 1px 5px 0px 5px;\r\n padding: initial;\r\n border: initial;\r\n transform: scale(1.25); /* tamanho do radio */\r\n}\r\n\r\n.radioGroup-module__inputWrapperError___91QS1 input[type=\"radio\"] {\r\n border: 1px solid var(--color-danger);\r\n appearance: none;\r\n width: 13px;\r\n height: 13px;\r\n border-radius: 50%;\r\n background-color: transparent;\r\n cursor: pointer;\r\n}\r\n\r\n.radioGroup-module__inputWrapperError___91QS1 input[type=\"radio\"]:checked {\r\n accent-color: var(--color-danger);\r\n appearance: auto;\r\n}\r\n\r\n.radioGroup-module__inputWrapperError___91QS1 input[type=\"radio\"]:disabled {\r\n accent-color: var(--color-border);\r\n appearance: auto;\r\n}\r\n";
@@ -20991,7 +20991,7 @@ var DateInput = function (_a) {
20991
20991
  restrictionMessage && (React.createElement("div", { className: styles$b.restrictionMessage }, restrictionMessage))));
20992
20992
  };
20993
20993
 
20994
- var css_248z$8 = ".styles-module__selectContainer___TecDY {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__selectContainer___TecDY label {\r\n font-size: var(--font-size-16);\r\n font-weight: 700;\r\n line-height: 24px;\r\n color: var(--color-label);\r\n}\r\n\r\n.styles-module__errorText___kXCnM {\r\n font-size: 12px;\r\n font-weight: 700;\r\n line-height: 15px;\r\n text-align: left;\r\n color: var(--color-danger);\r\n margin-left: 8px;\r\n}\r\n\r\n.styles-module__errorRequired___SEaAS {\r\n font-size: var(--font-size-16);\r\n font-weight: 700;\r\n line-height: 24px;\r\n text-align: left;\r\n color: var(--color-danger);\r\n}\r\n\r\n.styles-module__contentIcon___hPEpA {\r\n display: flex;\r\n align-items: center;\r\n padding: 8px;\r\n}\r\n\r\n.styles-module__iconChefron___B2-9- {\r\n color: var(--color-label);\r\n}\r\n";
20994
+ var css_248z$8 = ".styles-module__selectContainer___TecDY {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__selectContainer___TecDY label {\r\n font-size: var(--font-size-16);\r\n font-weight: 700;\r\n line-height: 24px;\r\n color: var(--color-label);\r\n}\r\n\r\n@media screen and (max-width: 768px) {\r\n .styles-module__selectContainer___TecDY label {\r\n font-size: var(--font-size-12);\r\n }\r\n}\r\n\r\n.styles-module__errorText___kXCnM {\r\n font-size: 12px;\r\n font-weight: 700;\r\n line-height: 15px;\r\n text-align: left;\r\n color: var(--color-danger);\r\n margin-left: 8px;\r\n}\r\n\r\n.styles-module__errorRequired___SEaAS {\r\n font-size: var(--font-size-16);\r\n font-weight: 700;\r\n line-height: 24px;\r\n text-align: left;\r\n color: var(--color-danger);\r\n}\r\n\r\n.styles-module__contentIcon___hPEpA {\r\n display: flex;\r\n align-items: center;\r\n padding: 8px;\r\n}\r\n\r\n.styles-module__iconChefron___B2-9- {\r\n color: var(--color-label);\r\n}\r\n";
20995
20995
  var styles$6 = {"selectContainer":"styles-module__selectContainer___TecDY","errorText":"styles-module__errorText___kXCnM","errorRequired":"styles-module__errorRequired___SEaAS","contentIcon":"styles-module__contentIcon___hPEpA","iconChefron":"styles-module__iconChefron___B2-9-"};
20996
20996
  styleInject(css_248z$8);
20997
20997
 
@@ -21457,7 +21457,7 @@ function useController(props) {
21457
21457
  };
21458
21458
  }
21459
21459
 
21460
- var selectColourStyles = function (isInvalid) { return ({
21460
+ var selectColourStyles = function (isInvalid, isMobile) { return ({
21461
21461
  control: function (styles, _a) {
21462
21462
  var isFocused = _a.isFocused, isDisabled = _a.isDisabled;
21463
21463
  return (__assign(__assign({}, styles), { alignItems: "center", cursor: "pointer", display: "flex", flexWrap: "wrap", justifyContent: "space-between", minHeight: "48px", outline: "0", position: "relative", transition: "all 100ms", borderColor: isInvalid ? "#CB0A0A" : isFocused ? "#1a95b0" : "#cfcfcffc", borderRadius: "9px", borderStyle: "solid", borderWidth: "1px", boxSizing: "border-box", boxShadow: isInvalid
@@ -21480,8 +21480,8 @@ var selectColourStyles = function (isInvalid) { return ({
21480
21480
  backgroundColor: "#005a921a",
21481
21481
  color: "#30303090",
21482
21482
  } })); },
21483
- placeholder: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#30303066" : "#30303066", fontSize: "14px", fontWeight: "700", lineHeight: "24px" })); },
21484
- singleValue: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#CB0A0A" : "#303030CC", fontSize: "14px", fontWeight: "700", lineHeight: "24px" })); },
21483
+ placeholder: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#30303066" : "#30303066", fontSize: isMobile ? "12px" : "14px", fontWeight: "700", lineHeight: "24px" })); },
21484
+ singleValue: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#CB0A0A" : "#303030CC", fontSize: isMobile ? "12px" : "14px", fontWeight: "700", lineHeight: "24px" })); },
21485
21485
  indicatorSeparator: function (styles, _a) {
21486
21486
  var hasValue = _a.hasValue;
21487
21487
  return (__assign(__assign({}, styles), { display: hasValue ? "block" : "none" }));
@@ -21490,10 +21490,18 @@ var selectColourStyles = function (isInvalid) { return ({
21490
21490
  var SelectDefault = function (_a) {
21491
21491
  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;
21492
21492
  var _d = useController({ name: name, control: control }), _e = _d.field; _e.onChange; _e.value; var rest = __rest(_e, ["onChange", "value"]), error = _d.fieldState.error;
21493
+ var _f = React__namespace.useState(typeof window !== "undefined" && window.innerWidth <= 768), isMobile = _f[0], setIsMobile = _f[1];
21493
21494
  var CustomDropdownIndicator = function () {
21494
21495
  return (React__namespace.createElement("div", { className: styles$6.contentIcon },
21495
21496
  React__namespace.createElement(IconTriangleRecall, { className: styles$6.iconChefron })));
21496
21497
  };
21498
+ React__namespace.useEffect(function () {
21499
+ function onResize() {
21500
+ setIsMobile(window.innerWidth <= 768);
21501
+ }
21502
+ window.addEventListener("resize", onResize);
21503
+ return function () { return window.removeEventListener("resize", onResize); };
21504
+ }, []);
21497
21505
  return (React__namespace.createElement("div", { className: "".concat(styles$6.selectContainer) },
21498
21506
  label && (React__namespace.createElement("label", null,
21499
21507
  label,
@@ -21504,7 +21512,7 @@ var SelectDefault = function (_a) {
21504
21512
  if (inputValue) {
21505
21513
  handleInputChange === null || handleInputChange === void 0 ? void 0 : handleInputChange(inputValue);
21506
21514
  }
21507
- }, placeholder: placeholder, styles: selectColourStyles(hasError || !!error), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator } }, rest))),
21515
+ }, placeholder: placeholder, styles: selectColourStyles(hasError || !!error, isMobile), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator } }, rest))),
21508
21516
  error && React__namespace.createElement("span", { className: styles$6.errorText }, error.message)));
21509
21517
  };
21510
21518