@cleartrip/ct-design-header 1.2.0-SNAPSHOT-header-v0.5-login-test.0 → 1.2.0-SNAPSHOT-header-0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BusinessDropdown/index.d.ts.map +1 -1
- package/dist/Header.d.ts.map +1 -1
- package/dist/HeaderAnimatedMask /hooks.d.ts.map +1 -1
- package/dist/LobsHeader/index.d.ts.map +1 -1
- package/dist/RewardsSection/LoyaltyChips.d.ts.map +1 -1
- package/dist/RewardsSection/index.d.ts.map +1 -1
- package/dist/UserAccount/UserAccountDropdown.d.ts.map +1 -1
- package/dist/UserAccount/index.d.ts.map +1 -1
- package/dist/constants.d.ts +22 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/ct-design-header.browser.cjs.js +1 -1
- package/dist/ct-design-header.browser.cjs.js.map +1 -1
- package/dist/ct-design-header.browser.esm.js +1 -1
- package/dist/ct-design-header.browser.esm.js.map +1 -1
- package/dist/ct-design-header.cjs.js +261 -142
- package/dist/ct-design-header.cjs.js.map +1 -1
- package/dist/ct-design-header.esm.js +263 -144
- package/dist/ct-design-header.esm.js.map +1 -1
- package/dist/ct-design-header.umd.js +261 -142
- package/dist/ct-design-header.umd.js.map +1 -1
- package/package.json +9 -9
|
@@ -84,23 +84,23 @@
|
|
|
84
84
|
};
|
|
85
85
|
var LOB_DATA = [{
|
|
86
86
|
title: LOBS.FLIGHTS,
|
|
87
|
-
image: 'https://rukmini-ct.flixcart.com/f_auto,
|
|
87
|
+
image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true',
|
|
88
88
|
link: '/flights'
|
|
89
89
|
}, {
|
|
90
90
|
title: LOBS.HOTELS,
|
|
91
|
-
image: 'https://rukmini-ct.flixcart.com/f_auto,
|
|
91
|
+
image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true',
|
|
92
92
|
link: '/hotels'
|
|
93
93
|
}, {
|
|
94
94
|
title: LOBS.BUSES,
|
|
95
|
-
image: 'https://rukmini-ct.flixcart.com/f_auto,
|
|
95
|
+
image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true',
|
|
96
96
|
link: '/bus'
|
|
97
97
|
}, {
|
|
98
98
|
title: LOBS.TRAIN,
|
|
99
|
-
image: 'https://rukmini-ct.flixcart.com/f_auto,
|
|
99
|
+
image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true',
|
|
100
100
|
link: '/pages/trains/appOnly'
|
|
101
101
|
}, {
|
|
102
102
|
title: LOBS.PACKAGES,
|
|
103
|
-
image: 'https://rukmini-ct.flixcart.com/f_auto,
|
|
103
|
+
image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true',
|
|
104
104
|
link: '/holidays'
|
|
105
105
|
}];
|
|
106
106
|
var bdConfig = [{
|
|
@@ -129,13 +129,32 @@
|
|
|
129
129
|
exports.RAVEN_PAGE_NAMES = void 0;
|
|
130
130
|
(function (RAVEN_PAGE_NAMES) {
|
|
131
131
|
RAVEN_PAGE_NAMES["UNIFIED_HOME"] = "unified_homepage";
|
|
132
|
-
RAVEN_PAGE_NAMES["HOTELS_HOME"] = "
|
|
133
|
-
RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "
|
|
132
|
+
RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotel_home";
|
|
133
|
+
RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_home";
|
|
134
134
|
})(exports.RAVEN_PAGE_NAMES || (exports.RAVEN_PAGE_NAMES = {}));
|
|
135
135
|
var RAVEN_PLATFORMS;
|
|
136
136
|
(function (RAVEN_PLATFORMS) {
|
|
137
137
|
RAVEN_PLATFORMS["DESKTOP"] = "desktop";
|
|
138
138
|
})(RAVEN_PLATFORMS || (RAVEN_PLATFORMS = {}));
|
|
139
|
+
var LOG_IN_TEXT = 'Log in';
|
|
140
|
+
var THEME_CONFIG = {
|
|
141
|
+
NOVAC: {
|
|
142
|
+
headerBackground: 'transparent',
|
|
143
|
+
hoverColor: '#FFB8A5',
|
|
144
|
+
logoFill: '#FFF',
|
|
145
|
+
fkcompanyColor: '#FFF',
|
|
146
|
+
typographyColor: '#FFF',
|
|
147
|
+
loginButtonColorVariant: ctDesignButton.ButtonColor.NEUTRAL
|
|
148
|
+
},
|
|
149
|
+
DEFAULT: {
|
|
150
|
+
headerBackground: '#F7FAFF',
|
|
151
|
+
hoverColor: '#FF4F17',
|
|
152
|
+
logoFill: '#FF4F17',
|
|
153
|
+
fkcompanyColor: '#1A1A1A',
|
|
154
|
+
typographyColor: '#1A1A1A',
|
|
155
|
+
loginButtonColorVariant: ctDesignButton.ButtonColor.PRIMARY
|
|
156
|
+
}
|
|
157
|
+
};
|
|
139
158
|
|
|
140
159
|
var HeaderContext = react.createContext(undefined);
|
|
141
160
|
var useHeaderContext = function () {
|
|
@@ -158,41 +177,46 @@
|
|
|
158
177
|
var LobsHeader = function () {
|
|
159
178
|
var selectedLOB = useHeaderContext().selectedLOB;
|
|
160
179
|
return jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
161
|
-
|
|
180
|
+
display: 'flex',
|
|
181
|
+
alignItems: 'center',
|
|
182
|
+
justifyContent: 'center',
|
|
183
|
+
padding: '16px',
|
|
184
|
+
height: '64',
|
|
185
|
+
background: '#F3F5FA',
|
|
186
|
+
top: '64px',
|
|
187
|
+
zIndex: 2,
|
|
162
188
|
css: {
|
|
163
|
-
gap: 40
|
|
164
|
-
height: 64,
|
|
165
|
-
background: ' #F3F5FA',
|
|
166
|
-
top: 64,
|
|
167
|
-
zIndex: 2
|
|
189
|
+
gap: 40
|
|
168
190
|
}
|
|
169
191
|
}, {
|
|
170
192
|
children: LOB_DATA.map(function (item, index) {
|
|
193
|
+
var title = item.title,
|
|
194
|
+
link = item.link,
|
|
195
|
+
image = item.image;
|
|
171
196
|
return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
172
|
-
|
|
197
|
+
display: 'flex',
|
|
198
|
+
alignItems: 'center',
|
|
199
|
+
cursor: 'pointer',
|
|
173
200
|
css: {
|
|
174
201
|
gap: 8,
|
|
175
|
-
background: selectedLOB ===
|
|
176
|
-
borderRadius: selectedLOB ===
|
|
177
|
-
padding: selectedLOB ===
|
|
202
|
+
background: selectedLOB === title ? '#FFFFFF' : 'transparent',
|
|
203
|
+
borderRadius: selectedLOB === title ? '40px' : '0',
|
|
204
|
+
padding: selectedLOB === title ? '8px 16px 8px 8px' : '0'
|
|
178
205
|
},
|
|
179
206
|
onClick: function () {
|
|
180
|
-
window.location.href =
|
|
207
|
+
window.location.href = link;
|
|
181
208
|
}
|
|
182
209
|
}, {
|
|
183
210
|
children: [jsxRuntime.jsx("img", {
|
|
184
|
-
src:
|
|
185
|
-
alt:
|
|
211
|
+
src: image,
|
|
212
|
+
alt: title,
|
|
186
213
|
width: 32,
|
|
187
214
|
height: 32
|
|
188
215
|
}), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
189
|
-
variant:
|
|
190
|
-
style: {
|
|
191
|
-
fontWeight: selectedLOB === item.title ? 600 : 500
|
|
192
|
-
},
|
|
216
|
+
variant: selectedLOB === title ? ctDesignTypography.TypographyVariant.HM3 : ctDesignTypography.TypographyVariant.B1,
|
|
193
217
|
isClickable: true
|
|
194
218
|
}, {
|
|
195
|
-
children:
|
|
219
|
+
children: title
|
|
196
220
|
}))]
|
|
197
221
|
}), index);
|
|
198
222
|
})
|
|
@@ -507,36 +531,34 @@
|
|
|
507
531
|
}, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
|
|
508
532
|
return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
509
533
|
ref: containerRef,
|
|
510
|
-
|
|
534
|
+
backgroundColor: '#fff',
|
|
535
|
+
top: '76px',
|
|
536
|
+
position: 'fixed',
|
|
537
|
+
left: "".concat(leftPosition, "px"),
|
|
538
|
+
borderRadius: 24,
|
|
539
|
+
boxShadow: '0px 8px 24px 0px rgba(26, 26, 26, 0.10)',
|
|
540
|
+
width: 'fit-content',
|
|
541
|
+
zIndex: 1002,
|
|
511
542
|
css: {
|
|
512
|
-
|
|
513
|
-
position: 'fixed',
|
|
514
|
-
left: "".concat(leftPosition, "px"),
|
|
515
|
-
borderRadius: 24,
|
|
516
|
-
boxShadow: '0px 8px 24px 0px rgba(26, 26, 26, 0.10)',
|
|
517
|
-
width: 'fit-content',
|
|
518
|
-
zIndex: 1002,
|
|
543
|
+
overflow: 'hidden',
|
|
519
544
|
opacity: 0
|
|
520
545
|
}
|
|
521
546
|
}, {
|
|
522
547
|
children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
523
|
-
|
|
548
|
+
padding: '20px 24px 20px 24px',
|
|
524
549
|
backgroundColor: '#FFF1EC'
|
|
525
550
|
}, {
|
|
526
551
|
children: jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
527
|
-
variant: 'HM2'
|
|
528
|
-
style: {
|
|
529
|
-
lineHeight: '24px'
|
|
530
|
-
}
|
|
552
|
+
variant: 'HM2'
|
|
531
553
|
}, {
|
|
532
554
|
children: BUSINESS_DROPDOWN_HEADING
|
|
533
555
|
}))
|
|
534
556
|
})), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
557
|
+
display: 'flex',
|
|
558
|
+
flexDirection: 'row',
|
|
559
|
+
padding: '24px',
|
|
560
|
+
columnGap: '48px',
|
|
561
|
+
width: 'fit-content'
|
|
540
562
|
}, {
|
|
541
563
|
children: bdConfig.map(function (_a) {
|
|
542
564
|
var title = _a.title,
|
|
@@ -545,19 +567,18 @@
|
|
|
545
567
|
link = _a.link,
|
|
546
568
|
ravenActionName = _a.ravenActionName;
|
|
547
569
|
return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
570
|
+
cursor: 'pointer',
|
|
571
|
+
width: '200px',
|
|
572
|
+
className: 'bd-hover-container',
|
|
551
573
|
onClick: function () {
|
|
552
574
|
return handleBusinessDropdownClick(link, title, ravenActionName);
|
|
553
|
-
}
|
|
554
|
-
className: 'bd-hover-container c-pointer'
|
|
575
|
+
}
|
|
555
576
|
}, {
|
|
556
577
|
children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
578
|
+
display: 'flex',
|
|
579
|
+
flexDirection: 'row',
|
|
580
|
+
alignItems: 'center',
|
|
581
|
+
columnGap: '8px'
|
|
561
582
|
}, {
|
|
562
583
|
children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
563
584
|
variant: 'HM2',
|
|
@@ -567,8 +588,8 @@
|
|
|
567
588
|
})), jsxRuntime.jsx(AnimatedArrow, {})]
|
|
568
589
|
})), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
569
590
|
variant: 'B3',
|
|
570
|
-
className: 'mt-1',
|
|
571
591
|
css: {
|
|
592
|
+
marginTop: '4px',
|
|
572
593
|
opacity: 0.75
|
|
573
594
|
}
|
|
574
595
|
}, {
|
|
@@ -576,7 +597,9 @@
|
|
|
576
597
|
})), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
577
598
|
variant: 'P3',
|
|
578
599
|
color: 'subheading',
|
|
579
|
-
|
|
600
|
+
css: {
|
|
601
|
+
marginTop: '12px'
|
|
602
|
+
}
|
|
580
603
|
}, {
|
|
581
604
|
children: details
|
|
582
605
|
}))]
|
|
@@ -688,12 +711,19 @@
|
|
|
688
711
|
}
|
|
689
712
|
}, [handleChipClick, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
|
|
690
713
|
return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
691
|
-
|
|
692
|
-
|
|
714
|
+
display: 'flex',
|
|
715
|
+
position: 'relative',
|
|
716
|
+
alignItems: 'center',
|
|
717
|
+
justifyContent: 'center',
|
|
718
|
+
borderRadius: '8px',
|
|
719
|
+
cursor: 'pointer',
|
|
720
|
+
paddingLeft: '8px',
|
|
721
|
+
paddingRight: isHovered ? '4px' : '8px',
|
|
722
|
+
css: {
|
|
723
|
+
overflow: 'hidden',
|
|
693
724
|
height: 32,
|
|
694
725
|
paddingLeft: 8,
|
|
695
|
-
transition: 'padding-right 0.2s ease-in-out'
|
|
696
|
-
paddingRight: isHovered ? 4 : 8
|
|
726
|
+
transition: 'padding-right 0.2s ease-in-out'
|
|
697
727
|
},
|
|
698
728
|
onMouseEnter: function () {
|
|
699
729
|
return setIsHovered(true);
|
|
@@ -704,7 +734,7 @@
|
|
|
704
734
|
onClick: handleClick
|
|
705
735
|
}, {
|
|
706
736
|
children: [jsxRuntime.jsx(ctDesignContainer.Container, {
|
|
707
|
-
|
|
737
|
+
css: {
|
|
708
738
|
content: '""',
|
|
709
739
|
position: 'absolute',
|
|
710
740
|
inset: 0,
|
|
@@ -713,7 +743,7 @@
|
|
|
713
743
|
zIndex: -2
|
|
714
744
|
}
|
|
715
745
|
}), jsxRuntime.jsx(ctDesignContainer.Container, {
|
|
716
|
-
|
|
746
|
+
css: {
|
|
717
747
|
content: '""',
|
|
718
748
|
position: 'absolute',
|
|
719
749
|
inset: 0,
|
|
@@ -726,12 +756,16 @@
|
|
|
726
756
|
zIndex: -1
|
|
727
757
|
}
|
|
728
758
|
}), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
729
|
-
|
|
759
|
+
display: 'flex',
|
|
760
|
+
alignItems: 'center',
|
|
761
|
+
position: 'relative'
|
|
730
762
|
}, {
|
|
731
763
|
children: icon
|
|
732
764
|
})), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
733
|
-
|
|
734
|
-
|
|
765
|
+
display: 'flex',
|
|
766
|
+
alignItems: 'center',
|
|
767
|
+
css: {
|
|
768
|
+
overflow: 'hidden',
|
|
735
769
|
maxWidth: isHovered ? 16 : 0,
|
|
736
770
|
transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
|
|
737
771
|
opacity: isHovered ? 0.5 : 0
|
|
@@ -829,8 +863,12 @@
|
|
|
829
863
|
}
|
|
830
864
|
}, [handleChipClick, type, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
|
|
831
865
|
return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
832
|
-
|
|
833
|
-
|
|
866
|
+
display: 'flex',
|
|
867
|
+
alignItems: 'center',
|
|
868
|
+
justifyContent: 'center',
|
|
869
|
+
borderRadius: '8px',
|
|
870
|
+
cursor: 'pointer',
|
|
871
|
+
css: {
|
|
834
872
|
height: 32,
|
|
835
873
|
paddingLeft: 8,
|
|
836
874
|
paddingRight: isHovered ? 4 : 8,
|
|
@@ -846,18 +884,23 @@
|
|
|
846
884
|
onClick: handleDefaultClick
|
|
847
885
|
}, {
|
|
848
886
|
children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
849
|
-
|
|
887
|
+
display: 'flex',
|
|
888
|
+
alignItems: 'center',
|
|
889
|
+
css: {
|
|
890
|
+
gap: '4px'
|
|
891
|
+
}
|
|
850
892
|
}, {
|
|
851
893
|
children: [icon, jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
852
894
|
variant: 'B3',
|
|
853
|
-
className: 'value-text',
|
|
854
895
|
isClickable: true
|
|
855
896
|
}, {
|
|
856
897
|
children: value
|
|
857
898
|
}))]
|
|
858
899
|
})), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
859
|
-
|
|
860
|
-
|
|
900
|
+
display: 'flex',
|
|
901
|
+
alignItems: 'center',
|
|
902
|
+
css: {
|
|
903
|
+
overflow: 'hidden',
|
|
861
904
|
maxWidth: isHovered ? 16 : 0,
|
|
862
905
|
transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
|
|
863
906
|
opacity: isHovered ? 1 : 0
|
|
@@ -891,9 +934,12 @@
|
|
|
891
934
|
return null;
|
|
892
935
|
}
|
|
893
936
|
return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
937
|
+
display: 'flex',
|
|
938
|
+
padding: '0 16px 16px 16px',
|
|
939
|
+
justifyContent: 'flex-start',
|
|
940
|
+
css: {
|
|
941
|
+
alignSelf: 'stretch',
|
|
942
|
+
gap: '4px'
|
|
897
943
|
}
|
|
898
944
|
}, {
|
|
899
945
|
children: [loyaltyLoading ? jsxRuntime.jsx(ctDesignShimmer.Shimmer, {
|
|
@@ -971,7 +1017,7 @@
|
|
|
971
1017
|
ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(text), ravenPayload, ravenPushCallback, ravenPageName);
|
|
972
1018
|
window.location.href = redirectLink;
|
|
973
1019
|
}, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
|
|
974
|
-
|
|
1020
|
+
react.useCallback(function () {
|
|
975
1021
|
ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(SIGN_OUT_TEXT), ravenPayload, ravenPushCallback, ravenPageName);
|
|
976
1022
|
handleLogoutClick();
|
|
977
1023
|
}, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, handleLogoutClick]);
|
|
@@ -999,7 +1045,11 @@
|
|
|
999
1045
|
}));
|
|
1000
1046
|
};
|
|
1001
1047
|
return jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
1002
|
-
|
|
1048
|
+
display: 'flex',
|
|
1049
|
+
flexDirection: 'column',
|
|
1050
|
+
css: {
|
|
1051
|
+
gap: '4px'
|
|
1052
|
+
}
|
|
1003
1053
|
}, {
|
|
1004
1054
|
children: userGreeting ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1005
1055
|
children: [renderContent(userDetailsLoading, userGreeting, 'HM3', 'primary'), renderContent(userDetailsLoading, "".concat(LOGGEDIN_USER_TEXT, " ").concat(phoneNumber), 'P3', 'subheading')]
|
|
@@ -1011,28 +1061,33 @@
|
|
|
1011
1061
|
return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1012
1062
|
id: ACCOUNT_OPTIONS_CONTAINER_ID,
|
|
1013
1063
|
ref: containerRef,
|
|
1014
|
-
|
|
1064
|
+
display: 'flex',
|
|
1065
|
+
flexDirection: 'column',
|
|
1066
|
+
borderRadius: '16px',
|
|
1067
|
+
zIndex: 1002,
|
|
1068
|
+
top: '76px',
|
|
1069
|
+
position: 'fixed',
|
|
1015
1070
|
css: {
|
|
1016
|
-
zIndex: 1002,
|
|
1017
1071
|
opacity: 0,
|
|
1018
|
-
|
|
1019
|
-
position: 'fixed'
|
|
1072
|
+
overflow: 'hidden'
|
|
1020
1073
|
},
|
|
1021
1074
|
width: "".concat(ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px"),
|
|
1022
1075
|
background: '#FFF1EC'
|
|
1023
1076
|
}, {
|
|
1024
1077
|
children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
1025
|
-
|
|
1078
|
+
padding: '16px',
|
|
1026
1079
|
height: '76px'
|
|
1027
1080
|
}, {
|
|
1028
1081
|
children: renderUserData()
|
|
1029
1082
|
})), jsxRuntime.jsx(RewardsSection, {}), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1030
|
-
|
|
1083
|
+
display: 'flex',
|
|
1084
|
+
flexDirection: 'column',
|
|
1085
|
+
padding: '8px',
|
|
1031
1086
|
backgroundColor: 'white',
|
|
1032
|
-
|
|
1087
|
+
rowGap: '8px',
|
|
1088
|
+
css: {
|
|
1033
1089
|
borderBottomLeftRadius: 12,
|
|
1034
|
-
borderBottomRightRadius: 12
|
|
1035
|
-
rowGap: 8
|
|
1090
|
+
borderBottomRightRadius: 12
|
|
1036
1091
|
}
|
|
1037
1092
|
}, {
|
|
1038
1093
|
children: [ACCOUNT_OPTIONS_POPUP_CONFIG.map(function (_a) {
|
|
@@ -1040,39 +1095,55 @@
|
|
|
1040
1095
|
icon = _a.icon,
|
|
1041
1096
|
redirectionLink = _a.redirectionLink;
|
|
1042
1097
|
return jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
1043
|
-
className: '
|
|
1098
|
+
className: 'hoverable-container',
|
|
1099
|
+
padding: '8px',
|
|
1100
|
+
borderRadius: '8px',
|
|
1101
|
+
cursor: 'pointer',
|
|
1044
1102
|
onClick: function () {
|
|
1045
1103
|
return handleAccountOptionsClick(text, redirectionLink);
|
|
1046
1104
|
}
|
|
1047
1105
|
}, {
|
|
1048
1106
|
children: jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1049
|
-
|
|
1050
|
-
|
|
1107
|
+
display: 'flex',
|
|
1108
|
+
cursor: 'pointer',
|
|
1109
|
+
css: {
|
|
1051
1110
|
columnGap: '8px'
|
|
1052
1111
|
}
|
|
1053
1112
|
}, {
|
|
1054
1113
|
children: [icon, jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
1055
1114
|
variant: 'P1',
|
|
1056
|
-
|
|
1115
|
+
css: {
|
|
1116
|
+
display: 'flex',
|
|
1117
|
+
alignItems: 'center',
|
|
1118
|
+
cursor: 'pointer'
|
|
1119
|
+
}
|
|
1057
1120
|
}, {
|
|
1058
1121
|
children: text
|
|
1059
1122
|
}))]
|
|
1060
1123
|
}))
|
|
1061
1124
|
}), "account-option-".concat(text));
|
|
1062
1125
|
}), jsxRuntime.jsx(ctDesignDivider.Divider, {
|
|
1063
|
-
|
|
1126
|
+
css: {
|
|
1064
1127
|
borderBottom: '1px dashed #E6E6E6'
|
|
1065
1128
|
}
|
|
1066
1129
|
}), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1067
|
-
className: '
|
|
1068
|
-
|
|
1130
|
+
className: 'logout-button',
|
|
1131
|
+
display: 'flex',
|
|
1132
|
+
padding: '8px',
|
|
1133
|
+
borderRadius: '8px',
|
|
1134
|
+
cursor: 'pointer',
|
|
1135
|
+
onClick: handleLogoutClick
|
|
1069
1136
|
}, {
|
|
1070
1137
|
children: [jsxRuntime.jsx(ctDesignIcons.Signout, {
|
|
1071
1138
|
height: 24,
|
|
1072
1139
|
width: 24
|
|
1073
1140
|
}), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
1074
1141
|
variant: 'P1',
|
|
1075
|
-
|
|
1142
|
+
css: {
|
|
1143
|
+
display: 'flex',
|
|
1144
|
+
alignItems: 'center',
|
|
1145
|
+
cursor: 'pointer'
|
|
1146
|
+
},
|
|
1076
1147
|
color: 'warning'
|
|
1077
1148
|
}, {
|
|
1078
1149
|
children: SIGN_OUT_TEXT
|
|
@@ -1112,8 +1183,9 @@
|
|
|
1112
1183
|
return window.removeEventListener('scroll', handleScroll);
|
|
1113
1184
|
};
|
|
1114
1185
|
}, []);
|
|
1115
|
-
var
|
|
1116
|
-
var hoverColor =
|
|
1186
|
+
var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
|
|
1187
|
+
var hoverColor = theme.hoverColor,
|
|
1188
|
+
typographyColor = theme.typographyColor;
|
|
1117
1189
|
var triggerRavenEventOnHover = react.useCallback(function () {
|
|
1118
1190
|
var _a;
|
|
1119
1191
|
var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
|
|
@@ -1127,8 +1199,13 @@
|
|
|
1127
1199
|
}, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
|
|
1128
1200
|
return jsxRuntime.jsxs(ctDesignContainer.Container, {
|
|
1129
1201
|
children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1130
|
-
|
|
1131
|
-
|
|
1202
|
+
display: 'flex',
|
|
1203
|
+
padding: '8px 12px',
|
|
1204
|
+
alignItems: 'center',
|
|
1205
|
+
borderRadius: '12px',
|
|
1206
|
+
height: '100%',
|
|
1207
|
+
cursor: 'pointer',
|
|
1208
|
+
css: {
|
|
1132
1209
|
columnGap: 8,
|
|
1133
1210
|
height: 64
|
|
1134
1211
|
},
|
|
@@ -1140,20 +1217,24 @@
|
|
|
1140
1217
|
id: HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID
|
|
1141
1218
|
}, {
|
|
1142
1219
|
children: [jsxRuntime.jsx(ctDesignIcons.MyAccount, {
|
|
1143
|
-
color: isDropdownVisible ? hoverColor :
|
|
1220
|
+
color: isDropdownVisible ? hoverColor : typographyColor
|
|
1144
1221
|
}), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1145
|
-
|
|
1222
|
+
display: 'flex',
|
|
1223
|
+
flexDirection: 'row',
|
|
1224
|
+
alignItems: 'center'
|
|
1146
1225
|
}, {
|
|
1147
1226
|
children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
1148
1227
|
variant: 'B2',
|
|
1149
|
-
|
|
1150
|
-
|
|
1228
|
+
css: {
|
|
1229
|
+
cursor: 'pointer'
|
|
1230
|
+
},
|
|
1231
|
+
colorCode: isDropdownVisible ? hoverColor : typographyColor
|
|
1151
1232
|
}, {
|
|
1152
1233
|
children: MY_ACCOUNT_TEXT
|
|
1153
1234
|
})), jsxRuntime.jsx(ctDesignIcons.ChevronDown, {
|
|
1154
1235
|
width: 20,
|
|
1155
1236
|
height: 20,
|
|
1156
|
-
fill: isDropdownVisible ? hoverColor :
|
|
1237
|
+
fill: isDropdownVisible ? hoverColor : typographyColor
|
|
1157
1238
|
})]
|
|
1158
1239
|
}))]
|
|
1159
1240
|
})), jsxRuntime.jsx(HeaderAnimatedMask, __assign({
|
|
@@ -1204,9 +1285,13 @@
|
|
|
1204
1285
|
return window.removeEventListener('scroll', handleScroll);
|
|
1205
1286
|
};
|
|
1206
1287
|
}, []);
|
|
1207
|
-
var
|
|
1208
|
-
var headerBackground =
|
|
1209
|
-
|
|
1288
|
+
var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
|
|
1289
|
+
var headerBackground = theme.headerBackground,
|
|
1290
|
+
logoFill = theme.logoFill,
|
|
1291
|
+
loginButtonColorVariant = theme.loginButtonColorVariant,
|
|
1292
|
+
hoverColor = theme.hoverColor,
|
|
1293
|
+
fkcompanyColor = theme.fkcompanyColor,
|
|
1294
|
+
typographyColor = theme.typographyColor;
|
|
1210
1295
|
var _g = useHoverDropdown({
|
|
1211
1296
|
openDelay: 0
|
|
1212
1297
|
}),
|
|
@@ -1245,31 +1330,45 @@
|
|
|
1245
1330
|
}, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
|
|
1246
1331
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1247
1332
|
children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1333
|
+
display: 'flex',
|
|
1334
|
+
top: 0,
|
|
1335
|
+
position: 'sticky',
|
|
1336
|
+
width: '100%',
|
|
1337
|
+
alignItems: 'center',
|
|
1338
|
+
justifyContent: 'center',
|
|
1339
|
+
zIndex: 1000,
|
|
1340
|
+
height: '64px',
|
|
1341
|
+
background: headerBackground,
|
|
1342
|
+
css: {
|
|
1343
|
+
gap: '24px',
|
|
1344
|
+
flexShrink: 0,
|
|
1345
|
+
borderBottom: headerBackground === 'transparent' ? '' : '1px solid #E6E6E6',
|
|
1254
1346
|
transition: 'background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out'
|
|
1255
1347
|
}
|
|
1256
1348
|
}, {
|
|
1257
1349
|
children: jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1350
|
+
display: 'flex',
|
|
1351
|
+
alignItems: 'center',
|
|
1352
|
+
justifyContent: 'space-between',
|
|
1353
|
+
padding: '0 28px',
|
|
1354
|
+
flex: 1,
|
|
1355
|
+
css: {
|
|
1356
|
+
gap: '24px',
|
|
1357
|
+
maxWidth: 1440
|
|
1263
1358
|
}
|
|
1264
1359
|
}, {
|
|
1265
1360
|
children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1266
|
-
|
|
1361
|
+
display: 'flex',
|
|
1362
|
+
flexDirection: 'row',
|
|
1363
|
+
alignItems: 'center',
|
|
1364
|
+
justifyContent: 'center',
|
|
1365
|
+
cursor: 'pointer',
|
|
1267
1366
|
onClick: handleHomeClick
|
|
1268
1367
|
}, {
|
|
1269
1368
|
children: [jsxRuntime.jsx(ctDesignIcons.CTLogo, {
|
|
1270
|
-
fillColor:
|
|
1369
|
+
fillColor: logoFill
|
|
1271
1370
|
}), jsxRuntime.jsx(ctDesignDivider.Divider, {
|
|
1272
|
-
|
|
1371
|
+
css: {
|
|
1273
1372
|
width: 12,
|
|
1274
1373
|
marginLeft: 2,
|
|
1275
1374
|
marginRight: 2,
|
|
@@ -1277,15 +1376,27 @@
|
|
|
1277
1376
|
borderBottom: '1px solid #e0e0e0'
|
|
1278
1377
|
}
|
|
1279
1378
|
}), jsxRuntime.jsx(ctDesignIcons.Fkcompany, {
|
|
1280
|
-
color:
|
|
1379
|
+
color: fkcompanyColor
|
|
1281
1380
|
})]
|
|
1282
1381
|
})), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1283
|
-
|
|
1382
|
+
display: 'flex',
|
|
1383
|
+
flexDirection: 'row',
|
|
1384
|
+
alignItems: 'center',
|
|
1385
|
+
justifyContent: 'center',
|
|
1386
|
+
columnGap: '24px'
|
|
1284
1387
|
}, {
|
|
1285
1388
|
children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
1286
|
-
|
|
1389
|
+
display: 'flex',
|
|
1390
|
+
flexDirection: 'row',
|
|
1391
|
+
alignItems: 'center',
|
|
1392
|
+
justifyContent: 'center',
|
|
1393
|
+
columnGap: '4px'
|
|
1287
1394
|
}, {
|
|
1288
1395
|
children: NAVBAR_OPTIONS.map(function (option, index) {
|
|
1396
|
+
var text = option.text,
|
|
1397
|
+
LeftIcon = option.lefticon,
|
|
1398
|
+
RightIcon = option.rightIcon,
|
|
1399
|
+
isHoverable = option.isHoverable;
|
|
1289
1400
|
var isHovered = hoveredElemIndex === index;
|
|
1290
1401
|
return jsxRuntime.jsxs(ctDesignContainer.Container, {
|
|
1291
1402
|
children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
@@ -1296,47 +1407,52 @@
|
|
|
1296
1407
|
}
|
|
1297
1408
|
},
|
|
1298
1409
|
onMouseLeave: handleOnMouseLeave,
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1410
|
+
display: 'flex',
|
|
1411
|
+
flexDirection: 'row',
|
|
1412
|
+
alignItems: 'center',
|
|
1413
|
+
padding: '8px 12px 8px 12px',
|
|
1414
|
+
cursor: 'pointer',
|
|
1415
|
+
position: 'relative',
|
|
1416
|
+
columnGap: 8,
|
|
1417
|
+
height: '64px',
|
|
1304
1418
|
onClick: function () {
|
|
1305
1419
|
return handleNavbarOptionsClick(option);
|
|
1306
1420
|
}
|
|
1307
1421
|
}, {
|
|
1308
|
-
children: [jsxRuntime.jsx(
|
|
1309
|
-
color: isHovered ? hoverColor :
|
|
1422
|
+
children: [jsxRuntime.jsx(LeftIcon, {
|
|
1423
|
+
color: isHovered ? hoverColor : typographyColor
|
|
1310
1424
|
}), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
|
|
1311
|
-
|
|
1425
|
+
display: 'flex',
|
|
1426
|
+
flexDirection: 'row',
|
|
1427
|
+
alignItems: 'center'
|
|
1312
1428
|
}, {
|
|
1313
1429
|
children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
1314
1430
|
variant: 'B2',
|
|
1315
|
-
colorCode: isHovered ? hoverColor :
|
|
1431
|
+
colorCode: isHovered ? hoverColor : typographyColor,
|
|
1316
1432
|
isClickable: true
|
|
1317
1433
|
}, {
|
|
1318
|
-
children:
|
|
1319
|
-
})),
|
|
1434
|
+
children: text
|
|
1435
|
+
})), RightIcon && jsxRuntime.jsx(RightIcon, {
|
|
1320
1436
|
width: 20,
|
|
1321
1437
|
height: 20,
|
|
1322
|
-
fill: isHovered ? hoverColor :
|
|
1438
|
+
fill: isHovered ? hoverColor : typographyColor
|
|
1323
1439
|
})]
|
|
1324
1440
|
}))]
|
|
1325
1441
|
}), "nav-option-".concat(index)), jsxRuntime.jsx(HeaderAnimatedMask, __assign({
|
|
1326
|
-
show: hoveredElemIndex === index &&
|
|
1442
|
+
show: hoveredElemIndex === index && isHoverable && isDropdownVisible,
|
|
1327
1443
|
marginTop: '64px',
|
|
1328
1444
|
handleDropdownMouseEnter: handleDropdownMouseEnter,
|
|
1329
1445
|
handleDropdownMouseLeave: handleDropdownMouseLeave,
|
|
1330
1446
|
onMaskClick: handleDropdownMouseLeave
|
|
1331
1447
|
}, {
|
|
1332
1448
|
children: jsxRuntime.jsx(BusinessDropdownContent, {
|
|
1333
|
-
isOpen: hoveredElemIndex === index &&
|
|
1449
|
+
isOpen: hoveredElemIndex === index && isHoverable && isDropdownVisible
|
|
1334
1450
|
})
|
|
1335
1451
|
}))]
|
|
1336
1452
|
});
|
|
1337
1453
|
})
|
|
1338
1454
|
})), isUserLoggedIn && jsxRuntime.jsx(ctDesignDivider.Divider, {
|
|
1339
|
-
|
|
1455
|
+
css: {
|
|
1340
1456
|
width: 12,
|
|
1341
1457
|
margin: '0 -18px',
|
|
1342
1458
|
transform: 'rotate(90deg)',
|
|
@@ -1344,25 +1460,28 @@
|
|
|
1344
1460
|
}
|
|
1345
1461
|
}), jsxRuntime.jsx(ctDesignContainer.Container, {
|
|
1346
1462
|
children: isUserLoggedIn ? jsxRuntime.jsx(ctDesignContainer.Container, __assign({
|
|
1347
|
-
|
|
1463
|
+
display: 'flex',
|
|
1464
|
+
flexDirection: 'row',
|
|
1465
|
+
alignItems: 'center'
|
|
1348
1466
|
}, {
|
|
1349
1467
|
children: jsxRuntime.jsx(UserAccount, {})
|
|
1350
1468
|
})) : jsxRuntime.jsx(ctDesignButton.Button, __assign({
|
|
1351
|
-
|
|
1469
|
+
variant: 'outline',
|
|
1470
|
+
color: loginButtonColorVariant,
|
|
1471
|
+
className: "".concat(headerBackground === 'transparent' ? 'novac-login-button' : 'login-button'),
|
|
1352
1472
|
onClick: onLoginButtonClick,
|
|
1353
|
-
|
|
1473
|
+
css: {
|
|
1354
1474
|
width: 153,
|
|
1355
|
-
height: 40
|
|
1356
|
-
border: effectiveNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
|
|
1475
|
+
height: 40
|
|
1357
1476
|
},
|
|
1358
1477
|
loading: false
|
|
1359
1478
|
}, {
|
|
1360
1479
|
children: jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
|
|
1361
1480
|
componentNode: 'span',
|
|
1362
1481
|
variant: 'L2',
|
|
1363
|
-
color:
|
|
1482
|
+
color: loginButtonColorVariant === ctDesignButton.ButtonColor.NEUTRAL ? 'neutral' : 'primary'
|
|
1364
1483
|
}, {
|
|
1365
|
-
children:
|
|
1484
|
+
children: LOG_IN_TEXT
|
|
1366
1485
|
}))
|
|
1367
1486
|
}))
|
|
1368
1487
|
})]
|