@doyourjob/gravity-ui-page-constructor-addons 2.1.25-dev.0 → 2.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/build/cjs/components/Navigation/components/Navigation/Navigation.d.ts +2 -2
  2. package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +2 -2
  3. package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +2 -2
  4. package/build/cjs/components/index.d.ts +0 -1
  5. package/build/cjs/components/index.js +0 -1
  6. package/build/esm/components/Navigation/components/Navigation/Navigation.d.ts +2 -2
  7. package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +2 -2
  8. package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +2 -2
  9. package/build/esm/components/index.d.ts +0 -1
  10. package/build/esm/components/index.js +0 -1
  11. package/package.json +1 -1
  12. package/build/cjs/components/NewHeader/NewHeader.css +0 -162
  13. package/build/cjs/components/NewHeader/NewHeader.d.ts +0 -13
  14. package/build/cjs/components/NewHeader/NewHeader.js +0 -79
  15. package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.css +0 -30
  16. package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.d.ts +0 -3
  17. package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.js +0 -20
  18. package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.css +0 -79
  19. package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.d.ts +0 -3
  20. package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.js +0 -22
  21. package/build/cjs/components/NewHeader/components/LoginButton/LoginButton.d.ts +0 -10
  22. package/build/cjs/components/NewHeader/components/LoginButton/LoginButton.js +0 -46
  23. package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.css +0 -45
  24. package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.d.ts +0 -3
  25. package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.js +0 -12
  26. package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.css +0 -8
  27. package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.d.ts +0 -3
  28. package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.js +0 -17
  29. package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.css +0 -47
  30. package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.d.ts +0 -14
  31. package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.js +0 -25
  32. package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.css +0 -75
  33. package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.d.ts +0 -3
  34. package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.js +0 -30
  35. package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.css +0 -55
  36. package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.d.ts +0 -9
  37. package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.js +0 -47
  38. package/build/cjs/components/NewHeader/components/Navigation/Navigation.css +0 -23
  39. package/build/cjs/components/NewHeader/components/Navigation/Navigation.d.ts +0 -10
  40. package/build/cjs/components/NewHeader/components/Navigation/Navigation.js +0 -74
  41. package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.css +0 -81
  42. package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.d.ts +0 -12
  43. package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.js +0 -29
  44. package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.css +0 -10
  45. package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.d.ts +0 -9
  46. package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.js +0 -18
  47. package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.css +0 -111
  48. package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.d.ts +0 -12
  49. package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.js +0 -28
  50. package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.css +0 -113
  51. package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.d.ts +0 -3
  52. package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.js +0 -65
  53. package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.css +0 -191
  54. package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.d.ts +0 -3
  55. package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.js +0 -42
  56. package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.css +0 -49
  57. package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.d.ts +0 -3
  58. package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.js +0 -20
  59. package/build/cjs/components/NewHeader/components/Tag/Tag.css +0 -21
  60. package/build/cjs/components/NewHeader/components/Tag/Tag.d.ts +0 -6
  61. package/build/cjs/components/NewHeader/components/Tag/Tag.js +0 -22
  62. package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.css +0 -81
  63. package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.d.ts +0 -3
  64. package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.js +0 -21
  65. package/build/cjs/components/NewHeader/constants.d.ts +0 -7
  66. package/build/cjs/components/NewHeader/constants.js +0 -11
  67. package/build/cjs/components/NewHeader/contexts/route-change.d.ts +0 -3
  68. package/build/cjs/components/NewHeader/contexts/route-change.js +0 -6
  69. package/build/cjs/components/NewHeader/models.d.ts +0 -199
  70. package/build/cjs/components/NewHeader/models.js +0 -20
  71. package/build/cjs/components/NewHeader/styles/mixins.css +0 -0
  72. package/build/cjs/components/NewHeader/styles/variables.css +0 -5
  73. package/build/esm/components/NewHeader/NewHeader.css +0 -162
  74. package/build/esm/components/NewHeader/NewHeader.d.ts +0 -14
  75. package/build/esm/components/NewHeader/NewHeader.js +0 -75
  76. package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.css +0 -30
  77. package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.d.ts +0 -4
  78. package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.js +0 -16
  79. package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.css +0 -79
  80. package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.d.ts +0 -4
  81. package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.js +0 -18
  82. package/build/esm/components/NewHeader/components/LoginButton/LoginButton.d.ts +0 -10
  83. package/build/esm/components/NewHeader/components/LoginButton/LoginButton.js +0 -41
  84. package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.css +0 -45
  85. package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.d.ts +0 -4
  86. package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.js +0 -8
  87. package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.css +0 -8
  88. package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.d.ts +0 -4
  89. package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.js +0 -13
  90. package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.css +0 -47
  91. package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.d.ts +0 -15
  92. package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.js +0 -21
  93. package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.css +0 -75
  94. package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.d.ts +0 -4
  95. package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.js +0 -26
  96. package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.css +0 -55
  97. package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.d.ts +0 -10
  98. package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.js +0 -43
  99. package/build/esm/components/NewHeader/components/Navigation/Navigation.css +0 -23
  100. package/build/esm/components/NewHeader/components/Navigation/Navigation.d.ts +0 -11
  101. package/build/esm/components/NewHeader/components/Navigation/Navigation.js +0 -70
  102. package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.css +0 -81
  103. package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.d.ts +0 -13
  104. package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.js +0 -25
  105. package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.css +0 -10
  106. package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.d.ts +0 -10
  107. package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.js +0 -14
  108. package/build/esm/components/NewHeader/components/PopupItem/PopupItem.css +0 -111
  109. package/build/esm/components/NewHeader/components/PopupItem/PopupItem.d.ts +0 -13
  110. package/build/esm/components/NewHeader/components/PopupItem/PopupItem.js +0 -24
  111. package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.css +0 -113
  112. package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.d.ts +0 -4
  113. package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.js +0 -61
  114. package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.css +0 -191
  115. package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.d.ts +0 -4
  116. package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.js +0 -38
  117. package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.css +0 -49
  118. package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.d.ts +0 -4
  119. package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.js +0 -16
  120. package/build/esm/components/NewHeader/components/Tag/Tag.css +0 -21
  121. package/build/esm/components/NewHeader/components/Tag/Tag.d.ts +0 -7
  122. package/build/esm/components/NewHeader/components/Tag/Tag.js +0 -18
  123. package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.css +0 -81
  124. package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.d.ts +0 -4
  125. package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.js +0 -17
  126. package/build/esm/components/NewHeader/constants.d.ts +0 -7
  127. package/build/esm/components/NewHeader/constants.js +0 -8
  128. package/build/esm/components/NewHeader/contexts/route-change.d.ts +0 -3
  129. package/build/esm/components/NewHeader/contexts/route-change.js +0 -2
  130. package/build/esm/components/NewHeader/models.d.ts +0 -199
  131. package/build/esm/components/NewHeader/models.js +0 -17
  132. package/build/esm/components/NewHeader/styles/mixins.css +0 -0
  133. package/build/esm/components/NewHeader/styles/variables.css +0 -5
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { CompanyPopupData } from '../../models';
3
- import './CompanyPopup.css';
4
- export declare const CompanyPopup: ({ sections }: CompanyPopupData) => React.JSX.Element;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { Col, Grid, GridColumnSize, Row } from '@doyourjob/gravity-ui-page-constructor';
3
- import { block } from '../../../../utils/cn';
4
- import { PopupItem } from '../PopupItem/PopupItem';
5
- import './CompanyPopup.css';
6
- const b = block('company-popup');
7
- export const CompanyPopup = ({ sections }) => (React.createElement(Grid, { className: b(), containerClass: b('container') },
8
- React.createElement(Row, null, sections.map((section, index) => (React.createElement(Col, { key: section.title, sizes: index === 0
9
- ? { [GridColumnSize.All]: 12, [GridColumnSize.Md]: 4 }
10
- : { [GridColumnSize.All]: 12, [GridColumnSize.Md]: 8 } },
11
- React.createElement(Row, null,
12
- React.createElement(Col, null,
13
- React.createElement("div", { className: b('title') }, section.title))),
14
- React.createElement(Row, null, section.items.map((item) => (React.createElement(PopupItem, Object.assign({ key: item.title }, item, { sizes: index === 0
15
- ? { [GridColumnSize.All]: 12 }
16
- : { [GridColumnSize.All]: 12, [GridColumnSize.Md]: 6 } })))))))))));
@@ -1,79 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-addons-investor-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
- max-width: 900px;
9
- margin-left: auto;
10
- width: 100%;
11
- border-radius: var(--pc-border-radius, 24px);
12
- scrollbar-width: none;
13
- }
14
-
15
- .pc-addons-investor-popup::-webkit-scrollbar {
16
- display: none;
17
- }
18
-
19
- .pc-addons-investor-popup__container {
20
- padding: 32px;
21
- display: flex;
22
- }
23
-
24
- .pc-addons-investor-popup__wrap {
25
- display: flex;
26
- flex-direction: column;
27
- gap: 24px;
28
- padding: 0;
29
- flex: 1;
30
- }
31
-
32
- .pc-addons-investor-popup__title {
33
- font-size: var(--g-text-header-1-font-size, var(--pc-text-header-1-font-size));
34
- line-height: var(--g-text-header-1-line-height, var(--pc-text-header-1-line-height));
35
- font-weight: 600;
36
- margin-bottom: 8px;
37
- }
38
-
39
- .pc-addons-investor-popup__subtitle {
40
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
41
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
42
- font-weight: 500;
43
- color: #9fb1bd;
44
- }
45
-
46
- .pc-addons-investor-popup__card {
47
- background-color: #f2f4f5;
48
- border-radius: 8px;
49
- width: 268px;
50
- padding: 20px;
51
- display: flex;
52
- flex-direction: column;
53
- justify-content: space-between;
54
- }
55
-
56
- .pc-addons-investor-popup__card-title {
57
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
58
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
59
- font-weight: 500;
60
- }
61
-
62
- .pc-addons-investor-popup__card-wrap {
63
- display: flex;
64
- flex-direction: column;
65
- gap: 4px;
66
- }
67
-
68
- .pc-addons-investor-popup__card-price {
69
- font-size: var(--g-text-display-2-font-size, var(--pc-text-display-2-font-size));
70
- line-height: var(--g-text-display-2-line-height, var(--pc-text-display-2-line-height));
71
- font-weight: 700;
72
- }
73
-
74
- .pc-addons-investor-popup__card-date {
75
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
76
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
77
- font-weight: 500;
78
- color: #9fb1bd;
79
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { InvestorPopupData } from '../../models';
3
- import './InvestorPopup.css';
4
- export declare const InvestorPopup: ({ title, subtitle, url, items, stock }: InvestorPopupData) => React.JSX.Element;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { Col, Grid, GridColumnSize, Row, getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
3
- import { block } from '../../../../utils/cn';
4
- import { PopupItem } from '../PopupItem/PopupItem';
5
- import './InvestorPopup.css';
6
- const b = block('investor-popup');
7
- export const InvestorPopup = ({ title, subtitle, url, items, stock }) => (React.createElement(Grid, { className: b(), containerClass: b('container') },
8
- React.createElement("div", { className: b('wrap') },
9
- React.createElement(Row, null,
10
- React.createElement(Col, null,
11
- React.createElement("a", Object.assign({ href: url, className: b('title') }, getLinkProps(url)), title),
12
- React.createElement("div", { className: b('subtitle') }, subtitle))),
13
- React.createElement(Row, null, items.map((item) => (React.createElement(PopupItem, Object.assign({ key: item.title }, item, { sizes: { [GridColumnSize.All]: 12, [GridColumnSize.Md]: 6 } })))))),
14
- stock && (React.createElement("div", { className: b('card') },
15
- React.createElement("div", { className: b('card-title') }, stock.title),
16
- React.createElement("div", { className: b('card-wrap') },
17
- React.createElement("div", { className: b('card-price') }, stock.price),
18
- React.createElement("div", { className: b('card-date') }, stock.date))))));
@@ -1,10 +0,0 @@
1
- import type { RefObject } from 'react';
2
- import React from 'react';
3
- import { LoginPopupData, SetupRouteChangeHandler } from '../../models';
4
- interface LoginButtonProps {
5
- data: LoginPopupData;
6
- headerRef?: RefObject<HTMLDivElement>;
7
- setupRouteChangeHandler?: SetupRouteChangeHandler;
8
- }
9
- export declare const LoginButton: ({ data, headerRef, setupRouteChangeHandler }: LoginButtonProps) => React.JSX.Element;
10
- export {};
@@ -1,41 +0,0 @@
1
- import React, { useCallback, useEffect, useState } from 'react';
2
- import { SWITCH_MENU_TAB_TIMEOUT } from '../../constants';
3
- import { LoginPopup } from '../LoginPopup/LoginPopup';
4
- import { NavigationPopup } from '../NavigationPopup/NavigationPopup';
5
- export const LoginButton = ({ data, headerRef, setupRouteChangeHandler }) => {
6
- const [isActive, setIsActive] = useState(false);
7
- const [pretendentActiveTab, setPretendentAciveTab] = useState(false);
8
- const [previouslyFocusedElement, setPreviouslyFocusedElement] = useState(null);
9
- const handleActiveTab = useCallback((val) => {
10
- setPreviouslyFocusedElement(document.activeElement);
11
- setPretendentAciveTab(val);
12
- }, []);
13
- const onEscapeKeyDown = useCallback((event) => {
14
- if (event.key === 'Escape') {
15
- setIsActive(false);
16
- setPretendentAciveTab(false);
17
- previouslyFocusedElement === null || previouslyFocusedElement === void 0 ? void 0 : previouslyFocusedElement.focus({ preventScroll: true });
18
- }
19
- }, [previouslyFocusedElement]);
20
- const handleMouseEnter = useCallback(() => handleActiveTab(true), [handleActiveTab]);
21
- const handleMouseLeave = useCallback(() => handleActiveTab(false), [handleActiveTab]);
22
- useEffect(() => {
23
- const timerId = setTimeout(() => {
24
- setIsActive(pretendentActiveTab);
25
- }, SWITCH_MENU_TAB_TIMEOUT);
26
- return () => clearTimeout(timerId);
27
- }, [pretendentActiveTab]);
28
- useEffect(() => {
29
- document.addEventListener('keydown', onEscapeKeyDown);
30
- return () => {
31
- document.removeEventListener('keydown', onEscapeKeyDown);
32
- };
33
- }, [onEscapeKeyDown]);
34
- useEffect(() => setupRouteChangeHandler === null || setupRouteChangeHandler === void 0 ? void 0 : setupRouteChangeHandler(() => {
35
- handleMouseLeave();
36
- }), [handleMouseLeave, setupRouteChangeHandler]);
37
- return (React.createElement("div", { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
38
- data.text,
39
- isActive && (React.createElement(NavigationPopup, { headerRef: headerRef },
40
- React.createElement(LoginPopup, Object.assign({}, data))))));
41
- };
@@ -1,45 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-addons-login-popup {
4
- border-radius: 16px;
5
- background: var(--g-color-base-float);
6
- box-shadow: 0 4px 24px var(--g-color-base-generic), 0 2px 8px var(--g-color-base-generic);
7
- max-height: calc(100vh - 64px - 64px);
8
- overflow: auto;
9
- max-width: 260px;
10
- margin-left: auto;
11
- width: 100%;
12
- scrollbar-width: none;
13
- }
14
-
15
- .pc-addons-login-popup::-webkit-scrollbar {
16
- display: none;
17
- }
18
-
19
- .pc-addons-login-popup__container {
20
- padding: 8px;
21
- gap: 8px;
22
- display: flex;
23
- flex-direction: column;
24
- }
25
-
26
- .pc-addons-login-popup__item {
27
- padding: 8px;
28
- display: flex;
29
- flex-direction: column;
30
- gap: 4px;
31
- width: 100%;
32
- }
33
-
34
- .pc-addons-login-popup__title {
35
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
36
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
37
- font-weight: 500;
38
- }
39
-
40
- .pc-addons-login-popup__subtitle {
41
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
42
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
43
- font-weight: 500;
44
- color: #9fb1bd;
45
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { LoginPopupData } from '../../models';
3
- import './LoginPopup.css';
4
- export declare const LoginPopup: ({ items }: LoginPopupData) => React.JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { Grid, getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
3
- import { block } from '../../../../utils/cn';
4
- import './LoginPopup.css';
5
- const b = block('login-popup');
6
- export const LoginPopup = ({ items }) => (React.createElement(Grid, { className: b(), containerClass: b('container') }, items.map((item) => (React.createElement("a", Object.assign({ href: item.url, className: b('item'), key: item.title }, getLinkProps(item.url || '')),
7
- React.createElement("div", { className: b('title') }, item.title),
8
- React.createElement("div", { className: b('subtitle') }, item.subtitle))))));
@@ -1,8 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-addons-medium-popup {
4
- max-height: calc(100vh - 64px - 64px);
5
- overflow: auto;
6
- display: flex;
7
- flex-wrap: wrap;
8
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { MediumPopupData } from '../../models';
3
- import './MediumPopup.css';
4
- export declare const MediumPopup: ({ groups }: MediumPopupData) => React.JSX.Element;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { Col, Grid, GridColumnSize, Row } from '@doyourjob/gravity-ui-page-constructor';
3
- import { block } from '../../../../utils/cn';
4
- import { PopupItem } from '../PopupItem/PopupItem';
5
- import './MediumPopup.css';
6
- const b = block('medium-popup');
7
- export const MediumPopup = ({ groups }) => (React.createElement(Grid, null,
8
- React.createElement(Row, null,
9
- React.createElement(Col, { className: b() }, groups.map((dataItem) => dataItem.items.map((item) => (React.createElement(PopupItem, Object.assign({}, item, { key: item.title, hover: true, imageSize: dataItem.imageSize, sizes: {
10
- [GridColumnSize.Xl]: 3,
11
- [GridColumnSize.Md]: 4,
12
- [GridColumnSize.All]: 12,
13
- } })))))))));
@@ -1,47 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-addons-mobile-navigation {
4
- margin: 0;
5
- padding: 0;
6
- list-style: none;
7
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
8
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
9
- }
10
-
11
- .pc-addons-mobile-navigation__icon {
12
- display: none;
13
- }
14
-
15
- .pc-addons-mobile-navigation__icon:hover:before {
16
- background: none;
17
- }
18
-
19
- .pc-addons-mobile-navigation__icon:hover .pc-addons-mobile-navigation__icon {
20
- color: var(--g-color-text-complementary);
21
- }
22
-
23
- .pc-addons-mobile-navigation__icon-icon {
24
- position: relative;
25
- top: 3px;
26
- }
27
-
28
- .pc-addons-mobile-navigation__icon_hidden {
29
- display: none;
30
- }
31
-
32
- .pc-addons-mobile-navigation__user {
33
- margin-top: 24px;
34
- }
35
-
36
- .pc-addons-mobile-navigation__buttons {
37
- margin-top: 8px;
38
- }
39
-
40
- @media (max-width: 769px) {
41
- .pc-addons-mobile-navigation__icon {
42
- display: block;
43
- }
44
- .pc-addons-mobile-navigation__icon_hidden {
45
- display: none;
46
- }
47
- }
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import type { ButtonProps } from '@doyourjob/gravity-ui-page-constructor';
3
- import { MobileNavigationItemData } from '../../models';
4
- import './MobileNavigation.css';
5
- interface MobileNavigationProps {
6
- isOpened: boolean;
7
- toogleOpen: (isOpened: boolean) => void;
8
- isSearchOpen: boolean;
9
- data: MobileNavigationItemData[];
10
- onMenuScroll: (scrollTop: number) => void;
11
- popupClassName?: string;
12
- buttons?: ButtonProps[];
13
- }
14
- export declare const MobileNavigation: ({ isOpened, toogleOpen, isSearchOpen, data, buttons, onMenuScroll, }: MobileNavigationProps) => React.JSX.Element;
15
- export {};
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { Button as PCButton } from '@doyourjob/gravity-ui-page-constructor';
3
- import { Bars, Xmark } from '@gravity-ui/icons';
4
- import { Button, Icon } from '@gravity-ui/uikit';
5
- import { block } from '../../../../utils/cn';
6
- import { MobileNavigationItem } from '../MobileNavigationItem/MobileNavigationItem';
7
- import { MobileNavigationPopup } from '../MobileNavigationPopup/MobileNavigationPopup';
8
- import './MobileNavigation.css';
9
- const b = block('mobile-navigation');
10
- export const MobileNavigation = ({ isOpened, toogleOpen, isSearchOpen, data, buttons, onMenuScroll, }) => (React.createElement("div", { className: b() },
11
- React.createElement(Button, { view: "flat", size: "l", className: b('icon', { hidden: isSearchOpen }), onClick: (e) => {
12
- e.stopPropagation();
13
- toogleOpen(!isOpened);
14
- } },
15
- React.createElement(Icon, { data: isOpened ? Xmark : Bars, size: 24 })),
16
- React.createElement(MobileNavigationPopup, { isOpened: isOpened, onClose: () => toogleOpen(false), onMenuScroll: onMenuScroll },
17
- React.createElement("nav", null,
18
- React.createElement("ul", { className: b() }, data.map((item) => (React.createElement("li", { className: b(), key: item.title },
19
- React.createElement(MobileNavigationItem, Object.assign({}, item)))))),
20
- buttons &&
21
- (buttons === null || buttons === void 0 ? void 0 : buttons.map((button) => React.createElement(PCButton, Object.assign({}, button, { size: "l", key: button.text }))))))));
@@ -1,75 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-addons-mobile-navigation-item {
4
- display: flex;
5
- justify-content: space-between;
6
- position: relative;
7
- padding: 12px 0;
8
- }
9
-
10
- .pc-addons-mobile-navigation-item_type_link {
11
- color: inherit;
12
- text-decoration: none;
13
- display: block;
14
- color: var(--g-color-text-primary);
15
- }
16
-
17
- .pc-addons-mobile-navigation-item__arrow {
18
- display: flex;
19
- justify-content: center;
20
- align-items: center;
21
- width: 20px;
22
- height: 20px;
23
- min-width: 20px;
24
- }
25
-
26
- .pc-addons-mobile-navigation-item__text {
27
- padding-right: 20px;
28
- }
29
-
30
- .pc-addons-mobile-navigation-item__list {
31
- padding: 10px 20px;
32
- background-color: var(--g-color-base-generic);
33
- border-radius: var(--g-border-radius-l);
34
- }
35
-
36
- .pc-addons-mobile-navigation-item__list:not(:first-child) {
37
- margin-top: 12px;
38
- }
39
-
40
- .pc-addons-mobile-navigation-item__list-items {
41
- margin: 0;
42
- padding: 0;
43
- list-style: none;
44
- }
45
-
46
- .pc-addons-mobile-navigation-item__list-title {
47
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
48
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
49
- margin: 0;
50
- padding: 10px 0;
51
- }
52
-
53
- .pc-addons-mobile-navigation-item__list-item {
54
- color: inherit;
55
- text-decoration: none;
56
- display: block;
57
- color: var(--g-color-text-primary);
58
- padding: 10px 0;
59
- }
60
-
61
- .pc-addons-mobile-navigation-item__list-item:hover, .pc-addons-mobile-navigation-item__list-item:active {
62
- --pc-text-header-color: inherit;
63
- color: inherit;
64
- }
65
-
66
- .pc-addons-mobile-navigation-item__list-link {
67
- color: inherit;
68
- text-decoration: none;
69
- outline: none;
70
- color: var(--g-color-text-link);
71
- text-decoration: none;
72
- cursor: pointer;
73
- display: block;
74
- padding: 10px 0;
75
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { MobileNavigationItemData } from '../../models';
3
- import './MobileNavigationItem.css';
4
- export declare const MobileNavigationItem: (props: MobileNavigationItemData) => React.JSX.Element | null;
@@ -1,26 +0,0 @@
1
- import React, { Fragment, useCallback, useState } from 'react';
2
- import { Foldable, ToggleArrow, getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
3
- import { block } from '../../../../utils/cn';
4
- import './MobileNavigationItem.css';
5
- const b = block('mobile-navigation-item');
6
- export const MobileNavigationItem = (props) => {
7
- const [isOpened, setIsOpened] = useState(false);
8
- const toggleOpen = useCallback(() => {
9
- setIsOpened(!isOpened);
10
- }, [isOpened]);
11
- if ('link' in props) {
12
- return (React.createElement("a", Object.assign({ href: props.link.url, className: b({ type: 'link' }) }, getLinkProps(props.link.url || '', undefined, props.link.target)), props.title));
13
- }
14
- if ('data' in props) {
15
- return (React.createElement(Fragment, null,
16
- React.createElement("div", { className: b({ opened: isOpened }), onClick: toggleOpen },
17
- React.createElement("div", { className: b('text') }, props.title),
18
- React.createElement("div", { className: b('arrow') },
19
- React.createElement(ToggleArrow, { size: 12, type: "vertical", open: isOpened, iconType: "navigation" }))),
20
- React.createElement(Foldable, { isOpened: isOpened }, props.data.map(({ title: itemTitle, items }) => (React.createElement("div", { className: b('list'), key: items[0].title },
21
- itemTitle && React.createElement("h5", { className: b('list-title') }, itemTitle),
22
- React.createElement("ul", { className: b('list-items') }, items.map((linkItem) => (React.createElement("li", { className: b('li'), key: linkItem.title },
23
- React.createElement("a", Object.assign({ href: linkItem.url, className: b('list-item') }, getLinkProps(linkItem.url || '')), linkItem.title)))))))))));
24
- }
25
- return null;
26
- };
@@ -1,55 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-addons-mobile-navigation-popup {
4
- width: 100%;
5
- position: fixed;
6
- top: 0;
7
- z-index: 99;
8
- padding: 48px 0 32px;
9
- background-color: var(--g-color-base-background);
10
- border-radius: 0 0 var(--pc-border-radius, 24px) var(--pc-border-radius, 24px);
11
- box-shadow: 0 3px 10px var(--g-color-base-generic);
12
- }
13
-
14
- .pc-addons-mobile-navigation-popup__transition-enter {
15
- transform: translateY(-30px);
16
- opacity: 0;
17
- }
18
-
19
- .pc-addons-mobile-navigation-popup__transition-enter-active {
20
- transform: translateY(0);
21
- opacity: 1;
22
- transition: transform 0.4s, opacity 0.4s;
23
- }
24
-
25
- .pc-addons-mobile-navigation-popup__transition-exit {
26
- transform: translateY(0);
27
- opacity: 1;
28
- }
29
-
30
- .pc-addons-mobile-navigation-popup__transition-exit .pc-addons-mobile-navigation-popup__container {
31
- opacity: 0;
32
- }
33
-
34
- .pc-addons-mobile-navigation-popup__transition-exit-active {
35
- transform: translateY(-30px);
36
- opacity: 0;
37
- transition: transform 0.4s, opacity 0.4s;
38
- }
39
-
40
- .pc-addons-mobile-navigation-popup__no-scroll {
41
- overflow: hidden;
42
- }
43
-
44
- .pc-addons-mobile-navigation-popup__container {
45
- padding: 4px 48px 0;
46
- overflow: scroll;
47
- height: 100%;
48
- }
49
-
50
- @media (max-width: 576px) {
51
- .pc-addons-mobile-navigation-popup__container {
52
- padding-left: 24px;
53
- padding-right: 24px;
54
- }
55
- }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import './MobileNavigationPopup.css';
3
- interface MobileNavigationPopupProps {
4
- isOpened: boolean;
5
- onClose: () => void;
6
- children: React.ReactNode;
7
- onMenuScroll: (scrollTop: number) => void;
8
- }
9
- export declare const MobileNavigationPopup: ({ isOpened, onClose, children, onMenuScroll, }: MobileNavigationPopupProps) => React.ReactPortal | null;
10
- export {};
@@ -1,43 +0,0 @@
1
- import React, { useCallback, useEffect, useRef, useState } from 'react';
2
- import { OutsideClick } from '@doyourjob/gravity-ui-page-constructor';
3
- import { useBodyScrollLock } from '@gravity-ui/uikit';
4
- import ReactDOM from 'react-dom';
5
- import { CSSTransition } from 'react-transition-group';
6
- import { block } from '../../../../utils/cn';
7
- import './MobileNavigationPopup.css';
8
- const b = block('mobile-navigation-popup');
9
- const TRANSITION_TIME = 400;
10
- const POPUP_MARGIN = 80;
11
- const HEADER_HEIGHT = 68;
12
- export const MobileNavigationPopup = ({ isOpened, onClose, children, onMenuScroll, }) => {
13
- const [body, setBody] = useState();
14
- const ref = useRef(null);
15
- const [containerHeight, setContainerHeight] = useState(0);
16
- const handleScroll = useCallback(() => {
17
- var _a;
18
- const containerScrollTop = (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop;
19
- if (typeof containerScrollTop !== 'undefined') {
20
- onMenuScroll(containerScrollTop);
21
- }
22
- }, [onMenuScroll]);
23
- useBodyScrollLock({ enabled: isOpened });
24
- useEffect(() => {
25
- setBody(document.body);
26
- setContainerHeight((window === null || window === void 0 ? void 0 : window.innerHeight) - POPUP_MARGIN - HEADER_HEIGHT);
27
- const element = ref.current;
28
- if (element) {
29
- element.addEventListener('scroll', handleScroll);
30
- }
31
- return () => {
32
- if (element) {
33
- element.removeEventListener('scroll', handleScroll);
34
- }
35
- };
36
- }, [handleScroll, isOpened]);
37
- if (!body) {
38
- return null;
39
- }
40
- return ReactDOM.createPortal(React.createElement(CSSTransition, { in: isOpened, classNames: b('transition'), unmountOnExit: true, timeout: TRANSITION_TIME },
41
- React.createElement(OutsideClick, { className: b(), onOutsideClick: onClose },
42
- React.createElement("div", { ref: ref, className: b('container'), style: { maxHeight: `${containerHeight}px` } }, children))), body);
43
- };
@@ -1,23 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-addons-navigation {
4
- margin: 0;
5
- padding: 0;
6
- list-style: none;
7
- font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
8
- line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
9
- display: flex;
10
- align-items: center;
11
- margin-left: 2px;
12
- }
13
-
14
- @media (max-width: 768px) {
15
- .pc-addons-navigation {
16
- display: none;
17
- }
18
- }
19
- @media (max-width: 769px) {
20
- .pc-addons-navigation {
21
- display: none;
22
- }
23
- }
@@ -1,11 +0,0 @@
1
- import type { RefObject } from 'react';
2
- import React from 'react';
3
- import { NavigationItemData, SetupRouteChangeHandler } from '../../models';
4
- import './Navigation.css';
5
- interface NavigationProps {
6
- data: NavigationItemData[];
7
- headerRef?: RefObject<HTMLDivElement>;
8
- setupRouteChangeHandler?: SetupRouteChangeHandler;
9
- }
10
- export declare const Navigation: ({ data, headerRef, setupRouteChangeHandler }: NavigationProps) => React.JSX.Element;
11
- export {};