@gravity-ui/dynamic-forms 4.17.0 → 5.0.0

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.
Files changed (51) hide show
  1. package/build/cjs/lib/kit/components/Card/Card.css +4 -2
  2. package/build/cjs/lib/kit/components/Card/Card.js +4 -3
  3. package/build/cjs/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.css +3 -0
  4. package/build/cjs/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +4 -2
  5. package/build/cjs/lib/kit/components/Inputs/Text/Text.js +1 -2
  6. package/build/cjs/lib/kit/components/Inputs/TextContent/TextContent.js +1 -1
  7. package/build/cjs/lib/kit/components/Layouts/Column/Column.js +7 -5
  8. package/build/cjs/lib/kit/components/Layouts/Row/Row.js +7 -5
  9. package/build/cjs/lib/kit/components/Layouts/Section/Section.css +4 -6
  10. package/build/cjs/lib/kit/components/Layouts/Section/Section.js +4 -3
  11. package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +3 -0
  12. package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +4 -3
  13. package/build/cjs/lib/kit/components/TogglerCard/TogglerCard.js +4 -2
  14. package/build/cjs/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +4 -2
  15. package/build/cjs/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +4 -2
  16. package/build/cjs/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.css +7 -5
  17. package/build/cjs/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.js +4 -3
  18. package/build/cjs/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.css +7 -5
  19. package/build/cjs/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.js +3 -1
  20. package/build/cjs/lib/kit/components/Views/MultiSelectView/MultiSelectView.css +7 -5
  21. package/build/cjs/lib/kit/components/Views/MultiSelectView/MultiSelectView.js +3 -1
  22. package/build/cjs/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.css +6 -4
  23. package/build/cjs/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.js +2 -1
  24. package/build/cjs/lib/kit/components/Views/TableArrayView/TableArrayView.js +4 -2
  25. package/build/cjs/lib/kit/hooks/useOneOf/useOneOf.js +1 -1
  26. package/build/esm/lib/kit/components/Card/Card.css +4 -2
  27. package/build/esm/lib/kit/components/Card/Card.js +5 -4
  28. package/build/esm/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.css +3 -0
  29. package/build/esm/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +5 -3
  30. package/build/esm/lib/kit/components/Inputs/Text/Text.js +2 -3
  31. package/build/esm/lib/kit/components/Inputs/TextContent/TextContent.js +1 -1
  32. package/build/esm/lib/kit/components/Layouts/Column/Column.js +5 -3
  33. package/build/esm/lib/kit/components/Layouts/Row/Row.js +5 -3
  34. package/build/esm/lib/kit/components/Layouts/Section/Section.css +4 -6
  35. package/build/esm/lib/kit/components/Layouts/Section/Section.js +5 -4
  36. package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +3 -0
  37. package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +5 -4
  38. package/build/esm/lib/kit/components/TogglerCard/TogglerCard.js +5 -3
  39. package/build/esm/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +5 -3
  40. package/build/esm/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +5 -3
  41. package/build/esm/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.css +7 -5
  42. package/build/esm/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.js +5 -4
  43. package/build/esm/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.css +7 -5
  44. package/build/esm/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.js +4 -2
  45. package/build/esm/lib/kit/components/Views/MultiSelectView/MultiSelectView.css +7 -5
  46. package/build/esm/lib/kit/components/Views/MultiSelectView/MultiSelectView.js +4 -2
  47. package/build/esm/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.css +6 -4
  48. package/build/esm/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.js +2 -1
  49. package/build/esm/lib/kit/components/Views/TableArrayView/TableArrayView.js +5 -3
  50. package/build/esm/lib/kit/hooks/useOneOf/useOneOf.js +2 -2
  51. package/package.json +5 -6
@@ -70,8 +70,10 @@
70
70
  max-width: var(--df-card-title-max-width, 533px);
71
71
  height: var(--df-card-title-height, var(--g-spacing-5));
72
72
  }
73
- .df-card__title-popover {
74
- height: var(--df-card-title-popover-height, var(--g-spacing-5));
73
+ .df-card__popover {
74
+ padding: var(--g-spacing-2);
75
+ overflow-wrap: break-word;
76
+ max-width: 300px;
75
77
  }
76
78
  .df-card__note {
77
79
  margin-left: var(--df-card-note-margin-left, 5px);
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Card = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("@gravity-ui/components");
7
6
  const icons_1 = require("@gravity-ui/icons");
8
7
  const uikit_1 = require("@gravity-ui/uikit");
9
8
  const isString_1 = tslib_1.__importDefault(require("lodash/isString"));
@@ -37,10 +36,12 @@ const Card = ({ name, title: propsTitle, description, actions, open: propsOpen,
37
36
  const title = react_1.default.useMemo(() => {
38
37
  if ((0, isString_1.default)(propsTitle)) {
39
38
  return (react_1.default.createElement(react_1.default.Fragment, null,
40
- react_1.default.createElement(uikit_1.Popover, { content: propsTitle, disabled: titlePopoverDisabled, placement: common_1.COMMON_POPOVER_PLACEMENT, className: b('title-popover') },
39
+ react_1.default.createElement(uikit_1.Popover, { content: propsTitle, disabled: titlePopoverDisabled, placement: common_1.COMMON_POPOVER_PLACEMENT, className: b('popover') },
41
40
  react_1.default.createElement(uikit_1.Text, { className: b('title'), ellipsis: true, ref: titleRef, variant: "subheader-2" }, propsTitle)),
42
41
  description ? (react_1.default.createElement("div", { className: b('note') },
43
- react_1.default.createElement(components_1.HelpPopover, { htmlContent: description, placement: common_1.COMMON_POPOVER_PLACEMENT }))) : null));
42
+ react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
43
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
44
+ } }, description))) : null));
44
45
  }
45
46
  return propsTitle;
46
47
  }, [propsTitle, titlePopoverDisabled, description]);
@@ -22,6 +22,9 @@
22
22
  align-items: center;
23
23
  height: var(--df-checkbox-height, 28px);
24
24
  }
25
+ .df-checkbox-group .g-control-label__text {
26
+ margin-inline-start: var(--df-checkbox-margint-start, 5px);
27
+ }
25
28
  .df-checkbox-group > *:not(:last-child) {
26
29
  margin-right: var(--df-checkbox-group-child-margin-right, 6px);
27
30
  }
@@ -5,12 +5,12 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const icons_1 = require("@gravity-ui/icons");
7
7
  const uikit_1 = require("@gravity-ui/uikit");
8
- const components_1 = require("@gravity-ui/components");
9
8
  const noop_1 = tslib_1.__importDefault(require("lodash/noop"));
10
9
  const set_1 = tslib_1.__importDefault(require("lodash/set"));
11
10
  const core_1 = require("../../../../core");
12
11
  const hooks_1 = require("../../../../core/components/Form/hooks");
13
12
  const utils_1 = require("../../../utils");
13
+ const common_1 = require("../../../constants/common");
14
14
  const b = (0, utils_1.block)('table-array');
15
15
  const TableArrayInput = ({ spec, name, arrayInput, input }) => {
16
16
  const { isHiddenField } = (0, hooks_1.useSearchContext)();
@@ -52,7 +52,9 @@ const TableArrayInput = ({ spec, name, arrayInput, input }) => {
52
52
  ? label
53
53
  : () => (react_1.default.createElement(uikit_1.Flex, { gap: 0.5, alignItems: "center" },
54
54
  label,
55
- react_1.default.createElement(components_1.HelpPopover, { htmlContent: description, placement: ['bottom', 'top'] }))),
55
+ react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
56
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
57
+ } }, description))),
56
58
  template: ({ key, }, idx) => {
57
59
  var _a, _b, _c;
58
60
  const entitySpec = (_a = items === null || items === void 0 ? void 0 : items.properties) === null || _a === void 0 ? void 0 : _a[property];
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Text = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("@gravity-ui/components");
7
6
  const uikit_1 = require("@gravity-ui/uikit");
8
7
  const isNil_1 = tslib_1.__importDefault(require("lodash/isNil"));
9
8
  const Text = ({ name, input: { value, onBlur, onChange, onFocus }, spec, inputProps, }) => {
10
9
  const props = Object.assign(Object.assign({ hasClear: true }, inputProps), { value: (0, isNil_1.default)(value) ? '' : `${value}`, onBlur: onBlur, onFocus: onFocus, onUpdate: onChange, disabled: spec.viewSpec.disabled, placeholder: spec.viewSpec.placeholder, qa: name });
11
10
  if (spec.viewSpec.type === 'password') {
12
- return (react_1.default.createElement(components_1.PasswordInput, Object.assign({}, props, { autoComplete: "new-password", showCopyButton: true, showRevealButton: true })));
11
+ return react_1.default.createElement(uikit_1.PasswordInput, Object.assign({}, props, { autoComplete: "new-password" }));
13
12
  }
14
13
  return react_1.default.createElement(uikit_1.TextInput, Object.assign({}, props, { type: "text" }));
15
14
  };
@@ -17,7 +17,7 @@ const TextContentComponent = ({ spec, value, Layout, }) => {
17
17
  if (!text) {
18
18
  return null;
19
19
  }
20
- const iconLib = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) ? (react_1.default.createElement(LazyLoader_1.LazyLoader, { component: (0, utils_2.loadIcon)(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) })) : null;
20
+ const iconLib = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) ? (react_1.default.createElement(LazyLoader_1.LazyLoader, { component: (0, utils_2.loadIcon)(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) })) : undefined;
21
21
  let content = react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: text } });
