@popmenu/common-ui
Advanced tools
Comparing version 0.95.1 to 0.96.0
@@ -18,3 +18,3 @@ import { ReactNode } from 'react'; | ||
}; | ||
export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome'; | ||
export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome'; | ||
export declare type ReducerEvent = { | ||
@@ -32,2 +32,4 @@ type: 'submit-form'; | ||
} | { | ||
type: 'click-sign-up'; | ||
} | { | ||
type: 'click-get-code'; | ||
@@ -48,7 +50,11 @@ context: { | ||
} | { | ||
type: 'indirect-user-found'; | ||
} | { | ||
type: 'user-not-found'; | ||
} | { | ||
type: 'sign-in-success'; | ||
} | { | ||
type: 'code-sent'; | ||
}; | ||
declare type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailInputLabel' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword' | 'closeButtonLabel'; | ||
declare type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailInputLabel' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword' | 'closeButtonLabel'; | ||
declare type LocationOption = { | ||
@@ -55,0 +61,0 @@ label: string; |
@@ -1143,2 +1143,6 @@ export { default as Alert } from '@material-ui/lab/Alert'; | ||
React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn))); | ||
case 'indirectUserFound': | ||
return (React__default.createElement("form", __assign({}, formProps), | ||
React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.defaultFormValues.email }), | ||
React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel))); | ||
case 'emailPasswordSignIn': | ||
@@ -1155,3 +1159,3 @@ return (React__default.createElement("form", __assign({}, formProps), | ||
return (React__default.createElement("form", __assign({}, formProps), | ||
React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }), | ||
React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code", autoComplete: "one-time-code" }), | ||
React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn))); | ||
@@ -1201,2 +1205,8 @@ case 'phonePasswordSignIn': | ||
return null; | ||
case 'indirectUserFound': | ||
return (React__default.createElement(Box, { className: classes.main }, | ||
React__default.createElement(Divider$1, null), | ||
React__default.createElement(Button$1, { variant: "outlined", onClick: function () { | ||
dispatch({ type: 'click-sign-up' }); | ||
} }, messages.indirectUserFoundCtaButtonLabelAlt))); | ||
case 'emailPasswordSignIn': | ||
@@ -1226,3 +1236,3 @@ return (React__default.createElement(Box, { className: classes.main }, | ||
return (React__default.createElement(Button$1, { onClick: function () { | ||
dispatch({ type: 'click-done' }); | ||
dispatch({ type: 'click-sign-up' }); | ||
} }, messages.done)); | ||
@@ -1229,0 +1239,0 @@ default: |
{ | ||
"name": "@popmenu/common-ui", | ||
"version": "0.95.1", | ||
"version": "0.96.0", | ||
"license": "MIT", | ||
@@ -33,3 +33,3 @@ "author": "Popmenu Design System Team", | ||
"sideEffects": false, | ||
"gitHead": "3d93f17d5cf59ec11a1e1976e324ced02adf34a8" | ||
"gitHead": "02127eb6a694b4eeae4de822df0dc80aa6a8a0d3" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1119419
3934