@popmenu/common-ui 0.97.0 → 0.98.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.
@@ -3,7 +3,9 @@ export declare type FollowerAuthenticationDialogProps = {
3
3
  open: boolean;
4
4
  state: ReducerState;
5
5
  dispatch: (event: ReducerEvent) => void;
6
- messages: Record<MessageKey, string>;
6
+ messages: Record<MessageKey, ReactNode> & {
7
+ closeButtonLabel: string;
8
+ };
7
9
  locationOptions: LocationOption[];
8
10
  loading: boolean;
9
11
  graphics: Record<`${ReducerStateValue}`, string>;
@@ -52,8 +54,12 @@ export declare type ReducerEvent = {
52
54
  type: 'sign-in-success';
53
55
  } | {
54
56
  type: 'code-sent';
57
+ } | {
58
+ type: 'start-google-auth';
59
+ } | {
60
+ type: 'start-facebook-auth';
55
61
  };
56
- 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';
62
+ 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';
57
63
  declare type LocationOption = {
58
64
  label: string;
59
65
  value: string;
@@ -5,6 +5,8 @@ export interface SplitInputProps {
5
5
  TextFieldProps?: TextFieldProps;
6
6
  /** Props applied to the composed Button component */
7
7
  ButtonProps?: ButtonProps;
8
+ /** Label for the button element */
9
+ buttonLabel: string;
8
10
  /** Sets the color for both TextField and Button */
9
11
  color?: 'primary' | 'secondary';
10
12
  /** Sets the text color for the TextField */
package/build/index.es.js CHANGED
@@ -921,11 +921,11 @@ var useSplitInputStyles = makeStyles$1(function () { return ({
921
921
  }); });
922
922
 
923
923
  var SplitInput = function (props) {
924
- var TextFieldProps = props.TextFieldProps, ButtonProps = props.ButtonProps, color = props.color, onChange = props.onChange, onClick = props.onClick;
924
+ var buttonLabel = props.buttonLabel, TextFieldProps = props.TextFieldProps, ButtonProps = props.ButtonProps, color = props.color, onChange = props.onChange, onClick = props.onClick;
925
925
  var classes = useSplitInputStyles(props);
926
926
  return (React__default.createElement(Box, { display: "flex" },
927
927
  React__default.createElement(TextField, __assign({ classes: { root: classes.textfield }, InputProps: { classes: { root: classes.input, focused: classes.focused } }, color: color, variant: "outlined", onChange: onChange }, TextFieldProps)),
928
- React__default.createElement(Button, __assign({ classes: { root: classes.button }, disableElevation: true, color: color, variant: "contained", onClick: onClick }, ButtonProps), "Submit")));
928
+ React__default.createElement(Button, __assign({ classes: { root: classes.button }, disableElevation: true, color: color, variant: "contained", onClick: onClick }, ButtonProps), buttonLabel)));
929
929
  };
930
930
  SplitInput.displayName = 'SplitInput';
931
931
  SplitInput.defaultProps = {
@@ -1245,7 +1245,6 @@ var FollowerAuthenticationBody = function () {
1245
1245
 
1246
1246
  var FollowerAuthenticationFooter = function () {
1247
1247
  var _a = useFollowerAuthenticationDialogContext(), messages = _a.messages, logos = _a.logos;
1248
- console.log(logos.popmenu);
1249
1248
  return (React__default.createElement(Box, { display: "flex", gridGap: 8 },
1250
1249
  React__default.createElement(Typography$1, { variant: "body2" }, messages.poweredBy),
1251
1250
  logos.popmenu));