tg-core-components 6.1.18 → 6.1.19-BT-47-tabindex-on-phonenumber.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.
@@ -9,7 +9,7 @@ import cn from 'classnames';
9
9
 
10
10
  var PhoneNumberInput = function PhoneNumberInput(props) {
11
11
  var val = props.value || '';
12
-
12
+ var startTabIndex = props.startTabIndex || '';
13
13
  var callingCodeValue = ((props.callingCodes || []).slice().sort(function (a, b) {
14
14
  return b.value - a.value;
15
15
  }).find(function (c) {
@@ -60,7 +60,9 @@ var PhoneNumberInput = function PhoneNumberInput(props) {
60
60
  { className: cn(props.className, className) },
61
61
  callingCodeSelect.value.hasValue && React.createElement(
62
62
  Select,
63
- _extends({}, flatObj(callingCodeSelect), {
63
+ _extends({
64
+ tabIndex: startTabIndex
65
+ }, flatObj(callingCodeSelect), {
64
66
  name: props.name + '_calling-code',
65
67
  label: React.createElement(Translate, { id: 'label.calling-code', defaultMessage: 'Calling code' }),
66
68
  onChange: function onChange(e) {
@@ -74,7 +76,8 @@ var PhoneNumberInput = function PhoneNumberInput(props) {
74
76
  status: props.status,
75
77
  leadingLane: [props.selectIcon].filter(function (i) {
76
78
  return i;
77
- }) }),
79
+ })
80
+ }),
78
81
  (props.callingCodes || []).map(function (c, i) {
79
82
  return React.createElement(
80
83
  Select.Option,
@@ -85,6 +88,7 @@ var PhoneNumberInput = function PhoneNumberInput(props) {
85
88
  ),
86
89
  React.createElement(Input, _extends({}, flatObj(phoneNumberInput), {
87
90
  autoFocus: props.autoFocus,
91
+ tabIndex: startTabIndex + 1,
88
92
  type: 'tel',
89
93
  name: props.name + '_number',
90
94
  label: React.createElement(Translate, {
@@ -26,7 +26,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
26
26
 
27
27
  var PhoneNumberInput = function PhoneNumberInput(props) {
28
28
  var val = props.value || '';
29
-
29
+ var startTabIndex = props.startTabIndex || '';
30
30
  var callingCodeValue = ((props.callingCodes || []).slice().sort(function (a, b) {
31
31
  return b.value - a.value;
32
32
  }).find(function (c) {
@@ -77,7 +77,9 @@ var PhoneNumberInput = function PhoneNumberInput(props) {
77
77
  { className: (0, _classnames2.default)(props.className, className) },
78
78
  callingCodeSelect.value.hasValue && _react2.default.createElement(
79
79
  _common.Select,
80
- _extends({}, (0, _common.flatObj)(callingCodeSelect), {
80
+ _extends({
81
+ tabIndex: startTabIndex
82
+ }, (0, _common.flatObj)(callingCodeSelect), {
81
83
  name: props.name + '_calling-code',
82
84
  label: _react2.default.createElement(_Translate2.default, { id: 'label.calling-code', defaultMessage: 'Calling code' }),
83
85
  onChange: function onChange(e) {
@@ -91,7 +93,8 @@ var PhoneNumberInput = function PhoneNumberInput(props) {
91
93
  status: props.status,
92
94
  leadingLane: [props.selectIcon].filter(function (i) {
93
95
  return i;
94
- }) }),
96
+ })
97
+ }),
95
98
  (props.callingCodes || []).map(function (c, i) {
96
99
  return _react2.default.createElement(
97
100
  _common.Select.Option,
@@ -102,6 +105,7 @@ var PhoneNumberInput = function PhoneNumberInput(props) {
102
105
  ),
103
106
  _react2.default.createElement(_common.Input, _extends({}, (0, _common.flatObj)(phoneNumberInput), {
104
107
  autoFocus: props.autoFocus,
108
+ tabIndex: startTabIndex + 1,
105
109
  type: 'tel',
106
110
  name: props.name + '_number',
107
111
  label: _react2.default.createElement(_Translate2.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-core-components",
3
- "version": "6.1.18",
3
+ "version": "6.1.19-BT-47-tabindex-on-phonenumber.1",
4
4
  "description": "tg-core-components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",