@insforge/react 0.3.0 → 0.3.1

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/atoms.d.mts CHANGED
@@ -366,14 +366,14 @@ declare function AuthVerificationCodeInput({ length, value, email, onChange, dis
366
366
  type VerificationMethod = 'code' | 'link';
367
367
  interface AuthEmailVerificationStepProps {
368
368
  email: string;
369
- title?: string;
370
369
  description?: string;
371
370
  method?: VerificationMethod;
372
371
  onVerifyCode?: (code: string) => Promise<void>;
373
372
  }
374
373
  /**
375
- * Email verification step component
374
+ * Email verification step component (pure UI, no container)
376
375
  *
376
+ * Designed to be embedded within a form container.
377
377
  * Handles the email verification flow:
378
378
  * - Automatically sends verification email on mount
379
379
  * - Shows countdown timer for resend functionality
@@ -382,6 +382,6 @@ interface AuthEmailVerificationStepProps {
382
382
  *
383
383
  * @param method - 'code' for OTP input, 'link' for magic link (default: 'code')
384
384
  */
385
- declare function AuthEmailVerificationStep({ email, title, description, method, onVerifyCode, }: AuthEmailVerificationStepProps): react_jsx_runtime.JSX.Element;
385
+ declare function AuthEmailVerificationStep({ email, description, method, onVerifyCode, }: AuthEmailVerificationStepProps): react_jsx_runtime.JSX.Element;
386
386
 
387
387
  export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthSubmitButton, AuthVerificationCodeInput, validatePasswordStrength };
package/dist/atoms.d.ts CHANGED
@@ -366,14 +366,14 @@ declare function AuthVerificationCodeInput({ length, value, email, onChange, dis
366
366
  type VerificationMethod = 'code' | 'link';
367
367
  interface AuthEmailVerificationStepProps {
368
368
  email: string;
369
- title?: string;
370
369
  description?: string;
371
370
  method?: VerificationMethod;
372
371
  onVerifyCode?: (code: string) => Promise<void>;
373
372
  }
374
373
  /**
375
- * Email verification step component
374
+ * Email verification step component (pure UI, no container)
376
375
  *
376
+ * Designed to be embedded within a form container.
377
377
  * Handles the email verification flow:
378
378
  * - Automatically sends verification email on mount
379
379
  * - Shows countdown timer for resend functionality
@@ -382,6 +382,6 @@ interface AuthEmailVerificationStepProps {
382
382
  *
383
383
  * @param method - 'code' for OTP input, 'link' for magic link (default: 'code')
384
384
  */
385
- declare function AuthEmailVerificationStep({ email, title, description, method, onVerifyCode, }: AuthEmailVerificationStepProps): react_jsx_runtime.JSX.Element;
385
+ declare function AuthEmailVerificationStep({ email, description, method, onVerifyCode, }: AuthEmailVerificationStepProps): react_jsx_runtime.JSX.Element;
386
386
 
387
387
  export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthSubmitButton, AuthVerificationCodeInput, validatePasswordStrength };
package/dist/atoms.js CHANGED
@@ -748,7 +748,6 @@ function useInsforge() {
748
748
  }
749
749
  function AuthEmailVerificationStep({
750
750
  email,
751
- title = "Verify Your Email",
752
751
  description,
753
752
  method = "code",
754
753
  onVerifyCode
@@ -825,29 +824,29 @@ function AuthEmailVerificationStep({
825
824
  }
826
825
  };
827
826
  const displayDescription = description || defaultDescription;
828
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-6 items-center", children: [
829
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full bg-neutral-100 dark:bg-neutral-800 rounded-lg px-4 pt-4 pb-6 flex flex-col gap-4", children: [
830
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-black dark:text-white", children: title }),
831
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral-600 dark:text-neutral-400 text-sm leading-relaxed", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
832
- part,
833
- index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-black dark:text-white", children: email })
834
- ] }, index)) }),
835
- method === "code" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 mt-2", children: [
836
- /* @__PURE__ */ jsxRuntime.jsx(
837
- AuthVerificationCodeInput,
838
- {
839
- value: verificationCode,
840
- onChange: setVerificationCode,
841
- email,
842
- disabled: isVerifying,
843
- onComplete: (code) => {
844
- void handleVerifyCode(code);
845
- }
827
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 items-stretch", children: [
828
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
829
+ part,
830
+ index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-black dark:text-white", children: email })
831
+ ] }, index)) }),
832
+ verificationError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pl-3 py-2 pr-2 bg-red-50 border-2 border-red-600 rounded", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
833
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-6 h-6 text-red-500 shrink-0", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
834
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-600 flex-1", children: verificationError })
835
+ ] }) }),
836
+ method === "code" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full bg-neutral-100 dark:bg-neutral-800 rounded-lg px-4 pt-4 pb-6 flex flex-col gap-4", children: [
837
+ /* @__PURE__ */ jsxRuntime.jsx(
838
+ AuthVerificationCodeInput,
839
+ {
840
+ value: verificationCode,
841
+ onChange: setVerificationCode,
842
+ email,
843
+ disabled: isVerifying,
844
+ onComplete: (code) => {
845
+ void handleVerifyCode(code);
846
846
  }
847
- ),
848
- verificationError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-600 dark:text-red-400 text-center", children: verificationError }),
849
- isVerifying && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 text-center", children: "Verifying..." })
850
- ] })
847
+ }
848
+ ),
849
+ isVerifying && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 text-center", children: "Verifying..." })
851
850
  ] }),
852
851
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-sm text-center text-neutral-600 dark:text-neutral-400", children: [
853
852
  "Didn't receive the email?",