22
22
  if (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.themeAlert) {
23
23
  const titleAlert = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert) || !(0, lodash_1.isEmpty)(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert)
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Column = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("@gravity-ui/components");
7
6
  const icons_1 = require("@gravity-ui/icons");
8
7
  const uikit_1 = require("@gravity-ui/uikit");
9
8
  const core_1 = require("../../../../core");
10
- const components_2 = require("../../../components");
9
+ const components_1 = require("../../../components");
11
10
  const utils_1 = require("../../../utils");
11
+ const common_1 = require("../../../constants/common");
12
12
  const b = (0, utils_1.block)('column');
13
13
  const ColumnBase = ({ name, spec, input, meta, children, }) => {
14
14
  const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
@@ -19,14 +19,16 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
19
19
  react_1.default.createElement(uikit_1.Text, { className: b('title', { required: spec.required }) }, spec.viewSpec.layoutTitle),
20
20
  spec.viewSpec.layoutDescription ? (react_1.default.createElement("span", { className: b('note') },
21
21
  react_1.default.createElement(uikit_1.Text, { className: b('note-inner') },
22
- react_1.default.createElement(components_1.HelpPopover, { htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })))) : null)),
22
+ react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
23
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
24
+ } }, spec.viewSpec.layoutDescription)))) : null)),
23
25
  react_1.default.createElement("div", { className: b('second-row') },
24
26
  react_1.default.createElement("div", { className: b('second-row-inner') },
25
- react_1.default.createElement(components_2.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
27
+ react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
26
28
  // TODO: remove condition spec.viewSpec.type !== 'select'
27
29
  ((0, core_1.isArraySpec)(spec) && spec.viewSpec.type !== 'select') ||
28
30
  (0, core_1.isObjectSpec)(spec), className: b('error-wrapper') }, children),
29
- generateButton ? (react_1.default.createElement(components_2.GenerateRandomValueButton, { spec: spec, onChange: input.onChange })) : null,
31
+ generateButton ? (react_1.default.createElement(components_1.GenerateRandomValueButton, { spec: spec, onChange: input.onChange })) : null,
30
32
  arrayItem ? (react_1.default.createElement(uikit_1.Button, { view: "flat-secondary", className: b('remove-button'), onClick: input.onDrop, qa: `${name}-remove-item` },
31
33
  react_1.default.createElement(uikit_1.Icon, { data: icons_1.TrashBin, size: 16 }))) : null))));
32
34
  };
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RowVerbose = exports.Row = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("@gravity-ui/components");
7
6
  const icons_1 = require("@gravity-ui/icons");
8
7
  const uikit_1 = require("@gravity-ui/uikit");
9
8
  const core_1 = require("../../../../core");
10
- const components_2 = require("../../../components");
9
+ const components_1 = require("../../../components");
11
10
  const utils_1 = require("../../../utils");
11
+ const common_1 = require("../../../constants/common");
12
12
  const b = (0, utils_1.block)('row');
13
13
  const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
14
14
  const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
@@ -19,14 +19,16 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
19
19
  react_1.default.createElement(uikit_1.Text, { className: b('title', { required: spec.required }) }, spec.viewSpec.layoutTitle),
20
20
  !verboseDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement("span", { className: b('note') },
21
21
  react_1.default.createElement(uikit_1.Text, { className: b('note-inner') },
22
- react_1.default.createElement(components_1.HelpPopover, { htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })))) : null)),
22
+ react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
23
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
24
+ } }, spec.viewSpec.layoutDescription)))) : null)),
23
25
  react_1.default.createElement("div", { className: b('right') },
24
26
  react_1.default.createElement("div", { className: b('right-inner') },
25
- react_1.default.createElement(components_2.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
27
+ react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
26
28
  // TODO: remove condition spec.viewSpec.type !== 'select'
27
29
  ((0, core_1.isArraySpec)(spec) && spec.viewSpec.type !== 'select') ||
28
30
  (0, core_1.isObjectSpec)(spec), className: b('error-wrapper') }, children),
29
- generateButton ? (react_1.default.createElement(components_2.GenerateRandomValueButton, { spec: spec, onChange: input.onChange })) : null,
31
+ generateButton ? (react_1.default.createElement(components_1.GenerateRandomValueButton, { spec: spec, onChange: input.onChange })) : null,
30
32
  arrayItem ? (react_1.default.createElement(uikit_1.Button, { view: "flat-secondary", className: b('remove-button'), onClick: input.onDrop, qa: `${name}-remove-item` },
31
33
  react_1.default.createElement(uikit_1.Icon, { data: icons_1.TrashBin, size: 16 }))) : null),
32
34
  verboseDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement("div", { className: b('description'), dangerouslySetInnerHTML: { __html: spec.viewSpec.layoutDescription } })) : null)));
@@ -37,12 +37,10 @@
37
37
  .df-section__title {
38
38
  max-width: var(--df-section-title-max-width, 533px);
39
39
  }
40
- .df-section__title-popover {
41
- display: flex;
42
- align-items: center;
43
- }
44
- .df-section__title-popover .g-popover__handler {
45
- display: flex;
40
+ .df-section__popover {
41
+ padding: var(--g-spacing-2);
42
+ overflow-wrap: break-word;
43
+ max-width: 300px;
46
44
  }
47
45
  .df-section__note {
48
46
  margin-left: var(--df-section-note-margin-left, 5px);
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Group2 = exports.Group = exports.SectionWithSubtitle2 = exports.SectionWithSubtitle = exports.Section2 = exports.Section = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("@gravity-ui/components");
7
6
  const uikit_1 = require("@gravity-ui/uikit");
8
7
  const __1 = require("../../");
9
8
  const RemoveButton_1 = require("../../RemoveButton");
@@ -59,7 +58,9 @@ const SectionBase = (_a) => {
59
58
  }
60
59
  else {
61
60
  description = (react_1.default.createElement(uikit_1.Text, { className: b('note') },
62
- react_1.default.createElement(components_1.HelpPopover, { htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })));
61
+ react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
62
+ placement: __2.COMMON_POPOVER_PLACEMENT,
63
+ } }, spec.viewSpec.layoutDescription)));
63
64
  }
64
65
  }
65
66
  const layoutTitle = spec.viewSpec.layoutTitle;
@@ -69,7 +70,7 @@ const SectionBase = (_a) => {
69
70
  'with-popover': !descriptionAsSubtitle,
70
71
  size: sizeTitle,
71
72
  }) },
72
- react_1.default.createElement(uikit_1.Popover, { className: b('title-popover'), content: layoutTitle, placement: __2.COMMON_POPOVER_PLACEMENT, disabled: layoutTitlePopoverDisabled },
73
+ react_1.default.createElement(uikit_1.Popover, { className: b('popover'), content: layoutTitle, placement: __2.COMMON_POPOVER_PLACEMENT, disabled: layoutTitlePopoverDisabled },
73
74
  react_1.default.createElement(uikit_1.Text, { className: b('title'), variant: variantTitle, ref: titleRef, ellipsis: true }, layoutTitle)),
74
75
  description,
75
76
  removeButton)) : null,
@@ -42,6 +42,9 @@
42
42
  .df-simple-vertical-accordeon__tooltip {
43
43
  margin: var(--df-simple-vertical-accordeon-tooltip-margin, var(--g-spacing-0) 5px);
44
44
  }
