@alfalab/core-components-navigation-bar 0.3.7 → 0.5.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.js +7 -11
- package/components/back-arrow-addon/Component.js +3 -3
- package/components/back-arrow-addon/index.css +12 -12
- package/components/back-arrow-addon/index.js +1 -1
- package/components/closer/Component.js +1 -1
- package/components/closer/index.css +5 -5
- package/cssm/Component.js +6 -10
- package/cssm/components/back-arrow-addon/Component.js +2 -2
- package/cssm/components/back-arrow-addon/index.js +1 -1
- package/cssm/index.d.ts +0 -1
- package/cssm/index.js +4 -4
- package/cssm/shared.d.ts +2 -0
- package/cssm/shared.js +23 -0
- package/esm/Component.js +3 -7
- package/esm/components/back-arrow-addon/Component.js +3 -3
- package/esm/components/back-arrow-addon/index.css +12 -12
- package/esm/components/back-arrow-addon/index.js +1 -1
- package/esm/components/closer/Component.js +1 -1
- package/esm/components/closer/index.css +5 -5
- package/esm/index.css +27 -27
- package/esm/index.d.ts +0 -1
- package/esm/index.js +3 -2
- package/esm/shared.d.ts +2 -0
- package/esm/shared.js +12 -0
- package/index.css +27 -27
- package/index.d.ts +0 -1
- package/index.js +3 -3
- package/modern/Component.js +3 -7
- package/modern/components/back-arrow-addon/Component.js +3 -3
- package/modern/components/back-arrow-addon/index.css +12 -12
- package/modern/components/back-arrow-addon/index.js +1 -1
- package/modern/components/closer/Component.js +1 -1
- package/modern/components/closer/index.css +5 -5
- package/modern/index.css +27 -27
- package/modern/index.d.ts +0 -1
- package/modern/index.js +3 -2
- package/modern/shared.d.ts +2 -0
- package/modern/shared.js +11 -0
- package/package.json +6 -4
- package/shared.d.ts +2 -0
- package/shared.js +21 -0
- package/src/Component.tsx +282 -0
- package/src/components/back-arrow-addon/Component.tsx +82 -0
- package/src/components/back-arrow-addon/index.module.css +66 -0
- package/src/components/back-arrow-addon/index.ts +1 -0
- package/src/components/closer/Component.tsx +80 -0
- package/src/components/closer/index.module.css +29 -0
- package/src/components/closer/index.ts +1 -0
- package/src/index.module.css +118 -0
- package/src/index.ts +2 -0
- package/src/shared.ts +2 -0
- package/src/types.ts +137 -0
- package/src/vars.css +6 -0
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7qzp9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-primary: #0e0e0e;
|
|
@@ -18,26 +18,26 @@
|
|
|
18
18
|
--gap-s: 12px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .navigation-
|
|
21
|
+
} .navigation-bar__header_8a3yz {
|
|
22
22
|
width: 100%;
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
transition: box-shadow 0.2s ease, background 0.2s ease
|
|
25
|
-
} .navigation-
|
|
25
|
+
} .navigation-bar__header_8a3yz.navigation-bar__header_8a3yz.navigation-bar__backgroundImage_8a3yz {
|
|
26
26
|
background-repeat: no-repeat;
|
|
27
27
|
background-position: center;
|
|
28
28
|
background-size: cover;
|
|
29
|
-
} .navigation-
|
|
29
|
+
} .navigation-bar__mainLine_8a3yz {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: stretch;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
z-index: 1;
|
|
34
34
|
background-color: inherit;
|
|
35
|
-
} .navigation-
|
|
35
|
+
} .navigation-bar__mainLineSticky_8a3yz {
|
|
36
36
|
position: sticky;
|
|
37
37
|
top: 0;
|
|
38
|
-
} .navigation-
|
|
38
|
+
} .navigation-bar__mainLineWithImageBg_8a3yz {
|
|
39
39
|
background-color: initial;
|
|
40
|
-
} .navigation-
|
|
40
|
+
} .navigation-bar__content_8a3yz {
|
|
41
41
|
color: var(--color-light-text-primary);
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-flow: column nowrap;
|
|
@@ -46,27 +46,27 @@
|
|
|
46
46
|
align-self: baseline;
|
|
47
47
|
box-sizing: border-box;
|
|
48
48
|
min-height: 48px
|
|
49
|
-
} .navigation-
|
|
50
|
-
.navigation-
|
|
49
|
+
} .navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz,
|
|
50
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz {
|
|
51
51
|
font-size: 16px;
|
|
52
52
|
line-height: 20px;
|
|
53
53
|
font-weight: 500;
|
|
54
54
|
align-self: center;
|
|
55
55
|
padding-top: var(--gap-2xs);
|
|
56
56
|
padding-bottom: var(--gap-2xs)
|
|
57
|
-
} .navigation-
|
|
58
|
-
.navigation-
|
|
59
|
-
.navigation-
|
|
60
|
-
.navigation-
|
|
57
|
+
} .navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz > .navigation-bar__children_8a3yz,
|
|
58
|
+
.navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz > .navigation-bar__title_8a3yz,
|
|
59
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz > .navigation-bar__children_8a3yz,
|
|
60
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz > .navigation-bar__title_8a3yz {
|
|
61
61
|
-webkit-line-clamp: 1;
|
|
62
62
|
word-break: break-all;
|
|
63
|
-
} .navigation-
|
|
63
|
+
} .navigation-bar__content_8a3yz.navigation-bar__contentOnBotDesktop_8a3yz.navigation-bar__contentOnBotDesktop_8a3yz {
|
|
64
64
|
padding-top: var(--gap-s);
|
|
65
|
-
} .navigation-
|
|
65
|
+
} .navigation-bar__content_8a3yz.navigation-bar__contentOnBotMobile_8a3yz.navigation-bar__contentOnBotMobile_8a3yz {
|
|
66
66
|
padding-top: var(--gap-s);
|
|
67
|
-
} .navigation-
|
|
67
|
+
} .navigation-bar__title_8a3yz {
|
|
68
68
|
word-break: break-word;
|
|
69
|
-
} .navigation-
|
|
69
|
+
} .navigation-bar__subtitle_8a3yz {
|
|
70
70
|
font-size: 14px;
|
|
71
71
|
line-height: 20px;
|
|
72
72
|
font-weight: 400;
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
|
|
78
78
|
color: var(--color-light-text-secondary);
|
|
79
79
|
word-break: break-all;
|
|
80
|
-
} .navigation-
|
|
80
|
+
} .navigation-bar__addonsWrapper_8a3yz {
|
|
81
81
|
display: flex;
|
|
82
|
-
} .navigation-
|
|
82
|
+
} .navigation-bar__rightAddons_8a3yz {
|
|
83
83
|
margin-left: auto;
|
|
84
|
-
} .navigation-
|
|
84
|
+
} .navigation-bar__addon_8a3yz {
|
|
85
85
|
min-width: 48px;
|
|
86
86
|
height: 48px;
|
|
87
87
|
display: flex;
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
align-items: center;
|
|
90
90
|
flex-shrink: 0;
|
|
91
91
|
pointer-events: all;
|
|
92
|
-
} .navigation-
|
|
92
|
+
} .navigation-bar__bottomAddons_8a3yz {
|
|
93
93
|
pointer-events: all;
|
|
94
|
-
} .navigation-
|
|
94
|
+
} .navigation-bar__closer_8a3yz {
|
|
95
95
|
margin-left: auto;
|
|
96
|
-
} .navigation-
|
|
96
|
+
} .navigation-bar__left_8a3yz {
|
|
97
97
|
text-align: left;
|
|
98
|
-
} .navigation-
|
|
98
|
+
} .navigation-bar__center_8a3yz {
|
|
99
99
|
text-align: center;
|
|
100
|
-
} .navigation-
|
|
100
|
+
} .navigation-bar__trim_8a3yz {
|
|
101
101
|
overflow: hidden
|
|
102
|
-
} .navigation-
|
|
103
|
-
.navigation-
|
|
102
|
+
} .navigation-bar__trim_8a3yz .navigation-bar__title_8a3yz,
|
|
103
|
+
.navigation-bar__trim_8a3yz .navigation-bar__children_8a3yz {
|
|
104
104
|
-webkit-line-clamp: 2;
|
|
105
105
|
display: -webkit-box;
|
|
106
106
|
-webkit-box-orient: vertical;
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
export { NavigationBar } from './Component.js';
|
|
2
|
-
export { Closer } from './components/closer/Component.js';
|
|
3
2
|
import 'tslib';
|
|
4
3
|
import 'react';
|
|
5
4
|
import 'react-merge-refs';
|
|
6
5
|
import 'classnames';
|
|
6
|
+
import '@alfalab/core-components-shared/esm';
|
|
7
7
|
import '@alfalab/hooks';
|
|
8
8
|
import './components/back-arrow-addon/Component.js';
|
|
9
|
-
import '@alfalab/core-components-button/esm';
|
|
9
|
+
import '@alfalab/core-components-button/esm/desktop';
|
|
10
10
|
import '@alfalab/core-components-typography/esm';
|
|
11
11
|
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|
|
13
|
+
import './components/closer/Component.js';
|
|
13
14
|
import '@alfalab/core-components-icon-button/esm';
|
|
14
15
|
import '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
15
16
|
import '@alfalab/icons-glyph/CrossMIcon';
|
package/esm/shared.d.ts
ADDED
package/esm/shared.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Closer } from './components/closer/Component.js';
|
|
2
|
+
export { BackArrowAddon } from './components/back-arrow-addon/Component.js';
|
|
3
|
+
import 'tslib';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'classnames';
|
|
6
|
+
import '@alfalab/core-components-icon-button/esm';
|
|
7
|
+
import '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
8
|
+
import '@alfalab/icons-glyph/CrossMIcon';
|
|
9
|
+
import '@alfalab/core-components-button/esm/desktop';
|
|
10
|
+
import '@alfalab/core-components-typography/esm';
|
|
11
|
+
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
12
|
+
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7qzp9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-primary: #0e0e0e;
|
|
@@ -18,26 +18,26 @@
|
|
|
18
18
|
--gap-s: 12px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .navigation-
|
|
21
|
+
} .navigation-bar__header_8a3yz {
|
|
22
22
|
width: 100%;
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
transition: box-shadow 0.2s ease, background 0.2s ease
|
|
25
|
-
} .navigation-
|
|
25
|
+
} .navigation-bar__header_8a3yz.navigation-bar__header_8a3yz.navigation-bar__backgroundImage_8a3yz {
|
|
26
26
|
background-repeat: no-repeat;
|
|
27
27
|
background-position: center;
|
|
28
28
|
background-size: cover;
|
|
29
|
-
} .navigation-
|
|
29
|
+
} .navigation-bar__mainLine_8a3yz {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: stretch;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
z-index: 1;
|
|
34
34
|
background-color: inherit;
|
|
35
|
-
} .navigation-
|
|
35
|
+
} .navigation-bar__mainLineSticky_8a3yz {
|
|
36
36
|
position: sticky;
|
|
37
37
|
top: 0;
|
|
38
|
-
} .navigation-
|
|
38
|
+
} .navigation-bar__mainLineWithImageBg_8a3yz {
|
|
39
39
|
background-color: initial;
|
|
40
|
-
} .navigation-
|
|
40
|
+
} .navigation-bar__content_8a3yz {
|
|
41
41
|
color: var(--color-light-text-primary);
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-flow: column nowrap;
|
|
@@ -46,27 +46,27 @@
|
|
|
46
46
|
align-self: baseline;
|
|
47
47
|
box-sizing: border-box;
|
|
48
48
|
min-height: 48px
|
|
49
|
-
} .navigation-
|
|
50
|
-
.navigation-
|
|
49
|
+
} .navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz,
|
|
50
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz {
|
|
51
51
|
font-size: 16px;
|
|
52
52
|
line-height: 20px;
|
|
53
53
|
font-weight: 500;
|
|
54
54
|
align-self: center;
|
|
55
55
|
padding-top: var(--gap-2xs);
|
|
56
56
|
padding-bottom: var(--gap-2xs)
|
|
57
|
-
} .navigation-
|
|
58
|
-
.navigation-
|
|
59
|
-
.navigation-
|
|
60
|
-
.navigation-
|
|
57
|
+
} .navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz > .navigation-bar__children_8a3yz,
|
|
58
|
+
.navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz > .navigation-bar__title_8a3yz,
|
|
59
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz > .navigation-bar__children_8a3yz,
|
|
60
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz > .navigation-bar__title_8a3yz {
|
|
61
61
|
-webkit-line-clamp: 1;
|
|
62
62
|
word-break: break-all;
|
|
63
|
-
} .navigation-
|
|
63
|
+
} .navigation-bar__content_8a3yz.navigation-bar__contentOnBotDesktop_8a3yz.navigation-bar__contentOnBotDesktop_8a3yz {
|
|
64
64
|
padding-top: var(--gap-s);
|
|
65
|
-
} .navigation-
|
|
65
|
+
} .navigation-bar__content_8a3yz.navigation-bar__contentOnBotMobile_8a3yz.navigation-bar__contentOnBotMobile_8a3yz {
|
|
66
66
|
padding-top: var(--gap-s);
|
|
67
|
-
} .navigation-
|
|
67
|
+
} .navigation-bar__title_8a3yz {
|
|
68
68
|
word-break: break-word;
|
|
69
|
-
} .navigation-
|
|
69
|
+
} .navigation-bar__subtitle_8a3yz {
|
|
70
70
|
font-size: 14px;
|
|
71
71
|
line-height: 20px;
|
|
72
72
|
font-weight: 400;
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
|
|
78
78
|
color: var(--color-light-text-secondary);
|
|
79
79
|
word-break: break-all;
|
|
80
|
-
} .navigation-
|
|
80
|
+
} .navigation-bar__addonsWrapper_8a3yz {
|
|
81
81
|
display: flex;
|
|
82
|
-
} .navigation-
|
|
82
|
+
} .navigation-bar__rightAddons_8a3yz {
|
|
83
83
|
margin-left: auto;
|
|
84
|
-
} .navigation-
|
|
84
|
+
} .navigation-bar__addon_8a3yz {
|
|
85
85
|
min-width: 48px;
|
|
86
86
|
height: 48px;
|
|
87
87
|
display: flex;
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
align-items: center;
|
|
90
90
|
flex-shrink: 0;
|
|
91
91
|
pointer-events: all;
|
|
92
|
-
} .navigation-
|
|
92
|
+
} .navigation-bar__bottomAddons_8a3yz {
|
|
93
93
|
pointer-events: all;
|
|
94
|
-
} .navigation-
|
|
94
|
+
} .navigation-bar__closer_8a3yz {
|
|
95
95
|
margin-left: auto;
|
|
96
|
-
} .navigation-
|
|
96
|
+
} .navigation-bar__left_8a3yz {
|
|
97
97
|
text-align: left;
|
|
98
|
-
} .navigation-
|
|
98
|
+
} .navigation-bar__center_8a3yz {
|
|
99
99
|
text-align: center;
|
|
100
|
-
} .navigation-
|
|
100
|
+
} .navigation-bar__trim_8a3yz {
|
|
101
101
|
overflow: hidden
|
|
102
|
-
} .navigation-
|
|
103
|
-
.navigation-
|
|
102
|
+
} .navigation-bar__trim_8a3yz .navigation-bar__title_8a3yz,
|
|
103
|
+
.navigation-bar__trim_8a3yz .navigation-bar__children_8a3yz {
|
|
104
104
|
-webkit-line-clamp: 2;
|
|
105
105
|
display: -webkit-box;
|
|
106
106
|
-webkit-box-orient: vertical;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var Component = require('./Component.js');
|
|
6
|
-
var components_closer_Component = require('./components/closer/Component.js');
|
|
7
6
|
require('tslib');
|
|
8
7
|
require('react');
|
|
9
8
|
require('react-merge-refs');
|
|
10
9
|
require('classnames');
|
|
10
|
+
require('@alfalab/core-components-shared');
|
|
11
11
|
require('@alfalab/hooks');
|
|
12
12
|
require('./components/back-arrow-addon/Component.js');
|
|
13
|
-
require('@alfalab/core-components-button');
|
|
13
|
+
require('@alfalab/core-components-button/desktop');
|
|
14
14
|
require('@alfalab/core-components-typography');
|
|
15
15
|
require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
|
|
16
16
|
require('@alfalab/icons-glyph/ArrowLeftMIcon');
|
|
17
|
+
require('./components/closer/Component.js');
|
|
17
18
|
require('@alfalab/core-components-icon-button');
|
|
18
19
|
require('@alfalab/icons-glyph/CrossHeavyMIcon');
|
|
19
20
|
require('@alfalab/icons-glyph/CrossMIcon');
|
|
@@ -21,4 +22,3 @@ require('@alfalab/icons-glyph/CrossMIcon');
|
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
exports.NavigationBar = Component.NavigationBar;
|
|
24
|
-
exports.Closer = components_closer_Component.Closer;
|
package/modern/Component.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useRef, useEffect } from 'react';
|
|
2
2
|
import mergeRefs from 'react-merge-refs';
|
|
3
3
|
import cn from 'classnames';
|
|
4
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
5
|
import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
5
6
|
import { BackArrowAddon } from './components/back-arrow-addon/Component.js';
|
|
6
7
|
import { Closer } from './components/closer/Component.js';
|
|
7
|
-
import '@alfalab/core-components-button/modern';
|
|
8
|
+
import '@alfalab/core-components-button/modern/desktop';
|
|
8
9
|
import '@alfalab/core-components-typography/modern';
|
|
9
10
|
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
10
11
|
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|
|
@@ -12,12 +13,7 @@ import '@alfalab/core-components-icon-button/modern';
|
|
|
12
13
|
import '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
13
14
|
import '@alfalab/icons-glyph/CrossMIcon';
|
|
14
15
|
|
|
15
|
-
const
|
|
16
|
-
const elementPart = element ? `-${element.toLowerCase()}` : '';
|
|
17
|
-
return dataTestId ? `${dataTestId}${elementPart}` : undefined;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const styles = {"header":"navigation-bar__header_1bkig","backgroundImage":"navigation-bar__backgroundImage_1bkig","mainLine":"navigation-bar__mainLine_1bkig","mainLineSticky":"navigation-bar__mainLineSticky_1bkig","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_1bkig","content":"navigation-bar__content_1bkig","withBothAddons":"navigation-bar__withBothAddons_1bkig","withCompactTitle":"navigation-bar__withCompactTitle_1bkig","children":"navigation-bar__children_1bkig","title":"navigation-bar__title_1bkig","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_1bkig","contentOnBotMobile":"navigation-bar__contentOnBotMobile_1bkig","subtitle":"navigation-bar__subtitle_1bkig","addonsWrapper":"navigation-bar__addonsWrapper_1bkig","rightAddons":"navigation-bar__rightAddons_1bkig","addon":"navigation-bar__addon_1bkig","bottomAddons":"navigation-bar__bottomAddons_1bkig","closer":"navigation-bar__closer_1bkig","left":"navigation-bar__left_1bkig","center":"navigation-bar__center_1bkig","trim":"navigation-bar__trim_1bkig"};
|
|
16
|
+
const styles = {"header":"navigation-bar__header_8a3yz","backgroundImage":"navigation-bar__backgroundImage_8a3yz","mainLine":"navigation-bar__mainLine_8a3yz","mainLineSticky":"navigation-bar__mainLineSticky_8a3yz","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_8a3yz","content":"navigation-bar__content_8a3yz","withBothAddons":"navigation-bar__withBothAddons_8a3yz","withCompactTitle":"navigation-bar__withCompactTitle_8a3yz","children":"navigation-bar__children_8a3yz","title":"navigation-bar__title_8a3yz","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_8a3yz","contentOnBotMobile":"navigation-bar__contentOnBotMobile_8a3yz","subtitle":"navigation-bar__subtitle_8a3yz","addonsWrapper":"navigation-bar__addonsWrapper_8a3yz","rightAddons":"navigation-bar__rightAddons_8a3yz","addon":"navigation-bar__addon_8a3yz","bottomAddons":"navigation-bar__bottomAddons_8a3yz","closer":"navigation-bar__closer_8a3yz","left":"navigation-bar__left_8a3yz","center":"navigation-bar__center_8a3yz","trim":"navigation-bar__trim_8a3yz"};
|
|
21
17
|
require('./index.css')
|
|
22
18
|
|
|
23
19
|
/* eslint-disable complexity */
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
|
|
4
4
|
import { Typography } from '@alfalab/core-components-typography/modern';
|
|
5
5
|
import { ArrowLeftMediumMIcon } from '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
6
6
|
import { ArrowLeftMIcon } from '@alfalab/icons-glyph/ArrowLeftMIcon';
|
|
7
7
|
|
|
8
|
-
const styles = {"component":"navigation-
|
|
8
|
+
const styles = {"component":"navigation-bar__component_7mweo","mobileComponent":"navigation-bar__mobileComponent_7mweo","flex":"navigation-bar__flex_7mweo","iconWrapper":"navigation-bar__iconWrapper_7mweo","text":"navigation-bar__text_7mweo","mobileWrapper":"navigation-bar__mobileWrapper_7mweo"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const BackArrowAddon = ({ text = 'Назад', onClick, className, textOpacity = 1, view, ...htmlAttributes }) => {
|
|
12
12
|
const Icon = view === 'desktop' ? ArrowLeftMediumMIcon : ArrowLeftMIcon;
|
|
13
|
-
return (React.createElement(
|
|
13
|
+
return (React.createElement(ButtonDesktop, { view: 'ghost', size: view === 'mobile' ? 'xxs' : 's', onClick: onClick, "aria-label": '\u043D\u0430\u0437\u0430\u0434', className: cn(styles.component, { [styles.mobileComponent]: view === 'mobile' }, className), ...htmlAttributes },
|
|
14
14
|
React.createElement("div", { className: styles.flex },
|
|
15
15
|
React.createElement("div", { className: cn(styles.iconWrapper, {
|
|
16
16
|
[styles.mobileWrapper]: view === 'mobile',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 18a7z */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-primary: #0e0e0e;
|
|
@@ -24,46 +24,46 @@
|
|
|
24
24
|
--gap-s: 12px;
|
|
25
25
|
} :root {
|
|
26
26
|
} :root {
|
|
27
|
-
} .navigation-
|
|
27
|
+
} .navigation-bar__component_7mweo {
|
|
28
28
|
height: 100%;
|
|
29
29
|
background: var(--color-light-bg-primary-alpha-40);
|
|
30
30
|
-webkit-backdrop-filter: blur(10px);
|
|
31
31
|
backdrop-filter: blur(10px);
|
|
32
32
|
border-radius: var(--border-radius-pill)
|
|
33
|
-
} .navigation-
|
|
33
|
+
} .navigation-bar__component_7mweo svg > path {
|
|
34
34
|
transition: fill 0.2s ease;
|
|
35
35
|
fill: var(--color-light-graphic-primary);
|
|
36
|
-
} .navigation-
|
|
36
|
+
} .navigation-bar__component_7mweo:hover svg > path {
|
|
37
37
|
fill: var(--color-light-graphic-primary-tint-20);
|
|
38
|
-
} .navigation-
|
|
38
|
+
} .navigation-bar__component_7mweo:active svg > path {
|
|
39
39
|
fill: var(--color-light-graphic-primary-tint-30);
|
|
40
|
-
} .navigation-
|
|
40
|
+
} .navigation-bar__mobileComponent_7mweo {
|
|
41
41
|
height: 32px;
|
|
42
42
|
margin: 0 var(--gap-xs);
|
|
43
43
|
-webkit-backdrop-filter: none;
|
|
44
44
|
backdrop-filter: none;
|
|
45
45
|
background: none;
|
|
46
|
-
} .navigation-
|
|
46
|
+
} .navigation-bar__flex_7mweo {
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
49
|
-
} .navigation-
|
|
49
|
+
} .navigation-bar__iconWrapper_7mweo {
|
|
50
50
|
display: inline-flex;
|
|
51
51
|
align-items: center;
|
|
52
52
|
justify-content: center;
|
|
53
53
|
height: 48px;
|
|
54
54
|
margin: 0 var(--gap-xs) 0 var(--gap-s);
|
|
55
55
|
border-radius: var(--border-radius-circle)
|
|
56
|
-
} .navigation-
|
|
56
|
+
} .navigation-bar__iconWrapper_7mweo + .navigation-bar__text_7mweo {
|
|
57
57
|
margin-right: var(--gap-s);
|
|
58
|
-
} .navigation-
|
|
58
|
+
} .navigation-bar__mobileWrapper_7mweo {
|
|
59
59
|
width: 32px;
|
|
60
60
|
height: 32px;
|
|
61
61
|
background: var(--color-light-specialbg-secondary-transparent);
|
|
62
62
|
-webkit-backdrop-filter: blur(10px);
|
|
63
63
|
backdrop-filter: blur(10px);
|
|
64
64
|
margin: 0
|
|
65
|
-
} .navigation-
|
|
65
|
+
} .navigation-bar__mobileWrapper_7mweo + .navigation-bar__text_7mweo {
|
|
66
66
|
margin: 0 var(--gap-s) 0 var(--gap-xs);
|
|
67
|
-
} .navigation-
|
|
67
|
+
} .navigation-bar__mobileWrapper_7mweo svg > path {
|
|
68
68
|
fill: var(--color-light-graphic-secondary);
|
|
69
69
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BackArrowAddon } from './Component.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import '@alfalab/core-components-button/modern';
|
|
4
|
+
import '@alfalab/core-components-button/modern/desktop';
|
|
5
5
|
import '@alfalab/core-components-typography/modern';
|
|
6
6
|
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|
|
@@ -4,7 +4,7 @@ import { IconButton } from '@alfalab/core-components-icon-button/modern';
|
|
|
4
4
|
import { CrossHeavyMIcon } from '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
5
5
|
import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
|
|
6
6
|
|
|
7
|
-
const styles = {"closer":"navigation-
|
|
7
|
+
const styles = {"closer":"navigation-bar__closer_1gqyh","button":"navigation-bar__button_1gqyh","mobile":"navigation-bar__mobile_1gqyh","sticky":"navigation-bar__sticky_1gqyh"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const Closer = ({ view, className, sticky, icon = view === 'desktop' ? CrossHeavyMIcon : CrossMIcon, dataTestId, onClose, ...restProps }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: u4dxk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-primary: #0e0e0e;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
/* closer-mobile */
|
|
23
23
|
--navigation-bar-closer-mobile-color: var(--color-light-graphic-secondary);
|
|
24
|
-
} .navigation-
|
|
24
|
+
} .navigation-bar__closer_1gqyh {
|
|
25
25
|
flex-shrink: 0;
|
|
26
26
|
width: 48px;
|
|
27
27
|
height: 48px;
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
display: flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
justify-content: center;
|
|
32
|
-
} .navigation-
|
|
32
|
+
} .navigation-bar__button_1gqyh {
|
|
33
33
|
background: var(--color-light-bg-primary-alpha-40);
|
|
34
34
|
-webkit-backdrop-filter: blur(10px);
|
|
35
35
|
backdrop-filter: blur(10px);
|
|
36
36
|
border-radius: 50px;
|
|
37
37
|
color: var(--color-light-graphic-primary)
|
|
38
|
-
} .navigation-
|
|
38
|
+
} .navigation-bar__button_1gqyh.navigation-bar__mobile_1gqyh {
|
|
39
39
|
background: var(--color-light-specialbg-secondary-transparent);
|
|
40
40
|
color: var(--navigation-bar-closer-mobile-color);
|
|
41
|
-
} .navigation-
|
|
41
|
+
} .navigation-bar__sticky_1gqyh {
|
|
42
42
|
position: sticky;
|
|
43
43
|
top: 0;
|
|
44
44
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7qzp9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-primary: #0e0e0e;
|
|
@@ -18,26 +18,26 @@
|
|
|
18
18
|
--gap-s: 12px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .navigation-
|
|
21
|
+
} .navigation-bar__header_8a3yz {
|
|
22
22
|
width: 100%;
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
transition: box-shadow 0.2s ease, background 0.2s ease
|
|
25
|
-
} .navigation-
|
|
25
|
+
} .navigation-bar__header_8a3yz.navigation-bar__header_8a3yz.navigation-bar__backgroundImage_8a3yz {
|
|
26
26
|
background-repeat: no-repeat;
|
|
27
27
|
background-position: center;
|
|
28
28
|
background-size: cover;
|
|
29
|
-
} .navigation-
|
|
29
|
+
} .navigation-bar__mainLine_8a3yz {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: stretch;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
z-index: 1;
|
|
34
34
|
background-color: inherit;
|
|
35
|
-
} .navigation-
|
|
35
|
+
} .navigation-bar__mainLineSticky_8a3yz {
|
|
36
36
|
position: sticky;
|
|
37
37
|
top: 0;
|
|
38
|
-
} .navigation-
|
|
38
|
+
} .navigation-bar__mainLineWithImageBg_8a3yz {
|
|
39
39
|
background-color: initial;
|
|
40
|
-
} .navigation-
|
|
40
|
+
} .navigation-bar__content_8a3yz {
|
|
41
41
|
color: var(--color-light-text-primary);
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-flow: column nowrap;
|
|
@@ -46,27 +46,27 @@
|
|
|
46
46
|
align-self: baseline;
|
|
47
47
|
box-sizing: border-box;
|
|
48
48
|
min-height: 48px
|
|
49
|
-
} .navigation-
|
|
50
|
-
.navigation-
|
|
49
|
+
} .navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz,
|
|
50
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz {
|
|
51
51
|
font-size: 16px;
|
|
52
52
|
line-height: 20px;
|
|
53
53
|
font-weight: 500;
|
|
54
54
|
align-self: center;
|
|
55
55
|
padding-top: var(--gap-2xs);
|
|
56
56
|
padding-bottom: var(--gap-2xs)
|
|
57
|
-
} .navigation-
|
|
58
|
-
.navigation-
|
|
59
|
-
.navigation-
|
|
60
|
-
.navigation-
|
|
57
|
+
} .navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz > .navigation-bar__children_8a3yz,
|
|
58
|
+
.navigation-bar__content_8a3yz.navigation-bar__withBothAddons_8a3yz > .navigation-bar__title_8a3yz,
|
|
59
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz > .navigation-bar__children_8a3yz,
|
|
60
|
+
.navigation-bar__content_8a3yz.navigation-bar__withCompactTitle_8a3yz > .navigation-bar__title_8a3yz {
|
|
61
61
|
-webkit-line-clamp: 1;
|
|
62
62
|
word-break: break-all;
|
|
63
|
-
} .navigation-
|
|
63
|
+
} .navigation-bar__content_8a3yz.navigation-bar__contentOnBotDesktop_8a3yz.navigation-bar__contentOnBotDesktop_8a3yz {
|
|
64
64
|
padding-top: var(--gap-s);
|
|
65
|
-
} .navigation-
|
|
65
|
+
} .navigation-bar__content_8a3yz.navigation-bar__contentOnBotMobile_8a3yz.navigation-bar__contentOnBotMobile_8a3yz {
|
|
66
66
|
padding-top: var(--gap-s);
|
|
67
|
-
} .navigation-
|
|
67
|
+
} .navigation-bar__title_8a3yz {
|
|
68
68
|
word-break: break-word;
|
|
69
|
-
} .navigation-
|
|
69
|
+
} .navigation-bar__subtitle_8a3yz {
|
|
70
70
|
font-size: 14px;
|
|
71
71
|
line-height: 20px;
|
|
72
72
|
font-weight: 400;
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
|
|
78
78
|
color: var(--color-light-text-secondary);
|
|
79
79
|
word-break: break-all;
|
|
80
|
-
} .navigation-
|
|
80
|
+
} .navigation-bar__addonsWrapper_8a3yz {
|
|
81
81
|
display: flex;
|
|
82
|
-
} .navigation-
|
|
82
|
+
} .navigation-bar__rightAddons_8a3yz {
|
|
83
83
|
margin-left: auto;
|
|
84
|
-
} .navigation-
|
|
84
|
+
} .navigation-bar__addon_8a3yz {
|
|
85
85
|
min-width: 48px;
|
|
86
86
|
height: 48px;
|
|
87
87
|
display: flex;
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
align-items: center;
|
|
90
90
|
flex-shrink: 0;
|
|
91
91
|
pointer-events: all;
|
|
92
|
-
} .navigation-
|
|
92
|
+
} .navigation-bar__bottomAddons_8a3yz {
|
|
93
93
|
pointer-events: all;
|
|
94
|
-
} .navigation-
|
|
94
|
+
} .navigation-bar__closer_8a3yz {
|
|
95
95
|
margin-left: auto;
|
|
96
|
-
} .navigation-
|
|
96
|
+
} .navigation-bar__left_8a3yz {
|
|
97
97
|
text-align: left;
|
|
98
|
-
} .navigation-
|
|
98
|
+
} .navigation-bar__center_8a3yz {
|
|
99
99
|
text-align: center;
|
|
100
|
-
} .navigation-
|
|
100
|
+
} .navigation-bar__trim_8a3yz {
|
|
101
101
|
overflow: hidden
|
|
102
|
-
} .navigation-
|
|
103
|
-
.navigation-
|
|
102
|
+
} .navigation-bar__trim_8a3yz .navigation-bar__title_8a3yz,
|
|
103
|
+
.navigation-bar__trim_8a3yz .navigation-bar__children_8a3yz {
|
|
104
104
|
-webkit-line-clamp: 2;
|
|
105
105
|
display: -webkit-box;
|
|
106
106
|
-webkit-box-orient: vertical;
|
package/modern/index.d.ts
CHANGED
package/modern/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { NavigationBar } from './Component.js';
|
|
2
|
-
export { Closer } from './components/closer/Component.js';
|
|
3
2
|
import 'react';
|
|
4
3
|
import 'react-merge-refs';
|
|
5
4
|
import 'classnames';
|
|
5
|
+
import '@alfalab/core-components-shared/modern';
|
|
6
6
|
import '@alfalab/hooks';
|
|
7
7
|
import './components/back-arrow-addon/Component.js';
|
|
8
|
-
import '@alfalab/core-components-button/modern';
|
|
8
|
+
import '@alfalab/core-components-button/modern/desktop';
|
|
9
9
|
import '@alfalab/core-components-typography/modern';
|
|
10
10
|
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|
|
12
|
+
import './components/closer/Component.js';
|
|
12
13
|
import '@alfalab/core-components-icon-button/modern';
|
|
13
14
|
import '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
14
15
|
import '@alfalab/icons-glyph/CrossMIcon';
|
package/modern/shared.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { Closer } from './components/closer/Component.js';
|
|
2
|
+
export { BackArrowAddon } from './components/back-arrow-addon/Component.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'classnames';
|
|
5
|
+
import '@alfalab/core-components-icon-button/modern';
|
|
6
|
+
import '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
7
|
+
import '@alfalab/icons-glyph/CrossMIcon';
|
|
8
|
+
import '@alfalab/core-components-button/modern/desktop';
|
|
9
|
+
import '@alfalab/core-components-typography/modern';
|
|
10
|
+
import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
|
|
11
|
+
import '@alfalab/icons-glyph/ArrowLeftMIcon';
|