pge-front-common 14.0.42 → 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.esm.js +13 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +13 -5
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -20971,7 +20971,7 @@ var DateInput = function (_a) {
|
|
|
20971
20971
|
restrictionMessage && (React__default.createElement("div", { className: styles$b.restrictionMessage }, restrictionMessage))));
|
|
20972
20972
|
};
|
|
20973
20973
|
|
|
20974
|
-
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";
|
|
20974
|
+
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";
|
|
20975
20975
|
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-"};
|
|
20976
20976
|
styleInject(css_248z$8);
|
|
20977
20977
|
|
|
@@ -21437,7 +21437,7 @@ function useController(props) {
|
|
|
21437
21437
|
};
|
|
21438
21438
|
}
|
|
21439
21439
|
|
|
21440
|
-
var selectColourStyles = function (isInvalid) { return ({
|
|
21440
|
+
var selectColourStyles = function (isInvalid, isMobile) { return ({
|
|
21441
21441
|
control: function (styles, _a) {
|
|
21442
21442
|
var isFocused = _a.isFocused, isDisabled = _a.isDisabled;
|
|
21443
21443
|
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
|
|
@@ -21460,8 +21460,8 @@ var selectColourStyles = function (isInvalid) { return ({
|
|
|
21460
21460
|
backgroundColor: "#005a921a",
|
|
21461
21461
|
color: "#30303090",
|
|
21462
21462
|
} })); },
|
|
21463
|
-
placeholder: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#30303066" : "#30303066", fontSize: "14px", fontWeight: "700", lineHeight: "24px" })); },
|
|
21464
|
-
singleValue: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#CB0A0A" : "#303030CC", fontSize: "14px", fontWeight: "700", lineHeight: "24px" })); },
|
|
21463
|
+
placeholder: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#30303066" : "#30303066", fontSize: isMobile ? "12px" : "14px", fontWeight: "700", lineHeight: "24px" })); },
|
|
21464
|
+
singleValue: function (styles) { return (__assign(__assign({}, styles), { color: isInvalid ? "#CB0A0A" : "#303030CC", fontSize: isMobile ? "12px" : "14px", fontWeight: "700", lineHeight: "24px" })); },
|
|
21465
21465
|
indicatorSeparator: function (styles, _a) {
|
|
21466
21466
|
var hasValue = _a.hasValue;
|
|
21467
21467
|
return (__assign(__assign({}, styles), { display: hasValue ? "block" : "none" }));
|
|
@@ -21470,10 +21470,18 @@ var selectColourStyles = function (isInvalid) { return ({
|
|
|
21470
21470
|
var SelectDefault = function (_a) {
|
|
21471
21471
|
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;
|
|
21472
21472
|
var _d = useController({ name: name, control: control }), _e = _d.field; _e.onChange; _e.value; var rest = __rest(_e, ["onChange", "value"]), error = _d.fieldState.error;
|
|
21473
|
+
var _f = React.useState(typeof window !== "undefined" && window.innerWidth <= 768), isMobile = _f[0], setIsMobile = _f[1];
|
|
21473
21474
|
var CustomDropdownIndicator = function () {
|
|
21474
21475
|
return (React.createElement("div", { className: styles$6.contentIcon },
|
|
21475
21476
|
React.createElement(IconTriangleRecall, { className: styles$6.iconChefron })));
|
|
21476
21477
|
};
|
|
21478
|
+
React.useEffect(function () {
|
|
21479
|
+
function onResize() {
|
|
21480
|
+
setIsMobile(window.innerWidth <= 768);
|
|
21481
|
+
}
|
|
21482
|
+
window.addEventListener("resize", onResize);
|
|
21483
|
+
return function () { return window.removeEventListener("resize", onResize); };
|
|
21484
|
+
}, []);
|
|
21477
21485
|
return (React.createElement("div", { className: "".concat(styles$6.selectContainer) },
|
|
21478
21486
|
label && (React.createElement("label", null,
|
|
21479
21487
|
label,
|
|
@@ -21484,7 +21492,7 @@ var SelectDefault = function (_a) {
|
|
|
21484
21492
|
if (inputValue) {
|
|
21485
21493
|
handleInputChange === null || handleInputChange === void 0 ? void 0 : handleInputChange(inputValue);
|
|
21486
21494
|
}
|
|
21487
|
-
}, placeholder: placeholder, styles: selectColourStyles(hasError || !!error), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator } }, rest))),
|
|
21495
|
+
}, placeholder: placeholder, styles: selectColourStyles(hasError || !!error, isMobile), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator } }, rest))),
|
|
21488
21496
|
error && React.createElement("span", { className: styles$6.errorText }, error.message)));
|
|
21489
21497
|
};
|
|
21490
21498
|
|