pge-front-common 14.0.47 → 14.0.49
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 +26 -21
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +25 -20
- package/lib/index.js.map +1 -1
- package/lib/lib/index.esm.js +23979 -0
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, forwardRef, useRef, useImperativeHandle, useEffect,
|
|
2
|
+
import React__default, { useId as useId$1, useState, forwardRef, useRef, useImperativeHandle, useEffect, useCallback, useContext, useLayoutEffect, useMemo, createContext, Component, Fragment } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
import ReactDOM__default, { createPortal } from 'react-dom';
|
|
5
5
|
import { jsx as jsx$1, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
|
|
@@ -371,12 +371,16 @@ var IconSearch = function (_a) {
|
|
|
371
371
|
React__default.createElement("path", { d: "M16.3333 17.5L11.0833 12.25C10.6667 12.5833 10.1875 12.8472 9.64583 13.0417C9.10417 13.2361 8.52778 13.3333 7.91667 13.3333C6.40278 13.3333 5.12153 12.809 4.07292 11.7604C3.02431 10.7118 2.5 9.43056 2.5 7.91667C2.5 6.40278 3.02431 5.12153 4.07292 4.07292C5.12153 3.02431 6.40278 2.5 7.91667 2.5C9.43056 2.5 10.7118 3.02431 11.7604 4.07292C12.809 5.12153 13.3333 6.40278 13.3333 7.91667C13.3333 8.52778 13.2361 9.10417 13.0417 9.64583C12.8472 10.1875 12.5833 10.6667 12.25 11.0833L17.5 16.3333L16.3333 17.5ZM7.91667 11.6667C8.95833 11.6667 9.84375 11.3021 10.5729 10.5729C11.3021 9.84375 11.6667 8.95833 11.6667 7.91667C11.6667 6.875 11.3021 5.98958 10.5729 5.26042C9.84375 4.53125 8.95833 4.16667 7.91667 4.16667C6.875 4.16667 5.98958 4.53125 5.26042 5.26042C4.53125 5.98958 4.16667 6.875 4.16667 7.91667C4.16667 8.95833 4.53125 9.84375 5.26042 10.5729C5.98958 11.3021 6.875 11.6667 7.91667 11.6667Z", fill: "currentColor" })));
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
-
var IconUpAndDownArror = function (props) {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
React__default.createElement("
|
|
378
|
-
React__default.createElement("
|
|
379
|
-
React__default.createElement("
|
|
374
|
+
var IconUpAndDownArror = function (props) {
|
|
375
|
+
var id = useId$1();
|
|
376
|
+
var clipId = "clip-".concat(id.replace(/[:]/g, ""));
|
|
377
|
+
return (React__default.createElement("svg", __assign({ width: "23", height: "15", viewBox: "0 0 23 15", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
378
|
+
React__default.createElement("g", { clipPath: "url(#".concat(clipId, ")") },
|
|
379
|
+
React__default.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.0621 13.1248C10.1781 13.1248 10.2894 13.0787 10.3714 12.9967C10.4535 12.9146 10.4996 12.8033 10.4996 12.6873V2.36843L13.2523 5.12206C13.3345 5.20421 13.4459 5.25036 13.5621 5.25036C13.6783 5.25036 13.7897 5.20421 13.8718 5.12206C13.954 5.0399 14.0001 4.92848 14.0001 4.81231C14.0001 4.69613 13.954 4.58471 13.8718 4.50256L10.3718 1.00256C10.3312 0.961813 10.2829 0.929488 10.2298 0.907432C10.1766 0.885376 10.1196 0.874023 10.0621 0.874023C10.0045 0.874023 9.94755 0.885376 9.8944 0.907432C9.84124 0.929488 9.79297 0.961813 9.75233 1.00256L6.25233 4.50256C6.17018 4.58471 6.12402 4.69613 6.12402 4.81231C6.12402 4.92848 6.17018 5.0399 6.25233 5.12206C6.33448 5.20421 6.4459 5.25036 6.56208 5.25036C6.67826 5.25036 6.78968 5.20421 6.87183 5.12206L9.62458 2.36843V12.6873C9.62458 12.8033 9.67067 12.9146 9.75272 12.9967C9.83476 13.0787 9.94604 13.1248 10.0621 13.1248ZM3.93708 0.874805C4.05311 0.874805 4.16439 0.920899 4.24644 1.00295C4.32848 1.08499 4.37458 1.19627 4.37458 1.31231V11.6312L7.12733 8.87755C7.20948 8.7954 7.3209 8.74925 7.43708 8.74925C7.55325 8.74925 7.66468 8.7954 7.74683 8.87755C7.82898 8.95971 7.87513 9.07113 7.87513 9.18731C7.87513 9.30348 7.82898 9.4149 7.74683 9.49706L4.24683 12.9971C4.20619 13.0378 4.15791 13.0701 4.10476 13.0922C4.0516 13.1142 3.99462 13.1256 3.93708 13.1256C3.87953 13.1256 3.82255 13.1142 3.7694 13.0922C3.71624 13.0701 3.66797 13.0378 3.62733 12.9971L0.127326 9.49706C0.0451753 9.4149 -0.000976565 9.30348 -0.000976562 9.18731C-0.00097656 9.07113 0.0451753 8.95971 0.127326 8.87755C0.209477 8.7954 0.320897 8.74925 0.437076 8.74925C0.553255 8.74925 0.664675 8.7954 0.746826 8.87755L3.49958 11.6312V1.31231C3.49958 1.19627 3.54567 1.08499 3.62772 1.00295C3.70976 0.920899 3.82104 0.874805 3.93708 0.874805Z", fill: "currentColor" })),
|
|
380
|
+
React__default.createElement("defs", null,
|
|
381
|
+
React__default.createElement("clipPath", { id: clipId },
|
|
382
|
+
React__default.createElement("rect", { width: "14", height: "15", fill: "currentColor" })))));
|
|
383
|
+
};
|
|
380
384
|
|
|
381
385
|
var IconCheck = function (props) { return (React__default.createElement("svg", __assign({ width: "12", height: "10", viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
382
386
|
React__default.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.468 1.67573L3.99303 9.83025L0.792969 6.63019L2.20718 5.21597L3.9302 6.93899L9.99369 0.32428L11.468 1.67573Z", fill: "white" }))); };
|
|
@@ -885,12 +889,7 @@ var Menu$2 = function (_a) {
|
|
|
885
889
|
document.removeEventListener("click", handleClickOutside);
|
|
886
890
|
};
|
|
887
891
|
}, [showDropDown]);
|
|
888
|
-
return (React__default.createElement("
|
|
889
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
890
|
-
e.preventDefault();
|
|
891
|
-
toggleDropDown();
|
|
892
|
-
}
|
|
893
|
-
}, style: { cursor: "pointer" }, tabIndex: 0, role: "button", "aria-expanded": showDropDown },
|
|
892
|
+
return (React__default.createElement("button", { ref: buttonRef, style: { all: "unset", cursor: "pointer" }, className: showDropDown ? "active" : undefined, onClick: toggleDropDown, "aria-expanded": showDropDown, "aria-label": "Abrir menu" },
|
|
894
893
|
React__default.createElement(MenuIcon, { className: styles$n.iconMenu }),
|
|
895
894
|
showDropDown && (React__default.createElement(DropDown, { options: options, showDropDown: showDropDown, toggleDropDown: toggleDropDown, optionSelection: handleSelectOption }))));
|
|
896
895
|
};
|
|
@@ -1134,7 +1133,7 @@ function LoadingSpinner(props) {
|
|
|
1134
1133
|
React.createElement("div", { className: styl$1.text }, props.text)));
|
|
1135
1134
|
}
|
|
1136
1135
|
|
|
1137
|
-
var css_248z$i = "/* Pagination */\r\n.styles-module__paginationContainer___vywbX {\r\n padding: 0.5rem;\r\n margin-bottom: 2rem;\r\n display: inline-block;\r\n float: right;\r\n}\r\n\r\n.styles-module__paginationContainer___vywbX .styles-module__justifySpaceBetween___-wa43 {\r\n justify-content: space-between;\r\n}\r\n\r\n.styles-module__paginationContainer___vywbX .styles-module__flex___-hVV8 {\r\n display: flex;\r\n}\r\n\r\n.styles-module__paginationButtons___n6Pha {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n margin-top: 1rem;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 0.375rem;\r\n}\r\n\r\n.styles-module__paginationButton___3y1CC {\r\n background-color: transparent;\r\n color:
|
|
1136
|
+
var css_248z$i = "/* Pagination */\r\n.styles-module__paginationContainer___vywbX {\r\n padding: 0.5rem;\r\n margin-bottom: 2rem;\r\n display: inline-block;\r\n float: right;\r\n}\r\n\r\n.styles-module__paginationContainer___vywbX .styles-module__justifySpaceBetween___-wa43 {\r\n justify-content: space-between;\r\n}\r\n\r\n.styles-module__paginationContainer___vywbX .styles-module__flex___-hVV8 {\r\n display: flex;\r\n}\r\n\r\n.styles-module__paginationButtons___n6Pha {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n margin-top: 1rem;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 0.375rem;\r\n}\r\n\r\n.styles-module__paginationButton___3y1CC {\r\n background-color: transparent;\r\n color: var(--paginationv2-optionselect-text-color);\r\n padding: 0.5rem 1rem;\r\n border: none;\r\n cursor: pointer;\r\n}\r\n\r\n.styles-module__paginationButton___3y1CC:hover {\r\n background-color: #00436d;\r\n font-weight: bold;\r\n color: white;\r\n}\r\n\r\n.styles-module__paginationButton___3y1CC.styles-module__prev___BSV6J:disabled,\r\n.styles-module__paginationButton___3y1CC.styles-module__next___ajQD2:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n}\r\n\r\n.styles-module__paginationButton___3y1CC.styles-module__prev___BSV6J {\r\n border-radius: 0.375rem 0 0 0.375rem;\r\n}\r\n\r\n.styles-module__paginationButton___3y1CC.styles-module__next___ajQD2 {\r\n border-radius: 0 0.375rem 0.375rem 0;\r\n}\r\n\r\n.styles-module__paginationButtonActive___FY4f3 {\r\n background-color: #00436d;\r\n color: white;\r\n border-color: #00436d;\r\n}\r\n\r\n.styles-module__paginationButtonDisabled___P7A9z {\r\n background-color: #eeeeee54;\r\n color: #a0a0a0 !important;\r\n cursor: not-allowed;\r\n}\r\n\r\n.styles-module__paginationButtonDisabled___P7A9z:hover {\r\n background-color: #c3c3c3 !important;\r\n}\r\n";
|
|
1138
1137
|
var styles$i = {"paginationContainer":"styles-module__paginationContainer___vywbX","justifySpaceBetween":"styles-module__justifySpaceBetween___-wa43","flex":"styles-module__flex___-hVV8","paginationButtons":"styles-module__paginationButtons___n6Pha","paginationButton":"styles-module__paginationButton___3y1CC","prev":"styles-module__prev___BSV6J","next":"styles-module__next___ajQD2","paginationButtonActive":"styles-module__paginationButtonActive___FY4f3","paginationButtonDisabled":"styles-module__paginationButtonDisabled___P7A9z"};
|
|
1139
1138
|
styleInject(css_248z$i);
|
|
1140
1139
|
|
|
@@ -8534,17 +8533,17 @@ var SelectMult = function (_a) {
|
|
|
8534
8533
|
}, title: "Excluir todos os itens selecionados", className: styles$g.excluir },
|
|
8535
8534
|
React__default.createElement(IconDelete, null)),
|
|
8536
8535
|
React__default.createElement(IconSeparator, null))),
|
|
8537
|
-
!disabled && (React__default.createElement(IconTriangleRecall, { className: styles$g.iconChefron })))) }, fetchOptions ? (React__default.createElement(AsyncSelect$1, { name: name, isDisabled: disabled, backspaceRemovesValue: false, controlShouldRenderValue: false, hideSelectedOptions: false, isClearable: false, menuIsOpen: true, onChange: handleSelectChange, onInputChange: handleInputChange, inputValue: inputValue, placeholder: placeholder, styles: selectColourStyles$2(dropdownWidth, hasError), tabSelectsValue: false, value: value, isMulti: isMulti, closeMenuOnSelect: false, noOptionsMessage: function () { return noOptionsMessage; }, className: styles$g.selectElement, isSearchable: true, components: {
|
|
8536
|
+
!disabled && (React__default.createElement(IconTriangleRecall, { className: styles$g.iconChefron })))) }, fetchOptions ? (React__default.createElement(AsyncSelect$1, { name: "name", isDisabled: disabled, backspaceRemovesValue: false, controlShouldRenderValue: false, hideSelectedOptions: false, isClearable: false, menuIsOpen: true, onChange: handleSelectChange, onInputChange: handleInputChange, inputValue: inputValue, placeholder: placeholder, styles: selectColourStyles$2(dropdownWidth, hasError), tabSelectsValue: false, value: value, isMulti: isMulti, closeMenuOnSelect: false, noOptionsMessage: function () { return noOptionsMessage; }, className: styles$g.selectElement, isSearchable: true, components: {
|
|
8538
8537
|
Control: function () { return null; },
|
|
8539
8538
|
Option: Option,
|
|
8540
8539
|
MenuList: MenuList,
|
|
8541
8540
|
}, cacheOptions: true, defaultOptions: optionsSelect, loadingMessage: function () {
|
|
8542
8541
|
return "".concat(inputValue.length >= 3 ? "Carregando..." : noOptionsMessage);
|
|
8543
|
-
}, loadOptions: fetchOptions, escapeClearsValue: isCheckedAll })) : (React__default.createElement(StateManagedSelect$1, { name:
|
|
8542
|
+
}, loadOptions: fetchOptions, escapeClearsValue: isCheckedAll, "aria-label": label || placeholder || "Campo para seleção", inputId: "".concat(name, "-input") })) : (React__default.createElement(StateManagedSelect$1, { name: "name2", isDisabled: disabled, backspaceRemovesValue: false, controlShouldRenderValue: false, hideSelectedOptions: false, isClearable: false, menuIsOpen: true, onChange: handleSelectChange, onInputChange: handleInputChange, inputValue: inputValue, options: optionsSelect, styles: selectColourStyles$2(dropdownWidth), tabSelectsValue: false, value: value, isMulti: isMulti, closeMenuOnSelect: false, noOptionsMessage: function () { return noOptionsMessage; }, components: {
|
|
8544
8543
|
Control: function () { return null; },
|
|
8545
8544
|
Option: Option,
|
|
8546
8545
|
MenuList: MenuList,
|
|
8547
|
-
}, isSearchable: isSearchable, escapeClearsValue: isCheckedAll }))),
|
|
8546
|
+
}, isSearchable: isSearchable, escapeClearsValue: isCheckedAll, "aria-label": label || placeholder || "Campo para seleção", inputId: "".concat(name, "-input") }))),
|
|
8548
8547
|
textError && hasError && (React__default.createElement("p", { className: "".concat(styles$g.message, " ").concat(styles$g.messageError) }, textError)),
|
|
8549
8548
|
!hasError && message && React__default.createElement("p", { className: styles$g.message }, message)));
|
|
8550
8549
|
};
|
|
@@ -8593,7 +8592,7 @@ var BasicSelect = function (_a) {
|
|
|
8593
8592
|
" ",
|
|
8594
8593
|
isRequired ? React.createElement("span", { className: styles$f.errorRequired }, "*") : null)),
|
|
8595
8594
|
React.createElement("div", { className: styles$f.selectElement },
|
|
8596
|
-
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), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator } })),
|
|
8595
|
+
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), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator }, "aria-label": typeof label === 'string' ? label : (placeholder || "Campo para seleção") })),
|
|
8597
8596
|
hasError && (React.createElement("span", { className: styles$f.errorText }, "Campo obrigat\u00F3rio ou inv\u00E1lido"))));
|
|
8598
8597
|
};
|
|
8599
8598
|
|
|
@@ -21524,7 +21523,7 @@ var SelectDefault = function (_a) {
|
|
|
21524
21523
|
if (inputValue) {
|
|
21525
21524
|
handleInputChange === null || handleInputChange === void 0 ? void 0 : handleInputChange(inputValue);
|
|
21526
21525
|
}
|
|
21527
|
-
}, placeholder: placeholder, styles: selectColourStyles(hasError || !!error, isMobile), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator } }, rest))),
|
|
21526
|
+
}, placeholder: placeholder, styles: selectColourStyles(hasError || !!error, isMobile), isClearable: true, isSearchable: true, noOptionsMessage: function () { return "Nenhuma opção disponível"; }, components: { DropdownIndicator: CustomDropdownIndicator }, "aria-label": label || placeholder || "Campo para seleção", inputId: "".concat(name, "-input") }, rest))),
|
|
21528
21527
|
error && React.createElement("span", { className: styles$6.errorText }, error.message)));
|
|
21529
21528
|
};
|
|
21530
21529
|
|
|
@@ -23741,7 +23740,7 @@ function SkeletonLoader(_a) {
|
|
|
23741
23740
|
React__default.createElement("div", { className: "".concat(className || "", " ").concat(styles$3.skeletonCell) })));
|
|
23742
23741
|
}
|
|
23743
23742
|
|
|
23744
|
-
var css_248z$3 = ".styles-module__container___QloUX {\r\n position: relative;\r\n display: flex;\r\n }\r\n \r\n .styles-module__tooltip___YByF3 {\r\n position: absolute;\r\n width: max-content;\r\n height: fit-content;\r\n max-width: 480px;\r\n border-radius: 8px;\r\n word-wrap: break-word;\r\n background: var(--background-color);\r\n padding: 10px;\r\n border: 1px solid #c3c3c3;\r\n z-index: 1000;\r\n }\r\n \r\n .styles-module__textContent___d2QUQ {\r\n font-weight: 400;\r\n font-size: var(--font-size-14, 14px);\r\n line-height: 21px;\r\n color: var(--foreground);\r\n }\r\n \r\n .styles-module__top-right___a4ZLm {\r\n bottom: 100%;\r\n left: 100%;\r\n margin-bottom: 8px;\r\n }\r\n \r\n .styles-module__bottom-right___T2KLe {\r\n top: 100%;\r\n left: 100%;\r\n margin-top: 8px;\r\n }\r\n \r\n .styles-module__bottom-left___J6rSH {\r\n top: 100%;\r\n right: 100%;\r\n margin-top: 8px;\r\n }\r\n \r\n .styles-module__top-left___KQLAL {\r\n bottom: 100%;\r\n right: 100%;\r\n margin-bottom: 8px;\r\n }\r\n \r\n .styles-module__mobile___BKPrq {\r\n bottom: 100%;\r\n left: 100%;\r\n margin-bottom: 8px;\r\n }\r\n \r\n @media screen and (max-width: 480px) {\r\n .styles-module__container___QloUX {\r\n position: static;\r\n }\r\n \r\n .styles-module__tooltip___YByF3 {\r\n width: max-content;\r\n max-width: 92vw;\r\n left: 0;\r\n bottom: 90%;\r\n text-align: start;\r\n padding: 10px;\r\n position: absolute;\r\n flex-wrap: wrap;\r\n border-radius: 8px;\r\n }\r\n \r\n .styles-module__textContent___d2QUQ {\r\n font-size: var(--font-size-12, 12px);\r\n }\r\n }\r\n ";
|
|
23743
|
+
var css_248z$3 = ".styles-module__container___QloUX {\r\n all: unset;\r\n position: relative;\r\n display: flex;\r\n }\r\n \r\n .styles-module__tooltip___YByF3 {\r\n position: absolute;\r\n width: max-content;\r\n height: fit-content;\r\n max-width: 480px;\r\n border-radius: 8px;\r\n word-wrap: break-word;\r\n background: var(--background-color);\r\n padding: 10px;\r\n border: 1px solid #c3c3c3;\r\n z-index: 1000;\r\n }\r\n \r\n .styles-module__textContent___d2QUQ {\r\n font-weight: 400;\r\n font-size: var(--font-size-14, 14px);\r\n line-height: 21px;\r\n color: var(--foreground);\r\n }\r\n \r\n .styles-module__top-right___a4ZLm {\r\n bottom: 100%;\r\n left: 100%;\r\n margin-bottom: 8px;\r\n }\r\n \r\n .styles-module__bottom-right___T2KLe {\r\n top: 100%;\r\n left: 100%;\r\n margin-top: 8px;\r\n }\r\n \r\n .styles-module__bottom-left___J6rSH {\r\n top: 100%;\r\n right: 100%;\r\n margin-top: 8px;\r\n }\r\n \r\n .styles-module__top-left___KQLAL {\r\n bottom: 100%;\r\n right: 100%;\r\n margin-bottom: 8px;\r\n }\r\n \r\n .styles-module__mobile___BKPrq {\r\n bottom: 100%;\r\n left: 100%;\r\n margin-bottom: 8px;\r\n }\r\n \r\n @media screen and (max-width: 480px) {\r\n .styles-module__container___QloUX {\r\n position: static;\r\n }\r\n \r\n .styles-module__tooltip___YByF3 {\r\n width: max-content;\r\n max-width: 92vw;\r\n left: 0;\r\n bottom: 90%;\r\n text-align: start;\r\n padding: 10px;\r\n position: absolute;\r\n flex-wrap: wrap;\r\n border-radius: 8px;\r\n }\r\n \r\n .styles-module__textContent___d2QUQ {\r\n font-size: var(--font-size-12, 12px);\r\n }\r\n }\r\n ";
|
|
23745
23744
|
var styles$2 = {"container":"styles-module__container___QloUX","tooltip":"styles-module__tooltip___YByF3","textContent":"styles-module__textContent___d2QUQ","top-right":"styles-module__top-right___a4ZLm","bottom-right":"styles-module__bottom-right___T2KLe","bottom-left":"styles-module__bottom-left___J6rSH","top-left":"styles-module__top-left___KQLAL","mobile":"styles-module__mobile___BKPrq"};
|
|
23746
23745
|
styleInject(css_248z$3);
|
|
23747
23746
|
|
|
@@ -23754,6 +23753,12 @@ var TooltipWithPortal = function (_a) {
|
|
|
23754
23753
|
var targetRef = useRef(null);
|
|
23755
23754
|
var visible = internalVisible || forceVisible;
|
|
23756
23755
|
var PADDING = 8;
|
|
23756
|
+
var onKeyDown = function (e) {
|
|
23757
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
23758
|
+
e.preventDefault();
|
|
23759
|
+
setInternalVisible(function (v) { return !v; });
|
|
23760
|
+
}
|
|
23761
|
+
};
|
|
23757
23762
|
useEffect(function () {
|
|
23758
23763
|
var handleResize = function () {
|
|
23759
23764
|
setIsMobile(window.innerWidth <= 480);
|
|
@@ -23854,7 +23859,7 @@ var TooltipWithPortal = function (_a) {
|
|
|
23854
23859
|
var onTouch = function () { return isMobile && setInternalVisible(function (v) { return !v; }); };
|
|
23855
23860
|
var onClick = function () { return !isMobile && setInternalVisible(function (v) { return !v; }); };
|
|
23856
23861
|
return (React__default.createElement(React__default.Fragment, null,
|
|
23857
|
-
React__default.createElement("
|
|
23862
|
+
React__default.createElement("button", { ref: targetRef, type: "button", className: styles$2.container, "aria-haspopup": "true", "aria-expanded": visible, "aria-label": text, onKeyDown: onKeyDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onTouchStart: onTouch, onClick: onClick }, children),
|
|
23858
23863
|
visible &&
|
|
23859
23864
|
typeof window !== "undefined" &&
|
|
23860
23865
|
ReactDOM__default.createPortal(React__default.createElement("div", { ref: tooltipRef, className: styles$2.tooltip, style: tooltipStyle, "aria-hidden": !visible },
|