@popmenu/common-ui 0.93.0 → 0.95.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.
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationAltActions: () => JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationBody: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationCloseButton: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const FollowerAuthenticationContent: (props: {
3
+ children: React.ReactNode;
4
+ }) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps';
3
+ export declare const FollowerAuthenticationDialog: (props: FollowerAuthenticationDialogProps) => JSX.Element;
@@ -0,0 +1,56 @@
1
+ import { ReactNode } from 'react';
2
+ export declare type FollowerAuthenticationDialogProps = {
3
+ open: boolean;
4
+ state: ReducerState;
5
+ dispatch: (event: ReducerEvent) => void;
6
+ messages: Record<MessageKey, string>;
7
+ trigger: 'generic' | 'engagement';
8
+ locationOptions: LocationOption[];
9
+ loading: boolean;
10
+ graphics: Record<`${ReducerStateValue}`, string>;
11
+ logos: Record<'popmenu' | 'facebook' | 'google', ReactNode>;
12
+ };
13
+ export declare type ReducerState = {
14
+ value: ReducerStateValue;
15
+ effects: string[];
16
+ formValues: Record<string, string>;
17
+ defaultFormValues: Record<string, string>;
18
+ };
19
+ export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome';
20
+ export declare type ReducerEvent = {
21
+ type: 'submit-form';
22
+ context: {
23
+ values: Record<string, string>;
24
+ };
25
+ } | {
26
+ type: 'click-password-continue';
27
+ } | {
28
+ type: 'click-facebook-continue';
29
+ } | {
30
+ type: 'click-google-continue';
31
+ } | {
32
+ type: 'click-get-code';
33
+ context: {
34
+ values: Record<string, string>;
35
+ };
36
+ } | {
37
+ type: 'click-done';
38
+ } | {
39
+ type: 'click-close';
40
+ } | {
41
+ type: 'reset';
42
+ } | {
43
+ type: 'dialog-closed';
44
+ } | {
45
+ type: 'user-found';
46
+ } | {
47
+ type: 'user-not-found';
48
+ } | {
49
+ type: 'sign-in-success';
50
+ };
51
+ 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';
52
+ declare type LocationOption = {
53
+ label: string;
54
+ value: string;
55
+ };
56
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationFooter: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationForm: () => JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationGraphic: () => JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationInfo: () => JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationTitle: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps';
3
+ export declare const FollowerAuthenticationDialogContextProvider: import("react").Provider<Omit<FollowerAuthenticationDialogProps, "open"> | null>;
4
+ export declare const useFollowerAuthenticationDialogContext: () => Omit<FollowerAuthenticationDialogProps, "open">;
@@ -0,0 +1,2 @@
1
+ export { FollowerAuthenticationDialog } from './FollowerAuthenticationDialog';
2
+ export { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps';
@@ -0,0 +1,35 @@
1
+ export declare const theme: {
2
+ readonly palette: {
3
+ readonly primary: {
4
+ readonly main: "#2E3042";
5
+ };
6
+ };
7
+ readonly typography: {
8
+ readonly h1: {
9
+ readonly fontFamily: "Poppins";
10
+ readonly fontSize: "24px";
11
+ readonly fontWeight: 400;
12
+ readonly lineHeight: "36px";
13
+ };
14
+ };
15
+ readonly props: {
16
+ readonly MuiTextField: {
17
+ readonly variant: "outlined";
18
+ readonly fullWidth: true;
19
+ };
20
+ readonly MuiButton: {
21
+ readonly variant: "contained";
22
+ readonly color: "primary";
23
+ readonly disableElevation: true;
24
+ readonly fullWidth: true;
25
+ };
26
+ };
27
+ readonly overrides: {
28
+ readonly MuiButton: {
29
+ readonly root: {
30
+ readonly borderRadius: 32;
31
+ readonly textTransform: "none";
32
+ };
33
+ };
34
+ };
35
+ };
@@ -75,3 +75,4 @@ export { default as Toolbar, ToolbarProps } from './Toolbar';
75
75
  export { default as Tooltip, TooltipProps } from './Tooltip';
76
76
  export { default as Typography, TypographyProps, ThemeColors } from './Typography';
77
77
  export { NumberField, NumberFieldProps } from './NumberField';
78
+ export { FollowerAuthenticationDialog, FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialog';
package/build/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
1
  export { default as Alert } from '@material-ui/lab/Alert';
2
- import { makeStyles, Box, Typography as Typography$1, useTheme as useTheme$1, Link as Link$1, Paper as Paper$1, TextField as TextField$1 } from '@material-ui/core';
2
+ import { makeStyles, Box, Typography as Typography$1, useTheme as useTheme$1, Link as Link$1, Paper as Paper$1, TextField as TextField$1, DialogContent, Button as Button$1, MenuItem, Divider as Divider$1, IconButton as IconButton$1, createTheme, useMediaQuery, ThemeProvider, Dialog } from '@material-ui/core';
3
3
  export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Box, Breadcrumbs, ButtonBase, ClickAwayListener, Fab, GridList, Hidden, Modal, Popover, Popper, Step, StepButton, StepConnector, StepContent, StepIcon, StepLabel, Stepper, ThemeProvider, Toolbar, alpha, createTheme, darken, decomposeColor, getLuminance, hexToRgb, lighten, makeStyles, recomposeColor, rgbToHex } from '@material-ui/core';
4
4
  export { default as AppBar } from '@material-ui/core/AppBar';
5
5
  import * as React from 'react';
6
- import React__default, { createElement, forwardRef, useState, useRef, useEffect } from 'react';
6
+ import React__default, { createElement, forwardRef, useState, useRef, useEffect, createContext, useContext } from 'react';
7
7
  import MuiAvatar from '@material-ui/core/Avatar';
8
8
  import { makeStyles as makeStyles$1, useTheme } from '@material-ui/core/styles';
9
9
  export { ServerStyleSheets } from '@material-ui/core/styles';
@@ -111,6 +111,24 @@ function SvgCheckCircle(props) {
111
111
  }))));
