@dhis2-ui/input 7.3.0 → 7.4.3

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.
@@ -134,6 +134,7 @@ class Input extends _react.Component {
134
134
  max,
135
135
  min,
136
136
  step,
137
+ autoComplete,
137
138
  dataTest
138
139
  } = this.props;
139
140
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -153,6 +154,7 @@ class Input extends _react.Component {
153
154
  disabled: disabled,
154
155
  readOnly: readOnly,
155
156
  tabIndex: tabIndex,
157
+ autoComplete: autoComplete,
156
158
  onFocus: this.handleFocus,
157
159
  onBlur: this.handleBlur,
158
160
  onChange: this.handleChange,
@@ -186,6 +188,8 @@ Input.defaultProps = {
186
188
  dataTest: 'dhis2-uicore-input'
187
189
  };
188
190
  Input.propTypes = {
191
+ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */
192
+ autoComplete: _propTypes.default.string,
189
193
  className: _propTypes.default.string,
190
194
  dataTest: _propTypes.default.string,
191
195
 
@@ -204,10 +208,10 @@ Input.propTypes = {
204
208
  /** Adds a loading indicator beside the input */
205
209
  loading: _propTypes.default.bool,
206
210
 
207
- /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmax), for use when `type` is `'number'` */
211
+ /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max), for use when `type` is `'number'` */
208
212
  max: _propTypes.default.string,
209
213
 
210
- /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmin), for use when `type` is `'number'` */
214
+ /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min), for use when `type` is `'number'` */
211
215
  min: _propTypes.default.string,
212
216
 
213
217
  /** Name associated with the input. Passed to event handler callbacks in object */
@@ -222,7 +226,7 @@ Input.propTypes = {
222
226
  /** Sets a role attribute on the input */
223
227
  role: _propTypes.default.string,
224
228
 
225
- /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefstep), for use when `type` is `'number'` */
229
+ /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step), for use when `type` is `'number'` */
226
230
  step: _propTypes.default.string,
227
231
  tabIndex: _propTypes.default.string,
228
232
 
@@ -47,6 +47,7 @@ class InputField extends _react.default.Component {
47
47
  helpText,
48
48
  validationText,
49
49
  inputWidth,
50
+ autoComplete,
50
51
  dataTest
51
52
  } = this.props;
52
53
  return /*#__PURE__*/_react.default.createElement(_field.Field, {
@@ -83,7 +84,8 @@ class InputField extends _react.default.Component {
83
84
  dense: dense,
84
85
  tabIndex: tabIndex,
85
86
  initialFocus: initialFocus,
86
- readOnly: readOnly
87
+ readOnly: readOnly,
88
+ autoComplete: autoComplete
87
89
  })));
88
90
  }
89
91
 
@@ -94,6 +96,8 @@ InputField.defaultProps = {
94
96
  dataTest: 'dhis2-uiwidgets-inputfield'
95
97
  };
96
98
  InputField.propTypes = {
99
+ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */
100
+ autoComplete: _propTypes.default.string,
97
101
  className: _propTypes.default.string,
98
102
  dataTest: _propTypes.default.string,
99
103
 
@@ -121,10 +125,10 @@ InputField.propTypes = {
121
125
  /** Adds a loading indicator beside the input */
122
126
  loading: _propTypes.default.bool,
123
127
 
124
- /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmax), for use when `type` is `'number'` */
128
+ /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max), for use when `type` is `'number'` */
125
129
  max: _propTypes.default.string,
126
130
 
127
- /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmin), for use when `type` is `'number'` */
131
+ /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min), for use when `type` is `'number'` */
128
132
  min: _propTypes.default.string,
129
133
 
130
134
  /** Name associated with the input. Passed to event handler callbacks in object */
@@ -139,7 +143,7 @@ InputField.propTypes = {
139
143
  /** Indicates this input is required */
140
144
  required: _propTypes.default.bool,
141
145
 
142
- /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefstep), for use when `type` is `'number'` */
146
+ /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step), for use when `type` is `'number'` */
143
147
  step: _propTypes.default.string,
144
148
  tabIndex: _propTypes.default.string,
145
149
 
@@ -115,6 +115,7 @@ export class Input extends Component {
115
115
  max,
116
116
  min,
117
117
  step,
118
+ autoComplete,
118
119
  dataTest
119
120
  } = this.props;
