tg-core-components 5.2.1-history-time-label.0 → 5.3.0-master.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 (93) hide show
  1. package/es/components/AcceptUpdatedTaC/index.js +8 -3
  2. package/es/components/Checkbox/index.js +93 -0
  3. package/es/components/Deposit/CardInput/index.js +1 -3
  4. package/es/components/Input/index.js +222 -22
  5. package/es/components/InputWrapper/index.js +69 -0
  6. package/es/components/Notification.js +4 -4
  7. package/es/components/Select/index.js +202 -64
  8. package/es/components/Select/test.js +111 -0
  9. package/es/index.js +2 -1
  10. package/es/lib/utils/translate.js +1 -8
  11. package/es/widgets/AccountDetail/index.js +53 -77
  12. package/es/widgets/ActivateWidget/index.js +59 -293
  13. package/es/widgets/BonusWidget/BonusCode.js +24 -17
  14. package/es/widgets/BonusWidget/index.js +83 -45
  15. package/es/widgets/Cashier/Deposit/PaymentForm/NewTab.js +28 -0
  16. package/es/widgets/Cashier/Deposit/PaymentForm/index.js +6 -2
  17. package/es/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +9 -6
  18. package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +19 -29
  19. package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +163 -347
  20. package/es/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
  21. package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +8 -22
  22. package/es/widgets/ChangePassword/index.js +53 -40
  23. package/es/widgets/HistoryWidget/index.js +69 -51
  24. package/es/widgets/HistoryWidget/message.js +17 -20
  25. package/es/widgets/RequestResetPassword/index.js +15 -14
  26. package/es/widgets/ResetPassword/index.js +22 -18
  27. package/es/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
  28. package/es/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
  29. package/es/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
  30. package/es/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
  31. package/es/widgets/ResponsibleGamingWidget/helpers.js +2 -2
  32. package/es/widgets/ResponsibleGamingWidget/validate.js +1 -1
  33. package/es/widgets/Settings/index.js +2 -2
  34. package/es/widgets/SignIn/SignInForm.js +4 -6
  35. package/es/widgets/SignIn/index.js +21 -21
  36. package/es/widgets/SignUp/ContactInfoStep.js +5 -6
  37. package/es/widgets/SportsbookSettings/index.js +10 -24
  38. package/es/widgets/Subscriptions/index.js +3 -5
  39. package/lib/components/AcceptUpdatedTaC/index.js +11 -3
  40. package/lib/components/Checkbox/index.js +106 -0
  41. package/lib/components/Deposit/CardInput/index.js +1 -3
  42. package/lib/components/Input/index.js +223 -26
  43. package/lib/components/InputWrapper/index.js +85 -0
  44. package/lib/components/Notification.js +3 -3
  45. package/lib/components/Select/index.js +209 -63
  46. package/lib/components/Select/test.js +121 -0
  47. package/lib/index.js +9 -4
  48. package/lib/lib/utils/translate.js +1 -8
  49. package/lib/widgets/AccountDetail/index.js +53 -86
  50. package/lib/widgets/ActivateWidget/index.js +58 -305
  51. package/lib/widgets/BonusWidget/BonusCode.js +24 -20
  52. package/lib/widgets/BonusWidget/index.js +85 -44
  53. package/lib/widgets/Cashier/Deposit/PaymentForm/NewTab.js +44 -0
  54. package/lib/widgets/Cashier/Deposit/PaymentForm/index.js +9 -2
  55. package/lib/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +13 -7
  56. package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +22 -32
  57. package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +195 -378
  58. package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
  59. package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +10 -24
  60. package/lib/widgets/ChangePassword/index.js +53 -43
  61. package/lib/widgets/HistoryWidget/index.js +69 -51
  62. package/lib/widgets/HistoryWidget/message.js +17 -20
  63. package/lib/widgets/RequestResetPassword/index.js +15 -17
  64. package/lib/widgets/ResetPassword/index.js +25 -21
  65. package/lib/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
  66. package/lib/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
  67. package/lib/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
  68. package/lib/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
  69. package/lib/widgets/ResponsibleGamingWidget/helpers.js +2 -2
  70. package/lib/widgets/ResponsibleGamingWidget/validate.js +1 -1
  71. package/lib/widgets/Settings/index.js +6 -6
  72. package/lib/widgets/SignIn/SignInForm.js +7 -6
  73. package/lib/widgets/SignIn/index.js +25 -25
  74. package/lib/widgets/SignUp/ContactInfoStep.js +8 -6
  75. package/lib/widgets/SportsbookSettings/index.js +10 -24
  76. package/lib/widgets/Subscriptions/index.js +3 -11
  77. package/package.json +8 -3
  78. package/es/components/Input/BirthdateInput.js +0 -171
  79. package/es/components/Input/Checkbox.js +0 -51
  80. package/es/components/Input/Input.js +0 -73
  81. package/es/components/Input/PasswordInput.js +0 -84
  82. package/es/components/Input/PhoneNumberInput.js +0 -110
  83. package/es/components/Input/input.test.js +0 -80
  84. package/es/components/Input/old-input.test.js +0 -100
  85. package/es/components/common.js +0 -339
  86. package/lib/components/Input/BirthdateInput.js +0 -192
  87. package/lib/components/Input/Checkbox.js +0 -65
  88. package/lib/components/Input/Input.js +0 -87
  89. package/lib/components/Input/PasswordInput.js +0 -101
  90. package/lib/components/Input/PhoneNumberInput.js +0 -127
  91. package/lib/components/Input/input.test.js +0 -89
  92. package/lib/components/Input/old-input.test.js +0 -107
  93. package/lib/components/common.js +0 -359
