@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
|
@@ -59,10 +59,10 @@ unpredictable css rules order in build */
|
|
|
59
59
|
border-radius: var(--pc-border-radius);
|
|
60
60
|
}
|
|
61
61
|
.pc-tabs-block__caption {
|
|
62
|
-
font-size: var(--
|
|
63
|
-
line-height: var(--
|
|
62
|
+
font-size: var(--g-text-body-2-font-size);
|
|
63
|
+
line-height: var(--g-text-body-2-line-height);
|
|
64
64
|
margin: 12px 0 0;
|
|
65
|
-
color: var(--
|
|
65
|
+
color: var(--g-color-text-secondary);
|
|
66
66
|
}
|
|
67
67
|
.pc-tabs-block__content {
|
|
68
68
|
display: flex;
|
|
@@ -81,10 +81,10 @@ unpredictable css rules order in build */
|
|
|
81
81
|
margin: 0 auto 12px;
|
|
82
82
|
}
|
|
83
83
|
.pc-tabs-block__content-title.pc-tabs-block__content-title > * {
|
|
84
|
-
font-size: var(--
|
|
85
|
-
line-height: var(--
|
|
84
|
+
font-size: var(--g-text-header-1-font-size);
|
|
85
|
+
line-height: var(--g-text-header-1-line-height);
|
|
86
86
|
color: var(--pc-text-header-color);
|
|
87
|
-
font-weight: var(--
|
|
87
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
@media (max-width: 769px) {
|
|
@@ -10,7 +10,7 @@ const utils_1 = require("../../components/Media/Image/utils");
|
|
|
10
10
|
const Media_1 = tslib_1.__importDefault(require("../../components/Media/Media"));
|
|
11
11
|
const Title_1 = tslib_1.__importDefault(require("../../components/Title/Title"));
|
|
12
12
|
const VideoBlock_1 = require("../../components/VideoBlock/VideoBlock");
|
|
13
|
-
const
|
|
13
|
+
const theme_1 = require("../../context/theme");
|
|
14
14
|
const grid_1 = require("../../grid");
|
|
15
15
|
const sub_blocks_1 = require("../../sub-blocks");
|
|
16
16
|
const utils_2 = require("../../utils");
|
|
@@ -19,7 +19,7 @@ const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered
|
|
|
19
19
|
var _a;
|
|
20
20
|
const [activeTab, setActiveTab] = (0, react_1.useState)(items[0].tabName);
|
|
21
21
|
const [play, setPlay] = (0, react_1.useState)(false);
|
|
22
|
-
const
|
|
22
|
+
const theme = (0, theme_1.useTheme)();
|
|
23
23
|
const tabs = items.map(({ tabName }) => ({ title: tabName, id: tabName }));
|
|
24
24
|
const activeTabData = items.find(({ tabName }) => tabName === activeTab);
|
|
25
25
|
const isReverse = direction === 'content-media';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ClassNameProps } from '../../models';
|
|
1
|
+
import { ClassNameProps, QAProps } from '../../models';
|
|
2
2
|
export declare const qaIdByDefault = "qa-anchor";
|
|
3
|
-
export interface AnchorProps extends ClassNameProps {
|
|
3
|
+
export interface AnchorProps extends ClassNameProps, QAProps {
|
|
4
4
|
id: string;
|
|
5
|
-
qa?: string;
|
|
6
5
|
}
|
|
7
6
|
declare const Anchor: ({ id, className, qa }: AnchorProps) => JSX.Element;
|
|
8
7
|
export default Anchor;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { AnimateContextProps } from '../../context/animateContext/AnimateContext';
|
|
3
|
-
import { WithChildren } from '../../models';
|
|
4
|
-
export interface AnimateBlockProps extends AnimateContextProps {
|
|
3
|
+
import { QAProps, WithChildren } from '../../models';
|
|
4
|
+
export interface AnimateBlockProps extends AnimateContextProps, QAProps {
|
|
5
5
|
animate?: boolean;
|
|
6
6
|
offset?: number;
|
|
7
7
|
className?: string;
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
onScroll?: () => void;
|
|
10
|
-
qa?: string;
|
|
11
10
|
}
|
|
12
11
|
declare const AnimateBlock: (props: WithChildren<AnimateBlockProps>) => JSX.Element;
|
|
13
12
|
export default AnimateBlock;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-author {
|
|
4
|
-
font-size: var(--
|
|
5
|
-
line-height: var(--
|
|
4
|
+
font-size: var(--g-text-body-3-font-size);
|
|
5
|
+
line-height: var(--g-text-body-3-line-height);
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
|
-
color: var(--
|
|
8
|
+
color: var(--g-color-text-secondary);
|
|
9
9
|
}
|
|
10
10
|
.pc-author__avatar {
|
|
11
11
|
width: 80px;
|
|
@@ -23,13 +23,13 @@ unpredictable css rules order in build */
|
|
|
23
23
|
display: block;
|
|
24
24
|
}
|
|
25
25
|
.pc-author__name {
|
|
26
|
-
font-size: var(--
|
|
27
|
-
line-height: var(--
|
|
28
|
-
color: var(--
|
|
26
|
+
font-size: var(--g-text-body-3-font-size);
|
|
27
|
+
line-height: var(--g-text-body-3-line-height);
|
|
28
|
+
color: var(--g-color-text-primary);
|
|
29
29
|
}
|
|
30
30
|
.pc-author__description {
|
|
31
|
-
font-size: var(--
|
|
32
|
-
line-height: var(--
|
|
31
|
+
font-size: var(--g-text-body-2-font-size);
|
|
32
|
+
line-height: var(--g-text-body-2-line-height);
|
|
33
33
|
padding-top: 4px;
|
|
34
34
|
}
|
|
35
35
|
.pc-author__label:not(:first-child) {
|
|
@@ -7,10 +7,10 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const index_1 = require("../index");
|
|
8
8
|
const b = (0, utils_1.block)('author');
|
|
9
9
|
const Author = (props) => {
|
|
10
|
-
const { author, className, authorContainerClassName, type = models_1.AuthorType.Column,
|
|
10
|
+
const { author, className, authorContainerClassName, type = models_1.AuthorType.Column, qa } = props;
|
|
11
11
|
const { firstName, secondName, description, avatar } = author;
|
|
12
12
|
const name = secondName ? `${firstName} ${secondName}` : firstName;
|
|
13
|
-
return (react_1.default.createElement("div", { className: b({ type }, className), "data-qa":
|
|
13
|
+
return (react_1.default.createElement("div", { className: b({ type }, className), "data-qa": qa },
|
|
14
14
|
avatar && (react_1.default.createElement("div", { className: b('avatar', authorContainerClassName) }, typeof avatar === 'string' ? react_1.default.createElement(index_1.Image, { src: avatar }) : avatar)),
|
|
15
15
|
react_1.default.createElement("div", { className: b('label') },
|
|
16
16
|
react_1.default.createElement("div", { className: b('name') }, name),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { BlockBaseProps, ClassNameProps } from '../../models';
|
|
3
|
-
export type BlockBaseFullProps = BlockBaseProps & ClassNameProps & PropsWithChildren;
|
|
2
|
+
import { BlockBaseProps, ClassNameProps, QAProps } from '../../models';
|
|
3
|
+
export type BlockBaseFullProps = BlockBaseProps & ClassNameProps & PropsWithChildren & QAProps;
|
|
4
4
|
declare const BlockBase: (props: BlockBaseFullProps) => JSX.Element;
|
|
5
5
|
export default BlockBase;
|
|
@@ -8,7 +8,7 @@ const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
|
|
|
8
8
|
const b = (0, utils_1.block)('block-base');
|
|
9
9
|
const BlockBase = (props) => {
|
|
10
10
|
const { anchor, visible, children, className, resetPaddings, qa } = props;
|
|
11
|
-
return (react_1.default.createElement(grid_1.Col, { className: b({ ['reset-paddings']: resetPaddings }, className), visible: visible, reset: true,
|
|
11
|
+
return (react_1.default.createElement(grid_1.Col, { className: b({ ['reset-paddings']: resetPaddings }, className), visible: visible, reset: true, qa: qa },
|
|
12
12
|
anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
|
|
13
13
|
children));
|
|
14
14
|
};
|
|
@@ -12,6 +12,8 @@ unpredictable css rules order in build */
|
|
|
12
12
|
margin-left: var(--btn-image-margin);
|
|
13
13
|
}
|
|
14
14
|
.pc-button-block_theme_github.pc-button-block_theme_github {
|
|
15
|
+
--g-button-background-color: var(--pc-monochrome-button-background-color);
|
|
16
|
+
--g-button-background-color-hover: var(--pc-monochrome-button-background-color-hover);
|
|
15
17
|
--yc-button-background-color: var(--pc-monochrome-button-background-color);
|
|
16
18
|
--yc-button-background-color-hover: var(--pc-monochrome-button-background-color-hover);
|
|
17
19
|
}
|
|
@@ -25,6 +27,8 @@ unpredictable css rules order in build */
|
|
|
25
27
|
border-radius: 300px;
|
|
26
28
|
}
|
|
27
29
|
.pc-button-block_theme_monochrome {
|
|
30
|
+
--g-button-background-color: var(--pc-monochrome-button-background-color);
|
|
31
|
+
--g-button-background-color-hover: var(--pc-monochrome-button-background-color-hover);
|
|
28
32
|
--yc-button-background-color: var(--pc-monochrome-button-background-color);
|
|
29
33
|
--yc-button-background-color-hover: var(--pc-monochrome-button-background-color-hover);
|
|
30
34
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ButtonProps as ButtonParams } from '../../models';
|
|
3
|
-
export interface ButtonProps extends Omit<ButtonParams, 'url'
|
|
2
|
+
import { ButtonProps as ButtonParams, QAProps } from '../../models';
|
|
3
|
+
export interface ButtonProps extends Omit<ButtonParams, 'url'>, QAProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
url?: string;
|
|
6
6
|
onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
|
|
7
|
-
qa?: string;
|
|
8
7
|
}
|
|
9
8
|
declare const Button: (props: ButtonProps) => JSX.Element;
|
|
10
9
|
export default Button;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const components_1 = require("@gravity-ui/components");
|
|
5
6
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
7
|
const localeContext_1 = require("../../context/localeContext/localeContext");
|
|
7
8
|
const hooks_1 = require("../../hooks");
|
|
@@ -14,7 +15,7 @@ const utils_2 = require("./utils");
|
|
|
14
15
|
const b = (0, utils_1.block)('button-block');
|
|
15
16
|
const Button = (props) => {
|
|
16
17
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
17
|
-
const {
|
|
18
|
+
const { tld } = (0, react_1.useContext)(localeContext_1.LocaleContext);
|
|
18
19
|
const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text, width } = props, rest = tslib_1.__rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "img", "onClick", "text", "width"]);
|
|
19
20
|
const defaultImgPosition = 'left';
|
|
20
21
|
const handleAnalytics = (0, hooks_1.useAnalytics)(models_1.DefaultEventNames.Button, url);
|
|
@@ -35,7 +36,7 @@ const Button = (props) => {
|
|
|
35
36
|
const buttonProps = Object.assign(Object.assign({}, rest), { onClick });
|
|
36
37
|
if (theme === 'app-store' || theme === 'google-play') {
|
|
37
38
|
const platform = theme === 'app-store' ? uikit_1.Platform.IOS : uikit_1.Platform.ANDROID;
|
|
38
|
-
return react_1.default.createElement(
|
|
39
|
+
return react_1.default.createElement(components_1.StoreBadge, { className: buttonClass, platform: platform, href: url });
|
|
39
40
|
}
|
|
40
41
|
let icon;
|
|
41
42
|
let image = img && (react_1.default.createElement("img", { className: b('image'), src: buttonImg.url, alt: buttonImg.alt || (0, i18n_1.default)('image-alt') }));
|
|
@@ -3,6 +3,8 @@ unpredictable css rules order in build */
|
|
|
3
3
|
.pc-button-tabs__item.pc-button-tabs__item {
|
|
4
4
|
margin-right: 8px;
|
|
5
5
|
margin-bottom: 12px;
|
|
6
|
+
--g-button-background-color: var(--pc-tab-item-background-color);
|
|
7
|
+
--g-button-background-color-hover: var(--pc-tab-item-background-color-hover);
|
|
6
8
|
--yc-button-background-color: var(--pc-tab-item-background-color);
|
|
7
9
|
--yc-button-background-color-hover: var(--pc-tab-item-background-color-hover);
|
|
8
10
|
}
|
|
@@ -14,6 +16,8 @@ unpredictable css rules order in build */
|
|
|
14
16
|
}
|
|
15
17
|
.pc-button-tabs__item.pc-button-tabs__item_active {
|
|
16
18
|
pointer-events: none;
|
|
19
|
+
--g-button-background-color: var(--pc-selected-tab-item-background-color);
|
|
20
|
+
--g-button-background-color-hover: var(--pc-selected-tab-item-background-color-hover);
|
|
17
21
|
--yc-button-background-color: var(--pc-selected-tab-item-background-color);
|
|
18
22
|
--yc-button-background-color-hover: var(--pc-selected-tab-item-background-color-hover);
|
|
19
23
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
|
-
import { ButtonProps } from '../../models';
|
|
3
|
+
import { ButtonProps, QAProps } from '../../models';
|
|
4
4
|
export interface ButtonTabsItemProps extends Omit<ButtonProps, 'url' | 'primary' | 'target' | 'text'> {
|
|
5
5
|
id: string | null;
|
|
6
6
|
title: string;
|
|
7
7
|
}
|
|
8
|
-
export interface ButtonTabsProps {
|
|
8
|
+
export interface ButtonTabsProps extends QAProps {
|
|
9
9
|
className?: string;
|
|
10
10
|
items: ButtonTabsItemProps[];
|
|
11
11
|
activeTab?: string | null;
|
|
12
12
|
onSelectTab?: (tabId: string | null, e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
13
13
|
tabSize?: ButtonSize;
|
|
14
|
-
qa?: string;
|
|
15
14
|
}
|
|
16
15
|
declare const ButtonTabs: React.FC<ButtonTabsProps>;
|
|
17
16
|
export default ButtonTabs;
|
|
@@ -15,12 +15,12 @@ unpredictable css rules order in build */
|
|
|
15
15
|
height: 100%;
|
|
16
16
|
overflow-x: hidden;
|
|
17
17
|
border-radius: var(--pc-border-radius);
|
|
18
|
-
background-color: var(--
|
|
18
|
+
background-color: var(--g-color-base-float);
|
|
19
19
|
transition: box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
20
20
|
display: flex;
|
|
21
21
|
}
|
|
22
22
|
.pc-card-base-block_border_line {
|
|
23
|
-
border: 1px solid var(--
|
|
23
|
+
border: 1px solid var(--g-color-line-generic);
|
|
24
24
|
}
|
|
25
25
|
.pc-card-base-block_border_line, .pc-card-base-block_border_none {
|
|
26
26
|
cursor: default;
|
|
@@ -42,8 +42,8 @@ unpredictable css rules order in build */
|
|
|
42
42
|
padding: 32px;
|
|
43
43
|
}
|
|
44
44
|
.pc-card-base-block__body {
|
|
45
|
-
font-size: var(--
|
|
46
|
-
line-height: var(--
|
|
45
|
+
font-size: var(--g-text-body-2-font-size);
|
|
46
|
+
line-height: var(--g-text-body-2-line-height);
|
|
47
47
|
flex: 1;
|
|
48
48
|
padding: 32px;
|
|
49
49
|
}
|
|
@@ -69,7 +69,7 @@ a.pc-card-base-block {
|
|
|
69
69
|
height: 100%;
|
|
70
70
|
overflow-x: hidden;
|
|
71
71
|
border-radius: var(--pc-border-radius);
|
|
72
|
-
background-color: var(--
|
|
72
|
+
background-color: var(--g-color-base-float);
|
|
73
73
|
transition: box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
74
74
|
}
|
|
75
75
|
a.pc-card-base-block:hover, a.pc-card-base-block:active {
|
|
@@ -77,7 +77,7 @@ a.pc-card-base-block:hover, a.pc-card-base-block:active {
|
|
|
77
77
|
color: inherit;
|
|
78
78
|
}
|
|
79
79
|
a.pc-card-base-block_border_line {
|
|
80
|
-
border: 1px solid var(--
|
|
80
|
+
border: 1px solid var(--g-color-line-generic);
|
|
81
81
|
}
|
|
82
82
|
a.pc-card-base-block_border_line, a.pc-card-base-block_border_none {
|
|
83
83
|
cursor: default;
|
|
@@ -42,36 +42,36 @@ unpredictable css rules order in build */
|
|
|
42
42
|
height: 36px;
|
|
43
43
|
}
|
|
44
44
|
.pc-control_theme_primary {
|
|
45
|
-
color: var(--
|
|
45
|
+
color: var(--g-color-text-complementary);
|
|
46
46
|
}
|
|
47
47
|
.pc-control_theme_primary:hover {
|
|
48
|
-
color: var(--
|
|
48
|
+
color: var(--g-color-text-primary);
|
|
49
49
|
}
|
|
50
50
|
.pc-control_theme_secondary {
|
|
51
|
-
color: var(--
|
|
51
|
+
color: var(--g-color-text-secondary);
|
|
52
52
|
}
|
|
53
53
|
.pc-control_theme_secondary:hover {
|
|
54
|
-
color: var(--
|
|
54
|
+
color: var(--g-color-text-complementary);
|
|
55
55
|
}
|
|
56
56
|
.pc-control_theme_link {
|
|
57
|
-
color: var(--
|
|
57
|
+
color: var(--g-color-text-complementary);
|
|
58
58
|
}
|
|
59
59
|
.pc-control_theme_link:hover {
|
|
60
|
-
color: var(--
|
|
60
|
+
color: var(--g-color-text-link-hover);
|
|
61
61
|
}
|
|
62
62
|
.pc-control_theme_accent {
|
|
63
63
|
opacity: 0.7;
|
|
64
|
-
color: var(--
|
|
64
|
+
color: var(--g-color-base-danger-heavy);
|
|
65
65
|
}
|
|
66
66
|
.pc-control_theme_accent:hover {
|
|
67
67
|
opacity: 1;
|
|
68
68
|
}
|
|
69
69
|
.pc-control_disabled {
|
|
70
70
|
cursor: default;
|
|
71
|
-
color: var(--
|
|
71
|
+
color: var(--g-color-text-secondary);
|
|
72
72
|
}
|
|
73
73
|
.pc-control_disabled:hover {
|
|
74
|
-
color: var(--
|
|
74
|
+
color: var(--g-color-text-secondary);
|
|
75
75
|
}
|
|
76
76
|
@media (max-width: 768px) {
|
|
77
77
|
.pc-control:hover {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-ErrorWrapper {
|
|
4
|
-
font-size: var(--
|
|
5
|
-
line-height: var(--
|
|
4
|
+
font-size: var(--g-text-body-1-font-size);
|
|
5
|
+
line-height: var(--g-text-body-1-line-height);
|
|
6
6
|
white-space: nowrap;
|
|
7
|
-
color: var(--
|
|
7
|
+
color: var(--g-color-text-danger);
|
|
8
8
|
}
|
|
9
9
|
.pc-ErrorWrapper__text {
|
|
10
10
|
margin-bottom: 5px;
|
|
@@ -1,27 +1,8 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-file-link {
|
|
4
|
-
--pc-color-label-background: rgba(0, 0, 0, 0.07);
|
|
5
4
|
align-items: baseline;
|
|
6
5
|
}
|
|
7
|
-
.pc-file-link_ext_pdf {
|
|
8
|
-
--pc-file-label-color: var(--yc-color-promo-highlight-tomato);
|
|
9
|
-
}
|
|
10
|
-
.pc-file-link_ext_doc {
|
|
11
|
-
--pc-file-label-color: var(--yc-color-promo-highlight-sky);
|
|
12
|
-
}
|
|
13
|
-
.pc-file-link_ext_xls {
|
|
14
|
-
--pc-file-label-color: var(--yc-color-promo-highlight-mint);
|
|
15
|
-
}
|
|
16
|
-
.pc-file-link_ext_ppt {
|
|
17
|
-
--pc-file-label-color: var(--yc-color-promo-highlight-copper);
|
|
18
|
-
}
|
|
19
|
-
.pc-file-link_ext_fig {
|
|
20
|
-
--pc-file-label-color: var(--yc-color-promo-highlight-neon);
|
|
21
|
-
}
|
|
22
|
-
.pc-file-link_ext_zip {
|
|
23
|
-
--pc-file-label-color: var(--yc-color-promo-highlight-asphalt);
|
|
24
|
-
}
|
|
25
6
|
.pc-file-link_type_horizontal {
|
|
26
7
|
display: flex;
|
|
27
8
|
}
|
|
@@ -29,59 +10,38 @@ unpredictable css rules order in build */
|
|
|
29
10
|
margin-right: 8px;
|
|
30
11
|
}
|
|
31
12
|
.pc-file-link__file-label {
|
|
32
|
-
flex: 0 0 auto;
|
|
33
|
-
width: 44px;
|
|
34
|
-
height: 24px;
|
|
35
|
-
line-height: 24px;
|
|
36
|
-
background-color: var(--pc-file-label-color);
|
|
37
|
-
color: var(--yc-color-text-light-primary);
|
|
38
|
-
border-radius: 4px;
|
|
39
|
-
text-transform: uppercase;
|
|
40
|
-
text-align: center;
|
|
41
|
-
}
|
|
42
|
-
.pc-file-link__file-label {
|
|
43
|
-
color: var(--yc-color-text-primary);
|
|
44
13
|
display: flex;
|
|
45
14
|
justify-content: center;
|
|
46
|
-
|
|
15
|
+
text-transform: uppercase;
|
|
16
|
+
}
|
|
17
|
+
.pc-file-link__file-label .yc-label__text {
|
|
18
|
+
width: initial;
|
|
47
19
|
}
|
|
48
20
|
.pc-file-link__link > a {
|
|
49
|
-
color: var(--
|
|
21
|
+
color: var(--g-color-text-primary);
|
|
50
22
|
}
|
|
51
23
|
.pc-file-link__link > a:hover {
|
|
52
|
-
color: var(--
|
|
24
|
+
color: var(--g-color-text-secondary);
|
|
53
25
|
}
|
|
54
26
|
.pc-file-link_size_l .pc-file-link__file-label {
|
|
55
|
-
font-size: var(--
|
|
56
|
-
line-height: var(--
|
|
57
|
-
width:
|
|
58
|
-
height: 24px;
|
|
59
|
-
padding: 2px 6px;
|
|
27
|
+
font-size: var(--g-text-body-2-font-size);
|
|
28
|
+
line-height: var(--g-text-body-2-line-height);
|
|
29
|
+
width: 52px;
|
|
60
30
|
}
|
|
61
31
|
.pc-file-link_size_m .pc-file-link__file-label, .pc-file-link_size_s .pc-file-link__file-label {
|
|
62
|
-
font-size: var(--
|
|
63
|
-
line-height: var(--
|
|
64
|
-
width:
|
|
65
|
-
height: 20px;
|
|
66
|
-
padding: 1px 4px;
|
|
67
|
-
}
|
|
68
|
-
.pc-file-link_theme_dark .pc-file-link__file-label {
|
|
69
|
-
color: var(--yc-color-text-light-primary);
|
|
70
|
-
background-color: var(--yc-color-base-light-simple-hover);
|
|
32
|
+
font-size: var(--g-text-body-1-font-size);
|
|
33
|
+
line-height: var(--g-text-body-1-line-height);
|
|
34
|
+
width: 44px;
|
|
71
35
|
}
|
|
72
36
|
.pc-file-link_theme_dark .pc-file-link__link > a {
|
|
73
|
-
color: var(--
|
|
37
|
+
color: var(--g-color-text-light-primary);
|
|
74
38
|
}
|
|
75
39
|
.pc-file-link_theme_dark .pc-file-link__link > a:hover {
|
|
76
|
-
color: var(--
|
|
77
|
-
}
|
|
78
|
-
.pc-file-link_theme_light .pc-file-link__file-label {
|
|
79
|
-
color: var(--yc-color-text-dark-primary);
|
|
80
|
-
background-color: var(--pc-color-label-background);
|
|
40
|
+
color: var(--g-color-text-light-secondary);
|
|
81
41
|
}
|
|
82
42
|
.pc-file-link_theme_light .pc-file-link__link > a {
|
|
83
|
-
color: var(--
|
|
43
|
+
color: var(--g-color-text-dark-primary);
|
|
84
44
|
}
|
|
85
45
|
.pc-file-link_theme_light .pc-file-link__link > a:hover {
|
|
86
|
-
color: var(--
|
|
46
|
+
color: var(--g-color-text-dark-secondary);
|
|
87
47
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getFileExt = exports.FileExtension = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
7
|
const locationContext_1 = require("../../context/locationContext");
|
|
7
8
|
const utils_1 = require("../../utils");
|
|
8
9
|
const b = (0, utils_1.block)('file-link');
|
|
@@ -24,12 +25,28 @@ function getFileExt(name) {
|
|
|
24
25
|
return name && name.split('.').pop().toLowerCase();
|
|
25
26
|
}
|
|
26
27
|
exports.getFileExt = getFileExt;
|
|
28
|
+
const FileExtensionThemes = {
|
|
29
|
+
[FileExtension.PDF]: 'danger',
|
|
30
|
+
[FileExtension.DOC]: 'info',
|
|
31
|
+
[FileExtension.XLS]: 'success',
|
|
32
|
+
[FileExtension.PPT]: 'warning',
|
|
33
|
+
[FileExtension.FIG]: 'normal',
|
|
34
|
+
[FileExtension.ZIP]: 'unknown',
|
|
35
|
+
};
|
|
36
|
+
const LabelSizeMap = {
|
|
37
|
+
l: 's',
|
|
38
|
+
m: 's',
|
|
39
|
+
s: 'xs',
|
|
40
|
+
xs: 'xs',
|
|
41
|
+
};
|
|
27
42
|
const FileLink = (props) => {
|
|
28
43
|
const { hostname } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
29
44
|
const { href, text, type = 'vertical', textSize = 'm', className, theme = 'default', onClick, } = props;
|
|
30
45
|
const fileExt = getFileExt(href);
|
|
46
|
+
const labelTheme = (FileExtensionThemes[fileExt] || 'unknown');
|
|
47
|
+
const labelSize = LabelSizeMap[textSize];
|
|
31
48
|
return (react_1.default.createElement("div", { className: b({ ext: fileExt, type, size: textSize, theme }, className) },
|
|
32
|
-
|
|
49
|
+
react_1.default.createElement(uikit_1.Label, { className: b('file-label'), size: labelSize, theme: labelTheme }, fileExt),
|
|
33
50
|
react_1.default.createElement("div", { className: b('link') },
|
|
34
51
|
react_1.default.createElement("a", Object.assign({ href: href }, (0, utils_1.getLinkProps)(href, hostname), { onClick: onClick }), text))));
|
|
35
52
|
};
|
|
@@ -28,7 +28,7 @@ unpredictable css rules order in build */
|
|
|
28
28
|
width: 36px;
|
|
29
29
|
height: 36px;
|
|
30
30
|
border-radius: 8px;
|
|
31
|
-
background-color: var(--
|
|
31
|
+
background-color: var(--g-color-base-simple-hover-solid);
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
opacity: 0;
|
|
34
34
|
transition: 0.3s;
|
|
@@ -37,10 +37,10 @@ unpredictable css rules order in build */
|
|
|
37
37
|
opacity: 1;
|
|
38
38
|
}
|
|
39
39
|
.pc-fullscreen-image__icon {
|
|
40
|
-
color: var(--
|
|
40
|
+
color: var(--g-color-text-hint);
|
|
41
41
|
}
|
|
42
42
|
.pc-fullscreen-image__icon_hover:hover {
|
|
43
|
-
color: var(--
|
|
43
|
+
color: var(--g-color-text-secondary);
|
|
44
44
|
}
|
|
45
45
|
@media (max-width: 1185px) {
|
|
46
46
|
.pc-fullscreen-image__modal-image {
|
|
@@ -41,7 +41,7 @@ unpredictable css rules order in build */
|
|
|
41
41
|
width: 36px;
|
|
42
42
|
height: 36px;
|
|
43
43
|
border-radius: 8px;
|
|
44
|
-
background-color: var(--
|
|
44
|
+
background-color: var(--g-color-base-simple-hover-solid);
|
|
45
45
|
cursor: pointer;
|
|
46
46
|
z-index: 10;
|
|
47
47
|
}
|
|
@@ -55,10 +55,10 @@ unpredictable css rules order in build */
|
|
|
55
55
|
pointer-events: inherit;
|
|
56
56
|
}
|
|
57
57
|
.pc-full-screen-media__icon {
|
|
58
|
-
color: var(--
|
|
58
|
+
color: var(--g-color-text-hint);
|
|
59
59
|
}
|
|
60
60
|
.pc-full-screen-media__icon_hover:hover {
|
|
61
|
-
color: var(--
|
|
61
|
+
color: var(--g-color-text-secondary);
|
|
62
62
|
}
|
|
63
63
|
@media (max-width: 577px) {
|
|
64
64
|
.pc-full-screen-media__icon-wrapper {
|
|
@@ -8,35 +8,35 @@ unpredictable css rules order in build */
|
|
|
8
8
|
display: inline-block;
|
|
9
9
|
}
|
|
10
10
|
.pc-header-breadcrumbs__text {
|
|
11
|
-
font-size: var(--
|
|
12
|
-
line-height: var(--
|
|
11
|
+
font-size: var(--g-text-body-2-font-size);
|
|
12
|
+
line-height: var(--g-text-body-2-line-height);
|
|
13
13
|
outline: none;
|
|
14
|
-
color: var(--
|
|
14
|
+
color: var(--g-color-text-link);
|
|
15
15
|
text-decoration: none;
|
|
16
16
|
cursor: pointer;
|
|
17
|
-
color: var(--
|
|
17
|
+
color: var(--g-color-text-secondary);
|
|
18
18
|
}
|
|
19
19
|
.utilityfocus .pc-header-breadcrumbs__text:focus {
|
|
20
20
|
outline: 2px solid #ffdb4d;
|
|
21
21
|
}
|
|
22
22
|
.pc-header-breadcrumbs__text:hover, .pc-header-breadcrumbs__text:active {
|
|
23
|
-
--pc-text-header-color: var(--
|
|
24
|
-
color: var(--
|
|
23
|
+
--pc-text-header-color: var(--g-color-text-link-hover);
|
|
24
|
+
color: var(--g-color-text-link-hover);
|
|
25
25
|
}
|
|
26
26
|
.pc-header-breadcrumbs__text:after {
|
|
27
27
|
content: " / ";
|
|
28
28
|
margin: 0 8px 0 6px;
|
|
29
|
-
color: var(--
|
|
29
|
+
color: var(--g-color-text-secondary);
|
|
30
30
|
}
|
|
31
31
|
.pc-header-breadcrumbs__text:hover {
|
|
32
|
-
color: var(--
|
|
32
|
+
color: var(--g-color-text-primary);
|
|
33
33
|
}
|
|
34
34
|
.pc-header-breadcrumbs_theme_dark .pc-header-breadcrumbs__text {
|
|
35
|
-
color: var(--
|
|
35
|
+
color: var(--g-color-text-light-secondary);
|
|
36
36
|
}
|
|
37
37
|
.pc-header-breadcrumbs_theme_dark .pc-header-breadcrumbs__text:after {
|
|
38
|
-
color: var(--
|
|
38
|
+
color: var(--g-color-text-light-secondary);
|
|
39
39
|
}
|
|
40
40
|
.pc-header-breadcrumbs_theme_dark .pc-header-breadcrumbs__text:hover {
|
|
41
|
-
color: var(--
|
|
41
|
+
color: var(--g-color-text-light-primary);
|
|
42
42
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { CSSProperties, MouseEventHandler } from 'react';
|
|
2
|
-
import { ImageDeviceProps, ImageObjectProps } from '../../models';
|
|
3
|
-
export interface ImageProps extends Partial<ImageObjectProps>, Partial<ImageDeviceProps
|
|
2
|
+
import { ImageDeviceProps, ImageObjectProps, QAProps } from '../../models';
|
|
3
|
+
export interface ImageProps extends Partial<ImageObjectProps>, Partial<ImageDeviceProps>, QAProps {
|
|
4
4
|
style?: CSSProperties;
|
|
5
5
|
className?: string;
|
|
6
6
|
onClick?: MouseEventHandler;
|
|
7
7
|
containerClassName?: string;
|
|
8
|
-
qa?: string;
|
|
9
8
|
}
|
|
10
9
|
declare const Image: (props: ImageProps) => JSX.Element | null;
|
|
11
10
|
export default Image;
|