@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.
@@ -2,8 +2,8 @@ import { __assign, __spreadArray } from 'tslib';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { createContext, useContext, useState, useRef, useEffect, useCallback, useMemo } from 'react';
4
4
  import { Container } from '@cleartrip/ct-design-container';
5
- import { Typography } from '@cleartrip/ct-design-typography';
6
- import { Button } from '@cleartrip/ct-design-button';
5
+ import { Typography, TypographyVariant } from '@cleartrip/ct-design-typography';
6
+ import { ButtonColor, Button } from '@cleartrip/ct-design-button';
7
7
  import { Divider } from '@cleartrip/ct-design-divider';
8
8
  import { Offers, BusinessBag, ChevronDown, MyTrips, SupportIcon, ArrowRight, MyAccount, SavedCard, Travellers, HiFive, Wallet, SettingsCog, PrivacyRights, HeaderChevronRight, FkVip, FkPremium, InsiderIcon, InsiderElite, CtLoyalty, Supercoin, Signout, CTLogo, Fkcompany } from '@cleartrip/ct-design-icons';
9
9
  import { Shimmer } from '@cleartrip/ct-design-shimmer';
@@ -48,23 +48,23 @@ var LOBS = {
48
48
  };
49
49
  var LOB_DATA = [{
50
50
  title: LOBS.FLIGHTS,
51
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/flight_uhp.png?cache=true',
51
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true',
52
52
  link: '/flights'
53
53
  }, {
54
54
  title: LOBS.HOTELS,
55
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/hotel_uhp.png?cache=true',
55
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true',
56
56
  link: '/hotels'
57
57
  }, {
58
58
  title: LOBS.BUSES,
59
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/bus_uhp.png?cache=true',
59
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true',
60
60
  link: '/bus'
61
61
  }, {
62
62
  title: LOBS.TRAIN,
63
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/train_uhp.png?cache=true',
63
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true',
64
64
  link: '/pages/trains/appOnly'
65
65
  }, {
66
66
  title: LOBS.PACKAGES,
67
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/holiday_uhp.png?cache=true',
67
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true',
68
68
  link: '/holidays'
69
69
  }];
