@gravity-ui/dynamic-forms 5.8.0 → 5.8.1

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.
@@ -27,18 +27,18 @@
27
27
  min-height: var(--df-column-first-row-min-height, 28px);
28
28
  display: flex;
29
29
  margin-bottom: auto;
30
- flex-direction: column;
30
+ flex-direction: row;
31
31
  flex-shrink: 0;
32
32
  }
33
33
  .df-column__first-row-inner {
34
- display: inline;
34
+ flex-grow: 1;
35
35
  margin-top: auto;
36
36
  margin-bottom: auto;
37
37
  }
38
- .df-column__first-row::after {
39
- content: "";
40
- width: 100%;
41
- flex-shrink: 1;
38
+ .df-column__first-row-action {
39
+ padding-left: var(--g-spacing-2);
40
+ margin-top: auto;
41
+ margin-bottom: auto;
42
42
  }
43
43
  .df-column__title {
44
44
  word-break: break-word;
@@ -11,7 +11,7 @@ const common_1 = require("../../../constants/common");
11
11
  const utils_1 = require("../../../utils");
12
12
  const HTMLContent_1 = require("../../HTMLContent");
13
13
  const b = (0, utils_1.block)('column');
14
- const ColumnBase = ({ name, spec, input, meta, children, }) => {
14
+ const ColumnBase = ({ name, spec, input, meta, children, action, }) => {
15
15
  const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
16
16
  const generateButton = react_1.default.useMemo(() => (0, core_1.withGenerateButton)(spec), [spec]);
17
17
  return (react_1.default.createElement("div", { className: b() },
@@ -23,7 +23,8 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
23
23
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
24
24
  placement: common_1.COMMON_POPOVER_PLACEMENT,
25
25
  } },
26
- react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
26
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null),
27
+ Boolean(action) && react_1.default.createElement("div", { className: b('first-row-action') }, action)),
27
28
  react_1.default.createElement("div", { className: b('second-row') },
28
29
  react_1.default.createElement("div", { className: b('second-row-inner') },
29
30
  react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -39,6 +39,9 @@
39
39
  margin-top: auto;
40
40
  margin-bottom: auto;
41
41
  }
42
+ .df-row__left-action {
43
+ padding-left: var(--g-spacing-2);
44
+ }
42
45
  .df-row__left::after {
43
46
  content: "";
44
47
  width: 100%;
@@ -11,7 +11,7 @@ const common_1 = require("../../../constants/common");
11
11
  const utils_1 = require("../../../utils");
12
12
  const HTMLContent_1 = require("../../HTMLContent");
13
13
  const b = (0, utils_1.block)('row');
14
- const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
14
+ const RowBase = ({ name, spec, input, meta, verboseDescription, action, children, }) => {
15
15
  const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
16
16
  const generateButton = react_1.default.useMemo(() => (0, core_1.withGenerateButton)(spec), [spec]);
17
17
  return (react_1.default.createElement("div", { className: b() },
@@ -23,7 +23,8 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
23
23
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
24
24
  placement: common_1.COMMON_POPOVER_PLACEMENT,
25
25
  } },
26
- react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
26
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null,
27
+ Boolean(action) && react_1.default.createElement("span", { className: b('left-action') }, action))),
27
28
  react_1.default.createElement("div", { className: b('right') },
28
29
  react_1.default.createElement("div", { className: b('right-inner') },
29
30
  react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -27,18 +27,18 @@
27
27
  min-height: var(--df-column-first-row-min-height, 28px);
28
28
  display: flex;
29
29
  margin-bottom: auto;
30
- flex-direction: column;
30
+ flex-direction: row;
31
31
  flex-shrink: 0;
32
32
  }
33
33
  .df-column__first-row-inner {
34
- display: inline;
34
+ flex-grow: 1;
35
35
  margin-top: auto;
36
36
  margin-bottom: auto;
37
37
  }
38
- .df-column__first-row::after {
39
- content: "";
40
- width: 100%;
41
- flex-shrink: 1;
38
+ .df-column__first-row-action {
39
+ padding-left: var(--g-spacing-2);
40
+ margin-top: auto;
41
+ margin-bottom: auto;
42
42
  }
43
43
  .df-column__title {
44
44
  word-break: break-word;
@@ -8,7 +8,7 @@ import { block } from '../../../utils';
8
8
  import { HTMLContent } from '../../HTMLContent';
9
9
  import './Column.css';
10
10
  const b = block('column');
11
- const ColumnBase = ({ name, spec, input, meta, children, }) => {
11
+ const ColumnBase = ({ name, spec, input, meta, children, action, }) => {
12
12
  const arrayItem = React.useMemo(() => isArrayItem(name), [name]);
13
13
  const generateButton = React.useMemo(() => withGenerateButton(spec), [spec]);
14
14
  return (React.createElement("div", { className: b() },
@@ -20,7 +20,8 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
20
20
  React.createElement(HelpMark, { popoverProps: {
21
21
  placement: COMMON_POPOVER_PLACEMENT,
22
22
  } },
23
- React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
23
+ React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null),
24
+ Boolean(action) && React.createElement("div", { className: b('first-row-action') }, action)),
24
25
  React.createElement("div", { className: b('second-row') },
25
26
  React.createElement("div", { className: b('second-row-inner') },
26
27
  React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -39,6 +39,9 @@
39
39
  margin-top: auto;
40
40
  margin-bottom: auto;
41
41
  }
42
+ .df-row__left-action {
43
+ padding-left: var(--g-spacing-2);
44
+ }
42
45
  .df-row__left::after {
43
46
  content: "";
44
47
  width: 100%;
@@ -8,7 +8,7 @@ import { block } from '../../../utils';
8
8
  import { HTMLContent } from '../../HTMLContent';
9
9
  import './Row.css';
10
10
  const b = block('row');
11
- const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
11
+ const RowBase = ({ name, spec, input, meta, verboseDescription, action, children, }) => {
12
12
  const arrayItem = React.useMemo(() => isArrayItem(name), [name]);
13
13
  const generateButton = React.useMemo(() => withGenerateButton(spec), [spec]);
14
14
  return (React.createElement("div", { className: b() },
@@ -20,7 +20,8 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
20
20
  React.createElement(HelpMark, { popoverProps: {
21
21
  placement: COMMON_POPOVER_PLACEMENT,
22
22
  } },
23
- React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
23
+ React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null,
24
+ Boolean(action) && React.createElement("span", { className: b('left-action') }, action))),
24
25
  React.createElement("div", { className: b('right') },
25
26
  React.createElement("div", { className: b('right-inner') },
26
27
  React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dynamic-forms",
3
- "version": "5.8.0",
3
+ "version": "5.8.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "build/cjs/index.js",