@verifiedinc-public/shared-ui-elements 0.14.5-beta.5 → 0.14.5-beta.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/package.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Autocomplete } from '@mui/material';
|
1
|
+
import { Autocomplete, AutocompleteProps } from '@mui/material';
|
2
2
|
import { useState } from 'react';
|
3
3
|
import {
|
4
4
|
TextField,
|
@@ -21,6 +21,7 @@ interface SelectInputProps {
|
|
21
21
|
value?: Option | null; // Controlled value
|
22
22
|
defaultOption?: Option;
|
23
23
|
InputProps?: TextFieldProps;
|
24
|
+
disableClearable?: boolean;
|
24
25
|
}
|
25
26
|
|
26
27
|
/**
|
@@ -33,6 +34,7 @@ export function SelectInput({
|
|
33
34
|
value: controlledValue,
|
34
35
|
onChange,
|
35
36
|
onClear,
|
37
|
+
disableClearable,
|
36
38
|
...props
|
37
39
|
}: SelectInputProps): React.JSX.Element {
|
38
40
|
const [internalValue, setInternalValue] = useState<Option | null>(
|
@@ -74,6 +76,7 @@ export function SelectInput({
|
|
74
76
|
autoHighlight
|
75
77
|
defaultValue={defaultOption}
|
76
78
|
options={options}
|
79
|
+
disableClearable={disableClearable}
|
77
80
|
isOptionEqualToValue={(option, value) => option?.id === value?.id}
|
78
81
|
value={value}
|
79
82
|
onChange={(_event, newInputValue) => {
|
package/src/utils/ssn.ts
CHANGED
@@ -4,5 +4,5 @@
|
|
4
4
|
* @param {string} rawValue the raw value of the ssncredential
|
5
5
|
* @returns {string} the formatted value
|
6
6
|
*/
|
7
|
-
export const ssnFormatter = (rawValue: string) =>
|
7
|
+
export const ssnFormatter = (rawValue: string): string =>
|
8
8
|
rawValue.replace(/(\d{3})-?(\d{2})-?(\d{4})/, '•••-••-$3');
|