envoc-form 4.1.0 → 5.0.2
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/README.md +367 -176
- package/es/AddressInput/AddressInput.d.ts +24 -25
- package/es/AddressInput/AddressInput.js +20 -31
- package/es/AddressInput/UsStates.d.ts +3 -3
- package/es/AddressInput/UsStates.js +53 -53
- package/es/ConfirmBaseForm/ConfirmBaseForm.d.ts +26 -26
- package/es/ConfirmBaseForm/ConfirmBaseForm.js +42 -42
- package/es/ConfirmDeleteForm/ConfirmDeleteForm.d.ts +24 -24
- package/es/ConfirmDeleteForm/ConfirmDeleteForm.js +60 -60
- package/es/DatePicker/DatePickerGroup.d.ts +13 -14
- package/es/DatePicker/DatePickerGroup.js +87 -87
- package/es/DatePicker/DatePickerHelper.d.ts +3 -3
- package/es/DatePicker/DatePickerHelper.js +1 -1
- package/es/DatePicker/StringDateOnlyPickerGroup.d.ts +9 -10
- package/es/DatePicker/StringDateOnlyPickerGroup.js +29 -29
- package/es/DatePicker/StringDatePickerGroup.d.ts +9 -10
- package/es/DatePicker/StringDatePickerGroup.js +24 -24
- package/es/Field/CustomFieldInputProps.d.ts +7 -7
- package/es/Field/CustomFieldInputProps.js +1 -1
- package/es/Field/CustomFieldMetaProps.d.ts +4 -4
- package/es/Field/CustomFieldMetaProps.js +1 -1
- package/es/Field/Field.d.ts +28 -28
- package/es/Field/Field.js +51 -51
- package/es/Field/FieldErrorScrollTarget.d.ts +2 -3
- package/es/Field/FieldErrorScrollTarget.js +12 -12
- package/es/Field/FieldNameContext.d.ts +3 -3
- package/es/Field/FieldNameContext.js +3 -3
- package/es/Field/FieldSection.d.ts +7 -7
- package/es/Field/FieldSection.js +9 -20
- package/es/Field/InjectedFieldProps.d.ts +7 -7
- package/es/Field/InjectedFieldProps.js +1 -1
- package/es/Field/StandAloneInput.d.ts +13 -13
- package/es/Field/StandAloneInput.js +50 -50
- package/es/Field/useStandardField.d.ts +21 -21
- package/es/Field/useStandardField.js +92 -92
- package/es/FieldArray/FieldArray.d.ts +24 -24
- package/es/FieldArray/FieldArray.js +77 -88
- package/es/File/FileGroup.d.ts +10 -10
- package/es/File/FileGroup.js +53 -53
- package/es/File/FileList.d.ts +5 -6
- package/es/File/FileList.js +10 -21
- package/es/File/humanFileSize.d.ts +1 -1
- package/es/File/humanFileSize.js +6 -6
- package/es/Form/FocusError.d.ts +7 -7
- package/es/Form/FocusError.js +42 -42
- package/es/Form/Form.d.ts +33 -33
- package/es/Form/Form.js +141 -141
- package/es/Form/FormBasedPreventNavigation.d.ts +6 -7
- package/es/Form/FormBasedPreventNavigation.js +20 -20
- package/es/Form/LegacyFormBasedPreventNavigation.d.ts +17 -17
- package/es/Form/LegacyFormBasedPreventNavigation.js +69 -69
- package/es/Form/NewFormBasedPreventNavigation.d.ts +14 -14
- package/es/Form/NewFormBasedPreventNavigation.js +39 -39
- package/es/Form/ServerErrorContext.d.ts +11 -11
- package/es/Form/ServerErrorContext.js +9 -9
- package/es/FormActions.d.ts +12 -13
- package/es/FormActions.js +16 -27
- package/es/FormDefaults.d.ts +4 -4
- package/es/FormDefaults.js +2 -2
- package/es/Group.d.ts +16 -16
- package/es/Group.js +14 -25
- package/es/Input/IconInputGroup.d.ts +12 -12
- package/es/Input/IconInputGroup.js +43 -43
- package/es/Input/InputGroup.d.ts +12 -12
- package/es/Input/InputGroup.js +34 -34
- package/es/Input/MoneyInputGroup.d.ts +9 -9
- package/es/Input/MoneyInputGroup.js +43 -43
- package/es/Input/NumberInputGroup.d.ts +9 -9
- package/es/Input/NumberInputGroup.js +43 -43
- package/es/Input/PhoneNumberInputGroup.d.ts +10 -0
- package/es/Input/PhoneNumberInputGroup.js +47 -0
- package/es/Input/StringInputGroup.d.ts +8 -8
- package/es/Input/StringInputGroup.js +43 -43
- package/es/Normalization/NormalizationFunction.d.ts +4 -4
- package/es/Normalization/NormalizationFunction.js +1 -1
- package/es/Normalization/normalizers.d.ts +4 -4
- package/es/Normalization/normalizers.js +32 -32
- package/es/Select/BooleanSelectGroup.d.ts +7 -8
- package/es/Select/BooleanSelectGroup.js +28 -28
- package/es/Select/NumberSelectGroup.d.ts +9 -10
- package/es/Select/NumberSelectGroup.js +21 -21
- package/es/Select/SelectGroup.d.ts +27 -28
- package/es/Select/SelectGroup.js +65 -65
- package/es/Select/SelectGroupPropsHelper.d.ts +3 -3
- package/es/Select/SelectGroupPropsHelper.js +1 -1
- package/es/Select/StringSelectGroup.d.ts +9 -10
- package/es/Select/StringSelectGroup.js +21 -21
- package/es/StandardFormActions.d.ts +11 -11
- package/es/StandardFormActions.js +14 -25
- package/es/SubmitFormButton.d.ts +10 -10
- package/es/SubmitFormButton.js +40 -40
- package/es/TextArea/TextAreaGroup.d.ts +9 -9
- package/es/TextArea/TextAreaGroup.js +35 -35
- package/es/Validation/ValidatedApiResult.d.ts +6 -6
- package/es/Validation/ValidatedApiResult.js +1 -1
- package/es/Validation/ValidationError.d.ts +5 -5
- package/es/Validation/ValidationError.js +1 -1
- package/es/Validation/ValidationFunction.d.ts +4 -4
- package/es/Validation/ValidationFunction.js +1 -1
- package/es/Validation/validators.d.ts +18 -18
- package/es/Validation/validators.js +77 -77
- package/es/index.d.ts +75 -73
- package/es/index.js +51 -50
- package/es/setupTests.d.ts +1 -1
- package/es/setupTests.js +1 -1
- package/es/utils/objectContainsNonSerializableProperty.d.ts +1 -1
- package/es/utils/objectContainsNonSerializableProperty.js +14 -14
- package/es/utils/objectToFormData.d.ts +10 -10
- package/es/utils/objectToFormData.js +77 -77
- package/es/utils/typeChecks.d.ts +8 -8
- package/es/utils/typeChecks.js +18 -18
- package/lib/AddressInput/AddressInput.d.ts +24 -25
- package/lib/AddressInput/AddressInput.js +26 -37
- package/lib/AddressInput/UsStates.d.ts +3 -3
- package/lib/AddressInput/UsStates.js +55 -55
- package/lib/ConfirmBaseForm/ConfirmBaseForm.d.ts +26 -26
- package/lib/ConfirmBaseForm/ConfirmBaseForm.js +48 -48
- package/lib/ConfirmDeleteForm/ConfirmDeleteForm.d.ts +24 -24
- package/lib/ConfirmDeleteForm/ConfirmDeleteForm.js +66 -66
- package/lib/DatePicker/DatePickerGroup.d.ts +13 -14
- package/lib/DatePicker/DatePickerGroup.js +95 -95
- package/lib/DatePicker/DatePickerHelper.d.ts +3 -3
- package/lib/DatePicker/DatePickerHelper.js +2 -2
- package/lib/DatePicker/StringDateOnlyPickerGroup.d.ts +9 -10
- package/lib/DatePicker/StringDateOnlyPickerGroup.js +35 -35
- package/lib/DatePicker/StringDatePickerGroup.d.ts +9 -10
- package/lib/DatePicker/StringDatePickerGroup.js +30 -30
- package/lib/Field/CustomFieldInputProps.d.ts +7 -7
- package/lib/Field/CustomFieldInputProps.js +2 -2
- package/lib/Field/CustomFieldMetaProps.d.ts +4 -4
- package/lib/Field/CustomFieldMetaProps.js +2 -2
- package/lib/Field/Field.d.ts +28 -28
- package/lib/Field/Field.js +56 -56
- package/lib/Field/FieldErrorScrollTarget.d.ts +2 -3
- package/lib/Field/FieldErrorScrollTarget.js +15 -15
- package/lib/Field/FieldNameContext.d.ts +3 -3
- package/lib/Field/FieldNameContext.js +9 -9
- package/lib/Field/FieldSection.d.ts +7 -7
- package/lib/Field/FieldSection.js +12 -23
- package/lib/Field/InjectedFieldProps.d.ts +7 -7
- package/lib/Field/InjectedFieldProps.js +2 -2
- package/lib/Field/StandAloneInput.d.ts +13 -13
- package/lib/Field/StandAloneInput.js +76 -76
- package/lib/Field/useStandardField.d.ts +21 -21
- package/lib/Field/useStandardField.js +95 -95
- package/lib/FieldArray/FieldArray.d.ts +24 -24
- package/lib/FieldArray/FieldArray.js +83 -94
- package/lib/File/FileGroup.d.ts +10 -10
- package/lib/File/FileGroup.js +58 -58
- package/lib/File/FileList.d.ts +5 -6
- package/lib/File/FileList.js +13 -24
- package/lib/File/humanFileSize.d.ts +1 -1
- package/lib/File/humanFileSize.js +10 -10
- package/lib/Form/FocusError.d.ts +7 -7
- package/lib/Form/FocusError.js +48 -48
- package/lib/Form/Form.d.ts +33 -33
- package/lib/Form/Form.js +147 -147
- package/lib/Form/FormBasedPreventNavigation.d.ts +6 -7
- package/lib/Form/FormBasedPreventNavigation.js +26 -26
- package/lib/Form/LegacyFormBasedPreventNavigation.d.ts +17 -17
- package/lib/Form/LegacyFormBasedPreventNavigation.js +72 -72
- package/lib/Form/NewFormBasedPreventNavigation.d.ts +14 -14
- package/lib/Form/NewFormBasedPreventNavigation.js +42 -42
- package/lib/Form/ServerErrorContext.d.ts +11 -11
- package/lib/Form/ServerErrorContext.js +15 -15
- package/lib/FormActions.d.ts +12 -13
- package/lib/FormActions.js +22 -33
- package/lib/FormDefaults.d.ts +4 -4
- package/lib/FormDefaults.js +5 -5
- package/lib/Group.d.ts +16 -16
- package/lib/Group.js +20 -31
- package/lib/Input/IconInputGroup.d.ts +12 -12
- package/lib/Input/IconInputGroup.js +48 -48
- package/lib/Input/InputGroup.d.ts +12 -12
- package/lib/Input/InputGroup.js +39 -39
- package/lib/Input/MoneyInputGroup.d.ts +9 -9
- package/lib/Input/MoneyInputGroup.js +48 -48
- package/lib/Input/NumberInputGroup.d.ts +9 -9
- package/lib/Input/NumberInputGroup.js +48 -48
- package/lib/Input/PhoneNumberInputGroup.d.ts +10 -0
- package/lib/Input/PhoneNumberInputGroup.js +52 -0
- package/lib/Input/StringInputGroup.d.ts +8 -8
- package/lib/Input/StringInputGroup.js +48 -48
- package/lib/Normalization/NormalizationFunction.d.ts +4 -4
- package/lib/Normalization/NormalizationFunction.js +2 -2
- package/lib/Normalization/normalizers.d.ts +4 -4
- package/lib/Normalization/normalizers.js +37 -37
- package/lib/Select/BooleanSelectGroup.d.ts +7 -8
- package/lib/Select/BooleanSelectGroup.js +35 -35
- package/lib/Select/NumberSelectGroup.d.ts +9 -10
- package/lib/Select/NumberSelectGroup.js +29 -29
- package/lib/Select/SelectGroup.d.ts +27 -28
- package/lib/Select/SelectGroup.js +71 -71
- package/lib/Select/SelectGroupPropsHelper.d.ts +3 -3
- package/lib/Select/SelectGroupPropsHelper.js +2 -2
- package/lib/Select/StringSelectGroup.d.ts +9 -10
- package/lib/Select/StringSelectGroup.js +29 -29
- package/lib/StandardFormActions.d.ts +11 -11
- package/lib/StandardFormActions.js +20 -31
- package/lib/SubmitFormButton.d.ts +10 -10
- package/lib/SubmitFormButton.js +45 -45
- package/lib/TextArea/TextAreaGroup.d.ts +9 -9
- package/lib/TextArea/TextAreaGroup.js +40 -40
- package/lib/Validation/ValidatedApiResult.d.ts +6 -6
- package/lib/Validation/ValidatedApiResult.js +2 -2
- package/lib/Validation/ValidationError.d.ts +5 -5
- package/lib/Validation/ValidationError.js +2 -2
- package/lib/Validation/ValidationFunction.d.ts +4 -4
- package/lib/Validation/ValidationFunction.js +2 -2
- package/lib/Validation/validators.d.ts +18 -18
- package/lib/Validation/validators.js +90 -90
- package/lib/index.d.ts +75 -73
- package/lib/index.js +119 -117
- package/lib/setupTests.d.ts +1 -1
- package/lib/setupTests.js +3 -3
- package/lib/utils/objectContainsNonSerializableProperty.d.ts +1 -1
- package/lib/utils/objectContainsNonSerializableProperty.js +17 -17
- package/lib/utils/objectToFormData.d.ts +10 -10
- package/lib/utils/objectToFormData.js +79 -79
- package/lib/utils/typeChecks.d.ts +8 -8
- package/lib/utils/typeChecks.js +29 -29
- package/package.json +12 -12
- package/src/AddressInput/__snapshots__/AddressInput.test.tsx.snap +6 -8
- package/src/Input/PhoneNumberInputGroup.tsx +45 -0
- package/src/Input/__Tests__/PhoneNumberInputGroup.test.tsx +36 -0
- package/src/Input/__Tests__/__snapshots__/PhoneNumberInputGroup.test.tsx.snap +33 -0
- package/src/Select/__tests__/__snapshots__/BooleanSelectGroup.test.tsx.snap +6 -8
- package/src/Select/__tests__/__snapshots__/NumberSelectGroup.test.tsx.snap +12 -16
- package/src/Select/__tests__/__snapshots__/StringSelectGroup.test.tsx.snap +12 -16
- package/src/index.ts +3 -0
- package/src/utils/objectToFormData.test.tsx +1 -1
@@ -1,11 +1,11 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
export interface ServerErrors {
|
3
|
-
[path: string]: string;
|
4
|
-
}
|
5
|
-
export interface ServerErrorContextProps {
|
6
|
-
errors: ServerErrors;
|
7
|
-
getError: (path: string) => string | undefined;
|
8
|
-
setError: (path: string, errorMessage: string | undefined) => void;
|
9
|
-
}
|
10
|
-
/** Context to store the API errors from the server for the form. */
|
11
|
-
export declare const ServerErrorContext: React.Context<ServerErrorContextProps>;
|
1
|
+
import React from 'react';
|
2
|
+
export interface ServerErrors {
|
3
|
+
[path: string]: string;
|
4
|
+
}
|
5
|
+
export interface ServerErrorContextProps {
|
6
|
+
errors: ServerErrors;
|
7
|
+
getError: (path: string) => string | undefined;
|
8
|
+
setError: (path: string, errorMessage: string | undefined) => void;
|
9
|
+
}
|
10
|
+
/** Context to store the API errors from the server for the form. */
|
11
|
+
export declare const ServerErrorContext: React.Context<ServerErrorContextProps>;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
/** Context to store the API errors from the server for the form. */
|
3
|
-
export var ServerErrorContext = React.createContext({
|
4
|
-
errors: {},
|
5
|
-
getError: function (path) {
|
6
|
-
return undefined;
|
7
|
-
},
|
8
|
-
setError: function (path, errorMessage) { },
|
9
|
-
});
|
1
|
+
import React from 'react';
|
2
|
+
/** Context to store the API errors from the server for the form. */
|
3
|
+
export var ServerErrorContext = React.createContext({
|
4
|
+
errors: {},
|
5
|
+
getError: function (path) {
|
6
|
+
return undefined;
|
7
|
+
},
|
8
|
+
setError: function (path, errorMessage) { },
|
9
|
+
});
|
package/es/FormActions.d.ts
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
export default function FormActions({ allowPristineSubmit, handleCancel, disabled, }: FormActionsProps): JSX.Element;
|
1
|
+
export interface FormActionsProps {
|
2
|
+
/** Allow the form to be submitted without any changes. By default this is not allowed. */
|
3
|
+
allowPristineSubmit?: boolean;
|
4
|
+
/** The cancel button's `onClick`.
|
5
|
+
* @defaultValue `window.history.back()`
|
6
|
+
*/
|
7
|
+
handleCancel?: () => void;
|
8
|
+
/** Whether both buttons should be disabled. */
|
9
|
+
disabled?: boolean;
|
10
|
+
}
|
11
|
+
/** Standard cancel and submit buttons. */
|
12
|
+
export default function FormActions({ allowPristineSubmit, handleCancel, disabled, }: FormActionsProps): import("react/jsx-runtime").JSX.Element;
|
package/es/FormActions.js
CHANGED
@@ -1,27 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
export default function FormActions(_a) {
|
18
|
-
var allowPristineSubmit = _a.allowPristineSubmit, handleCancel = _a.handleCancel, disabled = _a.disabled;
|
19
|
-
var isSubmitting = useFormikContext().isSubmitting;
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx(SubmitFormButton, { className: FormDefaults.cssClassPrefix + 'form-actions', allowPristineSubmit: allowPristineSubmit, disabled: disabled }), _jsx("button", __assign({ type: "button", className: FormDefaults.cssClassPrefix +
|
21
|
-
'form-actions ' +
|
22
|
-
FormDefaults.cssClassPrefix +
|
23
|
-
'cancel-form-button', disabled: isSubmitting || disabled, onClick: handleCancel || goBack }, { children: "Cancel" }))] }));
|
24
|
-
function goBack() {
|
25
|
-
window.history.back();
|
26
|
-
}
|
27
|
-
}
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { FormDefaults } from './FormDefaults';
|
3
|
+
import { useFormikContext } from 'formik';
|
4
|
+
import SubmitFormButton from './SubmitFormButton';
|
5
|
+
/** Standard cancel and submit buttons. */
|
6
|
+
export default function FormActions(_a) {
|
7
|
+
var allowPristineSubmit = _a.allowPristineSubmit, handleCancel = _a.handleCancel, disabled = _a.disabled;
|
8
|
+
var isSubmitting = useFormikContext().isSubmitting;
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(SubmitFormButton, { className: FormDefaults.cssClassPrefix + 'form-actions', allowPristineSubmit: allowPristineSubmit, disabled: disabled }), _jsx("button", { type: "button", className: FormDefaults.cssClassPrefix +
|
10
|
+
'form-actions ' +
|
11
|
+
FormDefaults.cssClassPrefix +
|
12
|
+
'cancel-form-button', disabled: isSubmitting || disabled, onClick: handleCancel || goBack, children: "Cancel" })] }));
|
13
|
+
function goBack() {
|
14
|
+
window.history.back();
|
15
|
+
}
|
16
|
+
}
|
package/es/FormDefaults.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/** `envoc-form-` CSS class prefix */
|
2
|
-
export declare const FormDefaults: {
|
3
|
-
cssClassPrefix: string;
|
4
|
-
};
|
1
|
+
/** `envoc-form-` CSS class prefix */
|
2
|
+
export declare const FormDefaults: {
|
3
|
+
cssClassPrefix: string;
|
4
|
+
};
|
package/es/FormDefaults.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
/** `envoc-form-` CSS class prefix */
|
2
|
-
export var FormDefaults = { cssClassPrefix: 'envoc-form-' };
|
1
|
+
/** `envoc-form-` CSS class prefix */
|
2
|
+
export var FormDefaults = { cssClassPrefix: 'envoc-form-' };
|
package/es/Group.d.ts
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { InjectedFieldProps } from './Field/InjectedFieldProps';
|
3
|
-
export interface GroupProps extends InjectedFieldProps<any> {
|
4
|
-
/** Extra class names to apply. */
|
5
|
-
className?: string;
|
6
|
-
children: React.ReactNode;
|
7
|
-
/** Simple text label before the input. */
|
8
|
-
label?: string;
|
9
|
-
/** Simple helper text after the input. */
|
10
|
-
helpText?: string | React.ReactNode;
|
11
|
-
/** Whether the field should be disabled. */
|
12
|
-
disabled?: boolean;
|
13
|
-
required?: boolean;
|
14
|
-
}
|
15
|
-
/** Contains standard field bits like a label, helper text, error scroll target, validation message container, etc. */
|
16
|
-
export default function Group({ className, children, label, helpText, meta, input, disabled, required, }: GroupProps): JSX.Element;
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { InjectedFieldProps } from './Field/InjectedFieldProps';
|
3
|
+
export interface GroupProps extends InjectedFieldProps<any> {
|
4
|
+
/** Extra class names to apply. */
|
5
|
+
className?: string;
|
6
|
+
children: React.ReactNode;
|
7
|
+
/** Simple text label before the input. */
|
8
|
+
label?: string;
|
9
|
+
/** Simple helper text after the input. */
|
10
|
+
helpText?: string | React.ReactNode;
|
11
|
+
/** Whether the field should be disabled. */
|
12
|
+
disabled?: boolean;
|
13
|
+
required?: boolean;
|
14
|
+
}
|
15
|
+
/** Contains standard field bits like a label, helper text, error scroll target, validation message container, etc. */
|
16
|
+
export default function Group({ className, children, label, helpText, meta, input, disabled, required, }: GroupProps): import("react/jsx-runtime").JSX.Element;
|
package/es/Group.js
CHANGED
@@ -1,25 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
import FieldErrorScrollTarget from './Field/FieldErrorScrollTarget';
|
16
|
-
/** Contains standard field bits like a label, helper text, error scroll target, validation message container, etc. */
|
17
|
-
export default function Group(_a) {
|
18
|
-
var _b;
|
19
|
-
var className = _a.className, children = _a.children, label = _a.label, helpText = _a.helpText, meta = _a.meta, input = _a.input, disabled = _a.disabled, required = _a.required;
|
20
|
-
return (_jsxs("div", __assign({ className: classNames(className, FormDefaults.cssClassPrefix + 'group', (_b = {},
|
21
|
-
_b[FormDefaults.cssClassPrefix + 'invalid'] = meta.error,
|
22
|
-
_b[FormDefaults.cssClassPrefix + 'disabled'] = disabled,
|
23
|
-
_b[FormDefaults.cssClassPrefix + 'required'] = required,
|
24
|
-
_b)) }, { children: [_jsx(FieldErrorScrollTarget, {}), meta.warning && (_jsx("div", __assign({ className: FormDefaults.cssClassPrefix + 'warning' }, { children: meta.warning }))), _jsx("label", __assign({ htmlFor: input.id }, { children: label })), children, meta.error && (_jsx("div", __assign({ id: "".concat(input.id, "-error"), className: FormDefaults.cssClassPrefix + 'error' }, { children: meta.error }))), helpText && (_jsx("div", __assign({ className: FormDefaults.cssClassPrefix + 'help' }, { children: helpText })))] })));
|
25
|
-
}
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import classNames from 'classnames';
|
3
|
+
import { FormDefaults } from './FormDefaults';
|
4
|
+
import FieldErrorScrollTarget from './Field/FieldErrorScrollTarget';
|
5
|
+
/** Contains standard field bits like a label, helper text, error scroll target, validation message container, etc. */
|
6
|
+
export default function Group(_a) {
|
7
|
+
var _b;
|
8
|
+
var className = _a.className, children = _a.children, label = _a.label, helpText = _a.helpText, meta = _a.meta, input = _a.input, disabled = _a.disabled, required = _a.required;
|
9
|
+
return (_jsxs("div", { className: classNames(className, FormDefaults.cssClassPrefix + 'group', (_b = {},
|
10
|
+
_b[FormDefaults.cssClassPrefix + 'invalid'] = meta.error,
|
11
|
+
_b[FormDefaults.cssClassPrefix + 'disabled'] = disabled,
|
12
|
+
_b[FormDefaults.cssClassPrefix + 'required'] = required,
|
13
|
+
_b)), children: [_jsx(FieldErrorScrollTarget, {}), meta.warning && (_jsx("div", { className: FormDefaults.cssClassPrefix + 'warning', children: meta.warning })), _jsx("label", { htmlFor: input.id, children: label }), children, meta.error && (_jsx("div", { id: "".concat(input.id, "-error"), className: FormDefaults.cssClassPrefix + 'error', children: meta.error })), helpText && (_jsx("div", { className: FormDefaults.cssClassPrefix + 'help', children: helpText }))] }));
|
14
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { InputGroupProps } from './InputGroup';
|
3
|
-
export interface IconInputGroupProps extends Omit<InputGroupProps<string | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
|
-
type?: 'color' | 'email' | 'search' | 'tel' | 'text' | 'url';
|
5
|
-
/** Icon to display on the input group. */
|
6
|
-
icon: React.ReactNode;
|
7
|
-
/** Text to display after the input group to give more information to the user. */
|
8
|
-
helpText?: string;
|
9
|
-
}
|
10
|
-
/** Input group with an icon. */
|
11
|
-
declare const IconInputGroupWithRef: React.ComponentType<IconInputGroupProps>;
|
12
|
-
export default IconInputGroupWithRef;
|
1
|
+
import React from 'react';
|
2
|
+
import { InputGroupProps } from './InputGroup';
|
3
|
+
export interface IconInputGroupProps extends Omit<InputGroupProps<string | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
|
+
type?: 'color' | 'email' | 'search' | 'tel' | 'text' | 'url';
|
5
|
+
/** Icon to display on the input group. */
|
6
|
+
icon: React.ReactNode;
|
7
|
+
/** Text to display after the input group to give more information to the user. */
|
8
|
+
helpText?: string;
|
9
|
+
}
|
10
|
+
/** Input group with an icon. */
|
11
|
+
declare const IconInputGroupWithRef: React.ComponentType<IconInputGroupProps>;
|
12
|
+
export default IconInputGroupWithRef;
|
@@ -1,43 +1,43 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
24
|
-
import React from 'react';
|
25
|
-
import classNames from 'classnames';
|
26
|
-
import InputGroupWithRef from './InputGroup';
|
27
|
-
import { FormDefaults } from '../FormDefaults';
|
28
|
-
function IconInputGroup(_a, ref) {
|
29
|
-
var _b;
|
30
|
-
var icon = _a.icon, className = _a.className, rest = __rest(_a, ["icon", "className"]);
|
31
|
-
var input = rest.input;
|
32
|
-
return (_jsx(_Fragment, { children: _jsx(InputGroupWithRef, __assign({ icon: icon, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'icon-input-group'), value: (_b = input.value) !== null && _b !== void 0 ? _b : '', onChange: function (e) {
|
33
|
-
if (!e.target.value) {
|
34
|
-
input.onChange(undefined);
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
input.onChange(e.target.value);
|
38
|
-
}
|
39
|
-
} }, rest)) }));
|
40
|
-
}
|
41
|
-
/** Input group with an icon. */
|
42
|
-
var IconInputGroupWithRef = React.forwardRef(IconInputGroup);
|
43
|
-
export default IconInputGroupWithRef;
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
+
var t = {};
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
+
t[p] = s[p];
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
+
t[p[i]] = s[p[i]];
|
20
|
+
}
|
21
|
+
return t;
|
22
|
+
};
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
24
|
+
import React from 'react';
|
25
|
+
import classNames from 'classnames';
|
26
|
+
import InputGroupWithRef from './InputGroup';
|
27
|
+
import { FormDefaults } from '../FormDefaults';
|
28
|
+
function IconInputGroup(_a, ref) {
|
29
|
+
var _b;
|
30
|
+
var icon = _a.icon, className = _a.className, rest = __rest(_a, ["icon", "className"]);
|
31
|
+
var input = rest.input;
|
32
|
+
return (_jsx(_Fragment, { children: _jsx(InputGroupWithRef, __assign({ icon: icon, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'icon-input-group'), value: (_b = input.value) !== null && _b !== void 0 ? _b : '', onChange: function (e) {
|
33
|
+
if (!e.target.value) {
|
34
|
+
input.onChange(undefined);
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
input.onChange(e.target.value);
|
38
|
+
}
|
39
|
+
} }, rest)) }));
|
40
|
+
}
|
41
|
+
/** Input group with an icon. */
|
42
|
+
var IconInputGroupWithRef = React.forwardRef(IconInputGroup);
|
43
|
+
export default IconInputGroupWithRef;
|
package/es/Input/InputGroup.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import React, { ChangeEventHandler, LegacyRef } from 'react';
|
2
|
-
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
3
|
-
import { GroupProps } from '../Group';
|
4
|
-
export interface InputGroupProps<TValue> extends InjectedFieldProps<TValue>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label' | 'value'>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'> {
|
5
|
-
onChange: ChangeEventHandler<HTMLInputElement>;
|
6
|
-
value: string | number | null | undefined;
|
7
|
-
icon?: React.ReactNode;
|
8
|
-
}
|
9
|
-
declare function InputGroup<TValue>({ input, meta, label, helpText, className, required, disabled, onChange, value, icon, ...rest }: InputGroupProps<TValue>, ref: LegacyRef<HTMLInputElement>): JSX.Element;
|
10
|
-
/** Generic controlled `<input/>` wrapped by a `<Group/>` */
|
11
|
-
declare const InputGroupWithRef: typeof InputGroup;
|
12
|
-
export default InputGroupWithRef;
|
1
|
+
import React, { ChangeEventHandler, LegacyRef } from 'react';
|
2
|
+
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
3
|
+
import { GroupProps } from '../Group';
|
4
|
+
export interface InputGroupProps<TValue> extends InjectedFieldProps<TValue>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label' | 'value'>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'> {
|
5
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
6
|
+
value: string | number | null | undefined;
|
7
|
+
icon?: React.ReactNode;
|
8
|
+
}
|
9
|
+
declare function InputGroup<TValue>({ input, meta, label, helpText, className, required, disabled, onChange, value, icon, ...rest }: InputGroupProps<TValue>, ref: LegacyRef<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
10
|
+
/** Generic controlled `<input/>` wrapped by a `<Group/>` */
|
11
|
+
declare const InputGroupWithRef: typeof InputGroup;
|
12
|
+
export default InputGroupWithRef;
|
package/es/Input/InputGroup.js
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
-
import React from 'react';
|
25
|
-
import classNames from 'classnames';
|
26
|
-
import { FormDefaults } from '../FormDefaults';
|
27
|
-
import Group from '../Group';
|
28
|
-
function InputGroup(_a, ref) {
|
29
|
-
var input = _a.input, meta = _a.meta, label = _a.label, helpText = _a.helpText, className = _a.className, required = _a.required, disabled = _a.disabled, onChange = _a.onChange, value = _a.value, icon = _a.icon, rest = __rest(_a, ["input", "meta", "label", "helpText", "className", "required", "disabled", "onChange", "value", "icon"]);
|
30
|
-
return (_jsxs(Group,
|
31
|
-
}
|
32
|
-
/** Generic controlled `<input/>` wrapped by a `<Group/>` */
|
33
|
-
var InputGroupWithRef = React.forwardRef(InputGroup);
|
34
|
-
export default InputGroupWithRef;
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
+
var t = {};
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
+
t[p] = s[p];
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
+
t[p[i]] = s[p[i]];
|
20
|
+
}
|
21
|
+
return t;
|
22
|
+
};
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import React from 'react';
|
25
|
+
import classNames from 'classnames';
|
26
|
+
import { FormDefaults } from '../FormDefaults';
|
27
|
+
import Group from '../Group';
|
28
|
+
function InputGroup(_a, ref) {
|
29
|
+
var input = _a.input, meta = _a.meta, label = _a.label, helpText = _a.helpText, className = _a.className, required = _a.required, disabled = _a.disabled, onChange = _a.onChange, value = _a.value, icon = _a.icon, rest = __rest(_a, ["input", "meta", "label", "helpText", "className", "required", "disabled", "onChange", "value", "icon"]);
|
30
|
+
return (_jsxs(Group, { input: input, meta: meta, required: required, disabled: disabled, label: label, helpText: helpText, className: classNames(className, FormDefaults.cssClassPrefix + 'input-group'), children: [icon, _jsx("input", __assign({}, input, rest, { "aria-invalid": !!meta.error, "aria-errormessage": !!meta.error ? "".concat(input.name, "-error") : undefined, value: value !== null && value !== void 0 ? value : '', onChange: onChange, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'input-group') }))] }));
|
31
|
+
}
|
32
|
+
/** Generic controlled `<input/>` wrapped by a `<Group/>` */
|
33
|
+
var InputGroupWithRef = React.forwardRef(InputGroup);
|
34
|
+
export default InputGroupWithRef;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { InputGroupProps } from './InputGroup';
|
3
|
-
export interface MoneyInputGroupProps extends Omit<InputGroupProps<number | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
|
-
/** Custom parsing function when the value changes. */
|
5
|
-
parseFunc?: typeof parseInt | typeof parseFloat;
|
6
|
-
}
|
7
|
-
/** Input group for inputting money. */
|
8
|
-
declare const MoneyInputGroupWithRef: React.FunctionComponent<MoneyInputGroupProps>;
|
9
|
-
export default MoneyInputGroupWithRef;
|
1
|
+
import React from 'react';
|
2
|
+
import { InputGroupProps } from './InputGroup';
|
3
|
+
export interface MoneyInputGroupProps extends Omit<InputGroupProps<number | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
|
+
/** Custom parsing function when the value changes. */
|
5
|
+
parseFunc?: typeof parseInt | typeof parseFloat;
|
6
|
+
}
|
7
|
+
/** Input group for inputting money. */
|
8
|
+
declare const MoneyInputGroupWithRef: React.FunctionComponent<MoneyInputGroupProps>;
|
9
|
+
export default MoneyInputGroupWithRef;
|
@@ -1,43 +1,43 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
-
import React from 'react';
|
25
|
-
import classNames from 'classnames';
|
26
|
-
import InputGroup from './InputGroup';
|
27
|
-
import { FormDefaults } from '../FormDefaults';
|
28
|
-
function MoneyInputGroup(_a, ref) {
|
29
|
-
var parseFunc = _a.parseFunc, className = _a.className, rest = __rest(_a, ["parseFunc", "className"]);
|
30
|
-
var effectiveParse = parseFunc !== null && parseFunc !== void 0 ? parseFunc : parseFloat;
|
31
|
-
var input = rest.input;
|
32
|
-
return (_jsx(InputGroup, __assign({ ref: ref, step: 0.01, min: 0 }, rest, { type: "number", className: classNames(className, FormDefaults.cssClassPrefix + 'money-group'), value: input.value || '', onChange: function (e) {
|
33
|
-
if (!e.target.value) {
|
34
|
-
input.onChange(undefined);
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
input.onChange(effectiveParse(e.target.value));
|
38
|
-
}
|
39
|
-
} })));
|
40
|
-
}
|
41
|
-
/** Input group for inputting money. */
|
42
|
-
var MoneyInputGroupWithRef = React.forwardRef(MoneyInputGroup);
|
43
|
-
export default MoneyInputGroupWithRef;
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
+
var t = {};
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
+
t[p] = s[p];
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
+
t[p[i]] = s[p[i]];
|
20
|
+
}
|
21
|
+
return t;
|
22
|
+
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import React from 'react';
|
25
|
+
import classNames from 'classnames';
|
26
|
+
import InputGroup from './InputGroup';
|
27
|
+
import { FormDefaults } from '../FormDefaults';
|
28
|
+
function MoneyInputGroup(_a, ref) {
|
29
|
+
var parseFunc = _a.parseFunc, className = _a.className, rest = __rest(_a, ["parseFunc", "className"]);
|
30
|
+
var effectiveParse = parseFunc !== null && parseFunc !== void 0 ? parseFunc : parseFloat;
|
31
|
+
var input = rest.input;
|
32
|
+
return (_jsx(InputGroup, __assign({ ref: ref, step: 0.01, min: 0 }, rest, { type: "number", className: classNames(className, FormDefaults.cssClassPrefix + 'money-group'), value: input.value || '', onChange: function (e) {
|
33
|
+
if (!e.target.value) {
|
34
|
+
input.onChange(undefined);
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
input.onChange(effectiveParse(e.target.value));
|
38
|
+
}
|
39
|
+
} })));
|
40
|
+
}
|
41
|
+
/** Input group for inputting money. */
|
42
|
+
var MoneyInputGroupWithRef = React.forwardRef(MoneyInputGroup);
|
43
|
+
export default MoneyInputGroupWithRef;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { InputGroupProps } from './InputGroup';
|
3
|
-
export interface NumberInputGroupProps extends Omit<InputGroupProps<number | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
|
-
/** Custom parsing function when the value changes. */
|
5
|
-
parseFunc?: typeof parseInt | typeof parseFloat;
|
6
|
-
}
|
7
|
-
/** Standard number input group. By default allows for float values. */
|
8
|
-
declare const NumberInputGroupWithRef: React.ComponentType<NumberInputGroupProps>;
|
9
|
-
export default NumberInputGroupWithRef;
|
1
|
+
import React from 'react';
|
2
|
+
import { InputGroupProps } from './InputGroup';
|
3
|
+
export interface NumberInputGroupProps extends Omit<InputGroupProps<number | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
|
+
/** Custom parsing function when the value changes. */
|
5
|
+
parseFunc?: typeof parseInt | typeof parseFloat;
|
6
|
+
}
|
7
|
+
/** Standard number input group. By default allows for float values. */
|
8
|
+
declare const NumberInputGroupWithRef: React.ComponentType<NumberInputGroupProps>;
|
9
|
+
export default NumberInputGroupWithRef;
|