@@ -11,7 +11,6 @@ import compose from 'recompose/compose';
11
11
  import { injectIntl } from 'react-intl';
12
12
  import WithValidation from '../../lib/WithValidation';
13
13
  import Input from '../../components/Input';
14
- import Button from '../../components/Button';
15
14
  import require from '../../lib/WithValidation/rules/required';
16
15
  import marked from 'marked';
17
16
  import PropTypes from 'prop-types';
@@ -35,8 +34,7 @@ var RequestResetPassword = function (_Component) {
35
34
  errors = _props.errors,
36
35
  intl = _props.intl,
37
36
  onSubmit = _props.onSubmit,
38
- _onBlur = _props.onBlur,
39
- isLoading = _props.isLoading;
37
+ _onBlur = _props.onBlur;
40
38
 
41
39
 
42
40
  if (status == 'COMPLETE') {
@@ -47,22 +45,25 @@ var RequestResetPassword = function (_Component) {
47
45
  'form',
48
46
  { className: 'form', onSubmit: onSubmit },
49
47
  React.createElement(Input, {
50
- label: translate({ id: 'label.username_or_email' }, intl),
48
+ className: 'layout-item send-email-input',
49
+ title: translate({ id: 'label.username_or_email' }, intl),
51
50
  type: 'text',
52
51
  name: 'UsernameOrEmail',
53
- onBlur: function onBlur(e) {
54
- return _onBlur('UsernameOrEmail', e.target.value);
52
+ onBlur: function onBlur(value) {
53
+ return _onBlur('UsernameOrEmail', value);
55
54
  },
56
- status: errors.UsernameOrEmail && 'failure' || 'idle',
57
- statusText: errors.UsernameOrEmail && translate({ id: errors.UsernameOrEmail }, intl)
55
+ error: errors.UsernameOrEmail && translate({ id: errors.UsernameOrEmail }, intl)
58
56
  }),
59
57
  React.createElement(
60
- Button,
61
- {
62
- className: 'button primary wide',
63
- type: 'submit',
64
- isLoading: isLoading },
65
- translate({ id: 'label.request_reset_password' }, intl)
58
+ 'div',
59
+ { className: 'layout-item' },
60
+ React.createElement(
61
+ 'button',
62
+ {
63
+ className: 'button primary request-reset-password-button',
64
+ type: 'submit' },
65
+ translate({ id: 'label.request_reset_password' }, intl)
66
+ )
66
67
  )
67
68
  );
68
69
  }
@@ -11,11 +11,11 @@ import compose from 'recompose/compose';
11
11
  import { injectIntl } from 'react-intl';
12
12
  import WithValidation from '../../lib/WithValidation';
13
13
  import Input from '../../components/Input';
14
- import Button from '../../components/Button';
15
14
  import require from '../../lib/WithValidation/rules/required';
16
15
  import password from '../../lib/WithValidation/rules/password';
17
16
  import match from '../../lib/WithValidation/rules/match';
18
17
  import translate from '../../lib/utils/translate';
18
+ import Button from '../../components/Button/index';
19
19
 
20
20
  import PropTypes from 'prop-types';
21
21
 
@@ -36,39 +36,43 @@ var ResetPassword = function (_Component) {
36
36
  intl = _props.intl,
37
37
  onSubmit = _props.onSubmit,
38
38
  _onBlur = _props.onBlur,
39
- isLoading = _props.isLoading;
39
+ disabled = _props.disabled;
40
40
 
41
41
 
42
42
  return React.createElement(
43
43
  'form',
44
44
  { className: 'form', onSubmit: onSubmit },
45
45
  React.createElement(Input, {
46
- label: translate({ id: 'label.new_password' }, intl),
46
+ className: 'layout-item',
47
+ placeholder: translate({ id: 'label.new_password' }, intl),
47
48
  type: 'password',
48
49
  name: 'NewPassword',
49
- onBlur: function onBlur(e) {
50
- return _onBlur('NewPassword', e.target.value);
50
+ onBlur: function onBlur(value) {
51
+ return _onBlur('NewPassword', value);
51
52
  },
52
- status: errors.NewPassword && 'failure' || 'idle',
53
- statusText: errors.NewPassword && translate({ id: errors.NewPassword }, intl)
53
+ error: errors.NewPassword && translate({ id: errors.NewPassword }, intl)
54
54
  }),
55
55
  React.createElement(Input, {
56
- label: translate({ id: 'label.confirm_password' }, intl),
56
+ className: 'layout-item',
57
+ placeholder: translate({ id: 'label.confirm_password' }, intl),
57
58
  type: 'password',
58
59
  name: 'confirm_password',
59
- onBlur: function onBlur(e) {
60
- return _onBlur('confirm_password', e.target.value);
60
+ onBlur: function onBlur(value) {
61
+ return _onBlur('confirm_password', value);
61
62
  },
62
- status: errors.confirm_password && 'failure' || 'idle',
63
- statusText: errors.confirm_password && translate({ id: errors.confirm_password }, intl)
63
+ error: errors.confirm_password && translate({ id: errors.confirm_password }, intl)
64
64
  }),
65
65
  React.createElement(
66
- Button,
67
- {
68
- className: 'button primary wide',
69
- type: 'submit',
70
- isLoading: isLoading },
71
- translate({ id: 'label.reset_password' }, intl)
66
+ 'div',
67
+ { className: 'layout-item' },
68
+ React.createElement(
69
+ Button,
70
+ {
71
+ isLoading: disabled,
72
+ className: 'button primary reset-password-button',
73
+ type: 'submit' },
74
+ translate({ id: 'label.reset_password' }, intl)
75
+ )
72
76
  )
73
77
  );
74
78
  }
@@ -141,8 +141,11 @@ var TransactionLimit = function TransactionLimit(_ref3) {
141
141
  { className: 'transaction-limit-value' },
142
142
  React.createElement(
143
143
  'a',
144
- { href: '#', onClick: function onClick() {
145
- return handleCancel(id);
144
+ {
145
+ href: '#',
146
+ onClick: function onClick(e) {
147
+ e.preventDefault();
148
+ handleCancel(id);
146
149
  } },
147
150
  React.createElement(Translate, { id: 'action.delete.limit', defaultMessage: 'Delete' })
148
151
  )
@@ -66,8 +66,7 @@ var PeriodItemContent = function PeriodItemContent(_ref) {
66
66
  value: displayLimit ? displayLimit.Amount : null,
67
67
  name: 'Amount',
68
68
  disabled: confirmLimit || cooldownLimit || pendingLimit,
69
- status: errors.Amount && 'failure',
70
- statusText: errors.Amount && translate({ id: errors.Amount }, intl)
69
+ error: errors.Amount && translate({ id: errors.Amount }, intl)
71
70
  }),
72
71
  confirmLimit && React.createElement(
73
72
  'div',
@@ -64,8 +64,7 @@ var AmountItem = function (_Component) {
64
64
  },
65
65
  name: timespan,
66
66
  value: value,
67
- status: !!error && 'failure',
68
- statusText: error,
67
+ error: error,
69
68
  currency: currency,
70
69
  type: 'number',
71
70
  inputMode: 'numeric',
@@ -251,10 +251,8 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
251
251
  setValue = _useState2[1];
252
252
 
253
253
  useEffect(function () {
254
- if (newLimit && newLimit.Amount) {
255
- setValue(newLimit.Amount);
256
- }
257
- }, [newLimit]);
254
+ return setValue(newLimit ? newLimit.Amount : currentLimit ? currentLimit.Amount : 0);
255
+ }, [newLimit, currentLimit]);
258
256
 
259
257
  var _useState3 = useState('select'),
260
258
  _useState4 = _slicedToArray(_useState3, 2),
@@ -305,7 +303,9 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
305
303
  }).sort();
306
304
  }
307
305
 
308
- var closeCustomAmount = function closeCustomAmount() {
306
+ var closeCustomAmount = function closeCustomAmount(e) {
307
+ e.preventDefault();
308
+ e.stopPropagation();
309
309
  _onChange(currentLimit ? currentLimit.Amount : 0);
310
310
  setInputMode('select');
311
311
  };
@@ -323,24 +323,15 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
323
323
  Fragment,
324
324
  null,
325
325
  React.createElement(
326
- 'div',
326
+ 'form',
327
327
  { className: 'ResponsibleGamingWidget__timespan-limit-selector' },
328
- inputMode === 'select' && React.createElement(
329
- Select,
330
- {
331
- options: options,
332
- value: value,
333
- onChange: function onChange(e, value) {
334
- return _onChange(value);
335
- } },
336
- options.map(function (o) {
337
- return React.createElement(
338
- Select.Option,
339
- { value: o.value },
340
- o.label
341
- );
342
- })
343
- ),
328
+ inputMode === 'select' && React.createElement(Select, {
329
+ options: options,
330
+ value: value,
331
+ onChange: function onChange(e, name, value) {
332
+ return _onChange(value);
333
+ }
334
+ }),
344
335
  inputMode === 'input' && React.createElement(
345
336
  Fragment,
346
337
  null,
@@ -348,7 +339,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
348
339
  type: 'number',
349
340
  pattern: '\\d*',
350
341
  value: value,
351
- onChange: function onChange(e, value) {
342
+ onChange: function onChange(e, name, value) {
352
343
  setValue(parseInt(value));
353
344
  if (value > 0) _onChange(value);
354
345
  },
@@ -359,7 +350,6 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
359
350
  React.createElement(
360
351
  Button,
361
352
  {
362
- type: 'button',
363
353
  onClick: closeCustomAmount,
364
354
  className: 'button mini tertiary' },
365
355
  React.createElement(Icon, { icon: 'times' })
@@ -6,8 +6,8 @@ import getByPath from 'lodash/get';
6
6
  * Helper function to get values using currency and timespan
7
7
  */
8
8
  export var getValues = function getValues(values, currency, timespan) {
9
- values = getByPath(values, '[' + (currency || '').toUpperCase() + ']') || values;
10
- return (Array.isArray(values) ? values : []).filter(function (v) {
9
+ values = getByPath(values, '[' + (currency || '').toUpperCase() + ']') || values || [];
10
+ return values.filter(function (v) {
11
11
  return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' && v.timespan === timespan || typeof v === 'number';
12
12
  }).map(function (v) {
13
13
  return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' ? v.amount : v;
@@ -48,7 +48,7 @@ var validate = function validate(_ref) {
48
48
  var sga = (_sga = {}, _defineProperty(_sga, 'insufficient-limit-count', type === 'Deposit' && limitCount < 3), _defineProperty(_sga, 'limit-remove-blocked', type === 'Deposit'), _sga);
49
49
  var uk = {};
50
50
  var dga = (_dga = {}, _defineProperty(_dga, 'insufficient-limit-count', type === 'Deposit' && limitCount < 1), _defineProperty(_dga, 'limit-remove-blocked', type === 'Deposit' && limitCount <= 1), _dga);
51
- var es = (_es = {}, _defineProperty(_es, 'insufficient-limit-count', type === 'Deposit' && limitCount < 3), _defineProperty(_es, 'limit-remove-blocked', type === 'Deposit'), _defineProperty(_es, 'limit-increase-blocked', type === 'Deposit' && limitIncreaseInfo.HasDepositLimitIncreaseBlock), _defineProperty(_es, 'support-pending', type === 'Deposit' && limitIncreaseInfo.HasValidPgsiScore && limitIncreaseInfo.RequiresSupportApproval), _defineProperty(_es, 'requires-self-test', isIncreasingLimit && type === 'Deposit' && !limitIncreaseInfo.HasDepositLimitIncreaseBlock), _defineProperty(_es, 'self-test-fail-cooldown', type === 'Deposit' && !limitIncreaseInfo.HasValidPgsiScore && limitIncreaseInfo.HasDepositLimitIncreaseBlock), _es);
51
+ var es = (_es = {}, _defineProperty(_es, 'insufficient-limit-count', type === 'Deposit' && limitCount < 3), _defineProperty(_es, 'limit-remove-blocked', type === 'Deposit'), _defineProperty(_es, 'limit-increase-blocked', type === 'Deposit' && limitIncreaseInfo.HasDepositLimitIncreaseBlock), _defineProperty(_es, 'support-pending', type === 'Deposit' && limitIncreaseInfo.HasValidPgsiScore && limitIncreaseInfo.RequiresSupportApproval), _defineProperty(_es, 'requires-self-test', isIncreasingLimit && type === 'Deposit' && !limitIncreaseInfo.HasValidPgsiScore && !limitIncreaseInfo.HasDepositLimitIncreaseBlock), _defineProperty(_es, 'self-test-fail-cooldown', type === 'Deposit' && !limitIncreaseInfo.HasValidPgsiScore && limitIncreaseInfo.HasDepositLimitIncreaseBlock), _es);
52
52
 
53
53
  switch (jurisdiction) {
54
54
  case 'mga':
@@ -4,9 +4,9 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
4
4
 
5
5
  import React from 'react';
6
6
  import PropTypes from 'prop-types';
7
+ import Checkbox from '../../components/Checkbox';
7
8
  import Select from '../../components/Select';
8
9
  import Input from '../../components/Input';
9
- import Button from '../../components/Button';
10
10
  import Translate from '../../components/Translate';
11
11
 
12
12
  var Settings = function Settings(_ref) {
@@ -32,7 +32,7 @@ var Settings = function Settings(_ref) {
32
32
  return Component && React.createElement(Component, _extends({ key: key }, props, { onChange: onChange }));
33
33
  }),
34
34
  React.createElement(
35
- Button,
35
+ 'button',
36
36
  { onClick: onSave, className: 'button primary' },
37
37
  React.createElement(Translate, { id: 'action.save', defaultMessage: 'Save' })
38
38
  )
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import compose from 'recompose/compose';
3
3
  import { injectIntl } from 'react-intl';
4
4
  import Input from '../../components/Input';
5
+ import Checkbox from '../../components/Checkbox';
5
6
  import ButtonLoader from '../../components/ButtonLoader';
6
7
  import WithValidation from '../../lib/WithValidation';
7
8
  import require from '../../lib/WithValidation/rules/required';
@@ -32,8 +33,7 @@ var SignIn = function SignIn(_ref) {
32
33
  return _onBlur('username', value);
33
34
  },
34
35
  title: translate({ id: 'label.username' }, intl),
35
- status: errors.username && 'failure' || 'idle',
36
- statusText: errors.username && translate({ id: errors.username }, intl),
36
+ error: errors.username && translate({ id: errors.username }, intl),
37
37
  autoFocus: shouldAutoFocus && !email
38
38
  }),
39
39
  React.createElement(Input, {
@@ -45,13 +45,11 @@ var SignIn = function SignIn(_ref) {
45
45
  return _onBlur('password', value);
46
46
  },
47
47
  title: translate({ id: 'label.password' }, intl),
48
- status: errors.password && 'failure' || 'idle',
49
- statusText: errors.password && translate({ id: errors.password }, intl),
48
+ error: errors.password && translate({ id: errors.password }, intl),
50
49
  autoFocus: shouldAutoFocus && email
51
50
  }),
52
- React.createElement(Input, {
51
+ React.createElement(Checkbox, {
53
52
  className: 'layout-item-full-width remember-email-checkbox',
54
- type: 'checkbox',
55
53
  label: translate({
56
54
  id: 'label.remember-email',
57
55
  defaultMessage: 'Remember email'
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import compose from 'recompose/compose';
3
3
  import { injectIntl } from 'react-intl';
4
4
  import Input from '../../components/Input';
5
- import Button from '../../components/Button';
5
+ import Checkbox from '../../components/Checkbox';
6
+ import ButtonLoader from '../../components/ButtonLoader';
6
7
  import WithValidation from '../../lib/WithValidation';
7
8
  import require from '../../lib/WithValidation/rules/required';
8
9
  import translate from '../../lib/utils/translate';
9
- import Icon from '../../components/Icon';
10
10
 
11
11
  var SignIn = function SignIn(_ref) {
12
12
  var errors = _ref.errors,
@@ -29,44 +29,44 @@ var SignIn = function SignIn(_ref) {
29
29
  name: 'username',
30
30
  value: email,
31
31
  onChange: handleChangeEmail,
32
- onBlur: function onBlur() {
33
- return _onBlur('username', email);
32
+ onBlur: function onBlur(value) {
33
+ return _onBlur('username', value);
34
34
  },
35
- label: translate({ id: 'label.username_or_email' }, intl),
35
+ title: translate({ id: 'label.username_or_email' }, intl),
36
+ error: errors.username && translate({ id: errors.username }, intl),
36
37
  autoFocus: shouldAutoFocus && !email,
37
- autoComplete: 'username',
38
- icon: React.createElement(Icon, { icon: 'envelope' }),
39
- status: errors.username && 'failure',
40
- statusText: errors.username && translate({ id: errors.username }, intl)
38
+ autoComplete: 'username'
41
39
  }),
42
40
  React.createElement(Input, {
43
41
  className: 'layout-item-full-width',
44
42
  type: 'password',
45
43
  name: 'password',
46
- label: translate({ id: 'label.password' }, intl),
44
+ showToggleIcon: true,
45
+ onBlur: function onBlur(value) {
46
+ return _onBlur('password', value);
47
+ },
48
+ title: translate({ id: 'label.password' }, intl),
49
+ error: errors.password && translate({ id: errors.password }, intl),
47
50
  autoFocus: shouldAutoFocus && email,
48
- autoComplete: 'current-password',
49
- icon: React.createElement(Icon, { icon: 'lock' }),
50
- status: errors.password && 'failure',
51
- statusText: errors.password && translate({ id: errors.password }, intl)
51
+ autoComplete: 'current-password'
52
52
  }),
53
- React.createElement(Input, {
53
+ React.createElement(Checkbox, {
54
54
  className: 'layout-item-full-width remember-email-checkbox',
55
- type: 'checkbox',
56
- label: translate({
55
+ title: translate({
57
56
  id: 'label.remember-email',
58
57
  defaultMessage: 'Remember email'
59
58
  }, intl),
60
- value: shouldRememberEmail,
59
+ checked: shouldRememberEmail,
61
60
  onChange: handleToggleRememberEmail,
62
61
  name: 'remember-email'
63
62
  }),
64
63
  React.createElement(
65
- Button,
64
+ 'button',
66
65
  {
67
- className: 'button primary wide',
66
+ className: 'button primary wide ' + (isLoading && 'loading'),
68
67
  type: 'submit',
69
- isLoading: !!isLoading },
68
+ disabled: !!isLoading },
69
+ isLoading && React.createElement(ButtonLoader, null),
70
70
  translate({ id: 'action.button.login' }, intl)
71
71
  )
72
72
  );
@@ -12,6 +12,7 @@ import { injectIntl } from 'react-intl';
12
12
  import { range } from 'ramda';
13
13
  import Input from '../../components/Input';
14
14
  import Select from '../../components/Select';
15
+ import Checkbox from '../../components/Checkbox';
15
16
  import WithValidation from '../../lib/WithValidation';
16
17
  import require from '../../lib/WithValidation/rules/required';
17
18
  import number from '../../lib/WithValidation/rules/number';
@@ -267,18 +268,16 @@ var ContactInfo = function (_Component) {
267
268
  },
268
269
  defaultValue: 'Male'
269
270
  }),
270
- React.createElement(Input, {
271
- type: 'checkbox',
272
- label: intl.formatMessage({ id: 'label.terms-of-conditions' }),
271
+ React.createElement(Checkbox, {
272
+ title: intl.formatMessage({ id: 'label.terms-of-conditions' }),
273
273
  name: 'AcceptTerms',
274
274
  onChange: function onChange(e, name, val) {
275
275
  return _onChange(name, val);
276
276
  },
277
277
  error: errors.AcceptTerms && translate({ id: errors.AcceptTerms }, intl)
278
278
  }),
279
- React.createElement(Input, {
280
- type: 'checkbox',
281
- label: intl.formatMessage({
279
+ React.createElement(Checkbox, {
280
+ title: intl.formatMessage({
282
281
  id: 'label.optin.marketing',
283
282
  defaultMessage: 'I want to receive marketing material'
284
283
  }),
@@ -13,31 +13,17 @@ var SportsbookSettings = function SportsbookSettings(_ref) {
13
13
 
14
14
  return React.createElement(
15
15
  'form',
16
- {
17
- onSubmit: onSubmit,
18
- className: cn('SportsbookSettings', 'form', className) },
16
+ { onSubmit: onSubmit, className: cn('SportsbookSettings', className) },
19
17
  Array.isArray(selects) && selects.map(function (s, i) {
20
- return React.createElement(
21
- Select,
22
- {
23
- key: i,
24
- name: s.name,
25
- label: s.title,
26
- value: s.value,
27
- onChange: s.onChange || onChange },
28
- s.placeholder && React.createElement(
29
- Select.Option,
30
- { value: '', selected: true },
31
- s.placeholder
32
- ),
33
- s.options.map(function (o) {
34
- return React.createElement(
35
- Select.Option,
36
- { value: o.value },
37
- o.label
38
- );
39
- })
40
- );
18
+ return React.createElement(Select, {
19
+ key: i,
20
+ name: s.name,
21
+ title: s.title,
22
+ options: s.options,
23
+ value: s.value,
24
+ placeholder: s.placeholder,
25
+ onChange: s.onChange || onChange
26
+ });
41
27
  }),
42
28
  React.createElement(
43
29
  Button,