@dhis2-ui/checkbox 9.11.4 → 9.11.6

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.
@@ -65,8 +65,8 @@ class Checkbox extends _react.Component {
65
65
  }
66
66
  render() {
67
67
  const {
68
- checked,
69
- indeterminate,
68
+ checked = false,
69
+ indeterminate = false,
70
70
  className,
71
71
  disabled,
72
72
  error,
@@ -77,7 +77,7 @@ class Checkbox extends _react.Component {
77
77
  value,
78
78
  warning,
79
79
  dense,
80
- dataTest
80
+ dataTest = 'dhis2-uicore-checkbox'
81
81
  } = this.props;
82
82
  const classes = (0, _classnames.default)({
83
83
  checked,
@@ -121,11 +121,11 @@ class Checkbox extends _react.Component {
121
121
  }
122
122
  }
123
123
  exports.Checkbox = Checkbox;
124
- Checkbox.defaultProps = {
124
+ _defineProperty(Checkbox, "defaultProps", {
125
125
  checked: false,
126
126
  indeterminate: false,
127
127
  dataTest: 'dhis2-uicore-checkbox'
128
- };
128
+ });
129
129
  const uniqueOnStatePropType = (0, _propTypes.mutuallyExclusive)(['checked', 'indeterminate'], _propTypes2.default.bool);
130
130
  Checkbox.propTypes = {
131
131
  checked: uniqueOnStatePropType,
@@ -47,7 +47,7 @@ const CheckboxField = _ref2 => {
47
47
  required,
48
48
  helpText,
49
49
  validationText,
50
- dataTest
50
+ dataTest = 'dhis2-uiwidgets-checkboxfield'
51
51
  } = _ref2;
52
52
  return /*#__PURE__*/_react.default.createElement(_field.Field, {
53
53
  className: className,
@@ -81,9 +81,6 @@ const CheckboxField = _ref2 => {
81
81
  }));
82
82
  };
83
83
  exports.CheckboxField = CheckboxField;
84
- CheckboxField.defaultProps = {
85
- dataTest: 'dhis2-uiwidgets-checkboxfield'
86
- };
87
84
  CheckboxField.propTypes = {
88
85
  checked: _propTypes.default.bool,
89
86
  className: _propTypes.default.string,
@@ -56,8 +56,8 @@ class Checkbox extends Component {
56
56
  }
57
57
  render() {
58
58
  const {
59
- checked,
60
- indeterminate,
59
+ checked = false,
60
+ indeterminate = false,
61
61
  className,
62
62
  disabled,
63
63
  error,
@@ -68,7 +68,7 @@ class Checkbox extends Component {
68
68
  value,
69
69
  warning,
70
70
  dense,
71
- dataTest
71
+ dataTest = 'dhis2-uicore-checkbox'
72
72
  } = this.props;
73
73
  const classes = cx({
74
74
  checked,
@@ -111,11 +111,11 @@ class Checkbox extends Component {
111
111
  }, [`label.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer;color:${colors.grey900};font-size:14px;line-height:19px;}`, "label.dense.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;}", `label.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;color:${theme.disabled};}`, "input.__jsx-style-dynamic-selector{opacity:0;position:absolute;height:18px;width:18px;inset-inline-start:3px;}", "label.dense.__jsx-style-dynamic-selector input.__jsx-style-dynamic-selector{height:14px;width:14px;}", `.icon.__jsx-style-dynamic-selector{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-inline-end:${spacers.dp4};border:2px solid transparent;padding:1px;border-radius:5px;}`, "label.dense.__jsx-style-dynamic-selector .icon.__jsx-style-dynamic-selector{margin-inline-end:3px;border-radius:4px;}", `input.__jsx-style-dynamic-selector:focus+.icon.__jsx-style-dynamic-selector{outline:3px solid ${theme.focus};outline-offset:-3px;}`]));
112
112
  }
113
113
  }
114
- Checkbox.defaultProps = {
114
+ _defineProperty(Checkbox, "defaultProps", {
115
115
  checked: false,
116
116
  indeterminate: false,
117
117
  dataTest: 'dhis2-uicore-checkbox'
118
- };
118
+ });
119
119
  const uniqueOnStatePropType = mutuallyExclusive(['checked', 'indeterminate'], PropTypes.bool);
120
120
  Checkbox.propTypes = {
121
121
  checked: uniqueOnStatePropType,
@@ -40,7 +40,7 @@ const CheckboxField = _ref2 => {
40
40
  required,
41
41
  helpText,
42
42
  validationText,
43
- dataTest
43
+ dataTest = 'dhis2-uiwidgets-checkboxfield'
44
44
  } = _ref2;
45
45
  return /*#__PURE__*/React.createElement(Field, {
46
46
  className: className,
@@ -73,9 +73,6 @@ const CheckboxField = _ref2 => {
73
73
  initialFocus: initialFocus
74
74
  }));
75
75
  };
76
- CheckboxField.defaultProps = {
77
- dataTest: 'dhis2-uiwidgets-checkboxfield'
78
- };
79
76
  CheckboxField.propTypes = {
80
77
  checked: PropTypes.bool,
81
78
  className: PropTypes.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/checkbox",
3
- "version": "9.11.4",
3
+ "version": "9.11.6",
4
4
  "description": "UI Checkbox",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,9 +33,9 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/field": "9.11.4",
37
- "@dhis2-ui/required": "9.11.4",
38
- "@dhis2/ui-constants": "9.11.4",
36
+ "@dhis2-ui/field": "9.11.6",
37
+ "@dhis2-ui/required": "9.11.6",
38
+ "@dhis2/ui-constants": "9.11.6",
39
39
  "classnames": "^2.3.1",
40
40
  "prop-types": "^15.7.2"
41
41
  },