@availity/mui-autocomplete 0.8.4 → 0.8.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.
- package/CHANGELOG.md +17 -0
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +5 -5
- package/src/lib/Autocomplete.test.tsx +11 -0
- package/src/lib/Autocomplete.tsx +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.8.6](https://github.com/Availity/element/compare/@availity/mui-autocomplete@0.8.5...@availity/mui-autocomplete@0.8.6) (2024-10-25)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-form-utils` updated to version `0.8.5`
|
|
10
|
+
* `mui-textfield` updated to version `0.8.5`
|
|
11
|
+
## [0.8.5](https://github.com/Availity/element/compare/@availity/mui-autocomplete@0.8.4...@availity/mui-autocomplete@0.8.5) (2024-10-18)
|
|
12
|
+
|
|
13
|
+
### Dependency Updates
|
|
14
|
+
|
|
15
|
+
* `mui-form-utils` updated to version `0.8.4`
|
|
16
|
+
* `mui-textfield` updated to version `0.8.4`
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **mui-form-utils:** resolve aria-controls warnings ([487fe12](https://github.com/Availity/element/commit/487fe12229a2f1510f8e7ba76028f798896a1b20))
|
|
21
|
+
|
|
5
22
|
## [0.8.4](https://github.com/Availity/element/compare/@availity/mui-autocomplete@0.8.3...@availity/mui-autocomplete@0.8.4) (2024-10-01)
|
|
6
23
|
|
|
7
24
|
### Dependency Updates
|
package/dist/index.js
CHANGED
|
@@ -117,7 +117,10 @@ var Autocomplete = (_a) => {
|
|
|
117
117
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingIndicator, {})
|
|
118
118
|
] }) : (params == null ? void 0 : params.InputProps.endAdornment) || null
|
|
119
119
|
}),
|
|
120
|
-
inputProps: __spreadValues(__spreadValues({}, FieldProps == null ? void 0 : FieldProps.inputProps), params == null ? void 0 : params.inputProps)
|
|
120
|
+
inputProps: __spreadProps(__spreadValues(__spreadValues({}, FieldProps == null ? void 0 : FieldProps.inputProps), params == null ? void 0 : params.inputProps), {
|
|
121
|
+
// appease the Level Access scanning tools
|
|
122
|
+
"aria-controls": (params == null ? void 0 : params.inputProps["aria-controls"]) || ""
|
|
123
|
+
})
|
|
121
124
|
});
|
|
122
125
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
126
|
import_Autocomplete.default,
|
package/dist/index.mjs
CHANGED
|
@@ -83,7 +83,10 @@ var Autocomplete = (_a) => {
|
|
|
83
83
|
/* @__PURE__ */ jsx(LoadingIndicator, {})
|
|
84
84
|
] }) : (params == null ? void 0 : params.InputProps.endAdornment) || null
|
|
85
85
|
}),
|
|
86
|
-
inputProps: __spreadValues(__spreadValues({}, FieldProps == null ? void 0 : FieldProps.inputProps), params == null ? void 0 : params.inputProps)
|
|
86
|
+
inputProps: __spreadProps(__spreadValues(__spreadValues({}, FieldProps == null ? void 0 : FieldProps.inputProps), params == null ? void 0 : params.inputProps), {
|
|
87
|
+
// appease the Level Access scanning tools
|
|
88
|
+
"aria-controls": (params == null ? void 0 : params.inputProps["aria-controls"]) || ""
|
|
89
|
+
})
|
|
87
90
|
});
|
|
88
91
|
return /* @__PURE__ */ jsx(
|
|
89
92
|
MuiAutocomplete,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-autocomplete",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Availity MUI Autocomplete Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@availity/api-axios": "^9.0.0",
|
|
40
|
-
"@availity/mui-form-utils": "^0.13.
|
|
41
|
-
"@availity/mui-textfield": "^0.6.
|
|
40
|
+
"@availity/mui-form-utils": "^0.13.2",
|
|
41
|
+
"@availity/mui-textfield": "^0.6.10",
|
|
42
42
|
"@mui/material": "^5.15.15",
|
|
43
43
|
"@tanstack/react-query": "^4.36.1",
|
|
44
44
|
"react": "18.2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@availity/api-axios": "^8.0.7",
|
|
51
|
-
"@availity/mui-form-utils": "^0.13.
|
|
52
|
-
"@availity/mui-textfield": "^0.6.
|
|
51
|
+
"@availity/mui-form-utils": "^0.13.2",
|
|
52
|
+
"@availity/mui-textfield": "^0.6.10",
|
|
53
53
|
"@mui/material": "^5.11.9",
|
|
54
54
|
"@tanstack/react-query": "^4.36.1",
|
|
55
55
|
"react": ">=16.3.0"
|
|
@@ -6,4 +6,15 @@ describe('Autocomplete', () => {
|
|
|
6
6
|
const { getByLabelText } = render(<Autocomplete FieldProps={{ label: 'Test' }} options={['1', '2', '3']} />);
|
|
7
7
|
expect(getByLabelText('Test')).toBeTruthy();
|
|
8
8
|
});
|
|
9
|
+
test('aria-controls should be empty string when not open', () => {
|
|
10
|
+
const { getByRole } = render(<Autocomplete FieldProps={{ label: 'Test' }} options={['1', '2', '3']} />);
|
|
11
|
+
const combobox = getByRole('combobox')
|
|
12
|
+
expect(combobox.getAttribute('aria-controls')).toEqual('');
|
|
13
|
+
});
|
|
14
|
+
test('aria-controls should not be empty when open', () => {
|
|
15
|
+
const { getByRole } = render(<Autocomplete open FieldProps={{ label: 'Test' }} options={['1', '2', '3']} />);
|
|
16
|
+
const combobox = getByRole('combobox', { hidden: true })
|
|
17
|
+
expect(combobox.getAttribute('aria-controls')).not.toEqual('');
|
|
18
|
+
expect(combobox.getAttribute('aria-controls')).toMatch(':r');
|
|
19
|
+
});
|
|
9
20
|
});
|
package/src/lib/Autocomplete.tsx
CHANGED