70
70
  var bdConfig = [{
@@ -93,13 +93,32 @@ var BUSINESS_DROPDOWN_HEADING = 'Other business services';
93
93
  var RAVEN_PAGE_NAMES;
94
94
  (function (RAVEN_PAGE_NAMES) {
95
95
  RAVEN_PAGE_NAMES["UNIFIED_HOME"] = "unified_homepage";
96
- RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotels_homepage";
97
- RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_homepage";
96
+ RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotel_home";
97
+ RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_home";
98
98
  })(RAVEN_PAGE_NAMES || (RAVEN_PAGE_NAMES = {}));
99
99
  var RAVEN_PLATFORMS;
100
100
  (function (RAVEN_PLATFORMS) {
101
101
  RAVEN_PLATFORMS["DESKTOP"] = "desktop";
102
102
  })(RAVEN_PLATFORMS || (RAVEN_PLATFORMS = {}));
103
+ var LOG_IN_TEXT = 'Log in';
104
+ var THEME_CONFIG = {
105
+ NOVAC: {
106
+ headerBackground: 'transparent',
107
+ hoverColor: '#FFB8A5',
108
+ logoFill: '#FFF',
109
+ fkcompanyColor: '#FFF',
110
+ typographyColor: '#FFF',
111
+ loginButtonColorVariant: ButtonColor.NEUTRAL
112
+ },
113
+ DEFAULT: {
114
+ headerBackground: '#F7FAFF',
115
+ hoverColor: '#FF4F17',
116
+ logoFill: '#FF4F17',
117
+ fkcompanyColor: '#1A1A1A',
118
+ typographyColor: '#1A1A1A',
119
+ loginButtonColorVariant: ButtonColor.PRIMARY
120
+ }
121
+ };
103
122
 
104
123
  var HeaderContext = createContext(undefined);
105
124
  var useHeaderContext = function () {
@@ -122,41 +141,46 @@ var HeaderProvider = function (_a) {
122
141
  var LobsHeader = function () {
123
142
  var selectedLOB = useHeaderContext().selectedLOB;
124
143
  return jsx(Container, __assign({
125
- className: 'flex p-4 flex-middle flex-center',
144
+ display: 'flex',
145
+ alignItems: 'center',
146
+ justifyContent: 'center',
147
+ padding: '16px',
148
+ height: '64',
149
+ background: '#F3F5FA',
150
+ top: '64px',
151
+ zIndex: 2,
126
152
  css: {
127
- gap: 40,
128
- height: 64,
129
- background: ' #F3F5FA',
130
- top: 64,
131
- zIndex: 2
153
+ gap: 40
132
154
  }
133
155
  }, {
134
156
  children: LOB_DATA.map(function (item, index) {
157
+ var title = item.title,
158
+ link = item.link,
159
+ image = item.image;
135
160
  return jsxs(Container, __assign({
136
- className: 'flex flex-middle c-pointer',
161
+ display: 'flex',
162
+ alignItems: 'center',
163
+ cursor: 'pointer',
137
164
  css: {
138
165
  gap: 8,
139
- background: selectedLOB === item.title ? '#FFFFFF' : 'transparent',
140
- borderRadius: selectedLOB === item.title ? '40px' : '0',
141
- padding: selectedLOB === item.title ? '8px 16px 8px 8px' : '0'
166
+ background: selectedLOB === title ? '#FFFFFF' : 'transparent',
167
+ borderRadius: selectedLOB === title ? '40px' : '0',
168
+ padding: selectedLOB === title ? '8px 16px 8px 8px' : '0'
142
169
  },
143
170
  onClick: function () {
144
- window.location.href = item.link;
171
+ window.location.href = link;
145
172
  }
146
173
  }, {
147
174
  children: [jsx("img", {
148
- src: item.image,
149
- alt: item.title,
175
+ src: image,
176
+ alt: title,
150
177
  width: 32,
151
178
  height: 32
152
179
  }), jsx(Typography, __assign({
153
- variant: 'P1',
154
- style: {
155
- fontWeight: selectedLOB === item.title ? 600 : 500
156
- },
180
+ variant: selectedLOB === title ? TypographyVariant.HM3 : TypographyVariant.B1,
157
181
  isClickable: true
158
182
  }, {
159
- children: item.title
183
+ children: title
160
184
  }))]
161
185
  }), index);
162
186
  })
@@ -471,36 +495,34 @@ var BusinessDropdownContent = function (_a) {
471
495
  }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
472
496
  return jsxs(Container, __assign({
473
497
  ref: containerRef,
474
- className: 'bg-neutral-100 o-hidden',
498
+ backgroundColor: '#fff',
499
+ top: '76px',
500
+ position: 'fixed',
501
+ left: "".concat(leftPosition, "px"),
502
+ borderRadius: 24,
503
+ boxShadow: '0px 8px 24px 0px rgba(26, 26, 26, 0.10)',
504
+ width: 'fit-content',
505
+ zIndex: 1002,
475
506
  css: {
476
- top: '76px',
477
- position: 'fixed',
478
- left: "".concat(leftPosition, "px"),
479
- borderRadius: 24,
480
- boxShadow: '0px 8px 24px 0px rgba(26, 26, 26, 0.10)',
481
- width: 'fit-content',
482
- zIndex: 1002,
507
+ overflow: 'hidden',
483
508
  opacity: 0
484
509
  }
485
510
  }, {
486
511
  children: [jsx(Container, __assign({
487
- className: 'px-6 py-5',
512
+ padding: '20px 24px 20px 24px',
488
513
  backgroundColor: '#FFF1EC'
489
514
  }, {
490
515
  children: jsx(Typography, __assign({
491
- variant: 'HM2',
492
- style: {
493
- lineHeight: '24px'
494
- }
516
+ variant: 'HM2'
495
517
  }, {
496
518
  children: BUSINESS_DROPDOWN_HEADING
497
519
  }))
498
520
  })), jsx(Container, __assign({
499
- className: 'flex flex-row p-6',
500
- css: {
501
- columnGap: '48px',
502
- width: 'fit-content'
503
- }
521
+ display: 'flex',
522
+ flexDirection: 'row',
523
+ padding: '24px',
524
+ columnGap: '48px',
525
+ width: 'fit-content'
504
526
  }, {
505
527
  children: bdConfig.map(function (_a) {
506
528
  var title = _a.title,
@@ -509,19 +531,18 @@ var BusinessDropdownContent = function (_a) {
509
531
  link = _a.link,
510
532
  ravenActionName = _a.ravenActionName;
511
533
  return jsxs(Container, __assign({
512
- css: {
513
- width: '200px'
514
- },
534
+ cursor: 'pointer',
535
+ width: '200px',
536
+ className: 'bd-hover-container',
515
537
  onClick: function () {
516
538
  return handleBusinessDropdownClick(link, title, ravenActionName);
517
- },
518
- className: 'bd-hover-container c-pointer'
539
+ }
519
540
  }, {
520
541
  children: [jsxs(Container, __assign({
521
- className: 'flex flex-row flex-middle',
522
- style: {
523
- columnGap: '8px'
524
- }
542
+ display: 'flex',
543
+ flexDirection: 'row',
544
+ alignItems: 'center',
545
+ columnGap: '8px'
525
546
  }, {
526
547
  children: [jsx(Typography, __assign({
527
548
  variant: 'HM2',
@@ -531,8 +552,8 @@ var BusinessDropdownContent = function (_a) {
531
552
  })), jsx(AnimatedArrow, {})]
532
553
  })), jsx(Typography, __assign({
533
554
  variant: 'B3',
534
- className: 'mt-1',
535
555
  css: {
556
+ marginTop: '4px',
536
557
  opacity: 0.75
537
558
  }
538
559
  }, {
@@ -540,7 +561,9 @@ var BusinessDropdownContent = function (_a) {
540
561
  })), jsx(Typography, __assign({
541
562
  variant: 'P3',
542
563
  color: 'subheading',
543
- className: 'mt-3'
564
+ css: {
565
+ marginTop: '12px'
566
+ }
544
567
  }, {
545
568
  children: details
546
569
  }))]
@@ -652,12 +675,19 @@ var LoyaltyChip = function (_a) {
652
675
  }
653
676
  }, [handleChipClick, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
654
677
  return jsxs(Container, __assign({
655
- className: 'flex p-relative flex-middle flex-center br-8 o-hidden c-pointer',
656
- style: {
678
+ display: 'flex',
679
+ position: 'relative',
680
+ alignItems: 'center',
681
+ justifyContent: 'center',
682
+ borderRadius: '8px',
683
+ cursor: 'pointer',
684
+ paddingLeft: '8px',
685
+ paddingRight: isHovered ? '4px' : '8px',
686
+ css: {
687
+ overflow: 'hidden',
657
688
  height: 32,
658
689
  paddingLeft: 8,
659
- transition: 'padding-right 0.2s ease-in-out',
660
- paddingRight: isHovered ? 4 : 8
690
+ transition: 'padding-right 0.2s ease-in-out'
661
691
  },
662
692
  onMouseEnter: function () {
663
693
  return setIsHovered(true);
@@ -668,7 +698,7 @@ var LoyaltyChip = function (_a) {
668
698
  onClick: handleClick
669
699
  }, {
670
700
  children: [jsx(Container, {
671
- style: {
701
+ css: {
672
702
  content: '""',
673
703
  position: 'absolute',
674
704
  inset: 0,
@@ -677,7 +707,7 @@ var LoyaltyChip = function (_a) {
677
707
  zIndex: -2
678
708
  }
679
709
  }), jsx(Container, {
680
- style: {
710
+ css: {
681
711
  content: '""',
682
712
  position: 'absolute',
683
713
  inset: 0,
@@ -690,12 +720,16 @@ var LoyaltyChip = function (_a) {
690
720
  zIndex: -1
691
721
  }
692
722
  }), jsx(Container, __assign({
693
- className: 'flex flex-middle p-relative'
723
+ display: 'flex',
724
+ alignItems: 'center',
725
+ position: 'relative'
694
726
  }, {
695
727
  children: icon
696
728
  })), jsx(Container, __assign({
697
- className: 'flex flex-middle o-hidden',
698
- style: {
729
+ display: 'flex',
730
+ alignItems: 'center',
731
+ css: {
732
+ overflow: 'hidden',
699
733
  maxWidth: isHovered ? 16 : 0,
700
734
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
701
735
  opacity: isHovered ? 0.5 : 0
@@ -793,8 +827,12 @@ var ExpandableItem = function (_a) {
793
827
  }
794
828
  }, [handleChipClick, type, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
795
829
  return jsxs(Container, __assign({
796
- className: "flex flex-middle justify-center br-8 c-pointer",
797
- style: {
830
+ display: 'flex',
831
+ alignItems: 'center',
832
+ justifyContent: 'center',
833
+ borderRadius: '8px',
834
+ cursor: 'pointer',
835
+ css: {
798
836
  height: 32,
799
837
  paddingLeft: 8,
800
838
  paddingRight: isHovered ? 4 : 8,
@@ -810,18 +848,23 @@ var ExpandableItem = function (_a) {
810
848
  onClick: handleDefaultClick
811
849
  }, {
812
850
  children: [jsxs(Container, __assign({
813
- className: 'flex flex-middle flex-gap-1'
851
+ display: 'flex',
852
+ alignItems: 'center',
853
+ css: {
854
+ gap: '4px'
855
+ }
814
856
  }, {
815
857
  children: [icon, jsx(Typography, __assign({
816
858
  variant: 'B3',
817
- className: 'value-text',
818
859
  isClickable: true
819
860
  }, {
820
861
  children: value
821
862
  }))]
822
863
  })), jsx(Container, __assign({
823
- className: 'flex flex-middle o-hidden',
824
- style: {
864
+ display: 'flex',
865
+ alignItems: 'center',
866
+ css: {
867
+ overflow: 'hidden',
825
868
  maxWidth: isHovered ? 16 : 0,
826
869
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
827
870
  opacity: isHovered ? 1 : 0
@@ -855,9 +898,12 @@ var RewardsSection = function () {
855
898
  return null;
856
899
  }
857
900
  return jsxs(Container, __assign({
858
- className: 'flex p-4 pt-0 flex-start flex-gap-1',
859
- style: {
860
- alignSelf: 'stretch'
901
+ display: 'flex',
902
+ padding: '0 16px 16px 16px',
903
+ justifyContent: 'flex-start',
904
+ css: {
905
+ alignSelf: 'stretch',
906
+ gap: '4px'
861
907
  }
862
908
  }, {
863
909
  children: [loyaltyLoading ? jsx(Shimmer, {
@@ -935,7 +981,7 @@ var AccountDropdownContent = function (_a) {
935
981
  ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(text), ravenPayload, ravenPushCallback, ravenPageName);
936
982
  window.location.href = redirectLink;
937
983
  }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
938
- var handleLogout = useCallback(function () {
984
+ useCallback(function () {
939
985
  ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(SIGN_OUT_TEXT), ravenPayload, ravenPushCallback, ravenPageName);
940
986
  handleLogoutClick();
941
987
  }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, handleLogoutClick]);
@@ -963,7 +1009,11 @@ var AccountDropdownContent = function (_a) {
963
1009
  }));
964
1010
  };
965
1011
  return jsx(Container, __assign({
966
- className: 'flex flex-column flex-gap-1'
1012
+ display: 'flex',
1013
+ flexDirection: 'column',
1014
+ css: {
1015
+ gap: '4px'
1016
+ }
967
1017
  }, {
968
1018
  children: userGreeting ? jsxs(Fragment, {
969
1019
  children: [renderContent(userDetailsLoading, userGreeting, 'HM3', 'primary'), renderContent(userDetailsLoading, "".concat(LOGGEDIN_USER_TEXT, " ").concat(phoneNumber), 'P3', 'subheading')]
@@ -975,28 +1025,33 @@ var AccountDropdownContent = function (_a) {
975
1025
  return jsxs(Container, __assign({
976
1026
  id: ACCOUNT_OPTIONS_CONTAINER_ID,
977
1027
  ref: containerRef,
978
- className: 'flex flex-column br-16 o-hidden',
1028
+ display: 'flex',
1029
+ flexDirection: 'column',
1030
+ borderRadius: '16px',
1031
+ zIndex: 1002,
1032
+ top: '76px',
1033
+ position: 'fixed',
979
1034
  css: {
980
- zIndex: 1002,
981
1035
  opacity: 0,
982
- top: '76px',
983
- position: 'fixed'
1036
+ overflow: 'hidden'
984
1037
  },
985
1038
  width: "".concat(ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px"),
986
1039
  background: '#FFF1EC'
987
1040
  }, {
988
1041
  children: [jsx(Container, __assign({
989
- className: 'p-4',
1042
+ padding: '16px',
990
1043
  height: '76px'
991
1044
  }, {
992
1045
  children: renderUserData()
993
1046
  })), jsx(RewardsSection, {}), jsxs(Container, __assign({
994
- className: 'p-2 flex flex-column',
1047
+ display: 'flex',
1048
+ flexDirection: 'column',
1049
+ padding: '8px',
995
1050
  backgroundColor: 'white',
996
- style: {
1051
+ rowGap: '8px',
1052
+ css: {
997
1053
  borderBottomLeftRadius: 12,
998
- borderBottomRightRadius: 12,
999
- rowGap: 8
1054
+ borderBottomRightRadius: 12
1000
1055
  }
1001
1056
  }, {
1002
1057
  children: [ACCOUNT_OPTIONS_POPUP_CONFIG.map(function (_a) {
@@ -1004,39 +1059,55 @@ var AccountDropdownContent = function (_a) {
1004
1059
  icon = _a.icon,
1005
1060
  redirectionLink = _a.redirectionLink;
1006
1061
  return jsx(Container, __assign({
1007
- className: 'p-2 br-8 c-pointer hoverable-container',
1062
+ className: 'hoverable-container',
1063
+ padding: '8px',
1064
+ borderRadius: '8px',
1065
+ cursor: 'pointer',
1008
1066
  onClick: function () {
1009
1067
  return handleAccountOptionsClick(text, redirectionLink);
1010
1068
  }
1011
1069
  }, {
1012
1070
  children: jsxs(Container, __assign({
1013
- className: 'flex c-pointer',
1014
- style: {
1071
+ display: 'flex',
1072
+ cursor: 'pointer',
1073
+ css: {
1015
1074
  columnGap: '8px'
1016
1075
  }
1017
1076
  }, {
1018
1077
  children: [icon, jsx(Typography, __assign({
1019
1078
  variant: 'P1',
1020
- className: 'flex flex-middle c-pointer'
1079
+ css: {
1080
+ display: 'flex',
1081
+ alignItems: 'center',
1082
+ cursor: 'pointer'
1083
+ }
1021
1084
  }, {
1022
1085
  children: text
1023
1086
  }))]
1024
1087
  }))
1025
1088
  }), "account-option-".concat(text));
1026
1089
  }), jsx(Divider, {
1027
- style: {
1090
+ css: {
1028
1091
  borderBottom: '1px dashed #E6E6E6'
1029
1092
  }
1030
1093
  }), jsxs(Container, __assign({
1031
- className: 'flex p-2 br-8 c-pointer logout-button',
1032
- onClick: handleLogout
1094
+ className: 'logout-button',
1095
+ display: 'flex',
1096
+ padding: '8px',
1097
+ borderRadius: '8px',
1098
+ cursor: 'pointer',
1099
+ onClick: handleLogoutClick
1033
1100
  }, {
1034
1101
  children: [jsx(Signout, {
1035
1102
  height: 24,
1036
1103
  width: 24
1037
1104
  }), jsx(Typography, __assign({
1038
1105
  variant: 'P1',
1039
- className: 'flex flex-middle c-pointer',
1106
+ css: {
1107
+ display: 'flex',
1108
+ alignItems: 'center',
1109
+ cursor: 'pointer'
1110
+ },
1040
1111
  color: 'warning'
1041
1112
  }, {
1042
1113
  children: SIGN_OUT_TEXT
@@ -1076,8 +1147,9 @@ var UserAccount = function () {
1076
1147
  return window.removeEventListener('scroll', handleScroll);
1077
1148
  };
1078
1149
  }, []);
1079
- var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1080
- var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1150
+ var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1151
+ var hoverColor = theme.hoverColor,
1152
+ typographyColor = theme.typographyColor;
1081
1153
  var triggerRavenEventOnHover = useCallback(function () {
1082
1154
  var _a;
1083
1155
  var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
@@ -1091,8 +1163,13 @@ var UserAccount = function () {
1091
1163
  }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
1092
1164
  return jsxs(Container, {
1093
1165
  children: [jsxs(Container, __assign({
1094
- className: "flex px-3 py-2 flex-middle br-12 h-100p c-pointer",
1095
- style: {
1166
+ display: 'flex',
1167
+ padding: '8px 12px',
1168
+ alignItems: 'center',
1169
+ borderRadius: '12px',
1170
+ height: '100%',
1171
+ cursor: 'pointer',
1172
+ css: {
1096
1173
  columnGap: 8,
1097
1174
  height: 64
1098
1175
  },
@@ -1104,20 +1181,24 @@ var UserAccount = function () {
1104
1181
  id: HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID
1105
1182
  }, {
1106
1183
  children: [jsx(MyAccount, {
1107
- color: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1184
+ color: isDropdownVisible ? hoverColor : typographyColor
1108
1185
  }), jsxs(Container, __assign({
1109
- className: 'flex flex-row flex-middle'
1186
+ display: 'flex',
1187
+ flexDirection: 'row',
1188
+ alignItems: 'center'
1110
1189
  }, {
1111
1190
  children: [jsx(Typography, __assign({
1112
1191
  variant: 'B2',
1113
- className: 'c-pointer',
1114
- colorCode: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1192
+ css: {
1193
+ cursor: 'pointer'
1194
+ },
1195
+ colorCode: isDropdownVisible ? hoverColor : typographyColor
1115
1196
  }, {
1116
1197
  children: MY_ACCOUNT_TEXT
1117
1198
  })), jsx(ChevronDown, {
1118
1199
  width: 20,
1119
1200
  height: 20,
1120
- fill: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1201
+ fill: isDropdownVisible ? hoverColor : typographyColor
1121
1202
  })]
1122
1203
  }))]
1123
1204
  })), jsx(HeaderAnimatedMask, __assign({
@@ -1168,9 +1249,13 @@ var HeaderContent = function () {
1168
1249
  return window.removeEventListener('scroll', handleScroll);
1169
1250
  };
1170
1251
  }, []);
1171
- var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1172
- var headerBackground = effectiveNovacThemeEnabled ? 'transparent' : '#F7FAFF';
1173
- var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1252
+ var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1253
+ var headerBackground = theme.headerBackground,
1254
+ logoFill = theme.logoFill,
1255
+ loginButtonColorVariant = theme.loginButtonColorVariant,
1256
+ hoverColor = theme.hoverColor,
1257
+ fkcompanyColor = theme.fkcompanyColor,
1258
+ typographyColor = theme.typographyColor;
1174
1259
  var _g = useHoverDropdown({
1175
1260
  openDelay: 0
1176
1261
  }),
@@ -1209,31 +1294,45 @@ var HeaderContent = function () {
1209
1294
  }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1210
1295
  return jsxs(Fragment, {
1211
1296
  children: [jsx(Container, __assign({
1212
- className: 'flex t-0 p-sticky w-100p flex-middle flex-center flex-gap-6 flex-no-shrink',
1213
- style: {
1214
- zIndex: 1000,
1215
- height: 64,
1216
- borderBottom: effectiveNovacThemeEnabled ? '' : '1px solid #E6E6E6',
1217
- background: headerBackground,
1297
+ display: 'flex',
1298
+ top: 0,
1299
+ position: 'sticky',
1300
+ width: '100%',
1301
+ alignItems: 'center',
1302
+ justifyContent: 'center',
1303
+ zIndex: 1000,
1304
+ height: '64px',
1305
+ background: headerBackground,
1306
+ css: {
1307
+ gap: '24px',
1308
+ flexShrink: 0,
1309
+ borderBottom: headerBackground === 'transparent' ? '' : '1px solid #E6E6E6',
1218
1310
  transition: 'background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out'
1219
1311
  }
1220
1312
  }, {
1221
1313
  children: jsxs(Container, __assign({
1222
- className: 'flex flex-middle flex-between flex-gap-6',
1223
- style: {
1224
- maxWidth: 1440,
1225
- padding: '0px 28px',
1226
- flex: '1 0 0'
1314
+ display: 'flex',
1315
+ alignItems: 'center',
1316
+ justifyContent: 'space-between',
1317
+ padding: '0 28px',
1318
+ flex: 1,
1319
+ css: {
1320
+ gap: '24px',
1321
+ maxWidth: 1440
1227
1322
  }
1228
1323
  }, {
1229
1324
  children: [jsxs(Container, __assign({
1230
- className: 'flex flex-row flex-center flex-middle c-pointer',
1325
+ display: 'flex',
1326
+ flexDirection: 'row',
1327
+ alignItems: 'center',
1328
+ justifyContent: 'center',
1329
+ cursor: 'pointer',
1231
1330
  onClick: handleHomeClick
1232
1331
  }, {
1233
1332
  children: [jsx(CTLogo, {
1234
- fillColor: effectiveNovacThemeEnabled ? '#FFF' : '#FF4F17'
1333
+ fillColor: logoFill
1235
1334
  }), jsx(Divider, {
1236
- style: {
1335
+ css: {
1237
1336
  width: 12,
1238
1337
  marginLeft: 2,
1239
1338
  marginRight: 2,
@@ -1241,15 +1340,27 @@ var HeaderContent = function () {
1241
1340
  borderBottom: '1px solid #e0e0e0'
1242
1341
  }
1243
1342
  }), jsx(Fkcompany, {
1244
- color: effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1343
+ color: fkcompanyColor
1245
1344
  })]
1246
1345
  })), jsxs(Container, __assign({
1247
- className: 'flex flex-row flex-middle flex-center flex-cg-6'
1346
+ display: 'flex',
1347
+ flexDirection: 'row',
1348
+ alignItems: 'center',
1349
+ justifyContent: 'center',
1350
+ columnGap: '24px'
1248
1351
  }, {
1249
1352
  children: [jsx(Container, __assign({
1250
- className: 'flex flex-row flex-middle flex-center flex-cg-1'
1353
+ display: 'flex',
1354
+ flexDirection: 'row',
1355
+ alignItems: 'center',
1356
+ justifyContent: 'center',
1357
+ columnGap: '4px'
1251
1358
  }, {
1252
1359
  children: NAVBAR_OPTIONS.map(function (option, index) {
1360
+ var text = option.text,
1361
+ LeftIcon = option.lefticon,
1362
+ RightIcon = option.rightIcon,
1363
+ isHoverable = option.isHoverable;
1253
1364
  var isHovered = hoveredElemIndex === index;
1254
1365
  return jsxs(Container, {
1255
1366
  children: [jsxs(Container, __assign({
@@ -1260,47 +1371,52 @@ var HeaderContent = function () {
1260
1371
  }
1261
1372
  },
1262
1373
  onMouseLeave: handleOnMouseLeave,
1263
- className: 'flex flex-row flex-middle px-3 py-2 c-pointer p-relative',
1264
- style: {
1265
- columnGap: 8,
1266
- height: 64
1267
- },
1374
+ display: 'flex',
1375
+ flexDirection: 'row',
1376
+ alignItems: 'center',
1377
+ padding: '8px 12px 8px 12px',
1378
+ cursor: 'pointer',
1379
+ position: 'relative',
1380
+ columnGap: 8,
1381
+ height: '64px',
1268
1382
  onClick: function () {
1269
1383
  return handleNavbarOptionsClick(option);
1270
1384
  }
1271
1385
  }, {
1272
- children: [jsx(option.lefticon, {
1273
- color: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1386
+ children: [jsx(LeftIcon, {
1387
+ color: isHovered ? hoverColor : typographyColor
1274
1388
  }), jsxs(Container, __assign({
1275
- className: 'flex flex-row flex-middle'
1389
+ display: 'flex',
1390
+ flexDirection: 'row',
1391
+ alignItems: 'center'
1276
1392
  }, {
1277
1393
  children: [jsx(Typography, __assign({
1278
1394
  variant: 'B2',
1279
- colorCode: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A',
1395
+ colorCode: isHovered ? hoverColor : typographyColor,
1280
1396
  isClickable: true
1281
1397
  }, {
1282
- children: option.text
1283
- })), option.rightIcon && jsx(option.rightIcon, {
1398
+ children: text
1399
+ })), RightIcon && jsx(RightIcon, {
1284
1400
  width: 20,
1285
1401
  height: 20,
1286
- fill: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1402
+ fill: isHovered ? hoverColor : typographyColor
1287
1403
  })]
1288
1404
  }))]
1289
1405
  }), "nav-option-".concat(index)), jsx(HeaderAnimatedMask, __assign({
1290
- show: hoveredElemIndex === index && option.isHoverable && isDropdownVisible,
1406
+ show: hoveredElemIndex === index && isHoverable && isDropdownVisible,
1291
1407
  marginTop: '64px',
1292
1408
  handleDropdownMouseEnter: handleDropdownMouseEnter,
1293
1409
  handleDropdownMouseLeave: handleDropdownMouseLeave,
1294
1410
  onMaskClick: handleDropdownMouseLeave
1295
1411
  }, {
1296
1412
  children: jsx(BusinessDropdownContent, {
1297
- isOpen: hoveredElemIndex === index && option.isHoverable && isDropdownVisible
1413
+ isOpen: hoveredElemIndex === index && isHoverable && isDropdownVisible
1298
1414
  })
1299
1415
  }))]
1300
1416
  });
1301
1417
  })
1302
1418
  })), isUserLoggedIn && jsx(Divider, {
1303
- style: {
1419
+ css: {
1304
1420
  width: 12,
1305
1421
  margin: '0 -18px',
1306
1422
  transform: 'rotate(90deg)',
@@ -1308,25 +1424,28 @@ var HeaderContent = function () {
1308
1424
  }
1309
1425
  }), jsx(Container, {
1310
1426
  children: isUserLoggedIn ? jsx(Container, __assign({
1311
- className: 'flex flex-row flex-middle'
1427
+ display: 'flex',
1428
+ flexDirection: 'row',
1429
+ alignItems: 'center'
1312
1430
  }, {
1313
1431
  children: jsx(UserAccount, {})
1314
1432
  })) : jsx(Button, __assign({
1315
- className: "fw-400 fs-14 ".concat(effectiveNovacThemeEnabled ? 'novac-login-button' : 'login-button'),
1433
+ variant: 'outline',
1434
+ color: loginButtonColorVariant,
1435
+ className: "".concat(headerBackground === 'transparent' ? 'novac-login-button' : 'login-button'),
1316
1436
  onClick: onLoginButtonClick,
1317
- style: {
1437
+ css: {
1318
1438
  width: 153,
1319
- height: 40,
1320
- border: effectiveNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
1439
+ height: 40
1321
1440
  },
1322
1441
  loading: false
1323
1442
  }, {
1324
1443
  children: jsx(Typography, __assign({
1325
1444
  componentNode: 'span',
1326
1445
  variant: 'L2',
1327
- color: effectiveNovacThemeEnabled ? 'neutral' : 'primary'
1446
+ color: loginButtonColorVariant === ButtonColor.NEUTRAL ? 'neutral' : 'primary'
1328
1447
  }, {
1329
- children: "Log in"
1448
+ children: LOG_IN_TEXT
1330
1449
  }))
1331
1450
  }))
1332
1451
  })]