auth0-lock 11.34.1 → 12.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/.browserslistrc +1 -0
  2. package/.circleci/config.yml +4 -2
  3. package/.eslintrc.json +5 -5
  4. package/.github/workflows/codeql.yml +41 -0
  5. package/.shiprc +4 -5
  6. package/CHANGELOG.md +32 -0
  7. package/EXAMPLES.md +626 -0
  8. package/README.md +77 -649
  9. package/karma.conf.js +1 -1
  10. package/lib/CSSCore.js +1 -4
  11. package/lib/__tests__/auth_button.js +12 -22
  12. package/lib/__tests__/connection/database/actions.js +48 -49
  13. package/lib/__tests__/connection/database/index.js +22 -28
  14. package/lib/__tests__/connection/database/login_pane.js +20 -41
  15. package/lib/__tests__/connection/database/password_reset_confirmation.js +19 -26
  16. package/lib/__tests__/connection/database/reset_password.js +17 -39
  17. package/lib/__tests__/connection/database/signed_up_confirmation.js +19 -26
  18. package/lib/__tests__/connection/enterprise/actions.js +22 -47
  19. package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
  20. package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
  21. package/lib/__tests__/connection/enterprise/quick_auth_screen.js +27 -68
  22. package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
  23. package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +19 -26
  24. package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
  25. package/lib/__tests__/core/actions.js +23 -46
  26. package/lib/__tests__/core/client/index.js +10 -13
  27. package/lib/__tests__/core/index.js +46 -94
  28. package/lib/__tests__/core/remote_data.js +14 -20
  29. package/lib/__tests__/core/signed_in_confirmation.js +19 -26
  30. package/lib/__tests__/core/sso/last_login_screen.js +27 -50
  31. package/lib/__tests__/core/tenant.js +10 -12
  32. package/lib/__tests__/core/web_api/helper.js +6 -14
  33. package/lib/__tests__/core/web_api/p2_api.js +38 -33
  34. package/lib/__tests__/core/web_api.js +37 -33
  35. package/lib/__tests__/engine/classic/login.js +20 -41
  36. package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
  37. package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
  38. package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
  39. package/lib/__tests__/engine/classic.js +13 -6
  40. package/lib/__tests__/engine/passwordless.js +2 -5
  41. package/lib/__tests__/field/captcha/recaptcha_enterprise.js +27 -27
  42. package/lib/__tests__/field/captcha/recaptchav2.js +27 -27
  43. package/lib/__tests__/field/captcha.js +39 -51
  44. package/lib/__tests__/field/custom_input.js +23 -47
  45. package/lib/__tests__/field/email.js +2 -3
  46. package/lib/__tests__/field/email_pane.js +25 -48
  47. package/lib/__tests__/field/field.js +9 -13
  48. package/lib/__tests__/field/login_pane.js +30 -34
  49. package/lib/__tests__/field/mfa_code_pane.js +13 -28
  50. package/lib/__tests__/field/option_selection_pane.js +7 -25
  51. package/lib/__tests__/field/password.js +6 -12
  52. package/lib/__tests__/field/password_pane.js +29 -46
  53. package/lib/__tests__/field/phone_number_pane.js +18 -41
  54. package/lib/__tests__/field/social_buttons_pane.js +30 -47
  55. package/lib/__tests__/field/username.js +27 -48
  56. package/lib/__tests__/field/username_pane.js +30 -47
  57. package/lib/__tests__/field/vcode.js +5 -13
  58. package/lib/__tests__/field/vcode_pane.js +20 -44
  59. package/lib/__tests__/i18n.js +28 -53
  60. package/lib/__tests__/quick-auth/actions.js +4 -27
  61. package/lib/__tests__/setup-tests.js +7 -9
  62. package/lib/__tests__/testUtils.js +41 -58
  63. package/lib/__tests__/ui/box/chrome.js +24 -49
  64. package/lib/__tests__/ui/box/confirmation_pane.js +19 -36
  65. package/lib/__tests__/ui/box/container.js +21 -46
  66. package/lib/__tests__/ui/box/global_message.js +60 -37
  67. package/lib/__tests__/ui/input/email_input.js +6 -17
  68. package/lib/__tests__/ui/input/input_wrap.js +6 -19
  69. package/lib/__tests__/ui/input/password/password_strength.js +13 -15
  70. package/lib/__tests__/ui/input/password_input.js +22 -27
  71. package/lib/__tests__/utils/format.js +10 -17
  72. package/lib/__tests__/utils/url_utils.js +2 -5
  73. package/lib/avatar/gravatar_provider.js +13 -28
  74. package/lib/avatar.js +22 -41
  75. package/lib/browser.js +372 -23
  76. package/lib/connection/captcha.js +14 -32
  77. package/lib/connection/database/actions.js +39 -108
  78. package/lib/connection/database/index.js +90 -191
  79. package/lib/connection/database/login_pane.js +107 -147
  80. package/lib/connection/database/login_sign_up_tabs.js +106 -125
  81. package/lib/connection/database/mfa_pane.js +50 -69
  82. package/lib/connection/database/password_reset_confirmation.js +51 -73
  83. package/lib/connection/database/reset_password.js +116 -132
  84. package/lib/connection/database/reset_password_pane.js +45 -56
  85. package/lib/connection/database/sign_up_terms.js +17 -23
  86. package/lib/connection/database/signed_up_confirmation.js +52 -75
  87. package/lib/connection/enterprise/actions.js +23 -52
  88. package/lib/connection/enterprise/hrd_pane.js +60 -76
  89. package/lib/connection/enterprise/hrd_screen.js +60 -75
  90. package/lib/connection/enterprise/kerberos_screen.js +46 -60
  91. package/lib/connection/enterprise/quick_auth_screen.js +46 -64
  92. package/lib/connection/enterprise/single_sign_on_notice.js +14 -26
  93. package/lib/connection/enterprise.js +51 -84
  94. package/lib/connection/passwordless/actions.js +29 -62
  95. package/lib/connection/passwordless/ask_vcode.js +53 -60
  96. package/lib/connection/passwordless/email_sent_confirmation.js +129 -179
  97. package/lib/connection/passwordless/index.js +36 -68
  98. package/lib/connection/social/index.js +12 -15
  99. package/lib/core/actions.js +33 -85
  100. package/lib/core/client/index.js +38 -58
  101. package/lib/core/client/settings.js +12 -20
  102. package/lib/core/error_screen.js +38 -52
  103. package/lib/core/index.js +152 -301
  104. package/lib/core/loading_screen.js +61 -71
  105. package/lib/core/pane_separator.js +10 -10
  106. package/lib/core/remote_data.js +28 -48
  107. package/lib/core/screen.js +85 -79
  108. package/lib/core/signed_in_confirmation.js +51 -73
  109. package/lib/core/sso/data.js +9 -17
  110. package/lib/core/sso/index.js +5 -6
  111. package/lib/core/sso/last_login_screen.js +46 -63
  112. package/lib/core/tenant/index.js +37 -59
  113. package/lib/core/tenant/settings.js +11 -15
  114. package/lib/core/web_api/helper.js +24 -30
  115. package/lib/core/web_api/p2_api.js +156 -165
  116. package/lib/core/web_api.js +101 -90
  117. package/lib/core.js +126 -160
  118. package/lib/engine/classic/login.js +92 -144
  119. package/lib/engine/classic/mfa_login_screen.js +61 -67
  120. package/lib/engine/classic/sign_up_pane.js +89 -123
  121. package/lib/engine/classic/sign_up_screen.js +112 -158
  122. package/lib/engine/classic.js +122 -183
  123. package/lib/engine/passwordless/social_or_email_login_screen.js +71 -106
  124. package/lib/engine/passwordless/social_or_phone_number_login_screen.js +70 -100
  125. package/lib/engine/passwordless.js +75 -104
  126. package/lib/field/actions.js +11 -17
  127. package/lib/field/captcha/captcha_pane.js +82 -102
  128. package/lib/field/captcha/recaptcha.js +140 -145
  129. package/lib/field/captcha.js +7 -10
  130. package/lib/field/custom_input.js +37 -50
  131. package/lib/field/email/email_pane.js +90 -109
  132. package/lib/field/email.js +17 -35
  133. package/lib/field/index.js +51 -88
  134. package/lib/field/mfa-code/mfa_code_pane.js +57 -71
  135. package/lib/field/mfa_code.js +15 -21
  136. package/lib/field/option_selection_pane.js +16 -22
  137. package/lib/field/password/password_pane.js +79 -91
  138. package/lib/field/password.js +8 -14
  139. package/lib/field/phone-number/locations.js +7 -3
  140. package/lib/field/phone-number/phone_number_pane.js +87 -124
  141. package/lib/field/phone_number.js +16 -30
  142. package/lib/field/social/event.js +9 -12
  143. package/lib/field/social/social_buttons_pane.js +93 -121
  144. package/lib/field/username/username_pane.js +105 -123
  145. package/lib/field/username.js +16 -26
  146. package/lib/field/vcode/vcode_pane.js +67 -93
  147. package/lib/field/vcode.js +5 -5
  148. package/lib/i18n/af.js +7 -4
  149. package/lib/i18n/ar.js +7 -4
  150. package/lib/i18n/az.js +7 -4
  151. package/lib/i18n/bg.js +7 -4
  152. package/lib/i18n/ca.js +7 -4
  153. package/lib/i18n/cs.js +7 -4
  154. package/lib/i18n/da.js +7 -4
  155. package/lib/i18n/de.js +7 -3
  156. package/lib/i18n/el.js +7 -4
  157. package/lib/i18n/en.js +9 -4
  158. package/lib/i18n/es.js +7 -3
  159. package/lib/i18n/et.js +7 -4
  160. package/lib/i18n/fa.js +7 -4
  161. package/lib/i18n/fi.js +7 -4
  162. package/lib/i18n/fr.js +7 -4
  163. package/lib/i18n/he.js +7 -4
  164. package/lib/i18n/hr.js +7 -4
  165. package/lib/i18n/hu.js +7 -4
  166. package/lib/i18n/id.js +7 -4
  167. package/lib/i18n/it.js +7 -3
  168. package/lib/i18n/ja.js +7 -4
  169. package/lib/i18n/ko.js +7 -4
  170. package/lib/i18n/lt.js +7 -4
  171. package/lib/i18n/lv.js +7 -4
  172. package/lib/i18n/ms.js +7 -4
  173. package/lib/i18n/nb.js +7 -4
  174. package/lib/i18n/nl.js +7 -4
  175. package/lib/i18n/nn.js +7 -4
  176. package/lib/i18n/no.js +7 -4
  177. package/lib/i18n/pl.js +7 -4
  178. package/lib/i18n/pt-br.js +7 -3
  179. package/lib/i18n/pt.js +7 -4
  180. package/lib/i18n/ro.js +7 -4
  181. package/lib/i18n/ru.js +7 -4
  182. package/lib/i18n/sk.js +7 -4
  183. package/lib/i18n/sl.js +7 -4
  184. package/lib/i18n/sr.js +7 -4
  185. package/lib/i18n/sv.js +7 -4
  186. package/lib/i18n/tr.js +7 -4
  187. package/lib/i18n/ua.js +7 -4
  188. package/lib/i18n/uk.js +7 -4
  189. package/lib/i18n/vi.js +7 -4
  190. package/lib/i18n/zh-tw.js +7 -4
  191. package/lib/i18n/zh.js +7 -4
  192. package/lib/i18n.js +38 -75
  193. package/lib/index.js +14 -17
  194. package/lib/lock.js +29 -32
  195. package/lib/passwordless.js +29 -31
  196. package/lib/quick-auth/actions.js +19 -26
  197. package/lib/quick_auth.js +8 -10
  198. package/lib/sanitizer.js +5 -5
  199. package/lib/store/index.js +22 -42
  200. package/lib/sync.js +21 -42
  201. package/lib/ui/box/button.js +85 -105
  202. package/lib/ui/box/chrome.js +463 -548
  203. package/lib/ui/box/confirmation_pane.js +34 -48
  204. package/lib/ui/box/container.js +305 -339
  205. package/lib/ui/box/global_message.js +51 -60
  206. package/lib/ui/box/header.js +155 -177
  207. package/lib/ui/box/multisize_slide.js +233 -229
  208. package/lib/ui/box/success_pane.js +34 -37
  209. package/lib/ui/box.js +88 -93
  210. package/lib/ui/button/auth_button.js +44 -51
  211. package/lib/ui/input/captcha_input.js +162 -181
  212. package/lib/ui/input/checkbox_input.js +57 -59
  213. package/lib/ui/input/email_input.js +117 -124
  214. package/lib/ui/input/input_wrap.js +65 -80
  215. package/lib/ui/input/location_input.js +130 -150
  216. package/lib/ui/input/mfa_code_input.js +98 -98
  217. package/lib/ui/input/password/password_strength.js +103 -127
  218. package/lib/ui/input/password_input.js +141 -147
  219. package/lib/ui/input/phone_number_input.js +101 -109
  220. package/lib/ui/input/select_input.js +120 -132
  221. package/lib/ui/input/text_input.js +89 -84
  222. package/lib/ui/input/username_input.js +109 -115
  223. package/lib/ui/input/vcode_input.js +110 -118
  224. package/lib/ui/list.js +224 -247
  225. package/lib/ui/pane/quick_auth_pane.js +55 -80
  226. package/lib/utils/atom.js +55 -48
  227. package/lib/utils/cache.js +54 -43
  228. package/lib/utils/cdn_utils.js +17 -31
  229. package/lib/utils/createRef.js +3 -1
  230. package/lib/utils/data_utils.js +10 -16
  231. package/lib/utils/fn_utils.js +5 -4
  232. package/lib/utils/format.js +6 -8
  233. package/lib/utils/id_utils.js +4 -3
  234. package/lib/utils/jsonp_utils.js +20 -17
  235. package/lib/utils/media_utils.js +4 -2
  236. package/lib/utils/preload_utils.js +4 -3
  237. package/lib/utils/string_utils.js +4 -4
  238. package/lib/utils/url_utils.js +4 -3
  239. package/opslevel.yml +6 -0
  240. package/package.json +53 -38
  241. package/webpack.config.js +36 -3
