@itcase/forms 1.1.14 → 1.1.16

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.
@@ -12,6 +12,18 @@
12
12
  &_type_row.&_hidden {
13
13
  visibility: hidden;
14
14
  }
15
+ &_column {
16
+ @each $count in 2, 3, 4, 5 {
17
+ &_$(count) {
18
+ ^^&-items {
19
+ display: grid;
20
+ column-gap: 24px;
21
+ grid-template-columns: repeat($(count), 1fr);
22
+ align-items: end;
23
+ }
24
+ }
25
+ }
26
+ }
15
27
  &-wrapper {
16
28
  display: flex;
17
29
  flex-flow: column nowrap;
@@ -1380,6 +1380,13 @@ const FileInput = /*#__PURE__*/React__default.default.memo(function FileInput(pr
1380
1380
  });
1381
1381
  });
1382
1382
 
1383
+ const defaultGroupProps = {
1384
+ width: 'fill',
1385
+ labelTextColor: 'surfaceTextPrimary',
1386
+ labelTextSize: 'h5',
1387
+ labelTextWeight: 500
1388
+ };
1389
+
1383
1390
  const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
1384
1391
  const {
1385
1392
  className,
@@ -1389,7 +1396,12 @@ const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
1389
1396
  labelTextSize,
1390
1397
  labelTextWeight,
1391
1398
  message,
1399
+ column,
1392
1400
  dataTour,
1401
+ title,
1402
+ titleTextSize,
1403
+ titleTextColor,
1404
+ titleTextWeight,
1393
1405
  messageTextColor = 'surfaceTextTertiary',
1394
1406
  messageTextSize = 's',
1395
1407
  messageTextWeight,
@@ -1426,13 +1438,19 @@ const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
1426
1438
  validationStateKey: isErrorState ? errorKey : 'success'
1427
1439
  });
