@popmenu/common-ui 0.126.0 → 0.126.2

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 (426) hide show
  1. package/build/cjs/components/Avatar/Avatar.d.ts +3 -0
  2. package/build/{components → cjs/components}/Avatar/AvatarProps.d.ts +22 -22
  3. package/build/{components → cjs/components}/Avatar/avatar.styles.d.ts +2 -2
  4. package/build/cjs/components/Avatar/index.d.ts +2 -0
  5. package/build/{components → cjs/components}/Avatar/util/useImageProps.d.ts +10 -10
  6. package/build/{components → cjs/components}/BrowserSilhouette/BrowserSilhouette.d.ts +2 -2
  7. package/build/{components → cjs/components}/BrowserSilhouette/browserSilhouette.styles.d.ts +1 -1
  8. package/build/cjs/components/BrowserSilhouette/index.d.ts +1 -0
  9. package/build/{components → cjs/components}/Button/Button.d.ts +6 -6
  10. package/build/{components → cjs/components}/Button/ButtonProps.d.ts +11 -11
  11. package/build/cjs/components/Button/ButtonStyles.d.ts +2 -0
  12. package/build/cjs/components/Button/index.d.ts +2 -0
  13. package/build/cjs/components/Checkbox/Checkbox.d.ts +3 -0
  14. package/build/{components → cjs/components}/Checkbox/CheckboxProps.d.ts +7 -8
  15. package/build/cjs/components/Checkbox/index.d.ts +2 -0
  16. package/build/{components → cjs/components}/Chip/Chip.d.ts +6 -6
  17. package/build/{components → cjs/components}/Chip/ChipProps.d.ts +8 -8
  18. package/build/{components → cjs/components}/Chip/ChipStyles.d.ts +2 -2
  19. package/build/cjs/components/Chip/index.d.ts +2 -0
  20. package/build/{components → cjs/components}/CollapsibleText/CollapsibleText.d.ts +3 -3
  21. package/build/{components → cjs/components}/CollapsibleText/CollapsibleTextProps.d.ts +13 -13
  22. package/build/{components → cjs/components}/CollapsibleText/CollapsibleTextStyles.d.ts +5 -5
  23. package/build/cjs/components/CollapsibleText/index.d.ts +2 -0
  24. package/build/{components → cjs/components}/Divider/Divider.d.ts +3 -3
  25. package/build/{components → cjs/components}/Divider/DividerProps.d.ts +17 -17
  26. package/build/cjs/components/Divider/index.d.ts +2 -0
  27. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -2
  28. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -2
  29. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -2
  30. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +4 -4
  31. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +3 -3
  32. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +29 -29
  33. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -2
  34. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -2
  35. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -2
  36. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -2
  37. package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -2
  38. package/build/{components → cjs/components}/FollowerAuthenticationDialog/context.d.ts +4 -4
  39. package/build/cjs/components/FollowerAuthenticationDialog/index.d.ts +2 -0
  40. package/build/{components → cjs/components}/FollowerAuthenticationDialog/theme.d.ts +35 -35
  41. package/build/{components → cjs/components}/Icon/Icon.d.ts +4 -4
  42. package/build/{components → cjs/components}/Icon/IconProps.d.ts +17 -17
  43. package/build/{components → cjs/components}/Icon/IconStyles.d.ts +2 -2
  44. package/build/cjs/components/Icon/index.d.ts +2 -0
  45. package/build/cjs/components/IconButton/IconButton.d.ts +3 -0
  46. package/build/{components → cjs/components}/IconButton/IconButtonProps.d.ts +2 -2
  47. package/build/cjs/components/IconButton/index.d.ts +2 -0
  48. package/build/{components → cjs/components}/Link/Link.d.ts +11 -11
  49. package/build/{components → cjs/components}/Link/LinkStyles.d.ts +2 -2
  50. package/build/cjs/components/Link/index.d.ts +2 -0
  51. package/build/{components → cjs/components}/NumberField/NumberField.d.ts +3 -3
  52. package/build/{components → cjs/components}/NumberField/NumberFieldProps.d.ts +12 -12
  53. package/build/{components → cjs/components}/NumberField/NumberFieldStyles.d.ts +2 -2
  54. package/build/cjs/components/NumberField/index.d.ts +2 -0
  55. package/build/cjs/components/Paper/Paper.d.ts +6 -0
  56. package/build/cjs/components/Paper/index.d.ts +2 -0
  57. package/build/{components → cjs/components}/PaperContent/PaperContent.d.ts +2 -2
  58. package/build/cjs/components/PaperContent/index.d.ts +1 -0
  59. package/build/cjs/components/Radio/Radio.d.ts +3 -0
  60. package/build/{components → cjs/components}/Radio/RadioProps.d.ts +7 -8
  61. package/build/cjs/components/Radio/index.d.ts +2 -0
  62. package/build/{components → cjs/components}/SplitInput/SplitInput.d.ts +3 -3
  63. package/build/{components → cjs/components}/SplitInput/SplitInputProps.d.ts +20 -20
  64. package/build/{components → cjs/components}/SplitInput/SplitInputStyles.d.ts +2 -2
  65. package/build/cjs/components/SplitInput/index.d.ts +2 -0
  66. package/build/cjs/components/Switch/Switch.d.ts +3 -0
  67. package/build/{components → cjs/components}/Switch/SwitchProps.d.ts +7 -8
  68. package/build/cjs/components/Switch/index.d.ts +2 -0
  69. package/build/{components → cjs/components}/Switch/switch.styles.d.ts +2 -2
  70. package/build/{components → cjs/components}/TabPanel/TabPanel.d.ts +3 -3
  71. package/build/{components → cjs/components}/TabPanel/TabPanelProps.d.ts +3 -3
  72. package/build/cjs/components/TabPanel/index.d.ts +2 -0
  73. package/build/cjs/components/ToggleButton/ToggleButton.d.ts +3 -0
  74. package/build/{components → cjs/components}/ToggleButton/ToggleButtonProps.d.ts +4 -4
  75. package/build/{components → cjs/components}/ToggleButton/ToggleButtonStyles.d.ts +2 -2
  76. package/build/cjs/components/ToggleButton/index.d.ts +2 -0
  77. package/build/cjs/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
  78. package/build/{components → cjs/components}/ToggleButtonGroup/ToggleButtonGroupProps.d.ts +6 -6
  79. package/build/{components → cjs/components}/ToggleButtonGroup/ToggleButtonGroupStyles.d.ts +1 -1
  80. package/build/cjs/components/ToggleButtonGroup/index.d.ts +2 -0
  81. package/build/cjs/components/Tooltip/Tooltip.d.ts +3 -0
  82. package/build/cjs/components/Tooltip/TooltipProps.d.ts +1 -0
  83. package/build/{components → cjs/components}/Tooltip/TooltipStyles.d.ts +2 -2
  84. package/build/cjs/components/Tooltip/index.d.ts +2 -0
  85. package/build/{components → cjs/components}/Typography/Typography.d.ts +9 -9
  86. package/build/{components → cjs/components}/Typography/TypographyProps.d.ts +14 -15
  87. package/build/cjs/components/Typography/TypographyStyles.d.ts +10 -0
  88. package/build/cjs/components/Typography/index.d.ts +2 -0
  89. package/build/cjs/components/index.d.ts +45 -0
  90. package/build/{hooks → cjs/hooks}/index.d.ts +2 -2
  91. package/build/{hooks → cjs/hooks}/useCollapsibleText.d.ts +9 -9
  92. package/build/{hooks → cjs/hooks}/useTabs/index.d.ts +1 -1
  93. package/build/{hooks → cjs/hooks}/useTabs/useTabs.d.ts +3 -3
  94. package/build/{hooks → cjs/hooks}/useTabs/useTabsOptions.d.ts +3 -3
  95. package/build/{hooks → cjs/hooks}/useTabs/useTabsResult.d.ts +22 -22
  96. package/build/{index.d.ts → cjs/index.d.ts} +3 -3
  97. package/build/cjs/index.js +1303 -0
  98. package/build/cjs/index.js.map +1 -0
  99. package/build/{types → cjs/types}/index.d.ts +2 -2
  100. package/build/{util → cjs/util}/colors/alpha.d.ts +1 -1
  101. package/build/{util → cjs/util}/colors/darken.d.ts +1 -1
  102. package/build/{util → cjs/util}/colors/decomposeColor.d.ts +1 -1
  103. package/build/{util → cjs/util}/colors/getLuminance.d.ts +1 -1
  104. package/build/{util → cjs/util}/colors/hexToRgb.d.ts +1 -1
  105. package/build/{util → cjs/util}/colors/index.d.ts +8 -8
  106. package/build/{util → cjs/util}/colors/lighten.d.ts +1 -1
  107. package/build/{util → cjs/util}/colors/recomposeColor.d.ts +1 -1
  108. package/build/{util → cjs/util}/colors/rgbToHex.d.ts +1 -1
  109. package/build/{util → cjs/util}/createTheme.d.ts +1 -1
  110. package/build/{util → cjs/util}/index.d.ts +4 -4
  111. package/build/{util → cjs/util}/makeStyles.d.ts +1 -1
  112. package/build/esm/components/Avatar/Avatar.d.ts +3 -0
  113. package/build/esm/components/Avatar/Avatar.js +39 -0
  114. package/build/esm/components/Avatar/Avatar.js.map +1 -0
  115. package/build/esm/components/Avatar/AvatarProps.d.ts +22 -0
  116. package/build/esm/components/Avatar/avatar.styles.d.ts +2 -0
  117. package/build/esm/components/Avatar/avatar.styles.js +41 -0
  118. package/build/esm/components/Avatar/avatar.styles.js.map +1 -0
  119. package/build/esm/components/Avatar/index.d.ts +2 -0
  120. package/build/esm/components/Avatar/util/useImageProps.d.ts +10 -0
  121. package/build/esm/components/Avatar/util/useImageProps.js +21 -0
  122. package/build/esm/components/Avatar/util/useImageProps.js.map +1 -0
  123. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.d.ts +2 -0
  124. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js +18 -0
  125. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js.map +1 -0
  126. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.d.ts +1 -0
  127. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js +25 -0
  128. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js.map +1 -0
  129. package/build/esm/components/BrowserSilhouette/index.d.ts +1 -0
  130. package/build/esm/components/Button/Button.d.ts +6 -0
  131. package/build/esm/components/Button/Button.js +21 -0
  132. package/build/esm/components/Button/Button.js.map +1 -0
  133. package/build/esm/components/Button/ButtonProps.d.ts +11 -0
  134. package/build/esm/components/Button/ButtonStyles.d.ts +2 -0
  135. package/build/esm/components/Button/ButtonStyles.js +16 -0
  136. package/build/esm/components/Button/ButtonStyles.js.map +1 -0
  137. package/build/esm/components/Button/index.d.ts +2 -0
  138. package/build/esm/components/Checkbox/Checkbox.d.ts +3 -0
  139. package/build/esm/components/Checkbox/Checkbox.js +13 -0
  140. package/build/esm/components/Checkbox/Checkbox.js.map +1 -0
  141. package/build/esm/components/Checkbox/CheckboxProps.d.ts +7 -0
  142. package/build/esm/components/Checkbox/index.d.ts +2 -0
  143. package/build/esm/components/Chip/Chip.d.ts +6 -0
  144. package/build/esm/components/Chip/Chip.js +23 -0
  145. package/build/esm/components/Chip/Chip.js.map +1 -0
  146. package/build/esm/components/Chip/ChipProps.d.ts +8 -0
  147. package/build/esm/components/Chip/ChipStyles.d.ts +2 -0
  148. package/build/esm/components/Chip/ChipStyles.js +83 -0
  149. package/build/esm/components/Chip/ChipStyles.js.map +1 -0
  150. package/build/esm/components/Chip/index.d.ts +2 -0
  151. package/build/esm/components/CollapsibleText/CollapsibleText.d.ts +3 -0
  152. package/build/esm/components/CollapsibleText/CollapsibleText.js +40 -0
  153. package/build/esm/components/CollapsibleText/CollapsibleText.js.map +1 -0
  154. package/build/esm/components/CollapsibleText/CollapsibleTextProps.d.ts +13 -0
  155. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.d.ts +5 -0
  156. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js +24 -0
  157. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js.map +1 -0
  158. package/build/esm/components/CollapsibleText/index.d.ts +2 -0
  159. package/build/esm/components/Divider/Divider.d.ts +3 -0
  160. package/build/esm/components/Divider/Divider.js +70 -0
  161. package/build/esm/components/Divider/Divider.js.map +1 -0
  162. package/build/esm/components/Divider/DividerProps.d.ts +17 -0
  163. package/build/esm/components/Divider/index.d.ts +2 -0
  164. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -0
  165. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +86 -0
  166. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -0
  167. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -0
  168. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js +12 -0
  169. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js.map +1 -0
  170. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -0
  171. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js +24 -0
  172. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map +1 -0
  173. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +4 -0
  174. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js +18 -0
  175. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map +1 -0
  176. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +3 -0
  177. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js +37 -0
  178. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map +1 -0
  179. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +29 -0
  180. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -0
  181. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js +13 -0
  182. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map +1 -0
  183. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -0
  184. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +149 -0
  185. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -0
  186. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -0
  187. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +15 -0
  188. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -0
  189. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -0
  190. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +15 -0
  191. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -0
  192. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -0
  193. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js +13 -0
  194. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js.map +1 -0
  195. package/build/esm/components/FollowerAuthenticationDialog/context.d.ts +4 -0
  196. package/build/esm/components/FollowerAuthenticationDialog/context.js +14 -0
  197. package/build/esm/components/FollowerAuthenticationDialog/context.js.map +1 -0
  198. package/build/esm/components/FollowerAuthenticationDialog/index.d.ts +2 -0
  199. package/build/esm/components/FollowerAuthenticationDialog/theme.d.ts +35 -0
  200. package/build/esm/components/FollowerAuthenticationDialog/theme.js +36 -0
  201. package/build/esm/components/FollowerAuthenticationDialog/theme.js.map +1 -0
  202. package/build/esm/components/Icon/Icon.d.ts +4 -0
  203. package/build/esm/components/Icon/Icon.js +29 -0
  204. package/build/esm/components/Icon/Icon.js.map +1 -0
  205. package/build/esm/components/Icon/IconProps.d.ts +17 -0
  206. package/build/esm/components/Icon/IconStyles.d.ts +2 -0
  207. package/build/esm/components/Icon/IconStyles.js +43 -0
  208. package/build/esm/components/Icon/IconStyles.js.map +1 -0
  209. package/build/esm/components/Icon/index.d.ts +2 -0
  210. package/build/esm/components/IconButton/IconButton.d.ts +3 -0
  211. package/build/esm/components/IconButton/IconButton.js +14 -0
  212. package/build/esm/components/IconButton/IconButton.js.map +1 -0
  213. package/build/esm/components/IconButton/IconButtonProps.d.ts +2 -0
  214. package/build/esm/components/IconButton/index.d.ts +2 -0
  215. package/build/esm/components/Link/Link.d.ts +11 -0
  216. package/build/esm/components/Link/Link.js +18 -0
  217. package/build/esm/components/Link/Link.js.map +1 -0
  218. package/build/esm/components/Link/LinkStyles.d.ts +2 -0
  219. package/build/esm/components/Link/LinkStyles.js +15 -0
  220. package/build/esm/components/Link/LinkStyles.js.map +1 -0
  221. package/build/esm/components/Link/index.d.ts +2 -0
  222. package/build/esm/components/NumberField/NumberField.d.ts +3 -0
  223. package/build/esm/components/NumberField/NumberField.js +20 -0
  224. package/build/esm/components/NumberField/NumberField.js.map +1 -0
  225. package/build/esm/components/NumberField/NumberFieldProps.d.ts +12 -0
  226. package/build/esm/components/NumberField/NumberFieldStyles.d.ts +2 -0
  227. package/build/esm/components/NumberField/NumberFieldStyles.js +32 -0
  228. package/build/esm/components/NumberField/NumberFieldStyles.js.map +1 -0
  229. package/build/esm/components/NumberField/index.d.ts +2 -0
  230. package/build/esm/components/Paper/Paper.d.ts +6 -0
  231. package/build/esm/components/Paper/Paper.js +28 -0
  232. package/build/esm/components/Paper/Paper.js.map +1 -0
  233. package/build/esm/components/Paper/index.d.ts +2 -0
  234. package/build/esm/components/PaperContent/PaperContent.d.ts +2 -0
  235. package/build/esm/components/PaperContent/PaperContent.js +10 -0
  236. package/build/esm/components/PaperContent/PaperContent.js.map +1 -0
  237. package/build/esm/components/PaperContent/index.d.ts +1 -0
  238. package/build/esm/components/Radio/Radio.d.ts +3 -0
  239. package/build/esm/components/Radio/Radio.js +13 -0
  240. package/build/esm/components/Radio/Radio.js.map +1 -0
  241. package/build/esm/components/Radio/RadioProps.d.ts +7 -0
  242. package/build/esm/components/Radio/index.d.ts +2 -0
  243. package/build/esm/components/SplitInput/SplitInput.d.ts +3 -0
  244. package/build/esm/components/SplitInput/SplitInput.js +21 -0
  245. package/build/esm/components/SplitInput/SplitInput.js.map +1 -0
  246. package/build/esm/components/SplitInput/SplitInputProps.d.ts +20 -0
  247. package/build/esm/components/SplitInput/SplitInputStyles.d.ts +2 -0
  248. package/build/esm/components/SplitInput/SplitInputStyles.js +29 -0
  249. package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -0
  250. package/build/esm/components/SplitInput/index.d.ts +2 -0
  251. package/build/esm/components/Switch/Switch.d.ts +3 -0
  252. package/build/esm/components/Switch/Switch.js +15 -0
  253. package/build/esm/components/Switch/Switch.js.map +1 -0
  254. package/build/esm/components/Switch/SwitchProps.d.ts +7 -0
  255. package/build/esm/components/Switch/index.d.ts +2 -0
  256. package/build/esm/components/Switch/switch.styles.d.ts +2 -0
  257. package/build/esm/components/Switch/switch.styles.js +17 -0
  258. package/build/esm/components/Switch/switch.styles.js.map +1 -0
  259. package/build/esm/components/TabPanel/TabPanel.d.ts +3 -0
  260. package/build/esm/components/TabPanel/TabPanel.js +10 -0
  261. package/build/esm/components/TabPanel/TabPanel.js.map +1 -0
  262. package/build/esm/components/TabPanel/TabPanelProps.d.ts +3 -0
  263. package/build/esm/components/TabPanel/index.d.ts +2 -0
  264. package/build/esm/components/ToggleButton/ToggleButton.d.ts +3 -0
  265. package/build/esm/components/ToggleButton/ToggleButton.js +20 -0
  266. package/build/esm/components/ToggleButton/ToggleButton.js.map +1 -0
  267. package/build/esm/components/ToggleButton/ToggleButtonProps.d.ts +4 -0
  268. package/build/esm/components/ToggleButton/ToggleButtonStyles.d.ts +2 -0
  269. package/build/esm/components/ToggleButton/ToggleButtonStyles.js +19 -0
  270. package/build/esm/components/ToggleButton/ToggleButtonStyles.js.map +1 -0
  271. package/build/esm/components/ToggleButton/index.d.ts +2 -0
  272. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
  273. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js +20 -0
  274. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -0
  275. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupProps.d.ts +6 -0
  276. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.d.ts +1 -0
  277. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js +12 -0
  278. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js.map +1 -0
  279. package/build/esm/components/ToggleButtonGroup/index.d.ts +2 -0
  280. package/build/esm/components/Tooltip/Tooltip.d.ts +3 -0
  281. package/build/esm/components/Tooltip/Tooltip.js +13 -0
  282. package/build/esm/components/Tooltip/Tooltip.js.map +1 -0
  283. package/build/esm/components/Tooltip/TooltipProps.d.ts +1 -0
  284. package/build/esm/components/Tooltip/TooltipStyles.d.ts +2 -0
  285. package/build/esm/components/Tooltip/TooltipStyles.js +13 -0
  286. package/build/esm/components/Tooltip/TooltipStyles.js.map +1 -0
  287. package/build/esm/components/Tooltip/index.d.ts +2 -0
  288. package/build/esm/components/Typography/Typography.d.ts +9 -0
  289. package/build/esm/components/Typography/Typography.js +17 -0
  290. package/build/esm/components/Typography/Typography.js.map +1 -0
  291. package/build/esm/components/Typography/TypographyProps.d.ts +14 -0
  292. package/build/esm/components/Typography/TypographyProps.js +6 -0
  293. package/build/esm/components/Typography/TypographyProps.js.map +1 -0
  294. package/build/esm/components/Typography/TypographyStyles.d.ts +10 -0
  295. package/build/esm/components/Typography/TypographyStyles.js +76 -0
  296. package/build/esm/components/Typography/TypographyStyles.js.map +1 -0
  297. package/build/esm/components/Typography/index.d.ts +2 -0
  298. package/build/esm/components/index.d.ts +45 -0
  299. package/build/esm/hooks/index.d.ts +2 -0
  300. package/build/esm/hooks/useCollapsibleText.d.ts +9 -0
  301. package/build/esm/hooks/useCollapsibleText.js +17 -0
  302. package/build/esm/hooks/useCollapsibleText.js.map +1 -0
  303. package/build/esm/hooks/useTabs/index.d.ts +1 -0
  304. package/build/esm/hooks/useTabs/useTabs.d.ts +3 -0
  305. package/build/esm/hooks/useTabs/useTabs.js +35 -0
  306. package/build/esm/hooks/useTabs/useTabs.js.map +1 -0
  307. package/build/esm/hooks/useTabs/useTabsOptions.d.ts +3 -0
  308. package/build/esm/hooks/useTabs/useTabsResult.d.ts +22 -0
  309. package/build/esm/index.d.ts +3 -0
  310. package/build/esm/index.js +28 -0
  311. package/build/esm/index.js.map +1 -0
  312. package/build/esm/types/index.d.ts +2 -0
  313. package/build/esm/util/colors/alpha.d.ts +1 -0
  314. package/build/esm/util/colors/darken.d.ts +1 -0
  315. package/build/esm/util/colors/decomposeColor.d.ts +1 -0
  316. package/build/esm/util/colors/getLuminance.d.ts +1 -0
  317. package/build/esm/util/colors/hexToRgb.d.ts +1 -0
  318. package/build/esm/util/colors/index.d.ts +8 -0
  319. package/build/esm/util/colors/lighten.d.ts +1 -0
  320. package/build/esm/util/colors/recomposeColor.d.ts +1 -0
  321. package/build/esm/util/colors/rgbToHex.d.ts +1 -0
  322. package/build/esm/util/createTheme.d.ts +1 -0
  323. package/build/esm/util/index.d.ts +4 -0
  324. package/build/esm/util/makeStyles.d.ts +1 -0
  325. package/package.json +8 -8
  326. package/build/components/Accordion/index.d.ts +0 -1
  327. package/build/components/AccordionActions/index.d.ts +0 -1
  328. package/build/components/AccordionDetails/index.d.ts +0 -1
  329. package/build/components/AccordionSummary/index.d.ts +0 -1
  330. package/build/components/Alert/index.d.ts +0 -1
  331. package/build/components/AppBar/index.d.ts +0 -1
  332. package/build/components/Avatar/Avatar.d.ts +0 -3
  333. package/build/components/Avatar/index.d.ts +0 -2
  334. package/build/components/Badge/index.d.ts +0 -1
  335. package/build/components/Box/Box.d.ts +0 -3
  336. package/build/components/Box/BoxProps.d.ts +0 -5
  337. package/build/components/Box/BoxStyles.d.ts +0 -1
  338. package/build/components/Box/index.d.ts +0 -7
  339. package/build/components/Breadcrumbs/index.d.ts +0 -1
  340. package/build/components/BrowserSilhouette/index.d.ts +0 -1
  341. package/build/components/Button/ButtonStyles.d.ts +0 -2
  342. package/build/components/Button/index.d.ts +0 -2
  343. package/build/components/ButtonBase/index.d.ts +0 -1
  344. package/build/components/ButtonGroup/index.d.ts +0 -1
  345. package/build/components/Card/index.d.ts +0 -1
  346. package/build/components/CardActionArea/index.d.ts +0 -1
  347. package/build/components/CardActions/index.d.ts +0 -1
  348. package/build/components/CardContent/index.d.ts +0 -1
  349. package/build/components/CardHeader/index.d.ts +0 -1
  350. package/build/components/CardMedia/index.d.ts +0 -1
  351. package/build/components/Checkbox/Checkbox.d.ts +0 -3
  352. package/build/components/Checkbox/index.d.ts +0 -2
  353. package/build/components/Chip/index.d.ts +0 -2
  354. package/build/components/CircularProgress/index.d.ts +0 -1
  355. package/build/components/ClickAwayListener/index.d.ts +0 -1
  356. package/build/components/CollapsibleText/index.d.ts +0 -2
  357. package/build/components/Dialog/index.d.ts +0 -1
  358. package/build/components/DialogActions/index.d.ts +0 -1
  359. package/build/components/DialogContent/index.d.ts +0 -1
  360. package/build/components/DialogContentText/index.d.ts +0 -1
  361. package/build/components/DialogTitle/index.d.ts +0 -1
  362. package/build/components/Divider/index.d.ts +0 -2
  363. package/build/components/Drawer/index.d.ts +0 -1
  364. package/build/components/Fab/index.d.ts +0 -1
  365. package/build/components/FollowerAuthenticationDialog/index.d.ts +0 -2
  366. package/build/components/FormControl/index.d.ts +0 -1
  367. package/build/components/FormControlLabel/index.d.ts +0 -1
  368. package/build/components/FormLabel/index.d.ts +0 -1
  369. package/build/components/Grid/index.d.ts +0 -1
  370. package/build/components/GridList/index.d.ts +0 -1
  371. package/build/components/Hidden/index.d.ts +0 -1
  372. package/build/components/Icon/index.d.ts +0 -2
  373. package/build/components/IconButton/IconButton.d.ts +0 -3
  374. package/build/components/IconButton/index.d.ts +0 -2
  375. package/build/components/InputAdornment/index.d.ts +0 -1
  376. package/build/components/LinearProgress/index.d.ts +0 -1
  377. package/build/components/Link/index.d.ts +0 -2
  378. package/build/components/List/index.d.ts +0 -1
  379. package/build/components/ListItem/index.d.ts +0 -1
  380. package/build/components/ListItemAvatar/index.d.ts +0 -1
  381. package/build/components/ListItemIcon/index.d.ts +0 -1
  382. package/build/components/ListItemSecondaryAction/index.d.ts +0 -1
  383. package/build/components/ListItemText/index.d.ts +0 -1
  384. package/build/components/Menu/index.d.ts +0 -1
  385. package/build/components/MenuItem/index.d.ts +0 -1
  386. package/build/components/MenuList/index.d.ts +0 -1
  387. package/build/components/Modal/index.d.ts +0 -1
  388. package/build/components/NumberField/index.d.ts +0 -2
  389. package/build/components/Paper/Paper.d.ts +0 -6
  390. package/build/components/Paper/index.d.ts +0 -1
  391. package/build/components/PaperContent/index.d.ts +0 -1
  392. package/build/components/Popover/index.d.ts +0 -1
  393. package/build/components/Popper/index.d.ts +0 -1
  394. package/build/components/Radio/Radio.d.ts +0 -3
  395. package/build/components/Radio/index.d.ts +0 -2
  396. package/build/components/SplitInput/index.d.ts +0 -2
  397. package/build/components/Step/index.d.ts +0 -1
  398. package/build/components/StepButton/index.d.ts +0 -1
  399. package/build/components/StepConnector/index.d.ts +0 -1
  400. package/build/components/StepContent/index.d.ts +0 -1
  401. package/build/components/StepIcon/index.d.ts +0 -1
  402. package/build/components/StepLabel/index.d.ts +0 -1
  403. package/build/components/Stepper/index.d.ts +0 -1
  404. package/build/components/Switch/Switch.d.ts +0 -3
  405. package/build/components/Switch/index.d.ts +0 -2
  406. package/build/components/Tab/index.d.ts +0 -1
  407. package/build/components/TabPanel/index.d.ts +0 -2
  408. package/build/components/Tabs/index.d.ts +0 -1
  409. package/build/components/TextField/index.d.ts +0 -1
  410. package/build/components/ThemeProvider/index.d.ts +0 -1
  411. package/build/components/ToggleButton/ToggleButton.d.ts +0 -3
  412. package/build/components/ToggleButton/index.d.ts +0 -2
  413. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -3
  414. package/build/components/ToggleButtonGroup/index.d.ts +0 -2
  415. package/build/components/Toolbar/index.d.ts +0 -1
  416. package/build/components/Tooltip/Tooltip.d.ts +0 -3
  417. package/build/components/Tooltip/TooltipProps.d.ts +0 -1
  418. package/build/components/Tooltip/index.d.ts +0 -2
  419. package/build/components/Typography/TypographyStyles.d.ts +0 -4
  420. package/build/components/Typography/index.d.ts +0 -2
  421. package/build/components/index.d.ts +0 -78
  422. package/build/index.es.js +0 -1479
  423. package/build/index.es.js.map +0 -1
  424. package/build/index.js +0 -1971
  425. package/build/index.js.map +0 -1
  426. package/build/util/ServerStyleSheets.d.ts +0 -1
