@popmenu/common-ui 0.127.0 → 0.127.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.
Files changed (165) hide show
  1. package/build/cjs/components/Avatar/AvatarProps.d.ts +2 -2
  2. package/build/cjs/components/Button/Button.d.ts +1 -1
  3. package/build/cjs/components/Button/ButtonProps.d.ts +1 -1
  4. package/build/cjs/components/Button/ButtonStyles.d.ts +1 -1
  5. package/build/cjs/components/Chip/Chip.d.ts +1 -1
  6. package/build/cjs/components/Chip/ChipProps.d.ts +2 -2
  7. package/build/cjs/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
  8. package/build/cjs/components/Divider/DividerProps.d.ts +1 -1
  9. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
  10. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
  11. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
  12. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
  13. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
  14. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
  15. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
  16. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
  17. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
  18. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
  19. package/build/cjs/components/FollowerAuthenticationDialog/context.d.ts +0 -1
  20. package/build/cjs/components/Icon/IconStyles.d.ts +1 -1
  21. package/build/cjs/components/IconButton/IconButtonProps.d.ts +1 -1
  22. package/build/cjs/components/Link/LinkStyles.d.ts +1 -1
  23. package/build/cjs/components/NumberField/NumberField.d.ts +0 -1
  24. package/build/cjs/components/NumberField/NumberFieldStyles.d.ts +1 -1
  25. package/build/cjs/components/SplitInput/SplitInputStyles.d.ts +1 -1
  26. package/build/cjs/components/Tooltip/TooltipProps.d.ts +1 -1
  27. package/build/cjs/components/Typography/Typography.d.ts +1 -1
  28. package/build/cjs/components/Typography/TypographyProps.d.ts +3 -3
  29. package/build/cjs/components/Typography/TypographyStyles.d.ts +1 -1
  30. package/build/cjs/hooks/useTabs/useTabsResult.d.ts +3 -3
  31. package/build/cjs/index.js +412 -437
  32. package/build/cjs/index.js.map +1 -1
  33. package/build/cjs/types/index.d.ts +2 -2
  34. package/build/esm/components/Avatar/Avatar.js +9 -10
  35. package/build/esm/components/Avatar/Avatar.js.map +1 -1
  36. package/build/esm/components/Avatar/AvatarProps.d.ts +2 -2
  37. package/build/esm/components/Avatar/avatar.styles.js +11 -11
  38. package/build/esm/components/Avatar/avatar.styles.js.map +1 -1
  39. package/build/esm/components/Avatar/util/useImageProps.js +9 -8
  40. package/build/esm/components/Avatar/util/useImageProps.js.map +1 -1
  41. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js +2 -3
  42. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js.map +1 -1
  43. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js +5 -5
  44. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js.map +1 -1
  45. package/build/esm/components/Button/Button.d.ts +1 -1
  46. package/build/esm/components/Button/Button.js +7 -8
  47. package/build/esm/components/Button/Button.js.map +1 -1
  48. package/build/esm/components/Button/ButtonProps.d.ts +1 -1
  49. package/build/esm/components/Button/ButtonStyles.d.ts +1 -1
  50. package/build/esm/components/Button/ButtonStyles.js +3 -6
  51. package/build/esm/components/Button/ButtonStyles.js.map +1 -1
  52. package/build/esm/components/Checkbox/Checkbox.js +5 -5
  53. package/build/esm/components/Checkbox/Checkbox.js.map +1 -1
  54. package/build/esm/components/Chip/Chip.d.ts +1 -1
  55. package/build/esm/components/Chip/Chip.js +7 -8
  56. package/build/esm/components/Chip/Chip.js.map +1 -1
  57. package/build/esm/components/Chip/ChipProps.d.ts +2 -2
  58. package/build/esm/components/Chip/ChipStyles.js +19 -19
  59. package/build/esm/components/Chip/ChipStyles.js.map +1 -1
  60. package/build/esm/components/CollapsibleText/CollapsibleText.js +19 -20
  61. package/build/esm/components/CollapsibleText/CollapsibleText.js.map +1 -1
  62. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
  63. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js +5 -6
  64. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js.map +1 -1
  65. package/build/esm/components/Divider/Divider.js +11 -15
  66. package/build/esm/components/Divider/Divider.js.map +1 -1
  67. package/build/esm/components/Divider/DividerProps.d.ts +1 -1
  68. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
  69. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +26 -26
  70. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -1
  71. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
  72. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js +1 -1
  73. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js.map +1 -1
  74. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
  75. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js +6 -6
  76. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map +1 -1
  77. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js +4 -4
  78. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map +1 -1
  79. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
  80. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js +11 -15
  81. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map +1 -1
  82. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
  83. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
  84. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js +2 -2
  85. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map +1 -1
  86. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
  87. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +49 -52
  88. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -1
  89. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
  90. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +4 -4
  91. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -1
  92. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
  93. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +3 -3
  94. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -1
  95. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
  96. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js +3 -3
  97. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js.map +1 -1
  98. package/build/esm/components/FollowerAuthenticationDialog/context.d.ts +0 -1
  99. package/build/esm/components/FollowerAuthenticationDialog/context.js +4 -4
  100. package/build/esm/components/FollowerAuthenticationDialog/context.js.map +1 -1
  101. package/build/esm/components/FollowerAuthenticationDialog/theme.js +1 -1
  102. package/build/esm/components/FollowerAuthenticationDialog/theme.js.map +1 -1
  103. package/build/esm/components/Icon/Icon.js +12 -8
  104. package/build/esm/components/Icon/Icon.js.map +1 -1
  105. package/build/esm/components/Icon/IconStyles.d.ts +1 -1
  106. package/build/esm/components/Icon/IconStyles.js +7 -9
  107. package/build/esm/components/Icon/IconStyles.js.map +1 -1
  108. package/build/esm/components/IconButton/IconButton.js +2 -3
  109. package/build/esm/components/IconButton/IconButton.js.map +1 -1
  110. package/build/esm/components/IconButton/IconButtonProps.d.ts +1 -1
  111. package/build/esm/components/Link/Link.js +4 -5
  112. package/build/esm/components/Link/Link.js.map +1 -1
  113. package/build/esm/components/Link/LinkStyles.d.ts +1 -1
  114. package/build/esm/components/Link/LinkStyles.js +8 -8
  115. package/build/esm/components/Link/LinkStyles.js.map +1 -1
  116. package/build/esm/components/NumberField/NumberField.d.ts +0 -1
  117. package/build/esm/components/NumberField/NumberField.js +14 -9
  118. package/build/esm/components/NumberField/NumberField.js.map +1 -1
  119. package/build/esm/components/NumberField/NumberFieldStyles.d.ts +1 -1
  120. package/build/esm/components/NumberField/NumberFieldStyles.js +4 -4
  121. package/build/esm/components/NumberField/NumberFieldStyles.js.map +1 -1
  122. package/build/esm/components/Paper/Paper.js +12 -16
  123. package/build/esm/components/Paper/Paper.js.map +1 -1
  124. package/build/esm/components/PaperContent/PaperContent.js +2 -2
  125. package/build/esm/components/PaperContent/PaperContent.js.map +1 -1
  126. package/build/esm/components/Radio/Radio.js +5 -5
  127. package/build/esm/components/Radio/Radio.js.map +1 -1
  128. package/build/esm/components/SplitInput/SplitInput.js +4 -6
  129. package/build/esm/components/SplitInput/SplitInput.js.map +1 -1
  130. package/build/esm/components/SplitInput/SplitInputStyles.d.ts +1 -1
  131. package/build/esm/components/SplitInput/SplitInputStyles.js +4 -4
  132. package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -1
  133. package/build/esm/components/Switch/Switch.js +6 -6
  134. package/build/esm/components/Switch/Switch.js.map +1 -1
  135. package/build/esm/components/Switch/switch.styles.js +2 -2
  136. package/build/esm/components/Switch/switch.styles.js.map +1 -1
  137. package/build/esm/components/TabPanel/TabPanel.js +2 -2
  138. package/build/esm/components/TabPanel/TabPanel.js.map +1 -1
  139. package/build/esm/components/ToggleButton/ToggleButton.js +5 -6
  140. package/build/esm/components/ToggleButton/ToggleButton.js.map +1 -1
  141. package/build/esm/components/ToggleButton/ToggleButtonStyles.js +4 -4
  142. package/build/esm/components/ToggleButton/ToggleButtonStyles.js.map +1 -1
  143. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js +6 -7
  144. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -1
  145. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js +2 -2
  146. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js.map +1 -1
  147. package/build/esm/components/Tooltip/Tooltip.js +3 -4
  148. package/build/esm/components/Tooltip/Tooltip.js.map +1 -1
  149. package/build/esm/components/Tooltip/TooltipProps.d.ts +1 -1
  150. package/build/esm/components/Tooltip/TooltipStyles.js +5 -8
  151. package/build/esm/components/Tooltip/TooltipStyles.js.map +1 -1
  152. package/build/esm/components/Typography/Typography.d.ts +1 -1
  153. package/build/esm/components/Typography/Typography.js +4 -6
  154. package/build/esm/components/Typography/Typography.js.map +1 -1
  155. package/build/esm/components/Typography/TypographyProps.d.ts +3 -3
  156. package/build/esm/components/Typography/TypographyStyles.d.ts +1 -1
  157. package/build/esm/components/Typography/TypographyStyles.js +29 -47
  158. package/build/esm/components/Typography/TypographyStyles.js.map +1 -1
  159. package/build/esm/hooks/useCollapsibleText.js +7 -7
  160. package/build/esm/hooks/useCollapsibleText.js.map +1 -1
  161. package/build/esm/hooks/useTabs/useTabs.js +15 -15
  162. package/build/esm/hooks/useTabs/useTabs.js.map +1 -1
  163. package/build/esm/hooks/useTabs/useTabsResult.d.ts +3 -3
  164. package/build/esm/types/index.d.ts +2 -2
  165. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"FollowerAuthenticationAltActions.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Button, Divider, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n main: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationAltActions = () => {\n const { state, messages, logos, loading, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n switch (state.value) {\n case 'initial':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n startIcon={logos.facebook}\n onClick={() => {\n onActionButtonClick('sign-in-with-facebook')\n }}\n >\n {messages.continueWithFacebookButtonLabel}\n </Button>\n <Button\n variant=\"outlined\"\n startIcon={logos.google}\n onClick={() => {\n onActionButtonClick('sign-in-with-google')\n }}\n >\n {messages.continueWithGoogleButtonLabel}\n </Button>\n </Box>\n )\n case 'signUp':\n return null\n case 'emailFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('sign-in-with-password')\n }}\n >\n {messages.signInWithPassword}\n </Button>\n </Box>\n )\n case 'emailAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'indirectUserFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('use-different-account')\n }}\n >\n {messages.indirectUserFoundCtaButtonLabelAlt}\n </Button>\n </Box>\n )\n case 'emailPasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'phoneFound':\n return null\n case 'phoneAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'phonePasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'welcome':\n return (\n <Button\n onClick={() => {\n onActionButtonClick('close')\n }}\n >\n {messages.done}\n </Button>\n )\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;AAIA,IAAM,SAAS,GAAG,UAAU,CAAC,YAAA,EAAM,QAAC;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,OAAO,EAAE,EAAE;AACZ,KAAA;CACF,EAAC,EAAA,CAAC;AACU,IAAA,gCAAgC,GAAG,YAAA;AACxC,IAAA,IAAA,KAA2D,sCAAsC,EAAE,EAAjG,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,QAAQ,GAAA,EAAA,CAA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,CAAC,wBAAwB,CAC3B,CACL;AAEV,QAAA,KAAK,SAAS;AACZ,YAAA,QACE,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EACL,OAAO,EAAE,YAAA;oBACP,mBAAmB,CAAC,OAAO,CAAC;AAC9B,iBAAC,IAEA,QAAQ,CAAC,IAAI,CACP;AAEb,QAAA;AACE,YAAA,OAAO,IAAI;AACd;AACH;;;;"}
