@itcase/forms 1.0.71 → 1.0.73
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/Group/Group.css +9 -0
- package/dist/itcase-forms.cjs.js +19 -17
- package/dist/itcase-forms.esm.js +19 -17
- package/package.json +29 -29
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
&__group {
|
|
3
3
|
width: 100%;
|
|
4
4
|
margin: 0 0 12px 0;
|
|
5
|
+
&_hidden {
|
|
6
|
+
visibility: hidden;
|
|
7
|
+
display: none;
|
|
8
|
+
position: absolute;
|
|
9
|
+
z-index: -1;
|
|
10
|
+
}
|
|
11
|
+
&_type_row.&_hidden {
|
|
12
|
+
visibility: hidden
|
|
13
|
+
}
|
|
5
14
|
&-wrapper {
|
|
6
15
|
display: flex;
|
|
7
16
|
flex-flow: column nowrap;
|
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -1463,21 +1463,22 @@ FileInput.propTypes = {
|
|
|
1463
1463
|
|
|
1464
1464
|
const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
|
|
1465
1465
|
const {
|
|
1466
|
+
children,
|
|
1467
|
+
isHidden,
|
|
1466
1468
|
after,
|
|
1467
1469
|
before,
|
|
1468
1470
|
className,
|
|
1471
|
+
dataTour,
|
|
1469
1472
|
label,
|
|
1470
1473
|
labelTextColor,
|
|
1471
1474
|
labelTextSize,
|
|
1472
1475
|
labelTextWeight,
|
|
1473
1476
|
message,
|
|
1477
|
+
messageTextColor,
|
|
1474
1478
|
messageTextSize,
|
|
1475
1479
|
messageTextWeight,
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
dataTour,
|
|
1479
|
-
showGroupMessage,
|
|
1480
|
-
name
|
|
1480
|
+
name,
|
|
1481
|
+
showGroupMessage
|
|
1481
1482
|
} = props;
|
|
1482
1483
|
return /*#__PURE__*/React__default.default.createElement(reactFinalForm.Field, {
|
|
1483
1484
|
name: name
|
|
@@ -1493,7 +1494,6 @@ const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
|
|
|
1493
1494
|
*/
|
|
1494
1495
|
const {
|
|
1495
1496
|
isErrorState,
|
|
1496
|
-
isValidState,
|
|
1497
1497
|
errorKey,
|
|
1498
1498
|
errorMessage
|
|
1499
1499
|
} = useFieldValidationState({
|
|
@@ -1503,11 +1503,11 @@ const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
|
|
|
1503
1503
|
meta: meta
|
|
1504
1504
|
});
|
|
1505
1505
|
const updatedProps = useValidationAppearanceInputProps({
|
|
1506
|
-
|
|
1507
|
-
|
|
1506
|
+
inputProps: props,
|
|
1507
|
+
validationStateKey: isErrorState ? errorKey : 'success'
|
|
1508
1508
|
});
|
|
1509
1509
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
1510
|
-
className: clsx__default.default('form__group', className),
|
|
1510
|
+
className: clsx__default.default('form__group', className, isHidden && 'form__group_hidden'),
|
|
1511
1511
|
"data-tour": dataTour
|
|
1512
1512
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
1513
1513
|
className: "form__group-wrapper"
|
|
@@ -1537,19 +1537,19 @@ const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
|
|
|
1537
1537
|
});
|
|
1538
1538
|
});
|
|
1539
1539
|
Group.defaultProps = {
|
|
1540
|
-
inputProps: {},
|
|
1541
|
-
fieldProps: {},
|
|
1542
|
-
type: 'normal',
|
|
1543
|
-
errorMessageTextSize: 's',
|
|
1544
1540
|
errorMessageTextColor: 'errorTextPrimary',
|
|
1541
|
+
errorMessageTextSize: 's',
|
|
1542
|
+
fieldProps: {},
|
|
1543
|
+
inputProps: {},
|
|
1544
|
+
messageTextColor: 'surfaceTextTertiary',
|
|
1545
1545
|
messageTextSize: 's',
|
|
1546
|
-
|
|
1546
|
+
type: 'normal'
|
|
1547
1547
|
};
|
|
1548
1548
|
Group.propTypes = {
|
|
1549
|
-
|
|
1549
|
+
isRequired: PropTypes__default.default.bool,
|
|
1550
1550
|
fieldProps: PropTypes__default.default.object,
|
|
1551
1551
|
inputProps: PropTypes__default.default.object,
|
|
1552
|
-
|
|
1552
|
+
name: PropTypes__default.default.string.isRequired
|
|
1553
1553
|
};
|
|
1554
1554
|
|
|
1555
1555
|
const InputField = /*#__PURE__*/React__default.default.memo(function InputField(props) {
|
|
@@ -2066,7 +2066,9 @@ const SelectField = /*#__PURE__*/React__default.default.memo(function SelectFiel
|
|
|
2066
2066
|
setSelectedOptions(option);
|
|
2067
2067
|
onChangeField(value);
|
|
2068
2068
|
}, [onChangeField]);
|
|
2069
|
-
React.useEffect(() =>
|
|
2069
|
+
React.useEffect(() => {
|
|
2070
|
+
setSelectedOptions(defaultValue);
|
|
2071
|
+
}, [defaultValue]);
|
|
2070
2072
|
const {
|
|
2071
2073
|
isErrorState,
|
|
2072
2074
|
isValidState,
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -1449,21 +1449,22 @@ FileInput.propTypes = {
|
|
|
1449
1449
|
|
|
1450
1450
|
const Group = /*#__PURE__*/React.memo(function Group(props) {
|
|
1451
1451
|
const {
|
|
1452
|
+
children,
|
|
1453
|
+
isHidden,
|
|
1452
1454
|
after,
|
|
1453
1455
|
before,
|
|
1454
1456
|
className,
|
|
1457
|
+
dataTour,
|
|
1455
1458
|
label,
|
|
1456
1459
|
labelTextColor,
|
|
1457
1460
|
labelTextSize,
|
|
1458
1461
|
labelTextWeight,
|
|
1459
1462
|
message,
|
|
1463
|
+
messageTextColor,
|
|
1460
1464
|
messageTextSize,
|
|
1461
1465
|
messageTextWeight,
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
dataTour,
|
|
1465
|
-
showGroupMessage,
|
|
1466
|
-
name
|
|
1466
|
+
name,
|
|
1467
|
+
showGroupMessage
|
|
1467
1468
|
} = props;
|
|
1468
1469
|
return /*#__PURE__*/React.createElement(Field, {
|
|
1469
1470
|
name: name
|
|
@@ -1479,7 +1480,6 @@ const Group = /*#__PURE__*/React.memo(function Group(props) {
|
|
|
1479
1480
|
*/
|
|
1480
1481
|
const {
|
|
1481
1482
|
isErrorState,
|
|
1482
|
-
isValidState,
|
|
1483
1483
|
errorKey,
|
|
1484
1484
|
errorMessage
|
|
1485
1485
|
} = useFieldValidationState({
|
|
@@ -1489,11 +1489,11 @@ const Group = /*#__PURE__*/React.memo(function Group(props) {
|
|
|
1489
1489
|
meta: meta
|
|
1490
1490
|
});
|
|
1491
1491
|
const updatedProps = useValidationAppearanceInputProps({
|
|
1492
|
-
|
|
1493
|
-
|
|
1492
|
+
inputProps: props,
|
|
1493
|
+
validationStateKey: isErrorState ? errorKey : 'success'
|
|
1494
1494
|
});
|
|
1495
1495
|
return /*#__PURE__*/React.createElement("div", {
|
|
1496
|
-
className: clsx('form__group', className),
|
|
1496
|
+
className: clsx('form__group', className, isHidden && 'form__group_hidden'),
|
|
1497
1497
|
"data-tour": dataTour
|
|
1498
1498
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1499
1499
|
className: "form__group-wrapper"
|
|
@@ -1523,19 +1523,19 @@ const Group = /*#__PURE__*/React.memo(function Group(props) {
|
|
|
1523
1523
|
});
|
|
1524
1524
|
});
|
|
1525
1525
|
Group.defaultProps = {
|
|
1526
|
-
inputProps: {},
|
|
1527
|
-
fieldProps: {},
|
|
1528
|
-
type: 'normal',
|
|
1529
|
-
errorMessageTextSize: 's',
|
|
1530
1526
|
errorMessageTextColor: 'errorTextPrimary',
|
|
1527
|
+
errorMessageTextSize: 's',
|
|
1528
|
+
fieldProps: {},
|
|
1529
|
+
inputProps: {},
|
|
1530
|
+
messageTextColor: 'surfaceTextTertiary',
|
|
1531
1531
|
messageTextSize: 's',
|
|
1532
|
-
|
|
1532
|
+
type: 'normal'
|
|
1533
1533
|
};
|
|
1534
1534
|
Group.propTypes = {
|
|
1535
|
-
|
|
1535
|
+
isRequired: PropTypes.bool,
|
|
1536
1536
|
fieldProps: PropTypes.object,
|
|
1537
1537
|
inputProps: PropTypes.object,
|
|
1538
|
-
|
|
1538
|
+
name: PropTypes.string.isRequired
|
|
1539
1539
|
};
|
|
1540
1540
|
|
|
1541
1541
|
const InputField = /*#__PURE__*/React.memo(function InputField(props) {
|
|
@@ -2052,7 +2052,9 @@ const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
|
2052
2052
|
setSelectedOptions(option);
|
|
2053
2053
|
onChangeField(value);
|
|
2054
2054
|
}, [onChangeField]);
|
|
2055
|
-
useEffect(() =>
|
|
2055
|
+
useEffect(() => {
|
|
2056
|
+
setSelectedOptions(defaultValue);
|
|
2057
|
+
}, [defaultValue]);
|
|
2056
2058
|
const {
|
|
2057
2059
|
isErrorState,
|
|
2058
2060
|
isValidState,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/forms",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
4
4
|
"description": "Forms fields, inputs, etc.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,37 +30,37 @@
|
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@itcase/common": "^1.2.
|
|
34
|
-
"@itcase/ui": "^1.2.
|
|
35
|
-
"axios": "^1.7.
|
|
33
|
+
"@itcase/common": "^1.2.17",
|
|
34
|
+
"@itcase/ui": "^1.2.34",
|
|
35
|
+
"axios": "^1.7.9",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"final-form": "^4.20.10",
|
|
38
38
|
"final-form-focus": "^1.1.2",
|
|
39
|
-
"libphonenumber-js": "^1.11.
|
|
39
|
+
"libphonenumber-js": "^1.11.16",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
41
41
|
"luxon": "^3.5.0",
|
|
42
|
-
"postcss": "^8.4.
|
|
42
|
+
"postcss": "^8.4.49",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"react": "^18.3.1",
|
|
45
45
|
"react-date-range": "^2.0.1",
|
|
46
46
|
"react-datepicker": "^7.5.0",
|
|
47
47
|
"react-dom": "^18.3.1",
|
|
48
|
-
"react-dropzone": "^14.
|
|
48
|
+
"react-dropzone": "^14.3.5",
|
|
49
49
|
"react-final-form": "^6.5.9",
|
|
50
50
|
"react-imask": "^7.6.1",
|
|
51
|
-
"react-select": "^5.8.
|
|
51
|
+
"react-select": "^5.8.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@itcase/lint": "^1.0.
|
|
55
|
-
"@babel/core": "^7.
|
|
54
|
+
"@itcase/lint": "^1.0.33",
|
|
55
|
+
"@babel/core": "^7.26.0",
|
|
56
56
|
"@babel/eslint-parser": "^7.25.9",
|
|
57
|
-
"@babel/preset-env": "^7.
|
|
57
|
+
"@babel/preset-env": "^7.26.0",
|
|
58
58
|
"@babel/preset-react": "^7.25.9",
|
|
59
|
-
"@commitlint/cli": "^19.
|
|
60
|
-
"@commitlint/config-conventional": "^19.
|
|
61
|
-
"@eslint/compat": "^1.2.
|
|
62
|
-
"@eslint/eslintrc": "^3.
|
|
63
|
-
"@ianvs/prettier-plugin-sort-imports": "^4.
|
|
59
|
+
"@commitlint/cli": "^19.6.0",
|
|
60
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
61
|
+
"@eslint/compat": "^1.2.3",
|
|
62
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
63
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
|
|
64
64
|
"@rollup/plugin-babel": "^6.0.4",
|
|
65
65
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
66
66
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -74,21 +74,21 @@
|
|
|
74
74
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
75
75
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
76
76
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
77
|
-
"eslint": "9.
|
|
77
|
+
"eslint": "9.16.0",
|
|
78
78
|
"eslint-config-prettier": "9.1.0",
|
|
79
79
|
"eslint-config-standard": "17.1.0",
|
|
80
80
|
"eslint-plugin-babel": "5.3.1",
|
|
81
81
|
"eslint-plugin-import": "2.31.0",
|
|
82
|
-
"eslint-plugin-n": "17.
|
|
82
|
+
"eslint-plugin-n": "17.14.0",
|
|
83
83
|
"eslint-plugin-node": "11.1.0",
|
|
84
84
|
"eslint-plugin-prettier": "5.2.1",
|
|
85
|
-
"eslint-plugin-promise": "7.1
|
|
85
|
+
"eslint-plugin-promise": "7.2.1",
|
|
86
86
|
"eslint-plugin-react": "7.37.2",
|
|
87
87
|
"eslint-plugin-react-hooks": "5.0.0",
|
|
88
88
|
"eslint-plugin-standard": "5.0.0",
|
|
89
|
-
"husky": "^9.1.
|
|
89
|
+
"husky": "^9.1.7",
|
|
90
90
|
"lint-staged": "^15.2.10",
|
|
91
|
-
"npm": "^10.9.
|
|
91
|
+
"npm": "^10.9.1",
|
|
92
92
|
"postcss-aspect-ratio-polyfill": "^2.0.0",
|
|
93
93
|
"postcss-cli": "^11.0.0",
|
|
94
94
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|
|
@@ -102,22 +102,22 @@
|
|
|
102
102
|
"postcss-import": "^16.1.0",
|
|
103
103
|
"postcss-import-ext-glob": "^2.1.1",
|
|
104
104
|
"postcss-mixins": "^11.0.3",
|
|
105
|
-
"postcss-nested": "^
|
|
105
|
+
"postcss-nested": "^7.0.2",
|
|
106
106
|
"postcss-nested-ancestors": "^3.0.0",
|
|
107
107
|
"postcss-normalize": "^13.0.1",
|
|
108
108
|
"postcss-prepend-imports": "^1.0.1",
|
|
109
|
-
"postcss-preset-env": "^10.
|
|
109
|
+
"postcss-preset-env": "^10.1.1",
|
|
110
110
|
"postcss-pxtorem": "^6.1.0",
|
|
111
111
|
"postcss-responsive-type": "github:ITCase/postcss-responsive-type",
|
|
112
112
|
"postcss-sort-media-queries": "^5.2.0",
|
|
113
|
-
"prettier": "3.
|
|
114
|
-
"rollup": "^4.
|
|
113
|
+
"prettier": "3.4.2",
|
|
114
|
+
"rollup": "^4.28.0",
|
|
115
115
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
116
|
-
"semantic-release": "^24.
|
|
117
|
-
"stylelint": "^16.
|
|
116
|
+
"semantic-release": "^24.2.0",
|
|
117
|
+
"stylelint": "^16.11.0",
|
|
118
118
|
"stylelint-config-standard": "^36.0.1",
|
|
119
|
-
"stylelint-no-unsupported-browser-features": "^8.0.
|
|
119
|
+
"stylelint-no-unsupported-browser-features": "^8.0.2",
|
|
120
120
|
"stylelint-order": "^6.0.4",
|
|
121
|
-
"typescript": "^5.
|
|
121
|
+
"typescript": "^5.7.2"
|
|
122
122
|
}
|
|
123
123
|
}
|