@bikdotai/bik-component-library 0.0.744-beta.13 → 0.0.744-beta.15
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/cjs/assets/icons/ActiveChecklistIcon.d.ts +3 -0
- package/dist/cjs/assets/icons/ActiveChecklistIcon.js +1 -0
- package/dist/cjs/assets/icons/CheckIndicatorIcon.d.ts +1 -0
- package/dist/cjs/assets/icons/CheckIndicatorIcon.js +1 -0
- package/dist/cjs/assets/icons/CompletedChecklistIcon.d.ts +3 -0
- package/dist/cjs/assets/icons/CompletedChecklistIcon.js +1 -0
- package/dist/cjs/assets/icons/CustomiseIcon.d.ts +7 -0
- package/dist/cjs/assets/icons/EnableIcon.d.ts +7 -0
- package/dist/cjs/assets/icons/GoLiveIcon.d.ts +7 -0
- package/dist/cjs/assets/icons/InactiveChecklistIcon.d.ts +3 -0
- package/dist/cjs/assets/icons/InactiveChecklistIcon.js +1 -0
- package/dist/cjs/assets/icons/NudgesIcon.d.ts +7 -0
- package/dist/cjs/assets/icons/OrderTrackingIcon.d.ts +7 -0
- package/dist/cjs/assets/icons/ProgressBadgeIcon.d.ts +3 -0
- package/dist/cjs/assets/icons/ShoppingIcon.d.ts +7 -0
- package/dist/cjs/assets/icons/SmallCheckIcon.d.ts +3 -0
- package/dist/cjs/assets/icons/SmallCheckIcon.js +1 -0
- package/dist/cjs/assets/icons/SupportIcon.d.ts +7 -0
- package/dist/cjs/assets/icons/TrainingIcon.d.ts +7 -0
- package/dist/cjs/components/ProgressChecklist/MultiChecklistItem.d.ts +10 -0
- package/dist/cjs/components/ProgressChecklist/MultiChecklistItem.js +1 -0
- package/dist/cjs/components/ProgressChecklist/ProgressChecklist.d.ts +70 -0
- package/dist/cjs/components/ProgressChecklist/ProgressChecklist.js +1 -0
- package/dist/cjs/components/ProgressChecklist/ProgressChecklist.style.d.ts +30 -0
- package/dist/cjs/components/ProgressChecklist/ProgressChecklist.style.js +133 -0
- package/dist/cjs/components/ProgressChecklist/ProgressStepper.d.ts +15 -0
- package/dist/cjs/components/ProgressChecklist/ProgressStepper.js +1 -0
- package/dist/cjs/components/ProgressChecklist/SimpleChecklistItem.d.ts +19 -0
- package/dist/cjs/components/ProgressChecklist/SimpleChecklistItem.js +1 -0
- package/dist/cjs/components/ProgressChecklist/index.d.ts +2 -0
- package/dist/cjs/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/cjs/components/feature-announcements/constants/dimensions.d.ts +25 -99
- package/dist/cjs/components/feature-announcements/constants/dimensions.js +1 -1
- package/dist/cjs/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.d.ts +2 -18
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.js +1 -1
- package/dist/cjs/components/feature-announcements/types/feature.types.d.ts +0 -36
- package/dist/cjs/components/feature-announcements/types/props.types.d.ts +3 -25
- package/dist/cjs/components/post-live-checklist/PostLiveChecklist.d.ts +23 -0
- package/dist/cjs/components/post-live-checklist/PostLiveChecklist.js +1 -0
- package/dist/cjs/components/post-live-checklist/PostLiveChecklist.stories.d.ts +12 -0
- package/dist/cjs/components/post-live-checklist/index.d.ts +2 -0
- package/dist/cjs/components/post-live-checklist-item/PostLiveChecklistItem.d.ts +10 -0
- package/dist/cjs/components/post-live-checklist-item/PostLiveChecklistItem.js +1 -0
- package/dist/cjs/components/post-live-checklist-item/index.d.ts +1 -0
- package/dist/cjs/components/whats-new/WhatsNew.types.d.ts +0 -8
- package/dist/cjs/components/whats-new/WhatsNewPanel.js +1 -1
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +1 -1
- package/dist/esm/assets/icons/ActiveChecklistIcon.d.ts +3 -0
- package/dist/esm/assets/icons/ActiveChecklistIcon.js +1 -0
- package/dist/esm/assets/icons/CheckIndicatorIcon.d.ts +1 -0
- package/dist/esm/assets/icons/CheckIndicatorIcon.js +1 -0
- package/dist/esm/assets/icons/CompletedChecklistIcon.d.ts +3 -0
- package/dist/esm/assets/icons/CompletedChecklistIcon.js +1 -0
- package/dist/esm/assets/icons/CustomiseIcon.d.ts +7 -0
- package/dist/esm/assets/icons/EnableIcon.d.ts +7 -0
- package/dist/esm/assets/icons/GoLiveIcon.d.ts +7 -0
- package/dist/esm/assets/icons/InactiveChecklistIcon.d.ts +3 -0
- package/dist/esm/assets/icons/InactiveChecklistIcon.js +1 -0
- package/dist/esm/assets/icons/NudgesIcon.d.ts +7 -0
- package/dist/esm/assets/icons/OrderTrackingIcon.d.ts +7 -0
- package/dist/esm/assets/icons/ProgressBadgeIcon.d.ts +3 -0
- package/dist/esm/assets/icons/ShoppingIcon.d.ts +7 -0
- package/dist/esm/assets/icons/SmallCheckIcon.d.ts +3 -0
- package/dist/esm/assets/icons/SmallCheckIcon.js +1 -0
- package/dist/esm/assets/icons/SupportIcon.d.ts +7 -0
- package/dist/esm/assets/icons/TrainingIcon.d.ts +7 -0
- package/dist/esm/components/ProgressChecklist/MultiChecklistItem.d.ts +10 -0
- package/dist/esm/components/ProgressChecklist/MultiChecklistItem.js +1 -0
- package/dist/esm/components/ProgressChecklist/ProgressChecklist.d.ts +70 -0
- package/dist/esm/components/ProgressChecklist/ProgressChecklist.js +1 -0
- package/dist/esm/components/ProgressChecklist/ProgressChecklist.style.d.ts +30 -0
- package/dist/esm/components/ProgressChecklist/ProgressChecklist.style.js +133 -0
- package/dist/esm/components/ProgressChecklist/ProgressStepper.d.ts +15 -0
- package/dist/esm/components/ProgressChecklist/ProgressStepper.js +1 -0
- package/dist/esm/components/ProgressChecklist/SimpleChecklistItem.d.ts +19 -0
- package/dist/esm/components/ProgressChecklist/SimpleChecklistItem.js +1 -0
- package/dist/esm/components/ProgressChecklist/index.d.ts +2 -0
- package/dist/esm/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/esm/components/feature-announcements/constants/dimensions.d.ts +25 -99
- package/dist/esm/components/feature-announcements/constants/dimensions.js +1 -1
- package/dist/esm/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.d.ts +2 -18
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.js +1 -1
- package/dist/esm/components/feature-announcements/types/feature.types.d.ts +0 -36
- package/dist/esm/components/feature-announcements/types/props.types.d.ts +3 -25
- package/dist/esm/components/post-live-checklist/PostLiveChecklist.d.ts +23 -0
- package/dist/esm/components/post-live-checklist/PostLiveChecklist.js +1 -0
- package/dist/esm/components/post-live-checklist/PostLiveChecklist.stories.d.ts +12 -0
- package/dist/esm/components/post-live-checklist/index.d.ts +2 -0
- package/dist/esm/components/post-live-checklist-item/PostLiveChecklistItem.d.ts +10 -0
- package/dist/esm/components/post-live-checklist-item/PostLiveChecklistItem.js +1 -0
- package/dist/esm/components/post-live-checklist-item/index.d.ts +1 -0
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +0 -8
- package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popup dimension constants
|
|
3
|
+
*/
|
|
1
4
|
export declare const POPUP_DIMENSIONS: {
|
|
2
5
|
readonly MAJOR: {
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
readonly imageWidth:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
readonly width: 959;
|
|
7
|
+
readonly height: 274;
|
|
8
|
+
readonly imageWidth: 480;
|
|
9
|
+
readonly imageHeight: 274;
|
|
10
|
+
readonly imageInnerWidth: 464;
|
|
11
|
+
readonly imageInnerHeight: 258;
|
|
12
|
+
readonly imagePlaceholderWidth: 290;
|
|
13
|
+
readonly imagePlaceholderHeight: 258;
|
|
10
14
|
};
|
|
11
15
|
readonly MINOR: {
|
|
12
16
|
readonly width: 519;
|
|
@@ -16,41 +20,20 @@ export declare const POPUP_DIMENSIONS: {
|
|
|
16
20
|
readonly badgeHeight: 27;
|
|
17
21
|
};
|
|
18
22
|
};
|
|
19
|
-
export declare const TEXT_LIMITS: {
|
|
20
|
-
readonly MAJOR: {
|
|
21
|
-
readonly TITLE: {
|
|
22
|
-
readonly MAX_LINES: 2;
|
|
23
|
-
};
|
|
24
|
-
readonly CONTENT: {
|
|
25
|
-
readonly MAX_LINES: 4;
|
|
26
|
-
readonly MAX_CHARS: 360;
|
|
27
|
-
readonly CHARS_PER_LINE: 72;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
23
|
/**
|
|
32
24
|
* Spacing constants
|
|
33
25
|
*/
|
|
34
26
|
export declare const SPACING: {
|
|
35
27
|
readonly MAJOR: {
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly imagePadding: "0px";
|
|
46
|
-
readonly titlePadding: "0 0 0px 0";
|
|
47
|
-
readonly buttonMarginTop: "0px";
|
|
48
|
-
readonly skipButtonPadding: "2px 4px";
|
|
49
|
-
readonly skipButtonTop: "8px";
|
|
50
|
-
readonly skipButtonRight: "8px";
|
|
51
|
-
readonly navigationBottom: "0px";
|
|
52
|
-
readonly navigationRight: "0px";
|
|
53
|
-
readonly navigationGap: "4px";
|
|
28
|
+
readonly contentMargin: "0 8px 0 0";
|
|
29
|
+
readonly imagePadding: "8px";
|
|
30
|
+
readonly titlePadding: "36px 0 0 0";
|
|
31
|
+
readonly buttonMarginTop: "16px";
|
|
32
|
+
readonly skipButtonTop: "10px";
|
|
33
|
+
readonly skipButtonRight: "10px";
|
|
34
|
+
readonly navigationBottom: "16px";
|
|
35
|
+
readonly navigationRight: "16px";
|
|
36
|
+
readonly navigationGap: "8px";
|
|
54
37
|
};
|
|
55
38
|
readonly MINOR: {
|
|
56
39
|
readonly imageMargin: "13px 10px 13px 10px";
|
|
@@ -60,71 +43,14 @@ export declare const SPACING: {
|
|
|
60
43
|
readonly actionsGap: "16px";
|
|
61
44
|
};
|
|
62
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Border radius constants
|
|
48
|
+
*/
|
|
63
49
|
export declare const BORDER_RADIUS: {
|
|
64
|
-
readonly POPUP: "
|
|
65
|
-
readonly IMAGE: "
|
|
50
|
+
readonly POPUP: "4px";
|
|
51
|
+
readonly IMAGE: "4px";
|
|
66
52
|
readonly BUTTON: "4px";
|
|
67
53
|
readonly VIDEO_MODAL: "12px";
|
|
68
54
|
readonly CLOSE_BUTTON: "50%";
|
|
69
55
|
readonly SPOTLIGHT: "8px";
|
|
70
56
|
};
|
|
71
|
-
/**
|
|
72
|
-
* Design tokens - Colors
|
|
73
|
-
*/
|
|
74
|
-
export declare const DESIGN_COLORS: {
|
|
75
|
-
readonly BACKGROUND: {
|
|
76
|
-
readonly SURFACE: "#212121";
|
|
77
|
-
readonly IMAGE: "#F0F0F0";
|
|
78
|
-
};
|
|
79
|
-
readonly TEXT: {
|
|
80
|
-
readonly PRIMARY: "#FFFFFF";
|
|
81
|
-
readonly SECONDARY: "rgba(255, 255, 255, 0.8)";
|
|
82
|
-
readonly TERTIARY: "#BDBDBD";
|
|
83
|
-
};
|
|
84
|
-
readonly BUTTON: {
|
|
85
|
-
readonly PRIMARY_TEXT: "#FEC02D";
|
|
86
|
-
readonly PRIMARY_BORDER: "#FEC02D";
|
|
87
|
-
};
|
|
88
|
-
readonly ICON: {
|
|
89
|
-
readonly DISABLED: "rgba(255, 255, 255, 0.3)";
|
|
90
|
-
readonly ENABLED: "#FFFFFF";
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Design tokens - Typography
|
|
95
|
-
*/
|
|
96
|
-
export declare const DESIGN_TYPOGRAPHY: {
|
|
97
|
-
readonly SKIP_BUTTON: {
|
|
98
|
-
readonly fontSize: "14px";
|
|
99
|
-
readonly fontWeight: "600";
|
|
100
|
-
readonly lineHeight: "20px";
|
|
101
|
-
readonly fontFamily: "Inter, sans-serif";
|
|
102
|
-
};
|
|
103
|
-
readonly TITLE: {
|
|
104
|
-
readonly fontSize: "14px";
|
|
105
|
-
readonly fontWeight: "600";
|
|
106
|
-
readonly lineHeight: "20px";
|
|
107
|
-
readonly fontFamily: "Inter, sans-serif";
|
|
108
|
-
};
|
|
109
|
-
readonly CONTENT: {
|
|
110
|
-
readonly fontSize: "12px";
|
|
111
|
-
readonly fontWeight: "400";
|
|
112
|
-
readonly lineHeight: "16px";
|
|
113
|
-
readonly fontFamily: "Inter, sans-serif";
|
|
114
|
-
};
|
|
115
|
-
readonly BUTTON: {
|
|
116
|
-
readonly fontSize: "14px";
|
|
117
|
-
readonly fontWeight: "600";
|
|
118
|
-
readonly lineHeight: "20px";
|
|
119
|
-
readonly fontFamily: "Inter, sans-serif";
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* Design tokens - Dimensions
|
|
124
|
-
*/
|
|
125
|
-
export declare const DESIGN_DIMENSIONS: {
|
|
126
|
-
readonly IMAGE_HEIGHT: 224;
|
|
127
|
-
readonly NAVIGATION_BUTTON_SIZE: 24;
|
|
128
|
-
readonly BUTTON_HEIGHT: 32;
|
|
129
|
-
readonly BUTTON_PADDING_HORIZONTAL: "12px";
|
|
130
|
-
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.BORDER_RADIUS={POPUP:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.BORDER_RADIUS={POPUP:"4px",IMAGE:"4px",BUTTON:"4px",VIDEO_MODAL:"12px",CLOSE_BUTTON:"50%",SPOTLIGHT:"8px"},exports.POPUP_DIMENSIONS={MAJOR:{width:959,height:274,imageWidth:480,imageHeight:274,imageInnerWidth:464,imageInnerHeight:258,imagePlaceholderWidth:290,imagePlaceholderHeight:258},MINOR:{width:519,height:160,imageWidth:235,imageHeight:134,badgeHeight:27}},exports.SPACING={MAJOR:{contentMargin:"0 8px 0 0",imagePadding:"8px",titlePadding:"36px 0 0 0",buttonMarginTop:"16px",skipButtonTop:"10px",skipButtonRight:"10px",navigationBottom:"16px",navigationRight:"16px",navigationGap:"8px"},MINOR:{imageMargin:"13px 10px 13px 10px",contentMargin:"13px 13px 13px 3px",actionsBottom:"13px",actionsRight:"10px",actionsGap:"16px"}};
|
|
@@ -27,7 +27,7 @@ export declare const minorStepStyles: {
|
|
|
27
27
|
tooltip: {
|
|
28
28
|
padding: number;
|
|
29
29
|
backgroundColor: string;
|
|
30
|
-
borderRadius: "
|
|
30
|
+
borderRadius: "4px";
|
|
31
31
|
border: string;
|
|
32
32
|
filter: string;
|
|
33
33
|
boxShadow: string;
|
|
@@ -101,7 +101,7 @@ export declare const getMinorJoyrideStyles: (isClosing: boolean) => {
|
|
|
101
101
|
tooltip: {
|
|
102
102
|
padding: number;
|
|
103
103
|
backgroundColor: string;
|
|
104
|
-
borderRadius: "
|
|
104
|
+
borderRadius: "4px";
|
|
105
105
|
border: string;
|
|
106
106
|
filter: string;
|
|
107
107
|
boxShadow: string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const getMajorPopupStyles: (startAnimation: boolean, transform: string, ratio?: '16:9' | '1:1' | '4:3', padding?: string, primaryButtonStyle?: ButtonStyle, secondaryButtonStyle?: ButtonStyle) => {
|
|
2
|
+
export declare const getMajorPopupStyles: (startAnimation: boolean, transform: string) => {
|
|
4
3
|
container: CSSProperties;
|
|
5
|
-
headerContainer: CSSProperties;
|
|
6
|
-
contentWrapper: CSSProperties;
|
|
7
4
|
skipButton: {
|
|
8
5
|
base: CSSProperties;
|
|
9
6
|
hover: CSSProperties;
|
|
@@ -11,29 +8,16 @@ export declare const getMajorPopupStyles: (startAnimation: boolean, transform: s
|
|
|
11
8
|
imageContainer: CSSProperties;
|
|
12
9
|
image: CSSProperties;
|
|
13
10
|
imagePlaceholder: CSSProperties;
|
|
14
|
-
videoOverlay: CSSProperties;
|
|
15
|
-
playIcon: CSSProperties;
|
|
16
11
|
contentContainer: CSSProperties;
|
|
17
|
-
skipButtonContainer: CSSProperties;
|
|
18
12
|
title: CSSProperties;
|
|
19
13
|
content: CSSProperties;
|
|
20
|
-
actionsWrapper: CSSProperties;
|
|
21
|
-
buttonsGroup: CSSProperties;
|
|
22
14
|
exploreButton: {
|
|
23
15
|
base: CSSProperties;
|
|
24
16
|
hover: CSSProperties;
|
|
25
17
|
};
|
|
26
|
-
secondaryButton: {
|
|
27
|
-
base: CSSProperties;
|
|
28
|
-
hover: CSSProperties;
|
|
29
|
-
};
|
|
30
18
|
navigationContainer: CSSProperties;
|
|
31
19
|
navigationButton: (disabled: boolean) => {
|
|
32
20
|
base: CSSProperties;
|
|
33
|
-
hover:
|
|
34
|
-
backgroundColor: string;
|
|
35
|
-
} | {
|
|
36
|
-
backgroundColor?: undefined;
|
|
37
|
-
};
|
|
21
|
+
hover: CSSProperties;
|
|
38
22
|
};
|
|
39
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../constants/Theme.js"),t=require("../constants/animations.js"),n=require("../constants/dimensions.js"),i=require("../constants/zIndex.js");exports.getMajorPopupStyles=(o,r)=>({container:{width:`${n.POPUP_DIMENSIONS.MAJOR.width}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.height}px`,display:"flex",backgroundColor:e.BASE_COLORS.grayscale[900],borderRadius:n.BORDER_RADIUS.POPUP,overflow:"hidden",position:"relative",transform:o?r:"scale(1)",opacity:o?0:1,transition:t.POPUP_TRANSITION},skipButton:{base:{position:"absolute",top:n.SPACING.MAJOR.skipButtonTop,right:n.SPACING.MAJOR.skipButtonRight,background:"transparent",border:"none",color:e.BASE_COLORS.grayscale[400],fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:i.Z_INDEX.SKIP_BUTTON,transition:"all 0.2s"},hover:{backgroundColor:e.BASE_COLORS.grayscale[100],color:e.BASE_COLORS.grayscale[700]}},imageContainer:{backgroundColor:e.BASE_COLORS.grayscale[900],width:`${n.POPUP_DIMENSIONS.MAJOR.imageWidth}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.imageHeight}px`,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:n.SPACING.MAJOR.imagePadding},image:{width:`${n.POPUP_DIMENSIONS.MAJOR.imageInnerWidth}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.imageInnerHeight}px`,objectFit:"cover"},imagePlaceholder:{color:e.BASE_COLORS.grayscale[500],fontSize:"14px",textAlign:"center",width:`${n.POPUP_DIMENSIONS.MAJOR.imagePlaceholderWidth}px`,height:`${n.POPUP_DIMENSIONS.MAJOR.imagePlaceholderHeight}px`,display:"flex",alignItems:"center",justifyContent:"center"},contentContainer:{flex:1,display:"flex",margin:n.SPACING.MAJOR.contentMargin,flexDirection:"column",justifyContent:"space-between",background:"transparent"},title:{fontSize:"16px",fontWeight:"600",padding:n.SPACING.MAJOR.titlePadding,color:e.BASE_COLORS.grayscale.white,lineHeight:"1.25",textAlign:"left"},content:{fontSize:"14px",lineHeight:"1.5",color:"rgba(255, 255, 255, 0.8)",textAlign:"left"},exploreButton:{base:{backgroundColor:"transparent",border:`1px solid ${e.BASE_COLORS.warning[500]}`,color:e.BASE_COLORS.warning[500],borderRadius:n.BORDER_RADIUS.BUTTON,fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:n.SPACING.MAJOR.buttonMarginTop},hover:{backgroundColor:"rgba(254, 192, 45, 0.1)"}},navigationContainer:{position:"absolute",bottom:n.SPACING.MAJOR.navigationBottom,right:n.SPACING.MAJOR.navigationRight,display:"flex",gap:n.SPACING.MAJOR.navigationGap,alignItems:"center"},navigationButton:t=>({base:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:t?e.BASE_COLORS.grayscale[700]:e.BASE_COLORS.grayscale.white,fontSize:"20px",cursor:t?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},hover:{color:e.BASE_COLORS.warning[500]}})});
|
|
@@ -5,14 +5,6 @@ export interface FirestoreTimestamp {
|
|
|
5
5
|
seconds: number;
|
|
6
6
|
nanoseconds?: number;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Button styling configuration
|
|
10
|
-
*/
|
|
11
|
-
export interface ButtonStyle {
|
|
12
|
-
textColor?: string;
|
|
13
|
-
backgroundColor?: string;
|
|
14
|
-
borderColor?: string;
|
|
15
|
-
}
|
|
16
8
|
/**
|
|
17
9
|
* Feature announcement data model
|
|
18
10
|
*/
|
|
@@ -35,16 +27,6 @@ export interface FeatureAnnouncement {
|
|
|
35
27
|
archived?: boolean;
|
|
36
28
|
createdAt: FirestoreTimestamp;
|
|
37
29
|
expirationDate?: FirestoreTimestamp | string | Date;
|
|
38
|
-
primaryButtonText?: string;
|
|
39
|
-
primaryButtonStyle?: ButtonStyle;
|
|
40
|
-
primaryButtonAction?: 'Play Video' | 'Open link';
|
|
41
|
-
primaryButtonRedirectionUrl?: string;
|
|
42
|
-
secondaryButtonText?: string;
|
|
43
|
-
secondaryButtonUrl?: string;
|
|
44
|
-
secondaryButtonAction?: 'Open link' | 'Close popup' | '';
|
|
45
|
-
secondaryButtonRedirectionUrl?: string;
|
|
46
|
-
secondaryButtonStyle?: ButtonStyle;
|
|
47
|
-
padding?: string;
|
|
48
30
|
}
|
|
49
31
|
/**
|
|
50
32
|
* Store feature progress tracking
|
|
@@ -57,21 +39,3 @@ export interface StoreFeatureProgress {
|
|
|
57
39
|
* Feature update types
|
|
58
40
|
*/
|
|
59
41
|
export type FeatureUpdateType = 'Major' | 'Minor';
|
|
60
|
-
/**
|
|
61
|
-
* Announcement event data (for tracking when announcement is shown)
|
|
62
|
-
*/
|
|
63
|
-
export interface AnnouncementEvent {
|
|
64
|
-
storeId: string;
|
|
65
|
-
announcementId: string;
|
|
66
|
-
announcementTitle: string;
|
|
67
|
-
imageUrl?: string;
|
|
68
|
-
videoUrl?: string;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Announcement interaction event data (for tracking button clicks)
|
|
72
|
-
*/
|
|
73
|
-
export interface AnnouncementInteractionEvent extends AnnouncementEvent {
|
|
74
|
-
buttonClicked: 'Primary' | 'Secondary' | 'Skip';
|
|
75
|
-
buttonName: string;
|
|
76
|
-
buttonUrl?: string;
|
|
77
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { FeatureAnnouncement } from './feature.types';
|
|
3
3
|
import { FeatureAnnouncementRepository } from './repository.types';
|
|
4
4
|
import { RouterProps } from './router.types';
|
|
5
5
|
/**
|
|
@@ -14,27 +14,17 @@ export interface PopupBaseProps {
|
|
|
14
14
|
onPrevious: () => void;
|
|
15
15
|
onNext: () => void;
|
|
16
16
|
setIsClosing?: (isClosing: boolean) => void;
|
|
17
|
-
onSecondaryAction?: () => void;
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
19
|
* Major update popup props
|
|
21
20
|
*/
|
|
22
21
|
export interface MajorUpdatePopupProps extends PopupBaseProps {
|
|
23
|
-
/**
|
|
24
|
-
* Aspect ratio for the image/video container
|
|
25
|
-
* @default '16:9'
|
|
26
|
-
*/
|
|
27
|
-
ratio?: '16:9' | '1:1' | '4:3';
|
|
28
|
-
/**
|
|
29
|
-
* Custom padding for the popup container
|
|
30
|
-
* @default '16px'
|
|
31
|
-
*/
|
|
32
|
-
padding?: string;
|
|
33
22
|
}
|
|
34
23
|
/**
|
|
35
24
|
* Minor update popup props
|
|
36
25
|
*/
|
|
37
|
-
export
|
|
26
|
+
export interface MinorUpdatePopupProps extends PopupBaseProps {
|
|
27
|
+
}
|
|
38
28
|
/**
|
|
39
29
|
* Video modal props
|
|
40
30
|
*/
|
|
@@ -50,16 +40,4 @@ export interface FeatureAnnouncementProviderProps extends FeatureAnnouncementRep
|
|
|
50
40
|
children: React.ReactNode;
|
|
51
41
|
module?: string;
|
|
52
42
|
router?: RouterProps;
|
|
53
|
-
/**
|
|
54
|
-
* Store ID for event tracking
|
|
55
|
-
*/
|
|
56
|
-
storeId?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Callback fired when a major announcement popup is shown
|
|
59
|
-
*/
|
|
60
|
-
onAnnouncementShown?: (event: AnnouncementEvent) => void;
|
|
61
|
-
/**
|
|
62
|
-
* Callback fired when user interacts with an announcement (clicks a button)
|
|
63
|
-
*/
|
|
64
|
-
onAnnouncementInteracted?: (event: AnnouncementInteractionEvent) => void;
|
|
65
43
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChecklistItem {
|
|
3
|
+
id: string;
|
|
4
|
+
isCompleted: boolean;
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
header: string;
|
|
7
|
+
image?: string;
|
|
8
|
+
subHeader?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ButtonGroupItem {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
icon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
14
|
+
}
|
|
15
|
+
export interface PostLiveChecklistProps {
|
|
16
|
+
title?: string;
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
marketingChecklist?: ChecklistItem[];
|
|
19
|
+
supportChecklist?: ChecklistItem[];
|
|
20
|
+
onChecklistSetup?: (itemId: string, analyticsButtonId: string) => void;
|
|
21
|
+
useCaseType?: 'marketing' | 'support' | 'both' | string;
|
|
22
|
+
}
|
|
23
|
+
export declare const PostLiveChecklist: React.FC<PostLiveChecklistProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../buttonGroup/ButtonGroup.js"),i=require("../post-live-checklist-item/PostLiveChecklistItem.js"),r=require("../TypographyStyle.js"),n=require("../../constants/Theme.js");exports.PostLiveChecklist=o=>{let{title:a="Boost Performance",subtitle:l="Enable these features to make your assistant smarter",marketingChecklist:d=[],supportChecklist:u=[],onChecklistSetup:c,useCaseType:p}=o;var m;const[g,h]=t.useState("marketing"),[j,b]=t.useState("none"),[C,k]=t.useState("marketing");t.useEffect((()=>{const e=d.filter((e=>!e.isCompleted)).length,t=u.filter((e=>!e.isCompleted)).length;0!==e||0!==t?e>0&&t>0?b("tabs"):(b("list"),e>0&&k("marketing"),t>0&&k("support")):b("none")}),[d,u]);const x=(()=>{const e=[{id:"marketing",title:"Marketing"},{id:"support",title:"Support"}];if(!p)return e;return"support"===String(p).toLowerCase()?[e[1],e[0]]:e})();t.useEffect((()=>{"tabs"===j&&x.length>0&&h(x[0].id)}),[j,p]);const O=e=>e.toUpperCase(),f=(e,t)=>{c&&c(e,t)};if("none"===j)return null;const v="tabs"===j?"marketing"===g?d:u:"marketing"===C?d:u;return e.jsxs("div",Object.assign({style:{padding:16,border:`1px solid ${n.COLORS.stroke.primary}`,backgroundColor:n.COLORS.surface.standard,borderRadius:8}},{children:[e.jsxs("div",{children:[e.jsx(r.TitleRegular,Object.assign({color:"#4B1583"},{children:a})),e.jsx(r.BodySecondary,Object.assign({color:(null===(m=n.COLORS.content)||void 0===m?void 0:m.secondary)||"#666666"},{children:l}))]}),e.jsx("div",Object.assign({style:{marginTop:12}},{children:"tabs"===j?e.jsxs(e.Fragment,{children:[e.jsx(s.ButtonGroup,{size:"medium",gap:"12px",onButtonClick:e=>h(e),activeButtonId:g,buttonGroup:x}),e.jsx("div",Object.assign({style:{marginTop:12,display:"flex",flexDirection:"column",gap:12}},{children:v.map((t=>e.jsx(i.PostLiveChecklistItem,{isCompleted:t.isCompleted,isOpen:t.isOpen,header:t.header,image:t.image,subHeader:t.subHeader,onSetup:()=>f(t.id,O(g))},t.id)))}))]}):e.jsx("div",Object.assign({style:{marginTop:12,display:"flex",flexDirection:"column",gap:12}},{children:v.map((t=>e.jsx(i.PostLiveChecklistItem,{isCompleted:t.isCompleted,isOpen:t.isOpen,header:t.header,image:t.image,subHeader:t.subHeader,onSetup:()=>f(t.id,O(C))},t.id)))}))}))]}))};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
6
|
+
export declare const WithBothChecklists: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
7
|
+
export declare const SupportFirstOrdering: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
8
|
+
export declare const ListModeSupport: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
9
|
+
export declare const ListModeMarketing: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
10
|
+
export declare const AllCompleted: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
11
|
+
export declare const CustomTitles: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
12
|
+
export declare const WithSomeCompleted: ComponentStory<import("react").FC<import("./PostLiveChecklist").PostLiveChecklistProps>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PostLiveChecklistItemProps {
|
|
3
|
+
isCompleted: boolean;
|
|
4
|
+
header: string;
|
|
5
|
+
subHeader?: string;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
onSetup?: () => void;
|
|
8
|
+
image?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const PostLiveChecklistItem: React.FC<PostLiveChecklistItemProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/CheckIndicatorIcon.js"),t=require("../../assets/icons/chevronDownOutline.svg.js"),i=require("../../assets/icons/chevronUpOutline.svg.js"),n=require("react"),r=require("../button/Button.js"),c=require("../TypographyStyle.js"),o=require("../../constants/Theme.js");exports.PostLiveChecklistItem=l=>{const{isCompleted:d,header:a,subHeader:u,isOpen:j=!1}=l,{onSetup:x}=l,[h,p]=n.useState(j);return n.useEffect((()=>{p(j)}),[j]),e.jsxs("div",Object.assign({style:{backgroundColor:h?o.COLORS.surface.subdued:o.COLORS.surface.standard,borderRadius:8}},{children:[e.jsxs("div",Object.assign({style:{color:o.COLORS.surface.standard,padding:16,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",cursor:d?"default":"pointer"},onClick:()=>!d&&p(!h)},{children:[e.jsx(c.TitleSmall,Object.assign({color:h?"#4B1583":o.COLORS.content.primary},{children:a})),d?e.jsx(s.CheckIndicatorIcon,{}):h?e.jsx(i.default,{width:24,height:24,color:o.COLORS.content.secondary}):e.jsx(t.default,{width:24,height:24,color:o.COLORS.content.secondary})]})),e.jsx("div",{children:h&&e.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:e.jsxs("div",Object.assign({style:{padding:16,paddingTop:0,gap:16,display:"flex",flexDirection:"column"}},{children:[e.jsx("div",Object.assign({style:{height:200,backgroundColor:"#EFE6F9",borderRadius:8,overflow:"hidden"}},{children:e.jsx("img",{src:l.image,alt:"checklist item",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",alignItems:"center",gap:16}},{children:[e.jsx("div",Object.assign({style:{flex:2}},{children:e.jsx(c.BodyCaption,Object.assign({color:o.COLORS.content.secondary,numberOfLines:3},{children:u}))})),e.jsx("div",Object.assign({style:{flex:1,display:"flex",justifyContent:"flex-end"}},{children:e.jsx(r.Button,{buttonType:"primary",size:"small",buttonText:"Setup",onClick:()=>{x&&x()}})}))]}))]}))}))})]}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PostLiveChecklistItem';
|
|
@@ -12,14 +12,6 @@ export interface WhatsNewContent {
|
|
|
12
12
|
createdAt: any;
|
|
13
13
|
module: string[];
|
|
14
14
|
visibility: boolean;
|
|
15
|
-
primaryButtonText?: string;
|
|
16
|
-
primaryButtonAction?: 'Play Video' | 'Open link';
|
|
17
|
-
primaryButtonRedirectionUrl?: string;
|
|
18
|
-
secondaryButtonText?: string;
|
|
19
|
-
secondaryButtonAction?: 'Open link' | 'Close popup' | '';
|
|
20
|
-
secondaryButtonRedirectionUrl?: string;
|
|
21
|
-
featureUpdateType?: 'Major' | 'Minor';
|
|
22
|
-
displayImage?: string;
|
|
23
15
|
}
|
|
24
16
|
export interface WhatsNewProviderProps {
|
|
25
17
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),s=require("react"),a=require("../../assets/icons/searchIcon.svg.js"),r=require("../../assets/icons/whatsNew.svg.js"),n=require("../../constants/Theme.js"),i=require("../button/Button.js"),o=require("../feature-announcements/VideoModal.js"),c=require("../searchBar/searchBar.js"),d=require("../side-modal/SideModal.js"),l=require("../TypographyStyle.js"),h=require("./WhatsNew.styles.js");exports.WhatsNewPanel=u=>{let{isOpen:j,onClose:m,content:x,isLoading:g=!1,title:w="What's new on BIK",searchPlaceholder:b="Search posts",emptyStateTitle:p="Nothing new!",emptyStateDescription:C="There are no new updates or features at the moment. Check back soon!",noResultsText:O="Sorry, no results found.",width:y="480px",onContentClick:f,renderCustomContent:N}=u;const[S,v]=s.useState(""),[M,q]=s.useState(!1),[L,T]=s.useState(""),k=e=>{if(!e.createdAt)return!1;const s=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,s)<7},B=s.useMemo((()=>{if(!S.trim())return x;const e=S.toLowerCase();return x.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[x,S]),D=0===x.length,A=0===B.length;return j?e.jsxs(d.SideModal,Object.assign({width:y,onClose:m,header:"",headerCustomComponent:e.jsx(l.TitleMedium,Object.assign({color:n.COLORS.background.inverse},{children:w})),headerStyle:{background:n.COLORS.background.brandLight},hideFooter:!0},{children:[e.jsxs(h.MainContainer,{children:[e.jsx("div",Object.assign({className:"mt-8"},{children:e.jsx(c.SearchBar,{width:"100%",isEnabled:!D,onChange:e=>{v(e)},onEnter:e=>{v(e)},placeholder:b,variant:"default",searchValue:S,onClickCross:()=>{v("")}})})),e.jsx(h.WhatsNewWrapper,{children:D||A?e.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsx("div",Object.assign({className:"icon--wrapper"},{children:D?e.jsx(r.default,{width:32,height:32}):e.jsx(a.default,{width:32,height:32})})),D?e.jsxs(e.Fragment,{children:[e.jsx(l.TitleRegular,{children:p}),e.jsx(l.BodyPrimary,Object.assign({color:n.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:C}))]}):A?e.jsx(l.BodyPrimary,Object.assign({color:n.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:O})):null]})):e.jsx("div",Object.assign({className:"scroller"},{children:B.map(((s,a)=>N?N(s):e.jsxs(h.MainCardContainer,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsx(h.BackgroundImageContainer,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[k(s)?e.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsx(l.Caption,{children:"New"})})):e.jsx(e.Fragment,{}),e.jsx(l.Caption,Object.assign({style:{color:n.COLORS.content.placeholder}},{children:s.createdAt?t.format(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsx("div",Object.assign({className:"mt--8"},{children:e.jsx(l.TitleSmall,{children:s.title})})),e.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsx(i.Button,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{e.productVideo?(T(e.productVideo),q(!0)):e.redirectUrl&&window.open(e.redirectUrl,"_blank"),f&&f(e)})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${a}`)))}))})]}),e.jsx(o.VideoModal,{isOpen:M,videoUrl:L,onClose:()=>{q(!1)}})]})):e.jsx(e.Fragment,{})};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -101,5 +101,8 @@ export * from './components/dot-pulse';
|
|
|
101
101
|
export * from './components/bik-chatbot';
|
|
102
102
|
export * from './components/banner';
|
|
103
103
|
export * from './components/feature-announcements';
|
|
104
|
+
export * from './components/post-live-checklist-item';
|
|
105
|
+
export * from './components/post-live-checklist';
|
|
106
|
+
export * from './components/ProgressChecklist';
|
|
104
107
|
export * from './components/BikGiftedChat';
|
|
105
108
|
export * from './components/markdown';
|