@itcase/forms-web 0.0.0-stage → 1.1.117
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/FinalForm_CDnQeCDK.js +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/messages.constant.js +1 -0
- package/dist/css/styles/bundles.css +786 -0
- package/dist/form/Field/Before/FormFieldBefore.constants.js +1 -0
- package/dist/form/Field/Before/FormFieldBefore.js +1 -0
- package/dist/form/Field/Before/index.js +1 -0
- package/dist/form/Field/Checkbox/FormFieldCheckbox.js +1 -0
- package/dist/form/Field/Checkbox/appearance/default.js +1 -0
- package/dist/form/Field/Checkbox/index.js +1 -0
- package/dist/form/Field/Chips/FormFieldChips.js +1 -0
- package/dist/form/Field/Chips/appearance/default.js +1 -0
- package/dist/form/Field/Chips/index.js +1 -0
- package/dist/form/Field/Choice/FormFieldChoice.js +1 -0
- package/dist/form/Field/Choice/appearance/default.js +1 -0
- package/dist/form/Field/Choice/index.js +1 -0
- package/dist/form/Field/Code/FormFieldCode.js +1 -0
- package/dist/form/Field/Code/appearance/default.js +1 -0
- package/dist/form/Field/Code/index.js +1 -0
- package/dist/form/Field/ColorInput/FormFieldColorInput.js +1 -0
- package/dist/form/Field/ColorInput/appearance/default.js +1 -0
- package/dist/form/Field/ColorInput/index.js +1 -0
- package/dist/form/Field/Custom/FormFieldCustom.js +1 -0
- package/dist/form/Field/Custom/index.js +1 -0
- package/dist/form/Field/Dadata/FormFieldDadataInput.js +1 -0
- package/dist/form/Field/Dadata/appearance/default.js +1 -0
- package/dist/form/Field/Dadata/index.js +1 -0
- package/dist/form/Field/DatePicker/FormFieldDatePicker.js +1 -0
- package/dist/form/Field/DatePicker/appearance/default.js +1 -0
- package/dist/form/Field/DatePicker/index.js +1 -0
- package/dist/form/Field/FileInput/FormFieldFileInput.js +1 -0
- package/dist/form/Field/FileInput/appearance/default.js +1 -0
- package/dist/form/Field/FileInput/index.js +1 -0
- package/dist/form/Field/Group/FormGroup.js +1 -0
- package/dist/form/Field/Group/appearance/default.js +1 -0
- package/dist/form/Field/Group/index.js +1 -0
- package/dist/form/Field/Input/FormFieldInput.js +1 -0
- package/dist/form/Field/Input/appearance/default.js +1 -0
- package/dist/form/Field/Input/index.js +1 -0
- package/dist/form/Field/InputNumber/FormFieldInputNumber.js +1 -0
- package/dist/form/Field/InputNumber/appearance/default.js +1 -0
- package/dist/form/Field/InputNumber/index.js +1 -0
- package/dist/form/Field/MaskedInput/FormFieldMaskedInput.js +1 -0
- package/dist/form/Field/MaskedInput/appearance/default.js +1 -0
- package/dist/form/Field/MaskedInput/index.js +1 -0
- package/dist/form/Field/Password/FormFieldPassword.js +1 -0
- package/dist/form/Field/Password/appearance/default.js +1 -0
- package/dist/form/Field/Password/index.js +1 -0
- package/dist/form/Field/RadioGroup/FormFieldRadioGroup.js +1 -0
- package/dist/form/Field/RadioGroup/FormFieldRadioGroupList.js +1 -0
- package/dist/form/Field/RadioGroup/appearance/default.js +1 -0
- package/dist/form/Field/RadioGroup/index.js +1 -0
- package/dist/form/Field/Segmented/FormFieldSegmented.js +1 -0
- package/dist/form/Field/Segmented/appearance/default.js +1 -0
- package/dist/form/Field/Segmented/index.js +1 -0
- package/dist/form/Field/Select/FormFieldSelect.js +1 -0
- package/dist/form/Field/Select/appearance/default.js +1 -0
- package/dist/form/Field/Select/index.js +1 -0
- package/dist/form/Field/Switch/FormFieldSwitch.js +1 -0
- package/dist/form/Field/Switch/appearance/default.js +1 -0
- package/dist/form/Field/Switch/index.js +1 -0
- package/dist/form/Field/Textarea/FormFieldTextarea.js +1 -0
- package/dist/form/Field/Textarea/appearance/default.js +1 -0
- package/dist/form/Field/Textarea/index.js +1 -0
- package/dist/form/Field/index.js +1 -0
- package/dist/form/FieldWrapper/FieldWrapper.js +1 -0
- package/dist/form/FieldWrapper/appearance/default.js +1 -0
- package/dist/form/FieldWrapper/index.js +1 -0
- package/dist/form/Form/FinalForm.js +1 -0
- package/dist/form/generator/generateField.constants.js +1 -0
- package/dist/form/generator/generateField.js +1 -0
- package/dist/form/generator/generateFormButtons.js +1 -0
- package/dist/form/generator/index.js +1 -0
- package/dist/form/index.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/constants/index.d.ts +4 -0
- package/dist/types/constants/messages.constant.d.ts +75 -0
- package/dist/types/constants/messages.interface.d.ts +8 -0
- package/dist/types/form/Field/Before/FormFieldBefore.constants.d.ts +16 -0
- package/dist/types/form/Field/Before/FormFieldBefore.d.ts +3 -0
- package/dist/types/form/Field/Before/FormFieldBefore.interface.d.ts +25 -0
- package/dist/types/form/Field/Before/index.d.ts +4 -0
- package/dist/types/form/Field/Checkbox/FormFieldCheckbox.d.ts +4 -0
- package/dist/types/form/Field/Checkbox/FormFieldCheckbox.interface.d.ts +22 -0
- package/dist/types/form/Field/Checkbox/appearance/default.d.ts +3 -0
- package/dist/types/form/Field/Checkbox/index.d.ts +4 -0
- package/dist/types/form/Field/Chips/FormFieldChips.d.ts +3 -0
- package/dist/types/form/Field/Chips/FormFieldChips.interface.d.ts +28 -0
- package/dist/types/form/Field/Chips/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/Chips/index.d.ts +4 -0
- package/dist/types/form/Field/Choice/FormFieldChoice.d.ts +4 -0
- package/dist/types/form/Field/Choice/FormFieldChoice.interface.d.ts +24 -0
- package/dist/types/form/Field/Choice/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/Choice/index.d.ts +4 -0
- package/dist/types/form/Field/Code/FormFieldCode.d.ts +4 -0
- package/dist/types/form/Field/Code/FormFieldCode.interface.d.ts +20 -0
- package/dist/types/form/Field/Code/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/Code/index.d.ts +4 -0
- package/dist/types/form/Field/ColorInput/FormFieldColorInput.d.ts +4 -0
- package/dist/types/form/Field/ColorInput/FormFieldColorInput.interface.d.ts +20 -0
- package/dist/types/form/Field/ColorInput/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/ColorInput/index.d.ts +4 -0
- package/dist/types/form/Field/Custom/FormFieldCustom.d.ts +4 -0
- package/dist/types/form/Field/Custom/FormFieldCustom.interface.d.ts +19 -0
- package/dist/types/form/Field/Custom/index.d.ts +4 -0
- package/dist/types/form/Field/Dadata/FormFieldDadataInput.d.ts +4 -0
- package/dist/types/form/Field/Dadata/FormFieldDadataInput.interface.d.ts +21 -0
- package/dist/types/form/Field/Dadata/appearance/default.d.ts +3 -0
- package/dist/types/form/Field/Dadata/index.d.ts +4 -0
- package/dist/types/form/Field/DatePicker/FormFieldDatePicker.d.ts +3 -0
- package/dist/types/form/Field/DatePicker/FormFieldDatePicker.interface.d.ts +20 -0
- package/dist/types/form/Field/DatePicker/appearance/default.d.ts +15 -0
- package/dist/types/form/Field/DatePicker/index.d.ts +4 -0
- package/dist/types/form/Field/FileInput/FormFieldFileInput.d.ts +4 -0
- package/dist/types/form/Field/FileInput/FormFieldFileInput.interface.d.ts +20 -0
- package/dist/types/form/Field/FileInput/appearance/default.d.ts +3 -0
- package/dist/types/form/Field/FileInput/index.d.ts +4 -0
- package/dist/types/form/Field/Group/FormGroup.d.ts +4 -0
- package/dist/types/form/Field/Group/FormGroup.interface.d.ts +53 -0
- package/dist/types/form/Field/Group/appearance/default.d.ts +3 -0
- package/dist/types/form/Field/Group/index.d.ts +5 -0
- package/dist/types/form/Field/Input/FormFieldInput.d.ts +4 -0
- package/dist/types/form/Field/Input/FormFieldInput.interface.d.ts +28 -0
- package/dist/types/form/Field/Input/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/Input/index.d.ts +4 -0
- package/dist/types/form/Field/InputNumber/FormFieldInputNumber.d.ts +4 -0
- package/dist/types/form/Field/InputNumber/FormFieldInputNumber.interface.d.ts +22 -0
- package/dist/types/form/Field/InputNumber/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/InputNumber/index.d.ts +4 -0
- package/dist/types/form/Field/MaskedInput/FormFieldMaskedInput.d.ts +4 -0
- package/dist/types/form/Field/MaskedInput/FormFieldMaskedInput.interface.d.ts +30 -0
- package/dist/types/form/Field/MaskedInput/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/MaskedInput/index.d.ts +4 -0
- package/dist/types/form/Field/Password/FormFieldPassword.d.ts +4 -0
- package/dist/types/form/Field/Password/FormFieldPassword.interface.d.ts +20 -0
- package/dist/types/form/Field/Password/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/Password/index.d.ts +4 -0
- package/dist/types/form/Field/RadioGroup/FormFieldRadioGroup.d.ts +4 -0
- package/dist/types/form/Field/RadioGroup/FormFieldRadioGroup.interface.d.ts +31 -0
- package/dist/types/form/Field/RadioGroup/FormFieldRadioGroupList.d.ts +4 -0
- package/dist/types/form/Field/RadioGroup/appearance/default.d.ts +3 -0
- package/dist/types/form/Field/RadioGroup/index.d.ts +4 -0
- package/dist/types/form/Field/Segmented/FormFieldSegmented.d.ts +3 -0
- package/dist/types/form/Field/Segmented/FormFieldSegmented.interface.d.ts +20 -0
- package/dist/types/form/Field/Segmented/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/Segmented/index.d.ts +4 -0
- package/dist/types/form/Field/Select/FormFieldSelect.d.ts +4 -0
- package/dist/types/form/Field/Select/FormFieldSelect.interface.d.ts +38 -0
- package/dist/types/form/Field/Select/appearance/default.d.ts +4 -0
- package/dist/types/form/Field/Select/index.d.ts +4 -0
- package/dist/types/form/Field/Switch/FormFieldSwitch.d.ts +5 -0
- package/dist/types/form/Field/Switch/FormFieldSwitch.interface.d.ts +20 -0
- package/dist/types/form/Field/Switch/appearance/default.d.ts +3 -0
- package/dist/types/form/Field/Switch/index.d.ts +4 -0
- package/dist/types/form/Field/Textarea/FormFieldTextarea.d.ts +4 -0
- package/dist/types/form/Field/Textarea/FormFieldTextarea.interface.d.ts +18 -0
- package/dist/types/form/Field/Textarea/appearance/default.d.ts +3 -0
- package/dist/types/form/Field/Textarea/index.d.ts +4 -0
- package/dist/types/form/Field/index.d.ts +42 -0
- package/dist/types/form/FieldWrapper/FieldWrapper.d.ts +4 -0
- package/dist/types/form/FieldWrapper/FieldWrapper.interface.d.ts +90 -0
- package/dist/types/form/FieldWrapper/appearance/default.d.ts +7 -0
- package/dist/types/form/FieldWrapper/index.d.ts +5 -0
- package/dist/types/form/Form/FinalForm.d.ts +5 -0
- package/dist/types/form/Form/FinalForm.interface.d.ts +112 -0
- package/dist/types/form/generator/generateField.constants.d.ts +23 -0
- package/dist/types/form/generator/generateField.d.ts +3 -0
- package/dist/types/form/generator/generateField.interface.d.ts +45 -0
- package/dist/types/form/generator/generateFormButtons.d.ts +3 -0
- package/dist/types/form/generator/index.d.ts +3 -0
- package/dist/types/form/index.d.ts +4 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +79 -4
- package/README.md +0 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TextProps } from '@itcase/ui-web/components/Text';
|
|
3
|
+
import type { TitleProps } from '@itcase/ui-web/components/Title';
|
|
4
|
+
type FormFieldBeforeType = 'text' | 'title';
|
|
5
|
+
interface FormFieldBeforeProps {
|
|
6
|
+
after?: ReactNode;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
dataTestId?: string;
|
|
10
|
+
desc?: string;
|
|
11
|
+
descTextColor?: TextProps['textColor'];
|
|
12
|
+
descTextSize?: TextProps['size'];
|
|
13
|
+
descTextWeight?: TextProps['textWeight'];
|
|
14
|
+
label?: string;
|
|
15
|
+
labelHidden?: string;
|
|
16
|
+
labelTextColor?: TextProps['textColor'];
|
|
17
|
+
labelTextSize?: TextProps['size'];
|
|
18
|
+
labelTextWeight?: TextProps['textWeight'];
|
|
19
|
+
title?: TitleProps['text'];
|
|
20
|
+
titleTextColor?: TitleProps['textColor'];
|
|
21
|
+
titleTextSize?: TitleProps['size'];
|
|
22
|
+
titleTextWeight?: TitleProps['textWeight'];
|
|
23
|
+
type?: FormFieldBeforeType;
|
|
24
|
+
}
|
|
25
|
+
export type { FormFieldBeforeProps, FormFieldBeforeType };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import type { CheckboxProps } from '@itcase/ui-web/components/Checkbox';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
import { FieldWrapperBaseProps } from 'src/form/FieldWrapper/FieldWrapper.interface';
|
|
5
|
+
type DefaultCheckboxProps = {
|
|
6
|
+
appearance: CompositeAppearanceStateDefault;
|
|
7
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
8
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
9
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
10
|
+
width?: WidthProps;
|
|
11
|
+
};
|
|
12
|
+
type CheckboxInputProps = Partial<DefaultCheckboxProps & Pick<CheckboxProps, 'className' | 'dataTestId' | 'desc' | 'disabled' | 'indeterminate' | 'label' | 'value'>>;
|
|
13
|
+
type CheckboxField = Omit<BaseField, 'inputProps'> & {
|
|
14
|
+
inputProps: CheckboxInputProps;
|
|
15
|
+
onChange?: (isChecked: boolean, name: string) => void;
|
|
16
|
+
type: Extract<FormTypes, 'checkbox'>;
|
|
17
|
+
};
|
|
18
|
+
type FormFieldCheckboxProps = CheckboxField & {
|
|
19
|
+
fieldProps?: FieldWrapperBaseProps;
|
|
20
|
+
initialValue?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type { CheckboxField, CheckboxInputProps, DefaultCheckboxProps, FormFieldCheckboxProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultCheckboxProps } from './appearance/default';
|
|
2
|
+
import { FormFieldCheckbox } from './FormFieldCheckbox';
|
|
3
|
+
export { defaultCheckboxProps, FormFieldCheckbox };
|
|
4
|
+
export type { CheckboxField, CheckboxInputProps, DefaultCheckboxProps, FormFieldCheckboxProps, } from './FormFieldCheckbox.interface';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Option } from '@itcase/types-core';
|
|
2
|
+
import { CompositeAppearanceKeys, CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
3
|
+
import type { ChipsProps } from '@itcase/ui-web/components/Chips';
|
|
4
|
+
import { TextProps } from '@itcase/ui-web/components/Text';
|
|
5
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
6
|
+
type ChipsInputProps = Partial<ChipsProps & DefaultChipsProps>;
|
|
7
|
+
type ChipsField = Omit<BaseField, 'inputProps'> & {
|
|
8
|
+
inputProps: ChipsInputProps;
|
|
9
|
+
options: Array<Option & {
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
type: Extract<FormTypes, 'chips'>;
|
|
14
|
+
};
|
|
15
|
+
type FormFieldChipsProps = ChipsField & {
|
|
16
|
+
emptyMessage?: string;
|
|
17
|
+
emptyMessageTextColor?: TextProps['textColor'];
|
|
18
|
+
emptyMessageTextSize?: TextProps['size'];
|
|
19
|
+
initialValue?: string[];
|
|
20
|
+
onChange?: (values: string[]) => void;
|
|
21
|
+
};
|
|
22
|
+
type DefaultChipsProps = {
|
|
23
|
+
appearance: CompositeAppearanceKeys;
|
|
24
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
25
|
+
requiredAppearance: CompositeAppearanceKeys;
|
|
26
|
+
width?: WidthProps;
|
|
27
|
+
};
|
|
28
|
+
export type { ChipsField, ChipsInputProps, DefaultChipsProps, FormFieldChipsProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultChipsProps, defaultChipsPropsSizeXL } from './appearance/default';
|
|
2
|
+
import { FormFieldChips } from './FormFieldChips';
|
|
3
|
+
export { defaultChipsProps, defaultChipsPropsSizeXL, FormFieldChips };
|
|
4
|
+
export type { ChipsField, ChipsInputProps, DefaultChipsProps, FormFieldChipsProps, } from './FormFieldChips.interface';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import { ChoiceProps } from '@itcase/ui-web/components/Choice';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
import { FieldWrapperProps } from 'src/form/FieldWrapper/FieldWrapper.interface';
|
|
5
|
+
type ChoiceInputProps = Partial<ChoiceProps & DefaultChoiceProps>;
|
|
6
|
+
type ChoiceField = Omit<BaseField, 'inputProps'> & {
|
|
7
|
+
inputProps: ChoiceInputProps;
|
|
8
|
+
onChange: (value: string, name: string, isChecked?: boolean) => void;
|
|
9
|
+
options: ChoiceProps['options'];
|
|
10
|
+
type: Extract<FormTypes, 'choice'>;
|
|
11
|
+
};
|
|
12
|
+
type FormFieldChoiceProps = ChoiceField & {
|
|
13
|
+
initialValue?: string;
|
|
14
|
+
isCheckbox?: boolean;
|
|
15
|
+
label?: FieldWrapperProps['label'];
|
|
16
|
+
};
|
|
17
|
+
type DefaultChoiceProps = {
|
|
18
|
+
appearance: CompositeAppearanceStateDefault;
|
|
19
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
20
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
21
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
22
|
+
width?: WidthProps;
|
|
23
|
+
};
|
|
24
|
+
export type { ChoiceField, ChoiceInputProps, DefaultChoiceProps, FormFieldChoiceProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultChoiceProps, defaultChoicePropsSizeL } from './appearance/default';
|
|
2
|
+
import { FormFieldChoice } from './FormFieldChoice';
|
|
3
|
+
export { defaultChoiceProps, defaultChoicePropsSizeL, FormFieldChoice };
|
|
4
|
+
export type { ChoiceField, ChoiceInputProps, DefaultChoiceProps, FormFieldChoiceProps, } from './FormFieldChoice.interface';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import type { CodeProps } from '@itcase/ui-web/components/Code';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
type CodeInputProps = Partial<CodeProps & DefaultCodeProps>;
|
|
5
|
+
type CodeField = CodeInputProps & Omit<BaseField, 'inputProps'> & {
|
|
6
|
+
inputProps?: CodeInputProps;
|
|
7
|
+
type: Extract<FormTypes, 'code'>;
|
|
8
|
+
};
|
|
9
|
+
type FormFieldCodeProps = CodeField & {
|
|
10
|
+
initialValue?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
};
|
|
13
|
+
type DefaultCodeProps = {
|
|
14
|
+
appearance: CompositeAppearanceStateDefault;
|
|
15
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
16
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
17
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
18
|
+
width?: WidthProps;
|
|
19
|
+
};
|
|
20
|
+
export type { CodeField, CodeInputProps, DefaultCodeProps, FormFieldCodeProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultCodeProps, defaultCodePropsSizeL } from './appearance/default';
|
|
2
|
+
import { FormFieldCode } from './FormFieldCode';
|
|
3
|
+
export { defaultCodeProps, defaultCodePropsSizeL, FormFieldCode };
|
|
4
|
+
export type { CodeField, CodeInputProps, DefaultCodeProps, FormFieldCodeProps, } from './FormFieldCode.interface';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import type { ColorInputProps } from '@itcase/ui-web/components/ColorInput';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
type ColorInputColorInputProps = Partial<ColorInputProps & DefaultColorInputProps>;
|
|
5
|
+
type ColorInputField = Omit<BaseField, 'ColorInputProps'> & {
|
|
6
|
+
inputProps: ColorInputColorInputProps;
|
|
7
|
+
type: Extract<FormTypes, 'color'>;
|
|
8
|
+
};
|
|
9
|
+
type FormFieldColorInputProps = ColorInputField & {
|
|
10
|
+
initialValue?: string;
|
|
11
|
+
onChange?: (value: string, name?: string) => void;
|
|
12
|
+
};
|
|
13
|
+
type DefaultColorInputProps = {
|
|
14
|
+
appearance: CompositeAppearanceStateDefault;
|
|
15
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
16
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
17
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
18
|
+
width: WidthProps;
|
|
19
|
+
};
|
|
20
|
+
export type { ColorInputColorInputProps, ColorInputField, DefaultColorInputProps, FormFieldColorInputProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DefaultColorInputProps } from '../FormFieldColorInput.interface';
|
|
2
|
+
declare const defaultColorInputProps: DefaultColorInputProps;
|
|
3
|
+
declare const defaultColorInputPropsSizeXL: DefaultColorInputProps;
|
|
4
|
+
export { defaultColorInputProps, defaultColorInputPropsSizeXL };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultColorInputProps, defaultColorInputPropsSizeXL } from './appearance/default';
|
|
2
|
+
import { FormFieldColorInput } from './FormFieldColorInput';
|
|
3
|
+
export { defaultColorInputProps, defaultColorInputPropsSizeXL, FormFieldColorInput, };
|
|
4
|
+
export type { ColorInputColorInputProps, ColorInputField, DefaultColorInputProps, FormFieldColorInputProps, } from './FormFieldColorInput.interface';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconProps } from '@itcase/ui-web/components/Icon';
|
|
2
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
3
|
+
type CustomField = BaseField & {
|
|
4
|
+
Component: React.ComponentType<Partial<Record<string, boolean | object | string>>>;
|
|
5
|
+
type: Extract<FormTypes, 'custom'>;
|
|
6
|
+
};
|
|
7
|
+
type FormFieldCustomProps = CustomField & {
|
|
8
|
+
classNameGroupItem?: string;
|
|
9
|
+
clearIcon?: IconProps['SvgImage'];
|
|
10
|
+
clearIconFill?: IconProps['iconFill'];
|
|
11
|
+
clearIconFillHover?: IconProps['iconFillHover'];
|
|
12
|
+
clearIconShape?: IconProps['shape'];
|
|
13
|
+
clearIconSize?: IconProps['size'];
|
|
14
|
+
dataTestId?: string;
|
|
15
|
+
initialValue?: object;
|
|
16
|
+
isHidden?: boolean;
|
|
17
|
+
onClickClearIcon?: IconProps['onClick'];
|
|
18
|
+
};
|
|
19
|
+
export type { CustomField, FormFieldCustomProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault } from '@itcase/types-ui';
|
|
2
|
+
import { DadataProps } from '@itcase/ui-web/components/Dadata';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
type DadataInputProps = Partial<DadataProps['inputProps'] & DefaultDadataProps>;
|
|
5
|
+
type DadataField = Omit<BaseField, 'inputProps'> & {
|
|
6
|
+
inputProps: DadataInputProps;
|
|
7
|
+
token: DadataProps['token'];
|
|
8
|
+
type: Extract<FormTypes, 'dadataInput'>;
|
|
9
|
+
};
|
|
10
|
+
type FormFieldDadataInputProps = DadataField & {
|
|
11
|
+
initialValue?: string;
|
|
12
|
+
onDadataAutocomplete?: DadataProps['setValue'];
|
|
13
|
+
parse?: (value: number, name: string) => string;
|
|
14
|
+
};
|
|
15
|
+
type DefaultDadataProps = {
|
|
16
|
+
appearance: CompositeAppearanceStateDefault;
|
|
17
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
18
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
19
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
20
|
+
};
|
|
21
|
+
export type { DadataField, DadataInputProps, DefaultDadataProps, FormFieldDadataInputProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultDadataInputProps } from './appearance/default';
|
|
2
|
+
import { FormFieldDadataInput } from './FormFieldDadataInput';
|
|
3
|
+
export { defaultDadataInputProps, FormFieldDadataInput };
|
|
4
|
+
export type { DadataField, DadataInputProps, DefaultDadataProps, FormFieldDadataInputProps, } from './FormFieldDadataInput.interface';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import type { DatePickerInputProps } from '@itcase/ui-web/components/DatePicker';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
type DefaultDatepickerInputProps = {
|
|
5
|
+
appearance: CompositeAppearanceStateDefault;
|
|
6
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
7
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
8
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
9
|
+
width?: WidthProps;
|
|
10
|
+
};
|
|
11
|
+
type DatePickerFieldInputProps = Partial<DatePickerInputProps['inputProps'] & DefaultDatepickerInputProps>;
|
|
12
|
+
type DatePickerField = Omit<BaseField, 'inputProps'> & {
|
|
13
|
+
inputProps: DatePickerFieldInputProps;
|
|
14
|
+
type: Extract<FormTypes, 'datePicker'>;
|
|
15
|
+
};
|
|
16
|
+
type FormFieldDatePickerProps = DatePickerField & {
|
|
17
|
+
datePickerProps?: DatePickerInputProps['datePickerProps'];
|
|
18
|
+
onChange?: DatePickerInputProps['onChange'];
|
|
19
|
+
};
|
|
20
|
+
export type { DatePickerField, DatePickerFieldInputProps, DefaultDatepickerInputProps, FormFieldDatePickerProps, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DefaultDatepickerInputProps } from '../FormFieldDatePicker.interface';
|
|
2
|
+
declare const defaultDatepickerProps: {
|
|
3
|
+
appearance: string;
|
|
4
|
+
dateFormat: string;
|
|
5
|
+
readOnly: boolean;
|
|
6
|
+
selectsRange: boolean;
|
|
7
|
+
showTimeSelect: boolean;
|
|
8
|
+
timeCaption: string;
|
|
9
|
+
timeFormat: string;
|
|
10
|
+
timeIntervals: number;
|
|
11
|
+
isClearable: boolean;
|
|
12
|
+
isStartDefaultNull: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const defaultDatepickerInputProps: DefaultDatepickerInputProps;
|
|
15
|
+
export { defaultDatepickerInputProps, defaultDatepickerProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultDatepickerInputProps, defaultDatepickerProps } from './appearance/default';
|
|
2
|
+
import { FormFieldDatePicker } from './FormFieldDatePicker';
|
|
3
|
+
export { defaultDatepickerInputProps, defaultDatepickerProps, FormFieldDatePicker, };
|
|
4
|
+
export type { DatePickerField, DatePickerFieldInputProps, DefaultDatepickerInputProps, FormFieldDatePickerProps, } from './FormFieldDatePicker.interface';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import type { DropzoneProps } from '@itcase/ui-web/components/Dropzone';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
type DefaultDropzoneProps = {
|
|
5
|
+
appearance: CompositeAppearanceStateDefault;
|
|
6
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
7
|
+
isPreviews: boolean;
|
|
8
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
9
|
+
showFilename: boolean;
|
|
10
|
+
showFileSize: boolean;
|
|
11
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
12
|
+
};
|
|
13
|
+
type FileInputField = Omit<BaseField, 'inputProps'> & Partial<Omit<DropzoneProps, 'fieldValuesList' | 'inputName' | 'onChangeFiles'>> & {
|
|
14
|
+
inputProps?: Partial<DropzoneProps>;
|
|
15
|
+
label?: string;
|
|
16
|
+
type: Extract<FormTypes, 'fileInput'>;
|
|
17
|
+
width?: WidthProps;
|
|
18
|
+
};
|
|
19
|
+
type FormFieldFileInputProps = FileInputField;
|
|
20
|
+
export type { DefaultDropzoneProps, FileInputField, FormFieldFileInputProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultDropzoneProps } from './appearance/default';
|
|
2
|
+
import { FormFieldFileInput } from './FormFieldFileInput';
|
|
3
|
+
export { defaultDropzoneProps, FormFieldFileInput };
|
|
4
|
+
export type { FileInputField, FormFieldFileInputProps, } from './FormFieldFileInput.interface';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CompositeAppearanceKeys, CompositeAppearanceStateDefault, FillActiveHoverProps, FillActiveProps, FillHoverProps, FillProps, ShapeProps, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import { TextProps } from '@itcase/ui-web/components/Text';
|
|
3
|
+
import { TitleProps } from '@itcase/ui-web/components/Title';
|
|
4
|
+
import type { BaseField, ButtonFields, FormTypes, GeneratorField } from 'src/form';
|
|
5
|
+
type GroupField = BaseField & {
|
|
6
|
+
group: Record<string, Exclude<GeneratorField, ButtonFields>>;
|
|
7
|
+
type: Extract<FormTypes, 'group'>;
|
|
8
|
+
};
|
|
9
|
+
type FormGroupProps = GroupField & {
|
|
10
|
+
after?: React.ReactNode;
|
|
11
|
+
before?: React.ReactNode;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
column?: number;
|
|
15
|
+
fill?: FillProps;
|
|
16
|
+
fillActive?: FillActiveProps;
|
|
17
|
+
fillActiveHover?: FillActiveHoverProps;
|
|
18
|
+
fillDisabled?: FillProps;
|
|
19
|
+
fillHover?: FillHoverProps;
|
|
20
|
+
isActive?: boolean;
|
|
21
|
+
isHidden?: boolean;
|
|
22
|
+
label?: string;
|
|
23
|
+
labelTextColor?: TextProps['textColor'];
|
|
24
|
+
labelTextSize?: TextProps['size'];
|
|
25
|
+
labelTextWeight?: TextProps['textWeight'];
|
|
26
|
+
message?: string;
|
|
27
|
+
messageTextColor?: TextProps['textColor'];
|
|
28
|
+
messageTextSize?: TextProps['size'];
|
|
29
|
+
messageTextWeight?: TextProps['textWeight'];
|
|
30
|
+
name: string;
|
|
31
|
+
shape?: ShapeProps;
|
|
32
|
+
showGroupMessage?: string;
|
|
33
|
+
title?: TitleProps['text'];
|
|
34
|
+
titleTextColor?: TitleProps['textColor'];
|
|
35
|
+
titleTextSize?: TitleProps['size'];
|
|
36
|
+
titleTextWeight?: TitleProps['textWeight'];
|
|
37
|
+
};
|
|
38
|
+
type DefaultAppearanceProps = {
|
|
39
|
+
appearance?: CompositeAppearanceKeys | CompositeAppearanceStateDefault;
|
|
40
|
+
errorAppearance?: CompositeAppearanceKeys | CompositeAppearanceStateDefault;
|
|
41
|
+
errorMessageTextColor?: TextProps['textColor'];
|
|
42
|
+
errorMessageTextSize?: TextProps['size'];
|
|
43
|
+
helpTextSize?: TextProps['size'];
|
|
44
|
+
labelTextSize?: TextProps['size'];
|
|
45
|
+
messageTextColor?: TextProps['textColor'];
|
|
46
|
+
messageTextSize?: TextProps['size'];
|
|
47
|
+
requiredAppearance?: CompositeAppearanceKeys | CompositeAppearanceStateDefault;
|
|
48
|
+
requiredMessageTextColor?: TextProps['textColor'];
|
|
49
|
+
requiredMessageTextSize?: TextProps['size'];
|
|
50
|
+
successAppearance?: CompositeAppearanceKeys | CompositeAppearanceStateDefault;
|
|
51
|
+
width?: WidthProps;
|
|
52
|
+
};
|
|
53
|
+
export type { DefaultAppearanceProps, FormGroupProps, GroupField };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { defaultGroupProps } from './appearance/default';
|
|
2
|
+
import { FormGroup } from './FormGroup';
|
|
3
|
+
import type { DefaultAppearanceProps, FormGroupProps, GroupField } from './FormGroup.interface';
|
|
4
|
+
export { defaultGroupProps, FormGroup };
|
|
5
|
+
export type { DefaultAppearanceProps, FormGroupProps, GroupField };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import { IconProps } from '@itcase/ui-web/components/Icon';
|
|
3
|
+
import type { InputProps } from '@itcase/ui-web/components/Input';
|
|
4
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
5
|
+
type InputInputProps = Partial<DefaultInputProps & InputProps>;
|
|
6
|
+
type InputField = Omit<BaseField, 'inputProps'> & {
|
|
7
|
+
inputProps: InputInputProps;
|
|
8
|
+
type: Extract<FormTypes, 'text'>;
|
|
9
|
+
};
|
|
10
|
+
type FormFieldInputProps = InputField & {
|
|
11
|
+
clearIcon?: IconProps['SvgImage'];
|
|
12
|
+
clearIconFill?: IconProps['iconFill'];
|
|
13
|
+
clearIconFillHover?: IconProps['iconFillHover'];
|
|
14
|
+
clearIconShape?: IconProps['shape'];
|
|
15
|
+
clearIconSize?: IconProps['size'];
|
|
16
|
+
initialValue?: string;
|
|
17
|
+
onChange?: (value: string, name?: string) => void;
|
|
18
|
+
onClickClearIcon?: IconProps['onClick'];
|
|
19
|
+
parse?: (value: string, name: string) => string;
|
|
20
|
+
};
|
|
21
|
+
type DefaultInputProps = {
|
|
22
|
+
appearance: CompositeAppearanceStateDefault;
|
|
23
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
24
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
25
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
26
|
+
width: WidthProps;
|
|
27
|
+
};
|
|
28
|
+
export type { DefaultInputProps, FormFieldInputProps, InputField, InputInputProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultInputProps, defaultInputPropsSizeXL } from './appearance/default';
|
|
2
|
+
import { FormFieldInput } from './FormFieldInput';
|
|
3
|
+
export { defaultInputProps, defaultInputPropsSizeXL, FormFieldInput };
|
|
4
|
+
export type { DefaultInputProps, FormFieldInputProps, InputField, InputInputProps, } from './FormFieldInput.interface';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import { InputNumberProps } from '@itcase/ui-web/components/InputNumber';
|
|
3
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
4
|
+
type InputNumberInputProps = Partial<DefaultInputNumberProps & InputNumberProps>;
|
|
5
|
+
type InputNumberField = Omit<BaseField, 'inputProps'> & {
|
|
6
|
+
inputProps: InputNumberInputProps;
|
|
7
|
+
inputType: InputNumberProps['type'];
|
|
8
|
+
type: Extract<FormTypes, 'inputNumber'>;
|
|
9
|
+
};
|
|
10
|
+
type FormFieldInputNumberProps = InputNumberField & {
|
|
11
|
+
initialValue?: number | string;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
parse?: (value: number, name: string) => number;
|
|
14
|
+
};
|
|
15
|
+
type DefaultInputNumberProps = {
|
|
16
|
+
appearance: CompositeAppearanceStateDefault;
|
|
17
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
18
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
19
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
20
|
+
width: WidthProps;
|
|
21
|
+
};
|
|
22
|
+
export type { DefaultInputNumberProps, FormFieldInputNumberProps, InputNumberField, InputNumberInputProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DefaultInputNumberProps } from '../FormFieldInputNumber.interface';
|
|
2
|
+
declare const defaultInputNumberProps: DefaultInputNumberProps;
|
|
3
|
+
declare const defaultInputNumberPropsSizeXL: DefaultInputNumberProps;
|
|
4
|
+
export { defaultInputNumberProps, defaultInputNumberPropsSizeXL };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultInputNumberProps, defaultInputNumberPropsSizeXL } from './appearance/default';
|
|
2
|
+
import { FormFieldInputNumber } from './FormFieldInputNumber';
|
|
3
|
+
export { defaultInputNumberProps, defaultInputNumberPropsSizeXL, FormFieldInputNumber, };
|
|
4
|
+
export type { DefaultInputNumberProps, FormFieldInputNumberProps, InputNumberField, InputNumberInputProps, } from './FormFieldInputNumber.interface';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import { IconProps } from '@itcase/ui-web/components/Icon';
|
|
3
|
+
import type { InputProps } from '@itcase/ui-web/components/Input';
|
|
4
|
+
import { InputNumberProps } from '@itcase/ui-web/components/InputNumber';
|
|
5
|
+
import type { BaseField, FormTypes } from 'src/form';
|
|
6
|
+
type MaskedInputInputProps = Partial<DefaultMaskedInputProps & InputProps>;
|
|
7
|
+
type MaskedInputField = Omit<BaseField, 'inputProps'> & {
|
|
8
|
+
inputProps: MaskedInputInputProps;
|
|
9
|
+
inputType: InputNumberProps['type'];
|
|
10
|
+
type: Extract<FormTypes, 'maskedInput'>;
|
|
11
|
+
};
|
|
12
|
+
type FormFieldMaskedInputProps = MaskedInputField & {
|
|
13
|
+
clearIcon?: IconProps['SvgImage'];
|
|
14
|
+
clearIconFill?: IconProps['iconFill'];
|
|
15
|
+
clearIconFillHover?: IconProps['iconFillHover'];
|
|
16
|
+
clearIconShape?: IconProps['shape'];
|
|
17
|
+
clearIconSize?: IconProps['size'];
|
|
18
|
+
initialValue?: string;
|
|
19
|
+
onClickClearIcon?: IconProps['onClick'];
|
|
20
|
+
optionsMask?: object;
|
|
21
|
+
unmasked?: string;
|
|
22
|
+
};
|
|
23
|
+
type DefaultMaskedInputProps = {
|
|
24
|
+
appearance: CompositeAppearanceStateDefault;
|
|
25
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
26
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
27
|
+
successAppearance: CompositeAppearanceStateDefault;
|
|
28
|
+
width: WidthProps;
|
|
29
|
+
};
|
|
30
|
+
export type { DefaultMaskedInputProps, FormFieldMaskedInputProps, MaskedInputField, MaskedInputInputProps, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DefaultMaskedInputProps } from '../FormFieldMaskedInput.interface';
|
|
2
|
+
declare const defaultMaskedInputProps: DefaultMaskedInputProps;
|
|
3
|
+
declare const defaultMaskedInputPropsSizeXL: DefaultMaskedInputProps;
|
|
4
|
+
export { defaultMaskedInputProps, defaultMaskedInputPropsSizeXL };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defaultMaskedInputProps, defaultMaskedInputPropsSizeXL } from './appearance/default';
|
|
2
|
+
import { FormFieldMaskedInput } from './FormFieldMaskedInput';
|
|
3
|
+
export { defaultMaskedInputProps, defaultMaskedInputPropsSizeXL, FormFieldMaskedInput, };
|
|
4
|
+
export type { DefaultMaskedInputProps, FormFieldMaskedInputProps, MaskedInputField, MaskedInputInputProps, } from './FormFieldMaskedInput.interface';
|