1
+ {"version":3,"file":"FollowerAuthenticationAltActions.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Button, Divider, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n main: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationAltActions = () => {\n const { state, messages, logos, loading, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n switch (state.value) {\n case 'initial':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n startIcon={logos.facebook}\n onClick={() => {\n onActionButtonClick('sign-in-with-facebook')\n }}\n >\n {messages.continueWithFacebookButtonLabel}\n </Button>\n <Button\n variant=\"outlined\"\n startIcon={logos.google}\n onClick={() => {\n onActionButtonClick('sign-in-with-google')\n }}\n >\n {messages.continueWithGoogleButtonLabel}\n </Button>\n </Box>\n )\n case 'signUp':\n return null\n case 'emailFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('sign-in-with-password')\n }}\n >\n {messages.signInWithPassword}\n </Button>\n </Box>\n )\n case 'emailAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'indirectUserFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('use-different-account')\n }}\n >\n {messages.indirectUserFoundCtaButtonLabelAlt}\n </Button>\n </Box>\n )\n case 'emailPasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'phoneFound':\n return null\n case 'phoneAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'phonePasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'welcome':\n return (\n <Button\n onClick={() => {\n onActionButtonClick('close')\n }}\n >\n {messages.done}\n </Button>\n )\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;AAIA,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,Q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AAW,CAAC,QAAQ,CAAC,OAAO,EAAE,CAA2B;AAC/E,wBAAA,mBAAmB,CAAC,uBAAuB,EAAE,MAAM,CAAC;AACtD,qBAAC,IAEA,QAAQ,CAAC,wBAAwB,CAC3B,CACL;AAEV,QAAA,KAAK,SAAS;AACZ,YAAA,QACE,KAAC,CAAA,aAAA,CAAA,MAAM,IACL,OAAO,EAAE,MAAK;oBACZ,mBAAmB,CAAC,OAAO,CAAC;AAC9B,iBAAC,IAEA,QAAQ,CAAC,IAAI,CACP;AAEb,QAAA;AACE,YAAA,OAAO,IAAI;;AAEjB;;;;"}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FollowerAuthenticationBody: () => JSX.Element;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { FollowerAuthenticationForm } from './FollowerAuthenticationForm.js';
3
3
  import { FollowerAuthenticationAltActions } from './FollowerAuthenticationAltActions.js';