@@ -1,170 +1,150 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
- exports.IconSvg = undefined;
5
-
6
- var _react = require('react');
7
-
8
- var _react2 = _interopRequireDefault(_react);
9
-
10
- var _input_wrap = require('./input_wrap');
11
-
12
- var _input_wrap2 = _interopRequireDefault(_input_wrap);
13
-
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.IconSvg = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _input_wrap = _interopRequireDefault(require("./input_wrap"));
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
-
18
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19
-
20
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
21
-
22
- var IconSvg = exports.IconSvg = _react2.default.createElement(
23
- 'svg',
24
- {
25
- 'aria-hidden': 'true',
26
- focusable: 'false',
27
- width: '14px',
28
- height: '14px',
29
- viewBox: '0 0 14 14',
30
- version: '1.1',
31
- xmlns: 'http://www.w3.org/2000/svg',
32
- xmlnsXlink: 'http://www.w3.org/1999/xlink',
33
- className: 'auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-location'
34
- },
35
- _react2.default.createElement(
36
- 'g',
37
- { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },
38
- _react2.default.createElement(
39
- 'g',
40
- { id: 'Lock', transform: 'translate(-201.000000, -3519.000000)', fill: '#919191' },
41
- _react2.default.createElement(
42
- 'g',
43
- { id: 'SMS', transform: 'translate(153.000000, 3207.000000)' },
44
- _react2.default.createElement(
45
- 'g',
46
- { transform: 'translate(35.000000, 299.000000)' },
47
- _react2.default.createElement('path', {
48
- id: 'Fill-349-Copy',
49
- d: 'M22.4023125,22.8 C22.543625,21.9425 22.625,20.9975 22.625,20 L26.125,20 C26.125,21.316875 25.69275,22.52 24.9853125,23.5175 C24.3255625,23.2025 23.4383125,22.953125 22.4023125,22.8 L22.4023125,22.8 Z M21.372875,25.954375 C21.72725,25.3725 22.0234375,24.5675 22.2404375,23.6225 C22.8975625,23.696875 23.483375,23.80625 23.9624375,23.9375 L24.67075,23.9375 C23.829875,24.92625 22.6849375,25.6525 21.372875,25.954375 L21.372875,25.954375 Z M20,26.125 C19.412875,26.125 18.896625,25.105625 18.579,23.5525 C19.034,23.521875 19.503875,23.5 20,23.5 C20.4956875,23.5 20.966,23.521875 21.421,23.5525 C21.1029375,25.105625 20.5866875,26.125 20,26.125 L20,26.125 Z M15.3288125,23.9375 L16.0375625,23.9375 C16.5161875,23.80625 17.1024375,23.696875 17.759125,23.6225 C17.976125,24.5675 18.2723125,25.3725 18.6266875,25.954375 C17.3150625,25.6525 16.170125,24.92625 15.3288125,23.9375 L15.3288125,23.9375 Z M15.0146875,23.5175 C14.3068125,22.52 13.875,21.316875 13.875,20 L17.375,20 C17.375,20.9975 17.4559375,21.9425 17.59725,22.8 C16.56125,22.953125 15.6744375,23.2025 15.0146875,23.5175 L15.0146875,23.5175 Z M15.030875,16.45625 C15.6796875,16.78 16.5634375,17.03375 17.60075,17.195625 C17.501,17.799375 17.428375,18.4425 17.3964375,19.125 L13.951125,19.125 C14.0933125,18.13625 14.477,17.230625 15.030875,16.45625 L15.030875,16.45625 Z M18.6266875,14.04125 C18.27275,14.623125 17.977,15.42375 17.760875,16.373125 C17.1265,16.294375 16.558625,16.189375 16.0944375,16.0625 L15.34325,16.0625 C16.180625,15.069375 17.3168125,14.343125 18.6266875,14.04125 L18.6266875,14.04125 Z M20,13.875 C20.585375,13.875 21.0959375,14.894375 21.4118125,16.443125 C20.959875,16.478125 20.492625,16.5 20,16.5 C19.5069375,16.5 19.0396875,16.478125 18.58775,16.443125 C18.903625,14.894375 19.4141875,13.875 20,13.875 L20,13.875 Z M18.2749375,19.125 C18.3020625,18.473125 18.362,17.865 18.441625,17.29625 C18.9408125,17.344375 19.4596875,17.375 20,17.375 C20.5403125,17.375 21.0591875,17.344375 21.5579375,17.29625 C21.638,17.865 21.6979375,18.473125 21.724625,19.125 L18.2749375,19.125 L18.2749375,19.125 Z M21.75,20 C21.75,20.97125 21.6786875,21.88125 21.5631875,22.699375 C21.06225,22.65125 20.5420625,22.625 20,22.625 C19.4579375,22.625 18.9373125,22.65125 18.436375,22.699375 C18.320875,21.88125 18.25,20.97125 18.25,20 L21.75,20 L21.75,20 Z M24.6563125,16.0625 L23.905125,16.0625 C23.441375,16.189375 22.8730625,16.294375 22.2386875,16.373125 C22.0225625,15.42375 21.7268125,14.623125 21.372875,14.04125 C22.68275,14.343125 23.8189375,15.069375 24.6563125,16.0625 L24.6563125,16.0625 Z M24.9686875,16.45625 C25.5225625,17.230625 25.90625,18.13625 26.048875,19.125 L22.603125,19.125 C22.5711875,18.4425 22.499,17.799375 22.39925,17.195625 C23.4365625,17.03375 24.3203125,16.78 24.9686875,16.45625 L24.9686875,16.45625 Z M20,13 C16.1338125,13 13,16.1325 13,20 C13,23.863125 16.1338125,27 20,27 C23.86575,27 27,23.863125 27,20 C27,16.1325 23.86575,13 20,13 L20,13 Z'
50
- })
51
- )
52
- )
53
- )
54
- )
55
- );
12
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
13
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
17
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
18
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
21
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
22
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
23
+ var IconSvg = /*#__PURE__*/_react.default.createElement("svg", {
24
+ "aria-hidden": "true",
25
+ focusable: "false",
26
+ width: "14px",
27
+ height: "14px",
28
+ viewBox: "0 0 14 14",
29
+ version: "1.1",
30
+ xmlns: "http://www.w3.org/2000/svg",
31
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
32
+ className: "auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-location"
33
+ }, /*#__PURE__*/_react.default.createElement("g", {
34
+ stroke: "none",
35
+ strokeWidth: "1",
36
+ fill: "none",
37
+ fillRule: "evenodd"
38
+ }, /*#__PURE__*/_react.default.createElement("g", {
39
+ id: "Lock",
40
+ transform: "translate(-201.000000, -3519.000000)",
41
+ fill: "#919191"
42
+ }, /*#__PURE__*/_react.default.createElement("g", {
43
+ id: "SMS",
44
+ transform: "translate(153.000000, 3207.000000)"
45
+ }, /*#__PURE__*/_react.default.createElement("g", {
46
+ transform: "translate(35.000000, 299.000000)"
47
+ }, /*#__PURE__*/_react.default.createElement("path", {
48
+ id: "Fill-349-Copy",
49
+ d: "M22.4023125,22.8 C22.543625,21.9425 22.625,20.9975 22.625,20 L26.125,20 C26.125,21.316875 25.69275,22.52 24.9853125,23.5175 C24.3255625,23.2025 23.4383125,22.953125 22.4023125,22.8 L22.4023125,22.8 Z M21.372875,25.954375 C21.72725,25.3725 22.0234375,24.5675 22.2404375,23.6225 C22.8975625,23.696875 23.483375,23.80625 23.9624375,23.9375 L24.67075,23.9375 C23.829875,24.92625 22.6849375,25.6525 21.372875,25.954375 L21.372875,25.954375 Z M20,26.125 C19.412875,26.125 18.896625,25.105625 18.579,23.5525 C19.034,23.521875 19.503875,23.5 20,23.5 C20.4956875,23.5 20.966,23.521875 21.421,23.5525 C21.1029375,25.105625 20.5866875,26.125 20,26.125 L20,26.125 Z M15.3288125,23.9375 L16.0375625,23.9375 C16.5161875,23.80625 17.1024375,23.696875 17.759125,23.6225 C17.976125,24.5675 18.2723125,25.3725 18.6266875,25.954375 C17.3150625,25.6525 16.170125,24.92625 15.3288125,23.9375 L15.3288125,23.9375 Z M15.0146875,23.5175 C14.3068125,22.52 13.875,21.316875 13.875,20 L17.375,20 C17.375,20.9975 17.4559375,21.9425 17.59725,22.8 C16.56125,22.953125 15.6744375,23.2025 15.0146875,23.5175 L15.0146875,23.5175 Z M15.030875,16.45625 C15.6796875,16.78 16.5634375,17.03375 17.60075,17.195625 C17.501,17.799375 17.428375,18.4425 17.3964375,19.125 L13.951125,19.125 C14.0933125,18.13625 14.477,17.230625 15.030875,16.45625 L15.030875,16.45625 Z M18.6266875,14.04125 C18.27275,14.623125 17.977,15.42375 17.760875,16.373125 C17.1265,16.294375 16.558625,16.189375 16.0944375,16.0625 L15.34325,16.0625 C16.180625,15.069375 17.3168125,14.343125 18.6266875,14.04125 L18.6266875,14.04125 Z M20,13.875 C20.585375,13.875 21.0959375,14.894375 21.4118125,16.443125 C20.959875,16.478125 20.492625,16.5 20,16.5 C19.5069375,16.5 19.0396875,16.478125 18.58775,16.443125 C18.903625,14.894375 19.4141875,13.875 20,13.875 L20,13.875 Z M18.2749375,19.125 C18.3020625,18.473125 18.362,17.865 18.441625,17.29625 C18.9408125,17.344375 19.4596875,17.375 20,17.375 C20.5403125,17.375 21.0591875,17.344375 21.5579375,17.29625 C21.638,17.865 21.6979375,18.473125 21.724625,19.125 L18.2749375,19.125 L18.2749375,19.125 Z M21.75,20 C21.75,20.97125 21.6786875,21.88125 21.5631875,22.699375 C21.06225,22.65125 20.5420625,22.625 20,22.625 C19.4579375,22.625 18.9373125,22.65125 18.436375,22.699375 C18.320875,21.88125 18.25,20.97125 18.25,20 L21.75,20 L21.75,20 Z M24.6563125,16.0625 L23.905125,16.0625 C23.441375,16.189375 22.8730625,16.294375 22.2386875,16.373125 C22.0225625,15.42375 21.7268125,14.623125 21.372875,14.04125 C22.68275,14.343125 23.8189375,15.069375 24.6563125,16.0625 L24.6563125,16.0625 Z M24.9686875,16.45625 C25.5225625,17.230625 25.90625,18.13625 26.048875,19.125 L22.603125,19.125 C22.5711875,18.4425 22.499,17.799375 22.39925,17.195625 C23.4365625,17.03375 24.3203125,16.78 24.9686875,16.45625 L24.9686875,16.45625 Z M20,13 C16.1338125,13 13,16.1325 13,20 C13,23.863125 16.1338125,27 20,27 C23.86575,27 27,23.863125 27,20 C27,16.1325 23.86575,13 20,13 L20,13 Z"
50
+ }))))));
51
+ exports.IconSvg = IconSvg;
56
52
  var ArrowIconSvg = function ArrowIconSvg() {
57
- return _react2.default.createElement(
58
- 'svg',
59
- {
60
- 'aria-hidden': 'true',
61
- focusable: 'false',
62
- width: '5px',
63
- height: '10px',
64
- viewBox: '0 0 5 10',
65
- version: '1.1',
66
- xmlns: 'http://www.w3.org/2000/svg',
67
- xmlnsXlink: 'http://www.w3.org/1999/xlink',
68
- className: 'auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-arrow'
69
- },
70
- _react2.default.createElement(
71
- 'g',
72
- { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },
73
- _react2.default.createElement(
74
- 'g',
75
- {
76
- id: 'Lock',
77
- transform: 'translate(-396.000000, -3521.000000)',
78
- fill: '#000000',
79
- opacity: '0.539999962'
80
- },
81
- _react2.default.createElement(
82
- 'g',
83
- { id: 'SMS', transform: 'translate(153.000000, 3207.000000)' },
84
- _react2.default.createElement(
85
- 'g',
86
- { transform: 'translate(35.000000, 299.000000)' },
87
- _react2.default.createElement(
88
- 'g',
89
- { transform: 'translate(210.000000, 20.000000) rotate(-90.000000) translate(-210.000000, -20.000000) translate(198.000000, 8.000000)' },
90
- _react2.default.createElement('path', { id: 'Shape', d: 'M7,10 L12,15 L17,10 L7,10 Z' })
91
- )
92
- )
93
- )
94
- )
95
- )
96
- );
53
+ return /*#__PURE__*/_react.default.createElement("svg", {
54
+ "aria-hidden": "true",
55
+ focusable: "false",
56
+ width: "5px",
57
+ height: "10px",
58
+ viewBox: "0 0 5 10",
59
+ version: "1.1",
60
+ xmlns: "http://www.w3.org/2000/svg",
61
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
62
+ className: "auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-arrow"
63
+ }, /*#__PURE__*/_react.default.createElement("g", {
64
+ stroke: "none",
65
+ strokeWidth: "1",
66
+ fill: "none",
67
+ fillRule: "evenodd"
68
+ }, /*#__PURE__*/_react.default.createElement("g", {
69
+ id: "Lock",
70
+ transform: "translate(-396.000000, -3521.000000)",
71
+ fill: "#000000",
72
+ opacity: "0.539999962"
73
+ }, /*#__PURE__*/_react.default.createElement("g", {
74
+ id: "SMS",
75
+ transform: "translate(153.000000, 3207.000000)"
76
+ }, /*#__PURE__*/_react.default.createElement("g", {
77
+ transform: "translate(35.000000, 299.000000)"
78
+ }, /*#__PURE__*/_react.default.createElement("g", {
79
+ transform: "translate(210.000000, 20.000000) rotate(-90.000000) translate(-210.000000, -20.000000) translate(198.000000, 8.000000)"
80
+ }, /*#__PURE__*/_react.default.createElement("path", {
81
+ id: "Shape",
82
+ d: "M7,10 L12,15 L17,10 L7,10 Z"
83
+ })))))));
97
84
  };
