@insforge/react 1.0.9-dev.2 → 1.1.0
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/components.cjs +3 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +2 -1
- package/dist/components.d.ts +2 -1
- package/dist/components.js +3 -1
- package/dist/components.js.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/components.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { VerifyEmailResponse } from '@insforge/shared-schemas';
|
|
3
|
+
import * as react from 'react';
|
|
3
4
|
import { ReactNode } from 'react';
|
|
4
5
|
import { InsforgeUser } from '@insforge/shared';
|
|
5
6
|
export { ForgotPasswordForm, ForgotPasswordFormProps, ResetPasswordForm, ResetPasswordFormProps, SignInForm, SignInFormProps, SignUpForm, SignUpFormProps, VerifyEmailStatus, VerifyEmailStatusProps } from './forms.cjs';
|
|
@@ -184,7 +185,7 @@ interface UserProfileModalProps {
|
|
|
184
185
|
* User profile modal component.
|
|
185
186
|
* Displays user profile information with edit capability for name.
|
|
186
187
|
*/
|
|
187
|
-
declare function UserProfileModal({ onClose, onError }: UserProfileModalProps):
|
|
188
|
+
declare function UserProfileModal({ onClose, onError }: UserProfileModalProps): react.ReactPortal | null;
|
|
188
189
|
|
|
189
190
|
interface ProtectProps {
|
|
190
191
|
children: ReactNode;
|
package/dist/components.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { VerifyEmailResponse } from '@insforge/shared-schemas';
|
|
3
|
+
import * as react from 'react';
|
|
3
4
|
import { ReactNode } from 'react';
|
|
4
5
|
import { InsforgeUser } from '@insforge/shared';
|
|
5
6
|
export { ForgotPasswordForm, ForgotPasswordFormProps, ResetPasswordForm, ResetPasswordFormProps, SignInForm, SignInFormProps, SignUpForm, SignUpFormProps, VerifyEmailStatus, VerifyEmailStatusProps } from './forms.js';
|
|
@@ -184,7 +185,7 @@ interface UserProfileModalProps {
|
|
|
184
185
|
* User profile modal component.
|
|
185
186
|
* Displays user profile information with edit capability for name.
|
|
186
187
|
*/
|
|
187
|
-
declare function UserProfileModal({ onClose, onError }: UserProfileModalProps):
|
|
188
|
+
declare function UserProfileModal({ onClose, onError }: UserProfileModalProps): react.ReactPortal | null;
|
|
188
189
|
|
|
189
190
|
interface ProtectProps {
|
|
190
191
|
children: ReactNode;
|
package/dist/components.js
CHANGED
|
@@ -4,6 +4,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
4
4
|
import { InsforgeContext } from '@insforge/shared/react';
|
|
5
5
|
import { AlertTriangle, Check, EyeOff, Eye, Loader2, CircleCheck, X, User, LogOut } from 'lucide-react';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
7
8
|
|
|
8
9
|
var __create = Object.create;
|
|
9
10
|
var __defProp = Object.defineProperty;
|
|
@@ -4950,7 +4951,7 @@ function UserProfileModal({ onClose, onError }) {
|
|
|
4950
4951
|
return null;
|
|
4951
4952
|
}
|
|
4952
4953
|
const initials = user.profile?.name ? user.profile.name.charAt(0).toUpperCase() : user.email.split("@")[0].slice(0, 2).toUpperCase();
|
|
4953
|
-
|
|
4954
|
+
const modalContent = /* @__PURE__ */ jsx(ProfileModalOverlay, { onClick: handleOverlayClick, children: /* @__PURE__ */ jsxs(ProfileModalContainer, { onClick: (e) => e.stopPropagation(), children: [
|
|
4954
4955
|
/* @__PURE__ */ jsxs(ProfileModalHeader, { children: [
|
|
4955
4956
|
/* @__PURE__ */ jsx(ProfileModalTitle, { children: "Profile" }),
|
|
4956
4957
|
/* @__PURE__ */ jsx(ProfileModalCloseButton, { onClick: onClose, "aria-label": "Close", children: /* @__PURE__ */ jsx(X, {}) })
|
|
@@ -4992,6 +4993,7 @@ function UserProfileModal({ onClose, onError }) {
|
|
|
4992
4993
|
] })
|
|
4993
4994
|
] }) : /* @__PURE__ */ jsx(ProfileButton, { $primary: true, onClick: () => setIsEditing(true), children: "Edit Profile" }) })
|
|
4994
4995
|
] }) });
|
|
4996
|
+
return createPortal(modalContent, document.body);
|
|
4995
4997
|
}
|
|
4996
4998
|
function UserButton({
|
|
4997
4999
|
afterSignOutUrl = "/",
|