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