@itcase/forms 1.1.42 → 1.1.44
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/css/form/Form/Form.css +15 -5
- package/dist/css/styles/main.css +1 -1
- package/dist/itcase-forms.cjs.js +49 -48
- package/dist/itcase-forms.esm.js +49 -48
- package/package.json +1 -1
|
@@ -110,6 +110,21 @@
|
|
|
110
110
|
border-radius: 12px;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
.form {
|
|
114
|
+
&_title-position {
|
|
115
|
+
&_sticky {
|
|
116
|
+
^^&__title {
|
|
117
|
+
position: sticky;
|
|
118
|
+
top: 0;
|
|
119
|
+
z-index: 100;
|
|
120
|
+
}
|
|
121
|
+
^^&__wrapper {
|
|
122
|
+
overflow: scroll;
|
|
123
|
+
flex: 1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
113
128
|
.form {
|
|
114
129
|
&_type_bottom-button {
|
|
115
130
|
flex: 1;
|
|
@@ -139,11 +154,6 @@
|
|
|
139
154
|
position: relative;
|
|
140
155
|
display: flex;
|
|
141
156
|
flex-direction: column;
|
|
142
|
-
^^&__title {
|
|
143
|
-
position: sticky;
|
|
144
|
-
top: 0;
|
|
145
|
-
z-index: 1;
|
|
146
|
-
}
|
|
147
157
|
^^&__wrapper {
|
|
148
158
|
overflow: scroll;
|
|
149
159
|
flex: 1;
|
package/dist/css/styles/main.css
CHANGED
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -2642,9 +2642,9 @@ const sendFormDataToServer = async (url, data) => {
|
|
|
2642
2642
|
|
|
2643
2643
|
const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalForm(props, ref) {
|
|
2644
2644
|
const {
|
|
2645
|
+
className,
|
|
2645
2646
|
dataTestId,
|
|
2646
2647
|
dataTour,
|
|
2647
|
-
className,
|
|
2648
2648
|
type,
|
|
2649
2649
|
initialValues,
|
|
2650
2650
|
initialValuesEqual,
|
|
@@ -2652,6 +2652,7 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2652
2652
|
validationSchema,
|
|
2653
2653
|
title,
|
|
2654
2654
|
titleFill,
|
|
2655
|
+
titlePosition,
|
|
2655
2656
|
titleTextColor,
|
|
2656
2657
|
titleTextSize,
|
|
2657
2658
|
titleTextWeight,
|
|
@@ -2660,8 +2661,36 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2660
2661
|
descTextColor,
|
|
2661
2662
|
descTextWeight,
|
|
2662
2663
|
buttonGap,
|
|
2664
|
+
additionalProps = {},
|
|
2665
|
+
buttonDirection = 'vertical',
|
|
2666
|
+
buttonFill,
|
|
2667
|
+
buttonJustifyContent,
|
|
2668
|
+
buttonPadding,
|
|
2669
|
+
buttonPosition,
|
|
2670
|
+
dataTestIdButtons,
|
|
2663
2671
|
dataTestIdPrimaryButton,
|
|
2672
|
+
dataTestIdSecondaryButton,
|
|
2673
|
+
dataTestIdTertiaryButton,
|
|
2674
|
+
dataTourButtons,
|
|
2664
2675
|
dataTourPrimaryButton,
|
|
2676
|
+
dataTourSecondaryButton,
|
|
2677
|
+
dataTourTertiaryButton,
|
|
2678
|
+
disableFieldsAutoComplete = false,
|
|
2679
|
+
fieldsGap,
|
|
2680
|
+
formName,
|
|
2681
|
+
groupGap,
|
|
2682
|
+
language,
|
|
2683
|
+
loader,
|
|
2684
|
+
loaderAppearance,
|
|
2685
|
+
loaderFill = 'surfacePrimary',
|
|
2686
|
+
loaderItemFill = 'accentItemSecondary',
|
|
2687
|
+
loaderShape,
|
|
2688
|
+
loaderSize = 'l',
|
|
2689
|
+
loaderText,
|
|
2690
|
+
loaderType = 'simple',
|
|
2691
|
+
mutators,
|
|
2692
|
+
notificationCloseButton,
|
|
2693
|
+
notificationType,
|
|
2665
2694
|
primaryButton,
|
|
2666
2695
|
primaryButtonAppearance,
|
|
2667
2696
|
primaryButtonFill,
|
|
@@ -2673,9 +2702,7 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2673
2702
|
primaryButtonLabelTextColor,
|
|
2674
2703
|
primaryButtonLabelTextWeight,
|
|
2675
2704
|
primaryButtonSize,
|
|
2676
|
-
|
|
2677
|
-
dataTourSecondaryButton,
|
|
2678
|
-
onClickSecondaryButton,
|
|
2705
|
+
renderFieldsWrapper = wrapperChildren => wrapperChildren,
|
|
2679
2706
|
secondaryButton,
|
|
2680
2707
|
secondaryButtonAppearance,
|
|
2681
2708
|
secondaryButtonFill,
|
|
@@ -2687,9 +2714,7 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2687
2714
|
secondaryButtonLabelTextColor,
|
|
2688
2715
|
secondaryButtonLabelTextWeight,
|
|
2689
2716
|
secondaryButtonSize,
|
|
2690
|
-
|
|
2691
|
-
dataTourTertiaryButton,
|
|
2692
|
-
onClickTertiaryButton,
|
|
2717
|
+
shapeStrengthClass,
|
|
2693
2718
|
tertiaryButton,
|
|
2694
2719
|
tertiaryButtonFill,
|
|
2695
2720
|
tertiaryButtonFillHover,
|
|
@@ -2698,35 +2723,11 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2698
2723
|
tertiaryButtonLabelTextColor,
|
|
2699
2724
|
tertiaryButtonLabelTextWeight,
|
|
2700
2725
|
tertiaryButtonSize,
|
|
2701
|
-
additionalProps = {},
|
|
2702
|
-
buttonDirection = 'vertical',
|
|
2703
|
-
buttonFill,
|
|
2704
|
-
buttonJustifyContent,
|
|
2705
|
-
buttonPadding,
|
|
2706
|
-
buttonPosition,
|
|
2707
|
-
dataTestIdButtons,
|
|
2708
|
-
dataTourButtons,
|
|
2709
|
-
disableFieldsAutoComplete = false,
|
|
2710
|
-
fieldsGap,
|
|
2711
|
-
formName,
|
|
2712
|
-
groupGap,
|
|
2713
|
-
language,
|
|
2714
|
-
loader,
|
|
2715
|
-
loaderAppearance = 'surfacePrimary sizeM',
|
|
2716
|
-
loaderFill,
|
|
2717
|
-
loaderItemFill,
|
|
2718
|
-
loaderShape,
|
|
2719
|
-
loaderSize,
|
|
2720
|
-
loaderText,
|
|
2721
|
-
loaderType = 'simple',
|
|
2722
|
-
mutators,
|
|
2723
|
-
notificationCloseButton,
|
|
2724
|
-
notificationType,
|
|
2725
|
-
renderFieldsWrapper = wrapperChildren => wrapperChildren,
|
|
2726
|
-
shapeStrengthClass,
|
|
2727
2726
|
before,
|
|
2728
2727
|
after,
|
|
2729
2728
|
isLoading,
|
|
2729
|
+
onClickSecondaryButton,
|
|
2730
|
+
onClickTertiaryButton,
|
|
2730
2731
|
onChangeFormValues,
|
|
2731
2732
|
onSubmit
|
|
2732
2733
|
} = props;
|
|
@@ -2751,13 +2752,13 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2751
2752
|
initialValues: initialValues,
|
|
2752
2753
|
initialValuesEqual: initialValuesEqual,
|
|
2753
2754
|
render: ({
|
|
2754
|
-
submitError,
|
|
2755
2755
|
form,
|
|
2756
2756
|
handleSubmit,
|
|
2757
|
-
modifiedSinceLastSubmit
|
|
2757
|
+
modifiedSinceLastSubmit,
|
|
2758
|
+
submitError
|
|
2758
2759
|
}) => {
|
|
2759
2760
|
return /*#__PURE__*/React__default.default.createElement("form", {
|
|
2760
|
-
className: clsx__default.default(className, 'form', type && `form_type_${type}`, buttonPosition && `form_button-position_${buttonPosition}`, directionClass && `direction_${directionClass}`, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, elevationClass && `elevation_${elevationClass}`),
|
|
2761
|
+
className: clsx__default.default(className, 'form', type && `form_type_${type}`, titlePosition && `form_title-position_${titlePosition}`, buttonPosition && `form_button-position_${buttonPosition}`, directionClass && `direction_${directionClass}`, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, elevationClass && `elevation_${elevationClass}`),
|
|
2761
2762
|
name: formName
|
|
2762
2763
|
// We no need set reference to html element, we need reference to "final-form" instance
|
|
2763
2764
|
,
|
|
@@ -2784,8 +2785,8 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2784
2785
|
}, desc), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React__default.default.createElement("div", {
|
|
2785
2786
|
className: clsx__default.default('notification', 'form-notification', notificationType ? `form-notification_${notificationType}` : 'form-notification_global')
|
|
2786
2787
|
}, /*#__PURE__*/React__default.default.createElement(Notification.Notification, {
|
|
2787
|
-
className: "form-notification__item",
|
|
2788
2788
|
appearance: "errorPrimary",
|
|
2789
|
+
className: "form-notification__item",
|
|
2789
2790
|
title: form.getState().submitError,
|
|
2790
2791
|
titleTextSize: "h6",
|
|
2791
2792
|
status: "error",
|
|
@@ -2803,28 +2804,28 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2803
2804
|
}, Object.keys(config).map(key => generateField(config[key], {
|
|
2804
2805
|
key
|
|
2805
2806
|
}, additionalProps[config[key].name])), isLoading && (loader || /*#__PURE__*/React__default.default.createElement(Loader.Loader, {
|
|
2807
|
+
appearance: loaderAppearance,
|
|
2806
2808
|
className: "form__loader",
|
|
2807
2809
|
type: loaderType,
|
|
2808
|
-
appearance: loaderAppearance,
|
|
2809
2810
|
size: loaderSize,
|
|
2810
2811
|
fill: loaderFill,
|
|
2811
2812
|
text: loaderText,
|
|
2812
2813
|
itemFill: loaderItemFill,
|
|
2813
2814
|
shape: loaderShape
|
|
2814
2815
|
}))))), (primaryButtonLabel || primaryButton || secondaryButtonLabel || secondaryButton || tertiaryButton || tertiaryButtonLabel) && /*#__PURE__*/React__default.default.createElement(Group.Group, {
|
|
2816
|
+
className: "form__button",
|
|
2815
2817
|
dataTestId: dataTestIdButtons,
|
|
2816
2818
|
dataTour: dataTourButtons,
|
|
2817
|
-
className: "form__button",
|
|
2818
2819
|
direction: buttonDirection,
|
|
2819
2820
|
justifyContent: buttonJustifyContent,
|
|
2820
2821
|
fill: buttonFill,
|
|
2821
2822
|
padding: buttonPadding,
|
|
2822
2823
|
gap: buttonGap
|
|
2823
2824
|
}, primaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(Button.Button, {
|
|
2825
|
+
appearance: primaryButtonAppearance,
|
|
2826
|
+
className: "form__button-item",
|
|
2824
2827
|
dataTestId: dataTestIdPrimaryButton,
|
|
2825
2828
|
dataTour: dataTourPrimaryButton,
|
|
2826
|
-
className: "form__button-item",
|
|
2827
|
-
appearance: primaryButtonAppearance,
|
|
2828
2829
|
width: "fill",
|
|
2829
2830
|
size: primaryButtonSize,
|
|
2830
2831
|
fill: primaryButtonFill,
|
|
@@ -2833,13 +2834,13 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2833
2834
|
labelTextColor: primaryButtonLabelTextColor,
|
|
2834
2835
|
labelTextSize: primaryButtonLabelSize,
|
|
2835
2836
|
labelTextWeight: primaryButtonLabelTextWeight,
|
|
2836
|
-
|
|
2837
|
-
|
|
2837
|
+
loading: primaryButtonIsLoading,
|
|
2838
|
+
isDisabled: primaryButtonIsDisabled
|
|
2838
2839
|
}) : primaryButton, secondaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(Button.Button, {
|
|
2840
|
+
appearance: secondaryButtonAppearance,
|
|
2841
|
+
className: "form__button-item",
|
|
2839
2842
|
dataTestId: dataTestIdSecondaryButton,
|
|
2840
2843
|
dataTour: dataTourSecondaryButton,
|
|
2841
|
-
className: "form__button-item",
|
|
2842
|
-
appearance: secondaryButtonAppearance,
|
|
2843
2844
|
width: "fill",
|
|
2844
2845
|
size: secondaryButtonSize,
|
|
2845
2846
|
fill: secondaryButtonFill,
|
|
@@ -2848,13 +2849,13 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2848
2849
|
labelTextColor: secondaryButtonLabelTextColor,
|
|
2849
2850
|
labelTextSize: secondaryButtonLabelSize,
|
|
2850
2851
|
labelTextWeight: secondaryButtonLabelTextWeight,
|
|
2851
|
-
isDisabled: secondaryButtonIsDisabled,
|
|
2852
2852
|
loading: secondaryButtonIsLoading,
|
|
2853
|
+
isDisabled: secondaryButtonIsDisabled,
|
|
2853
2854
|
onClick: onClickSecondaryButton
|
|
2854
2855
|
}) : secondaryButton, tertiaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(Button.Button, {
|
|
2856
|
+
className: "form__button-item",
|
|
2855
2857
|
dataTestId: dataTestIdTertiaryButton,
|
|
2856
2858
|
dataTour: dataTourTertiaryButton,
|
|
2857
|
-
className: "form__button-item",
|
|
2858
2859
|
width: "fill",
|
|
2859
2860
|
size: tertiaryButtonSize,
|
|
2860
2861
|
fill: tertiaryButtonFill,
|
|
@@ -2869,9 +2870,9 @@ const FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalF
|
|
|
2869
2870
|
decorators: [focusOnErrorDecorator],
|
|
2870
2871
|
mutators: mutators,
|
|
2871
2872
|
subscription: {
|
|
2872
|
-
submitError: true,
|
|
2873
2873
|
modifiedSinceLastSubmit: true,
|
|
2874
2874
|
pristine: true,
|
|
2875
|
+
submitError: true,
|
|
2875
2876
|
submitting: true
|
|
2876
2877
|
},
|
|
2877
2878
|
validate: validate,
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -2631,9 +2631,9 @@ const sendFormDataToServer = async (url, data) => {
|
|
|
2631
2631
|
|
|
2632
2632
|
const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
2633
2633
|
const {
|
|
2634
|
+
className,
|
|
2634
2635
|
dataTestId,
|
|
2635
2636
|
dataTour,
|
|
2636
|
-
className,
|
|
2637
2637
|
type,
|
|
2638
2638
|
initialValues,
|
|
2639
2639
|
initialValuesEqual,
|
|
@@ -2641,6 +2641,7 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2641
2641
|
validationSchema,
|
|
2642
2642
|
title,
|
|
2643
2643
|
titleFill,
|
|
2644
|
+
titlePosition,
|
|
2644
2645
|
titleTextColor,
|
|
2645
2646
|
titleTextSize,
|
|
2646
2647
|
titleTextWeight,
|
|
@@ -2649,8 +2650,36 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2649
2650
|
descTextColor,
|
|
2650
2651
|
descTextWeight,
|
|
2651
2652
|
buttonGap,
|
|
2653
|
+
additionalProps = {},
|
|
2654
|
+
buttonDirection = 'vertical',
|
|
2655
|
+
buttonFill,
|
|
2656
|
+
buttonJustifyContent,
|
|
2657
|
+
buttonPadding,
|
|
2658
|
+
buttonPosition,
|
|
2659
|
+
dataTestIdButtons,
|
|
2652
2660
|
dataTestIdPrimaryButton,
|
|
2661
|
+
dataTestIdSecondaryButton,
|
|
2662
|
+
dataTestIdTertiaryButton,
|
|
2663
|
+
dataTourButtons,
|
|
2653
2664
|
dataTourPrimaryButton,
|
|
2665
|
+
dataTourSecondaryButton,
|
|
2666
|
+
dataTourTertiaryButton,
|
|
2667
|
+
disableFieldsAutoComplete = false,
|
|
2668
|
+
fieldsGap,
|
|
2669
|
+
formName,
|
|
2670
|
+
groupGap,
|
|
2671
|
+
language,
|
|
2672
|
+
loader,
|
|
2673
|
+
loaderAppearance,
|
|
2674
|
+
loaderFill = 'surfacePrimary',
|
|
2675
|
+
loaderItemFill = 'accentItemSecondary',
|
|
2676
|
+
loaderShape,
|
|
2677
|
+
loaderSize = 'l',
|
|
2678
|
+
loaderText,
|
|
2679
|
+
loaderType = 'simple',
|
|
2680
|
+
mutators,
|
|
2681
|
+
notificationCloseButton,
|
|
2682
|
+
notificationType,
|
|
2654
2683
|
primaryButton,
|
|
2655
2684
|
primaryButtonAppearance,
|
|
2656
2685
|
primaryButtonFill,
|
|
@@ -2662,9 +2691,7 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2662
2691
|
primaryButtonLabelTextColor,
|
|
2663
2692
|
primaryButtonLabelTextWeight,
|
|
2664
2693
|
primaryButtonSize,
|
|
2665
|
-
|
|
2666
|
-
dataTourSecondaryButton,
|
|
2667
|
-
onClickSecondaryButton,
|
|
2694
|
+
renderFieldsWrapper = wrapperChildren => wrapperChildren,
|
|
2668
2695
|
secondaryButton,
|
|
2669
2696
|
secondaryButtonAppearance,
|
|
2670
2697
|
secondaryButtonFill,
|
|
@@ -2676,9 +2703,7 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2676
2703
|
secondaryButtonLabelTextColor,
|
|
2677
2704
|
secondaryButtonLabelTextWeight,
|
|
2678
2705
|
secondaryButtonSize,
|
|
2679
|
-
|
|
2680
|
-
dataTourTertiaryButton,
|
|
2681
|
-
onClickTertiaryButton,
|
|
2706
|
+
shapeStrengthClass,
|
|
2682
2707
|
tertiaryButton,
|
|
2683
2708
|
tertiaryButtonFill,
|
|
2684
2709
|
tertiaryButtonFillHover,
|
|
@@ -2687,35 +2712,11 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2687
2712
|
tertiaryButtonLabelTextColor,
|
|
2688
2713
|
tertiaryButtonLabelTextWeight,
|
|
2689
2714
|
tertiaryButtonSize,
|
|
2690
|
-
additionalProps = {},
|
|
2691
|
-
buttonDirection = 'vertical',
|
|
2692
|
-
buttonFill,
|
|
2693
|
-
buttonJustifyContent,
|
|
2694
|
-
buttonPadding,
|
|
2695
|
-
buttonPosition,
|
|
2696
|
-
dataTestIdButtons,
|
|
2697
|
-
dataTourButtons,
|
|
2698
|
-
disableFieldsAutoComplete = false,
|
|
2699
|
-
fieldsGap,
|
|
2700
|
-
formName,
|
|
2701
|
-
groupGap,
|
|
2702
|
-
language,
|
|
2703
|
-
loader,
|
|
2704
|
-
loaderAppearance = 'surfacePrimary sizeM',
|
|
2705
|
-
loaderFill,
|
|
2706
|
-
loaderItemFill,
|
|
2707
|
-
loaderShape,
|
|
2708
|
-
loaderSize,
|
|
2709
|
-
loaderText,
|
|
2710
|
-
loaderType = 'simple',
|
|
2711
|
-
mutators,
|
|
2712
|
-
notificationCloseButton,
|
|
2713
|
-
notificationType,
|
|
2714
|
-
renderFieldsWrapper = wrapperChildren => wrapperChildren,
|
|
2715
|
-
shapeStrengthClass,
|
|
2716
2715
|
before,
|
|
2717
2716
|
after,
|
|
2718
2717
|
isLoading,
|
|
2718
|
+
onClickSecondaryButton,
|
|
2719
|
+
onClickTertiaryButton,
|
|
2719
2720
|
onChangeFormValues,
|
|
2720
2721
|
onSubmit
|
|
2721
2722
|
} = props;
|
|
@@ -2740,13 +2741,13 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2740
2741
|
initialValues: initialValues,
|
|
2741
2742
|
initialValuesEqual: initialValuesEqual,
|
|
2742
2743
|
render: ({
|
|
2743
|
-
submitError,
|
|
2744
2744
|
form,
|
|
2745
2745
|
handleSubmit,
|
|
2746
|
-
modifiedSinceLastSubmit
|
|
2746
|
+
modifiedSinceLastSubmit,
|
|
2747
|
+
submitError
|
|
2747
2748
|
}) => {
|
|
2748
2749
|
return /*#__PURE__*/React.createElement("form", {
|
|
2749
|
-
className: clsx(className, 'form', type && `form_type_${type}`, buttonPosition && `form_button-position_${buttonPosition}`, directionClass && `direction_${directionClass}`, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, elevationClass && `elevation_${elevationClass}`),
|
|
2750
|
+
className: clsx(className, 'form', type && `form_type_${type}`, titlePosition && `form_title-position_${titlePosition}`, buttonPosition && `form_button-position_${buttonPosition}`, directionClass && `direction_${directionClass}`, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, elevationClass && `elevation_${elevationClass}`),
|
|
2750
2751
|
name: formName
|
|
2751
2752
|
// We no need set reference to html element, we need reference to "final-form" instance
|
|
2752
2753
|
,
|
|
@@ -2773,8 +2774,8 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2773
2774
|
}, desc), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React.createElement("div", {
|
|
2774
2775
|
className: clsx('notification', 'form-notification', notificationType ? `form-notification_${notificationType}` : 'form-notification_global')
|
|
2775
2776
|
}, /*#__PURE__*/React.createElement(Notification, {
|
|
2776
|
-
className: "form-notification__item",
|
|
2777
2777
|
appearance: "errorPrimary",
|
|
2778
|
+
className: "form-notification__item",
|
|
2778
2779
|
title: form.getState().submitError,
|
|
2779
2780
|
titleTextSize: "h6",
|
|
2780
2781
|
status: "error",
|
|
@@ -2792,28 +2793,28 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2792
2793
|
}, Object.keys(config).map(key => generateField(config[key], {
|
|
2793
2794
|
key
|
|
2794
2795
|
}, additionalProps[config[key].name])), isLoading && (loader || /*#__PURE__*/React.createElement(Loader, {
|
|
2796
|
+
appearance: loaderAppearance,
|
|
2795
2797
|
className: "form__loader",
|
|
2796
2798
|
type: loaderType,
|
|
2797
|
-
appearance: loaderAppearance,
|
|
2798
2799
|
size: loaderSize,
|
|
2799
2800
|
fill: loaderFill,
|
|
2800
2801
|
text: loaderText,
|
|
2801
2802
|
itemFill: loaderItemFill,
|
|
2802
2803
|
shape: loaderShape
|
|
2803
2804
|
}))))), (primaryButtonLabel || primaryButton || secondaryButtonLabel || secondaryButton || tertiaryButton || tertiaryButtonLabel) && /*#__PURE__*/React.createElement(Group, {
|
|
2805
|
+
className: "form__button",
|
|
2804
2806
|
dataTestId: dataTestIdButtons,
|
|
2805
2807
|
dataTour: dataTourButtons,
|
|
2806
|
-
className: "form__button",
|
|
2807
2808
|
direction: buttonDirection,
|
|
2808
2809
|
justifyContent: buttonJustifyContent,
|
|
2809
2810
|
fill: buttonFill,
|
|
2810
2811
|
padding: buttonPadding,
|
|
2811
2812
|
gap: buttonGap
|
|
2812
2813
|
}, primaryButtonLabel ? /*#__PURE__*/React.createElement(Button, {
|
|
2814
|
+
appearance: primaryButtonAppearance,
|
|
2815
|
+
className: "form__button-item",
|
|
2813
2816
|
dataTestId: dataTestIdPrimaryButton,
|
|
2814
2817
|
dataTour: dataTourPrimaryButton,
|
|
2815
|
-
className: "form__button-item",
|
|
2816
|
-
appearance: primaryButtonAppearance,
|
|
2817
2818
|
width: "fill",
|
|
2818
2819
|
size: primaryButtonSize,
|
|
2819
2820
|
fill: primaryButtonFill,
|
|
@@ -2822,13 +2823,13 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2822
2823
|
labelTextColor: primaryButtonLabelTextColor,
|
|
2823
2824
|
labelTextSize: primaryButtonLabelSize,
|
|
2824
2825
|
labelTextWeight: primaryButtonLabelTextWeight,
|
|
2825
|
-
|
|
2826
|
-
|
|
2826
|
+
loading: primaryButtonIsLoading,
|
|
2827
|
+
isDisabled: primaryButtonIsDisabled
|
|
2827
2828
|
}) : primaryButton, secondaryButtonLabel ? /*#__PURE__*/React.createElement(Button, {
|
|
2829
|
+
appearance: secondaryButtonAppearance,
|
|
2830
|
+
className: "form__button-item",
|
|
2828
2831
|
dataTestId: dataTestIdSecondaryButton,
|
|
2829
2832
|
dataTour: dataTourSecondaryButton,
|
|
2830
|
-
className: "form__button-item",
|
|
2831
|
-
appearance: secondaryButtonAppearance,
|
|
2832
2833
|
width: "fill",
|
|
2833
2834
|
size: secondaryButtonSize,
|
|
2834
2835
|
fill: secondaryButtonFill,
|
|
@@ -2837,13 +2838,13 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2837
2838
|
labelTextColor: secondaryButtonLabelTextColor,
|
|
2838
2839
|
labelTextSize: secondaryButtonLabelSize,
|
|
2839
2840
|
labelTextWeight: secondaryButtonLabelTextWeight,
|
|
2840
|
-
isDisabled: secondaryButtonIsDisabled,
|
|
2841
2841
|
loading: secondaryButtonIsLoading,
|
|
2842
|
+
isDisabled: secondaryButtonIsDisabled,
|
|
2842
2843
|
onClick: onClickSecondaryButton
|
|
2843
2844
|
}) : secondaryButton, tertiaryButtonLabel ? /*#__PURE__*/React.createElement(Button, {
|
|
2845
|
+
className: "form__button-item",
|
|
2844
2846
|
dataTestId: dataTestIdTertiaryButton,
|
|
2845
2847
|
dataTour: dataTourTertiaryButton,
|
|
2846
|
-
className: "form__button-item",
|
|
2847
2848
|
width: "fill",
|
|
2848
2849
|
size: tertiaryButtonSize,
|
|
2849
2850
|
fill: tertiaryButtonFill,
|
|
@@ -2858,9 +2859,9 @@ const FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2858
2859
|
decorators: [focusOnErrorDecorator],
|
|
2859
2860
|
mutators: mutators,
|
|
2860
2861
|
subscription: {
|
|
2861
|
-
submitError: true,
|
|
2862
2862
|
modifiedSinceLastSubmit: true,
|
|
2863
2863
|
pristine: true,
|
|
2864
|
+
submitError: true,
|
|
2864
2865
|
submitting: true
|
|
2865
2866
|
},
|
|
2866
2867
|
validate: validate,
|