@movmo_app/react-common 0.9.1 → 0.10.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/index.d.ts CHANGED
@@ -1,14 +1,19 @@
1
+ import { AuthenticationChallengeName } from '@movmo_app/types';
2
+ import { AuthenticationUsernameType } from '@movmo_app/types';
1
3
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
4
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
5
  import { default as default_2 } from 'react';
4
6
  import { Gender } from '@movmo_app/types';
5
7
  import { JSX as JSX_2 } from 'react/jsx-runtime';
8
+ import { LoginUserResponse } from '@movmo_app/types';
9
+ import { OTPAction } from '@movmo_app/types';
6
10
  import * as React_2 from 'react';
7
11
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
8
12
  import { SingleValue } from 'react-select';
9
13
  import { StylesConfig } from 'react-select';
10
14
  import * as SwitchPrimitive from '@radix-ui/react-switch';
11
15
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
16
+ import { User } from '@movmo_app/types';
12
17
 
13
18
  export declare const Avatar: React_2.ForwardRefExoticComponent<AvatarProps & React_2.RefAttributes<HTMLSpanElement>>;
14
19
 
@@ -163,6 +168,20 @@ export declare interface ModalProps {
163
168
  hideCloseButton?: boolean;
164
169
  }
165
170
 
171
+ export declare const OTPModal: ({ email, phone, otpLength, otpAction, onVerify, onClose, externalError, title, description, }: OTPModalProps) => JSX_2.Element;
172
+
173
+ export declare interface OTPModalProps {
174
+ email: string;
175
+ phone: string;
176
+ otpLength: number;
177
+ otpAction: OTPAction;
178
+ onVerify: (otp: string) => void;
179
+ onClose: () => void;
180
+ externalError?: string;
181
+ title?: string;
182
+ description?: string;
183
+ }
184
+
166
185
  export declare const Pagination: React_2.FC<PaginationProps>;
167
186
 
168
187
  declare interface PaginationProps {
@@ -258,6 +277,17 @@ declare interface SeparatorProps extends React_2.ComponentPropsWithoutRef<typeof
258
277
  text?: string;
259
278
  }
260
279
 
280
+ export declare const SignInModal: default_2.FC<SignInModalProps>;
281
+
282
+ export declare interface SignInModalProps {
283
+ isOpen: boolean;
284
+ onClose: () => void;
285
+ loginUser: (email: string, phone: string, usernameType: AuthenticationUsernameType) => Promise<LoginUserResponse>;
286
+ verifyOTP: (username: string, code: string, session: string, challengeName: AuthenticationChallengeName | null) => Promise<void>;
287
+ getCurrentUser: () => Promise<User>;
288
+ onLoginSuccess: (user: User) => void;
289
+ }
290
+
261
291
  export declare const Textarea: React_2.ForwardRefExoticComponent<TextareaProps & React_2.RefAttributes<HTMLTextAreaElement>>;
262
292
 
263
293
  declare interface TextareaProps extends React_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
@@ -280,6 +310,8 @@ declare interface ToggleProps extends React_2.ComponentPropsWithoutRef<typeof Sw
280
310
  size?: 'sm' | 'md';
281
311
  }
282
312
 
313
+ export declare const validateEmail: (email: string) => boolean;
314
+
283
315
  export declare function validatePhoneNumber(phone: string, countryCode?: string): boolean;
284
316
 
285
317
  export { }