@gravity-ui/page-constructor 4.34.1 → 4.35.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.
@@ -9,7 +9,7 @@ unpredictable css rules order in build */
9
9
  line-height: var(--g-text-display-2-line-height);
10
10
  color: var(--pc-text-header-color);
11
11
  font-weight: var(--g-text-accent-font-weight);
12
- top: calc(var(--header-height) + 32px);
12
+ top: calc(var(--header-height) + 0px);
13
13
  position: sticky;
14
14
  margin-right: 32px;
15
15
  }
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SVGIconData } from '@gravity-ui/uikit/build/esm/components/Icon/types';
3
+ export declare const defaultIconId = "icon-test-id";
3
4
  export interface ControlProps {
4
5
  icon: SVGIconData;
5
6
  theme?: 'primary' | 'secondary' | 'link' | 'accent';
@@ -8,6 +9,7 @@ export interface ControlProps {
8
9
  disabled?: boolean;
9
10
  className?: string;
10
11
  onClick?: (event: React.MouseEvent) => void;
12
+ qa?: string;
11
13
  }
12
14
  declare const Control: (props: ControlProps) => JSX.Element;
13
15
  export default Control;
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultIconId = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const uikit_1 = require("@gravity-ui/uikit");
6
7
  const utils_1 = require("../../utils");
7
8
  const i18n_1 = tslib_1.__importDefault(require("./i18n"));
8
9
  const b = (0, utils_1.block)('control');
10
+ exports.defaultIconId = 'icon-test-id';
9
11
  const Control = (props) => {
10
- const { icon, theme = 'primary', size = 's', iconSize = 16, disabled = false, onClick, className, } = props;
11
- return (react_1.default.createElement("button", { type: "button", "aria-label": (0, i18n_1.default)('aria-label'), className: b({ size, theme, disabled }, className), onClick: disabled ? undefined : onClick, disabled: disabled },
12
- react_1.default.createElement(uikit_1.Icon, { data: icon, size: iconSize })));
12
+ const { icon, theme = 'primary', size = 's', iconSize = 16, disabled = false, onClick, className, qa, } = props;
13
+ return (react_1.default.createElement("button", { type: "button", "aria-label": (0, i18n_1.default)('aria-label'), className: b({ size, theme, disabled }, className), onClick: disabled ? undefined : onClick, disabled: disabled, "data-qa": qa },
14
+ react_1.default.createElement(uikit_1.Icon, { data: icon, size: iconSize, qa: exports.defaultIconId })));
13
15
  };
14
16
  exports.default = Control;
@@ -3,7 +3,6 @@ unpredictable css rules order in build */
3
3
  .pc-table {
4
4
  font-size: var(--g-text-body-2-font-size);
5
5
  line-height: var(--g-text-body-2-line-height);
6
- margin-top: 32px;
7
6
  }
8
7
  .pc-table__table {
9
8
  width: 100%;
@@ -9,7 +9,7 @@ unpredictable css rules order in build */
9
9
  line-height: var(--g-text-display-2-line-height);
10
10
  color: var(--pc-text-header-color);
11
11
  font-weight: var(--g-text-accent-font-weight);
12
- top: calc(var(--header-height) + 32px);
12
+ top: calc(var(--header-height) + 0px);
13
13
  position: sticky;
14
14
  margin-right: 32px;
15
15
  }
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SVGIconData } from '@gravity-ui/uikit/build/esm/components/Icon/types';
3
3
  import './Control.css';
4
+ export declare const defaultIconId = "icon-test-id";
4
5
  export interface ControlProps {
5
6
  icon: SVGIconData;
6
7
  theme?: 'primary' | 'secondary' | 'link' | 'accent';
@@ -9,6 +10,7 @@ export interface ControlProps {
9
10
  disabled?: boolean;
10
11
  className?: string;
11
12
  onClick?: (event: React.MouseEvent) => void;
13
+ qa?: string;
12
14
  }
13
15
  declare const Control: (props: ControlProps) => JSX.Element;
14
16
  export default Control;
@@ -4,9 +4,10 @@ import { block } from '../../utils';
4
4
  import i18n from './i18n';
5
5
  import './Control.css';
6
6
  const b = block('control');
7
+ export const defaultIconId = 'icon-test-id';
7
8
  const Control = (props) => {
8
- const { icon, theme = 'primary', size = 's', iconSize = 16, disabled = false, onClick, className, } = props;
9
- return (React.createElement("button", { type: "button", "aria-label": i18n('aria-label'), className: b({ size, theme, disabled }, className), onClick: disabled ? undefined : onClick, disabled: disabled },
10
- React.createElement(Icon, { data: icon, size: iconSize })));
9
+ const { icon, theme = 'primary', size = 's', iconSize = 16, disabled = false, onClick, className, qa, } = props;
10
+ return (React.createElement("button", { type: "button", "aria-label": i18n('aria-label'), className: b({ size, theme, disabled }, className), onClick: disabled ? undefined : onClick, disabled: disabled, "data-qa": qa },
11
+ React.createElement(Icon, { data: icon, size: iconSize, qa: defaultIconId })));
11
12
  };
12
13
  export default Control;
@@ -3,7 +3,6 @@ unpredictable css rules order in build */
3
3
  .pc-table {
4
4
  font-size: var(--g-text-body-2-font-size);
5
5
  line-height: var(--g-text-body-2-line-height);
6
- margin-top: 32px;
7
6
  }
8
7
  .pc-table__table {
9
8
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "4.34.1",
3
+ "version": "4.35.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {