@movmo_app/react-common 0.9.0 → 0.10.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/index.cjs.js +27 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +33 -0
- package/dist/index.es.js +3431 -3196
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
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 {
|
|
@@ -226,6 +245,7 @@ export declare interface PhoneInputProps {
|
|
|
226
245
|
className?: string;
|
|
227
246
|
responsive?: boolean;
|
|
228
247
|
enableSearch?: boolean;
|
|
248
|
+
autoComplete?: string;
|
|
229
249
|
}
|
|
230
250
|
|
|
231
251
|
export declare const SearchInput: React_2.ForwardRefExoticComponent<SearchInputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
@@ -257,6 +277,17 @@ declare interface SeparatorProps extends React_2.ComponentPropsWithoutRef<typeof
|
|
|
257
277
|
text?: string;
|
|
258
278
|
}
|
|
259
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
|
+
|
|
260
291
|
export declare const Textarea: React_2.ForwardRefExoticComponent<TextareaProps & React_2.RefAttributes<HTMLTextAreaElement>>;
|
|
261
292
|
|
|
262
293
|
declare interface TextareaProps extends React_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
@@ -279,6 +310,8 @@ declare interface ToggleProps extends React_2.ComponentPropsWithoutRef<typeof Sw
|
|
|
279
310
|
size?: 'sm' | 'md';
|
|
280
311
|
}
|
|
281
312
|
|
|
313
|
+
export declare const validateEmail: (email: string) => boolean;
|
|
314
|
+
|
|
282
315
|
export declare function validatePhoneNumber(phone: string, countryCode?: string): boolean;
|
|
283
316
|
|
|
284
317
|
export { }
|