@itcase/forms 1.0.21 → 1.0.23
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.
|
@@ -1,44 +1,13 @@
|
|
|
1
|
-
.form-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
flex-flow: row wrap;
|
|
6
|
-
gap: 16px;
|
|
7
|
-
}
|
|
8
|
-
&__item {
|
|
9
|
-
background: var(--color-surface-primary);
|
|
10
|
-
padding: 3px 12px;
|
|
11
|
-
border: solid 1px var(--color-surface-border-secondary);
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
z-index: 1;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
@mixin easing easeOutQuart, all, 0.2s;
|
|
16
|
-
@mixin h5 300;
|
|
17
|
-
@media (--mobile) {
|
|
18
|
-
padding: 6px 6px;
|
|
19
|
-
}
|
|
20
|
-
&:hover {
|
|
21
|
-
background: var(--color-surface-secondary-hover);
|
|
22
|
-
}
|
|
23
|
-
&:focus {
|
|
24
|
-
background: var(--color-surface-secondary-hover);
|
|
25
|
-
}
|
|
26
|
-
&&_state_active {
|
|
27
|
-
color: var(--color-accent-text-primary);
|
|
28
|
-
background: var(--color-accent);
|
|
29
|
-
border: solid 1px var(--color-surface-border-accent);
|
|
30
|
-
&:hover {
|
|
31
|
-
color: var(--color-accent-text-primary);
|
|
32
|
-
background: var(--color-accent-hover-primary);
|
|
33
|
-
border: solid 1px var(--color-surface-border-accent);
|
|
34
|
-
}
|
|
1
|
+
.form-choice {
|
|
2
|
+
&&_state {
|
|
3
|
+
&_success {
|
|
4
|
+
border: solid 1px var(--color-success-border-primary);
|
|
35
5
|
}
|
|
36
|
-
|
|
37
|
-
&&_state_error {
|
|
38
|
-
^&__item {
|
|
6
|
+
&_error {
|
|
39
7
|
border: solid 1px var(--color-error-border-primary);
|
|
40
8
|
}
|
|
41
|
-
|
|
42
|
-
|
|
9
|
+
&_focus {
|
|
10
|
+
/* border: solid 1px var(--color-error-border-primary); */
|
|
11
|
+
}
|
|
43
12
|
}
|
|
44
13
|
}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
.form-field {
|
|
2
2
|
&_type_custom {
|
|
3
3
|
width: 100%;
|
|
4
|
+
&&_state {
|
|
5
|
+
&_success {
|
|
6
|
+
& .input {
|
|
7
|
+
border: solid 1px var(--color-success-border-primary);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
&_error {
|
|
11
|
+
& .input {
|
|
12
|
+
border: solid 1px var(--color-error-border-primary);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
&_focus {
|
|
16
|
+
& .input {
|
|
17
|
+
background: var(--color-surface-primary);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
4
21
|
}
|
|
5
22
|
}
|
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -796,10 +796,10 @@ CheckboxField.propTypes = {
|
|
|
796
796
|
};
|
|
797
797
|
|
|
798
798
|
var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(props) {
|
|
799
|
-
var options = props.options
|
|
800
|
-
props.
|
|
801
|
-
props.
|
|
802
|
-
|
|
799
|
+
var options = props.options,
|
|
800
|
+
classNameGroupItem = props.classNameGroupItem,
|
|
801
|
+
fieldProps = props.fieldProps,
|
|
802
|
+
inputProps = props.inputProps,
|
|
803
803
|
isMultiple = props.isMultiple,
|
|
804
804
|
isRequired = props.isRequired,
|
|
805
805
|
label = props.label,
|
|
@@ -814,8 +814,8 @@ var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(
|
|
|
814
814
|
}, function (_ref) {
|
|
815
815
|
var input = _ref.input,
|
|
816
816
|
meta = _ref.meta;
|
|
817
|
-
return /*#__PURE__*/React__default.default.createElement(FieldWrapper, {
|
|
818
|
-
className: clsx__default.default('form-
|
|
817
|
+
return /*#__PURE__*/React__default.default.createElement(FieldWrapper, Object.assign({
|
|
818
|
+
className: clsx__default.default('form-field_type_choice', 'form__item_type_choice', classNameGroupItem),
|
|
819
819
|
inputName: input.name,
|
|
820
820
|
inputValue: input.value || [],
|
|
821
821
|
isRequired: isRequired,
|
|
@@ -829,7 +829,7 @@ var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(
|
|
|
829
829
|
metaTouched: meta.touched,
|
|
830
830
|
metaValid: meta.valid,
|
|
831
831
|
hideMessage: hideMessage
|
|
832
|
-
}, /*#__PURE__*/React__default.default.createElement(Choice.Choice, {
|
|
832
|
+
}, fieldProps), /*#__PURE__*/React__default.default.createElement(Choice.Choice, Object.assign({
|
|
833
833
|
options: options,
|
|
834
834
|
inputName: input.name,
|
|
835
835
|
inputValue: input.value || [],
|
|
@@ -837,7 +837,7 @@ var ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(
|
|
|
837
837
|
isRequired: isRequired,
|
|
838
838
|
placeholder: placeholder,
|
|
839
839
|
onChange: change
|
|
840
|
-
}));
|
|
840
|
+
}, inputProps)));
|
|
841
841
|
});
|
|
842
842
|
});
|
|
843
843
|
ChoiceField.propTypes = {
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -786,10 +786,10 @@ CheckboxField.propTypes = {
|
|
|
786
786
|
};
|
|
787
787
|
|
|
788
788
|
var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
789
|
-
var options = props.options
|
|
790
|
-
props.
|
|
791
|
-
props.
|
|
792
|
-
|
|
789
|
+
var options = props.options,
|
|
790
|
+
classNameGroupItem = props.classNameGroupItem,
|
|
791
|
+
fieldProps = props.fieldProps,
|
|
792
|
+
inputProps = props.inputProps,
|
|
793
793
|
isMultiple = props.isMultiple,
|
|
794
794
|
isRequired = props.isRequired,
|
|
795
795
|
label = props.label,
|
|
@@ -804,8 +804,8 @@ var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
804
804
|
}, function (_ref) {
|
|
805
805
|
var input = _ref.input,
|
|
806
806
|
meta = _ref.meta;
|
|
807
|
-
return /*#__PURE__*/React.createElement(FieldWrapper, {
|
|
808
|
-
className: clsx('form-
|
|
807
|
+
return /*#__PURE__*/React.createElement(FieldWrapper, Object.assign({
|
|
808
|
+
className: clsx('form-field_type_choice', 'form__item_type_choice', classNameGroupItem),
|
|
809
809
|
inputName: input.name,
|
|
810
810
|
inputValue: input.value || [],
|
|
811
811
|
isRequired: isRequired,
|
|
@@ -819,7 +819,7 @@ var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
819
819
|
metaTouched: meta.touched,
|
|
820
820
|
metaValid: meta.valid,
|
|
821
821
|
hideMessage: hideMessage
|
|
822
|
-
}, /*#__PURE__*/React.createElement(Choice, {
|
|
822
|
+
}, fieldProps), /*#__PURE__*/React.createElement(Choice, Object.assign({
|
|
823
823
|
options: options,
|
|
824
824
|
inputName: input.name,
|
|
825
825
|
inputValue: input.value || [],
|
|
@@ -827,7 +827,7 @@ var ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
827
827
|
isRequired: isRequired,
|
|
828
828
|
placeholder: placeholder,
|
|
829
829
|
onChange: change
|
|
830
|
-
}));
|
|
830
|
+
}, inputProps)));
|
|
831
831
|
});
|
|
832
832
|
});
|
|
833
833
|
ChoiceField.propTypes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/forms",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "Forms fields, inputs, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"forms",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@itcase/common": "^1.1.6",
|
|
38
|
-
"@itcase/ui": "^1.0.
|
|
38
|
+
"@itcase/ui": "^1.0.46",
|
|
39
39
|
"axios": "^1.5.0",
|
|
40
40
|
"clsx": "^2.0.0",
|
|
41
41
|
"date-fns": "2.0.0-alpha.7",
|
|
42
42
|
"final-form": "^4.20.10",
|
|
43
43
|
"final-form-focus": "^1.1.2",
|
|
44
|
-
"libphonenumber-js": "^1.10.
|
|
44
|
+
"libphonenumber-js": "^1.10.44",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
|
-
"luxon": "^3.4.
|
|
46
|
+
"luxon": "^3.4.3",
|
|
47
47
|
"prop-types": "^15.8.1",
|
|
48
48
|
"react": "^18.2.0",
|
|
49
49
|
"react-date-range": "^1.4.0",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"react-select": "^5.7.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.22.
|
|
57
|
-
"@babel/eslint-parser": "^7.22.
|
|
58
|
-
"@babel/preset-env": "^7.22.
|
|
59
|
-
"@babel/preset-react": "^7.22.
|
|
56
|
+
"@babel/core": "^7.22.17",
|
|
57
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
58
|
+
"@babel/preset-env": "^7.22.15",
|
|
59
|
+
"@babel/preset-react": "^7.22.15",
|
|
60
60
|
"@commitlint/cli": "^17.7.1",
|
|
61
61
|
"@commitlint/config-conventional": "^17.7.0",
|
|
62
62
|
"@rollup/plugin-babel": "^6.0.3",
|
|
@@ -67,17 +67,17 @@
|
|
|
67
67
|
"@semantic-release/git": "^10.0.1",
|
|
68
68
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
69
69
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
70
|
-
"eslint": "8.
|
|
70
|
+
"eslint": "8.49.0",
|
|
71
71
|
"eslint-config-prettier": "^9.0.0",
|
|
72
72
|
"eslint-config-standard": "^17.1.0",
|
|
73
73
|
"eslint-plugin-import": "^2.28.1",
|
|
74
|
-
"eslint-plugin-n": "^16.0
|
|
74
|
+
"eslint-plugin-n": "^16.1.0",
|
|
75
75
|
"eslint-plugin-prettier": "^5.0.0",
|
|
76
76
|
"eslint-plugin-promise": "^6.1.1",
|
|
77
77
|
"eslint-plugin-react": "^7.33.2",
|
|
78
78
|
"eslint-plugin-standard": "^5.0.0",
|
|
79
79
|
"husky": "^8.0.3",
|
|
80
|
-
"npm": "^
|
|
80
|
+
"npm": "^10.1.0",
|
|
81
81
|
"postcss-aspect-ratio-polyfill": "^2.0.0",
|
|
82
82
|
"postcss-cli": "^10.1.0",
|
|
83
83
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
"postcss-nested-ancestors": "^3.0.0",
|
|
96
96
|
"postcss-normalize": "^10.0.1",
|
|
97
97
|
"postcss-prepend-imports": "^1.0.1",
|
|
98
|
-
"postcss-preset-env": "^9.1.
|
|
98
|
+
"postcss-preset-env": "^9.1.3",
|
|
99
99
|
"postcss-pxtorem": "^6.0.0",
|
|
100
100
|
"postcss-responsive-type": "github:ITCase/postcss-responsive-type",
|
|
101
101
|
"postcss-sort-media-queries": "^5.2.0",
|
|
102
102
|
"prettier": "^3.0.3",
|
|
103
|
-
"react-datepicker": "^4.
|
|
104
|
-
"rollup": "^3.
|
|
103
|
+
"react-datepicker": "^4.17.0",
|
|
104
|
+
"rollup": "^3.29.1",
|
|
105
105
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
106
106
|
"semantic-release": "^21.1.1",
|
|
107
107
|
"stylelint": "^15.10.3",
|