auth0-lock 11.34.2 → 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 +26 -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
package/lib/sync.js CHANGED
@@ -1,32 +1,25 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.go = undefined;
5
- exports.isSuccess = isSuccess;
6
- exports.isDone = isDone;
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.go = exports.default = void 0;
7
8
  exports.hasError = hasError;
8
-
9
- var _immutable = require('immutable');
10
-
11
- var _data_utils = require('./utils/data_utils');
12
-
13
- var _index = require('./core/index');
14
-
15
- var l = _interopRequireWildcard(_index);
16
-
17
- var _index2 = require('./store/index');
18
-
19
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
20
-
9
+ exports.isDone = isDone;
10
+ exports.isSuccess = isSuccess;
11
+ var _immutable = require("immutable");
12
+ var _data_utils = require("./utils/data_utils");
13
+ var l = _interopRequireWildcard(require("./core/index"));
14
+ var _index2 = require("./store/index");
15
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
17
  var _dataFns = (0, _data_utils.dataFns)(['sync']),
22
- get = _dataFns.get,
23
- set = _dataFns.set;
24
-
25
- exports.default = function (m, key, opts) {
18
+ get = _dataFns.get,
19
+ set = _dataFns.set;
20
+ var _default = function _default(m, key, opts) {
26
21
  if (get(m, key) !== undefined) return m;
27
-
28
22
  var status = opts.waitFn ? 'waiting' : !opts.conditionFn || opts.conditionFn(m) ? 'pending' : 'no';
29
-
30
23
  return set(m, key, (0, _immutable.Map)({
31
24
  conditionFn: opts.conditionFn,
32
25
  errorFn: opts.errorFn,
@@ -38,7 +31,7 @@ exports.default = function (m, key, opts) {
38
31
  waitFn: opts.waitFn
39
32
  }));
40
33
  };
41
-
34
+ exports.default = _default;
42
35
  var syncStatusKey = function syncStatusKey(key) {
43
36
  return (window.Array.isArray(key) ? key : [key]).concat(['syncStatus']);
44
37
  };
@@ -51,7 +44,6 @@ var setStatus = function setStatus(m, key, str) {
51
44
  var getProp = function getProp(m, key, name) {
52
45
  return get(m, key).get(name);
53
46
  };
54
-
55
47
  var findKeys = function findKeys(m) {
56
48
  return m.reduce(function (r, v, k) {
57
49
  var current = _immutable.Map.isMap(v) && v.has('syncStatus') ? [k] : [];
@@ -61,13 +53,11 @@ var findKeys = function findKeys(m) {
61
53
  return r.concat.apply(r, [current].concat([nested]));
62
54
  }, []);
63
55
  };
64
-
65
56
  function removeKeys(m, keys) {
66
57
  return keys.reduce(function (r, k) {
67
58
  return r.deleteIn(syncStatusKey(k));
68
59
  }, m);
69
60
  }
70
-
71
61
  var process = function process(m, id) {
72
62
  var keys = findKeys(get(m, [], (0, _immutable.Map)()));
73
63
  // TODO timeout
@@ -82,15 +72,12 @@ var process = function process(m, id) {
82
72
  setTimeout(function () {
83
73
  (0, _index2.swap)(_index2.updateEntity, 'lock', id, function (m) {
84
74
  var errorFn = getProp(r, k, 'errorFn');
85
-
86
75
  if (error && typeof errorFn === 'function') {
87
76
  setTimeout(function () {
88
77
  return errorFn(m, error);
89
78
  }, 0);
90
79
  }
91
-
92
80
  var recoverResult = getProp(m, k, 'recoverResult');
93
-
94
81
  if (error && recoverResult === undefined) {
95
82
  return handleError(m, k, error);
96
83
  } else {
@@ -106,53 +93,45 @@ var process = function process(m, id) {
106
93
  r = setStatus(r, k, !conditionFn || conditionFn(r) ? 'pending' : 'no');
107
94
  }
108
95
  }
109
-
110
96
  return r;
111
97
  }, m);
112
98
  };
113
-
114
- var go = exports.go = function go(id) {
99
+ var go = function go(id) {
115
100
  (0, _index2.observe)('sync', id, function (m) {
116
101
  setTimeout(function () {
117
102
  return (0, _index2.swap)(_index2.updateEntity, 'lock', id, process, id);
118
103
  }, 0);
119
104
  });
120
105
  };
121
-
106
+ exports.go = go;
122
107
  function isSuccess(m, key) {
123
108
  return getStatus(m, key) === 'ok';
124
109
  }
125
-
126
110
  function isDone(m) {
127
111
  var keys = findKeys(get(m, [], (0, _immutable.Map)()));
128
112
  return keys.length > 0 && keys.reduce(function (r, k) {
129
113
  return r && !isLoading(m, k);
130
114
  }, true);
131
115
  }
132
-
133
116
  function hasError(m) {
134
117
  var excludeKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
135
-
136
118
  var keys = findKeys(removeKeys(get(m, [], (0, _immutable.Map)()), excludeKeys));
137
119
  return keys.length > 0 && keys.reduce(function (r, k) {
138
120
  return r || getStatus(m, k) === 'error';
139
121
  }, false);
140
122
  }
141
-
142
123
  function isLoading(m, key) {
143
124
  return ['loading', 'pending', 'waiting'].indexOf(getStatus(m, key)) > -1;
144
125
  }
145
-
146
126
  function handleError(m, key, error) {
147
127
  var result = setStatus(m, key, 'error');
148
128
 
149
129
  // TODO: this should be configurable for each sync
150
130
  if (key !== 'sso') {
151
- var stopError = new Error('An error occurred when fetching ' + key + ' data for Lock: ' + error.message);
131
+ var stopError = new Error("An error occurred when fetching ".concat(key, " data for Lock: ").concat(error.message));
152
132
  stopError.code = 'sync';
153
133
  stopError.origin = error;
154
134
  result = l.stop(result, stopError);
155
135
  }
156
-
157
136
  return result;
158
137
  }
@@ -1,127 +1,107 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
- exports.BackButton = exports.CloseButton = undefined;
5
-
6
- var _propTypes = require('prop-types');
7
-
8
- var _propTypes2 = _interopRequireDefault(_propTypes);
9
-
10
- var _react = require('react');
11
-
12
- var _react2 = _interopRequireDefault(_react);
1
+ "use strict";
13
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CloseButton = exports.BackButton = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = _interopRequireDefault(require("react"));
14
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
10
  var SvgBackIcon = function SvgBackIcon() {
17
- return _react2.default.createElement(
18
- 'svg',
19
- {
20
- 'aria-hidden': 'true',
21
- focusable: 'false',
22
- enableBackground: 'new 0 0 24 24',
23
- version: '1.0',
24
- viewBox: '0 0 24 24',
25
- xmlSpace: 'preserve',
26
- xmlns: 'http://www.w3.org/2000/svg',
27
- xmlnsXlink: 'http://www.w3.org/1999/xlink'
28
- },
29
- ' ',
30
- _react2.default.createElement('polyline', {
31
- fill: 'none',
32
- points: '12.5,21 3.5,12 12.5,3 ',
33
- stroke: '#000000',
34
- strokeMiterlimit: '10',
35
- strokeWidth: '2'
36
- }),
37
- ' ',
38
- _react2.default.createElement('line', {
39
- fill: 'none',
40
- stroke: '#000000',
41
- strokeMiterlimit: '10',
42
- strokeWidth: '2',
43
- x1: '22',
44
- x2: '3.5',
45
- y1: '12',
46
- y2: '12'
47
- }),
48
- ' '
49
- );
11
+ return /*#__PURE__*/_react.default.createElement("svg", {
12
+ "aria-hidden": "true",
13
+ focusable: "false",
14
+ enableBackground: "new 0 0 24 24",
15
+ version: "1.0",
16
+ viewBox: "0 0 24 24",
17
+ xmlSpace: "preserve",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ xmlnsXlink: "http://www.w3.org/1999/xlink"
20
+ }, ' ', /*#__PURE__*/_react.default.createElement("polyline", {
21
+ fill: "none",
22
+ points: "12.5,21 3.5,12 12.5,3 ",
23
+ stroke: "#000000",
24
+ strokeMiterlimit: "10",
25
+ strokeWidth: "2"
26
+ }), ' ', /*#__PURE__*/_react.default.createElement("line", {
27
+ fill: "none",
28
+ stroke: "#000000",
29
+ strokeMiterlimit: "10",
30
+ strokeWidth: "2",
31
+ x1: "22",
32
+ x2: "3.5",
33
+ y1: "12",
34
+ y2: "12"
35
+ }), ' ');
50
36
  };
51
37
  var SvgCloseIcon = function SvgCloseIcon() {
52
- return _react2.default.createElement(
53
- 'svg',
54
- {
55
- 'aria-hidden': 'true',
56
- focusable: 'false',
57
- enableBackground: 'new 0 0 128 128',
58
- version: '1.1',
59
- viewBox: '0 0 128 128',
60
- xmlSpace: 'preserve',
61
- xmlns: 'http://www.w3.org/2000/svg',
62
- xmlnsXlink: 'http://www.w3.org/1999/xlink'
63
- },
64
- _react2.default.createElement(
65
- 'g',
66
- null,
67
- _react2.default.createElement('polygon', {
68
- fill: '#373737',
69
- points: '123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 '
70
- })
71
- )
72
- );
38
+ return /*#__PURE__*/_react.default.createElement("svg", {
39
+ "aria-hidden": "true",
40
+ focusable: "false",
41
+ enableBackground: "new 0 0 128 128",
42
+ version: "1.1",
43
+ viewBox: "0 0 128 128",
44
+ xmlSpace: "preserve",
45
+ xmlns: "http://www.w3.org/2000/svg",
46
+ xmlnsXlink: "http://www.w3.org/1999/xlink"
47
+ }, /*#__PURE__*/_react.default.createElement("g", null, /*#__PURE__*/_react.default.createElement("polygon", {
48
+ fill: "#373737",
49
+ points: "123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 "
50
+ })));
73
51
  };
74
-
75
52
  var IconButton = function IconButton(_ref) {
76
53
  var lockId = _ref.lockId,
77
- name = _ref.name,
78
- _onClick = _ref.onClick,
79
- svg = _ref.svg;
80
- return _react2.default.createElement(
81
- 'span',
82
- {
83
- id: lockId + '-' + name + '-button',
84
- role: 'button',
85
- tabIndex: 0,
86
- className: 'auth0-lock-' + name + '-button',
87
- onClick: function onClick(e) {
54
+ name = _ref.name,
55
+ _onClick = _ref.onClick,
56
+ svg = _ref.svg;
57
+ return /*#__PURE__*/_react.default.createElement("span", {
58
+ id: "".concat(lockId, "-").concat(name, "-button"),
59
+ role: "button",
60
+ tabIndex: 0,
61
+ className: "auth0-lock-".concat(name, "-button"),
62
+ onClick: function onClick(e) {
63
+ e.preventDefault();
64
+ _onClick();
65
+ },
66
+ onKeyPress: function onKeyPress(e) {
67
+ if (e.key === 'Enter') {
88
68
  e.preventDefault();
89
69
  _onClick();
90
- },
91
- onKeyPress: function onKeyPress(e) {
92
- if (e.key === 'Enter') {
93
- e.preventDefault();
94
- _onClick();
95
- }
96
- },
97
- 'aria-label': name
70
+ }
98
71
  },
99
- svg
100
- );
72
+ "aria-label": name
73
+ }, svg);
101
74
  };
102
-
103
75
  IconButton.propTypes = {
104
- name: _propTypes2.default.string.isRequired,
105
- onClick: _propTypes2.default.func.isRequired,
106
- svg: _propTypes2.default.element.isRequired
76
+ name: _propTypes.default.string.isRequired,
77
+ onClick: _propTypes.default.func.isRequired,
78
+ svg: _propTypes.default.element.isRequired
107
79
  };
108
-
109
- var CloseButton = exports.CloseButton = function CloseButton(_ref2) {
80
+ var CloseButton = function CloseButton(_ref2) {
110
81
  var lockId = _ref2.lockId,
111
- onClick = _ref2.onClick;
112
- return _react2.default.createElement(IconButton, { lockId: lockId, name: 'close', onClick: onClick, svg: _react2.default.createElement(SvgCloseIcon, null) });
82
+ onClick = _ref2.onClick;
83
+ return /*#__PURE__*/_react.default.createElement(IconButton, {
84
+ lockId: lockId,
85
+ name: "close",
86
+ onClick: onClick,
87
+ svg: /*#__PURE__*/_react.default.createElement(SvgCloseIcon, null)
88
+ });
113
89
  };
114
-
90
+ exports.CloseButton = CloseButton;
115
91
  CloseButton.propTypes = {
116
- onClick: _propTypes2.default.func.isRequired
92
+ onClick: _propTypes.default.func.isRequired
117
93
  };
118
-
119
- var BackButton = exports.BackButton = function BackButton(_ref3) {
94
+ var BackButton = function BackButton(_ref3) {
120
95
  var lockId = _ref3.lockId,
121
- onClick = _ref3.onClick;
122
- return _react2.default.createElement(IconButton, { lockId: lockId, name: 'back', onClick: onClick, svg: _react2.default.createElement(SvgBackIcon, null) });
96
+ onClick = _ref3.onClick;
97
+ return /*#__PURE__*/_react.default.createElement(IconButton, {
98
+ lockId: lockId,
99
+ name: "back",
100
+ onClick: onClick,
101
+ svg: /*#__PURE__*/_react.default.createElement(SvgBackIcon, null)
102
+ });
123
103
  };
124
-
104
+ exports.BackButton = BackButton;
125
105
  BackButton.propTypes = {
126
- onClick: _propTypes2.default.func.isRequired
106
+ onClick: _propTypes.default.func.isRequired
127
107
  };