@xqmsg/ui-core 0.23.1-rc.2 → 0.23.1-rc.4
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/components/input/index.d.ts +2 -1
- package/dist/ui-core.cjs.development.js +5 -3
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +5 -3
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/index.tsx +5 -5
package/package.json
CHANGED
|
@@ -49,6 +49,7 @@ export interface InputProps<T extends FieldValues> extends ValidationProps {
|
|
|
49
49
|
allowDefault?: boolean;
|
|
50
50
|
rightElement?: React.ReactNode;
|
|
51
51
|
variant: string;
|
|
52
|
+
separators?: string[];
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/**
|
|
@@ -81,6 +82,7 @@ export function Input<T extends FieldValues>({
|
|
|
81
82
|
setValue,
|
|
82
83
|
setError,
|
|
83
84
|
clearErrors,
|
|
85
|
+
separators,
|
|
84
86
|
}: InputProps<T>) {
|
|
85
87
|
const selectedInputField = (
|
|
86
88
|
onChange: () => void,
|
|
@@ -227,6 +229,7 @@ export function Input<T extends FieldValues>({
|
|
|
227
229
|
maxLength={maxLength}
|
|
228
230
|
variant={variant}
|
|
229
231
|
label={label}
|
|
232
|
+
separators={separators}
|
|
230
233
|
/>
|
|
231
234
|
);
|
|
232
235
|
case 'switch':
|
|
@@ -286,11 +289,8 @@ export function Input<T extends FieldValues>({
|
|
|
286
289
|
ref,
|
|
287
290
|
value
|
|
288
291
|
)}
|
|
289
|
-
{isInvalid
|
|
290
|
-
|
|
291
|
-
) : (
|
|
292
|
-
helperText && <FormHelperText>{helperText}</FormHelperText>
|
|
293
|
-
)}
|
|
292
|
+
{isInvalid && <FormErrorMessage>{errorText}</FormErrorMessage>}
|
|
293
|
+
{helperText && <FormHelperText>{helperText}</FormHelperText>}
|
|
294
294
|
</FormControl>
|
|
295
295
|
)}
|
|
296
296
|
/>
|