@itcase/forms 1.0.20 → 1.0.21
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/Field/Checkbox/Checkbox.css +2 -2
- package/dist/css/form/Field/Segmented/Segmented.css +8 -4
- package/dist/css/form/Form/Form.css +3 -0
- package/dist/css/form/Form/css/form-notification/form-notification.css +3 -0
- package/dist/itcase-forms.cjs.js +6 -3
- package/dist/itcase-forms.esm.js +6 -3
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
&_focus {
|
|
14
14
|
& .checkbox__state {
|
|
15
|
-
|
|
15
|
+
/* border: solid 1px var(--color-error-border-primary); */
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
align-self: flex-start;
|
|
31
31
|
grid-row: 1;
|
|
32
32
|
&-inner {
|
|
33
|
-
padding:
|
|
33
|
+
padding: 2px 0 0 0;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
^&__message {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
.form-segmented {
|
|
2
|
-
&
|
|
2
|
+
&_state_error {
|
|
3
3
|
& .segmented {
|
|
4
|
-
|
|
4
|
+
&__item-label-text {
|
|
5
|
+
color: var(--color-error-text-primary);
|
|
6
|
+
}
|
|
5
7
|
}
|
|
6
8
|
}
|
|
7
|
-
&
|
|
9
|
+
&_state_required {
|
|
8
10
|
& .segmented {
|
|
9
|
-
|
|
11
|
+
&__item-label-text {
|
|
12
|
+
color: var(--color-active-text-primary);
|
|
13
|
+
}
|
|
10
14
|
}
|
|
11
15
|
}
|
|
12
16
|
}
|
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -56,9 +56,10 @@ var emailValidation = function emailValidation(value, context) {
|
|
|
56
56
|
var addRequiredFieldsParamToSchema = function addRequiredFieldsParamToSchema(schema) {
|
|
57
57
|
var fields = Object.entries(schema.fields);
|
|
58
58
|
schema.requiredFields = fields.reduce(function (list, _ref) {
|
|
59
|
+
var _validationProps$excl;
|
|
59
60
|
var fieldName = _ref[0],
|
|
60
61
|
validationProps = _ref[1];
|
|
61
|
-
if (validationProps.exclusiveTests.required) {
|
|
62
|
+
if ((_validationProps$excl = validationProps.exclusiveTests) != null && _validationProps$excl.required) {
|
|
62
63
|
list.push(fieldName);
|
|
63
64
|
}
|
|
64
65
|
return list;
|
|
@@ -2573,10 +2574,12 @@ var FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalFor
|
|
|
2573
2574
|
textColor: descriptionTextColor,
|
|
2574
2575
|
textWeight: descriptionTextWeight
|
|
2575
2576
|
}, description), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React__default.default.createElement("div", {
|
|
2576
|
-
className: clsx__default.default('notification', 'form-notification', notificationType
|
|
2577
|
+
className: clsx__default.default('notification', 'form-notification', notificationType ? "form-notification_type_" + notificationType : 'form-notification_type_global')
|
|
2577
2578
|
}, /*#__PURE__*/React__default.default.createElement(Notification.NotificationItem, {
|
|
2578
2579
|
className: "form-notification__item",
|
|
2579
|
-
|
|
2580
|
+
titleTextSize: "h6",
|
|
2581
|
+
title: form.getState().submitError,
|
|
2582
|
+
set: "form",
|
|
2580
2583
|
status: "error"
|
|
2581
2584
|
})), onChangeFormValues && /*#__PURE__*/React__default.default.createElement(reactFinalForm.FormSpy, {
|
|
2582
2585
|
subscription: {
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -46,9 +46,10 @@ var emailValidation = function emailValidation(value, context) {
|
|
|
46
46
|
var addRequiredFieldsParamToSchema = function addRequiredFieldsParamToSchema(schema) {
|
|
47
47
|
var fields = Object.entries(schema.fields);
|
|
48
48
|
schema.requiredFields = fields.reduce(function (list, _ref) {
|
|
49
|
+
var _validationProps$excl;
|
|
49
50
|
var fieldName = _ref[0],
|
|
50
51
|
validationProps = _ref[1];
|
|
51
|
-
if (validationProps.exclusiveTests.required) {
|
|
52
|
+
if ((_validationProps$excl = validationProps.exclusiveTests) != null && _validationProps$excl.required) {
|
|
52
53
|
list.push(fieldName);
|
|
53
54
|
}
|
|
54
55
|
return list;
|
|
@@ -2563,10 +2564,12 @@ var FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
|
|
|
2563
2564
|
textColor: descriptionTextColor,
|
|
2564
2565
|
textWeight: descriptionTextWeight
|
|
2565
2566
|
}, description), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React.createElement("div", {
|
|
2566
|
-
className: clsx('notification', 'form-notification', notificationType
|
|
2567
|
+
className: clsx('notification', 'form-notification', notificationType ? "form-notification_type_" + notificationType : 'form-notification_type_global')
|
|
2567
2568
|
}, /*#__PURE__*/React.createElement(NotificationItem, {
|
|
2568
2569
|
className: "form-notification__item",
|
|
2569
|
-
|
|
2570
|
+
titleTextSize: "h6",
|
|
2571
|
+
title: form.getState().submitError,
|
|
2572
|
+
set: "form",
|
|
2570
2573
|
status: "error"
|
|
2571
2574
|
})), onChangeFormValues && /*#__PURE__*/React.createElement(FormSpy, {
|
|
2572
2575
|
subscription: {
|