pge-front-common 14.2.33 → 14.2.35
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.d.ts +13 -6
- package/lib/index.esm.js +43 -8
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +43 -7
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -296,7 +296,12 @@ type OptionsProps$2 = {
|
|
|
296
296
|
|
|
297
297
|
declare const SelectMult: ({ name, optionsSelect, value, placeholder, label, handleChange, isMulti, disabled, fetchOptions, required, textError, hasError, message, Icon, isSearchable, isClearable, isCheckedAll, maxMenuHeight, }: SelectMultProps) => React__default.JSX.Element;
|
|
298
298
|
|
|
299
|
-
interface
|
|
299
|
+
interface ReactSelectMenuPortalProps {
|
|
300
|
+
usarMenuPortal?: boolean;
|
|
301
|
+
zIndexMenuPortal?: number;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
interface SelectDefaultProps$1 extends ReactSelectMenuPortalProps {
|
|
300
305
|
name: string;
|
|
301
306
|
optionsSelect: OptionsProps$1[];
|
|
302
307
|
value: any;
|
|
@@ -316,7 +321,7 @@ type OptionsProps$1 = {
|
|
|
316
321
|
value: string;
|
|
317
322
|
};
|
|
318
323
|
|
|
319
|
-
declare const BasicSelect: ({ name, optionsSelect, placeholder, isDisabled, label, hasError, handleChange, isRequired, value, isClearable, }: SelectDefaultProps$1) => React$1.JSX.Element;
|
|
324
|
+
declare const BasicSelect: ({ name, optionsSelect, placeholder, isDisabled, label, hasError, handleChange, isRequired, value, isClearable, usarMenuPortal, zIndexMenuPortal, }: SelectDefaultProps$1) => React$1.JSX.Element;
|
|
320
325
|
|
|
321
326
|
interface Props {
|
|
322
327
|
isOpen: boolean;
|
|
@@ -460,10 +465,10 @@ interface TimeInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "ty
|
|
|
460
465
|
|
|
461
466
|
declare const TimeInput: ({ restrictionMessage, label, onChange, isError, valueTime, disabled, placeholder, required, minutesStep, hoursRange: hoursRangeProp, textoCancelar, textoConfirmar, ...inputProps }: TimeInputProps) => React__default.JSX.Element;
|
|
462
467
|
|
|
463
|
-
interface SelectDefaultProps {
|
|
468
|
+
interface SelectDefaultProps extends ReactSelectMenuPortalProps {
|
|
464
469
|
name: string;
|
|
465
470
|
optionsSelect: OptionsProps[];
|
|
466
|
-
value
|
|
471
|
+
value?: any;
|
|
467
472
|
placeholder?: string;
|
|
468
473
|
className?: string;
|
|
469
474
|
label?: string;
|
|
@@ -485,7 +490,7 @@ type OptionsProps = {
|
|
|
485
490
|
isDisabled?: boolean;
|
|
486
491
|
};
|
|
487
492
|
|
|
488
|
-
declare const SelectDefault: ({ name, control, optionsSelect, placeholder, isDisabled, label, hasError, handleChange, isRequired, value, handleInputChange, formatOptionLabel, isClearable, maxMenuHeight, noOptionsMessage, }: SelectDefaultProps) => React$1.JSX.Element;
|
|
493
|
+
declare const SelectDefault: ({ name, control, optionsSelect, placeholder, isDisabled, label, hasError, handleChange, isRequired, value, handleInputChange, formatOptionLabel, isClearable, maxMenuHeight, noOptionsMessage, usarMenuPortal, zIndexMenuPortal, }: SelectDefaultProps) => React$1.JSX.Element;
|
|
489
494
|
|
|
490
495
|
interface ModalProps$1 {
|
|
491
496
|
isModalOpen: boolean;
|
|
@@ -842,7 +847,9 @@ declare const IconAlarmClock: ({ className, ...props }: SVGProps<SVGSVGElement>)
|
|
|
842
847
|
|
|
843
848
|
declare const IconPlus: ({ className, ...props }: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
|
|
844
849
|
|
|
850
|
+
declare const IconExclamation: ({ className, ...props }: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
|
|
851
|
+
|
|
845
852
|
declare function installPrimeReactStyles(): void;
|
|
846
853
|
|
|
847
|
-
export { Accordion, AccordionItem, BasicSelect, Blanket, BoxError, BoxSuccess, Button, Checkbox, Chip, CommonDotIcon, DateInput, Dropdown, Fieldset, FileUpload, FloatingMenu, FooterPge as Footer, Header, HeaderPge, IconAdd, IconAddCell, IconAlarmClock, IconAlertInfo, IconAnalyze, IconAnalyzeDocument, IconArrowExpland, IconArrowLeft, IconArrowRecall, IconArrowRight, IconBloco, IconCLose, IconCalculate, IconCalendar, IconCertidaoRegularidade, IconCheck, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconConfig, IconCopy, IconDebitoFiscal, IconDelete, IconDocumento, IconDotsVertical, IconDownload, IconEdit, IconEmissaoDarj, IconEventAvaliable, IconExclude, IconFluxo, IconHourglass, IconInfoRound, IconInvisibility, IconLeftDirection, IconLista, IconLoadingProgress, IconLock, IconLogout, IconMail, IconMedalha, IconNewTab, IconParcelamento, IconPayment, IconPdf, IconPlus, IconPrint, IconProfile, IconQuestionMark, IconRemove, IconReport, IconRequerimentoAdm, IconRightDirection, IconRoundAddCell, IconSearch, IconStatement, IconSwap, IconTriangleExpand, IconTriangleRecall, IconTwoUsers, IconTwoUsersSearch, IconUpAndDownArror, IconUpArrow, IconUpload, IconUploadFile, IconUploadFile2, IconUploadV2, IconUsers, IconValue, IconView, IconVisibility, IconWarning, InformativeBox, InputBase, LoadingSpinner, Menu, MenuAction, MenuList, Modal, ModalBody, ModalFooter, ModalHeader, ModalUI, Option, OverlayLoadingSpinner, PaginationTable, Pagination as PaginationV2, PasswordInput, PgeButton, ProgressCircle, RadioButton, RadioGroupBase, SelectDefault, SelectMult, SkeletonLoader, Switch, Table, TableBody, TableCell, TableComponent, TableFooter, TableHeader, TableRow, TextareaBase, TimeInput, Title, Tooltip, TooltipWithPortal, TreeSelect, installPrimeReactStyles };
|
|
854
|
+
export { Accordion, AccordionItem, BasicSelect, Blanket, BoxError, BoxSuccess, Button, Checkbox, Chip, CommonDotIcon, DateInput, Dropdown, Fieldset, FileUpload, FloatingMenu, FooterPge as Footer, Header, HeaderPge, IconAdd, IconAddCell, IconAlarmClock, IconAlertInfo, IconAnalyze, IconAnalyzeDocument, IconArrowExpland, IconArrowLeft, IconArrowRecall, IconArrowRight, IconBloco, IconCLose, IconCalculate, IconCalendar, IconCertidaoRegularidade, IconCheck, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconConfig, IconCopy, IconDebitoFiscal, IconDelete, IconDocumento, IconDotsVertical, IconDownload, IconEdit, IconEmissaoDarj, IconEventAvaliable, IconExclamation, IconExclude, IconFluxo, IconHourglass, IconInfoRound, IconInvisibility, IconLeftDirection, IconLista, IconLoadingProgress, IconLock, IconLogout, IconMail, IconMedalha, IconNewTab, IconParcelamento, IconPayment, IconPdf, IconPlus, IconPrint, IconProfile, IconQuestionMark, IconRemove, IconReport, IconRequerimentoAdm, IconRightDirection, IconRoundAddCell, IconSearch, IconStatement, IconSwap, IconTriangleExpand, IconTriangleRecall, IconTwoUsers, IconTwoUsersSearch, IconUpAndDownArror, IconUpArrow, IconUpload, IconUploadFile, IconUploadFile2, IconUploadV2, IconUsers, IconValue, IconView, IconVisibility, IconWarning, InformativeBox, InputBase, LoadingSpinner, Menu, MenuAction, MenuList, Modal, ModalBody, ModalFooter, ModalHeader, ModalUI, Option, OverlayLoadingSpinner, PaginationTable, Pagination as PaginationV2, PasswordInput, PgeButton, ProgressCircle, RadioButton, RadioGroupBase, SelectDefault, SelectMult, SkeletonLoader, Switch, Table, TableBody, TableCell, TableComponent, TableFooter, TableHeader, TableRow, TextareaBase, TimeInput, Title, Tooltip, TooltipWithPortal, TreeSelect, installPrimeReactStyles };
|
|
848
855
|
export type { AccordionItemProps, ButtonProps, ChipProps, Column, FieldsetProps, InformativeBoxProps, InputProps, OptionsProps$2 as OptionsProps, PaginationProps, PaginationTableProps, ProgressCircleProps, RadioButtonProps, RadioGroupBaseProps, SelectDefaultProps, SelectMultProps, TableComponentProps, TextareaBaseProps, TimeInputProps, TreeSelectOptions, TreeSelectProps };
|
package/lib/index.esm.js
CHANGED
|
@@ -645,6 +645,12 @@ var IconPlus = function (_a) {
|
|
|
645
645
|
React__default.createElement("path", { d: "M4 9.33333V5.33333H0V4H4V0H5.33333V4H9.33333V5.33333H5.33333V9.33333H4Z", fill: "currentColor" })));
|
|
646
646
|
};
|
|
647
647
|
|
|
648
|
+
var IconExclamation = function (_a) {
|
|
649
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
650
|
+
return (React__default.createElement("svg", __assign({ viewBox: "0 0 2 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, props),
|
|
651
|
+
React__default.createElement("path", { d: "M0 9V0H2V9H0ZM0 14V12H2V14H0Z", fill: "currentColor" })));
|
|
652
|
+
};
|
|
653
|
+
|
|
648
654
|
var css_248z$J = ".styles-module__toast___JCV9s {\r\n height: auto;\r\n border-radius: 8px;\r\n padding: 12px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.styles-module__toast___JCV9s.styles-module__fullWidth___LJFXr {\r\n width: 100%;\r\n}\r\n\r\n.styles-module__toast___JCV9s.styles-module__fitContent___9F6bX {\r\n width: fit-content;\r\n}\r\n\r\n.styles-module__toast___JCV9s.styles-module__success___-BEJb {\r\n background-color: var(--bg-informative-success);\r\n}\r\n\r\n.styles-module__title___TK6Kt.styles-module__success___-BEJb {\r\n color: var(--success-color);\r\n line-height: 120%;\r\n}\r\n\r\n.styles-module__toast___JCV9s.styles-module__alert___Gum-6 {\r\n background-color: var(--bg-informative-alert);\r\n}\r\n\r\n.styles-module__title___TK6Kt.styles-module__alert___Gum-6 {\r\n color: var(--alert-color);\r\n line-height: 120%;\r\n}\r\n\r\n.styles-module__toast___JCV9s.styles-module__warning___CVMAV {\r\n background-color: var(--bg-informative-warning);\r\n}\r\n\r\n.styles-module__title___TK6Kt.styles-module__warning___CVMAV {\r\n color: var(--warning-color);\r\n line-height: 120%;\r\n}\r\n\r\n.styles-module__toast___JCV9s.styles-module__informative___0nyLv {\r\n background-color: var(--bg-informative);\r\n}\r\n\r\n.styles-module__title___TK6Kt.styles-module__informative___0nyLv {\r\n color: var(--information-color);\r\n line-height: 120%;\r\n}\r\n\r\n.styles-module__content___AING8 {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n width: 100%;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__info___g8ce2 {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n\r\n.styles-module__iconSize___os5JS {\r\n width: 20px;\r\n height: 20px;\r\n flex-shrink: 0;\r\n}\r\n\r\n@media screen and (max-width: 480px) {\r\n .styles-module__iconSize___os5JS {\r\n width: 20px;\r\n height: 20px;\r\n }\r\n}\r\n\r\n.styles-module__icon___uiYA-.styles-module__success___-BEJb {\r\n color: var(--success-color);\r\n}\r\n\r\n.styles-module__icon___uiYA-.styles-module__alert___Gum-6 {\r\n color: var(--alert-color);\r\n}\r\n\r\n.styles-module__icon___uiYA-.styles-module__warning___CVMAV {\r\n color: var(--warning-color);\r\n}\r\n\r\n.styles-module__icon___uiYA-.styles-module__informative___0nyLv {\r\n color: var(--information-color);\r\n}\r\n\r\n.styles-module__text___UCxPH {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n gap: 4px;\r\n}\r\n\r\n.styles-module__text___UCxPH strong {\r\n font-size: var(--font-size-16, 16px);\r\n font-weight: 700;\r\n line-height: 16px;\r\n text-align: left;\r\n text-decoration-skip-ink: none;\r\n}\r\n\r\n@media screen and (max-width: 480px) {\r\n .styles-module__text___UCxPH strong {\r\n font-size: var(--font-size-12, 12px);\r\n }\r\n}\r\n\r\n.styles-module__text___UCxPH span {\r\n font-weight: 400;\r\n text-align: left;\r\n text-decoration-skip-ink: none;\r\n}\r\n\r\n.styles-module__textContent___S1KEv {\r\n color: var(--foreground);\r\n font-size: var(--font-size-16);\r\n}\r\n\r\n.styles-module__textContent___S1KEv.styles-module__success___-BEJb {\r\n font-weight: 700;\r\n color: var(--success-color);\r\n}\r\n\r\n.styles-module__textContent___S1KEv.styles-module__alert___Gum-6 {\r\n font-weight: 700;\r\n color: var(--alert-color);\r\n}\r\n\r\n.styles-module__textContent___S1KEv.styles-module__warning___CVMAV {\r\n font-weight: 700;\r\n color: var(--warning-color);\r\n}\r\n.styles-module__textContent___S1KEv.styles-module__informative___0nyLv {\r\n color: var(--information-color);\r\n font-weight: 700;\r\n}\r\n\r\n@media screen and (max-width: 480px) {\r\n .styles-module__textContent___S1KEv {\r\n font-size: var(--font-size-12);\r\n }\r\n}\r\n\r\n.styles-module__closeButton___ELkqN {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n font-size: var(--font-size-20, 20px);\r\n color: var(--foreground);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n@media screen and (max-width: 480px) {\r\n .styles-module__closeButton___ELkqN {\r\n display: none;\r\n }\r\n}\r\n\r\n.styles-module__closeButton___ELkqN:hover {\r\n color: var(--foreground);\r\n}\r\n\r\n.styles-module__iconClose___OPoN8 {\r\n color: var(--foreground);\r\n}\r\n";
|
|
649
655
|
var styles$F = {"toast":"styles-module__toast___JCV9s","fullWidth":"styles-module__fullWidth___LJFXr","fitContent":"styles-module__fitContent___9F6bX","success":"styles-module__success___-BEJb","title":"styles-module__title___TK6Kt","alert":"styles-module__alert___Gum-6","warning":"styles-module__warning___CVMAV","informative":"styles-module__informative___0nyLv","content":"styles-module__content___AING8","info":"styles-module__info___g8ce2","iconSize":"styles-module__iconSize___os5JS","icon":"styles-module__icon___uiYA-","text":"styles-module__text___UCxPH","textContent":"styles-module__textContent___S1KEv","closeButton":"styles-module__closeButton___ELkqN","iconClose":"styles-module__iconClose___OPoN8"};
|
|
650
656
|
styleInject(css_248z$J);
|
|
@@ -8889,6 +8895,29 @@ var css_248z$n = ".styles-module__selectContainer___uFP2d {\r\n width: 100%;\r\
|
|
|
8889
8895
|
var styles$m = {"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"};
|
|
8890
8896
|
styleInject(css_248z$n);
|
|
8891
8897
|
|
|
8898
|
+
var Z_INDEX_MENU_PORTAL_PADRAO = 9999;
|
|
8899
|
+
function obterConfigMenuPortal(usarMenuPortal, zIndex) {
|
|
8900
|
+
if (zIndex === void 0) { zIndex = Z_INDEX_MENU_PORTAL_PADRAO; }
|
|
8901
|
+
if (!usarMenuPortal) {
|
|
8902
|
+
return {
|
|
8903
|
+
menuPortalTarget: undefined,
|
|
8904
|
+
menuPosition: "absolute",
|
|
8905
|
+
estiloMenuPortal: undefined,
|
|
8906
|
+
};
|
|
8907
|
+
}
|
|
8908
|
+
return {
|
|
8909
|
+
menuPortalTarget: typeof document !== "undefined" ? document.body : undefined,
|
|
8910
|
+
menuPosition: "fixed",
|
|
8911
|
+
estiloMenuPortal: function (base) { return (__assign(__assign({}, base), { zIndex: zIndex })); },
|
|
8912
|
+
};
|
|
8913
|
+
}
|
|
8914
|
+
function mesclarEstilosComPortal(estilos, estiloMenuPortal) {
|
|
8915
|
+
if (!estiloMenuPortal) {
|
|
8916
|
+
return estilos;
|
|
8917
|
+
}
|
|
8918
|
+
return __assign(__assign({}, estilos), { menuPortal: estiloMenuPortal });
|
|
8919
|
+
}
|
|
8920
|
+
|
|
8892
8921
|
var selectColourStyles$1 = function (isInvalid, isDarkMode, isMobile) { return ({
|
|
8893
8922
|
control: function (styles, _a) {
|
|
8894
8923
|
var isFocused = _a.isFocused, isDisabled = _a.isDisabled;
|
|
@@ -8932,9 +8961,12 @@ var selectColourStyles$1 = function (isInvalid, isDarkMode, isMobile) { return (
|
|
|
8932
8961
|
menuList: function (base) { return (__assign(__assign({}, base), { backgroundColor: isDarkMode ? "#4B4B4C" : "#fff", padding: "0.5rem 0", borderRadius: "8px" })); },
|
|
8933
8962
|
}); };
|
|
8934
8963
|
var BasicSelect = function (_a) {
|
|
8935
|
-
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;
|
|
8964
|
+
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, _e = _a.usarMenuPortal, usarMenuPortal = _e === void 0 ? false : _e, _f = _a.zIndexMenuPortal, zIndexMenuPortal = _f === void 0 ? Z_INDEX_MENU_PORTAL_PADRAO : _f;
|
|
8936
8965
|
var isDarkMode = useDarkMode();
|
|
8937
8966
|
useIsMobile();
|
|
8967
|
+
var _g = obterConfigMenuPortal(usarMenuPortal, zIndexMenuPortal), menuPortalTarget = _g.menuPortalTarget, menuPosition = _g.menuPosition, estiloMenuPortal = _g.estiloMenuPortal;
|
|
8968
|
+
var estilos = selectColourStyles$1(hasError, isDarkMode);
|
|
8969
|
+
var estilosComPortal = mesclarEstilosComPortal(estilos, estiloMenuPortal);
|
|
8938
8970
|
var CustomDropdownIndicator = function () { return (React.createElement("div", { className: styles$m.contentIcon },
|
|
8939
8971
|
React.createElement(IconTriangleRecall, { className: styles$m.iconChefron }))); };
|
|
8940
8972
|
return (React.createElement("div", { className: "".concat(styles$m.selectContainer) },
|
|
@@ -8942,10 +8974,10 @@ var BasicSelect = function (_a) {
|
|
|
8942
8974
|
label,
|
|
8943
8975
|
isRequired ? React.createElement("span", { className: styles$m.errorRequired }, "*") : null)),
|
|
8944
8976
|
React.createElement("div", { className: styles$m.selectElement },
|
|
8945
|
-
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:
|
|
8977
|
+
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: estilosComPortal, isSearchable: true, isClearable: isClearable, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: {
|
|
8946
8978
|
DropdownIndicator: CustomDropdownIndicator,
|
|
8947
8979
|
ClearIndicator: CustomClearIndicator,
|
|
8948
|
-
}, "aria-label": typeof label === "string"
|
|
8980
|
+
}, menuPortalTarget: menuPortalTarget, menuPosition: menuPosition, "aria-label": typeof label === "string"
|
|
8949
8981
|
? label
|
|
8950
8982
|
: placeholder || "Campo para seleção" })),
|
|
8951
8983
|
hasError && (React.createElement("span", { className: styles$m.errorText }, "Campo obrigat\u00F3rio ou inv\u00E1lido"))));
|
|
@@ -22395,9 +22427,9 @@ var selectColourStyles = function (isInvalid, isMobile, maxMenuHeight) { return
|
|
|
22395
22427
|
menuList: function (styles) { return (__assign(__assign({}, styles), { maxHeight: maxMenuHeight ? "".concat(maxMenuHeight, "px") : "300px" })); },
|
|
22396
22428
|
}); };
|
|
22397
22429
|
var SelectDefault = function (_a) {
|
|
22398
|
-
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;
|
|
22399
|
-
var
|
|
22400
|
-
var
|
|
22430
|
+
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, _f = _a.usarMenuPortal, usarMenuPortal = _f === void 0 ? false : _f, _g = _a.zIndexMenuPortal, zIndexMenuPortal = _g === void 0 ? Z_INDEX_MENU_PORTAL_PADRAO : _g;
|
|
22431
|
+
var _h = useController({ name: name, control: control }), _j = _h.field; _j.onChange; _j.value; var rest = __rest(_j, ["onChange", "value"]), error = _h.fieldState.error;
|
|
22432
|
+
var _k = React.useState(typeof window !== "undefined" && window.innerWidth <= 768), isMobile = _k[0], setIsMobile = _k[1];
|
|
22401
22433
|
var CustomDropdownIndicator = function () {
|
|
22402
22434
|
return (React.createElement("div", { className: styles$c.contentIcon },
|
|
22403
22435
|
React.createElement(IconTriangleRecall, { className: styles$c.iconChefron })));
|
|
@@ -22409,6 +22441,9 @@ var SelectDefault = function (_a) {
|
|
|
22409
22441
|
window.addEventListener("resize", onResize);
|
|
22410
22442
|
return function () { return window.removeEventListener("resize", onResize); };
|
|
22411
22443
|
}, []);
|
|
22444
|
+
var _l = obterConfigMenuPortal(usarMenuPortal, zIndexMenuPortal), menuPortalTarget = _l.menuPortalTarget, menuPosition = _l.menuPosition, estiloMenuPortal = _l.estiloMenuPortal;
|
|
22445
|
+
var estilos = selectColourStyles(hasError || !!error, isMobile, maxMenuHeight);
|
|
22446
|
+
var estilosComPortal = mesclarEstilosComPortal(estilos, estiloMenuPortal);
|
|
22412
22447
|
return (React.createElement("div", { className: "".concat(styles$c.selectContainer) },
|
|
22413
22448
|
label && (React.createElement("label", null,
|
|
22414
22449
|
label,
|
|
@@ -22419,7 +22454,7 @@ var SelectDefault = function (_a) {
|
|
|
22419
22454
|
if (inputValue) {
|
|
22420
22455
|
handleInputChange === null || handleInputChange === void 0 ? void 0 : handleInputChange(inputValue);
|
|
22421
22456
|
}
|
|
22422
|
-
}, placeholder: placeholder, styles:
|
|
22457
|
+
}, placeholder: placeholder, styles: estilosComPortal, isClearable: isClearable, isSearchable: true, formatOptionLabel: formatOptionLabel, noOptionsMessage: function () { return noOptionsMessage || "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator }, menuPortalTarget: menuPortalTarget, menuPosition: menuPosition, "aria-label": label || placeholder || "Campo para seleção", inputId: "".concat(name, "-input") }, rest))),
|
|
22423
22458
|
error && React.createElement("span", { className: styles$c.errorText }, error.message)));
|
|
22424
22459
|
};
|
|
22425
22460
|
|
|
@@ -28426,5 +28461,5 @@ function installPrimeReactStyles() {
|
|
|
28426
28461
|
require("primereact/resources/primereact.css");
|
|
28427
28462
|
}
|
|
28428
28463
|
|
|
28429
|
-
export { Accordion, AccordionItem, BasicSelect, Blanket, BoxError, BoxSuccess, Button$1 as Button, Checkbox$1 as Checkbox, Chip, CommonDotIcon, DateInput, Dropdown, Fieldset, FileUpload, FloatingMenu, FooterPge as Footer, Header, HeaderPge, IconAdd, IconAddCell, IconAlarmClock, IconAlertInfo, IconAnalyze, IconAnalyzeDocument, IconArrowExpland, IconArrowLeft, IconArrowRecall, IconArrowRight, IconBloco, IconCLose, IconCalculate, IconCalendar, IconCertidaoRegularidade, IconCheck, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconConfig, IconCopy, IconDebitoFiscal, IconDelete$1 as IconDelete, IconDocumento, IconDotsVertical, IconDownload, IconEdit, IconEmissaoDarj, IconEventAvaliable, IconExclude, IconFluxo, IconHourglass, IconInfoRound, IconInvisibility, IconLeftDirection, IconLista, IconLoadingProgress, IconLock, IconLogout, IconMail, IconMedalha, IconNewTab, IconParcelamento, IconPayment, IconPdf, IconPlus, IconPrint, IconProfile, IconQuestionMark, IconRemove, IconReport, IconRequerimentoAdm, IconRightDirection, IconRoundAddCell, IconSearch, IconStatement, IconSwap, IconTriangleExpand, IconTriangleRecall, IconTwoUsers, IconTwoUsersSearch, IconUpAndDownArror, IconUpArrow, IconUpload, IconUploadFile, IconUploadFile2, IconUploadV2, IconUsers, IconValue, IconView, IconVisibility, IconWarning, InformativeBox, InputBase, LoadingSpinner, Menu, MenuAction, MenuList, Modal, ModalBody, ModalFooter, ModalHeader, ModalUI, Option, OverlayLoadingSpinner, PaginationTable, Pagination as PaginationV2, PasswordInput, PgeButton, ProgressCircle, RadioButton, RadioGroupBase, SelectDefault, SelectMult, SkeletonLoader, Switch, Table, TableBody, TableCell, TableComponent, TableFooter, TableHeader, TableRow, TextareaBase, TimeInput, Title$1 as Title, Tooltip$1 as Tooltip, TooltipWithPortal, TreeSelect, installPrimeReactStyles };
|
|
28464
|
+
export { Accordion, AccordionItem, BasicSelect, Blanket, BoxError, BoxSuccess, Button$1 as Button, Checkbox$1 as Checkbox, Chip, CommonDotIcon, DateInput, Dropdown, Fieldset, FileUpload, FloatingMenu, FooterPge as Footer, Header, HeaderPge, IconAdd, IconAddCell, IconAlarmClock, IconAlertInfo, IconAnalyze, IconAnalyzeDocument, IconArrowExpland, IconArrowLeft, IconArrowRecall, IconArrowRight, IconBloco, IconCLose, IconCalculate, IconCalendar, IconCertidaoRegularidade, IconCheck, IconCheckCircle, IconCircleExpland, IconCircleRecall, IconConfig, IconCopy, IconDebitoFiscal, IconDelete$1 as IconDelete, IconDocumento, IconDotsVertical, IconDownload, IconEdit, IconEmissaoDarj, IconEventAvaliable, IconExclamation, IconExclude, IconFluxo, IconHourglass, IconInfoRound, IconInvisibility, IconLeftDirection, IconLista, IconLoadingProgress, IconLock, IconLogout, IconMail, IconMedalha, IconNewTab, IconParcelamento, IconPayment, IconPdf, IconPlus, IconPrint, IconProfile, IconQuestionMark, IconRemove, IconReport, IconRequerimentoAdm, IconRightDirection, IconRoundAddCell, IconSearch, IconStatement, IconSwap, IconTriangleExpand, IconTriangleRecall, IconTwoUsers, IconTwoUsersSearch, IconUpAndDownArror, IconUpArrow, IconUpload, IconUploadFile, IconUploadFile2, IconUploadV2, IconUsers, IconValue, IconView, IconVisibility, IconWarning, InformativeBox, InputBase, LoadingSpinner, Menu, MenuAction, MenuList, Modal, ModalBody, ModalFooter, ModalHeader, ModalUI, Option, OverlayLoadingSpinner, PaginationTable, Pagination as PaginationV2, PasswordInput, PgeButton, ProgressCircle, RadioButton, RadioGroupBase, SelectDefault, SelectMult, SkeletonLoader, Switch, Table, TableBody, TableCell, TableComponent, TableFooter, TableHeader, TableRow, TextareaBase, TimeInput, Title$1 as Title, Tooltip$1 as Tooltip, TooltipWithPortal, TreeSelect, installPrimeReactStyles };
|
|
28430
28465
|
//# sourceMappingURL=index.esm.js.map
|