@itcase/forms 1.1.62 → 1.1.64
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/constants/index.d.ts +7 -0
- package/dist/constants/messages.constant.d.ts +10 -0
- package/dist/constants/messages.interface.d.ts +5 -0
- package/dist/css/form/Field/Checkbox/FormFieldCheckbox.css +6 -2
- package/dist/css/form/Field/Code/FormFieldCode.css +7 -5
- package/dist/css/form/Field/Input/FormFieldInput.css +2 -0
- package/dist/css/form/Form/Form.css +2 -2
- package/dist/css/form/Form/css/form-notification/form-notification.css +1 -1
- package/dist/css/form/FormField/FormField.css +25 -12
- package/dist/form/Field/Checkbox/FormFieldCheckbox.d.ts +4 -0
- package/dist/form/Field/Checkbox/FormFieldCheckbox.interface.d.ts +18 -0
- package/dist/form/Field/Checkbox/appearance/default.d.ts +3 -0
- package/dist/form/Field/Checkbox/index.d.ts +3 -0
- package/dist/form/Field/Checkbox/stories/FormFieldCheckbox.stories.d.ts +99 -0
- package/dist/form/Field/Chips/FormFieldChips.d.ts +3 -0
- package/dist/form/Field/Chips/FormFieldChips.interface.d.ts +27 -0
- package/dist/form/Field/Chips/appearance/default.d.ts +3 -0
- package/dist/form/Field/Chips/index.d.ts +3 -0
- package/dist/form/Field/Chips/stories/FormFieldChips.stories.d.ts +30 -0
- package/dist/form/Field/Chips/stories/__mock__/index.d.ts +76 -0
- package/dist/form/Field/Choice/FormFieldChoice.d.ts +4 -0
- package/dist/form/Field/Choice/FormFieldChoice.interface.d.ts +23 -0
- package/dist/form/Field/Choice/appearance/default.d.ts +3 -0
- package/dist/form/Field/Choice/index.d.ts +3 -0
- package/dist/form/Field/Choice/stories/FormFieldChoice.stories.d.ts +104 -0
- package/dist/form/Field/Code/FormFieldCode.d.ts +4 -0
- package/dist/form/Field/Code/FormFieldCode.interface.d.ts +16 -0
- package/dist/form/Field/Code/appearance/default.d.ts +3 -0
- package/dist/form/Field/Code/index.d.ts +3 -0
- package/dist/form/Field/Code/stories/FormFieldCode.stories.d.ts +101 -0
- package/dist/form/Field/Custom/FormFieldCustom.d.ts +4 -0
- package/dist/form/Field/Custom/FormFieldCustom.interface.d.ts +18 -0
- package/dist/form/Field/Custom/index.d.ts +2 -0
- package/dist/form/Field/Dadata/FormFieldDadataInput.d.ts +4 -0
- package/dist/form/Field/Dadata/FormFieldDadataInput.interface.d.ts +19 -0
- package/dist/form/Field/Dadata/appearance/default.d.ts +3 -0
- package/dist/form/Field/Dadata/index.d.ts +3 -0
- package/dist/form/Field/Dadata/stories/FormFieldDadataInput.stories.d.ts +90 -0
- package/dist/form/Field/DatePicker/FormFieldDatePicker.d.ts +3 -0
- package/dist/form/Field/DatePicker/FormFieldDatePicker.interface.d.ts +10 -0
- package/dist/form/Field/DatePicker/appearance/default.d.ts +12 -0
- package/dist/form/Field/DatePicker/index.d.ts +3 -0
- package/dist/form/Field/DatePicker/stories/FormFieldDatePicker.stories.d.ts +114 -0
- package/dist/form/Field/FileInput/FormFieldFileInputDropzone.d.ts +2 -0
- package/dist/form/Field/FileInput/appearance/default.d.ts +19 -0
- package/dist/form/Field/FileInput/index.d.ts +4 -0
- package/dist/form/Field/FileInput/stories/FormFieldFileInput.stories.d.ts +51 -0
- package/dist/form/Field/Group/FormGroup.d.ts +4 -0
- package/dist/form/Field/Group/FormGroup.interface.d.ts +47 -0
- package/dist/form/Field/Group/appearance/default.d.ts +3 -0
- package/dist/form/Field/Group/index.d.ts +3 -0
- package/dist/form/Field/Input/FormFieldInput.d.ts +4 -0
- package/dist/form/Field/Input/FormFieldInput.interface.d.ts +25 -0
- package/dist/form/Field/Input/appearance/default.d.ts +3 -0
- package/dist/form/Field/Input/index.d.ts +3 -0
- package/dist/form/Field/Input/stories/FormFieldInputClassic.stories.d.ts +296 -0
- package/dist/form/Field/Input/stories/FormFieldInputFloat.stories.d.ts +296 -0
- package/dist/form/Field/Input/stories/FormFieldInputIFTA.stories.d.ts +296 -0
- package/dist/form/Field/InputNumber/FormFieldInputNumber.d.ts +4 -0
- package/dist/form/Field/InputNumber/FormFieldInputNumber.interface.d.ts +20 -0
- package/dist/form/Field/InputNumber/appearance/default.d.ts +3 -0
- package/dist/form/Field/InputNumber/index.d.ts +3 -0
- package/dist/form/Field/MaskedInput/FormFieldMaskedInput.d.ts +4 -0
- package/dist/form/Field/MaskedInput/FormFieldMaskedInput.interface.d.ts +27 -0
- package/dist/form/Field/MaskedInput/appearance/default.d.ts +3 -0
- package/dist/form/Field/MaskedInput/index.d.ts +3 -0
- package/dist/form/Field/MaskedInput/stories/FormFieldMaskedInputClassic.stories.d.ts +127 -0
- package/dist/form/Field/MaskedInput/stories/FormFieldMaskedInputFTA.stories.d.ts +119 -0
- package/dist/form/Field/MaskedInput/stories/FormFieldMaskedInputFloating.stories.d.ts +119 -0
- package/dist/form/Field/Password/FormFieldPassword.d.ts +4 -0
- package/dist/form/Field/Password/FormFieldPassword.interface.d.ts +17 -0
- package/dist/form/Field/Password/appearance/default.d.ts +3 -0
- package/dist/form/Field/Password/index.d.ts +3 -0
- package/dist/form/Field/Password/stories/FormFieldPasswordClassic.stories.d.ts +104 -0
- package/dist/form/Field/Password/stories/FormFieldPasswordFTA.stories.d.ts +104 -0
- package/dist/form/Field/Password/stories/FormFieldPasswordFloating.stories.d.ts +104 -0
- package/dist/form/Field/RadioGroup/FormFieldRadioGroup.d.ts +4 -0
- package/dist/form/Field/RadioGroup/FormFieldRadioGroup.interface.d.ts +23 -0
- package/dist/form/Field/RadioGroup/FormFieldRadioGroupList.d.ts +3 -0
- package/dist/form/Field/RadioGroup/appearance/default.d.ts +3 -0
- package/dist/form/Field/RadioGroup/index.d.ts +3 -0
- package/dist/form/Field/RadioGroup/stories/FormFieldRadioGroup.stories.d.ts +101 -0
- package/dist/form/Field/Segmented/FormFieldSegmented.d.ts +3 -0
- package/dist/form/Field/Segmented/FormFieldSegmented.interface.d.ts +15 -0
- package/dist/form/Field/Segmented/appearance/default.d.ts +3 -0
- package/dist/form/Field/Segmented/index.d.ts +3 -0
- package/dist/form/Field/Segmented/stories/FormFieldSegmented.stories.d.ts +101 -0
- package/dist/form/Field/Select/FormFieldSelect.d.ts +4 -0
- package/dist/form/Field/Select/FormFieldSelect.interface.d.ts +33 -0
- package/dist/form/Field/Select/appearance/default.d.ts +3 -0
- package/dist/form/Field/Select/index.d.ts +3 -0
- package/dist/form/Field/Select/stories/FormFieldSelect.stories.d.ts +101 -0
- package/dist/form/Field/Switch/FormFieldSwitch.d.ts +5 -0
- package/dist/form/Field/Switch/FormFieldSwitch.interface.d.ts +16 -0
- package/dist/form/Field/Switch/appearance/default.d.ts +3 -0
- package/dist/form/Field/Switch/index.d.ts +3 -0
- package/dist/form/Field/Switch/stories/FormFieldSwitch.stories.d.ts +86 -0
- package/dist/form/Field/Switch/stories/FormFieldSwitchLeft.stories.d.ts +98 -0
- package/dist/form/Field/Switch/stories/FormFieldSwitchRight.stories.d.ts +98 -0
- package/dist/form/Field/Textarea/FormFieldTextarea.d.ts +4 -0
- package/dist/form/Field/Textarea/FormFieldTextarea.interface.d.ts +13 -0
- package/dist/form/Field/Textarea/appearance/default.d.ts +3 -0
- package/dist/form/Field/Textarea/index.d.ts +3 -0
- package/dist/form/Field/Textarea/stories/FormFieldTextareaClassic.stories.d.ts +104 -0
- package/dist/form/Field/Textarea/stories/FormFieldTextareaFloating.stories.d.ts +104 -0
- package/dist/form/Field/Textarea/stories/FormFieldTextareaIFTA.stories.d.ts +104 -0
- package/dist/form/Field/index.d.ts +20 -0
- package/dist/form/FieldWrapper/FieldWrapper.d.ts +4 -0
- package/dist/form/FieldWrapper/FieldWrapper.interface.d.ts +77 -0
- package/dist/form/FieldWrapper/appearance/default.d.ts +7 -0
- package/dist/form/FieldWrapper/index.d.ts +3 -0
- package/dist/form/Form/FinalForm.d.ts +4 -0
- package/dist/form/Form/FinalForm.interface.d.ts +119 -0
- package/dist/form/generator/generator.constants.d.ts +25 -0
- package/dist/form/generator/generator.d.ts +3 -0
- package/dist/form/generator/generator.interface.d.ts +62 -0
- package/dist/form/generator/index.d.ts +4 -0
- package/dist/form/index.d.ts +5 -0
- package/dist/form/utils.d.ts +22 -0
- package/dist/hooks/form/form.d.ts +3 -0
- package/dist/hooks/form/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useFieldValidationState/index.d.ts +2 -0
- package/dist/hooks/useFieldValidationState/useFieldValidationState.d.ts +9 -0
- package/dist/hooks/useFieldValidationState/useFieldValidationState.interface.d.ts +8 -0
- package/dist/hooks/useValidationAppearanceInputProps/index.d.ts +2 -0
- package/dist/hooks/useValidationAppearanceInputProps/useValidationAppearanceInputProps.d.ts +3 -0
- package/dist/hooks/useValidationAppearanceInputProps/useValidationAppearanceInputProps.interface.d.ts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/itcase-forms.cjs.js +3 -3767
- package/dist/itcase-forms.esm.js +3 -3688
- package/dist/services/index.d.ts +2 -0
- package/dist/services/utils.d.ts +4 -0
- package/dist/validators/index.d.ts +2 -0
- package/dist/validators/validation.d.ts +6 -0
- package/dist/validators/validation.interface.d.ts +6 -0
- package/package.json +35 -20
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Messages } from './messages.interface';
|
|
2
|
+
declare const DEFAULT_MESSAGES_REQUIRED: Messages;
|
|
3
|
+
declare const DEFAULT_MESSAGES_ERROR: Messages;
|
|
4
|
+
declare const DEFAULT_MESSAGES_URL: Messages;
|
|
5
|
+
declare const DEFAULT_MESSAGES_PASSWORD: Messages;
|
|
6
|
+
declare const DEFAULT_MESSAGES_NUMBER: Messages;
|
|
7
|
+
declare const DEFAULT_MESSAGES_MIN_MAX: Messages;
|
|
8
|
+
declare const DEFAULT_MESSAGES_PHONE: Messages;
|
|
9
|
+
declare const DEFAULT_MESSAGES_EMAIL: Messages;
|
|
10
|
+
export { DEFAULT_MESSAGES_EMAIL, DEFAULT_MESSAGES_ERROR, DEFAULT_MESSAGES_MIN_MAX, DEFAULT_MESSAGES_NUMBER, DEFAULT_MESSAGES_PASSWORD, DEFAULT_MESSAGES_PHONE, DEFAULT_MESSAGES_REQUIRED, DEFAULT_MESSAGES_URL, };
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
z-index: 100;
|
|
104
104
|
}
|
|
105
105
|
&_global {
|
|
106
|
-
margin: 0
|
|
106
|
+
margin: 0;
|
|
107
107
|
}
|
|
108
108
|
&__item {
|
|
109
109
|
text-align: center;
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
display: flex;
|
|
152
152
|
flex-direction: column;
|
|
153
153
|
^^&__wrapper {
|
|
154
|
-
overflow:
|
|
154
|
+
overflow: auto;
|
|
155
155
|
flex: 1;
|
|
156
156
|
}
|
|
157
157
|
^^&__button {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
.form-field {
|
|
2
|
+
&_switch {
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
2
5
|
&__content {
|
|
3
6
|
width: 100%;
|
|
4
7
|
&-inner {
|
|
@@ -17,9 +20,6 @@
|
|
|
17
20
|
}
|
|
18
21
|
&__message {
|
|
19
22
|
&-item {
|
|
20
|
-
height: var(--form-field-help-text-height);
|
|
21
|
-
line-height: var(--form-field-help-text-line-height);
|
|
22
|
-
padding: var(--form-field-help-text-padding);
|
|
23
23
|
display: block;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
.form {
|
|
36
36
|
&^&-field_type_float {
|
|
37
|
-
padding:
|
|
38
|
-
margin: var(--form-field_type_float-margin);
|
|
37
|
+
padding: var(--form-field_type_float-padding);
|
|
39
38
|
position: relative;
|
|
40
39
|
gap: var(--form-field_type_float-gap);
|
|
41
40
|
&^&__item_state_focus,
|
|
@@ -43,8 +42,8 @@
|
|
|
43
42
|
& .form {
|
|
44
43
|
&-field {
|
|
45
44
|
&__label {
|
|
46
|
-
background:
|
|
47
|
-
transform: scale(
|
|
45
|
+
background: var(--color-palette-white);
|
|
46
|
+
transform: scale(1) translate(8px, -12px);
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
}
|
|
@@ -62,18 +61,17 @@
|
|
|
62
61
|
& .form {
|
|
63
62
|
&-field {
|
|
64
63
|
&__label {
|
|
65
|
-
padding:
|
|
64
|
+
padding: var(--form-field_type_float-label-padding);
|
|
66
65
|
position: absolute;
|
|
67
66
|
display: flex;
|
|
68
|
-
top: 4px;
|
|
69
67
|
z-index: 2;
|
|
70
|
-
transform: scale(1) translate(8px,
|
|
68
|
+
transform: scale(1.285) translate(8px, 4px);
|
|
71
69
|
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
72
70
|
pointer-events: none;
|
|
73
71
|
transform-origin: top left;
|
|
74
72
|
}
|
|
75
73
|
&__message {
|
|
76
|
-
padding:
|
|
74
|
+
padding: var(--form-field_type_float-message-padding);
|
|
77
75
|
}
|
|
78
76
|
}
|
|
79
77
|
}
|
|
@@ -95,9 +93,14 @@
|
|
|
95
93
|
&_type {
|
|
96
94
|
&_classic {
|
|
97
95
|
padding: var(--form-field_type_classic-padding);
|
|
98
|
-
margin: var(--form-field_type_classic-margin);
|
|
99
96
|
position: relative;
|
|
100
97
|
gap: var(--form-field_type_classic-gap);
|
|
98
|
+
^^&__label {
|
|
99
|
+
padding: var(--form-field_type_classic-label-padding);
|
|
100
|
+
}
|
|
101
|
+
^^&__message {
|
|
102
|
+
padding: var(--form-field_type_classic-message-padding);
|
|
103
|
+
}
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
106
|
}
|
|
@@ -163,3 +166,13 @@
|
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
168
|
}
|
|
169
|
+
:root {
|
|
170
|
+
--form-field_type_classic-padding: 8px 0;
|
|
171
|
+
--form-field_type_classic-gap: 4px;
|
|
172
|
+
--form-field_type_classic-label-padding: 4px;
|
|
173
|
+
--form-field_type_classic-message-padding: 4px 0 0 4px;
|
|
174
|
+
|
|
175
|
+
--form-field_type_float-padding: 12px 0;
|
|
176
|
+
--form-field_type_float-label-padding: 4px;
|
|
177
|
+
--form-field_type_float-message-padding: 4px 0 0 12px;
|
|
178
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import { FieldWrapperBaseProps } from 'src/form/FieldWrapper/FieldWrapper.interface';
|
|
3
|
+
import { BaseField, FormTypes } from 'src/form/generator/generator.interface';
|
|
4
|
+
type CheckboxField = BaseField & {
|
|
5
|
+
onChange: (isChecked: boolean, name: string) => void;
|
|
6
|
+
type: Extract<FormTypes, 'checkbox'>;
|
|
7
|
+
};
|
|
8
|
+
type FormFieldCheckboxProps = CheckboxField & {
|
|
9
|
+
fieldProps?: FieldWrapperBaseProps;
|
|
10
|
+
initialValue?: {};
|
|
11
|
+
};
|
|
12
|
+
type DefaultCheckboxProps = {
|
|
13
|
+
appearance: CompositeAppearanceStateDefault;
|
|
14
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
15
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
16
|
+
width?: WidthProps;
|
|
17
|
+
};
|
|
18
|
+
export type { CheckboxField, DefaultCheckboxProps, FormFieldCheckboxProps };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Default {
|
|
3
|
+
namespace parameters {
|
|
4
|
+
let error: boolean;
|
|
5
|
+
}
|
|
6
|
+
function render(args: any): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
export namespace Error {
|
|
9
|
+
export function render_1(args: any): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { render_1 as render };
|
|
11
|
+
}
|
|
12
|
+
export namespace Success {
|
|
13
|
+
export function render_2(args: any): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { render_2 as render };
|
|
15
|
+
}
|
|
16
|
+
export namespace Require {
|
|
17
|
+
export function render_3(args: any): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { render_3 as render };
|
|
19
|
+
}
|
|
20
|
+
export namespace Disabled {
|
|
21
|
+
export function render_4(args: any): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { render_4 as render };
|
|
23
|
+
}
|
|
24
|
+
declare namespace meta {
|
|
25
|
+
let title: string;
|
|
26
|
+
namespace args {
|
|
27
|
+
namespace config {
|
|
28
|
+
namespace checkbox {
|
|
29
|
+
let type: "checkbox";
|
|
30
|
+
let name: string;
|
|
31
|
+
let fieldProps: {
|
|
32
|
+
label: string;
|
|
33
|
+
direction?: import("@itcase/types-ui").DirectionProps;
|
|
34
|
+
dividerFill?: import("@itcase/ui-web/components/Divider").DividerProps["fill"];
|
|
35
|
+
errorMessageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
36
|
+
helpTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
37
|
+
labelTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
38
|
+
messageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
39
|
+
requiredMessageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
40
|
+
showMessage?: boolean;
|
|
41
|
+
width?: import("@itcase/types-ui").WidthProps;
|
|
42
|
+
id?: string;
|
|
43
|
+
after?: React.ReactNode;
|
|
44
|
+
afterItem?: React.ReactNode;
|
|
45
|
+
before?: React.ReactNode;
|
|
46
|
+
beforeItem?: React.ReactNode;
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
className?: string;
|
|
49
|
+
dataTestId?: string;
|
|
50
|
+
dataTour?: string;
|
|
51
|
+
desc?: string;
|
|
52
|
+
descTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
53
|
+
descTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
54
|
+
descTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
55
|
+
dividerDirection?: import("@itcase/ui-web/components/Divider").DividerProps["direction"];
|
|
56
|
+
dividerSize?: import("@itcase/ui-web/components/Divider").DividerProps["size"];
|
|
57
|
+
dividerWidth?: import("@itcase/ui-web/components/Divider").DividerProps["width"];
|
|
58
|
+
errorKey?: "error" | "required";
|
|
59
|
+
errorMessage?: string;
|
|
60
|
+
errorMessageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
61
|
+
errorMessageTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
62
|
+
fieldClassName?: string;
|
|
63
|
+
helpText?: string;
|
|
64
|
+
helpTextColorSuccess?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
65
|
+
helpTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
66
|
+
helpTextSizeMobile?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
67
|
+
helpTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
68
|
+
inputName?: string;
|
|
69
|
+
inputValue?: boolean | object | string;
|
|
70
|
+
isDisabled?: boolean;
|
|
71
|
+
isErrorState?: boolean;
|
|
72
|
+
isHidden?: boolean;
|
|
73
|
+
isRequired?: boolean;
|
|
74
|
+
isValidState?: boolean;
|
|
75
|
+
labelHidden?: string;
|
|
76
|
+
labelTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
77
|
+
labelTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
78
|
+
messageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
79
|
+
metaActive?: boolean;
|
|
80
|
+
metaError?: boolean;
|
|
81
|
+
requiredMessageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
82
|
+
requiredMessageTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
83
|
+
showDivider?: boolean;
|
|
84
|
+
tag?: "div" | "label";
|
|
85
|
+
type?: import("../../../generator/generator.interface").FormTypes;
|
|
86
|
+
size?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
87
|
+
};
|
|
88
|
+
let inputProps: {
|
|
89
|
+
label: string;
|
|
90
|
+
desc: string;
|
|
91
|
+
appearance: import("@itcase/types-ui").CompositeAppearanceStateDefault;
|
|
92
|
+
errorAppearance: import("@itcase/types-ui").CompositeAppearanceStateDefault;
|
|
93
|
+
requiredAppearance: import("@itcase/types-ui").CompositeAppearanceStateDefault;
|
|
94
|
+
width?: import("@itcase/types-ui").WidthProps;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FieldRenderProps } from 'react-final-form';
|
|
2
|
+
import { Option } from '@itcase/types-core';
|
|
3
|
+
import { CompositeAppearanceKeys, CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
4
|
+
import { TextProps } from '@itcase/ui-web/components/Text';
|
|
5
|
+
import { BaseField, FormTypes } from 'src/form/generator/generator.interface';
|
|
6
|
+
import { UseFieldValidationStateParams } from 'src/hooks/useFieldValidationState/useFieldValidationState.interface';
|
|
7
|
+
type ChipsField = BaseField & {
|
|
8
|
+
options: Array<Option & {
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
type: Extract<FormTypes, 'chips'>;
|
|
12
|
+
};
|
|
13
|
+
type FormFieldChipsProps = ChipsField & {
|
|
14
|
+
emptyMessage?: string;
|
|
15
|
+
emptyMessageTextColor?: TextProps['textColor'];
|
|
16
|
+
emptyMessageTextSize?: TextProps['size'];
|
|
17
|
+
initialValue?: string[];
|
|
18
|
+
onChange?: (values: string[]) => void;
|
|
19
|
+
};
|
|
20
|
+
type ChipsFieldRenderProps = FieldRenderProps<UseFieldValidationStateParams['meta'], HTMLElement, string[]>;
|
|
21
|
+
type DefaultChipsProps = {
|
|
22
|
+
appearance: CompositeAppearanceKeys;
|
|
23
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
24
|
+
requiredAppearance: CompositeAppearanceKeys;
|
|
25
|
+
width?: WidthProps;
|
|
26
|
+
};
|
|
27
|
+
export type { ChipsField, ChipsFieldRenderProps, DefaultChipsProps, FormFieldChipsProps, };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Default {
|
|
3
|
+
function render(args: any): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
}
|
|
5
|
+
export namespace Error {
|
|
6
|
+
export function render_1(args: any): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { render_1 as render };
|
|
8
|
+
}
|
|
9
|
+
export namespace Success {
|
|
10
|
+
export function render_2(args: any): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { render_2 as render };
|
|
12
|
+
}
|
|
13
|
+
export namespace Require {
|
|
14
|
+
export function render_3(args: any): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { render_3 as render };
|
|
16
|
+
}
|
|
17
|
+
export namespace Disabled {
|
|
18
|
+
export function render_4(args: any): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { render_4 as render };
|
|
20
|
+
}
|
|
21
|
+
declare namespace meta {
|
|
22
|
+
export let title: string;
|
|
23
|
+
export { FormFieldChips as component };
|
|
24
|
+
export { FormFieldChipsMock as args };
|
|
25
|
+
export namespace parameters {
|
|
26
|
+
let layout: string;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
import { FormFieldChips } from '../index';
|
|
30
|
+
import { FormFieldChipsMock } from './__mock__';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export namespace FormFieldChipsMock {
|
|
2
|
+
namespace config {
|
|
3
|
+
namespace chips {
|
|
4
|
+
let type: "chips";
|
|
5
|
+
let name: string;
|
|
6
|
+
let fieldProps: {
|
|
7
|
+
label: string;
|
|
8
|
+
direction?: import("@itcase/types-ui").DirectionProps;
|
|
9
|
+
dividerFill?: import("@itcase/ui-web/components/Divider").DividerProps["fill"];
|
|
10
|
+
errorMessageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
11
|
+
helpTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
12
|
+
labelTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
13
|
+
messageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
14
|
+
requiredMessageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
15
|
+
showMessage?: boolean;
|
|
16
|
+
width?: import("@itcase/types-ui").WidthProps;
|
|
17
|
+
id?: string;
|
|
18
|
+
after?: React.ReactNode;
|
|
19
|
+
afterItem?: React.ReactNode;
|
|
20
|
+
before?: React.ReactNode;
|
|
21
|
+
beforeItem?: React.ReactNode;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
dataTestId?: string;
|
|
25
|
+
dataTour?: string;
|
|
26
|
+
desc?: string;
|
|
27
|
+
descTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
28
|
+
descTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
29
|
+
descTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
30
|
+
dividerDirection?: import("@itcase/ui-web/components/Divider").DividerProps["direction"];
|
|
31
|
+
dividerSize?: import("@itcase/ui-web/components/Divider").DividerProps["size"];
|
|
32
|
+
dividerWidth?: import("@itcase/ui-web/components/Divider").DividerProps["width"];
|
|
33
|
+
errorKey?: "error" | "required";
|
|
34
|
+
errorMessage?: string;
|
|
35
|
+
errorMessageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
36
|
+
errorMessageTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
37
|
+
fieldClassName?: string;
|
|
38
|
+
helpText?: string;
|
|
39
|
+
helpTextColorSuccess?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
40
|
+
helpTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
41
|
+
helpTextSizeMobile?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
42
|
+
helpTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
43
|
+
inputName?: string;
|
|
44
|
+
inputValue?: boolean | object | string;
|
|
45
|
+
isDisabled?: boolean;
|
|
46
|
+
isErrorState?: boolean;
|
|
47
|
+
isHidden?: boolean;
|
|
48
|
+
isRequired?: boolean;
|
|
49
|
+
isValidState?: boolean;
|
|
50
|
+
labelHidden?: string;
|
|
51
|
+
labelTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
52
|
+
labelTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
53
|
+
messageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
54
|
+
metaActive?: boolean;
|
|
55
|
+
metaError?: boolean;
|
|
56
|
+
requiredMessageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
57
|
+
requiredMessageTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
58
|
+
showDivider?: boolean;
|
|
59
|
+
tag?: "div" | "label";
|
|
60
|
+
type?: import("../../../../generator/generator.interface").FormTypes;
|
|
61
|
+
size?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
62
|
+
};
|
|
63
|
+
let inputProps: {
|
|
64
|
+
appearance: import("@itcase/types-ui").CompositeAppearanceKeys;
|
|
65
|
+
errorAppearance: import("@itcase/types-ui").CompositeAppearanceStateDefault;
|
|
66
|
+
requiredAppearance: import("@itcase/types-ui").CompositeAppearanceKeys;
|
|
67
|
+
width?: import("@itcase/types-ui").WidthProps;
|
|
68
|
+
};
|
|
69
|
+
let options: {
|
|
70
|
+
label: string;
|
|
71
|
+
value: string;
|
|
72
|
+
}[];
|
|
73
|
+
let isRequired: boolean;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FieldRenderProps } from 'react-final-form';
|
|
2
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
3
|
+
import { ChoiceProps } from '@itcase/ui-web/components/Choice';
|
|
4
|
+
import { FieldWrapperProps } from 'src/form/FieldWrapper/FieldWrapper.interface';
|
|
5
|
+
import { BaseField, FormTypes } from 'src/form/generator/generator.interface';
|
|
6
|
+
type ChoiceField = BaseField & {
|
|
7
|
+
onChange: (value: string, name: string, isChecked?: boolean) => void;
|
|
8
|
+
options: ChoiceProps['options'];
|
|
9
|
+
type: Extract<FormTypes, 'choice'>;
|
|
10
|
+
};
|
|
11
|
+
type FormFieldChoiceProps = ChoiceField & {
|
|
12
|
+
initialValue?: string;
|
|
13
|
+
isCheckbox?: boolean;
|
|
14
|
+
label?: FieldWrapperProps['label'];
|
|
15
|
+
};
|
|
16
|
+
type ChoiceFieldRenderProps = FieldRenderProps<string>;
|
|
17
|
+
type DefaultChoiceProps = {
|
|
18
|
+
appearance: CompositeAppearanceStateDefault;
|
|
19
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
20
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
21
|
+
width?: WidthProps;
|
|
22
|
+
};
|
|
23
|
+
export type { ChoiceField, ChoiceFieldRenderProps, DefaultChoiceProps, FormFieldChoiceProps, };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Default {
|
|
3
|
+
namespace parameters {
|
|
4
|
+
let _default: boolean;
|
|
5
|
+
export { _default as default };
|
|
6
|
+
}
|
|
7
|
+
function render(args: any): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export namespace Error {
|
|
10
|
+
export function render_1(args: any): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { render_1 as render };
|
|
12
|
+
}
|
|
13
|
+
export namespace Success {
|
|
14
|
+
export function render_2(args: any): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { render_2 as render };
|
|
16
|
+
}
|
|
17
|
+
export namespace Require {
|
|
18
|
+
export function render_3(args: any): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { render_3 as render };
|
|
20
|
+
}
|
|
21
|
+
export namespace Disabled {
|
|
22
|
+
export function render_4(args: any): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { render_4 as render };
|
|
24
|
+
}
|
|
25
|
+
declare namespace meta {
|
|
26
|
+
export let title: string;
|
|
27
|
+
export { FormFieldChoice as component };
|
|
28
|
+
export namespace args {
|
|
29
|
+
namespace config {
|
|
30
|
+
namespace choice {
|
|
31
|
+
let type: "choice";
|
|
32
|
+
let name: string;
|
|
33
|
+
let fieldProps: {
|
|
34
|
+
label: string;
|
|
35
|
+
direction?: import("@itcase/types-ui").DirectionProps;
|
|
36
|
+
dividerFill?: import("@itcase/ui-web/components/Divider").DividerProps["fill"];
|
|
37
|
+
errorMessageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
38
|
+
helpTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
39
|
+
labelTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
40
|
+
messageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
41
|
+
requiredMessageTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
42
|
+
showMessage?: boolean;
|
|
43
|
+
width?: import("@itcase/types-ui").WidthProps;
|
|
44
|
+
id?: string;
|
|
45
|
+
after?: React.ReactNode;
|
|
46
|
+
afterItem?: React.ReactNode;
|
|
47
|
+
before?: React.ReactNode;
|
|
48
|
+
beforeItem?: React.ReactNode;
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
className?: string;
|
|
51
|
+
dataTestId?: string;
|
|
52
|
+
dataTour?: string;
|
|
53
|
+
desc?: string;
|
|
54
|
+
descTextColor?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
55
|
+
descTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
56
|
+
descTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
57
|
+
dividerDirection?: import("@itcase/ui-web/components/Divider").DividerProps["direction"];
|
|
58
|
+
dividerSize?: import("@itcase/ui-web/components/Divider").DividerProps["size"];
|
|
59
|
+
dividerWidth?: import("@itcase/ui-web/components/Divider").DividerProps["width"];
|
|
60
|
+
errorKey?: "error" | "required";
|
|
61
|
+
errorMessage?: string;
|
|
62
|
+
errorMessageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
63
|
+
errorMessageTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
64
|
+
fieldClassName?: string;
|
|
65
|
+
helpText?: string;
|
|
66
|
+
helpTextColorSuccess?: import("@itcase/ui-web/components/Text").TextProps["textColor"];
|
|
67
|
+
helpTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
68
|
+
helpTextSizeMobile?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
69
|
+
helpTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
70
|
+
inputName?: string;
|
|
71
|
+
inputValue?: boolean | object | string;
|
|
72
|
+
isDisabled?: boolean;
|
|
73
|
+
isErrorState?: boolean;
|
|
74
|
+
isHidden?: boolean;
|
|
75
|
+
isRequired?: boolean;
|
|
76
|
+
isValidState?: boolean;
|
|
77
|
+
labelHidden?: string;
|
|
78
|
+
labelTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
79
|
+
labelTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
80
|
+
messageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
81
|
+
metaActive?: boolean;
|
|
82
|
+
metaError?: boolean;
|
|
83
|
+
requiredMessageTextSize?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
84
|
+
requiredMessageTextWeight?: import("@itcase/ui-web/components/Text").TextProps["textWeight"];
|
|
85
|
+
showDivider?: boolean;
|
|
86
|
+
tag?: "div" | "label";
|
|
87
|
+
type?: import("../../../generator/generator.interface").FormTypes;
|
|
88
|
+
size?: import("@itcase/ui-web/components/Text").TextProps["size"];
|
|
89
|
+
};
|
|
90
|
+
let inputProps: {
|
|
91
|
+
appearance: import("@itcase/types-ui").CompositeAppearanceStateDefault;
|
|
92
|
+
errorAppearance: import("@itcase/types-ui").CompositeAppearanceStateDefault;
|
|
93
|
+
requiredAppearance: import("@itcase/types-ui").CompositeAppearanceStateDefault;
|
|
94
|
+
width?: import("@itcase/types-ui").WidthProps;
|
|
95
|
+
};
|
|
96
|
+
let options: {
|
|
97
|
+
label: string;
|
|
98
|
+
value: string;
|
|
99
|
+
}[];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
import { FormFieldChoice } from '../index';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CompositeAppearanceStateDefault, WidthProps } from '@itcase/types-ui';
|
|
2
|
+
import { BaseField, FormTypes } from 'src/form/generator/generator.interface';
|
|
3
|
+
type CodeField = BaseField & {
|
|
4
|
+
type: Extract<FormTypes, 'code'>;
|
|
5
|
+
};
|
|
6
|
+
type FormFieldCodeProps = CodeField & {
|
|
7
|
+
initialValue?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
};
|
|
10
|
+
type DefaultCodeProps = {
|
|
11
|
+
appearance: CompositeAppearanceStateDefault;
|
|
12
|
+
errorAppearance: CompositeAppearanceStateDefault;
|
|
13
|
+
requiredAppearance: CompositeAppearanceStateDefault;
|
|
14
|
+
width?: WidthProps;
|
|
15
|
+
};
|
|
16
|
+
export type { CodeField, DefaultCodeProps, FormFieldCodeProps };
|