@dartech/arsenal-ui 1.4.70 → 1.4.72
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/index.js
CHANGED
@@ -1616,6 +1616,7 @@ const inputThemeOptions = {
|
|
1616
1616
|
MuiInputBase: {
|
1617
1617
|
styleOverrides: {
|
1618
1618
|
root: {
|
1619
|
+
color: '#262842',
|
1619
1620
|
borderRadius: baseTheme.spacing(3),
|
1620
1621
|
minWidth: baseTheme.spacing(25),
|
1621
1622
|
background: baseTheme.palette.background.default
|
@@ -1720,8 +1721,12 @@ const inputThemeOptions = {
|
|
1720
1721
|
MuiFormLabel: {
|
1721
1722
|
styleOverrides: {
|
1722
1723
|
root: {
|
1724
|
+
color: '#6D6E85',
|
1723
1725
|
fontSize: 14,
|
1724
|
-
fontWeight: 500
|
1726
|
+
fontWeight: 500,
|
1727
|
+
'& span': {
|
1728
|
+
color: '#D6331F'
|
1729
|
+
}
|
1725
1730
|
},
|
1726
1731
|
asterisk: {
|
1727
1732
|
color: '#D6331F',
|
@@ -3289,9 +3294,10 @@ const ControlPhoneInput = _a => {
|
|
3289
3294
|
mask = '+7 (799) 999 99 99',
|
3290
3295
|
requiredErrorText = '',
|
3291
3296
|
inputMaskProps,
|
3292
|
-
disabled
|
3297
|
+
disabled,
|
3298
|
+
invalidErrorText
|
3293
3299
|
} = _a,
|
3294
|
-
textFieldProps = __rest(_a, ["control", "name", "label", "required", "mask", "requiredErrorText", "inputMaskProps", "disabled"]);
|
3300
|
+
textFieldProps = __rest(_a, ["control", "name", "label", "required", "mask", "requiredErrorText", "inputMaskProps", "disabled", "invalidErrorText"]);
|
3295
3301
|
return jsx(Controller, {
|
3296
3302
|
control: control,
|
3297
3303
|
name: name,
|
@@ -3302,7 +3308,7 @@ const ControlPhoneInput = _a => {
|
|
3302
3308
|
return true;
|
3303
3309
|
}
|
3304
3310
|
if (!/(\+7\s\(\d{3}\)\s)(\d{3}\s\d{2})(\s\d{2})/.test(val)) {
|
3305
|
-
return 'Incorrect phone number format';
|
3311
|
+
return invalidErrorText || 'Incorrect phone number format';
|
3306
3312
|
}
|
3307
3313
|
return true;
|
3308
3314
|
}
|
package/package.json
CHANGED
@@ -9,8 +9,9 @@ type Props = TextFieldProps & {
|
|
9
9
|
mask?: string;
|
10
10
|
label?: ReactNode;
|
11
11
|
requiredErrorText?: string;
|
12
|
+
invalidErrorText?: string;
|
12
13
|
disabled?: boolean;
|
13
14
|
inputMaskProps?: InputMaskProps;
|
14
15
|
};
|
15
|
-
export declare const ControlPhoneInput: ({ control, name, label, required, mask, requiredErrorText, inputMaskProps, disabled, ...textFieldProps }: Props) => JSX.Element;
|
16
|
+
export declare const ControlPhoneInput: ({ control, name, label, required, mask, requiredErrorText, inputMaskProps, disabled, invalidErrorText, ...textFieldProps }: Props) => JSX.Element;
|
16
17
|
export default ControlPhoneInput;
|
@@ -10,6 +10,7 @@ declare const inputThemeOptions: {
|
|
10
10
|
MuiInputBase: {
|
11
11
|
styleOverrides: {
|
12
12
|
root: {
|
13
|
+
color: string;
|
13
14
|
borderRadius: string;
|
14
15
|
minWidth: string;
|
15
16
|
background: string;
|
@@ -106,8 +107,12 @@ declare const inputThemeOptions: {
|
|
106
107
|
MuiFormLabel: {
|
107
108
|
styleOverrides: {
|
108
109
|
root: {
|
110
|
+
color: string;
|
109
111
|
fontSize: number;
|
110
112
|
fontWeight: number;
|
113
|
+
'& span': {
|
114
|
+
color: string;
|
115
|
+
};
|
111
116
|
};
|
112
117
|
asterisk: {
|
113
118
|
color: string;
|