120
121
  return /*#__PURE__*/React.createElement("div", {
@@ -134,6 +135,7 @@ export class Input extends Component {
134
135
  disabled: disabled,
135
136
  readOnly: readOnly,
136
137
  tabIndex: tabIndex,
138
+ autoComplete: autoComplete,
137
139
  onFocus: this.handleFocus,
138
140
  onBlur: this.handleBlur,
139
141
  onChange: this.handleChange,
@@ -165,6 +167,8 @@ Input.defaultProps = {
165
167
  dataTest: 'dhis2-uicore-input'
166
168
  };
167
169
  Input.propTypes = {
170
+ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */
171
+ autoComplete: PropTypes.string,
168
172
  className: PropTypes.string,
169
173
  dataTest: PropTypes.string,
170
174
 
@@ -183,10 +187,10 @@ Input.propTypes = {
183
187
  /** Adds a loading indicator beside the input */
184
188
  loading: PropTypes.bool,
185
189
 
186
- /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmax), for use when `type` is `'number'` */
190
+ /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max), for use when `type` is `'number'` */
187
191
  max: PropTypes.string,
188
192
 
189
- /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmin), for use when `type` is `'number'` */
193
+ /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min), for use when `type` is `'number'` */
190
194
  min: PropTypes.string,
191
195
 
192
196
  /** Name associated with the input. Passed to event handler callbacks in object */
@@ -201,7 +205,7 @@ Input.propTypes = {
201
205
  /** Sets a role attribute on the input */
202
206
  role: PropTypes.string,
203
207
 
204
- /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefstep), for use when `type` is `'number'` */
208
+ /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step), for use when `type` is `'number'` */
205
209
  step: PropTypes.string,
206
210
  tabIndex: PropTypes.string,
207
211
 
@@ -33,6 +33,7 @@ class InputField extends React.Component {
33
33
  helpText,
34
34
  validationText,
35
35
  inputWidth,
36
+ autoComplete,
36
37
  dataTest
37
38
  } = this.props;
38
39
  return /*#__PURE__*/React.createElement(Field, {
@@ -69,7 +70,8 @@ class InputField extends React.Component {
69
70
  dense: dense,
70
71
  tabIndex: tabIndex,
71
72
  initialFocus: initialFocus,
72
- readOnly: readOnly
73
+ readOnly: readOnly,
74
+ autoComplete: autoComplete
73
75
  })));
74
76
  }
75
77
 
@@ -79,6 +81,8 @@ InputField.defaultProps = {
79
81
  dataTest: 'dhis2-uiwidgets-inputfield'
80
82
  };
81
83
  InputField.propTypes = {
84
+ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */
85
+ autoComplete: PropTypes.string,
82
86
  className: PropTypes.string,
83
87
  dataTest: PropTypes.string,
84
88
 
@@ -106,10 +110,10 @@ InputField.propTypes = {
106
110
  /** Adds a loading indicator beside the input */
107
111
  loading: PropTypes.bool,
108
112
 
109
- /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmax), for use when `type` is `'number'` */
113
+ /** The [native `max` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max), for use when `type` is `'number'` */
110
114
  max: PropTypes.string,
111
115
 
112
- /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmin), for use when `type` is `'number'` */
116
+ /** The [native `min` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min), for use when `type` is `'number'` */
113
117
  min: PropTypes.string,
114
118
 
115
119
  /** Name associated with the input. Passed to event handler callbacks in object */
@@ -124,7 +128,7 @@ InputField.propTypes = {
124
128
  /** Indicates this input is required */
125
129
  required: PropTypes.bool,
126
130
 
127
- /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefstep), for use when `type` is `'number'` */
131
+ /** The [native `step` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step), for use when `type` is `'number'` */
128
132
  step: PropTypes.string,
129
133
  tabIndex: PropTypes.string,
130
134
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/input",
3
- "version": "7.3.0",
3
+ "version": "7.4.3",
4
4
  "description": "UI Input",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,12 +32,12 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@dhis2/prop-types": "^3.0.0-beta.1",
35
- "@dhis2-ui/box": "7.3.0",
36
- "@dhis2-ui/field": "7.3.0",
37
- "@dhis2-ui/input": "7.3.0",
38
- "@dhis2-ui/loader": "7.3.0",
39
- "@dhis2/ui-constants": "7.3.0",
40
- "@dhis2/ui-icons": "7.3.0",
35
+ "@dhis2-ui/box": "7.4.3",
36
+ "@dhis2-ui/field": "7.4.3",
37
+ "@dhis2-ui/input": "7.4.3",
38
+ "@dhis2-ui/loader": "7.4.3",
39
+ "@dhis2/ui-constants": "7.4.3",
40
+ "@dhis2/ui-icons": "7.4.3",
41
41
  "classnames": "^2.3.1",
42
42
  "prop-types": "^15.7.2"
43
43
  },