@itcase/forms 1.0.43 → 1.0.45
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/itcase-forms.cjs.js +41 -34
- package/dist/itcase-forms.esm.js +38 -31
- package/package.json +24 -24
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -158,6 +158,7 @@ function FieldWrapperBase(props) {
|
|
|
158
158
|
metaValid,
|
|
159
159
|
set,
|
|
160
160
|
type,
|
|
161
|
+
labelHidden,
|
|
161
162
|
hideMessage,
|
|
162
163
|
isHidden,
|
|
163
164
|
tag: Tag,
|
|
@@ -214,14 +215,14 @@ function FieldWrapperBase(props) {
|
|
|
214
215
|
className: clsx__default.default(formFieldClass, 'form__item', 'form-field', type && `form-field_type_${type}`, set && `form-field_set_${set}`, sizeClass, fillClass, shapeClass, isHidden && `form-field_state_hidden`, directionClass, widthClass),
|
|
215
216
|
"data-tour": dataTour,
|
|
216
217
|
style: formFieldStyles
|
|
217
|
-
}, before, label && /*#__PURE__*/React__default.default.createElement("div", {
|
|
218
|
+
}, before, (label || labelHidden) && /*#__PURE__*/React__default.default.createElement("div", {
|
|
218
219
|
htmlFor: id,
|
|
219
|
-
className:
|
|
220
|
+
className: clsx__default.default('form-field__label')
|
|
220
221
|
}, /*#__PURE__*/React__default.default.createElement(Text.Text, {
|
|
221
222
|
size: labelTextSize,
|
|
222
223
|
textWeight: labelTextWidth,
|
|
223
224
|
textColor: labelTextColor
|
|
224
|
-
}, label)), desc && /*#__PURE__*/React__default.default.createElement("div", {
|
|
225
|
+
}, label, labelHidden && '\u00A0')), desc && /*#__PURE__*/React__default.default.createElement("div", {
|
|
225
226
|
className: "form-field__desc"
|
|
226
227
|
}, /*#__PURE__*/React__default.default.createElement(Text.Text, {
|
|
227
228
|
size: descTextSize,
|
|
@@ -410,22 +411,25 @@ CheckboxField.propTypes = {
|
|
|
410
411
|
|
|
411
412
|
const ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceField(props) {
|
|
412
413
|
const {
|
|
413
|
-
options,
|
|
414
414
|
classNameGroupItem,
|
|
415
415
|
fieldProps,
|
|
416
|
+
hideMessage,
|
|
417
|
+
initialValue,
|
|
416
418
|
inputProps,
|
|
417
419
|
isMultiple,
|
|
418
420
|
isRequired,
|
|
419
|
-
initialValue,
|
|
420
421
|
label,
|
|
421
|
-
name,
|
|
422
422
|
messageType,
|
|
423
|
-
|
|
423
|
+
name,
|
|
424
|
+
options,
|
|
424
425
|
placeholder
|
|
425
426
|
} = props;
|
|
426
427
|
const {
|
|
427
428
|
change
|
|
428
429
|
} = reactFinalForm.useForm();
|
|
430
|
+
const setActiveSegment = React.useCallback((option, isChecked) => {
|
|
431
|
+
change(name, isChecked && option.value);
|
|
432
|
+
}, [change]);
|
|
429
433
|
return /*#__PURE__*/React__default.default.createElement(reactFinalForm.Field, {
|
|
430
434
|
name: name,
|
|
431
435
|
initialValue: initialValue
|
|
@@ -444,9 +448,6 @@ const ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceFiel
|
|
|
444
448
|
}
|
|
445
449
|
return emptyOption;
|
|
446
450
|
}, [input.value]);
|
|
447
|
-
const setActiveSegment = React.useCallback(option => {
|
|
448
|
-
change(name, option.value);
|
|
449
|
-
}, [change]);
|
|
450
451
|
return /*#__PURE__*/React__default.default.createElement(FieldWrapper, Object.assign({
|
|
451
452
|
className: clsx__default.default('form-field_type_choice', 'form__item_type_choice', classNameGroupItem),
|
|
452
453
|
fieldClassName: "form-choice",
|
|
@@ -466,7 +467,7 @@ const ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceFiel
|
|
|
466
467
|
}, fieldProps), /*#__PURE__*/React__default.default.createElement(Choice.Choice, Object.assign({
|
|
467
468
|
className: clsx__default.default(meta.active && 'form-choice_state_focus', meta.error && meta.touched && 'form-choice_state_error'),
|
|
468
469
|
options: options,
|
|
469
|
-
|
|
470
|
+
name: input.name,
|
|
470
471
|
inputValue: input.value || [],
|
|
471
472
|
isMultiple: isMultiple,
|
|
472
473
|
isRequired: isRequired,
|
|
@@ -477,13 +478,20 @@ const ChoiceField = /*#__PURE__*/React__default.default.memo(function ChoiceFiel
|
|
|
477
478
|
});
|
|
478
479
|
});
|
|
479
480
|
ChoiceField.propTypes = {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
481
|
+
classNameGroupItem: PropTypes__default.default.string,
|
|
482
|
+
fieldProps: PropTypes__default.default.object,
|
|
483
|
+
hideMessage: PropTypes__default.default.bool,
|
|
484
|
+
initialValue: PropTypes__default.default.string,
|
|
485
|
+
inputProps: PropTypes__default.default.object,
|
|
484
486
|
isMultiple: PropTypes__default.default.bool,
|
|
485
487
|
isRequired: PropTypes__default.default.bool,
|
|
486
488
|
label: PropTypes__default.default.string,
|
|
489
|
+
messageType: PropTypes__default.default.string,
|
|
490
|
+
name: PropTypes__default.default.string,
|
|
491
|
+
options: PropTypes__default.default.arrayOf(PropTypes__default.default.shape({
|
|
492
|
+
value: PropTypes__default.default.string,
|
|
493
|
+
label: PropTypes__default.default.string
|
|
494
|
+
})),
|
|
487
495
|
placeholder: PropTypes__default.default.string
|
|
488
496
|
};
|
|
489
497
|
|
|
@@ -706,7 +714,6 @@ async function convertToFiles(inputValue, isPreviews) {
|
|
|
706
714
|
// })
|
|
707
715
|
// }
|
|
708
716
|
}
|
|
709
|
-
|
|
710
717
|
return newFiles;
|
|
711
718
|
}
|
|
712
719
|
function setFileDataURL(file, resolve) {
|
|
@@ -1082,7 +1089,8 @@ const FileInput = /*#__PURE__*/React__default.default.memo(function FileInput(pr
|
|
|
1082
1089
|
isPreviews,
|
|
1083
1090
|
onAddFiles,
|
|
1084
1091
|
onDeleteFile,
|
|
1085
|
-
classNameGroupItem
|
|
1092
|
+
classNameGroupItem,
|
|
1093
|
+
width
|
|
1086
1094
|
} = props;
|
|
1087
1095
|
return /*#__PURE__*/React__default.default.createElement(reactFinalForm.Field, {
|
|
1088
1096
|
name: name
|
|
@@ -1104,7 +1112,8 @@ const FileInput = /*#__PURE__*/React__default.default.memo(function FileInput(pr
|
|
|
1104
1112
|
metaSubmitFailed: meta.submitFailed,
|
|
1105
1113
|
metaTouched: meta.touched,
|
|
1106
1114
|
metaValid: meta.valid,
|
|
1107
|
-
hideMessage: hideMessage
|
|
1115
|
+
hideMessage: hideMessage,
|
|
1116
|
+
width: width
|
|
1108
1117
|
}, fieldProps), /*#__PURE__*/React__default.default.createElement(FileInputDropzone, {
|
|
1109
1118
|
dropzoneProps: dropzoneProps,
|
|
1110
1119
|
hintDescription: hintDescription,
|
|
@@ -1638,7 +1647,6 @@ function getDefaultValue(options, selectValue) {
|
|
|
1638
1647
|
const SelectField = /*#__PURE__*/React__default.default.memo(function SelectField(props) {
|
|
1639
1648
|
const {
|
|
1640
1649
|
isRequired,
|
|
1641
|
-
key,
|
|
1642
1650
|
name,
|
|
1643
1651
|
options,
|
|
1644
1652
|
fieldProps,
|
|
@@ -1654,12 +1662,6 @@ const SelectField = /*#__PURE__*/React__default.default.memo(function SelectFiel
|
|
|
1654
1662
|
input,
|
|
1655
1663
|
meta
|
|
1656
1664
|
}) => {
|
|
1657
|
-
const onChangeField = React.useCallback(value => {
|
|
1658
|
-
input.onChange(value);
|
|
1659
|
-
if (onChange) {
|
|
1660
|
-
onChange(value, input.name);
|
|
1661
|
-
}
|
|
1662
|
-
}, [onChange]);
|
|
1663
1665
|
const [selectedOptions, setSelectedOptions] = React.useState(null);
|
|
1664
1666
|
const defaultValue = React.useMemo(() => {
|
|
1665
1667
|
const optionsValues = getDefaultValue(options, input.value);
|
|
@@ -1671,12 +1673,18 @@ const SelectField = /*#__PURE__*/React__default.default.memo(function SelectFiel
|
|
|
1671
1673
|
}
|
|
1672
1674
|
return optionsValues;
|
|
1673
1675
|
}, [input.value]);
|
|
1674
|
-
React.
|
|
1676
|
+
const onChangeField = React.useCallback(value => {
|
|
1677
|
+
input.onChange(value);
|
|
1678
|
+
if (onChange) {
|
|
1679
|
+
onChange(value, input.name);
|
|
1680
|
+
}
|
|
1681
|
+
}, [onChange]);
|
|
1675
1682
|
const onChangeValue = React.useCallback((option, actionMeta) => {
|
|
1676
1683
|
const value = Array.isArray(option) ? option.map(o => o.value) : option?.value || null;
|
|
1677
1684
|
setSelectedOptions(option);
|
|
1678
1685
|
onChangeField(value);
|
|
1679
1686
|
}, [onChangeField]);
|
|
1687
|
+
React.useEffect(() => setSelectedOptions(defaultValue), [defaultValue]);
|
|
1680
1688
|
return /*#__PURE__*/React__default.default.createElement(FieldWrapper, Object.assign({
|
|
1681
1689
|
className: clsx__default.default('form-field_type_select', 'form__item_type_select', classNameGroupItem),
|
|
1682
1690
|
fieldClassName: 'form-select',
|
|
@@ -1697,8 +1705,7 @@ const SelectField = /*#__PURE__*/React__default.default.memo(function SelectFiel
|
|
|
1697
1705
|
value: selectedOptions,
|
|
1698
1706
|
onChange: onChangeValue,
|
|
1699
1707
|
options: options,
|
|
1700
|
-
ref: selectRef
|
|
1701
|
-
key: key
|
|
1708
|
+
ref: selectRef
|
|
1702
1709
|
}, selectProps)));
|
|
1703
1710
|
});
|
|
1704
1711
|
});
|
|
@@ -2261,7 +2268,7 @@ FinalForm.propTypes = {
|
|
|
2261
2268
|
descriptionSize: PropTypes__default.default.string,
|
|
2262
2269
|
descriptionTextColor: PropTypes__default.default.string,
|
|
2263
2270
|
descriptionTextWeight: PropTypes__default.default.string,
|
|
2264
|
-
disableFieldsAutoComplete: PropTypes__default.default.
|
|
2271
|
+
disableFieldsAutoComplete: PropTypes__default.default.bool,
|
|
2265
2272
|
fieldsGap: PropTypes__default.default.string,
|
|
2266
2273
|
formName: PropTypes__default.default.string,
|
|
2267
2274
|
initialValues: PropTypes__default.default.any,
|
|
@@ -2273,10 +2280,10 @@ FinalForm.propTypes = {
|
|
|
2273
2280
|
onChangeFormValues: PropTypes__default.default.func,
|
|
2274
2281
|
onClickSecondaryButton: PropTypes__default.default.func,
|
|
2275
2282
|
onSubmit: PropTypes__default.default.func,
|
|
2276
|
-
primaryButton: PropTypes__default.default.string,
|
|
2283
|
+
primaryButton: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]),
|
|
2277
2284
|
primaryButtonFill: PropTypes__default.default.string,
|
|
2278
2285
|
primaryButtonLabel: PropTypes__default.default.string,
|
|
2279
|
-
secondaryButton: PropTypes__default.default.string,
|
|
2286
|
+
secondaryButton: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]),
|
|
2280
2287
|
secondaryButtonFill: PropTypes__default.default.string,
|
|
2281
2288
|
secondaryButtonLabel: PropTypes__default.default.string,
|
|
2282
2289
|
set: PropTypes__default.default.string,
|
|
@@ -2299,15 +2306,15 @@ FinalForm.defaultProps = {
|
|
|
2299
2306
|
disableFieldsAutoComplete: false
|
|
2300
2307
|
};
|
|
2301
2308
|
|
|
2302
|
-
Object.defineProperty(exports,
|
|
2309
|
+
Object.defineProperty(exports, "Field", {
|
|
2303
2310
|
enumerable: true,
|
|
2304
2311
|
get: function () { return reactFinalForm.Field; }
|
|
2305
2312
|
});
|
|
2306
|
-
Object.defineProperty(exports,
|
|
2313
|
+
Object.defineProperty(exports, "useForm", {
|
|
2307
2314
|
enumerable: true,
|
|
2308
2315
|
get: function () { return reactFinalForm.useForm; }
|
|
2309
2316
|
});
|
|
2310
|
-
Object.defineProperty(exports,
|
|
2317
|
+
Object.defineProperty(exports, "useFormState", {
|
|
2311
2318
|
enumerable: true,
|
|
2312
2319
|
get: function () { return reactFinalForm.useFormState; }
|
|
2313
2320
|
});
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -148,6 +148,7 @@ function FieldWrapperBase(props) {
|
|
|
148
148
|
metaValid,
|
|
149
149
|
set,
|
|
150
150
|
type,
|
|
151
|
+
labelHidden,
|
|
151
152
|
hideMessage,
|
|
152
153
|
isHidden,
|
|
153
154
|
tag: Tag,
|
|
@@ -204,14 +205,14 @@ function FieldWrapperBase(props) {
|
|
|
204
205
|
className: clsx(formFieldClass, 'form__item', 'form-field', type && `form-field_type_${type}`, set && `form-field_set_${set}`, sizeClass, fillClass, shapeClass, isHidden && `form-field_state_hidden`, directionClass, widthClass),
|
|
205
206
|
"data-tour": dataTour,
|
|
206
207
|
style: formFieldStyles
|
|
207
|
-
}, before, label && /*#__PURE__*/React.createElement("div", {
|
|
208
|
+
}, before, (label || labelHidden) && /*#__PURE__*/React.createElement("div", {
|
|
208
209
|
htmlFor: id,
|
|
209
|
-
className:
|
|
210
|
+
className: clsx('form-field__label')
|
|
210
211
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
211
212
|
size: labelTextSize,
|
|
212
213
|
textWeight: labelTextWidth,
|
|
213
214
|
textColor: labelTextColor
|
|
214
|
-
}, label)), desc && /*#__PURE__*/React.createElement("div", {
|
|
215
|
+
}, label, labelHidden && '\u00A0')), desc && /*#__PURE__*/React.createElement("div", {
|
|
215
216
|
className: "form-field__desc"
|
|
216
217
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
217
218
|
size: descTextSize,
|
|
@@ -400,22 +401,25 @@ CheckboxField.propTypes = {
|
|
|
400
401
|
|
|
401
402
|
const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
402
403
|
const {
|
|
403
|
-
options,
|
|
404
404
|
classNameGroupItem,
|
|
405
405
|
fieldProps,
|
|
406
|
+
hideMessage,
|
|
407
|
+
initialValue,
|
|
406
408
|
inputProps,
|
|
407
409
|
isMultiple,
|
|
408
410
|
isRequired,
|
|
409
|
-
initialValue,
|
|
410
411
|
label,
|
|
411
|
-
name,
|
|
412
412
|
messageType,
|
|
413
|
-
|
|
413
|
+
name,
|
|
414
|
+
options,
|
|
414
415
|
placeholder
|
|
415
416
|
} = props;
|
|
416
417
|
const {
|
|
417
418
|
change
|
|
418
419
|
} = useForm();
|
|
420
|
+
const setActiveSegment = useCallback((option, isChecked) => {
|
|
421
|
+
change(name, isChecked && option.value);
|
|
422
|
+
}, [change]);
|
|
419
423
|
return /*#__PURE__*/React.createElement(Field, {
|
|
420
424
|
name: name,
|
|
421
425
|
initialValue: initialValue
|
|
@@ -434,9 +438,6 @@ const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
434
438
|
}
|
|
435
439
|
return emptyOption;
|
|
436
440
|
}, [input.value]);
|
|
437
|
-
const setActiveSegment = useCallback(option => {
|
|
438
|
-
change(name, option.value);
|
|
439
|
-
}, [change]);
|
|
440
441
|
return /*#__PURE__*/React.createElement(FieldWrapper, Object.assign({
|
|
441
442
|
className: clsx('form-field_type_choice', 'form__item_type_choice', classNameGroupItem),
|
|
442
443
|
fieldClassName: "form-choice",
|
|
@@ -456,7 +457,7 @@ const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
456
457
|
}, fieldProps), /*#__PURE__*/React.createElement(Choice, Object.assign({
|
|
457
458
|
className: clsx(meta.active && 'form-choice_state_focus', meta.error && meta.touched && 'form-choice_state_error'),
|
|
458
459
|
options: options,
|
|
459
|
-
|
|
460
|
+
name: input.name,
|
|
460
461
|
inputValue: input.value || [],
|
|
461
462
|
isMultiple: isMultiple,
|
|
462
463
|
isRequired: isRequired,
|
|
@@ -467,13 +468,20 @@ const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
467
468
|
});
|
|
468
469
|
});
|
|
469
470
|
ChoiceField.propTypes = {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
classNameGroupItem: PropTypes.string,
|
|
472
|
+
fieldProps: PropTypes.object,
|
|
473
|
+
hideMessage: PropTypes.bool,
|
|
474
|
+
initialValue: PropTypes.string,
|
|
475
|
+
inputProps: PropTypes.object,
|
|
474
476
|
isMultiple: PropTypes.bool,
|
|
475
477
|
isRequired: PropTypes.bool,
|
|
476
478
|
label: PropTypes.string,
|
|
479
|
+
messageType: PropTypes.string,
|
|
480
|
+
name: PropTypes.string,
|
|
481
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
482
|
+
value: PropTypes.string,
|
|
483
|
+
label: PropTypes.string
|
|
484
|
+
})),
|
|
477
485
|
placeholder: PropTypes.string
|
|
478
486
|
};
|
|
479
487
|
|
|
@@ -696,7 +704,6 @@ async function convertToFiles(inputValue, isPreviews) {
|
|
|
696
704
|
// })
|
|
697
705
|
// }
|
|
698
706
|
}
|
|
699
|
-
|
|
700
707
|
return newFiles;
|
|
701
708
|
}
|
|
702
709
|
function setFileDataURL(file, resolve) {
|
|
@@ -1072,7 +1079,8 @@ const FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
|
|
|
1072
1079
|
isPreviews,
|
|
1073
1080
|
onAddFiles,
|
|
1074
1081
|
onDeleteFile,
|
|
1075
|
-
classNameGroupItem
|
|
1082
|
+
classNameGroupItem,
|
|
1083
|
+
width
|
|
1076
1084
|
} = props;
|
|
1077
1085
|
return /*#__PURE__*/React.createElement(Field, {
|
|
1078
1086
|
name: name
|
|
@@ -1094,7 +1102,8 @@ const FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
|
|
|
1094
1102
|
metaSubmitFailed: meta.submitFailed,
|
|
1095
1103
|
metaTouched: meta.touched,
|
|
1096
1104
|
metaValid: meta.valid,
|
|
1097
|
-
hideMessage: hideMessage
|
|
1105
|
+
hideMessage: hideMessage,
|
|
1106
|
+
width: width
|
|
1098
1107
|
}, fieldProps), /*#__PURE__*/React.createElement(FileInputDropzone, {
|
|
1099
1108
|
dropzoneProps: dropzoneProps,
|
|
1100
1109
|
hintDescription: hintDescription,
|
|
@@ -1628,7 +1637,6 @@ function getDefaultValue(options, selectValue) {
|
|
|
1628
1637
|
const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
1629
1638
|
const {
|
|
1630
1639
|
isRequired,
|
|
1631
|
-
key,
|
|
1632
1640
|
name,
|
|
1633
1641
|
options,
|
|
1634
1642
|
fieldProps,
|
|
@@ -1644,12 +1652,6 @@ const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
|
1644
1652
|
input,
|
|
1645
1653
|
meta
|
|
1646
1654
|
}) => {
|
|
1647
|
-
const onChangeField = useCallback(value => {
|
|
1648
|
-
input.onChange(value);
|
|
1649
|
-
if (onChange) {
|
|
1650
|
-
onChange(value, input.name);
|
|
1651
|
-
}
|
|
1652
|
-
}, [onChange]);
|
|
1653
1655
|
const [selectedOptions, setSelectedOptions] = useState(null);
|
|
1654
1656
|
const defaultValue = useMemo(() => {
|
|
1655
1657
|
const optionsValues = getDefaultValue(options, input.value);
|
|
@@ -1661,12 +1663,18 @@ const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
|
1661
1663
|
}
|
|
1662
1664
|
return optionsValues;
|
|
1663
1665
|
}, [input.value]);
|
|
1664
|
-
|
|
1666
|
+
const onChangeField = useCallback(value => {
|
|
1667
|
+
input.onChange(value);
|
|
1668
|
+
if (onChange) {
|
|
1669
|
+
onChange(value, input.name);
|
|
1670
|
+
}
|
|
1671
|
+
}, [onChange]);
|
|
1665
1672
|
const onChangeValue = useCallback((option, actionMeta) => {
|
|
1666
1673
|
const value = Array.isArray(option) ? option.map(o => o.value) : option?.value || null;
|
|
1667
1674
|
setSelectedOptions(option);
|
|
1668
1675
|
onChangeField(value);
|
|
1669
1676
|
}, [onChangeField]);
|
|
1677
|
+
useEffect(() => setSelectedOptions(defaultValue), [defaultValue]);
|
|
1670
1678
|
return /*#__PURE__*/React.createElement(FieldWrapper, Object.assign({
|
|
1671
1679
|
className: clsx('form-field_type_select', 'form__item_type_select', classNameGroupItem),
|
|
1672
1680
|
fieldClassName: 'form-select',
|
|
@@ -1687,8 +1695,7 @@ const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
|
1687
1695
|
value: selectedOptions,
|
|
1688
1696
|
onChange: onChangeValue,
|
|
1689
1697
|
options: options,
|
|
1690
|
-
ref: selectRef
|
|
1691
|
-
key: key
|
|
1698
|
+
ref: selectRef
|
|
1692
1699
|
}, selectProps)));
|
|
1693
1700
|
});
|
|
1694
1701
|
});
|
|
@@ -2251,7 +2258,7 @@ FinalForm.propTypes = {
|
|
|
2251
2258
|
descriptionSize: PropTypes.string,
|
|
2252
2259
|
descriptionTextColor: PropTypes.string,
|
|
2253
2260
|
descriptionTextWeight: PropTypes.string,
|
|
2254
|
-
disableFieldsAutoComplete: PropTypes.
|
|
2261
|
+
disableFieldsAutoComplete: PropTypes.bool,
|
|
2255
2262
|
fieldsGap: PropTypes.string,
|
|
2256
2263
|
formName: PropTypes.string,
|
|
2257
2264
|
initialValues: PropTypes.any,
|
|
@@ -2263,10 +2270,10 @@ FinalForm.propTypes = {
|
|
|
2263
2270
|
onChangeFormValues: PropTypes.func,
|
|
2264
2271
|
onClickSecondaryButton: PropTypes.func,
|
|
2265
2272
|
onSubmit: PropTypes.func,
|
|
2266
|
-
primaryButton: PropTypes.string,
|
|
2273
|
+
primaryButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
2267
2274
|
primaryButtonFill: PropTypes.string,
|
|
2268
2275
|
primaryButtonLabel: PropTypes.string,
|
|
2269
|
-
secondaryButton: PropTypes.string,
|
|
2276
|
+
secondaryButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
2270
2277
|
secondaryButtonFill: PropTypes.string,
|
|
2271
2278
|
secondaryButtonLabel: PropTypes.string,
|
|
2272
2279
|
set: PropTypes.string,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/forms",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "Forms fields, inputs, etc.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@itcase/common": "^1.1.10",
|
|
34
|
-
"@itcase/ui": "^1.0.
|
|
34
|
+
"@itcase/ui": "^1.0.84",
|
|
35
35
|
"axios": "^1.6.2",
|
|
36
36
|
"clsx": "^2.0.0",
|
|
37
37
|
"date-fns": "2.0.0-alpha.7",
|
|
38
38
|
"final-form": "^4.20.10",
|
|
39
39
|
"final-form-focus": "^1.1.2",
|
|
40
|
-
"libphonenumber-js": "^1.10.
|
|
40
|
+
"libphonenumber-js": "^1.10.51",
|
|
41
41
|
"lodash": "^4.17.21",
|
|
42
42
|
"luxon": "^3.4.4",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
@@ -49,37 +49,37 @@
|
|
|
49
49
|
"react-select": "^5.8.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@babel/core": "^7.23.
|
|
52
|
+
"@babel/core": "^7.23.6",
|
|
53
53
|
"@babel/eslint-parser": "^7.23.3",
|
|
54
|
-
"@babel/preset-env": "^7.23.
|
|
54
|
+
"@babel/preset-env": "^7.23.6",
|
|
55
55
|
"@babel/preset-react": "^7.23.3",
|
|
56
|
-
"@commitlint/cli": "^18.4.
|
|
57
|
-
"@commitlint/config-conventional": "^18.4.
|
|
56
|
+
"@commitlint/cli": "^18.4.3",
|
|
57
|
+
"@commitlint/config-conventional": "^18.4.3",
|
|
58
58
|
"@rollup/plugin-babel": "^6.0.4",
|
|
59
59
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
60
|
-
"@rollup/plugin-json": "^6.0
|
|
60
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
61
61
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
62
62
|
"@rollup/plugin-terser": "^0.4.4",
|
|
63
63
|
"@semantic-release/git": "^10.0.1",
|
|
64
64
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
65
65
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
66
|
-
"eslint": "8.
|
|
67
|
-
"eslint-config-prettier": "^9.
|
|
66
|
+
"eslint": "8.55.0",
|
|
67
|
+
"eslint-config-prettier": "^9.1.0",
|
|
68
68
|
"eslint-config-standard": "^17.1.0",
|
|
69
|
-
"eslint-plugin-import": "^2.29.
|
|
70
|
-
"eslint-plugin-n": "^16.
|
|
69
|
+
"eslint-plugin-import": "^2.29.1",
|
|
70
|
+
"eslint-plugin-n": "^16.4.0",
|
|
71
71
|
"eslint-plugin-prettier": "^5.0.1",
|
|
72
72
|
"eslint-plugin-promise": "^6.1.1",
|
|
73
73
|
"eslint-plugin-react": "^7.33.2",
|
|
74
74
|
"eslint-plugin-standard": "^5.0.0",
|
|
75
75
|
"husky": "^8.0.3",
|
|
76
|
-
"lint-staged": "^15.
|
|
77
|
-
"npm": "^10.2.
|
|
76
|
+
"lint-staged": "^15.2.0",
|
|
77
|
+
"npm": "^10.2.5",
|
|
78
78
|
"postcss-aspect-ratio-polyfill": "^2.0.0",
|
|
79
|
-
"postcss-cli": "^
|
|
79
|
+
"postcss-cli": "^11.0.0",
|
|
80
80
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|
|
81
|
-
"postcss-dark-theme-class": "^1.
|
|
82
|
-
"postcss-discard-duplicates": "^6.0.
|
|
81
|
+
"postcss-dark-theme-class": "^1.1.0",
|
|
82
|
+
"postcss-discard-duplicates": "^6.0.1",
|
|
83
83
|
"postcss-each": "^1.1.0",
|
|
84
84
|
"postcss-easings": "^4.0.0",
|
|
85
85
|
"postcss-extend-rule": "^4.0.0",
|
|
@@ -96,14 +96,14 @@
|
|
|
96
96
|
"postcss-pxtorem": "^6.0.0",
|
|
97
97
|
"postcss-responsive-type": "github:ITCase/postcss-responsive-type",
|
|
98
98
|
"postcss-sort-media-queries": "^5.2.0",
|
|
99
|
-
"prettier": "^3.1.
|
|
100
|
-
"react-datepicker": "^4.
|
|
101
|
-
"rollup": "^4.
|
|
99
|
+
"prettier": "^3.1.1",
|
|
100
|
+
"react-datepicker": "^4.24.0",
|
|
101
|
+
"rollup": "^4.9.0",
|
|
102
102
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
103
|
-
"semantic-release": "^22.0.
|
|
104
|
-
"stylelint": "^
|
|
105
|
-
"stylelint-config-standard": "^
|
|
103
|
+
"semantic-release": "^22.0.12",
|
|
104
|
+
"stylelint": "^16.0.2",
|
|
105
|
+
"stylelint-config-standard": "^35.0.0",
|
|
106
106
|
"stylelint-no-unsupported-browser-features": "^7.0.0",
|
|
107
|
-
"stylelint-order": "^6.0.
|
|
107
|
+
"stylelint-order": "^6.0.4"
|
|
108
108
|
}
|
|
109
109
|
}
|