@alfalab/core-components-navigation-bar 0.1.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/Component.d.ts +4 -0
- package/Component.js +131 -0
- package/components/back-arrow-addon/Component.d.ts +26 -0
- package/components/back-arrow-addon/Component.js +32 -0
- package/components/back-arrow-addon/index.css +69 -0
- package/components/back-arrow-addon/index.d.ts +1 -0
- package/components/back-arrow-addon/index.js +14 -0
- package/components/closer/Component.d.ts +35 -0
- package/components/closer/Component.js +30 -0
- package/components/closer/index.css +41 -0
- package/components/closer/index.d.ts +1 -0
- package/components/closer/index.js +13 -0
- package/cssm/Component.d.ts +4 -0
- package/cssm/Component.js +132 -0
- package/cssm/components/back-arrow-addon/Component.d.ts +26 -0
- package/cssm/components/back-arrow-addon/Component.js +31 -0
- package/cssm/components/back-arrow-addon/index.d.ts +1 -0
- package/cssm/components/back-arrow-addon/index.js +15 -0
- package/cssm/components/back-arrow-addon/index.module.css +68 -0
- package/cssm/components/closer/Component.d.ts +35 -0
- package/cssm/components/closer/Component.js +29 -0
- package/cssm/components/closer/index.d.ts +1 -0
- package/cssm/components/closer/index.js +14 -0
- package/cssm/components/closer/index.module.css +40 -0
- package/cssm/index.d.ts +3 -0
- package/cssm/index.js +23 -0
- package/cssm/index.module.css +108 -0
- package/cssm/types.d.ts +113 -0
- package/cssm/types.js +2 -0
- package/esm/Component.d.ts +4 -0
- package/esm/Component.js +124 -0
- package/esm/components/back-arrow-addon/Component.d.ts +26 -0
- package/esm/components/back-arrow-addon/Component.js +25 -0
- package/esm/components/back-arrow-addon/index.css +69 -0
- package/esm/components/back-arrow-addon/index.d.ts +1 -0
- package/esm/components/back-arrow-addon/index.js +8 -0
- package/esm/components/closer/Component.d.ts +35 -0
- package/esm/components/closer/Component.js +23 -0
- package/esm/components/closer/index.css +41 -0
- package/esm/components/closer/index.d.ts +1 -0
- package/esm/components/closer/index.js +7 -0
- package/esm/index.css +108 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.js +13 -0
- package/esm/types.d.ts +113 -0
- package/esm/types.js +1 -0
- package/index.css +108 -0
- package/index.d.ts +3 -0
- package/index.js +20 -0
- package/modern/Component.d.ts +4 -0
- package/modern/Component.js +125 -0
- package/modern/components/back-arrow-addon/Component.d.ts +26 -0
- package/modern/components/back-arrow-addon/Component.js +22 -0
- package/modern/components/back-arrow-addon/index.css +69 -0
- package/modern/components/back-arrow-addon/index.d.ts +1 -0
- package/modern/components/back-arrow-addon/index.js +7 -0
- package/modern/components/closer/Component.d.ts +35 -0
- package/modern/components/closer/Component.js +20 -0
- package/modern/components/closer/index.css +41 -0
- package/modern/components/closer/index.d.ts +1 -0
- package/modern/components/closer/index.js +6 -0
- package/modern/index.css +108 -0
- package/modern/index.d.ts +3 -0
- package/modern/index.js +12 -0
- package/modern/types.d.ts +113 -0
- package/modern/types.js +1 -0
- package/package.json +24 -0
- package/send-stats.js +82 -0
- package/types.d.ts +113 -0
- package/types.js +2 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* hash: 18yu8 */
|
|
2
|
+
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-graphic-primary: #0b1f35;
|
|
5
|
+
--color-light-graphic-secondary: #6d7986;
|
|
6
|
+
--color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05);
|
|
7
|
+
--color-light-bg-primary-alpha-40: rgba(255, 255, 255, 0.4);
|
|
8
|
+
--color-light-graphic-primary-tint-20: rgb(60, 76, 93);
|
|
9
|
+
--color-light-graphic-primary-tint-30: rgb(84, 98, 114);
|
|
10
|
+
} :root {
|
|
11
|
+
} :root {
|
|
12
|
+
} :root {
|
|
13
|
+
|
|
14
|
+
/* Hard */
|
|
15
|
+
|
|
16
|
+
/* Up */
|
|
17
|
+
|
|
18
|
+
/* Hard up */
|
|
19
|
+
} :root {
|
|
20
|
+
--border-radius-circle: 50%;
|
|
21
|
+
--border-radius-pill: 99px;
|
|
22
|
+
} :root {
|
|
23
|
+
--gap-xs: 8px;
|
|
24
|
+
--gap-s: 12px;
|
|
25
|
+
} :root {
|
|
26
|
+
} :root {
|
|
27
|
+
} .navigation-bar__component_17er7 {
|
|
28
|
+
height: 100%;
|
|
29
|
+
background: var(--color-light-bg-primary-alpha-40);
|
|
30
|
+
-webkit-backdrop-filter: blur(10px);
|
|
31
|
+
backdrop-filter: blur(10px);
|
|
32
|
+
border-radius: var(--border-radius-pill)
|
|
33
|
+
} .navigation-bar__component_17er7 svg > path {
|
|
34
|
+
transition: fill 0.2s ease;
|
|
35
|
+
fill: var(--color-light-graphic-primary);
|
|
36
|
+
} .navigation-bar__component_17er7:hover svg > path {
|
|
37
|
+
fill: var(--color-light-graphic-primary-tint-20);
|
|
38
|
+
} .navigation-bar__component_17er7:active svg > path {
|
|
39
|
+
fill: var(--color-light-graphic-primary-tint-30);
|
|
40
|
+
} .navigation-bar__mobileComponent_17er7 {
|
|
41
|
+
height: 32px;
|
|
42
|
+
margin: 0 var(--gap-xs);
|
|
43
|
+
-webkit-backdrop-filter: none;
|
|
44
|
+
backdrop-filter: none;
|
|
45
|
+
background: none;
|
|
46
|
+
} .navigation-bar__flex_17er7 {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
} .navigation-bar__iconWrapper_17er7 {
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
height: 48px;
|
|
54
|
+
margin: 0 var(--gap-xs) 0 var(--gap-s);
|
|
55
|
+
border-radius: var(--border-radius-circle)
|
|
56
|
+
} .navigation-bar__iconWrapper_17er7 + .navigation-bar__text_17er7 {
|
|
57
|
+
margin-right: var(--gap-s);
|
|
58
|
+
} .navigation-bar__mobileWrapper_17er7 {
|
|
59
|
+
width: 32px;
|
|
60
|
+
height: 32px;
|
|
61
|
+
background: var(--color-light-specialbg-secondary-transparent);
|
|
62
|
+
-webkit-backdrop-filter: blur(10px);
|
|
63
|
+
backdrop-filter: blur(10px);
|
|
64
|
+
margin: 0
|
|
65
|
+
} .navigation-bar__mobileWrapper_17er7 + .navigation-bar__text_17er7 {
|
|
66
|
+
margin: 0 var(--gap-s) 0 var(--gap-xs);
|
|
67
|
+
} .navigation-bar__mobileWrapper_17er7 svg > path {
|
|
68
|
+
fill: var(--color-light-graphic-secondary);
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { BackArrowAddon } from './Component.js';
|
|
2
|
+
import 'tslib';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'classnames';
|
|
5
|
+
import '@alfalab/core-components-button/esm';
|
|
6
|
+
import '@alfalab/core-components-typography/esm';
|
|
7
|
+
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
8
|
+
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonHTMLAttributes, ElementType, FC } from "react";
|
|
4
|
+
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Вид компонента
|
|
7
|
+
*/
|
|
8
|
+
view: 'desktop' | 'mobile';
|
|
9
|
+
/**
|
|
10
|
+
* Дополнительный класс
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Позиция крестика
|
|
15
|
+
*/
|
|
16
|
+
align?: 'left' | 'right';
|
|
17
|
+
/**
|
|
18
|
+
* Фиксирует крестик
|
|
19
|
+
*/
|
|
20
|
+
sticky?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Иконка
|
|
23
|
+
*/
|
|
24
|
+
icon?: ElementType;
|
|
25
|
+
/**
|
|
26
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
27
|
+
*/
|
|
28
|
+
dataTestId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Коллбэк закрытия.
|
|
31
|
+
*/
|
|
32
|
+
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: 'backdropClick' | 'escapeKeyDown' | 'closerClick') => void;
|
|
33
|
+
}
|
|
34
|
+
declare const Closer: FC<CloserProps>;
|
|
35
|
+
export { CloserProps, Closer };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import { IconButton } from '@alfalab/core-components-icon-button/esm';
|
|
5
|
+
import { CrossHeavyMIcon } from '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
6
|
+
import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
|
|
7
|
+
|
|
8
|
+
var styles = {"closer":"navigation-bar__closer_8p6nd","button":"navigation-bar__button_8p6nd","mobile":"navigation-bar__mobile_8p6nd","sticky":"navigation-bar__sticky_8p6nd"};
|
|
9
|
+
require('./index.css')
|
|
10
|
+
|
|
11
|
+
var Closer = function (_a) {
|
|
12
|
+
var _b, _c;
|
|
13
|
+
var view = _a.view, className = _a.className, sticky = _a.sticky, _d = _a.icon, icon = _d === void 0 ? view === 'desktop' ? CrossHeavyMIcon : CrossMIcon : _d, dataTestId = _a.dataTestId, onClose = _a.onClose, restProps = __rest(_a, ["view", "className", "sticky", "icon", "dataTestId", "onClose"]);
|
|
14
|
+
var handleClick = function (event) {
|
|
15
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(event, 'closerClick');
|
|
16
|
+
};
|
|
17
|
+
return (React.createElement("div", { className: cn(styles.closer, className, (_b = {},
|
|
18
|
+
_b[styles.sticky] = sticky,
|
|
19
|
+
_b)) },
|
|
20
|
+
React.createElement(IconButton, __assign({ size: view === 'desktop' ? 's' : 'xs', className: cn(styles.button, (_c = {}, _c[styles.mobile] = view === 'mobile', _c)), "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon, dataTestId: dataTestId }, restProps))));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { Closer };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* hash: tfros */
|
|
2
|
+
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-graphic-primary: #0b1f35;
|
|
5
|
+
--color-light-graphic-secondary: #6d7986;
|
|
6
|
+
--color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05);
|
|
7
|
+
--color-light-bg-primary-alpha-40: rgba(255, 255, 255, 0.4);
|
|
8
|
+
} :root {
|
|
9
|
+
} :root {
|
|
10
|
+
} :root {
|
|
11
|
+
|
|
12
|
+
/* Hard */
|
|
13
|
+
|
|
14
|
+
/* Up */
|
|
15
|
+
|
|
16
|
+
/* Hard up */
|
|
17
|
+
} :root {
|
|
18
|
+
} :root {
|
|
19
|
+
} :root {
|
|
20
|
+
} :root {
|
|
21
|
+
} .navigation-bar__closer_8p6nd {
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
width: 48px;
|
|
24
|
+
height: 48px;
|
|
25
|
+
margin-left: auto;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
} .navigation-bar__button_8p6nd {
|
|
30
|
+
background: var(--color-light-bg-primary-alpha-40);
|
|
31
|
+
-webkit-backdrop-filter: blur(10px);
|
|
32
|
+
backdrop-filter: blur(10px);
|
|
33
|
+
border-radius: 50px;
|
|
34
|
+
color: var(--color-light-graphic-primary)
|
|
35
|
+
} .navigation-bar__button_8p6nd.navigation-bar__mobile_8p6nd {
|
|
36
|
+
background: var(--color-light-specialbg-secondary-transparent);
|
|
37
|
+
color: var(--color-light-graphic-secondary);
|
|
38
|
+
} .navigation-bar__sticky_8p6nd {
|
|
39
|
+
position: sticky;
|
|
40
|
+
top: 0;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
package/esm/index.css
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* hash: 72dgh */
|
|
2
|
+
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-text-primary: #0b1f35;
|
|
5
|
+
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
6
|
+
} :root {
|
|
7
|
+
} :root {
|
|
8
|
+
} :root {
|
|
9
|
+
|
|
10
|
+
/* Hard */
|
|
11
|
+
|
|
12
|
+
/* Up */
|
|
13
|
+
|
|
14
|
+
/* Hard up */
|
|
15
|
+
} :root {
|
|
16
|
+
} :root {
|
|
17
|
+
--gap-2xs: 4px;
|
|
18
|
+
--gap-s: 12px;
|
|
19
|
+
} :root {
|
|
20
|
+
} :root {
|
|
21
|
+
} .navigation-bar__header_1ssvj {
|
|
22
|
+
width: 100%;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
transition: box-shadow 0.2s ease, background 0.2s ease
|
|
25
|
+
} .navigation-bar__header_1ssvj.navigation-bar__header_1ssvj.navigation-bar__backgroundImage_1ssvj {
|
|
26
|
+
background-repeat: no-repeat;
|
|
27
|
+
background-position: center;
|
|
28
|
+
background-size: cover;
|
|
29
|
+
} .navigation-bar__mainLine_1ssvj {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: stretch;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
z-index: 1;
|
|
34
|
+
background-color: inherit;
|
|
35
|
+
} .navigation-bar__mainLineSticky_1ssvj {
|
|
36
|
+
position: sticky;
|
|
37
|
+
top: 0;
|
|
38
|
+
} .navigation-bar__mainLineWithImageBg_1ssvj {
|
|
39
|
+
background-color: initial;
|
|
40
|
+
} .navigation-bar__content_1ssvj {
|
|
41
|
+
color: var(--color-light-text-primary);
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-flow: column nowrap;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
align-self: baseline;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
min-height: 48px
|
|
49
|
+
} .navigation-bar__content_1ssvj.navigation-bar__withBothAddons_1ssvj,
|
|
50
|
+
.navigation-bar__content_1ssvj.navigation-bar__withCompactTitle_1ssvj {
|
|
51
|
+
font-size: 16px;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
align-self: center;
|
|
55
|
+
padding-top: var(--gap-2xs);
|
|
56
|
+
padding-bottom: var(--gap-2xs)
|
|
57
|
+
} .navigation-bar__content_1ssvj.navigation-bar__withBothAddons_1ssvj > .navigation-bar__children_1ssvj,
|
|
58
|
+
.navigation-bar__content_1ssvj.navigation-bar__withBothAddons_1ssvj > .navigation-bar__title_1ssvj,
|
|
59
|
+
.navigation-bar__content_1ssvj.navigation-bar__withCompactTitle_1ssvj > .navigation-bar__children_1ssvj,
|
|
60
|
+
.navigation-bar__content_1ssvj.navigation-bar__withCompactTitle_1ssvj > .navigation-bar__title_1ssvj {
|
|
61
|
+
-webkit-line-clamp: 1;
|
|
62
|
+
word-break: break-all;
|
|
63
|
+
} .navigation-bar__content_1ssvj.navigation-bar__contentOnBotDesktop_1ssvj.navigation-bar__contentOnBotDesktop_1ssvj {
|
|
64
|
+
padding-top: var(--gap-s);
|
|
65
|
+
} .navigation-bar__content_1ssvj.navigation-bar__contentOnBotMobile_1ssvj.navigation-bar__contentOnBotMobile_1ssvj {
|
|
66
|
+
padding-top: var(--gap-s);
|
|
67
|
+
} .navigation-bar__title_1ssvj {
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
} .navigation-bar__subtitle_1ssvj {
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
line-height: 20px;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
-webkit-line-clamp: 1;
|
|
74
|
+
display: -webkit-box;
|
|
75
|
+
-webkit-box-orient: vertical;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
|
|
78
|
+
color: var(--color-light-text-secondary);
|
|
79
|
+
word-break: break-all;
|
|
80
|
+
} .navigation-bar__addonsWrapper_1ssvj {
|
|
81
|
+
display: flex;
|
|
82
|
+
} .navigation-bar__rightAddons_1ssvj {
|
|
83
|
+
margin-left: auto;
|
|
84
|
+
} .navigation-bar__addon_1ssvj {
|
|
85
|
+
min-width: 48px;
|
|
86
|
+
height: 48px;
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
pointer-events: all;
|
|
92
|
+
} .navigation-bar__bottomAddons_1ssvj {
|
|
93
|
+
pointer-events: all;
|
|
94
|
+
} .navigation-bar__closer_1ssvj {
|
|
95
|
+
margin-left: auto;
|
|
96
|
+
} .navigation-bar__left_1ssvj {
|
|
97
|
+
text-align: left;
|
|
98
|
+
} .navigation-bar__center_1ssvj {
|
|
99
|
+
text-align: center;
|
|
100
|
+
} .navigation-bar__trim_1ssvj {
|
|
101
|
+
overflow: hidden
|
|
102
|
+
} .navigation-bar__trim_1ssvj .navigation-bar__title_1ssvj,
|
|
103
|
+
.navigation-bar__trim_1ssvj .navigation-bar__children_1ssvj {
|
|
104
|
+
-webkit-line-clamp: 2;
|
|
105
|
+
display: -webkit-box;
|
|
106
|
+
-webkit-box-orient: vertical;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
package/esm/index.d.ts
ADDED
package/esm/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { NavigationBar } from './Component.js';
|
|
2
|
+
export { Closer } from './components/closer/Component.js';
|
|
3
|
+
import 'tslib';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'classnames';
|
|
6
|
+
import './components/back-arrow-addon/Component.js';
|
|
7
|
+
import '@alfalab/core-components-button/esm';
|
|
8
|
+
import '@alfalab/core-components-typography/esm';
|
|
9
|
+
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
10
|
+
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|
|
11
|
+
import '@alfalab/core-components-icon-button/esm';
|
|
12
|
+
import '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
13
|
+
import '@alfalab/icons-glyph/CrossMIcon';
|
package/esm/types.d.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { CloserProps } from "./components/closer/index";
|
|
5
|
+
type NavigationBarProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Контент шапки
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Заголовок шапки
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Подзаголовок (доступен только в мобильной версии)
|
|
16
|
+
*/
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Размер заголовка (compact доступен только в мобильной версии)
|
|
20
|
+
*/
|
|
21
|
+
titleSize?: 'default' | 'compact';
|
|
22
|
+
/**
|
|
23
|
+
* Доп. класс для аддонов
|
|
24
|
+
*/
|
|
25
|
+
addonClassName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Слот слева
|
|
28
|
+
*/
|
|
29
|
+
leftAddons?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Слот справа
|
|
32
|
+
*/
|
|
33
|
+
rightAddons?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Дополнительный класс для closer
|
|
36
|
+
*/
|
|
37
|
+
closerClassName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Слот снизу
|
|
40
|
+
*/
|
|
41
|
+
bottomAddons?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Наличие компонента крестика
|
|
44
|
+
*/
|
|
45
|
+
hasCloser?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Наличие кнопки "Назад"
|
|
48
|
+
*/
|
|
49
|
+
hasBackButton?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Дополнительный класс для правого аддона
|
|
52
|
+
*/
|
|
53
|
+
backButtonClassName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Дополнительный класс
|
|
56
|
+
*/
|
|
57
|
+
className?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Дополнительный класс для контента
|
|
60
|
+
*/
|
|
61
|
+
contentClassName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Дополнительный класс для нижнего аддона
|
|
64
|
+
*/
|
|
65
|
+
bottomAddonsClassName?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Выравнивание заголовка
|
|
68
|
+
*/
|
|
69
|
+
align?: 'left' | 'center';
|
|
70
|
+
/**
|
|
71
|
+
* Обрезать ли заголовок
|
|
72
|
+
*/
|
|
73
|
+
trim?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Фиксирует шапку
|
|
76
|
+
*/
|
|
77
|
+
sticky?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
80
|
+
*/
|
|
81
|
+
dataTestId?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Фоновое изображение
|
|
84
|
+
*/
|
|
85
|
+
imageUrl?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Иконка closer.
|
|
88
|
+
*/
|
|
89
|
+
closerIcon?: React.ElementType;
|
|
90
|
+
/**
|
|
91
|
+
* Обработчик закрытия
|
|
92
|
+
*/
|
|
93
|
+
onClose?: CloserProps['onClose'];
|
|
94
|
+
/**
|
|
95
|
+
* обработчик клика по кнопке "назад"
|
|
96
|
+
*/
|
|
97
|
+
onBack?: () => void;
|
|
98
|
+
/**
|
|
99
|
+
* Вид шапки - мобильный или десктоп
|
|
100
|
+
*/
|
|
101
|
+
view: 'desktop' | 'mobile';
|
|
102
|
+
/**
|
|
103
|
+
* Ссылка на родительскую ноду.
|
|
104
|
+
*/
|
|
105
|
+
parentRef?: React.RefObject<HTMLDivElement>;
|
|
106
|
+
};
|
|
107
|
+
type ContentParams = {
|
|
108
|
+
extraClassName?: string;
|
|
109
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
110
|
+
style?: React.CSSProperties;
|
|
111
|
+
hidden?: boolean;
|
|
112
|
+
};
|
|
113
|
+
export { NavigationBarProps, ContentParams };
|
package/esm/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/index.css
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* hash: 72dgh */
|
|
2
|
+
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-text-primary: #0b1f35;
|
|
5
|
+
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
6
|
+
} :root {
|
|
7
|
+
} :root {
|
|
8
|
+
} :root {
|
|
9
|
+
|
|
10
|
+
/* Hard */
|
|
11
|
+
|
|
12
|
+
/* Up */
|
|
13
|
+
|
|
14
|
+
/* Hard up */
|
|
15
|
+
} :root {
|
|
16
|
+
} :root {
|
|
17
|
+
--gap-2xs: 4px;
|
|
18
|
+
--gap-s: 12px;
|
|
19
|
+
} :root {
|
|
20
|
+
} :root {
|
|
21
|
+
} .navigation-bar__header_1ssvj {
|
|
22
|
+
width: 100%;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
transition: box-shadow 0.2s ease, background 0.2s ease
|
|
25
|
+
} .navigation-bar__header_1ssvj.navigation-bar__header_1ssvj.navigation-bar__backgroundImage_1ssvj {
|
|
26
|
+
background-repeat: no-repeat;
|
|
27
|
+
background-position: center;
|
|
28
|
+
background-size: cover;
|
|
29
|
+
} .navigation-bar__mainLine_1ssvj {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: stretch;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
z-index: 1;
|
|
34
|
+
background-color: inherit;
|
|
35
|
+
} .navigation-bar__mainLineSticky_1ssvj {
|
|
36
|
+
position: sticky;
|
|
37
|
+
top: 0;
|
|
38
|
+
} .navigation-bar__mainLineWithImageBg_1ssvj {
|
|
39
|
+
background-color: initial;
|
|
40
|
+
} .navigation-bar__content_1ssvj {
|
|
41
|
+
color: var(--color-light-text-primary);
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-flow: column nowrap;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
align-self: baseline;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
min-height: 48px
|
|
49
|
+
} .navigation-bar__content_1ssvj.navigation-bar__withBothAddons_1ssvj,
|
|
50
|
+
.navigation-bar__content_1ssvj.navigation-bar__withCompactTitle_1ssvj {
|
|
51
|
+
font-size: 16px;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
align-self: center;
|
|
55
|
+
padding-top: var(--gap-2xs);
|
|
56
|
+
padding-bottom: var(--gap-2xs)
|
|
57
|
+
} .navigation-bar__content_1ssvj.navigation-bar__withBothAddons_1ssvj > .navigation-bar__children_1ssvj,
|
|
58
|
+
.navigation-bar__content_1ssvj.navigation-bar__withBothAddons_1ssvj > .navigation-bar__title_1ssvj,
|
|
59
|
+
.navigation-bar__content_1ssvj.navigation-bar__withCompactTitle_1ssvj > .navigation-bar__children_1ssvj,
|
|
60
|
+
.navigation-bar__content_1ssvj.navigation-bar__withCompactTitle_1ssvj > .navigation-bar__title_1ssvj {
|
|
61
|
+
-webkit-line-clamp: 1;
|
|
62
|
+
word-break: break-all;
|
|
63
|
+
} .navigation-bar__content_1ssvj.navigation-bar__contentOnBotDesktop_1ssvj.navigation-bar__contentOnBotDesktop_1ssvj {
|
|
64
|
+
padding-top: var(--gap-s);
|
|
65
|
+
} .navigation-bar__content_1ssvj.navigation-bar__contentOnBotMobile_1ssvj.navigation-bar__contentOnBotMobile_1ssvj {
|
|
66
|
+
padding-top: var(--gap-s);
|
|
67
|
+
} .navigation-bar__title_1ssvj {
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
} .navigation-bar__subtitle_1ssvj {
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
line-height: 20px;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
-webkit-line-clamp: 1;
|
|
74
|
+
display: -webkit-box;
|
|
75
|
+
-webkit-box-orient: vertical;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
|
|
78
|
+
color: var(--color-light-text-secondary);
|
|
79
|
+
word-break: break-all;
|
|
80
|
+
} .navigation-bar__addonsWrapper_1ssvj {
|
|
81
|
+
display: flex;
|
|
82
|
+
} .navigation-bar__rightAddons_1ssvj {
|
|
83
|
+
margin-left: auto;
|
|
84
|
+
} .navigation-bar__addon_1ssvj {
|
|
85
|
+
min-width: 48px;
|
|
86
|
+
height: 48px;
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
pointer-events: all;
|
|
92
|
+
} .navigation-bar__bottomAddons_1ssvj {
|
|
93
|
+
pointer-events: all;
|
|
94
|
+
} .navigation-bar__closer_1ssvj {
|
|
95
|
+
margin-left: auto;
|
|
96
|
+
} .navigation-bar__left_1ssvj {
|
|
97
|
+
text-align: left;
|
|
98
|
+
} .navigation-bar__center_1ssvj {
|
|
99
|
+
text-align: center;
|
|
100
|
+
} .navigation-bar__trim_1ssvj {
|
|
101
|
+
overflow: hidden
|
|
102
|
+
} .navigation-bar__trim_1ssvj .navigation-bar__title_1ssvj,
|
|
103
|
+
.navigation-bar__trim_1ssvj .navigation-bar__children_1ssvj {
|
|
104
|
+
-webkit-line-clamp: 2;
|
|
105
|
+
display: -webkit-box;
|
|
106
|
+
-webkit-box-orient: vertical;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Component = require('./Component.js');
|
|
4
|
+
var components_closer_Component = require('./components/closer/Component.js');
|
|
5
|
+
require('tslib');
|
|
6
|
+
require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('./components/back-arrow-addon/Component.js');
|
|
9
|
+
require('@alfalab/core-components-button');
|
|
10
|
+
require('@alfalab/core-components-typography');
|
|
11
|
+
require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
|
|
12
|
+
require('@alfalab/icons-glyph/ArrowLeftMIcon');
|
|
13
|
+
require('@alfalab/core-components-icon-button');
|
|
14
|
+
require('@alfalab/icons-glyph/CrossHeavyMIcon');
|
|
15
|
+
require('@alfalab/icons-glyph/CrossMIcon');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.NavigationBar = Component.NavigationBar;
|
|
20
|
+
exports.Closer = components_closer_Component.Closer;
|