@popmenu/common-ui 0.126.0 → 0.126.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 (291) hide show
  1. package/build/{components → esm/components}/Accordion/index.d.ts +1 -1
  2. package/build/{components → esm/components}/AccordionActions/index.d.ts +1 -1
  3. package/build/{components → esm/components}/AccordionDetails/index.d.ts +1 -1
  4. package/build/{components → esm/components}/AccordionSummary/index.d.ts +1 -1
  5. package/build/{components → esm/components}/Alert/index.d.ts +1 -1
  6. package/build/{components → esm/components}/AppBar/index.d.ts +1 -1
  7. package/build/esm/components/Avatar/Avatar.d.ts +3 -0
  8. package/build/esm/components/Avatar/Avatar.js +39 -0
  9. package/build/esm/components/Avatar/Avatar.js.map +1 -0
  10. package/build/{components → esm/components}/Avatar/AvatarProps.d.ts +22 -22
  11. package/build/{components → esm/components}/Avatar/avatar.styles.d.ts +2 -2
  12. package/build/esm/components/Avatar/avatar.styles.js +41 -0
  13. package/build/esm/components/Avatar/avatar.styles.js.map +1 -0
  14. package/build/{components → esm/components}/Avatar/index.d.ts +2 -2
  15. package/build/{components → esm/components}/Avatar/util/useImageProps.d.ts +10 -10
  16. package/build/esm/components/Avatar/util/useImageProps.js +21 -0
  17. package/build/esm/components/Avatar/util/useImageProps.js.map +1 -0
  18. package/build/{components → esm/components}/Badge/index.d.ts +1 -1
  19. package/build/{components → esm/components}/Box/Box.d.ts +3 -3
  20. package/build/{components → esm/components}/Box/BoxProps.d.ts +5 -5
  21. package/build/{components → esm/components}/Box/BoxStyles.d.ts +1 -1
  22. package/build/{components → esm/components}/Box/index.d.ts +7 -7
  23. package/build/{components → esm/components}/Breadcrumbs/index.d.ts +1 -1
  24. package/build/{components → esm/components}/BrowserSilhouette/BrowserSilhouette.d.ts +2 -2
  25. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js +18 -0
  26. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js.map +1 -0
  27. package/build/{components → esm/components}/BrowserSilhouette/browserSilhouette.styles.d.ts +1 -1
  28. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js +25 -0
  29. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js.map +1 -0
  30. package/build/{components → esm/components}/BrowserSilhouette/index.d.ts +1 -1
  31. package/build/{components → esm/components}/Button/Button.d.ts +6 -6
  32. package/build/esm/components/Button/Button.js +23 -0
  33. package/build/esm/components/Button/Button.js.map +1 -0
  34. package/build/{components → esm/components}/Button/ButtonProps.d.ts +11 -11
  35. package/build/esm/components/Button/ButtonStyles.d.ts +2 -0
  36. package/build/esm/components/Button/ButtonStyles.js +16 -0
  37. package/build/esm/components/Button/ButtonStyles.js.map +1 -0
  38. package/build/{components → esm/components}/Button/index.d.ts +2 -2
  39. package/build/{components → esm/components}/ButtonBase/index.d.ts +1 -1
  40. package/build/{components → esm/components}/ButtonGroup/index.d.ts +1 -1
  41. package/build/{components → esm/components}/Card/index.d.ts +1 -1
  42. package/build/{components → esm/components}/CardActionArea/index.d.ts +1 -1
  43. package/build/{components → esm/components}/CardActions/index.d.ts +1 -1
  44. package/build/{components → esm/components}/CardContent/index.d.ts +1 -1
  45. package/build/{components → esm/components}/CardHeader/index.d.ts +1 -1
  46. package/build/{components → esm/components}/CardMedia/index.d.ts +1 -1
  47. package/build/esm/components/Checkbox/Checkbox.d.ts +3 -0
  48. package/build/esm/components/Checkbox/Checkbox.js +14 -0
  49. package/build/esm/components/Checkbox/Checkbox.js.map +1 -0
  50. package/build/{components → esm/components}/Checkbox/CheckboxProps.d.ts +8 -8
  51. package/build/{components → esm/components}/Checkbox/index.d.ts +2 -2
  52. package/build/{components → esm/components}/Chip/Chip.d.ts +6 -6
  53. package/build/esm/components/Chip/Chip.js +23 -0
  54. package/build/esm/components/Chip/Chip.js.map +1 -0
  55. package/build/{components → esm/components}/Chip/ChipProps.d.ts +8 -8
  56. package/build/{components → esm/components}/Chip/ChipStyles.d.ts +2 -2
  57. package/build/esm/components/Chip/ChipStyles.js +83 -0
  58. package/build/esm/components/Chip/ChipStyles.js.map +1 -0
  59. package/build/{components → esm/components}/Chip/index.d.ts +2 -2
  60. package/build/{components → esm/components}/CircularProgress/index.d.ts +1 -1
  61. package/build/{components → esm/components}/ClickAwayListener/index.d.ts +1 -1
  62. package/build/{components → esm/components}/CollapsibleText/CollapsibleText.d.ts +3 -3
  63. package/build/esm/components/CollapsibleText/CollapsibleText.js +41 -0
  64. package/build/esm/components/CollapsibleText/CollapsibleText.js.map +1 -0
  65. package/build/{components → esm/components}/CollapsibleText/CollapsibleTextProps.d.ts +13 -13
  66. package/build/{components → esm/components}/CollapsibleText/CollapsibleTextStyles.d.ts +5 -5
  67. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js +24 -0
  68. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js.map +1 -0
  69. package/build/{components → esm/components}/CollapsibleText/index.d.ts +2 -2
  70. package/build/{components → esm/components}/Dialog/index.d.ts +1 -1
  71. package/build/{components → esm/components}/DialogActions/index.d.ts +1 -1
  72. package/build/{components → esm/components}/DialogContent/index.d.ts +1 -1
  73. package/build/{components → esm/components}/DialogContentText/index.d.ts +1 -1
  74. package/build/{components → esm/components}/DialogTitle/index.d.ts +1 -1
  75. package/build/{components → esm/components}/Divider/Divider.d.ts +3 -3
  76. package/build/esm/components/Divider/Divider.js +70 -0
  77. package/build/esm/components/Divider/Divider.js.map +1 -0
  78. package/build/{components → esm/components}/Divider/DividerProps.d.ts +17 -17
  79. package/build/{components → esm/components}/Divider/index.d.ts +2 -2
  80. package/build/{components → esm/components}/Drawer/index.d.ts +1 -1
  81. package/build/{components → esm/components}/Fab/index.d.ts +1 -1
  82. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -2
  83. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +86 -0
  84. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -0
  85. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -2
  86. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js +12 -0
  87. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js.map +1 -0
  88. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -2
  89. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js +24 -0
  90. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map +1 -0
  91. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +4 -4
  92. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js +18 -0
  93. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map +1 -0
  94. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +3 -3
  95. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js +37 -0
  96. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map +1 -0
  97. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +29 -29
  98. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -2
  99. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js +13 -0
  100. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map +1 -0
  101. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -2
  102. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +149 -0
  103. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -0
  104. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -2
  105. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +15 -0
  106. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -0
  107. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -2
  108. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +15 -0
  109. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -0
  110. package/build/{components → esm/components}/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -2
  111. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js +13 -0
  112. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js.map +1 -0
  113. package/build/{components → esm/components}/FollowerAuthenticationDialog/context.d.ts +4 -4
  114. package/build/esm/components/FollowerAuthenticationDialog/context.js +14 -0
  115. package/build/esm/components/FollowerAuthenticationDialog/context.js.map +1 -0
  116. package/build/{components → esm/components}/FollowerAuthenticationDialog/index.d.ts +2 -2
  117. package/build/{components → esm/components}/FollowerAuthenticationDialog/theme.d.ts +35 -35
  118. package/build/esm/components/FollowerAuthenticationDialog/theme.js +36 -0
  119. package/build/esm/components/FollowerAuthenticationDialog/theme.js.map +1 -0
  120. package/build/{components → esm/components}/FormControl/index.d.ts +1 -1
  121. package/build/{components → esm/components}/FormControlLabel/index.d.ts +1 -1
  122. package/build/{components → esm/components}/FormLabel/index.d.ts +1 -1
  123. package/build/{components → esm/components}/Grid/index.d.ts +1 -1
  124. package/build/{components → esm/components}/GridList/index.d.ts +1 -1
  125. package/build/{components → esm/components}/Hidden/index.d.ts +1 -1
  126. package/build/{components → esm/components}/Icon/Icon.d.ts +4 -4
  127. package/build/esm/components/Icon/Icon.js +29 -0
  128. package/build/esm/components/Icon/Icon.js.map +1 -0
  129. package/build/{components → esm/components}/Icon/IconProps.d.ts +17 -17
  130. package/build/{components → esm/components}/Icon/IconStyles.d.ts +2 -2
  131. package/build/esm/components/Icon/IconStyles.js +41 -0
  132. package/build/esm/components/Icon/IconStyles.js.map +1 -0
  133. package/build/{components → esm/components}/Icon/index.d.ts +2 -2
  134. package/build/esm/components/IconButton/IconButton.d.ts +3 -0
  135. package/build/esm/components/IconButton/IconButton.js +14 -0
  136. package/build/esm/components/IconButton/IconButton.js.map +1 -0
  137. package/build/{components → esm/components}/IconButton/IconButtonProps.d.ts +2 -2
  138. package/build/{components → esm/components}/IconButton/index.d.ts +2 -2
  139. package/build/{components → esm/components}/InputAdornment/index.d.ts +1 -1
  140. package/build/{components → esm/components}/LinearProgress/index.d.ts +1 -1
  141. package/build/{components → esm/components}/Link/Link.d.ts +11 -11
  142. package/build/esm/components/Link/Link.js +18 -0
  143. package/build/esm/components/Link/Link.js.map +1 -0
  144. package/build/{components → esm/components}/Link/LinkStyles.d.ts +2 -2
  145. package/build/esm/components/Link/LinkStyles.js +15 -0
  146. package/build/esm/components/Link/LinkStyles.js.map +1 -0
  147. package/build/{components → esm/components}/Link/index.d.ts +2 -2
  148. package/build/{components → esm/components}/List/index.d.ts +1 -1
  149. package/build/{components → esm/components}/ListItem/index.d.ts +1 -1
  150. package/build/{components → esm/components}/ListItemAvatar/index.d.ts +1 -1
  151. package/build/{components → esm/components}/ListItemIcon/index.d.ts +1 -1
  152. package/build/{components → esm/components}/ListItemSecondaryAction/index.d.ts +1 -1
  153. package/build/{components → esm/components}/ListItemText/index.d.ts +1 -1
  154. package/build/{components → esm/components}/Menu/index.d.ts +1 -1
  155. package/build/{components → esm/components}/MenuItem/index.d.ts +1 -1
  156. package/build/{components → esm/components}/MenuList/index.d.ts +1 -1
  157. package/build/{components → esm/components}/Modal/index.d.ts +1 -1
  158. package/build/{components → esm/components}/NumberField/NumberField.d.ts +3 -3
  159. package/build/esm/components/NumberField/NumberField.js +20 -0
  160. package/build/esm/components/NumberField/NumberField.js.map +1 -0
  161. package/build/{components → esm/components}/NumberField/NumberFieldProps.d.ts +12 -12
  162. package/build/{components → esm/components}/NumberField/NumberFieldStyles.d.ts +2 -2
  163. package/build/esm/components/NumberField/NumberFieldStyles.js +32 -0
  164. package/build/esm/components/NumberField/NumberFieldStyles.js.map +1 -0
  165. package/build/{components → esm/components}/NumberField/index.d.ts +2 -2
  166. package/build/esm/components/Paper/Paper.d.ts +6 -0
  167. package/build/esm/components/Paper/Paper.js +28 -0
  168. package/build/esm/components/Paper/Paper.js.map +1 -0
  169. package/build/{components → esm/components}/Paper/index.d.ts +1 -1
  170. package/build/{components → esm/components}/PaperContent/PaperContent.d.ts +2 -2
  171. package/build/esm/components/PaperContent/PaperContent.js +10 -0
  172. package/build/esm/components/PaperContent/PaperContent.js.map +1 -0
  173. package/build/{components → esm/components}/PaperContent/index.d.ts +1 -1
  174. package/build/{components → esm/components}/Popover/index.d.ts +1 -1
  175. package/build/{components → esm/components}/Popper/index.d.ts +1 -1
  176. package/build/esm/components/Radio/Radio.d.ts +3 -0
  177. package/build/esm/components/Radio/Radio.js +14 -0
  178. package/build/esm/components/Radio/Radio.js.map +1 -0
  179. package/build/{components → esm/components}/Radio/RadioProps.d.ts +8 -8
  180. package/build/{components → esm/components}/Radio/index.d.ts +2 -2
  181. package/build/{components → esm/components}/SplitInput/SplitInput.d.ts +3 -3
  182. package/build/esm/components/SplitInput/SplitInput.js +22 -0
  183. package/build/esm/components/SplitInput/SplitInput.js.map +1 -0
  184. package/build/{components → esm/components}/SplitInput/SplitInputProps.d.ts +20 -20
  185. package/build/{components → esm/components}/SplitInput/SplitInputStyles.d.ts +2 -2
  186. package/build/esm/components/SplitInput/SplitInputStyles.js +29 -0
  187. package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -0
  188. package/build/{components → esm/components}/SplitInput/index.d.ts +2 -2
  189. package/build/{components → esm/components}/Step/index.d.ts +1 -1
  190. package/build/{components → esm/components}/StepButton/index.d.ts +1 -1
  191. package/build/{components → esm/components}/StepConnector/index.d.ts +1 -1
  192. package/build/{components → esm/components}/StepContent/index.d.ts +1 -1
  193. package/build/{components → esm/components}/StepIcon/index.d.ts +1 -1
  194. package/build/{components → esm/components}/StepLabel/index.d.ts +1 -1
  195. package/build/{components → esm/components}/Stepper/index.d.ts +1 -1
  196. package/build/esm/components/Switch/Switch.d.ts +3 -0
  197. package/build/esm/components/Switch/Switch.js +16 -0
  198. package/build/esm/components/Switch/Switch.js.map +1 -0
  199. package/build/{components → esm/components}/Switch/SwitchProps.d.ts +8 -8
  200. package/build/{components → esm/components}/Switch/index.d.ts +2 -2
  201. package/build/{components → esm/components}/Switch/switch.styles.d.ts +2 -2
  202. package/build/esm/components/Switch/switch.styles.js +17 -0
  203. package/build/esm/components/Switch/switch.styles.js.map +1 -0
  204. package/build/{components → esm/components}/Tab/index.d.ts +1 -1
  205. package/build/{components → esm/components}/TabPanel/TabPanel.d.ts +3 -3
  206. package/build/esm/components/TabPanel/TabPanel.js +10 -0
  207. package/build/esm/components/TabPanel/TabPanel.js.map +1 -0
  208. package/build/{components → esm/components}/TabPanel/TabPanelProps.d.ts +3 -3
  209. package/build/{components → esm/components}/TabPanel/index.d.ts +2 -2
  210. package/build/{components → esm/components}/Tabs/index.d.ts +1 -1
  211. package/build/{components → esm/components}/TextField/index.d.ts +1 -1
  212. package/build/{components → esm/components}/ThemeProvider/index.d.ts +1 -1
  213. package/build/esm/components/ToggleButton/ToggleButton.d.ts +3 -0
  214. package/build/esm/components/ToggleButton/ToggleButton.js +20 -0
  215. package/build/esm/components/ToggleButton/ToggleButton.js.map +1 -0
  216. package/build/{components → esm/components}/ToggleButton/ToggleButtonProps.d.ts +4 -4
  217. package/build/{components → esm/components}/ToggleButton/ToggleButtonStyles.d.ts +2 -2
  218. package/build/esm/components/ToggleButton/ToggleButtonStyles.js +19 -0
  219. package/build/esm/components/ToggleButton/ToggleButtonStyles.js.map +1 -0
  220. package/build/{components → esm/components}/ToggleButton/index.d.ts +2 -2
  221. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
  222. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js +20 -0
  223. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -0
  224. package/build/{components → esm/components}/ToggleButtonGroup/ToggleButtonGroupProps.d.ts +6 -6
  225. package/build/{components → esm/components}/ToggleButtonGroup/ToggleButtonGroupStyles.d.ts +1 -1
  226. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js +12 -0
  227. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js.map +1 -0
  228. package/build/{components → esm/components}/ToggleButtonGroup/index.d.ts +2 -2
  229. package/build/{components → esm/components}/Toolbar/index.d.ts +1 -1
  230. package/build/esm/components/Tooltip/Tooltip.d.ts +3 -0
  231. package/build/esm/components/Tooltip/Tooltip.js +13 -0
  232. package/build/esm/components/Tooltip/Tooltip.js.map +1 -0
  233. package/build/{components → esm/components}/Tooltip/TooltipProps.d.ts +1 -1
  234. package/build/{components → esm/components}/Tooltip/TooltipStyles.d.ts +2 -2
  235. package/build/esm/components/Tooltip/TooltipStyles.js +13 -0
  236. package/build/esm/components/Tooltip/TooltipStyles.js.map +1 -0
  237. package/build/{components → esm/components}/Tooltip/index.d.ts +2 -2
  238. package/build/{components → esm/components}/Typography/Typography.d.ts +9 -9
  239. package/build/esm/components/Typography/Typography.js +17 -0
  240. package/build/esm/components/Typography/Typography.js.map +1 -0
  241. package/build/{components → esm/components}/Typography/TypographyProps.d.ts +15 -15
  242. package/build/esm/components/Typography/TypographyProps.js +6 -0
  243. package/build/esm/components/Typography/TypographyProps.js.map +1 -0
  244. package/build/esm/components/Typography/TypographyStyles.d.ts +10 -0
  245. package/build/esm/components/Typography/TypographyStyles.js +76 -0
  246. package/build/esm/components/Typography/TypographyStyles.js.map +1 -0
  247. package/build/{components → esm/components}/Typography/index.d.ts +2 -2
  248. package/build/{components → esm/components}/index.d.ts +78 -78
  249. package/build/{hooks → esm/hooks}/index.d.ts +2 -2
  250. package/build/{hooks → esm/hooks}/useCollapsibleText.d.ts +9 -9
  251. package/build/esm/hooks/useCollapsibleText.js +17 -0
  252. package/build/esm/hooks/useCollapsibleText.js.map +1 -0
  253. package/build/{hooks → esm/hooks}/useTabs/index.d.ts +1 -1
  254. package/build/{hooks → esm/hooks}/useTabs/useTabs.d.ts +3 -3
  255. package/build/esm/hooks/useTabs/useTabs.js +35 -0
  256. package/build/esm/hooks/useTabs/useTabs.js.map +1 -0
  257. package/build/{hooks → esm/hooks}/useTabs/useTabsOptions.d.ts +3 -3
  258. package/build/{hooks → esm/hooks}/useTabs/useTabsResult.d.ts +22 -22
  259. package/build/{index.d.ts → esm/index.d.ts} +3 -3
  260. package/build/esm/index.js +60 -0
  261. package/build/esm/index.js.map +1 -0
  262. package/build/{types → esm/types}/index.d.ts +2 -2
  263. package/build/{util → esm/util}/ServerStyleSheets.d.ts +1 -1
  264. package/build/{util → esm/util}/colors/alpha.d.ts +1 -1
  265. package/build/{util → esm/util}/colors/darken.d.ts +1 -1
  266. package/build/{util → esm/util}/colors/decomposeColor.d.ts +1 -1
  267. package/build/{util → esm/util}/colors/getLuminance.d.ts +1 -1
  268. package/build/{util → esm/util}/colors/hexToRgb.d.ts +1 -1
  269. package/build/{util → esm/util}/colors/index.d.ts +8 -8
  270. package/build/{util → esm/util}/colors/lighten.d.ts +1 -1
  271. package/build/{util → esm/util}/colors/recomposeColor.d.ts +1 -1
  272. package/build/{util → esm/util}/colors/rgbToHex.d.ts +1 -1
  273. package/build/{util → esm/util}/createTheme.d.ts +1 -1
  274. package/build/{util → esm/util}/index.d.ts +4 -4
  275. package/build/{util → esm/util}/makeStyles.d.ts +1 -1
  276. package/build/index.js +1130 -1729
  277. package/build/index.js.map +1 -1
  278. package/package.json +7 -7
  279. package/build/components/Avatar/Avatar.d.ts +0 -3
  280. package/build/components/Button/ButtonStyles.d.ts +0 -2
  281. package/build/components/Checkbox/Checkbox.d.ts +0 -3
  282. package/build/components/IconButton/IconButton.d.ts +0 -3
  283. package/build/components/Paper/Paper.d.ts +0 -6
  284. package/build/components/Radio/Radio.d.ts +0 -3
  285. package/build/components/Switch/Switch.d.ts +0 -3
  286. package/build/components/ToggleButton/ToggleButton.d.ts +0 -3
  287. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -3
  288. package/build/components/Tooltip/Tooltip.d.ts +0 -3
  289. package/build/components/Typography/TypographyStyles.d.ts +0 -4
  290. package/build/index.es.js +0 -1479
  291. package/build/index.es.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ import { __rest, __assign } from 'tslib';