45
+ .df-simple-vertical-accordeon__popover {
46
+ padding: var(--g-spacing-2);
47
+ }
45
48
  .df-simple-vertical-accordeon__chevron {
46
49
  transform: rotate(-90deg);
47
50
  }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SimpleVerticalAccordeon = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("@gravity-ui/components");
7
6
  const icons_1 = require("@gravity-ui/icons");
8
7
  const uikit_1 = require("@gravity-ui/uikit");
9
8
  const common_1 = require("../../constants/common");
@@ -63,7 +62,7 @@ class SimpleVerticalAccordeon extends react_1.default.Component {
63
62
  const currentTitleVariant = variantTitle || this.getCurrentTitleVariant();
64
63
  return (Boolean(react_1.default.Children.count(children)) && (react_1.default.createElement("div", { className: b({ branch: withBranchView, view: viewLayout }, className) },
65
64
  react_1.default.createElement("div", { className: b('header') },
66
- react_1.default.createElement(uikit_1.Popover, { content: title, disabled: titlePopoverDisabled, placement: common_1.COMMON_POPOVER_PLACEMENT },
65
+ react_1.default.createElement(uikit_1.Popover, { content: title, disabled: titlePopoverDisabled, placement: common_1.COMMON_POPOVER_PLACEMENT, className: b('popover'), hasArrow: true },
67
66
  react_1.default.createElement(uikit_1.Button, { view: "flat", className: b('header-inner', buttonClassName), onClick: this.handleClick, qa: `${name}-accordeon-toggler`, width: "auto" },
68
67
  react_1.default.createElement(uikit_1.Text, { variant: currentTitleVariant }, title),
69
68
  react_1.default.createElement(uikit_1.Icon, { data: icons_1.ChevronDown, className: b('chevron', { open }), size: 16 }))),
@@ -91,7 +90,9 @@ class SimpleVerticalAccordeon extends react_1.default.Component {
91
90
  getTooltip() {
92
91
  const { note } = this.props;
93
92
  return note ? (react_1.default.createElement(uikit_1.Text, { className: b('tooltip') },
94
- react_1.default.createElement(components_1.HelpPopover, { htmlContent: note, placement: ['bottom', 'top'] }))) : null;
93
+ react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
94
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
95
+ } }, note))) : null;
95
96
  }
96
97
  }
97
98
  exports.SimpleVerticalAccordeon = SimpleVerticalAccordeon;
@@ -3,15 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TogglerCard = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("@gravity-ui/components");
7
6
  const uikit_1 = require("@gravity-ui/uikit");
8
7
  const utils_1 = require("../../utils");
8
+ const common_1 = require("../../constants/common");
9
9
  const b = (0, utils_1.block)('toggler-card');
10
10
  const TogglerCard = ({ description, title, text, onClick, disabled, selected, }) => {
11
11
  return (react_1.default.createElement(uikit_1.Card, { onClick: onClick, type: "selection", disabled: disabled ? !selected : disabled, selected: selected, size: "m", className: b() },
12
12
  react_1.default.createElement("div", { className: b('header') },
13
13
  react_1.default.createElement(uikit_1.Text, { variant: "subheader-2", ellipsis: true }, title),
14
- description ? (react_1.default.createElement(components_1.HelpPopover, { htmlContent: description, placement: ['bottom', 'top'] })) : null),
14
+ description ? (react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
15
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
16
+ } }, description)) : null),
15
17
  react_1.default.createElement(uikit_1.Text, { variant: "body-1", color: "secondary", className: b('text') }, text)));
16
18
  };
17
19
  exports.TogglerCard = TogglerCard;
@@ -4,10 +4,10 @@ exports.ViewColumn = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const uikit_1 = require("@gravity-ui/uikit");
7
- const components_1 = require("@gravity-ui/components");
8
7
  const core_1 = require("../../../../core");
9
8
  const kit_1 = require("../../../../kit");
10
9
  const utils_1 = require("../../../utils");
10
+ const common_1 = require("../../../constants/common");
11
11
  const b = (0, utils_1.block)('view-column');
12
12
  const ViewColumn = ({ value, spec, children, }) => {
13
13
  const { showLayoutDescription } = (0, core_1.useDynamicFormsCtx)();
@@ -17,7 +17,9 @@ const ViewColumn = ({ value, spec, children, }) => {
17
17
  return (react_1.default.createElement("div", { className: b() },
18
18
  react_1.default.createElement("div", { className: b('first-row') },
19
19
  react_1.default.createElement(uikit_1.Text, { color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
20
- showLayoutDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement(components_1.HelpPopover, { className: b('note'), htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })) : null),
20
+ showLayoutDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement(uikit_1.HelpMark, { className: b('note'), popoverProps: {
21
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
22
+ } }, spec.viewSpec.layoutDescription)) : null),
21
23
  react_1.default.createElement("div", { className: b('second-row') }, children),
22
24
  react_1.default.createElement(kit_1.CopyButton, { spec: spec, value: value })));
23
25
  };
@@ -4,10 +4,10 @@ exports.ViewRow = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const uikit_1 = require("@gravity-ui/uikit");
7
- const components_1 = require("@gravity-ui/components");
8
7
  const core_1 = require("../../../../core");
9
8
  const kit_1 = require("../../../../kit");
10
9
  const utils_1 = require("../../../utils");
10
+ const common_1 = require("../../../constants/common");
11
11
  const b = (0, utils_1.block)('view-row');