@@ -0,0 +1,37 @@
1
+ import { __rest } from 'tslib';
2
+ import React from 'react';
3
+ import { createTheme, useMediaQuery, ThemeProvider, Dialog } from '@material-ui/core';
4
+ import { FollowerAuthenticationContent } from './FollowerAuthenticationContent.js';
5
+ import { FollowerAuthenticationGraphic } from './FollowerAuthenticationGraphic.js';
6
+ import { FollowerAuthenticationBody } from './FollowerAuthenticationBody.js';
7
+ import { FollowerAuthenticationFooter } from './FollowerAuthenticationFooter.js';
8
+ import { FollowerAuthenticationDialogContextProvider } from './context.js';
9
+ import { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle.js';
10
+ import { FollowerAuthenticationInfo } from './FollowerAuthenticationInfo.js';
11
+ import { FollowerAuthenticationCloseButton } from './FollowerAuthenticationCloseButton.js';
12
+ import { theme } from './theme.js';
13
+
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 () {
22
+ restProps.onActionButtonClick('close');
23
+ };
24
+ return (React.createElement(ThemeProvider, { theme: theme$1 },
25
+ React.createElement(FollowerAuthenticationDialogContextProvider, { value: restProps },
26
+ React.createElement(Dialog, { open: open, fullScreen: fullScreen, onClose: handleClose },
27
+ React.createElement(FollowerAuthenticationContent, null,
28
+ React.createElement(FollowerAuthenticationCloseButton, null),
29
+ React.createElement(FollowerAuthenticationGraphic, null),
30
+ React.createElement(FollowerAuthenticationTitle, null),
31
+ React.createElement(FollowerAuthenticationInfo, null),
32
+ React.createElement(FollowerAuthenticationBody, null),
33
+ React.createElement(FollowerAuthenticationFooter, null))))));
34
+ };
35
+
36
+ export { FollowerAuthenticationDialog };
37
+ //# sourceMappingURL=FollowerAuthenticationDialog.js.map
@@ -0,0 +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;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0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ export declare type FollowerAuthenticationDialogProps = {
3
+ open: boolean;
4
+ state: ReducerState;
5
+ messages: Record<MessageKey, ReactNode> & {
6
+ closeButtonLabel: string;
7
+ };
8
+ locationOptions: LocationOption[];
9
+ loading: boolean;
10
+ graphics: Record<`${ReducerStateValue}`, string>;
11
+ logos: Record<'popmenu' | 'facebook' | 'google', ReactNode>;
12
+ onActionButtonClick: (eventType: ClickEventType, values?: Record<string, string>) => void;
13
+ };
14
+ export declare type ReducerState = {
15
+ value: ReducerStateValue;
16
+ context: {
17
+ email?: string;
18
+ phone?: string;
19
+ name?: string;
20
+ };
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 = {
26
+ label: string;
27
+ value: string;
28
+ };
29
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationFooter: () => JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { Box, Typography } from '@material-ui/core';
2
+ import React from 'react';
3
+ import { useFollowerAuthenticationDialogContext } from './context.js';
4
+
5
+ var FollowerAuthenticationFooter = function () {
6
+ var _a = useFollowerAuthenticationDialogContext(), messages = _a.messages, logos = _a.logos;
7
+ return (React.createElement(Box, { display: "flex", gridGap: 8 },
8
+ React.createElement(Typography, { variant: "body2" }, messages.poweredBy),
9
+ logos.popmenu));
10
+ };
11
+
12
+ export { FollowerAuthenticationFooter };
13
+ //# sourceMappingURL=FollowerAuthenticationFooter.js.map
@@ -0,0 +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;;;;"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationForm: () => JSX.Element | null;
@@ -0,0 +1,149 @@
1
+ import { __assign } from 'tslib';
2
+ import React, { useRef, useState, useEffect } from 'react';
3
+ import { useFollowerAuthenticationDialogContext } from './context.js';
4
+ import { makeStyles, TextField, Button, MenuItem, Typography } from '@material-ui/core';
5
+
6
+ var useStyles = makeStyles(function () { return ({
7
+ form: {
8
+ display: 'flex',
9
+ flexDirection: 'column',
10
+ alignItems: 'center',
11
+ width: '100%',
12
+ gridGap: 16,
13
+ },
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) {
18
+ if (!phone)
19
+ return false;
20
+ return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone);
21
+ };
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();
25
+ // 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;
37
+ switch (fieldName) {
38
+ case 'phone':
39
+ var isPhoneValid = validatePhoneNumber(fieldValue);
40
+ setSignUpPhoneValue(fieldValue);
41
+ setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0);
42
+ break;
43
+ 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;
46
+ setSignUpEmailValue(fieldValue);
47
+ setShowEmailErrorText(!isEmailValid && fieldValue.length > 0);
48
+ break;
49
+ case 'location':
50
+ setShowLocationErrorText(!fieldValue);
51
+ break;
52
+ }
53
+ };
54
+ useEffect(function () {
55
+ var _a;
56
+ var hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText;
57
+ var hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText;
58
+ var locationField = (_a = formRef.current) === null || _a === void 0 ? void 0 : _a.elements.namedItem('location');
59
+ var hasValidLocation = locationField ? Boolean(locationField.value) : true;
60
+ var hasValidContact = hasValidPhone || hasValidEmail;
61
+ setFormValidity(hasValidContact && hasValidLocation);
62
+ }, [signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText]);
63
+ var handleSubmit = function (e) {
64
+ e.preventDefault();
65
+ var form = e.target;
66
+ var formData = new FormData(form);
67
+ var values = Object.fromEntries(formData.entries());
68
+ onActionButtonClick('submit-form', values);
69
+ };
70
+ var formProps = {
71
+ id: 'follower-authentication-form',
72
+ className: classes.form,
73
+ onSubmit: handleSubmit,
74
+ };
75
+ switch (state.value) {
76
+ case 'initial':
77
+ return (React.createElement("form", __assign({}, formProps),
78
+ React.createElement(TextField, { disabled: loading, label: messages.initialInputLabel, key: "identifier-input", id: "identifier-input", name: "identifier" }),
79
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.initialCtaButtonLabel)));
80
+ case 'signUp':
81
+ return (React.createElement("form", __assign({ ref: formRef }, formProps, { onInvalid: function (e) {
82
+ e.preventDefault();
83
+ } }),
84
+ 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: {
85
+ required: signUpEmailValue ? false : true,
86
+ }, defaultValue: state.context.phone }),
87
+ React.createElement(TextField, { disabled: loading, label: messages.signUpNameInputLabel, key: "name-input", id: "name-input", name: "name", inputProps: { required: true } }),
88
+ React.createElement(TextField, { disabled: loading, label: messages.signUpEmailInputLabel, key: "email-input", id: "email-input", name: "email", error: showEmailErrorText, helperText: showEmailErrorText && messages.signUpEmailErrorText, onChange: checkFieldValidity, inputProps: {
89
+ required: signUpPhoneValue ? false : true,
90
+ type: 'email',
91
+ }, defaultValue: state.context.email }),
92
+ 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)); })),
93
+ React.createElement(Typography, { style: { alignSelf: 'start' } }, messages.signUpBirthdaySectionLabel),
94
+ React.createElement(TextField, { disabled: loading, label: messages.signUpMonthInputLabel, key: "birthday-month-input", id: "birthday-month-input", name: "birthdayMonth" }),
95
+ React.createElement(TextField, { disabled: loading, label: messages.signUpDayInputLabel, key: "birthday-date-input", id: "birthday-date-input", name: "birthdayDate" }),
96
+ React.createElement(Button, { disabled: loading || !formValidity, type: "submit" }, messages.signUp)));
97
+ case 'emailFound':
98
+ return (React.createElement("form", __assign({}, formProps),
99
+ React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
100
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.emailFoundCtaButtonLabel)));
101
+ case 'emailAuthCode':
102
+ return (React.createElement("form", __assign({}, formProps),
103
+ React.createElement(TextField, { disabled: loading, label: messages.emailAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
104
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
105
+ case 'indirectUserFound': {
106
+ if (state.context.email) {
107
+ return (React.createElement("form", __assign({}, formProps),
108
+ React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
109
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
110
+ }
111
+ else if (state.context.phone) {
112
+ return (React.createElement("form", __assign({}, formProps),
113
+ React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
114
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
115
+ }
116
+ else
117
+ return null;
118
+ }
119
+ case 'emailPasswordSignIn':
120
+ return (React.createElement("form", __assign({}, formProps),
121
+ React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email, InputLabelProps: { shrink: true } }),
122
+ React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
123
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
124
+ case 'phoneFound':
125
+ return (React.createElement("form", __assign({}, formProps),
126
+ React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
127
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.phoneFoundCtaButtonLabel)));
128
+ case 'phoneAuthCode':
129
+ return (React.createElement("form", __assign({}, formProps),
130
+ React.createElement(TextField, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code", autoComplete: "one-time-code" }),
131
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
132
+ case 'phonePasswordSignIn':
133
+ return (React.createElement("form", __assign({}, formProps),
134
+ React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone, InputLabelProps: { shrink: true } }),
135
+ React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
136
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
137
+ case 'requirePhone':
138
+ return (React.createElement("form", __assign({}, formProps),
139
+ React.createElement(TextField, { disabled: loading, label: messages.requirePhoneInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
140
+ React.createElement(Button, { disabled: loading, type: "submit" }, messages.requirePhoneCtaButtonLabel)));
141
+ case 'welcome':
142
+ return null;
143
+ default:
144
+ return null;
145
+ }
146
+ };
147
+
148
+ export { FollowerAuthenticationForm };
149
+ //# sourceMappingURL=FollowerAuthenticationForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FollowerAuthenticationForm.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.tsx"],"sourcesContent":["import React, { ChangeEventHandler, useEffect, useRef, useState } from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Button, makeStyles, MenuItem, TextField, Typography } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n form: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n width: '100%',\n gridGap: 16,\n },\n}))\n\nconst northAmericanPhoneRegex = /^(\\()?[2-9]{1}\\d{2}(\\))?[-\\s.]?[2-9]{1}\\d{2}[-\\s.]?\\d{4}$/\nconst ukPhoneRegex = /^((\\+?44\\s?|0044\\s?)(\\s?\\d{3,5}|\\(\\d{3,5}\\))(\\s?\\d{3,4})(\\s?\\d{3,4})$|^07\\d{9}$)/\n\nconst validatePhoneNumber = (phone: string): boolean => {\n if (!phone) return false\n return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone)\n}\n\nexport const FollowerAuthenticationForm = () => {\n const { state, messages, locationOptions, onActionButtonClick, loading } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n\n // sign-up form state\n const formRef = useRef<HTMLFormElement>(null)\n const [formValidity, setFormValidity] = useState(false)\n const [showPhoneErrorText, setShowPhoneErrorText] = useState<boolean | undefined>()\n const [showEmailErrorText, setShowEmailErrorText] = useState<boolean | undefined>()\n const [showLocationErrorText, setShowLocationErrorText] = useState<boolean | undefined>()\n const [signUpPhoneValue, setSignUpPhoneValue] = useState(state.context.phone || '')\n const [signUpEmailValue, setSignUpEmailValue] = useState(state.context.email || '')\n\n const checkFieldValidity: ChangeEventHandler<HTMLInputElement> = (e) => {\n const fieldName = e.target.name\n const fieldValue = e.target.value\n\n switch (fieldName) {\n case 'phone':\n const isPhoneValid = validatePhoneNumber(fieldValue)\n setSignUpPhoneValue(fieldValue)\n setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0)\n break\n case 'email':\n const emailField = formRef.current?.elements.namedItem(fieldName) as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setSignUpEmailValue(fieldValue)\n setShowEmailErrorText(!isEmailValid && fieldValue.length > 0)\n break\n case 'location':\n setShowLocationErrorText(!fieldValue)\n break\n default:\n break\n }\n }\n\n useEffect(() => {\n const hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText\n const hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText\n\n const locationField = formRef.current?.elements.namedItem('location') as HTMLInputElement\n const hasValidLocation = locationField ? Boolean(locationField.value) : true\n\n const hasValidContact = hasValidPhone || hasValidEmail\n setFormValidity(hasValidContact && hasValidLocation)\n }, [signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText])\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const form = e.target as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('submit-form', values)\n }\n const formProps = {\n id: 'follower-authentication-form',\n className: classes.form,\n onSubmit: handleSubmit,\n }\n switch (state.value) {\n case 'initial':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.initialInputLabel}\n key=\"identifier-input\"\n id=\"identifier-input\"\n name=\"identifier\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.initialCtaButtonLabel}\n </Button>\n </form>\n )\n case 'signUp':\n return (\n <form\n ref={formRef}\n {...formProps}\n onInvalid={(e) => {\n e.preventDefault()\n }}\n >\n <TextField\n disabled={loading}\n label={messages.signUpPhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n onChange={checkFieldValidity}\n error={showPhoneErrorText}\n helperText={showPhoneErrorText && messages.signUpPhoneErrorText}\n inputProps={{\n required: signUpEmailValue ? false : true,\n }}\n defaultValue={state.context.phone}\n />\n <TextField\n disabled={loading}\n label={messages.signUpNameInputLabel}\n key=\"name-input\"\n id=\"name-input\"\n name=\"name\"\n inputProps={{ required: true }}\n />\n <TextField\n disabled={loading}\n label={messages.signUpEmailInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n error={showEmailErrorText}\n helperText={showEmailErrorText && messages.signUpEmailErrorText}\n onChange={checkFieldValidity}\n inputProps={{\n required: signUpPhoneValue ? false : true,\n type: 'email',\n }}\n defaultValue={state.context.email}\n />\n <TextField\n disabled={loading}\n select\n onChange={checkFieldValidity}\n label={messages.signUpLocationInputLabel}\n error={showLocationErrorText}\n helperText={showLocationErrorText && messages.signUpLocationErrorText}\n key=\"location-input\"\n id=\"location-input\"\n inputProps={{ required: true }}\n name=\"location\"\n >\n {locationOptions.map((locationOption) => (\n <MenuItem data-cy={'option'} key={locationOption.value} value={locationOption.value}>\n {locationOption.label}\n </MenuItem>\n ))}\n </TextField>\n <Typography style={{ alignSelf: 'start' }}>{messages.signUpBirthdaySectionLabel}</Typography>\n <TextField\n disabled={loading}\n label={messages.signUpMonthInputLabel}\n key=\"birthday-month-input\"\n id=\"birthday-month-input\"\n name=\"birthdayMonth\"\n />\n <TextField\n disabled={loading}\n label={messages.signUpDayInputLabel}\n key=\"birthday-date-input\"\n id=\"birthday-date-input\"\n name=\"birthdayDate\"\n />\n <Button disabled={loading || !formValidity} type=\"submit\">\n {messages.signUp}\n </Button>\n </form>\n )\n case 'emailFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'emailAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'indirectUserFound': {\n if (state.context.email) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else if (state.context.phone) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else return null\n }\n case 'emailPasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phoneFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'phoneAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n autoComplete=\"one-time-code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phonePasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'requirePhone':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.requirePhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit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;AAEX,QAAA,KAAK,cAAc;YACjB,QACE,yCAAU,SAAS,CAAA;AACjB,gBAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,QAAQ,CAAC,sBAAsB,EACtC,GAAG,EAAC,aAAa,EACjB,EAAE,EAAC,aAAa,EAChB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAC1B,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAA,EACrC,QAAQ,CAAC,0BAA0B,CAC7B,CACJ;AAEX,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,IAAI;AACb,QAAA;AACE,YAAA,OAAO,IAAI;AACd;AACH;;;;"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationGraphic: () => JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { useFollowerAuthenticationDialogContext } from './context.js';
3
+ import { Box } from '@material-ui/core';
4
+
5
+ var FollowerAuthenticationGraphic = function () {
6
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages, graphics = _a.graphics;
7
+ var graphic = graphics[state.value];
8
+ if (!graphic)
9
+ return null;
10
+ return (React.createElement(Box, null,
11
+ React.createElement("img", { src: graphic, alt: messages[state.value + "GraphicAlt"] })));
12
+ };
13
+
14
+ export { FollowerAuthenticationGraphic };
15
+ //# sourceMappingURL=FollowerAuthenticationGraphic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FollowerAuthenticationGraphic.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box } from '@material-ui/core'\nimport { MessageKey } from './FollowerAuthenticationDialogProps'\n\nexport const FollowerAuthenticationGraphic = () => {\n const { state, messages, graphics } = useFollowerAuthenticationDialogContext()\n const graphic = graphics[state.value]\n if (!graphic) return null\n return (\n <Box>\n <img src={graphic} alt={messages[`${state.value}GraphicAlt` as MessageKey] as string} />\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAKa,IAAA,6BAA6B,GAAG,YAAA;AACrC,IAAA,IAAA,EAAgC,GAAA,sCAAsC,EAAE,EAAtE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAA6C;IAC9E,IAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;AACrC,IAAA,IAAI,CAAC,OAAO;AAAE,QAAA,OAAO,IAAI;IACzB,QACE,oBAAC,GAAG,EAAA,IAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAI,KAAK,CAAC,KAAK,GAA0B,YAAA,CAAW,EAAI,CAAA,CACpF;AAEV;;;;"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationInfo: () => JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { useFollowerAuthenticationDialogContext } from './context.js';
3
+ import { Box, Typography } from '@material-ui/core';
4
+
5
+ var FollowerAuthenticationInfo = function () {
6
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages;
7
+ var info = messages[state.value + "Info"];
8
+ if (!info)
9
+ return null;
10
+ return (React.createElement(Box, null,
11
+ React.createElement(Typography, { align: "center" }, info)));
12
+ };
13
+
14
+ export { FollowerAuthenticationInfo };
15
+ //# sourceMappingURL=FollowerAuthenticationInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FollowerAuthenticationInfo.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Typography } from '@material-ui/core'\nimport { MessageKey } from './FollowerAuthenticationDialogProps'\n\nexport const FollowerAuthenticationInfo = () => {\n const { state, messages } = useFollowerAuthenticationDialogContext()\n const info = messages[`${state.value}Info` as MessageKey]\n\n if (!info) return null\n return (\n <Box>\n <Typography align=\"center\">{info}</Typography>\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAKa,IAAA,0BAA0B,GAAG,YAAA;IAClC,IAAA,EAAA,GAAsB,sCAAsC,EAAE,EAA5D,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAA6C;IACpE,IAAM,IAAI,GAAG,QAAQ,CAAI,KAAK,CAAC,KAAK,GAAoB,MAAA,CAAC;AAEzD,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,IAAI;IACtB,QACE,oBAAC,GAAG,EAAA,IAAA;QACF,KAAC,CAAA,aAAA,CAAA,UAAU,EAAC,EAAA,KAAK,EAAC,QAAQ,IAAE,IAAI,CAAc,CAC1C;AAEV;;;;"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationTitle: () => JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { useFollowerAuthenticationDialogContext } from './context.js';
3
+ import { Box, Typography } from '@material-ui/core';
4
+
5
+ var FollowerAuthenticationTitle = function () {
6
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages;
7
+ var title = messages[state.value + "Title"];
8
+ return (React.createElement(Box, null,
9
+ React.createElement(Typography, { variant: "h1", align: "center" }, title)));
10
+ };
11
+
12
+ export { FollowerAuthenticationTitle };
13
+ //# sourceMappingURL=FollowerAuthenticationTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FollowerAuthenticationTitle.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Typography } from '@material-ui/core'\nimport { MessageKey } from './FollowerAuthenticationDialogProps'\n\nexport const FollowerAuthenticationTitle = () => {\n const { state, messages } = useFollowerAuthenticationDialogContext()\n const title = messages[`${state.value}Title` as MessageKey]\n return (\n <Box>\n <Typography variant=\"h1\" align=\"center\">\n {title}\n </Typography>\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAKa,IAAA,2BAA2B,GAAG,YAAA;IACnC,IAAA,EAAA,GAAsB,sCAAsC,EAAE,EAA5D,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAA6C;IACpE,IAAM,KAAK,GAAG,QAAQ,CAAI,KAAK,CAAC,KAAK,GAAqB,OAAA,CAAC;IAC3D,QACE,oBAAC,GAAG,EAAA,IAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,QAAQ,EACpC,EAAA,KAAK,CACK,CACT;AAEV;;;;"}
@@ -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,14 @@
1
+ import { createContext, useContext } from 'react';
2
+
3
+ var FollowerAuthenticationDialogContext = createContext(null);
4
+ var FollowerAuthenticationDialogContextProvider = FollowerAuthenticationDialogContext.Provider;
5
+ var useFollowerAuthenticationDialogContext = function () {
6
+ var context = useContext(FollowerAuthenticationDialogContext);
7
+ if (!context) {
8
+ throw new Error('useFollowerAuthenticationDialogContext must be called within FollowerAuthenticationDialogContextProvider');
9
+ }
10
+ return context;
11
+ };
12
+
13
+ export { FollowerAuthenticationDialogContextProvider, useFollowerAuthenticationDialogContext };
14
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/FollowerAuthenticationDialog/context.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps'\n\nconst FollowerAuthenticationDialogContext = createContext<Omit<FollowerAuthenticationDialogProps, 'open'> | null>(null)\n\nexport const FollowerAuthenticationDialogContextProvider = FollowerAuthenticationDialogContext.Provider\n\nexport const useFollowerAuthenticationDialogContext = () => {\n const context = useContext(FollowerAuthenticationDialogContext)\n if (!context) {\n throw new Error(\n 'useFollowerAuthenticationDialogContext must be called within FollowerAuthenticationDialogContextProvider',\n )\n }\n return context\n}\n"],"names":[],"mappings":";;AAGA,IAAM,mCAAmC,GAAG,aAAa,CAAyD,IAAI,CAAC;AAE1G,IAAA,2CAA2C,GAAG,mCAAmC,CAAC;AAElF,IAAA,sCAAsC,GAAG,YAAA;AACpD,IAAA,IAAM,OAAO,GAAG,UAAU,CAAC,mCAAmC,CAAC;IAC/D,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CACb,0GAA0G,CAC3G;AACF;AACD,IAAA,OAAO,OAAO;AAChB;;;;"}
@@ -0,0 +1,2 @@
1
+ export { FollowerAuthenticationDialog } from './FollowerAuthenticationDialog';
2
+ export type { 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
+ };
@@ -0,0 +1,36 @@
1
+ var theme = {
2
+ palette: {
3
+ primary: { main: '#2E3042' },
4
+ },
5
+ typography: {
6
+ h1: {
7
+ fontFamily: 'Poppins',
8
+ fontSize: '24px',
9
+ fontWeight: 400,
10
+ lineHeight: '36px',
11
+ },
12
+ },
13
+ props: {
14
+ MuiTextField: {
15
+ variant: 'outlined',
16
+ fullWidth: true,
17
+ },
18
+ MuiButton: {
19
+ variant: 'contained',
20
+ color: 'primary',
21
+ disableElevation: true,
22
+ fullWidth: true,
23
+ },
24
+ },
25
+ overrides: {
26
+ MuiButton: {
27
+ root: {
28
+ borderRadius: 32,
29
+ textTransform: 'none',
30
+ },
31
+ },
32
+ },
33
+ };
34
+
35
+ export { theme };
36
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sources":["../../../../src/components/FollowerAuthenticationDialog/theme.ts"],"sourcesContent":["export const theme = {\n palette: {\n primary: { main: '#2E3042' },\n },\n typography: {\n h1: {\n fontFamily: 'Poppins',\n fontSize: '24px',\n fontWeight: 400,\n lineHeight: '36px',\n },\n },\n props: {\n MuiTextField: {\n variant: 'outlined',\n fullWidth: true,\n },\n MuiButton: {\n variant: 'contained',\n color: 'primary',\n disableElevation: true,\n fullWidth: true,\n },\n },\n overrides: {\n MuiButton: {\n root: {\n borderRadius: 32,\n textTransform: 'none',\n },\n },\n },\n} as const\n"],"names":[],"mappings":"AAAa,IAAA,KAAK,GAAG;AACnB,IAAA,OAAO,EAAE;AACP,QAAA,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;AAC7B,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,EAAE,EAAE;AACF,YAAA,UAAU,EAAE,SAAS;AACrB,YAAA,QAAQ,EAAE,MAAM;AAChB,YAAA,UAAU,EAAE,GAAG;AACf,YAAA,UAAU,EAAE,MAAM;AACnB,SAAA;AACF,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,YAAY,EAAE;AACZ,YAAA,OAAO,EAAE,UAAU;AACnB,YAAA,SAAS,EAAE,IAAI;AAChB,SAAA;AACD,QAAA,SAAS,EAAE;AACT,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,gBAAgB,EAAE,IAAI;AACtB,YAAA,SAAS,EAAE,IAAI;AAChB,SAAA;AACF,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE;AACJ,gBAAA,YAAY,EAAE,EAAE;AAChB,gBAAA,aAAa,EAAE,MAAM;AACtB,aAAA;AACF,SAAA;AACF,KAAA;;;;;"}
@@ -0,0 +1,4 @@
1
+ import { VoidFunctionComponent } from 'react';
2
+ import { IconProps } from './IconProps';
3
+ export declare const iconStaticClassName = "pop-icon";
4
+ export declare const Icon: VoidFunctionComponent<IconProps>;
@@ -0,0 +1,29 @@
1
+ import { __rest, __assign } from 'tslib';
2
+ import { createElement } from 'react';
3
+ import { useIconStyles } from './IconStyles.js';
4
+ import classNames from 'classnames';
5
+
6
+ var iconStaticClassName = 'pop-icon';
7
+ var Icon = function (props) {
8
+ var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
9
+ var hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
10
+ if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {
11
+ restProps['aria-hidden'] = true;
12
+ }
13
+ var classes = useIconStyles(props);
14
+ var isValid = true;
15
+ if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
16
+ isValid = false;
17
+ }
18
+ return isValid
19
+ ? createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]) }, restProps))
20
+ : null;
21
+ };
22
+ Icon.defaultProps = {
23
+ size: 'inherit',
24
+ color: 'inherit',
25
+ };
26
+ Icon.displayName = 'Icon';
27
+
28
+ export { Icon, iconStaticClassName };
29
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { createElement, VoidFunctionComponent } from 'react'\nimport { IconProps } from './IconProps'\nimport { useIconStyles } from './IconStyles'\nimport classNames from 'classnames'\n\nexport const iconStaticClassName = 'pop-icon'\nexport const Icon: VoidFunctionComponent<IconProps> = (props) => {\n const { icon, className, ...restProps } = props\n const hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label'])\n if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {\n restProps['aria-hidden'] = true\n }\n const classes = useIconStyles(props)\n let isValid = true\n if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {\n isValid = false\n }\n return isValid\n ? createElement(icon, { className: classNames([classes.root, iconStaticClassName, className]), ...restProps })\n : null\n}\n\nIcon.defaultProps = {\n size: 'inherit',\n color: 'inherit',\n}\n\nIcon.displayName = 'Icon'\n"],"names":[],"mappings":";;;;;AAKO,IAAM,mBAAmB,GAAG;AAC5B,IAAM,IAAI,GAAqC,UAAC,KAAK,EAAA;AAClD,IAAA,IAAA,IAAI,GAA8B,KAAK,CAAnC,IAAA,EAAE,SAAS,GAAmB,KAAK,CAAxB,SAAA,EAAK,SAAS,GAAK,MAAA,CAAA,KAAK,EAAzC,CAAA,MAAA,EAAA,WAAA,CAAiC,CAAF;AACrC,IAAA,IAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAC,YAAY,CAAC,CAAC;IAC3F,IAAI,CAAC,iBAAiB,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,SAAS,EAAE;AAChE,QAAA,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI;AAChC;AACD,IAAA,IAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC;IACpC,IAAI,OAAO,GAAG,IAAI;AAClB,IAAA,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC,EAAE;QACnE,OAAO,GAAG,KAAK;AAChB;AACD,IAAA,OAAO;UACH,aAAa,CAAC,IAAI,aAAI,SAAS,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC,EAAK,EAAA,SAAS,CAAG;UAC5G,IAAI;AACV;AAEA,IAAI,CAAC,YAAY,GAAG;AAClB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE,SAAS;CACjB;AAED,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export interface IconProps {
3
+ /** Adds aria-describedby attribute to the html element */
4
+ 'aria-describedby'?: string;
5
+ /** Overrides aria-hidden attribute on the html element */
6
+ 'aria-hidden'?: boolean;
7
+ /** Adds aria-label attribute to the html element */
8
+ 'aria-label'?: string;
9
+ /** Adds to the class attribute on the html element */
10
+ className?: string;
11
+ /** The icon from @popmenu/web-icons to be rendered */
12
+ icon: string | React.FC<React.SVGProps<SVGSVGElement>>;
13
+ /** Sets the color of the icon */
14
+ color?: 'primary' | 'secondary' | 'primary.light' | 'primary.dark' | 'secondary.light' | 'secondary.dark' | string;
15
+ /** Sets the dimensions of the icon */
16
+ size?: 'small' | 'medium' | 'large' | 'extra-large' | 'inherit';
17
+ }
@@ -0,0 +1,2 @@
1
+ import { IconProps } from './IconProps';
2
+ export declare const useIconStyles: (props: IconProps) => import("@material-ui/styles").ClassNameMap<string>;
@@ -0,0 +1,43 @@
1
+ import { makeStyles } from '@material-ui/core';
2
+
3
+ var useIconStyles = makeStyles(function (_a) {
4
+ var spacing = _a.spacing, palette = _a.palette;
5
+ var getFontSize = function (_a) {
6
+ var size = _a.size;
7
+ var sizes = {
8
+ inherit: 'inherit',
9
+ small: spacing(1.5),
10
+ medium: spacing(2),
11
+ large: spacing(2.5),
12
+ 'extra-large': spacing(3),
13
+ };
14
+ return size ? sizes[size] : 'inherit';
15
+ };
16
+ var getColor = function (props) {
17
+ var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
18
+ var value = 'inherit';
19
+ if (props.color) {
20
+ if (semanticColors.includes(props.color.split('.')[0])) {
21
+ var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
22
+ // @ts-expect-error - todo.
23
+ value = palette[color][variant];
24
+ }
25
+ else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
26
+ value = props.color;
27
+ }
28
+ }
29
+ return value;
30
+ };
31
+ return {
32
+ root: {
33
+ color: getColor,
34
+ fontSize: getFontSize,
35
+ width: '1em',
36
+ height: '1em',
37
+ strokeWidth: '1.3px',
38
+ },
39
+ };
40
+ });
41
+
42
+ export { useIconStyles };
43
+ //# sourceMappingURL=IconStyles.js.map