98
-
99
- var LocationInput = function (_React$Component) {
85
+ var LocationInput = /*#__PURE__*/function (_React$Component) {
100
86
  _inherits(LocationInput, _React$Component);
101
-
87
+ var _super = _createSuper(LocationInput);
102
88
  function LocationInput(props) {
89
+ var _this;
103
90
  _classCallCheck(this, LocationInput);
104
-
105
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
106
-
91
+ _this = _super.call(this, props);
107
92
  _this.state = {};
108
93
  return _this;
109
94
  }
110
-
111
- LocationInput.prototype.render = function render() {
112
- var _props = this.props,
113
- onClick = _props.onClick,
114
- value = _props.value;
115
- var focused = this.state.focused;
116
-
117
-
118
- var limitedValue = value.length > 23 ? value.substr(0, 20) + '...' : value;
119
-
120
- return _react2.default.createElement(
121
- _input_wrap2.default,
122
- { focused: focused, isValid: true, name: 'location', icon: IconSvg },
123
- _react2.default.createElement('input', {
124
- type: 'button',
125
- name: 'location',
126
- className: 'auth0-lock-input auth0-lock-input-location',
95
+ _createClass(LocationInput, [{
96
+ key: "render",
97
+ value: function render() {
98
+ var _this$props = this.props,
99
+ onClick = _this$props.onClick,
100
+ value = _this$props.value;
101
+ var focused = this.state.focused;
102
+ var limitedValue = value.length > 23 ? "".concat(value.substr(0, 20), "...") : value;
103
+ return /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
104
+ focused: focused,
105
+ isValid: true,
106
+ name: "location",
107
+ icon: IconSvg
108
+ }, /*#__PURE__*/_react.default.createElement("input", {
109
+ type: "button",
110
+ name: "location",
111
+ className: "auth0-lock-input auth0-lock-input-location",
127
112
  value: limitedValue,
128
113
  onFocus: this.handleFocus.bind(this),
129
114
  onBlur: this.handleBlur.bind(this),
130
115
  onKeyDown: this.handleKeyDown.bind(this),
131
116
  onClick: onClick,
132
- 'aria-label': 'Location'
133
- }),
134
- _react2.default.createElement(
135
- 'span',
136
- null,
137
- _react2.default.createElement(ArrowIconSvg, null)
138
- )
139
- );
140
- };
141
-
142
- LocationInput.prototype.handleFocus = function handleFocus() {
143
- this.setState({ focused: true });
144
- };
145
-
146
- LocationInput.prototype.handleBlur = function handleBlur() {
147
- this.setState({ focused: false });
148
- };
149
-
150
- LocationInput.prototype.handleKeyDown = function handleKeyDown(e) {
151
- if (e.key !== 'Tab') {
152
- e.preventDefault();
117
+ "aria-label": "Location"
118
+ }), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(ArrowIconSvg, null)));
153
119
  }
154
-
155
- if (e.key === 'ArrowDown') {
156
- return this.props.onClick();
120
+ }, {
121
+ key: "handleFocus",
122
+ value: function handleFocus() {
123
+ this.setState({
124
+ focused: true
125
+ });
157
126
  }
158
-
159
- if (e.keyCode >= 65 && e.keyCode <= 90) {
160
- return this.props.onClick(String.fromCharCode(e.keyCode).toLowerCase());
127
+ }, {
128
+ key: "handleBlur",
129
+ value: function handleBlur() {
130
+ this.setState({
131
+ focused: false
132
+ });
161
133
  }
162
- };
163
-
134
+ }, {
135
+ key: "handleKeyDown",
136
+ value: function handleKeyDown(e) {
137
+ if (e.key !== 'Tab') {
138
+ e.preventDefault();
139
+ }
140
+ if (e.key === 'ArrowDown') {
141
+ return this.props.onClick();
142
+ }
143
+ if (e.keyCode >= 65 && e.keyCode <= 90) {
144
+ return this.props.onClick(String.fromCharCode(e.keyCode).toLowerCase());
145
+ }
146
+ }
147
+ }]);
164
148
  return LocationInput;
165
- }(_react2.default.Component);
166
-
167
- // TODO: specify propTypes
168
-
169
-
149
+ }(_react.default.Component); // TODO: specify propTypes
170
150
  exports.default = LocationInput;
