@alfalab/core-components-navigation-bar 0.1.1 → 0.1.3

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.
@@ -1,13 +1,13 @@
1
- /* hash: 1dgzi */
1
+ /* hash: 1iw35 */
2
2
  :root {
3
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);
4
+ --color-light-graphic-primary: #0e0e0e;
5
+ --color-light-graphic-secondary: #86868a;
6
+ --color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
7
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 {
8
+ --color-light-graphic-primary-tint-20: rgb(62, 62, 62);
9
+ --color-light-graphic-primary-tint-30: rgb(86, 86, 86);
10
+ } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
11
11
  } :root {
12
12
  } :root {
13
13
 
@@ -24,46 +24,46 @@
24
24
  --gap-s: 12px;
25
25
  } :root {
26
26
  } :root {
27
- } .navigation-bar__component_1ryml {
27
+ } .navigation-bar__component_65af1 {
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-bar__component_1ryml svg > path {
33
+ } .navigation-bar__component_65af1 svg > path {
34
34
  transition: fill 0.2s ease;
35
35
  fill: var(--color-light-graphic-primary);
36
- } .navigation-bar__component_1ryml:hover svg > path {
36
+ } .navigation-bar__component_65af1:hover svg > path {
37
37
  fill: var(--color-light-graphic-primary-tint-20);
38
- } .navigation-bar__component_1ryml:active svg > path {
38
+ } .navigation-bar__component_65af1:active svg > path {
39
39
  fill: var(--color-light-graphic-primary-tint-30);
40
- } .navigation-bar__mobileComponent_1ryml {
40
+ } .navigation-bar__mobileComponent_65af1 {
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-bar__flex_1ryml {
46
+ } .navigation-bar__flex_65af1 {
47
47
  display: flex;
48
48
  align-items: center;
49
- } .navigation-bar__iconWrapper_1ryml {
49
+ } .navigation-bar__iconWrapper_65af1 {
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-bar__iconWrapper_1ryml + .navigation-bar__text_1ryml {
56
+ } .navigation-bar__iconWrapper_65af1 + .navigation-bar__text_65af1 {
57
57
  margin-right: var(--gap-s);
58
- } .navigation-bar__mobileWrapper_1ryml {
58
+ } .navigation-bar__mobileWrapper_65af1 {
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-bar__mobileWrapper_1ryml + .navigation-bar__text_1ryml {
65
+ } .navigation-bar__mobileWrapper_65af1 + .navigation-bar__text_65af1 {
66
66
  margin: 0 var(--gap-s) 0 var(--gap-xs);
67
- } .navigation-bar__mobileWrapper_1ryml svg > path {
67
+ } .navigation-bar__mobileWrapper_65af1 svg > path {
68
68
  fill: var(--color-light-graphic-secondary);
69
69
  }
@@ -5,7 +5,7 @@ import { IconButton } from '@alfalab/core-components-icon-button/esm';
5
5
  import { CrossHeavyMIcon } from '@alfalab/icons-glyph/CrossHeavyMIcon';
6
6
  import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
7
7
 
8
- var styles = {"closer":"navigation-bar__closer_asogp","button":"navigation-bar__button_asogp","mobile":"navigation-bar__mobile_asogp","sticky":"navigation-bar__sticky_asogp"};
8
+ var styles = {"closer":"navigation-bar__closer_1wm0n","button":"navigation-bar__button_1wm0n","mobile":"navigation-bar__mobile_1wm0n","sticky":"navigation-bar__sticky_1wm0n"};
9
9
  require('./index.css')
10
10
 
11
11
  var Closer = function (_a) {
@@ -1,11 +1,11 @@
1
- /* hash: ol373 */
1
+ /* hash: 1hg1i */
2
2
  :root {
3
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);
4
+ --color-light-graphic-primary: #0e0e0e;
5
+ --color-light-graphic-secondary: #86868a;
6
+ --color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
7
7
  --color-light-bg-primary-alpha-40: rgba(255, 255, 255, 0.4);
8
- } :root {
8
+ } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
9
9
  } :root {
10
10
  } :root {
11
11
 
@@ -18,7 +18,7 @@
18
18
  } :root {
19
19
  } :root {
20
20
  } :root {
21
- } .navigation-bar__closer_asogp {
21
+ } .navigation-bar__closer_1wm0n {
22
22
  flex-shrink: 0;
23
23
  width: 48px;
24
24
  height: 48px;
@@ -26,16 +26,16 @@
26
26
  display: flex;
27
27
  align-items: center;
28
28
  justify-content: center;
29
- } .navigation-bar__button_asogp {
29
+ } .navigation-bar__button_1wm0n {
30
30
  background: var(--color-light-bg-primary-alpha-40);
31
31
  -webkit-backdrop-filter: blur(10px);
32
32
  backdrop-filter: blur(10px);
33
33
  border-radius: 50px;
34
34
  color: var(--color-light-graphic-primary)
35
- } .navigation-bar__button_asogp.navigation-bar__mobile_asogp {
35
+ } .navigation-bar__button_1wm0n.navigation-bar__mobile_1wm0n {
36
36
  background: var(--color-light-specialbg-secondary-transparent);
37
37
  color: var(--color-light-graphic-secondary);
38
- } .navigation-bar__sticky_asogp {
38
+ } .navigation-bar__sticky_1wm0n {
39
39
  position: sticky;
40
40
  top: 0;
41
41
  }
package/esm/index.css CHANGED
@@ -1,9 +1,9 @@
1
- /* hash: 27oys */
1
+ /* hash: v2nac */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
- --color-light-text-primary: #0b1f35;
5
- --color-light-text-secondary: rgba(11, 31, 53, 0.7);
6
- } :root {
4
+ --color-light-text-primary: #0e0e0e;
5
+ --color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
6
+ } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
7
7
  } :root {
8
8
  } :root {
9
9
 
@@ -18,26 +18,26 @@
18
18
  --gap-s: 12px;
19
19
  } :root {
20
20
  } :root {
21
- } .navigation-bar__header_1uwdc {
21
+ } .navigation-bar__header_1holh {
22
22
  width: 100%;
23
23
  box-sizing: border-box;
24
24
  transition: box-shadow 0.2s ease, background 0.2s ease
25
- } .navigation-bar__header_1uwdc.navigation-bar__header_1uwdc.navigation-bar__backgroundImage_1uwdc {
25
+ } .navigation-bar__header_1holh.navigation-bar__header_1holh.navigation-bar__backgroundImage_1holh {
26
26
  background-repeat: no-repeat;
27
27
  background-position: center;
28
28
  background-size: cover;
29
- } .navigation-bar__mainLine_1uwdc {
29
+ } .navigation-bar__mainLine_1holh {
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-bar__mainLineSticky_1uwdc {
35
+ } .navigation-bar__mainLineSticky_1holh {
36
36
  position: sticky;
37
37
  top: 0;
38
- } .navigation-bar__mainLineWithImageBg_1uwdc {
38
+ } .navigation-bar__mainLineWithImageBg_1holh {
39
39
  background-color: initial;
40
- } .navigation-bar__content_1uwdc {
40
+ } .navigation-bar__content_1holh {
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-bar__content_1uwdc.navigation-bar__withBothAddons_1uwdc,
50
- .navigation-bar__content_1uwdc.navigation-bar__withCompactTitle_1uwdc {
49
+ } .navigation-bar__content_1holh.navigation-bar__withBothAddons_1holh,
50
+ .navigation-bar__content_1holh.navigation-bar__withCompactTitle_1holh {
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-bar__content_1uwdc.navigation-bar__withBothAddons_1uwdc > .navigation-bar__children_1uwdc,
58
- .navigation-bar__content_1uwdc.navigation-bar__withBothAddons_1uwdc > .navigation-bar__title_1uwdc,
59
- .navigation-bar__content_1uwdc.navigation-bar__withCompactTitle_1uwdc > .navigation-bar__children_1uwdc,
60
- .navigation-bar__content_1uwdc.navigation-bar__withCompactTitle_1uwdc > .navigation-bar__title_1uwdc {
57
+ } .navigation-bar__content_1holh.navigation-bar__withBothAddons_1holh > .navigation-bar__children_1holh,
58
+ .navigation-bar__content_1holh.navigation-bar__withBothAddons_1holh > .navigation-bar__title_1holh,
59
+ .navigation-bar__content_1holh.navigation-bar__withCompactTitle_1holh > .navigation-bar__children_1holh,
60
+ .navigation-bar__content_1holh.navigation-bar__withCompactTitle_1holh > .navigation-bar__title_1holh {
61
61
  -webkit-line-clamp: 1;
62
62
  word-break: break-all;
63
- } .navigation-bar__content_1uwdc.navigation-bar__contentOnBotDesktop_1uwdc.navigation-bar__contentOnBotDesktop_1uwdc {
63
+ } .navigation-bar__content_1holh.navigation-bar__contentOnBotDesktop_1holh.navigation-bar__contentOnBotDesktop_1holh {
64
64
  padding-top: var(--gap-s);
65
- } .navigation-bar__content_1uwdc.navigation-bar__contentOnBotMobile_1uwdc.navigation-bar__contentOnBotMobile_1uwdc {
65
+ } .navigation-bar__content_1holh.navigation-bar__contentOnBotMobile_1holh.navigation-bar__contentOnBotMobile_1holh {
66
66
  padding-top: var(--gap-s);
67
- } .navigation-bar__title_1uwdc {
67
+ } .navigation-bar__title_1holh {
68
68
  word-break: break-word;
69
- } .navigation-bar__subtitle_1uwdc {
69
+ } .navigation-bar__subtitle_1holh {
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-bar__addonsWrapper_1uwdc {
80
+ } .navigation-bar__addonsWrapper_1holh {
81
81
  display: flex;
82
- } .navigation-bar__rightAddons_1uwdc {
82
+ } .navigation-bar__rightAddons_1holh {
83
83
  margin-left: auto;
84
- } .navigation-bar__addon_1uwdc {
84
+ } .navigation-bar__addon_1holh {
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-bar__bottomAddons_1uwdc {
92
+ } .navigation-bar__bottomAddons_1holh {
93
93
  pointer-events: all;
94
- } .navigation-bar__closer_1uwdc {
94
+ } .navigation-bar__closer_1holh {
95
95
  margin-left: auto;
96
- } .navigation-bar__left_1uwdc {
96
+ } .navigation-bar__left_1holh {
97
97
  text-align: left;
98
- } .navigation-bar__center_1uwdc {
98
+ } .navigation-bar__center_1holh {
99
99
  text-align: center;
100
- } .navigation-bar__trim_1uwdc {
100
+ } .navigation-bar__trim_1holh {
101
101
  overflow: hidden
102
- } .navigation-bar__trim_1uwdc .navigation-bar__title_1uwdc,
103
- .navigation-bar__trim_1uwdc .navigation-bar__children_1uwdc {
102
+ } .navigation-bar__trim_1holh .navigation-bar__title_1holh,
103
+ .navigation-bar__trim_1holh .navigation-bar__children_1holh {
104
104
  -webkit-line-clamp: 2;
105
105
  display: -webkit-box;
106
106
  -webkit-box-orient: vertical;
package/esm/index.js CHANGED
@@ -3,6 +3,7 @@ export { Closer } from './components/closer/Component.js';
3
3
  import 'tslib';
4
4
  import 'react';
5
5
  import 'classnames';
6
+ import '@alfalab/hooks';
6
7
  import './components/back-arrow-addon/Component.js';
7
8
  import '@alfalab/core-components-button/esm';
8
9
  import '@alfalab/core-components-typography/esm';
package/index.css CHANGED
@@ -1,9 +1,9 @@
1
- /* hash: 27oys */
1
+ /* hash: v2nac */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
- --color-light-text-primary: #0b1f35;
5
- --color-light-text-secondary: rgba(11, 31, 53, 0.7);
6
- } :root {
4
+ --color-light-text-primary: #0e0e0e;
5
+ --color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
6
+ } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
7
7
  } :root {
8
8
  } :root {
9
9
 
@@ -18,26 +18,26 @@
18
18
  --gap-s: 12px;
19
19
  } :root {
20
20
  } :root {
21
- } .navigation-bar__header_1uwdc {
21
+ } .navigation-bar__header_1holh {
22
22
  width: 100%;
23
23
  box-sizing: border-box;
24
24
  transition: box-shadow 0.2s ease, background 0.2s ease
25
- } .navigation-bar__header_1uwdc.navigation-bar__header_1uwdc.navigation-bar__backgroundImage_1uwdc {
25
+ } .navigation-bar__header_1holh.navigation-bar__header_1holh.navigation-bar__backgroundImage_1holh {
26
26
  background-repeat: no-repeat;
27
27
  background-position: center;
28
28
  background-size: cover;
29
- } .navigation-bar__mainLine_1uwdc {
29
+ } .navigation-bar__mainLine_1holh {
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-bar__mainLineSticky_1uwdc {
35
+ } .navigation-bar__mainLineSticky_1holh {
36
36
  position: sticky;
37
37
  top: 0;
38
- } .navigation-bar__mainLineWithImageBg_1uwdc {
38
+ } .navigation-bar__mainLineWithImageBg_1holh {
39
39
  background-color: initial;
40
- } .navigation-bar__content_1uwdc {
40
+ } .navigation-bar__content_1holh {
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-bar__content_1uwdc.navigation-bar__withBothAddons_1uwdc,
50
- .navigation-bar__content_1uwdc.navigation-bar__withCompactTitle_1uwdc {
49
+ } .navigation-bar__content_1holh.navigation-bar__withBothAddons_1holh,
50
+ .navigation-bar__content_1holh.navigation-bar__withCompactTitle_1holh {
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-bar__content_1uwdc.navigation-bar__withBothAddons_1uwdc > .navigation-bar__children_1uwdc,
58
- .navigation-bar__content_1uwdc.navigation-bar__withBothAddons_1uwdc > .navigation-bar__title_1uwdc,
59
- .navigation-bar__content_1uwdc.navigation-bar__withCompactTitle_1uwdc > .navigation-bar__children_1uwdc,
60
- .navigation-bar__content_1uwdc.navigation-bar__withCompactTitle_1uwdc > .navigation-bar__title_1uwdc {
57
+ } .navigation-bar__content_1holh.navigation-bar__withBothAddons_1holh > .navigation-bar__children_1holh,
58
+ .navigation-bar__content_1holh.navigation-bar__withBothAddons_1holh > .navigation-bar__title_1holh,
59
+ .navigation-bar__content_1holh.navigation-bar__withCompactTitle_1holh > .navigation-bar__children_1holh,
60
+ .navigation-bar__content_1holh.navigation-bar__withCompactTitle_1holh > .navigation-bar__title_1holh {
61
61
  -webkit-line-clamp: 1;
62
62
  word-break: break-all;
63
- } .navigation-bar__content_1uwdc.navigation-bar__contentOnBotDesktop_1uwdc.navigation-bar__contentOnBotDesktop_1uwdc {
63
+ } .navigation-bar__content_1holh.navigation-bar__contentOnBotDesktop_1holh.navigation-bar__contentOnBotDesktop_1holh {
64
64
  padding-top: var(--gap-s);
65
- } .navigation-bar__content_1uwdc.navigation-bar__contentOnBotMobile_1uwdc.navigation-bar__contentOnBotMobile_1uwdc {
65
+ } .navigation-bar__content_1holh.navigation-bar__contentOnBotMobile_1holh.navigation-bar__contentOnBotMobile_1holh {
66
66
  padding-top: var(--gap-s);
67
- } .navigation-bar__title_1uwdc {
67
+ } .navigation-bar__title_1holh {
68
68
  word-break: break-word;
69
- } .navigation-bar__subtitle_1uwdc {
69
+ } .navigation-bar__subtitle_1holh {
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-bar__addonsWrapper_1uwdc {
80
+ } .navigation-bar__addonsWrapper_1holh {
81
81
  display: flex;
82
- } .navigation-bar__rightAddons_1uwdc {
82
+ } .navigation-bar__rightAddons_1holh {
83
83
  margin-left: auto;
84
- } .navigation-bar__addon_1uwdc {
84
+ } .navigation-bar__addon_1holh {
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-bar__bottomAddons_1uwdc {
92
+ } .navigation-bar__bottomAddons_1holh {
93
93
  pointer-events: all;
94
- } .navigation-bar__closer_1uwdc {
94
+ } .navigation-bar__closer_1holh {
95
95
  margin-left: auto;
96
- } .navigation-bar__left_1uwdc {
96
+ } .navigation-bar__left_1holh {
97
97
  text-align: left;
98
- } .navigation-bar__center_1uwdc {
98
+ } .navigation-bar__center_1holh {
99
99
  text-align: center;
100
- } .navigation-bar__trim_1uwdc {
100
+ } .navigation-bar__trim_1holh {
101
101
  overflow: hidden
102
- } .navigation-bar__trim_1uwdc .navigation-bar__title_1uwdc,
103
- .navigation-bar__trim_1uwdc .navigation-bar__children_1uwdc {
102
+ } .navigation-bar__trim_1holh .navigation-bar__title_1holh,
103
+ .navigation-bar__trim_1holh .navigation-bar__children_1holh {
104
104
  -webkit-line-clamp: 2;
105
105
  display: -webkit-box;
106
106
  -webkit-box-orient: vertical;
package/index.js CHANGED
@@ -1,10 +1,13 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var Component = require('./Component.js');
4
6
  var components_closer_Component = require('./components/closer/Component.js');
5
7
  require('tslib');
6
8
  require('react');
7
9
  require('classnames');
10
+ require('@alfalab/hooks');
8
11
  require('./components/back-arrow-addon/Component.js');
9
12
  require('@alfalab/core-components-button');
10
13
  require('@alfalab/core-components-typography');
@@ -1,5 +1,6 @@
1
1
  import React, { useState, useRef, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
+ import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
3
4
  import { BackArrowAddon } from './components/back-arrow-addon/Component.js';
4
5
  import { Closer } from './components/closer/Component.js';
5
6
  import '@alfalab/core-components-button/modern';
@@ -15,16 +16,19 @@ const getDataTestId = (dataTestId, element) => {
15
16
  return dataTestId ? `${dataTestId}${elementPart}` : undefined;
16
17
  };
17
18
 
18
- const styles = {"header":"navigation-bar__header_1uwdc","backgroundImage":"navigation-bar__backgroundImage_1uwdc","mainLine":"navigation-bar__mainLine_1uwdc","mainLineSticky":"navigation-bar__mainLineSticky_1uwdc","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_1uwdc","content":"navigation-bar__content_1uwdc","withBothAddons":"navigation-bar__withBothAddons_1uwdc","withCompactTitle":"navigation-bar__withCompactTitle_1uwdc","children":"navigation-bar__children_1uwdc","title":"navigation-bar__title_1uwdc","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_1uwdc","contentOnBotMobile":"navigation-bar__contentOnBotMobile_1uwdc","subtitle":"navigation-bar__subtitle_1uwdc","addonsWrapper":"navigation-bar__addonsWrapper_1uwdc","rightAddons":"navigation-bar__rightAddons_1uwdc","addon":"navigation-bar__addon_1uwdc","bottomAddons":"navigation-bar__bottomAddons_1uwdc","closer":"navigation-bar__closer_1uwdc","left":"navigation-bar__left_1uwdc","center":"navigation-bar__center_1uwdc","trim":"navigation-bar__trim_1uwdc"};
19
+ const styles = {"header":"navigation-bar__header_1holh","backgroundImage":"navigation-bar__backgroundImage_1holh","mainLine":"navigation-bar__mainLine_1holh","mainLineSticky":"navigation-bar__mainLineSticky_1holh","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_1holh","content":"navigation-bar__content_1holh","withBothAddons":"navigation-bar__withBothAddons_1holh","withCompactTitle":"navigation-bar__withCompactTitle_1holh","children":"navigation-bar__children_1holh","title":"navigation-bar__title_1holh","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_1holh","contentOnBotMobile":"navigation-bar__contentOnBotMobile_1holh","subtitle":"navigation-bar__subtitle_1holh","addonsWrapper":"navigation-bar__addonsWrapper_1holh","rightAddons":"navigation-bar__rightAddons_1holh","addon":"navigation-bar__addon_1holh","bottomAddons":"navigation-bar__bottomAddons_1holh","closer":"navigation-bar__closer_1holh","left":"navigation-bar__left_1holh","center":"navigation-bar__center_1holh","trim":"navigation-bar__trim_1holh"};
19
20
  require('./index.css')
20
21
 
21
22
  /* eslint-disable complexity */
22
23
  const ADDONS_HEIGHT = 48;
23
24
  const NavigationBar = ({ addonClassName, className, contentClassName, closerClassName, leftAddons, rightAddons, bottomAddons, bottomAddonsClassName, children, align = 'left', trim = true, title, titleSize = 'default', subtitle, hasCloser, hasBackButton, backButtonClassName, dataTestId, imageUrl, closerIcon, onClose, view, scrollableParentRef, sticky, onBack, }) => {
24
25
  const [scrollTop, setScrollTop] = useState(0);
26
+ const [titleMargin, setTitleMargin] = useState({ left: 0, right: 0 });
25
27
  const bottomContentRef = useRef(null);
26
28
  const headerRef = useRef(null);
27
29
  const mainLinePaddingTopRef = useRef('0px');
30
+ const leftAddonsRef = useRef(null);
31
+ const rightAddonsRef = useRef(null);
28
32
  const compactTitle = view === 'mobile' && titleSize === 'compact';
29
33
  const hasLeftPart = Boolean(leftAddons || hasBackButton);
30
34
  const hasRightPart = Boolean(rightAddons || hasCloser);
@@ -37,6 +41,29 @@ const NavigationBar = ({ addonClassName, className, contentClassName, closerClas
37
41
  const showAnimatedContentOnTop = withAnimation && showContentOnBot && scrollTop > ADDONS_HEIGHT;
38
42
  const showAnimatedContentOnBot = withAnimation && showContentOnBot;
39
43
  const headerPaddingTop = mainLinePaddingTopRef.current;
44
+ useLayoutEffect_SAFE_FOR_SSR(() => {
45
+ if (align === 'center' && (showStaticContentOnTop || showAnimatedContentOnTop)) {
46
+ const leftAddonsWidth = leftAddonsRef.current?.offsetWidth || 0;
47
+ const rightAddonsWidth = rightAddonsRef.current?.offsetWidth || 0;
48
+ const marginSize = Math.abs(rightAddonsWidth - leftAddonsWidth);
49
+ const shouldAddLeftMargin = rightAddonsWidth - leftAddonsWidth > 0;
50
+ setTitleMargin((prev) => {
51
+ const newState = shouldAddLeftMargin
52
+ ? { left: marginSize, right: 0 }
53
+ : { left: 0, right: marginSize };
54
+ const isStateChanged = prev.left !== newState.left || prev.right !== newState.right;
55
+ return isStateChanged ? newState : prev;
56
+ });
57
+ }
58
+ }, [
59
+ align,
60
+ showStaticContentOnTop,
61
+ showAnimatedContentOnTop,
62
+ leftAddons,
63
+ rightAddons,
64
+ hasBackButton,
65
+ hasCloser,
66
+ ]);
40
67
  useEffect(() => {
41
68
  const parent = scrollableParentRef?.current;
42
69
  const handleScroll = (ev) => {
@@ -91,18 +118,31 @@ const NavigationBar = ({ addonClassName, className, contentClassName, closerClas
91
118
  }
92
119
  : null),
93
120
  } },
94
- hasLeftPart && (React.createElement("div", { className: styles.addonsWrapper },
121
+ hasLeftPart && (React.createElement("div", { className: styles.addonsWrapper, ref: leftAddonsRef },
95
122
  hasBackButton && renderBackButton(),
96
123
  leftAddons && (React.createElement("div", { className: cn(styles.addon, addonClassName) }, leftAddons)))),
97
- showStaticContentOnTop && renderContent(),
124
+ showStaticContentOnTop &&
125
+ renderContent({
126
+ ...(align === 'center'
127
+ ? {
128
+ style: {
129
+ marginLeft: titleMargin.left,
130
+ marginRight: titleMargin.right,
131
+ },
132
+ }
133
+ : null),
134
+ }),
98
135
  showAnimatedContentOnTop &&
99
136
  renderContent({
100
137
  extraClassName: styles.withBothAddons,
101
138
  style: {
102
139
  opacity: Math.min(1, (scrollTop - ADDONS_HEIGHT) / ADDONS_HEIGHT),
140
+ ...(align === 'center'
141
+ ? { marginLeft: titleMargin.left, marginRight: titleMargin.right }
142
+ : null),
103
143
  },
104
144
  }),
105
- hasRightPart && (React.createElement("div", { className: cn(styles.addonsWrapper, styles.rightAddons) },
145
+ hasRightPart && (React.createElement("div", { className: cn(styles.addonsWrapper, styles.rightAddons), ref: rightAddonsRef },
106
146
  rightAddons && (React.createElement("div", { className: cn(styles.addon, addonClassName) }, rightAddons)),
107
147
  hasCloser && renderCloser()))),
108
148
  showAnimatedContentOnBot &&
@@ -5,7 +5,7 @@ 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-bar__component_1ryml","mobileComponent":"navigation-bar__mobileComponent_1ryml","flex":"navigation-bar__flex_1ryml","iconWrapper":"navigation-bar__iconWrapper_1ryml","text":"navigation-bar__text_1ryml","mobileWrapper":"navigation-bar__mobileWrapper_1ryml"};
8
+ const styles = {"component":"navigation-bar__component_65af1","mobileComponent":"navigation-bar__mobileComponent_65af1","flex":"navigation-bar__flex_65af1","iconWrapper":"navigation-bar__iconWrapper_65af1","text":"navigation-bar__text_65af1","mobileWrapper":"navigation-bar__mobileWrapper_65af1"};
9
9
  require('./index.css')
10
10
 
11
11
  const BackArrowAddon = ({ text = 'Назад', onClick, className, textOpacity = 1, view, ...htmlAttributes }) => {
@@ -1,13 +1,13 @@
1
- /* hash: 1dgzi */
1
+ /* hash: 1iw35 */
2
2
  :root {
3
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);
4
+ --color-light-graphic-primary: #0e0e0e;
5
+ --color-light-graphic-secondary: #86868a;
6
+ --color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
7
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 {
8
+ --color-light-graphic-primary-tint-20: rgb(62, 62, 62);
9
+ --color-light-graphic-primary-tint-30: rgb(86, 86, 86);
10
+ } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
11
11
  } :root {
12
12
  } :root {
13
13
 
@@ -24,46 +24,46 @@
24
24
  --gap-s: 12px;
25
25
  } :root {
26
26
  } :root {
27
- } .navigation-bar__component_1ryml {
27
+ } .navigation-bar__component_65af1 {
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-bar__component_1ryml svg > path {
33
+ } .navigation-bar__component_65af1 svg > path {
34
34
  transition: fill 0.2s ease;
35
35
  fill: var(--color-light-graphic-primary);
36
- } .navigation-bar__component_1ryml:hover svg > path {
36
+ } .navigation-bar__component_65af1:hover svg > path {
37
37
  fill: var(--color-light-graphic-primary-tint-20);
38
- } .navigation-bar__component_1ryml:active svg > path {
38
+ } .navigation-bar__component_65af1:active svg > path {
39
39
  fill: var(--color-light-graphic-primary-tint-30);
40
- } .navigation-bar__mobileComponent_1ryml {
40
+ } .navigation-bar__mobileComponent_65af1 {
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-bar__flex_1ryml {
46
+ } .navigation-bar__flex_65af1 {
47
47
  display: flex;
48
48
  align-items: center;
49
- } .navigation-bar__iconWrapper_1ryml {
49
+ } .navigation-bar__iconWrapper_65af1 {
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-bar__iconWrapper_1ryml + .navigation-bar__text_1ryml {
56
+ } .navigation-bar__iconWrapper_65af1 + .navigation-bar__text_65af1 {
57
57
  margin-right: var(--gap-s);
58
- } .navigation-bar__mobileWrapper_1ryml {
58
+ } .navigation-bar__mobileWrapper_65af1 {
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-bar__mobileWrapper_1ryml + .navigation-bar__text_1ryml {
65
+ } .navigation-bar__mobileWrapper_65af1 + .navigation-bar__text_65af1 {
66
66
  margin: 0 var(--gap-s) 0 var(--gap-xs);
67
- } .navigation-bar__mobileWrapper_1ryml svg > path {
67
+ } .navigation-bar__mobileWrapper_65af1 svg > path {
68
68
  fill: var(--color-light-graphic-secondary);
69
69
  }
@@ -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-bar__closer_asogp","button":"navigation-bar__button_asogp","mobile":"navigation-bar__mobile_asogp","sticky":"navigation-bar__sticky_asogp"};
7
+ const styles = {"closer":"navigation-bar__closer_1wm0n","button":"navigation-bar__button_1wm0n","mobile":"navigation-bar__mobile_1wm0n","sticky":"navigation-bar__sticky_1wm0n"};
8
8
  require('./index.css')
9
9
 
10
10
  const Closer = ({ view, className, sticky, icon = view === 'desktop' ? CrossHeavyMIcon : CrossMIcon, dataTestId, onClose, ...restProps }) => {