@votodigital-onpeui/react 0.1.37 → 0.1.41
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/dist/{ModalConfirm-CZJCfya3.d.mts → ModalConfirm-aUXxpQ-H.d.mts} +1 -1
- package/dist/{ModalConfirm-CZJCfya3.d.ts → ModalConfirm-aUXxpQ-H.d.ts} +1 -1
- package/dist/{chunk-52VIQAQL.mjs → chunk-HG3JQEAN.mjs} +14 -6
- package/dist/chunk-HG3JQEAN.mjs.map +1 -0
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +12 -4
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modal.d.mts +8 -4
- package/dist/modal.d.ts +8 -4
- package/dist/modal.js +18 -8
- package/dist/modal.js.map +1 -1
- package/dist/modal.mjs +7 -5
- package/dist/modal.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-52VIQAQL.mjs.map +0 -1
package/dist/components.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BrowserRecommended, Footer, ModalBrowserIncompatible, ModalDnieVersions, ModalNfc, ModalSystemIncompatible, NotRecommended, Overlay, Show } from './chunk-4VUH3WMT.mjs';
|
|
2
2
|
import './chunk-KWOWOGBU.mjs';
|
|
3
|
-
export { Button, ModalConfirm, ModalLoading } from './chunk-
|
|
3
|
+
export { Button, ModalConfirm, ModalLoading } from './chunk-HG3JQEAN.mjs';
|
|
4
4
|
import './chunk-M2KQXQLY.mjs';
|
|
5
5
|
export { Modal, Portal } from './chunk-FV3GKV22.mjs';
|
|
6
6
|
import './chunk-5FNWA3QC.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { FaceBookIcon, IconAndroid, IconApple, IconCheck, IconChrome, IconChromeColor, IconClose, IconCloseRadius, IconEdge, IconEdgeColor, IconElectionsGeneral, IconElectionsRegionalesYMunicipales, IconHome, IconHuawei, IconInfo, IconLogoONPE, IconMozilla, IconMozillaColor, IconPhone, IconQuestion, IconSafari, IconSafariColor, IconSpinnerDesktop, IconSpinnerMobile, IconVotoDigital, IconWarning, IconWarningNotRecommended, IconWindow, InstagramIcon, TikTokIcon, WhatsappIcon, XIcon, YoutubeIcon } from './icons.mjs';
|
|
2
2
|
export { BrowserRecommended, Button, ButtonProps, Footer, FooterProps, Modal, ModalBrowserIncompatible, ModalBrowserIncompatibleProps, ModalDnieVersions, ModalDnieVersionsProps, ModalLoading, ModalLoadingProps, ModalNfc, ModalNfcProps, ModalProps, ModalSystemIncompatible, ModalSystemIncompatibleProps, NotRecommended, NotRecommendedProps, Overlay, OverlayProps, Portal, PortalProps, Show, ShowProps } from './components.mjs';
|
|
3
|
-
export { M as ModalConfirm, a as ModalConfirmProps } from './ModalConfirm-
|
|
3
|
+
export { M as ModalConfirm, a as ModalConfirmProps } from './ModalConfirm-aUXxpQ-H.mjs';
|
|
4
4
|
export { IframeMessage, MessageStatus, OnpeIdModal, SocketEventData, useIframeCommunication, useIframePreload, useModalIframePreload, useOnpeIdAuth, useSendMessageToIframe, useSocketConnection } from './hooks.mjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { FaceBookIcon, IconAndroid, IconApple, IconCheck, IconChrome, IconChromeColor, IconClose, IconCloseRadius, IconEdge, IconEdgeColor, IconElectionsGeneral, IconElectionsRegionalesYMunicipales, IconHome, IconHuawei, IconInfo, IconLogoONPE, IconMozilla, IconMozillaColor, IconPhone, IconQuestion, IconSafari, IconSafariColor, IconSpinnerDesktop, IconSpinnerMobile, IconVotoDigital, IconWarning, IconWarningNotRecommended, IconWindow, InstagramIcon, TikTokIcon, WhatsappIcon, XIcon, YoutubeIcon } from './icons.js';
|
|
2
2
|
export { BrowserRecommended, Button, ButtonProps, Footer, FooterProps, Modal, ModalBrowserIncompatible, ModalBrowserIncompatibleProps, ModalDnieVersions, ModalDnieVersionsProps, ModalLoading, ModalLoadingProps, ModalNfc, ModalNfcProps, ModalProps, ModalSystemIncompatible, ModalSystemIncompatibleProps, NotRecommended, NotRecommendedProps, Overlay, OverlayProps, Portal, PortalProps, Show, ShowProps } from './components.js';
|
|
3
|
-
export { M as ModalConfirm, a as ModalConfirmProps } from './ModalConfirm-
|
|
3
|
+
export { M as ModalConfirm, a as ModalConfirmProps } from './ModalConfirm-aUXxpQ-H.js';
|
|
4
4
|
export { IframeMessage, MessageStatus, OnpeIdModal, SocketEventData, useIframeCommunication, useIframePreload, useModalIframePreload, useOnpeIdAuth, useSendMessageToIframe, useSocketConnection } from './hooks.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -2050,6 +2050,12 @@ function renderIcon(type, colorClass) {
|
|
|
2050
2050
|
}
|
|
2051
2051
|
return /* @__PURE__ */ jsxRuntime.jsx(IconWarningNotRecommended, { role: "presentation", className: `w-16 h-16 ${colorClass}` });
|
|
2052
2052
|
}
|
|
2053
|
+
var defaultTitleByType = {
|
|
2054
|
+
success: "Confirmaci\xF3n",
|
|
2055
|
+
warning: "Advertencia",
|
|
2056
|
+
question: "Atenci\xF3n",
|
|
2057
|
+
info: "Informaci\xF3n"
|
|
2058
|
+
};
|
|
2053
2059
|
var ModalConfirm = ({
|
|
2054
2060
|
isOpen = false,
|
|
2055
2061
|
onClose = () => {
|
|
@@ -2080,11 +2086,13 @@ var ModalConfirm = ({
|
|
|
2080
2086
|
}) => {
|
|
2081
2087
|
const titleId = "modal-confirm-title";
|
|
2082
2088
|
const messageId = "modal-confirm-message";
|
|
2089
|
+
const effectiveTitle = title ?? defaultTitleByType[type] ?? "";
|
|
2083
2090
|
const effectiveMessage = message ?? content;
|
|
2084
2091
|
const effectiveColorClass = color ? colorOverrideMap[color] ?? "text-onpe-skyblue" : "text-onpe-skyblue";
|
|
2085
|
-
const
|
|
2086
|
-
const
|
|
2087
|
-
const
|
|
2092
|
+
const effectiveButtonMode = buttonMode ?? (type === "question" ? "confirm" : "single");
|
|
2093
|
+
const isConfirmMode = effectiveButtonMode === "confirm";
|
|
2094
|
+
const showTwoButtons = effectiveButtonMode === "double" || isConfirmMode;
|
|
2095
|
+
const confirmLabel = textButtonConfirm ?? (isConfirmMode ? "S\xED" : effectiveButtonMode === "double" ? "Confirmar" : "Aceptar");
|
|
2088
2096
|
const cancelLabel = textButtonCancel ?? (isConfirmMode ? "No" : "Cancelar");
|
|
2089
2097
|
const handleConfirm = async () => {
|
|
2090
2098
|
try {
|
|
@@ -2124,7 +2132,7 @@ var ModalConfirm = ({
|
|
|
2124
2132
|
"text-lg md:text-2xl font-semibold text-center mt-0 md:mt-4",
|
|
2125
2133
|
effectiveColorClass
|
|
2126
2134
|
].join(" "),
|
|
2127
|
-
children:
|
|
2135
|
+
children: effectiveTitle
|
|
2128
2136
|
}
|
|
2129
2137
|
),
|
|
2130
2138
|
effectiveMessage && (typeof effectiveMessage === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|