@@ -1,117 +1,117 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
-
5
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
6
-
7
- var _propTypes = require('prop-types');
8
-
9
- var _propTypes2 = _interopRequireDefault(_propTypes);
10
-
11
- var _react = require('react');
12
-
13
- var _react2 = _interopRequireDefault(_react);
14
-
15
- var _input_wrap = require('./input_wrap');
16
-
17
- var _input_wrap2 = _interopRequireDefault(_input_wrap);
18
-
19
- var _password_input = require('./password_input');
20
-
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _input_wrap = _interopRequireDefault(require("./input_wrap"));
10
+ var _password_input = require("./password_input");
11
+ var _excluded = ["lockId", "invalidHint", "isValid", "onChange", "value"];
21
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
-
23
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
24
-
13
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
17
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
26
-
27
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
28
-
29
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
30
-
31
- var MFACodeInput = function (_React$Component) {
18
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
19
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
21
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
23
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
24
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
26
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
27
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
28
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
29
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
30
+ var MFACodeInput = /*#__PURE__*/function (_React$Component) {
32
31
  _inherits(MFACodeInput, _React$Component);
33
-
32
+ var _super = _createSuper(MFACodeInput);
34
33
  function MFACodeInput(props) {
34
+ var _this;
35
35
  _classCallCheck(this, MFACodeInput);
36
-
37
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
38
-
36
+ _this = _super.call(this, props);
39
37
  _this.state = {};
40
38
  return _this;
41
39
  }
42
-
43
- MFACodeInput.prototype.focus = function focus() {
44
- this.refs.input && this.refs.input.focus();
45
- };
46
-
47
- MFACodeInput.prototype.hasFocus = function hasFocus() {
48
- return this.state.focused;
49
- };
50
-
51
- MFACodeInput.prototype.render = function render() {
52
- var _props = this.props,
53
- lockId = _props.lockId,
54
- invalidHint = _props.invalidHint,
55
- isValid = _props.isValid,
56
- onChange = _props.onChange,
57
- value = _props.value,
58
- props = _objectWithoutProperties(_props, ['lockId', 'invalidHint', 'isValid', 'onChange', 'value']);
59
-
60
- var focused = this.state.focused;
61
-
62
-
63
- return _react2.default.createElement(
64
- _input_wrap2.default,
65
- {
40
+ _createClass(MFACodeInput, [{
41
+ key: "focus",
42
+ value: function focus() {
43
+ this.refs.input && this.refs.input.focus();
44
+ }
45
+ }, {
46
+ key: "hasFocus",
47
+ value: function hasFocus() {
48
+ return this.state.focused;
49
+ }
50
+ }, {
51
+ key: "render",
52
+ value: function render() {
53
+ var _this$props = this.props,
54
+ lockId = _this$props.lockId,
55
+ invalidHint = _this$props.invalidHint,
56
+ isValid = _this$props.isValid,
57
+ onChange = _this$props.onChange,
58
+ value = _this$props.value,
59
+ props = _objectWithoutProperties(_this$props, _excluded);
60
+ var focused = this.state.focused;
61
+ return /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
66
62
  focused: focused,
67
63
  invalidHint: invalidHint,
68
64
  isValid: isValid,
69
- name: 'mfa_code',
65
+ name: "mfa_code",
70
66
  icon: _password_input.IconSvg
71
- },
72
- _react2.default.createElement('input', _extends({
73
- id: lockId + '-mfa_code',
74
- ref: 'input',
75
- type: 'text',
76
- name: 'mfa_code',
77
- className: 'auth0-lock-input',
78
- autoComplete: 'off',
79
- autoCapitalize: 'off',
80
- autoCorrect: 'off',
81
- spellCheck: 'false',
67
+ }, /*#__PURE__*/_react.default.createElement("input", _extends({
68
+ id: "".concat(lockId, "-mfa_code"),
69
+ ref: "input",
70
+ type: "text",
71
+ name: "mfa_code",
72
+ className: "auth0-lock-input",
73
+ autoComplete: "off",
74
+ autoCapitalize: "off",
75
+ autoCorrect: "off",
76
+ spellCheck: "false",
82
77
  onChange: this.handleOnChange.bind(this),
83
78
  onFocus: this.handleFocus.bind(this),
84
79
  onBlur: this.handleBlur.bind(this),
85
80
  value: value,
86
- 'aria-label': 'Multi factor authentication code',
87
- 'aria-invalid': !isValid,
88
- 'aria-describedby': !isValid && invalidHint ? 'auth0-lock-error-msg-mfa_code' : undefined
89
- }, props))
90
- );
91
- };
92
-
93
- MFACodeInput.prototype.handleOnChange = function handleOnChange(e) {
94
- if (this.props.onChange) {
95
- this.props.onChange(e);
81
+ "aria-label": "Multi factor authentication code",
82
+ "aria-invalid": !isValid,
83
+ "aria-describedby": !isValid && invalidHint ? "auth0-lock-error-msg-mfa_code" : undefined
84
+ }, props)));
96
85
  }
97
- };
98
-
99
- MFACodeInput.prototype.handleFocus = function handleFocus() {
100
- this.setState({ focused: true });
101
- };
102
-
103
- MFACodeInput.prototype.handleBlur = function handleBlur() {
104
- this.setState({ focused: false });
105
- };
106
-
86
+ }, {
87
+ key: "handleOnChange",
88
+ value: function handleOnChange(e) {
89
+ if (this.props.onChange) {
90
+ this.props.onChange(e);
91
+ }
92
+ }
93
+ }, {
94
+ key: "handleFocus",
95
+ value: function handleFocus() {
96
+ this.setState({
97
+ focused: true
98
+ });
99
+ }
100
+ }, {
101
+ key: "handleBlur",
102
+ value: function handleBlur() {
103
+ this.setState({
104
+ focused: false
105
+ });
106
+ }
107
+ }]);
107
108
  return MFACodeInput;
108
- }(_react2.default.Component);
109
-
110
- MFACodeInput.propTypes = {
111
- invalidHint: _propTypes2.default.string.isRequired,
112
- isValid: _propTypes2.default.bool.isRequired,
113
- onChange: _propTypes2.default.func,
114
- placeholder: _propTypes2.default.string,
115
- value: _propTypes2.default.string.isRequired
116
- };
109
+ }(_react.default.Component);
117
110
  exports.default = MFACodeInput;
111
+ _defineProperty(MFACodeInput, "propTypes", {
112
+ invalidHint: _propTypes.default.string.isRequired,
113
+ isValid: _propTypes.default.bool.isRequired,
114
+ onChange: _propTypes.default.func,
115
+ placeholder: _propTypes.default.string,
116
+ value: _propTypes.default.string.isRequired
117
+ });