@dhis2-ui/input 10.9.2 → 10.10.0-alpha.2

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.
@@ -67,6 +67,9 @@ class Input extends _react.Component {
67
67
  render() {
68
68
  const {
69
69
  role,
70
+ ariaLabel,
71
+ ariaControls,
72
+ ariaHaspopup,
70
73
  className,
71
74
  type = 'text',
72
75
  dense,
@@ -101,6 +104,9 @@ class Input extends _react.Component {
101
104
  }, prefixIcon && /*#__PURE__*/_react.default.createElement("span", {
102
105
  className: `jsx-${styles.__hash}` + " " + _style.default.dynamic([["1599465870", [width || `100%`, _uiConstants.colors.grey600, clearButtonPadding, _uiConstants.colors.grey500]]]) + " " + "prefix"
103
106
  }, prefixIcon), /*#__PURE__*/_react.default.createElement("input", {
107
+ "aria-label": ariaLabel,
108
+ "aria-controls": ariaControls,
109
+ "aria-haspopup": ariaHaspopup,
104
110
  role: role,
105
111
  id: name,
106
112
  name: name,
@@ -152,6 +158,12 @@ _defineProperty(Input, "defaultProps", {
152
158
  dataTest: 'dhis2-uicore-input'
153
159
  });
154
160
  Input.propTypes = {
161
+ /** Add an aria-controls attribute to the input element **/
162
+ ariaControls: _propTypes.default.string,
163
+ /** Add an aria-haspopup attribute to the input element **/
164
+ ariaHaspopup: _propTypes.default.string,
165
+ /** Add an aria-label attribute to the input element **/
166
+ ariaLabel: _propTypes.default.string,
155
167
  /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */
156
168
  autoComplete: _propTypes.default.string,
157
169
  className: _propTypes.default.string,
@@ -58,6 +58,9 @@ export class Input extends Component {
58
58
  render() {
59
59
  const {
60
60
  role,
61
+ ariaLabel,
62
+ ariaControls,
63
+ ariaHaspopup,
61
64
  className,
62
65
  type = 'text',
63
66
  dense,
@@ -92,6 +95,9 @@ export class Input extends Component {
92
95
  }, prefixIcon && /*#__PURE__*/React.createElement("span", {
93
96
  className: `jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([["1599465870", [width || `100%`, colors.grey600, clearButtonPadding, colors.grey500]]]) + " " + "prefix"
94
97
  }, prefixIcon), /*#__PURE__*/React.createElement("input", {
98
+ "aria-label": ariaLabel,
99
+ "aria-controls": ariaControls,
100
+ "aria-haspopup": ariaHaspopup,
95
101
  role: role,
96
102
  id: name,
97
103
  name: name,
@@ -142,6 +148,12 @@ _defineProperty(Input, "defaultProps", {
142
148
  dataTest: 'dhis2-uicore-input'
143
149
  });
144
150
  Input.propTypes = {
151
+ /** Add an aria-controls attribute to the input element **/
152
+ ariaControls: PropTypes.string,
153
+ /** Add an aria-haspopup attribute to the input element **/
154
+ ariaHaspopup: PropTypes.string,
155
+ /** Add an aria-label attribute to the input element **/
156
+ ariaLabel: PropTypes.string,
145
157
  /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */
146
158
  autoComplete: PropTypes.string,
147
159
  className: PropTypes.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/input",
3
- "version": "10.9.2",
3
+ "version": "10.10.0-alpha.2",
4
4
  "description": "UI Input",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,13 +33,13 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/box": "10.9.2",
37
- "@dhis2-ui/field": "10.9.2",
38
- "@dhis2-ui/input": "10.9.2",
39
- "@dhis2-ui/loader": "10.9.2",
40
- "@dhis2-ui/status-icon": "10.9.2",
41
- "@dhis2/ui-constants": "10.9.2",
42
- "@dhis2/ui-icons": "10.9.2",
36
+ "@dhis2-ui/box": "10.10.0-alpha.2",
37
+ "@dhis2-ui/field": "10.10.0-alpha.2",
38
+ "@dhis2-ui/input": "10.10.0-alpha.2",
39
+ "@dhis2-ui/loader": "10.10.0-alpha.2",
40
+ "@dhis2-ui/status-icon": "10.10.0-alpha.2",
41
+ "@dhis2/ui-constants": "10.10.0-alpha.2",
42
+ "@dhis2/ui-icons": "10.10.0-alpha.2",
43
43
  "classnames": "^2.3.1",
44
44
  "prop-types": "^15.7.2"
45
45
  },