@gravity-ui/page-constructor 5.15.3 → 5.16.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.
Files changed (67) hide show
  1. package/README.md +1 -1
  2. package/build/cjs/blocks/CardLayout/CardLayout.d.ts +2 -2
  3. package/build/cjs/blocks/Header/Header.d.ts +3 -2
  4. package/build/cjs/blocks/Slider/Slider.d.ts +3 -2
  5. package/build/cjs/components/AnimateBlock/AnimateBlock.d.ts +3 -3
  6. package/build/cjs/components/Author/Author.d.ts +3 -2
  7. package/build/cjs/components/BackgroundImage/BackgroundImage.d.ts +3 -2
  8. package/build/cjs/components/BalancedMasonry/BalancedMasonry.d.ts +3 -3
  9. package/build/cjs/components/ErrorWrapper/ErrorWrapper.d.ts +2 -2
  10. package/build/cjs/components/FileLink/FileLink.d.ts +3 -2
  11. package/build/cjs/components/Foldable/Foldable.d.ts +3 -2
  12. package/build/cjs/components/HTML/HTML.d.ts +1 -2
  13. package/build/cjs/components/Link/Link.d.ts +3 -2
  14. package/build/cjs/components/RouterLink/RouterLink.d.ts +2 -2
  15. package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.d.ts +2 -2
  16. package/build/cjs/constructor-items.d.ts +2 -2
  17. package/build/cjs/containers/PageConstructor/Provider.d.ts +3 -2
  18. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +2 -2
  19. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +3 -2
  20. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  21. package/build/cjs/containers/PageConstructor/components/ConstructorRow/ConstructorRow.d.ts +2 -2
  22. package/build/cjs/context/locationContext/locationContext.d.ts +1 -2
  23. package/build/cjs/grid/Col/Col.d.ts +2 -2
  24. package/build/cjs/grid/Grid/Grid.d.ts +1 -2
  25. package/build/cjs/models/constructor.d.ts +2 -2
  26. package/build/cjs/models/index.d.ts +0 -1
  27. package/build/cjs/models/index.js +0 -1
  28. package/build/cjs/navigation/components/Navigation/Navigation.js +1 -1
  29. package/build/esm/blocks/CardLayout/CardLayout.d.ts +2 -2
  30. package/build/esm/blocks/Header/Header.d.ts +3 -2
  31. package/build/esm/blocks/Slider/Slider.d.ts +3 -2
  32. package/build/esm/components/AnimateBlock/AnimateBlock.d.ts +3 -3
  33. package/build/esm/components/Author/Author.d.ts +3 -2
  34. package/build/esm/components/BackgroundImage/BackgroundImage.d.ts +3 -2
  35. package/build/esm/components/BalancedMasonry/BalancedMasonry.d.ts +3 -3
  36. package/build/esm/components/ErrorWrapper/ErrorWrapper.d.ts +2 -2
  37. package/build/esm/components/FileLink/FileLink.d.ts +3 -2
  38. package/build/esm/components/Foldable/Foldable.d.ts +3 -2
  39. package/build/esm/components/HTML/HTML.d.ts +1 -2
  40. package/build/esm/components/Link/Link.d.ts +3 -2
  41. package/build/esm/components/Link/Link.js +1 -1
  42. package/build/esm/components/RouterLink/RouterLink.d.ts +2 -2
  43. package/build/esm/components/UnpublishedLabel/UnpublishedLabel.d.ts +2 -2
  44. package/build/esm/constructor-items.d.ts +2 -2
  45. package/build/esm/containers/PageConstructor/Provider.d.ts +3 -2
  46. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +2 -2
  47. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +3 -2
  48. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  49. package/build/esm/containers/PageConstructor/components/ConstructorRow/ConstructorRow.d.ts +2 -2
  50. package/build/esm/context/locationContext/locationContext.d.ts +1 -2
  51. package/build/esm/grid/Col/Col.d.ts +2 -2
  52. package/build/esm/grid/Grid/Grid.d.ts +1 -2
  53. package/build/esm/models/constructor.d.ts +2 -2
  54. package/build/esm/models/index.d.ts +0 -1
  55. package/build/esm/models/index.js +0 -1
  56. package/build/esm/navigation/components/Navigation/Navigation.js +1 -1
  57. package/package.json +1 -1
  58. package/server/models/constructor.d.ts +2 -2
  59. package/server/models/index.d.ts +0 -1
  60. package/server/models/index.js +0 -1
  61. package/widget/index.js +1 -1
  62. package/build/cjs/models/react.d.ts +0 -4
  63. package/build/cjs/models/react.js +0 -2
  64. package/build/esm/models/react.d.ts +0 -4
  65. package/build/esm/models/react.js +0 -1
  66. package/server/models/react.d.ts +0 -4
  67. package/server/models/react.js +0 -2
