@bikdotai/bik-component-library 0.0.749-beta.0 → 0.0.749-beta.10

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.
Files changed (43) hide show
  1. package/dist/cjs/assets/icons/play.svg.js +1 -0
  2. package/dist/cjs/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
  3. package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
  4. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  5. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
  6. package/dist/cjs/components/feature-announcements/constants/dimensions.d.ts +99 -25
  7. package/dist/cjs/components/feature-announcements/constants/dimensions.js +1 -1
  8. package/dist/cjs/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
  9. package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.d.ts +13 -1
  10. package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.js +1 -1
  11. package/dist/cjs/components/feature-announcements/types/feature.types.d.ts +47 -0
  12. package/dist/cjs/components/feature-announcements/types/props.types.d.ts +25 -3
  13. package/dist/cjs/components/modals/Modal.d.ts +1 -0
  14. package/dist/cjs/components/modals/Modal.js +1 -1
  15. package/dist/cjs/components/modals/styledModal.d.ts +1 -0
  16. package/dist/cjs/components/modals/styledModal.js +1 -1
  17. package/dist/cjs/components/side-modal/SideModal.d.ts +1 -0
  18. package/dist/cjs/components/side-modal/SideModal.js +1 -1
  19. package/dist/cjs/components/whats-new/WhatsNew.types.d.ts +6 -0
  20. package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
  21. package/dist/cjs/components/whats-new/WhatsNewPanel.js +1 -1
  22. package/dist/esm/assets/icons/play.svg.js +1 -0
  23. package/dist/esm/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
  24. package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
  25. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  26. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
  27. package/dist/esm/components/feature-announcements/constants/dimensions.d.ts +99 -25
  28. package/dist/esm/components/feature-announcements/constants/dimensions.js +1 -1
  29. package/dist/esm/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
  30. package/dist/esm/components/feature-announcements/styles/majorPopup.styles.d.ts +13 -1
  31. package/dist/esm/components/feature-announcements/styles/majorPopup.styles.js +1 -1
  32. package/dist/esm/components/feature-announcements/types/feature.types.d.ts +47 -0
  33. package/dist/esm/components/feature-announcements/types/props.types.d.ts +25 -3
  34. package/dist/esm/components/modals/Modal.d.ts +1 -0
  35. package/dist/esm/components/modals/Modal.js +1 -1
  36. package/dist/esm/components/modals/styledModal.d.ts +1 -0
  37. package/dist/esm/components/modals/styledModal.js +1 -1
  38. package/dist/esm/components/side-modal/SideModal.d.ts +1 -0
  39. package/dist/esm/components/side-modal/SideModal.js +1 -1
  40. package/dist/esm/components/whats-new/WhatsNew.types.d.ts +6 -0
  41. package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
  42. package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -1
  43. package/package.json +1 -1
@@ -1,16 +1,12 @@
1
- /**
2
- * Popup dimension constants
3
- */
4
1
  export declare const POPUP_DIMENSIONS: {
5
2
  readonly MAJOR: {
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;
3
+ readonly height: 224;
4
+ readonly textAreaWidth: 398;
5
+ readonly imageWidth: {
6
+ readonly '16:9': 398;
7
+ readonly '1:1': 224;
8
+ readonly '4:3': 299;
9
+ };
14
10
  };
15
11
  readonly MINOR: {
16
12
  readonly width: 519;
@@ -20,20 +16,41 @@ export declare const POPUP_DIMENSIONS: {
20
16
  readonly badgeHeight: 27;
21
17
  };
22
18
  };
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
+ };
23
31
  /**
24
32
  * Spacing constants
25
33
  */
