@popmenu/common-ui 0.127.0 → 0.127.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/build/cjs/components/Avatar/AvatarProps.d.ts +2 -2
  2. package/build/cjs/components/Button/Button.d.ts +1 -1
  3. package/build/cjs/components/Button/ButtonProps.d.ts +1 -1
  4. package/build/cjs/components/Button/ButtonStyles.d.ts +1 -1
  5. package/build/cjs/components/Chip/Chip.d.ts +1 -1
  6. package/build/cjs/components/Chip/ChipProps.d.ts +2 -2
  7. package/build/cjs/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
  8. package/build/cjs/components/Divider/DividerProps.d.ts +1 -1
  9. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
  10. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
  11. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
  12. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
  13. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
  14. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
  15. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
  16. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
  17. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
  18. package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
  19. package/build/cjs/components/FollowerAuthenticationDialog/context.d.ts +0 -1
  20. package/build/cjs/components/Icon/IconStyles.d.ts +1 -1
  21. package/build/cjs/components/IconButton/IconButtonProps.d.ts +1 -1
  22. package/build/cjs/components/Link/LinkStyles.d.ts +1 -1
  23. package/build/cjs/components/NumberField/NumberField.d.ts +0 -1
  24. package/build/cjs/components/NumberField/NumberFieldStyles.d.ts +1 -1
  25. package/build/cjs/components/SplitInput/SplitInputStyles.d.ts +1 -1
  26. package/build/cjs/components/Tooltip/TooltipProps.d.ts +1 -1
  27. package/build/cjs/components/Typography/Typography.d.ts +1 -1
  28. package/build/cjs/components/Typography/TypographyProps.d.ts +3 -3
  29. package/build/cjs/components/Typography/TypographyStyles.d.ts +1 -1
  30. package/build/cjs/hooks/useTabs/useTabsResult.d.ts +3 -3
  31. package/build/cjs/index.js +412 -437
  32. package/build/cjs/index.js.map +1 -1
  33. package/build/cjs/types/index.d.ts +2 -2
  34. package/build/esm/components/Avatar/Avatar.js +9 -10
  35. package/build/esm/components/Avatar/Avatar.js.map +1 -1
  36. package/build/esm/components/Avatar/AvatarProps.d.ts +2 -2
  37. package/build/esm/components/Avatar/avatar.styles.js +11 -11
  38. package/build/esm/components/Avatar/avatar.styles.js.map +1 -1
  39. package/build/esm/components/Avatar/util/useImageProps.js +9 -8
  40. package/build/esm/components/Avatar/util/useImageProps.js.map +1 -1
  41. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js +2 -3
  42. package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js.map +1 -1
  43. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js +5 -5
  44. package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js.map +1 -1
  45. package/build/esm/components/Button/Button.d.ts +1 -1
  46. package/build/esm/components/Button/Button.js +7 -8
  47. package/build/esm/components/Button/Button.js.map +1 -1
  48. package/build/esm/components/Button/ButtonProps.d.ts +1 -1
  49. package/build/esm/components/Button/ButtonStyles.d.ts +1 -1
  50. package/build/esm/components/Button/ButtonStyles.js +3 -6
  51. package/build/esm/components/Button/ButtonStyles.js.map +1 -1
  52. package/build/esm/components/Checkbox/Checkbox.js +5 -5
  53. package/build/esm/components/Checkbox/Checkbox.js.map +1 -1
  54. package/build/esm/components/Chip/Chip.d.ts +1 -1
  55. package/build/esm/components/Chip/Chip.js +7 -8
  56. package/build/esm/components/Chip/Chip.js.map +1 -1
  57. package/build/esm/components/Chip/ChipProps.d.ts +2 -2
  58. package/build/esm/components/Chip/ChipStyles.js +19 -19
  59. package/build/esm/components/Chip/ChipStyles.js.map +1 -1
  60. package/build/esm/components/CollapsibleText/CollapsibleText.js +19 -20
  61. package/build/esm/components/CollapsibleText/CollapsibleText.js.map +1 -1
  62. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
  63. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js +5 -6
  64. package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js.map +1 -1
  65. package/build/esm/components/Divider/Divider.js +11 -15
  66. package/build/esm/components/Divider/Divider.js.map +1 -1
  67. package/build/esm/components/Divider/DividerProps.d.ts +1 -1
  68. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
  69. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +26 -26
  70. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -1
  71. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
  72. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js +1 -1
  73. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js.map +1 -1
  74. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
  75. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js +6 -6
  76. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map +1 -1
  77. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js +4 -4
  78. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map +1 -1
  79. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
  80. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js +11 -15
  81. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map +1 -1
  82. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
  83. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
  84. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js +2 -2
  85. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map +1 -1
  86. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
  87. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +49 -52
  88. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -1
  89. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
  90. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +4 -4
  91. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -1
  92. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
  93. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +3 -3
  94. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -1
  95. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
  96. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js +3 -3
  97. package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js.map +1 -1
  98. package/build/esm/components/FollowerAuthenticationDialog/context.d.ts +0 -1
  99. package/build/esm/components/FollowerAuthenticationDialog/context.js +4 -4
  100. package/build/esm/components/FollowerAuthenticationDialog/context.js.map +1 -1
  101. package/build/esm/components/FollowerAuthenticationDialog/theme.js +1 -1
  102. package/build/esm/components/FollowerAuthenticationDialog/theme.js.map +1 -1
  103. package/build/esm/components/Icon/Icon.js +12 -8
  104. package/build/esm/components/Icon/Icon.js.map +1 -1
  105. package/build/esm/components/Icon/IconStyles.d.ts +1 -1
  106. package/build/esm/components/Icon/IconStyles.js +7 -9
  107. package/build/esm/components/Icon/IconStyles.js.map +1 -1
  108. package/build/esm/components/IconButton/IconButton.js +2 -3
  109. package/build/esm/components/IconButton/IconButton.js.map +1 -1
  110. package/build/esm/components/IconButton/IconButtonProps.d.ts +1 -1
  111. package/build/esm/components/Link/Link.js +4 -5
  112. package/build/esm/components/Link/Link.js.map +1 -1
  113. package/build/esm/components/Link/LinkStyles.d.ts +1 -1
  114. package/build/esm/components/Link/LinkStyles.js +8 -8
  115. package/build/esm/components/Link/LinkStyles.js.map +1 -1
  116. package/build/esm/components/NumberField/NumberField.d.ts +0 -1
  117. package/build/esm/components/NumberField/NumberField.js +14 -9
  118. package/build/esm/components/NumberField/NumberField.js.map +1 -1
  119. package/build/esm/components/NumberField/NumberFieldStyles.d.ts +1 -1
  120. package/build/esm/components/NumberField/NumberFieldStyles.js +4 -4
  121. package/build/esm/components/NumberField/NumberFieldStyles.js.map +1 -1
  122. package/build/esm/components/Paper/Paper.js +12 -16
  123. package/build/esm/components/Paper/Paper.js.map +1 -1
  124. package/build/esm/components/PaperContent/PaperContent.js +2 -2
  125. package/build/esm/components/PaperContent/PaperContent.js.map +1 -1
  126. package/build/esm/components/Radio/Radio.js +5 -5
  127. package/build/esm/components/Radio/Radio.js.map +1 -1
  128. package/build/esm/components/SplitInput/SplitInput.js +4 -6
  129. package/build/esm/components/SplitInput/SplitInput.js.map +1 -1
  130. package/build/esm/components/SplitInput/SplitInputStyles.d.ts +1 -1
  131. package/build/esm/components/SplitInput/SplitInputStyles.js +4 -4
  132. package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -1
  133. package/build/esm/components/Switch/Switch.js +6 -6
  134. package/build/esm/components/Switch/Switch.js.map +1 -1
  135. package/build/esm/components/Switch/switch.styles.js +2 -2
  136. package/build/esm/components/Switch/switch.styles.js.map +1 -1
  137. package/build/esm/components/TabPanel/TabPanel.js +2 -2
  138. package/build/esm/components/TabPanel/TabPanel.js.map +1 -1
  139. package/build/esm/components/ToggleButton/ToggleButton.js +5 -6
  140. package/build/esm/components/ToggleButton/ToggleButton.js.map +1 -1
  141. package/build/esm/components/ToggleButton/ToggleButtonStyles.js +4 -4
  142. package/build/esm/components/ToggleButton/ToggleButtonStyles.js.map +1 -1
  143. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js +6 -7
  144. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -1
  145. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js +2 -2
  146. package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js.map +1 -1
  147. package/build/esm/components/Tooltip/Tooltip.js +3 -4
  148. package/build/esm/components/Tooltip/Tooltip.js.map +1 -1
  149. package/build/esm/components/Tooltip/TooltipProps.d.ts +1 -1
  150. package/build/esm/components/Tooltip/TooltipStyles.js +5 -8
  151. package/build/esm/components/Tooltip/TooltipStyles.js.map +1 -1
  152. package/build/esm/components/Typography/Typography.d.ts +1 -1
  153. package/build/esm/components/Typography/Typography.js +4 -6
  154. package/build/esm/components/Typography/Typography.js.map +1 -1
  155. package/build/esm/components/Typography/TypographyProps.d.ts +3 -3
  156. package/build/esm/components/Typography/TypographyStyles.d.ts +1 -1
  157. package/build/esm/components/Typography/TypographyStyles.js +29 -47
  158. package/build/esm/components/Typography/TypographyStyles.js.map +1 -1
  159. package/build/esm/hooks/useCollapsibleText.js +7 -7
  160. package/build/esm/hooks/useCollapsibleText.js.map +1 -1
  161. package/build/esm/hooks/useTabs/useTabs.js +15 -15
  162. package/build/esm/hooks/useTabs/useTabs.js.map +1 -1
  163. package/build/esm/hooks/useTabs/useTabsResult.d.ts +3 -3
  164. package/build/esm/types/index.d.ts +2 -2
  165. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"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 setSignUpPhoneValue(state.context.phone || '')\n setSignUpEmailValue(state.context.email || '')\n }, [state.context.phone, state.context.email])\n\n useEffect(() => {\n // Validate pre-filled values (only in signUp state)\n if (state.value === 'signUp') {\n if (signUpPhoneValue) {\n const isPhoneValid = validatePhoneNumber(signUpPhoneValue)\n setShowPhoneErrorText(!isPhoneValid)\n }\n if (signUpEmailValue) {\n const emailField = formRef.current?.elements.namedItem('email') as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setShowEmailErrorText(!isEmailValid)\n }\n }\n\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 }, [state.value, 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\">\n {messages.requirePhoneCtaButtonLabel}\n </Button>\n </form>\n )\n case 'welcome':\n return null\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,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,OAAO,EAAE,EAAE;AACZ,KAAA;CACF,EAAC,EAAA,CAAC;AAEH,IAAM,uBAAuB,GAAG,2DAA2D;AAC3F,IAAM,YAAY,GAAG,kFAAkF;AAEvG,IAAM,mBAAmB,GAAG,UAAC,KAAa,EAAA;AACxC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,KAAK;A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IAAI,EAAE,EACjC,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,EAClC,GAAG,EAAC,gBAAgB,EACpB,EAAE,EAAC,gBAAgB,EACnB,IAAI,EAAC,UAAU,EACf,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAChC,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAA,EACrC,QAAQ,CAAC,MAAM,CACT,CACJ;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;;;;"}
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 setSignUpPhoneValue(state.context.phone || '')\n setSignUpEmailValue(state.context.email || '')\n }, [state.context.phone, state.context.email])\n\n useEffect(() => {\n // Validate pre-filled values (only in signUp state)\n if (state.value === 'signUp') {\n if (signUpPhoneValue) {\n const isPhoneValid = validatePhoneNumber(signUpPhoneValue)\n setShowPhoneErrorText(!isPhoneValid)\n }\n if (signUpEmailValue) {\n const emailField = formRef.current?.elements.namedItem('email') as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setShowEmailErrorText(!isEmailValid)\n }\n }\n\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 }, [state.value, 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\">\n {messages.requirePhoneCtaButtonLabel}\n </Button>\n </form>\n )\n case 'welcome':\n return null\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;AAIA,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,OAAO,EAAE,EAAE;AACZ,KAAA;AACF,CAAA,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,2DAA2D;AAC3F,MAAM,YAAY,GAAG,kFAAkF;AAEvG,MAAM,mBAAmB,GAAG,CAAC,KAAa,KAAa;AACrD,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,KAAK;AACxB,IAAA,OAAO,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;AACxE,CAAC;AAEM,MAAM,0BAA0B,GAAG,MAAK;AAC7C,IAAA,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,sCAAsC,EAAE;AACnH,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;;AAG3B,IAAA,MAAM,OAAO,GAAG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,EAAE,IAAI,EAAE,EACjC,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,EAClC,GAAG,EAAC,gBAAgB,EACpB,EAAE,EAAC,gBAAgB,EACnB,IAAI,EAAC,UAAU,EACf,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAChC,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAA,EACrC,QAAQ,CAAC,MAAM,CACT,CACJ;AAEX,QAAA,KAAK,cAAc;YACjB,QACE,iCAAU,SAAS,EAAA;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;;AAEjB;;;;"}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FollowerAuthenticationGraphic: () => JSX.Element | null;
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import { useFollowerAuthenticationDialogContext } from './context.js';
3
3
  import { Box } from '@material-ui/core';
4
4
 
5
- var FollowerAuthenticationGraphic = function () {
6
- var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages, graphics = _a.graphics;
7
- var graphic = graphics[state.value];
5
+ const FollowerAuthenticationGraphic = () => {
6
+ const { state, messages, graphics } = useFollowerAuthenticationDialogContext();
7
+ const graphic = graphics[state.value];
8
8
  if (!graphic)
9
9
  return null;
10
10
  return (React.createElement(Box, null,
11
- React.createElement("img", { src: graphic, alt: messages[state.value + "GraphicAlt"] })));
11
+ React.createElement("img", { src: graphic, alt: messages[`${state.value}GraphicAlt`] })));
12
12
  };
13
13
 
14
14
  export { FollowerAuthenticationGraphic };
@@ -1 +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;;;;"}
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":";;;;AAKO,MAAM,6BAA6B,GAAG,MAAK;IAChD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,sCAAsC,EAAE;IAC9E,MAAM,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,CAAC,CAAG,EAAA,KAAK,CAAC,KAAK,CAAA,UAAA,CAA0B,CAAW,EAAI,CAAA,CACpF;AAEV;;;;"}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FollowerAuthenticationInfo: () => JSX.Element | null;
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import { useFollowerAuthenticationDialogContext } from './context.js';
3
3
  import { Box, Typography } from '@material-ui/core';
4
4
 
5
- var FollowerAuthenticationInfo = function () {
6
- var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages;
7
- var info = messages[state.value + "Info"];
5
+ const FollowerAuthenticationInfo = () => {
6
+ const { state, messages } = useFollowerAuthenticationDialogContext();
7
+ const info = messages[`${state.value}Info`];
8
8
  if (!info)
9
9
  return null;
10
10
  return (React.createElement(Box, null,
@@ -1 +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;;;;"}
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":";;;;AAKO,MAAM,0BAA0B,GAAG,MAAK;IAC7C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,sCAAsC,EAAE;IACpE,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAA,EAAG,KAAK,CAAC,KAAK,CAAoB,IAAA,CAAA,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;;;;"}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FollowerAuthenticationTitle: () => JSX.Element;
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import { useFollowerAuthenticationDialogContext } from './context.js';
3
3
  import { Box, Typography } from '@material-ui/core';
4
4
 
5
- var FollowerAuthenticationTitle = function () {
6
- var _a = useFollowerAuthenticationDialogContext(), state = _a.state, messages = _a.messages;
7
- var title = messages[state.value + "Title"];
5
+ const FollowerAuthenticationTitle = () => {
6
+ const { state, messages } = useFollowerAuthenticationDialogContext();
7
+ const title = messages[`${state.value}Title`];
8
8
  return (React.createElement(Box, null,
9
9
  React.createElement(Typography, { variant: "h1", align: "center" }, title)));
10
10
  };
@@ -1 +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;;;;"}
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":";;;;AAKO,MAAM,2BAA2B,GAAG,MAAK;IAC9C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,sCAAsC,EAAE;IACpE,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAA,EAAG,KAAK,CAAC,KAAK,CAAqB,KAAA,CAAA,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;;;;"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps';
3
2
  export declare const FollowerAuthenticationDialogContextProvider: import("react").Provider<Omit<FollowerAuthenticationDialogProps, "open"> | null>;
4
3
  export declare const useFollowerAuthenticationDialogContext: () => Omit<FollowerAuthenticationDialogProps, "open">;
@@ -1,9 +1,9 @@
1
1
  import { createContext, useContext } from 'react';
2
2
 
3
- var FollowerAuthenticationDialogContext = createContext(null);
4
- var FollowerAuthenticationDialogContextProvider = FollowerAuthenticationDialogContext.Provider;
5
- var useFollowerAuthenticationDialogContext = function () {
6
- var context = useContext(FollowerAuthenticationDialogContext);
3
+ const FollowerAuthenticationDialogContext = createContext(null);
4
+ const FollowerAuthenticationDialogContextProvider = FollowerAuthenticationDialogContext.Provider;
5
+ const useFollowerAuthenticationDialogContext = () => {
6
+ const context = useContext(FollowerAuthenticationDialogContext);
7
7
  if (!context) {
8
8
  throw new Error('useFollowerAuthenticationDialogContext must be called within FollowerAuthenticationDialogContextProvider');
9
9
  }
@@ -1 +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;;;;"}
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,MAAM,mCAAmC,GAAG,aAAa,CAAyD,IAAI,CAAC;AAE1G,MAAA,2CAA2C,GAAG,mCAAmC,CAAC;AAExF,MAAM,sCAAsC,GAAG,MAAK;AACzD,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,mCAAmC,CAAC;IAC/D,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CACb,0GAA0G,CAC3G;;AAEH,IAAA,OAAO,OAAO;AAChB;;;;"}
@@ -1,4 +1,4 @@
1
- var theme = {
1
+ const theme = {
2
2
  palette: {
3
3
  primary: { main: '#2E3042' },
4
4
  },
@@ -1 +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;;;;;"}
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,MAAA,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;;;;;"}
@@ -1,22 +1,26 @@
1
- import { __rest, __assign } from 'tslib';
2
1
  import classNames from 'classnames';
3
2
  import { createElement } from 'react';
4
3
  import { useIconStyles } from './IconStyles.js';
5
4
 
6
- var iconStaticClassName = 'pop-icon';
7
- var Icon = function (_a) {
8
- var className = _a.className, _b = _a.color, color = _b === void 0 ? 'inherit' : _b, icon = _a.icon, _c = _a.size, size = _c === void 0 ? 'inherit' : _c, restProps = __rest(_a, ["className", "color", "icon", "size"]);
9
- var hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
5
+ const iconStaticClassName = 'pop-icon';
6
+ const Icon = ({ className, color = 'inherit', icon, size = 'inherit', ...restProps }) => {
7
+ const hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
10
8
  if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {
11
9
  restProps['aria-hidden'] = true;
12
10
  }
13
- var classes = useIconStyles({ color: color, size: size });
14
- var isValid = true;
11
+ const classes = useIconStyles({ color, size });
12
+ let isValid = true;
15
13
  if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
16
14
  isValid = false;
17
15
  }
18
16
  return isValid
19
- ? createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]), color: color, width: undefined, height: undefined }, restProps))
17
+ ? createElement(icon, {
18
+ className: classNames([classes.root, iconStaticClassName, className]),
19
+ color,
20
+ width: undefined,
21
+ height: undefined,
22
+ ...restProps,
23
+ })
20
24
  : null;
21
25
  };
22
26
  Icon.displayName = 'Icon';
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { createElement, FunctionComponent } from 'react'\nimport { IconProps } from './IconProps'\nimport { useIconStyles } from './IconStyles'\n\nexport const iconStaticClassName = 'pop-icon'\nexport const Icon: FunctionComponent<IconProps> = ({\n className,\n color = 'inherit',\n icon,\n size = 'inherit',\n ...restProps\n}) => {\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({ color, size })\n let isValid = true\n if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {\n isValid = false\n }\n return isValid\n ? createElement(icon, {\n className: classNames([classes.root, iconStaticClassName, className]),\n color,\n width: undefined,\n height: undefined,\n ...restProps,\n })\n : null\n}\n\nIcon.displayName = 'Icon'\n"],"names":[],"mappings":";;;;;AAKO,IAAM,mBAAmB,GAAG;AAC5B,IAAM,IAAI,GAAiC,UAAC,EAMlD,EAAA;IALC,IAAA,SAAS,eAAA,EACT,EAAA,GAAA,EAAA,CAAA,KAAiB,EAAjB,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,SAAS,GAAA,EAAA,EACjB,IAAI,UAAA,EACJ,EAAA,GAAA,EAAA,CAAA,IAAgB,EAAhB,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,KAAA,EACb,SAAS,GALqC,MAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA,OAAA,EAAA,MAAA,EAAA,MAAA,CAMlD,CADa;AAEZ,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,EAAE,KAAK,EAAA,KAAA,EAAE,IAAI,EAAA,IAAA,EAAE,CAAC;IAC9C,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;AACL,UAAE,aAAa,CAAC,IAAI,aAChB,SAAS,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC,EACrE,KAAK,EAAA,KAAA,EACL,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,SAAS,EAAA,EACd,SAAS,CACZ;UACF,IAAI;AACV;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { createElement, FunctionComponent } from 'react'\nimport { IconProps } from './IconProps'\nimport { useIconStyles } from './IconStyles'\n\nexport const iconStaticClassName = 'pop-icon'\nexport const Icon: FunctionComponent<IconProps> = ({\n className,\n color = 'inherit',\n icon,\n size = 'inherit',\n ...restProps\n}) => {\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({ color, size })\n let isValid = true\n if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {\n isValid = false\n }\n return isValid\n ? createElement(icon, {\n className: classNames([classes.root, iconStaticClassName, className]),\n color,\n width: undefined,\n height: undefined,\n ...restProps,\n })\n : null\n}\n\nIcon.displayName = 'Icon'\n"],"names":[],"mappings":";;;;AAKO,MAAM,mBAAmB,GAAG;MACtB,IAAI,GAAiC,CAAC,EACjD,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,IAAI,EACJ,IAAI,GAAG,SAAS,EAChB,GAAG,SAAS,EACb,KAAI;AACH,IAAA,MAAM,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;;IAEjC,MAAM,OAAO,GAAG,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9C,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;;AAEjB,IAAA,OAAO;AACL,UAAE,aAAa,CAAC,IAAI,EAAE;AAClB,YAAA,SAAS,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC;YACrE,KAAK;AACL,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,GAAG,SAAS;SACb;UACD,IAAI;AACV;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
@@ -1,4 +1,4 @@
1
1
  import { IconProps } from './IconProps';
2
- declare type StyleProps = Pick<IconProps, 'color' | 'size'>;
2
+ type StyleProps = Pick<IconProps, 'color' | 'size'>;
3
3
  export declare const useIconStyles: (props: StyleProps) => import("@material-ui/styles").ClassNameMap<string>;
4
4
  export {};
@@ -1,10 +1,8 @@
1
1
  import { makeStyles } from '@material-ui/core';
2
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 = {
3
+ const useIconStyles = makeStyles(({ spacing, palette }) => {
4
+ const getFontSize = ({ size }) => {
5
+ const sizes = {
8
6
  inherit: 'inherit',
9
7
  small: spacing(1.5),
10
8
  medium: spacing(2),
@@ -15,12 +13,12 @@ var useIconStyles = makeStyles(function (_a) {
15
13
  return 'inherit';
16
14
  return sizes[size];
17
15
  };
18
- var getColor = function (props) {
19
- var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
20
- var value = 'inherit';
16
+ const getColor = (props) => {
17
+ const semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
18
+ let value = 'inherit';
21
19
  if (props.color) {
22
20
  if (semanticColors.includes(props.color.split('.')[0])) {
23
- var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
21
+ const [color, variant = 'main'] = props.color.split('.');
24
22
  // @ts-expect-error - todo.
25
23
  value = palette[color][variant];
26
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IconStyles.js","sources":["../../../../src/components/Icon/IconStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport { IconProps } from './IconProps'\n\ntype StyleProps = Pick<IconProps, 'color' | 'size'>\n\nexport const useIconStyles = makeStyles<Theme, StyleProps>(({ spacing, palette }) => {\n const getFontSize = ({ size }: StyleProps) => {\n const sizes = {\n inherit: 'inherit',\n small: spacing(1.5),\n medium: spacing(2),\n large: spacing(2.5),\n 'extra-large': spacing(3),\n }\n if (!size || !sizes[size]) return 'inherit'\n return sizes[size]\n }\n\n const getColor = (props: StyleProps) => {\n const semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error']\n let value = 'inherit'\n if (props.color) {\n if (semanticColors.includes(props.color.split('.')[0])) {\n const [color, variant = 'main'] = props.color.split('.')\n // @ts-expect-error - todo.\n value = palette[color][variant]\n } else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {\n value = props.color\n }\n }\n return value\n }\n\n return {\n root: {\n color: getColor,\n fontSize: getFontSize,\n width: '1em',\n height: '1em',\n strokeWidth: '1.3px',\n },\n }\n})\n"],"names":[],"mappings":";;AAKa,IAAA,aAAa,GAAG,UAAU,CAAoB,UAAC,EAAoB,EAAA;QAAlB,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA;IAC5E,IAAM,WAAW,GAAG,UAAC,EAAoB,EAAA;AAAlB,QAAA,IAAA,IAAI,GAAA,EAAA,CAAA,IAAA;AACzB,QAAA,IAAM,KAAK,GAAG;AACZ,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC;AACnB,YAAA,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAClB,YAAA,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC;AACnB,YAAA,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;SAC1B;AACD,QAAA,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,SAAS;AAC3C,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,KAAC;IAED,IAAM,QAAQ,GAAG,UAAC,KAAiB,EAAA;AACjC,QAAA,IAAM,cAAc,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;QACtF,IAAI,KAAK,GAAG,SAAS;QACrB,IAAI,KAAK,CAAC,KAAK,EAAE;AACf,YAAA,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;AAChD,gBAAA,IAAA,KAA4B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAjD,KAAK,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,EAAgB,GAAA,EAAA,CAAA,CAAA,CAAA,EAAhB,OAAO,GAAG,EAAA,KAAA,MAAA,GAAA,MAAM,KAA0B;;gBAExD,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAChC;iBAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE;AACrD,gBAAA,KAAK,GAAG,KAAK,CAAC,KAAK;AACpB;AACF;AACD,QAAA,OAAO,KAAK;AACd,KAAC;IAED,OAAO;AACL,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,QAAQ,EAAE,WAAW;AACrB,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,WAAW,EAAE,OAAO;AACrB,SAAA;KACF;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"IconStyles.js","sources":["../../../../src/components/Icon/IconStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport { IconProps } from './IconProps'\n\ntype StyleProps = Pick<IconProps, 'color' | 'size'>\n\nexport const useIconStyles = makeStyles<Theme, StyleProps>(({ spacing, palette }) => {\n const getFontSize = ({ size }: StyleProps) => {\n const sizes = {\n inherit: 'inherit',\n small: spacing(1.5),\n medium: spacing(2),\n large: spacing(2.5),\n 'extra-large': spacing(3),\n }\n if (!size || !sizes[size]) return 'inherit'\n return sizes[size]\n }\n\n const getColor = (props: StyleProps) => {\n const semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error']\n let value = 'inherit'\n if (props.color) {\n if (semanticColors.includes(props.color.split('.')[0])) {\n const [color, variant = 'main'] = props.color.split('.')\n // @ts-expect-error - todo.\n value = palette[color][variant]\n } else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {\n value = props.color\n }\n }\n return value\n }\n\n return {\n root: {\n color: getColor,\n fontSize: getFontSize,\n width: '1em',\n height: '1em',\n strokeWidth: '1.3px',\n },\n }\n})\n"],"names":[],"mappings":";;AAKO,MAAM,aAAa,GAAG,UAAU,CAAoB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAI;AAClF,IAAA,MAAM,WAAW,GAAG,CAAC,EAAE,IAAI,EAAc,KAAI;AAC3C,QAAA,MAAM,KAAK,GAAG;AACZ,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC;AACnB,YAAA,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAClB,YAAA,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC;AACnB,YAAA,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;SAC1B;AACD,QAAA,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,SAAS;AAC3C,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,KAAC;AAED,IAAA,MAAM,QAAQ,GAAG,CAAC,KAAiB,KAAI;AACrC,QAAA,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;QACtF,IAAI,KAAK,GAAG,SAAS;AACrB,QAAA,IAAI,KAAK,CAAC,KAAK,EAAE;AACf,YAAA,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;AACtD,gBAAA,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;gBAExD,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;;AAC1B,iBAAA,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE;AACrD,gBAAA,KAAK,GAAG,KAAK,CAAC,KAAK;;;AAGvB,QAAA,OAAO,KAAK;AACd,KAAC;IAED,OAAO;AACL,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,QAAQ,EAAE,WAAW;AACrB,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,WAAW,EAAE,OAAO;AACrB,SAAA;KACF;AACH,CAAC;;;;"}
@@ -1,9 +1,8 @@
1
- import { __assign } from 'tslib';
2
1
  import { IconButton as IconButton$1 } from '@material-ui/core';
3
2
  import React, { forwardRef } from 'react';
4
3
 
5
- var IconButton = forwardRef(function (props, ref) {
6
- return React.createElement(IconButton$1, __assign({ ref: ref }, props));
4
+ const IconButton = forwardRef((props, ref) => {
5
+ return React.createElement(IconButton$1, { ref: ref, ...props });
7
6
  });
8
7
  IconButton.displayName = 'IconButton';
9
8
  IconButton.defaultProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { IconButton as MuiIconButton } from '@material-ui/core'\nimport React, { forwardRef } from 'react'\nimport { IconButtonProps } from './IconButtonProps'\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>((props, ref) => {\n return <MuiIconButton ref={ref} {...props} />\n})\n\nIconButton.displayName = 'IconButton'\n\nIconButton.defaultProps = {\n color: 'secondary',\n}\n"],"names":["MuiIconButton"],"mappings":";;;;IAIa,UAAU,GAAG,UAAU,CAAqC,UAAC,KAAK,EAAE,GAAG,EAAA;IAClF,OAAO,KAAA,CAAA,aAAA,CAACA,YAAa,EAAC,QAAA,CAAA,EAAA,GAAG,EAAE,GAAG,EAAA,EAAM,KAAK,CAAA,CAAI;AAC/C,CAAC;AAED,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC,UAAU,CAAC,YAAY,GAAG;AACxB,IAAA,KAAK,EAAE,WAAW;CACnB;;;;"}
1
+ {"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { IconButton as MuiIconButton } from '@material-ui/core'\nimport React, { forwardRef } from 'react'\nimport { IconButtonProps } from './IconButtonProps'\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>((props, ref) => {\n return <MuiIconButton ref={ref} {...props} />\n})\n\nIconButton.displayName = 'IconButton'\n\nIconButton.defaultProps = {\n color: 'secondary',\n}\n"],"names":["MuiIconButton"],"mappings":";;;AAIa,MAAA,UAAU,GAAG,UAAU,CAAqC,CAAC,KAAK,EAAE,GAAG,KAAI;IACtF,OAAO,KAAA,CAAA,aAAA,CAACA,YAAa,EAAC,EAAA,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,CAAI;AAC/C,CAAC;AAED,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC,UAAU,CAAC,YAAY,GAAG;AACxB,IAAA,KAAK,EAAE,WAAW;CACnB;;;;"}
@@ -1,2 +1,2 @@
1
1
  import { IconButtonProps as MuiIconButtonProps } from '@material-ui/core';
2
- export declare type IconButtonProps = MuiIconButtonProps;
2
+ export type IconButtonProps = MuiIconButtonProps;
@@ -1,13 +1,12 @@
1
- import { __rest, __assign } from 'tslib';
2
1
  import React, { forwardRef } from 'react';
3
2
  import { Link as Link$1 } from '@material-ui/core';
4
3
  import { useLinkStyles } from './LinkStyles.js';
5
4
 
6
5
  // eslint-disable-next-line react/display-name -- false positive
7
- var Link = forwardRef(function (props, ref) {
8
- var children = props.children, muiProps = __rest(props, ["children"]);
9
- var classes = useLinkStyles(props);
10
- return (React.createElement(Link$1, __assign({ ref: ref, classes: { root: classes.root } }, muiProps), children));
6
+ const Link = forwardRef((props, ref) => {
7
+ const { children, ...muiProps } = props;
8
+ const classes = useLinkStyles(props);
9
+ return (React.createElement(Link$1, { ref: ref, classes: { root: classes.root }, ...muiProps }, children));
11
10
  });
12
11
  Link.defaultProps = {
13
12
  variant: 'body1',
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":["../../../../src/components/Link/Link.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { Link as MuiLink, LinkProps } from '@material-ui/core'\n\nimport { useLinkStyles } from './LinkStyles'\n\ninterface LinkType {\n <C extends React.ElementType = 'a'>(props: LinkProps<C> & { component?: C }): React.ReactElement\n defaultProps?: Partial<LinkProps>\n displayName?: string\n}\n\n// eslint-disable-next-line react/display-name -- false positive\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const { children, ...muiProps } = props\n const classes = useLinkStyles(props)\n\n return (\n <MuiLink ref={ref} classes={{ root: classes.root }} {...muiProps}>\n {children}\n </MuiLink>\n )\n}) as LinkType\n\nLink.defaultProps = {\n variant: 'body1',\n}\n\nLink.displayName = 'Link'\n"],"names":["MuiLink"],"mappings":";;;;;AAWA;IACa,IAAI,GAAG,UAAU,CAA+B,UAAC,KAAK,EAAE,GAAG,EAAA;IAC9D,IAAA,QAAQ,GAAkB,KAAK,CAAvB,QAAA,EAAK,QAAQ,GAAA,MAAA,CAAK,KAAK,EAAjC,CAAyB,UAAA,CAAA,CAAF;AAC7B,IAAA,IAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC;IAEpC,QACE,oBAACA,MAAO,EAAA,QAAA,CAAA,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAA,EAAM,QAAQ,CAC7D,EAAA,QAAQ,CACD;AAEd,CAAC;AAED,IAAI,CAAC,YAAY,GAAG;AAClB,IAAA,OAAO,EAAE,OAAO;CACjB;AAED,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"Link.js","sources":["../../../../src/components/Link/Link.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { Link as MuiLink, LinkProps } from '@material-ui/core'\n\nimport { useLinkStyles } from './LinkStyles'\n\ninterface LinkType {\n <C extends React.ElementType = 'a'>(props: LinkProps<C> & { component?: C }): React.ReactElement\n defaultProps?: Partial<LinkProps>\n displayName?: string\n}\n\n// eslint-disable-next-line react/display-name -- false positive\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const { children, ...muiProps } = props\n const classes = useLinkStyles(props)\n\n return (\n <MuiLink ref={ref} classes={{ root: classes.root }} {...muiProps}>\n {children}\n </MuiLink>\n )\n}) as LinkType\n\nLink.defaultProps = {\n variant: 'body1',\n}\n\nLink.displayName = 'Link'\n"],"names":["MuiLink"],"mappings":";;;;AAWA;AACa,MAAA,IAAI,GAAG,UAAU,CAA+B,CAAC,KAAK,EAAE,GAAG,KAAI;IAC1E,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK;AACvC,IAAA,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC;IAEpC,QACE,oBAACA,MAAO,EAAA,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAA,GAAM,QAAQ,EAC7D,EAAA,QAAQ,CACD;AAEd,CAAC;AAED,IAAI,CAAC,YAAY,GAAG;AAClB,IAAA,OAAO,EAAE,OAAO;CACjB;AAED,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
@@ -1,2 +1,2 @@
1
1
  import { LinkProps } from '@material-ui/core';
2
- export declare const useLinkStyles: (props: LinkProps<"a", {}>) => import("@material-ui/styles").ClassNameMap<string>;
2
+ export declare const useLinkStyles: (props: LinkProps) => import("@material-ui/styles").ClassNameMap<string>;
@@ -1,15 +1,15 @@
1
- import { __assign } from 'tslib';
2
1
  import { makeStyles } from '@material-ui/core';
3
2
  import { iconStaticClassName } from '../Icon/Icon.js';
4
3
 
5
- var useLinkStyles = makeStyles(function (theme) { return ({
6
- root: function (props) {
7
- var _a;
8
- return (__assign(__assign({ display: 'flex' }, (props.color === undefined && { color: theme.palette.info.main })), (_a = {}, _a["& ." + iconStaticClassName] = {
4
+ const useLinkStyles = makeStyles((theme) => ({
5
+ root: (props) => ({
6
+ display: 'flex',
7
+ ...(props.color === undefined && { color: theme.palette.info.main }),
8
+ [`& .${iconStaticClassName}`]: {
9
9
  alignSelf: 'center',
10
- }, _a)));
11
- },
12
- }); });
10
+ },
11
+ }),
12
+ }));
13
13
 
14
14
  export { useLinkStyles };
15
15
  //# sourceMappingURL=LinkStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkStyles.js","sources":["../../../../src/components/Link/LinkStyles.ts"],"sourcesContent":["import { LinkProps, makeStyles, Theme } from '@material-ui/core'\nimport { iconStaticClassName } from '../Icon'\n\nexport const useLinkStyles = makeStyles<Theme, LinkProps>((theme) => ({\n root: (props) => ({\n display: 'flex',\n ...(props.color === undefined && { color: theme.palette.info.main }),\n [`& .${iconStaticClassName}`]: {\n alignSelf: 'center',\n },\n }),\n}))\n"],"names":[],"mappings":";;;;AAGa,IAAA,aAAa,GAAG,UAAU,CAAmB,UAAC,KAAK,EAAK,EAAA,QAAC;IACpE,IAAI,EAAE,UAAC,KAAK,EAAA;;QAAK,QAAA,QAAA,CAAA,QAAA,CAAA,EACf,OAAO,EAAE,MAAM,EAAA,GACX,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAC,GAAA,EAAA,GAAA,EAAA,EAAA,EAAA,CACnE,KAAM,GAAA,mBAAqB,CAAG,GAAA;AAC7B,YAAA,SAAS,EAAE,QAAQ;SACpB,EACD,EAAA,EAAA;KAAA;CACH,EAAC,EAAA;;;;"}
1
+ {"version":3,"file":"LinkStyles.js","sources":["../../../../src/components/Link/LinkStyles.ts"],"sourcesContent":["import { LinkProps, makeStyles, Theme } from '@material-ui/core'\nimport { iconStaticClassName } from '../Icon'\n\nexport const useLinkStyles = makeStyles<Theme, LinkProps>((theme) => ({\n root: (props) => ({\n display: 'flex',\n ...(props.color === undefined && { color: theme.palette.info.main }),\n [`& .${iconStaticClassName}`]: {\n alignSelf: 'center',\n },\n }),\n}))\n"],"names":[],"mappings":";;;AAGa,MAAA,aAAa,GAAG,UAAU,CAAmB,CAAC,KAAK,MAAM;AACpE,IAAA,IAAI,EAAE,CAAC,KAAK,MAAM;AAChB,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AACpE,QAAA,CAAC,CAAM,GAAA,EAAA,mBAAmB,CAAE,CAAA,GAAG;AAC7B,YAAA,SAAS,EAAE,QAAQ;AACpB,SAAA;KACF,CAAC;AACH,CAAA,CAAC;;;;"}
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { NumberFieldProps } from './NumberFieldProps';
3
2
  export declare const NumberField: (props: NumberFieldProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- import { __rest, __assign } from 'tslib';
2
1
  import { TextField } from '@material-ui/core';
3
2
  import { MinusCircle, PlusCircle } from '@popmenu/web-icons';
4
3
  import React from 'react';
@@ -6,14 +5,20 @@ import { Icon } from '../Icon/Icon.js';
6
5
  import { IconButton } from '../IconButton/IconButton.js';
7
6
  import { useNumberFieldStyles, useNumberInputStyles } from './NumberFieldStyles.js';
8
7
 
9
- var NumberField = function (props) {
10
- var onIncrement = props.onIncrement, onDecrement = props.onDecrement, _a = props.endAdornmentButtonProps, endAdornmentButtonProps = _a === void 0 ? {} : _a, _b = props.startAdornmentButtonProps, startAdornmentButtonProps = _b === void 0 ? {} : _b, _c = props.InputProps, InputProps = _c === void 0 ? {} : _c, classes = props.classes, restProps = __rest(props, ["onIncrement", "onDecrement", "endAdornmentButtonProps", "startAdornmentButtonProps", "InputProps", "classes"]);
11
- var _d = InputProps, inputClassesOverride = _d.classes, restInputProps = __rest(_d, ["classes"]);
12
- var fieldClasses = useNumberFieldStyles(props);
13
- var inputClasses = useNumberInputStyles(props);
14
- return (React.createElement(TextField, __assign({ classes: __assign(__assign({}, fieldClasses), classes), variant: "filled", type: "number", defaultValue: 0, InputProps: __assign({ classes: __assign(__assign({}, inputClasses), inputClassesOverride), disableUnderline: true, endAdornment: (React.createElement(IconButton, __assign({ style: { fontSize: 20 }, onClick: onIncrement }, endAdornmentButtonProps),
15
- React.createElement(Icon, { icon: PlusCircle }))), startAdornment: (React.createElement(IconButton, __assign({ style: { fontSize: 20 }, onClick: onDecrement }, startAdornmentButtonProps),
16
- React.createElement(Icon, { icon: MinusCircle }))) }, restInputProps) }, restProps)));
8
+ const NumberField = (props) => {
9
+ const { onIncrement, onDecrement, endAdornmentButtonProps = {}, startAdornmentButtonProps = {}, InputProps = {}, classes, ...restProps } = props;
10
+ const { classes: inputClassesOverride, ...restInputProps } = InputProps;
11
+ const fieldClasses = useNumberFieldStyles(props);
12
+ const inputClasses = useNumberInputStyles(props);
13
+ return (React.createElement(TextField, { classes: { ...fieldClasses, ...classes }, variant: "filled", type: "number", defaultValue: 0, InputProps: {
14
+ classes: { ...inputClasses, ...inputClassesOverride },
15
+ disableUnderline: true,
16
+ endAdornment: (React.createElement(IconButton, { style: { fontSize: 20 }, onClick: onIncrement, ...endAdornmentButtonProps },
17
+ React.createElement(Icon, { icon: PlusCircle }))),
18
+ startAdornment: (React.createElement(IconButton, { style: { fontSize: 20 }, onClick: onDecrement, ...startAdornmentButtonProps },
19
+ React.createElement(Icon, { icon: MinusCircle }))),
20
+ ...restInputProps,
21
+ }, ...restProps }));
17
22
  };
18
23
 
19
24
  export { NumberField };
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.js","sources":["../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import { InputProps as MuiInputProps, TextField } from '@material-ui/core'\nimport { MinusCircle, PlusCircle } from '@popmenu/web-icons'\nimport React from 'react'\n\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { NumberFieldProps } from './NumberFieldProps'\nimport { useNumberFieldStyles, useNumberInputStyles } from './NumberFieldStyles'\n\nexport const NumberField = (props: NumberFieldProps): JSX.Element => {\n const {\n onIncrement,\n onDecrement,\n endAdornmentButtonProps = {},\n startAdornmentButtonProps = {},\n InputProps = {},\n classes,\n ...restProps\n } = props\n const { classes: inputClassesOverride, ...restInputProps } = InputProps as MuiInputProps\n const fieldClasses = useNumberFieldStyles(props)\n const inputClasses = useNumberInputStyles(props)\n\n return (\n <TextField\n classes={{ ...fieldClasses, ...classes }}\n variant=\"filled\"\n type=\"number\"\n defaultValue={0}\n InputProps={{\n classes: { ...inputClasses, ...inputClassesOverride },\n disableUnderline: true,\n endAdornment: (\n <IconButton style={{ fontSize: 20 }} onClick={onIncrement} {...endAdornmentButtonProps}>\n <Icon icon={PlusCircle} />\n </IconButton>\n ),\n startAdornment: (\n <IconButton style={{ fontSize: 20 }} onClick={onDecrement} {...startAdornmentButtonProps}>\n <Icon icon={MinusCircle} />\n </IconButton>\n ),\n ...restInputProps,\n }}\n {...restProps}\n />\n )\n}\n"],"names":[],"mappings":";;;;;;;;AASO,IAAM,WAAW,GAAG,UAAC,KAAuB,EAAA;IAE/C,IAAA,WAAW,GAOT,KAAK,CAAA,WAPI,EACX,WAAW,GAMT,KAAK,CAAA,WANI,EACX,EAAA,GAKE,KAAK,CALqB,uBAAA,EAA5B,uBAAuB,GAAG,EAAA,KAAA,MAAA,GAAA,E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K,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,WAAW,EAAA,EAAM,yBAAyB,CAAA;AACtF,gBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,WAAW,EAAI,CAAA,CAChB,CACd,EAAA,EACE,cAAc,CAAA,EAAA,EAEf,SAAS,CAAA,CACb;AAEN;;;;"}
1
+ {"version":3,"file":"NumberField.js","sources":["../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import { InputProps as MuiInputProps, TextField } from '@material-ui/core'\nimport { MinusCircle, PlusCircle } from '@popmenu/web-icons'\nimport React from 'react'\n\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { NumberFieldProps } from './NumberFieldProps'\nimport { useNumberFieldStyles, useNumberInputStyles } from './NumberFieldStyles'\n\nexport const NumberField = (props: NumberFieldProps): JSX.Element => {\n const {\n onIncrement,\n onDecrement,\n endAdornmentButtonProps = {},\n startAdornmentButtonProps = {},\n InputProps = {},\n classes,\n ...restProps\n } = props\n const { classes: inputClassesOverride, ...restInputProps } = InputProps as MuiInputProps\n const fieldClasses = useNumberFieldStyles(props)\n const inputClasses = useNumberInputStyles(props)\n\n return (\n <TextField\n classes={{ ...fieldClasses, ...classes }}\n variant=\"filled\"\n type=\"number\"\n defaultValue={0}\n InputProps={{\n classes: { ...inputClasses, ...inputClassesOverride },\n disableUnderline: true,\n endAdornment: (\n <IconButton style={{ fontSize: 20 }} onClick={onIncrement} {...endAdornmentButtonProps}>\n <Icon icon={PlusCircle} />\n </IconButton>\n ),\n startAdornment: (\n <IconButton style={{ fontSize: 20 }} onClick={onDecrement} {...startAdornmentButtonProps}>\n <Icon icon={MinusCircle} />\n </IconButton>\n ),\n ...restInputProps,\n }}\n {...restProps}\n />\n )\n}\n"],"names":[],"mappings":";;;;;;;AASa,MAAA,WAAW,GAAG,CAAC,KAAuB,KAAiB;IAClE,MAAM,EACJ,WAAW,EACX,WAAW,EACX,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les").ClassNameMap<"root">;
2
- export declare const useNumberInputStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"input" | "root" | "adornedEnd" | "adornedStart">;
2
+ export declare const useNumberInputStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root" | "input" | "adornedEnd" | "adornedStart">;
@@ -1,11 +1,11 @@
1
1
  import { makeStyles } from '@material-ui/core';
2
2
 
3
- var useNumberFieldStyles = makeStyles(function () { return ({
3
+ const useNumberFieldStyles = makeStyles(() => ({
4
4
  root: {
5
5
  height: 56,
6
6
  },
7
- }); });
8
- var useNumberInputStyles = makeStyles(function (theme) { return ({
7
+ }));
8
+ const useNumberInputStyles = makeStyles((theme) => ({
9
9
  root: {
10
10
  height: '100%',
11
11
  width: 'min-content',
@@ -26,7 +26,7 @@ var useNumberInputStyles = makeStyles(function (theme) { return ({
26
26
  adornedEnd: {
27
27
  padding: 0,
28
28
  },
29
- }); });
29
+ }));
30
30
 
31
31
  export { useNumberFieldStyles, useNumberInputStyles };
32
32
  //# sourceMappingURL=NumberFieldStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberFieldStyles.js","sources":["../../../../src/components/NumberField/NumberFieldStyles.ts"],"sourcesContent":["import { makeStyles } from '@material-ui/core'\n\nexport const useNumberFieldStyles = makeStyles(() => ({\n root: {\n height: 56,\n },\n}))\n\nexport const useNumberInputStyles = makeStyles((theme) => ({\n root: {\n height: '100%',\n width: 'min-content',\n borderRadius: theme.spacing(1),\n },\n input: {\n '&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {\n display: 'none',\n },\n '-moz-appearance': 'textfield',\n minWidth: 40,\n padding: 0,\n textAlign: 'center',\n },\n adornedStart: {\n padding: 0,\n },\n adornedEnd: {\n padding: 0,\n },\n}))\n"],"names":[],"mappings":";;IAEa,oBAAoB,GAAG,UAAU,CAAC,YAAA,EAAM,QAAC;AACpD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,EAAE;AACX,KAAA;CACF,EAAC,EAAA;AAEW,IAAA,oBAAoB,GAAG,UAAU,CAAC,UAAC,KAAK,EAAK,EAAA,QAAC;AACzD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/B,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,qFAAqF,EAAE;AACrF,YAAA,OAAO,EAAE,MAAM;AAChB,SAAA;AACD,QAAA,iBAAiB,EAAE,WAAW;AAC9B,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,SAAS,EAAE,QAAQ;AACpB,KAAA;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;CACF,EAAC,EAAA;;;;"}
1
+ {"version":3,"file":"NumberFieldStyles.js","sources":["../../../../src/components/NumberField/NumberFieldStyles.ts"],"sourcesContent":["import { makeStyles } from '@material-ui/core'\n\nexport const useNumberFieldStyles = makeStyles(() => ({\n root: {\n height: 56,\n },\n}))\n\nexport const useNumberInputStyles = makeStyles((theme) => ({\n root: {\n height: '100%',\n width: 'min-content',\n borderRadius: theme.spacing(1),\n },\n input: {\n '&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {\n display: 'none',\n },\n '-moz-appearance': 'textfield',\n minWidth: 40,\n padding: 0,\n textAlign: 'center',\n },\n adornedStart: {\n padding: 0,\n },\n adornedEnd: {\n padding: 0,\n },\n}))\n"],"names":[],"mappings":";;MAEa,oBAAoB,GAAG,UAAU,CAAC,OAAO;AACpD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,EAAE;AACX,KAAA;AACF,CAAA,CAAC;AAEW,MAAA,oBAAoB,GAAG,UAAU,CAAC,CAAC,KAAK,MAAM;AACzD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/B,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,qFAAqF,EAAE;AACrF,YAAA,OAAO,EAAE,MAAM;AAChB,SAAA;AACD,QAAA,iBAAiB,EAAE,WAAW;AAC9B,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,SAAS,EAAE,QAAQ;AACpB,KAAA;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AACF,CAAA,CAAC;;;;"}