12
12
  const ViewRow = ({ value, spec, children, }) => {
13
13
  const { showLayoutDescription } = (0, core_1.useDynamicFormsCtx)();
@@ -17,7 +17,9 @@ const ViewRow = ({ value, spec, children, }) => {
17
17
  return (react_1.default.createElement("div", { className: b() },
18
18
  react_1.default.createElement("div", { className: b('left') },
19
19
  react_1.default.createElement(uikit_1.Text, { whiteSpace: "nowrap", color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
20
- showLayoutDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement(components_1.HelpPopover, { className: b('note'), htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })) : null,
20
+ showLayoutDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement(uikit_1.HelpMark, { className: b('note'), popoverProps: {
21
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
22
+ } }, spec.viewSpec.layoutDescription)) : null,
21
23
  react_1.default.createElement("div", { className: b('dots') })),
22
24
  react_1.default.createElement("div", { className: b('right') }, children),
23
25
  react_1.default.createElement(kit_1.CopyButton, { spec: spec, value: value })));
@@ -30,16 +30,18 @@
30
30
  .df-checkbox-group-view_vertical > *:not(:last-child) {
31
31
  margin: var(--df-checkbox-group-view-vertical-child-margin, var(--g-spacing-0) var(--g-spacing-0) 6px);
32
32
  }
33
- .df-checkbox-group-view__tooltip {
33
+ .df-checkbox-group-view__popover {
34
+ padding: var(--g-spacing-2);
34
35
  overflow-wrap: break-word;
36
+ max-width: 300px;
35
37
  }
36
- .df-checkbox-group-view__tooltip-container {
37
- max-width: var(--df-tooltip-container-max-width, 100%);
38
+ .df-checkbox-group-view__item {
39
+ max-width: var(--df-popover-item-max-width, 100%);
38
40
  overflow: hidden;
39
41
  text-overflow: ellipsis;
40
42
  display: block;
41
- margin-bottom: var(--df-tooltip-container-margin-bottom, 6px);
43
+ margin-bottom: var(--df-popover-item-margin-bottom, 6px);
42
44
  }
43
- .df-checkbox-group-view__tooltip-container:last-child {
45
+ .df-checkbox-group-view__item:last-child {
44
46
  margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
45
47
  }
@@ -12,8 +12,9 @@ const CheckboxGroupView = ({ spec, value = [] }) => {
12
12
  const _value = value;
13
13
  const items = react_1.default.useMemo(() => _value.map((item) => { var _a; return ((_a = spec.description) === null || _a === void 0 ? void 0 : _a[item]) || item; }), [spec.description, _value]);
14
14
  const verticalPlacement = react_1.default.useMemo(() => { var _a; return ((_a = spec.viewSpec.checkboxGroupParams) === null || _a === void 0 ? void 0 : _a.placement) === 'vertical'; }, [(_a = spec.viewSpec.checkboxGroupParams) === null || _a === void 0 ? void 0 : _a.placement]);
15
- return (react_1.default.createElement("div", { className: b({ vertical: verticalPlacement }) }, items.map((item, idx) => (react_1.default.createElement(uikit_1.Popover, { placement: common_1.COMMON_POPOVER_PLACEMENT, key: item, content: item, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: item.length < 51 },
16
- item,
17
- !verticalPlacement && idx !== items.length - 1 ? ', ' : null)))));
15
+ return (react_1.default.createElement("div", { className: b({ vertical: verticalPlacement }) }, items.map((item, idx) => (react_1.default.createElement(uikit_1.Popover, { placement: common_1.COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), key: item, hasArrow: true, disabled: item.length < 51 },
16
+ react_1.default.createElement(uikit_1.Text, { className: b('item') },
17
+ item,
18
+ !verticalPlacement && idx !== items.length - 1 ? ', ' : null))))));
18
19
  };
19
20
  exports.CheckboxGroupView = CheckboxGroupView;
@@ -17,17 +17,19 @@
17
17
  }
18
18
  */
19
19
  /* Border-radius */
20
- .df-multi-oneof-view__tooltip {
20
+ .df-multi-oneof-view__popover {
21
+ padding: var(--g-spacing-2);
21
22
  overflow-wrap: break-word;
23
+ max-width: 300px;
22
24
  }
23
- .df-multi-oneof-view__tooltip-container {
24
- max-width: var(--df-tooltip-container-max-width, 100%);
25
+ .df-multi-oneof-view__item {
26
+ max-width: var(--df-popover-item-max-width, 100%);
25
27
  overflow: hidden;
26
28
  text-overflow: ellipsis;
27
29
  display: block;
28
- margin-bottom: var(--df-tooltip-container-margin-bottom, 6px);
30
+ margin-bottom: var(--df-popover-item-margin-bottom, 6px);
29
31
  }
30
- .df-multi-oneof-view__tooltip-container:last-child {
32
+ .df-multi-oneof-view__item:last-child {
31
33
  margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
32
34
  }
33
35
  .df-multi-oneof-view__content_multiple-values > .df-group-indent {
@@ -8,6 +8,7 @@ const isObjectLike_1 = tslib_1.__importDefault(require("lodash/isObjectLike"));
8
8
  const core_1 = require("../../../../core");
9
9
  const utils_1 = require("../../../utils");
10
10
  const GroupIndent_1 = require("../../GroupIndent");
11
+ const common_1 = require("../../../constants/common");
11
12
  const b = (0, utils_1.block)('multi-oneof-view');
12
13
  const MultiOneOfView = (props) => {
13
14
  const { name, value, Layout, spec, withoutIndent } = props;
@@ -23,7 +24,8 @@ const MultiOneOfView = (props) => {
23
24
  }), [spec.description, specProperties, values]);
24
25
  const selectView = react_1.default.useMemo(() => {
25
26
  const selectView = (react_1.default.createElement(react_1.default.Fragment, null, items.map((item) => {
26
- return (react_1.default.createElement(uikit_1.Popover, { placement: ['bottom', 'top'], key: item, content: item, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: item.length < 51 }, item));
27
+ return (react_1.default.createElement(uikit_1.Popover, { placement: common_1.COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), disabled: item.length < 51, hasArrow: true, key: item },
28
+ react_1.default.createElement(uikit_1.Text, { className: b('item') }, item)));
27
29
  })));
28
30
  if (Layout) {
29
31
  return (react_1.default.createElement(Layout, Object.assign({}, props, { value: values }), selectView));
@@ -17,16 +17,18 @@
17
17
  }
18
18
  */
19
19
  /* Border-radius */
20
- .df-multiselect-view__tooltip {
20
+ .df-multiselect-view__popover {
21
+ padding: var(--g-spacing-2);
21
22
  overflow-wrap: break-word;
23
+ max-width: 300px;
22
24
  }
23
- .df-multiselect-view__tooltip-container {
24
- max-width: var(--df-tooltip-container-max-width, 100%);
25
+ .df-multiselect-view__item {
26
+ max-width: var(--df-popover-item-max-width, 100%);
25
27
  overflow: hidden;
26
28
  text-overflow: ellipsis;
27
29
  display: block;
28
- margin-bottom: var(--df-tooltip-container-margin-bottom, 6px);
30
+ margin-bottom: var(--df-popover-item-margin-bottom, 6px);
29
31
  }
30
- .df-multiselect-view__tooltip-container:last-child {
32
+ .df-multiselect-view__item:last-child {
31
33
  margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
32
34
  }
@@ -5,10 +5,12 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const uikit_1 = require("@gravity-ui/uikit");
7
7
  const utils_1 = require("../../../utils");
8
+ const common_1 = require("../../../constants/common");
8
9
  const b = (0, utils_1.block)('multiselect-view');
9
10
  const MultiSelectView = ({ spec, value = [] }) => {
10
11
  const _value = value;
11
12
  const items = react_1.default.useMemo(() => _value.map((item) => { var _a; return ((_a = spec.description) === null || _a === void 0 ? void 0 : _a[item]) || item; }), [spec.description, _value]);
12
- return (react_1.default.createElement(react_1.default.Fragment, null, items.map((item) => (react_1.default.createElement(uikit_1.Popover, { placement: ['bottom', 'top'], key: item, content: item, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: item.length < 51 }, item)))));
13
+ return (react_1.default.createElement(react_1.default.Fragment, null, items.map((item) => (react_1.default.createElement(uikit_1.Popover, { placement: common_1.COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), disabled: item.length < 51, hasArrow: true, key: item },
14
+ react_1.default.createElement(uikit_1.Text, { className: b('item') }, item))))));
13
15
  };
14
16
  exports.MultiSelectView = MultiSelectView;
@@ -20,14 +20,16 @@
20
20
  .df-number-with-scale-view {
21
21
  display: flex;
22
22
  }
23
- .df-number-with-scale-view__tooltip {
23
+ .df-number-with-scale-view__popover {
24
+ padding: var(--g-spacing-2);
24
25
  overflow-wrap: break-word;
26
+ max-width: 300px;
25
27
  }
26
- .df-number-with-scale-view__tooltip-container {
27
- white-space: nowrap;
28
+ .df-number-with-scale-view__item {
29
+ max-width: var(--df-popover-item-max-width, 100%);
28
30
  overflow: hidden;
29
31
  text-overflow: ellipsis;
30
- max-width: var(--df-tooltip-container-max-width, 100%);
32
+ display: block;
31
33
  }
32
34
  .df-number-with-scale-view__size {
33
35
  margin-left: var(--df-number-with-scale-view-size-margin-left, var(--g-spacing-half));
@@ -11,7 +11,8 @@ const NumberWithScaleViewBase = ({ spec, value }) => {
11
11
  const { initialValue, initialType } = (0, useInitial_1.useInitial)(value || '', spec, [value]);
12
12
  const { scale } = spec.viewSpec.sizeParams;
13
13
  return (react_1.default.createElement("div", { className: b() },
14
- react_1.default.createElement(uikit_1.Popover, { placement: ['bottom', 'top'], content: initialValue, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: initialValue.length < 26 }, initialValue),
14
+ react_1.default.createElement(uikit_1.Popover, { placement: ['bottom', 'top'], content: initialValue, className: b('popover'), disabled: initialValue.length < 26, hasArrow: true },
15
+ react_1.default.createElement(uikit_1.Text, { className: b('item') }, initialValue)),
15
16
  react_1.default.createElement(uikit_1.Text, { className: b('size') }, scale[initialType].title)));
16
17
  };
17
18
  const NumberWithScaleView = (props) => (0, utils_1.isCorrectSizeParams)(props.spec) && props.value ? react_1.default.createElement(NumberWithScaleViewBase, Object.assign({}, props)) : null;
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const uikit_1 = require("@gravity-ui/uikit");
7
7
  const core_1 = require("../../../../core");
8
8
  const utils_1 = require("../../../utils");
9
- const components_1 = require("@gravity-ui/components");
9
+ const common_1 = require("../../../constants/common");
10
10
  const b = (0, utils_1.block)('table-array-view');
11
11
  const TableArrayView = ({ value = [], spec, name }) => {
12
12
  const { showLayoutDescription } = (0, core_1.useDynamicFormsCtx)();
@@ -26,7 +26,9 @@ const TableArrayView = ({ value = [], spec, name }) => {
26
26
  name: description && showLayoutDescription
27
27
  ? () => (react_1.default.createElement(uikit_1.Flex, { gap: 0.5, alignItems: "center" },
28
28
  label,
29
- react_1.default.createElement(components_1.HelpPopover, { htmlContent: description, placement: ['bottom', 'top'] })))
29
+ react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
30
+ placement: common_1.COMMON_POPOVER_PLACEMENT,
31
+ } }, description)))
30
32
  : label,
31
33
  template: (_, idx) => {
32
34
  var _a;
@@ -99,7 +99,7 @@ const useOneOf = ({ props, onTogglerChange }) => {
99
99
  return (react_1.default.createElement("div", { className: b('checkbox') },
100
100
  react_1.default.createElement(uikit_1.Checkbox, { checked: checkboxValue, onUpdate: onCheckboxChange, disabled: spec.viewSpec.disabled, qa: name })));
101
101
  }
102
- return (react_1.default.createElement(uikit_1.RadioButton, { value: oneOfValue, onChange: (event) => onOneOfChange([event.target.value]), disabled: spec.viewSpec.disabled, qa: name }, options.map((option) => (react_1.default.createElement(uikit_1.RadioButton.Option, { key: option.value, value: option.value }, option.title)))));
102
+ return (react_1.default.createElement(uikit_1.SegmentedRadioGroup, { value: oneOfValue, onChange: (event) => onOneOfChange([event.target.value]), disabled: spec.viewSpec.disabled, qa: name }, options.map((option) => (react_1.default.createElement(uikit_1.SegmentedRadioGroup.Option, { key: option.value, value: option.value }, option.title)))));
103
103
  }, [
104
104
  togglerType,
105
105
  oneOfValue,
@@ -70,8 +70,10 @@
70
70
  max-width: var(--df-card-title-max-width, 533px);
71
71
  height: var(--df-card-title-height, var(--g-spacing-5));
72
72
  }
73
- .df-card__title-popover {
74
- height: var(--df-card-title-popover-height, var(--g-spacing-5));
73
+ .df-card__popover {
74
+ padding: var(--g-spacing-2);
75
+ overflow-wrap: break-word;
76
+ max-width: 300px;
75
77
  }
76
78
  .df-card__note {
77
79
  margin-left: var(--df-card-note-margin-left, 5px);
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { HelpPopover } from '@gravity-ui/components';
3
2
  import { ChevronDown } from '@gravity-ui/icons';
4
- import { Button, Card as CardBase, Icon, Popover, Text } from '@gravity-ui/uikit';
3
+ import { Button, Card as CardBase, HelpMark, Icon, Popover, Text } from '@gravity-ui/uikit';
5
4
  import isString from 'lodash/isString';
6
5
  import { COMMON_POPOVER_PLACEMENT, COMMON_TITLE_MAX_WIDTH } from '../../constants/common';
7
6
  import { block } from '../../utils';
@@ -34,10 +33,12 @@ export const Card = ({ name, title: propsTitle, description, actions, open: prop
34
33
  const title = React.useMemo(() => {
35
34
  if (isString(propsTitle)) {
36
35
  return (React.createElement(React.Fragment, null,
37
- React.createElement(Popover, { content: propsTitle, disabled: titlePopoverDisabled, placement: COMMON_POPOVER_PLACEMENT, className: b('title-popover') },
36
+ React.createElement(Popover, { content: propsTitle, disabled: titlePopoverDisabled, placement: COMMON_POPOVER_PLACEMENT, className: b('popover') },
38
37
  React.createElement(Text, { className: b('title'), ellipsis: true, ref: titleRef, variant: "subheader-2" }, propsTitle)),
39
38
  description ? (React.createElement("div", { className: b('note') },
40
- React.createElement(HelpPopover, { htmlContent: description, placement: COMMON_POPOVER_PLACEMENT }))) : null));
39
+ React.createElement(HelpMark, { popoverProps: {
40
+ placement: COMMON_POPOVER_PLACEMENT,
41
+ } }, description))) : null));
41
42
  }
42
43
  return propsTitle;
43
44
  }, [propsTitle, titlePopoverDisabled, description]);
@@ -22,6 +22,9 @@
22
22
  align-items: center;
23
23
  height: var(--df-checkbox-height, 28px);
24
24
  }
25
+ .df-checkbox-group .g-control-label__text {
26
+ margin-inline-start: var(--df-checkbox-margint-start, 5px);
27
+ }
25
28
  .df-checkbox-group > *:not(:last-child) {
26
29
  margin-right: var(--df-checkbox-group-child-margin-right, 6px);
27
30
  }
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import { Plus, TrashBin } from '@gravity-ui/icons';
3
- import { Button, Flex, Icon, Table } from '@gravity-ui/uikit';
4
- import { HelpPopover } from '@gravity-ui/components';
3
+ import { Button, Flex, HelpMark, Icon, Table } from '@gravity-ui/uikit';
5
4
  import noop from 'lodash/noop';
6
5
  import set from 'lodash/set';
7
6
  import { Controller, OBJECT_ARRAY_CNT, OBJECT_ARRAY_FLAG, isArraySpec, isBooleanSpec, isObjectSpec, transformArrIn, } from '../../../../core';
8
7
  import { useSearchContext } from '../../../../core/components/Form/hooks';
9
8
  import { block } from '../../../utils';
9
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
10
10
  import './TableArrayInput.css';
11
11
  const b = block('table-array');
12
12
  export const TableArrayInput = ({ spec, name, arrayInput, input }) => {
@@ -49,7 +49,9 @@ export const TableArrayInput = ({ spec, name, arrayInput, input }) => {
49
49
  ? label
50
50
  : () => (React.createElement(Flex, { gap: 0.5, alignItems: "center" },
51
51
  label,
52
- React.createElement(HelpPopover, { htmlContent: description, placement: ['bottom', 'top'] }))),
52
+ React.createElement(HelpMark, { popoverProps: {
53
+ placement: COMMON_POPOVER_PLACEMENT,
54
+ } }, description))),
53
55
  template: ({ key, }, idx) => {
54
56
  var _a, _b, _c;
55
57
  const entitySpec = (_a = items === null || items === void 0 ? void 0 : items.properties) === null || _a === void 0 ? void 0 : _a[property];
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import { PasswordInput } from '@gravity-ui/components';
3
- import { TextInput } from '@gravity-ui/uikit';
2
+ import { PasswordInput, TextInput } from '@gravity-ui/uikit';
4
3
  import isNil from 'lodash/isNil';
5
4
  export const Text = ({ name, input: { value, onBlur, onChange, onFocus }, spec, inputProps, }) => {
6
5
  const props = Object.assign(Object.assign({ hasClear: true }, inputProps), { value: isNil(value) ? '' : `${value}`, onBlur: onBlur, onFocus: onFocus, onUpdate: onChange, disabled: spec.viewSpec.disabled, placeholder: spec.viewSpec.placeholder, qa: name });
7
6
  if (spec.viewSpec.type === 'password') {
8
- return (React.createElement(PasswordInput, Object.assign({}, props, { autoComplete: "new-password", showCopyButton: true, showRevealButton: true })));
7
+ return React.createElement(PasswordInput, Object.assign({}, props, { autoComplete: "new-password" }));
9
8
  }
10
9
  return React.createElement(TextInput, Object.assign({}, props, { type: "text" }));
11
10
  };
@@ -14,7 +14,7 @@ export const TextContentComponent = ({ spec, value, Layout, }) => {
14
14
  if (!text) {
15
15
  return null;
16
16
  }
17
- const iconLib = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) ? (React.createElement(LazyLoader, { component: loadIcon(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) })) : null;
17
+ const iconLib = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) ? (React.createElement(LazyLoader, { component: loadIcon(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.icon) })) : undefined;
18
18
  let content = React.createElement("span", { dangerouslySetInnerHTML: { __html: text } });
19
19
  if (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.themeAlert) {
20
20
  const titleAlert = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert) || !isEmpty(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert)
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { HelpPopover } from '@gravity-ui/components';
3
2
  import { TrashBin } from '@gravity-ui/icons';
4
- import { Button, Icon, Text } from '@gravity-ui/uikit';
3
+ import { Button, HelpMark, Icon, Text } from '@gravity-ui/uikit';
5
4
  import { isArrayItem, isArraySpec, isObjectSpec, withGenerateButton, } from '../../../../core';
6
5
  import { ErrorWrapper, GenerateRandomValueButton } from '../../../components';
7
6
  import { block } from '../../../utils';
7
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
8
8
  import './Column.css';
9
9
  const b = block('column');
10
10
  const ColumnBase = ({ name, spec, input, meta, children, }) => {
@@ -16,7 +16,9 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
16
16
  React.createElement(Text, { className: b('title', { required: spec.required }) }, spec.viewSpec.layoutTitle),
17
17
  spec.viewSpec.layoutDescription ? (React.createElement("span", { className: b('note') },
18
18
  React.createElement(Text, { className: b('note-inner') },
19
- React.createElement(HelpPopover, { htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })))) : null)),
19
+ React.createElement(HelpMark, { popoverProps: {
20
+ placement: COMMON_POPOVER_PLACEMENT,
21
+ } }, spec.viewSpec.layoutDescription)))) : null)),
20
22
  React.createElement("div", { className: b('second-row') },
21
23
  React.createElement("div", { className: b('second-row-inner') },
22
24
  React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { HelpPopover } from '@gravity-ui/components';
3
2
  import { TrashBin } from '@gravity-ui/icons';
4
- import { Button, Icon, Text } from '@gravity-ui/uikit';
3
+ import { Button, HelpMark, Icon, Text } from '@gravity-ui/uikit';
5
4
  import { isArrayItem, isArraySpec, isObjectSpec, withGenerateButton, } from '../../../../core';
6
5
  import { ErrorWrapper, GenerateRandomValueButton } from '../../../components';
7
6
  import { block } from '../../../utils';
7
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
8
8
  import './Row.css';
9
9
  const b = block('row');
10
10
  const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
@@ -16,7 +16,9 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
16
16
  React.createElement(Text, { className: b('title', { required: spec.required }) }, spec.viewSpec.layoutTitle),
17
17
  !verboseDescription && spec.viewSpec.layoutDescription ? (React.createElement("span", { className: b('note') },
18
18
  React.createElement(Text, { className: b('note-inner') },
19
- React.createElement(HelpPopover, { htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })))) : null)),
19
+ React.createElement(HelpMark, { popoverProps: {
20
+ placement: COMMON_POPOVER_PLACEMENT,
21
+ } }, spec.viewSpec.layoutDescription)))) : null)),
20
22
  React.createElement("div", { className: b('right') },
21
23
  React.createElement("div", { className: b('right-inner') },
22
24
  React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -37,12 +37,10 @@
37
37
  .df-section__title {
38
38
  max-width: var(--df-section-title-max-width, 533px);
39
39
  }
40
- .df-section__title-popover {
41
- display: flex;
42
- align-items: center;
43
- }
44
- .df-section__title-popover .g-popover__handler {
45
- display: flex;
40
+ .df-section__popover {
41
+ padding: var(--g-spacing-2);
42
+ overflow-wrap: break-word;
43
+ max-width: 300px;
46
44
  }
47
45
  .df-section__note {
48
46
  margin-left: var(--df-section-note-margin-left, 5px);
@@ -1,7 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
- import { HelpPopover } from '@gravity-ui/components';
4
- import { Popover, Text } from '@gravity-ui/uikit';
3
+ import { HelpMark, Popover, Text } from '@gravity-ui/uikit';
5
4
  import { GroupIndent } from '../../';
6
5
  import { RemoveButton } from '../../RemoveButton';
7
6
  import { COMMON_POPOVER_PLACEMENT, COMMON_TITLE_MAX_WIDTH, ErrorWrapper } from '../../../';
@@ -57,7 +56,9 @@ const SectionBase = (_a) => {
57
56
  }
58
57
  else {
59
58
  description = (React.createElement(Text, { className: b('note') },
60
- React.createElement(HelpPopover, { htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })));
59
+ React.createElement(HelpMark, { popoverProps: {
60
+ placement: COMMON_POPOVER_PLACEMENT,
61
+ } }, spec.viewSpec.layoutDescription)));
61
62
  }
62
63
  }
63
64
  const layoutTitle = spec.viewSpec.layoutTitle;
@@ -67,7 +68,7 @@ const SectionBase = (_a) => {
67
68
  'with-popover': !descriptionAsSubtitle,
68
69
  size: sizeTitle,
69
70
  }) },