26
34
  export declare const SPACING: {
27
35
  readonly MAJOR: {
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";
36
+ readonly containerPadding: "16px";
37
+ readonly contentGap: "16px";
38
+ readonly titleBottom: "0px";
39
+ readonly listGap: "8px";
40
+ readonly actionsTop: "16px";
41
+ readonly headerMarginBottom: "8px";
42
+ readonly contentMarginLeft: "0px";
43
+ readonly skipButtonContainerMargin: "8px";
44
+ readonly contentMargin: "0 0 0 0px";
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";
37
54
  };
38
55
  readonly MINOR: {
39
56
  readonly imageMargin: "13px 10px 13px 10px";
@@ -43,14 +60,71 @@ export declare const SPACING: {
43
60
  readonly actionsGap: "16px";
44
61
  };
45
62
  };
46
- /**
47
- * Border radius constants
48
- */
49
63
  export declare const BORDER_RADIUS: {
50
- readonly POPUP: "4px";
51
- readonly IMAGE: "4px";
64
+ readonly POPUP: "8px";
65
+ readonly IMAGE: "6px";
52
66
  readonly BUTTON: "4px";
53
67
  readonly VIDEO_MODAL: "12px";
54
68
  readonly CLOSE_BUTTON: "50%";
55
69
  readonly SPOTLIGHT: "8px";
56
70
  };
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
- const i={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}},t={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"}},p={POPUP:"4px",IMAGE:"4px",BUTTON:"4px",VIDEO_MODAL:"12px",CLOSE_BUTTON:"50%",SPOTLIGHT:"8px"};export{p as BORDER_RADIUS,i as POPUP_DIMENSIONS,t as SPACING};
1
+ const t={MAJOR:{height:224,textAreaWidth:398,imageWidth:{"16:9":398,"1:1":224,"4:3":299}},MINOR:{width:519,height:160,imageWidth:235,imageHeight:134,badgeHeight:27}},i={MAJOR:{containerPadding:"16px",contentGap:"16px",titleBottom:"0px",listGap:"8px",actionsTop:"16px",headerMarginBottom:"8px",contentMarginLeft:"0px",skipButtonContainerMargin:"8px",contentMargin:"0 0 0 0px",imagePadding:"0px",titlePadding:"0 0 0px 0",buttonMarginTop:"0px",skipButtonPadding:"2px 4px",skipButtonTop:"8px",skipButtonRight:"8px",navigationBottom:"0px",navigationRight:"0px",navigationGap:"4px"},MINOR:{imageMargin:"13px 10px 13px 10px",contentMargin:"13px 13px 13px 3px",actionsBottom:"13px",actionsRight:"10px",actionsGap:"16px"}},n={POPUP:"8px",IMAGE:"6px",BUTTON:"4px",VIDEO_MODAL:"12px",CLOSE_BUTTON:"50%",SPOTLIGHT:"8px"},p={BACKGROUND:{SURFACE:"#212121",IMAGE:"#F0F0F0"},TEXT:{PRIMARY:"#FFFFFF",SECONDARY:"rgba(255, 255, 255, 0.8)",TERTIARY:"#BDBDBD"},BUTTON:{PRIMARY_TEXT:"#FEC02D",PRIMARY_BORDER:"#FEC02D"},ICON:{DISABLED:"rgba(255, 255, 255, 0.3)",ENABLED:"#FFFFFF"}},e={SKIP_BUTTON:{fontSize:"14px",fontWeight:"600",lineHeight:"20px",fontFamily:"Inter, sans-serif"},TITLE:{fontSize:"14px",fontWeight:"600",lineHeight:"20px",fontFamily:"Inter, sans-serif"},CONTENT:{fontSize:"12px",fontWeight:"400",lineHeight:"16px",fontFamily:"Inter, sans-serif"},BUTTON:{fontSize:"14px",fontWeight:"600",lineHeight:"20px",fontFamily:"Inter, sans-serif"}},x={IMAGE_HEIGHT:224,NAVIGATION_BUTTON_SIZE:24,BUTTON_HEIGHT:32,BUTTON_PADDING_HORIZONTAL:"12px"};export{n as BORDER_RADIUS,p as DESIGN_COLORS,x as DESIGN_DIMENSIONS,e as DESIGN_TYPOGRAPHY,t as POPUP_DIMENSIONS,i as SPACING};
@@ -27,7 +27,7 @@ export declare const minorStepStyles: {
27
27
  tooltip: {
28
28
  padding: number;
29
29
  backgroundColor: string;
30
- borderRadius: "4px";
30
+ borderRadius: "8px";
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: "4px";
104
+ borderRadius: "8px";
105
105
  border: string;
106
106
  filter: string;
107
107
  boxShadow: string;
@@ -1,6 +1,9 @@
1
1
  import { CSSProperties } from 'react';
2
- export declare const getMajorPopupStyles: (startAnimation: boolean, transform: string) => {
2
+ import { ButtonStyle } from '../types/feature.types';
3
+ export declare const getMajorPopupStyles: (startAnimation: boolean, transform: string, ratio?: '16:9' | '1:1' | '4:3', padding?: string, primaryButtonStyle?: ButtonStyle, secondaryButtonStyle?: ButtonStyle) => {
3
4
  container: CSSProperties;
5
+ headerContainer: CSSProperties;
6
+ contentWrapper: CSSProperties;
4
7
  skipButton: {
5
8
  base: CSSProperties;
6
9
  hover: CSSProperties;
@@ -8,13 +11,22 @@ export declare const getMajorPopupStyles: (startAnimation: boolean, transform: s
8
11
  imageContainer: CSSProperties;
9
12
  image: CSSProperties;
10
13
  imagePlaceholder: CSSProperties;
14
+ videoOverlay: CSSProperties;
15
+ playIcon: CSSProperties;
11
16
  contentContainer: CSSProperties;
17
+ skipButtonContainer: CSSProperties;
12
18
  title: CSSProperties;
13
19
  content: CSSProperties;
20
+ actionsWrapper: CSSProperties;
21
+ buttonsGroup: CSSProperties;
14
22
  exploreButton: {
15
23
  base: CSSProperties;
16
24
  hover: CSSProperties;
17
25
  };
26
+ secondaryButton: {
27
+ base: CSSProperties;
28
+ hover: CSSProperties;
29
+ };
18
30
  navigationContainer: CSSProperties;
19
31
  navigationButton: (disabled: boolean) => {
20
32
  base: CSSProperties;
@@ -1 +1 @@
1
- import{BASE_COLORS as t}from"../../../constants/Theme.js";import{POPUP_TRANSITION as e}from"../constants/animations.js";import{POPUP_DIMENSIONS as n,BORDER_RADIUS as i,SPACING as o}from"../constants/dimensions.js";import{Z_INDEX as a}from"../constants/zIndex.js";const r=(r,l)=>({container:{width:`${n.MAJOR.width}px`,height:`${n.MAJOR.height}px`,display:"flex",backgroundColor:t.grayscale[900],borderRadius:i.POPUP,overflow:"hidden",position:"relative",transform:r?l:"scale(1)",opacity:r?0:1,transition:e},skipButton:{base:{position:"absolute",top:o.MAJOR.skipButtonTop,right:o.MAJOR.skipButtonRight,background:"transparent",border:"none",color:t.grayscale[400],fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:a.SKIP_BUTTON,transition:"all 0.2s"},hover:{backgroundColor:t.grayscale[100],color:t.grayscale[700]}},imageContainer:{backgroundColor:t.grayscale[900],width:`${n.MAJOR.imageWidth}px`,height:`${n.MAJOR.imageHeight}px`,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:o.MAJOR.imagePadding},image:{width:`${n.MAJOR.imageInnerWidth}px`,height:`${n.MAJOR.imageInnerHeight}px`,objectFit:"cover"},imagePlaceholder:{color:t.grayscale[500],fontSize:"14px",textAlign:"center",width:`${n.MAJOR.imagePlaceholderWidth}px`,height:`${n.MAJOR.imagePlaceholderHeight}px`,display:"flex",alignItems:"center",justifyContent:"center"},contentContainer:{flex:1,display:"flex",margin:o.MAJOR.contentMargin,flexDirection:"column",justifyContent:"space-between",background:"transparent"},title:{fontSize:"16px",fontWeight:"600",padding:o.MAJOR.titlePadding,color:t.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 ${t.warning[500]}`,color:t.warning[500],borderRadius:i.BUTTON,fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:o.MAJOR.buttonMarginTop},hover:{backgroundColor:"rgba(254, 192, 45, 0.1)"}},navigationContainer:{position:"absolute",bottom:o.MAJOR.navigationBottom,right:o.MAJOR.navigationRight,display:"flex",gap:o.MAJOR.navigationGap,alignItems:"center"},navigationButton:e=>({base:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:e?t.grayscale[700]:t.grayscale.white,fontSize:"20px",cursor:e?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},hover:{color:t.warning[500]}})});export{r as getMajorPopupStyles};
1
+ import{BASE_COLORS as t}from"../../../constants/Theme.js";import{POPUP_TRANSITION as e}from"../constants/animations.js";import{SPACING as o,POPUP_DIMENSIONS as n,DESIGN_COLORS as i,BORDER_RADIUS as r,DESIGN_TYPOGRAPHY as a,DESIGN_DIMENSIONS as l}from"../constants/dimensions.js";const d=(t,e)=>Object.assign(Object.assign(Object.assign(Object.assign({},t),(null==e?void 0:e.textColor)&&{color:e.textColor}),(null==e?void 0:e.backgroundColor)&&{backgroundColor:e.backgroundColor}),(null==e?void 0:e.borderColor)&&{borderColor:e.borderColor}),g=function(g,s){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"16:9",T=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.MAJOR.containerPadding,p=arguments.length>4?arguments[4]:void 0;const f=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"16:9";return n.MAJOR.imageWidth[t]||n.MAJOR.imageWidth["16:9"]}(c),h=parseInt(T,10)||16,u=l.IMAGE_HEIGHT+2*h;return{container:{width:`${h+f+parseInt(o.MAJOR.contentGap,10)+n.MAJOR.textAreaWidth+h}px`,height:"auto",minHeight:`${u}px`,display:"flex",flexDirection:"column",backgroundColor:i.BACKGROUND.SURFACE,borderRadius:r.POPUP,overflow:"hidden",position:"relative",padding:T,transform:g?s:"scale(1)",opacity:g?0:1,transition:e,boxSizing:"border-box"},headerContainer:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:o.MAJOR.headerMarginBottom,position:"relative"},contentWrapper:{display:"flex",flex:1,gap:o.MAJOR.contentGap},skipButton:{base:{background:"transparent",border:"none",color:i.TEXT.TERTIARY,fontSize:a.SKIP_BUTTON.fontSize,fontWeight:a.SKIP_BUTTON.fontWeight,cursor:"pointer",padding:o.MAJOR.skipButtonPadding,borderRadius:r.BUTTON,fontFamily:a.SKIP_BUTTON.fontFamily,lineHeight:a.SKIP_BUTTON.lineHeight},hover:{backgroundColor:t.grayscale[100],color:t.grayscale[700]}},imageContainer:{backgroundColor:i.BACKGROUND.IMAGE,width:`${f}px`,height:`${l.IMAGE_HEIGHT}px`,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:r.BUTTON,overflow:"hidden",flexShrink:0},image:{width:"100%",height:"100%",objectFit:"cover"},imagePlaceholder:{color:t.grayscale[500],fontSize:"14px",textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t.grayscale[800]},videoOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.4)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:10,transition:"opacity 0.2s"},playIcon:{width:"84px",height:"84px",color:"#060606ff"},contentContainer:{flex:1,display:"flex",marginLeft:o.MAJOR.contentMarginLeft,flexDirection:"column",justifyContent:"flex-start",background:"transparent",maxWidth:`${n.MAJOR.textAreaWidth}px`,gap:o.MAJOR.listGap},skipButtonContainer:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:o.MAJOR.skipButtonContainerMargin},title:{fontSize:a.TITLE.fontSize,fontWeight:a.TITLE.fontWeight,marginBottom:o.MAJOR.titleBottom,padding:0,color:i.TEXT.PRIMARY,lineHeight:a.TITLE.lineHeight,textAlign:"left",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",fontFamily:a.TITLE.fontFamily},content:{fontSize:a.CONTENT.fontSize,lineHeight:a.CONTENT.lineHeight,color:i.TEXT.SECONDARY,textAlign:"left",marginBottom:"auto",fontFamily:a.CONTENT.fontFamily,fontWeight:a.CONTENT.fontWeight},actionsWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",marginRight:o.MAJOR.actionsTop,gap:"8px",flexWrap:"nowrap"},buttonsGroup:{display:"flex",alignItems:"center",gap:o.MAJOR.listGap},exploreButton:{base:d({backgroundColor:"transparent",border:`1px solid ${i.BUTTON.PRIMARY_BORDER}`,color:i.BUTTON.PRIMARY_TEXT,borderRadius:r.BUTTON,fontSize:a.BUTTON.fontSize,fontWeight:a.BUTTON.fontWeight,cursor:"pointer",padding:`0 ${l.BUTTON_PADDING_HORIZONTAL}`,height:`${l.BUTTON_HEIGHT}px`,textAlign:"center",minWidth:"auto",textDecoration:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:a.BUTTON.fontFamily,lineHeight:a.BUTTON.lineHeight},p),hover:{backgroundColor:(null==p?void 0:p.backgroundColor)?`${p.backgroundColor}cc`:"rgba(254, 192, 45, 0.1)"}},secondaryButton:{base:d({backgroundColor:"transparent",color:i.BUTTON.PRIMARY_TEXT,borderRadius:r.BUTTON,fontSize:a.BUTTON.fontSize,fontWeight:a.BUTTON.fontWeight,cursor:"pointer",padding:`0 ${l.BUTTON_PADDING_HORIZONTAL}`,height:`${l.BUTTON_HEIGHT}px`,textAlign:"center",minWidth:"auto",textDecoration:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:a.BUTTON.fontFamily,lineHeight:a.BUTTON.lineHeight,transition:"none"},p),hover:{backgroundColor:(null==p?void 0:p.backgroundColor)?`${p.backgroundColor}cc`:"rgba(254, 192, 45, 0.1)"}},navigationContainer:{display:"flex",gap:o.MAJOR.navigationGap,alignItems:"center"},navigationButton:e=>({base:{width:`${l.NAVIGATION_BUTTON_SIZE}px`,height:`${l.NAVIGATION_BUTTON_SIZE}px`,backgroundColor:"transparent",border:"none",color:e?i.ICON.DISABLED:i.ICON.ENABLED,fontSize:"16px",cursor:e?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:r.BUTTON,padding:0},hover:{color:t.warning[500]}})}};export{g as getMajorPopupStyles};
@@ -5,6 +5,32 @@ 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
+ /**
17
+ * Primary button configuration
18
+ */
19
+ export interface ButtonConfig {
20
+ text?: string;
21
+ action?: 'Play Video' | 'Open link';
22
+ redirectionUrl?: string;
23
+ style?: ButtonStyle;
24
+ }
25
+ /**
26
+ * Secondary button configuration
27
+ */
28
+ export interface SecondaryButtonConfig {
29
+ text?: string;
30
+ action?: 'Open link' | 'Close popup' | '';
31
+ redirectionUrl?: string;
32
+ style?: ButtonStyle;
33
+ }
8
34
  /**
9
35
  * Feature announcement data model
10
36
  */
@@ -27,6 +53,9 @@ export interface FeatureAnnouncement {
27
53
  archived?: boolean;
28
54
  createdAt: FirestoreTimestamp;
29
55
  expirationDate?: FirestoreTimestamp | string | Date;
56
+ primaryButton?: ButtonConfig;
57
+ secondaryButton?: SecondaryButtonConfig;
58
+ padding?: string;
30
59
  }
31
60
  /**
32
61
  * Store feature progress tracking
@@ -39,3 +68,21 @@ export interface StoreFeatureProgress {
39
68
  * Feature update types
40
69
  */
41
70
  export type FeatureUpdateType = 'Major' | 'Minor';
71
+ /**
72
+ * Announcement event data (for tracking when announcement is shown)
73
+ */
74
+ export interface AnnouncementEvent {
75
+ storeId: string;
76
+ announcementId: string;
77
+ announcementTitle: string;
78
+ imageUrl?: string;
79
+ videoUrl?: string;
80
+ }
81
+ /**
82
+ * Announcement interaction event data (for tracking button clicks)
83
+ */
84
+ export interface AnnouncementInteractionEvent extends AnnouncementEvent {
85
+ buttonClicked: 'Primary' | 'Secondary' | 'Skip';
86
+ buttonName: string;
87
+ buttonUrl?: string;
88
+ }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FeatureAnnouncement } from './feature.types';
2
+ import { AnnouncementEvent, AnnouncementInteractionEvent, FeatureAnnouncement } from './feature.types';
3
3
  import { FeatureAnnouncementRepository } from './repository.types';
4
4
  import { RouterProps } from './router.types';
5
5
  /**
@@ -14,17 +14,27 @@ export interface PopupBaseProps {
14
14
  onPrevious: () => void;
15
15
  onNext: () => void;
16
16
  setIsClosing?: (isClosing: boolean) => void;
17
+ onSecondaryAction?: () => void;
17
18
  }
18
19
  /**
19
20
  * Major update popup props
20
21
  */
21
22
  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;
22
33
  }
23
34
  /**
24
35
  * Minor update popup props
25
36
  */
26
- export interface MinorUpdatePopupProps extends PopupBaseProps {
27
- }
37
+ export type MinorUpdatePopupProps = PopupBaseProps;
28
38
  /**
29
39
  * Video modal props
30
40
  */
@@ -40,4 +50,16 @@ export interface FeatureAnnouncementProviderProps extends FeatureAnnouncementRep
40
50
  children: React.ReactNode;
41
51
  module?: string;
42
52
  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;
43
65
  }
@@ -6,6 +6,7 @@ export declare const Modal: React.FC<{
6
6
  children?: React.ReactNode;
7
7
  centralContainerStyles?: React.CSSProperties;
8
8
  closeOnOutsideClick?: boolean;
9
+ closeOnEscapeKey?: boolean;
9
10
  zIndex?: number;
10
11
  hideCrossButton?: boolean;
11
12
  width?: string;
@@ -1 +1 @@
1
- import{jsx as t,Fragment as e,jsxs as o}from"react/jsx-runtime";import{useState as i,useEffect as s}from"react";import{RootContainer as n,CentralContainer as r,CloseButtonContainer as a,CloseButtonWithTimer as l}from"./modal.styled.js";import{COLORS as c}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{BodySecondary as h}from"../TypographyStyle.js";const m=m=>{var p;const[g,k]=i(m.timeOut||5);s((()=>{if(!m.skipModalWithTimer)return;const t=setInterval((()=>{k((e=>{const o=e-1;return o<=0?(clearInterval(t),0):o}))}),1e3);return()=>clearInterval(t)}),[m.skipModalWithTimer]);return t(e,{children:m.open&&t("div",Object.assign({id:m.id||"bik-modal"},{children:t(n,Object.assign({"data-test":m["data-test"],zIndex:m.zIndex,onClick:t=>{m.closeOnOutsideClick&&m.onClose?m.skipModalWithTimer&&g>0?t.stopPropagation():m.onClose():t.stopPropagation()}},{children:t(r,Object.assign({style:Object.assign({},null!==(p=m.centralContainerStyles)&&void 0!==p?p:{}),onClick:t=>{t.stopPropagation()},width:m.width},{children:o(e,{children:[!(null==m?void 0:m.hideCrossButton)&&!m.skipModalWithTimer&&t(a,Object.assign({"data-test":(m["data-test"]||"")+"-close-button",onClick:()=>m.onClose&&m.onClose()},{children:t(d,{height:20,width:20,color:c.content.secondary})})),m.skipModalWithTimer&&o(l,Object.assign({"data-test":(m["data-test"]||"")+"-timer-close-button",onClick:()=>{g>0||m.onClose&&m.onClose()},timerExists:g>0},{children:[g>0?o(h,{children:["Skip in ",g," sec "]}):t(e,{}),t(d,{height:20,width:20,color:g>0?c.stroke.primary:c.content.secondary})]})),m.children]})}))}))}))})};export{m as Modal};
1
+ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useState as n,useEffect as i}from"react";import{RootContainer as s,CentralContainer as r,CloseButtonContainer as l,CloseButtonWithTimer as a}from"./modal.styled.js";import{COLORS as c}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{BodySecondary as m}from"../TypographyStyle.js";const p=p=>{var h;const[u,k]=n(p.timeOut||5);i((()=>{if(!p.skipModalWithTimer)return;const e=setInterval((()=>{k((t=>{const o=t-1;return o<=0?(clearInterval(e),0):o}))}),1e3);return()=>clearInterval(e)}),[p.skipModalWithTimer]),i((()=>{var e;if(!p.open)return;if(!p.onClose)return;if(!(null===(e=p.closeOnEscapeKey)||void 0===e||e))return;const t=p.onClose,o=e=>{"Escape"===e.key&&(p.skipModalWithTimer&&u>0||t())};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}}),[p.open,p.onClose,p.closeOnEscapeKey,p.skipModalWithTimer,u]);return e(t,{children:p.open&&e("div",Object.assign({id:p.id||"bik-modal"},{children:e(s,Object.assign({"data-test":p["data-test"],zIndex:p.zIndex,onClick:e=>{p.closeOnOutsideClick&&p.onClose?p.skipModalWithTimer&&u>0?e.stopPropagation():p.onClose():e.stopPropagation()}},{children:e(r,Object.assign({style:Object.assign({},null!==(h=p.centralContainerStyles)&&void 0!==h?h:{}),onClick:e=>{e.stopPropagation()},width:p.width},{children:o(t,{children:[!(null==p?void 0:p.hideCrossButton)&&!p.skipModalWithTimer&&e(l,Object.assign({"data-test":(p["data-test"]||"")+"-close-button",onClick:()=>p.onClose&&p.onClose()},{children:e(d,{height:20,width:20,color:c.content.secondary})})),p.skipModalWithTimer&&o(a,Object.assign({"data-test":(p["data-test"]||"")+"-timer-close-button",onClick:()=>{u>0||p.onClose&&p.onClose()},timerExists:u>0},{children:[u>0?o(m,{children:["Skip in ",u," sec "]}):e(t,{}),e(d,{height:20,width:20,color:u>0?c.stroke.primary:c.content.secondary})]})),p.children]})}))}))}))})};export{p as Modal};
@@ -7,6 +7,7 @@ export declare const StyledModal: React.FC<{
7
7
  children?: React.ReactNode;
8
8
  centralContainerStyles?: React.CSSProperties;
9
9
  closeOnOutsideClick?: boolean;
10
+ closeOnEscapeKey?: boolean;
10
11
  headingTitle?: string;
11
12
  headingSubtitle?: string;
12
13
  tintedHeader?: boolean;