@hitachivantara/uikit-react-core 5.96.2 → 5.96.3
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/dist/cjs/BaseInput/validations.cjs +13 -47
- package/dist/cjs/Input/Input.cjs +4 -12
- package/dist/cjs/TagsInput/TagsInput.cjs +1 -1
- package/dist/cjs/TextArea/TextArea.cjs +2 -3
- package/dist/esm/BaseInput/validations.js +13 -47
- package/dist/esm/Input/Input.js +5 -13
- package/dist/esm/TagsInput/TagsInput.js +1 -1
- package/dist/esm/TextArea/TextArea.js +2 -3
- package/dist/types/index.d.ts +14 -12
- package/package.json +2 -2
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
num.trim().length > 0 && !Number.isNaN(Number(num))
|
|
6
|
-
);
|
|
7
|
-
const isEmail = (email) => {
|
|
8
|
-
const regexp = /^[^\\s]+[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?[.])+[a-z0-9](?:[a-z0-9-]*[a-z0-9])$/i;
|
|
9
|
-
return regexp.test(email);
|
|
3
|
+
const isTypeValidationIgnored = (type) => {
|
|
4
|
+
return type === "text" || type === "password";
|
|
10
5
|
};
|
|
11
|
-
const
|
|
12
|
-
switch (type) {
|
|
13
|
-
case "number":
|
|
14
|
-
return "number";
|
|
15
|
-
case "email":
|
|
16
|
-
return "email";
|
|
17
|
-
default:
|
|
18
|
-
return "none";
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const hasBuiltInValidations = (required, validationType, minCharQuantity, maxCharQuantity, validation, inputProps) => required || validationType !== "none" || minCharQuantity != null || maxCharQuantity != null || validation != null || inputProps?.required != null || inputProps?.minLength != null || inputProps?.maxLength != null || inputProps?.min != null || inputProps?.max != null || inputProps?.type != null && inputProps?.type !== "text" && inputProps?.type !== "password" || inputProps?.pattern != null;
|
|
6
|
+
const hasBuiltInValidations = (required, inputType, minCharQuantity, maxCharQuantity, validation, inputProps) => required || !isTypeValidationIgnored(inputType) || minCharQuantity != null || maxCharQuantity != null || validation != null || inputProps?.required != null || inputProps?.minLength != null || inputProps?.maxLength != null || inputProps?.min != null || inputProps?.max != null || inputProps?.type && !isTypeValidationIgnored(inputProps.type) || inputProps?.pattern != null;
|
|
22
7
|
const computeValidationState = (inputValidity, isEmptyValue) => {
|
|
23
8
|
if (inputValidity.valid && isEmptyValue) {
|
|
24
9
|
return "standBy";
|
|
@@ -43,19 +28,10 @@ const computeValidationMessage = (inputValidity, errorMessages) => {
|
|
|
43
28
|
}
|
|
44
29
|
return errorMessages.error;
|
|
45
30
|
};
|
|
46
|
-
const validateInput = (input, required, minCharQuantity, maxCharQuantity,
|
|
31
|
+
const validateInput = (input, required, minCharQuantity, maxCharQuantity, validation) => {
|
|
47
32
|
const inputValidity = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
customError: input?.validity?.customError,
|
|
51
|
-
patternMismatch: input?.validity?.patternMismatch,
|
|
52
|
-
rangeOverflow: input?.validity?.rangeOverflow,
|
|
53
|
-
rangeUnderflow: input?.validity?.rangeUnderflow,
|
|
54
|
-
stepMismatch: input?.validity?.stepMismatch,
|
|
55
|
-
tooLong: input?.validity?.tooLong,
|
|
56
|
-
tooShort: input?.validity?.tooShort,
|
|
57
|
-
typeMismatch: input?.validity?.typeMismatch,
|
|
58
|
-
valueMissing: input?.validity?.valueMissing
|
|
33
|
+
...input?.validity,
|
|
34
|
+
valid: input?.validity?.valid ?? true
|
|
59
35
|
};
|
|
60
36
|
const value = input?.value;
|
|
61
37
|
if (!value) {
|
|
@@ -72,20 +48,6 @@ const validateInput = (input, required, minCharQuantity, maxCharQuantity, valida
|
|
|
72
48
|
inputValidity.tooLong = true;
|
|
73
49
|
inputValidity.valid = false;
|
|
74
50
|
}
|
|
75
|
-
switch (validationType) {
|
|
76
|
-
case "number":
|
|
77
|
-
if (!isNumeric(value)) {
|
|
78
|
-
inputValidity.typeMismatch = true;
|
|
79
|
-
inputValidity.valid = false;
|
|
80
|
-
}
|
|
81
|
-
break;
|
|
82
|
-
case "email":
|
|
83
|
-
if (!isEmail(value)) {
|
|
84
|
-
inputValidity.typeMismatch = true;
|
|
85
|
-
inputValidity.valid = false;
|
|
86
|
-
}
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
51
|
if (validation != null && !validation(value)) {
|
|
90
52
|
inputValidity.customError = true;
|
|
91
53
|
inputValidity.valid = false;
|
|
@@ -94,15 +56,19 @@ const validateInput = (input, required, minCharQuantity, maxCharQuantity, valida
|
|
|
94
56
|
return inputValidity;
|
|
95
57
|
};
|
|
96
58
|
const DEFAULT_ERROR_MESSAGES = {
|
|
59
|
+
/** The value when a validation fails. */
|
|
97
60
|
error: "Invalid value",
|
|
98
|
-
|
|
99
|
-
minCharError: "The value is too short",
|
|
61
|
+
/** The message that appears when there are too many characters. */
|
|
100
62
|
maxCharError: "The value is too long",
|
|
63
|
+
/** The message that appears when there are too few characters. */
|
|
64
|
+
minCharError: "The value is too short",
|
|
65
|
+
/** The message that appears when the input is empty and required. */
|
|
66
|
+
requiredError: "The value is required",
|
|
67
|
+
/** The message that appears when the input is value is incompatible with the expected type. */
|
|
101
68
|
typeMismatchError: "Invalid value"
|
|
102
69
|
};
|
|
103
70
|
exports.DEFAULT_ERROR_MESSAGES = DEFAULT_ERROR_MESSAGES;
|
|
104
71
|
exports.computeValidationMessage = computeValidationMessage;
|
|
105
72
|
exports.computeValidationState = computeValidationState;
|
|
106
|
-
exports.computeValidationType = computeValidationType;
|
|
107
73
|
exports.hasBuiltInValidations = hasBuiltInValidations;
|
|
108
74
|
exports.validateInput = validateInput;
|
package/dist/cjs/Input/Input.cjs
CHANGED
|
@@ -115,19 +115,17 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
|
|
|
115
115
|
validationMessages?.typeMismatchError
|
|
116
116
|
]
|
|
117
117
|
);
|
|
118
|
-
const validationType = React.useMemo(() => validations.computeValidationType(type), [type]);
|
|
119
118
|
const performValidation = React.useCallback(() => {
|
|
120
119
|
const inputValidity = validations.validateInput(
|
|
121
120
|
inputRef.current,
|
|
122
121
|
required,
|
|
123
122
|
minCharQuantity,
|
|
124
123
|
maxCharQuantity,
|
|
125
|
-
validationType,
|
|
126
124
|
validation
|
|
127
125
|
);
|
|
128
126
|
setValidationState(validations.computeValidationState(inputValidity, isEmptyValue));
|
|
129
127
|
setValidationMessage(
|
|
130
|
-
validations.computeValidationMessage(inputValidity, errorMessages)
|
|
128
|
+
validations.computeValidationMessage(inputValidity, errorMessages) || ""
|
|
131
129
|
);
|
|
132
130
|
return inputValidity;
|
|
133
131
|
}, [
|
|
@@ -138,12 +136,11 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
|
|
|
138
136
|
required,
|
|
139
137
|
setValidationMessage,
|
|
140
138
|
setValidationState,
|
|
141
|
-
validation
|
|
142
|
-
validationType
|
|
139
|
+
validation
|
|
143
140
|
]);
|
|
144
141
|
const canShowError = ariaErrorMessage == null && (status !== void 0 && statusMessage !== void 0 || status === void 0 && validations.hasBuiltInValidations(
|
|
145
142
|
required,
|
|
146
|
-
|
|
143
|
+
type,
|
|
147
144
|
minCharQuantity,
|
|
148
145
|
maxCharQuantity,
|
|
149
146
|
validation,
|
|
@@ -157,12 +154,7 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
|
|
|
157
154
|
if (type === "password") {
|
|
158
155
|
return revealPassword ? "text" : "password";
|
|
159
156
|
}
|
|
160
|
-
if (
|
|
161
|
-
return "search";
|
|
162
|
-
}
|
|
163
|
-
if (type === "number") {
|
|
164
|
-
return "number";
|
|
165
|
-
}
|
|
157
|
+
if (["search", "number", "email"].includes(type)) return type;
|
|
166
158
|
return "text";
|
|
167
159
|
}, [revealPassword, type]);
|
|
168
160
|
const [suggestionValues, setSuggestionValues] = React.useState(null);
|
|
@@ -93,7 +93,7 @@ const HvTagsInput = React.forwardRef(
|
|
|
93
93
|
(currValue) => {
|
|
94
94
|
if (maxTagsQuantity !== null && maxTagsQuantity !== void 0 && currValue.length > maxTagsQuantity) {
|
|
95
95
|
setValidationState("invalid");
|
|
96
|
-
setValidationMessage(errorMessages.maxCharError);
|
|
96
|
+
setValidationMessage(errorMessages.maxCharError || "");
|
|
97
97
|
setStateValid(false);
|
|
98
98
|
} else {
|
|
99
99
|
setValidationState("valid");
|
|
@@ -88,12 +88,11 @@ const HvTextArea = React.forwardRef(function HvTextArea2(props, ref) {
|
|
|
88
88
|
required,
|
|
89
89
|
minCharQuantity,
|
|
90
90
|
maxCharQuantity,
|
|
91
|
-
"none",
|
|
92
91
|
validation
|
|
93
92
|
);
|
|
94
93
|
setValidationState(validations.computeValidationState(inputValidity, isEmptyValue));
|
|
95
94
|
setValidationMessage(
|
|
96
|
-
validations.computeValidationMessage(inputValidity, errorMessages)
|
|
95
|
+
validations.computeValidationMessage(inputValidity, errorMessages) || ""
|
|
97
96
|
);
|
|
98
97
|
return inputValidity;
|
|
99
98
|
}, [
|
|
@@ -164,7 +163,7 @@ const HvTextArea = React.forwardRef(function HvTextArea2(props, ref) {
|
|
|
164
163
|
}, [focused, isEmptyValue, performValidation]);
|
|
165
164
|
const canShowError = ariaErrorMessage == null && (status !== void 0 && statusMessage !== void 0 || status === void 0 && validations.hasBuiltInValidations(
|
|
166
165
|
required,
|
|
167
|
-
"
|
|
166
|
+
"text",
|
|
168
167
|
minCharQuantity,
|
|
169
168
|
// If blockMax is true maxCharQuantity will never produce an error
|
|
170
169
|
// unless the value is controlled, so we can't prevent it to overflow maxCharQuantity
|
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
num.trim().length > 0 && !Number.isNaN(Number(num))
|
|
4
|
-
);
|
|
5
|
-
const isEmail = (email) => {
|
|
6
|
-
const regexp = /^[^\\s]+[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?[.])+[a-z0-9](?:[a-z0-9-]*[a-z0-9])$/i;
|
|
7
|
-
return regexp.test(email);
|
|
1
|
+
const isTypeValidationIgnored = (type) => {
|
|
2
|
+
return type === "text" || type === "password";
|
|
8
3
|
};
|
|
9
|
-
const
|
|
10
|
-
switch (type) {
|
|
11
|
-
case "number":
|
|
12
|
-
return "number";
|
|
13
|
-
case "email":
|
|
14
|
-
return "email";
|
|
15
|
-
default:
|
|
16
|
-
return "none";
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const hasBuiltInValidations = (required, validationType, minCharQuantity, maxCharQuantity, validation, inputProps) => required || validationType !== "none" || minCharQuantity != null || maxCharQuantity != null || validation != null || inputProps?.required != null || inputProps?.minLength != null || inputProps?.maxLength != null || inputProps?.min != null || inputProps?.max != null || inputProps?.type != null && inputProps?.type !== "text" && inputProps?.type !== "password" || inputProps?.pattern != null;
|
|
4
|
+
const hasBuiltInValidations = (required, inputType, minCharQuantity, maxCharQuantity, validation, inputProps) => required || !isTypeValidationIgnored(inputType) || minCharQuantity != null || maxCharQuantity != null || validation != null || inputProps?.required != null || inputProps?.minLength != null || inputProps?.maxLength != null || inputProps?.min != null || inputProps?.max != null || inputProps?.type && !isTypeValidationIgnored(inputProps.type) || inputProps?.pattern != null;
|
|
20
5
|
const computeValidationState = (inputValidity, isEmptyValue) => {
|
|
21
6
|
if (inputValidity.valid && isEmptyValue) {
|
|
22
7
|
return "standBy";
|
|
@@ -41,19 +26,10 @@ const computeValidationMessage = (inputValidity, errorMessages) => {
|
|
|
41
26
|
}
|
|
42
27
|
return errorMessages.error;
|
|
43
28
|
};
|
|
44
|
-
const validateInput = (input, required, minCharQuantity, maxCharQuantity,
|
|
29
|
+
const validateInput = (input, required, minCharQuantity, maxCharQuantity, validation) => {
|
|
45
30
|
const inputValidity = {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
customError: input?.validity?.customError,
|
|
49
|
-
patternMismatch: input?.validity?.patternMismatch,
|
|
50
|
-
rangeOverflow: input?.validity?.rangeOverflow,
|
|
51
|
-
rangeUnderflow: input?.validity?.rangeUnderflow,
|
|
52
|
-
stepMismatch: input?.validity?.stepMismatch,
|
|
53
|
-
tooLong: input?.validity?.tooLong,
|
|
54
|
-
tooShort: input?.validity?.tooShort,
|
|
55
|
-
typeMismatch: input?.validity?.typeMismatch,
|
|
56
|
-
valueMissing: input?.validity?.valueMissing
|
|
31
|
+
...input?.validity,
|
|
32
|
+
valid: input?.validity?.valid ?? true
|
|
57
33
|
};
|
|
58
34
|
const value = input?.value;
|
|
59
35
|
if (!value) {
|
|
@@ -70,20 +46,6 @@ const validateInput = (input, required, minCharQuantity, maxCharQuantity, valida
|
|
|
70
46
|
inputValidity.tooLong = true;
|
|
71
47
|
inputValidity.valid = false;
|
|
72
48
|
}
|
|
73
|
-
switch (validationType) {
|
|
74
|
-
case "number":
|
|
75
|
-
if (!isNumeric(value)) {
|
|
76
|
-
inputValidity.typeMismatch = true;
|
|
77
|
-
inputValidity.valid = false;
|
|
78
|
-
}
|
|
79
|
-
break;
|
|
80
|
-
case "email":
|
|
81
|
-
if (!isEmail(value)) {
|
|
82
|
-
inputValidity.typeMismatch = true;
|
|
83
|
-
inputValidity.valid = false;
|
|
84
|
-
}
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
49
|
if (validation != null && !validation(value)) {
|
|
88
50
|
inputValidity.customError = true;
|
|
89
51
|
inputValidity.valid = false;
|
|
@@ -92,17 +54,21 @@ const validateInput = (input, required, minCharQuantity, maxCharQuantity, valida
|
|
|
92
54
|
return inputValidity;
|
|
93
55
|
};
|
|
94
56
|
const DEFAULT_ERROR_MESSAGES = {
|
|
57
|
+
/** The value when a validation fails. */
|
|
95
58
|
error: "Invalid value",
|
|
96
|
-
|
|
97
|
-
minCharError: "The value is too short",
|
|
59
|
+
/** The message that appears when there are too many characters. */
|
|
98
60
|
maxCharError: "The value is too long",
|
|
61
|
+
/** The message that appears when there are too few characters. */
|
|
62
|
+
minCharError: "The value is too short",
|
|
63
|
+
/** The message that appears when the input is empty and required. */
|
|
64
|
+
requiredError: "The value is required",
|
|
65
|
+
/** The message that appears when the input is value is incompatible with the expected type. */
|
|
99
66
|
typeMismatchError: "Invalid value"
|
|
100
67
|
};
|
|
101
68
|
export {
|
|
102
69
|
DEFAULT_ERROR_MESSAGES,
|
|
103
70
|
computeValidationMessage,
|
|
104
71
|
computeValidationState,
|
|
105
|
-
computeValidationType,
|
|
106
72
|
hasBuiltInValidations,
|
|
107
73
|
validateInput
|
|
108
74
|
};
|
package/dist/esm/Input/Input.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useState, useMemo, useCallback, useEffect } from "react";
|
|
3
3
|
import { useForkRef } from "@mui/material/utils";
|
|
4
4
|
import { useDefaultProps, useTheme } from "@hitachivantara/uikit-react-utils";
|
|
5
|
-
import { DEFAULT_ERROR_MESSAGES,
|
|
5
|
+
import { DEFAULT_ERROR_MESSAGES, validateInput, computeValidationState, computeValidationMessage, hasBuiltInValidations } from "../BaseInput/validations.js";
|
|
6
6
|
import { HvLabelContainer } from "../FormElement/LabelContainer.js";
|
|
7
7
|
import { HvSuggestions } from "../FormElement/Suggestions/Suggestions.js";
|
|
8
8
|
import { useControlled } from "../hooks/useControlled.js";
|
|
@@ -114,19 +114,17 @@ const HvInput = fixedForwardRef(function HvInput2(props, ref) {
|
|
|
114
114
|
validationMessages?.typeMismatchError
|
|
115
115
|
]
|
|
116
116
|
);
|
|
117
|
-
const validationType = useMemo(() => computeValidationType(type), [type]);
|
|
118
117
|
const performValidation = useCallback(() => {
|
|
119
118
|
const inputValidity = validateInput(
|
|
120
119
|
inputRef.current,
|
|
121
120
|
required,
|
|
122
121
|
minCharQuantity,
|
|
123
122
|
maxCharQuantity,
|
|
124
|
-
validationType,
|
|
125
123
|
validation
|
|
126
124
|
);
|
|
127
125
|
setValidationState(computeValidationState(inputValidity, isEmptyValue));
|
|
128
126
|
setValidationMessage(
|
|
129
|
-
computeValidationMessage(inputValidity, errorMessages)
|
|
127
|
+
computeValidationMessage(inputValidity, errorMessages) || ""
|
|
130
128
|
);
|
|
131
129
|
return inputValidity;
|
|
132
130
|
}, [
|
|
@@ -137,12 +135,11 @@ const HvInput = fixedForwardRef(function HvInput2(props, ref) {
|
|
|
137
135
|
required,
|
|
138
136
|
setValidationMessage,
|
|
139
137
|
setValidationState,
|
|
140
|
-
validation
|
|
141
|
-
validationType
|
|
138
|
+
validation
|
|
142
139
|
]);
|
|
143
140
|
const canShowError = ariaErrorMessage == null && (status !== void 0 && statusMessage !== void 0 || status === void 0 && hasBuiltInValidations(
|
|
144
141
|
required,
|
|
145
|
-
|
|
142
|
+
type,
|
|
146
143
|
minCharQuantity,
|
|
147
144
|
maxCharQuantity,
|
|
148
145
|
validation,
|
|
@@ -156,12 +153,7 @@ const HvInput = fixedForwardRef(function HvInput2(props, ref) {
|
|
|
156
153
|
if (type === "password") {
|
|
157
154
|
return revealPassword ? "text" : "password";
|
|
158
155
|
}
|
|
159
|
-
if (
|
|
160
|
-
return "search";
|
|
161
|
-
}
|
|
162
|
-
if (type === "number") {
|
|
163
|
-
return "number";
|
|
164
|
-
}
|
|
156
|
+
if (["search", "number", "email"].includes(type)) return type;
|
|
165
157
|
return "text";
|
|
166
158
|
}, [revealPassword, type]);
|
|
167
159
|
const [suggestionValues, setSuggestionValues] = useState(null);
|
|
@@ -92,7 +92,7 @@ const HvTagsInput = forwardRef(
|
|
|
92
92
|
(currValue) => {
|
|
93
93
|
if (maxTagsQuantity !== null && maxTagsQuantity !== void 0 && currValue.length > maxTagsQuantity) {
|
|
94
94
|
setValidationState("invalid");
|
|
95
|
-
setValidationMessage(errorMessages.maxCharError);
|
|
95
|
+
setValidationMessage(errorMessages.maxCharError || "");
|
|
96
96
|
setStateValid(false);
|
|
97
97
|
} else {
|
|
98
98
|
setValidationState("valid");
|
|
@@ -87,12 +87,11 @@ const HvTextArea = forwardRef(function HvTextArea2(props, ref) {
|
|
|
87
87
|
required,
|
|
88
88
|
minCharQuantity,
|
|
89
89
|
maxCharQuantity,
|
|
90
|
-
"none",
|
|
91
90
|
validation
|
|
92
91
|
);
|
|
93
92
|
setValidationState(computeValidationState(inputValidity, isEmptyValue));
|
|
94
93
|
setValidationMessage(
|
|
95
|
-
computeValidationMessage(inputValidity, errorMessages)
|
|
94
|
+
computeValidationMessage(inputValidity, errorMessages) || ""
|
|
96
95
|
);
|
|
97
96
|
return inputValidity;
|
|
98
97
|
}, [
|
|
@@ -163,7 +162,7 @@ const HvTextArea = forwardRef(function HvTextArea2(props, ref) {
|
|
|
163
162
|
}, [focused, isEmptyValue, performValidation]);
|
|
164
163
|
const canShowError = ariaErrorMessage == null && (status !== void 0 && statusMessage !== void 0 || status === void 0 && hasBuiltInValidations(
|
|
165
164
|
required,
|
|
166
|
-
"
|
|
165
|
+
"text",
|
|
167
166
|
minCharQuantity,
|
|
168
167
|
// If blockMax is true maxCharQuantity will never produce an error
|
|
169
168
|
// unless the value is controlled, so we can't prevent it to overflow maxCharQuantity
|
package/dist/types/index.d.ts
CHANGED
|
@@ -625,6 +625,19 @@ export declare type DeepPartial<T> = T extends {} ? Partial<{
|
|
|
625
625
|
[P in keyof T]: DeepPartial<T[P]>;
|
|
626
626
|
}> : T;
|
|
627
627
|
|
|
628
|
+
declare const DEFAULT_ERROR_MESSAGES: {
|
|
629
|
+
/** The value when a validation fails. */
|
|
630
|
+
error: string;
|
|
631
|
+
/** The message that appears when there are too many characters. */
|
|
632
|
+
maxCharError: string;
|
|
633
|
+
/** The message that appears when there are too few characters. */
|
|
634
|
+
minCharError: string;
|
|
635
|
+
/** The message that appears when the input is empty and required. */
|
|
636
|
+
requiredError: string;
|
|
637
|
+
/** The message that appears when the input is value is incompatible with the expected type. */
|
|
638
|
+
typeMismatchError: string;
|
|
639
|
+
};
|
|
640
|
+
|
|
628
641
|
declare const DEFAULT_LABELS: {
|
|
629
642
|
dropdownMenu: string;
|
|
630
643
|
};
|
|
@@ -7174,18 +7187,7 @@ export declare interface HvUseTableProps extends Omit<TableProps, "role">, UseHv
|
|
|
7174
7187
|
export declare interface HvUseTableRowProps extends Omit<TableRowProps, "role">, UseHvTableStylesTableRowProps, UseHvRowSelectionTableRowProps, UseHvRowExpandTableRowProps, HvTableRowProps {
|
|
7175
7188
|
}
|
|
7176
7189
|
|
|
7177
|
-
export declare
|
|
7178
|
-
/** The value when a validation fails. */
|
|
7179
|
-
error?: string;
|
|
7180
|
-
/** The message that appears when there are too many characters. */
|
|
7181
|
-
maxCharError?: string;
|
|
7182
|
-
/** The message that appears when there are too few characters. */
|
|
7183
|
-
minCharError?: string;
|
|
7184
|
-
/** The message that appears when the input is empty and required. */
|
|
7185
|
-
requiredError?: string;
|
|
7186
|
-
/** The message that appears when the input is value is incompatible with the expected type. */
|
|
7187
|
-
typeMismatchError?: string;
|
|
7188
|
-
}
|
|
7190
|
+
export declare type HvValidationMessages = Partial<typeof DEFAULT_ERROR_MESSAGES>;
|
|
7189
7191
|
|
|
7190
7192
|
/**
|
|
7191
7193
|
* Use a vertical layout for global navigation on wide screens. treeview mode provides structured hierarchy but overrides standard keyboard navigation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.96.
|
|
3
|
+
"version": "5.96.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"access": "public",
|
|
62
62
|
"directory": "package"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "e8e37e375a8b3101ac3d223d1a08ca06b53b43de",
|
|
65
65
|
"exports": {
|
|
66
66
|
".": {
|
|
67
67
|
"types": "./dist/types/index.d.ts",
|