1428
1440
  return /*#__PURE__*/React__default.default.createElement("div", {
1429
- className: clsx__default.default('form__group', className, isHidden && 'form__group_hidden'),
1441
+ className: clsx__default.default('form__group', className, isHidden && 'form__group_hidden', column && `form__group_column_${column}`),
1430
1442
  "data-tour": dataTour
1431
1443
  }, /*#__PURE__*/React__default.default.createElement("div", {
1432
1444
  className: "form__group-wrapper"
1433
- }, before, label && /*#__PURE__*/React__default.default.createElement("div", {
1434
- className: "form__group-label"
1445
+ }, before, title && /*#__PURE__*/React__default.default.createElement("div", {
1446
+ className: "form__group-title"
1435
1447
  }, /*#__PURE__*/React__default.default.createElement(Title.Title, {
1448
+ size: titleTextSize,
1449
+ textColor: titleTextColor,
1450
+ textWeight: titleTextWeight
1451
+ }, title)), label && /*#__PURE__*/React__default.default.createElement("div", {
1452
+ className: "form__group-label"
1453
+ }, /*#__PURE__*/React__default.default.createElement(Text.Text, {
1436
1454
  size: labelTextSize,
1437
1455
  textColor: labelTextColor,
1438
1456
  textWeight: labelTextWeight
@@ -3089,6 +3107,7 @@ exports.defaultCodeProps = defaultCodeProps;
3089
3107
  exports.defaultDatepickerProps = defaultDatepickerProps;
3090
3108
  exports.defaultDropzoneProps = defaultDropzoneProps;
3091
3109
  exports.defaultFieldProps = defaultFieldProps;
3110
+ exports.defaultGroupProps = defaultGroupProps;
3092
3111
  exports.defaultInputProps = defaultInputProps;
3093
3112
  exports.defaultRadioProps = defaultRadioProps;
3094
3113
  exports.defaultSegmentedProps = defaultSegmentedProps;
@@ -1369,6 +1369,13 @@ const FileInput = /*#__PURE__*/React$1.memo(function FileInput(props) {
1369
1369
  });
1370
1370
  });
1371
1371
 
1372
+ const defaultGroupProps = {
1373
+ width: 'fill',
1374
+ labelTextColor: 'surfaceTextPrimary',
1375
+ labelTextSize: 'h5',
1376
+ labelTextWeight: 500
1377
+ };
1378
+
1372
1379
  const Group = /*#__PURE__*/React$1.memo(function Group(props) {
1373
1380
  const {
1374
1381
  className,
@@ -1378,7 +1385,12 @@ const Group = /*#__PURE__*/React$1.memo(function Group(props) {
1378
1385
  labelTextSize,
1379
1386
  labelTextWeight,
1380
1387
  message,
1388
+ column,
1381
1389
  dataTour,
1390
+ title,
1391
+ titleTextSize,
1392
+ titleTextColor,
1393
+ titleTextWeight,
1382
1394
  messageTextColor = 'surfaceTextTertiary',
1383
1395
  messageTextSize = 's',
1384
1396
  messageTextWeight,
@@ -1415,13 +1427,19 @@ const Group = /*#__PURE__*/React$1.memo(function Group(props) {
1415
1427
  validationStateKey: isErrorState ? errorKey : 'success'
1416
1428
  });
1417
1429
  return /*#__PURE__*/React$1.createElement("div", {
1418
- className: clsx('form__group', className, isHidden && 'form__group_hidden'),
1430
+ className: clsx('form__group', className, isHidden && 'form__group_hidden', column && `form__group_column_${column}`),
1419
1431
  "data-tour": dataTour
1420
1432
  }, /*#__PURE__*/React$1.createElement("div", {
1421
1433
  className: "form__group-wrapper"
1422
- }, before, label && /*#__PURE__*/React$1.createElement("div", {
1423
- className: "form__group-label"
1434
+ }, before, title && /*#__PURE__*/React$1.createElement("div", {
1435
+ className: "form__group-title"
1424
1436
  }, /*#__PURE__*/React$1.createElement(Title, {
1437
+ size: titleTextSize,
1438
+ textColor: titleTextColor,
1439
+ textWeight: titleTextWeight
1440
+ }, title)), label && /*#__PURE__*/React$1.createElement("div", {
1441
+ className: "form__group-label"
1442
+ }, /*#__PURE__*/React$1.createElement(Text, {
1425
1443
  size: labelTextSize,
1426
1444
  textColor: labelTextColor,
1427
1445
  textWeight: labelTextWeight
@@ -3038,4 +3056,4 @@ const getErrorsForFinalForm = error => {
3038
3056
  return formErrors;
3039
3057
  };
3040
3058
 
3041
- export { CheckboxField, ChipsField, ChoiceField, CodeField, CustomField, DEFAULT_MESSAGES_FIELDS, DatePickerField, FieldWrapper, FieldWrapperBase, FileInput, FinalForm, Group, InputField, MaskedInputField, RadioGroup, SegmentedField, SelectField, SwitchField, TextareaField, addRequiredFieldsParamToSchema, dateValidation, defaultCheckboxProps, defaultChipsProps, defaultChoiceProps, defaultCodeProps, defaultDatepickerProps, defaultDropzoneProps, defaultFieldProps, defaultInputProps, defaultRadioProps, defaultSegmentedProps, defaultSelectProps, defaultSwitchProps, defaultTextareaProps, emailValidation, focusOnError, focusOnErrorDecorator, formTypes, generateField, getErrorsForFinalForm, parseNumericField, phoneValidation, sendFormDataToServer, setErrorsMutator, useYupValidationSchema };
3059
+ export { CheckboxField, ChipsField, ChoiceField, CodeField, CustomField, DEFAULT_MESSAGES_FIELDS, DatePickerField, FieldWrapper, FieldWrapperBase, FileInput, FinalForm, Group, InputField, MaskedInputField, RadioGroup, SegmentedField, SelectField, SwitchField, TextareaField, addRequiredFieldsParamToSchema, dateValidation, defaultCheckboxProps, defaultChipsProps, defaultChoiceProps, defaultCodeProps, defaultDatepickerProps, defaultDropzoneProps, defaultFieldProps, defaultGroupProps, defaultInputProps, defaultRadioProps, defaultSegmentedProps, defaultSelectProps, defaultSwitchProps, defaultTextareaProps, emailValidation, focusOnError, focusOnErrorDecorator, formTypes, generateField, getErrorsForFinalForm, parseNumericField, phoneValidation, sendFormDataToServer, setErrorsMutator, useYupValidationSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/forms",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "Forms fields, inputs, etc.",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -32,14 +32,14 @@
32
32
  "registry": "https://registry.npmjs.org/"
33
33
  },
34
34
  "dependencies": {
35
- "@itcase/common": "^1.2.26",
36
- "@itcase/config": "^1.0.47",
37
- "@itcase/icons": "^1.1.1",
38
- "@itcase/storybook-config": "^1.1.13",
35
+ "@itcase/common": "^1.2.28",
36
+ "@itcase/config": "^1.0.48",
37
+ "@itcase/icons": "^1.1.4",
38
+ "@itcase/storybook-config": "^1.1.14",
39
39
  "@itcase/tokens-am": "^1.1.9",
40
40
  "@itcase/tokens-baikal": "^1.1.9",
41
- "@itcase/ui": "^1.8.21",
42
- "axios": "^1.9.0",
41
+ "@itcase/ui": "^1.8.31",
42
+ "axios": "^1.10.0",
43
43
  "clsx": "^2.1.1",
44
44
  "final-form": "4.20.10",
45
45
  "final-form-focus": "1.1.2",
@@ -56,7 +56,7 @@
56
56
  "react-select": "^5.10.1"
57
57
  },
58
58
  "devDependencies": {
59
- "@itcase/lint": "^1.1.10",
59
+ "@itcase/lint": "^1.1.18",
60
60
  "@babel/core": "^7.27.4",
61
61
  "@babel/eslint-parser": "^7.27.5",
62
62
  "@babel/preset-env": "^7.27.2",
@@ -64,7 +64,7 @@
64
64
  "@commitlint/cli": "^19.8.1",
65
65
  "@commitlint/config-conventional": "^19.8.1",
66
66
  "@rollup/plugin-babel": "^6.0.4",
67
- "@rollup/plugin-commonjs": "^28.0.3",
67
+ "@rollup/plugin-commonjs": "^28.0.6",
68
68
  "@rollup/plugin-json": "^6.1.0",
69
69
  "@rollup/plugin-node-resolve": "^16.0.1",
70
70
  "@rollup/plugin-terser": "^0.4.4",
@@ -76,15 +76,15 @@
76
76
  "babel-plugin-inline-react-svg": "^2.0.2",
77
77
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
78
78
  "conventional-changelog-conventionalcommits": "^9.0.0",
79
- "eslint": "9.28.0",
79
+ "eslint": "9.29.0",
80
80
  "husky": "^9.1.7",
81
- "lint-staged": "^16.1.0",
82
- "postcss": "^8.5.4",
81
+ "lint-staged": "^16.1.2",
82
+ "postcss": "^8.5.6",
83
83
  "prettier": "3.5.3",
84
- "rollup": "^4.42.0",
84
+ "rollup": "^4.44.0",
85
85
  "rollup-plugin-peer-deps-external": "^2.2.4",
86
86
  "semantic-release": "^24.2.5",
87
- "stylelint": "^16.20.0",
87
+ "stylelint": "^16.21.0",
88
88
  "typescript": "^5.8.3",
89
89
  "yup": "^1.6.1"
90
90
  }