@itcase/forms 1.0.28 → 1.0.30
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.
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.form-textarea {
|
|
2
|
+
position: relative;
|
|
3
|
+
&&_state {
|
|
4
|
+
&_success {
|
|
5
|
+
& .textarea {
|
|
6
|
+
border: solid 1px var(--color-success-border-primary);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
&_error {
|
|
10
|
+
& .textarea {
|
|
11
|
+
border: solid 1px var(--color-error-border-primary);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
&_focus {
|
|
15
|
+
& .textarea {
|
|
16
|
+
background: var(--color-surface-primary);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -812,6 +812,7 @@ var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(
|
|
|
812
812
|
inputProps = props.inputProps,
|
|
813
813
|
isMultiple = props.isMultiple,
|
|
814
814
|
isRequired = props.isRequired,
|
|
815
|
+
initialValue = props.initialValue,
|
|
815
816
|
label = props.label,
|
|
816
817
|
name = props.name,
|
|
817
818
|
messageType = props.messageType,
|
|
@@ -820,7 +821,8 @@ var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(
|
|
|
820
821
|
var _useForm = reactFinalForm.useForm(),
|
|
821
822
|
change = _useForm.change;
|
|
822
823
|
return /*#__PURE__*/React__default.default.createElement(reactFinalForm.Field, {
|
|
823
|
-
name: name
|
|
824
|
+
name: name,
|
|
825
|
+
initialValue: initialValue
|
|
824
826
|
}, function (_ref) {
|
|
825
827
|
var input = _ref.input,
|
|
826
828
|
meta = _ref.meta;
|
|
@@ -842,6 +844,7 @@ var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(
|
|
|
842
844
|
}, [change]);
|
|
843
845
|
return /*#__PURE__*/React__default.default.createElement(FieldWrapper, Object.assign({
|
|
844
846
|
className: clsx__default.default('form-field_type_choice', 'form__item_type_choice', classNameGroupItem),
|
|
847
|
+
fieldClassName: "form-choice",
|
|
845
848
|
inputName: input.name,
|
|
846
849
|
inputValue: input.value || [],
|
|
847
850
|
isRequired: isRequired,
|
|
@@ -856,6 +859,7 @@ var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(
|
|
|
856
859
|
metaValid: meta.valid,
|
|
857
860
|
hideMessage: hideMessage
|
|
858
861
|
}, fieldProps), /*#__PURE__*/React__default.default.createElement(Choice.Choice, Object.assign({
|
|
862
|
+
className: clsx__default.default(meta.active && 'form-choice_state_focus', meta.error && meta.touched && 'form-choice_state_error'),
|
|
859
863
|
options: options,
|
|
860
864
|
inputName: input.name,
|
|
861
865
|
inputValue: input.value || [],
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -802,6 +802,7 @@ var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
802
802
|
inputProps = props.inputProps,
|
|
803
803
|
isMultiple = props.isMultiple,
|
|
804
804
|
isRequired = props.isRequired,
|
|
805
|
+
initialValue = props.initialValue,
|
|
805
806
|
label = props.label,
|
|
806
807
|
name = props.name,
|
|
807
808
|
messageType = props.messageType,
|
|
@@ -810,7 +811,8 @@ var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
810
811
|
var _useForm = useForm(),
|
|
811
812
|
change = _useForm.change;
|
|
812
813
|
return /*#__PURE__*/React.createElement(Field, {
|
|
813
|
-
name: name
|
|
814
|
+
name: name,
|
|
815
|
+
initialValue: initialValue
|
|
814
816
|
}, function (_ref) {
|
|
815
817
|
var input = _ref.input,
|
|
816
818
|
meta = _ref.meta;
|
|
@@ -832,6 +834,7 @@ var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
832
834
|
}, [change]);
|
|
833
835
|
return /*#__PURE__*/React.createElement(FieldWrapper, Object.assign({
|
|
834
836
|
className: clsx('form-field_type_choice', 'form__item_type_choice', classNameGroupItem),
|
|
837
|
+
fieldClassName: "form-choice",
|
|
835
838
|
inputName: input.name,
|
|
836
839
|
inputValue: input.value || [],
|
|
837
840
|
isRequired: isRequired,
|
|
@@ -846,6 +849,7 @@ var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
846
849
|
metaValid: meta.valid,
|
|
847
850
|
hideMessage: hideMessage
|
|
848
851
|
}, fieldProps), /*#__PURE__*/React.createElement(Choice, Object.assign({
|
|
852
|
+
className: clsx(meta.active && 'form-choice_state_focus', meta.error && meta.touched && 'form-choice_state_error'),
|
|
849
853
|
options: options,
|
|
850
854
|
inputName: input.name,
|
|
851
855
|
inputValue: input.value || [],
|