@gravity-ui/page-constructor 3.16.0 → 4.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.
- package/README.md +1 -1
- package/build/cjs/blocks/Companies/Companies.css +5 -5
- package/build/cjs/blocks/Companies/Companies.js +3 -3
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +4 -4
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -3
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.css +16 -16
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -3
- package/build/cjs/blocks/Header/Header.css +22 -22
- package/build/cjs/blocks/Header/Header.js +2 -2
- package/build/cjs/blocks/Icons/Icons.css +2 -2
- package/build/cjs/blocks/Info/Info.css +1 -1
- package/build/cjs/blocks/Info/Info.js +3 -3
- package/build/cjs/blocks/Media/Media.js +2 -2
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +13 -13
- package/build/cjs/blocks/Questions/Questions.css +12 -12
- package/build/cjs/blocks/Share/Share.css +14 -12
- package/build/cjs/blocks/Slider/Arrow/Arrow.css +4 -4
- package/build/cjs/blocks/Slider/Slider.css +10 -10
- package/build/cjs/blocks/Table/Table.css +5 -5
- package/build/cjs/blocks/Tabs/Tabs.css +6 -6
- package/build/cjs/blocks/Tabs/Tabs.js +2 -2
- package/build/cjs/components/Anchor/Anchor.d.ts +2 -3
- package/build/cjs/components/AnimateBlock/AnimateBlock.d.ts +2 -3
- package/build/cjs/components/Author/Author.css +8 -8
- package/build/cjs/components/Author/Author.js +2 -2
- package/build/cjs/components/BlockBase/BlockBase.d.ts +2 -2
- package/build/cjs/components/BlockBase/BlockBase.js +1 -1
- package/build/cjs/components/Button/Button.css +4 -0
- package/build/cjs/components/Button/Button.d.ts +2 -3
- package/build/cjs/components/Button/Button.js +3 -2
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +4 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +2 -3
- package/build/cjs/components/CardBase/CardBase.css +6 -6
- package/build/cjs/components/Control/Control.css +9 -9
- package/build/cjs/components/ErrorWrapper/ErrorWrapper.css +3 -3
- package/build/cjs/components/FileLink/FileLink.css +16 -56
- package/build/cjs/components/FileLink/FileLink.js +18 -1
- package/build/cjs/components/FullWidthBackground/FullWidthBackground.css +1 -1
- package/build/cjs/components/FullscreenImage/FullscreenImage.css +3 -3
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +3 -3
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +11 -11
- package/build/cjs/components/Image/Image.d.ts +2 -3
- package/build/cjs/components/Link/Link.css +13 -13
- package/build/cjs/components/Media/Video/Video.js +1 -0
- package/build/cjs/components/MetaInfo/MetaInfo.css +2 -2
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +1 -1
- package/build/cjs/components/ReactPlayer/CustomBarControls.css +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +2 -2
- package/build/cjs/components/Table/Table.css +8 -8
- package/build/cjs/components/Title/Title.css +4 -4
- package/build/cjs/components/Title/TitleItem.css +19 -19
- package/build/cjs/components/Title/TitleItem.d.ts +2 -3
- package/build/cjs/components/Title/TitleItem.js +2 -2
- package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.css +5 -5
- package/build/cjs/components/VideoBlock/VideoBlock.css +2 -2
- package/build/cjs/components/constants.d.ts +3 -1
- package/build/cjs/components/constants.js +4 -2
- package/build/cjs/containers/PageConstructor/PageConstructor.css +50 -30
- package/build/cjs/containers/PageConstructor/PageConstructor.js +6 -3
- package/build/cjs/containers/PageConstructor/Provider.d.ts +2 -3
- package/build/cjs/containers/PageConstructor/Provider.js +2 -2
- package/build/cjs/context/theme/ThemeContext.d.ts +2 -3
- package/build/cjs/context/theme/ThemeContext.js +0 -1
- package/build/cjs/context/theme/index.d.ts +0 -1
- package/build/cjs/context/theme/index.js +0 -1
- package/build/cjs/context/theme/useTheme.d.ts +1 -1
- package/build/cjs/context/theme/useTheme.js +2 -2
- package/build/cjs/context/theme/withTheme.js +1 -1
- package/build/cjs/editor/components/AddBlock/AddBlock.css +6 -5
- package/build/cjs/editor/components/AddBlock/AddBlock.js +1 -1
- package/build/cjs/editor/components/ControlPanel/ControlPanel.css +12 -5
- package/build/cjs/editor/components/ControlPanel/ControlPanel.d.ts +4 -2
- package/build/cjs/editor/components/ControlPanel/ControlPanel.js +16 -9
- package/build/cjs/editor/components/EditBlock/EditBlock.css +2 -2
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.css +2 -2
- package/build/cjs/editor/components/Layout/Layout.css +11 -9
- package/build/cjs/editor/components/Layout/Layout.d.ts +4 -1
- package/build/cjs/editor/components/Layout/Layout.js +2 -2
- package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.css +4 -4
- package/build/cjs/editor/containers/Editor/Editor.js +5 -5
- package/build/cjs/editor/containers/Form/Form.css +12 -12
- package/build/cjs/editor/data/previews/default-preview.js +1 -1
- package/build/cjs/editor/data/previews/header-block.js +5 -5
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +1 -1
- package/build/cjs/editor/store/index.d.ts +3 -1
- package/build/cjs/editor/store/index.js +7 -2
- package/build/cjs/editor/store/reducer.d.ts +8 -2
- package/build/cjs/editor/store/reducer.js +4 -1
- package/build/cjs/editor/styles/root.css +6 -4
- package/build/cjs/grid/Col/Col.d.ts +3 -4
- package/build/cjs/grid/Col/Col.js +2 -2
- package/build/cjs/grid/Grid/Grid.css +1 -1
- package/build/cjs/models/common.d.ts +4 -0
- package/build/cjs/models/common.js +5 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +0 -4
- package/build/cjs/models/constructor-items/common.d.ts +3 -5
- package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.css +4 -4
- package/build/cjs/navigation/components/Logo/Logo.css +3 -3
- package/build/cjs/navigation/components/Logo/Logo.js +3 -3
- package/build/cjs/navigation/components/MobileNavigation/MobileNavigation.css +7 -7
- package/build/cjs/navigation/components/Navigation/Navigation.css +2 -2
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.css +1 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.css +2 -2
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.css +5 -5
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/cjs/navigation/components/SocialIcon/SocialIcon.css +3 -3
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.css +4 -4
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +3 -3
- package/build/cjs/sub-blocks/BannerCard/BannerCard.css +16 -16
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +3 -3
- package/build/cjs/sub-blocks/Content/Content.css +22 -22
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.css +6 -6
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.js +3 -3
- package/build/cjs/sub-blocks/Divider/Divider.css +1 -1
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +39 -39
- package/build/cjs/sub-blocks/HubspotForm/index.js +2 -2
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.css +2 -2
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +17 -29
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +18 -1
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.css +7 -7
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +5 -5
- package/build/cjs/sub-blocks/Quote/Quote.css +10 -10
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
- package/build/cjs/utils/theme.d.ts +1 -1
- package/build/esm/blocks/Companies/Companies.css +5 -5
- package/build/esm/blocks/Companies/Companies.js +3 -3
- package/build/esm/blocks/ContentLayout/ContentLayout.css +4 -4
- package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -3
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.css +16 -16
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -3
- package/build/esm/blocks/Header/Header.css +22 -22
- package/build/esm/blocks/Header/Header.js +2 -2
- package/build/esm/blocks/Icons/Icons.css +2 -2
- package/build/esm/blocks/Info/Info.css +1 -1
- package/build/esm/blocks/Info/Info.js +3 -3
- package/build/esm/blocks/Media/Media.js +3 -3
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +13 -13
- package/build/esm/blocks/Questions/Questions.css +12 -12
- package/build/esm/blocks/Share/Share.css +14 -12
- package/build/esm/blocks/Slider/Arrow/Arrow.css +4 -4
- package/build/esm/blocks/Slider/Slider.css +10 -10
- package/build/esm/blocks/Table/Table.css +5 -5
- package/build/esm/blocks/Tabs/Tabs.css +6 -6
- package/build/esm/blocks/Tabs/Tabs.js +3 -3
- package/build/esm/components/Anchor/Anchor.d.ts +2 -3
- package/build/esm/components/AnimateBlock/AnimateBlock.d.ts +2 -3
- package/build/esm/components/Author/Author.css +8 -8
- package/build/esm/components/Author/Author.js +2 -2
- package/build/esm/components/BlockBase/BlockBase.d.ts +2 -2
- package/build/esm/components/BlockBase/BlockBase.js +1 -1
- package/build/esm/components/Button/Button.css +4 -0
- package/build/esm/components/Button/Button.d.ts +2 -3
- package/build/esm/components/Button/Button.js +4 -3
- package/build/esm/components/ButtonTabs/ButtonTabs.css +4 -0
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +2 -3
- package/build/esm/components/CardBase/CardBase.css +6 -6
- package/build/esm/components/Control/Control.css +9 -9
- package/build/esm/components/ErrorWrapper/ErrorWrapper.css +3 -3
- package/build/esm/components/FileLink/FileLink.css +16 -56
- package/build/esm/components/FileLink/FileLink.js +18 -1
- package/build/esm/components/FullWidthBackground/FullWidthBackground.css +1 -1
- package/build/esm/components/FullscreenImage/FullscreenImage.css +3 -3
- package/build/esm/components/FullscreenMedia/FullscreenMedia.css +3 -3
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +11 -11
- package/build/esm/components/Image/Image.d.ts +2 -3
- package/build/esm/components/Link/Link.css +13 -13
- package/build/esm/components/Media/Video/Video.js +1 -0
- package/build/esm/components/MetaInfo/MetaInfo.css +2 -2
- package/build/esm/components/OverflowScroller/OverflowScroller.css +1 -1
- package/build/esm/components/ReactPlayer/CustomBarControls.css +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.css +2 -2
- package/build/esm/components/Table/Table.css +8 -8
- package/build/esm/components/Title/Title.css +4 -4
- package/build/esm/components/Title/TitleItem.css +19 -19
- package/build/esm/components/Title/TitleItem.d.ts +2 -3
- package/build/esm/components/Title/TitleItem.js +2 -2
- package/build/esm/components/UnpublishedLabel/UnpublishedLabel.css +5 -5
- package/build/esm/components/VideoBlock/VideoBlock.css +2 -2
- package/build/esm/components/constants.d.ts +3 -1
- package/build/esm/components/constants.js +3 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +50 -30
- package/build/esm/containers/PageConstructor/PageConstructor.js +7 -4
- package/build/esm/containers/PageConstructor/Provider.d.ts +2 -3
- package/build/esm/containers/PageConstructor/Provider.js +2 -2
- package/build/esm/context/theme/ThemeContext.d.ts +2 -3
- package/build/esm/context/theme/ThemeContext.js +0 -1
- package/build/esm/context/theme/index.d.ts +0 -1
- package/build/esm/context/theme/index.js +0 -1
- package/build/esm/context/theme/useTheme.d.ts +1 -1
- package/build/esm/context/theme/useTheme.js +2 -2
- package/build/esm/context/theme/withTheme.js +1 -1
- package/build/esm/editor/components/AddBlock/AddBlock.css +6 -5
- package/build/esm/editor/components/AddBlock/AddBlock.js +1 -1
- package/build/esm/editor/components/ControlPanel/ControlPanel.css +12 -5
- package/build/esm/editor/components/ControlPanel/ControlPanel.d.ts +4 -2
- package/build/esm/editor/components/ControlPanel/ControlPanel.js +17 -10
- package/build/esm/editor/components/EditBlock/EditBlock.css +2 -2
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.css +2 -2
- package/build/esm/editor/components/Layout/Layout.css +11 -9
- package/build/esm/editor/components/Layout/Layout.d.ts +4 -1
- package/build/esm/editor/components/Layout/Layout.js +2 -2
- package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.css +4 -4
- package/build/esm/editor/containers/Editor/Editor.js +5 -5
- package/build/esm/editor/containers/Form/Form.css +12 -12
- package/build/esm/editor/data/previews/default-preview.js +1 -1
- package/build/esm/editor/data/previews/header-block.js +5 -5
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +1 -1
- package/build/esm/editor/store/index.d.ts +3 -1
- package/build/esm/editor/store/index.js +8 -3
- package/build/esm/editor/store/reducer.d.ts +8 -2
- package/build/esm/editor/store/reducer.js +3 -0
- package/build/esm/editor/styles/root.css +6 -4
- package/build/esm/grid/Col/Col.d.ts +3 -4
- package/build/esm/grid/Col/Col.js +2 -2
- package/build/esm/grid/Grid/Grid.css +1 -1
- package/build/esm/models/common.d.ts +4 -0
- package/build/esm/models/common.js +4 -0
- package/build/esm/models/constructor-items/blocks.d.ts +0 -4
- package/build/esm/models/constructor-items/common.d.ts +3 -5
- package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.css +4 -4
- package/build/esm/navigation/components/Logo/Logo.css +3 -3
- package/build/esm/navigation/components/Logo/Logo.js +3 -3
- package/build/esm/navigation/components/MobileNavigation/MobileNavigation.css +7 -7
- package/build/esm/navigation/components/Navigation/Navigation.css +2 -2
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.css +1 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.css +2 -2
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.css +5 -5
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/esm/navigation/components/SocialIcon/SocialIcon.css +3 -3
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.css +4 -4
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +3 -3
- package/build/esm/sub-blocks/BannerCard/BannerCard.css +16 -16
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +3 -3
- package/build/esm/sub-blocks/Content/Content.css +22 -22
- package/build/esm/sub-blocks/Content/ContentList/ContentList.css +6 -6
- package/build/esm/sub-blocks/Content/ContentList/ContentList.js +3 -3
- package/build/esm/sub-blocks/Divider/Divider.css +1 -1
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +39 -39
- package/build/esm/sub-blocks/HubspotForm/index.js +2 -2
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +1 -1
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.css +2 -2
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +17 -29
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +18 -1
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.css +7 -7
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +5 -5
- package/build/esm/sub-blocks/Quote/Quote.css +10 -10
- package/build/esm/sub-blocks/Quote/Quote.js +3 -3
- package/build/esm/utils/theme.d.ts +1 -1
- package/package.json +7 -5
- package/server/components/constants.d.ts +3 -1
- package/server/components/constants.js +4 -2
- package/server/models/common.d.ts +4 -0
- package/server/models/common.js +5 -1
- package/server/models/constructor-items/blocks.d.ts +0 -4
- package/server/models/constructor-items/common.d.ts +3 -5
- package/server/utils/theme.d.ts +1 -1
- package/styles/colors/dark.scss +6 -0
- package/styles/colors/light.scss +6 -0
- package/styles/colors/social.scss +10 -0
- package/styles/mixins.scss +21 -25
- package/styles/root.scss +28 -14
- package/styles/storybook/common.scss +6 -6
- package/styles/storybook/palette.scss +6 -6
- package/styles/storybook/typography.scss +46 -46
- package/styles/styles.css +15 -15
- package/styles/variables.scss +0 -8
- package/styles/yfm.scss +12 -12
- package/widget/index.js +1 -1
- package/build/cjs/context/theme/ThemeProvider.d.ts +0 -22
- package/build/cjs/context/theme/ThemeProvider.js +0 -49
- package/build/cjs/context/theme/ThemeValueContext.d.ts +0 -7
- package/build/cjs/context/theme/ThemeValueContext.js +0 -9
- package/build/cjs/context/theme/useThemeValue.d.ts +0 -2
- package/build/cjs/context/theme/useThemeValue.js +0 -11
- package/build/esm/context/theme/ThemeProvider.d.ts +0 -22
- package/build/esm/context/theme/ThemeProvider.js +0 -44
- package/build/esm/context/theme/ThemeValueContext.d.ts +0 -7
- package/build/esm/context/theme/ThemeValueContext.js +0 -5
- package/build/esm/context/theme/useThemeValue.d.ts +0 -2
- package/build/esm/context/theme/useThemeValue.js +0 -6
|
@@ -11,42 +11,42 @@ unpredictable css rules order in build */
|
|
|
11
11
|
text-align: right;
|
|
12
12
|
}
|
|
13
13
|
.pc-title-item_size_xs {
|
|
14
|
-
font-size: var(--
|
|
15
|
-
line-height: var(--
|
|
14
|
+
font-size: var(--g-text-body-3-font-size);
|
|
15
|
+
line-height: var(--g-text-body-3-line-height);
|
|
16
16
|
color: var(--pc-text-header-color);
|
|
17
|
-
font-weight: var(--
|
|
17
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
18
18
|
}
|
|
19
19
|
.pc-title-item_size_s {
|
|
20
|
-
font-size: var(--
|
|
21
|
-
line-height: var(--
|
|
20
|
+
font-size: var(--g-text-header-1-font-size);
|
|
21
|
+
line-height: var(--g-text-header-1-line-height);
|
|
22
22
|
color: var(--pc-text-header-color);
|
|
23
|
-
font-weight: var(--
|
|
23
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
24
24
|
margin-top: 32px;
|
|
25
25
|
}
|
|
26
26
|
.pc-title-item_size_m {
|
|
27
|
-
font-size: var(--
|
|
28
|
-
line-height: var(--
|
|
27
|
+
font-size: var(--g-text-display-2-font-size);
|
|
28
|
+
line-height: var(--g-text-display-2-line-height);
|
|
29
29
|
color: var(--pc-text-header-color);
|
|
30
|
-
font-weight: var(--
|
|
30
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
31
31
|
margin-top: 48px;
|
|
32
32
|
}
|
|
33
33
|
@media (max-width: 576px) {
|
|
34
34
|
.pc-title-item_size_m {
|
|
35
|
-
font-size: var(--
|
|
36
|
-
line-height: var(--
|
|
35
|
+
font-size: var(--g-text-display-1-font-size);
|
|
36
|
+
line-height: var(--g-text-display-1-line-height);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
.pc-title-item_size_l {
|
|
40
|
-
font-size: var(--
|
|
41
|
-
line-height: var(--
|
|
40
|
+
font-size: var(--g-text-display-4-font-size);
|
|
41
|
+
line-height: var(--g-text-display-4-line-height);
|
|
42
42
|
color: var(--pc-text-header-color);
|
|
43
|
-
font-weight: var(--
|
|
43
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
44
44
|
margin-top: 96px;
|
|
45
45
|
}
|
|
46
46
|
@media (max-width: 577px) {
|
|
47
47
|
.pc-title-item_size_l {
|
|
48
|
-
font-size: var(--
|
|
49
|
-
line-height: var(--
|
|
48
|
+
font-size: var(--g-text-display-2-font-size);
|
|
49
|
+
line-height: var(--g-text-display-2-line-height);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
.pc-title-item__arrow {
|
|
@@ -84,7 +84,7 @@ unpredictable css rules order in build */
|
|
|
84
84
|
}
|
|
85
85
|
.pc-title-item__text a {
|
|
86
86
|
outline: none;
|
|
87
|
-
color: var(--
|
|
87
|
+
color: var(--g-color-text-link);
|
|
88
88
|
text-decoration: none;
|
|
89
89
|
cursor: pointer;
|
|
90
90
|
}
|
|
@@ -92,8 +92,8 @@ unpredictable css rules order in build */
|
|
|
92
92
|
outline: 2px solid #ffdb4d;
|
|
93
93
|
}
|
|
94
94
|
.pc-title-item__text a:hover, .pc-title-item__text a:active {
|
|
95
|
-
--pc-text-header-color: var(--
|
|
96
|
-
color: var(--
|
|
95
|
+
--pc-text-header-color: var(--g-color-text-link-hover);
|
|
96
|
+
color: var(--g-color-text-link-hover);
|
|
97
97
|
}
|
|
98
98
|
.pc-title-item__wrapper {
|
|
99
99
|
white-space: nowrap;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TextSize, TitleItemProps } from '../../models';
|
|
1
|
+
import { QAProps, TextSize, TitleItemProps } from '../../models';
|
|
2
2
|
import './TitleItem.css';
|
|
3
3
|
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 24 | 13 | 22 | 26 | 38 | 20;
|
|
4
|
-
export interface TitleItemFullProps extends TitleItemProps {
|
|
4
|
+
export interface TitleItemFullProps extends TitleItemProps, QAProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
onClick?: () => void;
|
|
7
|
-
dataQa?: string;
|
|
8
7
|
resetMargin?: boolean;
|
|
9
8
|
}
|
|
10
9
|
declare const TitleItem: (props: TitleItemFullProps) => JSX.Element;
|
|
@@ -22,7 +22,7 @@ export function getArrowSize(size, isMobile) {
|
|
|
22
22
|
}
|
|
23
23
|
const TitleItem = (props) => {
|
|
24
24
|
const isMobile = useContext(MobileContext);
|
|
25
|
-
const { textSize = 'm', text, anchor, justify, url, onClick, custom, className,
|
|
25
|
+
const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, qa, resetMargin = true, } = props;
|
|
26
26
|
const { hostname } = useContext(LocationContext);
|
|
27
27
|
const textMarkup = (React.createElement(React.Fragment, null,
|
|
28
28
|
React.createElement(HTML, { className: b('text') }, text),
|
|
@@ -47,7 +47,7 @@ const TitleItem = (props) => {
|
|
|
47
47
|
anchor && React.createElement(Anchor, { id: anchor, className: b('anchor') }),
|
|
48
48
|
React.createElement(getHeaderTag(textSize), {
|
|
49
49
|
className: b({ size: textSize, justify, 'reset-margin': resetMargin }, className),
|
|
50
|
-
'data-qa': `${
|
|
50
|
+
'data-qa': `${qa}-header`,
|
|
51
51
|
}, content)));
|
|
52
52
|
};
|
|
53
53
|
export default TitleItem;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-unpublished-label {
|
|
4
|
-
background-color: var(--
|
|
4
|
+
background-color: var(--g-color-base-danger-heavy);
|
|
5
5
|
}
|
|
6
6
|
.pc-unpublished-label_type_line {
|
|
7
|
-
font-size: var(--
|
|
8
|
-
line-height: var(--
|
|
7
|
+
font-size: var(--g-text-body-3-font-size);
|
|
8
|
+
line-height: var(--g-text-body-3-line-height);
|
|
9
9
|
padding: 15px;
|
|
10
10
|
}
|
|
11
11
|
.pc-unpublished-label_type_label {
|
|
12
|
-
font-size: var(--
|
|
13
|
-
line-height: var(--
|
|
12
|
+
font-size: var(--g-text-body-1-font-size);
|
|
13
|
+
line-height: var(--g-text-body-1-line-height);
|
|
14
14
|
display: inline-block;
|
|
15
15
|
padding: 0 8px;
|
|
16
16
|
border-radius: 2px;
|
|
@@ -39,8 +39,8 @@ unpredictable css rules order in build */
|
|
|
39
39
|
position: absolute;
|
|
40
40
|
width: 64px;
|
|
41
41
|
height: 64px;
|
|
42
|
-
color: var(--
|
|
43
|
-
background-color: var(--
|
|
42
|
+
color: var(--g-color-base-background);
|
|
43
|
+
background-color: var(--g-color-base-brand);
|
|
44
44
|
border-radius: 50%;
|
|
45
45
|
}
|
|
46
46
|
.pc-VideoBlock__icon {
|
|
@@ -6,48 +6,68 @@ unpredictable css rules order in build */
|
|
|
6
6
|
--header-height: 64px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.
|
|
10
|
-
--
|
|
9
|
+
.g-root {
|
|
10
|
+
--pc-color-telegram: #51a4db;
|
|
11
|
+
--pc-color-facebook: #4968ad;
|
|
12
|
+
--pc-color-twitter: #4aa0eb;
|
|
13
|
+
--pc-color-vk: #436eab;
|
|
14
|
+
--pc-color-youtube: #eb3323;
|
|
15
|
+
--pc-color-github: #25292e;
|
|
16
|
+
--pc-color-rss: #f29c39;
|
|
17
|
+
--pc-color-linkedin: #0a66c2;
|
|
18
|
+
--g-text-accent-font-weight: 500;
|
|
11
19
|
--pc-transparent: rgba(255, 255, 255, 0);
|
|
12
20
|
--pc-border-radius: 24px;
|
|
13
21
|
--pc-image-padding: 4px;
|
|
14
|
-
--pc-color-sfx-shadow: var(--
|
|
22
|
+
--pc-color-sfx-shadow: var(--g-color-base-simple-hover);
|
|
15
23
|
--pc-color-line-generic-active-solid: #b3b3b3;
|
|
16
|
-
--pc-color-base-float-hover: var(--
|
|
24
|
+
--pc-color-base-float-hover: var(--g-color-base-float);
|
|
17
25
|
--pc-monochrome-button-background-color: #262626;
|
|
18
26
|
--pc-monochrome-button-background-color-hover: #393939;
|
|
19
|
-
--pc-monochrome-button-color: var(--
|
|
20
|
-
--pc-text-header-color: var(--
|
|
21
|
-
--pc-media-card-meta-info-color: var(--
|
|
22
|
-
--pc-tab-item-color: var(--
|
|
23
|
-
--pc-tab-item-background-color: var(--
|
|
24
|
-
--pc-tab-item-background-color-hover: var(--
|
|
27
|
+
--pc-monochrome-button-color: var(--g-color-text-light-primary);
|
|
28
|
+
--pc-text-header-color: var(--g-color-text-primary);
|
|
29
|
+
--pc-media-card-meta-info-color: var(--g-color-text-secondary);
|
|
30
|
+
--pc-tab-item-color: var(--g-color-text-primary);
|
|
31
|
+
--pc-tab-item-background-color: var(--g-color-base-generic);
|
|
32
|
+
--pc-tab-item-background-color-hover: var(--g-color-base-generic-hover);
|
|
25
33
|
--pc-selected-tab-item-color: var(--pc-monochrome-button-color);
|
|
26
34
|
--pc-selected-tab-item-background-color: var(--pc-monochrome-button-background-color);
|
|
27
35
|
--pc-selected-tab-item-background-color-hover: var(
|
|
28
36
|
--pc-monochrome-button-background-color-hover
|
|
29
37
|
);
|
|
30
38
|
}
|
|
31
|
-
.
|
|
32
|
-
--pc-color-
|
|
39
|
+
.g-root_theme_light {
|
|
40
|
+
--pc-color-base-silver: #eff2f8;
|
|
41
|
+
--pc-color-base-gold: #ffdb4d;
|
|
42
|
+
--pc-color-base-asphalt: #313538;
|
|
43
|
+
--pc-color-base-copper: #ffe6c4;
|
|
44
|
+
}
|
|
45
|
+
.g-root_theme_dark {
|
|
46
|
+
--pc-color-base-silver: #bcc0c4;
|
|
47
|
+
--pc-color-base-gold: #ffde5d;
|
|
48
|
+
--pc-color-base-asphalt: #474d52;
|
|
49
|
+
--pc-color-base-copper: #7f7262;
|
|
50
|
+
}
|
|
51
|
+
.g-root.g-root_theme_dark {
|
|
52
|
+
--pc-color-sfx-shadow: var(--g-color-sfx-shadow);
|
|
33
53
|
--pc-color-line-generic-active-solid: #6c6c70;
|
|
34
|
-
--pc-color-base-float-hover: var(--
|
|
54
|
+
--pc-color-base-float-hover: var(--g-color-base-float-hover);
|
|
35
55
|
--pc-monochrome-button-background-color: #ffffff;
|
|
36
56
|
--pc-monochrome-button-background-color-hover: #e9e9e9;
|
|
37
|
-
--pc-monochrome-button-color: var(--
|
|
57
|
+
--pc-monochrome-button-color: var(--g-color-text-dark-primary);
|
|
38
58
|
}
|
|
39
59
|
|
|
40
60
|
/* use this for style redefinitions to awoid problems with
|
|
41
61
|
unpredictable css rules order in build */
|
|
42
62
|
.yfm_constructor {
|
|
43
|
-
font-family: var(--
|
|
44
|
-
color: var(--
|
|
63
|
+
font-family: var(--g-font-family-sans);
|
|
64
|
+
color: var(--g-color-text-primary);
|
|
45
65
|
}
|
|
46
66
|
.yfm_constructor code,
|
|
47
67
|
.yfm_constructor kbd,
|
|
48
68
|
.yfm_constructor pre {
|
|
49
|
-
font-family: var(--
|
|
50
|
-
color: var(--
|
|
69
|
+
font-family: var(--g-font-family-monospace);
|
|
70
|
+
color: var(--g-color-text-primary);
|
|
51
71
|
}
|
|
52
72
|
.yfm_constructor.yfm_constructor h1,
|
|
53
73
|
.yfm_constructor.yfm_constructor h2,
|
|
@@ -58,11 +78,11 @@ unpredictable css rules order in build */
|
|
|
58
78
|
.yfm_constructor.yfm_constructor span,
|
|
59
79
|
.yfm_constructor.yfm_constructor p,
|
|
60
80
|
.yfm_constructor.yfm_constructor li {
|
|
61
|
-
color: var(--
|
|
81
|
+
color: var(--g-color-text-primary);
|
|
62
82
|
}
|
|
63
83
|
.yfm_constructor.yfm_constructor_notice li,
|
|
64
84
|
.yfm_constructor.yfm_constructor_notice p {
|
|
65
|
-
color: var(--
|
|
85
|
+
color: var(--g-color-text-secondary);
|
|
66
86
|
}
|
|
67
87
|
.yfm_constructor.yfm_constructor ul,
|
|
68
88
|
.yfm_constructor.yfm_constructor ol,
|
|
@@ -81,7 +101,7 @@ unpredictable css rules order in build */
|
|
|
81
101
|
}
|
|
82
102
|
|
|
83
103
|
.yfm_constructor_theme_dark p {
|
|
84
|
-
color: var(--
|
|
104
|
+
color: var(--g-color-text-light-primary);
|
|
85
105
|
}
|
|
86
106
|
.yfm_constructor_list_style ul {
|
|
87
107
|
padding-left: 20px;
|
|
@@ -97,7 +117,7 @@ unpredictable css rules order in build */
|
|
|
97
117
|
}
|
|
98
118
|
.yfm_constructor a {
|
|
99
119
|
outline: none;
|
|
100
|
-
color: var(--
|
|
120
|
+
color: var(--g-color-text-link);
|
|
101
121
|
text-decoration: none;
|
|
102
122
|
cursor: pointer;
|
|
103
123
|
}
|
|
@@ -105,17 +125,17 @@ unpredictable css rules order in build */
|
|
|
105
125
|
outline: 2px solid #ffdb4d;
|
|
106
126
|
}
|
|
107
127
|
.yfm_constructor a:hover, .yfm_constructor a:active {
|
|
108
|
-
--pc-text-header-color: var(--
|
|
109
|
-
color: var(--
|
|
128
|
+
--pc-text-header-color: var(--g-color-text-link-hover);
|
|
129
|
+
color: var(--g-color-text-link-hover);
|
|
110
130
|
}
|
|
111
131
|
.yfm_constructor table {
|
|
112
|
-
color: var(--
|
|
113
|
-
border: 1px solid var(--
|
|
114
|
-
background: var(--
|
|
132
|
+
color: var(--g-color-text-primary);
|
|
133
|
+
border: 1px solid var(--g-color-line-generic);
|
|
134
|
+
background: var(--g-color-base-background);
|
|
115
135
|
}
|
|
116
136
|
.yfm_constructor thead,
|
|
117
137
|
.yfm_constructor table tr:nth-child(2n) {
|
|
118
|
-
background-color: var(--
|
|
138
|
+
background-color: var(--g-color-base-generic);
|
|
119
139
|
}
|
|
120
140
|
|
|
121
141
|
.yfm_constructor_table {
|
|
@@ -131,7 +151,7 @@ unpredictable css rules order in build */
|
|
|
131
151
|
background-color: transparent !important;
|
|
132
152
|
}
|
|
133
153
|
.yfm_constructor_table tbody tr {
|
|
134
|
-
border-top: 1px solid var(--
|
|
154
|
+
border-top: 1px solid var(--g-color-line-generic);
|
|
135
155
|
}
|
|
136
156
|
.yfm_constructor_table td,
|
|
137
157
|
.yfm_constructor_table th {
|
|
@@ -152,7 +172,7 @@ unpredictable css rules order in build */
|
|
|
152
172
|
.pc-page-constructor {
|
|
153
173
|
font-feature-settings: "liga", "kern", "pnum" on, "lnum" on, "ss03" on;
|
|
154
174
|
margin-top: 0;
|
|
155
|
-
background-color: var(--
|
|
175
|
+
background-color: var(--g-color-base-background);
|
|
156
176
|
z-index: 10;
|
|
157
177
|
}
|
|
158
178
|
.pc-page-constructor__wrapper {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
3
|
import '@doc-tools/transform/dist/js/yfm';
|
|
4
|
+
import blockOrigin from 'bem-cn-lite';
|
|
4
5
|
import BackgroundMedia from '../../components/BackgroundMedia/BackgroundMedia';
|
|
6
|
+
import { UIKIT_ROOT_CLASS } from '../../components/constants';
|
|
5
7
|
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
6
8
|
import { AnimateContext } from '../../context/animateContext';
|
|
7
9
|
import { InnerContext } from '../../context/innerContext';
|
|
8
|
-
import {
|
|
10
|
+
import { useTheme } from '../../context/theme';
|
|
9
11
|
import { Grid } from '../../grid';
|
|
10
12
|
import { BlockType, BlockTypes, HeaderBlockTypes, SubBlockTypes, } from '../../models';
|
|
11
13
|
import Layout from '../../navigation/containers/Layout/Layout';
|
|
@@ -15,6 +17,7 @@ import { ConstructorHeader } from './components/ConstructorItem';
|
|
|
15
17
|
import { ConstructorRow } from './components/ConstructorRow';
|
|
16
18
|
import './PageConstructor.css';
|
|
17
19
|
const b = cnBlock('page-constructor');
|
|
20
|
+
const ycr = blockOrigin(UIKIT_ROOT_CLASS);
|
|
18
21
|
export const Constructor = (props) => {
|
|
19
22
|
const { content: { blocks = [], background = {} } = {}, renderMenu, shouldRenderBlock, navigation, custom, } = props;
|
|
20
23
|
const { context } = useMemo(() => ({
|
|
@@ -30,12 +33,12 @@ export const Constructor = (props) => {
|
|
|
30
33
|
},
|
|
31
34
|
},
|
|
32
35
|
}), [custom, shouldRenderBlock]);
|
|
33
|
-
const
|
|
36
|
+
const theme = useTheme();
|
|
34
37
|
const header = getHeaderBlock(blocks, context.headerBlockTypes);
|
|
35
38
|
const restBlocks = getOrderedBlocks(blocks, context.headerBlockTypes);
|
|
36
39
|
const themedBackground = getThemedValue(background, theme);
|
|
37
40
|
return (React.createElement(InnerContext.Provider, { value: context },
|
|
38
|
-
React.createElement("div", { className: b() },
|
|
41
|
+
React.createElement("div", { className: b(null, ycr({ theme })) },
|
|
39
42
|
React.createElement("div", { className: b('wrapper') },
|
|
40
43
|
themedBackground && (React.createElement(BackgroundMedia, Object.assign({}, themedBackground, { className: b('background') }))),
|
|
41
44
|
React.createElement(Layout, { navigation: navigation },
|
|
@@ -6,15 +6,14 @@ import { MapsContextType } from '../../context/mapsContext/mapsContext';
|
|
|
6
6
|
import { MetrikaContextProps } from '../../context/metrikaContext';
|
|
7
7
|
import { ProjectSettingsContextProps } from '../../context/projectSettingsContext';
|
|
8
8
|
import { SSRContextProps } from '../../context/ssrContext';
|
|
9
|
-
import {
|
|
10
|
-
import { WithChildren } from '../../models';
|
|
9
|
+
import { Theme, WithChildren } from '../../models';
|
|
11
10
|
export interface PageConstructorProviderProps {
|
|
12
11
|
isMobile?: boolean;
|
|
13
12
|
locale?: LocaleContextProps;
|
|
14
13
|
location?: LocationContextProps;
|
|
15
14
|
metrika?: MetrikaContextProps;
|
|
16
15
|
ssrConfig?: SSRContextProps;
|
|
17
|
-
theme?:
|
|
16
|
+
theme?: Theme;
|
|
18
17
|
mapsContext?: MapsContextType;
|
|
19
18
|
projectSettings?: ProjectSettingsContextProps;
|
|
20
19
|
analytics?: AnalyticsContextProps;
|
|
@@ -9,12 +9,12 @@ import { MetrikaContext } from '../../context/metrikaContext';
|
|
|
9
9
|
import { MobileContext } from '../../context/mobileContext';
|
|
10
10
|
import { ProjectSettingsContext, } from '../../context/projectSettingsContext';
|
|
11
11
|
import { SSRContext } from '../../context/ssrContext';
|
|
12
|
-
import {
|
|
12
|
+
import { ThemeContext } from '../../context/theme';
|
|
13
13
|
export const PageConstructorProvider = (props) => {
|
|
14
14
|
const { isMobile, mapsContext = initialMapValue, locale = {}, location = {}, metrika = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = DEFAULT_THEME, children, image = {}, } = props;
|
|
15
15
|
/* eslint-disable react/jsx-key */
|
|
16
16
|
const context = [
|
|
17
|
-
React.createElement(
|
|
17
|
+
React.createElement(ThemeContext.Provider, { value: { theme } }),
|
|
18
18
|
React.createElement(ProjectSettingsContext.Provider, { value: projectSettings }),
|
|
19
19
|
React.createElement(LocaleContext.Provider, { value: locale }),
|
|
20
20
|
React.createElement(ImageContext.Provider, { value: image }),
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Theme } from '../../models';
|
|
3
3
|
export interface ThemeContextProps {
|
|
4
|
-
theme:
|
|
5
|
-
setTheme: (newTheme: ConstructorTheme) => void;
|
|
4
|
+
theme: Theme;
|
|
6
5
|
}
|
|
7
6
|
export declare const initialValue: ThemeContextProps;
|
|
8
7
|
export declare const ThemeContext: React.Context<ThemeContextProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ThemeContextProps } from './ThemeContext';
|
|
2
|
-
export declare function useTheme():
|
|
2
|
+
export declare function useTheme(): ThemeContextProps['theme'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ThemeContext } from './ThemeContext';
|
|
3
3
|
export function useTheme() {
|
|
4
|
-
const { theme
|
|
5
|
-
return
|
|
4
|
+
const { theme } = React.useContext(ThemeContext);
|
|
5
|
+
return theme;
|
|
6
6
|
}
|
|
@@ -5,7 +5,7 @@ export function withTheme(WrappedComponent) {
|
|
|
5
5
|
const componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
6
6
|
return _a = class WithThemeComponent extends React.Component {
|
|
7
7
|
render() {
|
|
8
|
-
return
|
|
8
|
+
return React.createElement(WrappedComponent, Object.assign({}, this.props, { theme: this.context.theme }));
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
_a.displayName = `withTheme(${componentName})`,
|
|
@@ -3,7 +3,7 @@ unpredictable css rules order in build */
|
|
|
3
3
|
.pc-add-block {
|
|
4
4
|
position: absolute;
|
|
5
5
|
bottom: 32px;
|
|
6
|
-
left: calc(50% + var(--editor-left-column-width) / 2);
|
|
6
|
+
left: calc(50% + var(--pc-editor-left-column-width) / 2);
|
|
7
7
|
transform: translateX(-50%);
|
|
8
8
|
z-index: 110;
|
|
9
9
|
}
|
|
@@ -23,8 +23,8 @@ unpredictable css rules order in build */
|
|
|
23
23
|
transition: transform 0.2s;
|
|
24
24
|
width: 76px;
|
|
25
25
|
height: 40px;
|
|
26
|
-
color: var(--
|
|
27
|
-
background-color: var(--
|
|
26
|
+
color: var(--g-color-text-primary);
|
|
27
|
+
background-color: var(--pc-editor-base-color);
|
|
28
28
|
border-radius: 8px;
|
|
29
29
|
}
|
|
30
30
|
.pc-add-block__button:hover {
|
|
@@ -71,10 +71,11 @@ unpredictable css rules order in build */
|
|
|
71
71
|
height: 74px;
|
|
72
72
|
border-radius: var(--pc-border-radius);
|
|
73
73
|
margin-right: 16px;
|
|
74
|
+
color: var(--pc-editor-base-color);
|
|
74
75
|
}
|
|
75
76
|
.pc-add-block__popup .pc-add-block__title {
|
|
76
|
-
font-size: var(--
|
|
77
|
-
line-height: var(--
|
|
77
|
+
font-size: var(--g-text-body-2-font-size);
|
|
78
|
+
line-height: var(--g-text-body-2-line-height);
|
|
78
79
|
}
|
|
79
80
|
.pc-add-block__popup .pc-add-block__title,
|
|
80
81
|
.pc-add-block__popup .pc-add-block__description {
|
|
@@ -20,7 +20,7 @@ const AddBlock = ({ onAdd, className }) => {
|
|
|
20
20
|
setSearch('');
|
|
21
21
|
} },
|
|
22
22
|
React.createElement(Plus, { className: b('icon') })),
|
|
23
|
-
isOpened && (React.createElement(Popup, { anchorRef: ref, open: isOpened,
|
|
23
|
+
isOpened && (React.createElement(Popup, { anchorRef: ref, open: isOpened, contentClassName: b('popup'), placement: "top", offset: [0, 24], onOutsideClick: () => setIsOpened(false) },
|
|
24
24
|
React.createElement("div", { className: b('search') },
|
|
25
25
|
React.createElement(TextInput, { placeholder: "search", type: "text", value: search, size: "l", onUpdate: (value) => setSearch(value) })),
|
|
26
26
|
React.createElement("div", { className: b('blocks') }, blocks.map((blockName) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-control-panel {
|
|
4
|
-
display:
|
|
5
|
-
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: repeat(3, 1fr);
|
|
6
6
|
width: 100%;
|
|
7
|
-
height: var(--editor-header-height);
|
|
7
|
+
height: var(--pc-editor-header-height);
|
|
8
8
|
padding: 8px 20px;
|
|
9
|
-
background-color: var(--
|
|
10
|
-
border: 1px var(--
|
|
9
|
+
background-color: var(--g-color-base-background);
|
|
10
|
+
border: 1px var(--g-color-line-generic);
|
|
11
11
|
border-style: solid none;
|
|
12
12
|
}
|
|
13
13
|
.pc-control-panel__icon {
|
|
@@ -24,4 +24,11 @@ unpredictable css rules order in build */
|
|
|
24
24
|
.pc-control-panel__mode-switch {
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
|
+
place-self: center;
|
|
28
|
+
}
|
|
29
|
+
.pc-control-panel__theme-switch {
|
|
30
|
+
place-self: center end;
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
align-items: center;
|
|
27
34
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ClassNameProps } from '../../../models';
|
|
1
|
+
import { ClassNameProps, Theme } from '../../../models';
|
|
2
2
|
import { ViewModeItem } from '../../types';
|
|
3
3
|
import './ControlPanel.css';
|
|
4
4
|
export interface ControlPanelProps extends ClassNameProps {
|
|
5
5
|
viewMode?: ViewModeItem;
|
|
6
6
|
onViewModeChange: (viewMode: ViewModeItem) => void;
|
|
7
|
+
theme: Theme;
|
|
8
|
+
onThemeChange: (theme: Theme) => void;
|
|
7
9
|
}
|
|
8
|
-
declare const ControlPanel: ({ viewMode, onViewModeChange, className, }: ControlPanelProps) => JSX.Element;
|
|
10
|
+
declare const ControlPanel: ({ viewMode, onViewModeChange, className, theme, onThemeChange, }: ControlPanelProps) => JSX.Element;
|
|
9
11
|
export default ControlPanel;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Display, Pencil, Smartphone } from '@gravity-ui/icons';
|
|
3
|
-
import { RadioButton } from '@gravity-ui/uikit';
|
|
3
|
+
import { RadioButton, Select } from '@gravity-ui/uikit';
|
|
4
|
+
import { Theme, themeNames } from '../../../models';
|
|
4
5
|
import { block } from '../../../utils';
|
|
5
6
|
import { Tablet } from '../../icons/Tablet';
|
|
6
7
|
import { ViewModeItem } from '../../types';
|
|
@@ -14,13 +15,19 @@ const ControlPanelViewModeIcons = {
|
|
|
14
15
|
[ViewModeItem.Tablet]: Tablet,
|
|
15
16
|
[ViewModeItem.Mobile]: Smartphone,
|
|
16
17
|
};
|
|
17
|
-
const ControlPanel = ({ viewMode = ViewModeItem.Edititng, onViewModeChange, className, }) =>
|
|
18
|
-
React.createElement("div", { className: b(
|
|
19
|
-
React.createElement("
|
|
20
|
-
React.createElement(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const ControlPanel = ({ viewMode = ViewModeItem.Edititng, onViewModeChange, className, theme, onThemeChange, }) => {
|
|
19
|
+
return (React.createElement("div", { className: b(null, className) },
|
|
20
|
+
React.createElement("div", null),
|
|
21
|
+
React.createElement("div", { className: b('mode-switch') },
|
|
22
|
+
React.createElement("span", null, i18n('mode')),
|
|
23
|
+
React.createElement(RadioButton, { className: b('radio-button'), value: viewMode, onUpdate: (value) => onViewModeChange(value) }, Object.values(ViewModeItem).map((item) => {
|
|
24
|
+
const Icon = ControlPanelViewModeIcons[item];
|
|
25
|
+
return (React.createElement(RadioButton.Option, { key: item, value: item },
|
|
26
|
+
React.createElement("span", { className: b('icon') },
|
|
27
|
+
React.createElement(Icon, { width: ICON_SIZE, height: ICON_SIZE }))));
|
|
28
|
+
}))),
|
|
29
|
+
React.createElement("div", { className: b('theme-switch') },
|
|
30
|
+
React.createElement("span", null, i18n('Theme')),
|
|
31
|
+
React.createElement(Select, { value: [theme], onUpdate: (value) => onThemeChange(value[0]) }, Object.values(Theme).map((item) => (React.createElement(Select.Option, { key: item, value: item }, themeNames[item])))))));
|
|
32
|
+
};
|
|
26
33
|
export default ControlPanel;
|
|
@@ -9,7 +9,7 @@ unpredictable css rules order in build */
|
|
|
9
9
|
z-index: 11;
|
|
10
10
|
}
|
|
11
11
|
.pc-edit-block_active .pc-edit-block__controls {
|
|
12
|
-
border: 4px solid var(--
|
|
12
|
+
border: 4px solid var(--pc-editor-base-color);
|
|
13
13
|
}
|
|
14
14
|
.pc-edit-block__controls {
|
|
15
15
|
position: absolute;
|
|
@@ -45,7 +45,7 @@ unpredictable css rules order in build */
|
|
|
45
45
|
width: 48px;
|
|
46
46
|
height: 32px;
|
|
47
47
|
border-radius: 8px;
|
|
48
|
-
background-color: var(--
|
|
48
|
+
background-color: var(--pc-editor-control-color);
|
|
49
49
|
}
|
|
50
50
|
.pc-edit-block__control:hover {
|
|
51
51
|
transform: scale(1.1);
|
|
@@ -4,7 +4,7 @@ unpredictable css rules order in build */
|
|
|
4
4
|
display: flex;
|
|
5
5
|
width: 100%;
|
|
6
6
|
padding: 32px;
|
|
7
|
-
background-color: var(--
|
|
7
|
+
background-color: var(--g-color-base-background);
|
|
8
8
|
border-radius: var(--pc-border-radius);
|
|
9
9
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.06), 0px 4px 24px rgba(0, 0, 0, 0.06);
|
|
10
10
|
}
|
|
@@ -13,7 +13,7 @@ unpredictable css rules order in build */
|
|
|
13
13
|
}
|
|
14
14
|
.pc-error-boundary__error {
|
|
15
15
|
display: block;
|
|
16
|
-
color: var(--
|
|
16
|
+
color: var(--g-color-text-danger);
|
|
17
17
|
max-height: 160px;
|
|
18
18
|
overflow: auto;
|
|
19
19
|
}
|