@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
|
@@ -24,9 +24,10 @@ export interface InputProps<T extends FieldValues> extends ValidationProps {
|
|
|
24
24
|
allowDefault?: boolean;
|
|
25
25
|
rightElement?: React.ReactNode;
|
|
26
26
|
variant: string;
|
|
27
|
+
separators?: string[];
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* A functional React component utilized to render the `Input` component. Utilizes a switch statement
|
|
30
31
|
* to render the correct input based on the `inputType`.
|
|
31
32
|
*/
|
|
32
|
-
export declare function Input<T extends FieldValues>({ inputType, label, ariaLabel, className, placeholder, name, helperText, options, tooltipText, isInvalid, errorText, isRequired, maxLength, defaultValue, fullOptions, control, disabled, rightElement, leftElement, allowDefault, variant, onChange, setValue, setError, clearErrors, }: InputProps<T>): React.JSX.Element;
|
|
33
|
+
export declare function Input<T extends FieldValues>({ inputType, label, ariaLabel, className, placeholder, name, helperText, options, tooltipText, isInvalid, errorText, isRequired, maxLength, defaultValue, fullOptions, control, disabled, rightElement, leftElement, allowDefault, variant, onChange, setValue, setError, clearErrors, separators, }: InputProps<T>): React.JSX.Element;
|
|
@@ -1898,7 +1898,8 @@ function Input(_ref) {
|
|
|
1898
1898
|
onChange = _ref.onChange,
|
|
1899
1899
|
setValue = _ref.setValue,
|
|
1900
1900
|
setError = _ref.setError,
|
|
1901
|
-
clearErrors = _ref.clearErrors
|
|
1901
|
+
clearErrors = _ref.clearErrors,
|
|
1902
|
+
separators = _ref.separators;
|
|
1902
1903
|
var selectedInputField = function selectedInputField(onChange, onBlur, ref, value) {
|
|
1903
1904
|
switch (inputType) {
|
|
1904
1905
|
case 'text':
|
|
@@ -2025,7 +2026,8 @@ function Input(_ref) {
|
|
|
2025
2026
|
control: control,
|
|
2026
2027
|
maxLength: maxLength,
|
|
2027
2028
|
variant: variant,
|
|
2028
|
-
label: label
|
|
2029
|
+
label: label,
|
|
2030
|
+
separators: separators
|
|
2029
2031
|
});
|
|
2030
2032
|
case 'switch':
|
|
2031
2033
|
return /*#__PURE__*/React__default.createElement(StackedSwitch, {
|
|
@@ -2067,7 +2069,7 @@ function Input(_ref) {
|
|
|
2067
2069
|
tooltipText: tooltipText,
|
|
2068
2070
|
label: label,
|
|
2069
2071
|
isRequired: isRequired
|
|
2070
|
-
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid
|
|
2072
|
+
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid && /*#__PURE__*/React__default.createElement(react.FormErrorMessage, null, errorText), helperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, null, helperText));
|
|
2071
2073
|
}
|
|
2072
2074
|
});
|
|
2073
2075
|
}
|