4
4
 
5
- var FollowerAuthenticationBody = function () {
5
+ const FollowerAuthenticationBody = () => {
6
6
  return (React.createElement(React.Fragment, null,
7
7
  React.createElement(FollowerAuthenticationForm, null),
8
8
  React.createElement(FollowerAuthenticationAltActions, null)));
@@ -1 +1 @@
1
- {"version":3,"file":"FollowerAuthenticationBody.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.tsx"],"sourcesContent":["import React from 'react'\nimport { FollowerAuthenticationForm } from './FollowerAuthenticationForm'\nimport { FollowerAuthenticationAltActions } from './FollowerAuthenticationAltActions'\n\nexport const FollowerAuthenticationBody = () => {\n return (\n <React.Fragment>\n <FollowerAuthenticationForm />\n <FollowerAuthenticationAltActions />\n </React.Fragment>\n )\n}\n"],"names":[],"mappings":";;;;AAIa,IAAA,0BAA0B,GAAG,YAAA;AACxC,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;AACb,QAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,QAAA,KAAA,CAAA,aAAA,CAAC,gCAAgC,EAAA,IAAA,CAAG,CACrB;AAErB;;;;"}
1
+ {"version":3,"file":"FollowerAuthenticationBody.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.tsx"],"sourcesContent":["import React from 'react'\nimport { FollowerAuthenticationForm } from './FollowerAuthenticationForm'\nimport { FollowerAuthenticationAltActions } from './FollowerAuthenticationAltActions'\n\nexport const FollowerAuthenticationBody = () => {\n return (\n <React.Fragment>\n <FollowerAuthenticationForm />\n <FollowerAuthenticationAltActions />\n </React.Fragment>\n )\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,0BAA0B,GAAG,MAAK;AAC7C,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;AACb,QAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,QAAA,KAAA,CAAA,aAAA,CAAC,gCAAgC,EAAA,IAAA,CAAG,CACrB;AAErB;;;;"}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FollowerAuthenticationCloseButton: () => JSX.Element;
@@ -3,17 +3,17 @@ import React from 'react';
3
3
  import { useFollowerAuthenticationDialogContext } from './context.js';
4
4
  import { X } from '@popmenu/web-icons';
5
5
 
6
- var useStyles = makeStyles(function () { return ({
6
+ const useStyles = makeStyles(() => ({
7
7
  root: {
8
8
  position: 'absolute',
9
9
  top: 0,
10
10
  right: 0,
11
11
  },
12
- }); });
13
- var FollowerAuthenticationCloseButton = function () {
14
- var _a = useFollowerAuthenticationDialogContext(), messages = _a.messages, onActionButtonClick = _a.onActionButtonClick;
15
- var classes = useStyles();
16
- var handleClose = function () {
12
+ }));
13
+ const FollowerAuthenticationCloseButton = () => {
14
+ const { messages, onActionButtonClick } = useFollowerAuthenticationDialogContext();
15
+ const classes = useStyles();
16
+ const handleClose = () => {
17
17
  onActionButtonClick('close');
18
18
  };
19
19
  return (React.createElement(IconButton, { classes: classes, "aria-label": messages.closeButtonLabel, onClick: handleClose },
@@ -1 +1 @@
1
- {"version":3,"file":"FollowerAuthenticationCloseButton.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.tsx"],"sourcesContent":["import { IconButton, makeStyles } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { X as XIcon } from '@popmenu/web-icons'\n\nconst useStyles = makeStyles(() => ({\n root: {\n position: 'absolute',\n top: 0,\n right: 0,\n },\n}))\nexport const FollowerAuthenticationCloseButton = () => {\n const { messages, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n const handleClose = () => {\n onActionButtonClick('close')\n }\n return (\n <IconButton classes={classes} aria-label={messages.closeButtonLabel} onClick={handleClose}>\n <XIcon />\n </IconButton>\n )\n}\n"],"names":["XIcon"],"mappings":";;;;;AAKA,IAAM,SAAS,GAAG,UAAU,CAAC,YAAA,EAAM,QAAC;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;CACF,EAAC,EAAA,CAAC;AACU,IAAA,iCAAiC,GAAG,YAAA;IACzC,IAAA,EAAA,GAAoC,sCAAsC,EAAE,EAA1E,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,mBAAmB,GAAA,EAAA,CAAA,mBAA6C;AAClF,IAAA,IAAM,OAAO,GAAG,SAAS,EAAE;AAC3B,IAAA,IAAM,WAAW,GAAG,YAAA;QAClB,mBAAmB,CAAC,OAAO,CAAC;AAC9B,KAAC;AACD,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,OAAO,EAAE,OAAO,EAAc,YAAA,EAAA,QAAQ,CAAC,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAA;AACvF,QAAA,KAAA,CAAA,aAAA,CAACA,CAAK,EAAA,IAAA,CAAG,CACE;AAEjB;;;;"}
1
+ {"version":3,"file":"FollowerAuthenticationCloseButton.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.tsx"],"sourcesContent":["import { IconButton, makeStyles } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { X as XIcon } from '@popmenu/web-icons'\n\nconst useStyles = makeStyles(() => ({\n root: {\n position: 'absolute',\n top: 0,\n right: 0,\n },\n}))\nexport const FollowerAuthenticationCloseButton = () => {\n const { messages, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n const handleClose = () => {\n onActionButtonClick('close')\n }\n return (\n <IconButton classes={classes} aria-label={messages.closeButtonLabel} onClick={handleClose}>\n <XIcon />\n </IconButton>\n )\n}\n"],"names":["XIcon"],"mappings":";;;;;AAKA,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;AACF,CAAA,CAAC,CAAC;AACI,MAAM,iCAAiC,GAAG,MAAK;IACpD,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,sCAAsC,EAAE;AAClF,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,MAAM,WAAW,GAAG,MAAK;QACvB,mBAAmB,CAAC,OAAO,CAAC;AAC9B,KAAC;AACD,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,OAAO,EAAE,OAAO,EAAc,YAAA,EAAA,QAAQ,CAAC,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAA;AACvF,QAAA,KAAA,CAAA,aAAA,CAACA,CAAK,EAAA,IAAA,CAAG,CACE;AAEjB;;;;"}
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
  import { makeStyles, DialogContent } from '@material-ui/core';
3
3
 
4
- var useStyles = makeStyles(function () { return ({
4
+ const useStyles = makeStyles(() => ({
5
5
  root: {
6
6
  display: 'flex',
7
7
  flexDirection: 'column',
8
8
  alignItems: 'center',
9
9
  gridGap: 16,
10
10
  },
11
- }); });
12
- var FollowerAuthenticationContent = function (props) {
13
- var classes = useStyles();
11
+ }));
12
+ const FollowerAuthenticationContent = (props) => {
13
+ const classes = useStyles();
14
14
  return React.createElement(DialogContent, { classes: classes }, props.children);
15
15
  };
16
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"FollowerAuthenticationContent.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.tsx"],"sourcesContent":["import React from 'react'\nimport { DialogContent, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationContent = (props: { children: React.ReactNode }) => {\n const classes = useStyles()\n return <DialogContent classes={classes}>{props.children}</DialogContent>\n}\n"],"names":[],"mappings":";;;AAGA,IAAM,SAAS,GAAG,UAAU,CAAC,YAAA,EAAM,QAAC;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,OAAO,EAAE,EAAE;AACZ,KAAA;CACF,EAAC,EAAA,CAAC;AACI,IAAM,6BAA6B,GAAG,UAAC,KAAoC,EAAA;AAChF,IAAA,IAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,OAAO,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EAAC,OAAO,EAAE,OAAO,EAAA,EAAG,KAAK,CAAC,QAAQ,CAAiB;AAC1E;;;;"}
1
+ {"version":3,"file":"FollowerAuthenticationContent.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.tsx"],"sourcesContent":["import React from 'react'\nimport { DialogContent, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationContent = (props: { children: React.ReactNode }) => {\n const classes = useStyles()\n return <DialogContent classes={classes}>{props.children}</DialogContent>\n}\n"],"names":[],"mappings":";;;AAGA,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,OAAO,EAAE,EAAE;AACZ,KAAA;AACF,CAAA,CAAC,CAAC;AACU,MAAA,6BAA6B,GAAG,CAAC,KAAoC,KAAI;AACpF,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,OAAO,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EAAC,OAAO,EAAE,OAAO,EAAA,EAAG,KAAK,CAAC,QAAQ,CAAiB;AAC1E;;;;"}
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps';
3
2
  export declare const FollowerAuthenticationDialog: (props: FollowerAuthenticationDialogProps) => JSX.Element;
@@ -1,24 +1,20 @@
1
- import { __rest } from 'tslib';
2
- import React from 'react';
3
1
  import { createTheme, useMediaQuery, ThemeProvider, Dialog } from '@material-ui/core';
4
- import { FollowerAuthenticationContent } from './FollowerAuthenticationContent.js';
5
- import { FollowerAuthenticationGraphic } from './FollowerAuthenticationGraphic.js';
2
+ import React from 'react';
3
+ import { FollowerAuthenticationDialogContextProvider } from './context.js';
6
4
  import { FollowerAuthenticationBody } from './FollowerAuthenticationBody.js';
5
+ import { FollowerAuthenticationCloseButton } from './FollowerAuthenticationCloseButton.js';
6
+ import { FollowerAuthenticationContent } from './FollowerAuthenticationContent.js';
7
7
  import { FollowerAuthenticationFooter } from './FollowerAuthenticationFooter.js';
8
- import { FollowerAuthenticationDialogContextProvider } from './context.js';
9
- import { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle.js';
8
+ import { FollowerAuthenticationGraphic } from './FollowerAuthenticationGraphic.js';
10
9
  import { FollowerAuthenticationInfo } from './FollowerAuthenticationInfo.js';
11
- import { FollowerAuthenticationCloseButton } from './FollowerAuthenticationCloseButton.js';
10
+ import { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle.js';
12
11
  import { theme } from './theme.js';
13
12
 
14
- var FollowerAuthenticationDialog = function (props) {
15
- var open = props.open, restProps = __rest(props, ["open"]);
16
- var theme$1 = createTheme(theme);
17
- var fullScreen = useMediaQuery(function (_a) {
18
- var breakpoints = _a.breakpoints;
19
- return breakpoints.down('sm');
20
- });
21
- var handleClose = function () {
13
+ const FollowerAuthenticationDialog = (props) => {
14
+ const { open, ...restProps } = props;
15
+ const theme$1 = createTheme(theme);
16
+ const fullScreen = useMediaQuery((theme) => theme.breakpoints.down('sm'));
17
+ const handleClose = () => {
22
18
  restProps.onActionButtonClick('close');
23
19
  };
24
20
  return (React.createElement(ThemeProvider, { theme: theme$1 },
@@ -1 +1 @@
1
- {"version":3,"file":"FollowerAuthenticationDialog.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.tsx"],"sourcesContent":["import React from 'react'\nimport { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps'\nimport { createTheme, Dialog, ThemeProvider, useMediaQuery } from '@material-ui/core'\nimport { FollowerAuthenticationContent } from './FollowerAuthenticationContent'\nimport { FollowerAuthenticationGraphic } from './FollowerAuthenticationGraphic'\nimport { FollowerAuthenticationBody } from './FollowerAuthenticationBody'\nimport { FollowerAuthenticationFooter } from './FollowerAuthenticationFooter'\nimport { FollowerAuthenticationDialogContextProvider } from './context'\nimport { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle'\nimport { FollowerAuthenticationInfo } from './FollowerAuthenticationInfo'\nimport { FollowerAuthenticationCloseButton } from './FollowerAuthenticationCloseButton'\nimport { theme as themeOptions } from './theme'\n\nexport const FollowerAuthenticationDialog = (props: FollowerAuthenticationDialogProps) => {\n const { open, ...restProps } = props\n const theme = createTheme(themeOptions)\n const fullScreen = useMediaQuery(({ breakpoints }) => breakpoints.down('sm'))\n const handleClose = () => {\n restProps.onActionButtonClick('close')\n }\n return (\n <ThemeProvider theme={theme}>\n <FollowerAuthenticationDialogContextProvider value={restProps}>\n <Dialog open={open} fullScreen={fullScreen} onClose={handleClose}>\n <FollowerAuthenticationContent>\n <FollowerAuthenticationCloseButton />\n <FollowerAuthenticationGraphic />\n <FollowerAuthenticationTitle />\n <FollowerAuthenticationInfo />\n <FollowerAuthenticationBody />\n <FollowerAuthenticationFooter />\n </FollowerAuthenticationContent>\n </Dialog>\n </FollowerAuthenticationDialogContextProvider>\n </ThemeProvider>\n )\n}\n"],"names":["theme","themeOptions"],"mappings":";;;;;;;;;;;;;AAaO,IAAM,4BAA4B,GAAG,UAAC,KAAwC,EAAA;IAC3E,IAAA,IAAI,GAAmB,KAAK,CAAxB,IAAA,EAAK,SAAS,GAAA,MAAA,CAAK,KAAK,EAA9B,CAAsB,MAAA,CAAA,CAAF;AAC1B,IAAA,IAAMA,OAAK,GAAG,WAAW,CAACC,KAAY,CAAC;AACvC,IAAA,IAAM,UAAU,GAAG,aAAa,CAAC,UAAC,EAAe,EAAA;AAAb,QAAA,IAAA,WAAW,GAAA,EAAA,CAAA,WAAA;AAAO,QAAA,OAAA,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;AAAtB,KAAsB,CAAC;AAC7E,IAAA,IAAM,WAAW,GAAG,YAAA;AAClB,QAAA,SAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC;AACxC,KAAC;AACD,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,aAAa,EAAC,EAAA,KAAK,EAAED,OAAK,EAAA;AACzB,QAAA,KAAA,CAAA,aAAA,CAAC,2CAA2C,EAAA,EAAC,KAAK,EAAE,SAAS,EAAA;AAC3D,YAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAA;AAC9D,gBAAA,KAAA,CAAA,aAAA,CAAC,6BAA6B,EAAA,IAAA;AAC5B,oBAAA,KAAA,CAAA,aAAA,CAAC,iCAAiC,EAAG,IAAA,CAAA;AACrC,oBAAA,KAAA,CAAA,aAAA,CAAC,6BAA6B,EAAG,IAAA,CAAA;AACjC,oBAAA,KAAA,CAAA,aAAA,CAAC,2BAA2B,EAAG,IAAA,CAAA;AAC/B,oBAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,oBAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,oBAAA,KAAA,CAAA,aAAA,CAAC,4BAA4B,EAAG,IAAA,CAAA,CACF,CACzB,CACmC,CAChC;AAEpB;;;;"}
1
+ {"version":3,"file":"FollowerAuthenticationDialog.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.tsx"],"sourcesContent":["import { createTheme, Dialog, Theme, ThemeProvider, useMediaQuery } from '@material-ui/core'\nimport React from 'react'\nimport { FollowerAuthenticationDialogContextProvider } from './context'\nimport { FollowerAuthenticationBody } from './FollowerAuthenticationBody'\nimport { FollowerAuthenticationCloseButton } from './FollowerAuthenticationCloseButton'\nimport { FollowerAuthenticationContent } from './FollowerAuthenticationContent'\nimport { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps'\nimport { FollowerAuthenticationFooter } from './FollowerAuthenticationFooter'\nimport { FollowerAuthenticationGraphic } from './FollowerAuthenticationGraphic'\nimport { FollowerAuthenticationInfo } from './FollowerAuthenticationInfo'\nimport { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle'\nimport { theme as themeOptions } from './theme'\n\nexport const FollowerAuthenticationDialog = (props: FollowerAuthenticationDialogProps) => {\n const { open, ...restProps } = props\n const theme = createTheme(themeOptions)\n const fullScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n const handleClose = () => {\n restProps.onActionButtonClick('close')\n }\n return (\n <ThemeProvider theme={theme}>\n <FollowerAuthenticationDialogContextProvider value={restProps}>\n <Dialog open={open} fullScreen={fullScreen} onClose={handleClose}>\n <FollowerAuthenticationContent>\n <FollowerAuthenticationCloseButton />\n <FollowerAuthenticationGraphic />\n <FollowerAuthenticationTitle />\n <FollowerAuthenticationInfo />\n <FollowerAuthenticationBody />\n <FollowerAuthenticationFooter />\n </FollowerAuthenticationContent>\n </Dialog>\n </FollowerAuthenticationDialogContextProvider>\n </ThemeProvider>\n )\n}\n"],"names":["theme","themeOptions"],"mappings":";;;;;;;;;;;;AAaa,MAAA,4BAA4B,GAAG,CAAC,KAAwC,KAAI;IACvF,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK;AACpC,IAAA,MAAMA,OAAK,GAAG,WAAW,CAACC,KAAY,CAAC;AACvC,IAAA,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,KAAY,KAAK,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChF,MAAM,WAAW,GAAG,MAAK;AACvB,QAAA,SAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC;AACxC,KAAC;AACD,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,aAAa,EAAC,EAAA,KAAK,EAAED,OAAK,EAAA;AACzB,QAAA,KAAA,CAAA,aAAA,CAAC,2CAA2C,EAAA,EAAC,KAAK,EAAE,SAAS,EAAA;AAC3D,YAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAA;AAC9D,gBAAA,KAAA,CAAA,aAAA,CAAC,6BAA6B,EAAA,IAAA;AAC5B,oBAAA,KAAA,CAAA,aAAA,CAAC,iCAAiC,EAAG,IAAA,CAAA;AACrC,oBAAA,KAAA,CAAA,aAAA,CAAC,6BAA6B,EAAG,IAAA,CAAA;AACjC,oBAAA,KAAA,CAAA,aAAA,CAAC,2BAA2B,EAAG,IAAA,CAAA;AAC/B,oBAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,oBAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,oBAAA,KAAA,CAAA,aAAA,CAAC,4BAA4B,EAAG,IAAA,CAAA,CACF,CACzB,CACmC,CAChC;AAEpB;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export declare type FollowerAuthenticationDialogProps = {
2
+ export type FollowerAuthenticationDialogProps = {
3
3
  open: boolean;
4
4
  state: ReducerState;
5
5
  messages: Record<MessageKey, ReactNode> & {
@@ -11,7 +11,7 @@ export declare type FollowerAuthenticationDialogProps = {
11
11
  logos: Record<'popmenu' | 'facebook' | 'google', ReactNode>;
12
12
  onActionButtonClick: (eventType: ClickEventType, values?: Record<string, string>) => void;
13
13
  };
14
- export declare type ReducerState = {
14
+ export type ReducerState = {
15
15
  value: ReducerStateValue;
16
16
  context: {
17
17
  email?: string;
@@ -19,10 +19,10 @@ export declare type ReducerState = {
19
19
  name?: string;
20
20
  };
21
21
  };
22
- export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome' | 'requirePhone';
23
- export declare type ClickEventType = 'submit-form' | 'click-close' | 'code-sent' | 'request-auth-code-email' | 'request-auth-code-sms' | 'close' | 'use-different-account' | 'sign-in-with-password' | 'sign-in-with-facebook' | 'sign-in-with-google';
24
- export declare type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'requirePhoneInputLabel' | 'requirePhoneCtaButtonLabel' | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneErrorText' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailErrorText' | 'signUpEmailInputLabel' | 'signUpLocationErrorText' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'resendAuthCode' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword';
25
- declare type LocationOption = {
22
+ export type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome' | 'requirePhone';
23
+ export type ClickEventType = 'submit-form' | 'click-close' | 'code-sent' | 'request-auth-code-email' | 'request-auth-code-sms' | 'close' | 'use-different-account' | 'sign-in-with-password' | 'sign-in-with-facebook' | 'sign-in-with-google';
24
+ export type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'requirePhoneInputLabel' | 'requirePhoneCtaButtonLabel' | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneErrorText' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailErrorText' | 'signUpEmailInputLabel' | 'signUpLocationErrorText' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'resendAuthCode' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword';
25
+ type LocationOption = {
26
26
  label: string;
27
27
  value: string;
28
28
  };
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FollowerAuthenticationFooter: () => JSX.Element;
@@ -2,8 +2,8 @@ import { Box, Typography } from '@material-ui/core';
2
2
  import React from 'react';
3
3
  import { useFollowerAuthenticationDialogContext } from './context.js';
4
4
 
5
- var FollowerAuthenticationFooter = function () {
6
- var _a = useFollowerAuthenticationDialogContext(), messages = _a.messages, logos = _a.logos;
5
+ const FollowerAuthenticationFooter = () => {
6
+ const { messages, logos } = useFollowerAuthenticationDialogContext();
7
7
  return (React.createElement(Box, { display: "flex", gridGap: 8 },
8
8
  React.createElement(Typography, { variant: "body2" }, messages.poweredBy),
9
9
  logos.popmenu));
@@ -1 +1 @@
1
- {"version":3,"file":"FollowerAuthenticationFooter.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.tsx"],"sourcesContent":["import { Box, Typography } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\n\nexport const FollowerAuthenticationFooter = () => {\n const { messages, logos } = useFollowerAuthenticationDialogContext()\n return (\n <Box display=\"flex\" gridGap={8}>\n <Typography variant=\"body2\">{messages.poweredBy}</Typography>\n {logos.popmenu}\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAIa,IAAA,4BAA4B,GAAG,YAAA;IACpC,IAAA,EAAA,GAAsB,sCAAsC,EAAE,EAA5D,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAA6C;IACpE,QACE,KAAC,CAAA,aAAA,CAAA,GAAG,EAAC,EAAA,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,CAAC,EAAA;QAC5B,KAAC,CAAA,aAAA,CAAA,UAAU,IAAC,OAAO,EAAC,OAAO,EAAE,EAAA,QAAQ,CAAC,SAAS,CAAc;AAC5D,QAAA,KAAK,CAAC,OAAO,CACV;AAEV;;;;"}
1
+ {"version":3,"file":"FollowerAuthenticationFooter.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.tsx"],"sourcesContent":["import { Box, Typography } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\n\nexport const FollowerAuthenticationFooter = () => {\n const { messages, logos } = useFollowerAuthenticationDialogContext()\n return (\n <Box display=\"flex\" gridGap={8}>\n <Typography variant=\"body2\">{messages.poweredBy}</Typography>\n {logos.popmenu}\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,4BAA4B,GAAG,MAAK;IAC/C,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,sCAAsC,EAAE;IACpE,QACE,KAAC,CAAA,aAAA,CAAA,GAAG,EAAC,EAAA,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,CAAC,EAAA;QAC5B,KAAC,CAAA,aAAA,CAAA,UAAU,IAAC,OAAO,EAAC,OAAO,EAAE,EAAA,QAAQ,CAAC,SAAS,CAAc;AAC5D,QAAA,KAAK,CAAC,OAAO,CACV;AAEV;;;;"}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FollowerAuthenticationForm: () => JSX.Element | null;
@@ -1,9 +1,8 @@
1
- import { __assign } from 'tslib';
2
1
  import React, { useRef, useState, useEffect } from 'react';
3
2
  import { useFollowerAuthenticationDialogContext } from './context.js';
4
3
  import { makeStyles, TextField, Button, MenuItem, Typography } from '@material-ui/core';
5
4
 
6
- var useStyles = makeStyles(function () { return ({
5
+ const useStyles = makeStyles(() => ({
7
6
  form: {
8
7
  display: 'flex',
9
8
  flexDirection: 'column',
@@ -11,38 +10,37 @@ var useStyles = makeStyles(function () { return ({
11
10
  width: '100%',
12
11
  gridGap: 16,
13
12
  },
14
- }); });
15
- var northAmericanPhoneRegex = /^(\()?[2-9]{1}\d{2}(\))?[-\s.]?[2-9]{1}\d{2}[-\s.]?\d{4}$/;
16
- var ukPhoneRegex = /^((\+?44\s?|0044\s?)(\s?\d{3,5}|\(\d{3,5}\))(\s?\d{3,4})(\s?\d{3,4})$|^07\d{9}$)/;
17
- var validatePhoneNumber = function (phone) {
13
+ }));
14
+ const northAmericanPhoneRegex = /^(\()?[2-9]{1}\d{2}(\))?[-\s.]?[2-9]{1}\d{2}[-\s.]?\d{4}$/;
15
+ const ukPhoneRegex = /^((\+?44\s?|0044\s?)(\s?\d{3,5}|\(\d{3,5}\))(\s?\d{3,4})(\s?\d{3,4})$|^07\d{9}$)/;
16
+ const validatePhoneNumber = (phone) => {
18
17
  if (!phone)
19
18
  return false;
20
19
  return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone);
21
20
  };
22
- var FollowerAuthenticationForm = function () {
23
- var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages, locationOptions = _a.locationOptions, onActionButtonClick = _a.onActionButtonClick, loading = _a.loading;
24
- var classes = useStyles();
21
+ const FollowerAuthenticationForm = () => {
22
+ const { state, messages, locationOptions, onActionButtonClick, loading } = useFollowerAuthenticationDialogContext();
23
+ const classes = useStyles();
25
24
  // sign-up form state
26
- var formRef = useRef(null);
27
- var _b = useState(false), formValidity = _b[0], setFormValidity = _b[1];
28
- var _c = useState(), showPhoneErrorText = _c[0], setShowPhoneErrorText = _c[1];
29
- var _d = useState(), showEmailErrorText = _d[0], setShowEmailErrorText = _d[1];
30
- var _e = useState(), showLocationErrorText = _e[0], setShowLocationErrorText = _e[1];
31
- var _f = useState(state.context.phone || ''), signUpPhoneValue = _f[0], setSignUpPhoneValue = _f[1];
32
- var _g = useState(state.context.email || ''), signUpEmailValue = _g[0], setSignUpEmailValue = _g[1];
33
- var checkFieldValidity = function (e) {
34
- var _a, _b;
35
- var fieldName = e.target.name;
36
- var fieldValue = e.target.value;
25
+ const formRef = useRef(null);
26
+ const [formValidity, setFormValidity] = useState(false);
27
+ const [showPhoneErrorText, setShowPhoneErrorText] = useState();
28
+ const [showEmailErrorText, setShowEmailErrorText] = useState();
29
+ const [showLocationErrorText, setShowLocationErrorText] = useState();
30
+ const [signUpPhoneValue, setSignUpPhoneValue] = useState(state.context.phone || '');
31
+ const [signUpEmailValue, setSignUpEmailValue] = useState(state.context.email || '');
32
+ const checkFieldValidity = (e) => {
33
+ const fieldName = e.target.name;
34
+ const fieldValue = e.target.value;
37
35
  switch (fieldName) {
38
36
  case 'phone':
39
- var isPhoneValid = validatePhoneNumber(fieldValue);
37
+ const isPhoneValid = validatePhoneNumber(fieldValue);
40
38
  setSignUpPhoneValue(fieldValue);
41
39
  setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0);
42
40
  break;
43
41
  case 'email':
44
- var emailField = (_a = formRef.current) === null || _a === void 0 ? void 0 : _a.elements.namedItem(fieldName);
45
- var isEmailValid = (_b = emailField === null || emailField === void 0 ? void 0 : emailField.validity.valid) !== null && _b !== void 0 ? _b : false;
42
+ const emailField = formRef.current?.elements.namedItem(fieldName);
43
+ const isEmailValid = emailField?.validity.valid ?? false;
46
44
  setSignUpEmailValue(fieldValue);
47
45
  setShowEmailErrorText(!isEmailValid && fieldValue.length > 0);
48
46
  break;
@@ -51,52 +49,51 @@ var FollowerAuthenticationForm = function () {
51
49
  break;
52
50
  }
53
51
  };
54
- useEffect(function () {
52
+ useEffect(() => {
55
53
  setSignUpPhoneValue(state.context.phone || '');
56
54
  setSignUpEmailValue(state.context.email || '');
57
55
  }, [state.context.phone, state.context.email]);
58
- useEffect(function () {
59
- var _a, _b, _c;
56
+ useEffect(() => {
60
57
  // Validate pre-filled values (only in signUp state)
61
58
  if (state.value === 'signUp') {
62
59
  if (signUpPhoneValue) {
63
- var isPhoneValid = validatePhoneNumber(signUpPhoneValue);
60
+ const isPhoneValid = validatePhoneNumber(signUpPhoneValue);
64
61
  setShowPhoneErrorText(!isPhoneValid);
65
62
  }
66
63
  if (signUpEmailValue) {
67
- var emailField = (_a = formRef.current) === null || _a === void 0 ? void 0 : _a.elements.namedItem('email');
68
- var isEmailValid = (_b = emailField === null || emailField === void 0 ? void 0 : emailField.validity.valid) !== null && _b !== void 0 ? _b : false;
64
+ const emailField = formRef.current?.elements.namedItem('email');
65
+ const isEmailValid = emailField?.validity.valid ?? false;
69
66
  setShowEmailErrorText(!isEmailValid);
70
67
  }
71
68
  }
72
- var hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText;
73
- var hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText;
74
- var locationField = (_c = formRef.current) === null || _c === void 0 ? void 0 : _c.elements.namedItem('location');
75
- var hasValidLocation = locationField ? Boolean(locationField.value) : true;
76
- var hasValidContact = hasValidPhone || hasValidEmail;
69
+ const hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText;
70
+ const hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText;
71
+ const locationField = formRef.current?.elements.namedItem('location');
72
+ const hasValidLocation = locationField ? Boolean(locationField.value) : true;
73
+ const hasValidContact = hasValidPhone || hasValidEmail;
77
74
  setFormValidity(hasValidContact && hasValidLocation);
78
75
  }, [state.value, signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText]);
79
- var handleSubmit = function (e) {
76
+ const handleSubmit = (e) => {
80
77
  e.preventDefault();
81
- var form = e.target;
82
- var formData = new FormData(form);
83
- var values = Object.fromEntries(formData.entries());
78
+ const form = e.target;
79
+ const formData = new FormData(form);
80
+ const values = Object.fromEntries(formData.entries());
84
81
  onActionButtonClick('submit-form', values);
85
82
  };
86
- var formProps = {
83
+ const formProps = {
87
84
  id: 'follower-authentication-form',
88
85
  className: classes.form,
89
86
  onSubmit: handleSubmit,
90
87
  };
91
88
  switch (state.value) {
92
89
  case 'initial':
93
- return (React.createElement("form", __assign({}, formProps),
90
+ return (React.createElement("form", { ...formProps },
94
91
  React.createElement(TextField, { disabled: loading, label: messages.initialInputLabel, key: "identifier-input", id: "identifier-input", name: "identifier" }),
95
92
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.initialCtaButtonLabel)));
96
93
  case 'signUp':
97
- return (React.createElement("form", __assign({ ref: formRef }, formProps, { onInvalid: function (e) {
94
+ return (React.createElement("form", { ref: formRef, ...formProps, onInvalid: (e) => {
98
95
  e.preventDefault();
99
- } }),
96
+ } },
100
97
  React.createElement(TextField, { disabled: loading, label: messages.signUpPhoneInputLabel, key: "phone-input", id: "phone-input", name: "phone", onChange: checkFieldValidity, error: showPhoneErrorText, helperText: showPhoneErrorText && messages.signUpPhoneErrorText, inputProps: {
101
98
  required: signUpEmailValue ? false : true,
102
99
  }, defaultValue: state.context.phone }),
@@ -105,27 +102,27 @@ var FollowerAuthenticationForm = function () {
105
102
  required: signUpPhoneValue ? false : true,
106
103
  type: 'email',
107
104
  }, defaultValue: state.context.email }),
108
- React.createElement(TextField, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, key: "location-input", id: "location-input", inputProps: { required: true }, name: "location" }, locationOptions.map(function (locationOption) { return (React.createElement(MenuItem, { "data-cy": 'option', key: locationOption.value, value: locationOption.value }, locationOption.label)); })),
105
+ React.createElement(TextField, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, key: "location-input", id: "location-input", inputProps: { required: true }, name: "location" }, locationOptions.map((locationOption) => (React.createElement(MenuItem, { "data-cy": 'option', key: locationOption.value, value: locationOption.value }, locationOption.label)))),
109
106
  React.createElement(Typography, { style: { alignSelf: 'start' } }, messages.signUpBirthdaySectionLabel),
110
107
  React.createElement(TextField, { disabled: loading, label: messages.signUpMonthInputLabel, key: "birthday-month-input", id: "birthday-month-input", name: "birthdayMonth" }),
111
108
  React.createElement(TextField, { disabled: loading, label: messages.signUpDayInputLabel, key: "birthday-date-input", id: "birthday-date-input", name: "birthdayDate" }),
112
109
  React.createElement(Button, { disabled: loading || !formValidity, type: "submit" }, messages.signUp)));
113
110
  case 'emailFound':
114
- return (React.createElement("form", __assign({}, formProps),
111
+ return (React.createElement("form", { ...formProps },
115
112
  React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
116
113
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.emailFoundCtaButtonLabel)));
117
114
  case 'emailAuthCode':
118
- return (React.createElement("form", __assign({}, formProps),
115
+ return (React.createElement("form", { ...formProps },
119
116
  React.createElement(TextField, { disabled: loading, label: messages.emailAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
120
117
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
121
118
  case 'indirectUserFound': {
122
119
  if (state.context.email) {
123
- return (React.createElement("form", __assign({}, formProps),
120
+ return (React.createElement("form", { ...formProps },
124
121
  React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
125
122
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
126
123
  }
127
124
  else if (state.context.phone) {
128
- return (React.createElement("form", __assign({}, formProps),
125
+ return (React.createElement("form", { ...formProps },
129
126
  React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
130
127
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
131
128
  }
@@ -133,25 +130,25 @@ var FollowerAuthenticationForm = function () {
133
130
  return null;
134
131
  }
135
132
  case 'emailPasswordSignIn':
136
- return (React.createElement("form", __assign({}, formProps),
133
+ return (React.createElement("form", { ...formProps },
137
134
  React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email, InputLabelProps: { shrink: true } }),
138
135
  React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
139
136
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
140
137
  case 'phoneFound':
141
- return (React.createElement("form", __assign({}, formProps),
138
+ return (React.createElement("form", { ...formProps },
142
139
  React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
143
140
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.phoneFoundCtaButtonLabel)));
144
141
  case 'phoneAuthCode':
145
- return (React.createElement("form", __assign({}, formProps),
142
+ return (React.createElement("form", { ...formProps },
146
143
  React.createElement(TextField, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code", autoComplete: "one-time-code" }),
147
144
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
148
145
  case 'phonePasswordSignIn':
149
- return (React.createElement("form", __assign({}, formProps),
146
+ return (React.createElement("form", { ...formProps },
150
147
  React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone, InputLabelProps: { shrink: true } }),
151
148
  React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
152
149
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
153
150
  case 'requirePhone':
154
- return (React.createElement("form", __assign({}, formProps),
151
+ return (React.createElement("form", { ...formProps },
155
152
  React.createElement(TextField, { disabled: loading, label: messages.requirePhoneInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
156
153
  React.createElement(Button, { disabled: loading, type: "submit" }, messages.requirePhoneCtaButtonLabel)));
157
154
  case 'welcome':