112
112
  }
113
113
 
114
+ var _path$26;
115
+
116
+ function _extends$4G() { _extends$4G = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4G.apply(this, arguments); }
117
+
118
+ function SvgX(props) {
119
+ return /*#__PURE__*/React.createElement("svg", _extends$4G({
120
+ viewBox: "0 0 16 16",
121
+ fill: "none",
122
+ strokeLinecap: "round",
123
+ strokeLinejoin: "round",
124
+ width: "1em",
125
+ height: "1em"
126
+ }, props), _path$26 || (_path$26 = /*#__PURE__*/React.createElement("path", {
127
+ d: "M12 4l-8 8m0-8l8 8",
128
+ stroke: "currentColor"
129
+ })));
130
+ }
131
+
114
132
  var _g$2y, _defs$1C;
115
133
 
116
134
  function _extends$4F() { _extends$4F = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4F.apply(this, arguments); }
@@ -765,7 +783,7 @@ var SemanticColors;
765
783
  SemanticColors["SECONDARY_DARK"] = "secondary.dark";
766
784
  SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
767
785
  })(SemanticColors || (SemanticColors = {}));
768
- var useStyles$1 = makeStyles(function (theme) { return ({
786
+ var useStyles$5 = makeStyles(function (theme) { return ({
769
787
  dividerRoot: {
770
788
  gap: theme.spacing(2),
771
789
  },
@@ -803,7 +821,7 @@ var useStyles$1 = makeStyles(function (theme) { return ({
803
821
  }); });
804
822
  var Divider = function (props) {
805
823
  var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
806
- var classes = useStyles$1(props);
824
+ var classes = useStyles$5(props);
807
825
  var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
808
826
  return (React__default.createElement(Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
809
827
  React__default.createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
@@ -843,7 +861,7 @@ Link.defaultProps = {
843
861
  };
844
862
  Link.displayName = 'Link';
845
863
 
846
- var useStyles = makeStyles(function (_a) {
864
+ var useStyles$4 = makeStyles(function (_a) {
847
865
  var spacing = _a.spacing;
848
866
  return ({
849
867
  root: {
@@ -857,7 +875,7 @@ var useStyles = makeStyles(function (_a) {
857
875
  });
858
876
  var Paper = forwardRef(function (props, ref) {
859
877
  var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
860
- var classes = useStyles(props);
878
+ var classes = useStyles$4(props);
861
879
  return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
862
880
  });
863
881
  Paper.displayName = 'Paper';
@@ -1043,6 +1061,275 @@ var NumberField = function (props) {
1043
1061
  React__default.createElement(Icon, { icon: SvgMinusCircle }))) }, restInputProps) }, restProps)));
1044
1062
  };
1045
1063
 
1064
+ var useStyles$3 = makeStyles(function () { return ({
1065
+ root: {
1066
+ display: 'flex',
1067
+ flexDirection: 'column',
1068
+ alignItems: 'center',
1069
+ gridGap: 16,
1070
+ },
1071
+ }); });
1072
+ var FollowerAuthenticationContent = function (props) {
1073
+ var classes = useStyles$3();
1074
+ return React__default.createElement(DialogContent, { classes: classes }, props.children);
1075
+ };
1076
+
1077
+ var FollowerAuthenticationDialogContext = createContext(null);
1078
+ var FollowerAuthenticationDialogContextProvider = FollowerAuthenticationDialogContext.Provider;
1079
+ var useFollowerAuthenticationDialogContext = function () {
1080
+ var context = useContext(FollowerAuthenticationDialogContext);
1081
+ if (!context) {
1082
+ throw new Error('useFollowerAuthenticationDialogContext must be called within FollowerAuthenticationDialogContextProvider');
1083
+ }
1084
+ return context;
1085
+ };
1086
+
1087
+ var FollowerAuthenticationGraphic = function () {
1088
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages, graphics = _a.graphics;
1089
+ var graphic = graphics[state.value];
1090
+ if (!graphic)
1091
+ return null;
1092
+ return (React__default.createElement(Box, null,
1093
+ React__default.createElement("img", { src: graphic, alt: messages[state.value + "GraphicAlt"] })));
1094
+ };
1095
+
1096
+ var useStyles$2 = makeStyles(function () { return ({
1097
+ form: {
1098
+ display: 'flex',
1099
+ flexDirection: 'column',
1100
+ alignItems: 'center',
1101
+ width: '100%',
1102
+ gridGap: 16,
1103
+ },
1104
+ }); });
1105
+ var FollowerAuthenticationForm = function () {
1106
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages, locationOptions = _a.locationOptions, dispatch = _a.dispatch, loading = _a.loading;
1107
+ var classes = useStyles$2();
1108
+ var handleSubmit = function (e) {
1109
+ e.preventDefault();
1110
+ var form = e.target;
1111
+ var formData = new FormData(form);
1112
+ var values = Object.fromEntries(formData.entries());
1113
+ dispatch({ type: 'submit-form', context: { values: values } });
1114
+ };
1115
+ var formProps = {
1116
+ id: 'follower-authentication-form',
1117
+ className: classes.form,
1118
+ onSubmit: handleSubmit,
1119
+ };
1120
+ switch (state.value) {
1121
+ case 'initial':
1122
+ return (React__default.createElement("form", __assign({}, formProps),
1123
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.initialInputLabel, key: "identifier-input", id: "identifier-input", name: "identifier" }),
1124
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.initialCtaButtonLabel)));
1125
+ case 'signUp':
1126
+ return (React__default.createElement("form", __assign({}, formProps),
1127
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.signUpPhoneInputLabel, key: "phone-input", id: "phone-input", name: "phone" }),
1128
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.signUpNameInputLabel, key: "name-input", id: "name-input", name: "name" }),
1129
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.signUpEmailInputLabel, key: "email-input", id: "email-input", name: "email" }),
1130
+ React__default.createElement(TextField$1, { disabled: loading, select: true, label: messages.signUpLocationInputLabel, key: "location-input", id: "location-input", name: "location" }, locationOptions.map(function (locationOption) { return (React__default.createElement(MenuItem, { key: locationOption.value, value: locationOption.value }, locationOption.label)); })),
1131
+ React__default.createElement(Typography$1, { style: { alignSelf: 'start' } }, messages.signUpBirthdaySectionLabel),
1132
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.signUpMonthInputLabel, key: "birthday-month-input", id: "birthday-month-input", name: "birthdayMonth" }),
1133
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.signUpDayInputLabel, key: "birthday-date-input", id: "birthday-date-input", name: "birthdayDate" }),
1134
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signUp)));
1135
+ case 'emailFound':
1136
+ return (React__default.createElement("form", __assign({}, formProps),
1137
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.defaultFormValues.email }),
1138
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.emailFoundCtaButtonLabel)));
1139
+ case 'emailAuthCode':
1140
+ return (React__default.createElement("form", __assign({}, formProps),
1141
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.emailAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
1142
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1143
+ case 'emailPasswordSignIn':
1144
+ return (React__default.createElement("form", __assign({}, formProps),
1145
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.defaultFormValues.email, InputLabelProps: { shrink: true } }),
1146
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
1147
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1148
+ case 'phoneFound':
1149
+ return (React__default.createElement("form", __assign({}, formProps),
1150
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.defaultFormValues.phone }),
1151
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.phoneFoundCtaButtonLabel)));
1152
+ case 'phoneAuthCode':
1153
+ return (React__default.createElement("form", __assign({}, formProps),
1154
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
1155
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1156
+ case 'phonePasswordSignIn':
1157
+ return (React__default.createElement("form", __assign({}, formProps),
1158
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.defaultFormValues.phone, InputLabelProps: { shrink: true } }),
1159
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
1160
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1161
+ case 'welcome':
1162
+ return null;
1163
+ default:
1164
+ return null;
1165
+ }
1166
+ };
1167
+
1168
+ var useStyles$1 = makeStyles(function () { return ({
1169
+ main: {
1170
+ width: '100%',
1171
+ display: 'flex',
1172
+ flexDirection: 'column',
1173
+ gridGap: 16,
1174
+ },
1175
+ }); });
1176
+ var FollowerAuthenticationAltActions = function () {
1177
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, dispatch = _a.dispatch, messages = _a.messages, logos = _a.logos;
1178
+ var classes = useStyles$1();
1179
+ switch (state.value) {
1180
+ case 'initial':
1181
+ return (React__default.createElement(Box, { className: classes.main },
1182
+ React__default.createElement(Divider$1, null),
1183
+ React__default.createElement(Button$1, { variant: "outlined", startIcon: logos.facebook, onClick: function () {
1184
+ dispatch({ type: 'click-facebook-continue' });
1185
+ } }, messages.continueWithFacebookButtonLabel),
1186
+ React__default.createElement(Button$1, { variant: "outlined", startIcon: logos.google, onClick: function () {
1187
+ dispatch({ type: 'click-google-continue' });
1188
+ } }, messages.continueWithGoogleButtonLabel)));
1189
+ case 'signUp':
1190
+ return null;
1191
+ case 'emailFound':
1192
+ return (React__default.createElement(Box, { className: classes.main },
1193
+ React__default.createElement(Divider$1, null),
1194
+ React__default.createElement(Button$1, { variant: "outlined", onClick: function () {
1195
+ dispatch({ type: 'click-password-continue' });
1196
+ } }, messages.signInWithPassword)));
1197
+ case 'emailAuthCode':
1198
+ return null;
1199
+ case 'emailPasswordSignIn':
1200
+ return (React__default.createElement(Box, { className: classes.main },
1201
+ React__default.createElement(Divider$1, null),
1202
+ React__default.createElement(Button$1, { variant: "outlined", onClick: function () {
1203
+ var form = document.querySelector('#follower-authentication-form');
1204
+ var formData = new FormData(form);
1205
+ var values = Object.fromEntries(formData.entries());
1206
+ dispatch({ type: 'click-get-code', context: { values: values } });
1207
+ } }, messages.emailFoundCtaButtonLabel)));
1208
+ case 'phoneFound':
1209
+ return null;
1210
+ case 'phoneAuthCode':
1211
+ return null;
1212
+ case 'phonePasswordSignIn':
1213
+ return (React__default.createElement(Box, { className: classes.main },
1214
+ React__default.createElement(Divider$1, null),
1215
+ React__default.createElement(Button$1, { variant: "outlined", onClick: function () {
1216
+ var form = document.querySelector('#follower-authentication-form');
1217
+ var formData = new FormData(form);
1218
+ var values = Object.fromEntries(formData.entries());
1219
+ dispatch({ type: 'click-get-code', context: { values: values } });
1220
+ } }, messages.phoneFoundCtaButtonLabel)));
1221
+ case 'welcome':
1222
+ return (React__default.createElement(Button$1, { onClick: function () {
1223
+ dispatch({ type: 'click-done' });
1224
+ } }, messages.done));
1225
+ default:
1226
+ return null;
1227
+ }
1228
+ };
1229
+
1230
+ var FollowerAuthenticationBody = function () {
1231
+ return (React__default.createElement(React__default.Fragment, null,
1232
+ React__default.createElement(FollowerAuthenticationForm, null),
1233
+ React__default.createElement(FollowerAuthenticationAltActions, null)));
1234
+ };
1235
+
1236
+ var FollowerAuthenticationFooter = function () {
1237
+ var _a = useFollowerAuthenticationDialogContext(), messages = _a.messages, logos = _a.logos;
1238
+ console.log(logos.popmenu);
1239
+ return (React__default.createElement(Box, { display: "flex", gridGap: 8 },
1240
+ React__default.createElement(Typography$1, { variant: "body2" }, messages.poweredBy),
1241
+ logos.popmenu));
1242
+ };
1243
+
1244
+ var FollowerAuthenticationTitle = function () {
1245
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages;
1246
+ var title = messages[state.value + "Title"];
1247
+ return (React__default.createElement(Box, null,
1248
+ React__default.createElement(Typography$1, { variant: "h1", align: "center" }, title)));
1249
+ };
1250
+
1251
+ var FollowerAuthenticationInfo = function () {
1252
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages;
1253
+ var info = messages[state.value + "Info"];
1254
+ if (!info)
1255
+ return null;
1256
+ return (React__default.createElement(Box, null,
1257
+ React__default.createElement(Typography$1, { align: "center" }, info)));
1258
+ };
1259
+
1260
+ var useStyles = makeStyles(function () { return ({
1261
+ root: {
1262
+ position: 'absolute',
1263
+ top: 0,
1264
+ right: 0,
1265
+ },
1266
+ }); });
1267
+ var FollowerAuthenticationCloseButton = function () {
1268
+ var _a = useFollowerAuthenticationDialogContext(), messages = _a.messages, dispatch = _a.dispatch;
1269
+ var classes = useStyles();
1270
+ var handleClose = function () {
1271
+ dispatch({ type: 'click-close' });
1272
+ };
1273
+ return (React__default.createElement(IconButton$1, { classes: classes, "aria-label": messages.closeButtonLabel, onClick: handleClose },
1274
+ React__default.createElement(SvgX, null)));
1275
+ };
1276
+
1277
+ var theme = {
1278
+ palette: {
1279
+ primary: { main: '#2E3042' },
1280
+ },
1281
+ typography: {
1282
+ h1: {
1283
+ fontFamily: 'Poppins',
1284
+ fontSize: '24px',
1285
+ fontWeight: 400,
1286
+ lineHeight: '36px',
1287
+ },
1288
+ },
1289
+ props: {
1290
+ MuiTextField: {
1291
+ variant: 'outlined',
1292
+ fullWidth: true,
1293
+ },
1294
+ MuiButton: {
1295
+ variant: 'contained',
1296
+ color: 'primary',
1297
+ disableElevation: true,
1298
+ fullWidth: true,
1299
+ },
1300
+ },
1301
+ overrides: {
1302
+ MuiButton: {
1303
+ root: {
1304
+ borderRadius: 32,
1305
+ textTransform: 'none',
1306
+ },
1307
+ },
1308
+ },
1309
+ };
1310
+
1311
+ var FollowerAuthenticationDialog = function (props) {
1312
+ var open = props.open, restProps = __rest(props, ["open"]);
1313
+ var theme$1 = createTheme(theme);
1314
+ var fullScreen = useMediaQuery(function (_a) {
1315
+ var breakpoints = _a.breakpoints;
1316
+ return breakpoints.down('sm');
1317
+ });
1318
+ var handleClose = function () {
1319
+ props.dispatch({ type: 'click-close' });
1320
+ };
1321
+ return (React__default.createElement(ThemeProvider, { theme: theme$1 },
1322
+ React__default.createElement(FollowerAuthenticationDialogContextProvider, { value: restProps },
1323
+ React__default.createElement(Dialog, { open: open, fullScreen: fullScreen, onClose: handleClose },
1324
+ React__default.createElement(FollowerAuthenticationContent, null,
1325
+ React__default.createElement(FollowerAuthenticationCloseButton, null),
1326
+ React__default.createElement(FollowerAuthenticationGraphic, null),
1327
+ React__default.createElement(FollowerAuthenticationTitle, null),
1328
+ React__default.createElement(FollowerAuthenticationInfo, null),
1329
+ React__default.createElement(FollowerAuthenticationBody, null),
1330
+ React__default.createElement(FollowerAuthenticationFooter, null))))));
1331
+ };
1332
+
1046
1333
  var useCollapsibleText = function () {
1047
1334
  var _a = useState(false), open = _a[0], setOpen = _a[1];
1048
1335
  var collapseState = useState(false);
@@ -1087,5 +1374,5 @@ var useTabs = function (options) {
1087
1374
  };
1088
1375
  };
1089
1376
 
1090
- export { Avatar, BrowserSilhouette, Button, Checkbox, Chip, CollapsibleText, Divider, Icon, IconButton, Link, NumberField, Paper, PaperContent, Radio, SplitInput, Switch, TabPanel, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useCollapsibleText, useTabs };
1377
+ export { Avatar, BrowserSilhouette, Button, Checkbox, Chip, CollapsibleText, Divider, FollowerAuthenticationDialog, Icon, IconButton, Link, NumberField, Paper, PaperContent, Radio, SplitInput, Switch, TabPanel, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useCollapsibleText, useTabs };
1091
1378
  //# sourceMappingURL=index.es.js.map