2
+ import React from 'react';
3
+ import MuiChip from '@material-ui/core/Chip';
4
+ import { useChipStyles } from './ChipStyles.js';
5
+ import { Warning, CheckCircle, Info, Error, XCircle } from '@popmenu/web-icons';
6
+
7
+ var IconDictionary = {
8
+ error: Error,
9
+ info: Info,
10
+ success: CheckCircle,
11
+ warning: Warning,
12
+ };
13
+ var Chip = function (props) {
14
+ var severity = props.severity, restProps = __rest(props, ["severity"]);
15
+ var classes = useChipStyles(props);
16
+ var icon = severity ? React.createElement(IconDictionary[severity]) : undefined;
17
+ var deleteIcon = React.createElement(XCircle);
18
+ return React.createElement(MuiChip, __assign({ classes: classes, icon: icon, deleteIcon: deleteIcon }, restProps));
19
+ };
20
+ Chip.displayName = 'Chip';
21
+
22
+ export { Chip };
23
+ //# sourceMappingURL=Chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.js","sources":["../../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React from 'react'\nimport MuiChip from '@material-ui/core/Chip'\n\nimport { ChipProps, DefaultChipComponent } from './ChipProps'\nimport { useChipStyles } from './ChipStyles'\nimport { CheckCircle, Error as ErrorIcon, Info, Warning, XCircle } from '@popmenu/web-icons'\n\nconst IconDictionary = {\n error: ErrorIcon,\n info: Info,\n success: CheckCircle,\n warning: Warning,\n}\n\nexport const Chip = <C extends React.ElementType = DefaultChipComponent>(props: ChipProps<C>) => {\n const { severity, ...restProps } = props\n const classes = useChipStyles(props)\n const icon = severity ? React.createElement(IconDictionary[severity]) : undefined\n const deleteIcon = React.createElement(XCircle)\n return <MuiChip classes={classes} icon={icon} deleteIcon={deleteIcon} {...restProps} />\n}\n\nChip.displayName = 'Chip'\n"],"names":["ErrorIcon"],"mappings":";;;;;;AAOA,IAAM,cAAc,GAAG;AACrB,IAAA,KAAK,EAAEA,KAAS;AAChB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,OAAO,EAAE,OAAO;CACjB;AAEM,IAAM,IAAI,GAAG,UAAqD,KAAmB,EAAA;IAClF,IAAA,QAAQ,GAAmB,KAAK,CAAxB,QAAA,EAAK,SAAS,GAAA,MAAA,CAAK,KAAK,EAAlC,CAA0B,UAAA,CAAA,CAAF;AAC9B,IAAA,IAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC;AACpC,IAAA,IAAM,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS;IACjF,IAAM,UAAU,GAAG,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC;AAC/C,IAAA,OAAO,oBAAC,OAAO,EAAA,QAAA,CAAA,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAM,EAAA,SAAS,EAAI;AACzF;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { ChipProps as MuiChipProps, ChipTypeMap } from '@material-ui/core/Chip';
3
- export declare type DefaultChipComponent = ChipTypeMap['defaultComponent'];
4
- export declare type ChipProps<C extends React.ElementType = DefaultChipComponent> = MuiChipProps<C, {
5
- component?: C;
6
- }> & {
7
- severity?: 'success' | 'info' | 'warning' | 'error';
8
- };
1
+ import React from 'react';
2
+ import { ChipProps as MuiChipProps, ChipTypeMap } from '@material-ui/core/Chip';
3
+ export declare type DefaultChipComponent = ChipTypeMap['defaultComponent'];
4
+ export declare type ChipProps<C extends React.ElementType = DefaultChipComponent> = MuiChipProps<C, {
5
+ component?: C;
6
+ }> & {
7
+ severity?: 'success' | 'info' | 'warning' | 'error';
8
+ };
@@ -1,2 +1,2 @@
1
- import { ChipProps } from './ChipProps';
2
- export declare const useChipStyles: (props: ChipProps<any>) => import("@material-ui/styles").ClassNameMap<string>;
1
+ import { ChipProps } from './ChipProps';
2
+ export declare const useChipStyles: (props: ChipProps<any>) => import("@material-ui/styles").ClassNameMap<string>;
@@ -0,0 +1,83 @@
1
+ import { makeStyles } from '@material-ui/core/styles';
2
+
3
+ var getBackground = function (theme) { return function (props) {
4
+ var variant = props.variant, severity = props.severity;
5
+ var background = theme.palette.grey[100];
6
+ var backgrounds = {
7
+ outlined: 'none',
8
+ error: 'error.main',
9
+ warning: 'warning.main',
10
+ info: 'info.light',
11
+ success: 'success.light',
12
+ };
13
+ if (variant === 'outlined') {
14
+ background = backgrounds[variant];
15
+ }
16
+ else if (severity) {
17
+ var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
18
+ // @ts-expect-error - todo.
19
+ background = theme.palette[color][colorVariant];
20
+ }
21
+ return background;
22
+ }; };
23
+ var getColor = function (theme) { return function (props) {
24
+ var variant = props.variant, severity = props.severity;
25
+ var textColor;
26
+ if (variant === 'outlined' && severity) {
27
+ var textColors = {
28
+ error: theme.palette.error.main,
29
+ info: theme.palette.info.main,
30
+ warning: theme.palette.warning.dark,
31
+ success: theme.palette.success.dark,
32
+ };
33
+ textColor = textColors[severity];
34
+ }
35
+ else if (variant === 'outlined' && !severity) {
36
+ textColor = theme.palette.grey[700];
37
+ }
38
+ else if ((variant === 'default' || variant === undefined) && severity) {
39
+ var textColors = {
40
+ error: theme.palette.common.white,
41
+ info: theme.palette.secondary.main,
42
+ warning: theme.palette.secondary.main,
43
+ success: theme.palette.secondary.main,
44
+ };
45
+ textColor = textColors[severity];
46
+ }
47
+ return textColor;
48
+ }; };
49
+ var getBorder = function (theme) { return function (props) {
50
+ var variant = props.variant, severity = props.severity;
51
+ var borderColor;
52
+ if (variant === 'outlined' && severity) {
53
+ var borderColors = {
54
+ error: theme.palette.error.main,
55
+ info: theme.palette.info.main,
56
+ warning: theme.palette.warning.dark,
57
+ success: theme.palette.success.dark,
58
+ };
59
+ borderColor = borderColors[severity];
60
+ }
61
+ return borderColor;
62
+ }; };
63
+ // using `any` here is a bit of cheating but it doesn't matter since this doesn't depend on
64
+ // any component-specific props
65
+ var useChipStyles = makeStyles(function (theme) { return ({
66
+ root: {
67
+ background: getBackground(theme),
68
+ color: getColor(theme),
69
+ borderColor: getBorder(theme),
70
+ borderRadius: theme.spacing(0.5),
71
+ },
72
+ icon: {
73
+ color: 'inherit',
74
+ height: theme.spacing(2),
75
+ width: theme.spacing(2),
76
+ },
77
+ deleteIcon: {
78
+ color: theme.palette.grey[500],
79
+ },
80
+ }); });
81
+
82
+ export { useChipStyles };
83
+ //# sourceMappingURL=ChipStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChipStyles.js","sources":["../../../../src/components/Chip/ChipStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core/styles'\nimport { ChipProps } from './ChipProps'\n\nconst getBackground = (theme: Theme) => (props: ChipProps) => {\n const { variant, severity } = props\n let background = theme.palette.grey[100]\n const backgrounds = {\n outlined: 'none',\n error: 'error.main',\n warning: 'warning.main',\n info: 'info.light',\n success: 'success.light',\n }\n if (variant === 'outlined') {\n background = backgrounds[variant]\n } else if (severity) {\n const [color, colorVariant] = backgrounds[severity].split('.')\n // @ts-expect-error - todo.\n background = theme.palette[color][colorVariant]\n }\n return background\n}\n\nconst getColor = (theme: Theme) => (props: ChipProps) => {\n const { variant, severity } = props\n let textColor\n if (variant === 'outlined' && severity) {\n const textColors = {\n error: theme.palette.error.main,\n info: theme.palette.info.main,\n warning: theme.palette.warning.dark,\n success: theme.palette.success.dark,\n }\n textColor = textColors[severity]\n } else if (variant === 'outlined' && !severity) {\n textColor = theme.palette.grey[700]\n } else if ((variant === 'default' || variant === undefined) && severity) {\n const textColors = {\n error: theme.palette.common.white,\n info: theme.palette.secondary.main,\n warning: theme.palette.secondary.main,\n success: theme.palette.secondary.main,\n }\n textColor = textColors[severity]\n }\n return textColor\n}\n\nconst getBorder = (theme: Theme) => (props: ChipProps) => {\n const { variant, severity } = props\n let borderColor\n if (variant === 'outlined' && severity) {\n const borderColors = {\n error: theme.palette.error.main,\n info: theme.palette.info.main,\n warning: theme.palette.warning.dark,\n success: theme.palette.success.dark,\n }\n borderColor = borderColors[severity]\n }\n return borderColor\n}\n\n// using `any` here is a bit of cheating but it doesn't matter since this doesn't depend on\n// any component-specific props\nexport const useChipStyles = makeStyles<Theme, ChipProps<any>>((theme) => ({\n root: {\n background: getBackground(theme),\n color: getColor(theme),\n borderColor: getBorder(theme),\n borderRadius: theme.spacing(0.5),\n },\n icon: {\n color: 'inherit',\n height: theme.spacing(2),\n width: theme.spacing(2),\n },\n deleteIcon: {\n color: theme.palette.grey[500],\n },\n}))\n"],"names":[],"mappings":";;AAGA,IAAM,aAAa,GAAG,UAAC,KAAY,EAAK,EAAA,OAAA,UAAC,KAAgB,EAAA;IAC/C,IAAA,OAAO,GAAe,KAAK,CAAA,OAApB,EAAE,QAAQ,GAAK,KAAK,CAAA,QAAV;IACzB,IAAI,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACxC,IAAA,IAAM,WAAW,GAAG;AAClB,QAAA,QAAQ,EAAE,MAAM;AAChB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,OAAO,EAAE,cAAc;AACvB,QAAA,IAAI,EAAE,YAAY;AAClB,QAAA,OAAO,EAAE,eAAe;KACzB;IACD,IAAI,OAAO,KAAK,UAAU,EAAE;AAC1B,QAAA,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC;AAClC;AAAM,SAAA,IAAI,QAAQ,EAAE;AACb,QAAA,IAAA,KAAwB,WAAW,CAAC,QAAQ,CAAC,CAAC,KAAK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CAAC,CAAC,CAAC;AACxB,QAAA,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACxB,KAAA;AACD,IAAA,UAAU,EAAE;QACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/B,KAAA;CACF,EAAC,EAAA;;;;"}
@@ -1,2 +1,2 @@
1
- export { Chip as default } from './Chip';
2
- export { ChipProps } from './ChipProps';
1
+ export { Chip as default } from './Chip';
2
+ export { ChipProps } from './ChipProps';
@@ -1 +1 @@
1
- export { default, CircularProgressProps } from '@material-ui/core/CircularProgress';
1
+ export { default, CircularProgressProps } from '@material-ui/core/CircularProgress';
@@ -1 +1 @@
1
- export { ClickAwayListener as default, ClickAwayListenerProps } from '@material-ui/core';
1
+ export { ClickAwayListener as default, ClickAwayListenerProps } from '@material-ui/core';
@@ -1,3 +1,3 @@
1
- import { FC } from 'react';
2
- import { CollapsibleTextProps } from './CollapsibleTextProps';
3
- export declare const CollapsibleText: FC<CollapsibleTextProps>;
1
+ import { FC } from 'react';
2
+ import { CollapsibleTextProps } from './CollapsibleTextProps';
3
+ export declare const CollapsibleText: FC<CollapsibleTextProps>;
@@ -0,0 +1,41 @@
1
+ import { __rest, __assign } from 'tslib';
2
+ import React, { useState, useRef, useEffect } from 'react';
3
+ import Collapse from '@material-ui/core/Collapse';
4
+ import { useTheme, Box } from '@material-ui/core';
5
+ import { Typography } from '../Typography/Typography.js';
6
+ import { useCollapsibleTextStyles } from './CollapsibleTextStyles.js';
7
+
8
+ var CollapsibleText = function (props) {
9
+ var text = props.text, open = props.open, _a = props.previewLines, previewLines = _a === void 0 ? 2 : _a, _b = props.typographyVariant, typographyVariant = _b === void 0 ? 'body1' : _b; props.collapseState; var restProps = __rest(props, ["text", "open", "previewLines", "typographyVariant", "collapseState"]);
10
+ var collapseState = useState(false);
11
+ var typographyRef = useRef(null);
12
+ var classes = useCollapsibleTextStyles(__assign(__assign({}, props), { previewLines: previewLines, typographyVariant: typographyVariant }));
13
+ var theme = useTheme();
14
+ var _c = props.collapseState ? props.collapseState : collapseState, collapsible = _c[0], setCollapsible = _c[1];
15
+ var typographyEntryLineHeightRem = parseFloat(theme.typography[typographyVariant].lineHeight);
16
+ var collapsedSizeRem = previewLines * typographyEntryLineHeightRem;
17
+ var documentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
18
+ var collapsedSizePx = collapsedSizeRem * documentFontSize;
19
+ useEffect(function () {
20
+ var typographyNode = typographyRef.current;
21
+ var observer = new ResizeObserver(function (entries) {
22
+ var typographyEntry = entries.find(function (entry) { return entry.target === typographyNode; });
23
+ if (typographyEntry) {
24
+ var typographyEntryHeight = typographyEntry.contentRect.height;
25
+ var isCollapsible = typographyEntryHeight > collapsedSizePx;
26
+ setCollapsible(isCollapsible);
27
+ }
28
+ });
29
+ observer.observe(typographyNode);
30
+ return function () {
31
+ observer.unobserve(typographyNode);
32
+ };
33
+ }, []);
34
+ return (React.createElement(Box, __assign({ position: "relative", overflow: "hidden" }, restProps),
35
+ React.createElement(Collapse, { in: open, collapsedSize: collapsedSizePx + 'px' },
36
+ React.createElement(Typography, { TypographyRef: typographyRef, variant: typographyVariant }, text)),
37
+ collapsible && !open && React.createElement(Box, { className: classes.overlay })));
38
+ };
39
+
40
+ export { CollapsibleText };
41
+ //# sourceMappingURL=CollapsibleText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleText.js","sources":["../../../../src/components/CollapsibleText/CollapsibleText.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react'\nimport Collapse from '@material-ui/core/Collapse'\nimport { useTheme } from '@material-ui/core'\n\nimport Box from '../Box'\nimport Typography from '../Typography'\nimport { CollapsibleTextProps } from './CollapsibleTextProps'\nimport { useCollapsibleTextStyles } from './CollapsibleTextStyles'\n\nexport const CollapsibleText: FC<CollapsibleTextProps> = (props) => {\n const { text, open, previewLines = 2, typographyVariant = 'body1', collapseState: _exclude, ...restProps } = props\n const collapseState = useState<boolean | undefined>(false)\n const typographyRef = useRef<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>(null)\n const classes = useCollapsibleTextStyles({ ...props, previewLines, typographyVariant })\n const theme = useTheme()\n const [collapsible, setCollapsible] = props.collapseState ? props.collapseState : collapseState\n const typographyEntryLineHeightRem = parseFloat(theme.typography[typographyVariant].lineHeight as string)\n const collapsedSizeRem = previewLines * typographyEntryLineHeightRem\n const documentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize)\n const collapsedSizePx = collapsedSizeRem * documentFontSize\n\n useEffect(() => {\n const typographyNode = typographyRef.current as Element\n const observer = new ResizeObserver((entries) => {\n const typographyEntry = entries.find((entry) => entry.target === typographyNode)\n if (typographyEntry) {\n const typographyEntryHeight = typographyEntry.contentRect.height\n const isCollapsible = typographyEntryHeight > collapsedSizePx\n setCollapsible(isCollapsible)\n }\n })\n observer.observe(typographyNode)\n return () => {\n observer.unobserve(typographyNode)\n }\n }, [])\n\n return (\n <Box position=\"relative\" overflow=\"hidden\" {...restProps}>\n <Collapse in={open} collapsedSize={collapsedSizePx + 'px'}>\n <Typography TypographyRef={typographyRef} variant={typographyVariant}>\n {text}\n </Typography>\n </Collapse>\n {collapsible && !open && <Box className={classes.overlay} />}\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;;;;AASO,IAAM,eAAe,GAA6B,UAAC,KAAK,EAAA;AACrD,IAAA,IAAA,IAAI,GAAiG,KAAK,CAAtG,IAAA,CAAA,CAAE,IAAI,GAA2F,KAAK,CAAhG,IAAA,CAAA,CAAE,KAAyF,KAAK,CAAA,YAA9E,EAAhB,YAAY,GAAA,EAAA,KAAA,MAAA,GAAG,CAAC,GAAA,EAAA,CAAA,CAAE,EAAuE,GAAA,KAAK,kBAAjD,CAA3B,CAAA,iBAAiB,mBAAG,OAAO,GAAA,EAAA,EAA4C,KAAK,CAAA,aAAxB,MAAK,SAAS,GAAA,MAAA,CAAK,KAAK,EAA5G,CAAA,MAAA,EAAA,M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Ae;gBAC7D,cAAc,CAAC,aAAa,CAAC;AAC9B;AACH,SAAC,CAAC;AACF,QAAA,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC;QAChC,OAAO,YAAA;AACL,YAAA,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC;AACpC,SAAC;KACF,EAAE,EAAE,CAAC;AAEN,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,QAAA,CAAA,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,QAAQ,EAAA,EAAK,SAAS,CAAA;QACtD,KAAC,CAAA,aAAA,CAAA,QAAQ,EAAC,EAAA,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,eAAe,GAAG,IAAI,EAAA;AACvD,YAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,iBAAiB,EAAA,EACjE,IAAI,CACM,CACJ;AACV,QAAA,WAAW,IAAI,CAAC,IAAI,IAAI,oBAAC,GAAG,EAAA,EAAC,SAAS,EAAE,OAAO,CAAC,OAAO,EAAI,CAAA,CACxD;AAEV;;;;"}
@@ -1,13 +1,13 @@
1
- import { BoxProps } from '../Box';
2
- export interface CollapsibleTextProps extends Pick<BoxProps, 'onClick'> {
3
- /** The content of the CollapsibleText component. */
4
- text: string;
5
- /** Expands and collapses the component. */
6
- open: boolean;
7
- /** The number of lines visible in the collapsed state. */
8
- previewLines?: number;
9
- /** The variant of the typography. */
10
- typographyVariant?: 'body1' | 'body2';
11
- /** A React state tuple. */
12
- collapseState?: [boolean, (collapsible: boolean) => void];
13
- }
1
+ import { BoxProps } from '../Box';
2
+ export interface CollapsibleTextProps extends Pick<BoxProps, 'onClick'> {
3
+ /** The content of the CollapsibleText component. */
4
+ text: string;
5
+ /** Expands and collapses the component. */
6
+ open: boolean;
7
+ /** The number of lines visible in the collapsed state. */
8
+ previewLines?: number;
9
+ /** The variant of the typography. */
10
+ typographyVariant?: 'body1' | 'body2';
11
+ /** A React state tuple. */
12
+ collapseState?: [boolean, (collapsible: boolean) => void];
13
+ }
@@ -1,5 +1,5 @@
1
- import { CollapsibleTextProps } from './CollapsibleTextProps';
2
- export declare const useCollapsibleTextStyles: (props: CollapsibleTextProps & {
3
- fadeStop?: string | number | undefined;
4
- typographyVariant: 'body1' | 'body2';
5
- }) => import("@material-ui/styles").ClassNameMap<string>;
1
+ import { CollapsibleTextProps } from './CollapsibleTextProps';
2
+ export declare const useCollapsibleTextStyles: (props: CollapsibleTextProps & {
3
+ fadeStop?: string | number | undefined;
4
+ typographyVariant: 'body1' | 'body2';
5
+ }) => import("@material-ui/styles").ClassNameMap<string>;
@@ -0,0 +1,24 @@
1
+ import { makeStyles } from '@material-ui/core';
2
+
3
+ var getFadeStop = function (_a, typographyVariant) {
4
+ var typography = _a.typography;
5
+ // @ts-expect-error - todo.
6
+ return !isNaN(Number(typography[typographyVariant].lineHeight))
7
+ ? // @ts-expect-error - todo.
8
+ typography[typographyVariant].lineHeight + "rem"
9
+ : // @ts-expect-error - todo.
10
+ typography[typographyVariant].lineHeight;
11
+ };
12
+ var useCollapsibleTextStyles = makeStyles(function (theme) { return ({
13
+ overlay: {
14
+ position: 'absolute',
15
+ top: 0,
16
+ left: 0,
17
+ height: '100%',
18
+ width: '100%',
19
+ background: function (props) { return "linear-gradient(to top, white, #FFF0 " + getFadeStop(theme, props.typographyVariant) + ")"; },
20
+ },
21
+ }); });
22
+
23
+ export { useCollapsibleTextStyles };
24
+ //# sourceMappingURL=CollapsibleTextStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleTextStyles.js","sources":["../../../../src/components/CollapsibleText/CollapsibleTextStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport { CollapsibleTextProps } from './CollapsibleTextProps'\n\nconst getFadeStop = ({ typography }: Theme, typographyVariant: string) => {\n // @ts-expect-error - todo.\n return !isNaN(Number(typography[typographyVariant].lineHeight))\n ? // @ts-expect-error - todo.\n `${typography[typographyVariant].lineHeight}rem`\n : // @ts-expect-error - todo.\n typography[typographyVariant].lineHeight\n}\n\nexport const useCollapsibleTextStyles = makeStyles<\n Theme,\n CollapsibleTextProps & { fadeStop?: string | number; typographyVariant: 'body1' | 'body2' }\n>((theme) => ({\n overlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n height: '100%',\n width: '100%',\n background: (props) => `linear-gradient(to top, white, #FFF0 ${getFadeStop(theme, props.typographyVariant)})`,\n },\n}))\n"],"names":[],"mappings":";;AAGA,IAAM,WAAW,GAAG,UAAC,EAAqB,EAAE,iBAAyB,EAAA;AAA9C,IAAA,IAAA,UAAU,GAAA,EAAA,CAAA,UAAA;;AAE/B,IAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC;AAC5D;AACK,YAAA,UAAU,CAAC,iBAAiB,CAAC,CAAC,UAAU,GAAK;AAClD;AACE,YAAA,UAAU,CAAC,iBAAiB,CAAC,CAAC,UAAU;AAC9C,CAAC;AAEY,IAAA,wBAAwB,GAAG,UAAU,CAGhD,UAAC,KAAK,EAAK,EAAA,QAAC;AACZ,IAAA,OAAO,EAAE;AACP,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,UAAU,EAAE,UAAC,KAAK,EAAK,EAAA,OAAA,0CAAwC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,GAAA,GAAG,GAAA;AAC9G,KAAA;CACF,EAAC,EAAA;;;;"}
@@ -1,2 +1,2 @@
1
- export { CollapsibleText as default } from './CollapsibleText';
2
- export { CollapsibleTextProps } from './CollapsibleTextProps';
1
+ export { CollapsibleText as default } from './CollapsibleText';
2
+ export { CollapsibleTextProps } from './CollapsibleTextProps';
@@ -1 +1 @@
1
- export { default, DialogProps } from '@material-ui/core/Dialog';
1
+ export { default, DialogProps } from '@material-ui/core/Dialog';
@@ -1 +1 @@
1
- export { default, DialogActionsProps } from '@material-ui/core/DialogActions';
1
+ export { default, DialogActionsProps } from '@material-ui/core/DialogActions';
@@ -1 +1 @@
1
- export { default, DialogContentProps } from '@material-ui/core/DialogContent';
1
+ export { default, DialogContentProps } from '@material-ui/core/DialogContent';
@@ -1 +1 @@
1
- export { default, DialogContentTextProps } from '@material-ui/core/DialogContentText';
1
+ export { default, DialogContentTextProps } from '@material-ui/core/DialogContentText';
@@ -1 +1 @@
1
- export { default, DialogTitleProps } from '@material-ui/core/DialogTitle';
1
+ export { default, DialogTitleProps } from '@material-ui/core/DialogTitle';
@@ -1,3 +1,3 @@
1
- import { FC } from 'react';
2
- import { DividerProps } from './DividerProps';
3
- export declare const Divider: FC<DividerProps>;
1
+ import { FC } from 'react';
2
+ import { DividerProps } from './DividerProps';
3
+ export declare const Divider: FC<DividerProps>;
@@ -0,0 +1,70 @@
1
+ import { __assign } from 'tslib';
2
+ import { makeStyles, Box } from '@material-ui/core';
3
+ import classNames from 'classnames';
4
+ import React from 'react';
5
+ import { Typography } from '../Typography/Typography.js';
6
+
7
+ var SemanticColors;
8
+ (function (SemanticColors) {
9
+ SemanticColors["PRIMARY_MAIN"] = "primary.main";
10
+ SemanticColors["PRIMARY_DARK"] = "primary.dark";
11
+ SemanticColors["PRIMARY_LIGHT"] = "primary.light";
12
+ SemanticColors["SECONDARY_MAIN"] = "secondary.main";
13
+ SemanticColors["SECONDARY_DARK"] = "secondary.dark";
14
+ SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
15
+ })(SemanticColors || (SemanticColors = {}));
16
+ var useStyles = makeStyles(function (theme) { return ({
17
+ dividerRoot: {
18
+ gap: theme.spacing(2),
19
+ },
20
+ textRoot: {
21
+ color: function (props) {
22
+ var textColor = props.textColor;
23
+ if (Object.values(SemanticColors).includes(textColor)) {
24
+ var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
25
+ // @ts-expect-error - todo.
26
+ return theme.palette[semanticColor][shade];
27
+ }
28
+ else if (textColor) {
29
+ return textColor;
30
+ }
31
+ else {
32
+ return 'black';
33
+ }
34
+ },
35
+ textTransform: function (props) { return props.textTransform; },
36
+ },
37
+ dividerLine: {
38
+ backgroundColor: function (props) {
39
+ var dividerColor = props.dividerColor;
40
+ if (Object.values(SemanticColors).includes(dividerColor)) {
41
+ var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
42
+ // @ts-expect-error - todo.
43
+ return theme.palette[semanticColor][shade];
44
+ }
45
+ else if (dividerColor) {
46
+ return dividerColor;
47
+ }
48
+ else {
49
+ return theme.palette.grey[500];
50
+ }
51
+ },
52
+ },
53
+ }); });
54
+ var Divider = function (props) {
55
+ var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
56
+ var classes = useStyles(props);
57
+ var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
58
+ return (React.createElement(Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
59
+ React.createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
60
+ text && (React.createElement(React.Fragment, null,
61
+ React.createElement(Typography, __assign({ className: classes.textRoot }, TypographyProps), text),
62
+ React.createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset })))));
63
+ };
64
+ Divider.displayName = 'Divider';
65
+ Divider.defaultProps = {
66
+ textTransform: 'lowercase',
67
+ };
68
+
69
+ export { Divider };
70
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.js","sources":["../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport classNames from 'classnames'\nimport React, { FC } from 'react'\nimport Box from '../Box'\nimport Typography from '../Typography'\nimport { DividerProps } from './DividerProps'\n\nenum SemanticColors {\n PRIMARY_MAIN = 'primary.main',\n PRIMARY_DARK = 'primary.dark',\n PRIMARY_LIGHT = 'primary.light',\n SECONDARY_MAIN = 'secondary.main',\n SECONDARY_DARK = 'secondary.dark',\n SECONDARY_LIGHT = 'secondary.light',\n}\n\nconst useStyles = makeStyles<Theme, DividerProps>((theme) => ({\n dividerRoot: {\n gap: theme.spacing(2),\n },\n textRoot: {\n color: (props) => {\n const { textColor } = props as { textColor: string }\n if (Object.values<string>(SemanticColors).includes(textColor)) {\n const [semanticColor, shade] = textColor.split('.')\n // @ts-expect-error - todo.\n return theme.palette[semanticColor][shade]\n } else if (textColor) {\n return textColor\n } else {\n return 'black'\n }\n },\n textTransform: (props) => props.textTransform,\n },\n dividerLine: {\n backgroundColor: (props) => {\n const { dividerColor } = props as { dividerColor: string }\n if (Object.values<string>(SemanticColors).includes(dividerColor)) {\n const [semanticColor, shade] = dividerColor.split('.')\n // @ts-expect-error - todo.\n return theme.palette[semanticColor][shade]\n } else if (dividerColor) {\n return dividerColor\n } else {\n return theme.palette.grey[500]\n }\n },\n },\n}))\n\nexport const Divider: FC<DividerProps> = (props) => {\n const { className, text, textTransform, TypographyProps } = props\n const classes = useStyles(props)\n const casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset'\n\n return (\n <Box className={classNames([classes.dividerRoot, className])} display=\"flex\" alignItems=\"center\">\n <Box className={classes.dividerLine} display=\"flex\" flexGrow={1} height=\"1px\" marginTop={casingOffset} />\n {text && (\n <>\n <Typography className={classes.textRoot} {...TypographyProps}>\n {text}\n </Typography>\n <Box className={classes.dividerLine} display=\"flex\" flexGrow={1} height=\"1px\" marginTop={casingOffset} />\n </>\n )}\n </Box>\n )\n}\n\nDivider.displayName = 'Divider'\n\nDivider.defaultProps = {\n textTransform: 'lowercase',\n}\n"],"names":[],"mappings":";;;;;;AAOA,IAAK,cAOJ;AAPD,CAAA,UAAK,cAAc,EAAA;AACjB,IAAA,cAAA,CAAA,cAAA,CAAA,GA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C,QAAA,CAAA,EAAA,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAM,EAAA,eAAe,CACzD,EAAA,IAAI,CACM;AACb,YAAA,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EAAC,SAAS,EAAE,OAAO,CAAC,WAAW,EAAE,OAAO,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAC,KAAK,EAAC,SAAS,EAAE,YAAY,EAAA,CAAI,CACxG,CACJ,CACG;AAEV;AAEA,OAAO,CAAC,WAAW,GAAG,SAAS;AAE/B,OAAO,CAAC,YAAY,GAAG;AACrB,IAAA,aAAa,EAAE,WAAW;CAC3B;;;;"}
@@ -1,17 +1,17 @@
1
- import { TypographyProps } from '../Typography';
2
- declare type Colors = 'primary.main' | 'primary.dark' | 'primary.light' | 'secondary.main' | 'secondary.dark' | 'secondary.light';
3
- export interface DividerProps {
4
- /** Sets the styles for a divider. */
5
- className?: string;
6
- /** Sets the color of the divider line. Accepts thematic color names and color codes. */
7
- dividerColor?: Colors | string;
8
- /** A message shown in the center of the divider */
9
- text?: string;
10
- /** Sets the color of the divider text. Accepts thematic color names and color codes. */
11
- textColor?: Colors | string;
12
- /** Sets the casing of the text */
13
- textTransform?: 'uppercase' | 'lowercase' | 'capitalize';
14
- /** Props applied to the internal Typography component that displays text */
15
- TypographyProps?: TypographyProps;
16
- }
17
- export {};
1
+ import { TypographyProps } from '../Typography';
2
+ declare type Colors = 'primary.main' | 'primary.dark' | 'primary.light' | 'secondary.main' | 'secondary.dark' | 'secondary.light';
3
+ export interface DividerProps {
4
+ /** Sets the styles for a divider. */
5
+ className?: string;
6
+ /** Sets the color of the divider line. Accepts thematic color names and color codes. */
7
+ dividerColor?: Colors | string;
8
+ /** A message shown in the center of the divider */
9
+ text?: string;
10
+ /** Sets the color of the divider text. Accepts thematic color names and color codes. */
11
+ textColor?: Colors | string;
12
+ /** Sets the casing of the text */
13
+ textTransform?: 'uppercase' | 'lowercase' | 'capitalize';
14
+ /** Props applied to the internal Typography component that displays text */
15
+ TypographyProps?: TypographyProps;
16
+ }
17
+ export {};
@@ -1,2 +1,2 @@
1
- export { Divider as default } from './Divider';
2
- export { DividerProps } from './DividerProps';
1
+ export { Divider as default } from './Divider';
2
+ export { DividerProps } from './DividerProps';
@@ -1 +1 @@
1
- export { default, DrawerProps } from '@material-ui/core/Drawer';
1
+ export { default, DrawerProps } from '@material-ui/core/Drawer';
@@ -1 +1 @@
1
- export { Fab as default, FabProps } from '@material-ui/core';
1
+ export { Fab as default, FabProps } from '@material-ui/core';
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const FollowerAuthenticationAltActions: () => JSX.Element | null;
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationAltActions: () => JSX.Element | null;
@@ -0,0 +1,86 @@
1
+ import React from 'react';
2
+ import { useFollowerAuthenticationDialogContext } from './context.js';
3
+ import { makeStyles, Button, Box, Divider } from '@material-ui/core';
4
+
5
+ var useStyles = makeStyles(function () { return ({
6
+ main: {
7
+ width: '100%',
8
+ display: 'flex',
9
+ flexDirection: 'column',
10
+ gridGap: 16,
11
+ },
12
+ }); });
13
+ var FollowerAuthenticationAltActions = function () {
14
+ var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages, logos = _a.logos, loading = _a.loading, onActionButtonClick = _a.onActionButtonClick;
15
+ var classes = useStyles();
16
+ switch (state.value) {
17
+ case 'initial':
18
+ return (React.createElement(Box, { className: classes.main },
19
+ React.createElement(Divider, null),
20
+ React.createElement(Button, { variant: "outlined", startIcon: logos.facebook, onClick: function () {
21
+ onActionButtonClick('sign-in-with-facebook');
22
+ } }, messages.continueWithFacebookButtonLabel),
23
+ React.createElement(Button, { variant: "outlined", startIcon: logos.google, onClick: function () {
24
+ onActionButtonClick('sign-in-with-google');
25
+ } }, messages.continueWithGoogleButtonLabel)));
26
+ case 'signUp':
27
+ return null;
28
+ case 'emailFound':
29
+ return (React.createElement(Box, { className: classes.main },
30
+ React.createElement(Divider, null),
31
+ React.createElement(Button, { variant: "outlined", onClick: function () {
32
+ onActionButtonClick('sign-in-with-password');
33
+ } }, messages.signInWithPassword)));
34
+ case 'emailAuthCode':
35
+ return (React.createElement(Box, { className: classes.main },
36
+ React.createElement(Button, { disabled: loading, variant: "outlined", onClick: function () {
37
+ var form = document.querySelector('#follower-authentication-form');
38
+ var formData = new FormData(form);
39
+ var values = Object.fromEntries(formData.entries());
40
+ onActionButtonClick('request-auth-code-email', values);
41
+ } }, messages.resendAuthCode)));
42
+ case 'indirectUserFound':
43
+ return (React.createElement(Box, { className: classes.main },
44
+ React.createElement(Divider, null),
45
+ React.createElement(Button, { variant: "outlined", onClick: function () {
46
+ onActionButtonClick('use-different-account');
47
+ } }, messages.indirectUserFoundCtaButtonLabelAlt)));
48
+ case 'emailPasswordSignIn':
49
+ return (React.createElement(Box, { className: classes.main },
50
+ React.createElement(Divider, null),
51
+ React.createElement(Button, { variant: "outlined", onClick: function () {
52
+ var form = document.querySelector('#follower-authentication-form');
53
+ var formData = new FormData(form);
54
+ var values = Object.fromEntries(formData.entries());
55
+ onActionButtonClick('request-auth-code-email', values);
56
+ } }, messages.emailFoundCtaButtonLabel)));
57
+ case 'phoneFound':
58
+ return null;
59
+ case 'phoneAuthCode':
60
+ return (React.createElement(Box, { className: classes.main },
61
+ React.createElement(Button, { disabled: loading, variant: "outlined", onClick: function () {
62
+ var form = document.querySelector('#follower-authentication-form');
63
+ var formData = new FormData(form);
64
+ var values = Object.fromEntries(formData.entries());
65
+ onActionButtonClick('request-auth-code-sms', values);
66
+ } }, messages.resendAuthCode)));
67
+ case 'phonePasswordSignIn':
68
+ return (React.createElement(Box, { className: classes.main },
69
+ React.createElement(Divider, null),
70
+ React.createElement(Button, { variant: "outlined", onClick: function () {
71
+ var form = document.querySelector('#follower-authentication-form');
72
+ var formData = new FormData(form);
73
+ var values = Object.fromEntries(formData.entries());
74
+ onActionButtonClick('request-auth-code-sms', values);
75
+ } }, messages.phoneFoundCtaButtonLabel)));
76
+ case 'welcome':
77
+ return (React.createElement(Button, { onClick: function () {
78
+ onActionButtonClick('close');
79
+ } }, messages.done));
80
+ default:
81
+ return null;
82
+ }
83
+ };
84
+
85
+ export { FollowerAuthenticationAltActions };
86
+ //# sourceMappingURL=FollowerAuthenticationAltActions.js.map
@@ -0,0 +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,E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AC,IAAI,CAAC;wBACnC,IAAM,MAAM,GAAG,MAAM,CAAC,WAAW,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,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,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const FollowerAuthenticationBody: () => JSX.Element;
1
+ /// <reference types="react" />
2
+ export declare const FollowerAuthenticationBody: () => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { FollowerAuthenticationForm } from './FollowerAuthenticationForm.js';
3
+ import { FollowerAuthenticationAltActions } from './FollowerAuthenticationAltActions.js';
4
+
5
+ var FollowerAuthenticationBody = function () {
6
+ return (React.createElement(React.Fragment, null,
7
+ React.createElement(FollowerAuthenticationForm, null),
8
+ React.createElement(FollowerAuthenticationAltActions, null)));
9
+ };
10
+
11
+ export { FollowerAuthenticationBody };
12
+ //# sourceMappingURL=FollowerAuthenticationBody.js.map
@@ -0,0 +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;;;;"}