70
- React.createElement(Popover, { className: b('title-popover'), content: layoutTitle, placement: COMMON_POPOVER_PLACEMENT, disabled: layoutTitlePopoverDisabled },
71
+ React.createElement(Popover, { className: b('popover'), content: layoutTitle, placement: COMMON_POPOVER_PLACEMENT, disabled: layoutTitlePopoverDisabled },
71
72
  React.createElement(Text, { className: b('title'), variant: variantTitle, ref: titleRef, ellipsis: true }, layoutTitle)),
72
73
  description,
73
74
  removeButton)) : null,
@@ -42,6 +42,9 @@
42
42
  .df-simple-vertical-accordeon__tooltip {
43
43
  margin: var(--df-simple-vertical-accordeon-tooltip-margin, var(--g-spacing-0) 5px);
44
44
  }
45
+ .df-simple-vertical-accordeon__popover {
46
+ padding: var(--g-spacing-2);
47
+ }
45
48
  .df-simple-vertical-accordeon__chevron {
46
49
  transform: rotate(-90deg);
47
50
  }
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { HelpPopover } from '@gravity-ui/components';
3
2
  import { ChevronDown } from '@gravity-ui/icons';
4
- import { Button, Icon, Popover, Text } from '@gravity-ui/uikit';
3
+ import { Button, HelpMark, Icon, Popover, Text } from '@gravity-ui/uikit';
5
4
  import { COMMON_POPOVER_PLACEMENT } from '../../constants/common';
