pge-front-common 14.1.4 → 14.1.6
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 +40 -12
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +40 -12
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -903,8 +903,8 @@ var DropDown = function (_a) {
|
|
|
903
903
|
})));
|
|
904
904
|
};
|
|
905
905
|
|
|
906
|
-
var css_248z$q = ".menu-module__iconMenu___hsJkY {\r\n width: 48px;\r\n height: 49px;\r\n color: var(--header-menu-icon-color);\r\n}\r\n\r\n@media (max-width: 480px) {\r\n .menu-module__iconMenu___hsJkY {\r\n width: 31px;\r\n height: 49px;\r\n }\r\n}\r\n";
|
|
907
|
-
var styles$n = {"iconMenu":"menu-module__iconMenu___hsJkY"};
|
|
906
|
+
var css_248z$q = ".menu-module__iconMenu___hsJkY {\r\n width: 48px;\r\n height: 49px;\r\n color: var(--header-menu-icon-color);\r\n}\r\n\r\n.menu-module__menuButton___BV-Rs {\r\n background: none;\r\n border: none;\r\n padding: 0;\r\n margin: 0;\r\n cursor: pointer;\r\n}\r\n\r\n@media (max-width: 480px) {\r\n .menu-module__iconMenu___hsJkY {\r\n width: 31px;\r\n height: 49px;\r\n }\r\n}\r\n";
|
|
907
|
+
var styles$n = {"iconMenu":"menu-module__iconMenu___hsJkY","menuButton":"menu-module__menuButton___BV-Rs"};
|
|
908
908
|
styleInject(css_248z$q);
|
|
909
909
|
|
|
910
910
|
var Menu$2 = function (_a) {
|
|
@@ -932,7 +932,7 @@ var Menu$2 = function (_a) {
|
|
|
932
932
|
document.removeEventListener("click", handleClickOutside);
|
|
933
933
|
};
|
|
934
934
|
}, [showDropDown]);
|
|
935
|
-
return (React__default.createElement("button", { ref: buttonRef,
|
|
935
|
+
return (React__default.createElement("button", { ref: buttonRef, className: "".concat(styles$n.menuButton, " ").concat(showDropDown ? styles$n.active : ""), onClick: toggleDropDown, "aria-expanded": showDropDown, "aria-label": "Abrir menu" },
|
|
936
936
|
React__default.createElement(MenuIcon, { className: styles$n.iconMenu }),
|
|
937
937
|
showDropDown && (React__default.createElement(DropDown, { options: options, showDropDown: showDropDown, toggleDropDown: toggleDropDown, optionSelection: handleSelectOption }))));
|
|
938
938
|
};
|
|
@@ -8591,10 +8591,6 @@ var SelectMult = function (_a) {
|
|
|
8591
8591
|
!hasError && message && React__default.createElement("p", { className: styles$g.message }, message)));
|
|
8592
8592
|
};
|
|
8593
8593
|
|
|
8594
|
-
var css_248z$f = ".styles-module__selectContainer___uFP2d {\r\n width: 100%;\r\n font-size: var(--font-size-14);\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__selectContainer___uFP2d 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 (max-width: 480px) {\r\n .styles-module__selectContainer___uFP2d label {\r\n font-size: var(--font-size-12);\r\n }\r\n\r\n .styles-module__selectContainer___uFP2d {\r\n font-size: var(--font-size-12);\r\n }\r\n}\r\n\r\n.styles-module__errorText___grCcq {\r\n font-size: var(--font-size-12);\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___PNeLN {\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___SAMFM {\r\n display: flex;\r\n align-items: center;\r\n padding: 8px;\r\n}\r\n\r\n.styles-module__iconChefron___Cp81j {\r\n color: var(--color-label);\r\n}\r\n";
|
|
8595
|
-
var styles$f = {"selectContainer":"styles-module__selectContainer___uFP2d","errorText":"styles-module__errorText___grCcq","errorRequired":"styles-module__errorRequired___PNeLN","contentIcon":"styles-module__contentIcon___SAMFM","iconChefron":"styles-module__iconChefron___Cp81j"};
|
|
8596
|
-
styleInject(css_248z$f);
|
|
8597
|
-
|
|
8598
8594
|
function useDarkMode() {
|
|
8599
8595
|
var isClient = typeof document !== 'undefined';
|
|
8600
8596
|
var _a = useState(function () { return isClient && document.body.classList.contains('dark-mode'); }), isDarkMode = _a[0], setIsDarkMode = _a[1];
|
|
@@ -8638,6 +8634,10 @@ function useIsMobile(breakpoint) {
|
|
|
8638
8634
|
return isMobile;
|
|
8639
8635
|
}
|
|
8640
8636
|
|
|
8637
|
+
var css_248z$f = ".styles-module__selectContainer___uFP2d {\r\n width: 100%;\r\n font-size: var(--font-size-14);\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__selectContainer___uFP2d 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 (max-width: 480px) {\r\n .styles-module__selectContainer___uFP2d label {\r\n font-size: var(--font-size-12);\r\n }\r\n\r\n .styles-module__selectContainer___uFP2d {\r\n font-size: var(--font-size-12);\r\n }\r\n}\r\n\r\n.styles-module__errorText___grCcq {\r\n font-size: var(--font-size-12);\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___PNeLN {\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___SAMFM {\r\n display: flex;\r\n align-items: center;\r\n padding: 8px;\r\n}\r\n\r\n.styles-module__iconChefron___Cp81j {\r\n color: var(--color-label);\r\n}\r\n";
|
|
8638
|
+
var styles$f = {"selectContainer":"styles-module__selectContainer___uFP2d","errorText":"styles-module__errorText___grCcq","errorRequired":"styles-module__errorRequired___PNeLN","contentIcon":"styles-module__contentIcon___SAMFM","iconChefron":"styles-module__iconChefron___Cp81j"};
|
|
8639
|
+
styleInject(css_248z$f);
|
|
8640
|
+
|
|
8641
8641
|
var selectColourStyles$1 = function (isInvalid, isDarkMode, isMobile) { return ({
|
|
8642
8642
|
control: function (styles, _a) {
|
|
8643
8643
|
var isFocused = _a.isFocused, isDisabled = _a.isDisabled;
|
|
@@ -8650,11 +8650,19 @@ var selectColourStyles$1 = function (isInvalid, isDarkMode, isMobile) { return (
|
|
|
8650
8650
|
option: function (styles, _a) {
|
|
8651
8651
|
var isDisabled = _a.isDisabled, isFocused = _a.isFocused;
|
|
8652
8652
|
return (__assign(__assign({}, styles), { cursor: isDisabled ? "not-allowed" : "default", color: isDisabled ? "white" : isDarkMode ? "#fff" : "#303030CC", backgroundColor: isDarkMode
|
|
8653
|
-
? isFocused
|
|
8654
|
-
|
|
8653
|
+
? isFocused
|
|
8654
|
+
? "#303030"
|
|
8655
|
+
: "#4B4B4C"
|
|
8656
|
+
: isFocused
|
|
8657
|
+
? "#005A921A"
|
|
8658
|
+
: "#fff", fontSize: "inherit", ":hover": {
|
|
8655
8659
|
backgroundColor: isDarkMode
|
|
8656
|
-
? isFocused
|
|
8657
|
-
|
|
8660
|
+
? isFocused
|
|
8661
|
+
? "#303030"
|
|
8662
|
+
: "#4B4B4C"
|
|
8663
|
+
: isFocused
|
|
8664
|
+
? "#005A921A"
|
|
8665
|
+
: "#fff",
|
|
8658
8666
|
} }));
|
|
8659
8667
|
},
|
|
8660
8668
|
multiValue: function (styles) { return (__assign(__assign({}, styles), { backgroundColor: "#005a921a", borderRadius: "9px" })); },
|
|
@@ -8683,9 +8691,29 @@ var BasicSelect = function (_a) {
|
|
|
8683
8691
|
label,
|
|
8684
8692
|
isRequired ? React.createElement("span", { className: styles$f.errorRequired }, "*") : null)),
|
|
8685
8693
|
React.createElement("div", { className: styles$f.selectElement },
|
|
8686
|
-
React.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),
|
|
8694
|
+
React.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: {
|
|
8695
|
+
DropdownIndicator: CustomDropdownIndicator,
|
|
8696
|
+
ClearIndicator: CustomClearIndicator,
|
|
8697
|
+
}, "aria-label": typeof label === "string"
|
|
8698
|
+
? label
|
|
8699
|
+
: placeholder || "Campo para seleção" })),
|
|
8687
8700
|
hasError && (React.createElement("span", { className: styles$f.errorText }, "Campo obrigat\u00F3rio ou inv\u00E1lido"))));
|
|
8688
8701
|
};
|
|
8702
|
+
var CustomClearIndicator = function (props) {
|
|
8703
|
+
var innerProps = props.innerProps, clearValue = props.clearValue, inputId = props.selectProps.inputId;
|
|
8704
|
+
var handleClear = function (e) {
|
|
8705
|
+
e.preventDefault();
|
|
8706
|
+
e.stopPropagation();
|
|
8707
|
+
clearValue();
|
|
8708
|
+
var input = document.getElementById(inputId || "");
|
|
8709
|
+
input === null || input === void 0 ? void 0 : input.focus();
|
|
8710
|
+
};
|
|
8711
|
+
return (React.createElement(components.ClearIndicator, __assign({}, props, { innerProps: __assign(__assign({}, innerProps), { tabIndex: 0, role: "button", "aria-label": "Limpar opção selecionada", onMouseDown: handleClear, onTouchEnd: handleClear, onKeyDown: function (e) {
|
|
8712
|
+
if (e.key === " " || e.key === "Enter") {
|
|
8713
|
+
handleClear(e);
|
|
8714
|
+
}
|
|
8715
|
+
} }) })));
|
|
8716
|
+
};
|
|
8689
8717
|
|
|
8690
8718
|
var css_248z$e = ".header-module__separator_background___Sicie {\r\n background-color: rgb(188, 157, 50);\r\n width: 100%;\r\n height: 4px;\r\n opacity: 1;\r\n}\r\n\r\n.header-module__headerContentWrapper___3CWPS {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n width: 100%;\r\n max-width: 1440px;\r\n padding: 0px 72px;\r\n}\r\n\r\n@media (max-width: 600px) {\r\n .header-module__headerContentWrapper___3CWPS {\r\n padding: 0px 4px;\r\n }\r\n}\r\n\r\n.header-module__container___pv1f6 {\r\n height: 100%;\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 28px 0px;\r\n min-width: 1024px;\r\n\r\n @media (max-width: 1024px) {\r\n padding: 22px 16px;\r\n min-width: 100%;\r\n }\r\n}\r\n\r\n.header-module__wrapperMenu___qgf2- {\r\n display: flex;\r\n gap: 24px;\r\n align-items: center;\r\n\r\n @media (max-width: 1024px) {\r\n gap: 8px;\r\n }\r\n}\r\n\r\n.header-module__iconLogo___Sr8Ih {\r\n @media (max-width: 1024px) {\r\n width: 100px;\r\n }\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .header-module__iconLogo___Sr8Ih {\r\n width: 64px;\r\n height: 25px;\r\n }\r\n}\r\n\r\n.header-module__verticalDivider___j6I1p {\r\n content: \"\";\r\n display: inline-block;\r\n height: 50px;\r\n width: 1px;\r\n background-color: #ccc;\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\n.header-module__containerHeaderIndex___6ddUY {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n max-height: 6rem;\r\n font-size: 2rem;\r\n box-shadow: 0px 15px 10px -15px rgba(0, 0, 0, 0.19);\r\n background-color: var(--header-bg-main-color);\r\n}\r\n\r\n.header-module__set_shadow___Wwh0E {\r\n border-radius: 0px 0px 16px 16px;\r\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);\r\n}\r\n\r\n.header-module__limitedWidth___PhM7B {\r\n max-width: 1440px;\r\n margin: 0 auto;\r\n}\r\n\r\n@media (min-width: 640px) {\r\n .header-module__containerHeaderIndex___6ddUY {\r\n max-height: 6rem;\r\n }\r\n}\r\n\r\n@media (min-width: 768px) {\r\n .header-module__containerHeaderIndex___6ddUY {\r\n max-height: 13rem;\r\n }\r\n}\r\n\r\n.header-module__iconLogoCASC___HX7YL {\r\n height: 65px;\r\n width: auto;\r\n}\r\n\r\n.header-module__iconLogoPGE___II1i2 {\r\n margin-right: 20px;\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .header-module__iconLogoCASC___HX7YL {\r\n height: 45px;\r\n width: auto;\r\n }\r\n}\r\n\r\n.header-module__responsiveCASC___nqE60 {\r\n @media (max-width: 1024px) {\r\n .header-module__iconLogoCASC___HX7YL {\r\n height: 45px;\r\n width: auto;\r\n }\r\n }\r\n\r\n @media (max-width: 600px) {\r\n .header-module__iconLogoCASC___HX7YL {\r\n height: 40px;\r\n width: auto;\r\n }\r\n }\r\n}\r\n\r\n.header-module__dividaAtivaLogoContainer___k6PDu {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n gap: 4px;\r\n}\r\n\r\n.header-module__IconMenu___guscJ {\r\n display: flex;\r\n max-height: 48px;\r\n}\r\n";
|
|
8691
8719
|
var styles$e = {"separator_background":"header-module__separator_background___Sicie","headerContentWrapper":"header-module__headerContentWrapper___3CWPS","container":"header-module__container___pv1f6","wrapperMenu":"header-module__wrapperMenu___qgf2-","iconLogo":"header-module__iconLogo___Sr8Ih","verticalDivider":"header-module__verticalDivider___j6I1p","containerHeaderIndex":"header-module__containerHeaderIndex___6ddUY","set_shadow":"header-module__set_shadow___Wwh0E","limitedWidth":"header-module__limitedWidth___PhM7B","iconLogoCASC":"header-module__iconLogoCASC___HX7YL","iconLogoPGE":"header-module__iconLogoPGE___II1i2","responsiveCASC":"header-module__responsiveCASC___nqE60","dividaAtivaLogoContainer":"header-module__dividaAtivaLogoContainer___k6PDu","IconMenu":"header-module__IconMenu___guscJ"};
|