@servicetitan/navigation 11.0.0 → 11.1.1
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/dist/components/badge-tag.js +7 -2
- package/dist/components/badge-tag.js.map +1 -1
- package/dist/components/counter-tag.js +10 -2
- package/dist/components/counter-tag.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-content.js +44 -8
- package/dist/components/header-navigation/header-navigation-content.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-links.js +49 -13
- package/dist/components/header-navigation/header-navigation-links.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-stories.module.less.d.ts +3 -0
- package/dist/components/header-navigation/header-navigation.js +178 -46
- package/dist/components/header-navigation/header-navigation.js.map +1 -1
- package/dist/components/header-navigation/header-navigation.module.less.d.ts +22 -0
- package/dist/components/header-navigation/index.js +1 -0
- package/dist/components/header-navigation/index.js.map +1 -1
- package/dist/components/header-navigation/with-tooltip.js +7 -1
- package/dist/components/header-navigation/with-tooltip.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny-links.js +62 -15
- package/dist/components/left-navigation/header-navigation-tiny-links.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.js +27 -2
- package/dist/components/left-navigation/header-navigation-tiny.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.module.less.d.ts +15 -0
- package/dist/components/left-navigation/index.d.ts +1 -1
- package/dist/components/left-navigation/index.d.ts.map +1 -1
- package/dist/components/left-navigation/index.js +1 -1
- package/dist/components/left-navigation/index.js.map +1 -1
- package/dist/components/left-navigation/interface-internal.js +2 -1
- package/dist/components/left-navigation/interface-internal.js.map +1 -1
- package/dist/components/left-navigation/interface.js +2 -1
- package/dist/components/left-navigation/interface.js.map +1 -1
- package/dist/components/left-navigation/side-navigation-context.js +4 -3
- package/dist/components/left-navigation/side-navigation-context.js.map +1 -1
- package/dist/components/left-navigation/side-navigation-links-internal.js +76 -16
- package/dist/components/left-navigation/side-navigation-links-internal.js.map +1 -1
- package/dist/components/left-navigation/side-navigation-links.js +34 -13
- package/dist/components/left-navigation/side-navigation-links.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.js +314 -85
- package/dist/components/left-navigation/side-navigation.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.module.less.d.ts +48 -0
- package/dist/components/left-navigation/with-tooltip.js +12 -1
- package/dist/components/left-navigation/with-tooltip.js.map +1 -1
- package/dist/components/links.js +28 -7
- package/dist/components/links.js.map +1 -1
- package/dist/components/logo/logo-company-title.js +19 -3
- package/dist/components/logo/logo-company-title.js.map +1 -1
- package/dist/components/logo/logo-titan-text.js +50 -6
- package/dist/components/logo/logo-titan-text.js.map +1 -1
- package/dist/components/logo/logo-titan-text.module.less.d.ts +6 -0
- package/dist/components/logo/logo-titan.d.ts +1 -0
- package/dist/components/logo/logo-titan.d.ts.map +1 -1
- package/dist/components/logo/logo-titan.js +53 -8
- package/dist/components/logo/logo-titan.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.js +174 -33
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.module.less.d.ts +23 -0
- package/dist/components/profile-dropdown/profile-icon.js +49 -3
- package/dist/components/profile-dropdown/profile-icon.js.map +1 -1
- package/dist/components/titan-layout/index.d.ts +2 -2
- package/dist/components/titan-layout/index.d.ts.map +1 -1
- package/dist/components/titan-layout/index.js +1 -2
- package/dist/components/titan-layout/index.js.map +1 -1
- package/dist/components/titan-layout/interface-internal.js +2 -1
- package/dist/components/titan-layout/interface-internal.js.map +1 -1
- package/dist/components/titan-layout/interface.js +2 -1
- package/dist/components/titan-layout/interface.js.map +1 -1
- package/dist/components/titan-layout/layout-context.js +15 -6
- package/dist/components/titan-layout/layout-context.js.map +1 -1
- package/dist/components/titan-layout/layout-header-dark.d.ts +10 -0
- package/dist/components/titan-layout/layout-header-dark.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-header-dark.js +146 -0
- package/dist/components/titan-layout/layout-header-dark.js.map +1 -0
- package/dist/components/titan-layout/layout-header-links.js +61 -15
- package/dist/components/titan-layout/layout-header-links.js.map +1 -1
- package/dist/components/titan-layout/layout-header.d.ts +2 -6
- package/dist/components/titan-layout/layout-header.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-header.js +46 -2
- package/dist/components/titan-layout/layout-header.js.map +1 -1
- package/dist/components/titan-layout/layout-header.module.less +337 -83
- package/dist/components/titan-layout/layout-header.module.less.d.ts +35 -0
- package/dist/components/titan-layout/layout-logo.d.ts +5 -3
- package/dist/components/titan-layout/layout-logo.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-logo.js +47 -9
- package/dist/components/titan-layout/layout-logo.js.map +1 -1
- package/dist/components/titan-layout/layout-logo.stories.d.ts +15 -4
- package/dist/components/titan-layout/layout-logo.stories.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-profile.js +75 -23
- package/dist/components/titan-layout/layout-profile.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links-internal.js +162 -36
- package/dist/components/titan-layout/layout-sidebar-links-internal.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links.js +33 -13
- package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.js +198 -34
- package/dist/components/titan-layout/layout-sidebar.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.module.less +6 -2
- package/dist/components/titan-layout/layout-sidebar.module.less.d.ts +49 -0
- package/dist/components/titan-layout/notifications-context.js +20 -10
- package/dist/components/titan-layout/notifications-context.js.map +1 -1
- package/dist/components/titan-layout/titan-layout.d.ts +7 -8
- package/dist/components/titan-layout/titan-layout.d.ts.map +1 -1
- package/dist/components/titan-layout/titan-layout.js +271 -117
- package/dist/components/titan-layout/titan-layout.js.map +1 -1
- package/dist/components/titan-layout/titan-layout.module.less +7 -2
- package/dist/components/titan-layout/titan-layout.module.less.d.ts +17 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts +6 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -1
- package/dist/components/titan-layout/with-tooltip.d.ts +4 -1
- package/dist/components/titan-layout/with-tooltip.d.ts.map +1 -1
- package/dist/components/titan-layout/with-tooltip.js +13 -1
- package/dist/components/titan-layout/with-tooltip.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/test/data-stories.module.less.d.ts +3 -0
- package/dist/test/data.js +223 -90
- package/dist/test/data.js.map +1 -1
- package/dist/utils/counter-tag.js +2 -1
- package/dist/utils/counter-tag.js.map +1 -1
- package/dist/utils/navigation-context.js +12 -6
- package/dist/utils/navigation-context.js.map +1 -1
- package/dist/utils/navigation-legacy.js +2 -1
- package/dist/utils/navigation-legacy.js.map +1 -1
- package/dist/utils/navigation.js +2 -1
- package/dist/utils/navigation.js.map +1 -1
- package/dist/utils/side-nav.js +9 -6
- package/dist/utils/side-nav.js.map +1 -1
- package/dist/utils/use-breakpoint.js +11 -8
- package/dist/utils/use-breakpoint.js.map +1 -1
- package/package.json +4 -4
- package/src/components/left-navigation/index.ts +1 -1
- package/src/components/logo/logo-titan.tsx +3 -1
- package/src/components/profile-dropdown/profile-dropdown.tsx +8 -4
- package/src/components/titan-layout/index.ts +2 -2
- package/src/components/titan-layout/layout-header-dark.tsx +186 -0
- package/src/components/titan-layout/layout-header-links.tsx +1 -1
- package/src/components/titan-layout/layout-header.module.less +337 -83
- package/src/components/titan-layout/layout-header.module.less.d.ts +19 -2
- package/src/components/titan-layout/layout-header.tsx +13 -16
- package/src/components/titan-layout/layout-logo.stories.tsx +103 -15
- package/src/components/titan-layout/layout-logo.tsx +33 -36
- package/src/components/titan-layout/layout-profile.stories.tsx +1 -1
- package/src/components/titan-layout/layout-sidebar.module.less +6 -2
- package/src/components/titan-layout/layout-sidebar.tsx +1 -1
- package/src/components/titan-layout/titan-layout.module.less +7 -2
- package/src/components/titan-layout/titan-layout.module.less.d.ts +2 -1
- package/src/components/titan-layout/titan-layout.stories.tsx +80 -23
- package/src/components/titan-layout/titan-layout.tsx +96 -85
- package/src/components/titan-layout/with-tooltip.tsx +5 -2
- package/src/index.ts +4 -5
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js +0 -13
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js.map +0 -1
- package/dist/components/header-navigation/header-navigation-extra.stories.js +0 -29
- package/dist/components/header-navigation/header-navigation-extra.stories.js.map +0 -1
- package/dist/components/header-navigation/header-navigation-stacked.stories.js +0 -50
- package/dist/components/header-navigation/header-navigation-stacked.stories.js.map +0 -1
- package/dist/components/header-navigation/header-navigation.stories.js +0 -54
- package/dist/components/header-navigation/header-navigation.stories.js.map +0 -1
- package/dist/components/layout.stories.js +0 -29
- package/dist/components/layout.stories.js.map +0 -1
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js +0 -13
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js.map +0 -1
- package/dist/components/left-navigation/header-navigation-tiny.stories.js +0 -30
- package/dist/components/left-navigation/header-navigation-tiny.stories.js.map +0 -1
- package/dist/components/left-navigation/side-navigation.stories.js +0 -115
- package/dist/components/left-navigation/side-navigation.stories.js.map +0 -1
- package/dist/components/logo/logo.stories.js +0 -20
- package/dist/components/logo/logo.stories.js.map +0 -1
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js +0 -13
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js.map +0 -1
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js +0 -13
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js.map +0 -1
- package/dist/components/profile-dropdown/profile-dropdown.stories.js +0 -51
- package/dist/components/profile-dropdown/profile-dropdown.stories.js.map +0 -1
- package/dist/components/titan-layout/layout-logo.stories.js +0 -17
- package/dist/components/titan-layout/layout-logo.stories.js.map +0 -1
- package/dist/components/titan-layout/layout-profile.stories.js +0 -13
- package/dist/components/titan-layout/layout-profile.stories.js.map +0 -1
- package/dist/components/titan-layout/titan-layout.stories.js +0 -83
- package/dist/components/titan-layout/titan-layout.stories.js.map +0 -1
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
/* stylelint-disable no-descending-specificity */
|
|
2
|
+
/* stylelint-disable no-duplicate-selectors */
|
|
2
3
|
@import (reference) '@servicetitan/tokens/core/tokens.less';
|
|
3
4
|
|
|
4
5
|
@size-links-tiny: 24px;
|
|
6
|
+
@bg-light: @color-white;
|
|
7
|
+
@bg-dark: @color-neutral-300;
|
|
8
|
+
|
|
9
|
+
@c-light: @color-black;
|
|
10
|
+
@c-dark: @color-white;
|
|
5
11
|
|
|
6
12
|
.header {
|
|
7
13
|
--nav-top-content-height: 32px;
|
|
14
|
+
|
|
15
|
+
height: var(--nav-offset-top);
|
|
8
16
|
display: flex;
|
|
9
17
|
justify-content: space-between;
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
color: @color-black;
|
|
19
|
+
color: var(--nav-top-text-color);
|
|
13
20
|
box-sizing: border-box;
|
|
14
|
-
outline: 1px solid @color-neutral-60;
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
&.header-light {
|
|
23
|
+
background-color: @bg-light;
|
|
24
|
+
outline: 1px solid @color-neutral-60;
|
|
25
|
+
|
|
26
|
+
--nav-top-text-color: @c-light;
|
|
18
27
|
}
|
|
19
28
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
&.header-dark {
|
|
30
|
+
background-color: @bg-dark;
|
|
31
|
+
|
|
32
|
+
--nav-top-text-color: @c-dark;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
& > * {
|
|
36
|
+
overflow-y: hidden;
|
|
23
37
|
}
|
|
24
38
|
|
|
25
39
|
.he-top-center {
|
|
@@ -28,7 +42,7 @@
|
|
|
28
42
|
|
|
29
43
|
.he-top-right {
|
|
30
44
|
& > * {
|
|
31
|
-
color:
|
|
45
|
+
color: var(--nav-top-text-color);
|
|
32
46
|
}
|
|
33
47
|
|
|
34
48
|
.he-top-right-text {
|
|
@@ -48,58 +62,11 @@
|
|
|
48
62
|
height: 32px;
|
|
49
63
|
font-size: @size-links-tiny;
|
|
50
64
|
}
|
|
51
|
-
|
|
52
|
-
.navigation-link {
|
|
53
|
-
border-radius: 12px;
|
|
54
|
-
font-size: @size-links-tiny;
|
|
55
|
-
color: inherit;
|
|
56
|
-
|
|
57
|
-
&.navigation-item-active:not(.navigation-item-overflow) {
|
|
58
|
-
background-color: @color-blue-100 !important;
|
|
59
|
-
color: @color-blue-500 !important;
|
|
60
|
-
}
|
|
61
|
-
&:hover:not(.navigation-item-active):not(.navigation-item-overflow) {
|
|
62
|
-
background-color: rgba(0, 0, 0, 0.12) !important;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&.navigation-item-icon-state.navigation-item-active {
|
|
66
|
-
.navigation-icon[data-anv][data-anv]:not(.navigation-icon-active) {
|
|
67
|
-
display: none;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.navigation-icon.navigation-icon-active[data-anv][data-anv] {
|
|
71
|
-
display: block;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.navigation-icon[data-anv][data-anv] {
|
|
77
|
-
display: inline-block;
|
|
78
|
-
color: inherit;
|
|
79
|
-
height: 24px;
|
|
80
|
-
width: 24px;
|
|
81
|
-
|
|
82
|
-
> svg {
|
|
83
|
-
height: @size-links-tiny;
|
|
84
|
-
width: @size-links-tiny;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&.navigation-icon-active {
|
|
88
|
-
display: none;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
65
|
}
|
|
92
66
|
|
|
93
67
|
.header-mobile {
|
|
94
|
-
padding: @spacing-2 @spacing-0;
|
|
95
|
-
height: var(--nav-offset-top);
|
|
96
|
-
|
|
97
68
|
--nav-top-content-height: 40px;
|
|
98
69
|
|
|
99
|
-
.navigation-link {
|
|
100
|
-
padding: 10px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
70
|
.he-top-center {
|
|
104
71
|
max-width: unset;
|
|
105
72
|
flex: 1;
|
|
@@ -107,31 +74,26 @@
|
|
|
107
74
|
margin-right: @spacing-3;
|
|
108
75
|
}
|
|
109
76
|
|
|
110
|
-
.he-top-
|
|
111
|
-
margin-
|
|
77
|
+
.he-top-right {
|
|
78
|
+
margin-right: @spacing-half;
|
|
112
79
|
}
|
|
113
80
|
|
|
81
|
+
.he-top-center,
|
|
114
82
|
.he-top-right {
|
|
115
|
-
margin-
|
|
83
|
+
margin-top: @spacing-2;
|
|
84
|
+
margin-bottom: @spacing-2;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.burger {
|
|
88
|
+
padding-top: @spacing-2;
|
|
89
|
+
padding-right: @spacing-half;
|
|
90
|
+
padding-bottom: @spacing-2;
|
|
91
|
+
padding-left: @spacing-0;
|
|
116
92
|
}
|
|
117
93
|
}
|
|
118
94
|
|
|
119
95
|
// desktop
|
|
120
96
|
.header-desktop {
|
|
121
|
-
height: var(--nav-offset-top);
|
|
122
|
-
.navigation-link {
|
|
123
|
-
margin: 6px 2px;
|
|
124
|
-
padding: 6px 6px;
|
|
125
|
-
|
|
126
|
-
.navigation-item-counter {
|
|
127
|
-
min-width: 12px !important;
|
|
128
|
-
height: 12px !important;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.he-top-left {
|
|
133
|
-
padding-left: @spacing-1;
|
|
134
|
-
}
|
|
135
97
|
.he-top-center {
|
|
136
98
|
flex: 1;
|
|
137
99
|
margin-left: @spacing-2;
|
|
@@ -140,14 +102,54 @@
|
|
|
140
102
|
}
|
|
141
103
|
}
|
|
142
104
|
|
|
105
|
+
// desktop stacked header
|
|
106
|
+
.header-stacked {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
|
|
110
|
+
.header-desktop {
|
|
111
|
+
height: 44px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.header-stacked-nav {
|
|
115
|
+
height: 36px;
|
|
116
|
+
background-color: @bg-dark;
|
|
117
|
+
border-top: 1px solid @color-neutral-200;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
.header-navigation-wrapper {
|
|
122
|
+
min-width: 0;
|
|
123
|
+
overflow-x: auto;
|
|
124
|
+
overflow-y: hidden;
|
|
125
|
+
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
align-items: center;
|
|
129
|
+
|
|
130
|
+
&.calculating {
|
|
131
|
+
.header-navigation {
|
|
132
|
+
opacity: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&.minimized {
|
|
137
|
+
display: flex;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.header-navigation {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
143
145
|
// desktop wide
|
|
144
146
|
@media only screen and (min-width: 1200px) {
|
|
145
|
-
.header-desktop {
|
|
147
|
+
.header-desktop:not(.header-desktop-nav) {
|
|
146
148
|
display: grid;
|
|
147
149
|
grid-template-columns: repeat(3, 1fr);
|
|
148
150
|
grid-template-rows: 48px;
|
|
149
151
|
|
|
150
|
-
.
|
|
152
|
+
.logo,
|
|
151
153
|
.he-top-center,
|
|
152
154
|
.he-top-right {
|
|
153
155
|
grid-column: span 1;
|
|
@@ -157,16 +159,124 @@
|
|
|
157
159
|
max-width: unset;
|
|
158
160
|
}
|
|
159
161
|
}
|
|
162
|
+
|
|
163
|
+
.header-desktop-nav {
|
|
164
|
+
.he-top-center {
|
|
165
|
+
max-width: unset;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
160
168
|
}
|
|
161
169
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
color:
|
|
165
|
-
|
|
170
|
+
//!!!!!!!!!!!!!!! logo styles !!!!!!!!!!!!!!!//
|
|
171
|
+
.logo {
|
|
172
|
+
color: var(--nav-top-text-color);
|
|
173
|
+
height: 100%;
|
|
174
|
+
|
|
166
175
|
display: flex;
|
|
167
176
|
align-items: center;
|
|
168
|
-
|
|
169
|
-
|
|
177
|
+
|
|
178
|
+
.logo-short-wrapper {
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
height: 100%;
|
|
182
|
+
padding-left: 10px;
|
|
183
|
+
padding-right: 10px;
|
|
184
|
+
|
|
185
|
+
svg,
|
|
186
|
+
.logo-link {
|
|
187
|
+
height: 28px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
svg {
|
|
191
|
+
max-height: 100%;
|
|
192
|
+
width: auto;
|
|
193
|
+
}
|
|
194
|
+
.logo-link {
|
|
195
|
+
color: inherit;
|
|
196
|
+
text-decoration: none;
|
|
197
|
+
outline: none;
|
|
198
|
+
|
|
199
|
+
&:active,
|
|
200
|
+
&:hover {
|
|
201
|
+
color: inherit;
|
|
202
|
+
text-decoration: none;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.header-desktop {
|
|
208
|
+
.logo-company-wrapper {
|
|
209
|
+
height: 41px;
|
|
210
|
+
padding-left: 6px;
|
|
211
|
+
|
|
212
|
+
.logo-link {
|
|
213
|
+
height: 41px;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
.logo-postfix {
|
|
217
|
+
margin-left: @spacing-1;
|
|
218
|
+
}
|
|
219
|
+
.logo-title {
|
|
220
|
+
margin-left: @spacing-0;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.header-dark.header-logo-custom {
|
|
225
|
+
.logo-short-wrapper,
|
|
226
|
+
.burger {
|
|
227
|
+
background-color: @color-white;
|
|
228
|
+
color: @c-light;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.burger .navigation-link {
|
|
232
|
+
color: inherit !important;
|
|
233
|
+
}
|
|
234
|
+
.logo-title {
|
|
235
|
+
margin-left: @spacing-1;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
//!!!!!!!!!!!!!!! nav links styles !!!!!!!!!!!!!!!//
|
|
240
|
+
.navigation-link {
|
|
241
|
+
&.navigation-item-icon-state.navigation-item-active {
|
|
242
|
+
.navigation-icon[data-anv][data-anv]:not(.navigation-icon-active) {
|
|
243
|
+
display: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.navigation-icon.navigation-icon-active[data-anv][data-anv] {
|
|
247
|
+
display: block;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.navigation-icon[data-anv][data-anv] {
|
|
252
|
+
display: inline-block;
|
|
253
|
+
color: inherit;
|
|
254
|
+
|
|
255
|
+
& > svg {
|
|
256
|
+
height: 1em;
|
|
257
|
+
width: 1em;
|
|
258
|
+
font-size: 1em;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
&.navigation-icon-active {
|
|
262
|
+
display: none;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// extra nav links styles
|
|
268
|
+
.header {
|
|
269
|
+
.navigation-link {
|
|
270
|
+
color: var(--nav-top-text-color);
|
|
271
|
+
position: relative;
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
flex-wrap: nowrap;
|
|
275
|
+
text-wrap: nowrap;
|
|
276
|
+
|
|
277
|
+
border-radius: 12px;
|
|
278
|
+
font-size: @size-links-tiny;
|
|
279
|
+
}
|
|
170
280
|
|
|
171
281
|
.navigation-item-counter {
|
|
172
282
|
color: @color-white;
|
|
@@ -177,6 +287,10 @@
|
|
|
177
287
|
position: absolute;
|
|
178
288
|
top: 4px;
|
|
179
289
|
right: -2px;
|
|
290
|
+
|
|
291
|
+
&.navigation-item-counter-long {
|
|
292
|
+
right: -8px;
|
|
293
|
+
}
|
|
180
294
|
}
|
|
181
295
|
|
|
182
296
|
.navigation-item-label {
|
|
@@ -187,7 +301,147 @@
|
|
|
187
301
|
margin-left: @spacing-half;
|
|
188
302
|
}
|
|
189
303
|
|
|
190
|
-
|
|
191
|
-
|
|
304
|
+
.navigation-icon[data-anv][data-anv] {
|
|
305
|
+
height: 24px;
|
|
306
|
+
width: 24px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
&.header-desktop {
|
|
310
|
+
.navigation-link {
|
|
311
|
+
margin: 6px 2px;
|
|
312
|
+
padding: 6px 6px;
|
|
313
|
+
|
|
314
|
+
.navigation-item-counter {
|
|
315
|
+
min-width: 12px !important;
|
|
316
|
+
height: 12px !important;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
&.header-mobile {
|
|
322
|
+
.navigation-link {
|
|
323
|
+
padding: 10px;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
&.header-light {
|
|
328
|
+
.navigation-link {
|
|
329
|
+
&.navigation-item-active {
|
|
330
|
+
background-color: @color-blue-100 !important;
|
|
331
|
+
color: @color-blue-500 !important;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&:hover:not(.navigation-item-active) {
|
|
335
|
+
background-color: rgba(0, 0, 0, 0.12) !important;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.header-dark .navigation-link,
|
|
342
|
+
.header-navigation > .navigation-link {
|
|
343
|
+
&.navigation-item-active {
|
|
344
|
+
color: @color-blue-200 !important;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
&:hover:not(.navigation-item-active) {
|
|
348
|
+
opacity: 0.7 !important;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// styles specific to main nav links
|
|
353
|
+
.header-navigation .navigation-link {
|
|
354
|
+
font-family: @base-font-family;
|
|
355
|
+
color: @c-dark;
|
|
356
|
+
position: relative;
|
|
357
|
+
display: flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
flex-wrap: nowrap;
|
|
360
|
+
text-wrap: nowrap;
|
|
361
|
+
padding: 7px 10px;
|
|
362
|
+
|
|
363
|
+
.navigation-item-counter {
|
|
364
|
+
color: @color-white;
|
|
365
|
+
font-weight: @font-weight-semibold;
|
|
366
|
+
font-size: 8px !important;
|
|
367
|
+
min-width: 16px !important;
|
|
368
|
+
height: 12px !important;
|
|
369
|
+
position: absolute;
|
|
370
|
+
top: 4px;
|
|
371
|
+
right: -2px;
|
|
372
|
+
|
|
373
|
+
&.navigation-item-counter-long {
|
|
374
|
+
right: -8px;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
.navigation-item-label {
|
|
378
|
+
font-family: @base-font-family;
|
|
379
|
+
font-size: @typescale-2;
|
|
380
|
+
margin-left: @spacing-half;
|
|
381
|
+
}
|
|
382
|
+
.navigation-icon[data-anv][data-anv] {
|
|
383
|
+
height: 20px;
|
|
384
|
+
width: 20px;
|
|
385
|
+
font-size: @typescale-4;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.header-navigation-overflow-trigger[data-anv][data-anv] {
|
|
390
|
+
padding: @spacing-half !important;
|
|
391
|
+
|
|
392
|
+
> span[data-anv][data-anv] {
|
|
393
|
+
color: @c-dark !important;
|
|
394
|
+
height: 24px !important;
|
|
395
|
+
width: 24px !important;
|
|
396
|
+
font-size: 24px !important;
|
|
397
|
+
|
|
398
|
+
display: flex !important;
|
|
399
|
+
align-items: center !important;
|
|
400
|
+
justify-content: center !important;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.header-navigation-overflow .navigation-link {
|
|
405
|
+
display: inline-flex;
|
|
406
|
+
color: @color-black;
|
|
407
|
+
padding: @spacing-1 12px;
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
|
|
410
|
+
font-family: @base-font-family;
|
|
411
|
+
font-size: @typescale-4;
|
|
412
|
+
position: relative;
|
|
413
|
+
align-items: center;
|
|
414
|
+
flex-wrap: nowrap;
|
|
415
|
+
text-wrap: nowrap;
|
|
416
|
+
|
|
417
|
+
margin-left: -0.5rem;
|
|
418
|
+
margin-right: -0.5rem;
|
|
419
|
+
|
|
420
|
+
&:hover {
|
|
421
|
+
background-color: @color-blue-500;
|
|
422
|
+
color: @color-white;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
&.navigation-item-active:not(:hover) {
|
|
426
|
+
color: @color-blue;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.navigation-item-label {
|
|
430
|
+
font-family: @base-font-family;
|
|
431
|
+
font-size: @typescale-2;
|
|
432
|
+
margin-left: @spacing-half;
|
|
433
|
+
}
|
|
434
|
+
.navigation-item-counter {
|
|
435
|
+
color: @color-white;
|
|
436
|
+
font-weight: @font-weight-semibold;
|
|
437
|
+
font-size: 8px !important;
|
|
438
|
+
|
|
439
|
+
min-width: 12px !important;
|
|
440
|
+
height: 12px !important;
|
|
441
|
+
margin-left: @spacing-half;
|
|
442
|
+
margin-top: -@spacing-1;
|
|
443
|
+
}
|
|
444
|
+
.navigation-icon[data-anv][data-anv] {
|
|
445
|
+
height: 20px;
|
|
192
446
|
}
|
|
193
447
|
}
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
export const __esModule: true;
|
|
2
|
+
export const burger: string;
|
|
3
|
+
export const calculating: string;
|
|
2
4
|
export const heTopCenter: string;
|
|
3
|
-
export const heTopLeft: string;
|
|
4
5
|
export const heTopRight: string;
|
|
5
6
|
export const heTopRightText: string;
|
|
6
7
|
export const header: string;
|
|
8
|
+
export const headerDark: string;
|
|
7
9
|
export const headerDesktop: string;
|
|
10
|
+
export const headerDesktopNav: string;
|
|
11
|
+
export const headerLight: string;
|
|
12
|
+
export const headerLogoCustom: string;
|
|
8
13
|
export const headerMobile: string;
|
|
14
|
+
export const headerNavigation: string;
|
|
15
|
+
export const headerNavigationOverflow: string;
|
|
16
|
+
export const headerNavigationOverflowTrigger: string;
|
|
17
|
+
export const headerNavigationWrapper: string;
|
|
18
|
+
export const headerStacked: string;
|
|
19
|
+
export const headerStackedNav: string;
|
|
20
|
+
export const logo: string;
|
|
21
|
+
export const logoCompanyWrapper: string;
|
|
22
|
+
export const logoLink: string;
|
|
23
|
+
export const logoPostfix: string;
|
|
24
|
+
export const logoShortWrapper: string;
|
|
25
|
+
export const logoTitle: string;
|
|
26
|
+
export const minimized: string;
|
|
9
27
|
export const navigationIcon: string;
|
|
10
28
|
export const navigationIconActive: string;
|
|
11
29
|
export const navigationItemActive: string;
|
|
@@ -13,6 +31,5 @@ export const navigationItemCounter: string;
|
|
|
13
31
|
export const navigationItemCounterLong: string;
|
|
14
32
|
export const navigationItemIconState: string;
|
|
15
33
|
export const navigationItemLabel: string;
|
|
16
|
-
export const navigationItemOverflow: string;
|
|
17
34
|
export const navigationLink: string;
|
|
18
35
|
|
|
@@ -4,13 +4,7 @@ import { ComponentPropsWithoutRef, FC, ReactElement, ReactNode } from 'react';
|
|
|
4
4
|
import { LayoutPlacementContext } from './layout-context';
|
|
5
5
|
import { LayoutHeaderNavigationTrigger } from './layout-header-links';
|
|
6
6
|
import * as Styles from './layout-header.module.less';
|
|
7
|
-
import { TitanLayoutLogoProps } from './layout-logo';
|
|
8
|
-
|
|
9
|
-
export interface TitanLayoutHeaderLogoProps {
|
|
10
|
-
title?: true | string;
|
|
11
|
-
mantleFill?: string;
|
|
12
|
-
to?: string;
|
|
13
|
-
}
|
|
7
|
+
import { LayoutLogo, TitanLayoutLogoProps, isLogoCustom } from './layout-logo';
|
|
14
8
|
|
|
15
9
|
export type LayoutHeaderProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
16
10
|
right?: ReactNode;
|
|
@@ -22,10 +16,11 @@ export type LayoutHeaderProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'
|
|
|
22
16
|
center?: ReactElement;
|
|
23
17
|
centerClassName?: string;
|
|
24
18
|
|
|
25
|
-
logo
|
|
19
|
+
logo?: TitanLayoutLogoProps;
|
|
26
20
|
profile?: ReactElement;
|
|
27
21
|
|
|
28
22
|
isMobile: boolean;
|
|
23
|
+
variant: 'light' | 'dark';
|
|
29
24
|
hasNotifications: boolean;
|
|
30
25
|
onBurgerClick?: (e: MouseEvent) => void;
|
|
31
26
|
};
|
|
@@ -41,6 +36,7 @@ export const LayoutHeader: FC<LayoutHeaderProps> = ({
|
|
|
41
36
|
hasNotifications,
|
|
42
37
|
logo,
|
|
43
38
|
profile,
|
|
39
|
+
variant,
|
|
44
40
|
onBurgerClick,
|
|
45
41
|
...rest
|
|
46
42
|
}) => {
|
|
@@ -49,26 +45,27 @@ export const LayoutHeader: FC<LayoutHeaderProps> = ({
|
|
|
49
45
|
<div
|
|
50
46
|
className={classNames(
|
|
51
47
|
Styles.header,
|
|
48
|
+
variant === 'light' ? Styles.headerLight : Styles.headerDark,
|
|
52
49
|
isMobile ? Styles.headerMobile : Styles.headerDesktop,
|
|
50
|
+
isLogoCustom(logo, isMobile) && Styles.headerLogoCustom,
|
|
53
51
|
className
|
|
54
52
|
)}
|
|
55
|
-
{...rest}
|
|
56
53
|
data-cy="header-navigation"
|
|
54
|
+
{...rest}
|
|
57
55
|
>
|
|
58
|
-
|
|
59
|
-
{
|
|
56
|
+
{isMobile && (
|
|
57
|
+
<div className={Styles.burger}>
|
|
60
58
|
<LayoutHeaderNavigationTrigger
|
|
61
59
|
id="burger"
|
|
62
60
|
title=""
|
|
63
61
|
icon={SvgBurgerMenu}
|
|
64
|
-
iconActive={
|
|
65
|
-
className="m-r-1"
|
|
62
|
+
iconActive={undefined}
|
|
66
63
|
onClick={onBurgerClick}
|
|
67
64
|
tag={{ value: hasNotifications }}
|
|
68
65
|
/>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
<LayoutLogo {...logo} />
|
|
72
69
|
<div
|
|
73
70
|
className={classNames(
|
|
74
71
|
Styles.heTopCenter,
|