@doyourjob/gravity-ui-page-constructor-addons 2.1.33 → 2.1.35
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/build/cjs/components/NewHeader/NewHeader.css +3 -6
- package/build/cjs/components/NewHeader/NewHeader.js +6 -5
- package/build/cjs/components/NewHeader/components/NHBanner/NHBanner.css +42 -0
- package/build/cjs/components/NewHeader/components/NHBanner/NHBanner.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHBanner/NHBanner.js +17 -0
- package/build/cjs/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.css +38 -88
- package/build/cjs/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.js +28 -33
- package/build/cjs/components/NewHeader/components/NHEventCard/NHEventCard.css +48 -0
- package/build/cjs/components/NewHeader/components/NHEventCard/NHEventCard.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHEventCard/NHEventCard.js +15 -0
- package/build/cjs/components/NewHeader/components/NHLogo/NHLogo.css +4 -0
- package/build/cjs/components/NewHeader/components/NHLogo/NHLogo.d.ts +6 -0
- package/build/cjs/components/NewHeader/components/NHLogo/NHLogo.js +12 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.css +43 -8
- package/build/cjs/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.d.ts +4 -3
- package/build/cjs/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.js +19 -12
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.css +41 -40
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.d.ts +6 -2
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.js +15 -11
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/components/NHDefaultPopupContent/NHDefaultPopupContent.css +56 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/components/NHDefaultPopupContent/NHDefaultPopupContent.d.ts +5 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/components/NHDefaultPopupContent/NHDefaultPopupContent.js +32 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.css +11 -30
- package/build/cjs/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.js +1 -5
- package/build/cjs/components/NewHeader/components/NHNavigation/NHNavigation.js +1 -4
- package/build/cjs/components/NewHeader/components/NHNavigationItem/NHNavigationItem.js +2 -2
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.css +15 -1
- package/build/cjs/components/NewHeader/components/NHStock/NHStock.css +47 -0
- package/build/cjs/components/NewHeader/components/NHStock/NHStock.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHStock/NHStock.js +21 -0
- package/build/cjs/components/NewHeader/components/NHStoryCard/NHStoryCard.css +42 -0
- package/build/cjs/components/NewHeader/components/NHStoryCard/NHStoryCard.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHStoryCard/NHStoryCard.js +14 -0
- package/build/cjs/components/NewHeader/models.d.ts +9 -43
- package/build/cjs/components/NewHeader/models.js +0 -1
- package/build/esm/components/NewHeader/NewHeader.css +3 -6
- package/build/esm/components/NewHeader/NewHeader.js +7 -6
- package/build/esm/components/NewHeader/components/NHBanner/NHBanner.css +42 -0
- package/build/esm/components/NewHeader/components/NHBanner/NHBanner.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHBanner/NHBanner.js +13 -0
- package/build/esm/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.css +38 -88
- package/build/esm/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.js +27 -32
- package/build/esm/components/NewHeader/components/NHEventCard/NHEventCard.css +48 -0
- package/build/esm/components/NewHeader/components/NHEventCard/NHEventCard.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHEventCard/NHEventCard.js +11 -0
- package/build/esm/components/NewHeader/components/NHLogo/NHLogo.css +4 -0
- package/build/esm/components/NewHeader/components/NHLogo/NHLogo.d.ts +7 -0
- package/build/esm/components/NewHeader/components/NHLogo/NHLogo.js +8 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.css +43 -8
- package/build/esm/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.d.ts +4 -3
- package/build/esm/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.js +19 -12
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.css +41 -40
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.d.ts +6 -2
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.js +15 -11
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/components/NHDefaultPopupContent/NHDefaultPopupContent.css +56 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/components/NHDefaultPopupContent/NHDefaultPopupContent.d.ts +6 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/components/NHDefaultPopupContent/NHDefaultPopupContent.js +28 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.css +11 -30
- package/build/esm/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.js +1 -5
- package/build/esm/components/NewHeader/components/NHNavigation/NHNavigation.js +1 -4
- package/build/esm/components/NewHeader/components/NHNavigationItem/NHNavigationItem.js +2 -2
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.css +15 -1
- package/build/esm/components/NewHeader/components/NHStock/NHStock.css +47 -0
- package/build/esm/components/NewHeader/components/NHStock/NHStock.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHStock/NHStock.js +17 -0
- package/build/esm/components/NewHeader/components/NHStoryCard/NHStoryCard.css +42 -0
- package/build/esm/components/NewHeader/components/NHStoryCard/NHStoryCard.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHStoryCard/NHStoryCard.js +10 -0
- package/build/esm/components/NewHeader/models.d.ts +9 -43
- package/build/esm/components/NewHeader/models.js +0 -1
- package/package.json +1 -1
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +0 -118
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +0 -43
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +0 -118
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +0 -39
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ButtonProps, LinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
2
2
|
export declare enum NHNavigationItemType {
|
|
3
|
-
NHProductsPopup = "products-popup",
|
|
4
3
|
NHDefaultPopup = "default-popup",
|
|
5
4
|
Link = "link"
|
|
6
5
|
}
|
|
@@ -29,29 +28,13 @@ export interface NHProductBannerData {
|
|
|
29
28
|
color?: string;
|
|
30
29
|
border?: boolean;
|
|
31
30
|
}
|
|
32
|
-
export interface NHProductsPopupSectionBase {
|
|
33
|
-
title: string;
|
|
34
|
-
subtitle: string;
|
|
35
|
-
items?: NHPopupItemData[];
|
|
36
|
-
}
|
|
37
|
-
export interface NHProductsPopupSectionRun extends NHProductsPopupSectionBase {
|
|
38
|
-
mode: 'run';
|
|
39
|
-
}
|
|
40
|
-
export interface NHProductsPopupSectionScale extends NHProductsPopupSectionBase {
|
|
41
|
-
mode: 'scale';
|
|
42
|
-
banner?: NHProductBannerData;
|
|
43
|
-
}
|
|
44
|
-
export type NHProductsPopupSection = NHProductsPopupSectionRun | NHProductsPopupSectionScale | NHProductsPopupSectionBase;
|
|
45
|
-
export interface NHProductsPopupData {
|
|
46
|
-
primaryColor?: string;
|
|
47
|
-
primaryColorHover?: string;
|
|
48
|
-
sections: NHProductsPopupSection[];
|
|
49
|
-
}
|
|
50
31
|
export interface NHDefaultPopupSection {
|
|
51
32
|
title: string;
|
|
52
33
|
subtitle: string;
|
|
53
34
|
items: NHPopupItemData[];
|
|
54
35
|
columns?: number;
|
|
36
|
+
mode?: 'run' | 'scale' | 'build';
|
|
37
|
+
banner?: NHProductBannerData;
|
|
55
38
|
}
|
|
56
39
|
export interface NHStoryCardData {
|
|
57
40
|
title: string;
|
|
@@ -66,6 +49,11 @@ export interface NHEventCardData {
|
|
|
66
49
|
image: string;
|
|
67
50
|
url: string;
|
|
68
51
|
}
|
|
52
|
+
export interface NHStockData {
|
|
53
|
+
title?: string;
|
|
54
|
+
image?: string;
|
|
55
|
+
delayed?: string;
|
|
56
|
+
}
|
|
69
57
|
export interface NHDefaultPopupData {
|
|
70
58
|
sections: NHDefaultPopupSection[];
|
|
71
59
|
maxWidth?: number;
|
|
@@ -75,8 +63,7 @@ export interface NHDefaultPopupData {
|
|
|
75
63
|
title: string;
|
|
76
64
|
stories?: NHStoryCardData[];
|
|
77
65
|
events?: NHEventCardData[];
|
|
78
|
-
stock?:
|
|
79
|
-
stockImage?: string;
|
|
66
|
+
stock?: NHStockData;
|
|
80
67
|
};
|
|
81
68
|
}
|
|
82
69
|
export interface NHLoginItemData {
|
|
@@ -95,35 +82,14 @@ export interface NHNavigationLinkData extends NHNavigationDefaultData {
|
|
|
95
82
|
type: NHNavigationItemType.Link;
|
|
96
83
|
data: LinkProps;
|
|
97
84
|
}
|
|
98
|
-
export interface NHNavigationProductsPopupData extends NHNavigationDefaultData {
|
|
99
|
-
type: NHNavigationItemType.NHProductsPopup;
|
|
100
|
-
data: NHProductsPopupData;
|
|
101
|
-
}
|
|
102
85
|
export interface NHNavigationDefaultPopupData extends NHNavigationDefaultData {
|
|
103
86
|
type: NHNavigationItemType.NHDefaultPopup;
|
|
104
87
|
data: NHDefaultPopupData;
|
|
105
88
|
}
|
|
106
|
-
export type NHNavigationItemData = NHNavigationLinkData |
|
|
107
|
-
export interface NHMobileNavigationDefaultData {
|
|
108
|
-
title: string;
|
|
109
|
-
}
|
|
110
|
-
export interface NHMobileNavigationLinkData extends NHMobileNavigationDefaultData {
|
|
111
|
-
link: LinkProps;
|
|
112
|
-
}
|
|
113
|
-
export interface NHMobileNavigationGroupData extends NHMobileNavigationDefaultData {
|
|
114
|
-
data: {
|
|
115
|
-
title?: string;
|
|
116
|
-
items: {
|
|
117
|
-
title: string;
|
|
118
|
-
url: string;
|
|
119
|
-
}[];
|
|
120
|
-
}[];
|
|
121
|
-
}
|
|
122
|
-
export type NHMobileNavigationItemData = NHMobileNavigationLinkData | NHMobileNavigationGroupData;
|
|
89
|
+
export type NHNavigationItemData = NHNavigationLinkData | NHNavigationDefaultPopupData;
|
|
123
90
|
export interface NHNavigationData {
|
|
124
91
|
left?: NHNavigationItemData[];
|
|
125
92
|
right?: NHNavigationItemData[];
|
|
126
|
-
mobile?: NHMobileNavigationItemData[];
|
|
127
93
|
login?: NHLoginPopupData;
|
|
128
94
|
logo?: NHLogoData;
|
|
129
95
|
buttons?: ButtonProps[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export var NHNavigationItemType;
|
|
2
2
|
(function (NHNavigationItemType) {
|
|
3
|
-
NHNavigationItemType["NHProductsPopup"] = "products-popup";
|
|
4
3
|
NHNavigationItemType["NHDefaultPopup"] = "default-popup";
|
|
5
4
|
NHNavigationItemType["Link"] = "link";
|
|
6
5
|
})(NHNavigationItemType || (NHNavigationItemType = {}));
|
package/package.json
CHANGED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-addons-nh-products-popup {
|
|
4
|
-
background: var(--g-color-base-float);
|
|
5
|
-
box-shadow: 0 4px 24px var(--g-color-base-generic), 0 2px 8px var(--g-color-base-generic);
|
|
6
|
-
max-height: calc(100vh - 64px - 64px);
|
|
7
|
-
overflow: auto;
|
|
8
|
-
width: 100%;
|
|
9
|
-
border-radius: var(--pc-border-radius, 24px);
|
|
10
|
-
scrollbar-width: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.pc-addons-nh-products-popup::-webkit-scrollbar {
|
|
14
|
-
display: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.pc-addons-nh-products-popup > div + div {
|
|
18
|
-
border-top: 1px solid var(--g-color-line-generic-solid);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.pc-addons-nh-products-popup__section {
|
|
22
|
-
display: flex;
|
|
23
|
-
padding: 24px 32px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.pc-addons-nh-products-popup__section-head {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
width: 200px;
|
|
30
|
-
padding-right: 32px;
|
|
31
|
-
flex-shrink: 0;
|
|
32
|
-
gap: 2px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.pc-addons-nh-products-popup__title {
|
|
36
|
-
font-size: var(--g-text-body-3-font-size, var(--pc-text-body-3-font-size));
|
|
37
|
-
line-height: var(--g-text-body-3-line-height, var(--pc-text-body-3-line-height));
|
|
38
|
-
color: var(--g-color-text-primary);
|
|
39
|
-
font-weight: 500;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.pc-addons-nh-products-popup__subtitle {
|
|
43
|
-
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
44
|
-
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
45
|
-
color: var(--g-color-text-secondary);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.pc-addons-nh-products-popup__wrap, .pc-addons-nh-products-popup__wrap-scale {
|
|
49
|
-
display: grid;
|
|
50
|
-
gap: 24px 40px;
|
|
51
|
-
align-items: flex-start;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.pc-addons-nh-products-popup__wrap {
|
|
55
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.pc-addons-nh-products-popup__wrap-scale {
|
|
59
|
-
grid-template-columns: repeat(12, 1fr);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.pc-addons-nh-products-popup__wrap-scale > a {
|
|
63
|
-
grid-column: span 4;
|
|
64
|
-
grid-row: 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.pc-addons-nh-products-popup__wrap-scale > .pc-addons-nh-products-popup__wrap:empty {
|
|
68
|
-
display: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.pc-addons-nh-products-popup__wrap-scale > a + .pc-addons-nh-products-popup__wrap {
|
|
72
|
-
grid-column: span 8;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.pc-addons-nh-products-popup__wrap-scale > .pc-addons-nh-products-popup__wrap:last-child {
|
|
76
|
-
grid-column: span 12;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.pc-addons-nh-products-popup__banner {
|
|
80
|
-
color: inherit;
|
|
81
|
-
text-decoration: none;
|
|
82
|
-
grid-area: 1/3/3/4;
|
|
83
|
-
border-radius: 16px;
|
|
84
|
-
padding: 16px;
|
|
85
|
-
display: flex;
|
|
86
|
-
gap: 20px;
|
|
87
|
-
background: var(--nh-products-banner-background, transparent);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.pc-addons-nh-products-popup__banner_border {
|
|
91
|
-
border: 1px solid var(--g-color-line-generic-solid);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.pc-addons-nh-products-popup__banner-wrap {
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
flex: 1;
|
|
98
|
-
gap: 4px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.pc-addons-nh-products-popup__banner-title {
|
|
102
|
-
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
103
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
104
|
-
color: var(--nh-products-banner-color, var(--g-color-text-primary));
|
|
105
|
-
font-weight: 600;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.pc-addons-nh-products-popup__banner-description {
|
|
109
|
-
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
110
|
-
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
111
|
-
color: var(--nh-products-banner-color, var(--g-color-text-secondary));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.pc-addons-nh-products-popup__banner-image {
|
|
115
|
-
display: block;
|
|
116
|
-
width: 86px;
|
|
117
|
-
aspect-ratio: 1;
|
|
118
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NHProductsPopup = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
-
const cn_1 = require("../../../../utils/cn");
|
|
8
|
-
const NHPopupItem_1 = require("../NHPopupItem/NHPopupItem");
|
|
9
|
-
const b = (0, cn_1.block)('nh-products-popup');
|
|
10
|
-
const NHBanner = ({ title, description, image, url, background, color, border, }) => {
|
|
11
|
-
const styles = (0, react_1.useMemo)(() => (Object.assign(Object.assign({}, (background ? { '--nh-products-banner-background': background } : {})), (color ? { '--nh-products-banner-color': color } : {}))), [background, color]);
|
|
12
|
-
return (react_1.default.createElement("a", Object.assign({ href: url, className: b('banner', { border }), style: styles }, (0, gravity_ui_page_constructor_1.getLinkProps)(url)),
|
|
13
|
-
react_1.default.createElement(gravity_ui_page_constructor_1.Image, { className: b('banner-image'), src: image }),
|
|
14
|
-
react_1.default.createElement("div", { className: b('banner-wrap') },
|
|
15
|
-
react_1.default.createElement("div", { className: b('banner-title') }, title),
|
|
16
|
-
react_1.default.createElement("div", { className: b('banner-description') }, description))));
|
|
17
|
-
};
|
|
18
|
-
const NHProductsPopup = ({ sections, primaryColor, primaryColorHover, }) => (react_1.default.createElement("div", { className: b() }, sections.map((section) => {
|
|
19
|
-
var _a, _b, _c, _d, _e;
|
|
20
|
-
let content;
|
|
21
|
-
if ('mode' in section && section.mode === 'run') {
|
|
22
|
-
content = (react_1.default.createElement("div", { className: b('wrap-scale') },
|
|
23
|
-
((_a = section.items) === null || _a === void 0 ? void 0 : _a[0]) && react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({}, section.items[0], { column: true })),
|
|
24
|
-
react_1.default.createElement("div", { className: b('wrap') }, (_b = section.items) === null || _b === void 0 ? void 0 : _b.slice(1, 4).map((item, cardIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 1}` }, item, { column: true }))))),
|
|
25
|
-
react_1.default.createElement("div", { className: b('wrap') }, (_c = section.items) === null || _c === void 0 ? void 0 : _c.slice(4).map((item, cardIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 4}` }, item, { column: true })))))));
|
|
26
|
-
}
|
|
27
|
-
else if ('mode' in section && section.mode === 'scale') {
|
|
28
|
-
content = (react_1.default.createElement("div", { className: b('wrap') }, (_d = section.items) === null || _d === void 0 ? void 0 :
|
|
29
|
-
_d.map((item, itemIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item)))),
|
|
30
|
-
section.banner && react_1.default.createElement(NHBanner, Object.assign({}, section.banner))));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
content = (react_1.default.createElement("div", { className: b('wrap') }, (_e = section.items) === null || _e === void 0 ? void 0 :
|
|
34
|
-
_e.map((item, itemIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item)))),
|
|
35
|
-
' '));
|
|
36
|
-
}
|
|
37
|
-
return (react_1.default.createElement("div", { className: b('section'), key: section.title },
|
|
38
|
-
react_1.default.createElement("div", { className: b('section-head') },
|
|
39
|
-
react_1.default.createElement("div", { className: b('title') }, section.title),
|
|
40
|
-
react_1.default.createElement("div", { className: b('subtitle') }, section.subtitle)),
|
|
41
|
-
content));
|
|
42
|
-
})));
|
|
43
|
-
exports.NHProductsPopup = NHProductsPopup;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-addons-nh-products-popup {
|
|
4
|
-
background: var(--g-color-base-float);
|
|
5
|
-
box-shadow: 0 4px 24px var(--g-color-base-generic), 0 2px 8px var(--g-color-base-generic);
|
|
6
|
-
max-height: calc(100vh - 64px - 64px);
|
|
7
|
-
overflow: auto;
|
|
8
|
-
width: 100%;
|
|
9
|
-
border-radius: var(--pc-border-radius, 24px);
|
|
10
|
-
scrollbar-width: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.pc-addons-nh-products-popup::-webkit-scrollbar {
|
|
14
|
-
display: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.pc-addons-nh-products-popup > div + div {
|
|
18
|
-
border-top: 1px solid var(--g-color-line-generic-solid);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.pc-addons-nh-products-popup__section {
|
|
22
|
-
display: flex;
|
|
23
|
-
padding: 24px 32px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.pc-addons-nh-products-popup__section-head {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
width: 200px;
|
|
30
|
-
padding-right: 32px;
|
|
31
|
-
flex-shrink: 0;
|
|
32
|
-
gap: 2px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.pc-addons-nh-products-popup__title {
|
|
36
|
-
font-size: var(--g-text-body-3-font-size, var(--pc-text-body-3-font-size));
|
|
37
|
-
line-height: var(--g-text-body-3-line-height, var(--pc-text-body-3-line-height));
|
|
38
|
-
color: var(--g-color-text-primary);
|
|
39
|
-
font-weight: 500;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.pc-addons-nh-products-popup__subtitle {
|
|
43
|
-
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
44
|
-
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
45
|
-
color: var(--g-color-text-secondary);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.pc-addons-nh-products-popup__wrap, .pc-addons-nh-products-popup__wrap-scale {
|
|
49
|
-
display: grid;
|
|
50
|
-
gap: 24px 40px;
|
|
51
|
-
align-items: flex-start;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.pc-addons-nh-products-popup__wrap {
|
|
55
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.pc-addons-nh-products-popup__wrap-scale {
|
|
59
|
-
grid-template-columns: repeat(12, 1fr);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.pc-addons-nh-products-popup__wrap-scale > a {
|
|
63
|
-
grid-column: span 4;
|
|
64
|
-
grid-row: 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.pc-addons-nh-products-popup__wrap-scale > .pc-addons-nh-products-popup__wrap:empty {
|
|
68
|
-
display: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.pc-addons-nh-products-popup__wrap-scale > a + .pc-addons-nh-products-popup__wrap {
|
|
72
|
-
grid-column: span 8;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.pc-addons-nh-products-popup__wrap-scale > .pc-addons-nh-products-popup__wrap:last-child {
|
|
76
|
-
grid-column: span 12;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.pc-addons-nh-products-popup__banner {
|
|
80
|
-
color: inherit;
|
|
81
|
-
text-decoration: none;
|
|
82
|
-
grid-area: 1/3/3/4;
|
|
83
|
-
border-radius: 16px;
|
|
84
|
-
padding: 16px;
|
|
85
|
-
display: flex;
|
|
86
|
-
gap: 20px;
|
|
87
|
-
background: var(--nh-products-banner-background, transparent);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.pc-addons-nh-products-popup__banner_border {
|
|
91
|
-
border: 1px solid var(--g-color-line-generic-solid);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.pc-addons-nh-products-popup__banner-wrap {
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
flex: 1;
|
|
98
|
-
gap: 4px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.pc-addons-nh-products-popup__banner-title {
|
|
102
|
-
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
103
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
104
|
-
color: var(--nh-products-banner-color, var(--g-color-text-primary));
|
|
105
|
-
font-weight: 600;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.pc-addons-nh-products-popup__banner-description {
|
|
109
|
-
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
110
|
-
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
111
|
-
color: var(--nh-products-banner-color, var(--g-color-text-secondary));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.pc-addons-nh-products-popup__banner-image {
|
|
115
|
-
display: block;
|
|
116
|
-
width: 86px;
|
|
117
|
-
aspect-ratio: 1;
|
|
118
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import { Image, getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
-
import { block } from '../../../../utils/cn';
|
|
4
|
-
import { NHPopupItem } from '../NHPopupItem/NHPopupItem';
|
|
5
|
-
import './NHProductsPopup.css';
|
|
6
|
-
const b = block('nh-products-popup');
|
|
7
|
-
const NHBanner = ({ title, description, image, url, background, color, border, }) => {
|
|
8
|
-
const styles = useMemo(() => (Object.assign(Object.assign({}, (background ? { '--nh-products-banner-background': background } : {})), (color ? { '--nh-products-banner-color': color } : {}))), [background, color]);
|
|
9
|
-
return (React.createElement("a", Object.assign({ href: url, className: b('banner', { border }), style: styles }, getLinkProps(url)),
|
|
10
|
-
React.createElement(Image, { className: b('banner-image'), src: image }),
|
|
11
|
-
React.createElement("div", { className: b('banner-wrap') },
|
|
12
|
-
React.createElement("div", { className: b('banner-title') }, title),
|
|
13
|
-
React.createElement("div", { className: b('banner-description') }, description))));
|
|
14
|
-
};
|
|
15
|
-
export const NHProductsPopup = ({ sections, primaryColor, primaryColorHover, }) => (React.createElement("div", { className: b() }, sections.map((section) => {
|
|
16
|
-
var _a, _b, _c, _d, _e;
|
|
17
|
-
let content;
|
|
18
|
-
if ('mode' in section && section.mode === 'run') {
|
|
19
|
-
content = (React.createElement("div", { className: b('wrap-scale') },
|
|
20
|
-
((_a = section.items) === null || _a === void 0 ? void 0 : _a[0]) && React.createElement(NHPopupItem, Object.assign({}, section.items[0], { column: true })),
|
|
21
|
-
React.createElement("div", { className: b('wrap') }, (_b = section.items) === null || _b === void 0 ? void 0 : _b.slice(1, 4).map((item, cardIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 1}` }, item, { column: true }))))),
|
|
22
|
-
React.createElement("div", { className: b('wrap') }, (_c = section.items) === null || _c === void 0 ? void 0 : _c.slice(4).map((item, cardIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 4}` }, item, { column: true })))))));
|
|
23
|
-
}
|
|
24
|
-
else if ('mode' in section && section.mode === 'scale') {
|
|
25
|
-
content = (React.createElement("div", { className: b('wrap') }, (_d = section.items) === null || _d === void 0 ? void 0 :
|
|
26
|
-
_d.map((item, itemIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item)))),
|
|
27
|
-
section.banner && React.createElement(NHBanner, Object.assign({}, section.banner))));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
content = (React.createElement("div", { className: b('wrap') }, (_e = section.items) === null || _e === void 0 ? void 0 :
|
|
31
|
-
_e.map((item, itemIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item)))),
|
|
32
|
-
' '));
|
|
33
|
-
}
|
|
34
|
-
return (React.createElement("div", { className: b('section'), key: section.title },
|
|
35
|
-
React.createElement("div", { className: b('section-head') },
|
|
36
|
-
React.createElement("div", { className: b('title') }, section.title),
|
|
37
|
-
React.createElement("div", { className: b('subtitle') }, section.subtitle)),
|
|
38
|
-
content));
|
|
39
|
-
})));
|