package/README.md CHANGED
@@ -25,7 +25,7 @@ The page constructor is imported as a React component. To make sure it runs prop
25
25
  ```jsx
26
26
  import {PageConstructor, PageConstructorProvider} from '@gravity-ui/page-constructor';
27
27
 
28
- const Page: WithChildren<PageProps> = ({content}) => (
28
+ const Page: React.PropsWithChildren<PageProps> = ({content}) => (
29
29
  <PageConstructorProvider>
30
30
  <PageConstructor content={content} />
31
31
  </PageConstructorProvider>
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps, WithChildren } from '../../models';
3
- export type CardLayoutBlockProps = WithChildren<Omit<CardLayoutBlockParams, 'children'>> & ClassNameProps;
2
+ import { CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps } from '../../models';
3
+ export type CardLayoutBlockProps = React.PropsWithChildren<Omit<CardLayoutBlockParams, 'children'>> & ClassNameProps;
4
4
  declare const CardLayout: React.FC<CardLayoutBlockProps>;
5
5
  export default CardLayout;
@@ -1,4 +1,5 @@
1
- import { ClassNameProps, HeaderBlockProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { ClassNameProps, HeaderBlockProps } from '../../models';
2
3
  type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps;
3
- export declare const HeaderBlock: (props: WithChildren<HeaderBlockFullProps>) => JSX.Element;
4
+ export declare const HeaderBlock: (props: React.PropsWithChildren<HeaderBlockFullProps>) => JSX.Element;
4
5
  export default HeaderBlock;
@@ -1,5 +1,6 @@
1
+ import React from 'react';
1
2
  import { Settings } from 'react-slick';
2
- import { ClassNameProps, Refable, SliderProps as SliderParams, WithChildren } from '../../models';
3
+ import { ClassNameProps, Refable, SliderProps as SliderParams } from '../../models';
3
4
  export interface SliderProps extends Omit<SliderParams, 'children'>, Refable<HTMLDivElement>, ClassNameProps, Pick<Settings, 'lazyLoad'> {
4
5
  type?: string;
5
6
  anchorId?: string;
@@ -9,5 +10,5 @@ export interface SliderProps extends Omit<SliderParams, 'children'>, Refable<HTM
9
10
  blockClassName?: string;
10
11
  arrowSize?: number;
11
12
  }
12
- export declare const SliderBlock: (props: WithChildren<SliderProps>) => JSX.Element;
13
+ export declare const SliderBlock: (props: React.PropsWithChildren<SliderProps>) => JSX.Element;
13
14
  export default SliderBlock;
@@ -1,6 +1,6 @@
1
- import { CSSProperties } from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { AnimateContextProps } from '../../context/animateContext/AnimateContext';
3
- import { QAProps, WithChildren } from '../../models';
3
+ import { QAProps } from '../../models';
4
4
  export interface AnimateBlockProps extends AnimateContextProps, QAProps {
5
5
  animate?: boolean;
6
6
  offset?: number;
@@ -8,5 +8,5 @@ export interface AnimateBlockProps extends AnimateContextProps, QAProps {
8
8
  style?: CSSProperties;
9
9
  onScroll?: () => void;
10
10
  }
11
- declare const AnimateBlock: (props: WithChildren<AnimateBlockProps>) => JSX.Element;
11
+ declare const AnimateBlock: (props: React.PropsWithChildren<AnimateBlockProps>) => JSX.Element;
12
12
  export default AnimateBlock;
@@ -1,3 +1,4 @@
1
- import { AuthorProps, WithChildren } from '../../models';
2
- declare const Author: (props: WithChildren<AuthorProps>) => JSX.Element;
1
+ import React from 'react';
2
+ import { AuthorProps } from '../../models';
3
+ declare const Author: (props: React.PropsWithChildren<AuthorProps>) => JSX.Element;
3
4
  export default Author;
@@ -1,4 +1,5 @@
1
- import { BackgroundImageProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { BackgroundImageProps } from '../../models';
2
3
  export declare const qaIdByDefault = "background-image";
3
- declare const BackgroundImage: (props: WithChildren<BackgroundImageProps>) => JSX.Element;
4
+ declare const BackgroundImage: (props: React.PropsWithChildren<BackgroundImageProps>) => JSX.Element;
4
5
  export default BackgroundImage;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { QAProps, WithChildren } from '../../models';
1
+ import React, { ReactNode } from 'react';
2
+ import { QAProps } from '../../models';
3
3
  export interface BalancedMasonryProps extends QAProps {
4
4
  className: string;
5
5
  columnClassName: string;
@@ -8,5 +8,5 @@ export interface BalancedMasonryProps extends QAProps {
8
8
  [key: number]: number;
9
9
  };
10
10
  }
11
- declare const BalancedMasonry: (props: WithChildren<BalancedMasonryProps>) => JSX.Element;
11
+ declare const BalancedMasonry: (props: React.PropsWithChildren<BalancedMasonryProps>) => JSX.Element;
12
12
  export default BalancedMasonry;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ClassNameProps, WithChildren } from '../../models';
2
+ import { ClassNameProps } from '../../models';
3
3
  export interface ErrorWrapperProps extends ClassNameProps {
4
4
  text: string;
5
5
  handler: () => void;
@@ -7,5 +7,5 @@ export interface ErrorWrapperProps extends ClassNameProps {
7
7
  buttonText: string;
8
8
  children: React.ReactNode;
9
9
  }
10
- declare const ErrorWrapper: ({ text, buttonText, className, handler, isError, children, }: WithChildren<ErrorWrapperProps>) => JSX.Element;
10
+ declare const ErrorWrapper: ({ text, buttonText, className, handler, isError, children, }: React.PropsWithChildren<ErrorWrapperProps>) => JSX.Element;
11
11
  export default ErrorWrapper;
@@ -1,4 +1,5 @@
1
- import { FileLinkProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { FileLinkProps } from '../../models';
2
3
  export declare enum FileExtension {
3
4
  PDF = "pdf",
4
5
  DOC = "doc",
@@ -8,5 +9,5 @@ export declare enum FileExtension {
8
9
  ZIP = "zip"
9
10
  }
10
11
  export declare function getFileExt(name: string): string;
11
- declare const FileLink: (props: WithChildren<FileLinkProps>) => JSX.Element;
12
+ declare const FileLink: (props: React.PropsWithChildren<FileLinkProps>) => JSX.Element;
12
13
  export default FileLink;
@@ -1,7 +1,8 @@
1
- import { QAProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { QAProps } from '../../models';
2
3
  export interface FoldableProps extends QAProps {
3
4
  isOpened: boolean;
4
5
  className?: string;
5
6
  }
6
- declare const Foldable: ({ isOpened, children, className, qa }: WithChildren<FoldableProps>) => JSX.Element;
7
+ declare const Foldable: ({ isOpened, children, className, qa }: React.PropsWithChildren<FoldableProps>) => JSX.Element;
7
8
  export default Foldable;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { WithChildren } from '../../models';
3
2
  import { QAProps } from '../../models/common';
4
3
  export interface HTMLProps {
5
4
  children?: string;
@@ -8,7 +7,7 @@ export interface HTMLProps {
8
7
  itemProp?: string;
9
8
  id?: string;
10
9
  }
11
- declare const HTML: ({ children, block, className, itemProp, id, qa, }: WithChildren<HTMLProps & QAProps>) => React.DetailedReactHTMLElement<{
10
+ declare const HTML: ({ children, block, className, itemProp, id, qa, }: React.PropsWithChildren<HTMLProps & QAProps>) => React.DetailedReactHTMLElement<{
12
11
  dangerouslySetInnerHTML: {
13
12
  __html: string | (string & React.ReactElement<any, string | React.JSXElementConstructor<any>>) | (string & React.ReactFragment) | (string & React.ReactPortal);
14
13
  };
@@ -1,5 +1,6 @@
1
- import { ClassNameProps, LinkProps, Tabbable, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { ClassNameProps, LinkProps, Tabbable } from '../../models';
2
3
  import { QAProps } from '../../models/common';
3
4
  export type LinkFullProps = LinkProps & ClassNameProps & Tabbable & QAProps;
4
- declare const LinkBlock: (props: WithChildren<LinkFullProps>) => JSX.Element;
5
+ declare const LinkBlock: (props: React.PropsWithChildren<LinkFullProps>) => JSX.Element;
5
6
  export default LinkBlock;
@@ -1,7 +1,7 @@
1
- import { WithChildren } from '../../models';
1
+ import React from 'react';
2
2
  export interface RouterLinkProps {
3
3
  href: string;
4
4
  [key: string]: unknown;
5
5
  }
6
- declare const RouterLink: ({ href, children }: WithChildren<RouterLinkProps>) => JSX.Element;
6
+ declare const RouterLink: ({ href, children }: React.PropsWithChildren<RouterLinkProps>) => JSX.Element;
7
7
  export default RouterLink;
@@ -1,8 +1,8 @@
1
- import { WithChildren } from '../../models';
1
+ import React from 'react';
2
2
  export type LabeLType = 'label' | 'line';
3
3
  export interface UnpublishedLabelProps {
4
4
  type?: LabeLType;
5
5
  className?: string;
6
6
  }
7
- declare const UnpublishedLabel: ({ className, children, type, }: WithChildren<UnpublishedLabelProps>) => JSX.Element;
7
+ declare const UnpublishedLabel: ({ className, children, type, }: React.PropsWithChildren<UnpublishedLabelProps>) => JSX.Element;
8
8
  export default UnpublishedLabel;
@@ -1,5 +1,5 @@
1
1
  export declare const blockMap: {
2
- "slider-block": (props: import("./models").WithChildren<import("./blocks/Slider/Slider").SliderProps>) => JSX.Element;
2
+ "slider-block": (props: import("react").PropsWithChildren<import("./blocks/Slider/Slider").SliderProps>) => JSX.Element;
3
3
  "extended-features-block": ({ title, description, items, colSizes, animated, }: import("./models").ExtendedFeaturesProps) => JSX.Element;
4
4
  "promo-features-block": (props: import("./models").PromoFeaturesProps) => JSX.Element;
5
5
  "questions-block": (props: import("./models").QuestionsProps) => JSX.Element;
@@ -9,7 +9,7 @@ export declare const blockMap: {
9
9
  "info-block": (props: import("./models").InfoBlockProps) => JSX.Element;
10
10
  "table-block": (props: import("./models").TableBlockProps) => JSX.Element;
11
11
  "tabs-block": ({ items, title, description, animated, tabsColSizes, centered, direction, contentSize, }: import("./models").TabsBlockProps) => JSX.Element;
12
- "header-block": (props: import("./models").WithChildren<import("./models").HeaderBlockProps & import("./models").ClassNameProps>) => JSX.Element;
12
+ "header-block": (props: import("react").PropsWithChildren<import("./models").HeaderBlockProps & import("./models").ClassNameProps>) => JSX.Element;
13
13
  "icons-block": ({ title, description, size, colSizes, items }: import("./models").IconsBlockProps) => JSX.Element;
14
14
  "header-slider-block": ({ items, arrows, ...props }: import("./models").HeaderSliderBlockProps) => JSX.Element;
15
15
  "card-layout-block": import("react").FC<import("./blocks/CardLayout/CardLayout").CardLayoutBlockProps>;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { AnalyticsContextProps } from '../../context/analyticsContext';
2
3
  import { FormsContextProps } from '../../context/formsContext/FormsContext';
3
4
  import { ImageContextProps } from '../../context/imageContext';
@@ -6,7 +7,7 @@ import { LocationContextProps } from '../../context/locationContext';
6
7
  import { MapsContextType } from '../../context/mapsContext/mapsContext';
7
8
  import { ProjectSettingsContextProps } from '../../context/projectSettingsContext';
8
9
  import { SSRContextProps } from '../../context/ssrContext';
9
- import { Theme, WithChildren } from '../../models';
10
+ import { Theme } from '../../models';
10
11
  export interface PageConstructorProviderProps {
11
12
  isMobile?: boolean;
12
13
  locale?: LocaleContextProps;
@@ -19,4 +20,4 @@ export interface PageConstructorProviderProps {
19
20
  forms?: FormsContextProps;
20
21
  image?: ImageContextProps;
21
22
  }
22
- export declare const PageConstructorProvider: (props: WithChildren<PageConstructorProviderProps>) => JSX.Element;
23
+ export declare const PageConstructorProvider: (props: React.PropsWithChildren<PageConstructorProviderProps>) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { BlockDecorationProps, ConstructorBlock as ConstructorBlockType, WithChildren } from '../../../../models';
2
+ import { BlockDecorationProps, ConstructorBlock as ConstructorBlockType } from '../../../../models';
3
3
  interface ConstructorBlockProps extends Pick<BlockDecorationProps, 'index'> {
4
4
  data: ConstructorBlockType;
5
5
  }
6
- export declare const ConstructorBlock: React.FC<WithChildren<ConstructorBlockProps>>;
6
+ export declare const ConstructorBlock: ({ index, data, children, }: React.PropsWithChildren<ConstructorBlockProps>) => JSX.Element;
7
7
  export {};
@@ -1,7 +1,8 @@
1
- import { ConstructorBlock, WithChildren } from '../../../../models';
1
+ import React from 'react';
2
+ import { ConstructorBlock } from '../../../../models';
2
3
  export interface ConstructorItemProps {
3
4
  data: ConstructorBlock;
4
5
  blockKey: string;
5
6
  }
6
- export declare const ConstructorItem: ({ data, blockKey, children }: WithChildren<ConstructorItemProps>) => JSX.Element;
7
+ export declare const ConstructorItem: ({ data, blockKey, children, }: React.PropsWithChildren<ConstructorItemProps>) => JSX.Element;
7
8
  export declare const ConstructorHeader: ({ data, blockKey, }: Pick<ConstructorItemProps, 'data' | 'blockKey'>) => JSX.Element;
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const blockIdContext_1 = require("../../../../context/blockIdContext");
7
7
  const innerContext_1 = require("../../../../context/innerContext");
8
8
  const BlockDecoration_1 = require("../../../../customization/BlockDecoration");
9
- const ConstructorItem = ({ data, blockKey, children }) => {
9
+ const ConstructorItem = ({ data, blockKey, children, }) => {
10
10
  const { itemMap } = (0, react_1.useContext)(innerContext_1.InnerContext);
11
11
  const { type } = data, rest = tslib_1.__rest(data, ["type"]);
12
12
  const Component = itemMap[type];
@@ -1,2 +1,2 @@
1
- import { WithChildren } from '../../../../models';
2
- export declare const ConstructorRow: ({ children }: WithChildren<{}>) => JSX.Element | null;
1
+ import React from 'react';
2
+ export declare const ConstructorRow: ({ children }: React.PropsWithChildren<{}>) => JSX.Element | null;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { RouterLinkProps } from '../../components/RouterLink/RouterLink';
3
- import { WithChildren } from '../../models';
4
3
  export interface History {
5
4
  action: 'PUSH' | 'POP' | 'REPLACE' | '';
6
5
  replace(location: Partial<Location>): void;
@@ -8,7 +7,7 @@ export interface History {
8
7
  goBack(): void;
9
8
  length: number;
10
9
  }
11
- export type RouterLink = React.ComponentClass<RouterLinkProps> | React.FC<WithChildren<RouterLinkProps>>;
10
+ export type RouterLink = React.ComponentClass<RouterLinkProps> | React.FC<React.PropsWithChildren<RouterLinkProps>>;
12
11
  export type LocationContextProps = {
13
12
  history?: History;
14
13
  search?: string;
@@ -1,8 +1,8 @@
1
1
  import React, { CSSProperties } from 'react';
2
- import { QAProps, Refable, Roleable, WithChildren } from '../../models';
2
+ import { QAProps, Refable, Roleable } from '../../models';
3
3
  import { GridColumnClassParams } from '../types';
4
4
  export interface GridColumnProps extends GridColumnClassParams, Refable<HTMLDivElement>, QAProps, Roleable {
5
5
  style?: CSSProperties;
6
6
  children?: React.ReactNode;
7
7
  }
8
- export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "sizes" | "className" | "hidden" | "role" | "qa" | "reset" | "visible" | "offsets" | "orders" | "alignSelf" | "justifyContent"> & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const Col: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<GridColumnProps>, "style" | "children" | "sizes" | "className" | "hidden" | "role" | "qa" | "reset" | "visible" | "offsets" | "orders" | "alignSelf" | "justifyContent"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { WithChildren } from '../../models';
3
2
  export interface GridProps {
4
3
  debug?: boolean;
5
4
  className?: string;
6
5
  containerClass?: string;
7
6
  style?: React.CSSProperties;
8
7
  }
9
- export declare const Grid: ({ debug, children, className, style, containerClass, }: WithChildren<GridProps>) => JSX.Element;
8
+ export declare const Grid: ({ debug, children, className, style, containerClass, }: React.PropsWithChildren<GridProps>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { Animatable, BlockDecorationProps, ConstructorItem, ThemedMediaProps, WithChildren } from './';
2
+ import { Animatable, BlockDecorationProps, ConstructorItem, ThemedMediaProps } from './';
3
3
  export interface PageData {
4
4
  content: PageContent;
5
5
  }
@@ -28,7 +28,7 @@ export type FetchLoadableData<TData = LoadableData> = (params: FetchLoadableData
28
28
  export type ShouldRenderBlock = (block: ConstructorBlock, blockKey: string) => Boolean;
29
29
  export type OnInit = (data: InitConstrucorState) => void;
30
30
  type ComponentProps = React.ComponentProps<React.ComponentClass<any>>;
31
- export type CustomItem = WithChildren<ComponentProps> | React.ComponentType<PropsWithChildren<ComponentProps>>;
31
+ export type CustomItem = React.PropsWithChildren<ComponentProps> | React.ComponentType<PropsWithChildren<ComponentProps>>;
32
32
  export type CustomItems = Record<string, CustomItem>;
33
33
  export interface LoadableConfigItem {
34
34
  fetch: FetchLoadableData;
@@ -3,6 +3,5 @@ export * from './constructor-items';
3
3
  export * from './common';
4
4
  export * from './components';
5
5
  export * from './guards';
6
- export * from './react';
7
6
  export * from './navigation';
8
7
  export * from './customization';
@@ -6,6 +6,5 @@ tslib_1.__exportStar(require("./constructor-items"), exports);
6
6
  tslib_1.__exportStar(require("./common"), exports);
7
7
  tslib_1.__exportStar(require("./components"), exports);
8
8
  tslib_1.__exportStar(require("./guards"), exports);
9
- tslib_1.__exportStar(require("./react"), exports);
10
9
  tslib_1.__exportStar(require("./navigation"), exports);
11
10
  tslib_1.__exportStar(require("./customization"), exports);
@@ -27,7 +27,7 @@ const Navigation = ({ data, logo, className }) => {
27
27
  if (!withBorderOnScroll)
28
28
  return () => { };
29
29
  const showBorderOnScroll = () => {
30
- if (!showBorder) {
30
+ if (!withBorder) {
31
31
  setShowBorder(window.scrollY > 0);
32
32
  }
33
33
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps, WithChildren } from '../../models';
2
+ import { CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps } from '../../models';
3
3
  import './CardLayout.css';
4
- export type CardLayoutBlockProps = WithChildren<Omit<CardLayoutBlockParams, 'children'>> & ClassNameProps;
4
+ export type CardLayoutBlockProps = React.PropsWithChildren<Omit<CardLayoutBlockParams, 'children'>> & ClassNameProps;
5
5
  declare const CardLayout: React.FC<CardLayoutBlockProps>;
6
6
  export default CardLayout;
@@ -1,5 +1,6 @@
1
- import { ClassNameProps, HeaderBlockProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { ClassNameProps, HeaderBlockProps } from '../../models';
2
3
  import './Header.css';
3
4
  type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps;
4
- export declare const HeaderBlock: (props: WithChildren<HeaderBlockFullProps>) => JSX.Element;
5
+ export declare const HeaderBlock: (props: React.PropsWithChildren<HeaderBlockFullProps>) => JSX.Element;
5
6
  export default HeaderBlock;
@@ -1,5 +1,6 @@
1
+ import React from 'react';
1
2
  import { Settings } from 'react-slick';
2
- import { ClassNameProps, Refable, SliderProps as SliderParams, WithChildren } from '../../models';
3
+ import { ClassNameProps, Refable, SliderProps as SliderParams } from '../../models';
3
4
  import './Slider.css';
4
5
  export interface SliderProps extends Omit<SliderParams, 'children'>, Refable<HTMLDivElement>, ClassNameProps, Pick<Settings, 'lazyLoad'> {
5
6
  type?: string;
@@ -10,5 +11,5 @@ export interface SliderProps extends Omit<SliderParams, 'children'>, Refable<HTM
10
11
  blockClassName?: string;
11
12
  arrowSize?: number;
12
13
  }
13
- export declare const SliderBlock: (props: WithChildren<SliderProps>) => JSX.Element;
14
+ export declare const SliderBlock: (props: React.PropsWithChildren<SliderProps>) => JSX.Element;
14
15
  export default SliderBlock;
@@ -1,6 +1,6 @@
1
- import { CSSProperties } from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { AnimateContextProps } from '../../context/animateContext/AnimateContext';
3
- import { QAProps, WithChildren } from '../../models';
3
+ import { QAProps } from '../../models';
4
4
  export interface AnimateBlockProps extends AnimateContextProps, QAProps {
5
5
  animate?: boolean;
6
6
  offset?: number;
@@ -8,5 +8,5 @@ export interface AnimateBlockProps extends AnimateContextProps, QAProps {
8
8
  style?: CSSProperties;
9
9
  onScroll?: () => void;
10
10
  }
11
- declare const AnimateBlock: (props: WithChildren<AnimateBlockProps>) => JSX.Element;
11
+ declare const AnimateBlock: (props: React.PropsWithChildren<AnimateBlockProps>) => JSX.Element;
12
12
  export default AnimateBlock;
@@ -1,4 +1,5 @@
1
- import { AuthorProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { AuthorProps } from '../../models';
2
3
  import './Author.css';
3
- declare const Author: (props: WithChildren<AuthorProps>) => JSX.Element;
4
+ declare const Author: (props: React.PropsWithChildren<AuthorProps>) => JSX.Element;
4
5
  export default Author;
@@ -1,5 +1,6 @@
1
- import { BackgroundImageProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { BackgroundImageProps } from '../../models';
2
3
  import './BackgroundImage.css';
3
4
  export declare const qaIdByDefault = "background-image";
4
- declare const BackgroundImage: (props: WithChildren<BackgroundImageProps>) => JSX.Element;
5
+ declare const BackgroundImage: (props: React.PropsWithChildren<BackgroundImageProps>) => JSX.Element;
5
6
  export default BackgroundImage;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { QAProps, WithChildren } from '../../models';
1
+ import React, { ReactNode } from 'react';
2
+ import { QAProps } from '../../models';
3
3
  import './BalancedMasonry.css';
4
4
  export interface BalancedMasonryProps extends QAProps {
5
5
  className: string;
@@ -9,5 +9,5 @@ export interface BalancedMasonryProps extends QAProps {
9
9
  [key: number]: number;
10
10
  };
11
11
  }
12
- declare const BalancedMasonry: (props: WithChildren<BalancedMasonryProps>) => JSX.Element;
12
+ declare const BalancedMasonry: (props: React.PropsWithChildren<BalancedMasonryProps>) => JSX.Element;
13
13
  export default BalancedMasonry;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ClassNameProps, WithChildren } from '../../models';
2
+ import { ClassNameProps } from '../../models';
3
3
  import './ErrorWrapper.css';
4
4
  export interface ErrorWrapperProps extends ClassNameProps {
5
5
  text: string;
@@ -8,5 +8,5 @@ export interface ErrorWrapperProps extends ClassNameProps {
8
8
  buttonText: string;
9
9
  children: React.ReactNode;
10
10
  }
11
- declare const ErrorWrapper: ({ text, buttonText, className, handler, isError, children, }: WithChildren<ErrorWrapperProps>) => JSX.Element;
11
+ declare const ErrorWrapper: ({ text, buttonText, className, handler, isError, children, }: React.PropsWithChildren<ErrorWrapperProps>) => JSX.Element;
12
12
  export default ErrorWrapper;
@@ -1,4 +1,5 @@
1
- import { FileLinkProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { FileLinkProps } from '../../models';
2
3
  import './FileLink.css';
3
4
  export declare enum FileExtension {
4
5
  PDF = "pdf",
@@ -9,5 +10,5 @@ export declare enum FileExtension {
9
10
  ZIP = "zip"
10
11
  }
11
12
  export declare function getFileExt(name: string): string;
12
- declare const FileLink: (props: WithChildren<FileLinkProps>) => JSX.Element;
13
+ declare const FileLink: (props: React.PropsWithChildren<FileLinkProps>) => JSX.Element;
13
14
  export default FileLink;
@@ -1,8 +1,9 @@
1
- import { QAProps, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { QAProps } from '../../models';
2
3
  import './Foldable.css';
3
4
  export interface FoldableProps extends QAProps {
4
5
  isOpened: boolean;
5
6
  className?: string;
6
7
  }
7
- declare const Foldable: ({ isOpened, children, className, qa }: WithChildren<FoldableProps>) => JSX.Element;
8
+ declare const Foldable: ({ isOpened, children, className, qa }: React.PropsWithChildren<FoldableProps>) => JSX.Element;
8
9
  export default Foldable;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { WithChildren } from '../../models';
3
2
  import { QAProps } from '../../models/common';
4
3
  export interface HTMLProps {
5
4
  children?: string;
@@ -8,7 +7,7 @@ export interface HTMLProps {
8
7
  itemProp?: string;
9
8
  id?: string;
10
9
  }
11
- declare const HTML: ({ children, block, className, itemProp, id, qa, }: WithChildren<HTMLProps & QAProps>) => React.DetailedReactHTMLElement<{
10
+ declare const HTML: ({ children, block, className, itemProp, id, qa, }: React.PropsWithChildren<HTMLProps & QAProps>) => React.DetailedReactHTMLElement<{
12
11
  dangerouslySetInnerHTML: {
13
12
  __html: string | (string & React.ReactElement<any, string | React.JSXElementConstructor<any>>) | (string & React.ReactFragment) | (string & React.ReactPortal);
14
13
  };
@@ -1,6 +1,7 @@
1
- import { ClassNameProps, LinkProps, Tabbable, WithChildren } from '../../models';
1
+ import React from 'react';
2
+ import { ClassNameProps, LinkProps, Tabbable } from '../../models';
2
3
  import { QAProps } from '../../models/common';
3
4
  import './Link.css';
4
5
  export type LinkFullProps = LinkProps & ClassNameProps & Tabbable & QAProps;
5
- declare const LinkBlock: (props: WithChildren<LinkFullProps>) => JSX.Element;
6
+ declare const LinkBlock: (props: React.PropsWithChildren<LinkFullProps>) => JSX.Element;
6
7
  export default LinkBlock;
@@ -4,7 +4,7 @@ import { Icon } from '@gravity-ui/uikit';
4
4
  import { LocaleContext } from '../../context/localeContext';
5
5
  import { LocationContext } from '../../context/locationContext';
6
6
  import { useAnalytics } from '../../hooks';
7
- import { DefaultEventNames, } from '../../models';
7
+ import { DefaultEventNames } from '../../models';
8
8
  import { block, getLinkProps, setUrlTld } from '../../utils';
9
9
  import { getQaAttrubutes } from '../../utils/index';
10
10
  import BackLink from '../BackLink/BackLink';
@@ -1,7 +1,7 @@
1
- import { WithChildren } from '../../models';
1
+ import React from 'react';
2
2
  export interface RouterLinkProps {
3
3
  href: string;
4
4
  [key: string]: unknown;
5
5
  }
6
- declare const RouterLink: ({ href, children }: WithChildren<RouterLinkProps>) => JSX.Element;
6
+ declare const RouterLink: ({ href, children }: React.PropsWithChildren<RouterLinkProps>) => JSX.Element;
7
7
  export default RouterLink;
@@ -1,9 +1,9 @@
1
- import { WithChildren } from '../../models';
1
+ import React from 'react';
2
2
  import './UnpublishedLabel.css';
3
3
  export type LabeLType = 'label' | 'line';
4
4
  export interface UnpublishedLabelProps {
5
5
  type?: LabeLType;
6
6
  className?: string;
7
7
  }
8
- declare const UnpublishedLabel: ({ className, children, type, }: WithChildren<UnpublishedLabelProps>) => JSX.Element;
8
+ declare const UnpublishedLabel: ({ className, children, type, }: React.PropsWithChildren<UnpublishedLabelProps>) => JSX.Element;
9
9
  export default UnpublishedLabel;
@@ -1,5 +1,5 @@
1
1
  export declare const blockMap: {
2
- "slider-block": (props: import("./models").WithChildren<import("./blocks/Slider/Slider").SliderProps>) => JSX.Element;
2
+ "slider-block": (props: import("react").PropsWithChildren<import("./blocks/Slider/Slider").SliderProps>) => JSX.Element;
3
3
  "extended-features-block": ({ title, description, items, colSizes, animated, }: import("./models").ExtendedFeaturesProps) => JSX.Element;
4
4
  "promo-features-block": (props: import("./models").PromoFeaturesProps) => JSX.Element;
5
5
  "questions-block": (props: import("./models").QuestionsProps) => JSX.Element;
@@ -9,7 +9,7 @@ export declare const blockMap: {
9
9
  "info-block": (props: import("./models").InfoBlockProps) => JSX.Element;
10
10
  "table-block": (props: import("./models").TableBlockProps) => JSX.Element;
11
11
  "tabs-block": ({ items, title, description, animated, tabsColSizes, centered, direction, contentSize, }: import("./models").TabsBlockProps) => JSX.Element;
12
- "header-block": (props: import("./models").WithChildren<import("./models").HeaderBlockProps & import("./models").ClassNameProps>) => JSX.Element;
12
+ "header-block": (props: import("react").PropsWithChildren<import("./models").HeaderBlockProps & import("./models").ClassNameProps>) => JSX.Element;
13
13
  "icons-block": ({ title, description, size, colSizes, items }: import("./models").IconsBlockProps) => JSX.Element;
14
14
  "header-slider-block": ({ items, arrows, ...props }: import("./models").HeaderSliderBlockProps) => JSX.Element;
15
15
  "card-layout-block": import("react").FC<import("./blocks/CardLayout/CardLayout").CardLayoutBlockProps>;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { AnalyticsContextProps } from '../../context/analyticsContext';
2
3
  import { FormsContextProps } from '../../context/formsContext/FormsContext';
3
4
  import { ImageContextProps } from '../../context/imageContext';
@@ -6,7 +7,7 @@ import { LocationContextProps } from '../../context/locationContext';
6
7
  import { MapsContextType } from '../../context/mapsContext/mapsContext';
7
8
  import { ProjectSettingsContextProps } from '../../context/projectSettingsContext';
8
9
  import { SSRContextProps } from '../../context/ssrContext';
9
- import { Theme, WithChildren } from '../../models';
10
+ import { Theme } from '../../models';
10
11
  export interface PageConstructorProviderProps {
11
12
  isMobile?: boolean;
12
13
  locale?: LocaleContextProps;
@@ -19,4 +20,4 @@ export interface PageConstructorProviderProps {
19
20
  forms?: FormsContextProps;
20
21
  image?: ImageContextProps;
21
22
  }
22
- export declare const PageConstructorProvider: (props: WithChildren<PageConstructorProviderProps>) => JSX.Element;
23
+ export declare const PageConstructorProvider: (props: React.PropsWithChildren<PageConstructorProviderProps>) => JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { BlockDecorationProps, ConstructorBlock as ConstructorBlockType, WithChildren } from '../../../../models';
2
+ import { BlockDecorationProps, ConstructorBlock as ConstructorBlockType } from '../../../../models';
3
3
  import './ConstructorBlock.css';
4
4
  interface ConstructorBlockProps extends Pick<BlockDecorationProps, 'index'> {
5
5
  data: ConstructorBlockType;
6
6
  }
7
- export declare const ConstructorBlock: React.FC<WithChildren<ConstructorBlockProps>>;
7
+ export declare const ConstructorBlock: ({ index, data, children, }: React.PropsWithChildren<ConstructorBlockProps>) => JSX.Element;
8
8
  export {};
@@ -1,7 +1,8 @@
1
- import { ConstructorBlock, WithChildren } from '../../../../models';
1
+ import React from 'react';
2
+ import { ConstructorBlock } from '../../../../models';
2
3
  export interface ConstructorItemProps {
3
4
  data: ConstructorBlock;
4
5
  blockKey: string;
5
6
  }
6
- export declare const ConstructorItem: ({ data, blockKey, children }: WithChildren<ConstructorItemProps>) => JSX.Element;
7
+ export declare const ConstructorItem: ({ data, blockKey, children, }: React.PropsWithChildren<ConstructorItemProps>) => JSX.Element;
7
8
  export declare const ConstructorHeader: ({ data, blockKey, }: Pick<ConstructorItemProps, 'data' | 'blockKey'>) => JSX.Element;