@votodigital-onpeui/react 0.1.37 → 0.1.40
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-MPLFICE6.mjs} +11 -4
- package/dist/chunk-MPLFICE6.mjs.map +1 -0
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +9 -2
- 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 +9 -2
- 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 +15 -6
- 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-MPLFICE6.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,12 @@ 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
2092
|
const isConfirmMode = buttonMode === "confirm";
|
|
2086
2093
|
const showTwoButtons = buttonMode === "double" || isConfirmMode;
|
|
2087
|
-
const confirmLabel = textButtonConfirm ?? (isConfirmMode ? "S\xED" : "
|
|
2094
|
+
const confirmLabel = textButtonConfirm ?? (isConfirmMode ? "S\xED" : "Aceptar");
|
|
2088
2095
|
const cancelLabel = textButtonCancel ?? (isConfirmMode ? "No" : "Cancelar");
|
|
2089
2096
|
const handleConfirm = async () => {
|
|
2090
2097
|
try {
|
|
@@ -2124,7 +2131,7 @@ var ModalConfirm = ({
|
|
|
2124
2131
|
"text-lg md:text-2xl font-semibold text-center mt-0 md:mt-4",
|
|
2125
2132
|
effectiveColorClass
|
|
2126
2133
|
].join(" "),
|
|
2127
|
-
children:
|
|
2134
|
+
children: effectiveTitle
|
|
2128
2135
|
}
|
|
2129
2136
|
),
|
|
2130
2137
|
effectiveMessage && (typeof effectiveMessage === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|