@micromag/element-checkbox 0.2.287 → 0.2.315

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.
package/es/index.js CHANGED
@@ -11,6 +11,7 @@ var propTypes = {
11
11
  option: PropTypes.textElement,
12
12
  value: PropTypes$1.bool,
13
13
  onChange: PropTypes$1.func,
14
+ focusable: PropTypes$1.bool,
14
15
  checkboxStyle: PropTypes$1.object,
15
16
  // eslint-disable-line
16
17
  className: PropTypes$1.string
@@ -19,6 +20,7 @@ var defaultProps = {
19
20
  option: null,
20
21
  value: null,
21
22
  onChange: null,
23
+ focusable: true,
22
24
  checkboxStyle: null,
23
25
  className: null
24
26
  };
@@ -27,6 +29,7 @@ var Checkbox = function Checkbox(_ref) {
27
29
  var option = _ref.option,
28
30
  value = _ref.value,
29
31
  _onChange = _ref.onChange,
32
+ focusable = _ref.focusable,
30
33
  checkboxStyle = _ref.checkboxStyle,
31
34
  className = _ref.className;
32
35
 
@@ -47,6 +50,7 @@ var Checkbox = function Checkbox(_ref) {
47
50
  autoComplete: "off",
48
51
  value: value === true,
49
52
  checked: value === true,
53
+ tabIndex: focusable ? '0' : '-1',
50
54
  onChange: function onChange() {
51
55
  if (_onChange !== null) {
52
56
  _onChange(!value);
package/lib/index.js CHANGED
@@ -21,6 +21,7 @@ var propTypes = {
21
21
  option: core.PropTypes.textElement,
22
22
  value: PropTypes__default['default'].bool,
23
23
  onChange: PropTypes__default['default'].func,
24
+ focusable: PropTypes__default['default'].bool,
24
25
  checkboxStyle: PropTypes__default['default'].object,
25
26
  // eslint-disable-line
26
27
  className: PropTypes__default['default'].string
@@ -29,6 +30,7 @@ var defaultProps = {
29
30
  option: null,
30
31
  value: null,
31
32
  onChange: null,
33
+ focusable: true,
32
34
  checkboxStyle: null,
33
35
  className: null
34
36
  };
@@ -37,6 +39,7 @@ var Checkbox = function Checkbox(_ref) {
37
39
  var option = _ref.option,
38
40
  value = _ref.value,
39
41
  _onChange = _ref.onChange,
42
+ focusable = _ref.focusable,
40
43
  checkboxStyle = _ref.checkboxStyle,
41
44
  className = _ref.className;
42
45
 
@@ -57,6 +60,7 @@ var Checkbox = function Checkbox(_ref) {
57
60
  autoComplete: "off",
58
61
  value: value === true,
59
62
  checked: value === true,
63
+ tabIndex: focusable ? '0' : '-1',
60
64
  onChange: function onChange() {
61
65
  if (_onChange !== null) {
62
66
  _onChange(!value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-checkbox",
3
- "version": "0.2.287",
3
+ "version": "0.2.315",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.2.287",
52
+ "@micromag/core": "^0.2.315",
53
53
  "change-case": "^4.1.2",
54
54
  "classnames": "^2.2.6",
55
55
  "lodash": "^4.17.20",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "cd683d40baf88a5d02714cd9cdc7a45575bd2401"
63
+ "gitHead": "a08edd143bdd81de6477f637e08046e0130da237"
64
64
  }