@mezzanine-ui/react 0.13.11 → 0.13.12

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.
@@ -14,7 +14,10 @@ function useAutoCompleteBaseValueControl(props) {
14
14
  });
15
15
  const [searchText, setSearchText] = useState('');
16
16
  const [focused, setFocused] = useState(false);
17
- const searchTextReg = new RegExp(searchText.replace(/\\/g, '\\\\'), 'i');
17
+ /** escape all special characters */
18
+ const searchTextReg = new RegExp(searchText
19
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
20
+ .replace(/-/g, '\\x2d'));
18
21
  const onFocus = useCallback((focus) => {
19
22
  setFocused(focus);
20
23
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/react",
3
- "version": "0.13.11",
3
+ "version": "0.13.12",
4
4
  "description": "React components for mezzanine-ui",
5
5
  "author": "Mezzanine",
6
6
  "repository": {
@@ -28,9 +28,9 @@
28
28
  "react-dom": "^18.2.0"
29
29
  },
30
30
  "dependencies": {
31
- "@mezzanine-ui/core": "^0.13.11",
32
- "@mezzanine-ui/icons": "^0.13.11",
33
- "@mezzanine-ui/system": "^0.13.11",
31
+ "@mezzanine-ui/core": "^0.13.12",
32
+ "@mezzanine-ui/icons": "^0.13.12",
33
+ "@mezzanine-ui/system": "^0.13.12",
34
34
  "@popperjs/core": "^2.11.6",
35
35
  "@types/react-transition-group": "^4.4.8",
36
36
  "clsx": "^2.0.0",