6
5
  import { block } from '../../utils';
7
6
  import './SimpleVerticalAccordeon.css';
@@ -60,7 +59,7 @@ export class SimpleVerticalAccordeon extends React.Component {
60
59
  const currentTitleVariant = variantTitle || this.getCurrentTitleVariant();
61
60
  return (Boolean(React.Children.count(children)) && (React.createElement("div", { className: b({ branch: withBranchView, view: viewLayout }, className) },
62
61
  React.createElement("div", { className: b('header') },
63
- React.createElement(Popover, { content: title, disabled: titlePopoverDisabled, placement: COMMON_POPOVER_PLACEMENT },
62
+ React.createElement(Popover, { content: title, disabled: titlePopoverDisabled, placement: COMMON_POPOVER_PLACEMENT, className: b('popover'), hasArrow: true },
64
63
  React.createElement(Button, { view: "flat", className: b('header-inner', buttonClassName), onClick: this.handleClick, qa: `${name}-accordeon-toggler`, width: "auto" },
65
64
  React.createElement(Text, { variant: currentTitleVariant }, title),
66
65
  React.createElement(Icon, { data: ChevronDown, className: b('chevron', { open }), size: 16 }))),
@@ -88,7 +87,9 @@ export class SimpleVerticalAccordeon extends React.Component {
88
87
  getTooltip() {
89
88
  const { note } = this.props;
90
89
  return note ? (React.createElement(Text, { className: b('tooltip') },
91
- React.createElement(HelpPopover, { htmlContent: note, placement: ['bottom', 'top'] }))) : null;
90
+ React.createElement(HelpMark, { popoverProps: {
91
+ placement: COMMON_POPOVER_PLACEMENT,
92
+ } }, note))) : null;
92
93
  }
93
94
  }
94
95
  SimpleVerticalAccordeon.defaultProps = {
@@ -1,13 +1,15 @@
1
1
  import React from 'react';
2
- import { HelpPopover } from '@gravity-ui/components';
3
- import { Card, Text } from '@gravity-ui/uikit';
2
+ import { Card, HelpMark, Text } from '@gravity-ui/uikit';
4
3
  import { block } from '../../utils';
4
+ import { COMMON_POPOVER_PLACEMENT } from '../../constants/common';
5
5
  import './TogglerCard.css';
6
6
  const b = block('toggler-card');
7
7
  export const TogglerCard = ({ description, title, text, onClick, disabled, selected, }) => {
8
8
  return (React.createElement(Card, { onClick: onClick, type: "selection", disabled: disabled ? !selected : disabled, selected: selected, size: "m", className: b() },
9
9
  React.createElement("div", { className: b('header') },
10
10
  React.createElement(Text, { variant: "subheader-2", ellipsis: true }, title),
11
- description ? (React.createElement(HelpPopover, { htmlContent: description, placement: ['bottom', 'top'] })) : null),
11
+ description ? (React.createElement(HelpMark, { popoverProps: {
12
+ placement: COMMON_POPOVER_PLACEMENT,
13
+ } }, description)) : null),
12
14
  React.createElement(Text, { variant: "body-1", color: "secondary", className: b('text') }, text)));
13
15
  };
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { Text } from '@gravity-ui/uikit';
3
- import { HelpPopover } from '@gravity-ui/components';
2
+ import { HelpMark, Text } from '@gravity-ui/uikit';
4
3
  import { useDynamicFormsCtx } from '../../../../core';
5
4
  import { CopyButton } from '../../../../kit';
6
5
  import { block, isNotEmptyValue } from '../../../utils';
6
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
7
7
  import './ViewColumn.css';
8
8
  const b = block('view-column');
9
9
  export const ViewColumn = ({ value, spec, children, }) => {
@@ -14,7 +14,9 @@ export const ViewColumn = ({ value, spec, children, }) => {
14
14
  return (React.createElement("div", { className: b() },
15
15
  React.createElement("div", { className: b('first-row') },
16
16
  React.createElement(Text, { color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
17
- showLayoutDescription && spec.viewSpec.layoutDescription ? (React.createElement(HelpPopover, { className: b('note'), htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })) : null),
17
+ showLayoutDescription && spec.viewSpec.layoutDescription ? (React.createElement(HelpMark, { className: b('note'), popoverProps: {
18
+ placement: COMMON_POPOVER_PLACEMENT,
19
+ } }, spec.viewSpec.layoutDescription)) : null),
18
20
  React.createElement("div", { className: b('second-row') }, children),
19
21
  React.createElement(CopyButton, { spec: spec, value: value })));
20
22
  };
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { Text } from '@gravity-ui/uikit';
3
- import { HelpPopover } from '@gravity-ui/components';
2
+ import { HelpMark, Text } from '@gravity-ui/uikit';
4
3
  import { useDynamicFormsCtx } from '../../../../core';
5
4
  import { CopyButton } from '../../../../kit';
6
5
  import { block, isNotEmptyValue } from '../../../utils';
6
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
7
7
  import './ViewRow.css';
8
8
  const b = block('view-row');
9
9
  export const ViewRow = ({ value, spec, children, }) => {
@@ -14,7 +14,9 @@ export const ViewRow = ({ value, spec, children, }) => {
14
14
  return (React.createElement("div", { className: b() },
15
15
  React.createElement("div", { className: b('left') },
16
16
  React.createElement(Text, { whiteSpace: "nowrap", color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
17
- showLayoutDescription && spec.viewSpec.layoutDescription ? (React.createElement(HelpPopover, { className: b('note'), htmlContent: spec.viewSpec.layoutDescription, placement: ['bottom', 'top'] })) : null,
17
+ showLayoutDescription && spec.viewSpec.layoutDescription ? (React.createElement(HelpMark, { className: b('note'), popoverProps: {
18
+ placement: COMMON_POPOVER_PLACEMENT,
19
+ } }, spec.viewSpec.layoutDescription)) : null,
18
20
  React.createElement("div", { className: b('dots') })),
19
21
  React.createElement("div", { className: b('right') }, children),
20
22
  React.createElement(CopyButton, { spec: spec, value: value })));
@@ -30,16 +30,18 @@
30
30
  .df-checkbox-group-view_vertical > *:not(:last-child) {
31
31
  margin: var(--df-checkbox-group-view-vertical-child-margin, var(--g-spacing-0) var(--g-spacing-0) 6px);
32
32
  }
33
- .df-checkbox-group-view__tooltip {
33
+ .df-checkbox-group-view__popover {
34
+ padding: var(--g-spacing-2);
34
35
  overflow-wrap: break-word;
36
+ max-width: 300px;
35
37
  }
36
- .df-checkbox-group-view__tooltip-container {
37
- max-width: var(--df-tooltip-container-max-width, 100%);
38
+ .df-checkbox-group-view__item {
39
+ max-width: var(--df-popover-item-max-width, 100%);
38
40
  overflow: hidden;
39
41
  text-overflow: ellipsis;
40
42
  display: block;
41
- margin-bottom: var(--df-tooltip-container-margin-bottom, 6px);
43
+ margin-bottom: var(--df-popover-item-margin-bottom, 6px);
42
44
  }
43
- .df-checkbox-group-view__tooltip-container:last-child {
45
+ .df-checkbox-group-view__item:last-child {
44
46
  margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
45
47
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Popover } from '@gravity-ui/uikit';
2
+ import { Popover, Text } from '@gravity-ui/uikit';
3
3
  import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
4
4
  import { block } from '../../../utils';
5
5
  import './CheckboxGroupView.css';
@@ -9,7 +9,8 @@ export const CheckboxGroupView = ({ spec, value = [] }) => {
9
9
  const _value = value;
10
10
  const items = React.useMemo(() => _value.map((item) => { var _a; return ((_a = spec.description) === null || _a === void 0 ? void 0 : _a[item]) || item; }), [spec.description, _value]);
11
11
  const verticalPlacement = React.useMemo(() => { var _a; return ((_a = spec.viewSpec.checkboxGroupParams) === null || _a === void 0 ? void 0 : _a.placement) === 'vertical'; }, [(_a = spec.viewSpec.checkboxGroupParams) === null || _a === void 0 ? void 0 : _a.placement]);
12
- return (React.createElement("div", { className: b({ vertical: verticalPlacement }) }, items.map((item, idx) => (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT, key: item, content: item, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: item.length < 51 },
13
- item,
14
- !verticalPlacement && idx !== items.length - 1 ? ', ' : null)))));
12
+ return (React.createElement("div", { className: b({ vertical: verticalPlacement }) }, items.map((item, idx) => (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), key: item, hasArrow: true, disabled: item.length < 51 },
13
+ React.createElement(Text, { className: b('item') },
14
+ item,
15
+ !verticalPlacement && idx !== items.length - 1 ? ', ' : null))))));
15
16
  };
@@ -17,17 +17,19 @@
17
17
  }
18
18
  */
19
19
  /* Border-radius */
20
- .df-multi-oneof-view__tooltip {
20
+ .df-multi-oneof-view__popover {
21
+ padding: var(--g-spacing-2);
21
22
  overflow-wrap: break-word;
23
+ max-width: 300px;
22
24
  }
23
- .df-multi-oneof-view__tooltip-container {
24
- max-width: var(--df-tooltip-container-max-width, 100%);
25
+ .df-multi-oneof-view__item {
26
+ max-width: var(--df-popover-item-max-width, 100%);
25
27
  overflow: hidden;
26
28
  text-overflow: ellipsis;
27
29
  display: block;
28
- margin-bottom: var(--df-tooltip-container-margin-bottom, 6px);
30
+ margin-bottom: var(--df-popover-item-margin-bottom, 6px);
29
31
  }
30
- .df-multi-oneof-view__tooltip-container:last-child {
32
+ .df-multi-oneof-view__item:last-child {
31
33
  margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
32
34
  }
33
35
  .df-multi-oneof-view__content_multiple-values > .df-group-indent {
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { Popover } from '@gravity-ui/uikit';
2
+ import { Popover, Text } from '@gravity-ui/uikit';
3
3
  import isObjectLike from 'lodash/isObjectLike';
4
4
  import { ViewController } from '../../../../core';
5
5
  import { block } from '../../../utils';
6
6
  import { GroupIndent } from '../../GroupIndent';
7
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
7
8
  import './MultiOneOfView.css';
8
9
  const b = block('multi-oneof-view');
9
10
  export const MultiOneOfView = (props) => {
@@ -20,7 +21,8 @@ export const MultiOneOfView = (props) => {
20
21
  }), [spec.description, specProperties, values]);
21
22
  const selectView = React.useMemo(() => {
22
23
  const selectView = (React.createElement(React.Fragment, null, items.map((item) => {
23
- return (React.createElement(Popover, { placement: ['bottom', 'top'], key: item, content: item, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: item.length < 51 }, item));
24
+ return (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), disabled: item.length < 51, hasArrow: true, key: item },
25
+ React.createElement(Text, { className: b('item') }, item)));
24
26
  })));
25
27
  if (Layout) {
26
28
  return (React.createElement(Layout, Object.assign({}, props, { value: values }), selectView));
@@ -17,16 +17,18 @@
17
17
  }
18
18
  */
19
19
  /* Border-radius */
20
- .df-multiselect-view__tooltip {
20
+ .df-multiselect-view__popover {
21
+ padding: var(--g-spacing-2);
21
22
  overflow-wrap: break-word;
23
+ max-width: 300px;
22
24
  }
23
- .df-multiselect-view__tooltip-container {
24
- max-width: var(--df-tooltip-container-max-width, 100%);
25
+ .df-multiselect-view__item {
26
+ max-width: var(--df-popover-item-max-width, 100%);
25
27
  overflow: hidden;
26
28
  text-overflow: ellipsis;
27
29
  display: block;
28
- margin-bottom: var(--df-tooltip-container-margin-bottom, 6px);
30
+ margin-bottom: var(--df-popover-item-margin-bottom, 6px);
29
31
  }
30
- .df-multiselect-view__tooltip-container:last-child {
32
+ .df-multiselect-view__item:last-child {
31
33
  margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
32
34
  }
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
- import { Popover } from '@gravity-ui/uikit';
2
+ import { Popover, Text } from '@gravity-ui/uikit';
3
3
  import { block } from '../../../utils';
4
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
4
5
  import './MultiSelectView.css';
5
6
  const b = block('multiselect-view');
6
7
  export const MultiSelectView = ({ spec, value = [] }) => {
7
8
  const _value = value;
8
9
  const items = React.useMemo(() => _value.map((item) => { var _a; return ((_a = spec.description) === null || _a === void 0 ? void 0 : _a[item]) || item; }), [spec.description, _value]);
9
- return (React.createElement(React.Fragment, null, items.map((item) => (React.createElement(Popover, { placement: ['bottom', 'top'], key: item, content: item, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: item.length < 51 }, item)))));
10
+ return (React.createElement(React.Fragment, null, items.map((item) => (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), disabled: item.length < 51, hasArrow: true, key: item },
11
+ React.createElement(Text, { className: b('item') }, item))))));
10
12
  };
@@ -20,14 +20,16 @@
20
20
  .df-number-with-scale-view {
21
21
  display: flex;
22
22
  }
23
- .df-number-with-scale-view__tooltip {
23
+ .df-number-with-scale-view__popover {
24
+ padding: var(--g-spacing-2);
24
25
  overflow-wrap: break-word;
26
+ max-width: 300px;
25
27
  }
26
- .df-number-with-scale-view__tooltip-container {
27
- white-space: nowrap;
28
+ .df-number-with-scale-view__item {
29
+ max-width: var(--df-popover-item-max-width, 100%);
28
30
  overflow: hidden;
29
31
  text-overflow: ellipsis;
30
- max-width: var(--df-tooltip-container-max-width, 100%);
32
+ display: block;
31
33
  }
32
34
  .df-number-with-scale-view__size {
33
35
  margin-left: var(--df-number-with-scale-view-size-margin-left, var(--g-spacing-half));
@@ -8,7 +8,8 @@ const NumberWithScaleViewBase = ({ spec, value }) => {
8
8
  const { initialValue, initialType } = useInitial(value || '', spec, [value]);
9
9
  const { scale } = spec.viewSpec.sizeParams;
10
10
  return (React.createElement("div", { className: b() },
11
- React.createElement(Popover, { placement: ['bottom', 'top'], content: initialValue, className: b('tooltip-container'), contentClassName: b('tooltip'), disabled: initialValue.length < 26 }, initialValue),
11
+ React.createElement(Popover, { placement: ['bottom', 'top'], content: initialValue, className: b('popover'), disabled: initialValue.length < 26, hasArrow: true },
12
+ React.createElement(Text, { className: b('item') }, initialValue)),
12
13
  React.createElement(Text, { className: b('size') }, scale[initialType].title)));
13
14
  };
14
15
  export const NumberWithScaleView = (props) => isCorrectSizeParams(props.spec) && props.value ? React.createElement(NumberWithScaleViewBase, Object.assign({}, props)) : null;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { Flex, Table } from '@gravity-ui/uikit';
2
+ import { Flex, HelpMark, Table } from '@gravity-ui/uikit';
3
3
  import { ViewController, isArraySpec, isBooleanSpec, isObjectSpec, useDynamicFormsCtx, } from '../../../../core';
4
4
  import { block } from '../../../utils';
5
+ import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
5
6
  import './TableArrayView.css';
6
- import { HelpPopover } from '@gravity-ui/components';
7
7
  const b = block('table-array-view');
8
8
  export const TableArrayView = ({ value = [], spec, name }) => {
9
9
  const { showLayoutDescription } = useDynamicFormsCtx();
@@ -23,7 +23,9 @@ export const TableArrayView = ({ value = [], spec, name }) => {
23
23
  name: description && showLayoutDescription
24
24
  ? () => (React.createElement(Flex, { gap: 0.5, alignItems: "center" },
25
25
  label,
26
- React.createElement(HelpPopover, { htmlContent: description, placement: ['bottom', 'top'] })))
26
+ React.createElement(HelpMark, { popoverProps: {
27
+ placement: COMMON_POPOVER_PLACEMENT,
28
+ } }, description)))
27
29
  : label,
28
30
  template: (_, idx) => {
29
31
  var _a;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Checkbox, RadioButton, Select } from '@gravity-ui/uikit';
2
+ import { Checkbox, SegmentedRadioGroup, Select } from '@gravity-ui/uikit';
3
3
  import isObjectLike from 'lodash/isObjectLike';
4
4
  import some from 'lodash/some';
5
5
  import { TogglerCard } from '../../components';
@@ -96,7 +96,7 @@ export const useOneOf = ({ props, onTogglerChange }) => {
96
96
  return (React.createElement("div", { className: b('checkbox') },
97
97
  React.createElement(Checkbox, { checked: checkboxValue, onUpdate: onCheckboxChange, disabled: spec.viewSpec.disabled, qa: name })));
98
98
  }
99
- return (React.createElement(RadioButton, { value: oneOfValue, onChange: (event) => onOneOfChange([event.target.value]), disabled: spec.viewSpec.disabled, qa: name }, options.map((option) => (React.createElement(RadioButton.Option, { key: option.value, value: option.value }, option.title)))));
99
+ return (React.createElement(SegmentedRadioGroup, { value: oneOfValue, onChange: (event) => onOneOfChange([event.target.value]), disabled: spec.viewSpec.disabled, qa: name }, options.map((option) => (React.createElement(SegmentedRadioGroup.Option, { key: option.value, value: option.value }, option.title)))));
100
100
  }, [
101
101
  togglerType,
102
102
  oneOfValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dynamic-forms",
3
- "version": "4.17.0",
3
+ "version": "5.0.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "build/cjs/index.js",
@@ -45,11 +45,10 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@bem-react/classname": "^1.6.0",
48
- "@gravity-ui/components": "^3.0.0",
49
- "@gravity-ui/date-components": "^2.10.3",
48
+ "@gravity-ui/date-components": "^3.0.0",
50
49
  "@gravity-ui/date-utils": "^2.5.5",
51
50
  "@gravity-ui/i18n": "^1.2.0",
52
- "@gravity-ui/icons": "^2.8.1",
51
+ "@gravity-ui/icons": "^2.12.0",
53
52
  "lodash": "^4.17.20"
54
53
  },
55
54
  "devDependencies": {
@@ -61,7 +60,7 @@
61
60
  "@gravity-ui/prettier-config": "^1.1.0",
62
61
  "@gravity-ui/stylelint-config": "^4.0.1",
63
62
  "@gravity-ui/tsconfig": "^1.0.0",
64
- "@gravity-ui/uikit": "^6.0.0",
63
+ "@gravity-ui/uikit": "^7.1.0",
65
64
  "@playwright/experimental-ct-react": "^1.40.0",
66
65
  "@playwright/test": "^1.40.0",
67
66
  "@storybook/addon-essentials": "^7.0.27",
@@ -115,7 +114,7 @@
115
114
  "uuid": "^9.0.1"
116
115
  },
117
116
  "peerDependencies": {
118
- "@gravity-ui/uikit": "^6.0.0",
117
+ "@gravity-ui/uikit": "^7.0.0",
119
118
  "final-form": "^4.20.2",
120
119
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0",
121
120
  "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0",